diff --git a/.go-version b/.go-version index 7a429d68a36af..d905a6d1d6191 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.24.6 +1.25.1 diff --git a/CHANGELOG/CHANGELOG-1.28.md b/CHANGELOG/CHANGELOG-1.28.md index efe838f202b66..34535d47252bc 100644 --- a/CHANGELOG/CHANGELOG-1.28.md +++ b/CHANGELOG/CHANGELOG-1.28.md @@ -2360,7 +2360,7 @@ name | architectures - Code blocks in `kubectl {$COMMAND}--help` will move right by 3 indentation. ([#118029](https://github.com/kubernetes/kubernetes/pull/118029), [@ardaguclu](https://github.com/ardaguclu)) - Compute the backoff delay more accurately for deleted pods ([#118413](https://github.com/kubernetes/kubernetes/pull/118413), [@mimowo](https://github.com/mimowo)) [SIG Apps] - Declare Job as finished only after removing all Pod finalizers to avoid orphan Pods. ([#119159](https://github.com/kubernetes/kubernetes/pull/119159), [@alculquicondor](https://github.com/alculquicondor)) -- During device plugin allocation, resources requested by the pod can only be allocated if the device plugin has registered itself to kubelet AND healthy devices are present on the node to be allocated. If these conditions are not sattsfied, the pod would fail with `UnexpectedAdmissionError` error. ([#116376](https://github.com/kubernetes/kubernetes/pull/116376), [@swatisehgal](https://github.com/swatisehgal)) [SIG Node and Testing] +- During device plugin allocation, resources requested by the pod can only be allocated if the device plugin has registered itself to kubelet AND healthy devices are present on the node to be allocated. If these conditions are not satisfied, the pod would fail with `UnexpectedAdmissionError` error. ([#116376](https://github.com/kubernetes/kubernetes/pull/116376), [@swatisehgal](https://github.com/swatisehgal)) [SIG Node and Testing] - Dynamic Resource Allocation: logged an error and submitted an event when `Kubelet` failed to prepare dynamic resources. ([#118578](https://github.com/kubernetes/kubernetes/pull/118578), [@bart0sh](https://github.com/bart0sh)) - Ensure Job status updates are batched by 1s. This fixes an unlikely scenario when a sequence of immediately completing pods could trigger a sequence of non-batched Job status updates. ([#118470](https://github.com/kubernetes/kubernetes/pull/118470), [@mimowo](https://github.com/mimowo)) [SIG Apps] @@ -3764,7 +3764,7 @@ name | architectures - CVE-2023-27561 CVE-2023-25809 CVE-2023-28642: Bump fix runc v1.1.4 -> v1.1.5 ([#117095](https://github.com/kubernetes/kubernetes/pull/117095), [@PushkarJ](https://github.com/PushkarJ)) [SIG Architecture, Node and Security] - Code blocks in kubectl {$COMMAND}--help will move right by 3 indentation. ([#118029](https://github.com/kubernetes/kubernetes/pull/118029), [@ardaguclu](https://github.com/ardaguclu)) [SIG CLI] -- During device plugin allocation, resources requested by the pod can only be allocated if the device plugin has registered itself to kubelet AND healthy devices are present on the node to be allocated. If these conditions are not sattsfied, the pod would fail with `UnexpectedAdmissionError` error. ([#116376](https://github.com/kubernetes/kubernetes/pull/116376), [@swatisehgal](https://github.com/swatisehgal)) [SIG Node and Testing] +- During device plugin allocation, resources requested by the pod can only be allocated if the device plugin has registered itself to kubelet AND healthy devices are present on the node to be allocated. If these conditions are not satisfied, the pod would fail with `UnexpectedAdmissionError` error. ([#116376](https://github.com/kubernetes/kubernetes/pull/116376), [@swatisehgal](https://github.com/swatisehgal)) [SIG Node and Testing] - Fix Topology Aware Hints not working when the `topology.kubernetes.io/zone` label is added after Node creation ([#117245](https://github.com/kubernetes/kubernetes/pull/117245), [@tnqn](https://github.com/tnqn)) [SIG Apps and Network] - Fix a data race in TopologyCache when `AddHints` and `SetNodes` are called concurrently ([#117249](https://github.com/kubernetes/kubernetes/pull/117249), [@tnqn](https://github.com/tnqn)) [SIG Apps and Network] - Fix bug where `listOfStrings.join()` in CEL expressions resulted in an unexpected internal error. ([#117593](https://github.com/kubernetes/kubernetes/pull/117593), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery] diff --git a/CHANGELOG/CHANGELOG-1.31.md b/CHANGELOG/CHANGELOG-1.31.md index b770e6b68eef9..18abac882853d 100644 --- a/CHANGELOG/CHANGELOG-1.31.md +++ b/CHANGELOG/CHANGELOG-1.31.md @@ -1,281 +1,280 @@ -- [v1.31.12](#v13112) - - [Downloads for v1.31.12](#downloads-for-v13112) +- [v1.31.13](#v13113) + - [Downloads for v1.31.13](#downloads-for-v13113) - [Source Code](#source-code) - [Client Binaries](#client-binaries) - [Server Binaries](#server-binaries) - [Node Binaries](#node-binaries) - [Container Images](#container-images) - - [Changelog since v1.31.11](#changelog-since-v13111) - - [Important Security Information](#important-security-information) - - [CVE-2025-5187: Nodes can delete themselves by adding an OwnerReference](#cve-2025-5187-nodes-can-delete-themselves-by-adding-an-ownerreference) + - [Changelog since v1.31.12](#changelog-since-v13112) - [Changes by Kind](#changes-by-kind) - [Feature](#feature) - [Bug or Regression](#bug-or-regression) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake) - [Dependencies](#dependencies) - [Added](#added) - [Changed](#changed) - [Removed](#removed) -- [v1.31.11](#v13111) - - [Downloads for v1.31.11](#downloads-for-v13111) +- [v1.31.12](#v13112) + - [Downloads for v1.31.12](#downloads-for-v13112) - [Source Code](#source-code-1) - [Client Binaries](#client-binaries-1) - [Server Binaries](#server-binaries-1) - [Node Binaries](#node-binaries-1) - [Container Images](#container-images-1) - - [Changelog since v1.31.10](#changelog-since-v13110) + - [Changelog since v1.31.11](#changelog-since-v13111) + - [Important Security Information](#important-security-information) + - [CVE-2025-5187: Nodes can delete themselves by adding an OwnerReference](#cve-2025-5187-nodes-can-delete-themselves-by-adding-an-ownerreference) - [Changes by Kind](#changes-by-kind-1) + - [Feature](#feature-1) - [Bug or Regression](#bug-or-regression-1) - [Dependencies](#dependencies-1) - [Added](#added-1) - [Changed](#changed-1) - [Removed](#removed-1) -- [v1.31.10](#v13110) - - [Downloads for v1.31.10](#downloads-for-v13110) +- [v1.31.11](#v13111) + - [Downloads for v1.31.11](#downloads-for-v13111) - [Source Code](#source-code-2) - [Client Binaries](#client-binaries-2) - [Server Binaries](#server-binaries-2) - [Node Binaries](#node-binaries-2) - [Container Images](#container-images-2) - - [Changelog since v1.31.9](#changelog-since-v1319) + - [Changelog since v1.31.10](#changelog-since-v13110) - [Changes by Kind](#changes-by-kind-2) - - [Feature](#feature-1) - [Bug or Regression](#bug-or-regression-2) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake) - [Dependencies](#dependencies-2) - [Added](#added-2) - [Changed](#changed-2) - [Removed](#removed-2) -- [v1.31.9](#v1319) - - [Downloads for v1.31.9](#downloads-for-v1319) +- [v1.31.10](#v13110) + - [Downloads for v1.31.10](#downloads-for-v13110) - [Source Code](#source-code-3) - [Client Binaries](#client-binaries-3) - [Server Binaries](#server-binaries-3) - [Node Binaries](#node-binaries-3) - [Container Images](#container-images-3) - - [Changelog since v1.31.8](#changelog-since-v1318) + - [Changelog since v1.31.9](#changelog-since-v1319) - [Changes by Kind](#changes-by-kind-3) - [Feature](#feature-2) - [Bug or Regression](#bug-or-regression-3) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-1) - [Dependencies](#dependencies-3) - [Added](#added-3) - [Changed](#changed-3) - [Removed](#removed-3) -- [v1.31.8](#v1318) - - [Downloads for v1.31.8](#downloads-for-v1318) +- [v1.31.9](#v1319) + - [Downloads for v1.31.9](#downloads-for-v1319) - [Source Code](#source-code-4) - [Client Binaries](#client-binaries-4) - [Server Binaries](#server-binaries-4) - [Node Binaries](#node-binaries-4) - [Container Images](#container-images-4) - - [Changelog since v1.31.7](#changelog-since-v1317) + - [Changelog since v1.31.8](#changelog-since-v1318) - [Changes by Kind](#changes-by-kind-4) + - [Feature](#feature-3) - [Bug or Regression](#bug-or-regression-4) - [Dependencies](#dependencies-4) - [Added](#added-4) - [Changed](#changed-4) - [Removed](#removed-4) -- [v1.31.7](#v1317) - - [Downloads for v1.31.7](#downloads-for-v1317) +- [v1.31.8](#v1318) + - [Downloads for v1.31.8](#downloads-for-v1318) - [Source Code](#source-code-5) - [Client Binaries](#client-binaries-5) - [Server Binaries](#server-binaries-5) - [Node Binaries](#node-binaries-5) - [Container Images](#container-images-5) - - [Changelog since v1.31.6](#changelog-since-v1316) + - [Changelog since v1.31.7](#changelog-since-v1317) - [Changes by Kind](#changes-by-kind-5) - [Bug or Regression](#bug-or-regression-5) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake-1) - [Dependencies](#dependencies-5) - [Added](#added-5) - [Changed](#changed-5) - [Removed](#removed-5) -- [v1.31.6](#v1316) - - [Downloads for v1.31.6](#downloads-for-v1316) +- [v1.31.7](#v1317) + - [Downloads for v1.31.7](#downloads-for-v1317) - [Source Code](#source-code-6) - [Client Binaries](#client-binaries-6) - [Server Binaries](#server-binaries-6) - [Node Binaries](#node-binaries-6) - [Container Images](#container-images-6) - - [Changelog since v1.31.5](#changelog-since-v1315) - - [Important Security Information](#important-security-information-1) - - [CVE-2025-0426: Node Denial of Service via Kubelet Checkpoint API](#cve-2025-0426-node-denial-of-service-via-kubelet-checkpoint-api) + - [Changelog since v1.31.6](#changelog-since-v1316) - [Changes by Kind](#changes-by-kind-6) - - [Feature](#feature-3) - [Bug or Regression](#bug-or-regression-6) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-2) - [Dependencies](#dependencies-6) - [Added](#added-6) - [Changed](#changed-6) - [Removed](#removed-6) -- [v1.31.5](#v1315) - - [Downloads for v1.31.5](#downloads-for-v1315) +- [v1.31.6](#v1316) + - [Downloads for v1.31.6](#downloads-for-v1316) - [Source Code](#source-code-7) - [Client Binaries](#client-binaries-7) - [Server Binaries](#server-binaries-7) - [Node Binaries](#node-binaries-7) - [Container Images](#container-images-7) - - [Changelog since v1.31.4](#changelog-since-v1314) - - [Important Security Information](#important-security-information-2) - - [CVE-2024-9042: Command Injection affecting Windows nodes via nodes/*/logs/query API](#cve-2024-9042-command-injection-affecting-windows-nodes-via-nodeslogsquery-api) + - [Changelog since v1.31.5](#changelog-since-v1315) + - [Important Security Information](#important-security-information-1) + - [CVE-2025-0426: Node Denial of Service via Kubelet Checkpoint API](#cve-2025-0426-node-denial-of-service-via-kubelet-checkpoint-api) - [Changes by Kind](#changes-by-kind-7) - - [API Change](#api-change) - [Feature](#feature-4) - [Bug or Regression](#bug-or-regression-7) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-3) - [Dependencies](#dependencies-7) - [Added](#added-7) - [Changed](#changed-7) - [Removed](#removed-7) -- [v1.31.4](#v1314) - - [Downloads for v1.31.4](#downloads-for-v1314) +- [v1.31.5](#v1315) + - [Downloads for v1.31.5](#downloads-for-v1315) - [Source Code](#source-code-8) - [Client Binaries](#client-binaries-8) - [Server Binaries](#server-binaries-8) - [Node Binaries](#node-binaries-8) - [Container Images](#container-images-8) - - [Changelog since v1.31.3](#changelog-since-v1313) + - [Changelog since v1.31.4](#changelog-since-v1314) + - [Important Security Information](#important-security-information-2) + - [CVE-2024-9042: Command Injection affecting Windows nodes via nodes/*/logs/query API](#cve-2024-9042-command-injection-affecting-windows-nodes-via-nodeslogsquery-api) - [Changes by Kind](#changes-by-kind-8) + - [API Change](#api-change) - [Feature](#feature-5) - [Bug or Regression](#bug-or-regression-8) - [Dependencies](#dependencies-8) - [Added](#added-8) - [Changed](#changed-8) - [Removed](#removed-8) -- [v1.31.3](#v1313) - - [Downloads for v1.31.3](#downloads-for-v1313) +- [v1.31.4](#v1314) + - [Downloads for v1.31.4](#downloads-for-v1314) - [Source Code](#source-code-9) - [Client Binaries](#client-binaries-9) - [Server Binaries](#server-binaries-9) - [Node Binaries](#node-binaries-9) - [Container Images](#container-images-9) - - [Changelog since v1.31.2](#changelog-since-v1312) + - [Changelog since v1.31.3](#changelog-since-v1313) - [Changes by Kind](#changes-by-kind-9) + - [Feature](#feature-6) - [Bug or Regression](#bug-or-regression-9) - [Dependencies](#dependencies-9) - [Added](#added-9) - [Changed](#changed-9) - [Removed](#removed-9) -- [v1.31.2](#v1312) - - [Downloads for v1.31.2](#downloads-for-v1312) +- [v1.31.3](#v1313) + - [Downloads for v1.31.3](#downloads-for-v1313) - [Source Code](#source-code-10) - [Client Binaries](#client-binaries-10) - [Server Binaries](#server-binaries-10) - [Node Binaries](#node-binaries-10) - [Container Images](#container-images-10) - - [Changelog since v1.31.1](#changelog-since-v1311) + - [Changelog since v1.31.2](#changelog-since-v1312) - [Changes by Kind](#changes-by-kind-10) - - [Feature](#feature-6) - [Bug or Regression](#bug-or-regression-10) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake-3) - - [Uncategorized](#uncategorized) - [Dependencies](#dependencies-10) - [Added](#added-10) - [Changed](#changed-10) - [Removed](#removed-10) -- [v1.31.1](#v1311) - - [Downloads for v1.31.1](#downloads-for-v1311) +- [v1.31.2](#v1312) + - [Downloads for v1.31.2](#downloads-for-v1312) - [Source Code](#source-code-11) - [Client Binaries](#client-binaries-11) - [Server Binaries](#server-binaries-11) - [Node Binaries](#node-binaries-11) - [Container Images](#container-images-11) - - [Changelog since v1.31.0](#changelog-since-v1310) + - [Changelog since v1.31.1](#changelog-since-v1311) - [Changes by Kind](#changes-by-kind-11) - - [Deprecation](#deprecation) - - [API Change](#api-change-1) - [Feature](#feature-7) - [Bug or Regression](#bug-or-regression-11) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-4) + - [Uncategorized](#uncategorized) - [Dependencies](#dependencies-11) - [Added](#added-11) - [Changed](#changed-11) - [Removed](#removed-11) -- [v1.31.0](#v1310) - - [Downloads for v1.31.0](#downloads-for-v1310) +- [v1.31.1](#v1311) + - [Downloads for v1.31.1](#downloads-for-v1311) - [Source Code](#source-code-12) - [Client Binaries](#client-binaries-12) - [Server Binaries](#server-binaries-12) - [Node Binaries](#node-binaries-12) - [Container Images](#container-images-12) - - [Changelog since v1.30.0](#changelog-since-v1300) - - [Urgent Upgrade Notes](#urgent-upgrade-notes) - - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade) + - [Changelog since v1.31.0](#changelog-since-v1310) - [Changes by Kind](#changes-by-kind-12) - - [Deprecation](#deprecation-1) - - [API Change](#api-change-2) + - [Deprecation](#deprecation) + - [API Change](#api-change-1) - [Feature](#feature-8) - - [Failing Test](#failing-test) - [Bug or Regression](#bug-or-regression-12) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-5) - [Dependencies](#dependencies-12) - [Added](#added-12) - [Changed](#changed-12) - [Removed](#removed-12) -- [v1.31.0-rc.1](#v1310-rc1) - - [Downloads for v1.31.0-rc.1](#downloads-for-v1310-rc1) +- [v1.31.0](#v1310) + - [Downloads for v1.31.0](#downloads-for-v1310) - [Source Code](#source-code-13) - [Client Binaries](#client-binaries-13) - [Server Binaries](#server-binaries-13) - [Node Binaries](#node-binaries-13) - [Container Images](#container-images-13) - - [Changelog since v1.31.0-rc.0](#changelog-since-v1310-rc0) + - [Changelog since v1.30.0](#changelog-since-v1300) + - [Urgent Upgrade Notes](#urgent-upgrade-notes) + - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade) - [Changes by Kind](#changes-by-kind-13) - - [API Change](#api-change-3) + - [Deprecation](#deprecation-1) + - [API Change](#api-change-2) - [Feature](#feature-9) + - [Failing Test](#failing-test) - [Bug or Regression](#bug-or-regression-13) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-6) - [Dependencies](#dependencies-13) - [Added](#added-13) - [Changed](#changed-13) - [Removed](#removed-13) -- [v1.31.0-rc.0](#v1310-rc0) - - [Downloads for v1.31.0-rc.0](#downloads-for-v1310-rc0) +- [v1.31.0-rc.1](#v1310-rc1) + - [Downloads for v1.31.0-rc.1](#downloads-for-v1310-rc1) - [Source Code](#source-code-14) - [Client Binaries](#client-binaries-14) - [Server Binaries](#server-binaries-14) - [Node Binaries](#node-binaries-14) - [Container Images](#container-images-14) - - [Changelog since v1.31.0-beta.0](#changelog-since-v1310-beta0) - - [Urgent Upgrade Notes](#urgent-upgrade-notes-1) - - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade-1) + - [Changelog since v1.31.0-rc.0](#changelog-since-v1310-rc0) - [Changes by Kind](#changes-by-kind-14) - - [Deprecation](#deprecation-2) - - [API Change](#api-change-4) + - [API Change](#api-change-3) - [Feature](#feature-10) - - [Failing Test](#failing-test-1) - [Bug or Regression](#bug-or-regression-14) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake-6) - [Dependencies](#dependencies-14) - [Added](#added-14) - [Changed](#changed-14) - [Removed](#removed-14) -- [v1.31.0-beta.0](#v1310-beta0) - - [Downloads for v1.31.0-beta.0](#downloads-for-v1310-beta0) +- [v1.31.0-rc.0](#v1310-rc0) + - [Downloads for v1.31.0-rc.0](#downloads-for-v1310-rc0) - [Source Code](#source-code-15) - [Client Binaries](#client-binaries-15) - [Server Binaries](#server-binaries-15) - [Node Binaries](#node-binaries-15) - [Container Images](#container-images-15) - - [Changelog since v1.31.0-alpha.3](#changelog-since-v1310-alpha3) + - [Changelog since v1.31.0-beta.0](#changelog-since-v1310-beta0) + - [Urgent Upgrade Notes](#urgent-upgrade-notes-1) + - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade-1) - [Changes by Kind](#changes-by-kind-15) - - [API Change](#api-change-5) + - [Deprecation](#deprecation-2) + - [API Change](#api-change-4) - [Feature](#feature-11) + - [Failing Test](#failing-test-1) - [Bug or Regression](#bug-or-regression-15) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-7) - [Dependencies](#dependencies-15) - [Added](#added-15) - [Changed](#changed-15) - [Removed](#removed-15) -- [v1.31.0-alpha.3](#v1310-alpha3) - - [Downloads for v1.31.0-alpha.3](#downloads-for-v1310-alpha3) +- [v1.31.0-beta.0](#v1310-beta0) + - [Downloads for v1.31.0-beta.0](#downloads-for-v1310-beta0) - [Source Code](#source-code-16) - [Client Binaries](#client-binaries-16) - [Server Binaries](#server-binaries-16) - [Node Binaries](#node-binaries-16) - [Container Images](#container-images-16) - - [Changelog since v1.31.0-alpha.2](#changelog-since-v1310-alpha2) + - [Changelog since v1.31.0-alpha.3](#changelog-since-v1310-alpha3) - [Changes by Kind](#changes-by-kind-16) - - [API Change](#api-change-6) + - [API Change](#api-change-5) - [Feature](#feature-12) - [Bug or Regression](#bug-or-regression-16) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-8) @@ -283,50 +282,160 @@ - [Added](#added-16) - [Changed](#changed-16) - [Removed](#removed-16) -- [v1.31.0-alpha.2](#v1310-alpha2) - - [Downloads for v1.31.0-alpha.2](#downloads-for-v1310-alpha2) +- [v1.31.0-alpha.3](#v1310-alpha3) + - [Downloads for v1.31.0-alpha.3](#downloads-for-v1310-alpha3) - [Source Code](#source-code-17) - [Client Binaries](#client-binaries-17) - [Server Binaries](#server-binaries-17) - [Node Binaries](#node-binaries-17) - [Container Images](#container-images-17) - - [Changelog since v1.31.0-alpha.1](#changelog-since-v1310-alpha1) - - [Urgent Upgrade Notes](#urgent-upgrade-notes-2) - - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade-2) + - [Changelog since v1.31.0-alpha.2](#changelog-since-v1310-alpha2) - [Changes by Kind](#changes-by-kind-17) - - [API Change](#api-change-7) + - [API Change](#api-change-6) - [Feature](#feature-13) - - [Failing Test](#failing-test-2) - [Bug or Regression](#bug-or-regression-17) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-9) - [Dependencies](#dependencies-17) - [Added](#added-17) - [Changed](#changed-17) - [Removed](#removed-17) -- [v1.31.0-alpha.1](#v1310-alpha1) - - [Downloads for v1.31.0-alpha.1](#downloads-for-v1310-alpha1) +- [v1.31.0-alpha.2](#v1310-alpha2) + - [Downloads for v1.31.0-alpha.2](#downloads-for-v1310-alpha2) - [Source Code](#source-code-18) - [Client Binaries](#client-binaries-18) - [Server Binaries](#server-binaries-18) - [Node Binaries](#node-binaries-18) - [Container Images](#container-images-18) - - [Changelog since v1.30.0](#changelog-since-v1300-1) - - [Urgent Upgrade Notes](#urgent-upgrade-notes-3) - - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade-3) + - [Changelog since v1.31.0-alpha.1](#changelog-since-v1310-alpha1) + - [Urgent Upgrade Notes](#urgent-upgrade-notes-2) + - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade-2) - [Changes by Kind](#changes-by-kind-18) - - [Deprecation](#deprecation-3) - - [API Change](#api-change-8) + - [API Change](#api-change-7) - [Feature](#feature-14) - - [Failing Test](#failing-test-3) + - [Failing Test](#failing-test-2) - [Bug or Regression](#bug-or-regression-18) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-10) - [Dependencies](#dependencies-18) - [Added](#added-18) - [Changed](#changed-18) - [Removed](#removed-18) +- [v1.31.0-alpha.1](#v1310-alpha1) + - [Downloads for v1.31.0-alpha.1](#downloads-for-v1310-alpha1) + - [Source Code](#source-code-19) + - [Client Binaries](#client-binaries-19) + - [Server Binaries](#server-binaries-19) + - [Node Binaries](#node-binaries-19) + - [Container Images](#container-images-19) + - [Changelog since v1.30.0](#changelog-since-v1300-1) + - [Urgent Upgrade Notes](#urgent-upgrade-notes-3) + - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade-3) + - [Changes by Kind](#changes-by-kind-19) + - [Deprecation](#deprecation-3) + - [API Change](#api-change-8) + - [Feature](#feature-15) + - [Failing Test](#failing-test-3) + - [Bug or Regression](#bug-or-regression-19) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-11) + - [Dependencies](#dependencies-19) + - [Added](#added-19) + - [Changed](#changed-19) + - [Removed](#removed-19) +# v1.31.13 + + +## Downloads for v1.31.13 + + + +### Source Code + +filename | sha512 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes.tar.gz) | 6a5461586f7d1317b444792dca5cc1b8fec524ae2a4dba3561d1f45aed22074765f29916293bfd0466c348e4734ad4b0ff1adecb849e1595554a4e2e454dbc56 +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-src.tar.gz) | f88da6525ac8a3e1656579f11c0756e56650e658f4136209e31d49cebb2c5e5ecf934ce64c9e73c9499b55e0bba7fd918537db3f17052fa04433f58fe9d37227 + +### Client Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-client-darwin-amd64.tar.gz) | 4ab09bba9e5cf82bb904c03acb736a5bd693b045df915677f491aa0957f42358800db001b83c7506f1853e0b4c140aad461f70684335a43fff157263035e2ccc +[kubernetes-client-darwin-arm64.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-client-darwin-arm64.tar.gz) | 02ce81d68db07f9f97cd7505dc16bade39615f93ce0b82edbc36bee182b0f3360bfa7bc5220799aaa3577c11e83c849b1a3226836dba4d10ad04c02290d5cce9 +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-client-linux-386.tar.gz) | 35dd9fb210de771184621c0cbdcb97858cfaac0ec76030feec7ccc41a830720d824bf27ad9c635c8a5423238afe53bd1026a9e117f9cca11767dfb12a1de2de6 +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-client-linux-amd64.tar.gz) | 724a8082d31664e70320f954564548ab222bf9a60b5a117456e93c56d0e8c921fe427dc639e25f5d256d4886aff61ef74a2fe535dc1873e56a681cc62a322610 +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-client-linux-arm.tar.gz) | 8858d6ddc5ae83345704b2c4e8dad1a8a097c37b0655824989e6ac5c307a4f3f003074dc59f041b7dcef16fa2ec6d5cb5b7043153a86e728c1e1c7faee53fb9e +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-client-linux-arm64.tar.gz) | d275c20fd3e0c17511a294e352247794063bb2f8ab15713f9db7b6d0b771574736f7986debea51c59c8aecec312c8caf4c76cebf7ca7d070397ba0c460dda5d6 +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-client-linux-ppc64le.tar.gz) | 6d0def56bc875519eecfe3335f3d6ac6dbd498f40e6ce2f153db793e370b0afcaf797e96f3c794ba7ee377a620e1a4742358095333a9cc4858183833a3acb1ed +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-client-linux-s390x.tar.gz) | 955dd96156e91d6bb5d1f42cb3907f87b7484e6524141ae7aa5125c02ef1cf68e21413bbcefcb2662532a8fa2796c08942fe7e03b89453b00104134c43ccfbd6 +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-client-windows-386.tar.gz) | 66cd33ed9bc1acff3df2cc9088ad28766cc78ebe22bf481a6a8bca59e02cf75ce5e907499de9c249d16ee8f820155d62d1d9aa3dc3c43f039477cab32ff69ca8 +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-client-windows-amd64.tar.gz) | ff707576b7ba9dfe7abcc1998633946f343d438883557cfdc7f210dbb33518d9e63fa23bb35977054080abc24497b5b7c086cc03cd4e95ef57c5f8b2cc54ab13 +[kubernetes-client-windows-arm64.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-client-windows-arm64.tar.gz) | 81f276e6ad6e25301225b532573be1510fe16979da9cdbf953dfd916198345a9cd44e3873703227774fe3f15c3698735407516477951b6f698adf904d35c300b + +### Server Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-server-linux-amd64.tar.gz) | a88d6e147f3e82ea57f8cc7257c7f1aae3928caa5421c141d09752d089932ca9ceb73341d0420768ef1d49663c828bbebc1c4a2e0479d2b784094f390c6c6c6e +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-server-linux-arm64.tar.gz) | 88e0eff7da9ee15511784103f6bda284dec8a8317a1499dc68b25e4862bfd9b6bb3d51ac64971fd57a5558582425c8a1d528b94b7cb787e26067fb1d81f3e35d +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-server-linux-ppc64le.tar.gz) | 0828b289b3303b20d38ca20ba869e12db15b2ddced920eca8d233376b612d3ebfa2abadbf7e6fa83e2d67a200ad10c67db9c7d0832690366dff4754ebde84769 +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-server-linux-s390x.tar.gz) | 16abbde3e57583dc8b9607941b56e81b13e885e726315a8f7cafb3be45538c9f1bd77a30347153d364cb0278598c937090018aadeba8e93e9279448288e39d34 + +### Node Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-node-linux-amd64.tar.gz) | dee47bd8e8c1b6a1c58ccb0b58d19abc40968c5c6650b8a5cb9d642e3cfadfe6fb110408857abc5b32c90c89c39b90b06ebf2c1640ebec9fbaeffea80caa8d82 +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-node-linux-arm64.tar.gz) | f0da7e0ae7b7d209659338a7bb17eec9deb0dbe6edec8f98946a9e68078b6fd2977f65cccf68dcfe5a359a6ea728f036fa2801944ed697d81f58c3d26cd100e8 +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-node-linux-ppc64le.tar.gz) | 66e254839eb2f1ebd859668ddb5b52bb33b9c274c4ee391d12633dce46c80243173a145197b12673a40c19e5121f099968ce7ca9b025b9ed5e96fbca6bc8e0c6 +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-node-linux-s390x.tar.gz) | 55b0ef086db62ec49472c38774d0a3a8b21101822e5e087dffb5698e284d4a022ff5bb807bb07f87d2bc115fbecef8158ee275c557d7d166b81c3c416a89fcd0 +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.31.13/kubernetes-node-windows-amd64.tar.gz) | 1f8f0c6aa8b0d251398fe8e068ac6ba32a5a0a9223540ad79c0e8d46c7bfb9c9d444a2d73a7b1d1026e4192b0914f0389ea743f2783ce261991363a30bb94346 + +### Container Images + +All container images are available as manifest lists and support the described +architectures. It is also possible to pull a specific architecture directly by +adding the "-$ARCH" suffix to the container image name. + +name | architectures +---- | ------------- +[registry.k8s.io/conformance:v1.31.13](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-s390x) +[registry.k8s.io/kube-apiserver:v1.31.13](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-s390x) +[registry.k8s.io/kube-controller-manager:v1.31.13](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-s390x) +[registry.k8s.io/kube-proxy:v1.31.13](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-s390x) +[registry.k8s.io/kube-scheduler:v1.31.13](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-s390x) +[registry.k8s.io/kubectl:v1.31.13](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-s390x) + +## Changelog since v1.31.12 + +## Changes by Kind + +### Feature + +- Kubernetes is now built using Go 1.23.12 ([#133517](https://github.com/kubernetes/kubernetes/pull/133517), [@cpanato](https://github.com/cpanato)) [SIG Release and Testing] + +### Bug or Regression + +- Kubeadm: fixed bug where v1beta3's ClusterConfiguration.APIServer.TimeoutForControlPlane is not respected in newer versions of kubeadm where v1beta4 is the default. ([#133776](https://github.com/kubernetes/kubernetes/pull/133776), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG Cluster Lifecycle] + +### Other (Cleanup or Flake) + +- Masked off access to Linux thermal interrupt info in `/proc` and `/sys`. ([#132987](https://github.com/kubernetes/kubernetes/pull/132987), [@saschagrunert](https://github.com/saschagrunert)) [SIG Node] + +## Dependencies + +### Added +_Nothing has changed._ + +### Changed +_Nothing has changed._ + +### Removed +_Nothing has changed._ + + + # v1.31.12 diff --git a/CHANGELOG/CHANGELOG-1.32.md b/CHANGELOG/CHANGELOG-1.32.md index e58a742dcbd49..fe1ac62a5a584 100644 --- a/CHANGELOG/CHANGELOG-1.32.md +++ b/CHANGELOG/CHANGELOG-1.32.md @@ -1,212 +1,208 @@ -- [v1.32.8](#v1328) - - [Downloads for v1.32.8](#downloads-for-v1328) +- [v1.32.9](#v1329) + - [Downloads for v1.32.9](#downloads-for-v1329) - [Source Code](#source-code) - [Client Binaries](#client-binaries) - [Server Binaries](#server-binaries) - [Node Binaries](#node-binaries) - [Container Images](#container-images) - - [Changelog since v1.32.7](#changelog-since-v1327) - - [Important Security Information](#important-security-information) - - [CVE-2025-5187: Nodes can delete themselves by adding an OwnerReference](#cve-2025-5187-nodes-can-delete-themselves-by-adding-an-ownerreference) + - [Changelog since v1.32.8](#changelog-since-v1328) - [Changes by Kind](#changes-by-kind) - [Feature](#feature) - [Bug or Regression](#bug-or-regression) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake) - [Dependencies](#dependencies) - [Added](#added) - [Changed](#changed) - [Removed](#removed) -- [v1.32.7](#v1327) - - [Downloads for v1.32.7](#downloads-for-v1327) +- [v1.32.8](#v1328) + - [Downloads for v1.32.8](#downloads-for-v1328) - [Source Code](#source-code-1) - [Client Binaries](#client-binaries-1) - [Server Binaries](#server-binaries-1) - [Node Binaries](#node-binaries-1) - [Container Images](#container-images-1) - - [Changelog since v1.32.6](#changelog-since-v1326) + - [Changelog since v1.32.7](#changelog-since-v1327) + - [Important Security Information](#important-security-information) + - [CVE-2025-5187: Nodes can delete themselves by adding an OwnerReference](#cve-2025-5187-nodes-can-delete-themselves-by-adding-an-ownerreference) - [Changes by Kind](#changes-by-kind-1) + - [Feature](#feature-1) - [Bug or Regression](#bug-or-regression-1) - [Dependencies](#dependencies-1) - [Added](#added-1) - [Changed](#changed-1) - [Removed](#removed-1) -- [v1.32.6](#v1326) - - [Downloads for v1.32.6](#downloads-for-v1326) +- [v1.32.7](#v1327) + - [Downloads for v1.32.7](#downloads-for-v1327) - [Source Code](#source-code-2) - [Client Binaries](#client-binaries-2) - [Server Binaries](#server-binaries-2) - [Node Binaries](#node-binaries-2) - [Container Images](#container-images-2) - - [Changelog since v1.32.5](#changelog-since-v1325) - - [Important Security Information](#important-security-information-1) - - [CVE-2025-4563: Nodes can bypass dynamic resource allocation authorization checks](#cve-2025-4563-nodes-can-bypass-dynamic-resource-allocation-authorization-checks) + - [Changelog since v1.32.6](#changelog-since-v1326) - [Changes by Kind](#changes-by-kind-2) - - [Feature](#feature-1) - [Bug or Regression](#bug-or-regression-2) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake) - [Dependencies](#dependencies-2) - [Added](#added-2) - [Changed](#changed-2) - [Removed](#removed-2) -- [v1.32.5](#v1325) - - [Downloads for v1.32.5](#downloads-for-v1325) +- [v1.32.6](#v1326) + - [Downloads for v1.32.6](#downloads-for-v1326) - [Source Code](#source-code-3) - [Client Binaries](#client-binaries-3) - [Server Binaries](#server-binaries-3) - [Node Binaries](#node-binaries-3) - [Container Images](#container-images-3) - - [Changelog since v1.32.4](#changelog-since-v1324) + - [Changelog since v1.32.5](#changelog-since-v1325) + - [Important Security Information](#important-security-information-1) + - [CVE-2025-4563: Nodes can bypass dynamic resource allocation authorization checks](#cve-2025-4563-nodes-can-bypass-dynamic-resource-allocation-authorization-checks) - [Changes by Kind](#changes-by-kind-3) - [Feature](#feature-2) - [Bug or Regression](#bug-or-regression-3) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-1) - [Dependencies](#dependencies-3) - [Added](#added-3) - [Changed](#changed-3) - [Removed](#removed-3) -- [v1.32.4](#v1324) - - [Downloads for v1.32.4](#downloads-for-v1324) +- [v1.32.5](#v1325) + - [Downloads for v1.32.5](#downloads-for-v1325) - [Source Code](#source-code-4) - [Client Binaries](#client-binaries-4) - [Server Binaries](#server-binaries-4) - [Node Binaries](#node-binaries-4) - [Container Images](#container-images-4) - - [Changelog since v1.32.3](#changelog-since-v1323) + - [Changelog since v1.32.4](#changelog-since-v1324) - [Changes by Kind](#changes-by-kind-4) + - [Feature](#feature-3) - [Bug or Regression](#bug-or-regression-4) - [Dependencies](#dependencies-4) - [Added](#added-4) - [Changed](#changed-4) - [Removed](#removed-4) -- [v1.32.3](#v1323) - - [Downloads for v1.32.3](#downloads-for-v1323) +- [v1.32.4](#v1324) + - [Downloads for v1.32.4](#downloads-for-v1324) - [Source Code](#source-code-5) - [Client Binaries](#client-binaries-5) - [Server Binaries](#server-binaries-5) - [Node Binaries](#node-binaries-5) - [Container Images](#container-images-5) - - [Changelog since v1.32.2](#changelog-since-v1322) + - [Changelog since v1.32.3](#changelog-since-v1323) - [Changes by Kind](#changes-by-kind-5) - - [API Change](#api-change) - [Bug or Regression](#bug-or-regression-5) - [Dependencies](#dependencies-5) - [Added](#added-5) - [Changed](#changed-5) - [Removed](#removed-5) -- [v1.32.2](#v1322) - - [Downloads for v1.32.2](#downloads-for-v1322) +- [v1.32.3](#v1323) + - [Downloads for v1.32.3](#downloads-for-v1323) - [Source Code](#source-code-6) - [Client Binaries](#client-binaries-6) - [Server Binaries](#server-binaries-6) - [Node Binaries](#node-binaries-6) - [Container Images](#container-images-6) - - [Changelog since v1.32.1](#changelog-since-v1321) - - [Important Security Information](#important-security-information-2) - - [CVE-2025-0426: Node Denial of Service via Kubelet Checkpoint API](#cve-2025-0426-node-denial-of-service-via-kubelet-checkpoint-api) + - [Changelog since v1.32.2](#changelog-since-v1322) - [Changes by Kind](#changes-by-kind-6) - - [Feature](#feature-3) + - [API Change](#api-change) - [Bug or Regression](#bug-or-regression-6) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake-1) - [Dependencies](#dependencies-6) - [Added](#added-6) - [Changed](#changed-6) - [Removed](#removed-6) -- [v1.32.1](#v1321) - - [Downloads for v1.32.1](#downloads-for-v1321) +- [v1.32.2](#v1322) + - [Downloads for v1.32.2](#downloads-for-v1322) - [Source Code](#source-code-7) - [Client Binaries](#client-binaries-7) - [Server Binaries](#server-binaries-7) - [Node Binaries](#node-binaries-7) - [Container Images](#container-images-7) - - [Changelog since v1.32.0](#changelog-since-v1320) - - [Important Security Information](#important-security-information-3) - - [CVE-2024-9042: Command Injection affecting Windows nodes via nodes/*/logs/query API](#cve-2024-9042-command-injection-affecting-windows-nodes-via-nodeslogsquery-api) + - [Changelog since v1.32.1](#changelog-since-v1321) + - [Important Security Information](#important-security-information-2) + - [CVE-2025-0426: Node Denial of Service via Kubelet Checkpoint API](#cve-2025-0426-node-denial-of-service-via-kubelet-checkpoint-api) - [Changes by Kind](#changes-by-kind-7) - - [API Change](#api-change-1) - [Feature](#feature-4) - [Bug or Regression](#bug-or-regression-7) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-2) - [Dependencies](#dependencies-7) - [Added](#added-7) - [Changed](#changed-7) - [Removed](#removed-7) -- [v1.32.0](#v1320) - - [Downloads for v1.32.0](#downloads-for-v1320) +- [v1.32.1](#v1321) + - [Downloads for v1.32.1](#downloads-for-v1321) - [Source Code](#source-code-8) - [Client Binaries](#client-binaries-8) - [Server Binaries](#server-binaries-8) - [Node Binaries](#node-binaries-8) - [Container Images](#container-images-8) - - [Changelog since v1.31.0](#changelog-since-v1310) - - [Urgent Upgrade Notes](#urgent-upgrade-notes) + - [Changelog since v1.32.0](#changelog-since-v1320) + - [Important Security Information](#important-security-information-3) + - [CVE-2024-9042: Command Injection affecting Windows nodes via nodes/*/logs/query API](#cve-2024-9042-command-injection-affecting-windows-nodes-via-nodeslogsquery-api) - [Changes by Kind](#changes-by-kind-8) - - [Deprecation](#deprecation) - - [API Change](#api-change-2) + - [API Change](#api-change-1) - [Feature](#feature-5) - - [Documentation](#documentation) - - [Failing Test](#failing-test) - [Bug or Regression](#bug-or-regression-8) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake-2) - [Dependencies](#dependencies-8) - [Added](#added-8) - [Changed](#changed-8) - [Removed](#removed-8) -- [v1.32.0-rc.2](#v1320-rc2) - - [Downloads for v1.32.0-rc.2](#downloads-for-v1320-rc2) +- [v1.32.0](#v1320) + - [Downloads for v1.32.0](#downloads-for-v1320) - [Source Code](#source-code-9) - [Client Binaries](#client-binaries-9) - [Server Binaries](#server-binaries-9) - [Node Binaries](#node-binaries-9) - [Container Images](#container-images-9) - - [Changelog since v1.32.0-rc.1](#changelog-since-v1320-rc1) + - [Changelog since v1.31.0](#changelog-since-v1310) + - [Urgent Upgrade Notes](#urgent-upgrade-notes) - [Changes by Kind](#changes-by-kind-9) - - [API Change](#api-change-3) + - [Deprecation](#deprecation) + - [API Change](#api-change-2) + - [Feature](#feature-6) + - [Documentation](#documentation) + - [Failing Test](#failing-test) - [Bug or Regression](#bug-or-regression-9) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-3) - [Dependencies](#dependencies-9) - [Added](#added-9) - [Changed](#changed-9) - [Removed](#removed-9) -- [v1.32.0-rc.1](#v1320-rc1) - - [Downloads for v1.32.0-rc.1](#downloads-for-v1320-rc1) +- [v1.32.0-rc.2](#v1320-rc2) + - [Downloads for v1.32.0-rc.2](#downloads-for-v1320-rc2) - [Source Code](#source-code-10) - [Client Binaries](#client-binaries-10) - [Server Binaries](#server-binaries-10) - [Node Binaries](#node-binaries-10) - [Container Images](#container-images-10) - - [Changelog since v1.32.0-rc.0](#changelog-since-v1320-rc0) + - [Changelog since v1.32.0-rc.1](#changelog-since-v1320-rc1) + - [Changes by Kind](#changes-by-kind-10) + - [API Change](#api-change-3) + - [Bug or Regression](#bug-or-regression-10) - [Dependencies](#dependencies-10) - [Added](#added-10) - [Changed](#changed-10) - [Removed](#removed-10) -- [v1.32.0-rc.0](#v1320-rc0) - - [Downloads for v1.32.0-rc.0](#downloads-for-v1320-rc0) +- [v1.32.0-rc.1](#v1320-rc1) + - [Downloads for v1.32.0-rc.1](#downloads-for-v1320-rc1) - [Source Code](#source-code-11) - [Client Binaries](#client-binaries-11) - [Server Binaries](#server-binaries-11) - [Node Binaries](#node-binaries-11) - [Container Images](#container-images-11) - - [Changelog since v1.32.0-beta.0](#changelog-since-v1320-beta0) - - [Changes by Kind](#changes-by-kind-10) - - [API Change](#api-change-4) - - [Feature](#feature-6) - - [Bug or Regression](#bug-or-regression-10) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake-3) + - [Changelog since v1.32.0-rc.0](#changelog-since-v1320-rc0) - [Dependencies](#dependencies-11) - [Added](#added-11) - [Changed](#changed-11) - [Removed](#removed-11) -- [v1.32.0-beta.0](#v1320-beta0) - - [Downloads for v1.32.0-beta.0](#downloads-for-v1320-beta0) +- [v1.32.0-rc.0](#v1320-rc0) + - [Downloads for v1.32.0-rc.0](#downloads-for-v1320-rc0) - [Source Code](#source-code-12) - [Client Binaries](#client-binaries-12) - [Server Binaries](#server-binaries-12) - [Node Binaries](#node-binaries-12) - [Container Images](#container-images-12) - - [Changelog since v1.32.0-alpha.3](#changelog-since-v1320-alpha3) - - [Urgent Upgrade Notes](#urgent-upgrade-notes-1) - - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade) + - [Changelog since v1.32.0-beta.0](#changelog-since-v1320-beta0) - [Changes by Kind](#changes-by-kind-11) - - [Deprecation](#deprecation-1) - - [API Change](#api-change-5) + - [API Change](#api-change-4) - [Feature](#feature-7) - [Bug or Regression](#bug-or-regression-11) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-4) @@ -214,65 +210,178 @@ - [Added](#added-12) - [Changed](#changed-12) - [Removed](#removed-12) -- [v1.32.0-alpha.3](#v1320-alpha3) - - [Downloads for v1.32.0-alpha.3](#downloads-for-v1320-alpha3) +- [v1.32.0-beta.0](#v1320-beta0) + - [Downloads for v1.32.0-beta.0](#downloads-for-v1320-beta0) - [Source Code](#source-code-13) - [Client Binaries](#client-binaries-13) - [Server Binaries](#server-binaries-13) - [Node Binaries](#node-binaries-13) - [Container Images](#container-images-13) - - [Changelog since v1.32.0-alpha.2](#changelog-since-v1320-alpha2) + - [Changelog since v1.32.0-alpha.3](#changelog-since-v1320-alpha3) + - [Urgent Upgrade Notes](#urgent-upgrade-notes-1) + - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade) - [Changes by Kind](#changes-by-kind-12) - - [API Change](#api-change-6) + - [Deprecation](#deprecation-1) + - [API Change](#api-change-5) - [Feature](#feature-8) - - [Documentation](#documentation-1) - [Bug or Regression](#bug-or-regression-12) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-5) - [Dependencies](#dependencies-13) - [Added](#added-13) - [Changed](#changed-13) - [Removed](#removed-13) -- [v1.32.0-alpha.2](#v1320-alpha2) - - [Downloads for v1.32.0-alpha.2](#downloads-for-v1320-alpha2) +- [v1.32.0-alpha.3](#v1320-alpha3) + - [Downloads for v1.32.0-alpha.3](#downloads-for-v1320-alpha3) - [Source Code](#source-code-14) - [Client Binaries](#client-binaries-14) - [Server Binaries](#server-binaries-14) - [Node Binaries](#node-binaries-14) - [Container Images](#container-images-14) - - [Changelog since v1.32.0-alpha.1](#changelog-since-v1320-alpha1) + - [Changelog since v1.32.0-alpha.2](#changelog-since-v1320-alpha2) - [Changes by Kind](#changes-by-kind-13) - - [API Change](#api-change-7) + - [API Change](#api-change-6) - [Feature](#feature-9) - - [Documentation](#documentation-2) + - [Documentation](#documentation-1) - [Bug or Regression](#bug-or-regression-13) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-6) - [Dependencies](#dependencies-14) - [Added](#added-14) - [Changed](#changed-14) - [Removed](#removed-14) -- [v1.32.0-alpha.1](#v1320-alpha1) - - [Downloads for v1.32.0-alpha.1](#downloads-for-v1320-alpha1) +- [v1.32.0-alpha.2](#v1320-alpha2) + - [Downloads for v1.32.0-alpha.2](#downloads-for-v1320-alpha2) - [Source Code](#source-code-15) - [Client Binaries](#client-binaries-15) - [Server Binaries](#server-binaries-15) - [Node Binaries](#node-binaries-15) - [Container Images](#container-images-15) - - [Changelog since v1.31.0](#changelog-since-v1310-1) + - [Changelog since v1.32.0-alpha.1](#changelog-since-v1320-alpha1) - [Changes by Kind](#changes-by-kind-14) - - [Deprecation](#deprecation-2) - - [API Change](#api-change-8) + - [API Change](#api-change-7) - [Feature](#feature-10) - - [Documentation](#documentation-3) - - [Failing Test](#failing-test-1) + - [Documentation](#documentation-2) - [Bug or Regression](#bug-or-regression-14) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-7) - [Dependencies](#dependencies-15) - [Added](#added-15) - [Changed](#changed-15) - [Removed](#removed-15) +- [v1.32.0-alpha.1](#v1320-alpha1) + - [Downloads for v1.32.0-alpha.1](#downloads-for-v1320-alpha1) + - [Source Code](#source-code-16) + - [Client Binaries](#client-binaries-16) + - [Server Binaries](#server-binaries-16) + - [Node Binaries](#node-binaries-16) + - [Container Images](#container-images-16) + - [Changelog since v1.31.0](#changelog-since-v1310-1) + - [Changes by Kind](#changes-by-kind-15) + - [Deprecation](#deprecation-2) + - [API Change](#api-change-8) + - [Feature](#feature-11) + - [Documentation](#documentation-3) + - [Failing Test](#failing-test-1) + - [Bug or Regression](#bug-or-regression-15) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-8) + - [Dependencies](#dependencies-16) + - [Added](#added-16) + - [Changed](#changed-16) + - [Removed](#removed-16) +# v1.32.9 + + +## Downloads for v1.32.9 + + + +### Source Code + +filename | sha512 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes.tar.gz) | b9189ab100d32c97f2c272f2084e3cc94b0b2eeb1d350c75cf89d8ba00584bcdc51ab330cf3bd91a3acb1459f9d4a5c4550c0be712a90f049de50973fcfd3ea6 +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-src.tar.gz) | 945526179053af8a0babfb6f538438c550b493402ce92fdbbfd84862a9c68cd4b4dd3db9c5466dc717099ebbf0e3f453864056ebbbe2d41c8c67066d4b89bb6d + +### Client Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-client-darwin-amd64.tar.gz) | 5d00580ecba4e5dcbe2a597bb70b315622fbec83a61d99c00255b76cc7e2520ef15ed2ef1776c869c175bd60eab6d78115b2ae949bb707bfc1eb8d33f85fdd00 +[kubernetes-client-darwin-arm64.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-client-darwin-arm64.tar.gz) | bc0ffced866a605ee1e58e747f8168ba89b83f6f83edbb298531964c6d46794a59f844171bede19d5b456813037592a372bee08967235adb70bb1ac3e431a703 +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-client-linux-386.tar.gz) | a446d107735b9780522a43465b98396423671935f88a48cea84635a68b587fa0c115be693772fa920816305f0ef79e1cd4b211f5dd94a533e7f285dbb5b38bdd +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-client-linux-amd64.tar.gz) | 80c2b593fcbee404fb70412a6ed8c428ed5eb256b79c1ca180f9b405f26de708629014401db0dff8ac4af3471411dd445b13d9f6f71149efbbd4956ac51db546 +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-client-linux-arm.tar.gz) | 9adf0caefe4ea367786bd76b6e3b327d16fc488b93e21b48ed1199675b7a76f580838fca3b2d9c9fed325b4673a5012fc44786db8e209dc617081bfdf32fc5dc +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-client-linux-arm64.tar.gz) | b126355cb3df897e19e6035e0665fc17bccf8b17455d1400599a2a75356d88568d3f29cc8deee3eaad22973a38e4b5a5e58fa30e1c6b4b6c9abdb5026e6ebffc +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-client-linux-ppc64le.tar.gz) | 8151a18346d3b3999a546dce323e0a244d1c7d6717e7a6100a219a6ee14b4878c298f197a5ad0ef1a02b5bf983ab1cd1a309be73ec2b5bb3ffb731fb5230096e +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-client-linux-s390x.tar.gz) | 28fc82ffd415b392fa6f697ad811ab5d17e826492340a969ee2fda156db0c27dc5ca649131817f1acd6854a30dbdafa18ed9d05b6bb591b10e3865e6cfa8288e +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-client-windows-386.tar.gz) | f270f768143cb069be0847770074a45f7ea3db0c182151fca2649bca096963054315bf06788f3e56f235c385e9efe96f2aa83268afb9d00ccbd3b47d1fea27a6 +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-client-windows-amd64.tar.gz) | 8f310e9e81b9f7afe795b14bd549dc3c76b0ab3f41d2f4ed6e68a427c460e16a0777c1f9bd96d104886ef6eae821134409c8ca7bc28fc39bc89af11137cd75db +[kubernetes-client-windows-arm64.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-client-windows-arm64.tar.gz) | 5478702c7106b58a8590c6cc5e5b22c63f80c63c8a545fd01c6b4e062adf9dfef2f5c1502587919f0e136ba7f21b7407c8f4cc12dedc46ca19b5a23fc784590c + +### Server Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-server-linux-amd64.tar.gz) | d858fd53783744780c725faba6a0cd2128843f3e47508b7be68d37330d26fb98c305dbb197c7adf7c3adb872f53b79c0fdc74e15df612f53feb07f30744fd39b +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-server-linux-arm64.tar.gz) | e84123b3897de8f5f58f0debb78264470f15d43594392eefeb7b0897408d305466003923a5544a3e57d1ca5929345ef0669eb3b7f92e55f8446486c6abbb57a3 +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-server-linux-ppc64le.tar.gz) | 3cca44551be5746fcdb990c6d71a7b9e410e7714537add7c60337f7c6724b3b320e18fd517bdd4771da802b26076226ece8d89806aa8ffe14ec7d929753bcbb2 +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-server-linux-s390x.tar.gz) | ac421a67a0e05a2d8a34891d9507f769be705ff410f6ec7e6e66811218dd68e1f0cad2cba4b4b30b047f19655df3b06c3b972e175d59fbff230bcbba85bebf31 + +### Node Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-node-linux-amd64.tar.gz) | 8c9a5cacc8534b8b41e2e8e9f6f4b168046ed5a2aa04c175560782a0f368003e8e1bfc62092f39ea78be820d7ece0d50f0f3765381efd3e1680863df4aae25af +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-node-linux-arm64.tar.gz) | 5a891e2e97c8b81711ebaa1a53285f940f5c6be8cf00ac615922ba665a2f1d3401f5dde11b847ce18268a6aa6e5b1caec3aa50017789a11be8200e83bdf9a44b +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-node-linux-ppc64le.tar.gz) | 87048a18d18fe56968bc3a41c0e0f0e7bcbfc21b5f875ab84e8719551e949232063db8e14dd2e60c3143aeb5d7e9c63fcb93cf8f0f34bcfb46dbad67d2a3802f +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-node-linux-s390x.tar.gz) | 7e6a6191ceac8c9788fb5956e16208a32abdf832759e58dd74211f060736c44036ae9d319e8bede636e1eec75b186c6556cc4aa85d3dca7ef47e4269fd4f02df +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.32.9/kubernetes-node-windows-amd64.tar.gz) | 9af3b73b06ed056e077d33137e0653467393e1d4de289fddf82d8bec22fe71037601740c94bc6f8e43712e041b8c2b0f35e2e24a6b7e522a174e36aa797e91ec + +### Container Images + +All container images are available as manifest lists and support the described +architectures. It is also possible to pull a specific architecture directly by +adding the "-$ARCH" suffix to the container image name. + +name | architectures +---- | ------------- +[registry.k8s.io/conformance:v1.32.9](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-s390x) +[registry.k8s.io/kube-apiserver:v1.32.9](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-s390x) +[registry.k8s.io/kube-controller-manager:v1.32.9](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-s390x) +[registry.k8s.io/kube-proxy:v1.32.9](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-s390x) +[registry.k8s.io/kube-scheduler:v1.32.9](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-s390x) +[registry.k8s.io/kubectl:v1.32.9](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-s390x) + +## Changelog since v1.32.8 + +## Changes by Kind + +### Feature + +- Kubernetes is now built using Go 1.23.12 ([#133521](https://github.com/kubernetes/kubernetes/pull/133521), [@cpanato](https://github.com/cpanato)) [SIG Release and Testing] + +### Bug or Regression + +- Kubeadm: fixed bug where v1beta3's ClusterConfiguration.APIServer.TimeoutForControlPlane is not respected in newer versions of kubeadm where v1beta4 is the default. ([#133755](https://github.com/kubernetes/kubernetes/pull/133755), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG Cluster Lifecycle] + +### Other (Cleanup or Flake) + +- Masked off access to Linux thermal interrupt info in `/proc` and `/sys`. ([#132986](https://github.com/kubernetes/kubernetes/pull/132986), [@saschagrunert](https://github.com/saschagrunert)) [SIG Node] + +## Dependencies + +### Added +_Nothing has changed._ + +### Changed +_Nothing has changed._ + +### Removed +_Nothing has changed._ + + + # v1.32.8 diff --git a/CHANGELOG/CHANGELOG-1.33.md b/CHANGELOG/CHANGELOG-1.33.md index 9f3ee474305ff..baf8cc09879cd 100644 --- a/CHANGELOG/CHANGELOG-1.33.md +++ b/CHANGELOG/CHANGELOG-1.33.md @@ -1,135 +1,134 @@ -- [v1.33.4](#v1334) - - [Downloads for v1.33.4](#downloads-for-v1334) +- [v1.33.5](#v1335) + - [Downloads for v1.33.5](#downloads-for-v1335) - [Source Code](#source-code) - [Client Binaries](#client-binaries) - [Server Binaries](#server-binaries) - [Node Binaries](#node-binaries) - [Container Images](#container-images) - - [Changelog since v1.33.3](#changelog-since-v1333) - - [Important Security Information](#important-security-information) - - [CVE-2025-5187: Nodes can delete themselves by adding an OwnerReference](#cve-2025-5187-nodes-can-delete-themselves-by-adding-an-ownerreference) + - [Changelog since v1.33.4](#changelog-since-v1334) - [Changes by Kind](#changes-by-kind) - - [API Change](#api-change) - [Feature](#feature) - [Bug or Regression](#bug-or-regression) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake) - [Dependencies](#dependencies) - [Added](#added) - [Changed](#changed) - [Removed](#removed) -- [v1.33.3](#v1333) - - [Downloads for v1.33.3](#downloads-for-v1333) +- [v1.33.4](#v1334) + - [Downloads for v1.33.4](#downloads-for-v1334) - [Source Code](#source-code-1) - [Client Binaries](#client-binaries-1) - [Server Binaries](#server-binaries-1) - [Node Binaries](#node-binaries-1) - [Container Images](#container-images-1) - - [Changelog since v1.33.2](#changelog-since-v1332) + - [Changelog since v1.33.3](#changelog-since-v1333) + - [Important Security Information](#important-security-information) + - [CVE-2025-5187: Nodes can delete themselves by adding an OwnerReference](#cve-2025-5187-nodes-can-delete-themselves-by-adding-an-ownerreference) - [Changes by Kind](#changes-by-kind-1) + - [API Change](#api-change) + - [Feature](#feature-1) - [Bug or Regression](#bug-or-regression-1) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake) - [Dependencies](#dependencies-1) - [Added](#added-1) - [Changed](#changed-1) - [Removed](#removed-1) -- [v1.33.2](#v1332) - - [Downloads for v1.33.2](#downloads-for-v1332) +- [v1.33.3](#v1333) + - [Downloads for v1.33.3](#downloads-for-v1333) - [Source Code](#source-code-2) - [Client Binaries](#client-binaries-2) - [Server Binaries](#server-binaries-2) - [Node Binaries](#node-binaries-2) - [Container Images](#container-images-2) - - [Changelog since v1.33.1](#changelog-since-v1331) - - [Important Security Information](#important-security-information-1) - - [CVE-2025-4563: Nodes can bypass dynamic resource allocation authorization checks](#cve-2025-4563-nodes-can-bypass-dynamic-resource-allocation-authorization-checks) + - [Changelog since v1.33.2](#changelog-since-v1332) - [Changes by Kind](#changes-by-kind-2) - - [Feature](#feature-1) - [Bug or Regression](#bug-or-regression-2) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-1) - [Dependencies](#dependencies-2) - [Added](#added-2) - [Changed](#changed-2) - [Removed](#removed-2) -- [v1.33.1](#v1331) - - [Downloads for v1.33.1](#downloads-for-v1331) +- [v1.33.2](#v1332) + - [Downloads for v1.33.2](#downloads-for-v1332) - [Source Code](#source-code-3) - [Client Binaries](#client-binaries-3) - [Server Binaries](#server-binaries-3) - [Node Binaries](#node-binaries-3) - [Container Images](#container-images-3) - - [Changelog since v1.33.0](#changelog-since-v1330) + - [Changelog since v1.33.1](#changelog-since-v1331) + - [Important Security Information](#important-security-information-1) + - [CVE-2025-4563: Nodes can bypass dynamic resource allocation authorization checks](#cve-2025-4563-nodes-can-bypass-dynamic-resource-allocation-authorization-checks) - [Changes by Kind](#changes-by-kind-3) + - [Feature](#feature-2) - [Bug or Regression](#bug-or-regression-3) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-2) - [Dependencies](#dependencies-3) - [Added](#added-3) - [Changed](#changed-3) - [Removed](#removed-3) -- [v1.33.0](#v1330) - - [Downloads for v1.33.0](#downloads-for-v1330) +- [v1.33.1](#v1331) + - [Downloads for v1.33.1](#downloads-for-v1331) - [Source Code](#source-code-4) - [Client Binaries](#client-binaries-4) - [Server Binaries](#server-binaries-4) - [Node Binaries](#node-binaries-4) - [Container Images](#container-images-4) - - [Changelog since v1.32.0](#changelog-since-v1320) - - [Urgent Upgrade Notes](#urgent-upgrade-notes) - - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade) + - [Changelog since v1.33.0](#changelog-since-v1330) - [Changes by Kind](#changes-by-kind-4) - - [Deprecation](#deprecation) - - [API Change](#api-change-1) - - [Feature](#feature-2) - - [Documentation](#documentation) - [Bug or Regression](#bug-or-regression-4) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake-2) - [Dependencies](#dependencies-4) - [Added](#added-4) - [Changed](#changed-4) - [Removed](#removed-4) -- [v1.33.0-rc.1](#v1330-rc1) - - [Downloads for v1.33.0-rc.1](#downloads-for-v1330-rc1) +- [v1.33.0](#v1330) + - [Downloads for v1.33.0](#downloads-for-v1330) - [Source Code](#source-code-5) - [Client Binaries](#client-binaries-5) - [Server Binaries](#server-binaries-5) - [Node Binaries](#node-binaries-5) - [Container Images](#container-images-5) - - [Changelog since v1.33.0-rc.0](#changelog-since-v1330-rc0) + - [Changelog since v1.32.0](#changelog-since-v1320) + - [Urgent Upgrade Notes](#urgent-upgrade-notes) + - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade) - [Changes by Kind](#changes-by-kind-5) + - [Deprecation](#deprecation) + - [API Change](#api-change-1) + - [Feature](#feature-3) + - [Documentation](#documentation) - [Bug or Regression](#bug-or-regression-5) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-3) - [Dependencies](#dependencies-5) - [Added](#added-5) - [Changed](#changed-5) - [Removed](#removed-5) -- [v1.33.0-rc.0](#v1330-rc0) - - [Downloads for v1.33.0-rc.0](#downloads-for-v1330-rc0) +- [v1.33.0-rc.1](#v1330-rc1) + - [Downloads for v1.33.0-rc.1](#downloads-for-v1330-rc1) - [Source Code](#source-code-6) - [Client Binaries](#client-binaries-6) - [Server Binaries](#server-binaries-6) - [Node Binaries](#node-binaries-6) - [Container Images](#container-images-6) - - [Changelog since v1.33.0-beta.0](#changelog-since-v1330-beta0) - - [Urgent Upgrade Notes](#urgent-upgrade-notes-1) - - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade-1) + - [Changelog since v1.33.0-rc.0](#changelog-since-v1330-rc0) - [Changes by Kind](#changes-by-kind-6) - - [Deprecation](#deprecation-1) - - [API Change](#api-change-2) - - [Feature](#feature-3) - [Bug or Regression](#bug-or-regression-6) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake-3) - [Dependencies](#dependencies-6) - [Added](#added-6) - [Changed](#changed-6) - [Removed](#removed-6) -- [v1.33.0-beta.0](#v1330-beta0) - - [Downloads for v1.33.0-beta.0](#downloads-for-v1330-beta0) +- [v1.33.0-rc.0](#v1330-rc0) + - [Downloads for v1.33.0-rc.0](#downloads-for-v1330-rc0) - [Source Code](#source-code-7) - [Client Binaries](#client-binaries-7) - [Server Binaries](#server-binaries-7) - [Node Binaries](#node-binaries-7) - [Container Images](#container-images-7) - - [Changelog since v1.33.0-alpha.3](#changelog-since-v1330-alpha3) + - [Changelog since v1.33.0-beta.0](#changelog-since-v1330-beta0) + - [Urgent Upgrade Notes](#urgent-upgrade-notes-1) + - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade-1) - [Changes by Kind](#changes-by-kind-7) - - [API Change](#api-change-3) + - [Deprecation](#deprecation-1) + - [API Change](#api-change-2) - [Feature](#feature-4) - [Bug or Regression](#bug-or-regression-7) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-4) @@ -137,19 +136,16 @@ - [Added](#added-7) - [Changed](#changed-7) - [Removed](#removed-7) -- [v1.33.0-alpha.3](#v1330-alpha3) - - [Downloads for v1.33.0-alpha.3](#downloads-for-v1330-alpha3) +- [v1.33.0-beta.0](#v1330-beta0) + - [Downloads for v1.33.0-beta.0](#downloads-for-v1330-beta0) - [Source Code](#source-code-8) - [Client Binaries](#client-binaries-8) - [Server Binaries](#server-binaries-8) - [Node Binaries](#node-binaries-8) - [Container Images](#container-images-8) - - [Changelog since v1.33.0-alpha.2](#changelog-since-v1330-alpha2) - - [Urgent Upgrade Notes](#urgent-upgrade-notes-2) - - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade-2) + - [Changelog since v1.33.0-alpha.3](#changelog-since-v1330-alpha3) - [Changes by Kind](#changes-by-kind-8) - - [Deprecation](#deprecation-2) - - [API Change](#api-change-4) + - [API Change](#api-change-3) - [Feature](#feature-5) - [Bug or Regression](#bug-or-regression-8) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-5) @@ -157,17 +153,19 @@ - [Added](#added-8) - [Changed](#changed-8) - [Removed](#removed-8) -- [v1.33.0-alpha.2](#v1330-alpha2) - - [Downloads for v1.33.0-alpha.2](#downloads-for-v1330-alpha2) +- [v1.33.0-alpha.3](#v1330-alpha3) + - [Downloads for v1.33.0-alpha.3](#downloads-for-v1330-alpha3) - [Source Code](#source-code-9) - [Client Binaries](#client-binaries-9) - [Server Binaries](#server-binaries-9) - [Node Binaries](#node-binaries-9) - [Container Images](#container-images-9) - - [Changelog since v1.33.0-alpha.1](#changelog-since-v1330-alpha1) + - [Changelog since v1.33.0-alpha.2](#changelog-since-v1330-alpha2) + - [Urgent Upgrade Notes](#urgent-upgrade-notes-2) + - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade-2) - [Changes by Kind](#changes-by-kind-9) - - [Deprecation](#deprecation-3) - - [API Change](#api-change-5) + - [Deprecation](#deprecation-2) + - [API Change](#api-change-4) - [Feature](#feature-6) - [Bug or Regression](#bug-or-regression-9) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-6) @@ -175,29 +173,143 @@ - [Added](#added-9) - [Changed](#changed-9) - [Removed](#removed-9) -- [v1.33.0-alpha.1](#v1330-alpha1) - - [Downloads for v1.33.0-alpha.1](#downloads-for-v1330-alpha1) +- [v1.33.0-alpha.2](#v1330-alpha2) + - [Downloads for v1.33.0-alpha.2](#downloads-for-v1330-alpha2) - [Source Code](#source-code-10) - [Client Binaries](#client-binaries-10) - [Server Binaries](#server-binaries-10) - [Node Binaries](#node-binaries-10) - [Container Images](#container-images-10) - - [Changelog since v1.32.0](#changelog-since-v1320-1) - - [Urgent Upgrade Notes](#urgent-upgrade-notes-3) - - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade-3) + - [Changelog since v1.33.0-alpha.1](#changelog-since-v1330-alpha1) - [Changes by Kind](#changes-by-kind-10) - - [API Change](#api-change-6) + - [Deprecation](#deprecation-3) + - [API Change](#api-change-5) - [Feature](#feature-7) - - [Documentation](#documentation-1) - [Bug or Regression](#bug-or-regression-10) - [Other (Cleanup or Flake)](#other-cleanup-or-flake-7) - [Dependencies](#dependencies-10) - [Added](#added-10) - [Changed](#changed-10) - [Removed](#removed-10) +- [v1.33.0-alpha.1](#v1330-alpha1) + - [Downloads for v1.33.0-alpha.1](#downloads-for-v1330-alpha1) + - [Source Code](#source-code-11) + - [Client Binaries](#client-binaries-11) + - [Server Binaries](#server-binaries-11) + - [Node Binaries](#node-binaries-11) + - [Container Images](#container-images-11) + - [Changelog since v1.32.0](#changelog-since-v1320-1) + - [Urgent Upgrade Notes](#urgent-upgrade-notes-3) + - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade-3) + - [Changes by Kind](#changes-by-kind-11) + - [API Change](#api-change-6) + - [Feature](#feature-8) + - [Documentation](#documentation-1) + - [Bug or Regression](#bug-or-regression-11) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-8) + - [Dependencies](#dependencies-11) + - [Added](#added-11) + - [Changed](#changed-11) + - [Removed](#removed-11) +# v1.33.5 + + +## Downloads for v1.33.5 + + + +### Source Code + +filename | sha512 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes.tar.gz) | 7cf4e067ea5882db3d0f5e2f15a27a670ddb4d0a9ac58e26ac554e1d60b57e2c09525e64776ddad5e167d942a7020f61bba8c1c54f7a8b75b9509c5aca6898c0 +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-src.tar.gz) | ae9e888eec40a41ff0ef22a98e0a024396af375dd1ad55ca163ecde14bfa1fd3c17ba31d7c60e6d4af57aface36cbf922175ce9f7588a89497da4d252eca6623 + +### Client Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-client-darwin-amd64.tar.gz) | d781af21ab4dc79df263162b0692cebf088c7cc75683a528d9238bc1a7d5258b51e7a7ec597d85567c09e806ff3876d0d124751545a75fa032defc8cfacd2686 +[kubernetes-client-darwin-arm64.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-client-darwin-arm64.tar.gz) | 102719580db30fe34f2f15251bfaa99ba035eeb54532fd201d11d29c1dabcb793d4d2b980302cf989c201178c071da7abcb8e6ee83fbf338d7d3a4b6e633441a +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-client-linux-386.tar.gz) | 137475cb16e3bb11866894619caa9d36b72bc79639b6eb95652e878c46f2957a4360b7cac05fa3ab66369fa46b0a55d9abf735fa1e39244e108fe9359ca57f52 +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-client-linux-amd64.tar.gz) | c0959e01d4d82b293848202b4392f8c784ca7e27abb68ebae36c303e34abb83378bcfa5679699c15681f1a3fc6eb801ea1204e086fc8e6512f11023fb1e178e7 +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-client-linux-arm.tar.gz) | f56a9f09998c779d93546a63d6b60c7c1c7e3a8042e65d738d3c139eb60d685f6603a63ee42d26ce199941bcad3ea106718feee21d9ebddfc55724f6ee234d21 +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-client-linux-arm64.tar.gz) | 1d49d8cb369d6f61a21d7616b01e64e1ae52ddc22f3c96b713a00603a0d28634fcd0d425e2d81ea0e5132a64c5843927941f84979ba5ea1a0a72eb198a1a9f8b +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-client-linux-ppc64le.tar.gz) | 3babcd8624614eb8b4afbb2d782bce14bf61e9f51584a0e7126f871b32e717b28b3de66211e62f5ec579160dbb01afc0cf399cb3e60e28d5473b745fbf922a0f +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-client-linux-s390x.tar.gz) | 080dde950ff3feb5dd8bf64697dd2fe235ab13a41f7089f71032682079e7efb766c099010c592294fd79c5695841a1aa9a90c511a4ed4b8969f877497ac47f67 +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-client-windows-386.tar.gz) | 9209e3a25f018fc2d60e81a70532e27e8b6a99fe402f318a33440f51acce92b65ea29b21e5bb45d3f8a53ee22609fa704e8d984d5b7be48079d95884754658d7 +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-client-windows-amd64.tar.gz) | 71df0d8e87758b4bf8aa7ec55622107c37bdc8019239ab0b9a7d9fc30c0e24023629d77107d098d624827ceb870a58ef05c2d33fc630b948e1598d2ff02cb7f7 +[kubernetes-client-windows-arm64.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-client-windows-arm64.tar.gz) | 13eb03ae8a04f8b9c46fbf42800efdd7dcc03778eec700655fbcfff2e8cf327c0e15a3b83dcbbc1a63b151950ba6751e70d6c962db494e38a89362056e57e9e4 + +### Server Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-server-linux-amd64.tar.gz) | b48edac93e28565aa44c431099004de38a3ea896e1ebc4ecfe9ebe3eb712c5fd28ad721ef287ff970b0ad1b83f5dfbaeaca8258ede36e795b08803381a322e19 +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-server-linux-arm64.tar.gz) | d8e5992b240b1f174bcd84e1de5a901605d93e7e343551730477edd1c4066afcf834be174106135794a63bcf869b99aa500e17cae4238f0be68cb054eb6c6729 +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-server-linux-ppc64le.tar.gz) | ab114c0010e481f91e883997543e3eca5be2d8cfbcd85d50934865d3346f2bb5efea38b695ae7c29235771c6456ad0879eeef0e78da806d2e0b8338ff206b6b9 +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-server-linux-s390x.tar.gz) | ac56c39e5bba0c3e581e43ecdb84090e2e42be51390b9b641c199194dcbc239613fc0b43e51ba3029d5e9082fde64a67484d6f3dd274dd81216f2f8be89c46ab + +### Node Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-node-linux-amd64.tar.gz) | f5e25af84feeec774522e727a05372442b3bd61ccf27da7d7c5fb08aadab5d1203ad3403cd01d4d13f550819ab7527e8b90af9903a221724e6d21baf9e590228 +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-node-linux-arm64.tar.gz) | dbf946b03b5a9d39edd58f29d51a2f457fd5b85ab4e9db567ca12e69cad832d049ce4d79a404df381ea3795af1a7fdd72a887e9a2a1ec3f9ab67ab50837ad21e +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-node-linux-ppc64le.tar.gz) | 91cacd84a925f7183e25c2eb4e91b37f9a732e4e9d16a5ec72a2e40214466c6ff6c38b70f31553aeca65faa07d9f56ec56eaacb6b6d2fea3eead38b516e2a99d +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-node-linux-s390x.tar.gz) | 6b2e26eba6a00ece20bd0c5ab4d69c7d10accb9f866bda32a335d838a5f36b47f97214411bf3bd358b2c2c86c8e3dbfff8ccd20194b74ed111c37b5f0d5303f4 +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.33.5/kubernetes-node-windows-amd64.tar.gz) | 595ef86aa79126b9de609ebb568e86df82c98f88bdcb742d8024ebf36d1d7a4e795e9f8ced815062eea1208a83908e707215ef5f6b8a5678cdd1a84d5055b01b + +### Container Images + +All container images are available as manifest lists and support the described +architectures. It is also possible to pull a specific architecture directly by +adding the "-$ARCH" suffix to the container image name. + +name | architectures +---- | ------------- +[registry.k8s.io/conformance:v1.33.5](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-s390x) +[registry.k8s.io/kube-apiserver:v1.33.5](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-s390x) +[registry.k8s.io/kube-controller-manager:v1.33.5](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-s390x) +[registry.k8s.io/kube-proxy:v1.33.5](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-s390x) +[registry.k8s.io/kube-scheduler:v1.33.5](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-s390x) +[registry.k8s.io/kubectl:v1.33.5](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-s390x) + +## Changelog since v1.33.4 + +## Changes by Kind + +### Feature + +- Kubernetes is now built using Go 1.24.6 ([#133522](https://github.com/kubernetes/kubernetes/pull/133522), [@cpanato](https://github.com/cpanato)) [SIG Release and Testing] + +### Bug or Regression + +- Adjusted the conformance test for the ServiceCIDR API to not test Patch/Update, + since they are listed as ineligible_endpoints for conformance. ([#133642](https://github.com/kubernetes/kubernetes/pull/133642), [@danwinship](https://github.com/danwinship)) [SIG Network and Testing] +- Fixed SELinux warning controller not emitting events on some SELinux label conflicts. ([#133746](https://github.com/kubernetes/kubernetes/pull/133746), [@jsafrane](https://github.com/jsafrane)) [SIG Apps, Storage and Testing] +- Kubeadm: fixed bug where v1beta3's ClusterConfiguration.APIServer.TimeoutForControlPlane is not respected in newer versions of kubeadm where v1beta4 is the default. ([#133754](https://github.com/kubernetes/kubernetes/pull/133754), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG Cluster Lifecycle] + +### Other (Cleanup or Flake) + +- Masked off access to Linux thermal interrupt info in `/proc` and `/sys`. ([#132985](https://github.com/kubernetes/kubernetes/pull/132985), [@saschagrunert](https://github.com/saschagrunert)) [SIG Node] + +## Dependencies + +### Added +_Nothing has changed._ + +### Changed +_Nothing has changed._ + +### Removed +_Nothing has changed._ + + + # v1.33.4 diff --git a/CHANGELOG/CHANGELOG-1.34.md b/CHANGELOG/CHANGELOG-1.34.md index 5f07f62323589..336f60a6e28cc 100644 --- a/CHANGELOG/CHANGELOG-1.34.md +++ b/CHANGELOG/CHANGELOG-1.34.md @@ -1,131 +1,936 @@ -- [v1.34.0-rc.2](#v1340-rc2) - - [Downloads for v1.34.0-rc.2](#downloads-for-v1340-rc2) +- [v1.34.1](#v1341) + - [Downloads for v1.34.1](#downloads-for-v1341) - [Source Code](#source-code) - [Client Binaries](#client-binaries) - [Server Binaries](#server-binaries) - [Node Binaries](#node-binaries) - [Container Images](#container-images) - - [Changelog since v1.34.0-rc.1](#changelog-since-v1340-rc1) + - [Changelog since v1.34.0](#changelog-since-v1340) - [Changes by Kind](#changes-by-kind) - - [Feature](#feature) - - [Documentation](#documentation) - [Bug or Regression](#bug-or-regression) - [Dependencies](#dependencies) - [Added](#added) - [Changed](#changed) - [Removed](#removed) -- [v1.34.0-rc.1](#v1340-rc1) - - [Downloads for v1.34.0-rc.1](#downloads-for-v1340-rc1) +- [v1.34.0](#v1340) + - [Downloads for v1.34.0](#downloads-for-v1340) - [Source Code](#source-code-1) - [Client Binaries](#client-binaries-1) - [Server Binaries](#server-binaries-1) - [Node Binaries](#node-binaries-1) - [Container Images](#container-images-1) - - [Changelog since v1.34.0-rc.0](#changelog-since-v1340-rc0) + - [Changelog since v1.33.0](#changelog-since-v1330) + - [Urgent Upgrade Notes](#urgent-upgrade-notes) + - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade) - [Changes by Kind](#changes-by-kind-1) + - [Deprecation](#deprecation) + - [API Change](#api-change) + - [Feature](#feature) + - [Failing Test](#failing-test) - [Bug or Regression](#bug-or-regression-1) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake) - [Dependencies](#dependencies-1) - [Added](#added-1) - [Changed](#changed-1) - [Removed](#removed-1) -- [v1.34.0-rc.0](#v1340-rc0) - - [Downloads for v1.34.0-rc.0](#downloads-for-v1340-rc0) +- [v1.34.0-rc.2](#v1340-rc2) + - [Downloads for v1.34.0-rc.2](#downloads-for-v1340-rc2) - [Source Code](#source-code-2) - [Client Binaries](#client-binaries-2) - [Server Binaries](#server-binaries-2) - [Node Binaries](#node-binaries-2) - [Container Images](#container-images-2) - - [Changelog since v1.34.0-beta.0](#changelog-since-v1340-beta0) + - [Changelog since v1.34.0-rc.1](#changelog-since-v1340-rc1) - [Changes by Kind](#changes-by-kind-2) - - [Deprecation](#deprecation) - - [API Change](#api-change) - [Feature](#feature-1) - - [Failing Test](#failing-test) + - [Documentation](#documentation) - [Bug or Regression](#bug-or-regression-2) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake) - [Dependencies](#dependencies-2) - [Added](#added-2) - [Changed](#changed-2) - [Removed](#removed-2) -- [v1.34.0-beta.0](#v1340-beta0) - - [Downloads for v1.34.0-beta.0](#downloads-for-v1340-beta0) +- [v1.34.0-rc.1](#v1340-rc1) + - [Downloads for v1.34.0-rc.1](#downloads-for-v1340-rc1) - [Source Code](#source-code-3) - [Client Binaries](#client-binaries-3) - [Server Binaries](#server-binaries-3) - [Node Binaries](#node-binaries-3) - [Container Images](#container-images-3) - - [Changelog since v1.34.0-alpha.3](#changelog-since-v1340-alpha3) + - [Changelog since v1.34.0-rc.0](#changelog-since-v1340-rc0) - [Changes by Kind](#changes-by-kind-3) - - [API Change](#api-change-1) - - [Feature](#feature-2) - [Bug or Regression](#bug-or-regression-3) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake-1) - [Dependencies](#dependencies-3) - [Added](#added-3) - [Changed](#changed-3) - [Removed](#removed-3) -- [v1.34.0-alpha.3](#v1340-alpha3) - - [Downloads for v1.34.0-alpha.3](#downloads-for-v1340-alpha3) +- [v1.34.0-rc.0](#v1340-rc0) + - [Downloads for v1.34.0-rc.0](#downloads-for-v1340-rc0) - [Source Code](#source-code-4) - [Client Binaries](#client-binaries-4) - [Server Binaries](#server-binaries-4) - [Node Binaries](#node-binaries-4) - [Container Images](#container-images-4) - - [Changelog since v1.34.0-alpha.2](#changelog-since-v1340-alpha2) + - [Changelog since v1.34.0-beta.0](#changelog-since-v1340-beta0) - [Changes by Kind](#changes-by-kind-4) - - [API Change](#api-change-2) - - [Feature](#feature-3) + - [Deprecation](#deprecation-1) + - [API Change](#api-change-1) + - [Feature](#feature-2) - [Failing Test](#failing-test-1) - [Bug or Regression](#bug-or-regression-4) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake-2) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-1) - [Dependencies](#dependencies-4) - [Added](#added-4) - [Changed](#changed-4) - [Removed](#removed-4) -- [v1.34.0-alpha.2](#v1340-alpha2) - - [Downloads for v1.34.0-alpha.2](#downloads-for-v1340-alpha2) +- [v1.34.0-beta.0](#v1340-beta0) + - [Downloads for v1.34.0-beta.0](#downloads-for-v1340-beta0) - [Source Code](#source-code-5) - [Client Binaries](#client-binaries-5) - [Server Binaries](#server-binaries-5) - [Node Binaries](#node-binaries-5) - [Container Images](#container-images-5) - - [Changelog since v1.34.0-alpha.1](#changelog-since-v1340-alpha1) + - [Changelog since v1.34.0-alpha.3](#changelog-since-v1340-alpha3) - [Changes by Kind](#changes-by-kind-5) - - [Deprecation](#deprecation-1) - - [API Change](#api-change-3) - - [Feature](#feature-4) + - [API Change](#api-change-2) + - [Feature](#feature-3) - [Bug or Regression](#bug-or-regression-5) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake-3) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-2) - [Dependencies](#dependencies-5) - [Added](#added-5) - [Changed](#changed-5) - [Removed](#removed-5) -- [v1.34.0-alpha.1](#v1340-alpha1) - - [Downloads for v1.34.0-alpha.1](#downloads-for-v1340-alpha1) +- [v1.34.0-alpha.3](#v1340-alpha3) + - [Downloads for v1.34.0-alpha.3](#downloads-for-v1340-alpha3) - [Source Code](#source-code-6) - [Client Binaries](#client-binaries-6) - [Server Binaries](#server-binaries-6) - [Node Binaries](#node-binaries-6) - [Container Images](#container-images-6) - - [Changelog since v1.33.0](#changelog-since-v1330) - - [Urgent Upgrade Notes](#urgent-upgrade-notes) - - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade) + - [Changelog since v1.34.0-alpha.2](#changelog-since-v1340-alpha2) - [Changes by Kind](#changes-by-kind-6) - - [Deprecation](#deprecation-2) - - [API Change](#api-change-4) - - [Feature](#feature-5) + - [API Change](#api-change-3) + - [Feature](#feature-4) - [Failing Test](#failing-test-2) - [Bug or Regression](#bug-or-regression-6) - - [Other (Cleanup or Flake)](#other-cleanup-or-flake-4) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-3) - [Dependencies](#dependencies-6) - [Added](#added-6) - [Changed](#changed-6) - [Removed](#removed-6) +- [v1.34.0-alpha.2](#v1340-alpha2) + - [Downloads for v1.34.0-alpha.2](#downloads-for-v1340-alpha2) + - [Source Code](#source-code-7) + - [Client Binaries](#client-binaries-7) + - [Server Binaries](#server-binaries-7) + - [Node Binaries](#node-binaries-7) + - [Container Images](#container-images-7) + - [Changelog since v1.34.0-alpha.1](#changelog-since-v1340-alpha1) + - [Changes by Kind](#changes-by-kind-7) + - [Deprecation](#deprecation-2) + - [API Change](#api-change-4) + - [Feature](#feature-5) + - [Bug or Regression](#bug-or-regression-7) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-4) + - [Dependencies](#dependencies-7) + - [Added](#added-7) + - [Changed](#changed-7) + - [Removed](#removed-7) +- [v1.34.0-alpha.1](#v1340-alpha1) + - [Downloads for v1.34.0-alpha.1](#downloads-for-v1340-alpha1) + - [Source Code](#source-code-8) + - [Client Binaries](#client-binaries-8) + - [Server Binaries](#server-binaries-8) + - [Node Binaries](#node-binaries-8) + - [Container Images](#container-images-8) + - [Changelog since v1.33.0](#changelog-since-v1330-1) + - [Urgent Upgrade Notes](#urgent-upgrade-notes-1) + - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade-1) + - [Changes by Kind](#changes-by-kind-8) + - [Deprecation](#deprecation-3) + - [API Change](#api-change-5) + - [Feature](#feature-6) + - [Failing Test](#failing-test-3) + - [Bug or Regression](#bug-or-regression-8) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake-5) + - [Dependencies](#dependencies-8) + - [Added](#added-8) + - [Changed](#changed-8) + - [Removed](#removed-8) +# v1.34.1 + + +## Downloads for v1.34.1 + + + +### Source Code + +filename | sha512 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes.tar.gz) | b1262f114376f7bc0532ef688e758657ada0796e958c7b49e1401e8a2789791a7d59e5460c54780131fc8fa7398c6e87a7e59fdc4a84061c15d015c69a07e10d +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-src.tar.gz) | 5109cd698bd249341357f5a0b7ab3cd078a641747ef1a17e168f650c62af854cc46bf3bca884f43ea33d51e81a2be4e31d0d02af639a3f58d79f3f1322b0e238 + +### Client Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-client-darwin-amd64.tar.gz) | c977b7ede3a07ec721a874ec127a9b2d2e1edce097e33fc5bfe0a7a2ecf61153c4e514787e89003eeb8d463f47ba0c09f3267669769f0cba873c5265674e056d +[kubernetes-client-darwin-arm64.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-client-darwin-arm64.tar.gz) | ae6b112e45e50a9d1ce0738f948f933eed419dde20a70f399cfcf77ebf5179b6af893ae7e1e633f5b99c1f34a499a2238474cc45878afdf250c048ea43c559a2 +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-client-linux-386.tar.gz) | 3e8aff795fa394343b4d3a943dba25b06b5c122df91fe5893cb354ee605a087f6150cee6225ff60d4b1ed9e0fa02adb9e4ccd8e38cd12337a92cedbdcfaabff2 +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-client-linux-amd64.tar.gz) | 3abedd362fffd5eb749febdeb59c2edd9902f7f69fb182f879daeb27cc88405983c539513cb74ef9b9587ab3829bde992f22f2067fd181311989345f6e13b867 +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-client-linux-arm.tar.gz) | 0d28e96ff4bf3f570277f194a975c19e8a1b49e7240908a91278647c44b5f019251dd7774aed5dbbfe7c030ded993701044c90ac97e14de5c51d0e9ae84d2127 +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-client-linux-arm64.tar.gz) | 279832e1ac95532807aeb68ed951e8099300e3cd4a09f1d829c4b0197e0010d18d1de19e54f73b0ab7f104ee5670ef4897127432fac42867b7a727d75dc8bd48 +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-client-linux-ppc64le.tar.gz) | 1367d4dfebab6f504612d6aa7e6dd7f6391ec28779c0610ef89c77bb691a5020ff3d863d5414645d62e9dfbf1fe814cf8b3bae3097c210f8e8ad895deb19c291 +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-client-linux-s390x.tar.gz) | d03ff4bbad2c947a37a6ffc62f3db08cf2cc1d9d702d90b94f80fb9fdcc637c4f96096beb3a466f07ac4ca807d89e81240f15cf7d2ae1c6fbd4a953122728e28 +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-client-windows-386.tar.gz) | 7929fd442acfa851c1510b52a6c3a11f6d3c2fb318597e68134a1927bac18ab70c6de7d572c0c05ecbc8c5764cf20fc91ab4c1ad604c7cd3707b86c01cb9fd16 +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-client-windows-amd64.tar.gz) | f73e914d28e0986d4b32bbf0d39c428d3e4d28dac11cf8d2b48eae4f1825511fc8b1b706427a1fe752fc0d280f1b4c539f4261cc31f679f25646ac5234afa7ad +[kubernetes-client-windows-arm64.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-client-windows-arm64.tar.gz) | f03de193bc851a1327cbc7338f019cabe7167775ca597c36637b10332b8892a7a4bcc5daa090349f24347f5210fced19c7a15211c69abb94fee87e88c1efaa30 + +### Server Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-server-linux-amd64.tar.gz) | 8fd1e779f4d0188592644e234a6e5b728b9000a2afeb9d8da25131a5a4e54718bb46c4d521c62e26ea971e32745529fbb001c4f011ef2c54091cb5e81b4b90f2 +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-server-linux-arm64.tar.gz) | 77f68803b34f710c9623f388452494075ca9bb38567e7878176ec12a6d2971d2feba381e99462dc8c6e83ff5064dcffcaa7df736b67208880f5e90d71a831c2c +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-server-linux-ppc64le.tar.gz) | 6a5378a02b9b27cce9e0bc26399f8c0a8676372407bb618949fa41caacb4bbfbc7ec5487e00d973fbf409abe848a3aed42b2ead2c78753a1dd7c3251daf61745 +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-server-linux-s390x.tar.gz) | 6b9b4b64907ec817ce93a70faecbfcccf665e6b7681d0c21e26844c9d2645227ee8956c3b6b6a2417725b1e64353d5e1ed7071cf2c8e71ea8551cd47d662c3d8 + +### Node Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-node-linux-amd64.tar.gz) | c9b7d52708c4282757cd7aaa8b059c26f8f427cf8c238dff95cdc85a68d42c28b6e09fbf1aee3fa6f5f377aa395c6b9a73c112c56a6485e22b16a9c8562a8eef +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-node-linux-arm64.tar.gz) | efe54933eb5e7e6b44c76efe0b4cec911340793ef2eafdd595593fb2537e5704429d3a291793cb69ad459fe14058da491a29a12d963ba34ee4c1475cc0799b0f +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-node-linux-ppc64le.tar.gz) | 59a7223e167c890d8cb8544b9692182aaccb3814cb203337ea21a87902e0174d6f0e114d015989c42890d3b73cb73bdf8b1b71ef89fd1b0cf615349d10c23f8f +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-node-linux-s390x.tar.gz) | b648658aaae4812d787b7be04bdfd13dc379316bbcda107eca410ffbdf57713f00bbb68ad4fe9501c3bb26e5d35f589653d4067a5753f681e41f493a28309ea9 +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.34.1/kubernetes-node-windows-amd64.tar.gz) | 4c70f856364a976aa919662f3b3f6f06da3fe7ae156b7bf3fd84de4b5a0b0c70221283220c48c3cc31dddce0f2e0167606126515b1750ca90aaf129f1c9280ce + +### Container Images + +All container images are available as manifest lists and support the described +architectures. It is also possible to pull a specific architecture directly by +adding the "-$ARCH" suffix to the container image name. + +name | architectures +---- | ------------- +[registry.k8s.io/conformance:v1.34.1](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-s390x) +[registry.k8s.io/kube-apiserver:v1.34.1](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-s390x) +[registry.k8s.io/kube-controller-manager:v1.34.1](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-s390x) +[registry.k8s.io/kube-proxy:v1.34.1](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-s390x) +[registry.k8s.io/kube-scheduler:v1.34.1](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-s390x) +[registry.k8s.io/kubectl:v1.34.1](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-s390x) + +## Changelog since v1.34.0 + +## Changes by Kind + +### Bug or Regression + +- Fixed SELinux warning controller not emitting events on some SELinux label conflicts. ([#133745](https://github.com/kubernetes/kubernetes/pull/133745), [@jsafrane](https://github.com/jsafrane)) [SIG Apps, Storage and Testing] +- Fixed broken shell completion for api resources. ([#133783](https://github.com/kubernetes/kubernetes/pull/133783), [@vpnachev](https://github.com/vpnachev)) [SIG CLI] +- Kube-apiserver: Fixed a 1.34 regression in CustomResourceDefinition handling that incorrectly warned about unrecognized formats on number and integer properties ([#133901](https://github.com/kubernetes/kubernetes/pull/133901), [@yongruilin](https://github.com/yongruilin)) [SIG API Machinery] +- Kube-apiserver: Fixes a 1.34 regression with spurious "Error getting keys" log messages ([#133866](https://github.com/kubernetes/kubernetes/pull/133866), [@serathius](https://github.com/serathius)) [SIG API Machinery and Etcd] +- Kube-apiserver: Fixes a possible 1.34 performance regression calculating object size statistics for resources not served from the watch cache, typically only Events ([#133879](https://github.com/kubernetes/kubernetes/pull/133879), [@serathius](https://github.com/serathius)) [SIG API Machinery and Etcd] +- Kubeadm: fixed bug where v1beta3's ClusterConfiguration.APIServer.TimeoutForControlPlane is not respected in newer versions of kubeadm where v1beta4 is the default. ([#133753](https://github.com/kubernetes/kubernetes/pull/133753), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG Cluster Lifecycle] + +## Dependencies + +### Added +_Nothing has changed._ + +### Changed +_Nothing has changed._ + +### Removed +_Nothing has changed._ + + + +# v1.34.0 + +[Documentation](https://docs.k8s.io) + +## Downloads for v1.34.0 + +### Source Code + +filename | sha512 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes.tar.gz) | `133a1ea99881ac8988b1931908506b8b02e0533c6c6521b67152c00e0ba5c124870a3a5050887827a7d1b1b8cc4b1da9e2b07f76684975585d0947e5d234faa5` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-src.tar.gz) | `2fa409c71ce0f98dc540baa0e5058f751ee982cf0b9dfe4d3ed5eea1331586e7a464a631909889f9c0758d364643718a336816343136b603ef59bdf43c7a30d7` + +### Client Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-client-darwin-amd64.tar.gz) | `20b6c4f9327f4d0b5873429595e2b7bdfec6269e9a39dee69e28ff9f3fd168611f56f378b867c35edc605dac23227b0d95083fdbc676c04f5d8d1142ceff829c` +[kubernetes-client-darwin-arm64.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-client-darwin-arm64.tar.gz) | `c48d5efa26f8313f535a173201c38896fa9147fd46a7d3a085c70dcbb16391a894d4c4f09ecb6d1d7ed081a7d3fdd8f71afadd0253a55808addb383680ef89b7` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-client-linux-386.tar.gz) | `efc91631134a8cdd543d4e9cf429928b0b7abe2f6212f05ea82ad62830caef74aa4b9b090b45d583912de280e13af87b8b20c0d3fc6fbc43b5c99beb5a9ff8db` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-client-linux-amd64.tar.gz) | `aa5e3a41986e23ad6910eb86e68eb10217db60978dadc88370c669cb9c9e10d1431133cc8f7401b4e9843e0d15120c867f2803121e690ac7c74ee85eabbc13b5` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-client-linux-arm.tar.gz) | `aeafc3d539a400e2e1a32ed501aca7e265ed817d0d56acf62f306c26c2be0beac6af88b6478a26df865105a2c13f2006cc1e062189f4b6885814133090228e86` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-client-linux-arm64.tar.gz) | `24158910deed9d09e99e5fb358bd9758de509f344bfb0b1482b2426e26c1e52f7f97657438fa698b51da10c7444699f7addae58ee67b23f38eb175df0e17661a` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-client-linux-ppc64le.tar.gz) | `b30f3966ab6d2b723956cd400e73a685ea6431230eb1994bbb995af163f6ba7abbda79834dab3f0fc0a6b4a9c9af3582f07689e100841ea012015070cac9cd80` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-client-linux-s390x.tar.gz) | `b543accac845a9a8d1fccc62e43d44479247f9ed65d7db7e2fcf0004ee02c7eaf9d10ab977040bf77f4f5171974a1d4d8a1852d93668b1f593ad5f957ba84952` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-client-windows-386.tar.gz) | `2f60547e2e8800df61c57adfb862031e81ba27cba3edeaf483aa8616820561c6ed9b87778b4e81be14545dcaa35bef9d80c817972039357f8e594a6f4edeeb13` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-client-windows-amd64.tar.gz) | `a528fdec4aa426f0b72ff96f39727842e6561f4c49e273e6f007934f42ab2992fd75a8fa43c9ae7d9f3345091228d43bc03e3bdf3696d36a56b4fb49d20a6e9d` +[kubernetes-client-windows-arm64.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-client-windows-arm64.tar.gz) | `467dcadaa8b48d45caa0a5aca5669317fd501689e4a90219c701adb5e9f46ce66085dd3800321e2377c775992180d76aae2e2b84a4f7bb50f997198def0dd8e6` + +### Server Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-server-linux-amd64.tar.gz) | `a9ec9abe6a803d55d56753e1be8549223cd34ebcbec26536cbdc277c5f17a28c4942329e1df01a2bd067b60a0c1c2901e240d5014e9ce445400239bd488582af` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-server-linux-arm64.tar.gz) | `d05fd68c31f30b1853aa927200ce99fc1e7e67b39803be7508c5591b57e74f3496bcd8b50b84afeabd293f41bc647ea4bcb0bf85a7be5b49e8d2604214e5ccda` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-server-linux-ppc64le.tar.gz) | `173d638506736cfd0bd8ffe7719447895068ed3f3c8a20405548f0db6689bcd63a4f226f6b19e35e7696801c338d9071f2f93392c8ec6316617303350cb44cff` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-server-linux-s390x.tar.gz) | `80fd0c55c3c1cdbdd47faf9bfcf2f89d36c56bb91c0281c126e8ba84ad36c527f1861646f54dc4258ba6fae0fb8ee23674ed41f811a08758da3fe1337f723748` + +### Node Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-node-linux-amd64.tar.gz) | `93ae93af2d39bf00747b66f365781c64880b4ca235031a7ecae7a9d017e04df7ca925f8c005b1da49447cf64cb3f1ecc790db460e60cd1f98f34aae1434ad103` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-node-linux-arm64.tar.gz) | `33216af73a02919579985be5d5372ecb305b6fb2013297f3ea36b357d3cf4bce2a07a612e188b76c752aabbe23bdc726645f348f5db43b12893fc80ac65711f3` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-node-linux-ppc64le.tar.gz) | `781df3a7785435ed365949850ef3c4555e3531826907d75e2edf102cdef8950176c17c8dc8ad97077908b12895eb2cf2796e27418252cb790a7876484270d33a` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-node-linux-s390x.tar.gz) | `133c8c011e3f0c6094262efa2cd053e96facdfdb603f90eb51b9ee085c082ac82bcd53863cc517f7ae9e219265f8e66e94e4fbdc21ee01b79b72c993792dde5c` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.34.0/kubernetes-node-windows-amd64.tar.gz) | `e5f6dbd19106b4f4d125d048f1351be2b6a06a79622ece31c24a2a27c03268474a42a1b0b85b1de46423a66c0ee9e1060e9bcee709ae1668c7a650b5575ccc76` + +### Container Images + +All container images are available as manifest lists and support the described +architectures. It is also possible to pull a specific architecture directly by +adding the "-$ARCH" suffix to the container image name. +name | architectures +---- | ------------- +[registry.k8s.io/conformance:v1.34.0](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-s390x) +[registry.k8s.io/kube-apiserver:v1.34.0](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-s390x) +[registry.k8s.io/kube-controller-manager:v1.34.0](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-s390x) +[registry.k8s.io/kube-proxy:v1.34.0](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-s390x) +[registry.k8s.io/kube-scheduler:v1.34.0](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-s390x) +[registry.k8s.io/kubectl:v1.34.0](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-s390x) + +## Changelog since v1.33.0 + +## Urgent Upgrade Notes + +### (No, really, you MUST read this before you upgrade) + +- For metrics `apiserver_cache_list_fetched_objects_total`, `apiserver_cache_list_returned_objects_total`, `apiserver_cache_list_total` replace `resource_prefix` label with API `group` and `resource` labels. + For metrics `etcd_request_duration_seconds`, `etcd_requests_total` and `etcd_request_errors_total` replace `type` label with API `resource` and `group` label. + For metric `apiserver_selfrequest_total` add a API `group` label. + For metrics `apiserver_watch_events_sizes` and `apiserver_watch_events_total` replace API `kind` label with `resource` label. + For metrics `apiserver_request_body_size_bytes`, `apiserver_storage_events_received_total`, `apiserver_storage_list_evaluated_objects_total`, `apiserver_storage_list_fetched_objects_total`, `apiserver_storage_list_returned_objects_total`, `apiserver_storage_list_total`, `apiserver_watch_cache_events_dispatched_total`, `apiserver_watch_cache_events_received_total`, `apiserver_watch_cache_initializations_total`, `apiserver_watch_cache_resource_version`, `watch_cache_capacity`, `apiserver_init_events_total`, `apiserver_terminated_watchers_total`, `watch_cache_capacity_increase_total`, `watch_cache_capacity_decrease_total`, `apiserver_watch_cache_read_wait_seconds`, `apiserver_watch_cache_consistent_read_total`, `apiserver_storage_consistency_checks_total`, `etcd_bookmark_counts`, `storage_decode_errors_total` extract the API group from `resource` label and put it in new `group` label. ([#131845](https://github.com/kubernetes/kubernetes/pull/131845), [@serathius](https://github.com/serathius)) [SIG API Machinery, Etcd, Instrumentation and Testing] + - Kubelet: removed the deprecated flag `--cloud-config` from the command line. ([#130161](https://github.com/kubernetes/kubernetes/pull/130161), [@carlory](https://github.com/carlory)) [SIG Cloud Provider, Node and Scalability] + - Static pods that reference API objects were denied admission by the kubelet so that static pods would not be silently running even after the mirror pod creation failed. ([#131837](https://github.com/kubernetes/kubernetes/pull/131837), [@sreeram-venkitesh](https://github.com/sreeram-venkitesh)) [SIG Auth, Node and Testing] + - The Scheduling Framework exposed `NodeInfos` to the PreFilter plugins. The PreFilter plugins now accepted the `NodeInfo` list from the arguments. ([#130720](https://github.com/kubernetes/kubernetes/pull/130720), [@saintube](https://github.com/saintube)) [SIG Node, Scheduling, Storage and Testing] + +## Changes by Kind + +### Deprecation + +- Apimachinery: Deprecated `MessageCountMap` and `CreateAggregateFromMessageCountMap`. ([#132376](https://github.com/kubernetes/kubernetes/pull/132376), [@tico88612](https://github.com/tico88612)) +- DRA kubelet: gRPC API graduated to v1, v1beta1 was deprecated starting in 1.34. Updating DRA drivers to the `k8s.io/dynamic-resource-allocation/kubeletplugin` helper from 1.34 added support for both API versions. ([#132700](https://github.com/kubernetes/kubernetes/pull/132700), [@pohly](https://github.com/pohly)) [SIG Node and Testing] +- Deprecated the `preferences` field in kubeconfig in favor of `kuberc`. ([#131741](https://github.com/kubernetes/kubernetes/pull/131741), [@soltysh](https://github.com/soltysh)) [SIG API Machinery, CLI, Cluster Lifecycle and Testing] +- Kubeadm: Consistently prefixed errors with error: when printing them. ([#132080](https://github.com/kubernetes/kubernetes/pull/132080), [@neolit123](https://github.com/neolit123)) +- Kubeadm: Exposed only the non-deprecated klog flags (-v and -vmodule), in line with KEP https://features.k8s.io/2845. ([#131647](https://github.com/kubernetes/kubernetes/pull/131647), [@carsontham](https://github.com/carsontham)) +- [cloud-provider] Respected the `exclude-from-external-load-balancers=false` label. ([#131085](https://github.com/kubernetes/kubernetes/pull/131085), [@kayrus](https://github.com/kayrus)) [SIG Cloud Provider and Network] + +### API Change + +- Added `omitempty` and `opt` tag to the API `v1beta2` AdminAccess type in the `DeviceRequestAllocationResult` struct. ([#132338](https://github.com/kubernetes/kubernetes/pull/132338), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Added a `runtime.ApplyConfiguration` interface implemented by all generated apply configuration types. ([#132194](https://github.com/kubernetes/kubernetes/pull/132194), [@alvaroaleman](https://github.com/alvaroaleman)) [SIG API Machinery and Instrumentation] +- Added a detailed event for in-place pod vertical scaling completed, improving cluster management and debugging. ([#130387](https://github.com/kubernetes/kubernetes/pull/130387), [@shiya0705](https://github.com/shiya0705)) [SIG API Machinery, Apps, Autoscaling, Node, Scheduling and Testing] +- Added a mechanism for configurable container restarts: _container-level restart rules_. This was an alpha feature behind the `ContainerRestartRules` feature gate. ([#132642](https://github.com/kubernetes/kubernetes/pull/132642), [@yuanwang04](https://github.com/yuanwang04)) [SIG API Machinery, Apps, Node and Testing] +- Added a new `FileKeyRef` field to containers, allowing them to load variables from files by setting this field. + + Introduced the `EnvFiles` feature gate to govern activation of this functionality. ([#132626](https://github.com/kubernetes/kubernetes/pull/132626), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG API Machinery, Apps, Node and Testing] +- Added driver-owned fields in `ResourceSlice` to mark whether the device was shareable among multiple resource claims (or requests) and to specify how each capacity could be shared between different requests. + - Added user-owned fields in `ResourceClaim` to specify resource requirements against each device capacity. + - Added scheduler-owned field in `ResourceClaim.Status` to specify how much device capacity is reserved for a specific request. + - Added an additional identifier to `ResourceClaim.Status` for the device supports multiple allocations. + - Added a new constraint type to enforce uniqueness of specified attributes across all allocated devices. ([#132522](https://github.com/kubernetes/kubernetes/pull/132522), [@sunya-ch](https://github.com/sunya-ch)) [SIG API Machinery, Apps, Architecture, CLI, Cluster Lifecycle, Network, Node, Release, Scheduling and Testing] +- Added new optional APIs in `ResouceSlice.Basic` and `ResourceClaim.Status.AllocatedDeviceStatus`. ([#130160](https://github.com/kubernetes/kubernetes/pull/130160), [@KobayashiD27](https://github.com/KobayashiD27)) [SIG API Machinery, Apps, Architecture, Node, Release, Scheduling and Testing] +- Added support for specifying `controlplane` or `cluster` egress selectors in JWT authenticators via the `issuer.egressSelectorType` field in the `AuthenticationConfiguration.jwt` array. If unset, the previous behavior of using no egress selector is preserved. This functionality requires the `StructuredAuthenticationConfigurationEgressSelector` beta feature gate (enabled by default). ([#132768](https://github.com/kubernetes/kubernetes/pull/132768), [@enj](https://github.com/enj)) [SIG API Machinery, Auth and Testing] +- Added support in the Kubelet for monitoring the health of devices allocated via Dynamic Resource Allocation (DRA) and report it in the `pod.status.containerStatuses.allocatedResourcesStatus` field. This required the DRA plugin to implement the new v1alpha1 `NodeHealth` gRPC service. This feature was controlled by the `ResourceHealthStatus` feature gate. ([#130606](https://github.com/kubernetes/kubernetes/pull/130606), [@Jpsassine](https://github.com/Jpsassine)) [SIG Apps, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Etcd, Network, Node, Release, Scheduling, Storage and Testing] +- Added support in the kubelet's image pull credential tracking for service account-based verification. When an image was pulled using service account credentials via external credential providers, subsequent Pods using the same service account (UID, name, and namespace) could access the cached image without re-authentication for the lifetime of that service account. ([#132771](https://github.com/kubernetes/kubernetes/pull/132771), [@aramase](https://github.com/aramase)) [SIG Auth, Node and Testing] +- Added validation to reject Pods using the `PodLevelResources` feature on Windows OS due to lack of support. The API server rejected Pods with pod-level resources and a `Pod.spec.os.name` targeting Windows. Kubelet on nodes running Windows also rejected Pods with pod-level resources at the admission phase. ([#133046](https://github.com/kubernetes/kubernetes/pull/133046), [@toVersus](https://github.com/toVersus)) [SIG Apps and Node] +- Added warnings when creating headless service with set `loadBalancerIP`,`externalIPs` and/or `SessionAffinity`. ([#132214](https://github.com/kubernetes/kubernetes/pull/132214), [@Peac36](https://github.com/Peac36)) +- Allowed `pvc.spec.VolumeAttributesClassName` to change from non-nil to nil. ([#132106](https://github.com/kubernetes/kubernetes/pull/132106), [@AndrewSirenko](https://github.com/AndrewSirenko)) +- Allowed setting the `hostnameOverride` field in `PodSpec` to specify any RFC 1123 DNS subdomain as the pod's hostname. The `HostnameOverride` feature gate was introduced to control enablement of this functionality. ([#132558](https://github.com/kubernetes/kubernetes/pull/132558), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG API Machinery, Apps, Network, Node and Testing] +- Changed underlying logic for `Eviction Manager` helper functions. ([#132277](https://github.com/kubernetes/kubernetes/pull/132277), [@KevinTMtz](https://github.com/KevinTMtz)) [SIG Node, Scheduling and Testing] +- Changed underlying logic to propagate pod-level hugepage cgroup to containers when they did not specify hugepage resources. + - Added validation to enforce the hugepage aggregated container limits to be smaller than or equal to pod-level limits. This was already enforced with the defaulted requests from the specified limits, however it did not make it clear about both hugepage requests and limits. ([#131089](https://github.com/kubernetes/kubernetes/pull/131089), [@KevinTMtz](https://github.com/KevinTMtz)) [SIG Apps, Node and Testing] +- Corrected the documentation to clarify that `podSelector` is optional and described its default behavior. ([#131354](https://github.com/kubernetes/kubernetes/pull/131354), [@tomoish](https://github.com/tomoish)) +- DRA API: resource.k8s.io/v1alpha3 now only contains DeviceTaintRule. All other types got removed because they became obsolete when introducing the v1beta1 API in 1.32. + before updating a cluster where resourceclaims, resourceclaimtemplates, deviceclasses, or resourceslices might have been stored using Kubernetes < 1.32, delete all of those resources before updating and recreate them as needed while running Kubernetes >= 1.32. ([#132000](https://github.com/kubernetes/kubernetes/pull/132000), [@pohly](https://github.com/pohly)) [SIG Etcd, Node, Scheduling and Testing] +- DRA: Starting with Kubernetes 1.34, the alpha-level `resource.k8s.io/admin-access` label has been updated to `resource.kubernetes.io/admin-access`. Admins using the alpha feature and updating from 1.33 can set both labels, upgrade, then remove `resource.k8s.io/admin-access` when no downgrade is going to happen anymore. ([#131996](https://github.com/kubernetes/kubernetes/pull/131996), [@ritazh](https://github.com/ritazh)) [SIG Node and Testing] +- DRA: The scheduler plugin prevented abnormal filter runtimes by timing out after 10 seconds. This was configurable via the plugin configuration's `FilterTimeout`. Setting it to zero disabled the timeout and restored the behavior of Kubernetes <= 1.33. ([#132033](https://github.com/kubernetes/kubernetes/pull/132033), [@pohly](https://github.com/pohly)) [SIG Node, Scheduling and Testing] +- DRA: When the prioritized list feature was used in a request and the resulting number of allocated devices exceeded the number of allowed devices per claim, the scheduler aborted the attempt to allocate devices early. Previously, it tried to many different combinations, which could take a long time. ([#130593](https://github.com/kubernetes/kubernetes/pull/130593), [@mortent](https://github.com/mortent)) [SIG Apps, Node, Scheduling and Testing] +- DRA: removed support for the v1alpha4 kubelet gRPC API (added in 1.31, superseded in 1.32). DRA drivers using the helper package from Kubernetes >= 1.32 use the v1beta1 API and continue to be supported. ([#132574](https://github.com/kubernetes/kubernetes/pull/132574), [@pohly](https://github.com/pohly)) +- Deprecated `StreamingConnectionIdleTimeout` field of the kubelet config. ([#131992](https://github.com/kubernetes/kubernetes/pull/131992), [@lalitc375](https://github.com/lalitc375)) +- Dynamic Resource Allocation: Graduated core functionality to general availability (GA). This newly stable feature uses the _structured parameters_ flavor of DRA. ([#132706](https://github.com/kubernetes/kubernetes/pull/132706), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Autoscaling, Etcd, Node, Scheduling and Testing] +- Enabled kube-apiserver support for `PodCertificateRequest` and `PodCertificate` projected volumes (behind the `PodCertificateRequest` feature gate). ([#128010](https://github.com/kubernetes/kubernetes/pull/128010), [@ahmedtd](https://github.com/ahmedtd)) [SIG API Machinery, Apps, Auth, Cloud Provider, Etcd, Node, Storage and Testing] +- Extended resources backed by DRA feature allowed cluster operator to specify `extendedResourceName` in `DeviceClass`, and application operator to continue using extended resources in pod's requests to request for DRA devices matching the DeviceClass. + + `NodeResourcesFit` plugin scoring didn't work for extended resources backed by DRA. ([#130653](https://github.com/kubernetes/kubernetes/pull/130653), [@yliaog](https://github.com/yliaog)) [SIG API Machinery, Apps, Auth, Node, Scheduling and Testing] +- Extended the NodePorts scheduling plugin to consider hostPorts used by restartable init containers. ([#132040](https://github.com/kubernetes/kubernetes/pull/132040), [@avrittrohwer](https://github.com/avrittrohwer)) [SIG Scheduling and Testing] +- Fixed a 1.33 regression that causes a nil panic in kube-scheduler when aggregating resource requested across container's spec and status. ([#132895](https://github.com/kubernetes/kubernetes/pull/132895), [@yue9944882](https://github.com/yue9944882)) [SIG Node and Scheduling] +- Fixed prerelease lifecycle for `PodCertificateRequest`. ([#133350](https://github.com/kubernetes/kubernetes/pull/133350), [@carlory](https://github.com/carlory)) +- Introduced OpenAPI format support for `k8s-short-name` and `k8s-long-name` in CustomResourceDefinition schemas. ([#132504](https://github.com/kubernetes/kubernetes/pull/132504), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Network, Node, Scheduling and Storage] +- Introduced the `admissionregistration.k8s.io/v1beta1/MutatingAdmissionPolicy` API type. To enable, enable the `MutatingAdmissionPolicy` feature gate (which was off by default) and set `--runtime-config=admissionregistration.k8s.io/v1beta1=true` on the kube-apiserver. + Note that the default stored version remained alpha in 1.34, and whoever enabled beta during 1.34 needed to run a storage migration yourself to ensure you don't depend on alpha data in etcd. ([#132821](https://github.com/kubernetes/kubernetes/pull/132821), [@cici37](https://github.com/cici37)) [SIG API Machinery, Etcd and Testing] +- Kube-apiserver: Added support for disabling caching of authorization webhook decisions in the `--authorization-config` file. The new fields `cacheAuthorizedRequests` and `cacheUnauthorizedRequests` could be set to `false` to prevent caching for authorized or unauthorized requests. See the https://kubernetes.io/docs/reference/access-authn-authz/authorization/#using-configuration-file-for-authorization for more details. ([#129237](https://github.com/kubernetes/kubernetes/pull/129237), [@rfranzke](https://github.com/rfranzke)) [SIG API Machinery and Auth] +- Kube-apiserver: Promoted the `StructuredAuthenticationConfiguration` feature gate to GA. ([#131916](https://github.com/kubernetes/kubernetes/pull/131916), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth and Testing] +- Kube-apiserver: the AuthenticationConfiguration type accepted in `--authentication-config` files has been promoted to `apiserver.config.k8s.io/v1`. ([#131752](https://github.com/kubernetes/kubernetes/pull/131752), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth and Testing] +- Kube-log-runner: Added the `-log-file-size` parameter to rotate log output into a new file once it reached a certain size. Introduced `-log-file-age` to enable automatic removal of old output files, and `-flush-interval` to support periodic flushing. ([#127667](https://github.com/kubernetes/kubernetes/pull/127667), [@zylxjtu](https://github.com/zylxjtu)) [SIG API Machinery, Apps, Architecture, Auth, Autoscaling, CLI, Cloud Provider, Cluster Lifecycle, Etcd, Instrumentation, Network, Node, Release, Scheduling, Storage, Testing and Windows] +- Kubectl: Graduated kuberc support to beta. A `kuberc` configuration file provided a mechanism for customizing `kubectl` behavior (distinct from kubeconfig, which configures cluster access across different clients). ([#131818](https://github.com/kubernetes/kubernetes/pull/131818), [@soltysh](https://github.com/soltysh)) [SIG CLI and Testing] +- Promoted Job Pod Replacement Policy to general availability. The `JobPodReplacementPolicy` feature gate was locked to `true` and will be removed in a future Kubernetes release. ([#132173](https://github.com/kubernetes/kubernetes/pull/132173), [@dejanzele](https://github.com/dejanzele)) [SIG Apps and Testing] +- Promoted `MutableCSINodeAllocatableCount` to beta. ([#132429](https://github.com/kubernetes/kubernetes/pull/132429), [@torredil](https://github.com/torredil)) +- Promoted feature-gate `VolumeAttributesClass` to GA + - Promoted API `VolumeAttributesClass` and `VolumeAttributesClassList` to `storage.k8s.io/v1`. ([#131549](https://github.com/kubernetes/kubernetes/pull/131549), [@carlory](https://github.com/carlory)) [SIG API Machinery, Apps, Auth, CLI, Etcd, Storage and Testing] +- Promoted the `APIServerTracing` feature gate to GA. The `--tracing-config-file` flag accepted `TracingConfiguration` in version `apiserver.config.k8s.io/v1` (with no changes from `apiserver.config.k8s.io/v1beta1`). ([#132340](https://github.com/kubernetes/kubernetes/pull/132340), [@dashpole](https://github.com/dashpole)) [SIG API Machinery and Testing] +- Promoted the `AuthorizeWithSelectors` and `AuthorizeNodeWithSelectors` feature gates to stable and locked on. ([#132656](https://github.com/kubernetes/kubernetes/pull/132656), [@liggitt](https://github.com/liggitt)) [SIG API Machinery, Auth and Testing] +- Promoted the `KubeletTracing` feature gate to GA. ([#132341](https://github.com/kubernetes/kubernetes/pull/132341), [@dashpole](https://github.com/dashpole)) [SIG Instrumentation and Node] +- Promoted the `RelaxedEnvironmentVariableValidation` feature gate to GA and locked it in the enabled state by default. ([#132054](https://github.com/kubernetes/kubernetes/pull/132054), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG Apps, Architecture, Node and Testing] +- Removed an inaccurate statement about requiring ports when the Pod spec `hostNetwork` field was set. ([#130994](https://github.com/kubernetes/kubernetes/pull/130994), [@BenTheElder](https://github.com/BenTheElder)) [SIG Network and Node] +- Removed deprecated `gogo` protocol definitions from `k8s.io/kubelet/pkg/apis/pluginregistration` in favor of `google.golang.org/protobuf`. ([#132773](https://github.com/kubernetes/kubernetes/pull/132773), [@saschagrunert](https://github.com/saschagrunert)) +- Removed deprecated gogo protocol definitions from `k8s.io/cri-api` in favor of `google.golang.org/protobuf`. ([#128653](https://github.com/kubernetes/kubernetes/pull/128653), [@saschagrunert](https://github.com/saschagrunert)) [SIG API Machinery, Auth, Instrumentation, Node and Testing] +- Replaced Boolean-pointer-helper functions with the `k8s.io/utils/ptr` implementations. ([#132794](https://github.com/kubernetes/kubernetes/pull/132794), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery, Auth, CLI, Node and Testing] +- Replaced `boolPtrFn` helper functions with the "k8s.io/utils/ptr" implementation. ([#132907](https://github.com/kubernetes/kubernetes/pull/132907), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the apiextensions-apiserver apiextensions. ([#132723](https://github.com/kubernetes/kubernetes/pull/132723), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the apiserver (1/2). ([#132751](https://github.com/kubernetes/kubernetes/pull/132751), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery and Auth] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the component-base. ([#132754](https://github.com/kubernetes/kubernetes/pull/132754), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery, Architecture, Instrumentation and Scheduling] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the kube-aggregator apiregistration. ([#132701](https://github.com/kubernetes/kubernetes/pull/132701), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Simplied validation error message for invalid fields by removing redundant field name. ([#132513](https://github.com/kubernetes/kubernetes/pull/132513), [@xiaoweim](https://github.com/xiaoweim)) [SIG API Machinery, Apps, Auth, Node and Scheduling] +- Simplied validation error message for required fields by removing redundant messages. ([#132472](https://github.com/kubernetes/kubernetes/pull/132472), [@xiaoweim](https://github.com/xiaoweim)) [SIG API Machinery, Apps, Architecture, Auth, Cloud Provider, Network, Node and Storage] +- The `KubeletServiceAccountTokenForCredentialProviders` feature was beta and enabled by default. ([#133017](https://github.com/kubernetes/kubernetes/pull/133017), [@aramase](https://github.com/aramase)) [SIG Auth and Node] +- The `conditionType` is "oneof" approved/denied check of CertificateSigningRequest's `.status.conditions` field was migrated to declarative validation. + If the `DeclarativeValidation` feature gate was enabled, mismatches with existing validation are reported via metrics. + If the `DeclarativeValidationTakeover` feature gate was enabled, declarative validation was the primary source of errors for migrated fields. ([#133013](https://github.com/kubernetes/kubernetes/pull/133013), [@aaron-prindle](https://github.com/aaron-prindle)) [SIG API Machinery and Auth] +- The fallback behavior of the Downward API's `resourceFieldRef` field was updated to account for pod-level resources: if container-level limits were not set, pod-level limits were now used before falling back to node allocatable resources. ([#132605](https://github.com/kubernetes/kubernetes/pull/132605), [@toVersus](https://github.com/toVersus)) [SIG Node, Scheduling and Testing] +- The validation of `replicas` field in the ReplicationController `/scale` subresource has been migrated to declarative validation. + If the `DeclarativeValidation` feature gate is enabled, mismatches with existing validation are reported via metrics. + If the `DeclarativeValidationTakeover` feature gate is enabled, declarative validation is the primary source of errors for migrated fields. ([#131664](https://github.com/kubernetes/kubernetes/pull/131664), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery and Apps] +- The validation-gen code generator generated validation code that supported validation ratcheting. ([#132236](https://github.com/kubernetes/kubernetes/pull/132236), [@yongruilin](https://github.com/yongruilin)) [SIG API Machinery, Apps, Auth and Node] +- Updated `IsDNS1123SubdomainWithUnderscore` so that, when it returned an error, it also returned the correct regex information (`dns1123SubdomainFmtWithUnderscore`). ([#132034](https://github.com/kubernetes/kubernetes/pull/132034), [@ChosenFoam](https://github.com/ChosenFoam)) +- Updated etcd version to v3.6.0. ([#131501](https://github.com/kubernetes/kubernetes/pull/131501), [@joshjms](https://github.com/joshjms)) [SIG API Machinery, Cloud Provider, Cluster Lifecycle, Etcd and Testing] +- Updated the `v1` credential provider configuration to include the `tokenAttributes.cacheType` field. This field is required and must be set to either `ServiceAccount` or `Token` when configuring a provider that uses a service account to fetch registry credentials. ([#132617](https://github.com/kubernetes/kubernetes/pull/132617), [@aramase](https://github.com/aramase)) [SIG Auth, Node and Testing] +- Zero-value `metadata.creationTimestamp` values are now omitted and no longer serialize an explicit `null` in JSON, YAML, and CBOR output ([#130989](https://github.com/kubernetes/kubernetes/pull/130989), [@liggitt](https://github.com/liggitt)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Etcd, Instrumentation, Network, Node, Scheduling, Storage and Testing] +- `AppArmor` profiles specified in the Pod or container `SecurityContext` were no longer copied to deprecated `AppArmor` annotations (prefix `container.apparmor.security.beta.kubernetes.io/`). Anything that inspected the deprecated annotations must be migrated to use the `SecurityContext` fields instead. ([#131989](https://github.com/kubernetes/kubernetes/pull/131989), [@tallclair](https://github.com/tallclair)) +- `MultiCIDRServiceAllocator` was locked and enabled by default, `DisableAllocatorDualWrite` was enabled by default. ([#131318](https://github.com/kubernetes/kubernetes/pull/131318), [@aojea](https://github.com/aojea)) [SIG API Machinery, Apps, Architecture, Auth, Etcd, Network and Testing] + +### Feature + +- Added 3 new metrics for monitoring async API calls in the scheduler when the `SchedulerAsyncAPICalls` feature gate was enabled: + - `scheduler_async_api_call_execution_total`: tracks executed API calls by call type and result (success/error) + - `scheduler_async_api_call_duration_seconds`: histogram of API call execution duration by call type and result + - `scheduler_pending_async_api_calls`: gauge showing current number of pending API calls in the queue. ([#133120](https://github.com/kubernetes/kubernetes/pull/133120), [@utam0k](https://github.com/utam0k)) [SIG Release and Scheduling] +- Added HPA support to pod-level resource specifications. When the pod-level resource feature was enabled, HPAs configured with `Resource` type metrics calculated the pod resources from `pod.Spec.Resources` field, if specified. ([#132430](https://github.com/kubernetes/kubernetes/pull/132430), [@laoj2](https://github.com/laoj2)) [SIG Apps, Autoscaling and Testing] +- Added Traffic Distribution field to `kubectl describe service` output ([#131491](https://github.com/kubernetes/kubernetes/pull/131491), [@tchap](https://github.com/tchap)) [SIG CLI] +- Added `SizeBasedListCostEstimate` feature gate that allowed apiserver to estimate sizes of objects to calculate cost of LIST requests. ([#132355](https://github.com/kubernetes/kubernetes/pull/132355), [@serathius](https://github.com/serathius)) [SIG API Machinery and Etcd] +- Added `apiserver_resource_size_estimate_bytes` metric to API server. ([#132893](https://github.com/kubernetes/kubernetes/pull/132893), [@serathius](https://github.com/serathius)) [SIG API Machinery, Etcd and Instrumentation] +- Added `started_user_namespaced_pods_total` and `started_user_namespaced_pods_errors_total` for tracking the successes and failures in creating pods if a user namespace was requested. ([#132902](https://github.com/kubernetes/kubernetes/pull/132902), [@haircommander](https://github.com/haircommander)) [SIG Node and Testing] +- Added a `--show-swap` option to `kubectl top` subcommands ([#129458](https://github.com/kubernetes/kubernetes/pull/129458), [@iholder101](https://github.com/iholder101)) [SIG CLI] +- Added a `container_swap_limit_bytes` metric to expose the swap limit assigned to containers under the `LimitedSwap` swap behavior. ([#132348](https://github.com/kubernetes/kubernetes/pull/132348), [@iholder101](https://github.com/iholder101)) [SIG Node and Testing] +- Added a delay to node updates after kubelet startup. A random offset, based on the configured `nodeStatusReportFrequency`, helped distribute traffic and load from node status updates more evenly over time. The initial status update could occur up to 50% earlier or later than the regular schedule. ([#130919](https://github.com/kubernetes/kubernetes/pull/130919), [@mengqiy](https://github.com/mengqiy)) +- Added a flag to kubectl version to detect whether a client/server version mismatch was outside the officially supported range. ([#127365](https://github.com/kubernetes/kubernetes/pull/127365), [@omerap12](https://github.com/omerap12)) +- Added a new `PreBindPreFlight` function to the `PreBindPlugin` interface. All in-tree `PreBind` plugins have been updated to implement `PreBindPreFlight` function. ([#132391](https://github.com/kubernetes/kubernetes/pull/132391), [@sanposhiho](https://github.com/sanposhiho)) [SIG Node, Scheduling, Storage and Testing] +- Added a warning when alpha metrics are used with emulated versions. ([#132276](https://github.com/kubernetes/kubernetes/pull/132276), [@michaelasp](https://github.com/michaelasp)) [SIG API Machinery and Architecture] +- Added alpha metrics for compatibility versioning ([#131842](https://github.com/kubernetes/kubernetes/pull/131842), [@michaelasp](https://github.com/michaelasp)) [SIG API Machinery, Architecture, Instrumentation and Scheduling] +- Added configurable flags to kube-apiserver for coordinated leader election. ([#132433](https://github.com/kubernetes/kubernetes/pull/132433), [@michaelasp](https://github.com/michaelasp)) [SIG API Machinery and Testing] +- Added machine readable output options (JSON & YAML) to `kubectl api-resources`. ([#132604](https://github.com/kubernetes/kubernetes/pull/132604), [@dharmit](https://github.com/dharmit)) [SIG Apps, CLI and Network] +- Added memory tracking to scheduler performance tests to help detect memory leaks and monitored memory usage patterns while running `scheduler_perf`. ([#132910](https://github.com/kubernetes/kubernetes/pull/132910), [@utam0k](https://github.com/utam0k)) [SIG Scheduling and Testing] +- Added support for CEL expressions with escaped names in the structured authentication config. Using `[...]` to access claims or user data was recommended when names contained characters that would otherwise need escaping. CEL optionals with `?` could be used where has was not applicable — for example, `claims[?"kubernetes.io"]` or `user.extra[?"domain.io/foo"]`. ([#131574](https://github.com/kubernetes/kubernetes/pull/131574), [@enj](https://github.com/enj)) [SIG API Machinery and Auth] +- Added support for `--cpu`, `--memory` flag to `kubectl autoscale`, started deprecating `--cpu-precent`. ([#129373](https://github.com/kubernetes/kubernetes/pull/129373), [@googs1025](https://github.com/googs1025)) +- Added support for a new kubectl output format, `kyaml`. KYAML was a strict subset of YAML and should be accepted by any YAML processor. The formatting of KYAML was halfway between JSON and YAML. Because it was more explicit than the default YAML style, it was less error-prone. ([#132942](https://github.com/kubernetes/kubernetes/pull/132942), [@thockin](https://github.com/thockin)) [SIG API Machinery, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Contributor Experience, Instrumentation, Network, Node, Scheduling, Storage and Testing] +- Added the `DetectCacheInconsistency` feature gate, allowing the API server to periodically verify consistency between its `cache` and `etcd`. Detected inconsistencies reported via the `apiserver_storage_consistency_checks_total` metric and trigger purging of affected cache snapshots. ([#132884](https://github.com/kubernetes/kubernetes/pull/132884), [@serathius](https://github.com/serathius)) [SIG API Machinery, Instrumentation and Testing] +- Added the `SizeBasedListCostEstimate` feature gate (enabled by default), which changes how APF seats are assigned to `LIST` requests. With this feature, one seat is assigned per 100KB of data loaded into memory at once during a `LIST` operation. ([#132932](https://github.com/kubernetes/kubernetes/pull/132932), [@serathius](https://github.com/serathius)) +- Added useful endpoints for kube-apiserver. ([#132581](https://github.com/kubernetes/kubernetes/pull/132581), [@itssimrank](https://github.com/itssimrank)) [SIG API Machinery, Architecture, Instrumentation, Network, Node, Scheduling and Testing] +- Built Kubernetes using Go 1.24.3. ([#131934](https://github.com/kubernetes/kubernetes/pull/131934), [@cpanato](https://github.com/cpanato)) [SIG Release and Testing] +- Built Kubernetes using Go 1.24.4. ([#132222](https://github.com/kubernetes/kubernetes/pull/132222), [@cpanato](https://github.com/cpanato)) [SIG Release and Testing] +- Bumped DRA API version to `v1` in `deviceattribute` package in `k8s.io/dynamic-resource-allocation`. ([#133164](https://github.com/kubernetes/kubernetes/pull/133164), [@everpeace](https://github.com/everpeace)) +- Bumped `KubeletCgroupDriverFromCRI` to GA and add metric to track out-of-support CRI implementations. ([#133157](https://github.com/kubernetes/kubernetes/pull/133157), [@haircommander](https://github.com/haircommander)) [SIG Node and Testing] +- CRI API had auth fields in image pulling marked as `debug_redact`. ([#133135](https://github.com/kubernetes/kubernetes/pull/133135), [@SergeyKanzhelev](https://github.com/SergeyKanzhelev)) +- Changed handling of `CustomResourceDefinitions` with unrecognized formats. Writing a schema with an unrecognized format now triggered a warning (the write was still accepted). ([#133136](https://github.com/kubernetes/kubernetes/pull/133136), [@yongruilin](https://github.com/yongruilin)) +- DRA kubelet: Fixed the kubelet to also clean up `ResourceSlices` in some additional failure scenarios (driver was removed forcibly or crashed and did not restart). ([#132058](https://github.com/kubernetes/kubernetes/pull/132058), [@pohly](https://github.com/pohly)) [SIG Node and Testing] +- DRAAdminAccess was enabled by default allowing users to create `ResourceClaims` and `ResourceClaimTemplates` in privileged mode to grant access to devices that were in use by other users for admin tasks like monitoring health or status of the device. ([#133085](https://github.com/kubernetes/kubernetes/pull/133085), [@ritazh](https://github.com/ritazh)) [SIG Auth and Node] +- Demoted KEP-5278 feature gates `ClearingNominatedNodeNameAfterBinding` and `NominatedNodeNameForExpectation` to alpha from beta. ([#133293](https://github.com/kubernetes/kubernetes/pull/133293), [@utam0k](https://github.com/utam0k)) [SIG Scheduling and Testing] +- Deprecated `apiserver_storage_objects` and replaced it with `apiserver_resource_objects` metric using labels consistent with other metrics. ([#132965](https://github.com/kubernetes/kubernetes/pull/132965), [@serathius](https://github.com/serathius)) [SIG API Machinery, Etcd and Instrumentation] +- Eliminated work when creating Services or understanding port purposes, especially for external resources deployed via Helm charts. ([#133018](https://github.com/kubernetes/kubernetes/pull/133018), [@rushmash91](https://github.com/rushmash91)) +- Enabled compact snapshots in the watch cache based on `etcd` compaction events. ([#132876](https://github.com/kubernetes/kubernetes/pull/132876), [@serathius](https://github.com/serathius)) [SIG API Machinery and Etcd] +- Enabled completion for aliases defined in `kubectlrc`. ([#131586](https://github.com/kubernetes/kubernetes/pull/131586), [@ardaguclu](https://github.com/ardaguclu)) +- Ensured memory resizing for Guaranteed QoS pods on static Memory policy configurations was gated by `InPlacePodVerticalScalingExclusiveMemory` (defaults: `false`). ([#132473](https://github.com/kubernetes/kubernetes/pull/132473), [@pravk03](https://github.com/pravk03)) [SIG Node, Scheduling and Testing] +- Ensured that non-scheduling related errors (e.g., network errors) did not lengthen the Pod scheduling backoff time. ([#128748](https://github.com/kubernetes/kubernetes/pull/128748), [@sanposhiho](https://github.com/sanposhiho)) [SIG Scheduling and Testing] +- Executed API calls dispatched during pod scheduling asynchronously if the `SchedulerAsyncAPICalls` feature gate was enabled. + Out-of-tree plugins used `APIDispatcher` and `APICacher` from the framework to dispatch their own calls. ([#132886](https://github.com/kubernetes/kubernetes/pull/132886), [@macsko](https://github.com/macsko)) [SIG Release, Scheduling and Testing] +- Fixed recording the `kubelet_container_resize_requests_total` metric to include all resize-related updates. ([#133060](https://github.com/kubernetes/kubernetes/pull/133060), [@natasha41575](https://github.com/natasha41575)) +- Graduated `ListFromCacheSnapshot` to beta. ([#132901](https://github.com/kubernetes/kubernetes/pull/132901), [@serathius](https://github.com/serathius)) [SIG API Machinery and Etcd] +- Graduated `PodLevelResources` feature to beta and have it on by default. This feature allowed defining CPU and memory resources for an entire pod in `pod.spec.resources`. ([#132999](https://github.com/kubernetes/kubernetes/pull/132999), [@ndixita](https://github.com/ndixita)) +- Graduated `PodObservedGenerationTracking` feature to beta and had it on by default. This feature meant that the top level `status.observedGeneration` and `status.conditions[].observedGeneration` fields in Pods were populated to reflect the `metadata.generation` of the podspec at the time that the status or condition was reported. ([#132912](https://github.com/kubernetes/kubernetes/pull/132912), [@natasha41575](https://github.com/natasha41575)) [SIG Apps, Node and Testing] +- Graduated `ResilientWatchCacheInitialization` to GA. ([#131979](https://github.com/kubernetes/kubernetes/pull/131979), [@serathius](https://github.com/serathius)) +- Graduated `StreamingCollectionEncodingToJSON` and `StreamingCollectionEncodingToProtobuf` to GA. ([#132648](https://github.com/kubernetes/kubernetes/pull/132648), [@serathius](https://github.com/serathius)) +- Graduated configurable endpoints for anonymous authentication using the authentication configuration file to stable. ([#131654](https://github.com/kubernetes/kubernetes/pull/131654), [@vinayakankugoyal](https://github.com/vinayakankugoyal)) [SIG API Machinery and Testing] +- Graduated relaxed DNS search string validation to GA. For the Pod API, `.spec.dnsConfig.searches` + now allows an underscore (`_`) where a dash (`-`) would be allowed, and it allows search strings be a single dot `.`. ([#132036](https://github.com/kubernetes/kubernetes/pull/132036), [@adrianmoisey](https://github.com/adrianmoisey)) [SIG Network and Testing] +- Graduated scheduler `QueueingHint` support to GA (general availability) ([#131973](https://github.com/kubernetes/kubernetes/pull/131973), [@sanposhiho](https://github.com/sanposhiho)) [SIG Scheduling and Testing] +- Graduated the WinOverlay feature in the kube-proxy to GA. The **WinOverlay** feature gate was enabled by default. ([#133042](https://github.com/kubernetes/kubernetes/pull/133042), [@rzlink](https://github.com/rzlink)) [SIG Network and Windows] +- Graduated the `ConsistentListFromCache` to GA. ([#132645](https://github.com/kubernetes/kubernetes/pull/132645), [@serathius](https://github.com/serathius)) +- Graduated the `WatchList` feature gate to beta for kube-apiserver and enabled `WatchListClient` for KCM. ([#132704](https://github.com/kubernetes/kubernetes/pull/132704), [@p0lyn0mial](https://github.com/p0lyn0mial)) [SIG API Machinery and Testing] +- Graduated the `WinDSR` feature in the kube-proxy to GA. The `WinDSR` feature gate was enabled by default. ([#132108](https://github.com/kubernetes/kubernetes/pull/132108), [@rzlink](https://github.com/rzlink)) [SIG Network and Windows] +- If `PreBindPreFlight` returned `Skip`, the scheduler didn't run the plugin at `PreBind`. + If any `PreBindPreFlight` returned `Success`, the scheduler put NominatedNodeName to the pod + so that other components (such as the cluster autoscaler) could notice the pod was going to be bound to the node. ([#133021](https://github.com/kubernetes/kubernetes/pull/133021), [@sanposhiho](https://github.com/sanposhiho)) [SIG Scheduling and Testing] +- Implemented prioritization of resize requests based on `priorityClass` and QoS class when node resources are insufficient to accommodate all pending resize operations. ([#132342](https://github.com/kubernetes/kubernetes/pull/132342), [@natasha41575](https://github.com/natasha41575)) [SIG Node and Testing] +- Included the namespace in the output of `kubectl delete` for better identification of resources. ([#126619](https://github.com/kubernetes/kubernetes/pull/126619), [@totegamma](https://github.com/totegamma)) +- Increased APF max seats to 100 for LIST requests. ([#133034](https://github.com/kubernetes/kubernetes/pull/133034), [@serathius](https://github.com/serathius)) +- Introduced a method `GetPCIeRootAttributeByPCIBusID(pciBusID)` for third-party DRA drivers to provide common logic for the standardized device attribute `resource.kubernetes.io/pcieRoot`. ([#132296](https://github.com/kubernetes/kubernetes/pull/132296), [@everpeace](https://github.com/everpeace)) +- Kube-apiserver reported the last configuration hash as a label in + + - `apiserver_authentication_config_controller_last_config_info` metric after successfully loading the authentication configuration file. + - `apiserver_authorization_config_controller_last_config_info` metric after successfully loading the authorization configuration file. + - `apiserver_encryption_config_controller_last_config_info` metric after successfully loading the encryption configuration file. ([#132299](https://github.com/kubernetes/kubernetes/pull/132299), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth and Testing] +- Kube-apiserver: Each unique set of etcd server overrides specified with `--etcd-servers-overrides` surfaced health checks named `etcd-override-` and `etcd-override-readiness-`. These checks were still excluded by the `?exclude=etcd` and `?exclude=etcd-readiness` directives. ([#129438](https://github.com/kubernetes/kubernetes/pull/129438), [@pacoxu](https://github.com/pacoxu)) [SIG API Machinery and Testing] +- Kube-apiserver: Previously persisted `CustomResourceDefinition` objects with an invalid whitespace-only `caBundle` could serve requests that did not require conversion. ([#132514](https://github.com/kubernetes/kubernetes/pull/132514), [@tiffanny29631](https://github.com/tiffanny29631)) +- Kube-apiserver: Promoted the `ExternalServiceAccountTokenSigner` feature to beta, which enabled external signing of service account tokens and fetching of public verifying keys. This was accomplished by enabling the beta `ExternalServiceAccountTokenSigner` feature gate and specifying the `--service-account-signing-endpoint` flag. The flag value could either be the path to a Unix domain socket on the filesystem, or be prefixed with @ to indicate a Unix domain socket in the abstract namespace. ([#131300](https://github.com/kubernetes/kubernetes/pull/131300), [@HarshalNeelkamal](https://github.com/HarshalNeelkamal)) [SIG API Machinery, Auth and Testing] +- Kube-proxy: Checked whether IPv6 was available on Linux before using it. ([#131265](https://github.com/kubernetes/kubernetes/pull/131265), [@rikatz](https://github.com/rikatz)) +- Kubeadm: Added support for ECDSA-P384 as an encryption algorithm type in v1beta4. ([#131677](https://github.com/kubernetes/kubernetes/pull/131677), [@lalitc375](https://github.com/lalitc375)) +- Kubeadm: Fixed an issue where etcd member promotion failed with an error indicating the member was already promoted. ([#130782](https://github.com/kubernetes/kubernetes/pull/130782), [@BernardMC](https://github.com/BernardMC)) +- Kubeadm: graduated the `NodeLocalCRISocket` feature gate to beta and enabed it by default. When its enabled, kubeadm will: + 1. Generate a `/var/lib/kubelet/instance-config.yaml` file to customize the `containerRuntimeEndpoint` field in per-node kubelet configurations. + 2. Remove the `kubeadm.alpha.kubernetes.io/cri-socket` annotation from nodes during upgrade operations. + 3. Remove the `--container-runtime-endpoint` flag from the `/var/lib/kubelet/kubeadm-flags.env` file during upgrades. ([#131981](https://github.com/kubernetes/kubernetes/pull/131981), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG Cluster Lifecycle] +- Kubeadm: graduated the kubeadm specific feature gate `WaitForAllControlPlaneComponents` to GA. The feature gate is was locked to always be enabled and on node initialization kubeadm performed a health check for all control plane components and not only the `kube-apiserver`. ([#132594](https://github.com/kubernetes/kubernetes/pull/132594), [@neolit123](https://github.com/neolit123)) +- Kubeadm: switched the validation check for Linux kernel version to throw warnings instead of errors. ([#131919](https://github.com/kubernetes/kubernetes/pull/131919), [@neolit123](https://github.com/neolit123)) [SIG Cluster Lifecycle and Node] +- Kubelet detected terminal CSI volume mount failures due to exceeded attachment limits on the node and marked the Stateful Pod as Failed, allowing its controller to recreate it. This prevented Pods from getting stuck indefinitely in the `ContainerCreating` state. ([#132933](https://github.com/kubernetes/kubernetes/pull/132933), [@torredil](https://github.com/torredil)) [SIG Apps, Node, Storage and Testing] +- Kubelet reported a hash of the credential provider configuration via the `kubelet_credential_provider_config_info` metric. The hash was exposed in the `hash` label. ([#133016](https://github.com/kubernetes/kubernetes/pull/133016), [@aramase](https://github.com/aramase)) [SIG API Machinery and Auth] +- Kubelet: Extended the `--image-credential-provider-config` flag to accept a directory path in addition to a single file. When a directory was specified, all .json, .yaml, and .yml files in that directory were loaded and merged in lexicographical order. ([#131658](https://github.com/kubernetes/kubernetes/pull/131658), [@dims](https://github.com/dims)) [SIG Auth and Node] +- LeaseLocks could now have custom labels that different holders would overwrite when they became the holder of the underlying lease. ([#131632](https://github.com/kubernetes/kubernetes/pull/131632), [@DerekFrank](https://github.com/DerekFrank)) +- Memory limits could be decreased with a `NotRequired` resize restart policy. When decreasing memory limits,a best-effort check was performed to prevent limits from decreasing below usage and triggering an OOM-kill. ([#133012](https://github.com/kubernetes/kubernetes/pull/133012), [@tallclair](https://github.com/tallclair)) [SIG Apps, Node and Testing] +- Migrated validation in `CertificateSigningRequest` to use declarative validation. When the `DeclarativeValidation` feature gate is enabled, mismatches with existing validation are reported via metrics. If `DeclarativeValidationTakeover` is enabled, declarative validation becomes the primary source of errors for migrated fields. ([#132361](https://github.com/kubernetes/kubernetes/pull/132361), [@yongruilin](https://github.com/yongruilin)) [SIG API Machinery and Auth] +- Moved Recover from volume expansion failure to GA. ([#132662](https://github.com/kubernetes/kubernetes/pull/132662), [@gnufied](https://github.com/gnufied)) [SIG Apps, Auth, Node, Storage and Testing] +- Prevented any type of CPU/Memory alignment or hint generation with the Topology Manager from the CPU or Memory Manager when pod-level resources were used in the Pod spec. ([#133279](https://github.com/kubernetes/kubernetes/pull/133279), [@ffromani](https://github.com/ffromani)) [SIG Node and Testing] +- Promoted Linux node pressure stall information (PSI) metrics to beta. ([#132822](https://github.com/kubernetes/kubernetes/pull/132822), [@roycaihw](https://github.com/roycaihw)) [SIG Node] +- Promoted Windows graceful shutdown feature from alpha to beta. ([#133062](https://github.com/kubernetes/kubernetes/pull/133062), [@zylxjtu](https://github.com/zylxjtu)) +- Promoted the Ordered Namespace Deletion test to Conformance. ([#132219](https://github.com/kubernetes/kubernetes/pull/132219), [@BenTheElder](https://github.com/BenTheElder)) [SIG API Machinery, Architecture and Testing] +- Promoted the `KubeletPodResourcesDynamicResources` and `KubeletPodResourcesGet` feature gates to beta, which were enabled by default if DRA went to GA. ([#132940](https://github.com/kubernetes/kubernetes/pull/132940), [@guptaNswati](https://github.com/guptaNswati)) +- Promoted the feature `OrderedNamespaceDeletion` to GA. ([#131514](https://github.com/kubernetes/kubernetes/pull/131514), [@cici37](https://github.com/cici37)) [SIG API Machinery and Testing] +- Removed "endpoint-controller" and "workload-leader-election" FlowSchemas from the default APF configuration. + + migrate the lock type used in the leader election in your workloads from configmapsleases/endpointsleases to leases. ([#131215](https://github.com/kubernetes/kubernetes/pull/131215), [@tosi3k](https://github.com/tosi3k)) [SIG API Machinery, Apps, Network, Scalability and Scheduling] +- Started recording metrics for in-place Pod resize. ([#132903](https://github.com/kubernetes/kubernetes/pull/132903), [@natasha41575](https://github.com/natasha41575)) +- The Kubernetes API server merged selectors built from `matchLabelKeys` into the `labelSelector` of `topologySpreadConstraints`, aligning Pod Topology Spread behavior with Inter-Pod Affinity. To prevent breaking existing Pods using `matchLabelKeys`, this scheduler behavior was preserved until v1.34. Upgrades from v1.32 to v1.34 should be done incrementally (v1.32 → v1.33 → v1.34), ensuring Pods created at v1.32 with `matchLabelKeys` are scheduled before reaching v1.34. Controllers relying on `matchLabelKeys` no longer need to handle them directly and can use `labelSelector` instead. The new feature gate `MatchLabelKeysInPodTopologySpreadSelectorMerge`, enabled by default, controls this behavior. ([#129874](https://github.com/kubernetes/kubernetes/pull/129874), [@mochizuki875](https://github.com/mochizuki875)) [SIG Apps, Node, Scheduling and Testing] +- The PreferSameTrafficDistribution feature gate is now enabled by default, + enabling the `PreferSameNode` traffic distribution value for Services. ([#132127](https://github.com/kubernetes/kubernetes/pull/132127), [@danwinship](https://github.com/danwinship)) [SIG Apps and Network] +- The new `dra_resource_claims_in_use` kubelet metrics reported active `ResourceClaims`, overall and by driver. ([#131641](https://github.com/kubernetes/kubernetes/pull/131641), [@pohly](https://github.com/pohly)) [SIG Architecture, Instrumentation, Node and Testing] +- The scheduler no longer cleared the `nominatedNodeName` field for Pods. External components, such as Cluster Autoscaler and Karpenter, were responsible for managing this field when needed. ([#133276](https://github.com/kubernetes/kubernetes/pull/133276), [@macsko](https://github.com/macsko)) [SIG Scheduling and Testing] +- The validation in the CertificateSigningRequest `/status` and `/approval` subresources was migrated to declarative validation. + If the `DeclarativeValidation` feature gate was enabled, mismatches with existing validation are reported via metrics. + If the `DeclarativeValidationTakeover` feature gate was enabled, declarative validation was the primary source of errors for migrated fields. ([#133068](https://github.com/kubernetes/kubernetes/pull/133068), [@yongruilin](https://github.com/yongruilin)) [SIG API Machinery and Auth] +- Updated `kube-controller-manager` events to support contextual logging. ([#128351](https://github.com/kubernetes/kubernetes/pull/128351), [@mengjiao-liu](https://github.com/mengjiao-liu)) +- Updated pause version to `registry.k8s.io/pause:3.10.1`. ([#130713](https://github.com/kubernetes/kubernetes/pull/130713), [@ArkaSaha30](https://github.com/ArkaSaha30)) [SIG Cluster Lifecycle, Node, Scheduling and Testing] +- Updated the Kubernetes build environment to use Go `1.24.5`. ([#132896](https://github.com/kubernetes/kubernetes/pull/132896), [@cpanato](https://github.com/cpanato)) [SIG Release and Testing] +- Updated the built in `system:monitoring` role with permission to access kubelet metrics endpoints. ([#132178](https://github.com/kubernetes/kubernetes/pull/132178), [@gavinkflam](https://github.com/gavinkflam)) [SIG Auth] +- When `RelaxedServiceNameValidation` feature gate is enabled, the + names of new Services names are validation with `NameIsDNSLabel()`, + relaxing the pre-existing validation. ([#132339](https://github.com/kubernetes/kubernetes/pull/132339), [@adrianmoisey](https://github.com/adrianmoisey)) [SIG Apps, Network and Testing] +- When proxying to an aggregated API server, kube-apiserver used the + `EndpointSlices` of the `service` indicated by the `APIServer`, rather than + using Endpoints. + + If you were using the aggregated API server feature, and you were writing out + the endpoints for it by hand (rather than letting kube-controller-manager + generate `Endpoints` and `EndpointSlices` for it automatically based on the + Service definition), then you should write out an EndpointSlice object rather + than (or in addition to) an `Endpoints` object. ([#129837](https://github.com/kubernetes/kubernetes/pull/129837), [@danwinship](https://github.com/danwinship)) [SIG API Machinery, Network and Testing] +- Whenever a pod was successfully bound to a node, the kube-apiserver cleared the pod's `nominatedNodeName` field. This prevented stale information from affecting external scheduling components. ([#132443](https://github.com/kubernetes/kubernetes/pull/132443), [@utam0k](https://github.com/utam0k)) [SIG Apps, Node, Scheduling and Testing] +- `DRAPrioritizedList` was turned on by default which made it possible to provide a prioritized list of subrequests in a `ResourceClaim`. ([#132767](https://github.com/kubernetes/kubernetes/pull/132767), [@mortent](https://github.com/mortent)) [SIG Node, Scheduling and Testing] +- `PodLifecycleSleepAction` was graduated to GA. ([#132595](https://github.com/kubernetes/kubernetes/pull/132595), [@AxeZhan](https://github.com/AxeZhan)) [SIG Apps, Node and Testing] +- `kube-controller-manager` reported the following metrics for `ResourceClaims` with admin access: + - `resourceclaim_controller_creates_total` count metric with labels `admin_access` (true or false), `status` (failure or success) to track the total number of `ResourceClaims` creation requests + - `resourceclaim_controller_resource_claims` gauge metric with labels `admin_access` (true or false), `allocated` (true or false) to track the current number of `ResourceClaims`. ([#132800](https://github.com/kubernetes/kubernetes/pull/132800), [@ritazh](https://github.com/ritazh)) [SIG Apps, Auth, Instrumentation and Node] +- `kubeadm`: Started using a named port `probe-port` for all probes in the static pod manifests generated by `kubeadm` for the `kube-apiserver`, `kube-controller-manager`, `kube-scheduler`, and related components. If probe port values were previously patched using `kubeadm` patches, the corresponding named port under the container’s `ports` field must now also be patched. ([#132776](https://github.com/kubernetes/kubernetes/pull/132776), [@neolit123](https://github.com/neolit123)) + +### Failing Test + +- DRA driver helper: Fixed handling of apiserver restart when running on a Kubernetes version which did not support the `resource.k8s.io` version used by the DRA driver. ([#133076](https://github.com/kubernetes/kubernetes/pull/133076), [@pohly](https://github.com/pohly)) [SIG Node and Testing] +- Fixed e2e test "[Driver: csi-hostpath] [Testpattern: Dynamic PV (filesystem volmode)] volumeLimits should support volume limits" not to leak Pods and namespaces. ([#132674](https://github.com/kubernetes/kubernetes/pull/132674), [@jsafrane](https://github.com/jsafrane)) [SIG Storage and Testing] +- Kube-apiserver: The --service-account-signing-endpoint flag now only validates the format of abstract socket names ([#131509](https://github.com/kubernetes/kubernetes/pull/131509), [@liggitt](https://github.com/liggitt)) [SIG API Machinery and Auth] + +### Bug or Regression + +- Added `podSpec` validation for creating `StatefulSet`. ([#131790](https://github.com/kubernetes/kubernetes/pull/131790), [@chengjoey](https://github.com/chengjoey)) [SIG Apps, Etcd and Testing] +- Checked for newer resize fields when deciding the recovery feature status in the kubelet. ([#131418](https://github.com/kubernetes/kubernetes/pull/131418), [@gnufied](https://github.com/gnufied)) +- Clarified help message of `--ignore-not-found` flag. Supported `--ignore-not-found` in `watch` operation. ([#132542](https://github.com/kubernetes/kubernetes/pull/132542), [@gemmahou](https://github.com/gemmahou)) +- DRA drivers: the resource slice controller sometimes didn't react properly when kubelet or someone else deleted a recently created ResourceSlice. It incorrectly assumed that the ResourceSlice still exists and didn't recreate it. ([#132683](https://github.com/kubernetes/kubernetes/pull/132683), [@pohly](https://github.com/pohly)) [SIG Apps, Node and Testing] +- DRA: Ensured that ResourceClaims requesting a fixed number of devices with `adminAccess` were no longer allocated the same device multiple times. ([#131299](https://github.com/kubernetes/kubernetes/pull/131299), [@nojnhuh](https://github.com/nojnhuh)) +- Disabled reading of disk geometry before calling expansion for ext and xfs filesystems. ([#131568](https://github.com/kubernetes/kubernetes/pull/131568), [@gnufied](https://github.com/gnufied)) +- Ensured objects are transformed prior to storage in `SharedInformers` if a transformer is provided and `WatchList` is activated. ([#131799](https://github.com/kubernetes/kubernetes/pull/131799), [@valerian-roche](https://github.com/valerian-roche)) +- Fixed API response for `StorageClassList` queries to return a graceful error message, if the provided `ResourceVersion` is too large. ([#132374](https://github.com/kubernetes/kubernetes/pull/132374), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery and Etcd] +- Fixed ReplicationController reconciliation when the `DeploymentReplicaSetTerminatingReplicas` feature gate was enabled. ([#131822](https://github.com/kubernetes/kubernetes/pull/131822), [@atiratree](https://github.com/atiratree)) +- Fixed a bug in CEL's common.UnstructuredToVal where `==` evaluates to false for identical objects when a field is present but the value is null. This bug does not impact the Kubernetes API. ([#131559](https://github.com/kubernetes/kubernetes/pull/131559), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery] +- Fixed a bug in the Job controller that could result in creating unnecessary Pods for Jobs already marked as finished (either successful or failed). ([#130333](https://github.com/kubernetes/kubernetes/pull/130333), [@kmala](https://github.com/kmala)) [SIG Apps and Testing] +- Fixed a bug that caused an unexpected delay in creating Pods for newly created Jobs. ([#132109](https://github.com/kubernetes/kubernetes/pull/132109), [@linxiulei](https://github.com/linxiulei)) [SIG Apps and Testing] +- Fixed a bug that caused duplicate validation when updating a ReplicaSet. ([#131873](https://github.com/kubernetes/kubernetes/pull/131873), [@gavinkflam](https://github.com/gavinkflam)) [SIG Apps] +- Fixed a bug that fails to create a replica set when a deployment name is too long. ([#132560](https://github.com/kubernetes/kubernetes/pull/132560), [@hdp617](https://github.com/hdp617)) [SIG API Machinery and Apps] +- Fixed a bug that the async preemption feature keeps preemptor pods unnecessarily in the queue. ([#133167](https://github.com/kubernetes/kubernetes/pull/133167), [@sanposhiho](https://github.com/sanposhiho)) [SIG Scheduling] +- Fixed a panic issue related to kubectl revision history kubernetes/kubectl#1724 ([#130503](https://github.com/kubernetes/kubernetes/pull/130503), [@tahacodes](https://github.com/tahacodes)) [SIG CLI] +- Fixed a possible deadlock in the watch client that could happen if the watch was not stopped. ([#131266](https://github.com/kubernetes/kubernetes/pull/131266), [@karlkfi](https://github.com/karlkfi)) [SIG API Machinery] +- Fixed a regression introduced in 1.33 where some paginated LIST calls fell back to `etcd` instead of being served from cache. ([#132244](https://github.com/kubernetes/kubernetes/pull/132244), [@hakuna-matatah](https://github.com/hakuna-matatah)) +- Fixed an incorrect reference to `JoinConfigurationKind` in the error message when no ResetConfiguration is found during `kubeadm reset` with the `--config` flag. ([#132258](https://github.com/kubernetes/kubernetes/pull/132258), [@J3m3](https://github.com/J3m3)) [SIG Cluster Lifecycle] +- Fixed an issue that allowed Custom Resources to be created using Server-Side Apply even when their `CustomResourceDefinition` was terminating. ([#132467](https://github.com/kubernetes/kubernetes/pull/132467), [@sdowell](https://github.com/sdowell)) +- Fixed an issue where Windows kube-proxy’s `ModifyLoadBalancer` API updates did not match the HNS state in version 15.4. Support for `ModifyLoadBalancer` policy began with Kubernetes 1.31+. ([#131506](https://github.com/kubernetes/kubernetes/pull/131506), [@princepereira](https://github.com/princepereira)) +- Fixed an issue where `insufficientResources` was logged as a pointer during pod preemption, making logs more readable. ([#132183](https://github.com/kubernetes/kubernetes/pull/132183), [@chrisy-x](https://github.com/chrisy-x)) [SIG Node] +- Fixed an issue where the kubelet token cache returned stale tokens when service accounts were recreated with the same name. The cache is now UID-aware. Additionally, the new `TokenRequestServiceAccountUIDValidation` feature gate (Beta, enabled by default) ensures the `TokenRequest` UID matches the service account UID when set. ([#132803](https://github.com/kubernetes/kubernetes/pull/132803), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth, Node and Testing] +- Fixed bug that prevented the alpha feature `PodTopologyLabelAdmission` from working due to checking for the incorrect label key when copying topology labels. This bug delayed the graduation of the feature to beta by an additional release to allow time for meaningful feedback. ([#132462](https://github.com/kubernetes/kubernetes/pull/132462), [@munnerz](https://github.com/munnerz)) +- Fixed incorrect behavior for AllocationMode: All in ResourceClaim when used in subrequests. ([#131660](https://github.com/kubernetes/kubernetes/pull/131660), [@mortent](https://github.com/mortent)) [SIG Node] +- Fixed misleading response codes in admission control metrics. ([#132165](https://github.com/kubernetes/kubernetes/pull/132165), [@gavinkflam](https://github.com/gavinkflam)) [SIG API Machinery, Architecture and Instrumentation] +- Fixed runtime cost estimation for `x-int-or-string` custom resource schemas with maximum lengths. ([#132837](https://github.com/kubernetes/kubernetes/pull/132837), [@JoelSpeed](https://github.com/JoelSpeed)) +- Fixed the `allocatedResourceStatuses` field name mismatch in PVC status validation. ([#131213](https://github.com/kubernetes/kubernetes/pull/131213), [@carlory](https://github.com/carlory)) +- Fixed the `observedGeneration` field in pod resize conditions to accurately reflect the associated pod generation when both `InPlacePodVerticalScaling` and `PodObservedGenerationTracking` feature gates are enabled. ([#131157](https://github.com/kubernetes/kubernetes/pull/131157), [@natasha41575](https://github.com/natasha41575)) +- Fixed the bug when swap related metrics were not available in `/metrics/resource` endpoint. ([#132065](https://github.com/kubernetes/kubernetes/pull/132065), [@yuanwang04](https://github.com/yuanwang04)) [SIG Node and Testing] +- Fixed the problem of validation error when specifying resource requirements at the container level for a resource not supported at the pod level. It implicitly interpreted the pod-level value as 0. ([#132551](https://github.com/kubernetes/kubernetes/pull/132551), [@chao-liang](https://github.com/chao-liang)) [SIG Apps] +- Fixed validation for Job with `suspend=true`, and `completions=0` to set the Complete condition. ([#132614](https://github.com/kubernetes/kubernetes/pull/132614), [@mimowo](https://github.com/mimowo)) [SIG Apps and Testing] +- HPA status displayed memory metrics using Ki. ([#132351](https://github.com/kubernetes/kubernetes/pull/132351), [@googs1025](https://github.com/googs1025)) [SIG Apps and Autoscaling] +- Improved the error message shown when a Pod using user namespaces was created on a runtime that did not support user namespaces. ([#131623](https://github.com/kubernetes/kubernetes/pull/131623), [@rata](https://github.com/rata)) +- Kube-apiserver: Defaulted empty `spec.jobTemplate.spec.podFailurePolicy.rules[*].onPodConditions[*].status` fields for CronJob objects as documented, avoiding validation failures during write requests. ([#131525](https://github.com/kubernetes/kubernetes/pull/131525), [@carlory](https://github.com/carlory)) +- Kube-apiserver: Fixed OIDC discovery document publishing when external service account token signing was enabled. ([#131493](https://github.com/kubernetes/kubernetes/pull/131493), [@hoskeri](https://github.com/hoskeri)) [SIG API Machinery, Auth and Testing] +- Kube-proxy: Removed the iptables CLI wait interval flag. ([#131961](https://github.com/kubernetes/kubernetes/pull/131961), [@cyclinder](https://github.com/cyclinder)) +- Kube-scheduler: in Kubernetes 1.33, the number of devices that can be allocated per ResourceClaim was accidentally reduced to 16. Now the supported number of devices per ResourceClaim is 32 again. ([#131662](https://github.com/kubernetes/kubernetes/pull/131662), [@mortent](https://github.com/mortent)) [SIG Node] +- Kubeadm: Fixed a bug where the default args for etcd were not correct when a local etcd image was used and the etcd version was less than 3.6.0. ([#133023](https://github.com/kubernetes/kubernetes/pull/133023), [@carlory](https://github.com/carlory)) +- Kubelet: Closed a loophole that allowed static Pods to reference arbitrary ResourceClaims. Even though these Pods failed to run due to a sanity check, such references are now explicitly disallowed. ([#131844](https://github.com/kubernetes/kubernetes/pull/131844), [@pohly](https://github.com/pohly)) [SIG Apps, Auth and Node] +- Kubelet: Fixed a bug that caused an unexpected `NodeResizeError` condition to appear in the PVC status when the CSI driver did not support node volume expansion and the PVC had the `ReadWriteMany` access mode. ([#131495](https://github.com/kubernetes/kubernetes/pull/131495), [@carlory](https://github.com/carlory)) +- Modified the node-local `podresources` API endpoint to consider only active pods. Since this changes long-standing behavior, the `KubeletPodResourcesListUseActivePods` feature gate (enabled by default) can be disabled to restore the previous behavior. Users encountering regressions are encouraged to file an issue if they rely on the old behavior. ([#132028](https://github.com/kubernetes/kubernetes/pull/132028), [@ffromani](https://github.com/ffromani)) [SIG Node and Testing] +- Pods were not allowed to mix the usage of `user-namespaces` (`hostUsers: false`) and `volumeDevices`. Kubernetes returned an error in this case. ([#132868](https://github.com/kubernetes/kubernetes/pull/132868), [@rata](https://github.com/rata)) +- Reduced the 5s delay before tainting `node.kubernetes.io/unreachable:NoExecute` when a Node became unreachable. ([#120816](https://github.com/kubernetes/kubernetes/pull/120816), [@tnqn](https://github.com/tnqn)) [SIG Apps and Node] +- Removed defunct `make vet` target, please use `make lint` instead ([#132509](https://github.com/kubernetes/kubernetes/pull/132509), [@yongruilin](https://github.com/yongruilin)) [SIG Testing] +- Removed the deprecated flag `--wait-interval` for the `ip6tables-legacy-restore` binary. ([#132352](https://github.com/kubernetes/kubernetes/pull/132352), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- ReplicaSets and Deployments should always count `.status.availableReplicas` at the correct time without a delay. This results in faster reconciliation of Deployment conditions and faster, unblocked Deployment rollouts. ([#132121](https://github.com/kubernetes/kubernetes/pull/132121), [@atiratree](https://github.com/atiratree)) [SIG Apps] +- Resolved a bug where DaemonSet updates unnecessarily triggered duplicate validation due to overlapping calls to `ValidateDaemonSet` and ValidateDaemonSetUpdate. This redundancy has been removed to prevent repeated validation runs. ([#132548](https://github.com/kubernetes/kubernetes/pull/132548), [@gavinkflam](https://github.com/gavinkflam)) +- Skipped pod backoff entirely when the `PodMaxBackoffDuration` kube-scheduler option was set to zero and the `SchedulerPopFromBackoffQ` feature gate was enabled. ([#131965](https://github.com/kubernetes/kubernetes/pull/131965), [@macsko](https://github.com/macsko)) +- Stopped expanding PVCs annotated with node-expand-not-required. ([#131907](https://github.com/kubernetes/kubernetes/pull/131907), [@gnufied](https://github.com/gnufied)) [SIG API Machinery, Etcd, Node, Storage and Testing] +- Stopped expanding the volume on the node if controller-side expansion was already completed. ([#131868](https://github.com/kubernetes/kubernetes/pull/131868), [@gnufied](https://github.com/gnufied)) +- Stopped logging error events when waiting for expansion on the kubelet. ([#131408](https://github.com/kubernetes/kubernetes/pull/131408), [@gnufied](https://github.com/gnufied)) +- Stopped removing the CSI JSON file if the volume was already mounted during subsequent errors. ([#131311](https://github.com/kubernetes/kubernetes/pull/131311), [@gnufied](https://github.com/gnufied)) +- The `baseline` and `restricted` pod security admission levels blocked setting the `host` field on probe and lifecycle handlers. ([#125271](https://github.com/kubernetes/kubernetes/pull/125271), [@tssurya](https://github.com/tssurya)) [SIG Auth, Node and Testing] +- The garbage collection controller no longer raced with changes to `ownerReferences` when deleting orphaned objects. ([#132632](https://github.com/kubernetes/kubernetes/pull/132632), [@sdowell](https://github.com/sdowell)) [SIG API Machinery and Apps] +- The shorthand for --output flag in kubectl explain was accidentally deleted, but has been added back. ([#131962](https://github.com/kubernetes/kubernetes/pull/131962), [@superbrothers](https://github.com/superbrothers)) [SIG CLI] +- Updated Windows `kube-proxy` to align with Linux behavior by correctly honoring the port specified in `EndpointSlice` for internal traffic routing. ([#132647](https://github.com/kubernetes/kubernetes/pull/132647), [@princepereira](https://github.com/princepereira)) [SIG Network and Windows] +- Updated `kube-proxy` with `nftables` to reject or drop traffic to services with no endpoints from filter chains at priority 0 (`NF_IP_PRI_FILTER`). ([#132456](https://github.com/kubernetes/kubernetes/pull/132456), [@aroradaman](https://github.com/aroradaman)) +- Updated `kubectl get job` to display the `SuccessCriteriaMet` status for listed jobs. ([#132832](https://github.com/kubernetes/kubernetes/pull/132832), [@Goend](https://github.com/Goend)) [SIG Apps and CLI] +- Updated the HPA controller so that it no longer emitted a `FailedRescale` event if a scale operation initially failed due to a conflict but succeeded after a retry; it now emitted a `SuccessfulRescale` event in this case. A `FailedRescale` event was still emitted if all retries were exhausted. ([#132007](https://github.com/kubernetes/kubernetes/pull/132007), [@AumPatel1](https://github.com/AumPatel1)) [SIG Apps and Autoscaling] +- `Statefulset` respected `minReadySeconds`. ([#130909](https://github.com/kubernetes/kubernetes/pull/130909), [@Edwinhr716](https://github.com/Edwinhr716)) +- `kubectl create|delete|get|replace --raw` commands now honored the server root paths specified in the kubeconfig file. ([#131165](https://github.com/kubernetes/kubernetes/pull/131165), [@liggitt](https://github.com/liggitt)) + +### Other (Cleanup or Flake) + +- Added a warning to `kubectl attach`, notifying / reminding users that commands and output are available via the `log` subresource of that Pod. ([#127183](https://github.com/kubernetes/kubernetes/pull/127183), [@mochizuki875](https://github.com/mochizuki875)) [SIG Auth, CLI, Node and Security] +- Added support for encoding and decoding types that implement the standard library interfaces `json.Marshaler`, `json.Unmarshaler`, `encoding.TextMarshaler`, or `encoding.TextUnmarshaler` to and from CBOR by transcoding. ([#132935](https://github.com/kubernetes/kubernetes/pull/132935), [@benluddy](https://github.com/benluddy)) +- Bumped kube-dns to v1.26.4. ([#132012](https://github.com/kubernetes/kubernetes/pull/132012), [@pacoxu](https://github.com/pacoxu)) +- Bumped the cel-go dependency to v0.25.0. The changeset is available at: https://github.com/google/cel-go/compare/v0.23.2...v0.25.0. ([#131444](https://github.com/kubernetes/kubernetes/pull/131444), [@erdii](https://github.com/erdii)) [SIG API Machinery, Auth, Cloud Provider and Node] +- By default, binaries like kube-apiserver were built with the `grpcnotrace` tag enabled. Used the `DBG` flag to enable Golang tracing if needed. ([#132210](https://github.com/kubernetes/kubernetes/pull/132210), [@dims](https://github.com/dims)) +- Changed Job controller to use the controller UID index for Pod lookups to improve performance. ([#132305](https://github.com/kubernetes/kubernetes/pull/132305), [@xigang](https://github.com/xigang)) +- Changed apiserver to treat failures decoding a mutating webhook patch as failures to call the webhook so they trigger the webhook failurePolicy and count against metrics like `webhook_fail_open_count` ([#131627](https://github.com/kubernetes/kubernetes/pull/131627), [@dims](https://github.com/dims)) [SIG API Machinery] +- Crane digest gcr.io/k8s-staging-e2e-test-images/agnhost:2.56 ([#132117](https://github.com/kubernetes/kubernetes/pull/132117), [@yashsingh74](https://github.com/yashsingh74)) [SIG Network and Testing] +- DRA kubelet- Updated logging to use `driverName` instead of `pluginName`, aligning with the rest of the Kubernetes components. ([#132096](https://github.com/kubernetes/kubernetes/pull/132096), [@pohly](https://github.com/pohly)) [SIG Node and Testing] +- DRA kubelet: Simplified recovery from mistakes like scheduling a Pod onto a node where the required driver was not running, as the kubelet no longer unnecessarily blocked Pod deletion. ([#131968](https://github.com/kubernetes/kubernetes/pull/131968), [@pohly](https://github.com/pohly)) [SIG Node and Testing] +- Fixed some missing white spaces in the flag descriptions and logs. ([#131562](https://github.com/kubernetes/kubernetes/pull/131562), [@logica0419](https://github.com/logica0419)) [SIG Network] +- Hack/update-codegen.sh now automatically ensured goimports and protoc. ([#131459](https://github.com/kubernetes/kubernetes/pull/131459), [@BenTheElder](https://github.com/BenTheElder)) +- Increased test coverage for kubelet package to 92.3%. ([#132484](https://github.com/kubernetes/kubernetes/pull/132484), [@ylink-lfs](https://github.com/ylink-lfs)) +- Kube-apiserver: removed the deprecated `apiserver_encryption_config_controller_automatic_reload_success_total` and `apiserver_encryption_config_controller_automatic_reload_failure_total` metrics in favor of `apiserver_encryption_config_controller_automatic_reloads_total`. ([#132238](https://github.com/kubernetes/kubernetes/pull/132238), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth and Testing] +- Kube-scheduler: removed the deprecated scheduler_scheduler_cache_size metric in favor of scheduler_cache_size ([#131425](https://github.com/kubernetes/kubernetes/pull/131425), [@carlory](https://github.com/carlory)) [SIG Scheduling] +- Kubeadm: fixed missing space when printing the warning about pause image mismatch. ([#131563](https://github.com/kubernetes/kubernetes/pull/131563), [@logica0419](https://github.com/logica0419)) [SIG Cluster Lifecycle] +- Kubeadm: made the coredns deployment manifest use named ports consistently for the liveness and readiness probes. ([#131587](https://github.com/kubernetes/kubernetes/pull/131587), [@neolit123](https://github.com/neolit123)) [SIG Cluster Lifecycle] +- Kubectl interactive delete: treat empty newline input as N ([#132251](https://github.com/kubernetes/kubernetes/pull/132251), [@ardaguclu](https://github.com/ardaguclu)) [SIG CLI] +- Masked access to Linux thermal interrupt information exposed via `/proc` and `/sys`. ([#131018](https://github.com/kubernetes/kubernetes/pull/131018), [@saschagrunert](https://github.com/saschagrunert)) +- Migrated Memory Manager to contextual logging. ([#130727](https://github.com/kubernetes/kubernetes/pull/130727), [@swatisehgal](https://github.com/swatisehgal)) +- Migrated `pkg/kubelet/status` to use contextual logging. ([#130852](https://github.com/kubernetes/kubernetes/pull/130852), [@Chulong-Li](https://github.com/Chulong-Li)) +- Migrated `pkg/kubelet/volumemanager` to contextual logging. ([#131306](https://github.com/kubernetes/kubernetes/pull/131306), [@Chulong-Li](https://github.com/Chulong-Li)) +- Migrated `pkg/kubelet/winstats` to contextual logging. ([#131001](https://github.com/kubernetes/kubernetes/pull/131001), [@Chulong-Li](https://github.com/Chulong-Li)) +- NONW ([#132890](https://github.com/kubernetes/kubernetes/pull/132890), [@atiratree](https://github.com/atiratree)) [SIG Apps] +- Promoted the `SeparateTaintEvictionController` feature gate to GA; it is now enabled unconditionally. ([#122634](https://github.com/kubernetes/kubernetes/pull/122634), [@carlory](https://github.com/carlory)) [SIG API Machinery, Apps, Node and Testing] +- Promoted the `apiserver_authentication_config_controller_automatic_reloads_total` and `apiserver_authentication_config_controller_automatic_reload_last_timestamp_seconds` metrics to BETA. ([#131798](https://github.com/kubernetes/kubernetes/pull/131798), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth and Instrumentation] +- Promoted the `apiserver_authorization_config_controller_automatic_reloads_total` and `apiserver_authorization_config_controller_automatic_reload_last_timestamp_seconds` metrics to BETA. ([#131768](https://github.com/kubernetes/kubernetes/pull/131768), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth and Instrumentation] +- Promoted two `EndpointSlice` tests to conformance to ensure that service proxy implementations rely on `EndpointSlices` instead of `Endpoints`. ([#132019](https://github.com/kubernetes/kubernetes/pull/132019), [@danwinship](https://github.com/danwinship)) [SIG Architecture, Network and Testing] +- Reduced excessive logging in the Volume Binding scheduler plugin by lowering the verbosity of high-frequency messages from `V(4)` to `V(5)`. ([#132840](https://github.com/kubernetes/kubernetes/pull/132840), [@ppmechlinski](https://github.com/ppmechlinski)) [SIG Autoscaling, Scheduling and Storage] +- Removed deprecated gogo protocol definitions from `k8s.io/externaljwt` in favor of `google.golang.org/protobuf`. ([#132772](https://github.com/kubernetes/kubernetes/pull/132772), [@saschagrunert](https://github.com/saschagrunert)) [SIG Auth] +- Removed deprecated gogo protocol definitions from `k8s.io/kms/apis` in favor of `google.golang.org/protobuf`. ([#132833](https://github.com/kubernetes/kubernetes/pull/132833), [@saschagrunert](https://github.com/saschagrunert)) [SIG API Machinery, Auth and Testing] +- Removed deprecated gogo protocol definitions from `k8s.io/kubelet/pkg/apis/deviceplugin` in favor of `google.golang.org/protobuf`. ([#133028](https://github.com/kubernetes/kubernetes/pull/133028), [@saschagrunert](https://github.com/saschagrunert)) [SIG Node and Testing] +- Removed deprecated gogo protocol definitions from `k8s.io/kubelet/pkg/apis/podresources` in favor of `google.golang.org/protobuf`. ([#133027](https://github.com/kubernetes/kubernetes/pull/133027), [@saschagrunert](https://github.com/saschagrunert)) [SIG Node and Testing] +- Removed general available feature-gate `DevicePluginCDIDevices`. ([#132083](https://github.com/kubernetes/kubernetes/pull/132083), [@carlory](https://github.com/carlory)) [SIG Node and Testing] +- Removed generally available feature-gate `PodDisruptionConditions`. ([#129501](https://github.com/kubernetes/kubernetes/pull/129501), [@carlory](https://github.com/carlory)) [SIG Apps] +- Removed support for API streaming from the REST client. ([#132285](https://github.com/kubernetes/kubernetes/pull/132285), [@p0lyn0mial](https://github.com/p0lyn0mial)) +- Removed support for API streaming from the `List()` method of the typed client. ([#132257](https://github.com/kubernetes/kubernetes/pull/132257), [@p0lyn0mial](https://github.com/p0lyn0mial)) [SIG API Machinery and Testing] +- Removed support for API streaming from the dynamic client’s `List() method`. ([#132229](https://github.com/kubernetes/kubernetes/pull/132229), [@p0lyn0mial](https://github.com/p0lyn0mial)) [SIG API Machinery, CLI and Testing] +- Removed support for API streaming from the metadata client’s `List() method`. ([#132149](https://github.com/kubernetes/kubernetes/pull/132149), [@p0lyn0mial](https://github.com/p0lyn0mial)) [SIG API Machinery and Testing] +- Removed the `kubernetes.io/initial-events-list-blueprint` annotation from the synthetic "Bookmark" event in watch stream requests. ([#132326](https://github.com/kubernetes/kubernetes/pull/132326), [@p0lyn0mial](https://github.com/p0lyn0mial)) +- Removed the deprecated `--register-schedulable` command line argument from the kubelet. ([#122384](https://github.com/kubernetes/kubernetes/pull/122384), [@carlory](https://github.com/carlory)) [SIG Cloud Provider, Node and Scalability] +- Replaced `toPtr` helper functions with the "k8s.io/utils/ptr" implementations. ([#132806](https://github.com/kubernetes/kubernetes/pull/132806), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG Apps, Testing and Windows] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for ./test/e2e and ./test/utils. ([#132763](https://github.com/kubernetes/kubernetes/pull/132763), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG Autoscaling and Testing] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for ./test/e2e. ([#132764](https://github.com/kubernetes/kubernetes/pull/132764), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG Auth, Network, Node, Storage and Testing] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for ./test/e2e. ([#132765](https://github.com/kubernetes/kubernetes/pull/132765), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery, Apps, CLI and Testing] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for ./test/integration. ([#132762](https://github.com/kubernetes/kubernetes/pull/132762), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for apiextensions apiservers validation tests. ([#132726](https://github.com/kubernetes/kubernetes/pull/132726), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for apiextensions-apiserver pkg/controller. ([#132724](https://github.com/kubernetes/kubernetes/pull/132724), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for apiextensions-apiserver pkg/registry. ([#132725](https://github.com/kubernetes/kubernetes/pull/132725), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for pkg/apis (1/2). ([#132778](https://github.com/kubernetes/kubernetes/pull/132778), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG Apps and Network] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for pkg/apis (2/2). ([#132779](https://github.com/kubernetes/kubernetes/pull/132779), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG Apps, Auth and Storage] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for pkg/controller (1/2). ([#132781](https://github.com/kubernetes/kubernetes/pull/132781), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery, Apps and Network] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for pkg/controller (2/2). ([#132784](https://github.com/kubernetes/kubernetes/pull/132784), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery, Apps, Network, Node and Storage] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for pod-security-admission tests. ([#132741](https://github.com/kubernetes/kubernetes/pull/132741), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the apiextensions-apiservers integration tests. ([#132721](https://github.com/kubernetes/kubernetes/pull/132721), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the apiserver (2/2). ([#132752](https://github.com/kubernetes/kubernetes/pull/132752), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery and Auth] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the cli-runtime. ([#132750](https://github.com/kubernetes/kubernetes/pull/132750), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG CLI and Release] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the cloud-provider. ([#132720](https://github.com/kubernetes/kubernetes/pull/132720), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG Cloud Provider and Network] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the components-helper of the apimachinery. ([#132413](https://github.com/kubernetes/kubernetes/pull/132413), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the controller-manager. ([#132753](https://github.com/kubernetes/kubernetes/pull/132753), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery and Cloud Provider] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the csr. ([#132699](https://github.com/kubernetes/kubernetes/pull/132699), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery and Auth] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the e2e_node. ([#132755](https://github.com/kubernetes/kubernetes/pull/132755), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG Node and Testing] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the kubeapiserver. ([#132529](https://github.com/kubernetes/kubernetes/pull/132529), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery and Architecture] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the pkg/security and plugin/pkg. ([#132777](https://github.com/kubernetes/kubernetes/pull/132777), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG Auth, Node and Release] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the pod-security-admission admissiontests. ([#132742](https://github.com/kubernetes/kubernetes/pull/132742), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the pod-security-admission policy. ([#132743](https://github.com/kubernetes/kubernetes/pull/132743), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the reflector. ([#132698](https://github.com/kubernetes/kubernetes/pull/132698), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Replaced timer ptr helper function with the `k8s.io/utils/ptr` implementations. ([#133030](https://github.com/kubernetes/kubernetes/pull/133030), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery and Auth] +- The deprecated `LegacySidecarContainers` feature gate was completely removed. ([#131463](https://github.com/kubernetes/kubernetes/pull/131463), [@gjkim42](https://github.com/gjkim42)) [SIG Node and Testing] +- Types: Code and Status moved from pkg/scheduler/framework to staging repo. + Users should update import path for these types from `k8s.io/kubernetes/pkg/scheduler/framework` to `k8s.io/kube-scheduler/framework`. ([#132087](https://github.com/kubernetes/kubernetes/pull/132087), [@ania-borowiec](https://github.com/ania-borowiec)) [SIG Node, Scheduling, Storage and Testing] +- Types: CycleState, StateData, StateKey and ErrNotFound moved from pkg/scheduler/framework to k8s.io/kube-scheduler/framework. + Type CycleState that is passed to each plugin in scheduler framework is changed to the new interface CycleState (in k8s.io/kube-scheduler/framework) ([#131887](https://github.com/kubernetes/kubernetes/pull/131887), [@ania-borowiec](https://github.com/ania-borowiec)) [SIG Node, Scheduling, Storage and Testing] +- Types: `ClusterEvent`, `ActionType`, `EventResource`, `ClusterEventWithHint`, `QueueingHint` and `QueueingHintFn` moved from `pkg/scheduler/framework` to `k8s.io/kube-scheduler/framework`. ([#132190](https://github.com/kubernetes/kubernetes/pull/132190), [@ania-borowiec](https://github.com/ania-borowiec)) [SIG Node, Scheduling, Storage and Testing] +- Types: `NodeInfo`, `PodInfo`, `QueuedPodInfo`, `PodResource`, `AffinityTerm`, `WeightedAffinityTerm`, `Resource`, `ImageStateSummary`, `ProtocolPort` and `HostPortInfo` were moved from `pkg/scheduler/framework` to staging repo. + Users should update import path for these types from `k8s.io/kubernetes/pkg/scheduler/framework` to `k8s.io/kube-scheduler/framework` and update use of fields (to use getter/setter functions instead) where needed. ([#132457](https://github.com/kubernetes/kubernetes/pull/132457), [@ania-borowiec](https://github.com/ania-borowiec)) [SIG Node, Scheduling, Storage and Testing] +- Updated CNI plugins to v1.7.1 ([#131602](https://github.com/kubernetes/kubernetes/pull/131602), [@adrianmoisey](https://github.com/adrianmoisey)) [SIG Cloud Provider, Node and Testing] +- Updated `conntrack` reconciler to consider a Service’s target port during cleanup of stale flow entries. ([#130542](https://github.com/kubernetes/kubernetes/pull/130542), [@aroradaman](https://github.com/aroradaman)) +- Updated `kubeadm` to use the `InitialCorruptCheck=true` etcd feature gate instead of the deprecated `--experimental-initial-corrupt-check` flag. Also replaced the use of `--experimental-watch-progress-notify-interval` with its graduated counterpart `--watch-progress-notify-interval`. ([#132838](https://github.com/kubernetes/kubernetes/pull/132838), [@AwesomePatrol](https://github.com/AwesomePatrol)) +- Updated cri-tools to v1.33.0. ([#131406](https://github.com/kubernetes/kubernetes/pull/131406), [@saschagrunert](https://github.com/saschagrunert)) [SIG Cloud Provider] +- Updated etcd version to v3.6.1. ([#132284](https://github.com/kubernetes/kubernetes/pull/132284), [@ArkaSaha30](https://github.com/ArkaSaha30)) [SIG API Machinery, Cloud Provider, Cluster Lifecycle, Etcd and Testing] +- Updated the etcd client library to v3.6.4. ([#133226](https://github.com/kubernetes/kubernetes/pull/133226), [@ivanvc](https://github.com/ivanvc)) [SIG API Machinery, Auth, Cloud Provider and Node] +- Upgraded CoreDNS to v1.12.1. ([#131151](https://github.com/kubernetes/kubernetes/pull/131151), [@yashsingh74](https://github.com/yashsingh74)) [SIG Cloud Provider and Cluster Lifecycle] +- Upgraded functionality of `kubectl kustomize` as described at https://github.com/kubernetes-sigs/kustomize/releases/tag/kustomize%2Fv5.7.0. ([#132593](https://github.com/kubernetes/kubernetes/pull/132593), [@koba1t](https://github.com/koba1t)) +- Validated APIVersion fields of the `HorizontalPodAutoscaler` to ensure that API objects were created and functioned properly. ([#132537](https://github.com/kubernetes/kubernetes/pull/132537), [@lalitc375](https://github.com/lalitc375)) [SIG Etcd and Testing] + +## Dependencies + +### Added +- buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go: 63bb56e +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp: [v1.26.0](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/tree/detectors/gcp/v1.26.0) +- github.com/bufbuild/protovalidate-go: [v0.9.1](https://github.com/bufbuild/protovalidate-go/tree/v0.9.1) +- github.com/envoyproxy/go-control-plane/envoy: [v1.32.4](https://github.com/envoyproxy/go-control-plane/tree/envoy/v1.32.4) +- github.com/envoyproxy/go-control-plane/ratelimit: [v0.1.0](https://github.com/envoyproxy/go-control-plane/tree/ratelimit/v0.1.0) +- github.com/go-jose/go-jose/v4: [v4.0.4](https://github.com/go-jose/go-jose/tree/v4.0.4) +- github.com/golang-jwt/jwt/v5: [v5.2.2](https://github.com/golang-jwt/jwt/tree/v5.2.2) +- github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus: [v1.0.1](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/providers/prometheus/v1.0.1) +- github.com/grpc-ecosystem/go-grpc-middleware/v2: [v2.3.0](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/v2.3.0) +- github.com/spiffe/go-spiffe/v2: [v2.5.0](https://github.com/spiffe/go-spiffe/tree/v2.5.0) +- github.com/zeebo/errs: [v1.4.0](https://github.com/zeebo/errs/tree/v1.4.0) +- go.etcd.io/raft/v3: v3.6.0 +- go.opentelemetry.io/contrib/detectors/gcp: v1.34.0 +- go.opentelemetry.io/otel/sdk/metric: v1.34.0 +- go.yaml.in/yaml/v2: v2.4.2 +- go.yaml.in/yaml/v3: v3.0.4 +- sigs.k8s.io/structured-merge-diff/v6: v6.3.0 + +### Changed +- cel.dev/expr: v0.19.1 → v0.24.0 +- cloud.google.com/go/compute/metadata: v0.5.0 → v0.6.0 +- github.com/Microsoft/hnslib: [v0.0.8 → v0.1.1](https://github.com/Microsoft/hnslib/compare/v0.0.8...v0.1.1) +- github.com/cncf/xds/go: [b4127c9 → 2f00578](https://github.com/cncf/xds/compare/b4127c9...2f00578) +- github.com/coredns/corefile-migration: [v1.0.25 → v1.0.26](https://github.com/coredns/corefile-migration/compare/v1.0.25...v1.0.26) +- github.com/cpuguy83/go-md2man/v2: [v2.0.4 → v2.0.6](https://github.com/cpuguy83/go-md2man/compare/v2.0.4...v2.0.6) +- github.com/emicklei/go-restful/v3: [v3.11.0 → v3.12.2](https://github.com/emicklei/go-restful/compare/v3.11.0...v3.12.2) +- github.com/envoyproxy/go-control-plane: [v0.13.0 → v0.13.4](https://github.com/envoyproxy/go-control-plane/compare/v0.13.0...v0.13.4) +- github.com/envoyproxy/protoc-gen-validate: [v1.1.0 → v1.2.1](https://github.com/envoyproxy/protoc-gen-validate/compare/v1.1.0...v1.2.1) +- github.com/fsnotify/fsnotify: [v1.7.0 → v1.9.0](https://github.com/fsnotify/fsnotify/compare/v1.7.0...v1.9.0) +- github.com/fxamacker/cbor/v2: [v2.7.0 → v2.9.0](https://github.com/fxamacker/cbor/compare/v2.7.0...v2.9.0) +- github.com/golang/glog: [v1.2.2 → v1.2.4](https://github.com/golang/glog/compare/v1.2.2...v1.2.4) +- github.com/google/cel-go: [v0.23.2 → v0.26.0](https://github.com/google/cel-go/compare/v0.23.2...v0.26.0) +- github.com/google/gnostic-models: [v0.6.9 → v0.7.0](https://github.com/google/gnostic-models/compare/v0.6.9...v0.7.0) +- github.com/grpc-ecosystem/grpc-gateway/v2: [v2.24.0 → v2.26.3](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.24.0...v2.26.3) +- github.com/ishidawataru/sctp: [7ff4192 → ae8eb7f](https://github.com/ishidawataru/sctp/compare/7ff4192...ae8eb7f) +- github.com/jonboulle/clockwork: [v0.4.0 → v0.5.0](https://github.com/jonboulle/clockwork/compare/v0.4.0...v0.5.0) +- github.com/modern-go/reflect2: [v1.0.2 → 35a7c28](https://github.com/modern-go/reflect2/compare/v1.0.2...35a7c28) +- github.com/spf13/cobra: [v1.8.1 → v1.9.1](https://github.com/spf13/cobra/compare/v1.8.1...v1.9.1) +- github.com/spf13/pflag: [v1.0.5 → v1.0.6](https://github.com/spf13/pflag/compare/v1.0.5...v1.0.6) +- github.com/vishvananda/netlink: [62fb240 → v1.3.1](https://github.com/vishvananda/netlink/compare/62fb240...v1.3.1) +- github.com/vishvananda/netns: [v0.0.4 → v0.0.5](https://github.com/vishvananda/netns/compare/v0.0.4...v0.0.5) +- go.etcd.io/bbolt: v1.3.11 → v1.4.2 +- go.etcd.io/etcd/api/v3: v3.5.21 → v3.6.4 +- go.etcd.io/etcd/client/pkg/v3: v3.5.21 → v3.6.4 +- go.etcd.io/etcd/client/v3: v3.5.21 → v3.6.4 +- go.etcd.io/etcd/pkg/v3: v3.5.21 → v3.6.4 +- go.etcd.io/etcd/server/v3: v3.5.21 → v3.6.4 +- go.etcd.io/gofail: v0.1.0 → v0.2.0 +- go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful: v0.42.0 → v0.44.0 +- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc: v0.58.0 → v0.60.0 +- go.opentelemetry.io/contrib/propagators/b3: v1.17.0 → v1.19.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc: v1.33.0 → v1.34.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace: v1.33.0 → v1.34.0 +- go.opentelemetry.io/otel/metric: v1.33.0 → v1.35.0 +- go.opentelemetry.io/otel/sdk: v1.33.0 → v1.34.0 +- go.opentelemetry.io/otel/trace: v1.33.0 → v1.35.0 +- go.opentelemetry.io/otel: v1.33.0 → v1.35.0 +- go.opentelemetry.io/proto/otlp: v1.4.0 → v1.5.0 +- google.golang.org/genproto/googleapis/api: e6fa225 → a0af3ef +- google.golang.org/genproto/googleapis/rpc: e6fa225 → a0af3ef +- google.golang.org/grpc: v1.68.1 → v1.72.1 +- k8s.io/gengo/v2: 1244d31 → 85fd79d +- k8s.io/kube-openapi: c8a335a → f3f2b99 +- k8s.io/system-validators: v1.9.1 → v1.10.1 +- k8s.io/utils: 3ea5e8c → 4c0f3b2 +- sigs.k8s.io/json: 9aa6b5e → cfa47c3 +- sigs.k8s.io/kustomize/api: v0.19.0 → v0.20.1 +- sigs.k8s.io/kustomize/cmd/config: v0.19.0 → v0.20.1 +- sigs.k8s.io/kustomize/kustomize/v5: v5.6.0 → v5.7.1 +- sigs.k8s.io/kustomize/kyaml: v0.19.0 → v0.20.1 +- sigs.k8s.io/yaml: v1.4.0 → v1.6.0 + +### Removed +- cloud.google.com/go/accessapproval: v1.7.4 +- cloud.google.com/go/accesscontextmanager: v1.8.4 +- cloud.google.com/go/aiplatform: v1.58.0 +- cloud.google.com/go/analytics: v0.22.0 +- cloud.google.com/go/apigateway: v1.6.4 +- cloud.google.com/go/apigeeconnect: v1.6.4 +- cloud.google.com/go/apigeeregistry: v0.8.2 +- cloud.google.com/go/appengine: v1.8.4 +- cloud.google.com/go/area120: v0.8.4 +- cloud.google.com/go/artifactregistry: v1.14.6 +- cloud.google.com/go/asset: v1.17.0 +- cloud.google.com/go/assuredworkloads: v1.11.4 +- cloud.google.com/go/automl: v1.13.4 +- cloud.google.com/go/baremetalsolution: v1.2.3 +- cloud.google.com/go/batch: v1.7.0 +- cloud.google.com/go/beyondcorp: v1.0.3 +- cloud.google.com/go/bigquery: v1.58.0 +- cloud.google.com/go/billing: v1.18.0 +- cloud.google.com/go/binaryauthorization: v1.8.0 +- cloud.google.com/go/certificatemanager: v1.7.4 +- cloud.google.com/go/channel: v1.17.4 +- cloud.google.com/go/cloudbuild: v1.15.0 +- cloud.google.com/go/clouddms: v1.7.3 +- cloud.google.com/go/cloudtasks: v1.12.4 +- cloud.google.com/go/compute: v1.23.3 +- cloud.google.com/go/contactcenterinsights: v1.12.1 +- cloud.google.com/go/container: v1.29.0 +- cloud.google.com/go/containeranalysis: v0.11.3 +- cloud.google.com/go/datacatalog: v1.19.2 +- cloud.google.com/go/dataflow: v0.9.4 +- cloud.google.com/go/dataform: v0.9.1 +- cloud.google.com/go/datafusion: v1.7.4 +- cloud.google.com/go/datalabeling: v0.8.4 +- cloud.google.com/go/dataplex: v1.14.0 +- cloud.google.com/go/dataproc/v2: v2.3.0 +- cloud.google.com/go/dataqna: v0.8.4 +- cloud.google.com/go/datastore: v1.15.0 +- cloud.google.com/go/datastream: v1.10.3 +- cloud.google.com/go/deploy: v1.17.0 +- cloud.google.com/go/dialogflow: v1.48.1 +- cloud.google.com/go/dlp: v1.11.1 +- cloud.google.com/go/documentai: v1.23.7 +- cloud.google.com/go/domains: v0.9.4 +- cloud.google.com/go/edgecontainer: v1.1.4 +- cloud.google.com/go/errorreporting: v0.3.0 +- cloud.google.com/go/essentialcontacts: v1.6.5 +- cloud.google.com/go/eventarc: v1.13.3 +- cloud.google.com/go/filestore: v1.8.0 +- cloud.google.com/go/firestore: v1.14.0 +- cloud.google.com/go/functions: v1.15.4 +- cloud.google.com/go/gkebackup: v1.3.4 +- cloud.google.com/go/gkeconnect: v0.8.4 +- cloud.google.com/go/gkehub: v0.14.4 +- cloud.google.com/go/gkemulticloud: v1.1.0 +- cloud.google.com/go/gsuiteaddons: v1.6.4 +- cloud.google.com/go/iam: v1.1.5 +- cloud.google.com/go/iap: v1.9.3 +- cloud.google.com/go/ids: v1.4.4 +- cloud.google.com/go/iot: v1.7.4 +- cloud.google.com/go/kms: v1.15.5 +- cloud.google.com/go/language: v1.12.2 +- cloud.google.com/go/lifesciences: v0.9.4 +- cloud.google.com/go/logging: v1.9.0 +- cloud.google.com/go/longrunning: v0.5.4 +- cloud.google.com/go/managedidentities: v1.6.4 +- cloud.google.com/go/maps: v1.6.3 +- cloud.google.com/go/mediatranslation: v0.8.4 +- cloud.google.com/go/memcache: v1.10.4 +- cloud.google.com/go/metastore: v1.13.3 +- cloud.google.com/go/monitoring: v1.17.0 +- cloud.google.com/go/networkconnectivity: v1.14.3 +- cloud.google.com/go/networkmanagement: v1.9.3 +- cloud.google.com/go/networksecurity: v0.9.4 +- cloud.google.com/go/notebooks: v1.11.2 +- cloud.google.com/go/optimization: v1.6.2 +- cloud.google.com/go/orchestration: v1.8.4 +- cloud.google.com/go/orgpolicy: v1.12.0 +- cloud.google.com/go/osconfig: v1.12.4 +- cloud.google.com/go/oslogin: v1.13.0 +- cloud.google.com/go/phishingprotection: v0.8.4 +- cloud.google.com/go/policytroubleshooter: v1.10.2 +- cloud.google.com/go/privatecatalog: v0.9.4 +- cloud.google.com/go/pubsub: v1.34.0 +- cloud.google.com/go/pubsublite: v1.8.1 +- cloud.google.com/go/recaptchaenterprise/v2: v2.9.0 +- cloud.google.com/go/recommendationengine: v0.8.4 +- cloud.google.com/go/recommender: v1.12.0 +- cloud.google.com/go/redis: v1.14.1 +- cloud.google.com/go/resourcemanager: v1.9.4 +- cloud.google.com/go/resourcesettings: v1.6.4 +- cloud.google.com/go/retail: v1.14.4 +- cloud.google.com/go/run: v1.3.3 +- cloud.google.com/go/scheduler: v1.10.5 +- cloud.google.com/go/secretmanager: v1.11.4 +- cloud.google.com/go/security: v1.15.4 +- cloud.google.com/go/securitycenter: v1.24.3 +- cloud.google.com/go/servicedirectory: v1.11.3 +- cloud.google.com/go/shell: v1.7.4 +- cloud.google.com/go/spanner: v1.55.0 +- cloud.google.com/go/speech: v1.21.0 +- cloud.google.com/go/storagetransfer: v1.10.3 +- cloud.google.com/go/talent: v1.6.5 +- cloud.google.com/go/texttospeech: v1.7.4 +- cloud.google.com/go/tpu: v1.6.4 +- cloud.google.com/go/trace: v1.10.4 +- cloud.google.com/go/translate: v1.10.0 +- cloud.google.com/go/video: v1.20.3 +- cloud.google.com/go/videointelligence: v1.11.4 +- cloud.google.com/go/vision/v2: v2.7.5 +- cloud.google.com/go/vmmigration: v1.7.4 +- cloud.google.com/go/vmwareengine: v1.0.3 +- cloud.google.com/go/vpcaccess: v1.7.4 +- cloud.google.com/go/webrisk: v1.9.4 +- cloud.google.com/go/websecurityscanner: v1.6.4 +- cloud.google.com/go/workflows: v1.12.3 +- cloud.google.com/go: v0.112.0 +- github.com/BurntSushi/toml: [v0.3.1](https://github.com/BurntSushi/toml/tree/v0.3.1) +- github.com/census-instrumentation/opencensus-proto: [v0.4.1](https://github.com/census-instrumentation/opencensus-proto/tree/v0.4.1) +- github.com/client9/misspell: [v0.3.4](https://github.com/client9/misspell/tree/v0.3.4) +- github.com/cncf/udpa/go: [269d4d4](https://github.com/cncf/udpa/tree/269d4d4) +- github.com/ghodss/yaml: [v1.0.0](https://github.com/ghodss/yaml/tree/v1.0.0) +- github.com/go-kit/kit: [v0.9.0](https://github.com/go-kit/kit/tree/v0.9.0) +- github.com/go-logfmt/logfmt: [v0.4.0](https://github.com/go-logfmt/logfmt/tree/v0.4.0) +- github.com/go-stack/stack: [v1.8.0](https://github.com/go-stack/stack/tree/v1.8.0) +- github.com/golang-jwt/jwt/v4: [v4.5.2](https://github.com/golang-jwt/jwt/tree/v4.5.2) +- github.com/golang/mock: [v1.1.1](https://github.com/golang/mock/tree/v1.1.1) +- github.com/google/shlex: [e7afc7f](https://github.com/google/shlex/tree/e7afc7f) +- github.com/grpc-ecosystem/grpc-gateway: [v1.16.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.16.0) +- github.com/konsorten/go-windows-terminal-sequences: [v1.0.1](https://github.com/konsorten/go-windows-terminal-sequences/tree/v1.0.1) +- github.com/kr/logfmt: [b84e30a](https://github.com/kr/logfmt/tree/b84e30a) +- github.com/opentracing/opentracing-go: [v1.1.0](https://github.com/opentracing/opentracing-go/tree/v1.1.0) +- go.etcd.io/etcd/client/v2: v2.305.21 +- go.etcd.io/etcd/raft/v3: v3.5.21 +- go.uber.org/atomic: v1.7.0 +- golang.org/x/lint: d0100b6 +- google.golang.org/appengine: v1.4.0 +- google.golang.org/genproto: ef43131 +- honnef.co/go/tools: ea95bdf +- sigs.k8s.io/structured-merge-diff/v4: v4.6.0 + + + # v1.34.0-rc.2 diff --git a/CHANGELOG/CHANGELOG-1.35.md b/CHANGELOG/CHANGELOG-1.35.md new file mode 100644 index 0000000000000..894feb8e10f80 --- /dev/null +++ b/CHANGELOG/CHANGELOG-1.35.md @@ -0,0 +1,266 @@ + + +- [v1.35.0-alpha.1](#v1350-alpha1) + - [Downloads for v1.35.0-alpha.1](#downloads-for-v1350-alpha1) + - [Source Code](#source-code) + - [Client Binaries](#client-binaries) + - [Server Binaries](#server-binaries) + - [Node Binaries](#node-binaries) + - [Container Images](#container-images) + - [Changelog since v1.34.0](#changelog-since-v1340) + - [Changes by Kind](#changes-by-kind) + - [API Change](#api-change) + - [Feature](#feature) + - [Bug or Regression](#bug-or-regression) + - [Other (Cleanup or Flake)](#other-cleanup-or-flake) + - [Dependencies](#dependencies) + - [Added](#added) + - [Changed](#changed) + - [Removed](#removed) + + + +# v1.35.0-alpha.1 + + +## Downloads for v1.35.0-alpha.1 + + + +### Source Code + +filename | sha512 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes.tar.gz) | 1d6fb6a4c7f82fe04e56757b733c3fc4aac652f8c2113e79ddce83b6cbe0179404147b35ddbc18e1b60eb802acb3f6d884599fd573f3d16f0558ef7ddfb8aae2 +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-src.tar.gz) | 364788bac4d405ac6180fe3cb7e3d847e7960fcb0532146b105270aeac2624ade2ff87370c5aa8f768eda07fd28e5e75f73afbdf9cc1b786827a0e123bdea561 + +### Client Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-client-darwin-amd64.tar.gz) | 1ba40849b104851d922bce32dc9306004e9b95cfadeff9ecfb65f779892009f9a70878b8efe96159088b1ad8c700bf19e58d68416dfdff7853660e6074dd3752 +[kubernetes-client-darwin-arm64.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-client-darwin-arm64.tar.gz) | 0c939895ad2d53f57e9137774eed99cbfbfa5f15d4276f5f55c4ea40b922a5f37ab375a065fdd330f5a1ddf452896f2a13621075b049f382ab42a65ea1085dac +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-client-linux-386.tar.gz) | e98a9b2d5f1c8bec552be6353b623a8f12078befd968a662a933907d0ff72b0164fa8b38e4cbd4aae6191e28aedc19d996ec99298053d7bafc458f91580a7cfa +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-client-linux-amd64.tar.gz) | 34ab1e9edf70c84fe58a223e91b0bf679e5d1273a2b6503a18a61a4bea79231948efe098f84e39f83dbfa2c5271aad8e9819aac104d6c3360c97e5c348b15be7 +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-client-linux-arm.tar.gz) | 554f8240597e7eb8470c8e2b4bca33c06a0a91746831ef93f76b344f5c3d6226d4ef26cb59f127d1436ac091b7b79395320fe8a9b2acc512afd601989c138d4a +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-client-linux-arm64.tar.gz) | 62c750654e898622aa87b2d81d4b0cbaf36614899f37181c2e3a6aa645d2270c4dedb7d6e7b974059a716ad144a5615407e6a9a4c03f761a512d37fdda796e50 +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-client-linux-ppc64le.tar.gz) | bbe22979c4e300675dfa955ce9855b7b33b29119a9f78e58bc1b088dba2b8dedbf0b068092d42cd98dbc10cda1da317eae6414b91587593678ec76780ff575df +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-client-linux-s390x.tar.gz) | b8360d0bf930149d360da2a95549b35cb7e14932ae8507d99e34d93729ae645bab203dfba325c74db13204e09e5ee032f887cdd67badfbf3bc8a08d71ccf9c3d +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-client-windows-386.tar.gz) | cc935a74f30dcd1eaaeadc8f2353a9742ebc4a36b133342c6402b065750f4028a1a392bd5f7ea51533c2d799ff2bdb3d0f21493e7fabacb27289e58f011bb229 +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-client-windows-amd64.tar.gz) | 119742103985be0cd4296b85aa2c713cdc510b9a9412706fdf88ca1c703f69338146efc5cf37168ab56e74576ad561ce37c3f500d29b63002139d11544b1b7cf +[kubernetes-client-windows-arm64.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-client-windows-arm64.tar.gz) | 67f5fe6b14aa4c49acb6f706ec4a9e43b87f1e19555579895452183e0b2d2be2202f8d48622208ac5ef6e0fb9050d99bb7e1ed9e4e31e8fcac7c0b5e44787c39 + +### Server Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-server-linux-amd64.tar.gz) | a1c935db625766b02113087068fa1087a6b74e9f57ad72cc1d5d85e830c0569b9257746013053ee8dc89404940458c3bba00064666978ddff4df9f3cae0ae066 +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-server-linux-arm64.tar.gz) | 5f87f8f46719af413fa864b7d91d5b95fa86adf27df63cf904470b15e844ebda4c802d7ec7cb4006b4e5a3780903d0436eb57a7e2f2b79b74cf5e7e8f65496b1 +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-server-linux-ppc64le.tar.gz) | 9f2e9476ae3b95919c991dd0438b31eeded7c7f686948ef2d6227311dabc952e74f61d3638f224eb18e63a4fe4955b55a9e358032477b989800541617a8b5f6a +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-server-linux-s390x.tar.gz) | 043311de9dad81d3774decc3aeeac48833d2d234a15ce4a2062fd9af778879afde5e2eb9fdec5f3641725f630e7c3bd845a348ad713b54275e77293941d4c8d0 + +### Node Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-node-linux-amd64.tar.gz) | 865b4ee818cd53bc91001f658243e6b6fd9464f17ef8dc0cc739586689f39998e5c47630df439ad43553d6830ae3a7375cc780c3a5e49f1422d35d77194efc35 +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-node-linux-arm64.tar.gz) | fc7df94bc328817d20c59e1ab1371634bf3849141ad982c9d403b136d009c3ed9ee3f7a20659a0f93af7179e13e2c0835b80fefc677b8840f7bcbde0dabb4483 +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-node-linux-ppc64le.tar.gz) | 8ec718436680766d9026b56ece5bff7a6bac9f63da0edf33843a7a6c255e1a1d22aecf260c1d5fc394c1e2f581931c5ae0acad80a0141fc8d4d7730bf04566b5 +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-node-linux-s390x.tar.gz) | fff0562e3a89b4f9444ce83bb8cfc860bcd5178a2c1ba0f1404d87556f483d48241aa3f927f2534d811b1c554958c167f1e5199fa916ebfd9a754cef2f761139 +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.35.0-alpha.1/kubernetes-node-windows-amd64.tar.gz) | 7774299a2b581a4ab2514d8dc95c1d0dff0652aa0518efbffa9ac39f5c510cb83d8a41a70e9b4e78f0b179e5a806402310dac161ff3a2398b97755938c225586 + +### Container Images + +All container images are available as manifest lists and support the described +architectures. It is also possible to pull a specific architecture directly by +adding the "-$ARCH" suffix to the container image name. + +name | architectures +---- | ------------- +[registry.k8s.io/conformance:v1.35.0-alpha.1](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/conformance-s390x) +[registry.k8s.io/kube-apiserver:v1.35.0-alpha.1](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-apiserver-s390x) +[registry.k8s.io/kube-controller-manager:v1.35.0-alpha.1](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-controller-manager-s390x) +[registry.k8s.io/kube-proxy:v1.35.0-alpha.1](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-proxy-s390x) +[registry.k8s.io/kube-scheduler:v1.35.0-alpha.1](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kube-scheduler-s390x) +[registry.k8s.io/kubectl:v1.35.0-alpha.1](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl) | [amd64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-amd64), [arm64](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-arm64), [ppc64le](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-ppc64le), [s390x](https://console.cloud.google.com/artifacts/docker/k8s-artifacts-prod/southamerica-east1/images/kubectl-s390x) + +## Changelog since v1.34.0 + +## Changes by Kind + +### API Change + +- Added WithOrigin within apis/core/validation with adjusted tests ([#132825](https://github.com/kubernetes/kubernetes/pull/132825), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG Apps] +- Component-base: validate that log-flush-frequency is positive and return an error instead of panic-ing ([#133540](https://github.com/kubernetes/kubernetes/pull/133540), [@BenTheElder](https://github.com/BenTheElder)) [SIG Architecture, Instrumentation, Network and Node] +- Feature gate dependencies are now explicit, and validated at startup. A feature can no longer be enabled if it depends on a disabled feature. In particular, this means that `AllAlpha=true` will no longer work without enabling disabled-by-default beta features that are depended on (either with `AllBeta=true` or explicitly enumerating the disabled dependencies). ([#133697](https://github.com/kubernetes/kubernetes/pull/133697), [@tallclair](https://github.com/tallclair)) [SIG API Machinery, Architecture, Cluster Lifecycle and Node] +- In version 1.34, the PodObservedGenerationTracking feature has been upgraded to beta, and the description of the alpha version in the openapi has been removed. ([#133883](https://github.com/kubernetes/kubernetes/pull/133883), [@yangjunmyfm192085](https://github.com/yangjunmyfm192085)) [SIG Apps] +- Introduce a new declarative validation tag +k8s:customUnique to control listmap uniqueness ([#134279](https://github.com/kubernetes/kubernetes/pull/134279), [@yongruilin](https://github.com/yongruilin)) [SIG API Machinery and Auth] +- Kube-apiserver: Fixed a 1.34 regression in CustomResourceDefinition handling that incorrectly warned about unrecognized formats on number and integer properties ([#133896](https://github.com/kubernetes/kubernetes/pull/133896), [@yongruilin](https://github.com/yongruilin)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Cloud Provider, Contributor Experience, Network, Node and Scheduling] +- OpenAPI model packages of API types are generated into `zz_generated.model_name.go` files and are accessible using the `OpenAPIModelName()` function. This allows API authors to declare the desired OpenAPI model packages instead of using the go package path of API types. ([#131755](https://github.com/kubernetes/kubernetes/pull/131755), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Network, Node, Scheduling, Storage and Testing] +- Support for `kubectl get -o kyaml` is now on by default. To disable it, set `KUBECTL_KYAML=false`. ([#133327](https://github.com/kubernetes/kubernetes/pull/133327), [@thockin](https://github.com/thockin)) [SIG CLI] +- The storage version for MutatingAdmissionPolicy is updated to v1beta1. ([#133715](https://github.com/kubernetes/kubernetes/pull/133715), [@cici37](https://github.com/cici37)) [SIG API Machinery, Etcd and Testing] + +### Feature + +- Add paths section to kubelet statusz endpoint ([#133239](https://github.com/kubernetes/kubernetes/pull/133239), [@Peac36](https://github.com/Peac36)) [SIG Node] +- Add paths section to scheduler statusz endpoint ([#132606](https://github.com/kubernetes/kubernetes/pull/132606), [@Peac36](https://github.com/Peac36)) [SIG API Machinery, Architecture, Instrumentation, Network, Node, Scheduling and Testing] +- Added kubectl config set-context -n flag as a shorthand for --namespace ([#134384](https://github.com/kubernetes/kubernetes/pull/134384), [@tchap](https://github.com/tchap)) [SIG CLI and Testing] +- Added remote runtime and image `Close()` method to be able to close the connection. ([#133211](https://github.com/kubernetes/kubernetes/pull/133211), [@saschagrunert](https://github.com/saschagrunert)) [SIG Node] +- Adds metric for Maxunavailable feature ([#130951](https://github.com/kubernetes/kubernetes/pull/130951), [@Edwinhr716](https://github.com/Edwinhr716)) [SIG Apps and Instrumentation] +- Applyconfiguration-gen now generates extract functions for all subresources ([#132665](https://github.com/kubernetes/kubernetes/pull/132665), [@mrIncompetent](https://github.com/mrIncompetent)) [SIG API Machinery] +- Applyconfiguration-gen now preserves struct and field comments from source types in generated code ([#132663](https://github.com/kubernetes/kubernetes/pull/132663), [@mrIncompetent](https://github.com/mrIncompetent)) [SIG API Machinery] +- DRA: the resource.k8s.io API now uses the v1 API version (introduced in 1.34) as default storage version. Downgrading to 1.33 is not supported. ([#133876](https://github.com/kubernetes/kubernetes/pull/133876), [@kei01234kei](https://github.com/kei01234kei)) [SIG API Machinery, Etcd and Testing] +- Events: + Type Reason Age From Message + ---- ------ ---- ---- ------- + Warning Failed 7m11s (x2 over 7m33s) kubelet spec.containers{nginx}: Failed to pull image "nginx": failed to pull and unpack image... ([#133627](https://github.com/kubernetes/kubernetes/pull/133627), [@itzPranshul](https://github.com/itzPranshul)) [SIG CLI] +- Introduces e2e tests that check component invariant metrics across the entire suite run. ([#133394](https://github.com/kubernetes/kubernetes/pull/133394), [@BenTheElder](https://github.com/BenTheElder)) [SIG Testing] +- K8s.io/apimachinery: Introduce a helper function to compare resourceVersion strings from two objects of the same resource ([#134330](https://github.com/kubernetes/kubernetes/pull/134330), [@michaelasp](https://github.com/michaelasp)) [SIG API Machinery, Apps, Auth, Instrumentation, Network, Node, Scheduling, Storage and Testing] +- Kubeadm: graduate the kubeadm specific feature gate ControlPlaneKubeletLocalMode to GA and lock it to enabled by default. To opt-out manually from this desired default behavior you must patch the "server" field in the /etc/kubernetes/kubelet.conf file. The subphase of "kubeadm join phase control-plane-join" called "etcd" is now deprecated, hidden and replaced by the subphase with identical functionality "etcd-join". "etcd" will be removed in a follow-up release. The subphase "kubelet-wait-bootstrap" of "kubeadm join" is no longer experimental and will always run. ([#134106](https://github.com/kubernetes/kubernetes/pull/134106), [@neolit123](https://github.com/neolit123)) [SIG Cluster Lifecycle] +- Kubernetes is now built using Go 1.25.1 ([#134095](https://github.com/kubernetes/kubernetes/pull/134095), [@dims](https://github.com/dims)) [SIG Release and Testing] +- Kubernetes now uses Go Language Version 1.25, including https://go.dev/blog/container-aware-gomaxprocs ([#134120](https://github.com/kubernetes/kubernetes/pull/134120), [@BenTheElder](https://github.com/BenTheElder)) [SIG API Machinery, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Network, Node, Release, Scheduling and Storage] +- Lock down the `AllowOverwriteTerminationGracePeriodSeconds` feature gate. ([#133792](https://github.com/kubernetes/kubernetes/pull/133792), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG Node] +- Metrics: exclude dryRun requests from apiserver_request_sli_duration_seconds ([#131092](https://github.com/kubernetes/kubernetes/pull/131092), [@aldudko](https://github.com/aldudko)) [SIG API Machinery and Instrumentation] +- The validation in the resouce.k8s.io has been migrated to declarative validation. + If the `DeclarativeValidation` feature gate is enabled, mismatches with existing validation are reported via metrics. + If the `DeclarativeValidationTakeover` feature gate is enabled, declarative validation is the primary source of errors for migrated fields. ([#134072](https://github.com/kubernetes/kubernetes/pull/134072), [@yongruilin](https://github.com/yongruilin)) [SIG API Machinery, Apps and Auth] + +### Bug or Regression + +- Added the correct error when eviction is blocked due to the failSafe mechanism of the DisruptionController. ([#133097](https://github.com/kubernetes/kubernetes/pull/133097), [@kei01234kei](https://github.com/kei01234kei)) [SIG Apps and Node] +- Bugfix: the default serviceCIDR controller was not logging events because the event broadcaster was shutdown during its initialization. ([#133338](https://github.com/kubernetes/kubernetes/pull/133338), [@aojea](https://github.com/aojea)) [SIG Network] +- Deprecated metrics will be hidden as per the metrics deprecation policy https://kubernetes.io/docs/reference/using-api/deprecation-policy/#deprecating-a-metric ([#133436](https://github.com/kubernetes/kubernetes/pull/133436), [@richabanker](https://github.com/richabanker)) [SIG Architecture, Instrumentation and Network] +- Fix incorrect behavior of preemptor pod when preemption of the victim takes long to complete. The preemptor pod should not be circling in scheduling cycles until preemption is finished. ([#134294](https://github.com/kubernetes/kubernetes/pull/134294), [@ania-borowiec](https://github.com/ania-borowiec)) [SIG Scheduling and Testing] +- Fix missing kubelet_volume_stats_* metrics ([#133890](https://github.com/kubernetes/kubernetes/pull/133890), [@huww98](https://github.com/huww98)) [SIG Instrumentation and Node] +- Fix occasional schedule delay when the static PV is created ([#133929](https://github.com/kubernetes/kubernetes/pull/133929), [@huww98](https://github.com/huww98)) [SIG Scheduling and Storage] +- Fix resource claims deallocation for extended resource when pod is completed ([#134312](https://github.com/kubernetes/kubernetes/pull/134312), [@alaypatel07](https://github.com/alaypatel07)) [SIG Apps, Node and Testing] +- Fixed SELinux warning controller not emitting events on some SELinux label conflicts. ([#133425](https://github.com/kubernetes/kubernetes/pull/133425), [@jsafrane](https://github.com/jsafrane)) [SIG Apps, Storage and Testing] +- Fixed a bug in kube-proxy nftables mode (GA as of 1.33) that fails to determine if traffic originates from a local source on the node. The issue was caused by using the wrong meta `iif` instead of `iifname` for name based matches. ([#134024](https://github.com/kubernetes/kubernetes/pull/134024), [@jack4it](https://github.com/jack4it)) [SIG Network] +- Fixed a bug in kube-scheduler where pending pod preemption caused preemptor pods to be retried more frequently. ([#134245](https://github.com/kubernetes/kubernetes/pull/134245), [@macsko](https://github.com/macsko)) [SIG Scheduling and Testing] +- Fixed a bug that caused apiservers to send an inappropriate Content-Type request header to authorization, token authentication, imagepolicy admission, and audit webhooks when the alpha client-go feature gate "ClientsPreferCBOR" is enabled. ([#132960](https://github.com/kubernetes/kubernetes/pull/132960), [@benluddy](https://github.com/benluddy)) [SIG API Machinery and Node] +- Fixed a bug that caused duplicate validation when updating PersistentVolumeClaims, VolumeAttachments and VolumeAttributesClasses. ([#132549](https://github.com/kubernetes/kubernetes/pull/132549), [@gavinkflam](https://github.com/gavinkflam)) [SIG Storage] +- Fixed a bug that caused duplicate validation when updating role and role binding resources. ([#132550](https://github.com/kubernetes/kubernetes/pull/132550), [@gavinkflam](https://github.com/gavinkflam)) [SIG Auth] +- Fixed a bug where high latency kube-apiserver caused scheduling throughput degradation. ([#134154](https://github.com/kubernetes/kubernetes/pull/134154), [@macsko](https://github.com/macsko)) [SIG Scheduling] +- Fixed broken shell completion for api resources. ([#133771](https://github.com/kubernetes/kubernetes/pull/133771), [@marckhouzam](https://github.com/marckhouzam)) [SIG CLI] +- Fixed validation error when ConfigFlags has CertFile and (or) KeyFile and original config also contains CertFileData and (or) KeyFileData. ([#133917](https://github.com/kubernetes/kubernetes/pull/133917), [@n2h9](https://github.com/n2h9)) [SIG API Machinery and CLI] +- Fixes a possible data race during metrics registration ([#134390](https://github.com/kubernetes/kubernetes/pull/134390), [@liggitt](https://github.com/liggitt)) [SIG Architecture and Instrumentation] +- Implicit extended resource name derived from device class (deviceclass.resource.kubernetes.io/) can be used to request DRA devices matching the device class. ([#133363](https://github.com/kubernetes/kubernetes/pull/133363), [@yliaog](https://github.com/yliaog)) [SIG Node, Scheduling and Testing] +- Kube-apiserver: Fixes a 1.34 regression with spurious "Error getting keys" log messages ([#133817](https://github.com/kubernetes/kubernetes/pull/133817), [@serathius](https://github.com/serathius)) [SIG API Machinery and Etcd] +- Kube-apiserver: Fixes a possible 1.34 performance regression calculating object size statistics for resources not served from the watch cache, typically only Events ([#133873](https://github.com/kubernetes/kubernetes/pull/133873), [@serathius](https://github.com/serathius)) [SIG API Machinery and Etcd] +- Kube-apiserver: improve the validation error message shown for custom resources with CEL validation rules to include the value that failed validation ([#132798](https://github.com/kubernetes/kubernetes/pull/132798), [@cbandy](https://github.com/cbandy)) [SIG API Machinery] +- Kube-controller-manager: Fixes a possible data race in the garbage collection controller ([#134379](https://github.com/kubernetes/kubernetes/pull/134379), [@liggitt](https://github.com/liggitt)) [SIG API Machinery and Apps] +- Kubeadm: ensured waiting for apiserver uses a local client that doesn't reach to the control plane endpoint and instead reaches directly to the local API server endpoint. ([#134265](https://github.com/kubernetes/kubernetes/pull/134265), [@neolit123](https://github.com/neolit123)) [SIG Cluster Lifecycle] +- Kubeadm: fix KUBEADM_UPGRADE_DRYRUN_DIR not honored in upgrade phase when writing kubelet config files ([#134007](https://github.com/kubernetes/kubernetes/pull/134007), [@carlory](https://github.com/carlory)) [SIG Cluster Lifecycle] +- Kubeadm: fixed a bug where the node registration information for a given node was not fetched correctly during "kubeadm upgrade node" and the node name can end up being incorrect in cases where the node name is not the same as the host name. ([#134319](https://github.com/kubernetes/kubernetes/pull/134319), [@neolit123](https://github.com/neolit123)) [SIG Cluster Lifecycle] +- Kubeadm: fixed bug where v1beta3's ClusterConfiguration.APIServer.TimeoutForControlPlane is not respected in newer versions of kubeadm where v1beta4 is the default. ([#133513](https://github.com/kubernetes/kubernetes/pull/133513), [@tom1299](https://github.com/tom1299)) [SIG Cluster Lifecycle] +- Kubelet: the connection to a DRA driver became unusable because of an internal deadlock when a connection was idle for 30 minutes. ([#133926](https://github.com/kubernetes/kubernetes/pull/133926), [@pohly](https://github.com/pohly)) [SIG Node] +- Pod can have multiple volumes reference the same PVC ([#122140](https://github.com/kubernetes/kubernetes/pull/122140), [@huww98](https://github.com/huww98)) [SIG Node, Storage and Testing] +- Previously, `kubectl scale` returned the error message `error: no objects passed to scale "" not found` when the specified resource did not exist. + For consistency with other commands(e.g. `kubectl get`), it has been changed to just return `Error from server (NotFound): "" not found`. ([#134017](https://github.com/kubernetes/kubernetes/pull/134017), [@mochizuki875](https://github.com/mochizuki875)) [SIG CLI] +- Promote VAC API test to conformance ([#133615](https://github.com/kubernetes/kubernetes/pull/133615), [@carlory](https://github.com/carlory)) [SIG Architecture, Storage and Testing] +- Remove incorrectly printed warning for SessionAffinity whenever a headless service is creater or updated ([#134054](https://github.com/kubernetes/kubernetes/pull/134054), [@Peac36](https://github.com/Peac36)) [SIG Network] +- The SchedulerAsyncAPICalls feature gate has been disabled to mitigate a bug where its interaction with asynchronous preemption in could degrade kube-scheduler performance, particularly under high kube-apiserver load. ([#134400](https://github.com/kubernetes/kubernetes/pull/134400), [@macsko](https://github.com/macsko)) [SIG Scheduling] +- When image garbage collection is unable to free enough disk space, the FreeDiskSpaceFailed warning event is now more actionable. Example: `Insufficient free disk space on the node's image filesystem (95.0% of 10.0 GiB used). Failed to free sufficient space by deleting unused images. Consider resizing the disk or deleting unused files.` ([#132578](https://github.com/kubernetes/kubernetes/pull/132578), [@drigz](https://github.com/drigz)) [SIG Node] + +### Other (Cleanup or Flake) + +- Bump addon manager to use kubectl v1.32.2 ([#130548](https://github.com/kubernetes/kubernetes/pull/130548), [@Jefftree](https://github.com/Jefftree)) [SIG Cloud Provider, Scalability and Testing] +- Dropping the experimental prefix from kubectl wait command's short description, since kubectl wait command has been stable for a long time. ([#133907](https://github.com/kubernetes/kubernetes/pull/133907), [@ardaguclu](https://github.com/ardaguclu)) [SIG CLI] +- Fix formatting of assorted go API deprecations for godoc / pkgsite and enable a linter to help catch mis-formatted deprecations ([#133571](https://github.com/kubernetes/kubernetes/pull/133571), [@BenTheElder](https://github.com/BenTheElder)) [SIG API Machinery, Architecture, CLI, Instrumentation and Testing] +- Improved HPA performance when using container-specific resource metrics by optimizing container lookup logic to exit early once the target container is found, reducing unnecessary iterations through all containers in a pod. ([#133415](https://github.com/kubernetes/kubernetes/pull/133415), [@AadiDev005](https://github.com/AadiDev005)) [SIG Apps and Autoscaling] +- Kube-apiserver: Fixes an issue where passing invalid DeleteOptions incorrectly returned status 500 rather than 400. ([#133358](https://github.com/kubernetes/kubernetes/pull/133358), [@ostrain](https://github.com/ostrain)) [SIG API Machinery] +- Kubeadm: removed the `RootlessControlPlane` feature gate. User Namespaces will serve as its replacement. ([#134178](https://github.com/kubernetes/kubernetes/pull/134178), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG Cluster Lifecycle] +- Remove container name from messages for container created and started events. ([#134043](https://github.com/kubernetes/kubernetes/pull/134043), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG Node] +- Removed deprecated gogo protocol definitions from `k8s.io/kubelet/pkg/apis/dra` in favor of `google.golang.org/protobuf`. ([#133026](https://github.com/kubernetes/kubernetes/pull/133026), [@saschagrunert](https://github.com/saschagrunert)) [SIG API Machinery and Node] +- Removed general available feature-gate SizeMemoryBackedVolumes ([#133720](https://github.com/kubernetes/kubernetes/pull/133720), [@carlory](https://github.com/carlory)) [SIG Node, Storage and Testing] +- Removed the `ComponentSLIs` feature gate, which had been promoted to stable as part of the Kubernetes 1.32 release. ([#133742](https://github.com/kubernetes/kubernetes/pull/133742), [@carlory](https://github.com/carlory)) [SIG Architecture and Instrumentation] +- Removing Experimental prefix from the description of kubectl wait to emphasize that it is stable. ([#133731](https://github.com/kubernetes/kubernetes/pull/133731), [@ardaguclu](https://github.com/ardaguclu)) [SIG CLI] +- Removing the KUBECTL_OPENAPIV3_PATCH environment variable entirely, since aggregated discovery has been stable from 1.30. ([#134130](https://github.com/kubernetes/kubernetes/pull/134130), [@ardaguclu](https://github.com/ardaguclu)) [SIG CLI] +- Specifies the deprecated version of apiserver_storage_objects metric in metrics docs ([#134028](https://github.com/kubernetes/kubernetes/pull/134028), [@richabanker](https://github.com/richabanker)) [SIG API Machinery, Etcd and Instrumentation] +- Tests: switch to https://go.dev/doc/go1.25#container-aware-gomaxprocs from go.uber.org/automaxprocs ([#133492](https://github.com/kubernetes/kubernetes/pull/133492), [@BenTheElder](https://github.com/BenTheElder)) [SIG Testing] +- The `/statusz` page for `kube-proxy` now includes a list of exposed endpoints, making it easier to debug and introspect. ([#133190](https://github.com/kubernetes/kubernetes/pull/133190), [@aman4433](https://github.com/aman4433)) [SIG Network and Node] +- Types in k/k/pkg/scheduler/framework: + Handle, + Plugin, + PreEnqueuePlugin, QueueSortPlugin, EnqueueExtensions, PreFilterExtensions, PreFilterPlugin, FilterPlugin, PostFilterPlugin, PreScorePlugin, ScorePlugin, ReservePlugin, PreBindPlugin, PostBindPlugin, PermitPlugin, BindPlugin, + PodActivator, PodNominator, PluginsRunner, + LessFunc, ScoreExtensions, NodeToStatusReader, NodeScoreList, NodeScore, NodePluginScores, PluginScore, NominatingMode, NominatingInfo, WaitingPod, PreFilterResult, PostFilterResult, + Extender, + NodeInfoLister, StorageInfoLister, SharedLister, ResourceSliceLister, DeviceClassLister, ResourceClaimTracker, SharedDRAManager + + are moved to package k8s.io/kube-scheduler/framework . Users should update import paths. The interfaces don't change. + + Type Parallelizer in k/k/pkg/scheduler/framework/parallelism is split into interface Parallelizer (in k8s.io/kube-scheduler/framework) and struct Parallelizer (location unchanged in k/k). Plugin developers should update the import path to staging repo. ([#133172](https://github.com/kubernetes/kubernetes/pull/133172), [@ania-borowiec](https://github.com/ania-borowiec)) [SIG Node, Release, Scheduling, Storage and Testing] +- Updated CNI plugins to v1.8.0. ([#133837](https://github.com/kubernetes/kubernetes/pull/133837), [@saschagrunert](https://github.com/saschagrunert)) [SIG Cloud Provider, Node and Testing] +- Updated cri-tools to v1.34.0. ([#133636](https://github.com/kubernetes/kubernetes/pull/133636), [@saschagrunert](https://github.com/saschagrunert)) [SIG Cloud Provider] +- Updated etcd to v3.6.5. ([#134251](https://github.com/kubernetes/kubernetes/pull/134251), [@joshjms](https://github.com/joshjms)) [SIG API Machinery, Cloud Provider, Cluster Lifecycle, Etcd and Testing] +- Upgrade CoreDNS to v1.12.3 ([#132288](https://github.com/kubernetes/kubernetes/pull/132288), [@thevilledev](https://github.com/thevilledev)) [SIG Cloud Provider and Cluster Lifecycle] +- `kubectl auth reconcile` now re-attempts reconciliation if it encounters a conflict error ([#133323](https://github.com/kubernetes/kubernetes/pull/133323), [@liggitt](https://github.com/liggitt)) [SIG Auth and CLI] +- `kubectl get` and `kubectl describe` human-readable output no longer includes counts for referenced tokens and secrets ([#117160](https://github.com/kubernetes/kubernetes/pull/117160), [@liggitt](https://github.com/liggitt)) [SIG CLI and Testing] + +## Dependencies + +### Added +- github.com/moby/sys/atomicwriter: [v0.1.0](https://github.com/moby/sys/tree/atomicwriter/v0.1.0) +- golang.org/x/tools/go/expect: v0.1.1-deprecated +- golang.org/x/tools/go/packages/packagestest: v0.1.1-deprecated + +### Changed +- cloud.google.com/go/compute/metadata: v0.6.0 → v0.7.0 +- github.com/aws/aws-sdk-go-v2/config: [v1.27.24 → v1.29.14](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.24...config/v1.29.14) +- github.com/aws/aws-sdk-go-v2/credentials: [v1.17.24 → v1.17.67](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.17.24...credentials/v1.17.67) +- github.com/aws/aws-sdk-go-v2/feature/ec2/imds: [v1.16.9 → v1.16.30](https://github.com/aws/aws-sdk-go-v2/compare/feature/ec2/imds/v1.16.9...feature/ec2/imds/v1.16.30) +- github.com/aws/aws-sdk-go-v2/internal/configsources: [v1.3.13 → v1.3.34](https://github.com/aws/aws-sdk-go-v2/compare/internal/configsources/v1.3.13...internal/configsources/v1.3.34) +- github.com/aws/aws-sdk-go-v2/internal/endpoints/v2: [v2.6.13 → v2.6.34](https://github.com/aws/aws-sdk-go-v2/compare/internal/endpoints/v2/v2.6.13...internal/endpoints/v2/v2.6.34) +- github.com/aws/aws-sdk-go-v2/internal/ini: [v1.8.0 → v1.8.3](https://github.com/aws/aws-sdk-go-v2/compare/internal/ini/v1.8.0...internal/ini/v1.8.3) +- github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding: [v1.11.3 → v1.12.3](https://github.com/aws/aws-sdk-go-v2/compare/service/internal/accept-encoding/v1.11.3...service/internal/accept-encoding/v1.12.3) +- github.com/aws/aws-sdk-go-v2/service/internal/presigned-url: [v1.11.15 → v1.12.15](https://github.com/aws/aws-sdk-go-v2/compare/service/internal/presigned-url/v1.11.15...service/internal/presigned-url/v1.12.15) +- github.com/aws/aws-sdk-go-v2/service/sso: [v1.22.1 → v1.25.3](https://github.com/aws/aws-sdk-go-v2/compare/service/sso/v1.22.1...service/sso/v1.25.3) +- github.com/aws/aws-sdk-go-v2/service/ssooidc: [v1.26.2 → v1.30.1](https://github.com/aws/aws-sdk-go-v2/compare/service/ssooidc/v1.26.2...service/ssooidc/v1.30.1) +- github.com/aws/aws-sdk-go-v2/service/sts: [v1.30.1 → v1.33.19](https://github.com/aws/aws-sdk-go-v2/compare/service/sts/v1.30.1...service/sts/v1.33.19) +- github.com/aws/aws-sdk-go-v2: [v1.30.1 → v1.36.3](https://github.com/aws/aws-sdk-go-v2/compare/v1.30.1...v1.36.3) +- github.com/aws/smithy-go: [v1.20.3 → v1.22.3](https://github.com/aws/smithy-go/compare/v1.20.3...v1.22.3) +- github.com/containerd/containerd/api: [v1.8.0 → v1.9.0](https://github.com/containerd/containerd/compare/api/v1.8.0...api/v1.9.0) +- github.com/containerd/ttrpc: [v1.2.6 → v1.2.7](https://github.com/containerd/ttrpc/compare/v1.2.6...v1.2.7) +- github.com/containerd/typeurl/v2: [v2.2.2 → v2.2.3](https://github.com/containerd/typeurl/compare/v2.2.2...v2.2.3) +- github.com/coredns/corefile-migration: [v1.0.26 → v1.0.27](https://github.com/coredns/corefile-migration/compare/v1.0.26...v1.0.27) +- github.com/docker/docker: [v26.1.4+incompatible → v28.2.2+incompatible](https://github.com/docker/docker/compare/v26.1.4...v28.2.2) +- github.com/go-logr/logr: [v1.4.2 → v1.4.3](https://github.com/go-logr/logr/compare/v1.4.2...v1.4.3) +- github.com/google/cadvisor: [v0.52.1 → v0.53.0](https://github.com/google/cadvisor/compare/v0.52.1...v0.53.0) +- github.com/opencontainers/cgroups: [v0.0.1 → v0.0.3](https://github.com/opencontainers/cgroups/compare/v0.0.1...v0.0.3) +- github.com/opencontainers/runc: [v1.2.5 → v1.3.0](https://github.com/opencontainers/runc/compare/v1.2.5...v1.3.0) +- github.com/opencontainers/runtime-spec: [v1.2.0 → v1.2.1](https://github.com/opencontainers/runtime-spec/compare/v1.2.0...v1.2.1) +- github.com/prometheus/client_golang: [v1.22.0 → v1.23.2](https://github.com/prometheus/client_golang/compare/v1.22.0...v1.23.2) +- github.com/prometheus/client_model: [v0.6.1 → v0.6.2](https://github.com/prometheus/client_model/compare/v0.6.1...v0.6.2) +- github.com/prometheus/common: [v0.62.0 → v0.66.1](https://github.com/prometheus/common/compare/v0.62.0...v0.66.1) +- github.com/prometheus/procfs: [v0.15.1 → v0.16.1](https://github.com/prometheus/procfs/compare/v0.15.1...v0.16.1) +- github.com/spf13/cobra: [v1.9.1 → v1.10.0](https://github.com/spf13/cobra/compare/v1.9.1...v1.10.0) +- github.com/spf13/pflag: [v1.0.6 → v1.0.9](https://github.com/spf13/pflag/compare/v1.0.6...v1.0.9) +- github.com/stretchr/testify: [v1.10.0 → v1.11.1](https://github.com/stretchr/testify/compare/v1.10.0...v1.11.1) +- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp: v0.58.0 → v0.61.0 +- go.opentelemetry.io/otel/metric: v1.35.0 → v1.36.0 +- go.opentelemetry.io/otel/sdk/metric: v1.34.0 → v1.36.0 +- go.opentelemetry.io/otel/sdk: v1.34.0 → v1.36.0 +- go.opentelemetry.io/otel/trace: v1.35.0 → v1.36.0 +- go.opentelemetry.io/otel: v1.35.0 → v1.36.0 +- golang.org/x/crypto: v0.36.0 → v0.41.0 +- golang.org/x/mod: v0.21.0 → v0.27.0 +- golang.org/x/net: v0.38.0 → v0.43.0 +- golang.org/x/oauth2: v0.27.0 → v0.30.0 +- golang.org/x/sync: v0.12.0 → v0.16.0 +- golang.org/x/sys: v0.31.0 → v0.35.0 +- golang.org/x/telemetry: bda5523 → 1a19826 +- golang.org/x/term: v0.30.0 → v0.34.0 +- golang.org/x/text: v0.23.0 → v0.28.0 +- golang.org/x/tools: v0.26.0 → v0.36.0 +- google.golang.org/genproto/googleapis/rpc: a0af3ef → 200df99 +- google.golang.org/grpc: v1.72.1 → v1.72.2 +- google.golang.org/protobuf: v1.36.5 → v1.36.8 +- gopkg.in/evanphx/json-patch.v4: v4.12.0 → v4.13.0 +- k8s.io/gengo/v2: 85fd79d → ec3ebc5 +- k8s.io/kube-openapi: f3f2b99 → 589584f +- k8s.io/system-validators: v1.10.1 → v1.11.1 +- sigs.k8s.io/json: cfa47c3 → 2d32026 + +### Removed +- gopkg.in/yaml.v2: v2.4.0 \ No newline at end of file diff --git a/CHANGELOG/README.md b/CHANGELOG/README.md index b4a7e01f97a69..c587a652174a0 100644 --- a/CHANGELOG/README.md +++ b/CHANGELOG/README.md @@ -1,5 +1,6 @@ # CHANGELOGs +- [CHANGELOG-1.35.md](./CHANGELOG-1.35.md) - [CHANGELOG-1.34.md](./CHANGELOG-1.34.md) - [CHANGELOG-1.33.md](./CHANGELOG-1.33.md) - [CHANGELOG-1.32.md](./CHANGELOG-1.32.md) diff --git a/OWNERS b/OWNERS index 905df925d42d2..00ca8b940ed3f 100644 --- a/OWNERS +++ b/OWNERS @@ -18,9 +18,9 @@ filters: - smarterclayton - thockin - wojtek-t - # go.{mod,sum} files relate to go dependencies, and should be reviewed by the - # dep-approvers - "go\\.(mod|sum)$": + # go.{mod,sum,work,work.sum} files relate to go dependencies, + # and should be reviewed by the dep-approvers + "go\\.(mod|sum|work|work\\.sum)$": approvers: - dep-approvers reviewers: diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index d3166c3fadbc4..a480509442290 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -179,6 +179,7 @@ aliases: - dom4ha - macsko - sanposhiho + - utam0k - kerthcet # emeritus: # - adtac @@ -249,6 +250,7 @@ aliases: - dims - endocrimes - feiskyer + - HirazawaUi - mtaufen - sjenning - wzshiming @@ -269,6 +271,7 @@ aliases: - kannon92 - ffromani - tallclair + - natasha41575 sig-network-approvers: - aojea - bowei @@ -310,10 +313,14 @@ aliases: # - tnozicka sig-autoscaling-maintainers: + - adrianmoisey - gjtempleton - jackfrancis - - raywainman - towca + # emeritus + # - maciekpytel + # - mwielgus + # - raywainman sig-instrumentation-approvers: - logicalhan - dashpole @@ -460,11 +467,22 @@ aliases: - MadhavJivrajani - mfahlandt - Priyankasaggu11929 + # See https://github.com/kubernetes/org/blob/main/OWNERS_ALIASES + # for the authoritative list of SIG Docs leads, or look for + # https://github.com/kubernetes/website/blob/main/OWNERS_ALIASES + # for the list that this was derived from. SIG Docs' leads can + # confirm modifications here. sig-docs-approvers: - - jimangel - - kbhawkey - - onlydole - - sftim + - dipesh-rawat + - divya-mohan0209 + - katcosgrove + - lmktfy + - natalisucks + - nate-double-u + - reylejano + - salaxander + - SayakMukhopadhyay + - tengqm sig-node-api-reviewers: - dchen1107 - derekwaynecarr @@ -512,8 +530,8 @@ aliases: dep-reviewers: - logicalhan feature-approvers: + - adrianmoisey # Autoscaling - andrewsykim # Cloud Provider - - ahg-g # Scheduling - ardaguclu # CLI - aojea # Network, Testing - danwinship # Network @@ -523,9 +541,11 @@ aliases: - derekwaynecarr # Node - dgrisonnet # Instrumentation - dims # Architecture + - dom4ha # Scheduling - eddiezane # CLI - enj # Auth - gjtempleton # Autoscaling + - jackfrancis # Autoscaling - janetkuo # Apps - jayunit100 # Windows - jpbetz # API Machinery @@ -536,7 +556,7 @@ aliases: - liggitt # Auth - logicalhan # Instrumentation - luxas # Cluster Lifecycle - - maciekpytel # Autoscaling + - macsko # Scheduling - marosset # Windows - mikezappa87 # Network - mrunalp # Node @@ -544,12 +564,14 @@ aliases: - rexagod # Instrumentation - richabanker # Instrumentation - saad-ali # Storage + - sanposhiho # Scheduling - sergeykanzhelev # Node - shaneutt # Network - soltysh # Apps, CLI - sttts # API Machinery - tallclair # Auth - thockin # Network + - towca # Autoscaling - xing-yang # Storage - wojtek-t # Scalability # conformance aliases https://git.k8s.io/enhancements/keps/sig-architecture/20190412-conformance-behaviors.md diff --git a/api/api-rules/aggregator_violation_exceptions.list b/api/api-rules/aggregator_violation_exceptions.list index 8f1c9408a636a..403bff328f00c 100644 --- a/api/api-rules/aggregator_violation_exceptions.list +++ b/api/api-rules/aggregator_violation_exceptions.list @@ -1,3 +1,9 @@ +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,Format +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,d +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,i +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,s +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,int64Amount,scale +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,int64Amount,value API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,APIResourceList,APIResources API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Duration,Duration API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Object diff --git a/api/api-rules/apiextensions_violation_exceptions.list b/api/api-rules/apiextensions_violation_exceptions.list index 9f9227be5ce0e..34b860195553b 100644 --- a/api/api-rules/apiextensions_violation_exceptions.list +++ b/api/api-rules/apiextensions_violation_exceptions.list @@ -29,6 +29,12 @@ API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiexten API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaPropsOrBool,Schema API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaPropsOrStringArray,Property API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaPropsOrStringArray,Schema +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,Format +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,d +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,i +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,s +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,int64Amount,scale +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,int64Amount,value API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,APIResourceList,APIResources API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Duration,Duration API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Object diff --git a/api/api-rules/codegen_violation_exceptions.list b/api/api-rules/codegen_violation_exceptions.list index 8f1c9408a636a..eeee5ba290fa3 100644 --- a/api/api-rules/codegen_violation_exceptions.list +++ b/api/api-rules/codegen_violation_exceptions.list @@ -1,3 +1,9 @@ +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,Format +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,d +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,i +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,s +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,int64Amount,scale +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,int64Amount,value API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,APIResourceList,APIResources API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Duration,Duration API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Object @@ -7,3 +13,5 @@ API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,StatusCause API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Time,Time API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentEncoding API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentType +API rule violation: names_match,k8s.io/code-generator/examples/apiserver/apis/example/v1,ConversionCustom,privateField +API rule violation: names_match,k8s.io/code-generator/examples/apiserver/apis/example/v1,ConversionPrivate,privateField diff --git a/api/api-rules/sample_apiserver_violation_exceptions.list b/api/api-rules/sample_apiserver_violation_exceptions.list index 8f1c9408a636a..403bff328f00c 100644 --- a/api/api-rules/sample_apiserver_violation_exceptions.list +++ b/api/api-rules/sample_apiserver_violation_exceptions.list @@ -1,3 +1,9 @@ +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,Format +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,d +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,i +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,s +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,int64Amount,scale +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,int64Amount,value API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,APIResourceList,APIResources API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Duration,Duration API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Object diff --git a/api/api-rules/violation_exceptions.list b/api/api-rules/violation_exceptions.list index 61824bff581ff..e7337aa2a0a28 100644 --- a/api/api-rules/violation_exceptions.list +++ b/api/api-rules/violation_exceptions.list @@ -147,6 +147,8 @@ API rule violation: names_match,k8s.io/cloud-provider/config/v1alpha1,KubeCloudS API rule violation: names_match,k8s.io/cloud-provider/config/v1alpha1,KubeCloudSharedConfiguration,RouteReconciliationPeriod API rule violation: names_match,k8s.io/cloud-provider/config/v1alpha1,KubeCloudSharedConfiguration,UseServiceAccountCredentials API rule violation: names_match,k8s.io/cloud-provider/config/v1alpha1,WebhookConfiguration,Webhooks +API rule violation: names_match,k8s.io/cloud-provider/controllers/node/config/v1alpha1,NodeControllerConfiguration,ConcurrentNodeSyncs +API rule violation: names_match,k8s.io/cloud-provider/controllers/service/config/v1alpha1,ServiceControllerConfiguration,ConcurrentServiceSyncs API rule violation: names_match,k8s.io/controller-manager/config/v1alpha1,GenericControllerManagerConfiguration,Address API rule violation: names_match,k8s.io/controller-manager/config/v1alpha1,GenericControllerManagerConfiguration,ClientConnection API rule violation: names_match,k8s.io/controller-manager/config/v1alpha1,GenericControllerManagerConfiguration,ControllerStartInterval diff --git a/api/discovery/apis__admissionregistration.k8s.io__v1alpha1.json b/api/discovery/apis__admissionregistration.k8s.io__v1alpha1.json index 13f98d6a8aa0d..d8e54bcfe2597 100644 --- a/api/discovery/apis__admissionregistration.k8s.io__v1alpha1.json +++ b/api/discovery/apis__admissionregistration.k8s.io__v1alpha1.json @@ -11,7 +11,7 @@ "name": "mutatingadmissionpolicies", "namespaced": false, "singularName": "mutatingadmissionpolicy", - "storageVersionHash": "lP2+lF8aHIY=", + "storageVersionHash": "LYmCf+UMVdg=", "verbs": [ "create", "delete", @@ -31,7 +31,7 @@ "name": "mutatingadmissionpolicybindings", "namespaced": false, "singularName": "mutatingadmissionpolicybinding", - "storageVersionHash": "Q2Qe566oRi8=", + "storageVersionHash": "90V5FRZZ3Zg=", "verbs": [ "create", "delete", diff --git a/api/discovery/apis__admissionregistration.k8s.io__v1beta1.json b/api/discovery/apis__admissionregistration.k8s.io__v1beta1.json index 26fbd2f7303d2..47eb7c592ca73 100644 --- a/api/discovery/apis__admissionregistration.k8s.io__v1beta1.json +++ b/api/discovery/apis__admissionregistration.k8s.io__v1beta1.json @@ -11,7 +11,7 @@ "name": "mutatingadmissionpolicies", "namespaced": false, "singularName": "mutatingadmissionpolicy", - "storageVersionHash": "lP2+lF8aHIY=", + "storageVersionHash": "LYmCf+UMVdg=", "verbs": [ "create", "delete", @@ -31,7 +31,7 @@ "name": "mutatingadmissionpolicybindings", "namespaced": false, "singularName": "mutatingadmissionpolicybinding", - "storageVersionHash": "Q2Qe566oRi8=", + "storageVersionHash": "90V5FRZZ3Zg=", "verbs": [ "create", "delete", diff --git a/api/discovery/apis__resource.k8s.io__v1.json b/api/discovery/apis__resource.k8s.io__v1.json index 41f9470526510..8a3337939b6e5 100644 --- a/api/discovery/apis__resource.k8s.io__v1.json +++ b/api/discovery/apis__resource.k8s.io__v1.json @@ -8,7 +8,7 @@ "name": "deviceclasses", "namespaced": false, "singularName": "deviceclass", - "storageVersionHash": "weQRMT6DeYM=", + "storageVersionHash": "Yk2PTc1Ybxk=", "verbs": [ "create", "delete", @@ -25,7 +25,7 @@ "name": "resourceclaims", "namespaced": true, "singularName": "resourceclaim", - "storageVersionHash": "EJAWH5WrAYg=", + "storageVersionHash": "wgAZaHcZxUg=", "verbs": [ "create", "delete", @@ -53,7 +53,7 @@ "name": "resourceclaimtemplates", "namespaced": true, "singularName": "resourceclaimtemplate", - "storageVersionHash": "24m0okHrUtk=", + "storageVersionHash": "TuzjC49aUfM=", "verbs": [ "create", "delete", @@ -70,7 +70,7 @@ "name": "resourceslices", "namespaced": false, "singularName": "resourceslice", - "storageVersionHash": "z6Bc9vgk6yE=", + "storageVersionHash": "KsC072WgaEY=", "verbs": [ "create", "delete", diff --git a/api/discovery/apis__resource.k8s.io__v1beta1.json b/api/discovery/apis__resource.k8s.io__v1beta1.json index 7be02cb32efcf..aef0a9d134fd4 100644 --- a/api/discovery/apis__resource.k8s.io__v1beta1.json +++ b/api/discovery/apis__resource.k8s.io__v1beta1.json @@ -8,7 +8,7 @@ "name": "deviceclasses", "namespaced": false, "singularName": "deviceclass", - "storageVersionHash": "weQRMT6DeYM=", + "storageVersionHash": "Yk2PTc1Ybxk=", "verbs": [ "create", "delete", @@ -25,7 +25,7 @@ "name": "resourceclaims", "namespaced": true, "singularName": "resourceclaim", - "storageVersionHash": "EJAWH5WrAYg=", + "storageVersionHash": "wgAZaHcZxUg=", "verbs": [ "create", "delete", @@ -53,7 +53,7 @@ "name": "resourceclaimtemplates", "namespaced": true, "singularName": "resourceclaimtemplate", - "storageVersionHash": "24m0okHrUtk=", + "storageVersionHash": "TuzjC49aUfM=", "verbs": [ "create", "delete", @@ -70,7 +70,7 @@ "name": "resourceslices", "namespaced": false, "singularName": "resourceslice", - "storageVersionHash": "z6Bc9vgk6yE=", + "storageVersionHash": "KsC072WgaEY=", "verbs": [ "create", "delete", diff --git a/api/discovery/apis__resource.k8s.io__v1beta2.json b/api/discovery/apis__resource.k8s.io__v1beta2.json index c263ff9dcaf13..02e161222486b 100644 --- a/api/discovery/apis__resource.k8s.io__v1beta2.json +++ b/api/discovery/apis__resource.k8s.io__v1beta2.json @@ -8,7 +8,7 @@ "name": "deviceclasses", "namespaced": false, "singularName": "deviceclass", - "storageVersionHash": "weQRMT6DeYM=", + "storageVersionHash": "Yk2PTc1Ybxk=", "verbs": [ "create", "delete", @@ -25,7 +25,7 @@ "name": "resourceclaims", "namespaced": true, "singularName": "resourceclaim", - "storageVersionHash": "EJAWH5WrAYg=", + "storageVersionHash": "wgAZaHcZxUg=", "verbs": [ "create", "delete", @@ -53,7 +53,7 @@ "name": "resourceclaimtemplates", "namespaced": true, "singularName": "resourceclaimtemplate", - "storageVersionHash": "24m0okHrUtk=", + "storageVersionHash": "TuzjC49aUfM=", "verbs": [ "create", "delete", @@ -70,7 +70,7 @@ "name": "resourceslices", "namespaced": false, "singularName": "resourceslice", - "storageVersionHash": "z6Bc9vgk6yE=", + "storageVersionHash": "KsC072WgaEY=", "verbs": [ "create", "delete", diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 305a8a0ee5dcf..28043b8fedfe4 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -4771,8 +4771,7 @@ } }, "required": [ - "type", - "status" + "type" ], "type": "object" }, @@ -4987,8 +4986,7 @@ "request": { "description": "request contains an x509 certificate signing request encoded in a \"CERTIFICATE REQUEST\" PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded.", "format": "byte", - "type": "string", - "x-kubernetes-list-type": "atomic" + "type": "string" }, "signerName": { "description": "signerName indicates the requested signer, and is a qualified name.\n\nList/watch requests for CertificateSigningRequests can filter on this field using a \"spec.signerName=NAME\" fieldSelector.\n\nWell-known Kubernetes signers are:\n 1. \"kubernetes.io/kube-apiserver-client\": issues client certificates that can be used to authenticate to kube-apiserver.\n Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 2. \"kubernetes.io/kube-apiserver-client-kubelet\": issues client certificates that kubelets use to authenticate to kube-apiserver.\n Requests for this signer can be auto-approved by the \"csrapproving\" controller in kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 3. \"kubernetes.io/kubelet-serving\" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely.\n Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n\nMore details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers\n\nCustom signerNames can also be specified. The signer defines:\n 1. Trust distribution: how trust (CA bundles) are distributed.\n 2. Permitted subjects: and behavior when a disallowed subject is requested.\n 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested.\n 4. Required, permitted, or forbidden key usages / extended key usages.\n 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin.\n 6. Whether or not requests for CA certificates are allowed.", @@ -5023,8 +5021,7 @@ "certificate": { "description": "certificate is populated with an issued certificate by the signer after an Approved condition is present. This field is set via the /status subresource. Once populated, this field is immutable.\n\nIf the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty.\n\nValidation requirements:\n 1. certificate must contain one or more PEM blocks.\n 2. All PEM blocks must have the \"CERTIFICATE\" label, contain no headers, and the encoded data\n must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280.\n 3. Non-PEM content may appear before or after the \"CERTIFICATE\" PEM blocks and is unvalidated,\n to allow for explanatory text as described in section 5.2 of RFC7468.\n\nIf more than one PEM block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes.\n\nThe certificate is encoded in PEM format.\n\nWhen serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of:\n\n base64(\n -----BEGIN CERTIFICATE-----\n ...\n -----END CERTIFICATE-----\n )", "format": "byte", - "type": "string", - "x-kubernetes-list-type": "atomic" + "type": "string" }, "conditions": { "description": "conditions applied to the request. Known conditions are \"Approved\", \"Denied\", and \"Failed\".", @@ -9228,7 +9225,7 @@ }, "resources": { "$ref": "#/definitions/io.k8s.api.core.v1.VolumeResourceRequirements", - "description": "resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources" + "description": "resources represents the minimum resources the volume should have. Users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources" }, "selector": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", @@ -9268,7 +9265,7 @@ "additionalProperties": { "type": "string" }, - "description": "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + "description": "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.", "type": "object", "x-kubernetes-map-type": "granular" }, @@ -9276,7 +9273,7 @@ "additionalProperties": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" }, - "description": "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + "description": "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.", "type": "object" }, "capacity": { @@ -9737,7 +9734,7 @@ "type": "string" }, "observedGeneration": { - "description": "If set, this represents the .metadata.generation that the pod condition was set based upon. This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field.", + "description": "If set, this represents the .metadata.generation that the pod condition was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.", "format": "int64", "type": "integer" }, @@ -10183,7 +10180,7 @@ "x-kubernetes-list-type": "atomic" }, "resourceClaims": { - "description": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.", + "description": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is a stable field but requires that the DynamicResourceAllocation feature gate is enabled.\n\nThis field is immutable.", "items": { "$ref": "#/definitions/io.k8s.api.core.v1.PodResourceClaim" }, @@ -10361,7 +10358,7 @@ "type": "string" }, "observedGeneration": { - "description": "If set, this represents the .metadata.generation that the pod status was set based upon. This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field.", + "description": "If set, this represents the .metadata.generation that the pod status was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.", "format": "int64", "type": "integer" }, @@ -15231,7 +15228,7 @@ "type": "string" }, "driver": { - "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "networkData": { @@ -15795,7 +15792,7 @@ "type": "string" }, "driver": { - "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "pool": { @@ -16009,7 +16006,7 @@ "description": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", "properties": { "driver": { - "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "parameters": { @@ -16360,7 +16357,7 @@ "x-kubernetes-list-type": "atomic" }, "driver": { - "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. This field is immutable.", "type": "string" }, "nodeName": { @@ -16580,7 +16577,7 @@ "type": "string" }, "driver": { - "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "networkData": { @@ -17187,7 +17184,7 @@ "type": "string" }, "driver": { - "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "pool": { @@ -17355,7 +17352,7 @@ "description": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", "properties": { "driver": { - "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "parameters": { @@ -17706,7 +17703,7 @@ "x-kubernetes-list-type": "atomic" }, "driver": { - "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. This field is immutable.", "type": "string" }, "nodeName": { @@ -17763,7 +17760,7 @@ "type": "string" }, "driver": { - "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "networkData": { @@ -18327,7 +18324,7 @@ "type": "string" }, "driver": { - "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "pool": { @@ -18541,7 +18538,7 @@ "description": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", "properties": { "driver": { - "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "parameters": { @@ -18892,7 +18889,7 @@ "x-kubernetes-list-type": "atomic" }, "driver": { - "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. This field is immutable.", "type": "string" }, "nodeName": { @@ -21657,8 +21654,7 @@ }, "details": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails", - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/api__v1_openapi.json b/api/openapi-spec/v3/api__v1_openapi.json index e97c10daeafab..0934afc4c3d85 100644 --- a/api/openapi-spec/v3/api__v1_openapi.json +++ b/api/openapi-spec/v3/api__v1_openapi.json @@ -4655,7 +4655,7 @@ } ], "default": {}, - "description": "resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources" + "description": "resources represents the minimum resources the volume should have. Users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources" }, "selector": { "allOf": [ @@ -4701,7 +4701,7 @@ "default": "", "type": "string" }, - "description": "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + "description": "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.", "type": "object", "x-kubernetes-map-type": "granular" }, @@ -4709,7 +4709,7 @@ "additionalProperties": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.api.resource.Quantity" }, - "description": "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + "description": "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.", "type": "object" }, "capacity": { @@ -5358,7 +5358,7 @@ "type": "string" }, "observedGeneration": { - "description": "If set, this represents the .metadata.generation that the pod condition was set based upon. This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field.", + "description": "If set, this represents the .metadata.generation that the pod condition was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.", "format": "int64", "type": "integer" }, @@ -5900,7 +5900,7 @@ "x-kubernetes-list-type": "atomic" }, "resourceClaims": { - "description": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.", + "description": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is a stable field but requires that the DynamicResourceAllocation feature gate is enabled.\n\nThis field is immutable.", "items": { "allOf": [ { @@ -6140,7 +6140,7 @@ "type": "string" }, "observedGeneration": { - "description": "If set, this represents the .metadata.generation that the pod status was set based upon. This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field.", + "description": "If set, this represents the .metadata.generation that the pod status was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.", "format": "int64", "type": "integer" }, @@ -9745,8 +9745,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json index 8052dfe74be3e..004c570e034e9 100644 --- a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json @@ -1935,8 +1935,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1alpha1_openapi.json index 58ce51a89a79f..94841628c86df 100644 --- a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1alpha1_openapi.json @@ -1299,8 +1299,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1beta1_openapi.json index fd68d7687caf2..0c0644ee92c02 100644 --- a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1beta1_openapi.json @@ -1301,8 +1301,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json index 515e9554b1220..b9cbf11df8ac7 100644 --- a/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json @@ -1601,8 +1601,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__apiregistration.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__apiregistration.k8s.io__v1_openapi.json index 93a04cde7c05b..bfd795f42b3eb 100644 --- a/api/openapi-spec/v3/apis__apiregistration.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__apiregistration.k8s.io__v1_openapi.json @@ -734,8 +734,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__apps__v1_openapi.json b/api/openapi-spec/v3/apis__apps__v1_openapi.json index 4224213dd3981..ec97d3d2f2a19 100644 --- a/api/openapi-spec/v3/apis__apps__v1_openapi.json +++ b/api/openapi-spec/v3/apis__apps__v1_openapi.json @@ -3342,7 +3342,7 @@ } ], "default": {}, - "description": "resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources" + "description": "resources represents the minimum resources the volume should have. Users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources" }, "selector": { "allOf": [ @@ -3388,7 +3388,7 @@ "default": "", "type": "string" }, - "description": "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + "description": "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.", "type": "object", "x-kubernetes-map-type": "granular" }, @@ -3396,7 +3396,7 @@ "additionalProperties": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.api.resource.Quantity" }, - "description": "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + "description": "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.", "type": "object" }, "capacity": { @@ -4074,7 +4074,7 @@ "x-kubernetes-list-type": "atomic" }, "resourceClaims": { - "description": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.", + "description": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is a stable field but requires that the DynamicResourceAllocation feature gate is enabled.\n\nThis field is immutable.", "items": { "allOf": [ { @@ -6343,8 +6343,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json b/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json index e89070b446384..de5809629f8f8 100644 --- a/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json +++ b/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json @@ -927,8 +927,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json b/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json index 011a562d396f0..fa805f5b8b2b7 100644 --- a/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json +++ b/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json @@ -1644,8 +1644,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__batch__v1_openapi.json b/api/openapi-spec/v3/apis__batch__v1_openapi.json index fb22cbf0f978e..200e4372ee45a 100644 --- a/api/openapi-spec/v3/apis__batch__v1_openapi.json +++ b/api/openapi-spec/v3/apis__batch__v1_openapi.json @@ -582,8 +582,7 @@ } }, "required": [ - "type", - "status" + "type" ], "type": "object" }, @@ -2606,7 +2605,7 @@ } ], "default": {}, - "description": "resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources" + "description": "resources represents the minimum resources the volume should have. Users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources" }, "selector": { "allOf": [ @@ -3266,7 +3265,7 @@ "x-kubernetes-list-type": "atomic" }, "resourceClaims": { - "description": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.", + "description": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is a stable field but requires that the DynamicResourceAllocation feature gate is enabled.\n\nThis field is immutable.", "items": { "allOf": [ { @@ -5535,8 +5534,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json index 41ca88bd80dd4..f00d40f6e8a5d 100644 --- a/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json @@ -170,8 +170,7 @@ "request": { "description": "request contains an x509 certificate signing request encoded in a \"CERTIFICATE REQUEST\" PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded.", "format": "byte", - "type": "string", - "x-kubernetes-list-type": "atomic" + "type": "string" }, "signerName": { "default": "", @@ -208,8 +207,7 @@ "certificate": { "description": "certificate is populated with an issued certificate by the signer after an Approved condition is present. This field is set via the /status subresource. Once populated, this field is immutable.\n\nIf the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty.\n\nValidation requirements:\n 1. certificate must contain one or more PEM blocks.\n 2. All PEM blocks must have the \"CERTIFICATE\" label, contain no headers, and the encoded data\n must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280.\n 3. Non-PEM content may appear before or after the \"CERTIFICATE\" PEM blocks and is unvalidated,\n to allow for explanatory text as described in section 5.2 of RFC7468.\n\nIf more than one PEM block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes.\n\nThe certificate is encoded in PEM format.\n\nWhen serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of:\n\n base64(\n -----BEGIN CERTIFICATE-----\n ...\n -----END CERTIFICATE-----\n )", "format": "byte", - "type": "string", - "x-kubernetes-list-type": "atomic" + "type": "string" }, "conditions": { "description": "conditions applied to the request. Known conditions are \"Approved\", \"Denied\", and \"Failed\".", @@ -963,8 +961,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__certificates.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__certificates.k8s.io__v1alpha1_openapi.json index 1efa34f31a57d..c5e2cbd30fcda 100644 --- a/api/openapi-spec/v3/apis__certificates.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__certificates.k8s.io__v1alpha1_openapi.json @@ -1101,8 +1101,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__certificates.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__certificates.k8s.io__v1beta1_openapi.json index 45bbb790eae56..44f877123edba 100644 --- a/api/openapi-spec/v3/apis__certificates.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__certificates.k8s.io__v1beta1_openapi.json @@ -839,8 +839,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json index 448c4a9489f59..91eba56d5aac6 100644 --- a/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json @@ -867,8 +867,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__coordination.k8s.io__v1alpha2_openapi.json b/api/openapi-spec/v3/apis__coordination.k8s.io__v1alpha2_openapi.json index 6b694293851db..e63671f595a1f 100644 --- a/api/openapi-spec/v3/apis__coordination.k8s.io__v1alpha2_openapi.json +++ b/api/openapi-spec/v3/apis__coordination.k8s.io__v1alpha2_openapi.json @@ -868,8 +868,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__coordination.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__coordination.k8s.io__v1beta1_openapi.json index 6a1f8bd4136b3..dd6ca31bdee01 100644 --- a/api/openapi-spec/v3/apis__coordination.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__coordination.k8s.io__v1beta1_openapi.json @@ -868,8 +868,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json index 8ca040b7709a4..10ff32b23e4f3 100644 --- a/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json @@ -1044,8 +1044,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json index 051bf84f328a0..b0ec6ff6effc5 100644 --- a/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json @@ -977,8 +977,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1_openapi.json index 830ce2752b42e..465f5b484bc05 100644 --- a/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1_openapi.json @@ -1463,8 +1463,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json index 202f941fdde24..c8bceacd3aa8e 100644 --- a/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json @@ -953,8 +953,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json index 6ff4af4efeee0..46399d81164b8 100644 --- a/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json @@ -1894,8 +1894,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json index dcb2896679058..63d43d7684eb5 100644 --- a/api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json @@ -1039,8 +1039,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json index 91a759a67dc50..74d6e09e89e83 100644 --- a/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json @@ -912,8 +912,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__policy__v1_openapi.json b/api/openapi-spec/v3/apis__policy__v1_openapi.json index 66d0497458421..ac9e1fcd0c2d7 100644 --- a/api/openapi-spec/v3/apis__policy__v1_openapi.json +++ b/api/openapi-spec/v3/apis__policy__v1_openapi.json @@ -1031,8 +1031,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json index c30bb6c3262cb..75b786b6b1958 100644 --- a/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json @@ -1304,8 +1304,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__resource.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__resource.k8s.io__v1_openapi.json index 7b6a4c9ad9e0d..bf6f7f06f4440 100644 --- a/api/openapi-spec/v3/apis__resource.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__resource.k8s.io__v1_openapi.json @@ -120,7 +120,7 @@ }, "driver": { "default": "", - "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "networkData": { @@ -859,7 +859,7 @@ }, "driver": { "default": "", - "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "pool": { @@ -1124,7 +1124,7 @@ "properties": { "driver": { "default": "", - "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "parameters": { @@ -1585,7 +1585,7 @@ }, "driver": { "default": "", - "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. This field is immutable.", "type": "string" }, "nodeName": { @@ -2423,8 +2423,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json index 94ce67310b565..d9ae092ba9682 100644 --- a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json +++ b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json @@ -942,8 +942,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__resource.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__resource.k8s.io__v1beta1_openapi.json index 6a36dfaefa453..30d9c9c502891 100644 --- a/api/openapi-spec/v3/apis__resource.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__resource.k8s.io__v1beta1_openapi.json @@ -120,7 +120,7 @@ }, "driver": { "default": "", - "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "networkData": { @@ -917,7 +917,7 @@ }, "driver": { "default": "", - "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "pool": { @@ -1121,7 +1121,7 @@ "properties": { "driver": { "default": "", - "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "parameters": { @@ -1582,7 +1582,7 @@ }, "driver": { "default": "", - "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. This field is immutable.", "type": "string" }, "nodeName": { @@ -2420,8 +2420,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__resource.k8s.io__v1beta2_openapi.json b/api/openapi-spec/v3/apis__resource.k8s.io__v1beta2_openapi.json index 91b13fd164ab4..df6d6de9ecffa 100644 --- a/api/openapi-spec/v3/apis__resource.k8s.io__v1beta2_openapi.json +++ b/api/openapi-spec/v3/apis__resource.k8s.io__v1beta2_openapi.json @@ -120,7 +120,7 @@ }, "driver": { "default": "", - "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "networkData": { @@ -859,7 +859,7 @@ }, "driver": { "default": "", - "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "pool": { @@ -1124,7 +1124,7 @@ "properties": { "driver": { "default": "", - "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "type": "string" }, "parameters": { @@ -1585,7 +1585,7 @@ }, "driver": { "default": "", - "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. This field is immutable.", "type": "string" }, "nodeName": { @@ -2423,8 +2423,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json index a731c1571b16e..1cd5c85c2a648 100644 --- a/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json @@ -830,8 +830,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json index 6369f7164d49d..b9326333d12a2 100644 --- a/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json @@ -2850,8 +2850,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json index 75f42f5b76585..5c33d7571e59f 100644 --- a/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json @@ -825,8 +825,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__storage.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__storage.k8s.io__v1beta1_openapi.json index d785e010cb018..65cb0f7ea7e38 100644 --- a/api/openapi-spec/v3/apis__storage.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__storage.k8s.io__v1beta1_openapi.json @@ -825,8 +825,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/api/openapi-spec/v3/apis__storagemigration.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__storagemigration.k8s.io__v1alpha1_openapi.json index 33767db9a4712..062e1bd92030e 100644 --- a/api/openapi-spec/v3/apis__storagemigration.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__storagemigration.k8s.io__v1alpha1_openapi.json @@ -937,8 +937,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" } ], - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "x-kubernetes-list-type": "atomic" + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/build/build-image/cross/VERSION b/build/build-image/cross/VERSION index fc8bcd43d9d76..64259d44e6bfd 100644 --- a/build/build-image/cross/VERSION +++ b/build/build-image/cross/VERSION @@ -1 +1 @@ -v1.34.0-go1.24.6-bullseye.0 +v1.35.0-go1.25.1-bullseye.0 \ No newline at end of file diff --git a/build/common.sh b/build/common.sh index 38c20f5ffbb84..cf58de3d187fa 100755 --- a/build/common.sh +++ b/build/common.sh @@ -97,17 +97,39 @@ readonly KUBE_RSYNC_PORT="${KUBE_RSYNC_PORT:-}" readonly KUBE_CONTAINER_RSYNC_PORT=8730 # These are the default versions (image tags) for their respective base images. -readonly __default_distroless_iptables_version=v0.7.8 -readonly __default_go_runner_version=v2.4.0-go1.24.6-bookworm.0 +readonly __default_distroless_iptables_version=v0.8.2 +readonly __default_go_runner_version=v2.4.0-go1.25.1-bookworm.0 readonly __default_setcap_version=bookworm-v1.0.4 -# These are the base images for the Docker-wrapped binaries. +# The default image for all binaries which are dynamically linked. +# Includes everything that is required by kube-proxy, which uses it +# by default. Other commands only use this when dynamically linking +# them gets requested. +readonly __default_dynamic_base_image="$KUBE_BASE_IMAGE_REGISTRY/distroless-iptables:$__default_distroless_iptables_version" + +# KUBE_GORUNNER_IMAGE is the default image for commands which are built statically. +# It can be overridden to change the image for all such commands. +# When the per-command env variable is set, that env variable is +# used without considering KUBE_GORUNNER_IMAGE. readonly KUBE_GORUNNER_IMAGE="${KUBE_GORUNNER_IMAGE:-$KUBE_BASE_IMAGE_REGISTRY/go-runner:$__default_go_runner_version}" -readonly KUBE_APISERVER_BASE_IMAGE="${KUBE_APISERVER_BASE_IMAGE:-$KUBE_GORUNNER_IMAGE}" -readonly KUBE_CONTROLLER_MANAGER_BASE_IMAGE="${KUBE_CONTROLLER_MANAGER_BASE_IMAGE:-$KUBE_GORUNNER_IMAGE}" -readonly KUBE_SCHEDULER_BASE_IMAGE="${KUBE_SCHEDULER_BASE_IMAGE:-$KUBE_GORUNNER_IMAGE}" -readonly KUBE_PROXY_BASE_IMAGE="${KUBE_PROXY_BASE_IMAGE:-$KUBE_BASE_IMAGE_REGISTRY/distroless-iptables:$__default_distroless_iptables_version}" -readonly KUBECTL_BASE_IMAGE="${KUBECTL_BASE_IMAGE:-$KUBE_GORUNNER_IMAGE}" + +# __default_base_image takes the canonical build target for a Kubernetes command (e.g. k8s.io/kubernetes/cmd/kube-scheduler) +# and prints the right default base image for it, depending on whether that command gets built dynamically or statically. +__default_base_image() { + if kube::golang::is_statically_linked "$1"; then + echo "$KUBE_GORUNNER_IMAGE" + else + echo "$__default_dynamic_base_image" + fi +} + +# These are the base images for the Docker-wrapped binaries. +# These can be overridden on a case-by-case basis. +readonly KUBE_APISERVER_BASE_IMAGE="${KUBE_APISERVER_BASE_IMAGE:-$(__default_base_image k8s.io/kubernetes/cmd/kube-apiserver)}" +readonly KUBE_CONTROLLER_MANAGER_BASE_IMAGE="${KUBE_CONTROLLER_MANAGER_BASE_IMAGE:-$(__default_base_image k8s.io/kubernetes/cmd/kube-controller-manager)}" +readonly KUBE_SCHEDULER_BASE_IMAGE="${KUBE_SCHEDULER_BASE_IMAGE:-$(__default_base_image k8s.io/kubernetes/cmd/kube-scheduler)}" +readonly KUBE_PROXY_BASE_IMAGE="${KUBE_PROXY_BASE_IMAGE:-$__default_dynamic_base_image}" +readonly KUBECTL_BASE_IMAGE="${KUBECTL_BASE_IMAGE:-$(__default_base_image k8s.io/kubernetes/cmd/kubectl)}" # This is the image used in a multi-stage build to apply capabilities to Docker-wrapped binaries. readonly KUBE_BUILD_SETCAP_IMAGE="${KUBE_BUILD_SETCAP_IMAGE:-$KUBE_BASE_IMAGE_REGISTRY/setcap:$__default_setcap_version}" @@ -369,8 +391,14 @@ function kube::build::clean() { if [[ -d "${LOCAL_OUTPUT_ROOT}" ]]; then kube::log::status "Removing _output directory" - # this ensures we can clean _output/local/go/cache which is not rw by default - chmod -R +w "${LOCAL_OUTPUT_ROOT}" + # This ensures we can clean _output/local/go/cache which is not rw by default. + # + # We only do this path specifically instead of the entire output root + # because recursive chmod is slow. + # We don't need to do this at all for dockerized builds + if [[ -d "${LOCAL_OUTPUT_ROOT}/local/go/cache" ]]; then + chmod -R +w "${LOCAL_OUTPUT_ROOT}/local/go/cache" + fi rm -rf "${LOCAL_OUTPUT_ROOT}" fi } @@ -540,6 +568,7 @@ function kube::build::run_build_command_ex() { --env "KUBE_BUILD_PLATFORMS=${KUBE_BUILD_PLATFORMS:-}" --env "KUBE_CGO_OVERRIDES=' ${KUBE_CGO_OVERRIDES[*]:-} '" --env "KUBE_STATIC_OVERRIDES=' ${KUBE_STATIC_OVERRIDES[*]:-} '" + --env "KUBE_RACE=${KUBE_RACE:-}" --env "FORCE_HOST_GO=${FORCE_HOST_GO:-}" --env "GO_VERSION=${GO_VERSION:-}" --env "GOTOOLCHAIN=${GOTOOLCHAIN:-}" @@ -677,6 +706,8 @@ function kube::build::sync_to_container() { # are hidden from rsync so they will be deleted in the target container if # they exist. This will allow them to be re-created in the container if # necessary. + # PLEASE DO NOT ADD TO THIS + # https://github.com/kubernetes/kubernetes/issues/112862 kube::build::rsync \ --delete \ --filter='- /_tmp/' \ @@ -701,13 +732,13 @@ function kube::build::copy_output() { # # We are looking to copy out all of the built binaries along with various # generated files. + # PLEASE DO NOT ADD TO THIS + # https://github.com/kubernetes/kubernetes/issues/112862 kube::build::rsync \ --prune-empty-dirs \ --filter='- /_temp/' \ --filter='+ /vendor/' \ - --filter='+ /staging/***/Godeps/**' \ --filter='+ /_output/dockerized/bin/**' \ - --filter='- /_output/dockerized/go/**' \ --filter='+ zz_generated.*' \ --filter='+ generated.proto' \ --filter='+ *.pb.go' \ diff --git a/build/dependencies.yaml b/build/dependencies.yaml index d4c736f25ec27..272db97e47cd5 100644 --- a/build/dependencies.yaml +++ b/build/dependencies.yaml @@ -18,7 +18,7 @@ dependencies: # CNI plugins - name: "cni" - version: 1.7.1 + version: 1.8.0 refPaths: - path: cluster/gce/config-common.sh match: WINDOWS_CNI_VERSION= @@ -31,7 +31,7 @@ dependencies: # CoreDNS - name: "coredns-kube-up" - version: 1.12.1 + version: 1.12.3 refPaths: - path: cluster/addons/dns/coredns/coredns.yaml.base match: registry.k8s.io/coredns @@ -41,14 +41,14 @@ dependencies: match: registry.k8s.io/coredns - name: "coredns-kubeadm" - version: 1.12.1 + version: 1.12.3 refPaths: - path: cmd/kubeadm/app/constants/constants.go match: CoreDNSVersion = # CRI Tools - name: "crictl" - version: 1.33.0 + version: 1.34.0 refPaths: - path: cluster/gce/windows/k8s-node-setup.psm1 match: CRICTL_VERSION = @@ -64,7 +64,7 @@ dependencies: # etcd - name: "etcd" - version: 3.6.4 + version: 3.6.5 refPaths: - path: cluster/gce/manifests/etcd.manifest match: etcd_docker_tag|etcd_version @@ -75,7 +75,7 @@ dependencies: - path: hack/lib/etcd.sh match: ETCD_VERSION= - path: staging/src/k8s.io/sample-apiserver/artifacts/example/deployment.yaml - match: gcr.io/etcd-development/etcd + match: registry.k8s.io/etcd - path: test/utils/image/manifest.go match: configs\[Etcd\] = Config{list\.GcEtcdRegistry, "etcd", "\d+\.\d+.\d+(-(alpha|beta|rc).\d+)?(-\d+)?"} @@ -87,7 +87,7 @@ dependencies: - path: cluster/images/etcd/migrate/options.go - name: "node-problem-detector" - version: 0.8.21 + version: 1.34.0 refPaths: - path: test/e2e_node/image_list.go match: const defaultImage @@ -117,7 +117,7 @@ dependencies: # Golang # TODO: this should really be eliminated and controlled by .go-version - name: "golang: upstream version" - version: 1.24.6 + version: 1.25.1 refPaths: - path: .go-version - path: build/build-image/cross/VERSION @@ -131,14 +131,14 @@ dependencies: # pass when building Kubernetes using a pre-release of Golang. - name: "golang: 1." - version: 1.24 + version: 1.25 refPaths: - path: build/build-image/cross/VERSION - path: hack/lib/golang.sh match: minimum_go_version=go([0-9]+\.[0-9]+) - name: "registry.k8s.io/kube-cross: dependents" - version: v1.34.0-go1.24.6-bullseye.0 + version: v1.35.0-go1.25.1-bullseye.0 refPaths: - path: build/build-image/cross/VERSION @@ -174,7 +174,7 @@ dependencies: match: registry\.k8s\.io\/build-image\/debian-base:[a-zA-Z]+\-v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?) - name: "registry.k8s.io/distroless-iptables: dependents" - version: v0.7.8 + version: v0.8.2 refPaths: - path: build/common.sh match: __default_distroless_iptables_version= @@ -182,7 +182,7 @@ dependencies: match: configs\[DistrolessIptables\] = Config{list\.BuildImageRegistry, "distroless-iptables", "v([0-9]+)\.([0-9]+)\.([0-9]+)"} - name: "registry.k8s.io/go-runner: dependents" - version: v2.4.0-go1.24.6-bookworm.0 + version: v2.4.0-go1.25.1-bookworm.0 refPaths: - path: build/common.sh match: __default_go_runner_version= @@ -238,6 +238,8 @@ dependencies: match: registry.k8s.io\/pause:\d+\.\d+ - path: test/utils/image/manifest.go match: configs\[Pause\] = Config{list\.GcRegistry, "pause", "\d+\.\d+(.\d+)?"} + - path: test/images/agnhost/fakeregistryserver/images.txt + match: pause\s - name: "registry.k8s.io/build-image/setcap: dependents" version: bookworm-v1.0.4 diff --git a/build/lib/release.sh b/build/lib/release.sh index 1bf19257d5350..4a086bdb39d94 100644 --- a/build/lib/release.sh +++ b/build/lib/release.sh @@ -332,7 +332,7 @@ function kube::release::create_docker_images_for_server() { docker_file_path="${KUBE_ROOT}/build/server-image/${binary_name}/Dockerfile" fi - kube::log::status "Starting docker build for image: ${binary_name}-${arch}" + kube::log::status "Starting docker build for image: ${binary_name}-${arch} with base ${base_image}" ( rm -rf "${docker_build_path}" mkdir -p "${docker_build_path}" diff --git a/build/make-clean.sh b/build/make-clean.sh index b3f567490a6b8..24c6e38b68d63 100755 --- a/build/make-clean.sh +++ b/build/make-clean.sh @@ -22,5 +22,4 @@ set -o pipefail KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. source "${KUBE_ROOT}/build/common.sh" -kube::build::verify_prereqs false kube::build::clean diff --git a/cluster/addons/dns/coredns/coredns.yaml.base b/cluster/addons/dns/coredns/coredns.yaml.base index df61a856d7eb3..47e94d169b628 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.base +++ b/cluster/addons/dns/coredns/coredns.yaml.base @@ -133,7 +133,7 @@ spec: kubernetes.io/os: linux containers: - name: coredns - image: registry.k8s.io/coredns/coredns:v1.12.1 + image: registry.k8s.io/coredns/coredns:v1.12.3 imagePullPolicy: IfNotPresent resources: limits: diff --git a/cluster/addons/dns/coredns/coredns.yaml.in b/cluster/addons/dns/coredns/coredns.yaml.in index 525737b81a3a6..a9476e1868ef6 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.in +++ b/cluster/addons/dns/coredns/coredns.yaml.in @@ -133,7 +133,7 @@ spec: kubernetes.io/os: linux containers: - name: coredns - image: registry.k8s.io/coredns/coredns:v1.12.1 + image: registry.k8s.io/coredns/coredns:v1.12.3 imagePullPolicy: IfNotPresent resources: limits: diff --git a/cluster/addons/dns/coredns/coredns.yaml.sed b/cluster/addons/dns/coredns/coredns.yaml.sed index 6504762d8e104..deb299c5331da 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.sed +++ b/cluster/addons/dns/coredns/coredns.yaml.sed @@ -133,7 +133,7 @@ spec: kubernetes.io/os: linux containers: - name: coredns - image: registry.k8s.io/coredns/coredns:v1.12.1 + image: registry.k8s.io/coredns/coredns:v1.12.3 imagePullPolicy: IfNotPresent resources: limits: diff --git a/cluster/addons/ip-masq-agent/ip-masq-agent.yaml b/cluster/addons/ip-masq-agent/ip-masq-agent.yaml index 341966825e631..60302036ec046 100644 --- a/cluster/addons/ip-masq-agent/ip-masq-agent.yaml +++ b/cluster/addons/ip-masq-agent/ip-masq-agent.yaml @@ -29,7 +29,7 @@ spec: hostNetwork: true containers: - name: ip-masq-agent - image: registry.k8s.io/networking/ip-masq-agent:v2.9.3 + image: registry.k8s.io/networking/ip-masq-agent:v2.12.0 args: - --masq-chain=IP-MASQ - --nomasq-all-reserved-ranges diff --git a/cluster/addons/kube-network-policies/kube-network-policies.yaml b/cluster/addons/kube-network-policies/kube-network-policies.yaml index 0dd1abd284903..de416a73dec11 100644 --- a/cluster/addons/kube-network-policies/kube-network-policies.yaml +++ b/cluster/addons/kube-network-policies/kube-network-policies.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: kube-network-policies containers: - name: kube-network-policies - image: registry.k8s.io/networking/kube-network-policies:v0.7.0 + image: registry.k8s.io/networking/kube-network-policies:v0.9.2 command: - /bin/netpol - --v=4 diff --git a/cluster/addons/metrics-server/metrics-server-deployment.yaml b/cluster/addons/metrics-server/metrics-server-deployment.yaml index 89169d0f41763..b979e9f21e831 100644 --- a/cluster/addons/metrics-server/metrics-server-deployment.yaml +++ b/cluster/addons/metrics-server/metrics-server-deployment.yaml @@ -23,23 +23,23 @@ data: apiVersion: apps/v1 kind: Deployment metadata: - name: metrics-server-v0.7.2 + name: metrics-server-v0.8.0 namespace: kube-system labels: k8s-app: metrics-server addonmanager.kubernetes.io/mode: Reconcile - version: v0.7.2 + version: v0.8.0 spec: selector: matchLabels: k8s-app: metrics-server - version: v0.7.2 + version: v0.8.0 template: metadata: name: metrics-server labels: k8s-app: metrics-server - version: v0.7.2 + version: v0.8.0 spec: securityContext: seccompProfile: @@ -50,7 +50,7 @@ spec: kubernetes.io/os: linux containers: - name: metrics-server - image: registry.k8s.io/metrics-server/metrics-server:v0.7.2 + image: registry.k8s.io/metrics-server/metrics-server:v0.8.0 command: - /metrics-server - --metric-resolution=15s @@ -81,7 +81,7 @@ spec: - mountPath: /tmp name: tmp-dir - name: metrics-server-nanny - image: registry.k8s.io/autoscaling/addon-resizer:1.8.14 + image: registry.k8s.io/autoscaling/addon-resizer:1.8.20 resources: limits: cpu: 100m @@ -109,7 +109,7 @@ spec: - --memory={{ base_metrics_server_memory }} - --extra-memory={{ metrics_server_memory_per_node }}Mi - --threshold=5 - - --deployment=metrics-server-v0.7.2 + - --deployment=metrics-server-v0.8.0 - --container=metrics-server - --poll-period=30000 - --estimator=exponential diff --git a/cluster/addons/node-problem-detector/npd.yaml b/cluster/addons/node-problem-detector/npd.yaml index 20af9a1aa49d5..838106be1bf1f 100644 --- a/cluster/addons/node-problem-detector/npd.yaml +++ b/cluster/addons/node-problem-detector/npd.yaml @@ -30,24 +30,24 @@ metadata: namespace: kube-system labels: app.kubernetes.io/name: node-problem-detector - app.kubernetes.io/version: v0.8.21 + app.kubernetes.io/version: v1.34.0 addonmanager.kubernetes.io/mode: Reconcile spec: selector: matchLabels: app.kubernetes.io/name: node-problem-detector - app.kubernetes.io/version: v0.8.21 + app.kubernetes.io/version: v1.34.0 template: metadata: labels: app.kubernetes.io/name: node-problem-detector - app.kubernetes.io/version: v0.8.21 + app.kubernetes.io/version: v1.34.0 spec: nodeSelectors: kubernetes.io/os: linux containers: - name: node-problem-detector - image: registry.k8s.io/node-problem-detector/node-problem-detector:v0.8.21 + image: registry.k8s.io/node-problem-detector/node-problem-detector:v1.34.0 command: - "/bin/sh" - "-c" diff --git a/cluster/gce/config-common.sh b/cluster/gce/config-common.sh index 101848f3ffbfd..e50985fc54bcd 100644 --- a/cluster/gce/config-common.sh +++ b/cluster/gce/config-common.sh @@ -136,7 +136,7 @@ export WINDOWS_CNI_CONFIG_DIR="${WINDOWS_K8S_DIR}\cni\config" # CNI storage path for Windows nodes export WINDOWS_CNI_STORAGE_PATH="https://github.com/containernetworking/plugins/releases/download" # CNI version for Windows nodes -export WINDOWS_CNI_VERSION="v1.7.1" +export WINDOWS_CNI_VERSION="v1.8.0" # Pod manifests directory for Windows nodes on Windows nodes. export WINDOWS_MANIFESTS_DIR="${WINDOWS_K8S_DIR}\manifests" # Directory where cert/key files will be stores on Windows nodes. diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index ab7804bcfae1a..2e26d07786c0c 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -88,7 +88,7 @@ fi # By default, the latest image from the image family will be used unless an # explicit image will be set. GCI_VERSION=${KUBE_GCI_VERSION:-} -IMAGE_FAMILY=${KUBE_IMAGE_FAMILY:-cos-109-lts} +IMAGE_FAMILY=${KUBE_IMAGE_FAMILY:-cos-121-lts} export MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-} export MASTER_IMAGE_FAMILY=${KUBE_GCE_MASTER_IMAGE_FAMILY:-${IMAGE_FAMILY}} export MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-cos-cloud} diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index d950f67bddb6d..983898458478b 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -101,7 +101,7 @@ ALLOWED_NOTREADY_NODES=${ALLOWED_NOTREADY_NODES:-$(($(get-num-nodes) / 100))} # By default, the latest image from the image family will be used unless an # explicit image will be set. GCI_VERSION=${KUBE_GCI_VERSION:-} -IMAGE_FAMILY=${KUBE_IMAGE_FAMILY:-cos-109-lts} +IMAGE_FAMILY=${KUBE_IMAGE_FAMILY:-cos-121-lts} export MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-} export MASTER_IMAGE_FAMILY=${KUBE_GCE_MASTER_IMAGE_FAMILY:-${IMAGE_FAMILY}} export MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-cos-cloud} diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index c21361817f7ef..d819de8649cfb 100755 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -1963,10 +1963,14 @@ def resolve(host): fi sed -i -e "s@{{ *etcd_protocol *}}@$etcd_protocol@g" "${temp_file}" sed -i -e "s@{{ *etcd_apiserver_protocol *}}@$etcd_apiserver_protocol@g" "${temp_file}" - sed -i -e "s@{{ *etcd_creds *}}@$etcd_creds@g" "${temp_file}" + + etcd_creds_and_extra_args="${etcd_creds} ${etcd_apiserver_creds} ${etcd_extra_args}" + etcd_creds_and_extra_args=$(echo "$etcd_creds_and_extra_args" | awk '{for (i=1;i<=NF;i++) printf "\"%s\"%s", $i, (i>/var/log/etcd{{ suffix }}.log 2>&1; fi; exec /usr/local/bin/etcd --name etcd-{{ hostname }} --listen-peer-urls {{ etcd_protocol }}://{{ host_ip }}:{{ server_port }} --initial-advertise-peer-urls {{ etcd_protocol }}://{{ hostname }}:{{ server_port }} --advertise-client-urls {{ etcd_apiserver_protocol }}://127.0.0.1:{{ port }} --listen-client-urls {{ etcd_apiserver_protocol }}://{{ listen_client_ip }}:{{ port }} {{ quota_bytes }} --data-dir /var/etcd/data{{ suffix }} --initial-cluster-state {{ cluster_state }} --initial-cluster {{ etcd_cluster }} {{ etcd_creds }} {{ etcd_apiserver_creds }} {{ etcd_extra_args }} 1>>/var/log/etcd{{ suffix }}.log 2>&1" - ], + "/usr/local/bin/etcd", + "--name=etcd-{{ hostname }}", + "--listen-peer-urls={{ etcd_protocol }}://{{ host_ip }}:{{ server_port }}", + "--initial-advertise-peer-urls={{ etcd_protocol }}://{{ hostname }}:{{ server_port }}", + "--advertise-client-urls={{ etcd_apiserver_protocol }}://127.0.0.1:{{ port }}", + "--listen-client-urls={{ etcd_apiserver_protocol }}://{{ listen_client_ip }}:{{ port }}", + "{{ quota_bytes }}", + "--data-dir=/var/etcd/data{{ suffix }}", + "--initial-cluster-state={{ cluster_state }}", + "--initial-cluster={{ etcd_cluster }}", + "--log-outputs=/var/log/etcd{{ suffix }}.log", + {{ etcd_creds_and_extra_args }} + ], "env": [ { "name": "TARGET_STORAGE", "value": "{{ pillar.get('storage_backend', 'etcd3') }}" }, { "name": "TARGET_VERSION", - "value": "{{ pillar.get('etcd_version', '3.6.4') }}" + "value": "{{ pillar.get('etcd_version', '3.6.5') }}" }, { "name": "DO_NOT_MOVE_BINARIES", @@ -52,12 +61,6 @@ { "name": "INITIAL_ADVERTISE_PEER_URLS", "value": "{{ etcd_protocol }}://{{ hostname }}:{{ server_port }}" }, - { "name": "ETCD_CREDS", - "value": "{{ etcd_creds }}" - }, - { "name": "ETCD_APISERVER_CREDS", - "value": "{{ etcd_apiserver_creds }}" - }, { "name": "ETCD_SNAPSHOT_COUNT", "value": "10000" }, @@ -72,9 +75,12 @@ "livenessProbe": { "exec": { "command": [ - "/bin/sh", - "-c", - "set -x; exec /usr/local/bin/etcdctl --endpoints=127.0.0.1:{{ port }} {{ etcdctl_certs }} --command-timeout=15s endpoint health" + "/usr/local/bin/etcdctl", + "--endpoints=127.0.0.1:{{ port }}", + "--command-timeout=15s", + {{ etcdctl_certs }} + "endpoint", + "health" ] }, "initialDelaySeconds": {{ liveness_probe_initial_delay }}, diff --git a/cluster/gce/manifests/kube-addon-manager.yaml b/cluster/gce/manifests/kube-addon-manager.yaml index bc943e80917d0..ed17b59282534 100644 --- a/cluster/gce/manifests/kube-addon-manager.yaml +++ b/cluster/gce/manifests/kube-addon-manager.yaml @@ -23,7 +23,7 @@ spec: - all # When updating version also bump it in: # - test/kubemark/resources/manifests/kube-addon-manager.yaml - image: registry.k8s.io/addon-manager/kube-addon-manager:v9.1.7 + image: registry.k8s.io/addon-manager/kube-addon-manager:v9.1.8 command: - /bin/bash - -c diff --git a/cluster/gce/upgrade-aliases.sh b/cluster/gce/upgrade-aliases.sh index 417f8a509f5ff..fb88cd80cf652 100755 --- a/cluster/gce/upgrade-aliases.sh +++ b/cluster/gce/upgrade-aliases.sh @@ -170,8 +170,8 @@ export KUBE_GCE_ENABLE_IP_ALIASES=true export SECONDARY_RANGE_NAME="pods-default" export STORAGE_BACKEND="etcd3" export STORAGE_MEDIA_TYPE="application/vnd.kubernetes.protobuf" -export ETCD_IMAGE=3.6.4-0 -export ETCD_VERSION=3.6.4 +export ETCD_IMAGE=3.6.5-0 +export ETCD_VERSION=3.6.5 # Upgrade master with updated kube envs "${KUBE_ROOT}/cluster/gce/upgrade.sh" -M -l diff --git a/cluster/gce/windows/k8s-node-setup.psm1 b/cluster/gce/windows/k8s-node-setup.psm1 index 402c75d1cb698..e3f24b0ff57fc 100644 --- a/cluster/gce/windows/k8s-node-setup.psm1 +++ b/cluster/gce/windows/k8s-node-setup.psm1 @@ -57,8 +57,8 @@ $GCE_METADATA_SERVER = "169.254.169.254" # exist until an initial HNS network has been created on the Windows node - see # Add_InitialHnsNetwork(). $MGMT_ADAPTER_NAME = "vEthernet (Ethernet*" -$CRICTL_VERSION = 'v1.33.0' -$CRICTL_SHA512 = '81c91c76bb9059837e62b33b7df9f1503013a30525fceb248ca379b57c7ad8ba043dbb0432870224ebc42853c740caa422ddd62989b4a58829b66505f8e11969' +$CRICTL_VERSION = 'v1.34.0' +$CRICTL_SHA512 = 'b062756922dc5c5f41c5b13922dfea379cb9f4ce2431d1676c7dbace4f45c28a99ee71fd6cdd6c6f3d7679d33ac0ff052208207fc3f341b4ad047512dad756cb' Import-Module -Force C:\common.psm1 diff --git a/cluster/images/etcd-version-monitor/etcd-version-monitor.go b/cluster/images/etcd-version-monitor/etcd-version-monitor.go index 5dea78eef371b..55ad6fcc17c3b 100644 --- a/cluster/images/etcd-version-monitor/etcd-version-monitor.go +++ b/cluster/images/etcd-version-monitor/etcd-version-monitor.go @@ -25,9 +25,9 @@ import ( "net/http" "time" - "github.com/gogo/protobuf/proto" dto "github.com/prometheus/client_model/go" "github.com/spf13/pflag" + "google.golang.org/protobuf/proto" "k8s.io/component-base/metrics" "k8s.io/component-base/metrics/testutil" diff --git a/cmd/kube-controller-manager/OWNERS b/cmd/kube-controller-manager/OWNERS index 11416b81d12d6..f7c449bbe6465 100644 --- a/cmd/kube-controller-manager/OWNERS +++ b/cmd/kube-controller-manager/OWNERS @@ -33,6 +33,7 @@ reviewers: - thockin - wojtek-t - jpbetz + - jefftree labels: - sig/api-machinery emeritus_approvers: diff --git a/cmd/kube-controller-manager/app/apps.go b/cmd/kube-controller-manager/app/apps.go index 20f9523d050e6..a556ebd4240bf 100644 --- a/cmd/kube-controller-manager/app/apps.go +++ b/cmd/kube-controller-manager/app/apps.go @@ -25,7 +25,6 @@ import ( "time" "k8s.io/client-go/util/flowcontrol" - "k8s.io/controller-manager/controller" "k8s.io/kubernetes/cmd/kube-controller-manager/names" "k8s.io/kubernetes/pkg/controller/daemon" "k8s.io/kubernetes/pkg/controller/deployment" @@ -35,85 +34,115 @@ import ( func newDaemonSetControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.DaemonSetController, - aliases: []string{"daemonset"}, - initFunc: startDaemonSetController, + name: names.DaemonSetController, + aliases: []string{"daemonset"}, + constructor: newDaemonSetController, } } -func startDaemonSetController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { + +func newDaemonSetController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("daemon-set-controller") + if err != nil { + return nil, err + } + dsc, err := daemon.NewDaemonSetsController( ctx, controllerContext.InformerFactory.Apps().V1().DaemonSets(), controllerContext.InformerFactory.Apps().V1().ControllerRevisions(), controllerContext.InformerFactory.Core().V1().Pods(), controllerContext.InformerFactory.Core().V1().Nodes(), - controllerContext.ClientBuilder.ClientOrDie("daemon-set-controller"), + client, flowcontrol.NewBackOff(1*time.Second, 15*time.Minute), ) if err != nil { - return nil, true, fmt.Errorf("error creating DaemonSets controller: %v", err) + return nil, fmt.Errorf("error creating DaemonSets controller: %w", err) } - go dsc.Run(ctx, int(controllerContext.ComponentConfig.DaemonSetController.ConcurrentDaemonSetSyncs)) - return nil, true, nil + + return newControllerLoop(func(ctx context.Context) { + dsc.Run(ctx, int(controllerContext.ComponentConfig.DaemonSetController.ConcurrentDaemonSetSyncs)) + }, controllerName), nil } func newStatefulSetControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.StatefulSetController, - aliases: []string{"statefulset"}, - initFunc: startStatefulSetController, + name: names.StatefulSetController, + aliases: []string{"statefulset"}, + constructor: newStatefulSetController, } } -func startStatefulSetController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - go statefulset.NewStatefulSetController( + +func newStatefulSetController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("statefulset-controller") + if err != nil { + return nil, err + } + + ssc := statefulset.NewStatefulSetController( ctx, controllerContext.InformerFactory.Core().V1().Pods(), controllerContext.InformerFactory.Apps().V1().StatefulSets(), controllerContext.InformerFactory.Core().V1().PersistentVolumeClaims(), controllerContext.InformerFactory.Apps().V1().ControllerRevisions(), - controllerContext.ClientBuilder.ClientOrDie("statefulset-controller"), - ).Run(ctx, int(controllerContext.ComponentConfig.StatefulSetController.ConcurrentStatefulSetSyncs)) - return nil, true, nil + client, + ) + return newControllerLoop(func(ctx context.Context) { + ssc.Run(ctx, int(controllerContext.ComponentConfig.StatefulSetController.ConcurrentStatefulSetSyncs)) + }, controllerName), nil } func newReplicaSetControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.ReplicaSetController, - aliases: []string{"replicaset"}, - initFunc: startReplicaSetController, + name: names.ReplicaSetController, + aliases: []string{"replicaset"}, + constructor: newReplicaSetController, } } -func startReplicaSetController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - go replicaset.NewReplicaSetController( +func newReplicaSetController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("replicaset-controller") + if err != nil { + return nil, err + } + + rsc := replicaset.NewReplicaSetController( ctx, controllerContext.InformerFactory.Apps().V1().ReplicaSets(), controllerContext.InformerFactory.Core().V1().Pods(), - controllerContext.ClientBuilder.ClientOrDie("replicaset-controller"), + client, replicaset.BurstReplicas, - ).Run(ctx, int(controllerContext.ComponentConfig.ReplicaSetController.ConcurrentRSSyncs)) - return nil, true, nil + ) + return newControllerLoop(func(ctx context.Context) { + rsc.Run(ctx, int(controllerContext.ComponentConfig.ReplicaSetController.ConcurrentRSSyncs)) + }, controllerName), nil } func newDeploymentControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.DeploymentController, - aliases: []string{"deployment"}, - initFunc: startDeploymentController, + name: names.DeploymentController, + aliases: []string{"deployment"}, + constructor: newDeploymentController, } } -func startDeploymentController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newDeploymentController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("deployment-controller") + if err != nil { + return nil, err + } + dc, err := deployment.NewDeploymentController( ctx, controllerContext.InformerFactory.Apps().V1().Deployments(), controllerContext.InformerFactory.Apps().V1().ReplicaSets(), controllerContext.InformerFactory.Core().V1().Pods(), - controllerContext.ClientBuilder.ClientOrDie("deployment-controller"), + client, ) if err != nil { - return nil, true, fmt.Errorf("error creating Deployment controller: %v", err) + return nil, fmt.Errorf("error creating Deployment controller: %w", err) } - go dc.Run(ctx, int(controllerContext.ComponentConfig.DeploymentController.ConcurrentDeploymentSyncs)) - return nil, true, nil + + return newControllerLoop(func(ctx context.Context) { + dc.Run(ctx, int(controllerContext.ComponentConfig.DeploymentController.ConcurrentDeploymentSyncs)) + }, controllerName), nil } diff --git a/cmd/kube-controller-manager/app/autoscaling.go b/cmd/kube-controller-manager/app/autoscaling.go index ff0c6d60f30ea..f41592ffc1781 100644 --- a/cmd/kube-controller-manager/app/autoscaling.go +++ b/cmd/kube-controller-manager/app/autoscaling.go @@ -21,14 +21,12 @@ package app import ( "context" - + "fmt" "k8s.io/client-go/dynamic" "k8s.io/client-go/scale" - "k8s.io/controller-manager/controller" "k8s.io/kubernetes/cmd/kube-controller-manager/names" "k8s.io/kubernetes/pkg/controller/podautoscaler" "k8s.io/kubernetes/pkg/controller/podautoscaler/metrics" - resourceclient "k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1" "k8s.io/metrics/pkg/client/custom_metrics" "k8s.io/metrics/pkg/client/external_metrics" @@ -36,47 +34,50 @@ import ( func newHorizontalPodAutoscalerControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.HorizontalPodAutoscalerController, - aliases: []string{"horizontalpodautoscaling"}, - initFunc: startHorizontalPodAutoscalerControllerWithRESTClient, + name: names.HorizontalPodAutoscalerController, + aliases: []string{"horizontalpodautoscaling"}, + constructor: newHorizontalPodAutoscalerController, } } -func startHorizontalPodAutoscalerControllerWithRESTClient(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - - clientConfig := controllerContext.ClientBuilder.ConfigOrDie("horizontal-pod-autoscaler") - hpaClient := controllerContext.ClientBuilder.ClientOrDie("horizontal-pod-autoscaler") - - apiVersionsGetter := custom_metrics.NewAvailableAPIsGetter(hpaClient.Discovery()) - // invalidate the discovery information roughly once per resync interval our API - // information is *at most* two resync intervals old. - go custom_metrics.PeriodicallyInvalidate( - apiVersionsGetter, - controllerContext.ComponentConfig.HPAController.HorizontalPodAutoscalerSyncPeriod.Duration, - ctx.Done()) - - metricsClient := metrics.NewRESTMetricsClient( - resourceclient.NewForConfigOrDie(clientConfig), - custom_metrics.NewForConfig(clientConfig, controllerContext.RESTMapper, apiVersionsGetter), - external_metrics.NewForConfigOrDie(clientConfig), - ) - return startHPAControllerWithMetricsClient(ctx, controllerContext, metricsClient) -} - -func startHPAControllerWithMetricsClient(ctx context.Context, controllerContext ControllerContext, metricsClient metrics.MetricsClient) (controller.Interface, bool, error) { +func newHorizontalPodAutoscalerController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + clientConfig, err := controllerContext.NewClientConfig("horizontal-pod-autoscaler") + if err != nil { + return nil, err + } - hpaClient := controllerContext.ClientBuilder.ClientOrDie("horizontal-pod-autoscaler") - hpaClientConfig := controllerContext.ClientBuilder.ConfigOrDie("horizontal-pod-autoscaler") + hpaClient, err := controllerContext.NewClient("horizontal-pod-autoscaler") + if err != nil { + return nil, err + } // we don't use cached discovery because DiscoveryScaleKindResolver does its own caching, // so we want to re-fetch every time when we actually ask for it scaleKindResolver := scale.NewDiscoveryScaleKindResolver(hpaClient.Discovery()) - scaleClient, err := scale.NewForConfig(hpaClientConfig, controllerContext.RESTMapper, dynamic.LegacyAPIPathResolverFunc, scaleKindResolver) + scaleClient, err := scale.NewForConfig(clientConfig, controllerContext.RESTMapper, dynamic.LegacyAPIPathResolverFunc, scaleKindResolver) + if err != nil { + return nil, fmt.Errorf("failed to init HPA scale client: %w", err) + } + + apiVersionsGetter := custom_metrics.NewAvailableAPIsGetter(hpaClient.Discovery()) + + resourceClient, err := resourceclient.NewForConfig(clientConfig) + if err != nil { + return nil, fmt.Errorf("failed to init the resource client for %s: %w", controllerName, err) + } + + externalMetricsClient, err := external_metrics.NewForConfig(clientConfig) if err != nil { - return nil, false, err + return nil, fmt.Errorf("failed to init the external metrics client for %s: %w", controllerName, err) } - go podautoscaler.NewHorizontalController( + metricsClient := metrics.NewRESTMetricsClient( + resourceClient, + custom_metrics.NewForConfig(clientConfig, controllerContext.RESTMapper, apiVersionsGetter), + externalMetricsClient, + ) + + pas := podautoscaler.NewHorizontalController( ctx, hpaClient.CoreV1(), scaleClient, @@ -90,6 +91,16 @@ func startHPAControllerWithMetricsClient(ctx context.Context, controllerContext controllerContext.ComponentConfig.HPAController.HorizontalPodAutoscalerTolerance, controllerContext.ComponentConfig.HPAController.HorizontalPodAutoscalerCPUInitializationPeriod.Duration, controllerContext.ComponentConfig.HPAController.HorizontalPodAutoscalerInitialReadinessDelay.Duration, - ).Run(ctx, int(controllerContext.ComponentConfig.HPAController.ConcurrentHorizontalPodAutoscalerSyncs)) - return nil, true, nil + ) + return newControllerLoop(concurrentRun( + func(ctx context.Context) { + custom_metrics.PeriodicallyInvalidate( + apiVersionsGetter, + controllerContext.ComponentConfig.HPAController.HorizontalPodAutoscalerSyncPeriod.Duration, + ctx.Done()) + }, + func(ctx context.Context) { + pas.Run(ctx, int(controllerContext.ComponentConfig.HPAController.ConcurrentHorizontalPodAutoscalerSyncs)) + }, + ), controllerName), nil } diff --git a/cmd/kube-controller-manager/app/batch.go b/cmd/kube-controller-manager/app/batch.go index 159aebd82848f..a1ae796755c0c 100644 --- a/cmd/kube-controller-manager/app/batch.go +++ b/cmd/kube-controller-manager/app/batch.go @@ -23,7 +23,6 @@ import ( "context" "fmt" - "k8s.io/controller-manager/controller" "k8s.io/kubernetes/cmd/kube-controller-manager/names" "k8s.io/kubernetes/pkg/controller/cronjob" "k8s.io/kubernetes/pkg/controller/job" @@ -31,43 +30,58 @@ import ( func newJobControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.JobController, - aliases: []string{"job"}, - initFunc: startJobController, + name: names.JobController, + aliases: []string{"job"}, + constructor: newJobController, } } -func startJobController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - jobController, err := job.NewController( +func newJobController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("job-controller") + if err != nil { + return nil, err + } + + jc, err := job.NewController( ctx, controllerContext.InformerFactory.Core().V1().Pods(), controllerContext.InformerFactory.Batch().V1().Jobs(), - controllerContext.ClientBuilder.ClientOrDie("job-controller"), + client, ) if err != nil { - return nil, true, fmt.Errorf("creating Job controller: %v", err) + return nil, fmt.Errorf("creating Job controller: %w", err) } - go jobController.Run(ctx, int(controllerContext.ComponentConfig.JobController.ConcurrentJobSyncs)) - return nil, true, nil + + return newControllerLoop(func(ctx context.Context) { + jc.Run(ctx, int(controllerContext.ComponentConfig.JobController.ConcurrentJobSyncs)) + }, controllerName), nil } func newCronJobControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.CronJobController, - aliases: []string{"cronjob"}, - initFunc: startCronJobController, + name: names.CronJobController, + aliases: []string{"cronjob"}, + constructor: newCronJobController, } } -func startCronJobController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - cj2c, err := cronjob.NewControllerV2(ctx, controllerContext.InformerFactory.Batch().V1().Jobs(), +func newCronJobController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("cronjob-controller") + if err != nil { + return nil, err + } + + cj2c, err := cronjob.NewControllerV2( + ctx, + controllerContext.InformerFactory.Batch().V1().Jobs(), controllerContext.InformerFactory.Batch().V1().CronJobs(), - controllerContext.ClientBuilder.ClientOrDie("cronjob-controller"), + client, ) if err != nil { - return nil, true, fmt.Errorf("creating CronJob controller V2: %v", err) + return nil, fmt.Errorf("creating CronJob controller V2: %w", err) } - go cj2c.Run(ctx, int(controllerContext.ComponentConfig.CronJobController.ConcurrentCronJobSyncs)) - return nil, true, nil + return newControllerLoop(func(ctx context.Context) { + cj2c.Run(ctx, int(controllerContext.ComponentConfig.CronJobController.ConcurrentCronJobSyncs)) + }, controllerName), nil } diff --git a/cmd/kube-controller-manager/app/bootstrap.go b/cmd/kube-controller-manager/app/bootstrap.go index aedaaf65aa03f..4a3aeb8ed441f 100644 --- a/cmd/kube-controller-manager/app/bootstrap.go +++ b/cmd/kube-controller-manager/app/bootstrap.go @@ -20,7 +20,6 @@ import ( "context" "fmt" - "k8s.io/controller-manager/controller" "k8s.io/kubernetes/cmd/kube-controller-manager/names" "k8s.io/kubernetes/pkg/controller/bootstrap" ) @@ -29,41 +28,53 @@ func newBootstrapSignerControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ name: names.BootstrapSignerController, aliases: []string{"bootstrapsigner"}, - initFunc: startBootstrapSignerController, + constructor: newBootstrapSignerController, isDisabledByDefault: true, } } -func startBootstrapSignerController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { + +func newBootstrapSignerController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("bootstrap-signer") + if err != nil { + return nil, err + } + bsc, err := bootstrap.NewSigner( - controllerContext.ClientBuilder.ClientOrDie("bootstrap-signer"), + client, controllerContext.InformerFactory.Core().V1().Secrets(), controllerContext.InformerFactory.Core().V1().ConfigMaps(), bootstrap.DefaultSignerOptions(), ) if err != nil { - return nil, true, fmt.Errorf("error creating BootstrapSigner controller: %v", err) + return nil, fmt.Errorf("error creating BootstrapSigner controller: %w", err) } - go bsc.Run(ctx) - return nil, true, nil + + return newControllerLoop(bsc.Run, controllerName), nil } func newTokenCleanerControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ name: names.TokenCleanerController, aliases: []string{"tokencleaner"}, - initFunc: startTokenCleanerController, + constructor: newTokenCleanerController, isDisabledByDefault: true, } } -func startTokenCleanerController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { + +func newTokenCleanerController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("token-cleaner") + if err != nil { + return nil, err + } + tcc, err := bootstrap.NewTokenCleaner( - controllerContext.ClientBuilder.ClientOrDie("token-cleaner"), + client, controllerContext.InformerFactory.Core().V1().Secrets(), bootstrap.DefaultTokenCleanerOptions(), ) if err != nil { - return nil, true, fmt.Errorf("error creating TokenCleaner controller: %v", err) + return nil, fmt.Errorf("error creating TokenCleaner controller: %w", err) } - go tcc.Run(ctx) - return nil, true, nil + + return newControllerLoop(tcc.Run, controllerName), nil } diff --git a/cmd/kube-controller-manager/app/certificates.go b/cmd/kube-controller-manager/app/certificates.go index 2a58dff5bdad0..22f9e055d0ce2 100644 --- a/cmd/kube-controller-manager/app/certificates.go +++ b/cmd/kube-controller-manager/app/certificates.go @@ -29,10 +29,8 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/server/dynamiccertificates" - utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/kubernetes" "k8s.io/component-base/featuregate" - "k8s.io/controller-manager/controller" "k8s.io/klog/v2" "k8s.io/kubernetes/cmd/kube-controller-manager/names" "k8s.io/kubernetes/pkg/controller/certificates/approver" @@ -47,33 +45,41 @@ import ( func newCertificateSigningRequestSigningControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.CertificateSigningRequestSigningController, - aliases: []string{"csrsigning"}, - initFunc: startCertificateSigningRequestSigningController, + name: names.CertificateSigningRequestSigningController, + aliases: []string{"csrsigning"}, + constructor: newCertificateSigningRequestSigningController, } } -func startCertificateSigningRequestSigningController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newCertificateSigningRequestSigningController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { logger := klog.FromContext(ctx) missingSingleSigningFile := controllerContext.ComponentConfig.CSRSigningController.ClusterSigningCertFile == "" || controllerContext.ComponentConfig.CSRSigningController.ClusterSigningKeyFile == "" if missingSingleSigningFile && !anySpecificFilesSet(controllerContext.ComponentConfig.CSRSigningController) { logger.Info("Skipping CSR signer controller because no csr cert/key was specified") - return nil, false, nil + return nil, nil } if !missingSingleSigningFile && anySpecificFilesSet(controllerContext.ComponentConfig.CSRSigningController) { - return nil, false, fmt.Errorf("cannot specify default and per controller certs at the same time") + return nil, fmt.Errorf("cannot specify default and per controller certs at the same time") + } + + c, err := controllerContext.NewClient("certificate-controller") + if err != nil { + return nil, err } - c := controllerContext.ClientBuilder.ClientOrDie("certificate-controller") csrInformer := controllerContext.InformerFactory.Certificates().V1().CertificateSigningRequests() certTTL := controllerContext.ComponentConfig.CSRSigningController.ClusterSigningDuration.Duration + var rx []runFunc if kubeletServingSignerCertFile, kubeletServingSignerKeyFile := getKubeletServingSignerFiles(controllerContext.ComponentConfig.CSRSigningController); len(kubeletServingSignerCertFile) > 0 || len(kubeletServingSignerKeyFile) > 0 { kubeletServingSigner, err := signer.NewKubeletServingCSRSigningController(ctx, c, csrInformer, kubeletServingSignerCertFile, kubeletServingSignerKeyFile, certTTL) if err != nil { - return nil, false, fmt.Errorf("failed to start kubernetes.io/kubelet-serving certificate controller: %v", err) + return nil, fmt.Errorf("failed to init kubernetes.io/kubelet-serving certificate controller: %w", err) } - go kubeletServingSigner.Run(ctx, 5) + + rx = append(rx, func(ctx context.Context) { + kubeletServingSigner.Run(ctx, 5) + }) } else { logger.Info("Skipping CSR signer controller because specific files were specified for other signers and not this one", "controller", "kubernetes.io/kubelet-serving") } @@ -81,9 +87,12 @@ func startCertificateSigningRequestSigningController(ctx context.Context, contro if kubeletClientSignerCertFile, kubeletClientSignerKeyFile := getKubeletClientSignerFiles(controllerContext.ComponentConfig.CSRSigningController); len(kubeletClientSignerCertFile) > 0 || len(kubeletClientSignerKeyFile) > 0 { kubeletClientSigner, err := signer.NewKubeletClientCSRSigningController(ctx, c, csrInformer, kubeletClientSignerCertFile, kubeletClientSignerKeyFile, certTTL) if err != nil { - return nil, false, fmt.Errorf("failed to start kubernetes.io/kube-apiserver-client-kubelet certificate controller: %v", err) + return nil, fmt.Errorf("failed to init kubernetes.io/kube-apiserver-client-kubelet certificate controller: %w", err) } - go kubeletClientSigner.Run(ctx, 5) + + rx = append(rx, func(ctx context.Context) { + kubeletClientSigner.Run(ctx, 5) + }) } else { logger.Info("Skipping CSR signer controller because specific files were specified for other signers and not this one", "controller", "kubernetes.io/kube-apiserver-client-kubelet") } @@ -91,9 +100,12 @@ func startCertificateSigningRequestSigningController(ctx context.Context, contro if kubeAPIServerSignerCertFile, kubeAPIServerSignerKeyFile := getKubeAPIServerClientSignerFiles(controllerContext.ComponentConfig.CSRSigningController); len(kubeAPIServerSignerCertFile) > 0 || len(kubeAPIServerSignerKeyFile) > 0 { kubeAPIServerClientSigner, err := signer.NewKubeAPIServerClientCSRSigningController(ctx, c, csrInformer, kubeAPIServerSignerCertFile, kubeAPIServerSignerKeyFile, certTTL) if err != nil { - return nil, false, fmt.Errorf("failed to start kubernetes.io/kube-apiserver-client certificate controller: %v", err) + return nil, fmt.Errorf("failed to init kubernetes.io/kube-apiserver-client certificate controller: %w", err) } - go kubeAPIServerClientSigner.Run(ctx, 5) + + rx = append(rx, func(ctx context.Context) { + kubeAPIServerClientSigner.Run(ctx, 5) + }) } else { logger.Info("Skipping CSR signer controller because specific files were specified for other signers and not this one", "controller", "kubernetes.io/kube-apiserver-client") } @@ -101,14 +113,17 @@ func startCertificateSigningRequestSigningController(ctx context.Context, contro if legacyUnknownSignerCertFile, legacyUnknownSignerKeyFile := getLegacyUnknownSignerFiles(controllerContext.ComponentConfig.CSRSigningController); len(legacyUnknownSignerCertFile) > 0 || len(legacyUnknownSignerKeyFile) > 0 { legacyUnknownSigner, err := signer.NewLegacyUnknownCSRSigningController(ctx, c, csrInformer, legacyUnknownSignerCertFile, legacyUnknownSignerKeyFile, certTTL) if err != nil { - return nil, false, fmt.Errorf("failed to start kubernetes.io/legacy-unknown certificate controller: %v", err) + return nil, fmt.Errorf("failed to init kubernetes.io/legacy-unknown certificate controller: %w", err) } - go legacyUnknownSigner.Run(ctx, 5) + + rx = append(rx, func(ctx context.Context) { + legacyUnknownSigner.Run(ctx, 5) + }) } else { logger.Info("Skipping CSR signer controller because specific files were specified for other signers and not this one", "controller", "kubernetes.io/legacy-unknown") } - return nil, true, nil + return newControllerLoop(concurrentRun(rx...), controllerName), nil } func areKubeletServingSignerFilesSpecified(config csrsigningconfig.CSRSigningControllerConfiguration) bool { @@ -171,49 +186,60 @@ func getLegacyUnknownSignerFiles(config csrsigningconfig.CSRSigningControllerCon func newCertificateSigningRequestApprovingControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.CertificateSigningRequestApprovingController, - aliases: []string{"csrapproving"}, - initFunc: startCertificateSigningRequestApprovingController, + name: names.CertificateSigningRequestApprovingController, + aliases: []string{"csrapproving"}, + constructor: newCertificateSigningRequestApprovingController, } } -func startCertificateSigningRequestApprovingController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - approver := approver.NewCSRApprovingController( +func newCertificateSigningRequestApprovingController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("certificate-controller") + if err != nil { + return nil, err + } + + ac := approver.NewCSRApprovingController( ctx, - controllerContext.ClientBuilder.ClientOrDie("certificate-controller"), + client, controllerContext.InformerFactory.Certificates().V1().CertificateSigningRequests(), ) - go approver.Run(ctx, 5) - - return nil, true, nil + return newControllerLoop(func(ctx context.Context) { + ac.Run(ctx, 5) + }, controllerName), nil } func newCertificateSigningRequestCleanerControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.CertificateSigningRequestCleanerController, - aliases: []string{"csrcleaner"}, - initFunc: startCertificateSigningRequestCleanerController, + name: names.CertificateSigningRequestCleanerController, + aliases: []string{"csrcleaner"}, + constructor: newCertificateSigningRequestCleanerController, } } -func startCertificateSigningRequestCleanerController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - cleaner := cleaner.NewCSRCleanerController( - controllerContext.ClientBuilder.ClientOrDie("certificate-controller").CertificatesV1().CertificateSigningRequests(), +func newCertificateSigningRequestCleanerController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("certificate-controller") + if err != nil { + return nil, err + } + + cc := cleaner.NewCSRCleanerController( + client.CertificatesV1().CertificateSigningRequests(), controllerContext.InformerFactory.Certificates().V1().CertificateSigningRequests(), ) - go cleaner.Run(ctx, 1) - return nil, true, nil + return newControllerLoop(func(ctx context.Context) { + cc.Run(ctx, 1) + }, controllerName), nil } func newPodCertificateRequestCleanerControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.PodCertificateRequestCleanerController, - initFunc: startPodCertificateRequestCleanerController, + name: names.PodCertificateRequestCleanerController, + constructor: newPodCertificateRequestCleanerController, requiredFeatureGates: []featuregate.Feature{ features.PodCertificateRequest, }, } } -func startPodCertificateRequestCleanerController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newPodCertificateRequestCleanerController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { cleaner := cleaner.NewPCRCleanerController( controllerContext.ClientBuilder.ClientOrDie("podcertificaterequestcleaner"), controllerContext.InformerFactory.Certificates().V1alpha1().PodCertificateRequests(), @@ -221,60 +247,69 @@ func startPodCertificateRequestCleanerController(ctx context.Context, controller 15*time.Minute, // We expect all PodCertificateRequest flows to complete faster than this. 5*time.Minute, ) - go cleaner.Run(ctx, 1) - return nil, true, nil + return newControllerLoop(func(ctx context.Context) { + cleaner.Run(ctx, 1) + }, controllerName), nil } func newRootCACertificatePublisherControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.RootCACertificatePublisherController, - aliases: []string{"root-ca-cert-publisher"}, - initFunc: startRootCACertificatePublisherController, + name: names.RootCACertificatePublisherController, + aliases: []string{"root-ca-cert-publisher"}, + constructor: newRootCACertificatePublisherController, } } -func startRootCACertificatePublisherController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newRootCACertificatePublisherController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { rootCA, err := getKubeAPIServerCAFileContents(controllerContext) if err != nil { - return nil, true, err + return nil, err + } + + client, err := controllerContext.NewClient("root-ca-cert-publisher") + if err != nil { + return nil, err } sac, err := rootcacertpublisher.NewPublisher( controllerContext.InformerFactory.Core().V1().ConfigMaps(), controllerContext.InformerFactory.Core().V1().Namespaces(), - controllerContext.ClientBuilder.ClientOrDie("root-ca-cert-publisher"), + client, rootCA, ) if err != nil { - return nil, true, fmt.Errorf("error creating root CA certificate publisher: %v", err) + return nil, fmt.Errorf("error creating root CA certificate publisher: %w", err) } - go sac.Run(ctx, 1) - return nil, true, nil + + return newControllerLoop(func(ctx context.Context) { + sac.Run(ctx, 1) + }, controllerName), nil } func newKubeAPIServerSignerClusterTrustBundledPublisherDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ name: names.KubeAPIServerClusterTrustBundlePublisherController, - initFunc: newKubeAPIServerSignerClusterTrustBundledPublisherController, + constructor: newKubeAPIServerSignerClusterTrustBundledPublisherController, requiredFeatureGates: []featuregate.Feature{features.ClusterTrustBundle}, } } type controllerConstructor func(string, dynamiccertificates.CAContentProvider, kubernetes.Interface) (ctbpublisher.PublisherRunner, error) -func newKubeAPIServerSignerClusterTrustBundledPublisherController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newKubeAPIServerSignerClusterTrustBundledPublisherController( + ctx context.Context, controllerContext ControllerContext, controllerName string, +) (Controller, error) { rootCA, err := getKubeAPIServerCAFileContents(controllerContext) if err != nil { - return nil, false, err + return nil, err } - - if len(rootCA) == 0 || !utilfeature.DefaultFeatureGate.Enabled(features.ClusterTrustBundle) { - return nil, false, nil + if len(rootCA) == 0 { + return nil, nil } servingSigners, err := dynamiccertificates.NewStaticCAContent("kube-apiserver-serving", rootCA) if err != nil { - return nil, false, fmt.Errorf("failed to create a static CA content provider for the kube-apiserver-serving signer: %w", err) + return nil, fmt.Errorf("failed to create a static CA content provider for the kube-apiserver-serving signer: %w", err) } schemaControllerMapping := map[schema.GroupVersion]controllerConstructor{ @@ -282,12 +317,16 @@ func newKubeAPIServerSignerClusterTrustBundledPublisherController(ctx context.Co certificatesv1beta1.SchemeGroupVersion: ctbpublisher.NewBetaClusterTrustBundlePublisher, } - apiserverSignerClient := controllerContext.ClientBuilder.ClientOrDie("kube-apiserver-serving-clustertrustbundle-publisher") + apiserverSignerClient, err := controllerContext.NewClient("kube-apiserver-serving-clustertrustbundle-publisher") + if err != nil { + return nil, err + } + var runner ctbpublisher.PublisherRunner for _, gv := range []schema.GroupVersion{certificatesv1beta1.SchemeGroupVersion, certificatesv1alpha1.SchemeGroupVersion} { ctbAvailable, err := clusterTrustBundlesAvailable(apiserverSignerClient, gv) if err != nil { - return nil, false, fmt.Errorf("discovery failed for ClusterTrustBundle: %w", err) + return nil, fmt.Errorf("discovery failed for ClusterTrustBundle: %w", err) } if !ctbAvailable { @@ -300,18 +339,17 @@ func newKubeAPIServerSignerClusterTrustBundledPublisherController(ctx context.Co apiserverSignerClient, ) if err != nil { - return nil, false, fmt.Errorf("error creating kube-apiserver-serving signer certificates publisher: %w", err) + return nil, fmt.Errorf("error creating kube-apiserver-serving signer certificates publisher: %w", err) } break } if runner == nil { klog.Info("no known scheme version was found for clustertrustbundles, cannot start kube-apiserver-serving-clustertrustbundle-publisher-controller") - return nil, false, nil + return nil, nil } - go runner.Run(ctx) - return nil, true, nil + return newControllerLoop(runner.Run, controllerName), nil } func clusterTrustBundlesAvailable(client kubernetes.Interface, schemaVersion schema.GroupVersion) (bool, error) { @@ -334,7 +372,11 @@ func clusterTrustBundlesAvailable(client kubernetes.Interface, schemaVersion sch func getKubeAPIServerCAFileContents(controllerContext ControllerContext) ([]byte, error) { if controllerContext.ComponentConfig.SAController.RootCAFile == "" { - return controllerContext.ClientBuilder.ConfigOrDie("root-ca-cert-publisher").CAData, nil + config, err := controllerContext.NewClientConfig("root-ca-cert-publisher") + if err != nil { + return nil, err + } + return config.CAData, nil } rootCA, err := readCA(controllerContext.ComponentConfig.SAController.RootCAFile) diff --git a/cmd/kube-controller-manager/app/config/config.go b/cmd/kube-controller-manager/app/config/config.go index e841d109dd1fb..9031ba850301a 100644 --- a/cmd/kube-controller-manager/app/config/config.go +++ b/cmd/kube-controller-manager/app/config/config.go @@ -24,6 +24,7 @@ import ( basecompatibility "k8s.io/component-base/compatibility" "k8s.io/component-base/zpages/flagz" kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" + "time" ) // Config is the main context object for the controller manager. @@ -49,6 +50,8 @@ type Config struct { EventBroadcaster record.EventBroadcaster EventRecorder record.EventRecorder + ControllerShutdownTimeout time.Duration + // ComponentGlobalsRegistry is the registry where the effective versions and feature gates for all components are stored. ComponentGlobalsRegistry basecompatibility.ComponentGlobalsRegistry } diff --git a/cmd/kube-controller-manager/app/controller_descriptor.go b/cmd/kube-controller-manager/app/controller_descriptor.go new file mode 100644 index 0000000000000..fa82992f8174d --- /dev/null +++ b/cmd/kube-controller-manager/app/controller_descriptor.go @@ -0,0 +1,247 @@ +/* +Copyright 2025 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 app + +import ( + "context" + "fmt" + "sort" + + "k8s.io/apimachinery/pkg/util/sets" + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/component-base/featuregate" + "k8s.io/klog/v2" +) + +// This file contains types and functions for wrapping controller implementations from downstream packages. +// Every controller wrapper implements the Controller interface, +// which is then associated with a ControllerDescriptor, which holds additional static metadata +// needed so that the manager can manage Controllers properly. + +// Controller defines the base interface that all controller wrappers must implement. +type Controller interface { + // Name returns the controller's canonical name. + Name() string + + // Run runs the controller loop. + // When there is anything to be done, it blocks until the context is cancelled. + // Run must ensure all goroutines are terminated before returning. + Run(context.Context) +} + +// ControllerConstructor is a constructor for a controller. +// A nil Controller returned means that the associated controller is disabled. +type ControllerConstructor func(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) + +type ControllerDescriptor struct { + name string + constructor ControllerConstructor + requiredFeatureGates []featuregate.Feature + aliases []string + isDisabledByDefault bool + isCloudProviderController bool + requiresSpecialHandling bool +} + +func (r *ControllerDescriptor) Name() string { + return r.name +} + +func (r *ControllerDescriptor) GetControllerConstructor() ControllerConstructor { + return r.constructor +} + +func (r *ControllerDescriptor) GetRequiredFeatureGates() []featuregate.Feature { + return append([]featuregate.Feature(nil), r.requiredFeatureGates...) +} + +// GetAliases returns aliases to ensure backwards compatibility and should never be removed! +// Only addition of new aliases is allowed, and only when a canonical name is changed (please see CHANGE POLICY of controller names) +func (r *ControllerDescriptor) GetAliases() []string { + return append([]string(nil), r.aliases...) +} + +func (r *ControllerDescriptor) IsDisabledByDefault() bool { + return r.isDisabledByDefault +} + +func (r *ControllerDescriptor) IsCloudProviderController() bool { + return r.isCloudProviderController +} + +// RequiresSpecialHandling should return true only in a special non-generic controllers like ServiceAccountTokenController +func (r *ControllerDescriptor) RequiresSpecialHandling() bool { + return r.requiresSpecialHandling +} + +// BuildController creates a controller based on the given descriptor. +// The associated controller's constructor is called at the end, so the same contract applies for the return values here. +func (r *ControllerDescriptor) BuildController(ctx context.Context, controllerCtx ControllerContext) (Controller, error) { + logger := klog.FromContext(ctx) + controllerName := r.Name() + + for _, featureGate := range r.GetRequiredFeatureGates() { + if !utilfeature.DefaultFeatureGate.Enabled(featureGate) { + logger.Info("Controller is disabled by a feature gate", + "controller", controllerName, + "requiredFeatureGates", r.GetRequiredFeatureGates()) + return nil, nil + } + } + + if r.IsCloudProviderController() { + logger.Info("Skipping a cloud provider controller", "controller", controllerName) + return nil, nil + } + + ctx = klog.NewContext(ctx, klog.LoggerWithName(logger, controllerName)) + return r.GetControllerConstructor()(ctx, controllerCtx, controllerName) +} + +// KnownControllers returns all known controllers' name +func KnownControllers() []string { + return sets.StringKeySet(NewControllerDescriptors()).List() +} + +// ControllerAliases returns a mapping of aliases to canonical controller names +func ControllerAliases() map[string]string { + aliases := map[string]string{} + for name, c := range NewControllerDescriptors() { + for _, alias := range c.GetAliases() { + aliases[alias] = name + } + } + return aliases +} + +func ControllersDisabledByDefault() []string { + var controllersDisabledByDefault []string + + for name, c := range NewControllerDescriptors() { + if c.IsDisabledByDefault() { + controllersDisabledByDefault = append(controllersDisabledByDefault, name) + } + } + + sort.Strings(controllersDisabledByDefault) + + return controllersDisabledByDefault +} + +// NewControllerDescriptors is a public map of named controller groups (you can start more than one in an init func) +// paired to their ControllerDescriptor wrapper object that includes the associated controller constructor. +// This allows for structured downstream composition and subdivision. +func NewControllerDescriptors() map[string]*ControllerDescriptor { + controllers := map[string]*ControllerDescriptor{} + aliases := sets.NewString() + + // All the controllers must fulfil common constraints, or else we will explode. + register := func(controllerDesc *ControllerDescriptor) { + if controllerDesc == nil { + panic("received nil controller for a registration") + } + name := controllerDesc.Name() + if len(name) == 0 { + panic("received controller without a name for a registration") + } + if _, found := controllers[name]; found { + panic(fmt.Sprintf("controller name %q was registered twice", name)) + } + if controllerDesc.GetControllerConstructor() == nil { + panic(fmt.Sprintf("controller %q does not have a constructor specified", name)) + } + + for _, alias := range controllerDesc.GetAliases() { + if aliases.Has(alias) { + panic(fmt.Sprintf("controller %q has a duplicate alias %q", name, alias)) + } + aliases.Insert(alias) + } + + controllers[name] = controllerDesc + } + + // First add "special" controllers that aren't initialized normally. These controllers cannot be initialized + // in the main controller loop initialization, so we add them here only for the metadata and duplication detection. + // app.ControllerDescriptor#RequiresSpecialHandling should return true for such controllers + // The only known special case is the ServiceAccountTokenController which *must* be started + // first to ensure that the SA tokens for future controllers will exist. Think very carefully before adding new + // special controllers. + register(newServiceAccountTokenControllerDescriptor(nil)) + + register(newEndpointsControllerDescriptor()) + register(newEndpointSliceControllerDescriptor()) + register(newEndpointSliceMirroringControllerDescriptor()) + register(newReplicationControllerDescriptor()) + register(newPodGarbageCollectorControllerDescriptor()) + register(newResourceQuotaControllerDescriptor()) + register(newNamespaceControllerDescriptor()) + register(newServiceAccountControllerDescriptor()) + register(newGarbageCollectorControllerDescriptor()) + register(newDaemonSetControllerDescriptor()) + register(newJobControllerDescriptor()) + register(newDeploymentControllerDescriptor()) + register(newReplicaSetControllerDescriptor()) + register(newHorizontalPodAutoscalerControllerDescriptor()) + register(newDisruptionControllerDescriptor()) + register(newStatefulSetControllerDescriptor()) + register(newCronJobControllerDescriptor()) + register(newCertificateSigningRequestSigningControllerDescriptor()) + register(newCertificateSigningRequestApprovingControllerDescriptor()) + register(newCertificateSigningRequestCleanerControllerDescriptor()) + register(newPodCertificateRequestCleanerControllerDescriptor()) + register(newTTLControllerDescriptor()) + register(newBootstrapSignerControllerDescriptor()) + register(newTokenCleanerControllerDescriptor()) + register(newNodeIpamControllerDescriptor()) + register(newNodeLifecycleControllerDescriptor()) + + register(newServiceLBControllerDescriptor()) // cloud provider controller + register(newNodeRouteControllerDescriptor()) // cloud provider controller + register(newCloudNodeLifecycleControllerDescriptor()) // cloud provider controller + + register(newPersistentVolumeBinderControllerDescriptor()) + register(newPersistentVolumeAttachDetachControllerDescriptor()) + register(newPersistentVolumeExpanderControllerDescriptor()) + register(newClusterRoleAggregrationControllerDescriptor()) + register(newPersistentVolumeClaimProtectionControllerDescriptor()) + register(newPersistentVolumeProtectionControllerDescriptor()) + register(newVolumeAttributesClassProtectionControllerDescriptor()) + register(newTTLAfterFinishedControllerDescriptor()) + register(newRootCACertificatePublisherControllerDescriptor()) + register(newKubeAPIServerSignerClusterTrustBundledPublisherDescriptor()) + register(newEphemeralVolumeControllerDescriptor()) + + // feature gated + register(newStorageVersionGarbageCollectorControllerDescriptor()) + register(newResourceClaimControllerDescriptor()) + register(newDeviceTaintEvictionControllerDescriptor()) + register(newLegacyServiceAccountTokenCleanerControllerDescriptor()) + register(newValidatingAdmissionPolicyStatusControllerDescriptor()) + register(newTaintEvictionControllerDescriptor()) + register(newServiceCIDRsControllerDescriptor()) + register(newStorageVersionMigratorControllerDescriptor()) + register(newSELinuxWarningControllerDescriptor()) + + for _, alias := range aliases.UnsortedList() { + if _, ok := controllers[alias]; ok { + panic(fmt.Sprintf("alias %q conflicts with a controller name", alias)) + } + } + + return controllers +} diff --git a/cmd/kube-controller-manager/app/controller_utils.go b/cmd/kube-controller-manager/app/controller_utils.go new file mode 100644 index 0000000000000..8a9ca1baa0e27 --- /dev/null +++ b/cmd/kube-controller-manager/app/controller_utils.go @@ -0,0 +1,67 @@ +/* +Copyright 2025 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 app + +import ( + "context" + "sync" +) + +// This file contains utility functions for implementing controller wrappers, +// i.e. turning whatever logic into a Controller. + +type runFunc func(ctx context.Context) + +type runFuncSlice []runFunc + +func (rx runFuncSlice) Run(ctx context.Context) { + var wg sync.WaitGroup + wg.Add(len(rx)) + for _, fnc := range rx { + go func() { + defer wg.Done() + fnc(ctx) + }() + } + wg.Wait() +} + +// concurrentRun returns a runFunc that wraps the given functions to run concurrently. +func concurrentRun(rx ...runFunc) runFunc { + return runFuncSlice(rx).Run +} + +// controllerLoop implements the Controller interface. It makes it easy to turn a function into a Controller. +type controllerLoop struct { + name string + run runFunc +} + +func newControllerLoop(run runFunc, controllerName string) *controllerLoop { + return &controllerLoop{ + name: controllerName, + run: run, + } +} + +func (loop *controllerLoop) Name() string { + return loop.name +} + +func (loop *controllerLoop) Run(ctx context.Context) { + loop.run(ctx) +} diff --git a/cmd/kube-controller-manager/app/controllermanager.go b/cmd/kube-controller-manager/app/controllermanager.go index 3f380fa1b7d9b..572a34e868b29 100644 --- a/cmd/kube-controller-manager/app/controllermanager.go +++ b/cmd/kube-controller-manager/app/controllermanager.go @@ -25,7 +25,7 @@ import ( "math/rand" "net/http" "os" - "sort" + "sync" "time" "github.com/blang/semver/v4" @@ -43,6 +43,7 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" cacheddiscovery "k8s.io/client-go/discovery/cached/memory" "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes" v1core "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/metadata" "k8s.io/client-go/metadata/metadatainformer" @@ -51,7 +52,6 @@ import ( "k8s.io/client-go/tools/leaderelection" "k8s.io/client-go/tools/leaderelection/resourcelock" certutil "k8s.io/client-go/util/cert" - "k8s.io/client-go/util/keyutil" cliflag "k8s.io/component-base/cli/flag" "k8s.io/component-base/cli/globalflag" basecompatibility "k8s.io/component-base/compatibility" @@ -80,9 +80,7 @@ import ( "k8s.io/kubernetes/cmd/kube-controller-manager/names" kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" garbagecollector "k8s.io/kubernetes/pkg/controller/garbagecollector" - serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" kubefeatures "k8s.io/kubernetes/pkg/features" - "k8s.io/kubernetes/pkg/serviceaccount" ) func init() { @@ -225,7 +223,14 @@ func Run(ctx context.Context, c *config.CompletedConfig) error { } if utilfeature.DefaultFeatureGate.Enabled(zpagesfeatures.ComponentStatusz) { - statusz.Install(unsecuredMux, kubeControllerManager, statusz.NewRegistry(c.ComponentGlobalsRegistry.EffectiveVersionFor(basecompatibility.DefaultKubeComponent))) + statusz.Install( + unsecuredMux, + kubeControllerManager, + statusz.NewRegistry( + c.ComponentGlobalsRegistry.EffectiveVersionFor(basecompatibility.DefaultKubeComponent), + statusz.WithListedPaths(unsecuredMux.ListedPaths()), + ), + ) } handler := genericcontrollermanager.BuildHandlerChain(unsecuredMux, &c.Authorization, &c.Authentication) @@ -246,16 +251,27 @@ func Run(ctx context.Context, c *config.CompletedConfig) error { klog.FlushAndExit(klog.ExitFlushTimeout, 1) } - if err := StartControllers(ctx, controllerContext, controllerDescriptors, unsecuredMux, healthzHandler); err != nil { - logger.Error(err, "Error starting controllers") + // Prepare all controllers in advance. + controllers, err := BuildControllers(ctx, controllerContext, controllerDescriptors, unsecuredMux, healthzHandler) + if err != nil { + logger.Error(err, "Error building controllers") klog.FlushAndExit(klog.ExitFlushTimeout, 1) } + // Start the informers. + stopCh := ctx.Done() controllerContext.InformerFactory.Start(stopCh) controllerContext.ObjectOrMetadataInformerFactory.Start(stopCh) close(controllerContext.InformersStarted) - <-ctx.Done() + // Actually start the controllers. + if len(controllers) > 0 { + if !RunControllers(ctx, controllerContext, controllers, ControllerStartJitter, c.ControllerShutdownTimeout) { + klog.FlushAndExit(klog.ExitFlushTimeout, 1) + } + } else { + <-ctx.Done() + } } // No leader election, run directly @@ -284,14 +300,23 @@ func Run(ctx context.Context, c *config.CompletedConfig) error { leaderMigrator = leadermigration.NewLeaderMigrator(&c.ComponentConfig.Generic.LeaderMigration, kubeControllerManager) - // startSATokenControllerInit is the original InitFunc. - startSATokenControllerInit := saTokenControllerDescriptor.GetInitFunc() + // startSATokenControllerInit is the original constructor. + saTokenControllerInit := saTokenControllerDescriptor.GetControllerConstructor() - // Wrap saTokenControllerDescriptor to signal readiness for migration after starting - // the controller. - saTokenControllerDescriptor.initFunc = func(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - defer close(leaderMigrator.MigrationReady) - return startSATokenControllerInit(ctx, controllerContext, controllerName) + // Wrap saTokenControllerDescriptor to signal readiness for migration after starting the controller. + saTokenControllerDescriptor.constructor = func(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + ctrl, err := saTokenControllerInit(ctx, controllerContext, controllerName) + if err != nil { + return nil, err + } + + // This wrapping is not exactly flawless as RunControllers uses type casting, + // which is now not possible for the wrapped controller. + // This fortunately doesn't matter for this particular controller. + return newControllerLoop(func(ctx context.Context) { + close(leaderMigrator.MigrationReady) + ctrl.Run(ctx) + }, controllerName), nil } } @@ -424,188 +449,22 @@ func (c ControllerContext) IsControllerEnabled(controllerDescriptor *ControllerD return genericcontrollermanager.IsControllerEnabled(controllerDescriptor.Name(), controllersDisabledByDefault, c.ComponentConfig.Generic.Controllers) } -// InitFunc is used to launch a particular controller. It returns a controller -// that can optionally implement other interfaces so that the controller manager -// can support the requested features. -// The returned controller may be nil, which will be considered an anonymous controller -// that requests no additional features from the controller manager. -// Any error returned will cause the controller process to `Fatal` -// The bool indicates whether the controller was enabled. -type InitFunc func(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller controller.Interface, enabled bool, err error) - -type ControllerDescriptor struct { - name string - initFunc InitFunc - requiredFeatureGates []featuregate.Feature - aliases []string - isDisabledByDefault bool - isCloudProviderController bool - requiresSpecialHandling bool -} - -func (r *ControllerDescriptor) Name() string { - return r.name -} - -func (r *ControllerDescriptor) GetInitFunc() InitFunc { - return r.initFunc -} - -func (r *ControllerDescriptor) GetRequiredFeatureGates() []featuregate.Feature { - return append([]featuregate.Feature(nil), r.requiredFeatureGates...) -} - -// GetAliases returns aliases to ensure backwards compatibility and should never be removed! -// Only addition of new aliases is allowed, and only when a canonical name is changed (please see CHANGE POLICY of controller names) -func (r *ControllerDescriptor) GetAliases() []string { - return append([]string(nil), r.aliases...) -} - -func (r *ControllerDescriptor) IsDisabledByDefault() bool { - return r.isDisabledByDefault -} - -func (r *ControllerDescriptor) IsCloudProviderController() bool { - return r.isCloudProviderController -} - -// RequiresSpecialHandling should return true only in a special non-generic controllers like ServiceAccountTokenController -func (r *ControllerDescriptor) RequiresSpecialHandling() bool { - return r.requiresSpecialHandling -} - -// KnownControllers returns all known controllers's name -func KnownControllers() []string { - return sets.StringKeySet(NewControllerDescriptors()).List() -} - -// ControllerAliases returns a mapping of aliases to canonical controller names -func ControllerAliases() map[string]string { - aliases := map[string]string{} - for name, c := range NewControllerDescriptors() { - for _, alias := range c.GetAliases() { - aliases[alias] = name - } - } - return aliases -} - -func ControllersDisabledByDefault() []string { - var controllersDisabledByDefault []string - - for name, c := range NewControllerDescriptors() { - if c.IsDisabledByDefault() { - controllersDisabledByDefault = append(controllersDisabledByDefault, name) - } +// NewClientConfig is a shortcut for ClientBuilder.Config. It wraps the error with an additional message. +func (c ControllerContext) NewClientConfig(name string) (*restclient.Config, error) { + config, err := c.ClientBuilder.Config(name) + if err != nil { + return nil, fmt.Errorf("failed to create Kubernetes client config for %q: %w", name, err) } - - sort.Strings(controllersDisabledByDefault) - - return controllersDisabledByDefault + return config, nil } -// NewControllerDescriptors is a public map of named controller groups (you can start more than one in an init func) -// paired to their ControllerDescriptor wrapper object that includes InitFunc. -// This allows for structured downstream composition and subdivision. -func NewControllerDescriptors() map[string]*ControllerDescriptor { - controllers := map[string]*ControllerDescriptor{} - aliases := sets.NewString() - - // All the controllers must fulfil common constraints, or else we will explode. - register := func(controllerDesc *ControllerDescriptor) { - if controllerDesc == nil { - panic("received nil controller for a registration") - } - name := controllerDesc.Name() - if len(name) == 0 { - panic("received controller without a name for a registration") - } - if _, found := controllers[name]; found { - panic(fmt.Sprintf("controller name %q was registered twice", name)) - } - if controllerDesc.GetInitFunc() == nil { - panic(fmt.Sprintf("controller %q does not have an init function", name)) - } - - for _, alias := range controllerDesc.GetAliases() { - if aliases.Has(alias) { - panic(fmt.Sprintf("controller %q has a duplicate alias %q", name, alias)) - } - aliases.Insert(alias) - } - - controllers[name] = controllerDesc - } - - // First add "special" controllers that aren't initialized normally. These controllers cannot be initialized - // in the main controller loop initialization, so we add them here only for the metadata and duplication detection. - // app.ControllerDescriptor#RequiresSpecialHandling should return true for such controllers - // The only known special case is the ServiceAccountTokenController which *must* be started - // first to ensure that the SA tokens for future controllers will exist. Think very carefully before adding new - // special controllers. - register(newServiceAccountTokenControllerDescriptor(nil)) - - register(newEndpointsControllerDescriptor()) - register(newEndpointSliceControllerDescriptor()) - register(newEndpointSliceMirroringControllerDescriptor()) - register(newReplicationControllerDescriptor()) - register(newPodGarbageCollectorControllerDescriptor()) - register(newResourceQuotaControllerDescriptor()) - register(newNamespaceControllerDescriptor()) - register(newServiceAccountControllerDescriptor()) - register(newGarbageCollectorControllerDescriptor()) - register(newDaemonSetControllerDescriptor()) - register(newJobControllerDescriptor()) - register(newDeploymentControllerDescriptor()) - register(newReplicaSetControllerDescriptor()) - register(newHorizontalPodAutoscalerControllerDescriptor()) - register(newDisruptionControllerDescriptor()) - register(newStatefulSetControllerDescriptor()) - register(newCronJobControllerDescriptor()) - register(newCertificateSigningRequestSigningControllerDescriptor()) - register(newCertificateSigningRequestApprovingControllerDescriptor()) - register(newCertificateSigningRequestCleanerControllerDescriptor()) - register(newPodCertificateRequestCleanerControllerDescriptor()) - register(newTTLControllerDescriptor()) - register(newBootstrapSignerControllerDescriptor()) - register(newTokenCleanerControllerDescriptor()) - register(newNodeIpamControllerDescriptor()) - register(newNodeLifecycleControllerDescriptor()) - - register(newServiceLBControllerDescriptor()) // cloud provider controller - register(newNodeRouteControllerDescriptor()) // cloud provider controller - register(newCloudNodeLifecycleControllerDescriptor()) // cloud provider controller - - register(newPersistentVolumeBinderControllerDescriptor()) - register(newPersistentVolumeAttachDetachControllerDescriptor()) - register(newPersistentVolumeExpanderControllerDescriptor()) - register(newClusterRoleAggregrationControllerDescriptor()) - register(newPersistentVolumeClaimProtectionControllerDescriptor()) - register(newPersistentVolumeProtectionControllerDescriptor()) - register(newVolumeAttributesClassProtectionControllerDescriptor()) - register(newTTLAfterFinishedControllerDescriptor()) - register(newRootCACertificatePublisherControllerDescriptor()) - register(newKubeAPIServerSignerClusterTrustBundledPublisherDescriptor()) - register(newEphemeralVolumeControllerDescriptor()) - - // feature gated - register(newStorageVersionGarbageCollectorControllerDescriptor()) - register(newResourceClaimControllerDescriptor()) - register(newDeviceTaintEvictionControllerDescriptor()) - register(newLegacyServiceAccountTokenCleanerControllerDescriptor()) - register(newValidatingAdmissionPolicyStatusControllerDescriptor()) - register(newTaintEvictionControllerDescriptor()) - register(newServiceCIDRsControllerDescriptor()) - register(newStorageVersionMigratorControllerDescriptor()) - register(newSELinuxWarningControllerDescriptor()) - - for _, alias := range aliases.UnsortedList() { - if _, ok := controllers[alias]; ok { - panic(fmt.Sprintf("alias %q conflicts with a controller name", alias)) - } +// NewClient is a shortcut for ClientBuilder.Client. It wraps the error with an additional message. +func (c ControllerContext) NewClient(name string) (kubernetes.Interface, error) { + client, err := c.ClientBuilder.Client(name) + if err != nil { + return nil, fmt.Errorf("failed to create Kubernetes client for %q: %w", name, err) } - - return controllers + return client, nil } // CreateControllerContext creates a context struct containing references to resources needed by the @@ -622,20 +481,37 @@ func CreateControllerContext(ctx context.Context, s *config.CompletedConfig, roo return obj, nil } - versionedClient := rootClientBuilder.ClientOrDie("shared-informers") + versionedClient, err := rootClientBuilder.Client("shared-informers") + if err != nil { + return ControllerContext{}, fmt.Errorf("failed to create Kubernetes client for %q: %w", "shared-informers", err) + } + sharedInformers := informers.NewSharedInformerFactoryWithOptions(versionedClient, ResyncPeriod(s)(), informers.WithTransform(trim)) - metadataClient := metadata.NewForConfigOrDie(rootClientBuilder.ConfigOrDie("metadata-informers")) + metadataConfig, err := rootClientBuilder.Config("metadata-informers") + if err != nil { + return ControllerContext{}, fmt.Errorf("failed to create metadata client config: %w", err) + } + + metadataClient, err := metadata.NewForConfig(metadataConfig) + if err != nil { + return ControllerContext{}, fmt.Errorf("failed to create metadata client: %w", err) + } + metadataInformers := metadatainformer.NewSharedInformerFactoryWithOptions(metadataClient, ResyncPeriod(s)(), metadatainformer.WithTransform(trim)) // If apiserver is not running we should wait for some time and fail only then. This is particularly // important when we start apiserver and controller manager at the same time. if err := genericcontrollermanager.WaitForAPIServer(versionedClient, 10*time.Second); err != nil { - return ControllerContext{}, fmt.Errorf("failed to wait for apiserver being healthy: %v", err) + return ControllerContext{}, fmt.Errorf("failed to wait for apiserver being healthy: %w", err) } // Use a discovery client capable of being refreshed. - discoveryClient := rootClientBuilder.DiscoveryClientOrDie("controller-discovery") + discoveryClient, err := rootClientBuilder.DiscoveryClient("controller-discovery") + if err != nil { + return ControllerContext{}, fmt.Errorf("failed to create discovery client: %w", err) + } + cachedClient := cacheddiscovery.NewMemCacheClient(discoveryClient) restMapper := restmapper.NewDeferredDiscoveryRESTMapper(cachedClient) go wait.Until(func() { @@ -674,27 +550,68 @@ func CreateControllerContext(ctx context.Context, s *config.CompletedConfig, roo return controllerContext, nil } -// StartControllers starts a set of controllers with a specified ControllerContext -func StartControllers(ctx context.Context, controllerCtx ControllerContext, controllerDescriptors map[string]*ControllerDescriptor, - unsecuredMux *mux.PathRecorderMux, healthzHandler *controllerhealthz.MutableHealthzHandler) error { - var controllerChecks []healthz.HealthChecker +// HealthCheckAdder is an interface to represent a healthz handler. +// The extra level of indirection is useful for testing. +type HealthCheckAdder interface { + AddHealthChecker(checks ...healthz.HealthChecker) +} - // Always start the SA token controller first using a full-power client, since it needs to mint tokens for the rest - // If this fails, just return here and fail since other controllers won't be able to get credentials. - if serviceAccountTokenControllerDescriptor, ok := controllerDescriptors[names.ServiceAccountTokenController]; ok { - check, err := StartController(ctx, controllerCtx, serviceAccountTokenControllerDescriptor, unsecuredMux) +// BuildControllers builds all controllers in the given descriptor map. Disabled controllers are obviously skipped. +// +// A health check is registered for each controller using the controller name. The default check always passes. +// If the controller implements controller.HealthCheckable, though, the given check is used. +// The controller can also implement controller.Debuggable, in which case the debug handler is registered with the given mux. +func BuildControllers(ctx context.Context, controllerCtx ControllerContext, controllerDescriptors map[string]*ControllerDescriptor, + unsecuredMux *mux.PathRecorderMux, healthzHandler HealthCheckAdder) ([]Controller, error) { + logger := klog.FromContext(ctx) + var ( + controllers []Controller + checks []healthz.HealthChecker + ) + buildController := func(controllerDesc *ControllerDescriptor) error { + controllerName := controllerDesc.Name() + ctrl, err := controllerDesc.BuildController(ctx, controllerCtx) if err != nil { + logger.Error(err, "Error initializing a controller", "controller", controllerName) return err } - if check != nil { - // HealthChecker should be present when controller has started - controllerChecks = append(controllerChecks, check) + if ctrl == nil { + logger.Info("Warning: skipping controller", "controller", controllerName) + return nil + } + + check := controllerhealthz.NamedPingChecker(controllerName) + // check if the controller supports and requests a debugHandler, + // and it needs the unsecuredMux to mount the handler onto. + if debuggable, ok := ctrl.(controller.Debuggable); ok && unsecuredMux != nil { + if debugHandler := debuggable.DebuggingHandler(); debugHandler != nil { + basePath := "/debug/controllers/" + controllerName + unsecuredMux.UnlistedHandle(basePath, http.StripPrefix(basePath, debugHandler)) + unsecuredMux.UnlistedHandlePrefix(basePath+"/", http.StripPrefix(basePath, debugHandler)) + } + } + if healthCheckable, ok := ctrl.(controller.HealthCheckable); ok { + if realCheck := healthCheckable.HealthChecker(); realCheck != nil { + check = controllerhealthz.NamedHealthChecker(controllerName, realCheck) + } + } + + controllers = append(controllers, ctrl) + checks = append(checks, check) + return nil + } + + // Always start the SA token controller first using a full-power client, since it needs to mint tokens for the rest + // If this fails, just return here and fail since other controllers won't be able to get credentials. + if serviceAccountTokenControllerDescriptor, ok := controllerDescriptors[names.ServiceAccountTokenController]; ok { + if err := buildController(serviceAccountTokenControllerDescriptor); err != nil { + return nil, err } } // Each controller is passed a context where the logger has the name of // the controller set through WithName. That name then becomes the prefix of - // of all log messages emitted by that controller. + // all log messages emitted by that controller. // // In StartController, an explicit "controller" key is used instead, for two reasons: // - while contextual logging is alpha, klog.LoggerWithName is still a no-op, @@ -706,139 +623,124 @@ func StartControllers(ctx context.Context, controllerCtx ControllerContext, cont continue } - check, err := StartController(ctx, controllerCtx, controllerDesc, unsecuredMux) - if err != nil { - return err + if !controllerCtx.IsControllerEnabled(controllerDesc) { + logger.Info("Warning: controller is disabled", "controller", controllerDesc.Name()) + continue } - if check != nil { - // HealthChecker should be present when controller has started - controllerChecks = append(controllerChecks, check) + + if err := buildController(controllerDesc); err != nil { + return nil, err } } - healthzHandler.AddHealthChecker(controllerChecks...) - - return nil + // Register the checks. + if len(checks) > 0 { + healthzHandler.AddHealthChecker(checks...) + } + return controllers, nil } -// StartController starts a controller with a specified ControllerContext -// and performs required pre- and post- checks/actions -func StartController(ctx context.Context, controllerCtx ControllerContext, controllerDescriptor *ControllerDescriptor, - unsecuredMux *mux.PathRecorderMux) (healthz.HealthChecker, error) { +// RunControllers runs all controllers concurrently and blocks until the context is cancelled and all controllers are terminated. +// +// Once the context is cancelled, RunControllers waits for shutdownTimeout for all controllers to terminate. +// When the timeout is reached, the function unblocks and returns false. +// Zero shutdown timeout means that there is no timeout. +func RunControllers(ctx context.Context, controllerCtx ControllerContext, controllers []Controller, + controllerStartJitterMaxFactor float64, shutdownTimeout time.Duration) bool { logger := klog.FromContext(ctx) - controllerName := controllerDescriptor.Name() - for _, featureGate := range controllerDescriptor.GetRequiredFeatureGates() { - if !utilfeature.DefaultFeatureGate.Enabled(featureGate) { - logger.Info("Controller is disabled by a feature gate", "controller", controllerName, "requiredFeatureGates", controllerDescriptor.GetRequiredFeatureGates()) - return nil, nil + // We gather running controllers names for logging purposes. + // When the context is cancelled, the controllers still running are logged periodically. + runningControllers := sets.New[string]() + var runningControllersLock sync.Mutex + + loggingCtx, cancelLoggingCtx := context.WithCancel(context.Background()) + defer cancelLoggingCtx() + go func() { + // Only start logging when terminating. + select { + case <-ctx.Done(): + case <-loggingCtx.Done(): + return } - } - - if controllerDescriptor.IsCloudProviderController() { - logger.Info("Skipping a cloud provider controller", "controller", controllerName) - return nil, nil - } - - if !controllerCtx.IsControllerEnabled(controllerDescriptor) { - logger.Info("Warning: controller is disabled", "controller", controllerName) - return nil, nil - } - - time.Sleep(wait.Jitter(controllerCtx.ComponentConfig.Generic.ControllerStartInterval.Duration, ControllerStartJitter)) - - logger.V(1).Info("Starting controller", "controller", controllerName) - - initFunc := controllerDescriptor.GetInitFunc() - ctrl, started, err := initFunc(klog.NewContext(ctx, klog.LoggerWithName(logger, controllerName)), controllerCtx, controllerName) - if err != nil { - logger.Error(err, "Error starting controller", "controller", controllerName) - return nil, err - } - if !started { - logger.Info("Warning: skipping controller", "controller", controllerName) - return nil, nil - } - check := controllerhealthz.NamedPingChecker(controllerName) - if ctrl != nil { - // check if the controller supports and requests a debugHandler - // and it needs the unsecuredMux to mount the handler onto. - if debuggable, ok := ctrl.(controller.Debuggable); ok && unsecuredMux != nil { - if debugHandler := debuggable.DebuggingHandler(); debugHandler != nil { - basePath := "/debug/controllers/" + controllerName - unsecuredMux.UnlistedHandle(basePath, http.StripPrefix(basePath, debugHandler)) - unsecuredMux.UnlistedHandlePrefix(basePath+"/", http.StripPrefix(basePath, debugHandler)) - } + // Regularly print the controllers that still haven't returned. + logPeriod := shutdownTimeout / 3 + if logPeriod == 0 { + logPeriod = 5 * time.Second } - if healthCheckable, ok := ctrl.(controller.HealthCheckable); ok { - if realCheck := healthCheckable.HealthChecker(); realCheck != nil { - check = controllerhealthz.NamedHealthChecker(controllerName, realCheck) + ticker := time.NewTicker(logPeriod) + defer ticker.Stop() + for { + select { + case <-ticker.C: + runningControllersLock.Lock() + running := sets.List(runningControllers) + runningControllersLock.Unlock() + + logger.Info("Still waiting for some controllers to terminate...", "runningControllers", running) + + case <-loggingCtx.Done(): + return } } - } - - logger.Info("Started controller", "controller", controllerName) - return check, nil -} - -// serviceAccountTokenControllerStarter is special because it must run first to set up permissions for other controllers. -// It cannot use the "normal" client builder, so it tracks its own. -func newServiceAccountTokenControllerDescriptor(rootClientBuilder clientbuilder.ControllerClientBuilder) *ControllerDescriptor { - return &ControllerDescriptor{ - name: names.ServiceAccountTokenController, - aliases: []string{"serviceaccount-token"}, - initFunc: func(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - return startServiceAccountTokenController(ctx, controllerContext, controllerName, rootClientBuilder) - }, - // will make sure it runs first before other controllers - requiresSpecialHandling: true, - } -} - -func startServiceAccountTokenController(ctx context.Context, controllerContext ControllerContext, controllerName string, rootClientBuilder clientbuilder.ControllerClientBuilder) (controller.Interface, bool, error) { - logger := klog.FromContext(ctx) - if len(controllerContext.ComponentConfig.SAController.ServiceAccountKeyFile) == 0 { - logger.Info("Controller is disabled because there is no private key", "controller", controllerName) - return nil, false, nil - } - privateKey, err := keyutil.PrivateKeyFromFile(controllerContext.ComponentConfig.SAController.ServiceAccountKeyFile) - if err != nil { - return nil, true, fmt.Errorf("error reading key for service account token controller: %v", err) - } - - var rootCA []byte - if controllerContext.ComponentConfig.SAController.RootCAFile != "" { - if rootCA, err = readCA(controllerContext.ComponentConfig.SAController.RootCAFile); err != nil { - return nil, true, fmt.Errorf("error parsing root-ca-file at %s: %v", controllerContext.ComponentConfig.SAController.RootCAFile, err) + }() + + terminatedCh := make(chan struct{}) + go func() { + defer close(terminatedCh) + var wg sync.WaitGroup + wg.Add(len(controllers)) + for _, controller := range controllers { + go func() { + defer wg.Done() + + // It would be better to unblock and return on context cancelled here, + // but that makes tests more flaky regarding timing. + time.Sleep(wait.Jitter(controllerCtx.ComponentConfig.Generic.ControllerStartInterval.Duration, controllerStartJitterMaxFactor)) + + logger.V(1).Info("Controller starting...", "controller", controller.Name()) + + runningControllersLock.Lock() + runningControllers.Insert(controller.Name()) + runningControllersLock.Unlock() + + defer func() { + logger.V(1).Info("Controller terminated", "controller", controller.Name()) + + runningControllersLock.Lock() + runningControllers.Delete(controller.Name()) + runningControllersLock.Unlock() + }() + controller.Run(ctx) + }() } - } else { - rootCA = rootClientBuilder.ConfigOrDie("tokens-controller").CAData + wg.Wait() + logger.Info("All controllers terminated") + }() + + // Wait for a signal to terminate. + select { + case <-ctx.Done(): + case <-terminatedCh: + return true + } + + // Wait for the shutdown timeout. + var shutdownCh <-chan time.Time + if shutdownTimeout > 0 { + shutdownCh = time.After(shutdownTimeout) + } + select { + case <-terminatedCh: + return true + case <-shutdownCh: + runningControllersLock.Lock() + running := sets.List(runningControllers) + runningControllersLock.Unlock() + logger.Info("Controller shutdown timeout reached", "timeout", shutdownTimeout, "runningControllers", running) + return false } - - tokenGenerator, err := serviceaccount.JWTTokenGenerator(serviceaccount.LegacyIssuer, privateKey) - if err != nil { - return nil, false, fmt.Errorf("failed to build token generator: %v", err) - } - tokenController, err := serviceaccountcontroller.NewTokensController( - logger, - controllerContext.InformerFactory.Core().V1().ServiceAccounts(), - controllerContext.InformerFactory.Core().V1().Secrets(), - rootClientBuilder.ClientOrDie("tokens-controller"), - serviceaccountcontroller.TokensControllerOptions{ - TokenGenerator: tokenGenerator, - RootCA: rootCA, - }, - ) - if err != nil { - return nil, true, fmt.Errorf("error creating Tokens controller: %v", err) - } - go tokenController.Run(ctx, int(controllerContext.ComponentConfig.SAController.ConcurrentSATokenSyncs)) - - // start the first set of informers now so that other controllers can start - controllerContext.InformerFactory.Start(ctx.Done()) - - return nil, true, nil } func readCA(file string) ([]byte, error) { diff --git a/cmd/kube-controller-manager/app/controllermanager_test.go b/cmd/kube-controller-manager/app/controllermanager_test.go index ae5844049b03b..92fb4c1c8a96c 100644 --- a/cmd/kube-controller-manager/app/controllermanager_test.go +++ b/cmd/kube-controller-manager/app/controllermanager_test.go @@ -21,16 +21,17 @@ import ( "regexp" "strings" "testing" + "time" "github.com/google/go-cmp/cmp" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/version" + "k8s.io/apiserver/pkg/server/healthz" utilfeature "k8s.io/apiserver/pkg/util/feature" cpnames "k8s.io/cloud-provider/names" "k8s.io/component-base/featuregate" featuregatetesting "k8s.io/component-base/featuregate/testing" - controllermanagercontroller "k8s.io/controller-manager/controller" "k8s.io/klog/v2/ktesting" "k8s.io/kubernetes/cmd/kube-controller-manager/names" "k8s.io/kubernetes/pkg/features" @@ -120,8 +121,9 @@ func TestNewControllerDescriptorsAlwaysReturnsDescriptorsForAllControllers(t *te controllersWithoutFeatureGates := KnownControllers() - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, "AllAlpha", true) + // AllBeta must be enabled before AllAlpha to resolve dependencies. featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, "AllBeta", true) + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, "AllAlpha", true) controllersWithFeatureGates := KnownControllers() @@ -206,19 +208,21 @@ func TestTaintEvictionControllerGating(t *testing.T) { initFuncCalled := false taintEvictionControllerDescriptor := NewControllerDescriptors()[names.TaintEvictionController] - taintEvictionControllerDescriptor.initFunc = func(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller controllermanagercontroller.Interface, enabled bool, err error) { + taintEvictionControllerDescriptor.constructor = func(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { initFuncCalled = true - return nil, true, nil + return newControllerLoop(func(ctx context.Context) {}, controllerName), nil } - healthCheck, err := StartController(ctx, controllerCtx, taintEvictionControllerDescriptor, nil) - if err != nil { + var healthChecks mockHealthCheckAdder + if err := runControllers(ctx, controllerCtx, map[string]*ControllerDescriptor{ + names.TaintEvictionController: taintEvictionControllerDescriptor, + }, &healthChecks); err != nil { t.Errorf("starting a TaintEvictionController controller should not return an error") } if test.expectInitFuncCall != initFuncCalled { t.Errorf("TaintEvictionController init call check failed: expected=%v, got=%v", test.expectInitFuncCall, initFuncCalled) } - hasHealthCheck := healthCheck != nil + hasHealthCheck := len(healthChecks.Checks) > 0 expectHealthCheck := test.expectInitFuncCall if expectHealthCheck != hasHealthCheck { t.Errorf("TaintEvictionController healthCheck check failed: expected=%v, got=%v", expectHealthCheck, hasHealthCheck) @@ -229,23 +233,96 @@ func TestTaintEvictionControllerGating(t *testing.T) { func TestNoCloudProviderControllerStarted(t *testing.T) { _, ctx := ktesting.NewTestContext(t) - ctx, cancel := context.WithCancel(ctx) - defer cancel() - controllerCtx := ControllerContext{} controllerCtx.ComponentConfig.Generic.Controllers = []string{"*"} - for _, controller := range NewControllerDescriptors() { + cpControllerDescriptors := make(map[string]*ControllerDescriptor) + for controllerName, controller := range NewControllerDescriptors() { if !controller.IsCloudProviderController() { continue } - controllerName := controller.Name() - checker, err := StartController(ctx, controllerCtx, controller, nil) - if err != nil { - t.Errorf("Error starting controller %q: %v", controllerName, err) - } - if checker != nil { - t.Errorf("Controller %q should not be started", controllerName) + controller.constructor = func(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + return newControllerLoop(func(ctx context.Context) { + t.Error("Controller should not be started:", controllerName) + }, controllerName), nil } + + cpControllerDescriptors[controllerName] = controller + } + + var healthChecks mockHealthCheckAdder + if err := runControllers(ctx, controllerCtx, cpControllerDescriptors, &healthChecks); err != nil { + t.Error("Failed to start controllers:", err) + } +} + +func TestRunControllers(t *testing.T) { + testCases := []struct { + name string + newController func(ctx context.Context) Controller + shutdownTimeout time.Duration + expectedCleanTermination bool + }{ + { + name: "clean shutdown", + newController: func(testCtx context.Context) Controller { + return newControllerLoop(func(ctx context.Context) { + <-ctx.Done() + }, "controller-A") + }, + shutdownTimeout: 10 * time.Second, + expectedCleanTermination: true, + }, + { + name: "shutdown timeout", + newController: func(testCtx context.Context) Controller { + return newControllerLoop(func(ctx context.Context) { + <-testCtx.Done() + }, "controller-A") + }, + shutdownTimeout: 50 * time.Millisecond, + expectedCleanTermination: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + _, ctx := ktesting.NewTestContext(t) + controllerCtx := ControllerContext{} + + // testCtx is used to make sure the controller failing to shut down can exit after the test is finished. + testCtx, cancelTest := context.WithCancel(ctx) + defer cancelTest() + + // ctx is used to wait in the controller for shutdown and also to start the shutdown timeout in RunControllers. + // To start the shutdown timeout immediately, we start with a cancelled context already. + ctx, cancelController := context.WithCancel(ctx) + cancelController() + + cleanShutdown := RunControllers(ctx, controllerCtx, []Controller{tc.newController(testCtx)}, 0, tc.shutdownTimeout) + if cleanShutdown != tc.expectedCleanTermination { + t.Errorf("expected clean shutdown %v, got %v", tc.expectedCleanTermination, cleanShutdown) + } + }) + } +} + +type mockHealthCheckAdder struct { + Checks []healthz.HealthChecker +} + +func (m *mockHealthCheckAdder) AddHealthChecker(checks ...healthz.HealthChecker) { + m.Checks = append(m.Checks, checks...) +} + +func runControllers( + ctx context.Context, controllerCtx ControllerContext, + controllerDescriptors map[string]*ControllerDescriptor, healthzChecks HealthCheckAdder, +) error { + controllers, err := BuildControllers(ctx, controllerCtx, controllerDescriptors, nil, healthzChecks) + if err != nil { + return err } + RunControllers(ctx, controllerCtx, controllers, 0, 0) + return nil } diff --git a/cmd/kube-controller-manager/app/core.go b/cmd/kube-controller-manager/app/core.go index 8cf5465578a9e..dfef26d590235 100644 --- a/cmd/kube-controller-manager/app/core.go +++ b/cmd/kube-controller-manager/app/core.go @@ -31,6 +31,7 @@ import ( genericfeatures "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/quota/v1/generic" utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/client-go/discovery" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/metadata" restclient "k8s.io/client-go/rest" @@ -82,47 +83,43 @@ const ( func newServiceLBControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: cpnames.ServiceLBController, - aliases: []string{"service"}, - initFunc: startServiceLBController, + name: cpnames.ServiceLBController, + aliases: []string{"service"}, + constructor: func(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + logger := klog.FromContext(ctx) + logger.Info("Warning: service-controller is set, but no cloud provider functionality is available in kube-controller-manger (KEP-2395). Will not configure service controller.") + return nil, nil + }, isCloudProviderController: true, } } -func startServiceLBController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - logger := klog.FromContext(ctx) - logger.Info("Warning: service-controller is set, but no cloud provider functionality is available in kube-controller-manger (KEP-2395). Will not configure service controller.") - return nil, false, nil -} func newNodeIpamControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.NodeIpamController, - aliases: []string{"nodeipam"}, - initFunc: startNodeIpamController, + name: names.NodeIpamController, + aliases: []string{"nodeipam"}, + constructor: newNodeIpamController, } } -func startNodeIpamController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - var serviceCIDR *net.IPNet - var secondaryServiceCIDR *net.IPNet - logger := klog.FromContext(ctx) - - // should we start nodeIPAM +func newNodeIpamController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { if !controllerContext.ComponentConfig.KubeCloudShared.AllocateNodeCIDRs { - return nil, false, nil + return nil, nil } - if controllerContext.ComponentConfig.KubeCloudShared.CIDRAllocatorType == string(ipam.CloudAllocatorType) { // Cannot run cloud ipam controller if cloud provider is nil (--cloud-provider not set or set to 'external') - return nil, false, errors.New("--cidr-allocator-type is set to 'CloudAllocator' but cloud provider is not configured") + return nil, errors.New("--cidr-allocator-type is set to 'CloudAllocator' but cloud provider is not configured") } clusterCIDRs, err := validateCIDRs(controllerContext.ComponentConfig.KubeCloudShared.ClusterCIDR) if err != nil { - return nil, false, err + return nil, err } // service cidr processing + var serviceCIDR *net.IPNet + var secondaryServiceCIDR *net.IPNet + logger := klog.FromContext(ctx) if len(strings.TrimSpace(controllerContext.ComponentConfig.NodeIPAMController.ServiceCIDR)) != 0 { _, serviceCIDR, err = netutils.ParseCIDRSloppy(controllerContext.ComponentConfig.NodeIPAMController.ServiceCIDR) if err != nil { @@ -142,10 +139,10 @@ func startNodeIpamController(ctx context.Context, controllerContext ControllerCo // should be dual stack (from different IPFamilies) dualstackServiceCIDR, err := netutils.IsDualStackCIDRs([]*net.IPNet{serviceCIDR, secondaryServiceCIDR}) if err != nil { - return nil, false, fmt.Errorf("failed to perform dualstack check on serviceCIDR and secondaryServiceCIDR error: %w", err) + return nil, fmt.Errorf("failed to perform dualstack check on serviceCIDR and secondaryServiceCIDR error: %w", err) } if !dualstackServiceCIDR { - return nil, false, fmt.Errorf("serviceCIDR and secondaryServiceCIDR are not dualstack (from different IPfamiles)") + return nil, fmt.Errorf("serviceCIDR and secondaryServiceCIDR are not dualstack (from different IPfamiles)") } } @@ -153,14 +150,19 @@ func startNodeIpamController(ctx context.Context, controllerContext ControllerCo // --node-cidr-mask-size flag is incompatible with dual stack clusters. nodeCIDRMaskSizes, err := setNodeCIDRMaskSizes(controllerContext.ComponentConfig.NodeIPAMController, clusterCIDRs) if err != nil { - return nil, false, err + return nil, err + } + + client, err := controllerContext.NewClient("node-controller") + if err != nil { + return nil, err } nodeIpamController, err := nodeipamcontroller.NewNodeIpamController( ctx, controllerContext.InformerFactory.Core().V1().Nodes(), nil, // no cloud provider on kube-controller-manager since v1.31 (KEP-2395) - controllerContext.ClientBuilder.ClientOrDie("node-controller"), + client, clusterCIDRs, serviceCIDR, secondaryServiceCIDR, @@ -168,29 +170,36 @@ func startNodeIpamController(ctx context.Context, controllerContext ControllerCo ipam.CIDRAllocatorType(controllerContext.ComponentConfig.KubeCloudShared.CIDRAllocatorType), ) if err != nil { - return nil, true, err + return nil, err } - go nodeIpamController.RunWithMetrics(ctx, controllerContext.ControllerManagerMetrics) - return nil, true, nil + + return newControllerLoop(func(ctx context.Context) { + nodeIpamController.RunWithMetrics(ctx, controllerContext.ControllerManagerMetrics) + }, controllerName), nil } func newNodeLifecycleControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.NodeLifecycleController, - aliases: []string{"nodelifecycle"}, - initFunc: startNodeLifecycleController, + name: names.NodeLifecycleController, + aliases: []string{"nodelifecycle"}, + constructor: newNodeLifecycleController, } } -func startNodeLifecycleController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - lifecycleController, err := lifecyclecontroller.NewNodeLifecycleController( +func newNodeLifecycleController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("node-controller") + if err != nil { + return nil, err + } + + nlc, err := lifecyclecontroller.NewNodeLifecycleController( ctx, controllerContext.InformerFactory.Coordination().V1().Leases(), controllerContext.InformerFactory.Core().V1().Pods(), controllerContext.InformerFactory.Core().V1().Nodes(), controllerContext.InformerFactory.Apps().V1().DaemonSets(), // node lifecycle controller uses existing cluster role from node-controller - controllerContext.ClientBuilder.ClientOrDie("node-controller"), + client, controllerContext.ComponentConfig.KubeCloudShared.NodeMonitorPeriod.Duration, controllerContext.ComponentConfig.NodeLifecycleController.NodeStartupGracePeriod.Duration, controllerContext.ComponentConfig.NodeLifecycleController.NodeMonitorGracePeriod.Duration, @@ -200,42 +209,49 @@ func startNodeLifecycleController(ctx context.Context, controllerContext Control controllerContext.ComponentConfig.NodeLifecycleController.UnhealthyZoneThreshold, ) if err != nil { - return nil, true, err + return nil, err } - go lifecycleController.Run(ctx) - return nil, true, nil + + return newControllerLoop(func(ctx context.Context) { + nlc.Run(ctx) + }, controllerName), nil } func newTaintEvictionControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.TaintEvictionController, - initFunc: startTaintEvictionController, + name: names.TaintEvictionController, + constructor: newTaintEvictionController, requiredFeatureGates: []featuregate.Feature{ features.SeparateTaintEvictionController, }, } } -func startTaintEvictionController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - taintEvictionController, err := tainteviction.New( +func newTaintEvictionController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + // taint-manager uses existing cluster role from node-controller + client, err := controllerContext.NewClient("node-controller") + if err != nil { + return nil, err + } + + tec, err := tainteviction.New( ctx, - // taint-manager uses existing cluster role from node-controller - controllerContext.ClientBuilder.ClientOrDie("node-controller"), + client, controllerContext.InformerFactory.Core().V1().Pods(), controllerContext.InformerFactory.Core().V1().Nodes(), controllerName, ) if err != nil { - return nil, false, err + return nil, err } - go taintEvictionController.Run(ctx) - return nil, true, nil + + return newControllerLoop(tec.Run, controllerName), nil } func newDeviceTaintEvictionControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.DeviceTaintEvictionController, - initFunc: startDeviceTaintEvictionController, + name: names.DeviceTaintEvictionController, + constructor: newDeviceTaintEvictionController, requiredFeatureGates: []featuregate.Feature{ // TODO update app.TestFeatureGatedControllersShouldNotDefineAliases when removing these feature gates. features.DynamicResourceAllocation, @@ -244,9 +260,14 @@ func newDeviceTaintEvictionControllerDescriptor() *ControllerDescriptor { } } -func startDeviceTaintEvictionController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newDeviceTaintEvictionController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient(names.DeviceTaintEvictionController) + if err != nil { + return nil, err + } + deviceTaintEvictionController := devicetainteviction.New( - controllerContext.ClientBuilder.ClientOrDie(names.DeviceTaintEvictionController), + client, controllerContext.InformerFactory.Core().V1().Pods(), controllerContext.InformerFactory.Resource().V1().ResourceClaims(), controllerContext.InformerFactory.Resource().V1().ResourceSlices(), @@ -254,61 +275,62 @@ func startDeviceTaintEvictionController(ctx context.Context, controllerContext C controllerContext.InformerFactory.Resource().V1().DeviceClasses(), controllerName, ) - go func() { + return newControllerLoop(func(ctx context.Context) { if err := deviceTaintEvictionController.Run(ctx); err != nil { klog.FromContext(ctx).Error(err, "Device taint processing leading to Pod eviction failed and is now paused") } - }() - return nil, true, nil + <-ctx.Done() + }, controllerName), nil } func newCloudNodeLifecycleControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: cpnames.CloudNodeLifecycleController, - aliases: []string{"cloud-node-lifecycle"}, - initFunc: startCloudNodeLifecycleController, + name: cpnames.CloudNodeLifecycleController, + aliases: []string{"cloud-node-lifecycle"}, + constructor: func(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + logger := klog.FromContext(ctx) + logger.Info("Warning: node-controller is set, but no cloud provider functionality is available in kube-controller-manger (KEP-2395). Will not configure node lifecyle controller.") + return nil, nil + }, isCloudProviderController: true, } } -func startCloudNodeLifecycleController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - logger := klog.FromContext(ctx) - logger.Info("Warning: node-controller is set, but no cloud provider functionality is available in kube-controller-manger (KEP-2395). Will not configure node lifecyle controller.") - return nil, false, nil -} - func newNodeRouteControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: cpnames.NodeRouteController, - aliases: []string{"route"}, - initFunc: startNodeRouteController, + name: cpnames.NodeRouteController, + aliases: []string{"route"}, + constructor: func(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + logger := klog.FromContext(ctx) + logger.Info("Warning: configure-cloud-routes is set, but no cloud provider functionality is available in kube-controller-manger (KEP-2395). Will not configure cloud provider routes.") + return nil, nil + }, isCloudProviderController: true, } } -func startNodeRouteController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - logger := klog.FromContext(ctx) - logger.Info("Warning: configure-cloud-routes is set, but no cloud provider functionality is available in kube-controller-manger (KEP-2395). Will not configure cloud provider routes.") - return nil, false, nil -} - func newPersistentVolumeBinderControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.PersistentVolumeBinderController, - aliases: []string{"persistentvolume-binder"}, - initFunc: startPersistentVolumeBinderController, + name: names.PersistentVolumeBinderController, + aliases: []string{"persistentvolume-binder"}, + constructor: newPersistentVolumeBinderController, } } -func startPersistentVolumeBinderController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newPersistentVolumeBinderController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { logger := klog.FromContext(ctx) plugins, err := ProbeProvisionableRecyclableVolumePlugins(logger, controllerContext.ComponentConfig.PersistentVolumeBinderController.VolumeConfiguration) if err != nil { - return nil, true, fmt.Errorf("failed to probe volume plugins when starting persistentvolume controller: %v", err) + return nil, fmt.Errorf("failed to probe volume plugins when starting persistentvolume controller: %w", err) + } + + client, err := controllerContext.NewClient("persistent-volume-binder") + if err != nil { + return nil, err } params := persistentvolumecontroller.ControllerParameters{ - KubeClient: controllerContext.ClientBuilder.ClientOrDie("persistent-volume-binder"), + KubeClient: client, SyncPeriod: controllerContext.ComponentConfig.PersistentVolumeBinderController.PVClaimBinderSyncPeriod.Duration, VolumePlugins: plugins, VolumeInformer: controllerContext.InformerFactory.Core().V1().PersistentVolumes(), @@ -318,211 +340,261 @@ func startPersistentVolumeBinderController(ctx context.Context, controllerContex NodeInformer: controllerContext.InformerFactory.Core().V1().Nodes(), EnableDynamicProvisioning: controllerContext.ComponentConfig.PersistentVolumeBinderController.VolumeConfiguration.EnableDynamicProvisioning, } - volumeController, volumeControllerErr := persistentvolumecontroller.NewController(ctx, params) - if volumeControllerErr != nil { - return nil, true, fmt.Errorf("failed to construct persistentvolume controller: %v", volumeControllerErr) + volumeController, err := persistentvolumecontroller.NewController(ctx, params) + if err != nil { + return nil, fmt.Errorf("failed to construct persistentvolume controller: %w", err) } - go volumeController.Run(ctx) - return nil, true, nil + + return newControllerLoop(volumeController.Run, controllerName), nil } func newPersistentVolumeAttachDetachControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.PersistentVolumeAttachDetachController, - aliases: []string{"attachdetach"}, - initFunc: startPersistentVolumeAttachDetachController, + name: names.PersistentVolumeAttachDetachController, + aliases: []string{"attachdetach"}, + constructor: newPersistentVolumeAttachDetachController, } } -func startPersistentVolumeAttachDetachController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newPersistentVolumeAttachDetachController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { logger := klog.FromContext(ctx) csiNodeInformer := controllerContext.InformerFactory.Storage().V1().CSINodes() csiDriverInformer := controllerContext.InformerFactory.Storage().V1().CSIDrivers() plugins, err := ProbeAttachableVolumePlugins(logger, controllerContext.ComponentConfig.PersistentVolumeBinderController.VolumeConfiguration) if err != nil { - return nil, true, fmt.Errorf("failed to probe volume plugins when starting attach/detach controller: %v", err) + return nil, fmt.Errorf("failed to probe volume plugins when starting attach/detach controller: %w", err) + } + + client, err := controllerContext.NewClient("attachdetach-controller") + if err != nil { + return nil, err } ctx = klog.NewContext(ctx, logger) - attachDetachController, attachDetachControllerErr := - attachdetach.NewAttachDetachController( - ctx, - controllerContext.ClientBuilder.ClientOrDie("attachdetach-controller"), - controllerContext.InformerFactory.Core().V1().Pods(), - controllerContext.InformerFactory.Core().V1().Nodes(), - controllerContext.InformerFactory.Core().V1().PersistentVolumeClaims(), - controllerContext.InformerFactory.Core().V1().PersistentVolumes(), - csiNodeInformer, - csiDriverInformer, - controllerContext.InformerFactory.Storage().V1().VolumeAttachments(), - plugins, - GetDynamicPluginProber(controllerContext.ComponentConfig.PersistentVolumeBinderController.VolumeConfiguration), - controllerContext.ComponentConfig.AttachDetachController.DisableAttachDetachReconcilerSync, - controllerContext.ComponentConfig.AttachDetachController.ReconcilerSyncLoopPeriod.Duration, - controllerContext.ComponentConfig.AttachDetachController.DisableForceDetachOnTimeout, - attachdetach.DefaultTimerConfig, - ) - if attachDetachControllerErr != nil { - return nil, true, fmt.Errorf("failed to start attach/detach controller: %v", attachDetachControllerErr) - } - go attachDetachController.Run(ctx) - return nil, true, nil + attachDetachController, err := attachdetach.NewAttachDetachController( + ctx, + client, + controllerContext.InformerFactory.Core().V1().Pods(), + controllerContext.InformerFactory.Core().V1().Nodes(), + controllerContext.InformerFactory.Core().V1().PersistentVolumeClaims(), + controllerContext.InformerFactory.Core().V1().PersistentVolumes(), + csiNodeInformer, + csiDriverInformer, + controllerContext.InformerFactory.Storage().V1().VolumeAttachments(), + plugins, + GetDynamicPluginProber(controllerContext.ComponentConfig.PersistentVolumeBinderController.VolumeConfiguration), + controllerContext.ComponentConfig.AttachDetachController.DisableAttachDetachReconcilerSync, + controllerContext.ComponentConfig.AttachDetachController.ReconcilerSyncLoopPeriod.Duration, + controllerContext.ComponentConfig.AttachDetachController.DisableForceDetachOnTimeout, + attachdetach.DefaultTimerConfig, + ) + if err != nil { + return nil, fmt.Errorf("failed to start attach/detach controller: %w", err) + } + + return newControllerLoop(attachDetachController.Run, controllerName), nil } func newPersistentVolumeExpanderControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.PersistentVolumeExpanderController, - aliases: []string{"persistentvolume-expander"}, - initFunc: startPersistentVolumeExpanderController, + name: names.PersistentVolumeExpanderController, + aliases: []string{"persistentvolume-expander"}, + constructor: newPersistentVolumeExpanderController, } } -func startPersistentVolumeExpanderController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newPersistentVolumeExpanderController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { logger := klog.FromContext(ctx) plugins, err := ProbeExpandableVolumePlugins(logger, controllerContext.ComponentConfig.PersistentVolumeBinderController.VolumeConfiguration) if err != nil { - return nil, true, fmt.Errorf("failed to probe volume plugins when starting volume expand controller: %v", err) + return nil, fmt.Errorf("failed to probe volume plugins when starting volume expand controller: %w", err) } csiTranslator := csitrans.New() - expandController, expandControllerErr := expand.NewExpandController( + client, err := controllerContext.NewClient("expand-controller") + if err != nil { + return nil, err + } + + expandController, err := expand.NewExpandController( ctx, - controllerContext.ClientBuilder.ClientOrDie("expand-controller"), + client, controllerContext.InformerFactory.Core().V1().PersistentVolumeClaims(), plugins, csiTranslator, csimigration.NewPluginManager(csiTranslator, utilfeature.DefaultFeatureGate), ) - - if expandControllerErr != nil { - return nil, true, fmt.Errorf("failed to start volume expand controller: %v", expandControllerErr) + if err != nil { + return nil, fmt.Errorf("failed to init volume expand controller: %w", err) } - go expandController.Run(ctx) - return nil, true, nil + + return newControllerLoop(expandController.Run, controllerName), nil } func newEphemeralVolumeControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.EphemeralVolumeController, - aliases: []string{"ephemeral-volume"}, - initFunc: startEphemeralVolumeController, + name: names.EphemeralVolumeController, + aliases: []string{"ephemeral-volume"}, + constructor: newEphemeralVolumeController, } } -func startEphemeralVolumeController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newEphemeralVolumeController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("ephemeral-volume-controller") + if err != nil { + return nil, err + } + ephemeralController, err := ephemeral.NewController( ctx, - controllerContext.ClientBuilder.ClientOrDie("ephemeral-volume-controller"), + client, controllerContext.InformerFactory.Core().V1().Pods(), controllerContext.InformerFactory.Core().V1().PersistentVolumeClaims()) if err != nil { - return nil, true, fmt.Errorf("failed to start ephemeral volume controller: %v", err) + return nil, fmt.Errorf("failed to init ephemeral volume controller: %w", err) } - go ephemeralController.Run(ctx, int(controllerContext.ComponentConfig.EphemeralVolumeController.ConcurrentEphemeralVolumeSyncs)) - return nil, true, nil + + return newControllerLoop(func(ctx context.Context) { + ephemeralController.Run(ctx, int(controllerContext.ComponentConfig.EphemeralVolumeController.ConcurrentEphemeralVolumeSyncs)) + }, controllerName), nil } const defaultResourceClaimControllerWorkers = 50 func newResourceClaimControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.ResourceClaimController, - aliases: []string{"resource-claim-controller"}, - initFunc: startResourceClaimController, + name: names.ResourceClaimController, + aliases: []string{"resource-claim-controller"}, + constructor: newResourceClaimController, requiredFeatureGates: []featuregate.Feature{ features.DynamicResourceAllocation, // TODO update app.TestFeatureGatedControllersShouldNotDefineAliases when removing this feature }, } } -func startResourceClaimController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newResourceClaimController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("resource-claim-controller") + if err != nil { + return nil, err + } + ephemeralController, err := resourceclaim.NewController( klog.FromContext(ctx), resourceclaim.Features{ AdminAccess: utilfeature.DefaultFeatureGate.Enabled(features.DRAAdminAccess), PrioritizedList: utilfeature.DefaultFeatureGate.Enabled(features.DRAPrioritizedList), }, - controllerContext.ClientBuilder.ClientOrDie("resource-claim-controller"), + client, controllerContext.InformerFactory.Core().V1().Pods(), controllerContext.InformerFactory.Resource().V1().ResourceClaims(), controllerContext.InformerFactory.Resource().V1().ResourceClaimTemplates()) if err != nil { - return nil, true, fmt.Errorf("failed to start resource claim controller: %v", err) + return nil, fmt.Errorf("failed to init resource claim controller: %w", err) } - go ephemeralController.Run(ctx, defaultResourceClaimControllerWorkers) - return nil, true, nil + + return newControllerLoop(func(ctx context.Context) { + ephemeralController.Run(ctx, defaultResourceClaimControllerWorkers) + }, controllerName), nil } func newEndpointsControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.EndpointsController, - aliases: []string{"endpoint"}, - initFunc: startEndpointsController, + name: names.EndpointsController, + aliases: []string{"endpoint"}, + constructor: newEndpointsController, } } -func startEndpointsController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - go endpointcontroller.NewEndpointController( +func newEndpointsController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("endpoint-controller") + if err != nil { + return nil, err + } + + ec := endpointcontroller.NewEndpointController( ctx, controllerContext.InformerFactory.Core().V1().Pods(), controllerContext.InformerFactory.Core().V1().Services(), controllerContext.InformerFactory.Core().V1().Endpoints(), - controllerContext.ClientBuilder.ClientOrDie("endpoint-controller"), + client, controllerContext.ComponentConfig.EndpointController.EndpointUpdatesBatchPeriod.Duration, - ).Run(ctx, int(controllerContext.ComponentConfig.EndpointController.ConcurrentEndpointSyncs)) - return nil, true, nil + ) + return newControllerLoop(func(ctx context.Context) { + ec.Run(ctx, int(controllerContext.ComponentConfig.EndpointController.ConcurrentEndpointSyncs)) + }, controllerName), nil } func newReplicationControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.ReplicationControllerController, - aliases: []string{"replicationcontroller"}, - initFunc: startReplicationController, + name: names.ReplicationControllerController, + aliases: []string{"replicationcontroller"}, + constructor: newReplicationController, } } -func startReplicationController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - go replicationcontroller.NewReplicationManager( +func newReplicationController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("replication-controller") + if err != nil { + return nil, err + } + + rc := replicationcontroller.NewReplicationManager( ctx, controllerContext.InformerFactory.Core().V1().Pods(), controllerContext.InformerFactory.Core().V1().ReplicationControllers(), - controllerContext.ClientBuilder.ClientOrDie("replication-controller"), + client, replicationcontroller.BurstReplicas, - ).Run(ctx, int(controllerContext.ComponentConfig.ReplicationController.ConcurrentRCSyncs)) - return nil, true, nil + ) + + return newControllerLoop(func(ctx context.Context) { + rc.Run(ctx, int(controllerContext.ComponentConfig.ReplicationController.ConcurrentRCSyncs)) + }, controllerName), nil } func newPodGarbageCollectorControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.PodGarbageCollectorController, - aliases: []string{"podgc"}, - initFunc: startPodGarbageCollectorController, + name: names.PodGarbageCollectorController, + aliases: []string{"podgc"}, + constructor: newPodGarbageCollectorController, } } -func startPodGarbageCollectorController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - go podgc.NewPodGC( +func newPodGarbageCollectorController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("pod-garbage-collector") + if err != nil { + return nil, err + } + + pgcc := podgc.NewPodGC( ctx, - controllerContext.ClientBuilder.ClientOrDie("pod-garbage-collector"), + client, controllerContext.InformerFactory.Core().V1().Pods(), controllerContext.InformerFactory.Core().V1().Nodes(), int(controllerContext.ComponentConfig.PodGCController.TerminatedPodGCThreshold), - ).Run(ctx) - return nil, true, nil + ) + return newControllerLoop(pgcc.Run, controllerName), nil } func newResourceQuotaControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.ResourceQuotaController, - aliases: []string{"resourcequota"}, - initFunc: startResourceQuotaController, + name: names.ResourceQuotaController, + aliases: []string{"resourcequota"}, + constructor: newResourceQuotaController, } } -func startResourceQuotaController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - resourceQuotaControllerClient := controllerContext.ClientBuilder.ClientOrDie("resourcequota-controller") - resourceQuotaControllerDiscoveryClient := controllerContext.ClientBuilder.DiscoveryClientOrDie("resourcequota-controller") +func newResourceQuotaController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + resourceQuotaControllerClient, err := controllerContext.NewClient("resourcequota-controller") + if err != nil { + return nil, err + } + + resourceQuotaControllerDiscoveryClient, err := controllerContext.ClientBuilder.DiscoveryClient("resourcequota-controller") + if err != nil { + return nil, fmt.Errorf("failed to create the discovery client: %w", err) + } + discoveryFunc := resourceQuotaControllerDiscoveryClient.ServerPreferredNamespacedResources listerFuncForResource := generic.ListerFuncForResourceFunc(controllerContext.InformerFactory.ForResource) quotaConfiguration := quotainstall.NewQuotaConfigurationForControllers(listerFuncForResource) @@ -541,40 +613,54 @@ func startResourceQuotaController(ctx context.Context, controllerContext Control } resourceQuotaController, err := resourcequotacontroller.NewController(ctx, resourceQuotaControllerOptions) if err != nil { - return nil, false, err + return nil, err } - go resourceQuotaController.Run(ctx, int(controllerContext.ComponentConfig.ResourceQuotaController.ConcurrentResourceQuotaSyncs)) - // Periodically the quota controller to detect new resource types - go resourceQuotaController.Sync(ctx, discoveryFunc, 30*time.Second) - - return nil, true, nil + return newControllerLoop(concurrentRun( + func(ctx context.Context) { + resourceQuotaController.Run(ctx, int(controllerContext.ComponentConfig.ResourceQuotaController.ConcurrentResourceQuotaSyncs)) + }, + func(ctx context.Context) { + resourceQuotaController.Sync(ctx, discoveryFunc, 30*time.Second) + }, + ), controllerName), nil } func newNamespaceControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.NamespaceController, - aliases: []string{"namespace"}, - initFunc: startNamespaceController, + name: names.NamespaceController, + aliases: []string{"namespace"}, + constructor: newNamespaceController, } } -func startNamespaceController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newNamespaceController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { // the namespace cleanup controller is very chatty. It makes lots of discovery calls and then it makes lots of delete calls // the ratelimiter negatively affects its speed. Deleting 100 total items in a namespace (that's only a few of each resource // including events), takes ~10 seconds by default. - nsKubeconfig := controllerContext.ClientBuilder.ConfigOrDie("namespace-controller") + nsKubeconfig, err := controllerContext.NewClientConfig("namespace-controller") + if err != nil { + return nil, err + } + nsKubeconfig.QPS *= 20 nsKubeconfig.Burst *= 100 - namespaceKubeClient := clientset.NewForConfigOrDie(nsKubeconfig) - return startModifiedNamespaceController(ctx, controllerContext, namespaceKubeClient, nsKubeconfig) -} -func startModifiedNamespaceController(ctx context.Context, controllerContext ControllerContext, namespaceKubeClient clientset.Interface, nsKubeconfig *restclient.Config) (controller.Interface, bool, error) { + namespaceKubeClient, err := clientset.NewForConfig(nsKubeconfig) + if err != nil { + return nil, err + } + + return newModifiedNamespaceController(ctx, controllerContext, controllerName, namespaceKubeClient, nsKubeconfig) +} +func newModifiedNamespaceController( + ctx context.Context, controllerContext ControllerContext, controllerName string, + namespaceKubeClient clientset.Interface, nsKubeconfig *restclient.Config, +) (Controller, error) { metadataClient, err := metadata.NewForConfig(nsKubeconfig) if err != nil { - return nil, true, err + return nil, err } discoverResourcesFn := namespaceKubeClient.Discovery().ServerPreferredNamespacedResources @@ -588,204 +674,289 @@ func startModifiedNamespaceController(ctx context.Context, controllerContext Con controllerContext.ComponentConfig.NamespaceController.NamespaceSyncPeriod.Duration, v1.FinalizerKubernetes, ) - go namespaceController.Run(ctx, int(controllerContext.ComponentConfig.NamespaceController.ConcurrentNamespaceSyncs)) - - return nil, true, nil + return newControllerLoop(func(ctx context.Context) { + namespaceController.Run(ctx, int(controllerContext.ComponentConfig.NamespaceController.ConcurrentNamespaceSyncs)) + }, controllerName), nil } func newServiceAccountControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.ServiceAccountController, - aliases: []string{"serviceaccount"}, - initFunc: startServiceAccountController, + name: names.ServiceAccountController, + aliases: []string{"serviceaccount"}, + constructor: newServiceAccountController, } } -func startServiceAccountController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newServiceAccountController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("service-account-controller") + if err != nil { + return nil, err + } + sac, err := serviceaccountcontroller.NewServiceAccountsController( controllerContext.InformerFactory.Core().V1().ServiceAccounts(), controllerContext.InformerFactory.Core().V1().Namespaces(), - controllerContext.ClientBuilder.ClientOrDie("service-account-controller"), + client, serviceaccountcontroller.DefaultServiceAccountsControllerOptions(), ) if err != nil { - return nil, true, fmt.Errorf("error creating ServiceAccount controller: %v", err) + return nil, fmt.Errorf("error creating ServiceAccount controller: %w", err) } - go sac.Run(ctx, 1) - return nil, true, nil + + return newControllerLoop(func(ctx context.Context) { + sac.Run(ctx, 1) + }, controllerName), nil } func newTTLControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.TTLController, - aliases: []string{"ttl"}, - initFunc: startTTLController, + name: names.TTLController, + aliases: []string{"ttl"}, + constructor: newTTLController, } } -func startTTLController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - go ttlcontroller.NewTTLController( +func newTTLController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("ttl-controller") + if err != nil { + return nil, err + } + + ttlc := ttlcontroller.NewTTLController( ctx, controllerContext.InformerFactory.Core().V1().Nodes(), - controllerContext.ClientBuilder.ClientOrDie("ttl-controller"), - ).Run(ctx, 5) - return nil, true, nil + client, + ) + return newControllerLoop(func(ctx context.Context) { + ttlc.Run(ctx, 5) + }, controllerName), nil } func newGarbageCollectorControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.GarbageCollectorController, - aliases: []string{"garbagecollector"}, - initFunc: startGarbageCollectorController, + name: names.GarbageCollectorController, + aliases: []string{"garbagecollector"}, + constructor: newGarbageCollectorController, } } -func startGarbageCollectorController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +type garbageCollectorController struct { + *garbagecollector.GarbageCollector + controllerContext ControllerContext + controllerName string + discoveryClient discovery.DiscoveryInterface +} + +// Make sure we are propagating properly. +var _ controller.Debuggable = (*garbageCollectorController)(nil) + +func newGarbageCollectorController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { if !controllerContext.ComponentConfig.GarbageCollectorController.EnableGarbageCollector { - return nil, false, nil + return nil, nil + } + + client, err := controllerContext.NewClient("generic-garbage-collector") + if err != nil { + return nil, err + } + + discoveryClient, err := controllerContext.ClientBuilder.DiscoveryClient("generic-garbage-collector") + if err != nil { + return nil, fmt.Errorf("failed to create the discovery client: %w", err) } - gcClientset := controllerContext.ClientBuilder.ClientOrDie("generic-garbage-collector") - discoveryClient := controllerContext.ClientBuilder.DiscoveryClientOrDie("generic-garbage-collector") + config, err := controllerContext.NewClientConfig("generic-garbage-collector") + if err != nil { + return nil, err + } - config := controllerContext.ClientBuilder.ConfigOrDie("generic-garbage-collector") // Increase garbage collector controller's throughput: each object deletion takes two API calls, // so to get |config.QPS| deletion rate we need to allow 2x more requests for this controller. config.QPS *= 2 metadataClient, err := metadata.NewForConfig(config) if err != nil { - return nil, true, err + return nil, err } garbageCollector, err := garbagecollector.NewComposedGarbageCollector( ctx, - gcClientset, + client, metadataClient, controllerContext.RESTMapper, controllerContext.GraphBuilder, ) if err != nil { - return nil, true, fmt.Errorf("failed to start the generic garbage collector: %w", err) + return nil, fmt.Errorf("failed to init the generic garbage collector: %w", err) } - // Start the garbage collector. - workers := int(controllerContext.ComponentConfig.GarbageCollectorController.ConcurrentGCSyncs) - const syncPeriod = 30 * time.Second - go garbageCollector.Run(ctx, workers, syncPeriod) + return &garbageCollectorController{ + GarbageCollector: garbageCollector, + controllerName: controllerName, + controllerContext: controllerContext, + discoveryClient: discoveryClient, + }, nil +} + +// Name must be implemented explicitly as it collides with the embedded controller. +func (c *garbageCollectorController) Name() string { + return c.controllerName +} - // Periodically refresh the RESTMapper with new discovery information and sync - // the garbage collector. - go garbageCollector.Sync(ctx, discoveryClient, syncPeriod) +func (c *garbageCollectorController) Run(ctx context.Context) { + workers := int(c.controllerContext.ComponentConfig.GarbageCollectorController.ConcurrentGCSyncs) + const syncPeriod = 30 * time.Second - return garbageCollector, true, nil + concurrentRun( + func(ctx context.Context) { + c.GarbageCollector.Run(ctx, workers, syncPeriod) + }, + func(ctx context.Context) { + // Periodically refresh the RESTMapper with new discovery information and sync the garbage collector. + c.Sync(ctx, c.discoveryClient, syncPeriod) + }, + )(ctx) } func newPersistentVolumeClaimProtectionControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.PersistentVolumeClaimProtectionController, - aliases: []string{"pvc-protection"}, - initFunc: startPersistentVolumeClaimProtectionController, + name: names.PersistentVolumeClaimProtectionController, + aliases: []string{"pvc-protection"}, + constructor: newPersistentVolumeClaimProtectionController, } } -func startPersistentVolumeClaimProtectionController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newPersistentVolumeClaimProtectionController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("pvc-protection-controller") + if err != nil { + return nil, err + } + pvcProtectionController, err := pvcprotection.NewPVCProtectionController( klog.FromContext(ctx), controllerContext.InformerFactory.Core().V1().PersistentVolumeClaims(), controllerContext.InformerFactory.Core().V1().Pods(), - controllerContext.ClientBuilder.ClientOrDie("pvc-protection-controller"), + client, ) if err != nil { - return nil, true, fmt.Errorf("failed to start the pvc protection controller: %v", err) + return nil, fmt.Errorf("failed to init the pvc protection controller: %w", err) } - go pvcProtectionController.Run(ctx, 1) - return nil, true, nil + + return newControllerLoop(func(ctx context.Context) { + pvcProtectionController.Run(ctx, 1) + }, controllerName), nil } func newPersistentVolumeProtectionControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.PersistentVolumeProtectionController, - aliases: []string{"pv-protection"}, - initFunc: startPersistentVolumeProtectionController, + name: names.PersistentVolumeProtectionController, + aliases: []string{"pv-protection"}, + constructor: newPersistentVolumeProtectionController, } } -func startPersistentVolumeProtectionController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - go pvprotection.NewPVProtectionController( +func newPersistentVolumeProtectionController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("pv-protection-controller") + if err != nil { + return nil, err + } + + pvpc := pvprotection.NewPVProtectionController( klog.FromContext(ctx), controllerContext.InformerFactory.Core().V1().PersistentVolumes(), - controllerContext.ClientBuilder.ClientOrDie("pv-protection-controller"), - ).Run(ctx, 1) - return nil, true, nil + client, + ) + return newControllerLoop(func(ctx context.Context) { + pvpc.Run(ctx, 1) + }, controllerName), nil } func newVolumeAttributesClassProtectionControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.VolumeAttributesClassProtectionController, - initFunc: startVolumeAttributesClassProtectionController, + name: names.VolumeAttributesClassProtectionController, + constructor: newVolumeAttributesClassProtectionController, requiredFeatureGates: []featuregate.Feature{ features.VolumeAttributesClass, }, } } -func startVolumeAttributesClassProtectionController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newVolumeAttributesClassProtectionController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("volumeattributesclass-protection-controller") + if err != nil { + return nil, err + } + vacProtectionController, err := vacprotection.NewVACProtectionController( klog.FromContext(ctx), - controllerContext.ClientBuilder.ClientOrDie("volumeattributesclass-protection-controller"), + client, controllerContext.InformerFactory.Core().V1().PersistentVolumeClaims(), controllerContext.InformerFactory.Core().V1().PersistentVolumes(), controllerContext.InformerFactory.Storage().V1().VolumeAttributesClasses(), ) if err != nil { - return nil, true, fmt.Errorf("failed to start the vac protection controller: %w", err) + return nil, fmt.Errorf("failed to init the vac protection controller: %w", err) } - go vacProtectionController.Run(ctx, 1) - return nil, true, nil + + return newControllerLoop(func(ctx context.Context) { + vacProtectionController.Run(ctx, 1) + }, controllerName), nil } func newTTLAfterFinishedControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.TTLAfterFinishedController, - aliases: []string{"ttl-after-finished"}, - initFunc: startTTLAfterFinishedController, + name: names.TTLAfterFinishedController, + aliases: []string{"ttl-after-finished"}, + constructor: newTTLAfterFinishedController, } } -func startTTLAfterFinishedController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - go ttlafterfinished.New( +func newTTLAfterFinishedController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("ttl-after-finished-controller") + if err != nil { + return nil, err + } + + ttlc := ttlafterfinished.New( ctx, controllerContext.InformerFactory.Batch().V1().Jobs(), - controllerContext.ClientBuilder.ClientOrDie("ttl-after-finished-controller"), - ).Run(ctx, int(controllerContext.ComponentConfig.TTLAfterFinishedController.ConcurrentTTLSyncs)) - return nil, true, nil + client, + ) + return newControllerLoop(func(ctx context.Context) { + ttlc.Run(ctx, int(controllerContext.ComponentConfig.TTLAfterFinishedController.ConcurrentTTLSyncs)) + }, controllerName), nil } func newLegacyServiceAccountTokenCleanerControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.LegacyServiceAccountTokenCleanerController, - aliases: []string{"legacy-service-account-token-cleaner"}, - initFunc: startLegacyServiceAccountTokenCleanerController, + name: names.LegacyServiceAccountTokenCleanerController, + aliases: []string{"legacy-service-account-token-cleaner"}, + constructor: newLegacyServiceAccountTokenCleanerController, } } -func startLegacyServiceAccountTokenCleanerController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { +func newLegacyServiceAccountTokenCleanerController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("legacy-service-account-token-cleaner") + if err != nil { + return nil, err + } + cleanUpPeriod := controllerContext.ComponentConfig.LegacySATokenCleaner.CleanUpPeriod.Duration legacySATokenCleaner, err := serviceaccountcontroller.NewLegacySATokenCleaner( controllerContext.InformerFactory.Core().V1().ServiceAccounts(), controllerContext.InformerFactory.Core().V1().Secrets(), controllerContext.InformerFactory.Core().V1().Pods(), - controllerContext.ClientBuilder.ClientOrDie("legacy-service-account-token-cleaner"), + client, clock.RealClock{}, serviceaccountcontroller.LegacySATokenCleanerOptions{ CleanUpPeriod: cleanUpPeriod, SyncInterval: serviceaccountcontroller.DefaultCleanerSyncInterval, - }) + }, + ) if err != nil { - return nil, true, fmt.Errorf("failed to start the legacy service account token cleaner: %v", err) + return nil, fmt.Errorf("failed to init the legacy service account token cleaner: %w", err) } - go legacySATokenCleaner.Run(ctx) - return nil, true, nil + + return newControllerLoop(legacySATokenCleaner.Run, controllerName), nil } // processCIDRs is a helper function that works on a comma separated cidrs and returns @@ -906,9 +1077,9 @@ func setNodeCIDRMaskSizes(cfg nodeipamconfig.NodeIPAMControllerConfiguration, cl func newStorageVersionGarbageCollectorControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.StorageVersionGarbageCollectorController, - aliases: []string{"storage-version-gc"}, - initFunc: startStorageVersionGarbageCollectorController, + name: names.StorageVersionGarbageCollectorController, + aliases: []string{"storage-version-gc"}, + constructor: newStorageVersionGarbageCollectorController, requiredFeatureGates: []featuregate.Feature{ genericfeatures.APIServerIdentity, genericfeatures.StorageVersionAPI, @@ -916,20 +1087,25 @@ func newStorageVersionGarbageCollectorControllerDescriptor() *ControllerDescript } } -func startStorageVersionGarbageCollectorController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - go storageversiongc.NewStorageVersionGC( +func newStorageVersionGarbageCollectorController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("storage-version-garbage-collector") + if err != nil { + return nil, err + } + + svgcc := storageversiongc.NewStorageVersionGC( ctx, - controllerContext.ClientBuilder.ClientOrDie("storage-version-garbage-collector"), + client, controllerContext.InformerFactory.Coordination().V1().Leases(), controllerContext.InformerFactory.Internal().V1alpha1().StorageVersions(), - ).Run(ctx) - return nil, true, nil + ) + return newControllerLoop(svgcc.Run, controllerName), nil } func newSELinuxWarningControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ name: names.SELinuxWarningController, - initFunc: startSELinuxWarningController, + constructor: newSELinuxWarningController, isDisabledByDefault: true, requiredFeatureGates: []featuregate.Feature{ features.SELinuxChangePolicy, @@ -937,32 +1113,34 @@ func newSELinuxWarningControllerDescriptor() *ControllerDescriptor { } } -func startSELinuxWarningController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - if !utilfeature.DefaultFeatureGate.Enabled(features.SELinuxChangePolicy) { - return nil, false, nil +func newSELinuxWarningController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient(controllerName) + if err != nil { + return nil, err } logger := klog.FromContext(ctx) csiDriverInformer := controllerContext.InformerFactory.Storage().V1().CSIDrivers() plugins, err := ProbePersistentVolumePlugins(logger, controllerContext.ComponentConfig.PersistentVolumeBinderController.VolumeConfiguration) if err != nil { - return nil, true, fmt.Errorf("failed to probe volume plugins when starting SELinux warning controller: %w", err) + return nil, fmt.Errorf("failed to probe volume plugins when starting SELinux warning controller: %w", err) } - seLinuxController, err := - selinuxwarning.NewController( - ctx, - controllerContext.ClientBuilder.ClientOrDie(controllerName), - controllerContext.InformerFactory.Core().V1().Pods(), - controllerContext.InformerFactory.Core().V1().PersistentVolumeClaims(), - controllerContext.InformerFactory.Core().V1().PersistentVolumes(), - csiDriverInformer, - plugins, - GetDynamicPluginProber(controllerContext.ComponentConfig.PersistentVolumeBinderController.VolumeConfiguration), - ) + seLinuxController, err := selinuxwarning.NewController( + ctx, + client, + controllerContext.InformerFactory.Core().V1().Pods(), + controllerContext.InformerFactory.Core().V1().PersistentVolumeClaims(), + controllerContext.InformerFactory.Core().V1().PersistentVolumes(), + csiDriverInformer, + plugins, + GetDynamicPluginProber(controllerContext.ComponentConfig.PersistentVolumeBinderController.VolumeConfiguration), + ) if err != nil { - return nil, true, fmt.Errorf("failed to start SELinux warning controller: %w", err) + return nil, fmt.Errorf("failed to start SELinux warning controller: %w", err) } - go seLinuxController.Run(ctx, 1) - return nil, true, nil + + return newControllerLoop(func(ctx context.Context) { + seLinuxController.Run(ctx, 1) + }, controllerName), nil } diff --git a/cmd/kube-controller-manager/app/core_test.go b/cmd/kube-controller-manager/app/core_test.go index d66a768df8940..8808ce6bf811e 100644 --- a/cmd/kube-controller-manager/app/core_test.go +++ b/cmd/kube-controller-manager/app/core_test.go @@ -18,6 +18,7 @@ package app import ( "context" + "sync" "testing" "time" @@ -28,6 +29,8 @@ import ( clientset "k8s.io/client-go/kubernetes" fakeclientset "k8s.io/client-go/kubernetes/fake" restclient "k8s.io/client-go/rest" + + "k8s.io/kubernetes/cmd/kube-controller-manager/names" ) // TestClientBuilder inherits ClientBuilder and can accept a given fake clientset. @@ -35,12 +38,14 @@ type TestClientBuilder struct { clientset clientset.Interface } -func (TestClientBuilder) Config(name string) (*restclient.Config, error) { return nil, nil } +func (TestClientBuilder) Config(name string) (*restclient.Config, error) { + return &restclient.Config{}, nil +} func (TestClientBuilder) ConfigOrDie(name string) *restclient.Config { return &restclient.Config{} } -func (TestClientBuilder) Client(name string) (clientset.Interface, error) { return nil, nil } +func (m TestClientBuilder) Client(name string) (clientset.Interface, error) { return m.clientset, nil } func (m TestClientBuilder) ClientOrDie(name string) clientset.Interface { return m.clientset } @@ -130,26 +135,44 @@ func TestController_DiscoveryError(t *testing.T) { }, } for name, test := range tcs { - testDiscovery := FakeDiscoveryWithError{Err: test.discoveryError, PossibleResources: test.possibleResources} - testClientset := NewFakeClientset(testDiscovery) - testClientBuilder := TestClientBuilder{clientset: testClientset} - testInformerFactory := informers.NewSharedInformerFactoryWithOptions(testClientset, time.Duration(1)) - ctx := ControllerContext{ - ClientBuilder: testClientBuilder, - InformerFactory: testInformerFactory, - ObjectOrMetadataInformerFactory: testInformerFactory, - InformersStarted: make(chan struct{}), - } - for controllerName, controllerDesc := range controllerDescriptorMap { - _, _, err := controllerDesc.GetInitFunc()(context.TODO(), ctx, controllerName) + t.Run(name, func(t *testing.T) { + ctx := context.Background() + testDiscovery := FakeDiscoveryWithError{Err: test.discoveryError, PossibleResources: test.possibleResources} + testClientset := NewFakeClientset(testDiscovery) + testClientBuilder := TestClientBuilder{clientset: testClientset} + testInformerFactory := informers.NewSharedInformerFactoryWithOptions(testClientset, time.Duration(1)) + controllerContext := ControllerContext{ + ClientBuilder: testClientBuilder, + InformerFactory: testInformerFactory, + ObjectOrMetadataInformerFactory: testInformerFactory, + InformersStarted: make(chan struct{}), + } + for controllerName, controllerDesc := range controllerDescriptorMap { + _, err := controllerDesc.GetControllerConstructor()(ctx, controllerContext, controllerName) + if test.expectedErr != (err != nil) { + t.Errorf("%v test failed for use case: %v", controllerName, name) + } + } + + namespaceController, err := newModifiedNamespaceController( + ctx, controllerContext, names.NamespaceController, + testClientset, testClientBuilder.ConfigOrDie("namespace-controller")) + if err != nil { + t.Fatal(err) + } + + ctx, cancel := context.WithCancel(ctx) + var wg sync.WaitGroup + wg.Add(1) + go func() { + defer wg.Done() + namespaceController.Run(ctx) + }() + cancel() + wg.Wait() if test.expectedErr != (err != nil) { - t.Errorf("%v test failed for use case: %v", controllerName, name) + t.Errorf("Namespace Controller test failed for use case: %v", name) } - } - _, _, err := startModifiedNamespaceController( - context.TODO(), ctx, testClientset, testClientBuilder.ConfigOrDie("namespace-controller")) - if test.expectedErr != (err != nil) { - t.Errorf("Namespace Controller test failed for use case: %v", name) - } + }) } } diff --git a/cmd/kube-controller-manager/app/discovery.go b/cmd/kube-controller-manager/app/discovery.go index e79fc9b2b932c..f749cc58e6cd8 100644 --- a/cmd/kube-controller-manager/app/discovery.go +++ b/cmd/kube-controller-manager/app/discovery.go @@ -22,7 +22,6 @@ package app import ( "context" - "k8s.io/controller-manager/controller" "k8s.io/kubernetes/cmd/kube-controller-manager/names" endpointslicecontroller "k8s.io/kubernetes/pkg/controller/endpointslice" endpointslicemirroringcontroller "k8s.io/kubernetes/pkg/controller/endpointslicemirroring" @@ -30,43 +29,57 @@ import ( func newEndpointSliceControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.EndpointSliceController, - aliases: []string{"endpointslice"}, - initFunc: startEndpointSliceController, + name: names.EndpointSliceController, + aliases: []string{"endpointslice"}, + constructor: newEndpointSliceController, } } -func startEndpointSliceController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - go endpointslicecontroller.NewController( +func newEndpointSliceController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("endpointslice-controller") + if err != nil { + return nil, err + } + + esc := endpointslicecontroller.NewController( ctx, controllerContext.InformerFactory.Core().V1().Pods(), controllerContext.InformerFactory.Core().V1().Services(), controllerContext.InformerFactory.Core().V1().Nodes(), controllerContext.InformerFactory.Discovery().V1().EndpointSlices(), controllerContext.ComponentConfig.EndpointSliceController.MaxEndpointsPerSlice, - controllerContext.ClientBuilder.ClientOrDie("endpointslice-controller"), + client, controllerContext.ComponentConfig.EndpointSliceController.EndpointUpdatesBatchPeriod.Duration, - ).Run(ctx, int(controllerContext.ComponentConfig.EndpointSliceController.ConcurrentServiceEndpointSyncs)) - return nil, true, nil + ) + return newControllerLoop(func(ctx context.Context) { + esc.Run(ctx, int(controllerContext.ComponentConfig.EndpointSliceController.ConcurrentServiceEndpointSyncs)) + }, controllerName), nil } func newEndpointSliceMirroringControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.EndpointSliceMirroringController, - aliases: []string{"endpointslicemirroring"}, - initFunc: startEndpointSliceMirroringController, + name: names.EndpointSliceMirroringController, + aliases: []string{"endpointslicemirroring"}, + constructor: newEndpointSliceMirroringController, } } -func startEndpointSliceMirroringController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - go endpointslicemirroringcontroller.NewController( +func newEndpointSliceMirroringController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("endpointslicemirroring-controller") + if err != nil { + return nil, err + } + + esmc := endpointslicemirroringcontroller.NewController( ctx, controllerContext.InformerFactory.Core().V1().Endpoints(), controllerContext.InformerFactory.Discovery().V1().EndpointSlices(), controllerContext.InformerFactory.Core().V1().Services(), controllerContext.ComponentConfig.EndpointSliceMirroringController.MirroringMaxEndpointsPerSubset, - controllerContext.ClientBuilder.ClientOrDie("endpointslicemirroring-controller"), + client, controllerContext.ComponentConfig.EndpointSliceMirroringController.MirroringEndpointUpdatesBatchPeriod.Duration, - ).Run(ctx, int(controllerContext.ComponentConfig.EndpointSliceMirroringController.MirroringConcurrentServiceEndpointSyncs)) - return nil, true, nil + ) + return newControllerLoop(func(ctx context.Context) { + esmc.Run(ctx, int(controllerContext.ComponentConfig.EndpointSliceMirroringController.MirroringConcurrentServiceEndpointSyncs)) + }, controllerName), nil } diff --git a/cmd/kube-controller-manager/app/networking.go b/cmd/kube-controller-manager/app/networking.go index aa1c3c9d1119a..ac4551d9dcd40 100644 --- a/cmd/kube-controller-manager/app/networking.go +++ b/cmd/kube-controller-manager/app/networking.go @@ -23,7 +23,6 @@ import ( "context" "k8s.io/component-base/featuregate" - "k8s.io/controller-manager/controller" "k8s.io/kubernetes/cmd/kube-controller-manager/names" "k8s.io/kubernetes/pkg/controller/servicecidrs" "k8s.io/kubernetes/pkg/features" @@ -31,20 +30,28 @@ import ( func newServiceCIDRsControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.ServiceCIDRController, - initFunc: startServiceCIDRsController, + name: names.ServiceCIDRController, + constructor: newServiceCIDRsController, requiredFeatureGates: []featuregate.Feature{ features.MultiCIDRServiceAllocator, - }} + }, + } } -func startServiceCIDRsController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - go servicecidrs.NewController( + +func newServiceCIDRsController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("service-cidrs-controller") + if err != nil { + return nil, err + } + + // TODO use component config + scc := servicecidrs.NewController( ctx, controllerContext.InformerFactory.Networking().V1().ServiceCIDRs(), controllerContext.InformerFactory.Networking().V1().IPAddresses(), - controllerContext.ClientBuilder.ClientOrDie("service-cidrs-controller"), - ).Run(ctx, 5) - // TODO use component config - return nil, true, nil - + client, + ) + return newControllerLoop(func(ctx context.Context) { + scc.Run(ctx, 5) + }, controllerName), nil } diff --git a/cmd/kube-controller-manager/app/options/options.go b/cmd/kube-controller-manager/app/options/options.go index 176b2a14bc118..3d794cb86445e 100644 --- a/cmd/kube-controller-manager/app/options/options.go +++ b/cmd/kube-controller-manager/app/options/options.go @@ -21,6 +21,7 @@ import ( "context" "fmt" "net" + "time" v1 "k8s.io/api/core/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" @@ -108,6 +109,8 @@ type KubeControllerManagerOptions struct { Master string ShowHiddenMetricsForVersion string + ControllerShutdownTimeout time.Duration + // ComponentGlobalsRegistry is the registry where the effective versions and feature gates for all components are stored. ComponentGlobalsRegistry basecompatibility.ComponentGlobalsRegistry @@ -238,6 +241,8 @@ func NewKubeControllerManagerOptions() (*KubeControllerManagerOptions, error) { s.GarbageCollectorController.GCIgnoredResources = gcIgnoredResources s.Generic.LeaderElection.ResourceName = "kube-controller-manager" s.Generic.LeaderElection.ResourceNamespace = "kube-system" + + s.ControllerShutdownTimeout = 10 * time.Second return &s, nil } @@ -298,6 +303,9 @@ func (s *KubeControllerManagerOptions) Flags(allControllers []string, disabledBy fs.StringVar(&s.Master, "master", s.Master, "The address of the Kubernetes API server (overrides any value in kubeconfig).") fs.StringVar(&s.Generic.ClientConnection.Kubeconfig, "kubeconfig", s.Generic.ClientConnection.Kubeconfig, "Path to kubeconfig file with authorization and master location information (the master location can be overridden by the master flag).") + fss.FlagSet("generic").DurationVar(&s.ControllerShutdownTimeout, "controller-shutdown-timeout", + s.ControllerShutdownTimeout, "Time to wait for the controllers to shut down before terminating the executable") + if !utilfeature.DefaultFeatureGate.Enabled(featuregate.Feature(clientgofeaturegate.WatchListClient)) { ver := version.MustParse("1.34") if err := utilfeature.DefaultMutableFeatureGate.OverrideDefaultAtVersion(featuregate.Feature(clientgofeaturegate.WatchListClient), true, ver); err != nil { @@ -413,6 +421,7 @@ func (s *KubeControllerManagerOptions) ApplyTo(c *kubecontrollerconfig.Config, a return err } } + c.ControllerShutdownTimeout = s.ControllerShutdownTimeout return nil } @@ -502,11 +511,12 @@ func (s KubeControllerManagerOptions) Config(ctx context.Context, allControllers eventRecorder := eventBroadcaster.NewRecorder(clientgokubescheme.Scheme, v1.EventSource{Component: KubeControllerManagerUserAgent}) c := &kubecontrollerconfig.Config{ - Client: client, - Kubeconfig: kubeconfig, - EventBroadcaster: eventBroadcaster, - EventRecorder: eventRecorder, - ComponentGlobalsRegistry: s.ComponentGlobalsRegistry, + Client: client, + Kubeconfig: kubeconfig, + EventBroadcaster: eventBroadcaster, + EventRecorder: eventRecorder, + ControllerShutdownTimeout: s.ControllerShutdownTimeout, + ComponentGlobalsRegistry: s.ComponentGlobalsRegistry, } if err := s.ApplyTo(c, allControllers, disabledByDefaultControllers, controllerAliases); err != nil { return nil, err diff --git a/cmd/kube-controller-manager/app/options/options_test.go b/cmd/kube-controller-manager/app/options/options_test.go index 8d19d2292efbc..ca00e77d05a7d 100644 --- a/cmd/kube-controller-manager/app/options/options_test.go +++ b/cmd/kube-controller-manager/app/options/options_test.go @@ -447,9 +447,10 @@ func TestAddFlags(t *testing.T) { AlwaysAllowPaths: []string{"/healthz", "/readyz", "/livez"}, // note: this does not match /healthz/ or /healthz/* AlwaysAllowGroups: []string{"system:masters"}, }, - Master: "192.168.4.20", - Metrics: &metrics.Options{}, - Logs: logs.NewOptions(), + Master: "192.168.4.20", + ControllerShutdownTimeout: 10 * time.Second, + Metrics: &metrics.Options{}, + Logs: logs.NewOptions(), // ignores comparing ComponentGlobalsRegistry in this test. ComponentGlobalsRegistry: s.ComponentGlobalsRegistry, } @@ -722,6 +723,7 @@ func TestApplyTo(t *testing.T) { ConcurrentPolicySyncs: 9, }, }, + ControllerShutdownTimeout: 10 * time.Second, } // Sort GCIgnoredResources because it's built from a map, which means the diff --git a/cmd/kube-controller-manager/app/plugins.go b/cmd/kube-controller-manager/app/plugins.go index 2c83e7e6b2a28..3ed1e35120bef 100644 --- a/cmd/kube-controller-manager/app/plugins.go +++ b/cmd/kube-controller-manager/app/plugins.go @@ -106,7 +106,7 @@ func probeControllerVolumePlugins(logger klog.Logger, config persistentvolumecon } if err := AttemptToLoadRecycler(config.PersistentVolumeRecyclerConfiguration.PodTemplateFilePathHostPath, &hostPathConfig); err != nil { logger.Error(err, "Could not create hostpath recycler pod from file", "path", config.PersistentVolumeRecyclerConfiguration.PodTemplateFilePathHostPath) - klog.FlushAndExit(klog.ExitFlushTimeout, 1) + return nil, err } allPlugins = append(allPlugins, hostpath.ProbeVolumePlugins(hostPathConfig)...) @@ -117,7 +117,7 @@ func probeControllerVolumePlugins(logger klog.Logger, config persistentvolumecon } if err := AttemptToLoadRecycler(config.PersistentVolumeRecyclerConfiguration.PodTemplateFilePathNFS, &nfsConfig); err != nil { logger.Error(err, "Could not create NFS recycler pod from file", "path", config.PersistentVolumeRecyclerConfiguration.PodTemplateFilePathNFS) - klog.FlushAndExit(klog.ExitFlushTimeout, 1) + return nil, err } allPlugins = append(allPlugins, nfs.ProbeVolumePlugins(nfsConfig)...) allPlugins = append(allPlugins, fc.ProbeVolumePlugins()...) diff --git a/cmd/kube-controller-manager/app/plugins_providers.go b/cmd/kube-controller-manager/app/plugins_providers.go index 9293c48f79da6..e76167242d36c 100644 --- a/cmd/kube-controller-manager/app/plugins_providers.go +++ b/cmd/kube-controller-manager/app/plugins_providers.go @@ -29,12 +29,10 @@ import ( type probeFn func() []volume.VolumePlugin func appendPluginBasedOnFeatureFlags(logger klog.Logger, plugins []volume.VolumePlugin, inTreePluginName string, featureGate featuregate.FeatureGate, pluginInfo pluginInfo) ([]volume.VolumePlugin, error) { - _, err := csimigration.CheckMigrationFeatureFlags(featureGate, pluginInfo.pluginMigrationFeature, pluginInfo.pluginUnregisterFeature) if err != nil { logger.Error(err, "Unexpected CSI Migration Feature Flags combination detected. CSI Migration may not take effect") - klog.FlushAndExit(klog.ExitFlushTimeout, 1) - // TODO: fail and return here once alpha only tests can set the feature flags for a plugin correctly + return nil, err } // Skip appending the in-tree plugin to the list of plugins to be probed/initialized diff --git a/cmd/kube-controller-manager/app/policy.go b/cmd/kube-controller-manager/app/policy.go index 0db44ba6e4aca..7a6b7c004e3d5 100644 --- a/cmd/kube-controller-manager/app/policy.go +++ b/cmd/kube-controller-manager/app/policy.go @@ -21,32 +21,38 @@ package app import ( "context" - "k8s.io/client-go/dynamic" "k8s.io/client-go/scale" - "k8s.io/controller-manager/controller" "k8s.io/kubernetes/cmd/kube-controller-manager/names" "k8s.io/kubernetes/pkg/controller/disruption" ) func newDisruptionControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.DisruptionController, - aliases: []string{"disruption"}, - initFunc: startDisruptionController, + name: names.DisruptionController, + aliases: []string{"disruption"}, + constructor: newDisruptionController, } } -func startDisruptionController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - client := controllerContext.ClientBuilder.ClientOrDie("disruption-controller") - config := controllerContext.ClientBuilder.ConfigOrDie("disruption-controller") +func newDisruptionController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("disruption-controller") + if err != nil { + return nil, err + } + + config, err := controllerContext.NewClientConfig("disruption-controller") + if err != nil { + return nil, err + } + scaleKindResolver := scale.NewDiscoveryScaleKindResolver(client.Discovery()) scaleClient, err := scale.NewForConfig(config, controllerContext.RESTMapper, dynamic.LegacyAPIPathResolverFunc, scaleKindResolver) if err != nil { - return nil, false, err + return nil, err } - go disruption.NewDisruptionController( + dc := disruption.NewDisruptionController( ctx, controllerContext.InformerFactory.Core().V1().Pods(), controllerContext.InformerFactory.Policy().V1().PodDisruptionBudgets(), @@ -58,6 +64,6 @@ func startDisruptionController(ctx context.Context, controllerContext Controller controllerContext.RESTMapper, scaleClient, client.Discovery(), - ).Run(ctx) - return nil, true, nil + ) + return newControllerLoop(dc.Run, controllerName), nil } diff --git a/cmd/kube-controller-manager/app/rbac.go b/cmd/kube-controller-manager/app/rbac.go index c63c61987b4fe..465ddba6bbad2 100644 --- a/cmd/kube-controller-manager/app/rbac.go +++ b/cmd/kube-controller-manager/app/rbac.go @@ -19,23 +19,29 @@ package app import ( "context" - "k8s.io/controller-manager/controller" "k8s.io/kubernetes/cmd/kube-controller-manager/names" "k8s.io/kubernetes/pkg/controller/clusterroleaggregation" ) func newClusterRoleAggregrationControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.ClusterRoleAggregationController, - aliases: []string{"clusterrole-aggregation"}, - initFunc: startClusterRoleAggregationController, + name: names.ClusterRoleAggregationController, + aliases: []string{"clusterrole-aggregation"}, + constructor: newClusterRoleAggregationController, } } -func startClusterRoleAggregationController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - go clusterroleaggregation.NewClusterRoleAggregation( +func newClusterRoleAggregationController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + client, err := controllerContext.NewClient("clusterrole-aggregation-controller") + if err != nil { + return nil, err + } + + crac := clusterroleaggregation.NewClusterRoleAggregation( controllerContext.InformerFactory.Rbac().V1().ClusterRoles(), - controllerContext.ClientBuilder.ClientOrDie("clusterrole-aggregation-controller").RbacV1(), - ).Run(ctx, 5) - return nil, true, nil + client.RbacV1(), + ) + return newControllerLoop(func(ctx context.Context) { + crac.Run(ctx, 5) + }, controllerName), nil } diff --git a/cmd/kube-controller-manager/app/service_accounts.go b/cmd/kube-controller-manager/app/service_accounts.go new file mode 100644 index 0000000000000..aa5bd9d9409c5 --- /dev/null +++ b/cmd/kube-controller-manager/app/service_accounts.go @@ -0,0 +1,98 @@ +/* +Copyright 2025 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 app + +import ( + "context" + "fmt" + + "k8s.io/client-go/util/keyutil" + "k8s.io/controller-manager/pkg/clientbuilder" + "k8s.io/klog/v2" + "k8s.io/kubernetes/cmd/kube-controller-manager/names" + serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" + "k8s.io/kubernetes/pkg/serviceaccount" +) + +// serviceAccountTokenController is special because it must run first to set up permissions for other controllers. +// It cannot use the "normal" client builder, so it tracks its own. +func newServiceAccountTokenControllerDescriptor(rootClientBuilder clientbuilder.ControllerClientBuilder) *ControllerDescriptor { + return &ControllerDescriptor{ + name: names.ServiceAccountTokenController, + aliases: []string{"serviceaccount-token"}, + constructor: func(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + return newServiceAccountTokenController(ctx, controllerContext, controllerName, rootClientBuilder) + }, + // This controller is started manually before any other controller. + requiresSpecialHandling: true, + } +} + +func newServiceAccountTokenController( + ctx context.Context, controllerContext ControllerContext, controllerName string, + rootClientBuilder clientbuilder.ControllerClientBuilder, +) (Controller, error) { + if len(controllerContext.ComponentConfig.SAController.ServiceAccountKeyFile) == 0 { + klog.FromContext(ctx).Info("Controller is disabled because there is no private key", "controller", controllerName) + return nil, nil + } + + privateKey, err := keyutil.PrivateKeyFromFile(controllerContext.ComponentConfig.SAController.ServiceAccountKeyFile) + if err != nil { + return nil, fmt.Errorf("error reading key for service account token controller: %w", err) + } + + var rootCA []byte + if controllerContext.ComponentConfig.SAController.RootCAFile != "" { + if rootCA, err = readCA(controllerContext.ComponentConfig.SAController.RootCAFile); err != nil { + return nil, fmt.Errorf("error parsing root-ca-file at %s: %w", controllerContext.ComponentConfig.SAController.RootCAFile, err) + } + } else { + config, err := rootClientBuilder.Config("tokens-controller") + if err != nil { + return nil, fmt.Errorf("failed to create Kubernetes client config for %q: %w", "tokens-controller", err) + } + rootCA = config.CAData + } + + client, err := rootClientBuilder.Client("tokens-controller") + if err != nil { + return nil, fmt.Errorf("failed to create Kubernetes client for %q: %w", "tokens-controller", err) + } + + tokenGenerator, err := serviceaccount.JWTTokenGenerator(serviceaccount.LegacyIssuer, privateKey) + if err != nil { + return nil, fmt.Errorf("failed to build token generator: %w", err) + } + tokenController, err := serviceaccountcontroller.NewTokensController( + klog.FromContext(ctx), + controllerContext.InformerFactory.Core().V1().ServiceAccounts(), + controllerContext.InformerFactory.Core().V1().Secrets(), + client, + serviceaccountcontroller.TokensControllerOptions{ + TokenGenerator: tokenGenerator, + RootCA: rootCA, + }, + ) + if err != nil { + return nil, fmt.Errorf("error creating Tokens controller: %w", err) + } + + return newControllerLoop(func(ctx context.Context) { + tokenController.Run(ctx, int(controllerContext.ComponentConfig.SAController.ConcurrentSATokenSyncs)) + }, controllerName), nil +} diff --git a/cmd/kube-controller-manager/app/storageversionmigrator.go b/cmd/kube-controller-manager/app/storageversionmigrator.go index 99cf02e09534e..e7dc1b67ab476 100644 --- a/cmd/kube-controller-manager/app/storageversionmigrator.go +++ b/cmd/kube-controller-manager/app/storageversionmigrator.go @@ -20,77 +20,87 @@ import ( "context" "fmt" + utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/discovery" "k8s.io/client-go/dynamic" + clientgofeaturegate "k8s.io/client-go/features" "k8s.io/client-go/metadata" - "k8s.io/controller-manager/controller" "k8s.io/kubernetes/cmd/kube-controller-manager/names" - "k8s.io/kubernetes/pkg/features" - - utilfeature "k8s.io/apiserver/pkg/util/feature" - clientgofeaturegate "k8s.io/client-go/features" svm "k8s.io/kubernetes/pkg/controller/storageversionmigrator" + "k8s.io/kubernetes/pkg/features" ) func newStorageVersionMigratorControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ - name: names.StorageVersionMigratorController, - aliases: []string{"svm"}, - initFunc: startSVMController, + name: names.StorageVersionMigratorController, + aliases: []string{"svm"}, + constructor: newSVMController, } } -func startSVMController( - ctx context.Context, - controllerContext ControllerContext, - controllerName string, -) (controller.Interface, bool, error) { +func newSVMController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { if !utilfeature.DefaultFeatureGate.Enabled(features.StorageVersionMigrator) || !clientgofeaturegate.FeatureGates().Enabled(clientgofeaturegate.InformerResourceVersion) { - return nil, false, nil + return nil, nil } if !controllerContext.ComponentConfig.GarbageCollectorController.EnableGarbageCollector { - return nil, true, fmt.Errorf("storage version migrator requires garbage collector") + return nil, fmt.Errorf("storage version migrator requires garbage collector") + } + + if !clientgofeaturegate.FeatureGates().Enabled(clientgofeaturegate.InOrderInformers) { + err := fmt.Errorf("storage version migrator requires the InOrderInformers feature gate to be enabled") + return nil, err } // svm controller can make a lot of requests during migration, keep it fast - config := controllerContext.ClientBuilder.ConfigOrDie(controllerName) + config, err := controllerContext.NewClientConfig(controllerName) + if err != nil { + return nil, err + } + config.QPS *= 20 config.Burst *= 100 - client := controllerContext.ClientBuilder.ClientOrDie(controllerName) + client, err := controllerContext.NewClient(controllerName) + if err != nil { + return nil, err + } + informer := controllerContext.InformerFactory.Storagemigration().V1alpha1().StorageVersionMigrations() dynamicClient, err := dynamic.NewForConfig(config) if err != nil { - return nil, false, err + return nil, err } discoveryClient, err := discovery.NewDiscoveryClientForConfig(config) if err != nil { - return nil, false, err + return nil, err + } + + metaClient, err := metadata.NewForConfig(config) + if err != nil { + return nil, fmt.Errorf("failed to create metadata client for %s: %w", controllerName, err) } - go svm.NewResourceVersionController( - ctx, - client, - discoveryClient, - metadata.NewForConfigOrDie(config), - informer, - controllerContext.RESTMapper, - ).Run(ctx) - - svmController := svm.NewSVMController( - ctx, - client, - dynamicClient, - informer, - controllerName, - controllerContext.RESTMapper, - controllerContext.GraphBuilder, - ) - go svmController.Run(ctx) - - return svmController, true, nil + return newControllerLoop(concurrentRun( + svm.NewSVMController( + ctx, + client, + dynamicClient, + informer, + controllerName, + controllerContext.RESTMapper, + controllerContext.GraphBuilder, + ).Run, + svm.NewResourceVersionController( + ctx, + client, + discoveryClient, + metaClient, + informer, + controllerContext.RESTMapper, + ).Run, + ), controllerName), nil } diff --git a/cmd/kube-controller-manager/app/validatingadmissionpolicystatus.go b/cmd/kube-controller-manager/app/validatingadmissionpolicystatus.go index ce6e58f693bd6..4ec1431658cf3 100644 --- a/cmd/kube-controller-manager/app/validatingadmissionpolicystatus.go +++ b/cmd/kube-controller-manager/app/validatingadmissionpolicystatus.go @@ -18,13 +18,13 @@ package app import ( "context" + "fmt" apiextensionsscheme "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme" pluginvalidatingadmissionpolicy "k8s.io/apiserver/pkg/admission/plugin/policy/validating" "k8s.io/apiserver/pkg/cel/openapi/resolver" k8sscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/component-base/featuregate" - "k8s.io/controller-manager/controller" "k8s.io/kubernetes/cmd/kube-controller-manager/names" "k8s.io/kubernetes/pkg/controller/validatingadmissionpolicystatus" "k8s.io/kubernetes/pkg/generated/openapi" @@ -33,27 +33,40 @@ import ( func newValidatingAdmissionPolicyStatusControllerDescriptor() *ControllerDescriptor { return &ControllerDescriptor{ name: names.ValidatingAdmissionPolicyStatusController, - initFunc: startValidatingAdmissionPolicyStatusController, + constructor: newValidatingAdmissionPolicyStatusController, requiredFeatureGates: []featuregate.Feature{}, } } -func startValidatingAdmissionPolicyStatusController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { - // KCM won't start the controller without the feature gate set. +func newValidatingAdmissionPolicyStatusController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) { + discoveryClient, err := controllerContext.ClientBuilder.DiscoveryClient(names.ValidatingAdmissionPolicyStatusController) + if err != nil { + return nil, fmt.Errorf("failed to create discovery client for %s: %w", controllerName, err) + } schemaResolver := resolver.NewDefinitionsSchemaResolver(openapi.GetOpenAPIDefinitions, k8sscheme.Scheme, apiextensionsscheme.Scheme). - Combine(&resolver.ClientDiscoveryResolver{Discovery: controllerContext.ClientBuilder.DiscoveryClientOrDie(names.ValidatingAdmissionPolicyStatusController)}) + Combine(&resolver.ClientDiscoveryResolver{Discovery: discoveryClient}) typeChecker := &pluginvalidatingadmissionpolicy.TypeChecker{ SchemaResolver: schemaResolver, RestMapper: controllerContext.RESTMapper, } + + client, err := controllerContext.NewClient(names.ValidatingAdmissionPolicyStatusController) + if err != nil { + return nil, err + } + c, err := validatingadmissionpolicystatus.NewController( controllerContext.InformerFactory.Admissionregistration().V1().ValidatingAdmissionPolicies(), - controllerContext.ClientBuilder.ClientOrDie(names.ValidatingAdmissionPolicyStatusController).AdmissionregistrationV1().ValidatingAdmissionPolicies(), + client.AdmissionregistrationV1().ValidatingAdmissionPolicies(), typeChecker, ) + if err != nil { + return nil, err + } - go c.Run(ctx, int(controllerContext.ComponentConfig.ValidatingAdmissionPolicyStatusController.ConcurrentPolicySyncs)) - return nil, true, err + return newControllerLoop(func(ctx context.Context) { + c.Run(ctx, int(controllerContext.ComponentConfig.ValidatingAdmissionPolicyStatusController.ConcurrentPolicySyncs)) + }, controllerName), nil } diff --git a/cmd/kube-controller-manager/names/controller_names.go b/cmd/kube-controller-manager/names/controller_names.go index a00358c3826d2..baaa97c076b66 100644 --- a/cmd/kube-controller-manager/names/controller_names.go +++ b/cmd/kube-controller-manager/names/controller_names.go @@ -36,7 +36,6 @@ package names // 2.1. [TODO] logging should use a canonical controller name when referencing a controller (Eg. Starting X, Shutting down X) // 2.2. [TODO] emitted events should have an EventSource.Component set to the controller name (usually when initializing an EventRecorder) // 2.3. [TODO] registering ControllerManagerMetrics with ControllerStarted and ControllerStopped -// 2.4. [TODO] calling WaitForNamedCacheSync // 3. defining controller options for "--help" command or generated documentation // 3.1. controller name should be used to create a pflag.FlagSet when registering controller options (the name is rendered in a controller flag group header) in options.KubeControllerManagerOptions // 3.2. when defined flag's help mentions a controller name diff --git a/cmd/kube-proxy/app/conntrack.go b/cmd/kube-proxy/app/conntrack.go index 8339512980798..b8a9eda6011dd 100644 --- a/cmd/kube-proxy/app/conntrack.go +++ b/cmd/kube-proxy/app/conntrack.go @@ -54,17 +54,12 @@ var errReadOnlySysFS = errors.New("readOnlySysFS") func (rct realConntracker) SetMax(ctx context.Context, max int) error { logger := klog.FromContext(ctx) + logger.Info("Setting nf_conntrack_max", "nfConntrackMax", max) if err := rct.setIntSysCtl(ctx, "nf_conntrack_max", max); err != nil { return err } - logger.Info("Setting nf_conntrack_max", "nfConntrackMax", max) - // Linux does not support writing to /sys/module/nf_conntrack/parameters/hashsize - // when the writer process is not in the initial network namespace - // (https://github.com/torvalds/linux/blob/v4.10/net/netfilter/nf_conntrack_core.c#L1795-L1796). - // Usually that's fine. But in some configurations such as with github.com/kinvolk/kubeadm-nspawn, - // kube-proxy is in another netns. - // Therefore, check if writing in hashsize is necessary and skip the writing if not. + // Check if hashsize is large enough for the nf_conntrack_max value. hashsize, err := readIntStringFile("/sys/module/nf_conntrack/parameters/hashsize") if err != nil { return err @@ -73,13 +68,12 @@ func (rct realConntracker) SetMax(ctx context.Context, max int) error { return nil } - // sysfs is expected to be mounted as 'rw'. However, it may be - // unexpectedly mounted as 'ro' by docker because of a known docker - // issue (https://github.com/docker/docker/issues/24000). Setting - // conntrack will fail when sysfs is readonly. When that happens, we - // don't set conntrack hashsize and return a special error - // errReadOnlySysFS here. The caller should deal with - // errReadOnlySysFS differently. + // sysfs is expected to be mounted as 'rw'. However, it may be unexpectedly + // mounted as 'ro' by docker because of known bugs (https://issues.k8s.io/134108). + // In that case we return a special error errReadOnlySysFS here, which the caller + // should deal with specially. + // + // TODO: this workaround can go away once we no longer support containerd 1.7. writable, err := rct.isSysFSWritable(ctx) if err != nil { return err @@ -87,7 +81,7 @@ func (rct realConntracker) SetMax(ctx context.Context, max int) error { if !writable { return errReadOnlySysFS } - // TODO: generify this and sysctl to a new sysfs.WriteInt() + logger.Info("Setting conntrack hashsize", "conntrackHashsize", max/4) return writeIntStringFile("/sys/module/nf_conntrack/parameters/hashsize", max/4) } diff --git a/cmd/kube-proxy/app/server.go b/cmd/kube-proxy/app/server.go index f5771e397cf5c..3f3cc6571e88e 100644 --- a/cmd/kube-proxy/app/server.go +++ b/cmd/kube-proxy/app/server.go @@ -486,7 +486,11 @@ func serveMetrics(ctx context.Context, bindAddress string, proxyMode kubeproxyco } if utilfeature.DefaultFeatureGate.Enabled(zpagesfeatures.ComponentStatusz) { - statusz.Install(proxyMux, kubeProxy, statusz.NewRegistry(compatibility.DefaultBuildEffectiveVersion())) + reg := statusz.NewRegistry( + compatibility.DefaultBuildEffectiveVersion(), + statusz.WithListedPaths(proxyMux.ListedPaths()), + ) + statusz.Install(proxyMux, kubeProxy, reg) } fn := func() { diff --git a/cmd/kube-proxy/app/server_linux.go b/cmd/kube-proxy/app/server_linux.go index d355d23746e52..dde1e760c3311 100644 --- a/cmd/kube-proxy/app/server_linux.go +++ b/cmd/kube-proxy/app/server_linux.go @@ -90,17 +90,21 @@ func (s *ProxyServer) platformCheckSupported(ctx context.Context) (ipv4Supported if isIPTablesBased(s.Config.Mode) { // Check for the iptables and ip6tables binaries. - ipts, errDS := utiliptables.NewDualStack() + errv4 := utiliptables.New(utiliptables.ProtocolIPv4).Present() + errv6 := utiliptables.New(utiliptables.ProtocolIPv6).Present() - ipv4Supported = ipts[v1.IPv4Protocol] != nil - ipv6Supported = ipts[v1.IPv6Protocol] != nil + ipv4Supported = errv4 == nil + ipv6Supported = errv6 == nil if !ipv4Supported && !ipv6Supported { - err = fmt.Errorf("iptables is not available on this host : %w", errDS) + // errv4 and errv6 are almost certainly the same underlying error + // ("iptables isn't installed" or "kernel modules not available") + // so it doesn't make sense to try to combine them. + err = fmt.Errorf("iptables is not available on this host : %w", errv4) } else if !ipv4Supported { - logger.Info("No iptables support for family", "ipFamily", v1.IPv4Protocol, "error", errDS) + logger.Info("No iptables support for family", "ipFamily", v1.IPv4Protocol, "error", errv4) } else if !ipv6Supported { - logger.Info("No iptables support for family", "ipFamily", v1.IPv6Protocol, "error", errDS) + logger.Info("No iptables support for family", "ipFamily", v1.IPv6Protocol, "error", errv6) } } else { // The nft CLI always supports both families. @@ -130,7 +134,7 @@ func (s *ProxyServer) createProxier(ctx context.Context, config *proxyconfigapi. if config.Mode == proxyconfigapi.ProxyModeIPTables { logger.Info("Using iptables Proxier") - ipts, _ := utiliptables.NewDualStack() + ipts := utiliptables.NewBestEffort() if dualStack { // TODO this has side effects that should only happen when Run() is invoked. @@ -184,7 +188,7 @@ func (s *ProxyServer) createProxier(ctx context.Context, config *proxyconfigapi. if err := ipvs.CanUseIPVSProxier(ctx, ipvsInterface, ipsetInterface, config.IPVS.Scheduler); err != nil { return nil, fmt.Errorf("can't use the IPVS proxier: %v", err) } - ipts, _ := utiliptables.NewDualStack() + ipts := utiliptables.NewBestEffort() logger.Info("Using ipvs Proxier") if dualStack { @@ -300,13 +304,9 @@ func (s *ProxyServer) setupConntrack(ctx context.Context, ct Conntracker) error if err != errReadOnlySysFS { return err } - // errReadOnlySysFS is caused by a known docker issue (https://github.com/docker/docker/issues/24000), - // the only remediation we know is to restart the docker daemon. - // Here we'll send an node event with specific reason and message, the - // administrator should decide whether and how to handle this issue, - // whether to drain the node and restart docker. Occurs in other container runtimes - // as well. - // TODO(random-liu): Remove this when the docker bug is fixed. + // errReadOnlySysFS means we ran into a known container runtim bug + // (https://issues.k8s.io/134108). For historical reasons we ignore + // this problem and just alert the admin that it occurred. const message = "CRI error: /sys is read-only: " + "cannot modify conntrack limits, problems may arise later (If running Docker, see docker issue #24000)" s.Recorder.Eventf(s.NodeRef, nil, v1.EventTypeWarning, err.Error(), "StartKubeProxy", message) diff --git a/cmd/kube-proxy/app/server_test.go b/cmd/kube-proxy/app/server_test.go index f95f55391a248..495ce5c231803 100644 --- a/cmd/kube-proxy/app/server_test.go +++ b/cmd/kube-proxy/app/server_test.go @@ -21,9 +21,16 @@ import ( "errors" "fmt" "net" + "net/http" + "net/http/httptest" + "strings" "testing" "time" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apiserver/pkg/util/compatibility" + "k8s.io/component-base/zpages/statusz" + v1 "k8s.io/api/core/v1" kubeproxyconfig "k8s.io/kubernetes/pkg/proxy/apis/config" "k8s.io/kubernetes/test/utils/ktesting" @@ -59,6 +66,23 @@ func (s *fakeProxyServerError) CleanupAndExit() error { return errors.New("mocking error from ProxyServer.CleanupAndExit()") } +// fakeMux matches the statusz mux interface used by statusz.Install: +// it needs Handle(path, handler) and ListedPaths(). +type fakeMux struct { + handlers map[string]http.Handler + paths []string +} + +func newFakeMux(paths []string) *fakeMux { + return &fakeMux{ + handlers: make(map[string]http.Handler), + paths: paths, + } +} + +func (m *fakeMux) Handle(path string, h http.Handler) { m.handlers[path] = h } +func (m *fakeMux) ListedPaths() []string { return m.paths } + func Test_detectNodeIPs(t *testing.T) { cases := []struct { name string @@ -565,3 +589,58 @@ func Test_checkBadIPConfig(t *testing.T) { }) } } +func TestStatuszRegistryReceivesListedPaths(t *testing.T) { + wantPaths := []string{"/livez", "/readyz", "/healthz", statusz.DefaultStatuszPath} + m := newFakeMux(wantPaths) + + reg := statusz.NewRegistry( + compatibility.DefaultBuildEffectiveVersion(), + statusz.WithListedPaths(m.ListedPaths()), + ) + statusz.Install(m, "kube-proxy", reg) + + h, ok := m.handlers[statusz.DefaultStatuszPath] + if !ok { + t.Fatalf("statusz handler not installed at %q", statusz.DefaultStatuszPath) + } + + req := httptest.NewRequest(http.MethodGet, statusz.DefaultStatuszPath, nil) + req.Header.Add("Accept", "text/plain") + rr := httptest.NewRecorder() + h.ServeHTTP(rr, req) + + if rr.Code != http.StatusOK { + t.Fatalf("expected 200 OK, got %d; body:\n%s", rr.Code, rr.Body.String()) + } + + body := rr.Body.String() + + // Look for the "Paths" line manually instead of regex + lines := strings.Split(body, "\n") + var foundPathsLine string + for _, line := range lines { + line = strings.TrimSpace(line) + if strings.HasPrefix(line, "Paths") { + foundPathsLine = line + break + } + } + if foundPathsLine == "" { + t.Fatalf("failed to find Paths line in body:\n%s", body) + } + + fields := strings.Fields(foundPathsLine) + if len(fields) < 2 { + t.Fatalf("unexpected format in Paths line: %q", foundPathsLine) + } + gotPaths := fields[1:] + + // Use sets for order-independent comparison + wantSet := sets.New[string](wantPaths...) + gotSet := sets.New[string](gotPaths...) + + if !wantSet.Equal(gotSet) { + t.Errorf("statusz listed paths mismatch.\nwant: %v\ngot: %v\nbody:\n%s", + wantSet.UnsortedList(), gotSet.UnsortedList(), body) + } +} diff --git a/cmd/kube-scheduler/app/server.go b/cmd/kube-scheduler/app/server.go index 803e0c3786143..65fb40ac563ed 100644 --- a/cmd/kube-scheduler/app/server.go +++ b/cmd/kube-scheduler/app/server.go @@ -392,7 +392,7 @@ func newEndpointsHandler(config *kubeschedulerconfig.KubeSchedulerConfiguration, } if utilfeature.DefaultFeatureGate.Enabled(zpagesfeatures.ComponentStatusz) { - statusz.Install(pathRecorderMux, kubeScheduler, statusz.NewRegistry(compatibility.DefaultBuildEffectiveVersion())) + statusz.Install(pathRecorderMux, kubeScheduler, statusz.NewRegistry(compatibility.DefaultBuildEffectiveVersion(), statusz.WithListedPaths(pathRecorderMux.ListedPaths()))) } return pathRecorderMux diff --git a/cmd/kube-scheduler/app/server_test.go b/cmd/kube-scheduler/app/server_test.go index 1d012a8c36a04..eea9186e8ade8 100644 --- a/cmd/kube-scheduler/app/server_test.go +++ b/cmd/kube-scheduler/app/server_test.go @@ -44,7 +44,6 @@ import ( "k8s.io/kubernetes/cmd/kube-scheduler/app/options" "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/apis/config/testing/defaults" - "k8s.io/kubernetes/pkg/scheduler/framework" ) func TestSetup(t *testing.T) { @@ -510,22 +509,22 @@ leaderElection: // Simulates an out-of-tree plugin. type foo struct{} -var _ framework.PreFilterPlugin = &foo{} -var _ framework.FilterPlugin = &foo{} +var _ fwk.PreFilterPlugin = &foo{} +var _ fwk.FilterPlugin = &foo{} func (*foo) Name() string { return "Foo" } -func newFoo(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { +func newFoo(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &foo{}, nil } -func (*foo) PreFilter(_ context.Context, _ fwk.CycleState, _ *v1.Pod, _ []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (*foo) PreFilter(_ context.Context, _ fwk.CycleState, _ *v1.Pod, _ []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { return nil, nil } -func (*foo) PreFilterExtensions() framework.PreFilterExtensions { +func (*foo) PreFilterExtensions() fwk.PreFilterExtensions { return nil } diff --git a/cmd/kubeadm/app/apis/kubeadm/types.go b/cmd/kubeadm/app/apis/kubeadm/types.go index ee693873f7dfd..918ba25a2c574 100644 --- a/cmd/kubeadm/app/apis/kubeadm/types.go +++ b/cmd/kubeadm/app/apis/kubeadm/types.go @@ -140,10 +140,12 @@ type ClusterConfiguration struct { // +k8s:conversion-gen=false CIImageRepository string - // FeatureGates enabled by the user. + // FeatureGates holds kubeadm-specific feature gates enabled by the user. FeatureGates map[string]bool - // The cluster name + // The cluster name. This name will be used in kubeconfig files generated by kubeadm + // and will also be passed as a value to the kube-controller-manager's --cluster-name flag. + // Default value is 'kubernetes'. ClusterName string // EncryptionAlgorithm holds the type of asymmetric encryption algorithm used for keys and certificates. @@ -286,7 +288,8 @@ type Etcd struct { // LocalEtcd describes that kubeadm should run an etcd cluster locally type LocalEtcd struct { - // ImageMeta allows to customize the container used for etcd + // ImageMeta allows to customize the container image used for etcd. Passing a custom etcd image + // tells kubeadm upgrade that this image is user-managed and that its upgrade must be skipped. ImageMeta `json:",inline"` // DataDir is the directory etcd will place its data. diff --git a/cmd/kubeadm/app/apis/kubeadm/v1beta3/types.go b/cmd/kubeadm/app/apis/kubeadm/v1beta3/types.go index f46ce0fdaef89..74aa4d79744d4 100644 --- a/cmd/kubeadm/app/apis/kubeadm/v1beta3/types.go +++ b/cmd/kubeadm/app/apis/kubeadm/v1beta3/types.go @@ -129,11 +129,13 @@ type ClusterConfiguration struct { // +optional ImageRepository string `json:"imageRepository,omitempty"` - // FeatureGates enabled by the user. + // FeatureGates holds kubeadm-specific feature gates enabled by the user. // +optional FeatureGates map[string]bool `json:"featureGates,omitempty"` - // The cluster name + // The cluster name. This name will be used in kubeconfig files generated by kubeadm + // and will also be passed as a value to the kube-controller-manager's --cluster-name flag. + // Default value is 'kubernetes'. // +optional ClusterName string `json:"clusterName,omitempty"` } @@ -270,7 +272,8 @@ type Etcd struct { // LocalEtcd describes that kubeadm should run an etcd cluster locally type LocalEtcd struct { - // ImageMeta allows to customize the container used for etcd + // ImageMeta allows to customize the container image used for etcd. Passing a custom etcd image + // tells kubeadm upgrade that this image is user-managed and that its upgrade must be skipped. ImageMeta `json:",inline"` // DataDir is the directory etcd will place its data. diff --git a/cmd/kubeadm/app/apis/kubeadm/v1beta4/types.go b/cmd/kubeadm/app/apis/kubeadm/v1beta4/types.go index 9bac88d1d9ee0..210a3b3972335 100644 --- a/cmd/kubeadm/app/apis/kubeadm/v1beta4/types.go +++ b/cmd/kubeadm/app/apis/kubeadm/v1beta4/types.go @@ -140,11 +140,13 @@ type ClusterConfiguration struct { // +optional ImageRepository string `json:"imageRepository,omitempty"` - // FeatureGates enabled by the user. + // FeatureGates holds kubeadm-specific feature gates enabled by the user. // +optional FeatureGates map[string]bool `json:"featureGates,omitempty"` - // The cluster name + // The cluster name. This name will be used in kubeconfig files generated by kubeadm + // and will also be passed as a value to the kube-controller-manager's --cluster-name flag. + // Default value is 'kubernetes'. // +optional ClusterName string `json:"clusterName,omitempty"` @@ -309,7 +311,8 @@ type Etcd struct { // LocalEtcd describes that kubeadm should run an etcd cluster locally type LocalEtcd struct { - // ImageMeta allows to customize the container used for etcd + // ImageMeta allows to customize the container image used for etcd. Passing a custom etcd image + // tells kubeadm upgrade that this image is user-managed and that its upgrade must be skipped. ImageMeta `json:",inline"` // DataDir is the directory etcd will place its data. diff --git a/cmd/kubeadm/app/cmd/certs.go b/cmd/kubeadm/app/cmd/certs.go index f4e7d92454fb9..1e5115a558dcd 100644 --- a/cmd/kubeadm/app/cmd/certs.go +++ b/cmd/kubeadm/app/cmd/certs.go @@ -49,6 +49,7 @@ import ( "k8s.io/kubernetes/cmd/kubeadm/app/util/errors" kubeconfigutil "k8s.io/kubernetes/cmd/kubeadm/app/util/kubeconfig" "k8s.io/kubernetes/cmd/kubeadm/app/util/output" + staticpodutil "k8s.io/kubernetes/cmd/kubeadm/app/util/staticpod" ) var ( @@ -346,7 +347,10 @@ func getInternalCfg(cfgPath string, client kubernetes.Interface, cfg kubeadmapiv // In case the user is not providing a custom config, try to get current config from the cluster. // NB. this operation should not block, because we want to allow certificate renewal also in case of not-working clusters if cfgPath == "" && client != nil { - internalcfg, err := configutil.FetchInitConfigurationFromCluster(client, printer, logPrefix, false, false) + getNodeRegistration := true + getAPIEndpoint := staticpodutil.IsControlPlaneNode() + getComponentConfigs := true + internalcfg, err := configutil.FetchInitConfigurationFromCluster(client, printer, logPrefix, getNodeRegistration, getAPIEndpoint, getComponentConfigs) if err == nil { printer.Println() // add empty line to separate the FetchInitConfigurationFromCluster output from the command output // certificate renewal or expiration checking doesn't depend on a running cluster, which means the CertificatesDir diff --git a/cmd/kubeadm/app/cmd/config.go b/cmd/kubeadm/app/cmd/config.go index 3907b0651f0ec..be8d486b531a6 100644 --- a/cmd/kubeadm/app/cmd/config.go +++ b/cmd/kubeadm/app/cmd/config.go @@ -387,6 +387,7 @@ func newCmdConfigImagesPull() *cobra.Command { if err := containerRuntime.Connect(); err != nil { return err } + defer containerRuntime.Close() return PullControlPlaneImages(containerRuntime, &internalcfg.ClusterConfiguration) }, Args: cobra.NoArgs, diff --git a/cmd/kubeadm/app/cmd/init.go b/cmd/kubeadm/app/cmd/init.go index ba21ebf35eb18..a52b2952cf0ed 100644 --- a/cmd/kubeadm/app/cmd/init.go +++ b/cmd/kubeadm/app/cmd/init.go @@ -19,9 +19,11 @@ package cmd import ( "fmt" "io" + "net" "os" "path/filepath" "slices" + "strconv" "github.com/spf13/cobra" flag "github.com/spf13/pflag" @@ -351,11 +353,11 @@ func newInitData(cmd *cobra.Command, args []string, initOptions *initOptions, ou return nil, err } - // if dry running creates a temporary folder for saving kubeadm generated files + // If dry running creates a temporary directory for saving kubeadm generated files. dryRunDir := "" if initOptions.dryRun || cfg.DryRun { if dryRunDir, err = kubeadmconstants.GetDryRunDir(kubeadmconstants.EnvVarInitDryRunDir, "kubeadm-init-dryrun", klog.Warningf); err != nil { - return nil, errors.Wrap(err, "couldn't create a temporary directory") + return nil, errors.Wrap(err, "could not create a temporary directory on dryrun") } } @@ -475,7 +477,7 @@ func (d *initData) KubeConfig() (*clientcmdapi.Config, error) { return d.kubeconfig, nil } -// KubeConfigDir returns the path of the Kubernetes configuration folder or the temporary folder path in case of DryRun. +// KubeConfigDir returns the Kubernetes configuration directory or the temporary directory if DryRun is true. func (d *initData) KubeConfigDir() string { if d.dryRun { return d.dryRunDir @@ -491,7 +493,7 @@ func (d *initData) KubeConfigPath() string { return d.kubeconfigPath } -// ManifestDir returns the path where manifest should be stored or the temporary folder path in case of DryRun. +// ManifestDir returns the path where manifest should be stored or the temporary directory if DryRun is true. func (d *initData) ManifestDir() string { if d.dryRun { return d.dryRunDir @@ -499,7 +501,7 @@ func (d *initData) ManifestDir() string { return kubeadmconstants.GetStaticPodDirectory() } -// KubeletDir returns path of the kubelet configuration folder or the temporary folder in case of DryRun. +// KubeletDir returns the kubelet configuration directory or the temporary directory if DryRun is true. func (d *initData) KubeletDir() string { if d.dryRun { return d.dryRunDir @@ -569,24 +571,26 @@ func (d *initData) Client() (clientset.Interface, error) { return d.client, nil } -// ClientWithoutBootstrap returns a dry-run client or a regular client from admin.conf. -// Unlike Client(), it does not call EnsureAdminClusterRoleBinding() or sets d.client. -// This means the client only has anonymous permissions and does not persist in initData. -func (d *initData) ClientWithoutBootstrap() (clientset.Interface, error) { - var ( - client clientset.Interface - err error - ) - if d.dryRun { - client, err = getDryRunClient(d) - if err != nil { - return nil, err - } - } else { // Use a real client - client, err = kubeconfigutil.ClientSetFromFile(d.KubeConfigPath()) - if err != nil { - return nil, err - } +// WaitControlPlaneClient returns a basic client used for the purpose of waiting +// for control plane components to report 'ok' on their respective health check endpoints. +// It uses the admin.conf as the base, but modifies it to point at the local API server instead +// of the control plane endpoint. +func (d *initData) WaitControlPlaneClient() (clientset.Interface, error) { + config, err := clientcmd.LoadFromFile(d.KubeConfigPath()) + if err != nil { + return nil, err + } + for _, v := range config.Clusters { + v.Server = fmt.Sprintf("https://%s", + net.JoinHostPort( + d.Cfg().LocalAPIEndpoint.AdvertiseAddress, + strconv.Itoa(int(d.Cfg().LocalAPIEndpoint.BindPort)), + ), + ) + } + client, err := kubeconfigutil.ToClientSet(config) + if err != nil { + return nil, err } return client, nil } diff --git a/cmd/kubeadm/app/cmd/join.go b/cmd/kubeadm/app/cmd/join.go index 8916bc709108b..f10b4a6a35560 100644 --- a/cmd/kubeadm/app/cmd/join.go +++ b/cmd/kubeadm/app/cmd/join.go @@ -19,8 +19,10 @@ package cmd import ( "fmt" "io" + "net" "os" "path/filepath" + "strconv" "strings" "text/template" @@ -463,11 +465,11 @@ func newJoinData(cmd *cobra.Command, args []string, opt *joinOptions, out io.Wri } } - // if dry running, creates a temporary folder to save kubeadm generated files + // If dry running creates a temporary directory for saving kubeadm generated files. dryRunDir := "" if opt.dryRun || cfg.DryRun { if dryRunDir, err = kubeadmconstants.GetDryRunDir(kubeadmconstants.EnvVarJoinDryRunDir, "kubeadm-join-dryrun", klog.Warningf); err != nil { - return nil, errors.Wrap(err, "couldn't create a temporary directory on dryrun") + return nil, errors.Wrap(err, "could not create a temporary directory on dryrun") } } @@ -500,7 +502,7 @@ func (j *joinData) DryRun() bool { return j.dryRun } -// KubeConfigDir returns the path of the Kubernetes configuration folder or the temporary folder path in case of DryRun. +// KubeConfigDir returns the Kubernetes configuration directory or the temporary directory if DryRun is true. func (j *joinData) KubeConfigDir() string { if j.dryRun { return j.dryRunDir @@ -508,7 +510,7 @@ func (j *joinData) KubeConfigDir() string { return kubeadmconstants.KubernetesDir } -// KubeletDir returns the path of the kubelet configuration folder or the temporary folder in case of DryRun. +// KubeletDir returns the kubelet configuration directory or the temporary directory if DryRun is true. func (j *joinData) KubeletDir() string { if j.dryRun { return j.dryRunDir @@ -516,7 +518,7 @@ func (j *joinData) KubeletDir() string { return kubeadmconstants.KubeletRunDirectory } -// ManifestDir returns the path where manifest should be stored or the temporary folder path in case of DryRun. +// ManifestDir returns the path where manifest should be stored or the temporary directory if DryRun is true. func (j *joinData) ManifestDir() string { if j.dryRun { return j.dryRunDir @@ -524,7 +526,7 @@ func (j *joinData) ManifestDir() string { return kubeadmconstants.GetStaticPodDirectory() } -// CertificateWriteDir returns the path where certs should be stored or the temporary folder path in case of DryRun. +// CertificateWriteDir returns the path where certs should be stored or the temporary directory if DryRun is true. func (j *joinData) CertificateWriteDir() string { if j.dryRun { return j.dryRunDir @@ -625,6 +627,31 @@ func (j *joinData) Client() (clientset.Interface, error) { return client, nil } +// WaitControlPlaneClient returns a basic client used for the purpose of waiting +// for control plane components to report 'ok' on their respective health check endpoints. +// It uses the admin.conf as the base, but modifies it to point at the local API server instead +// of the control plane endpoint. +func (j *joinData) WaitControlPlaneClient() (clientset.Interface, error) { + pathAdmin := filepath.Join(j.KubeConfigDir(), kubeadmconstants.AdminKubeConfigFileName) + config, err := clientcmd.LoadFromFile(pathAdmin) + if err != nil { + return nil, err + } + for _, v := range config.Clusters { + v.Server = fmt.Sprintf("https://%s", + net.JoinHostPort( + j.Cfg().ControlPlane.LocalAPIEndpoint.AdvertiseAddress, + strconv.Itoa(int(j.Cfg().ControlPlane.LocalAPIEndpoint.BindPort)), + ), + ) + } + client, err := kubeconfigutil.ToClientSet(config) + if err != nil { + return nil, err + } + return client, nil +} + // IgnorePreflightErrors returns the list of preflight errors to ignore. func (j *joinData) IgnorePreflightErrors() sets.Set[string] { return j.ignorePreflightErrors @@ -682,7 +709,10 @@ func fetchInitConfigurationFromJoinConfiguration(cfg *kubeadmapi.JoinConfigurati // fetchInitConfiguration reads the cluster configuration from the kubeadm-admin configMap func fetchInitConfiguration(client clientset.Interface) (*kubeadmapi.InitConfiguration, error) { - initConfiguration, err := configutil.FetchInitConfigurationFromCluster(client, nil, "preflight", true, false) + getNodeRegistration := false + getAPIEndpoint := false + getComponentConfigs := true + initConfiguration, err := configutil.FetchInitConfigurationFromCluster(client, nil, "preflight", getNodeRegistration, getAPIEndpoint, getComponentConfigs) if err != nil { return nil, errors.Wrap(err, "unable to fetch the kubeadm-config ConfigMap") } diff --git a/cmd/kubeadm/app/cmd/phases/init/data.go b/cmd/kubeadm/app/cmd/phases/init/data.go index 21bf0778039e0..6e7b8ba3a6b48 100644 --- a/cmd/kubeadm/app/cmd/phases/init/data.go +++ b/cmd/kubeadm/app/cmd/phases/init/data.go @@ -47,7 +47,7 @@ type InitData interface { ExternalCA() bool OutputWriter() io.Writer Client() (clientset.Interface, error) - ClientWithoutBootstrap() (clientset.Interface, error) + WaitControlPlaneClient() (clientset.Interface, error) Tokens() []string PatchesDir() string } diff --git a/cmd/kubeadm/app/cmd/phases/init/data_test.go b/cmd/kubeadm/app/cmd/phases/init/data_test.go index 8229cfc76c897..8465021446ada 100644 --- a/cmd/kubeadm/app/cmd/phases/init/data_test.go +++ b/cmd/kubeadm/app/cmd/phases/init/data_test.go @@ -50,6 +50,6 @@ func (t *testInitData) KubeletDir() string { r func (t *testInitData) ExternalCA() bool { return false } func (t *testInitData) OutputWriter() io.Writer { return nil } func (t *testInitData) Client() (clientset.Interface, error) { return nil, nil } -func (t *testInitData) ClientWithoutBootstrap() (clientset.Interface, error) { return nil, nil } +func (t *testInitData) WaitControlPlaneClient() (clientset.Interface, error) { return nil, nil } func (t *testInitData) Tokens() []string { return nil } func (t *testInitData) PatchesDir() string { return "" } diff --git a/cmd/kubeadm/app/cmd/phases/init/kubeconfig.go b/cmd/kubeadm/app/cmd/phases/init/kubeconfig.go index 2e95cd1990bc6..d8ce56ad360f2 100644 --- a/cmd/kubeadm/app/cmd/phases/init/kubeconfig.go +++ b/cmd/kubeadm/app/cmd/phases/init/kubeconfig.go @@ -24,7 +24,6 @@ import ( "k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow" cmdutil "k8s.io/kubernetes/cmd/kubeadm/app/cmd/util" kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" - "k8s.io/kubernetes/cmd/kubeadm/app/features" kubeconfigphase "k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig" kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util" "k8s.io/kubernetes/cmd/kubeadm/app/util/errors" @@ -158,11 +157,9 @@ func runKubeConfigFile(kubeConfigFileName string) func(workflow.RunData) error { initConfiguration := data.Cfg().DeepCopy() - if features.Enabled(cfg.FeatureGates, features.ControlPlaneKubeletLocalMode) { - if kubeConfigFileName == kubeadmconstants.KubeletKubeConfigFileName { - // Unset the ControlPlaneEndpoint so the creation falls back to the LocalAPIEndpoint for the kubelet's kubeconfig. - initConfiguration.ControlPlaneEndpoint = "" - } + if kubeConfigFileName == kubeadmconstants.KubeletKubeConfigFileName { + // Unset the ControlPlaneEndpoint so the creation falls back to the LocalAPIEndpoint for the kubelet's kubeconfig. + initConfiguration.ControlPlaneEndpoint = "" } // creates the KubeConfig file (or use existing) diff --git a/cmd/kubeadm/app/cmd/phases/init/waitcontrolplane.go b/cmd/kubeadm/app/cmd/phases/init/waitcontrolplane.go index 51308db28961b..c93d02aef1c56 100644 --- a/cmd/kubeadm/app/cmd/phases/init/waitcontrolplane.go +++ b/cmd/kubeadm/app/cmd/phases/init/waitcontrolplane.go @@ -58,8 +58,7 @@ func runWaitControlPlanePhase(c workflow.RunData) error { } } - // Both Wait* calls below use a /healthz endpoint, thus a client without permissions works fine - client, err := data.ClientWithoutBootstrap() + client, err := data.WaitControlPlaneClient() if err != nil { return errors.Wrap(err, "cannot obtain client without bootstrap") } diff --git a/cmd/kubeadm/app/cmd/phases/join/controlplanejoin.go b/cmd/kubeadm/app/cmd/phases/join/controlplanejoin.go index 860175e8adda1..c30df5f65779d 100644 --- a/cmd/kubeadm/app/cmd/phases/join/controlplanejoin.go +++ b/cmd/kubeadm/app/cmd/phases/join/controlplanejoin.go @@ -24,7 +24,6 @@ import ( "k8s.io/kubernetes/cmd/kubeadm/app/cmd/options" "k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow" cmdutil "k8s.io/kubernetes/cmd/kubeadm/app/cmd/util" - "k8s.io/kubernetes/cmd/kubeadm/app/features" etcdphase "k8s.io/kubernetes/cmd/kubeadm/app/phases/etcd" markcontrolplanephase "k8s.io/kubernetes/cmd/kubeadm/app/phases/markcontrolplane" "k8s.io/kubernetes/cmd/kubeadm/app/util/errors" @@ -83,32 +82,26 @@ func NewControlPlaneJoinPhase() workflow.Phase { func NewEtcdJoinPhase() workflow.Phase { return workflow.Phase{ Name: "etcd-join", - Short: fmt.Sprintf("[EXPERIMENTAL] Join etcd for control plane nodes (only used when feature gate %s is enabled)", features.ControlPlaneKubeletLocalMode), + Short: "Join etcd for control plane nodes", Run: runEtcdPhase, Example: etcdJoinExample, InheritFlags: getControlPlaneJoinPhaseFlags("etcd"), ArgsValidator: cobra.NoArgs, - // TODO: unhide this phase once ControlPlaneKubeletLocalMode goes GA: - // https://github.com/kubernetes/enhancements/issues/4471 - Hidden: true, - // Only run this phase as if `ControlPlaneKubeletLocalMode` is activated. - RunIf: func(c workflow.RunData) (bool, error) { - return checkFeatureState(c, features.ControlPlaneKubeletLocalMode, true) - }, } } +// TODO: Deprecated. Remove once ControlPlaneKubeletLocalMode is removed in 1.36. +// https://github.com/kubernetes/kubeadm/issues/2271 func newEtcdLocalSubphase() workflow.Phase { return workflow.Phase{ Name: "etcd", - Short: "Add a new local etcd member", + Short: "[DEPRECATED] Add a new local etcd member. Deprecated in favor of 'etcd-join' and will be removed in 1.36", Run: runEtcdPhase, InheritFlags: getControlPlaneJoinPhaseFlags("etcd"), ArgsValidator: cobra.NoArgs, - // Only run this phase as subphase of control-plane-join phase if - // `ControlPlaneKubeletLocalMode` is deactivated. + Hidden: true, RunIf: func(c workflow.RunData) (bool, error) { - return checkFeatureState(c, features.ControlPlaneKubeletLocalMode, false) + return false, nil }, } } diff --git a/cmd/kubeadm/app/cmd/phases/join/data.go b/cmd/kubeadm/app/cmd/phases/join/data.go index 8005a6b07fd5d..9e04d9032f9fe 100644 --- a/cmd/kubeadm/app/cmd/phases/join/data.go +++ b/cmd/kubeadm/app/cmd/phases/join/data.go @@ -25,9 +25,6 @@ import ( clientcmdapi "k8s.io/client-go/tools/clientcmd/api" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" - "k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow" - "k8s.io/kubernetes/cmd/kubeadm/app/features" - "k8s.io/kubernetes/cmd/kubeadm/app/util/errors" ) // JoinData is the interface to use for join phases. @@ -38,6 +35,7 @@ type JoinData interface { TLSBootstrapCfg() (*clientcmdapi.Config, error) InitCfg() (*kubeadmapi.InitConfiguration, error) Client() (clientset.Interface, error) + WaitControlPlaneClient() (clientset.Interface, error) IgnorePreflightErrors() sets.Set[string] OutputWriter() io.Writer PatchesDir() string @@ -47,17 +45,3 @@ type JoinData interface { ManifestDir() string CertificateWriteDir() string } - -func checkFeatureState(c workflow.RunData, featureGate string, state bool) (bool, error) { - data, ok := c.(JoinData) - if !ok { - return false, errors.New("control-plane-join phase invoked with an invalid data struct") - } - - cfg, err := data.InitCfg() - if err != nil { - return false, err - } - - return state == features.Enabled(cfg.FeatureGates, featureGate), nil -} diff --git a/cmd/kubeadm/app/cmd/phases/join/data_test.go b/cmd/kubeadm/app/cmd/phases/join/data_test.go index c03e06bea1b91..5995acf7d7356 100644 --- a/cmd/kubeadm/app/cmd/phases/join/data_test.go +++ b/cmd/kubeadm/app/cmd/phases/join/data_test.go @@ -32,16 +32,17 @@ type testJoinData struct{} // testJoinData must satisfy JoinData. var _ JoinData = &testJoinData{} -func (j *testJoinData) CertificateKey() string { return "" } -func (j *testJoinData) Cfg() *kubeadmapi.JoinConfiguration { return nil } -func (j *testJoinData) TLSBootstrapCfg() (*clientcmdapi.Config, error) { return nil, nil } -func (j *testJoinData) InitCfg() (*kubeadmapi.InitConfiguration, error) { return nil, nil } -func (j *testJoinData) Client() (clientset.Interface, error) { return nil, nil } -func (j *testJoinData) IgnorePreflightErrors() sets.Set[string] { return nil } -func (j *testJoinData) OutputWriter() io.Writer { return nil } -func (j *testJoinData) PatchesDir() string { return "" } -func (j *testJoinData) DryRun() bool { return false } -func (j *testJoinData) KubeConfigDir() string { return "" } -func (j *testJoinData) KubeletDir() string { return "" } -func (j *testJoinData) ManifestDir() string { return "" } -func (j *testJoinData) CertificateWriteDir() string { return "" } +func (j *testJoinData) CertificateKey() string { return "" } +func (j *testJoinData) Cfg() *kubeadmapi.JoinConfiguration { return nil } +func (j *testJoinData) TLSBootstrapCfg() (*clientcmdapi.Config, error) { return nil, nil } +func (j *testJoinData) InitCfg() (*kubeadmapi.InitConfiguration, error) { return nil, nil } +func (j *testJoinData) Client() (clientset.Interface, error) { return nil, nil } +func (j *testJoinData) WaitControlPlaneClient() (clientset.Interface, error) { return nil, nil } +func (j *testJoinData) IgnorePreflightErrors() sets.Set[string] { return nil } +func (j *testJoinData) OutputWriter() io.Writer { return nil } +func (j *testJoinData) PatchesDir() string { return "" } +func (j *testJoinData) DryRun() bool { return false } +func (j *testJoinData) KubeConfigDir() string { return "" } +func (j *testJoinData) KubeletDir() string { return "" } +func (j *testJoinData) ManifestDir() string { return "" } +func (j *testJoinData) CertificateWriteDir() string { return "" } diff --git a/cmd/kubeadm/app/cmd/phases/join/kubelet.go b/cmd/kubeadm/app/cmd/phases/join/kubelet.go index 751ab305d5c4c..822bf7a509ff9 100644 --- a/cmd/kubeadm/app/cmd/phases/join/kubelet.go +++ b/cmd/kubeadm/app/cmd/phases/join/kubelet.go @@ -75,20 +75,13 @@ func NewKubeletStartPhase() workflow.Phase { func NewKubeletWaitBootstrapPhase() workflow.Phase { return workflow.Phase{ Name: "kubelet-wait-bootstrap", - Short: "[EXPERIMENTAL] Wait for the kubelet to bootstrap itself (only used when feature gate ControlPlaneKubeletLocalMode is enabled)", + Short: "Wait for the kubelet to bootstrap itself", Run: runKubeletWaitBootstrapPhase, InheritFlags: []string{ options.CfgPath, options.NodeCRISocket, options.DryRun, }, - // TODO: unhide this phase once ControlPlaneKubeletLocalMode goes GA: - // https://github.com/kubernetes/enhancements/issues/4471 - Hidden: true, - // Only run this phase as if `ControlPlaneKubeletLocalMode` is activated. - RunIf: func(c workflow.RunData) (bool, error) { - return checkFeatureState(c, features.ControlPlaneKubeletLocalMode, true) - }, } } @@ -124,16 +117,6 @@ func runKubeletStartJoinPhase(c workflow.RunData) (returnErr error) { } bootstrapKubeConfigFile := filepath.Join(data.KubeConfigDir(), kubeadmconstants.KubeletBootstrapKubeConfigFileName) - // Do not delete the bootstrapKubeConfigFile at the end of this function when - // using ControlPlaneKubeletLocalMode. The KubeletWaitBootstrapPhase will delete - // it when the feature is enabled. - if !features.Enabled(initCfg.FeatureGates, features.ControlPlaneKubeletLocalMode) { - // Deletes the bootstrapKubeConfigFile, so the credential used for TLS bootstrap is removed from disk - defer func() { - _ = os.Remove(bootstrapKubeConfigFile) - }() - } - var client clientset.Interface // If dry-use the client from joinData, else create a new bootstrap client if data.DryRun() { @@ -148,17 +131,15 @@ func runKubeletStartJoinPhase(c workflow.RunData) (returnErr error) { } } - if features.Enabled(initCfg.FeatureGates, features.ControlPlaneKubeletLocalMode) { - // Set the server url to LocalAPIEndpoint if the feature gate is enabled so the config - // which gets passed to the kubelet forces it to talk to the local kube-apiserver. - if cfg.ControlPlane != nil { - for c, conf := range tlsBootstrapCfg.Clusters { - conf.Server, err = kubeadmutil.GetLocalAPIEndpoint(&cfg.ControlPlane.LocalAPIEndpoint) - if err != nil { - return errors.Wrapf(err, "could not get LocalAPIEndpoint when %s is enabled", features.ControlPlaneKubeletLocalMode) - } - tlsBootstrapCfg.Clusters[c] = conf + // Set the server url to LocalAPIEndpoint if the feature gate is enabled so the config + // which gets passed to the kubelet forces it to talk to the local kube-apiserver. + if cfg.ControlPlane != nil { + for c, conf := range tlsBootstrapCfg.Clusters { + conf.Server, err = kubeadmutil.GetLocalAPIEndpoint(&cfg.ControlPlane.LocalAPIEndpoint) + if err != nil { + return errors.Wrapf(err, "could not get LocalAPIEndpoint") } + tlsBootstrapCfg.Clusters[c] = conf } } @@ -252,13 +233,6 @@ func runKubeletStartJoinPhase(c workflow.RunData) (returnErr error) { fmt.Println("[kubelet-start] Starting the kubelet") kubeletphase.TryStartKubelet() - // Run the same code as KubeletWaitBootstrapPhase would do if the ControlPlaneKubeletLocalMode feature gate is disabled. - if !features.Enabled(initCfg.FeatureGates, features.ControlPlaneKubeletLocalMode) { - if err := runKubeletWaitBootstrapPhase(c); err != nil { - return err - } - } - return nil } diff --git a/cmd/kubeadm/app/cmd/phases/join/waitcontrolplane.go b/cmd/kubeadm/app/cmd/phases/join/waitcontrolplane.go index ba4bb82b346c3..bd29eabbf60cd 100644 --- a/cmd/kubeadm/app/cmd/phases/join/waitcontrolplane.go +++ b/cmd/kubeadm/app/cmd/phases/join/waitcontrolplane.go @@ -50,7 +50,7 @@ func runWaitControlPlanePhase(c workflow.RunData) error { return nil } - client, err := data.Client() + client, err := data.WaitControlPlaneClient() if err != nil { return err } diff --git a/cmd/kubeadm/app/cmd/phases/reset/cleanupnode.go b/cmd/kubeadm/app/cmd/phases/reset/cleanupnode.go index 3a8a769edc48c..eae2909270554 100644 --- a/cmd/kubeadm/app/cmd/phases/reset/cleanupnode.go +++ b/cmd/kubeadm/app/cmd/phases/reset/cleanupnode.go @@ -29,11 +29,9 @@ import ( "k8s.io/kubernetes/cmd/kubeadm/app/cmd/options" "k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow" kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" - "k8s.io/kubernetes/cmd/kubeadm/app/features" "k8s.io/kubernetes/cmd/kubeadm/app/util/errors" "k8s.io/kubernetes/cmd/kubeadm/app/util/initsystem" utilruntime "k8s.io/kubernetes/cmd/kubeadm/app/util/runtime" - "k8s.io/kubernetes/cmd/kubeadm/app/util/users" ) // NewCleanupNodePhase creates a kubeadm workflow phase that cleanup the node @@ -119,17 +117,6 @@ func runCleanupNode(c workflow.RunData) error { } resetConfigDir(kubeadmconstants.KubernetesDir, dirsToClean, r.DryRun()) - if r.Cfg() != nil && features.Enabled(r.Cfg().FeatureGates, features.RootlessControlPlane) { - if !r.DryRun() { - klog.V(1).Infoln("[reset] Removing users and groups created for rootless control-plane") - if err := users.RemoveUsersAndGroups(); err != nil { - klog.Warningf("[reset] Failed to remove users and groups: %v\n", err) - } - } else { - fmt.Println("[dryrun] Would remove users and groups created for rootless control-plane") - } - } - return nil } @@ -138,6 +125,8 @@ func removeContainers(criSocketPath string) error { if err := containerRuntime.Connect(); err != nil { return err } + defer containerRuntime.Close() + containers, err := containerRuntime.ListKubeContainers() if err != nil { return err diff --git a/cmd/kubeadm/app/cmd/phases/upgrade/apply/data_test.go b/cmd/kubeadm/app/cmd/phases/upgrade/apply/data_test.go index a5a55f1beb923..25ee332d16609 100644 --- a/cmd/kubeadm/app/cmd/phases/upgrade/apply/data_test.go +++ b/cmd/kubeadm/app/cmd/phases/upgrade/apply/data_test.go @@ -45,3 +45,5 @@ func (t *testData) SessionIsInteractive() bool { return false } func (t *testData) AllowExperimentalUpgrades() bool { return false } func (t *testData) AllowRCUpgrades() bool { return false } func (t *testData) ForceUpgrade() bool { return false } +func (t *testData) KubeConfigDir() string { return "" } +func (t *testData) KubeletDir() string { return "" } diff --git a/cmd/kubeadm/app/cmd/phases/upgrade/data.go b/cmd/kubeadm/app/cmd/phases/upgrade/data.go index 6b299d8aaa916..016199c90f67d 100644 --- a/cmd/kubeadm/app/cmd/phases/upgrade/data.go +++ b/cmd/kubeadm/app/cmd/phases/upgrade/data.go @@ -38,4 +38,6 @@ type Data interface { IgnorePreflightErrors() sets.Set[string] PatchesDir() string OutputWriter() io.Writer + KubeConfigDir() string + KubeletDir() string } diff --git a/cmd/kubeadm/app/cmd/phases/upgrade/data_test.go b/cmd/kubeadm/app/cmd/phases/upgrade/data_test.go index bc2f1ce0d9332..1684b20679472 100644 --- a/cmd/kubeadm/app/cmd/phases/upgrade/data_test.go +++ b/cmd/kubeadm/app/cmd/phases/upgrade/data_test.go @@ -41,3 +41,5 @@ func (t *testData) Client() clientset.Interface { return nil } func (t *testData) IgnorePreflightErrors() sets.Set[string] { return nil } func (t *testData) PatchesDir() string { return "" } func (t *testData) OutputWriter() io.Writer { return nil } +func (t *testData) KubeConfigDir() string { return "" } +func (t *testData) KubeletDir() string { return "" } diff --git a/cmd/kubeadm/app/cmd/phases/upgrade/kubeletconfig.go b/cmd/kubeadm/app/cmd/phases/upgrade/kubeletconfig.go index 6b98aef5c40bf..876f068d08634 100644 --- a/cmd/kubeadm/app/cmd/phases/upgrade/kubeletconfig.go +++ b/cmd/kubeadm/app/cmd/phases/upgrade/kubeletconfig.go @@ -29,10 +29,6 @@ import ( "k8s.io/kubernetes/cmd/kubeadm/app/util/errors" ) -const ( - kubeletConfigDir = "" -) - var ( kubeletConfigLongDesc = cmdutil.LongDesc(` Upgrade the kubelet configuration for this node by downloading it from the kubelet-config ConfigMap stored in the cluster @@ -65,7 +61,7 @@ func runKubeletConfigPhase(c workflow.RunData) error { // Write the configuration for the kubelet down to disk and print the generated manifests instead of dry-running. // If not dry-running, the kubelet config file will be backed up to the /etc/kubernetes/tmp/ dir, so that it could be // recovered if anything goes wrong. - err := upgrade.WriteKubeletConfigFiles(data.InitCfg(), kubeletConfigDir, data.PatchesDir(), data.DryRun(), data.OutputWriter()) + err := upgrade.WriteKubeletConfigFiles(data.InitCfg(), data.KubeletDir(), data.KubeConfigDir(), data.PatchesDir(), data.DryRun(), data.OutputWriter()) if err != nil { return err } diff --git a/cmd/kubeadm/app/cmd/phases/upgrade/node/data_test.go b/cmd/kubeadm/app/cmd/phases/upgrade/node/data_test.go index 6de8db579fd5a..6375a4cd04841 100644 --- a/cmd/kubeadm/app/cmd/phases/upgrade/node/data_test.go +++ b/cmd/kubeadm/app/cmd/phases/upgrade/node/data_test.go @@ -42,3 +42,5 @@ func (t *testData) IgnorePreflightErrors() sets.Set[string] { return nil } func (t *testData) PatchesDir() string { return "" } func (t *testData) KubeConfigPath() string { return "" } func (t *testData) OutputWriter() io.Writer { return nil } +func (t *testData) KubeConfigDir() string { return "" } +func (t *testData) KubeletDir() string { return "" } diff --git a/cmd/kubeadm/app/cmd/reset.go b/cmd/kubeadm/app/cmd/reset.go index 818b6eb276836..23f2bf62a1c56 100644 --- a/cmd/kubeadm/app/cmd/reset.go +++ b/cmd/kubeadm/app/cmd/reset.go @@ -44,6 +44,7 @@ import ( "k8s.io/kubernetes/cmd/kubeadm/app/util/errors" kubeconfigutil "k8s.io/kubernetes/cmd/kubeadm/app/util/kubeconfig" utilruntime "k8s.io/kubernetes/cmd/kubeadm/app/util/runtime" + staticpodutil "k8s.io/kubernetes/cmd/kubeadm/app/util/staticpod" ) var ( @@ -132,7 +133,10 @@ func newResetData(cmd *cobra.Command, opts *resetOptions, in io.Reader, out io.W if err == nil { klog.V(1).Infof("[reset] Loaded client set from kubeconfig file: %s", opts.kubeconfigPath) - initCfg, err = configutil.FetchInitConfigurationFromCluster(client, nil, "reset", false, false) + getNodeRegistration := true + getAPIEndpoint := staticpodutil.IsControlPlaneNode() + getComponentConfigs := true + initCfg, err = configutil.FetchInitConfigurationFromCluster(client, nil, "reset", getNodeRegistration, getAPIEndpoint, getComponentConfigs) if err != nil { klog.Warningf("[reset] Unable to fetch the kubeadm-config ConfigMap from cluster: %v", err) } diff --git a/cmd/kubeadm/app/cmd/upgrade/apply.go b/cmd/kubeadm/app/cmd/upgrade/apply.go index a7bae51dd0304..f940639844902 100644 --- a/cmd/kubeadm/app/cmd/upgrade/apply.go +++ b/cmd/kubeadm/app/cmd/upgrade/apply.go @@ -63,6 +63,7 @@ type applyData struct { nonInteractiveMode bool force bool dryRun bool + dryRunDir string etcdUpgrade bool renewCerts bool allowExperimentalUpgrades bool @@ -195,6 +196,14 @@ func newApplyData(cmd *cobra.Command, args []string, applyFlags *applyFlags) (*a return nil, cmdutil.TypeMismatchErr("dryRun", "bool") } + // If dry running creates a temporary directory for saving kubeadm generated files. + dryRunDir := "" + if *dryRun { + if dryRunDir, err = constants.GetDryRunDir(constants.EnvVarUpgradeDryRunDir, "kubeadm-upgrade-apply-dryrun", klog.Warningf); err != nil { + return nil, errors.Wrap(err, "could not create a temporary directory on dryrun") + } + } + etcdUpgrade, ok := cmdutil.ValueFromFlagsOrConfig(cmd.Flags(), options.EtcdUpgrade, upgradeCfg.Apply.EtcdUpgrade, &applyFlags.etcdUpgrade).(*bool) if !ok { return nil, cmdutil.TypeMismatchErr("etcdUpgrade", "bool") @@ -229,7 +238,10 @@ func newApplyData(cmd *cobra.Command, args []string, applyFlags *applyFlags) (*a // Fetches the cluster configuration. klog.V(1).Infoln("[upgrade] retrieving configuration from cluster") - initCfg, err := configutil.FetchInitConfigurationFromCluster(client, nil, "upgrade", false, false) + getNodeRegistration := true + isControlPlaneNode := true + getComponentConfigs := true + initCfg, err := configutil.FetchInitConfigurationFromCluster(client, nil, "upgrade", getNodeRegistration, isControlPlaneNode, getComponentConfigs) if err != nil { if apierrors.IsNotFound(err) { _, _ = printer.Printf("[upgrade] In order to upgrade, a ConfigMap called %q in the %q namespace must exist.\n", constants.KubeadmConfigConfigMap, metav1.NamespaceSystem) @@ -270,6 +282,7 @@ func newApplyData(cmd *cobra.Command, args []string, applyFlags *applyFlags) (*a nonInteractiveMode: applyFlags.nonInteractiveMode, force: *force, dryRun: *dryRun, + dryRunDir: dryRunDir, etcdUpgrade: *etcdUpgrade, renewCerts: *renewCerts, allowExperimentalUpgrades: *allowExperimentalUpgrades, @@ -354,3 +367,19 @@ func (d *applyData) IsControlPlaneNode() bool { // `kubeadm upgrade apply` should always be executed on a control-plane node return true } + +// KubeConfigDir returns the Kubernetes configuration directory or the temporary directory if DryRun is true. +func (j *applyData) KubeConfigDir() string { + if j.dryRun { + return j.dryRunDir + } + return constants.KubernetesDir +} + +// KubeletDir returns the kubelet configuration directory or the temporary directory if DryRun is true. +func (j *applyData) KubeletDir() string { + if j.dryRun { + return j.dryRunDir + } + return constants.KubeletRunDirectory +} diff --git a/cmd/kubeadm/app/cmd/upgrade/common.go b/cmd/kubeadm/app/cmd/upgrade/common.go index a3579e532540e..0fee21e2ecbd7 100644 --- a/cmd/kubeadm/app/cmd/upgrade/common.go +++ b/cmd/kubeadm/app/cmd/upgrade/common.go @@ -45,6 +45,7 @@ import ( "k8s.io/kubernetes/cmd/kubeadm/app/util/errors" kubeconfigutil "k8s.io/kubernetes/cmd/kubeadm/app/util/kubeconfig" "k8s.io/kubernetes/cmd/kubeadm/app/util/output" + staticpodutil "k8s.io/kubernetes/cmd/kubeadm/app/util/staticpod" ) // enforceRequirements verifies that it's okay to upgrade and then returns the variables needed for the rest of the procedure @@ -92,7 +93,10 @@ func enforceRequirements(flagSet *pflag.FlagSet, flags *applyPlanFlags, args []s return nil, nil, nil, nil, err } - initCfg, err := configutil.FetchInitConfigurationFromCluster(client, printer, "upgrade/config", false, false) + getNodeRegistration := true + getAPIEndpoint := staticpodutil.IsControlPlaneNode() + getComponentConfigs := true + initCfg, err := configutil.FetchInitConfigurationFromCluster(client, printer, "upgrade/config", getNodeRegistration, getAPIEndpoint, getComponentConfigs) if err != nil { return nil, nil, nil, nil, errors.Wrap(err, "[upgrade/init config] FATAL") } diff --git a/cmd/kubeadm/app/cmd/upgrade/diff.go b/cmd/kubeadm/app/cmd/upgrade/diff.go index 947d763a57b43..3d5bf468e9b8c 100644 --- a/cmd/kubeadm/app/cmd/upgrade/diff.go +++ b/cmd/kubeadm/app/cmd/upgrade/diff.go @@ -41,6 +41,7 @@ import ( "k8s.io/kubernetes/cmd/kubeadm/app/util/errors" kubeconfigutil "k8s.io/kubernetes/cmd/kubeadm/app/util/kubeconfig" "k8s.io/kubernetes/cmd/kubeadm/app/util/output" + staticpodutil "k8s.io/kubernetes/cmd/kubeadm/app/util/staticpod" ) type diffFlags struct { @@ -106,7 +107,7 @@ func validateManifestsPath(manifests ...string) (err error) { } // FetchInitConfigurationFunc defines the signature of the function which will fetch InitConfiguration from cluster. -type FetchInitConfigurationFunc func(client clientset.Interface, printer output.Printer, logPrefix string, newControlPlane, skipComponentConfigs bool) (*kubeadmapi.InitConfiguration, error) +type FetchInitConfigurationFunc func(client clientset.Interface, printer output.Printer, logPrefix string, getNodeRegistration, getAPIEndpoint, getComponentConfigs bool) (*kubeadmapi.InitConfiguration, error) func runDiff(fs *pflag.FlagSet, flags *diffFlags, args []string, fetchInitConfigurationFromCluster FetchInitConfigurationFunc) error { externalCfg := &v1beta4.UpgradeConfiguration{} @@ -119,7 +120,10 @@ func runDiff(fs *pflag.FlagSet, flags *diffFlags, args []string, fetchInitConfig if err != nil { return errors.Wrapf(err, "couldn't create a Kubernetes client from file %q", flags.kubeConfigPath) } - initCfg, err := fetchInitConfigurationFromCluster(client, &output.TextPrinter{}, "upgrade/diff", false, true) + getNodeRegistration := true + getAPIEndpoint := staticpodutil.IsControlPlaneNode() + getComponentConfigs := false + initCfg, err := fetchInitConfigurationFromCluster(client, &output.TextPrinter{}, "upgrade/diff", getNodeRegistration, getAPIEndpoint, getComponentConfigs) if err != nil { return err } diff --git a/cmd/kubeadm/app/cmd/upgrade/diff_test.go b/cmd/kubeadm/app/cmd/upgrade/diff_test.go index f23041285926e..7e65ee1a18bf2 100644 --- a/cmd/kubeadm/app/cmd/upgrade/diff_test.go +++ b/cmd/kubeadm/app/cmd/upgrade/diff_test.go @@ -44,7 +44,7 @@ func createTestRunDiffFile(contents []byte) (string, error) { return file.Name(), nil } -func fakeFetchInitConfig(client clientset.Interface, printer output.Printer, logPrefix string, newControlPlane, skipComponentConfigs bool) (*kubeadmapi.InitConfiguration, error) { +func fakeFetchInitConfig(client clientset.Interface, printer output.Printer, logPrefix string, getNodeRegistration, getAPIEndpoint, getComponentConfigs bool) (*kubeadmapi.InitConfiguration, error) { return &kubeadmapi.InitConfiguration{ ClusterConfiguration: kubeadmapi.ClusterConfiguration{ KubernetesVersion: "v1.0.1", diff --git a/cmd/kubeadm/app/cmd/upgrade/node.go b/cmd/kubeadm/app/cmd/upgrade/node.go index b0f57d0b1e28e..1c8ad80049e11 100644 --- a/cmd/kubeadm/app/cmd/upgrade/node.go +++ b/cmd/kubeadm/app/cmd/upgrade/node.go @@ -19,7 +19,6 @@ package upgrade import ( "fmt" "io" - "os" "github.com/spf13/cobra" flag "github.com/spf13/pflag" @@ -40,6 +39,7 @@ import ( configutil "k8s.io/kubernetes/cmd/kubeadm/app/util/config" "k8s.io/kubernetes/cmd/kubeadm/app/util/errors" "k8s.io/kubernetes/cmd/kubeadm/app/util/output" + staticpodutil "k8s.io/kubernetes/cmd/kubeadm/app/util/staticpod" ) // nodeOptions defines all the options exposed via flags by kubeadm upgrade node. @@ -64,6 +64,7 @@ type nodeData struct { etcdUpgrade bool renewCerts bool dryRun bool + dryRunDir string cfg *kubeadmapi.UpgradeConfiguration initCfg *kubeadmapi.InitConfiguration isControlPlaneNode bool @@ -164,13 +165,8 @@ func addUpgradeNodeFlags(flagSet *flag.FlagSet, nodeOptions *nodeOptions) { // This func takes care of validating nodeOptions passed to the command, and then it converts // options into the internal InitConfiguration type that is used as input all the phases in the kubeadm upgrade node workflow func newNodeData(cmd *cobra.Command, nodeOptions *nodeOptions, out io.Writer) (*nodeData, error) { - // Checks if a node is a control-plane node by looking up the kube-apiserver manifest file - isControlPlaneNode := true - filepath := constants.GetStaticPodFilepath(constants.KubeAPIServer, constants.GetStaticPodDirectory()) - if _, err := os.Stat(filepath); os.IsNotExist(err) { - klog.V(1).Infof("assuming this is not a control plane node because %q is missing", filepath) - isControlPlaneNode = false - } + isControlPlaneNode := staticpodutil.IsControlPlaneNode() + if len(nodeOptions.kubeConfigPath) == 0 { // Update the kubeconfig path depending on whether this is a control plane node or not. nodeOptions.kubeConfigPath = constants.GetKubeletKubeConfigPath() @@ -191,6 +187,14 @@ func newNodeData(cmd *cobra.Command, nodeOptions *nodeOptions, out io.Writer) (* return nil, cmdutil.TypeMismatchErr("dryRun", "bool") } + // If dry running creates a temporary directory for saving kubeadm generated files. + dryRunDir := "" + if *dryRun { + if dryRunDir, err = constants.GetDryRunDir(constants.EnvVarUpgradeDryRunDir, "kubeadm-upgrade-node-dryrun", klog.Warningf); err != nil { + return nil, errors.Wrap(err, "could not create a temporary directory on dryrun") + } + } + printer := &output.TextPrinter{} client, err := getClient(nodeOptions.kubeConfigPath, *dryRun, printer) if err != nil { @@ -198,9 +202,10 @@ func newNodeData(cmd *cobra.Command, nodeOptions *nodeOptions, out io.Writer) (* } // Fetches the cluster configuration - // NB in case of control-plane node, we are reading all the info for the node; in case of NOT control-plane node - // (worker node), we are not reading local API address and the CRI socket from the node object - initCfg, err := configutil.FetchInitConfigurationFromCluster(client, nil, "upgrade", !isControlPlaneNode, false) + getNodeRegistration := true + getAPIEndpoint := isControlPlaneNode + getComponentConfigs := true + initCfg, err := configutil.FetchInitConfigurationFromCluster(client, nil, "upgrade", getNodeRegistration, getAPIEndpoint, getComponentConfigs) if err != nil { return nil, errors.Wrap(err, "unable to fetch the kubeadm-config ConfigMap") } @@ -222,6 +227,7 @@ func newNodeData(cmd *cobra.Command, nodeOptions *nodeOptions, out io.Writer) (* return &nodeData{ cfg: upgradeCfg, dryRun: *dryRun, + dryRunDir: dryRunDir, initCfg: initCfg, client: client, isControlPlaneNode: isControlPlaneNode, @@ -287,3 +293,19 @@ func (d *nodeData) KubeConfigPath() string { func (d *nodeData) OutputWriter() io.Writer { return d.outputWriter } + +// KubeConfigDir returns the Kubernetes configuration directory or the temporary directory if DryRun is true. +func (j *nodeData) KubeConfigDir() string { + if j.dryRun { + return j.dryRunDir + } + return constants.KubernetesDir +} + +// KubeletDir returns the kubelet configuration directory or the temporary directory if DryRun is true. +func (j *nodeData) KubeletDir() string { + if j.dryRun { + return j.dryRunDir + } + return constants.KubeletRunDirectory +} diff --git a/cmd/kubeadm/app/constants/constants.go b/cmd/kubeadm/app/constants/constants.go index 21e49e24e6e4e..f41f24865ce57 100644 --- a/cmd/kubeadm/app/constants/constants.go +++ b/cmd/kubeadm/app/constants/constants.go @@ -326,7 +326,7 @@ const ( MinExternalEtcdVersion = "3.5.21-0" // DefaultEtcdVersion indicates the default etcd version that kubeadm uses - DefaultEtcdVersion = "3.6.4-0" + DefaultEtcdVersion = "3.6.5-0" // Etcd defines variable used internally when referring to etcd component Etcd = "etcd" @@ -364,7 +364,7 @@ const ( CoreDNSImageName = "coredns" // CoreDNSVersion is the version of CoreDNS to be deployed if it is used - CoreDNSVersion = "v1.12.1" + CoreDNSVersion = "v1.12.3" // ClusterConfigurationKind is the string kind value for the ClusterConfiguration struct ClusterConfigurationKind = "ClusterConfiguration" @@ -501,7 +501,7 @@ var ( 31: "3.5.21-0", 32: "3.5.21-0", 33: "3.5.21-0", - 34: "3.6.4-0", + 34: "3.6.5-0", } // KubeadmCertsClusterRoleName sets the name for the ClusterRole that allows diff --git a/cmd/kubeadm/app/discovery/file/file.go b/cmd/kubeadm/app/discovery/file/file.go index 4a5cf3801cbf6..c3a8c176c55fa 100644 --- a/cmd/kubeadm/app/discovery/file/file.go +++ b/cmd/kubeadm/app/discovery/file/file.go @@ -94,7 +94,7 @@ func ValidateConfigInfo(config *clientcmdapi.Config, discoveryTimeout time.Durat err = wait.PollUntilContextTimeout(context.Background(), constants.DiscoveryRetryInterval, discoveryTimeout, true, func(_ context.Context) (bool, error) { - clusterinfoCM, lastError = client.CoreV1().ConfigMaps(metav1.NamespacePublic).Get(context.TODO(), bootstrapapi.ConfigMapClusterInfo, metav1.GetOptions{}) + clusterinfoCM, lastError = client.CoreV1().ConfigMaps(metav1.NamespacePublic).Get(context.Background(), bootstrapapi.ConfigMapClusterInfo, metav1.GetOptions{}) if lastError != nil { if apierrors.IsForbidden(lastError) { // If the request fails with a forbidden error, the cluster admin has not granted access to the cluster info configmap for anonymous clients. diff --git a/cmd/kubeadm/app/features/features.go b/cmd/kubeadm/app/features/features.go index 5fcd7d7f415ae..41ed0a4e9479f 100644 --- a/cmd/kubeadm/app/features/features.go +++ b/cmd/kubeadm/app/features/features.go @@ -43,9 +43,6 @@ const ( // PublicKeysECDSA is expected to be alpha in v1.19 PublicKeysECDSA = "PublicKeysECDSA" - // RootlessControlPlane is expected to be in alpha in v1.22 - RootlessControlPlane = "RootlessControlPlane" - // WaitForAllControlPlaneComponents is expected to be alpha in v1.30 WaitForAllControlPlaneComponents = "WaitForAllControlPlaneComponents" ) @@ -57,12 +54,8 @@ var InitFeatureGates = FeatureList{ DeprecationMessage: "The PublicKeysECDSA feature gate is deprecated and will be removed when v1beta3 is removed." + " v1beta4 supports a new option 'ClusterConfiguration.EncryptionAlgorithm'.", }, - RootlessControlPlane: {FeatureSpec: featuregate.FeatureSpec{Default: false, PreRelease: featuregate.Alpha}, - DeprecationMessage: "Deprecated in favor of the core kubelet feature UserNamespacesSupport which is beta since 1.30." + - " Once UserNamespacesSupport graduates to GA, kubeadm will start using it and RootlessControlPlane will be removed.", - }, WaitForAllControlPlaneComponents: {FeatureSpec: featuregate.FeatureSpec{Default: true, PreRelease: featuregate.GA, LockToDefault: true}}, - ControlPlaneKubeletLocalMode: {FeatureSpec: featuregate.FeatureSpec{Default: true, PreRelease: featuregate.Beta}}, + ControlPlaneKubeletLocalMode: {FeatureSpec: featuregate.FeatureSpec{Default: true, PreRelease: featuregate.GA, LockToDefault: true}}, NodeLocalCRISocket: {FeatureSpec: featuregate.FeatureSpec{Default: true, PreRelease: featuregate.Beta}}, } diff --git a/cmd/kubeadm/app/phases/addons/dns/dns_test.go b/cmd/kubeadm/app/phases/addons/dns/dns_test.go index 4d4186728bfe0..65de5fbe9a83f 100644 --- a/cmd/kubeadm/app/phases/addons/dns/dns_test.go +++ b/cmd/kubeadm/app/phases/addons/dns/dns_test.go @@ -1454,7 +1454,7 @@ func TestDeployedDNSAddon(t *testing.T) { }, { name: "with digest", - image: "registry.k8s.io/coredns/coredns:v1.12.1@sha256:a0ead06651cf580044aeb0a0feba63591858fb2e43ade8c9dea45a6a89ae7e5e", + image: "registry.k8s.io/coredns/coredns:v1.12.3@sha256:1391544c978029fcddc65068f6ad67f396e55585b664ecccd7fefba029b9b706", deploymentSize: 1, wantVersion: kubeadmconstants.CoreDNSVersion, }, diff --git a/cmd/kubeadm/app/phases/controlplane/manifests.go b/cmd/kubeadm/app/phases/controlplane/manifests.go index bbb79d7bfe812..e070d91607edf 100644 --- a/cmd/kubeadm/app/phases/controlplane/manifests.go +++ b/cmd/kubeadm/app/phases/controlplane/manifests.go @@ -31,13 +31,11 @@ import ( kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" - "k8s.io/kubernetes/cmd/kubeadm/app/features" "k8s.io/kubernetes/cmd/kubeadm/app/images" certphase "k8s.io/kubernetes/cmd/kubeadm/app/phases/certs" kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util" "k8s.io/kubernetes/cmd/kubeadm/app/util/errors" staticpodutil "k8s.io/kubernetes/cmd/kubeadm/app/util/staticpod" - "k8s.io/kubernetes/cmd/kubeadm/app/util/users" ) // CreateInitStaticPodManifestFiles will write all static pod manifest files needed to bring up the control plane. @@ -125,19 +123,6 @@ func CreateStaticPodFiles(manifestDir, patchesDir string, cfg *kubeadmapi.Cluste klog.V(1).Infoln("[control-plane] getting StaticPodSpecs") specs := GetStaticPodSpecs(cfg, endpoint, nil) - var usersAndGroups *users.UsersAndGroups - var err error - if features.Enabled(cfg.FeatureGates, features.RootlessControlPlane) { - if isDryRun { - fmt.Printf("[control-plane] Would create users and groups for %+v to run as non-root\n", componentNames) - } else { - usersAndGroups, err = staticpodutil.GetUsersAndGroups() - if err != nil { - return errors.Wrap(err, "failed to create users and groups") - } - } - } - // creates required static pod specs for _, componentName := range componentNames { // retrieves the StaticPodSpec for given component @@ -151,18 +136,6 @@ func CreateStaticPodFiles(manifestDir, patchesDir string, cfg *kubeadmapi.Cluste klog.V(2).Infof("[control-plane] adding volume %q for component %q", v.Name, componentName) } - if features.Enabled(cfg.FeatureGates, features.RootlessControlPlane) { - if isDryRun { - fmt.Printf("[control-plane] Would update static pod manifest for %q to run run as non-root\n", componentName) - } else { - if usersAndGroups != nil { - if err := staticpodutil.RunComponentAsNonRoot(componentName, &spec, usersAndGroups, cfg); err != nil { - return errors.Wrapf(err, "failed to run component %q as non-root", componentName) - } - } - } - } - // if patchesDir is defined, patch the static Pod manifest if patchesDir != "" { patchedSpec, err := staticpodutil.PatchStaticPod(&spec, patchesDir, os.Stdout) diff --git a/cmd/kubeadm/app/phases/etcd/local.go b/cmd/kubeadm/app/phases/etcd/local.go index b3728128a79da..a0623a5b09205 100644 --- a/cmd/kubeadm/app/phases/etcd/local.go +++ b/cmd/kubeadm/app/phases/etcd/local.go @@ -35,14 +35,12 @@ import ( kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" - "k8s.io/kubernetes/cmd/kubeadm/app/features" "k8s.io/kubernetes/cmd/kubeadm/app/images" kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util" dryrunutil "k8s.io/kubernetes/cmd/kubeadm/app/util/dryrun" "k8s.io/kubernetes/cmd/kubeadm/app/util/errors" etcdutil "k8s.io/kubernetes/cmd/kubeadm/app/util/etcd" staticpodutil "k8s.io/kubernetes/cmd/kubeadm/app/util/staticpod" - "k8s.io/kubernetes/cmd/kubeadm/app/util/users" ) const ( @@ -302,26 +300,6 @@ func prepareAndWriteEtcdStaticPod(manifestDir string, patchesDir string, cfg *ku // gets etcd StaticPodSpec, actualized for the current ClusterConfiguration and the new list of etcd members spec := GetEtcdPodSpec(cfg, endpoint, nodeName, initialCluster) - var usersAndGroups *users.UsersAndGroups - var err error - if features.Enabled(cfg.FeatureGates, features.RootlessControlPlane) { - if isDryRun { - fmt.Printf("[etcd] Would create users and groups for %q to run as non-root\n", kubeadmconstants.Etcd) - fmt.Printf("[etcd] Would update static pod manifest for %q to run run as non-root\n", kubeadmconstants.Etcd) - } else { - usersAndGroups, err = staticpodutil.GetUsersAndGroups() - if err != nil { - return errors.Wrap(err, "failed to create users and groups") - } - // usersAndGroups is nil on non-linux. - if usersAndGroups != nil { - if err := staticpodutil.RunComponentAsNonRoot(kubeadmconstants.Etcd, &spec, usersAndGroups, cfg); err != nil { - return errors.Wrapf(err, "failed to run component %q as non-root", kubeadmconstants.Etcd) - } - } - } - } - // if patchesDir is defined, patch the static Pod manifest if patchesDir != "" { patchedSpec, err := staticpodutil.PatchStaticPod(&spec, patchesDir, os.Stdout) diff --git a/cmd/kubeadm/app/phases/upgrade/postupgrade.go b/cmd/kubeadm/app/phases/upgrade/postupgrade.go index 5ffe1cdf2e728..caa67ef931da2 100644 --- a/cmd/kubeadm/app/phases/upgrade/postupgrade.go +++ b/cmd/kubeadm/app/phases/upgrade/postupgrade.go @@ -95,21 +95,9 @@ func UnupgradedControlPlaneInstances(client clientset.Interface, nodeName string } // WriteKubeletConfigFiles writes the kubelet config file to disk, but first creates a backup of any existing one. -func WriteKubeletConfigFiles(cfg *kubeadmapi.InitConfiguration, kubeletConfigDir string, patchesDir string, dryRun bool, out io.Writer) error { - var ( - err error - kubeletDir = kubeadmconstants.KubeletRunDirectory - ) - // If dry-running, this will return a directory under /etc/kubernetes/tmp or kubeletConfigDir. - if dryRun { - kubeletDir, err = kubeadmconstants.CreateTempDir(kubeletConfigDir, "kubeadm-upgrade-dryrun") - } - if err != nil { - // The error here should never occur in reality, would only be thrown if /tmp doesn't exist on the machine. - return err - } - // Create a copy of the kubelet config file in the /etc/kubernetes/tmp or kubeletConfigDir. - backupDir, err := kubeadmconstants.CreateTempDir(kubeletConfigDir, "kubeadm-kubelet-config") +func WriteKubeletConfigFiles(cfg *kubeadmapi.InitConfiguration, kubeletDir string, kubeConfigDir string, patchesDir string, dryRun bool, out io.Writer) error { + // Create a copy of the kubelet config file in the /etc/kubernetes/tmp or kubeConfigDir. + backupDir, err := kubeadmconstants.CreateTimestampDir(kubeConfigDir, "kubeadm-kubelet-config") if err != nil { return err } @@ -120,13 +108,13 @@ func WriteKubeletConfigFiles(cfg *kubeadmapi.InitConfiguration, kubeletConfigDir dest := filepath.Join(backupDir, kubeadmconstants.KubeletConfigurationFileName) if !dryRun { - fmt.Printf("[upgrade] Backing up kubelet config file to %s\n", dest) + _, _ = fmt.Fprintf(out, "[upgrade] Backing up kubelet config file to %s\n", dest) err := kubeadmutil.CopyFile(src, dest) if err != nil { return errors.Wrap(err, "error backing up the kubelet config file") } } else { - fmt.Printf("[dryrun] Would back up kubelet config file to %s\n", dest) + _, _ = fmt.Fprintf(out, "[dryrun] Would back up kubelet config file to %s\n", dest) } if features.Enabled(cfg.FeatureGates, features.NodeLocalCRISocket) { @@ -154,7 +142,7 @@ func WriteKubeletConfigFiles(cfg *kubeadmapi.InitConfiguration, kubeletConfigDir } } } else if dryRun { - fmt.Fprintf(os.Stdout, "[dryrun] would read the flag --container-runtime-endpoint value from %q, which is missing. "+ + _, _ = fmt.Fprintf(out, "[dryrun] would read the flag --container-runtime-endpoint value from %q, which is missing. "+ "Using default socket %q instead", kubeadmconstants.KubeletEnvFileName, kubeadmconstants.DefaultCRISocket) containerRuntimeEndpoint = kubeadmconstants.DefaultCRISocket } else { @@ -170,7 +158,7 @@ func WriteKubeletConfigFiles(cfg *kubeadmapi.InitConfiguration, kubeletConfigDir } if dryRun { // Print what contents would be written - err = dryrunutil.PrintDryRunFile(kubeadmconstants.KubeletInstanceConfigurationFileName, kubeletDir, kubeadmconstants.KubeletRunDirectory, os.Stdout) + err = dryrunutil.PrintDryRunFile(kubeadmconstants.KubeletInstanceConfigurationFileName, kubeletDir, kubeadmconstants.KubeletRunDirectory, out) if err != nil { return errors.Wrap(err, "error printing kubelet instance configuration file on dryrun") } @@ -184,7 +172,7 @@ func WriteKubeletConfigFiles(cfg *kubeadmapi.InitConfiguration, kubeletConfigDir } if dryRun { // Print what contents would be written - err := dryrunutil.PrintDryRunFile(kubeadmconstants.KubeletConfigurationFileName, kubeletDir, kubeadmconstants.KubeletRunDirectory, os.Stdout) + err := dryrunutil.PrintDryRunFile(kubeadmconstants.KubeletConfigurationFileName, kubeletDir, kubeadmconstants.KubeletRunDirectory, out) if err != nil { return errors.Wrap(err, "error printing kubelet configuration file on dryrun") } @@ -192,10 +180,7 @@ func WriteKubeletConfigFiles(cfg *kubeadmapi.InitConfiguration, kubeletConfigDir return nil } -// UpdateKubeletKubeconfigServer changes the Server URL in the kubelets kubeconfig if necessary depending on the -// ControlPlaneKubeletLocalMode feature gate. -// TODO: remove this function once ControlPlaneKubeletLocalMode goes GA and is hardcoded to be enabled by default: -// https://github.com/kubernetes/kubeadm/issues/2271 +// UpdateKubeletKubeconfigServer changes the Server URL in the kubelet's kubeconfig if necessary. func UpdateKubeletKubeconfigServer(cfg *kubeadmapi.InitConfiguration, dryRun bool) error { kubeletKubeConfigFilePath := filepath.Join(kubeadmconstants.KubernetesDir, kubeadmconstants.KubeletKubeConfigFileName) @@ -228,21 +213,12 @@ func UpdateKubeletKubeconfigServer(cfg *kubeadmapi.InitConfiguration, dryRun boo } var targetServer string - if features.Enabled(cfg.FeatureGates, features.ControlPlaneKubeletLocalMode) { - // Skip changing kubeconfig file if Server does not match the ControlPlaneEndpoint. - if config.Clusters[configContext.Cluster].Server != controlPlaneAPIEndpoint || controlPlaneAPIEndpoint == localAPIEndpoint { - klog.V(2).Infof("Skipping update of the Server URL in %s, because it's already not equal to %q or already matches the localAPIEndpoint", kubeletKubeConfigFilePath, controlPlaneAPIEndpoint) - return nil - } - targetServer = localAPIEndpoint - } else { - // Skip changing kubeconfig file if Server does not match the localAPIEndpoint. - if config.Clusters[configContext.Cluster].Server != localAPIEndpoint { - klog.V(2).Infof("Skipping update of the Server URL in %s, because it already matches the controlPlaneAPIEndpoint", kubeletKubeConfigFilePath) - return nil - } - targetServer = controlPlaneAPIEndpoint + // Skip changing kubeconfig file if Server does not match the ControlPlaneEndpoint. + if config.Clusters[configContext.Cluster].Server != controlPlaneAPIEndpoint || controlPlaneAPIEndpoint == localAPIEndpoint { + klog.V(2).Infof("Skipping update of the Server URL in %s, because it's already not equal to %q or already matches the localAPIEndpoint", kubeletKubeConfigFilePath, controlPlaneAPIEndpoint) + return nil } + targetServer = localAPIEndpoint if dryRun { fmt.Printf("[dryrun] Would change the Server URL from %q to %q in %s and try to restart kubelet\n", config.Clusters[configContext.Cluster].Server, targetServer, kubeletKubeConfigFilePath) diff --git a/cmd/kubeadm/app/phases/upgrade/postupgrade_test.go b/cmd/kubeadm/app/phases/upgrade/postupgrade_test.go index 6dc145c71ab45..7627c89992abc 100644 --- a/cmd/kubeadm/app/phases/upgrade/postupgrade_test.go +++ b/cmd/kubeadm/app/phases/upgrade/postupgrade_test.go @@ -142,7 +142,7 @@ func TestWriteKubeletConfigFiles(t *testing.T) { }, } for _, tc := range testCases { - err := WriteKubeletConfigFiles(tc.cfg, tempDir, tc.patchesDir, true, os.Stdout) + err := WriteKubeletConfigFiles(tc.cfg, tempDir, tempDir, tc.patchesDir, true, os.Stdout) if (err != nil) != tc.expectedError { t.Fatalf("expected error: %v, got: %v, error: %v", tc.expectedError, err != nil, err) } diff --git a/cmd/kubeadm/app/preflight/checks.go b/cmd/kubeadm/app/preflight/checks.go index 36978405d19a8..e7eff98bcc1d8 100644 --- a/cmd/kubeadm/app/preflight/checks.go +++ b/cmd/kubeadm/app/preflight/checks.go @@ -84,6 +84,7 @@ func (ContainerRuntimeCheck) Name() string { // Check validates the container runtime func (crc ContainerRuntimeCheck) Check() (warnings, errorList []error) { klog.V(1).Infoln("validating the container runtime") + defer crc.runtime.Close() if err := crc.runtime.IsRunning(); err != nil { errorList = append(errorList, err) } @@ -104,7 +105,7 @@ func (sc ServiceCheck) Name() string { if sc.Label != "" { return sc.Label } - return fmt.Sprintf("Service-%s", strings.Title(sc.Service)) + return fmt.Sprintf("Service-%s", sc.Service) } // Check validates if the service is enabled and active. @@ -1087,6 +1088,7 @@ func RunPullImagesCheck(execer utilsexec.Interface, cfg *kubeadmapi.InitConfigur if err := containerRuntime.Connect(); err != nil { return handleError(os.Stderr, err.Error()) } + defer containerRuntime.Close() serialPull := true if cfg.NodeRegistration.ImagePullSerial != nil { diff --git a/cmd/kubeadm/app/util/apiclient/wait.go b/cmd/kubeadm/app/util/apiclient/wait.go index af8fa7e9f4126..7692494dd2a2c 100644 --- a/cmd/kubeadm/app/util/apiclient/wait.go +++ b/cmd/kubeadm/app/util/apiclient/wait.go @@ -23,6 +23,7 @@ import ( "io" "net" "net/http" + "strconv" "strings" "text/template" "time" @@ -327,7 +328,7 @@ func (w *KubeWaiter) WaitForPodsWithLabel(kvLabel string) error { constants.KubernetesAPICallRetryInterval, w.timeout, true, func(_ context.Context) (bool, error) { listOpts := metav1.ListOptions{LabelSelector: kvLabel} - pods, err := w.client.CoreV1().Pods(metav1.NamespaceSystem).List(context.TODO(), listOpts) + pods, err := w.client.CoreV1().Pods(metav1.NamespaceSystem).List(context.Background(), listOpts) if err != nil { _, _ = fmt.Fprintf(w.writer, "[apiclient] Error getting Pods with label selector %q [%v]\n", kvLabel, err) return false, nil @@ -357,7 +358,8 @@ func (w *KubeWaiter) WaitForKubelet(healthzAddress string, healthzPort int32) er var ( lastError error start = time.Now() - healthzEndpoint = fmt.Sprintf("http://%s:%d/healthz", healthzAddress, healthzPort) + addrPort = net.JoinHostPort(healthzAddress, strconv.Itoa(int(healthzPort))) + healthzEndpoint = fmt.Sprintf("http://%s/healthz", addrPort) ) if healthzPort == 0 { @@ -493,7 +495,7 @@ func (w *KubeWaiter) WaitForStaticPodHashChange(nodeName, component, previousHas func getStaticPodSingleHash(client clientset.Interface, nodeName string, component string) (string, error) { staticPodName := fmt.Sprintf("%s-%s", component, nodeName) - staticPod, err := client.CoreV1().Pods(metav1.NamespaceSystem).Get(context.TODO(), staticPodName, metav1.GetOptions{}) + staticPod, err := client.CoreV1().Pods(metav1.NamespaceSystem).Get(context.Background(), staticPodName, metav1.GetOptions{}) if err != nil { return "", errors.Wrapf(err, "failed to obtain static Pod hash for component %s on Node %s", component, nodeName) } diff --git a/cmd/kubeadm/app/util/config/cluster.go b/cmd/kubeadm/app/util/config/cluster.go index 724530f692a75..d352ebe5c0f72 100644 --- a/cmd/kubeadm/app/util/config/cluster.go +++ b/cmd/kubeadm/app/util/config/cluster.go @@ -29,7 +29,6 @@ import ( authv1 "k8s.io/api/authentication/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - errorsutil "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/wait" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/clientcmd" @@ -52,7 +51,7 @@ import ( ) // FetchInitConfigurationFromCluster fetches configuration from a ConfigMap in the cluster -func FetchInitConfigurationFromCluster(client clientset.Interface, printer output.Printer, logPrefix string, newControlPlane, skipComponentConfigs bool) (*kubeadmapi.InitConfiguration, error) { +func FetchInitConfigurationFromCluster(client clientset.Interface, printer output.Printer, logPrefix string, getNodeRegistration, getAPIEndpoint, getComponentConfigs bool) (*kubeadmapi.InitConfiguration, error) { if printer == nil { printer = &output.TextPrinter{} } @@ -61,7 +60,7 @@ func FetchInitConfigurationFromCluster(client clientset.Interface, printer outpu _, _ = printer.Printf("[%s] Use 'kubeadm init phase upload-config kubeadm --config your-config-file' to re-upload it.\n", logPrefix) // Fetch the actual config from cluster - cfg, err := getInitConfigurationFromCluster(constants.KubernetesDir, client, newControlPlane, skipComponentConfigs) + cfg, err := getInitConfigurationFromCluster(constants.KubernetesDir, client, getNodeRegistration, getAPIEndpoint, getComponentConfigs) if err != nil { return nil, err } @@ -76,7 +75,7 @@ func FetchInitConfigurationFromCluster(client clientset.Interface, printer outpu } // getInitConfigurationFromCluster is separate only for testing purposes, don't call it directly, use FetchInitConfigurationFromCluster instead -func getInitConfigurationFromCluster(kubeconfigDir string, client clientset.Interface, newControlPlane, skipComponentConfigs bool) (*kubeadmapi.InitConfiguration, error) { +func getInitConfigurationFromCluster(kubeconfigDir string, client clientset.Interface, getNodeRegistration, getAPIEndpoint, getComponentConfigs bool) (*kubeadmapi.InitConfiguration, error) { // Also, the config map really should be KubeadmConfigConfigMap... configMap, err := apiclient.GetConfigMapWithShortRetry(client, metav1.NamespaceSystem, constants.KubeadmConfigConfigMap) if err != nil { @@ -106,26 +105,28 @@ func getInitConfigurationFromCluster(kubeconfigDir string, client clientset.Inte return nil, errors.Wrap(err, "failed to decode cluster configuration data") } - if !skipComponentConfigs { + if getComponentConfigs { // get the component configs from the corresponding config maps if err := componentconfigs.FetchFromCluster(&initcfg.ClusterConfiguration, client); err != nil { return nil, errors.Wrap(err, "failed to get component configs") } } - // if this isn't a new controlplane instance (e.g. in case of kubeadm upgrades) - // get nodes specific information as well - if !newControlPlane { + if getNodeRegistration { // gets the nodeRegistration for the current from the node object kubeconfigFile := filepath.Join(kubeconfigDir, constants.KubeletKubeConfigFileName) if err := GetNodeRegistration(kubeconfigFile, client, &initcfg.NodeRegistration, &initcfg.ClusterConfiguration); err != nil { return nil, errors.Wrap(err, "failed to get node registration") } - // gets the APIEndpoint for the current node - if err := getAPIEndpoint(client, initcfg.NodeRegistration.Name, &initcfg.LocalAPIEndpoint); err != nil { + } + + if getAPIEndpoint { + // gets the APIEndpoint for the current control plane node + if err := GetAPIEndpoint(client, initcfg.NodeRegistration.Name, &initcfg.LocalAPIEndpoint); err != nil { return nil, errors.Wrap(err, "failed to getAPIEndpoint") } } + return initcfg, nil } @@ -258,21 +259,19 @@ func getNodeNameFromSSR(client clientset.Interface) (string, error) { return strings.TrimPrefix(user, constants.NodesUserPrefix), nil } -func getAPIEndpoint(client clientset.Interface, nodeName string, apiEndpoint *kubeadmapi.APIEndpoint) error { +// GetAPIEndpoint gets the API endpoint for a given node. +func GetAPIEndpoint(client clientset.Interface, nodeName string, apiEndpoint *kubeadmapi.APIEndpoint) error { return getAPIEndpointWithRetry(client, nodeName, apiEndpoint, constants.KubernetesAPICallRetryInterval, kubeadmapi.GetActiveTimeouts().KubernetesAPICall.Duration) } func getAPIEndpointWithRetry(client clientset.Interface, nodeName string, apiEndpoint *kubeadmapi.APIEndpoint, interval, timeout time.Duration) error { - var err error - var errs []error - - if err = getAPIEndpointFromPodAnnotation(client, nodeName, apiEndpoint, interval, timeout); err == nil { - return nil + err := getAPIEndpointFromPodAnnotation(client, nodeName, apiEndpoint, interval, timeout) + if err != nil { + return errors.WithMessagef(err, "could not retrieve API endpoints for node %q using pod annotations", nodeName) } - errs = append(errs, errors.WithMessagef(err, "could not retrieve API endpoints for node %q using pod annotations", nodeName)) - return errorsutil.NewAggregate(errs) + return nil } func getAPIEndpointFromPodAnnotation(client clientset.Interface, nodeName string, apiEndpoint *kubeadmapi.APIEndpoint, diff --git a/cmd/kubeadm/app/util/config/cluster_test.go b/cmd/kubeadm/app/util/config/cluster_test.go index 94aa9917c93e0..41329eee4588b 100644 --- a/cmd/kubeadm/app/util/config/cluster_test.go +++ b/cmd/kubeadm/app/util/config/cluster_test.go @@ -491,13 +491,14 @@ func TestGetInitConfigurationFromCluster(t *testing.T) { defer os.RemoveAll(tmpdir) var tests = []struct { - name string - fileContents []byte - node *v1.Node - staticPods []testresources.FakeStaticPod - configMaps []testresources.FakeConfigMap - newControlPlane bool - expectedError bool + name string + fileContents []byte + node *v1.Node + staticPods []testresources.FakeStaticPod + configMaps []testresources.FakeConfigMap + getNodeRegistration bool + getAPIEndpoint bool + expectedError bool }{ { name: "invalid - No kubeadm-config ConfigMap", @@ -556,6 +557,8 @@ func TestGetInitConfigurationFromCluster(t *testing.T) { Taints: []v1.Taint{kubeadmconstants.ControlPlaneTaint}, }, }, + getNodeRegistration: true, + getAPIEndpoint: true, }, { name: "valid v1beta3 - new control plane == true", // InitConfiguration composed with data from different places, without node specific information @@ -588,7 +591,8 @@ func TestGetInitConfigurationFromCluster(t *testing.T) { }, }, }, - newControlPlane: true, + getNodeRegistration: false, + getAPIEndpoint: false, }, } @@ -629,7 +633,8 @@ func TestGetInitConfigurationFromCluster(t *testing.T) { } } - cfg, err := getInitConfigurationFromCluster(tmpdir, client, rt.newControlPlane, false) + getComponentConfigs := true + cfg, err := getInitConfigurationFromCluster(tmpdir, client, rt.getNodeRegistration, rt.getAPIEndpoint, getComponentConfigs) if rt.expectedError != (err != nil) { t.Errorf("unexpected return err from getInitConfigurationFromCluster: %v", err) return @@ -649,13 +654,13 @@ func TestGetInitConfigurationFromCluster(t *testing.T) { if cfg.NodeRegistration.ImagePullPolicy != kubeadmapiv1.DefaultImagePullPolicy { t.Errorf("invalid cfg.NodeRegistration.ImagePullPolicy %v", cfg.NodeRegistration.ImagePullPolicy) } - if !rt.newControlPlane && (cfg.LocalAPIEndpoint.AdvertiseAddress != "1.2.3.4" || cfg.LocalAPIEndpoint.BindPort != 1234) { + if rt.getNodeRegistration && rt.getAPIEndpoint && (cfg.LocalAPIEndpoint.AdvertiseAddress != "1.2.3.4" || cfg.LocalAPIEndpoint.BindPort != 1234) { t.Errorf("invalid cfg.LocalAPIEndpoint: %v", cfg.LocalAPIEndpoint) } - if !rt.newControlPlane && (cfg.NodeRegistration.Name != nodeName || cfg.NodeRegistration.CRISocket != "myCRIsocket" || len(cfg.NodeRegistration.Taints) != 1) { + if rt.getNodeRegistration && (cfg.NodeRegistration.Name != nodeName || cfg.NodeRegistration.CRISocket != "myCRIsocket" || len(cfg.NodeRegistration.Taints) != 1) { t.Errorf("invalid cfg.NodeRegistration: %v", cfg.NodeRegistration) } - if rt.newControlPlane && len(cfg.NodeRegistration.CRISocket) > 0 { + if !rt.getNodeRegistration && len(cfg.NodeRegistration.CRISocket) > 0 { t.Errorf("invalid cfg.NodeRegistration.CRISocket: expected empty CRISocket, but got %v", cfg.NodeRegistration.CRISocket) } if _, ok := cfg.ComponentConfigs[componentconfigs.KubeletGroup]; !ok { diff --git a/cmd/kubeadm/app/util/config/initconfiguration.go b/cmd/kubeadm/app/util/config/initconfiguration.go index 8203edaa3ca8a..94bb650c4dcbf 100644 --- a/cmd/kubeadm/app/util/config/initconfiguration.go +++ b/cmd/kubeadm/app/util/config/initconfiguration.go @@ -380,6 +380,11 @@ func documentMapToInitConfiguration(gvkmap kubeadmapi.DocumentMap, allowDeprecat // If ClusterConfiguration was given, populate it in the InitConfiguration struct if clustercfg != nil { initcfg.ClusterConfiguration = *clustercfg + + // TODO: Workaround for missing v1beta3 ClusterConfiguration timeout conversion. Remove this conversion once the v1beta3 is removed + if clustercfg.APIServer.TimeoutForControlPlane.Duration != 0 && clustercfg.APIServer.TimeoutForControlPlane.Duration != kubeadmconstants.ControlPlaneComponentHealthCheckTimeout { + initcfg.Timeouts.ControlPlaneComponentHealthCheck.Duration = clustercfg.APIServer.TimeoutForControlPlane.Duration + } } else { // Populate the internal InitConfiguration.ClusterConfiguration with defaults extclustercfg := &kubeadmapiv1.ClusterConfiguration{} diff --git a/cmd/kubeadm/app/util/dryrun/dryrun.go b/cmd/kubeadm/app/util/dryrun/dryrun.go index 2d1adff724447..a8ea57be902d2 100644 --- a/cmd/kubeadm/app/util/dryrun/dryrun.go +++ b/cmd/kubeadm/app/util/dryrun/dryrun.go @@ -19,8 +19,10 @@ package dryrun import ( "fmt" "io" + "net" "os" "path/filepath" + "strconv" "time" v1 "k8s.io/api/core/v1" @@ -103,7 +105,11 @@ func (w *Waiter) WaitForPodsWithLabel(kvLabel string) error { // WaitForKubelet blocks until the kubelet /healthz endpoint returns 'ok' func (w *Waiter) WaitForKubelet(healthzAddress string, healthzPort int32) error { - fmt.Printf("[dryrun] Would make sure the kubelet returns 'ok' at http://%s:%d/healthz\n", healthzAddress, healthzPort) + var ( + addrPort = net.JoinHostPort(healthzAddress, strconv.Itoa(int(healthzPort))) + healthzEndpoint = fmt.Sprintf("http://%s/healthz", addrPort) + ) + fmt.Printf("[dryrun] Would make sure the kubelet returns 'ok' at %s\n", healthzEndpoint) return nil } diff --git a/cmd/kubeadm/app/util/runtime/runtime.go b/cmd/kubeadm/app/util/runtime/runtime.go index 851af6f844a28..826330cda9421 100644 --- a/cmd/kubeadm/app/util/runtime/runtime.go +++ b/cmd/kubeadm/app/util/runtime/runtime.go @@ -42,6 +42,7 @@ var defaultKnownCRISockets = []string{ // ContainerRuntime is an interface for working with container runtimes type ContainerRuntime interface { Connect() error + Close() SetImpl(impl) IsRunning() error ListKubeContainers() ([]string, error) @@ -93,6 +94,20 @@ func (runtime *CRIRuntime) Connect() error { return nil } +// Close closes the connections to the runtime and image services. +func (runtime *CRIRuntime) Close() { + if runtime.runtimeService != nil { + if err := runtime.runtimeService.Close(); err != nil { + klog.Warningf("failed to close runtime service: %v", err) + } + } + if runtime.imageService != nil { + if err := runtime.imageService.Close(); err != nil { + klog.Warningf("failed to close image service: %v", err) + } + } +} + // IsRunning checks if runtime is running. func (runtime *CRIRuntime) IsRunning() error { ctx, cancel := defaultContext() diff --git a/cmd/kubeadm/app/util/staticpod/utils.go b/cmd/kubeadm/app/util/staticpod/utils.go index 5b70cb89c35b6..1461b5e985018 100644 --- a/cmd/kubeadm/app/util/staticpod/utils.go +++ b/cmd/kubeadm/app/util/staticpod/utils.go @@ -27,7 +27,6 @@ import ( "os" "sort" "strings" - "sync" "github.com/pmezard/go-difflib/difflib" @@ -43,7 +42,6 @@ import ( kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util" "k8s.io/kubernetes/cmd/kubeadm/app/util/errors" "k8s.io/kubernetes/cmd/kubeadm/app/util/patches" - "k8s.io/kubernetes/cmd/kubeadm/app/util/users" ) const ( @@ -54,11 +52,6 @@ const ( kubeSchedulerBindAddressArg = "bind-address" ) -var ( - usersAndGroups *users.UsersAndGroups - usersAndGroupsOnce sync.Once -) - // ComponentPod returns a Pod object from the container, volume and annotations specifications func ComponentPod(container v1.Container, volumes map[string]v1.Volume, annotations map[string]string) v1.Pod { // priority value for system-node-critical class @@ -418,16 +411,6 @@ func getProbeAddress(addr string) string { return addr } -// GetUsersAndGroups returns the local usersAndGroups, but first creates it -// in a thread safe way once. -func GetUsersAndGroups() (*users.UsersAndGroups, error) { - var err error - usersAndGroupsOnce.Do(func() { - usersAndGroups, err = users.AddUsersAndGroups() - }) - return usersAndGroups, err -} - // DeepHashObject writes specified object to hash using the spew library // which follows pointers and prints actual values of the nested objects // ensuring the hash does not change when a pointer changes. @@ -436,3 +419,18 @@ func DeepHashObject(hasher hash.Hash, objectToWrite interface{}) { hasher.Reset() fmt.Fprintf(hasher, "%v", dump.ForHash(objectToWrite)) } + +// IsControlPlaneNode returns true if the kube-apiserver static pod manifest is present +// on the host. +func IsControlPlaneNode() bool { + isControlPlaneNode := true + + filepath := kubeadmconstants.GetStaticPodFilepath(kubeadmconstants.KubeAPIServer, + kubeadmconstants.GetStaticPodDirectory()) + + if _, err := os.Stat(filepath); os.IsNotExist(err) { + isControlPlaneNode = false + } + + return isControlPlaneNode +} diff --git a/cmd/kubeadm/app/util/staticpod/utils_linux.go b/cmd/kubeadm/app/util/staticpod/utils_linux.go deleted file mode 100644 index cdd371f1e7402..0000000000000 --- a/cmd/kubeadm/app/util/staticpod/utils_linux.go +++ /dev/null @@ -1,195 +0,0 @@ -//go:build linux -// +build linux - -/* -Copyright 2021 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 staticpod - -import ( - "fmt" - "path/filepath" - - v1 "k8s.io/api/core/v1" - "k8s.io/utils/ptr" - - kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" - kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" - certphase "k8s.io/kubernetes/cmd/kubeadm/app/phases/certs" - "k8s.io/kubernetes/cmd/kubeadm/app/util/errors" - "k8s.io/kubernetes/cmd/kubeadm/app/util/users" -) - -type pathOwnerAndPermissionsUpdaterFunc func(path string, uid, gid int64, perms uint32) error -type pathOwnerUpdaterFunc func(path string, uid, gid int64) error - -// RunComponentAsNonRoot updates the pod manifest and the hostVolume permissions to run as non root. -func RunComponentAsNonRoot(componentName string, pod *v1.Pod, usersAndGroups *users.UsersAndGroups, cfg *kubeadmapi.ClusterConfiguration) error { - switch componentName { - case kubeadmconstants.KubeAPIServer: - return runKubeAPIServerAsNonRoot( - pod, - usersAndGroups.Users.ID(kubeadmconstants.KubeAPIServerUserName), - usersAndGroups.Groups.ID(kubeadmconstants.KubeAPIServerUserName), - usersAndGroups.Groups.ID(kubeadmconstants.ServiceAccountKeyReadersGroupName), - users.UpdatePathOwnerAndPermissions, - cfg, - ) - case kubeadmconstants.KubeControllerManager: - return runKubeControllerManagerAsNonRoot( - pod, - usersAndGroups.Users.ID(kubeadmconstants.KubeControllerManagerUserName), - usersAndGroups.Groups.ID(kubeadmconstants.KubeControllerManagerUserName), - usersAndGroups.Groups.ID(kubeadmconstants.ServiceAccountKeyReadersGroupName), - users.UpdatePathOwnerAndPermissions, - cfg, - ) - case kubeadmconstants.KubeScheduler: - return runKubeSchedulerAsNonRoot( - pod, - usersAndGroups.Users.ID(kubeadmconstants.KubeSchedulerUserName), - usersAndGroups.Groups.ID(kubeadmconstants.KubeSchedulerUserName), - users.UpdatePathOwnerAndPermissions, - ) - case kubeadmconstants.Etcd: - return runEtcdAsNonRoot( - pod, - usersAndGroups.Users.ID(kubeadmconstants.EtcdUserName), - usersAndGroups.Groups.ID(kubeadmconstants.EtcdUserName), - users.UpdatePathOwnerAndPermissions, - users.UpdatePathOwner, - cfg, - ) - } - return errors.New(fmt.Sprintf("component name %q is not valid", componentName)) -} - -// runKubeAPIServerAsNonRoot updates the pod manifest and the hostVolume permissions to run kube-apiserver as non root. -func runKubeAPIServerAsNonRoot(pod *v1.Pod, runAsUser, runAsGroup, supplementalGroup *int64, updatePathOwnerAndPermissions pathOwnerAndPermissionsUpdaterFunc, cfg *kubeadmapi.ClusterConfiguration) error { - saPublicKeyFile := filepath.Join(cfg.CertificatesDir, kubeadmconstants.ServiceAccountPublicKeyName) - if err := updatePathOwnerAndPermissions(saPublicKeyFile, *runAsUser, *runAsGroup, 0600); err != nil { - return err - } - saPrivateKeyFile := filepath.Join(cfg.CertificatesDir, kubeadmconstants.ServiceAccountPrivateKeyName) - if err := updatePathOwnerAndPermissions(saPrivateKeyFile, 0, *supplementalGroup, 0640); err != nil { - return err - } - apiServerKeyFile := filepath.Join(cfg.CertificatesDir, kubeadmconstants.APIServerKeyName) - if err := updatePathOwnerAndPermissions(apiServerKeyFile, *runAsUser, *runAsGroup, 0600); err != nil { - return err - } - apiServerKubeletClientKeyFile := filepath.Join(cfg.CertificatesDir, kubeadmconstants.APIServerKubeletClientKeyName) - if err := updatePathOwnerAndPermissions(apiServerKubeletClientKeyFile, *runAsUser, *runAsGroup, 0600); err != nil { - return err - } - frontProxyClientKeyName := filepath.Join(cfg.CertificatesDir, kubeadmconstants.FrontProxyClientKeyName) - if err := updatePathOwnerAndPermissions(frontProxyClientKeyName, *runAsUser, *runAsGroup, 0600); err != nil { - return err - } - if cfg.Etcd.External == nil { - apiServerEtcdClientKeyFile := filepath.Join(cfg.CertificatesDir, kubeadmconstants.APIServerEtcdClientKeyName) - if err := updatePathOwnerAndPermissions(apiServerEtcdClientKeyFile, *runAsUser, *runAsGroup, 0600); err != nil { - return err - } - } - pod.Spec.Containers[0].SecurityContext = &v1.SecurityContext{ - Capabilities: &v1.Capabilities{ - // We drop all capabilities that are added by default. - Drop: []v1.Capability{"ALL"}, - // kube-apiserver binary has the file capability cap_net_bind_service applied to it. - // This means that we must add this capability when running as non-root even if the - // capability is not required. - Add: []v1.Capability{"NET_BIND_SERVICE"}, - }, - } - pod.Spec.SecurityContext.RunAsGroup = runAsGroup - pod.Spec.SecurityContext.RunAsUser = runAsUser - pod.Spec.SecurityContext.SupplementalGroups = []int64{*supplementalGroup} - return nil -} - -// runKubeControllerManagerAsNonRoot updates the pod manifest and the hostVolume permissions to run kube-controller-manager as non root. -func runKubeControllerManagerAsNonRoot(pod *v1.Pod, runAsUser, runAsGroup, supplementalGroup *int64, updatePathOwnerAndPermissions pathOwnerAndPermissionsUpdaterFunc, cfg *kubeadmapi.ClusterConfiguration) error { - kubeconfigFile := filepath.Join(kubeadmconstants.KubernetesDir, kubeadmconstants.ControllerManagerKubeConfigFileName) - if err := updatePathOwnerAndPermissions(kubeconfigFile, *runAsUser, *runAsGroup, 0600); err != nil { - return err - } - saPrivateKeyFile := filepath.Join(cfg.CertificatesDir, kubeadmconstants.ServiceAccountPrivateKeyName) - if err := updatePathOwnerAndPermissions(saPrivateKeyFile, 0, *supplementalGroup, 0640); err != nil { - return err - } - if res, _ := certphase.UsingExternalCA(cfg); !res { - caKeyFile := filepath.Join(cfg.CertificatesDir, kubeadmconstants.CAKeyName) - err := updatePathOwnerAndPermissions(caKeyFile, *runAsUser, *runAsGroup, 0600) - if err != nil { - return err - } - } - pod.Spec.Containers[0].SecurityContext = &v1.SecurityContext{ - AllowPrivilegeEscalation: ptr.To(false), - Capabilities: &v1.Capabilities{ - // We drop all capabilities that are added by default. - Drop: []v1.Capability{"ALL"}, - }, - } - pod.Spec.SecurityContext.RunAsUser = runAsUser - pod.Spec.SecurityContext.RunAsGroup = runAsGroup - pod.Spec.SecurityContext.SupplementalGroups = []int64{*supplementalGroup} - return nil -} - -// runKubeSchedulerAsNonRoot updates the pod manifest and the hostVolume permissions to run kube-scheduler as non root. -func runKubeSchedulerAsNonRoot(pod *v1.Pod, runAsUser, runAsGroup *int64, updatePathOwnerAndPermissions pathOwnerAndPermissionsUpdaterFunc) error { - kubeconfigFile := filepath.Join(kubeadmconstants.KubernetesDir, kubeadmconstants.SchedulerKubeConfigFileName) - if err := updatePathOwnerAndPermissions(kubeconfigFile, *runAsUser, *runAsGroup, 0600); err != nil { - return err - } - pod.Spec.Containers[0].SecurityContext = &v1.SecurityContext{ - AllowPrivilegeEscalation: ptr.To(false), - // We drop all capabilities that are added by default. - Capabilities: &v1.Capabilities{ - Drop: []v1.Capability{"ALL"}, - }, - } - pod.Spec.SecurityContext.RunAsUser = runAsUser - pod.Spec.SecurityContext.RunAsGroup = runAsGroup - return nil -} - -// runEtcdAsNonRoot updates the pod manifest and the hostVolume permissions to run etcd as non root. -func runEtcdAsNonRoot(pod *v1.Pod, runAsUser, runAsGroup *int64, updatePathOwnerAndPermissions pathOwnerAndPermissionsUpdaterFunc, updatePathOwner pathOwnerUpdaterFunc, cfg *kubeadmapi.ClusterConfiguration) error { - if err := updatePathOwner(cfg.Etcd.Local.DataDir, *runAsUser, *runAsGroup); err != nil { - return err - } - etcdServerKeyFile := filepath.Join(cfg.CertificatesDir, kubeadmconstants.EtcdServerKeyName) - if err := updatePathOwnerAndPermissions(etcdServerKeyFile, *runAsUser, *runAsGroup, 0600); err != nil { - return err - } - etcdPeerKeyFile := filepath.Join(cfg.CertificatesDir, kubeadmconstants.EtcdPeerKeyName) - if err := updatePathOwnerAndPermissions(etcdPeerKeyFile, *runAsUser, *runAsGroup, 0600); err != nil { - return err - } - pod.Spec.Containers[0].SecurityContext = &v1.SecurityContext{ - AllowPrivilegeEscalation: ptr.To(false), - // We drop all capabilities that are added by default. - Capabilities: &v1.Capabilities{ - Drop: []v1.Capability{"ALL"}, - }, - } - pod.Spec.SecurityContext.RunAsUser = runAsUser - pod.Spec.SecurityContext.RunAsGroup = runAsGroup - return nil -} diff --git a/cmd/kubeadm/app/util/staticpod/utils_linux_test.go b/cmd/kubeadm/app/util/staticpod/utils_linux_test.go deleted file mode 100644 index 29a3e675e1ea9..0000000000000 --- a/cmd/kubeadm/app/util/staticpod/utils_linux_test.go +++ /dev/null @@ -1,168 +0,0 @@ -//go:build linux -// +build linux - -/* -Copyright 2021 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 staticpod - -import ( - "path/filepath" - "reflect" - "testing" - - v1 "k8s.io/api/core/v1" - "k8s.io/utils/ptr" - - "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" - kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" -) - -type ownerAndPermissions struct { - uid int64 - gid int64 - permissions uint32 -} - -func verifyPodSecurityContext(t *testing.T, pod *v1.Pod, wantRunAsUser, wantRunAsGroup int64, wantSupGroup []int64) { - t.Helper() - wantPodSecurityContext := &v1.PodSecurityContext{ - RunAsUser: ptr.To(wantRunAsUser), - RunAsGroup: ptr.To(wantRunAsGroup), - SupplementalGroups: wantSupGroup, - SeccompProfile: &v1.SeccompProfile{ - Type: v1.SeccompProfileTypeRuntimeDefault, - }, - } - if !reflect.DeepEqual(wantPodSecurityContext, pod.Spec.SecurityContext) { - t.Errorf("unexpected diff in PodSecurityContext, want: %+v, got: %+v", wantPodSecurityContext, pod.Spec.SecurityContext) - } -} - -func verifyContainerSecurityContext(t *testing.T, container v1.Container, addCaps, dropCaps []v1.Capability, allowPrivielege *bool) { - t.Helper() - wantContainerSecurityContext := &v1.SecurityContext{ - AllowPrivilegeEscalation: allowPrivielege, - Capabilities: &v1.Capabilities{ - Add: addCaps, - Drop: dropCaps, - }, - } - if !reflect.DeepEqual(wantContainerSecurityContext, container.SecurityContext) { - t.Errorf("unexpected diff in container SecurityContext, want: %+v, got: %+v", wantContainerSecurityContext, container.SecurityContext) - } -} - -func verifyFilePermissions(t *testing.T, updatedFiles, wantFiles map[string]ownerAndPermissions) { - t.Helper() - if !reflect.DeepEqual(updatedFiles, wantFiles) { - t.Errorf("unexpected diff in file owners and permissions want: %+v, got: %+v", wantFiles, updatedFiles) - } -} - -func TestRunKubeAPIServerAsNonRoot(t *testing.T) { - cfg := &kubeadm.ClusterConfiguration{} - pod := ComponentPod(v1.Container{Name: "kube-apiserver"}, nil, nil) - var runAsUser, runAsGroup, supGroup int64 = 1000, 1001, 1002 - updatedFiles := map[string]ownerAndPermissions{} - if err := runKubeAPIServerAsNonRoot(&pod, &runAsUser, &runAsGroup, &supGroup, func(path string, uid, gid int64, perms uint32) error { - updatedFiles[path] = ownerAndPermissions{uid: uid, gid: gid, permissions: perms} - return nil - }, cfg); err != nil { - t.Fatal(err) - } - verifyPodSecurityContext(t, &pod, runAsUser, runAsGroup, []int64{supGroup}) - verifyContainerSecurityContext(t, pod.Spec.Containers[0], []v1.Capability{"NET_BIND_SERVICE"}, []v1.Capability{"ALL"}, nil) - wantUpdateFiles := map[string]ownerAndPermissions{ - filepath.Join(cfg.CertificatesDir, kubeadmconstants.ServiceAccountPublicKeyName): {uid: runAsUser, gid: runAsGroup, permissions: 0600}, - filepath.Join(cfg.CertificatesDir, kubeadmconstants.ServiceAccountPrivateKeyName): {uid: 0, gid: supGroup, permissions: 0640}, - filepath.Join(cfg.CertificatesDir, kubeadmconstants.APIServerKeyName): {uid: runAsUser, gid: runAsGroup, permissions: 0600}, - filepath.Join(cfg.CertificatesDir, kubeadmconstants.APIServerKubeletClientKeyName): {uid: runAsUser, gid: runAsGroup, permissions: 0600}, - filepath.Join(cfg.CertificatesDir, kubeadmconstants.FrontProxyClientKeyName): {uid: runAsUser, gid: runAsGroup, permissions: 0600}, - filepath.Join(cfg.CertificatesDir, kubeadmconstants.APIServerEtcdClientKeyName): {uid: runAsUser, gid: runAsGroup, permissions: 0600}, - } - verifyFilePermissions(t, updatedFiles, wantUpdateFiles) -} - -func TestRunKubeControllerManagerAsNonRoot(t *testing.T) { - cfg := &kubeadm.ClusterConfiguration{} - pod := ComponentPod(v1.Container{Name: "kube-controller-manager"}, nil, nil) - var runAsUser, runAsGroup, supGroup int64 = 1000, 1001, 1002 - updatedFiles := map[string]ownerAndPermissions{} - if err := runKubeControllerManagerAsNonRoot(&pod, &runAsUser, &runAsGroup, &supGroup, func(path string, uid, gid int64, perms uint32) error { - updatedFiles[path] = ownerAndPermissions{uid: uid, gid: gid, permissions: perms} - return nil - }, cfg); err != nil { - t.Fatal(err) - } - verifyPodSecurityContext(t, &pod, runAsUser, runAsGroup, []int64{supGroup}) - verifyContainerSecurityContext(t, pod.Spec.Containers[0], nil, []v1.Capability{"ALL"}, ptr.To(false)) - wantUpdateFiles := map[string]ownerAndPermissions{ - filepath.Join(kubeadmconstants.KubernetesDir, kubeadmconstants.ControllerManagerKubeConfigFileName): {uid: runAsUser, gid: runAsGroup, permissions: 0600}, - filepath.Join(cfg.CertificatesDir, kubeadmconstants.ServiceAccountPrivateKeyName): {uid: 0, gid: supGroup, permissions: 0640}, - filepath.Join(cfg.CertificatesDir, kubeadmconstants.CAKeyName): {uid: runAsUser, gid: runAsGroup, permissions: 0600}, - } - verifyFilePermissions(t, updatedFiles, wantUpdateFiles) -} - -func TestRunKubeSchedulerAsNonRoot(t *testing.T) { - pod := ComponentPod(v1.Container{Name: "kube-scheduler"}, nil, nil) - var runAsUser, runAsGroup int64 = 1000, 1001 - updatedFiles := map[string]ownerAndPermissions{} - if err := runKubeSchedulerAsNonRoot(&pod, &runAsUser, &runAsGroup, func(path string, uid, gid int64, perms uint32) error { - updatedFiles[path] = ownerAndPermissions{uid: uid, gid: gid, permissions: perms} - return nil - }); err != nil { - t.Fatal(err) - } - verifyPodSecurityContext(t, &pod, runAsUser, runAsGroup, nil) - verifyContainerSecurityContext(t, pod.Spec.Containers[0], nil, []v1.Capability{"ALL"}, ptr.To(false)) - wantUpdateFiles := map[string]ownerAndPermissions{ - filepath.Join(kubeadmconstants.KubernetesDir, kubeadmconstants.SchedulerKubeConfigFileName): {uid: runAsUser, gid: runAsGroup, permissions: 0600}, - } - verifyFilePermissions(t, updatedFiles, wantUpdateFiles) -} - -func TestRunEtcdAsNonRoot(t *testing.T) { - cfg := &kubeadm.ClusterConfiguration{ - Etcd: kubeadm.Etcd{ - Local: &kubeadm.LocalEtcd{ - DataDir: "/var/lib/etcd/data", - }, - }, - } - pod := ComponentPod(v1.Container{Name: "etcd"}, nil, nil) - var runAsUser, runAsGroup int64 = 1000, 1001 - updatedFiles := map[string]ownerAndPermissions{} - if err := runEtcdAsNonRoot(&pod, &runAsUser, &runAsGroup, func(path string, uid, gid int64, perms uint32) error { - updatedFiles[path] = ownerAndPermissions{uid: uid, gid: gid, permissions: perms} - return nil - }, - func(path string, uid, gid int64) error { - updatedFiles[path] = ownerAndPermissions{uid: uid, gid: gid, permissions: 0700} - return nil - }, cfg); err != nil { - t.Fatal(err) - } - verifyPodSecurityContext(t, &pod, runAsUser, runAsGroup, nil) - verifyContainerSecurityContext(t, pod.Spec.Containers[0], nil, []v1.Capability{"ALL"}, ptr.To(false)) - wantUpdateFiles := map[string]ownerAndPermissions{ - cfg.Etcd.Local.DataDir: {uid: runAsUser, gid: runAsGroup, permissions: 0700}, - filepath.Join(cfg.CertificatesDir, kubeadmconstants.EtcdServerKeyName): {uid: runAsUser, gid: runAsGroup, permissions: 0600}, - filepath.Join(cfg.CertificatesDir, kubeadmconstants.EtcdPeerKeyName): {uid: runAsUser, gid: runAsGroup, permissions: 0600}, - } - verifyFilePermissions(t, updatedFiles, wantUpdateFiles) -} diff --git a/cmd/kubeadm/app/util/users/users_linux.go b/cmd/kubeadm/app/util/users/users_linux.go deleted file mode 100644 index 09308f98d83db..0000000000000 --- a/cmd/kubeadm/app/util/users/users_linux.go +++ /dev/null @@ -1,658 +0,0 @@ -//go:build linux -// +build linux - -/* -Copyright 2021 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 users - -import ( - "bytes" - "fmt" - "io" - "os" - "path/filepath" - "sort" - "strconv" - "strings" - "syscall" - "time" - - "k8s.io/klog/v2" - - "k8s.io/kubernetes/cmd/kubeadm/app/constants" - "k8s.io/kubernetes/cmd/kubeadm/app/util/errors" -) - -// EntryMap holds a map of user or group entries. -type EntryMap struct { - entries map[string]*entry -} - -// UsersAndGroups is a structure that holds entry maps of users and groups. -// It is returned by AddUsersAndGroups. -type UsersAndGroups struct { - // Users is an entry map of users. - Users *EntryMap - // Groups is an entry map of groups. - Groups *EntryMap -} - -// entry is a structure that holds information about a UNIX user or group. -// It partially conforms parsing of both users from /etc/passwd and groups from /etc/group. -type entry struct { - name string - id int64 - gid int64 - userNames []string - shell string -} - -// limits is used to hold information about the minimum and maximum system ranges for UID and GID. -type limits struct { - minUID, maxUID, minGID, maxGID int64 -} - -const ( - // These are constants used when parsing /etc/passwd or /etc/group in terms of how many - // fields and entry has. - totalFieldsGroup = 4 - totalFieldsUser = 7 - - // klogLevel holds the klog level to use for output. - klogLevel = 5 - - // noshell holds a path to a binary to disable shell login. - noshell = "/bin/false" - - // These are constants for the default system paths on Linux. - fileEtcLoginDefs = "/etc/login.defs" - fileEtcPasswd = "/etc/passwd" - fileEtcGroup = "/etc/group" -) - -var ( - // these entries hold the users and groups to create as defined in: - // https://git.k8s.io/enhancements/keps/sig-cluster-lifecycle/kubeadm/2568-kubeadm-non-root-control-plane - usersToCreateSpec = []*entry{ - {name: constants.EtcdUserName}, - {name: constants.KubeAPIServerUserName}, - {name: constants.KubeControllerManagerUserName}, - {name: constants.KubeSchedulerUserName}, - } - groupsToCreateSpec = []*entry{ - {name: constants.EtcdUserName, userNames: []string{constants.EtcdUserName}}, - {name: constants.KubeAPIServerUserName, userNames: []string{constants.KubeAPIServerUserName}}, - {name: constants.KubeControllerManagerUserName, userNames: []string{constants.KubeControllerManagerUserName}}, - {name: constants.KubeSchedulerUserName, userNames: []string{constants.KubeSchedulerUserName}}, - {name: constants.ServiceAccountKeyReadersGroupName, userNames: []string{constants.KubeAPIServerUserName, constants.KubeControllerManagerUserName}}, - } - - // defaultLimits holds the default limits in case values are missing in /etc/login.defs - defaultLimits = &limits{minUID: 100, maxUID: 999, minGID: 100, maxGID: 999} -) - -// ID returns the ID for an entry based on the entry name. -// In case of a user entry it returns the user UID. -// In case of a group entry it returns the group GID. -// It returns nil if no such entry exists. -func (u *EntryMap) ID(name string) *int64 { - entry, ok := u.entries[name] - if !ok { - return nil - } - id := entry.id - return &id -} - -// String converts an EntryMap object to a readable string. -func (u *EntryMap) String() string { - lines := make([]string, 0, len(u.entries)) - for k, e := range u.entries { - lines = append(lines, fmt.Sprintf("%s{%d,%d};", k, e.id, e.gid)) - } - sort.Strings(lines) - return strings.Join(lines, "") -} - -// AddUsersAndGroups is a public wrapper around addUsersAndGroupsImpl with default system file paths. -func AddUsersAndGroups() (*UsersAndGroups, error) { - return addUsersAndGroupsImpl(fileEtcLoginDefs, fileEtcPasswd, fileEtcGroup) -} - -// addUsersAndGroupsImpl adds the managed users and groups to the files specified -// by pathUsers and pathGroups. It uses the file specified with pathLoginDef to -// determine limits for UID and GID. If managed users and groups exist in these files -// validation is performed on them. The function returns a pointer to a Users object -// that can be used to return UID and GID of managed users. -func addUsersAndGroupsImpl(pathLoginDef, pathUsers, pathGroups string) (*UsersAndGroups, error) { - klog.V(1).Info("Adding managed users and groups") - klog.V(klogLevel).Infof("Parsing %q", pathLoginDef) - - // Read and parse /etc/login.def. Some distributions might be missing this file, which makes - // them non-standard. If an error occurs fallback to defaults by passing an empty string - // to parseLoginDefs(). - var loginDef string - f, close, err := openFileWithLock(pathLoginDef) - if err != nil { - klog.V(1).Infof("Could not open %q, using default system limits: %v", pathLoginDef, err) - } else { - loginDef, err = readFile(f) - if err != nil { - klog.V(1).Infof("Could not read %q, using default system limits: %v", pathLoginDef, err) - } - close() - } - limits, err := parseLoginDefs(loginDef) - if err != nil { - return nil, err - } - - klog.V(klogLevel).Infof("Using system UID/GID limits: %+v", limits) - klog.V(klogLevel).Infof("Parsing %q and %q", pathUsers, pathGroups) - - // Open /etc/passwd and /etc/group with locks. - fUsers, close, err := openFileWithLock(pathUsers) - if err != nil { - return nil, err - } - defer close() - fGroups, close, err := openFileWithLock(pathGroups) - if err != nil { - return nil, err - } - defer close() - - // Read the files. - fileUsers, err := readFile(fUsers) - if err != nil { - return nil, err - } - fileGroups, err := readFile(fGroups) - if err != nil { - return nil, err - } - - // Parse the files. - users, err := parseEntries(fileUsers, totalFieldsUser) - if err != nil { - return nil, errors.Wrapf(err, "could not parse %q", pathUsers) - } - groups, err := parseEntries(fileGroups, totalFieldsGroup) - if err != nil { - return nil, errors.Wrapf(err, "could not parse %q", pathGroups) - } - - klog.V(klogLevel).Info("Validating existing users and groups") - - // Validate for existing tracked entries based on limits. - usersToCreate, groupsToCreate, err := validateEntries(users, groups, limits) - if err != nil { - return nil, errors.Wrap(err, "error validating existing users and groups") - } - - // Allocate and assign IDs to users / groups. - allocUIDs, err := allocateIDs(users, limits.minUID, limits.maxUID, len(usersToCreate)) - if err != nil { - return nil, err - } - allocGIDs, err := allocateIDs(groups, limits.minGID, limits.maxGID, len(groupsToCreate)) - if err != nil { - return nil, err - } - if err := assignUserAndGroupIDs(groups, usersToCreate, groupsToCreate, allocUIDs, allocGIDs); err != nil { - return nil, err - } - - if len(usersToCreate) > 0 { - klog.V(klogLevel).Infof("Adding users: %s", entriesToString(usersToCreate)) - } - if len(groupsToCreate) > 0 { - klog.V(klogLevel).Infof("Adding groups: %s", entriesToString(groupsToCreate)) - } - - // Add users and groups. - fileUsers = addEntries(fileUsers, usersToCreate, createUser) - fileGroups = addEntries(fileGroups, groupsToCreate, createGroup) - - // Write the files. - klog.V(klogLevel).Infof("Writing %q and %q", pathUsers, pathGroups) - if err := writeFile(fUsers, fileUsers); err != nil { - return nil, err - } - if err := writeFile(fGroups, fileGroups); err != nil { - return nil, err - } - - // Prepare the maps of users and groups. - usersConcat := append(users, usersToCreate...) - mapUsers, err := entriesToEntryMap(usersConcat, usersToCreateSpec) - if err != nil { - return nil, err - } - groupsConcat := append(groups, groupsToCreate...) - mapGroups, err := entriesToEntryMap(groupsConcat, groupsToCreateSpec) - if err != nil { - return nil, err - } - return &UsersAndGroups{Users: mapUsers, Groups: mapGroups}, nil -} - -// RemoveUsersAndGroups is a public wrapper around removeUsersAndGroupsImpl with -// default system file paths. -func RemoveUsersAndGroups() error { - return removeUsersAndGroupsImpl(fileEtcPasswd, fileEtcGroup) -} - -// removeUsersAndGroupsImpl removes the managed users and groups from the files specified -// by pathUsers and pathGroups. -func removeUsersAndGroupsImpl(pathUsers, pathGroups string) error { - klog.V(1).Info("Removing managed users and groups") - klog.V(klogLevel).Infof("Opening %q and %q", pathUsers, pathGroups) - - // Open /etc/passwd and /etc/group. - fUsers, close, err := openFileWithLock(pathUsers) - if err != nil { - return err - } - defer close() - fGroups, close, err := openFileWithLock(pathGroups) - if err != nil { - return err - } - defer close() - - // Read the files. - fileUsers, err := readFile(fUsers) - if err != nil { - return err - } - fileGroups, err := readFile(fGroups) - if err != nil { - return err - } - - klog.V(klogLevel).Infof("Removing users: %s", entriesToString(usersToCreateSpec)) - klog.V(klogLevel).Infof("Removing groups: %s", entriesToString(groupsToCreateSpec)) - - // Delete users / groups. - fileUsers, _ = removeEntries(fileUsers, usersToCreateSpec) - fileGroups, _ = removeEntries(fileGroups, groupsToCreateSpec) - - klog.V(klogLevel).Infof("Writing %q and %q", pathUsers, pathGroups) - - // Write the files. - if err := writeFile(fUsers, fileUsers); err != nil { - return err - } - if err := writeFile(fGroups, fileGroups); err != nil { - return err - } - - return nil -} - -// parseLoginDefs can be used to parse an /etc/login.defs file and obtain system ranges for UID and GID. -// Passing an empty string will return the defaults. The defaults are 100-999 for both UID and GID. -func parseLoginDefs(file string) (*limits, error) { - l := *defaultLimits - if len(file) == 0 { - return &l, nil - } - var mapping = map[string]*int64{ - "SYS_UID_MIN": &l.minUID, - "SYS_UID_MAX": &l.maxUID, - "SYS_GID_MIN": &l.minGID, - "SYS_GID_MAX": &l.maxGID, - } - lines := strings.Split(file, "\n") - for i, line := range lines { - for k, v := range mapping { - // A line must start with one of the definitions - if !strings.HasPrefix(line, k) { - continue - } - line = strings.TrimPrefix(line, k) - line = strings.TrimSpace(line) - val, err := strconv.ParseInt(line, 10, 64) - if err != nil { - return nil, errors.Wrapf(err, "could not parse value for %s at line %d", k, i) - } - *v = val - } - } - return &l, nil -} - -// parseEntries can be used to parse an /etc/passwd or /etc/group file as their format is similar. -// It returns a slice of entries obtained from the file. -// https://www.cyberciti.biz/faq/understanding-etcpasswd-file-format/ -// https://www.cyberciti.biz/faq/understanding-etcgroup-file/ -func parseEntries(file string, totalFields int) ([]*entry, error) { - if totalFields != totalFieldsUser && totalFields != totalFieldsGroup { - return nil, errors.Errorf("unsupported total fields for entry parsing: %d", totalFields) - } - lines := strings.Split(file, "\n") - entries := []*entry{} - for i, line := range lines { - line = strings.TrimSpace(line) - if len(line) == 0 { - continue - } - fields := strings.Split(line, ":") - if len(fields) != totalFields { - return nil, errors.Errorf("entry must have %d fields separated by ':', "+ - "got %d at line %d: %s", totalFields, len(fields), i, line) - } - id, err := strconv.ParseInt(fields[2], 10, 64) - if err != nil { - return nil, errors.Wrapf(err, "error parsing id at line %d", i) - } - entry := &entry{name: fields[0], id: id} - if totalFields == totalFieldsGroup { - entry.userNames = strings.Split(fields[3], ",") - } else { - gid, err := strconv.ParseInt(fields[3], 10, 64) - if err != nil { - return nil, errors.Wrapf(err, "error parsing GID at line %d", i) - } - entry.gid = gid - entry.shell = fields[6] - } - entries = append(entries, entry) - } - return entries, nil -} - -// validateEntries takes user and group entries and validates if these entries are valid based on limits, -// mapping between users and groups and specs. Returns slices of missing user and group entries that must be created. -// Returns an error if existing users and groups do not match requirements. -func validateEntries(users, groups []*entry, limits *limits) ([]*entry, []*entry, error) { - u := []*entry{} - g := []*entry{} - // Validate users - for _, uc := range usersToCreateSpec { - for _, user := range users { - if uc.name != user.name { - continue - } - // Found existing user - if user.id < limits.minUID || user.id > limits.maxUID { - return nil, nil, errors.Errorf("UID %d for user %q is outside the system UID range: %d - %d", - user.id, user.name, limits.minUID, limits.maxUID) - } - if user.shell != noshell { - return nil, nil, errors.Errorf("user %q has unexpected shell %q; expected %q", - user.name, user.shell, noshell) - } - for _, g := range groups { - if g.id != user.gid { - continue - } - // Found matching group GID for user GID - if g.name != uc.name { - return nil, nil, errors.Errorf("user %q has GID %d but the group with that GID is not named %q", - uc.name, g.id, uc.name) - } - goto skipUser // Valid group GID and name; skip - } - return nil, nil, errors.Errorf("could not find group with GID %d for user %q", user.gid, user.name) - } - u = append(u, uc) - skipUser: - } - // validate groups - for _, gc := range groupsToCreateSpec { - for _, group := range groups { - if gc.name != group.name { - continue - } - if group.id < limits.minGID || group.id > limits.maxGID { - return nil, nil, errors.Errorf("GID %d for user %q is outside the system UID range: %d - %d", - group.id, group.name, limits.minGID, limits.maxGID) - } - u1 := strings.Join(gc.userNames, ",") - u2 := strings.Join(group.userNames, ",") - if u1 != u2 { - return nil, nil, errors.Errorf("expected users %q for group %q; got %q", - u1, gc.name, u2) - } - goto skipGroup // group has valid users; skip - } - g = append(g, gc) - skipGroup: - } - return u, g, nil -} - -// allocateIDs takes a list of entries and based on minimum and maximum ID allocates a "total" of IDs. -func allocateIDs(entries []*entry, min, max int64, total int) ([]int64, error) { - if total == 0 { - return []int64{}, nil - } - ids := make([]int64, 0, total) - for i := min; i < max+1; i++ { - i64 := int64(i) - for _, e := range entries { - if i64 == e.id { - goto continueLoop - } - } - ids = append(ids, i64) - if len(ids) == total { - return ids, nil - } - continueLoop: - } - return nil, errors.Errorf("could not allocate %d IDs based on existing entries in the range: %d - %d", - total, min, max) -} - -// addEntries takes /etc/passwd or /etc/group file content and appends entries to it based -// on a createEntry function. Returns the updated contents of the file. -func addEntries(file string, entries []*entry, createEntry func(*entry) string) string { - out := file - newLines := make([]string, 0, len(entries)) - for _, e := range entries { - newLines = append(newLines, createEntry(e)) - } - newLinesStr := "" - if len(newLines) > 0 { - if !strings.HasSuffix(out, "\n") { // Append a new line if its missing. - newLinesStr = "\n" - } - newLinesStr += strings.Join(newLines, "\n") + "\n" - } - return out + newLinesStr -} - -// removeEntries takes /etc/passwd or /etc/group file content and deletes entries from them -// by name matching. Returns the updated contents of the file and the number of entries removed. -func removeEntries(file string, entries []*entry) (string, int) { - lines := strings.Split(file, "\n") - total := len(lines) - len(entries) - if total < 0 { - total = 0 - } - newLines := make([]string, 0, total) - removed := 0 - for _, line := range lines { - for _, entry := range entries { - if strings.HasPrefix(line, entry.name+":") { - removed++ - goto continueLoop - } - } - newLines = append(newLines, line) - continueLoop: - } - return strings.Join(newLines, "\n"), removed -} - -// assignUserAndGroupIDs takes the list of existing groups, the users and groups to be created, -// and assigns UIDs and GIDs to the users and groups to be created based on a list of provided UIDs and GIDs. -// Returns an error if not enough UIDs or GIDs are passed. It does not perform any other validation. -func assignUserAndGroupIDs(groups, usersToCreate, groupsToCreate []*entry, uids, gids []int64) error { - if len(gids) < len(groupsToCreate) { - return errors.Errorf("not enough GIDs to assign to groups: have %d, want %d", len(gids), len(groupsToCreate)) - } - if len(uids) < len(usersToCreate) { - return errors.Errorf("not enough UIDs to assign to users: have %d, want %d", len(uids), len(usersToCreate)) - } - for i := range groupsToCreate { - groupsToCreate[i].id = gids[i] - } - // Concat the list of old and new groups to find a matching GID. - groupsConcat := append([]*entry{}, groups...) - groupsConcat = append(groupsConcat, groupsToCreate...) - for i := range usersToCreate { - usersToCreate[i].id = uids[i] - for _, g := range groupsConcat { - if usersToCreate[i].name == g.name { - usersToCreate[i].gid = g.id - break - } - } - } - return nil -} - -// createGroup is a helper function to produce a group from entry. -func createGroup(e *entry) string { - return fmt.Sprintf("%s:x:%d:%s", e.name, e.id, strings.Join(e.userNames, ",")) -} - -// createUser is a helper function to produce a user from entry. -func createUser(e *entry) string { - return fmt.Sprintf("%s:x:%d:%d:::/bin/false", e.name, e.id, e.gid) -} - -// entriesToEntryMap takes a list of entries and prepares an EntryMap object. -func entriesToEntryMap(entries, spec []*entry) (*EntryMap, error) { - m := map[string]*entry{} - for _, spec := range spec { - for _, e := range entries { - if spec.name == e.name { - entry := *e - m[e.name] = &entry - goto continueLoop - } - } - return nil, errors.Errorf("could not find entry %q in the list", spec.name) - continueLoop: - } - return &EntryMap{entries: m}, nil -} - -// entriesToString is a utility to convert a list of entries to string. -func entriesToString(entries []*entry) string { - lines := make([]string, 0, len(entries)) - for _, e := range entries { - lines = append(lines, e.name) - } - sort.Strings(lines) - return strings.Join(lines, ",") -} - -// openFileWithLock opens the file at path by acquiring an exclusive write lock. -// The returned close() function should be called to release the lock and close the file. -// If a lock cannot be obtained the function fails after a period of time. -func openFileWithLock(path string) (f *os.File, close func(), err error) { - f, err = os.OpenFile(path, os.O_RDWR, os.ModePerm) - if err != nil { - return nil, nil, err - } - deadline := time.Now().Add(time.Second * 5) - for { - // If another process is holding a write lock, this call will exit - // with an error. F_SETLK is used instead of F_SETLKW to avoid - // the case where a runaway process grabs the exclusive lock and - // blocks this call indefinitely. - // https://man7.org/linux/man-pages/man2/fcntl.2.html - lock := syscall.Flock_t{Type: syscall.F_WRLCK} - if err = syscall.FcntlFlock(f.Fd(), syscall.F_SETLK, &lock); err == nil { - break - } - time.Sleep(200 * time.Millisecond) - if time.Now().After(deadline) { - err = errors.Wrapf(err, "timeout attempting to obtain lock on file %q", path) - break - } - } - if err != nil { - f.Close() - return nil, nil, err - } - close = func() { - // This function should be called once operations with the file are finished. - // It unlocks the file and closes it. - unlock := syscall.Flock_t{Type: syscall.F_UNLCK} - syscall.FcntlFlock(f.Fd(), syscall.F_SETLK, &unlock) - f.Close() - } - return f, close, nil -} - -// readFile reads a File into a string. -func readFile(f *os.File) (string, error) { - buf := bytes.NewBuffer(nil) - if _, err := f.Seek(0, io.SeekStart); err != nil { - return "", err - } - if _, err := io.Copy(buf, f); err != nil { - return "", err - } - return buf.String(), nil -} - -// writeFile writes a string to a File. -func writeFile(f *os.File, str string) error { - if _, err := f.Seek(0, io.SeekStart); err != nil { - return err - } - if _, err := f.Write([]byte(str)); err != nil { - return err - } - if err := f.Truncate(int64(len(str))); err != nil { - return err - } - return nil -} - -// UpdatePathOwnerAndPermissions updates the owner and permissions of the given path. -// If the path is a directory it is not recursively updated. -func UpdatePathOwnerAndPermissions(path string, uid, gid int64, perms uint32) error { - if err := os.Chown(path, int(uid), int(gid)); err != nil { - return errors.Wrapf(err, "failed to update owner of %q to uid: %d and gid: %d", path, uid, gid) - } - fm := os.FileMode(perms) - if err := os.Chmod(path, fm); err != nil { - return errors.Wrapf(err, "failed to update permissions of %q to %s", path, fm.String()) - } - return nil -} - -// UpdatePathOwner recursively updates the owners of a directory. -// It is equivalent to calling `chown -R uid:gid /path/to/dir`. -func UpdatePathOwner(dirPath string, uid, gid int64) error { - err := filepath.WalkDir(dirPath, func(path string, d os.DirEntry, err error) error { - if err := os.Chown(path, int(uid), int(gid)); err != nil { - return errors.Wrapf(err, "failed to update owner of %q to uid: %d and gid: %d", path, uid, gid) - } - return nil - }) - return err -} diff --git a/cmd/kubeadm/app/util/users/users_linux_test.go b/cmd/kubeadm/app/util/users/users_linux_test.go deleted file mode 100644 index e0c1368ba0527..0000000000000 --- a/cmd/kubeadm/app/util/users/users_linux_test.go +++ /dev/null @@ -1,593 +0,0 @@ -//go:build linux -// +build linux - -/* -Copyright 2021 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 users - -import ( - "os" - "reflect" - "testing" -) - -func TestParseLoginDef(t *testing.T) { - testCases := []struct { - name string - input string - expectedLimits *limits - expectedError bool - }{ - { - name: "non number value for tracked limit", - input: "SYS_UID_MIN foo\n", - expectedError: true, - }, - { - name: "empty string must return defaults", - expectedLimits: defaultLimits, - }, - { - name: "no tracked limits in file must return defaults", - input: "# some comment\n", - expectedLimits: defaultLimits, - }, - { - name: "must parse all valid tracked limits", - input: "SYS_UID_MIN 101\nSYS_UID_MAX 998\nSYS_GID_MIN 102\nSYS_GID_MAX 999\n", - expectedLimits: &limits{minUID: 101, maxUID: 998, minGID: 102, maxGID: 999}, - }, - { - name: "must return defaults for missing limits", - input: "SYS_UID_MIN 101\n#SYS_UID_MAX 998\nSYS_GID_MIN 102\n#SYS_GID_MAX 999\n", - expectedLimits: &limits{minUID: 101, maxUID: defaultLimits.maxUID, minGID: 102, maxGID: defaultLimits.maxGID}, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - got, err := parseLoginDefs(tc.input) - if err != nil != tc.expectedError { - t.Fatalf("expected error: %v, got: %v, error: %v", tc.expectedError, err != nil, err) - } - if err == nil && *tc.expectedLimits != *got { - t.Fatalf("expected limits %+v, got %+v", tc.expectedLimits, got) - } - }) - } -} - -func TestParseEntries(t *testing.T) { - testCases := []struct { - name string - file string - expectedEntries []*entry - totalFields int - expectedError bool - }{ - { - name: "totalFields must be a known value", - expectedError: true, - }, - { - name: "unexpected number of fields", - file: "foo:x:100::::::", - totalFields: totalFieldsUser, - expectedError: true, - }, - { - name: "cannot parse 'bar' as UID", - file: "foo:x:bar:101:::\n", - totalFields: totalFieldsUser, - expectedError: true, - }, - { - name: "cannot parse 'bar' as GID", - file: "foo:x:101:bar:::\n", - totalFields: totalFieldsUser, - expectedError: true, - }, - { - name: "valid file for users", - file: "\nfoo:x:100:101:foo:/home/foo:/bin/bash\n\nbar:x:102:103:bar::\n", - totalFields: totalFieldsUser, - expectedEntries: []*entry{ - {name: "foo", id: 100, gid: 101, shell: "/bin/bash"}, - {name: "bar", id: 102, gid: 103}, - }, - }, - { - name: "valid file for groups", - file: "\nfoo:x:100:bar,baz\n\nbar:x:101:baz\n", - totalFields: totalFieldsGroup, - expectedEntries: []*entry{ - {name: "foo", id: 100, userNames: []string{"bar", "baz"}}, - {name: "bar", id: 101, userNames: []string{"baz"}}, - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - got, err := parseEntries(tc.file, tc.totalFields) - if err != nil != tc.expectedError { - t.Fatalf("expected error: %v, got: %v, error: %v", tc.expectedError, err != nil, err) - } - if err != nil { - return - } - if len(tc.expectedEntries) != len(got) { - t.Fatalf("expected entries %d, got %d", len(tc.expectedEntries), len(got)) - } - for i := range got { - if !reflect.DeepEqual(tc.expectedEntries[i], got[i]) { - t.Fatalf("expected entry at position %d: %+v, got: %+v", i, tc.expectedEntries[i], got[i]) - } - } - }) - } -} - -func TestValidateEntries(t *testing.T) { - testCases := []struct { - name string - users []*entry - groups []*entry - expectedUsers []*entry - expectedGroups []*entry - expectedError bool - }{ - { - name: "UID for user is outside of system limits", - users: []*entry{ - {name: "kubeadm-etcd", id: 2000, gid: 102, shell: noshell}, - }, - groups: []*entry{}, - expectedError: true, - }, - { - name: "user has unexpected shell", - users: []*entry{ - {name: "kubeadm-etcd", id: 102, gid: 102, shell: "foo"}, - }, - groups: []*entry{}, - expectedError: true, - }, - { - name: "user is mapped to unknown group", - users: []*entry{ - {name: "kubeadm-etcd", id: 102, gid: 102, shell: noshell}, - }, - groups: []*entry{}, - expectedError: true, - }, - { - name: "user and group names do not match", - users: []*entry{ - {name: "kubeadm-etcd", id: 102, gid: 102, shell: noshell}, - }, - groups: []*entry{ - {name: "foo", id: 102}, - }, - expectedError: true, - }, - { - name: "GID is outside system limits", - users: []*entry{}, - groups: []*entry{ - {name: "kubeadm-etcd", id: 2000}, - }, - expectedError: true, - }, - { - name: "group is missing users", - users: []*entry{}, - groups: []*entry{ - {name: "kubeadm-etcd", id: 100}, - }, - expectedError: true, - }, - { - name: "empty input must return default users and groups", - users: []*entry{}, - groups: []*entry{}, - expectedUsers: usersToCreateSpec, - expectedGroups: groupsToCreateSpec, - }, - { - name: "existing valid users mapped to groups", - users: []*entry{ - {name: "kubeadm-etcd", id: 100, gid: 102, shell: noshell}, - {name: "kubeadm-kas", id: 101, gid: 103, shell: noshell}, - }, - groups: []*entry{ - {name: "kubeadm-etcd", id: 102, userNames: []string{"kubeadm-etcd"}}, - {name: "kubeadm-kas", id: 103, userNames: []string{"kubeadm-kas"}}, - {name: "kubeadm-sa-key-readers", id: 104, userNames: []string{"kubeadm-kas", "kubeadm-kcm"}}, - }, - expectedUsers: []*entry{ - {name: "kubeadm-kcm"}, - {name: "kubeadm-ks"}, - }, - expectedGroups: []*entry{ - {name: "kubeadm-kcm", userNames: []string{"kubeadm-kcm"}}, - {name: "kubeadm-ks", userNames: []string{"kubeadm-ks"}}, - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - users, groups, err := validateEntries(tc.users, tc.groups, defaultLimits) - if err != nil != tc.expectedError { - t.Fatalf("expected error: %v, got: %v, error: %v", tc.expectedError, err != nil, err) - } - if err != nil { - return - } - if len(tc.expectedUsers) != len(users) { - t.Fatalf("expected users %d, got %d", len(tc.expectedUsers), len(users)) - } - for i := range users { - if !reflect.DeepEqual(tc.expectedUsers[i], users[i]) { - t.Fatalf("expected user at position %d: %+v, got: %+v", i, tc.expectedUsers[i], users[i]) - } - } - if len(tc.expectedGroups) != len(groups) { - t.Fatalf("expected groups %d, got %d", len(tc.expectedGroups), len(groups)) - } - for i := range groups { - if !reflect.DeepEqual(tc.expectedGroups[i], groups[i]) { - t.Fatalf("expected group at position %d: %+v, got: %+v", i, tc.expectedGroups[i], groups[i]) - } - } - }) - } -} - -func TestAllocateIDs(t *testing.T) { - testCases := []struct { - name string - entries []*entry - min int64 - max int64 - total int - expectedIDs []int64 - expectedError bool - }{ - { - name: "zero total ids returns empty slice", - expectedIDs: []int64{}, - }, - { - name: "not enough free ids in range", - entries: []*entry{ - {name: "foo", id: 101}, - {name: "bar", id: 103}, - {name: "baz", id: 105}, - }, - min: 100, - max: 105, - total: 4, - expectedError: true, - }, - { - name: "successfully allocate ids", - entries: []*entry{ - {name: "foo", id: 101}, - {name: "bar", id: 103}, - {name: "baz", id: 105}, - }, - min: 100, - max: 110, - total: 4, - expectedIDs: []int64{100, 102, 104, 106}, - expectedError: false, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - got, err := allocateIDs(tc.entries, tc.min, tc.max, tc.total) - if err != nil != tc.expectedError { - t.Fatalf("expected error: %v, got: %v, error: %v", tc.expectedError, err != nil, err) - } - if err != nil { - return - } - if len(tc.expectedIDs) != len(got) { - t.Fatalf("expected id %d, got %d", len(tc.expectedIDs), len(got)) - } - for i := range got { - if !reflect.DeepEqual(tc.expectedIDs[i], got[i]) { - t.Fatalf("expected id at position %d: %+v, got: %+v", i, tc.expectedIDs[i], got[i]) - } - } - }) - } -} - -func TestAddEntries(t *testing.T) { - testCases := []struct { - name string - file string - entries []*entry - createEntry func(*entry) string - expectedOutput string - }{ - { - name: "user entries are added", - file: "foo:x:101:101:::/bin/false\n", - entries: []*entry{ - {name: "bar", id: 102, gid: 102}, - {name: "baz", id: 103, gid: 103}, - }, - expectedOutput: "foo:x:101:101:::/bin/false\nbar:x:102:102:::/bin/false\nbaz:x:103:103:::/bin/false\n", - createEntry: createUser, - }, - { - name: "user entries are added (new line is appended)", - file: "foo:x:101:101:::/bin/false", - entries: []*entry{ - {name: "bar", id: 102, gid: 102}, - }, - expectedOutput: "foo:x:101:101:::/bin/false\nbar:x:102:102:::/bin/false\n", - createEntry: createUser, - }, - { - name: "group entries are added", - file: "foo:x:101:foo\n", - entries: []*entry{ - {name: "bar", id: 102, userNames: []string{"bar"}}, - {name: "baz", id: 103, userNames: []string{"baz"}}, - }, - expectedOutput: "foo:x:101:foo\nbar:x:102:bar\nbaz:x:103:baz\n", - createEntry: createGroup, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - got := addEntries(tc.file, tc.entries, tc.createEntry) - if tc.expectedOutput != got { - t.Fatalf("expected output:\n%s\ngot:\n%s\n", tc.expectedOutput, got) - } - }) - } -} - -func TestRemoveEntries(t *testing.T) { - testCases := []struct { - name string - file string - entries []*entry - expectedRemoved int - expectedOutput string - }{ - { - name: "entries that are missing do not cause an error", - file: "foo:x:102:102:::/bin/false\nbar:x:103:103:::/bin/false\n", - entries: []*entry{}, - expectedRemoved: 0, - expectedOutput: "foo:x:102:102:::/bin/false\nbar:x:103:103:::/bin/false\n", - }, - { - name: "user entry is removed", - file: "foo:x:102:102:::/bin/false\nbar:x:103:103:::/bin/false\n", - entries: []*entry{ - {name: "bar"}, - }, - expectedRemoved: 1, - expectedOutput: "foo:x:102:102:::/bin/false\n", - }, - { - name: "group entry is removed", - file: "foo:x:102:foo\nbar:x:102:bar\n", - entries: []*entry{ - {name: "bar"}, - }, - expectedRemoved: 1, - expectedOutput: "foo:x:102:foo\n", - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - got, removed := removeEntries(tc.file, tc.entries) - if tc.expectedRemoved != removed { - t.Fatalf("expected entries to be removed: %v, got: %v", tc.expectedRemoved, removed) - } - if tc.expectedOutput != got { - t.Fatalf("expected output:\n%s\ngot:\n%s\n", tc.expectedOutput, got) - } - }) - } -} - -func TestAssignUserAndGroupIDs(t *testing.T) { - testCases := []struct { - name string - users []*entry - groups []*entry - usersToCreate []*entry - groupsToCreate []*entry - uids []int64 - gids []int64 - expectedUsers []*entry - expectedGroups []*entry - expectedError bool - }{ - { - name: "not enough UIDs", - usersToCreate: []*entry{ - {name: "foo"}, - {name: "bar"}, - }, - uids: []int64{100}, - expectedError: true, - }, - { - name: "not enough GIDs", - groupsToCreate: []*entry{ - {name: "foo"}, - {name: "bar"}, - }, - gids: []int64{100}, - expectedError: true, - }, - { - name: "valid UIDs and GIDs are assigned to input", - groups: []*entry{ - {name: "foo", id: 110}, - {name: "bar", id: 111}, - }, - usersToCreate: []*entry{ - {name: "foo"}, - {name: "bar"}, - {name: "baz"}, - }, - groupsToCreate: []*entry{ - {name: "baz"}, - }, - uids: []int64{100, 101, 102}, - gids: []int64{112}, - expectedUsers: []*entry{ - {name: "foo", id: 100, gid: 110}, - {name: "bar", id: 101, gid: 111}, - {name: "baz", id: 102, gid: 112}, - }, - expectedGroups: []*entry{ - {name: "baz", id: 112}, - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - err := assignUserAndGroupIDs(tc.groups, tc.usersToCreate, tc.groupsToCreate, tc.uids, tc.gids) - if err != nil != tc.expectedError { - t.Fatalf("expected error: %v, got: %v, error: %v", tc.expectedError, err != nil, err) - } - if err != nil { - return - } - if len(tc.expectedUsers) != len(tc.usersToCreate) { - t.Fatalf("expected users %d, got %d", len(tc.expectedUsers), len(tc.usersToCreate)) - } - for i := range tc.usersToCreate { - if !reflect.DeepEqual(tc.expectedUsers[i], tc.usersToCreate[i]) { - t.Fatalf("expected user at position %d: %+v, got: %+v", i, tc.expectedUsers[i], tc.usersToCreate[i]) - } - } - if len(tc.expectedGroups) != len(tc.groupsToCreate) { - t.Fatalf("expected groups %d, got %d", len(tc.expectedGroups), len(tc.groupsToCreate)) - } - for i := range tc.groupsToCreate { - if !reflect.DeepEqual(tc.expectedGroups[i], tc.groupsToCreate[i]) { - t.Fatalf("expected group at position %d: %+v, got: %+v", i, tc.expectedGroups[i], tc.groupsToCreate[i]) - } - } - }) - } -} - -func TestID(t *testing.T) { - e := &entry{name: "foo", id: 101} - m := &EntryMap{entries: map[string]*entry{ - "foo": e, - }} - id := m.ID("foo") - if *id != 101 { - t.Fatalf("expected: id=%d; got: id=%d", 101, *id) - } - id = m.ID("bar") - if id != nil { - t.Fatalf("expected nil for unknown entry") - } -} - -func TestAddUsersAndGroupsImpl(t *testing.T) { - const ( - loginDef = "SYS_UID_MIN 101\nSYS_UID_MAX 998\nSYS_GID_MIN 102\nSYS_GID_MAX 999\n" - passwd = "root:x:0:0:::/bin/bash\nkubeadm-etcd:x:101:102:::/bin/false\n" - group = "root:x:0:root\nkubeadm-etcd:x:102:kubeadm-etcd\n" - expectedUsers = "kubeadm-etcd{101,102};kubeadm-kas{102,103};kubeadm-kcm{103,104};kubeadm-ks{104,105};" - expectedGroups = "kubeadm-etcd{102,0};kubeadm-kas{103,0};kubeadm-kcm{104,0};kubeadm-ks{105,0};kubeadm-sa-key-readers{106,0};" - ) - fileLoginDef, close := writeTempFile(t, loginDef) - defer close() - filePasswd, close := writeTempFile(t, passwd) - defer close() - fileGroup, close := writeTempFile(t, group) - defer close() - got, err := addUsersAndGroupsImpl(fileLoginDef, filePasswd, fileGroup) - if err != nil { - t.Fatalf("AddUsersAndGroups failed: %v", err) - } - if expectedUsers != got.Users.String() { - t.Fatalf("expected users: %q, got: %q", expectedUsers, got.Users.String()) - } - if expectedGroups != got.Groups.String() { - t.Fatalf("expected groups: %q, got: %q", expectedGroups, got.Groups.String()) - } -} - -func TestRemoveUsersAndGroups(t *testing.T) { - const ( - passwd = "root:x:0:0:::/bin/bash\nkubeadm-etcd:x:101:102:::/bin/false\n" - group = "root:x:0:root\nkubeadm-etcd:x:102:kubeadm-etcd\n" - expectedPasswd = "root:x:0:0:::/bin/bash\n" - expectedGroup = "root:x:0:root\n" - ) - filePasswd, close := writeTempFile(t, passwd) - defer close() - fileGroup, close := writeTempFile(t, group) - defer close() - if err := removeUsersAndGroupsImpl(filePasswd, fileGroup); err != nil { - t.Fatalf("RemoveUsersAndGroups failed: %v", err) - } - contentsPasswd := readTempFile(t, filePasswd) - if expectedPasswd != contentsPasswd { - t.Fatalf("expected passwd:\n%s\ngot:\n%s\n", expectedPasswd, contentsPasswd) - } - contentsGroup := readTempFile(t, fileGroup) - if expectedGroup != contentsGroup { - t.Fatalf("expected passwd:\n%s\ngot:\n%s\n", expectedGroup, contentsGroup) - } -} - -func writeTempFile(t *testing.T, contents string) (string, func()) { - file, err := os.CreateTemp("", "") - if err != nil { - t.Fatalf("could not create file: %v", err) - } - if err := os.WriteFile(file.Name(), []byte(contents), os.ModePerm); err != nil { - t.Fatalf("could not write file: %v", err) - } - close := func() { - os.Remove(file.Name()) - } - return file.Name(), close -} - -func readTempFile(t *testing.T, path string) string { - b, err := os.ReadFile(path) - if err != nil { - t.Fatalf("could not read file: %v", err) - } - return string(b) -} diff --git a/cmd/kubeadm/app/util/users/users_other.go b/cmd/kubeadm/app/util/users/users_other.go deleted file mode 100644 index ba79ebfbb069a..0000000000000 --- a/cmd/kubeadm/app/util/users/users_other.go +++ /dev/null @@ -1,56 +0,0 @@ -//go:build !linux -// +build !linux - -/* -Copyright 2021 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 users - -// EntryMap is empty on non-Linux. -type EntryMap struct{} - -// UsersAndGroups is empty on non-Linux. -type UsersAndGroups struct{} - -// ID is a NO-OP on non-Linux. -func (*EntryMap) ID(string) *int64 { - return nil -} - -// String is NO-OP on non-Linux. -func (*EntryMap) String() string { - return "" -} - -// AddUsersAndGroups is a NO-OP on non-Linux. -func AddUsersAndGroups() (*UsersAndGroups, error) { - return nil, nil -} - -// RemoveUsersAndGroups is a NO-OP on non-Linux. -func RemoveUsersAndGroups() error { - return nil -} - -// UpdatePathOwnerAndPermissions is a NO-OP on non-Linux. -func UpdatePathOwnerAndPermissions(path string, uid, gid int64, perms uint32) error { - return nil -} - -// UpdatePathOwner is a NO-OP on non-Linux. -func UpdatePathOwner(dirPath string, uid, gid int64) error { - return nil -} diff --git a/cmd/kubelet/app/auth_test.go b/cmd/kubelet/app/auth_test.go new file mode 100644 index 0000000000000..06498486b9c38 --- /dev/null +++ b/cmd/kubelet/app/auth_test.go @@ -0,0 +1,208 @@ +/* +Copyright 2025 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 app + +import ( + "bytes" + "context" + "io" + "net/http" + "net/http/httptest" + "testing" + + "k8s.io/apiserver/pkg/authorization/authorizer" + authenticationv1client "k8s.io/client-go/kubernetes/typed/authentication/v1" + authorizationv1client "k8s.io/client-go/kubernetes/typed/authorization/v1" + "k8s.io/client-go/rest" + kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" +) + +func TestAuthzWebhookRequestEncoding(t *testing.T) { + testCases := []struct { + name string + ContentType string + ExpectContentType string + ExpectRequestBodyPrefix []byte + }{ + { + name: "json", + ContentType: "application/json", + ExpectContentType: "application/json", + ExpectRequestBodyPrefix: []byte(`{`), + }, + { + name: "empty", + ContentType: "", + ExpectContentType: "application/json", + ExpectRequestBodyPrefix: []byte(`{`), + }, + { + name: "protobuf", + ContentType: "application/vnd.kubernetes.protobuf", + ExpectContentType: "application/vnd.kubernetes.protobuf", + ExpectRequestBodyPrefix: []byte("\x6b\x38\x73\x00"), // k8s protobuf magic number + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + handlerInvoked := make(chan struct{}) + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + defer close(handlerInvoked) + + if got := r.Header.Get("Content-Type"); got != tc.ExpectContentType { + t.Errorf("unexpected Content-Type: got %q, want %q", got, tc.ExpectContentType) + } + + body, err := io.ReadAll(r.Body) + if err != nil { + t.Fatalf("failed to read request body: %v", err) + } + if !bytes.HasPrefix(body, tc.ExpectRequestBodyPrefix) { + t.Errorf("request body should have prefix %q, but got %q", tc.ExpectRequestBodyPrefix, body) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + if _, err := w.Write([]byte(`{"kind":"SubjectAccessReview","apiVersion":"authorization.k8s.io/v1","status":{"allowed":true}}`)); err != nil { + t.Fatalf("unexpected response write failure: %v", err) + } + })) + defer server.Close() + + cfg := &rest.Config{ + Host: server.URL, + ContentConfig: rest.ContentConfig{ + ContentType: tc.ContentType, + }, + } + + authzClient, err := authorizationv1client.NewForConfigAndClient(cfg, server.Client()) + if err != nil { + t.Fatalf("failed to create authorization client: %v", err) + } + + authz, err := BuildAuthz(authzClient, kubeletconfig.KubeletAuthorization{Mode: kubeletconfig.KubeletAuthorizationModeWebhook}) + if err != nil { + t.Fatalf("failed to build authorizer: %v", err) + } + + if _, _, err := authz.Authorize(context.Background(), &authorizer.AttributesRecord{}); err != nil { + t.Fatalf("Authorize failed: %v", err) + } + + select { + case <-handlerInvoked: + default: + t.Fatal("webhook handler not invoked") + } + }) + } +} + +func TestAuthnWebhookRequestEncoding(t *testing.T) { + testCases := []struct { + name string + ContentType string + ExpectContentType string + ExpectRequestBodyPrefix []byte + }{ + { + name: "json", + ContentType: "application/json", + ExpectContentType: "application/json", + ExpectRequestBodyPrefix: []byte(`{`), + }, + { + name: "empty", + ContentType: "", + ExpectContentType: "application/json", + ExpectRequestBodyPrefix: []byte(`{`), + }, + { + name: "protobuf", + ContentType: "application/vnd.kubernetes.protobuf", + ExpectContentType: "application/vnd.kubernetes.protobuf", + ExpectRequestBodyPrefix: []byte("\x6b\x38\x73\x00"), // k8s protobuf magic number + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + handlerInvoked := make(chan struct{}) + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + defer close(handlerInvoked) + + if got := r.Header.Get("Content-Type"); got != tc.ExpectContentType { + t.Errorf("unexpected Content-Type: got %q, want %q", got, tc.ExpectContentType) + } + + body, err := io.ReadAll(r.Body) + if err != nil { + t.Fatalf("failed to read request body: %v", err) + } + if !bytes.HasPrefix(body, tc.ExpectRequestBodyPrefix) { + t.Errorf("request body should have prefix %q, but got %q", tc.ExpectRequestBodyPrefix, body) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + if _, err := w.Write([]byte(`{"kind":"TokenReview","apiVersion":"authentication.k8s.io/v1","status":{"authenticated":true}}`)); err != nil { + t.Fatalf("unexpected response write failure: %v", err) + } + })) + defer server.Close() + + cfg := &rest.Config{ + Host: server.URL, + ContentConfig: rest.ContentConfig{ + ContentType: tc.ContentType, + }, + } + + authnClient, err := authenticationv1client.NewForConfigAndClient(cfg, server.Client()) + if err != nil { + t.Fatalf("failed to create authentication client: %v", err) + } + + authn, _, err := BuildAuthn(authnClient, kubeletconfig.KubeletAuthentication{ + Webhook: kubeletconfig.KubeletWebhookAuthentication{ + Enabled: true, + }, + }) + if err != nil { + t.Fatalf("failed to build authenticator: %v", err) + } + + request, err := http.NewRequestWithContext(context.TODO(), http.MethodGet, "/fooz", nil) + if err != nil { + t.Fatalf("failed to build test request: %v", err) + } + request.Header.Set("Authorization", "Bearer foo") + + if _, _, err := authn.AuthenticateRequest(request); err != nil { + t.Fatalf("AuthenticateToken failed: %v", err) + } + + select { + case <-handlerInvoked: + default: + t.Fatal("webhook handler not invoked") + } + }) + } +} diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index 8bcadbd90e315..8bc9f5becc421 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -34,10 +34,10 @@ import ( "k8s.io/kubelet/config/v1beta1" kubeletapis "k8s.io/kubelet/pkg/apis" "k8s.io/kubernetes/pkg/cluster/ports" - kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" + kubeletconfigapi "k8s.io/kubernetes/pkg/kubelet/apis/config" kubeletscheme "k8s.io/kubernetes/pkg/kubelet/apis/config/scheme" kubeletconfigvalidation "k8s.io/kubernetes/pkg/kubelet/apis/config/validation" - "k8s.io/kubernetes/pkg/kubelet/config" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" utilflag "k8s.io/kubernetes/pkg/util/flag" ) @@ -63,7 +63,7 @@ type KubeletFlags struct { NodeIP string // Container-runtime-specific options. - config.ContainerRuntimeOptions + kubeletconfig.ContainerRuntimeOptions // certDirectory is the directory where the TLS certs are located. // If tlsCertFile and tlsPrivateKeyFile are provided, this flag will be ignored. @@ -134,7 +134,7 @@ type KubeletFlags struct { // NewKubeletFlags will create a new KubeletFlags with default values func NewKubeletFlags() *KubeletFlags { return &KubeletFlags{ - ContainerRuntimeOptions: config.ContainerRuntimeOptions{}, + ContainerRuntimeOptions: kubeletconfig.ContainerRuntimeOptions{}, CertDirectory: "/var/lib/kubelet/pki", RootDirectory: filepath.Clean(defaultRootDir), MaxContainerCount: -1, @@ -192,14 +192,14 @@ func getLabelNamespace(key string) string { } // NewKubeletConfiguration will create a new KubeletConfiguration with default values -func NewKubeletConfiguration() (*kubeletconfig.KubeletConfiguration, error) { +func NewKubeletConfiguration() (*kubeletconfigapi.KubeletConfiguration, error) { scheme, _, err := kubeletscheme.NewSchemeAndCodecs() if err != nil { return nil, err } versioned := &v1beta1.KubeletConfiguration{} scheme.Default(versioned) - config := &kubeletconfig.KubeletConfiguration{} + config := &kubeletconfigapi.KubeletConfiguration{} if err := scheme.Convert(versioned, config, nil); err != nil { return nil, err } @@ -210,13 +210,13 @@ func NewKubeletConfiguration() (*kubeletconfig.KubeletConfiguration, error) { // applyLegacyDefaults applies legacy default values to the KubeletConfiguration in order to // preserve the command line API. This is used to construct the baseline default KubeletConfiguration // before the first round of flag parsing. -func applyLegacyDefaults(kc *kubeletconfig.KubeletConfiguration) { +func applyLegacyDefaults(kc *kubeletconfigapi.KubeletConfiguration) { // --anonymous-auth kc.Authentication.Anonymous.Enabled = true // --authentication-token-webhook kc.Authentication.Webhook.Enabled = false // --authorization-mode - kc.Authorization.Mode = kubeletconfig.KubeletAuthorizationModeAlwaysAllow + kc.Authorization.Mode = kubeletconfigapi.KubeletAuthorizationModeAlwaysAllow // --read-only-port kc.ReadOnlyPort = ports.KubeletReadOnlyPort } @@ -225,7 +225,7 @@ func applyLegacyDefaults(kc *kubeletconfig.KubeletConfiguration) { // a kubelet. These can either be set via command line or directly. type KubeletServer struct { KubeletFlags - kubeletconfig.KubeletConfiguration + kubeletconfigapi.KubeletConfiguration } // NewKubeletServer will create a new KubeletServer with default values. @@ -273,7 +273,7 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) { mainfs.AddFlagSet(fs) }() - f.ContainerRuntimeOptions.AddFlags(fs) + addContainerRuntimeFlags(fs, &f.ContainerRuntimeOptions) f.addOSFlags(fs) fs.StringVar(&f.KubeletConfigFile, "config", f.KubeletConfigFile, "The Kubelet will load its initial configuration from this file. The path may be absolute or relative; relative paths start at the Kubelet's current working directory. Omit this flag to use the built-in default configuration values. Command-line flags override configuration from this file.") @@ -317,8 +317,20 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) { fs.MarkDeprecated("experimental-allocatable-ignore-eviction", "will be removed in 1.25 or later.") } +// addContainerRuntimeFlags adds flags to the container runtime, according to ContainerRuntimeOptions. +func addContainerRuntimeFlags(fs *pflag.FlagSet, o *kubeletconfig.ContainerRuntimeOptions) { + // General settings. + fs.StringVar(&o.RuntimeCgroups, "runtime-cgroups", o.RuntimeCgroups, "Optional absolute name of cgroups to create and run the runtime in.") + _ = fs.String("pod-infra-container-image", "", "Specified image will not be pruned by the image garbage collector. CRI implementations have their own configuration to set this image.") + _ = fs.MarkDeprecated("pod-infra-container-image", "will be removed in 1.35. Image garbage collector will get sandbox image information from CRI.") + + // Image credential provider settings. + fs.StringVar(&o.ImageCredentialProviderConfigPath, "image-credential-provider-config", o.ImageCredentialProviderConfigPath, "Path to a credential provider plugin config file (JSON/YAML/YML) or a directory of such files (merged in lexicographical order; non-recursive search).") + fs.StringVar(&o.ImageCredentialProviderBinDir, "image-credential-provider-bin-dir", o.ImageCredentialProviderBinDir, "The path to the directory where credential provider plugin binaries are located.") +} + // AddKubeletConfigFlags adds flags for a specific kubeletconfig.KubeletConfiguration to the specified FlagSet -func AddKubeletConfigFlags(mainfs *pflag.FlagSet, c *kubeletconfig.KubeletConfiguration) { +func AddKubeletConfigFlags(mainfs *pflag.FlagSet, c *kubeletconfigapi.KubeletConfiguration) { fs := pflag.NewFlagSet("", pflag.ExitOnError) defer func() { // All KubeletConfiguration flags are now deprecated, and any new flags that point to diff --git a/cmd/kubelet/app/options/options_test.go b/cmd/kubelet/app/options/options_test.go index 3ec297cd17272..a229d812d5690 100644 --- a/cmd/kubelet/app/options/options_test.go +++ b/cmd/kubelet/app/options/options_test.go @@ -25,7 +25,7 @@ import ( "github.com/spf13/pflag" cliflag "k8s.io/component-base/cli/flag" - "k8s.io/kubernetes/pkg/kubelet/config" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" ) func newKubeletServerOrDie() *KubeletServer { @@ -179,7 +179,7 @@ func TestValidateKubeletFlags(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { err := ValidateKubeletFlags(&KubeletFlags{ - ContainerRuntimeOptions: config.ContainerRuntimeOptions{}, + ContainerRuntimeOptions: kubeletconfig.ContainerRuntimeOptions{}, NodeLabels: tt.labels, }) diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index f069f6b08b9d1..7e0c71c273b0a 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -606,17 +606,17 @@ func getReservedCPUs(machineInfo *cadvisorapi.MachineInfo, cpus string) (cpuset. } func run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate featuregate.FeatureGate) (err error) { + logger := klog.FromContext(ctx) if utilfeature.DefaultFeatureGate.Enabled(features.SystemdWatchdog) { // NewHealthChecker returns an error indicating that the watchdog is configured but the configuration is incorrect, // the kubelet will not be started. - healthChecker, err := watchdog.NewHealthChecker() + healthChecker, err := watchdog.NewHealthChecker(logger) if err != nil { return fmt.Errorf("create health checker: %w", err) } kubeDeps.HealthChecker = healthChecker healthChecker.Start(ctx) } - logger := klog.FromContext(ctx) // Set global feature gates based on the value on the initial KubeletServer err = utilfeature.DefaultMutableFeatureGate.SetFromMap(s.KubeletConfiguration.FeatureGates) if err != nil { @@ -954,7 +954,7 @@ func buildKubeletClientConfig(ctx context.Context, s *options.KubeletServer, tp // bootstrap the cert manager with the contents of the initial client config. logger.Info("Client rotation is on, will bootstrap in background") - certConfig, clientConfig, err := bootstrap.LoadClientConfig(s.KubeConfig, s.BootstrapKubeconfig, s.CertDirectory) + certConfig, clientConfig, err := bootstrap.LoadClientConfig(logger, s.KubeConfig, s.BootstrapKubeconfig, s.CertDirectory) if err != nil { return nil, nil, err } @@ -992,7 +992,7 @@ func buildKubeletClientConfig(ctx context.Context, s *options.KubeletServer, tp // we set exitAfter to five minutes because we use this client configuration to request new certs - if we are unable // to request new certs, we will be unable to continue normal operation. Exiting the process allows a wrapper // or the bootstrapping credentials to potentially lay down new initial config. - closeAllConns, err := kubeletcertificate.UpdateTransport(wait.NeverStop, transportConfig, clientCertificateManager, 5*time.Minute) + closeAllConns, err := kubeletcertificate.UpdateTransport(logger, wait.NeverStop, transportConfig, clientCertificateManager, 5*time.Minute) if err != nil { return nil, nil, err } @@ -1270,10 +1270,10 @@ func startKubelet(ctx context.Context, k kubelet.Bootstrap, podCfg *config.PodCo // start the kubelet server if enableServer { - go k.ListenAndServe(kubeCfg, kubeDeps.TLSOptions, kubeDeps.Auth, kubeDeps.TracerProvider) + go k.ListenAndServe(ctx, kubeCfg, kubeDeps.TLSOptions, kubeDeps.Auth, kubeDeps.TracerProvider) } if kubeCfg.ReadOnlyPort > 0 { - go k.ListenAndServeReadOnly(netutils.ParseIPSloppy(kubeCfg.Address), uint(kubeCfg.ReadOnlyPort), kubeDeps.TracerProvider) + go k.ListenAndServeReadOnly(ctx, netutils.ParseIPSloppy(kubeCfg.Address), uint(kubeCfg.ReadOnlyPort), kubeDeps.TracerProvider) } go k.ListenAndServePodResources(ctx) } diff --git a/cmd/kubelet/app/server_windows.go b/cmd/kubelet/app/server_windows.go index 8441ca85980fc..781cd95cca9bf 100644 --- a/cmd/kubelet/app/server_windows.go +++ b/cmd/kubelet/app/server_windows.go @@ -38,7 +38,7 @@ func checkPermissions(ctx context.Context) error { // For Windows user.UserName contains the login name and user.Name contains // the user's display name - https://pkg.go.dev/os/user#User - logger.Info("Kubelet is running as", "login name", u.Username, "dispaly name", u.Name) + logger.Info("Kubelet is running as", "login name", u.Username, "display name", u.Name) if !windows.GetCurrentProcessToken().IsElevated() { return errors.New("kubelet needs to run with elevated permissions!") diff --git a/go.mod b/go.mod index 2e08ab47c6d40..c4ea3e0682f99 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,9 @@ module k8s.io/kubernetes -go 1.24.0 +go 1.25.0 -godebug default=go1.24 +godebug default=go1.25 require ( bitbucket.org/bertimus9/systemstat v0.5.0 @@ -19,7 +19,7 @@ require ( github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 github.com/blang/semver/v4 v4.0.0 github.com/container-storage-interface/spec v1.9.0 - github.com/coredns/corefile-migration v1.0.26 + github.com/coredns/corefile-migration v1.0.27 github.com/coreos/go-oidc v2.3.0+incompatible github.com/coreos/go-systemd/v22 v22.5.0 github.com/cpuguy83/go-md2man/v2 v2.0.6 @@ -28,11 +28,10 @@ require ( github.com/docker/go-units v0.5.0 github.com/emicklei/go-restful/v3 v3.12.2 github.com/fsnotify/fsnotify v1.9.0 - github.com/go-logr/logr v1.4.2 + github.com/go-logr/logr v1.4.3 github.com/go-openapi/jsonreference v0.20.2 github.com/godbus/dbus/v5 v5.1.0 - github.com/gogo/protobuf v1.3.2 - github.com/google/cadvisor v0.52.1 + github.com/google/cadvisor v0.53.0 github.com/google/cel-go v0.26.0 github.com/google/gnostic-models v0.7.0 github.com/google/go-cmp v0.7.0 @@ -46,44 +45,45 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 github.com/onsi/ginkgo/v2 v2.21.0 github.com/onsi/gomega v1.35.1 - github.com/opencontainers/cgroups v0.0.1 + github.com/opencontainers/cgroups v0.0.3 github.com/opencontainers/selinux v1.11.1 github.com/pmezard/go-difflib v1.0.0 - github.com/prometheus/client_golang v1.22.0 - github.com/prometheus/client_model v0.6.1 - github.com/prometheus/common v0.62.0 + github.com/prometheus/client_golang v1.23.2 + github.com/prometheus/client_model v0.6.2 + github.com/prometheus/common v0.66.1 github.com/robfig/cron/v3 v3.0.1 - github.com/spf13/cobra v1.9.1 - github.com/spf13/pflag v1.0.6 - github.com/stretchr/testify v1.10.0 + github.com/spf13/cobra v1.10.0 + github.com/spf13/pflag v1.0.9 + github.com/stretchr/testify v1.11.1 github.com/vishvananda/netlink v1.3.1 github.com/vishvananda/netns v0.0.5 go.etcd.io/etcd/api/v3 v3.6.4 go.etcd.io/etcd/client/pkg/v3 v3.6.4 go.etcd.io/etcd/client/v3 v3.6.4 go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful v0.44.0 - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 - go.opentelemetry.io/otel v1.35.0 + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 + go.opentelemetry.io/otel v1.36.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 - go.opentelemetry.io/otel/metric v1.35.0 - go.opentelemetry.io/otel/sdk v1.34.0 - go.opentelemetry.io/otel/trace v1.35.0 + go.opentelemetry.io/otel/metric v1.36.0 + go.opentelemetry.io/otel/sdk v1.36.0 + go.opentelemetry.io/otel/trace v1.36.0 go.opentelemetry.io/proto/otlp v1.5.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 go.yaml.in/yaml/v2 v2.4.2 - golang.org/x/crypto v0.36.0 - golang.org/x/net v0.38.0 - golang.org/x/oauth2 v0.27.0 - golang.org/x/sync v0.12.0 - golang.org/x/sys v0.31.0 - golang.org/x/term v0.30.0 + golang.org/x/crypto v0.41.0 + golang.org/x/net v0.43.0 + golang.org/x/oauth2 v0.30.0 + golang.org/x/sync v0.16.0 + golang.org/x/sys v0.35.0 + golang.org/x/term v0.34.0 + golang.org/x/text v0.28.0 golang.org/x/time v0.9.0 - golang.org/x/tools v0.26.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb - google.golang.org/grpc v1.72.1 - google.golang.org/protobuf v1.36.5 - gopkg.in/evanphx/json-patch.v4 v4.12.0 + golang.org/x/tools v0.36.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a + google.golang.org/grpc v1.72.2 + google.golang.org/protobuf v1.36.8 + gopkg.in/evanphx/json-patch.v4 v4.13.0 gopkg.in/go-jose/go-jose.v2 v2.6.3 k8s.io/api v0.0.0 k8s.io/apiextensions-apiserver v0.0.0 @@ -107,7 +107,7 @@ require ( k8s.io/kms v0.0.0 k8s.io/kube-aggregator v0.0.0 k8s.io/kube-controller-manager v0.0.0 - k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b + k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 k8s.io/kube-proxy v0.0.0 k8s.io/kube-scheduler v0.0.0 k8s.io/kubectl v0.0.0 @@ -116,8 +116,9 @@ require ( k8s.io/mount-utils v0.0.0 k8s.io/pod-security-admission v0.0.0 k8s.io/sample-apiserver v0.0.0 - k8s.io/system-validators v1.10.1 + k8s.io/system-validators v1.11.1 k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 sigs.k8s.io/knftables v0.0.17 sigs.k8s.io/randfill v1.0.0 sigs.k8s.io/structured-merge-diff/v6 v6.3.0 @@ -134,12 +135,12 @@ require ( github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect - github.com/containerd/containerd/api v1.8.0 // indirect + github.com/containerd/containerd/api v1.9.0 // indirect github.com/containerd/errdefs v1.0.0 // indirect github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/containerd/log v0.1.0 // indirect - github.com/containerd/ttrpc v1.2.6 // indirect - github.com/containerd/typeurl/v2 v2.2.2 // indirect + github.com/containerd/ttrpc v1.2.7 // indirect + github.com/containerd/typeurl/v2 v2.2.3 // indirect github.com/coredns/caddy v1.1.1 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -155,6 +156,7 @@ require ( github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.2.2 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/btree v1.1.3 // indirect @@ -185,11 +187,11 @@ require ( github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/opencontainers/runtime-spec v1.2.0 // indirect + github.com/opencontainers/runtime-spec v1.2.1 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pquerna/cachecontrol v0.1.0 // indirect - github.com/prometheus/procfs v0.15.1 // indirect + github.com/prometheus/procfs v0.16.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/soheilhy/cmux v0.1.5 // indirect @@ -209,15 +211,13 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/mod v0.21.0 // indirect - golang.org/x/text v0.23.0 // indirect + golang.org/x/mod v0.27.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f // indirect + k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect - sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect sigs.k8s.io/kustomize/api v0.20.1 // indirect sigs.k8s.io/kustomize/kustomize/v5 v5.7.1 // indirect sigs.k8s.io/kustomize/kyaml v0.20.1 // indirect diff --git a/go.sum b/go.sum index d163531c74174..09e4f40b5d3fe 100644 --- a/go.sum +++ b/go.sum @@ -3,7 +3,7 @@ bitbucket.org/bertimus9/systemstat v0.5.0/go.mod h1:EkUWPp8lKFPMXP8vnbpT5JDI0W/s buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.4-20250130201111-63bb56e20495.1/go.mod h1:novQBstnxcGpfKf8qGRATqn1anQKwMJIbH5Q581jibU= cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= -cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg= +cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.26.0/go.mod h1:2bIszWvQRlJVmJLiuLhukLImRjKPcYdzzsx6darK02A= @@ -26,19 +26,19 @@ github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 h1:7Ip0wMmLHLRJdrloD github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aws/aws-sdk-go-v2 v1.30.1/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc= -github.com/aws/aws-sdk-go-v2/config v1.27.24/go.mod h1:aXzi6QJTuQRVVusAO8/NxpdTeTyr/wRcybdDtfUwJSs= -github.com/aws/aws-sdk-go-v2/credentials v1.17.24/go.mod h1:Hld7tmnAkoBQdTMNYZGzztzKRdA4fCdn9L83LOoigac= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9/go.mod h1:WQr3MY7AxGNxaqAtsDWn+fBxmd4XvLkzeqQ8P1VM0/w= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13/go.mod h1:+rdA6ZLpaSeM7tSg/B0IEDinCIBJGmW8rKDFkYpP04g= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13/go.mod h1:i+kbfa76PQbWw/ULoWnp51EYVWH4ENln76fLQE3lXT8= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3/go.mod h1:GlAeCkHwugxdHaueRr4nhPuY+WW+gR8UjlcqzPr1SPI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15/go.mod h1:9xWJ3Q/S6Ojusz1UIkfycgD1mGirJfLLKqq3LPT7WN8= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.1/go.mod h1:/vWdhoIoYA5hYoPZ6fm7Sv4d8701PiG5VKe8/pPJL60= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.2/go.mod h1:xyFHA4zGxgYkdD73VeezHt3vSKEG9EmFnGwoKlP00u4= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.1/go.mod h1:jiNR3JqT15Dm+QWq2SRgh0x0bCNSRP2L25+CqPNpJlQ= -github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/aws/aws-sdk-go-v2 v1.36.3/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg= +github.com/aws/aws-sdk-go-v2/config v1.29.14/go.mod h1:wVPHWcIFv3WO89w0rE10gzf17ZYy+UVS1Geq8Iei34g= +github.com/aws/aws-sdk-go-v2/credentials v1.17.67/go.mod h1:p3C44m+cfnbv763s52gCqrjaqyPikj9Sg47kUVaNZQQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34/go.mod h1:p4VfIceZokChbA9FzMbRGz5OV+lekcVtHlPKEO0gSZY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34/go.mod h1:dFZsC0BLo346mvKQLWmoJxT+Sjp+qcVR1tRVHQGOH9Q= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15/go.mod h1:SwFBy2vjtA0vZbjjaFtfN045boopadnoVPhu4Fv66vY= +github.com/aws/aws-sdk-go-v2/service/sso v1.25.3/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.19/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= +github.com/aws/smithy-go v1.22.3/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= @@ -57,22 +57,22 @@ github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD9 github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/container-storage-interface/spec v1.9.0 h1:zKtX4STsq31Knz3gciCYCi1SXtO2HJDecIjDVboYavY= github.com/container-storage-interface/spec v1.9.0/go.mod h1:ZfDu+3ZRyeVqxZM0Ds19MVLkN2d1XJ5MAfi1L3VjlT0= -github.com/containerd/containerd/api v1.8.0 h1:hVTNJKR8fMc/2Tiw60ZRijntNMd1U+JVMyTRdsD2bS0= -github.com/containerd/containerd/api v1.8.0/go.mod h1:dFv4lt6S20wTu/hMcP4350RL87qPWLVa/OHOwmmdnYc= +github.com/containerd/containerd/api v1.9.0 h1:HZ/licowTRazus+wt9fM6r/9BQO7S0vD5lMcWspGIg0= +github.com/containerd/containerd/api v1.9.0/go.mod h1:GhghKFmTR3hNtyznBoQ0EMWr9ju5AqHjcZPsSpTKutI= github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= -github.com/containerd/ttrpc v1.2.6 h1:zG+Kn5EZ6MUYCS1t2Hmt2J4tMVaLSFEJVOraDQwNPC4= -github.com/containerd/ttrpc v1.2.6/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o= -github.com/containerd/typeurl/v2 v2.2.2 h1:3jN/k2ysKuPCsln5Qv8bzR9cxal8XjkxPogJfSNO31k= -github.com/containerd/typeurl/v2 v2.2.2/go.mod h1:95ljDnPfD3bAbDJRugOiShd/DlAAsxGtUBhJxIn7SCk= +github.com/containerd/ttrpc v1.2.7 h1:qIrroQvuOL9HQ1X6KHe2ohc7p+HP/0VE6XPU7elJRqQ= +github.com/containerd/ttrpc v1.2.7/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o= +github.com/containerd/typeurl/v2 v2.2.3 h1:yNA/94zxWdvYACdYO8zofhrTVuQY73fFU1y++dYSw40= +github.com/containerd/typeurl/v2 v2.2.3/go.mod h1:95ljDnPfD3bAbDJRugOiShd/DlAAsxGtUBhJxIn7SCk= github.com/coredns/caddy v1.1.1 h1:2eYKZT7i6yxIfGP3qLJoJ7HAsDJqYB+X68g4NYjSrE0= github.com/coredns/caddy v1.1.1/go.mod h1:A6ntJQlAWuQfFlsd9hvigKbo2WS0VUs2l1e2F+BawD4= -github.com/coredns/corefile-migration v1.0.26 h1:xiiEkVB1Dwolb24pkeDUDBfygV9/XsOSq79yFCrhptY= -github.com/coredns/corefile-migration v1.0.26/go.mod h1:56DPqONc3njpVPsdilEnfijCwNGC3/kTJLl7i7SPavY= +github.com/coredns/corefile-migration v1.0.27 h1:WIIw5sU0LfGgoGnhdrYdVcto/aWmJoGA/C62iwkU0JM= +github.com/coredns/corefile-migration v1.0.27/go.mod h1:56DPqONc3njpVPsdilEnfijCwNGC3/kTJLl7i7SPavY= github.com/coreos/go-oidc v2.3.0+incompatible h1:+5vEsrgprdLjjQ9FzIKAzQz1wwPD+83hQRfUIPh7rO0= github.com/coreos/go-oidc v2.3.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= @@ -91,8 +91,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v26.1.4+incompatible h1:vuTpXDuoga+Z38m1OZHzl7NKisKWaWlhjQk7IDPSLsU= -github.com/docker/docker v26.1.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v28.2.2+incompatible h1:CjwRSksz8Yo4+RmQ339Dp/D2tGO5JxwYeqtMOEe0LDw= +github.com/docker/docker v28.2.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -122,8 +122,8 @@ github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxI github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= @@ -151,8 +151,8 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cadvisor v0.52.1 h1:sC8SZ6jio9ds+P2dk51bgbeYeufxo55n0X3tmrpA9as= -github.com/google/cadvisor v0.52.1/go.mod h1:OAhPcx1nOm5YwMh/JhpUOMKyv1YKLRtS9KgzWPndHmA= +github.com/google/cadvisor v0.53.0 h1:pmveUw2VBlr/T2SBE9Fsp8gdLhKWyOBkECGbaas9mcI= +github.com/google/cadvisor v0.53.0/go.mod h1:Tz3zf/exzFfdWd1T/U/9eNst0ZR2C6CIV62LJATj5tg= github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= @@ -226,6 +226,7 @@ github.com/moby/ipvs v1.1.0 h1:ONN4pGaZQgAx+1Scz5RvWV4Q7Gb+mvfRh3NsPS+1XQQ= github.com/moby/ipvs v1.1.0/go.mod h1:4VJMWuf098bsUMmZEiD4Tjk/O7mOn3l1PTD3s4OoYAs= github.com/moby/spdystream v0.5.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU= github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= +github.com/moby/sys/atomicwriter v0.1.0/go.mod h1:Ul8oqv2ZMNHOceF643P6FKPXeCmYtlQMvpizfsSoaWs= github.com/moby/sys/mountinfo v0.7.2 h1:1shs6aH5s4o5H2zQLn796ADW1wMrIwHsyJ2v9KouLrg= github.com/moby/sys/mountinfo v0.7.2/go.mod h1:1YOa8w8Ih7uW0wALDUgT1dTTSBrZ+HiBLGws92L2RU4= github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= @@ -254,15 +255,15 @@ github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= -github.com/opencontainers/cgroups v0.0.1 h1:MXjMkkFpKv6kpuirUa4USFBas573sSAY082B4CiHEVA= -github.com/opencontainers/cgroups v0.0.1/go.mod h1:s8lktyhlGUqM7OSRL5P7eAW6Wb+kWPNvt4qvVfzA5vs= +github.com/opencontainers/cgroups v0.0.3 h1:Jc9dWh/0YLGjdy6J/9Ln8NM5BfTA4W2BY0GMozy3aDU= +github.com/opencontainers/cgroups v0.0.3/go.mod h1:s8lktyhlGUqM7OSRL5P7eAW6Wb+kWPNvt4qvVfzA5vs= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/opencontainers/runc v1.2.5/go.mod h1:dOQeFo29xZKBNeRBI0B19mJtfHv68YgCTh1X+YphA+4= -github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= -github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runc v1.3.0/go.mod h1:9wbWt42gV+KRxKRVVugNP6D5+PQciRbenB4fLVsqGPs= +github.com/opencontainers/runtime-spec v1.2.1 h1:S4k4ryNgEpxW1dzyqffOmhI1BHYcjzU8lpJfSlR0xww= +github.com/opencontainers/runtime-spec v1.2.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.11.1 h1:nHFvthhM0qY8/m+vfhJylliSshm8G1jJ2jDMcgULaH8= github.com/opencontainers/selinux v1.11.1/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= @@ -274,14 +275,14 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.1.0 h1:yJMy84ti9h/+OEWa752kBTKv4XC30OtVVHYv/8cTqKc= github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= -github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= -github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= -github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs= +github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= +github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -298,10 +299,11 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= -github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= -github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/cobra v1.10.0 h1:a5/WeUlSDCvV5a45ljW2ZFtV0bTDpkfSAj3uqB6Sc+0= +github.com/spf13/cobra v1.10.0/go.mod h1:9dhySC7dnTtEiqzmqfkLj47BslqLCUPMXjG2lj/NgoE= +github.com/spf13/pflag v1.0.8/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= @@ -317,8 +319,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= github.com/vishvananda/netlink v1.3.1 h1:3AEMt62VKqz90r0tmNhog0r/PpWKmrEShJU0wJW6bV0= @@ -358,25 +360,25 @@ go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelr go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful v0.44.0/go.mod h1:uq8DrRaen3suIWTpdR/JNHCGpurSvMv9D5Nr5CU5TXc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= go.opentelemetry.io/contrib/propagators/b3 v1.19.0 h1:ulz44cpm6V5oAeg5Aw9HyqGFMS6XM7untlMEhD7YzzA= go.opentelemetry.io/contrib/propagators/b3 v1.19.0/go.mod h1:OzCmE2IVS+asTI+odXQstRGVfXQ4bXv9nMBRK0nNyqQ= -go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= -go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= +go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= -go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= -go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= -go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= -go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= -go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= -go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= +go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= +go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= +go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= +go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= +go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= +go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= +go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -392,29 +394,29 @@ go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= -golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= +golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= +golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= -golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M= -golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= +golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= +golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -427,67 +429,70 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= +golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/telemetry v0.0.0-20250807160809-1a19826ec488/go.mod h1:fGb/2+tgXXjhjHsTNdVEEMZNWA0quBnfrO+AfoDSAKw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= -golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= +golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= +golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= +golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= +golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= -google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA= -google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a h1:v2PbRU4K3llS09c7zodFpNePeamkAwG3mPrAery9VeE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.72.2 h1:TdbGzwb82ty4OusHWepvFWGLgIbNo1/SUynEN0ssqv8= +google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= -gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/go-jose/go-jose.v2 v2.6.3 h1:nt80fvSDlhKWQgSWyHyy5CfmlQr+asih51R8PTWNKKs= gopkg.in/go-jose/go-jose.v2 v2.6.3/go.mod h1:zzZDPkNNw/c9IE7Z9jr11mBZQhKQTMzoEEIoEdZlFBI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f h1:SLb+kxmzfA87x4E4brQzB33VBbT2+x7Zq9ROIHmGn9Q= -k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b h1:gMplByicHV/TJBizHd9aVEsTYoJBnnUAT5MHlTkbjhQ= +k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b/go.mod h1:CgujABENc3KuTrcsdpGmrrASjtQsWCT7R99mEV4U/fM= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= -k8s.io/system-validators v1.10.1 h1:bIO3YRgxJkh/W3ghcd5ViXNPGmjwQKlHk/ySPdw6K00= -k8s.io/system-validators v1.10.1/go.mod h1:awfSS706v9R12VC7u7K89FKfqVy44G+E0L1A0FX9Wmw= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= +k8s.io/system-validators v1.11.1 h1:m/bX/WCgHTT+1YlwtTZfOFZ4NNx/LQJXPWfw3mGf+Lc= +k8s.io/system-validators v1.11.1/go.mod h1:awfSS706v9R12VC7u7K89FKfqVy44G+E0L1A0FX9Wmw= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/knftables v0.0.17 h1:wGchTyRF/iGTIjd+vRaR1m676HM7jB8soFtyr/148ic= sigs.k8s.io/knftables v0.0.17/go.mod h1:f/5ZLKYEUPUhVjUCg6l80ACdL7CIIyeL0DxfgojGRTk= sigs.k8s.io/kustomize/api v0.20.1 h1:iWP1Ydh3/lmldBnH/S5RXgT98vWYMaTUL1ADcr+Sv7I= diff --git a/go.work b/go.work index 092a6c8da38ae..bd119eefdea91 100644 --- a/go.work +++ b/go.work @@ -1,8 +1,8 @@ // This is a generated file. Do not edit directly. -go 1.24.0 +go 1.25.0 -godebug default=go1.24 +godebug default=go1.25 use ( . diff --git a/go.work.sum b/go.work.sum index cde5499207972..697f47bb4ec0e 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1,22 +1,22 @@ buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.4-20250130201111-63bb56e20495.1 h1:4erM3WLgEG/HIBrpBDmRbs1puhd7p0z7kNXDuhHthwM= -cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I= +cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.26.0 h1:f2Qw/Ehhimh5uO1fayV0QIW7DShEQqhtUfhYc+cBPlw= github.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= -github.com/aws/aws-sdk-go-v2 v1.30.1 h1:4y/5Dvfrhd1MxRDD77SrfsDaj8kUkkljU7XE83NPV+o= -github.com/aws/aws-sdk-go-v2/config v1.27.24 h1:NM9XicZ5o1CBU/MZaHwFtimRpWx9ohAUAqkG6AqSqPo= -github.com/aws/aws-sdk-go-v2/credentials v1.17.24 h1:YclAsrnb1/GTQNt2nzv+756Iw4mF8AOzcDfweWwwm/M= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 h1:Aznqksmd6Rfv2HQN9cpqIV/lQRMaIpJkLLaJ1ZI76no= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 h1:5SAoZ4jYpGH4721ZNoS1znQrhOfZinOhc4XuTXx/nVc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 h1:WIijqeaAO7TYFLbhsZmi2rgLEAtWOC1LhxCAVTJlSKw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 h1:dT3MqvGhSoaIhRseqw2I0yH81l7wiR2vjs57O51EAm8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15 h1:I9zMeF107l0rJrpnHpjEiiTSCKYAIw8mALiXcPsGBiA= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.1 h1:p1GahKIjyMDZtiKoIn0/jAj/TkMzfzndDv5+zi2Mhgc= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.2 h1:ORnrOK0C4WmYV/uYt3koHEWBLYsRDwk2Np+eEoyV4Z0= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 h1:+woJ607dllHJQtsnJLi52ycuqHMwlW+Wqm2Ppsfp4nQ= -github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE= +github.com/aws/aws-sdk-go-v2 v1.36.3 h1:mJoei2CxPutQVxaATCzDUjcZEjVRdpsiiXi2o38yqWM= +github.com/aws/aws-sdk-go-v2/config v1.29.14 h1:f+eEi/2cKCg9pqKBoAIwRGzVb70MRKqWX4dg1BDcSJM= +github.com/aws/aws-sdk-go-v2/credentials v1.17.67 h1:9KxtdcIA/5xPNQyZRgUSpYOE6j9Bc4+D7nZua0KGYOM= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0ioo/gq8Mn6u9w19Mri8DnJ15Jf0= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2F1JbDaGooxTq18wmmFzbJRfXfVfy96/1CXM= +github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 h1:1Gw+9ajCV1jogloEv1RRnvfRFia2cL6c9cuKV2Ps+G8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 h1:hXmVKytPfTy5axZ+fYbR5d0cFmC3JvwLm5kM83luako= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 h1:1XuUZ8mYJw9B6lzAkXhqHlJd/XvaX32evhproijJEZY= +github.com/aws/smithy-go v1.22.3 h1:Z//5NuZCSW6R4PhQ93hShNbyBbn8BWCmCVCt+Q8Io5k= github.com/bufbuild/protovalidate-go v0.9.1 h1:cdrIA33994yCcJyEIZRL36ZGTe9UDM/WHs5MBHEimiE= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= github.com/cilium/ebpf v0.17.3 h1:FnP4r16PWYSE4ux6zN+//jMcW4nMVRvuTLVTvCjyyjg= @@ -38,9 +38,10 @@ github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHz github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/moby/sys/atomicwriter v0.1.0 h1:kw5D/EqkBwsBFi0ss9v1VG3wIkVhzGvLklJ+w3A14Sw= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= -github.com/opencontainers/runc v1.2.5 h1:8KAkq3Wrem8bApgOHyhRI/8IeLXIfmZ6Qaw6DNSLnA4= +github.com/opencontainers/runc v1.3.0 h1:cvP7xbEvD0QQAs0nZKLzkVog2OPZhI/V2w3WmTmUSXI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= @@ -53,8 +54,7 @@ github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM= go.etcd.io/gofail v0.2.0 h1:p19drv16FKK345a09a1iubchlw/vmRuksmRzgBIGjcA= go.opentelemetry.io/contrib/detectors/gcp v1.34.0 h1:JRxssobiPg23otYU5SbWtQC//snGVIM3Tx6QRzlQBao= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= -golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 h1:zf5N6UOrA487eEFacMePxjXAJctxKmyjKUsjA11Uzuk= +golang.org/x/telemetry v0.0.0-20250807160809-1a19826ec488 h1:3doPGa+Gg4snce233aCWnbZVFsyFMo/dR40KK/6skyE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gotest.tools/v3 v3.0.2 h1:kG1BFyqVHuQoVQiR1bWGnfz/fmHvvuiSPIV7rvl360E= sigs.k8s.io/kustomize/cmd/config v0.20.1 h1:4APUORmZe2BYrsqgGfEKdd/r7gM6i43egLrUzilpiFo= diff --git a/hack/_update-generated-proto-bindings-dockerized.sh b/hack/_update-generated-proto-bindings-dockerized.sh index 9c7a7d28822a4..55cb70a650daa 100755 --- a/hack/_update-generated-proto-bindings-dockerized.sh +++ b/hack/_update-generated-proto-bindings-dockerized.sh @@ -27,12 +27,10 @@ source "${KUBE_ROOT}/hack/lib/protoc.sh" source "${KUBE_ROOT}/hack/lib/util.sh" if (( $# < 2 )); then - echo "usage: $0 [gogo|protoc] ..." + echo "usage: $0 ..." exit 1 fi -generator=$1; shift - kube::protoc::check_protoc for api; do @@ -49,16 +47,6 @@ for api; do for file in "${protos[@]}"; do dir="$(dirname "${file}")" - case "${generator}" in - gogo) - kube::protoc::generate_proto_gogo "${dir}" - ;; - protoc) - kube::protoc::generate_proto "${dir}" - ;; - *) - echo "Unknown generator ${generator}" >&2 - exit 1 - esac + kube::protoc::generate_proto "${dir}" done done diff --git a/hack/diff-protobuf.sh b/hack/diff-protobuf.sh new file mode 100755 index 0000000000000..77dc503d14725 --- /dev/null +++ b/hack/diff-protobuf.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +# Copyright 2025 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. + +if [[ $# -ne 2 ]]; then + echo "requires two arguments" + echo "" + echo "Examples:" + echo " hack/diff-protobuf.sh staging/src/k8s.io/api/testdata/v1.22.0/core.v1.CreateOptions{,.after_roundtrip}.pb" + echo "" + echo " git difftool -x hack/diff-protobuf.sh --no-prompt " + echo " git difftool -x hack/diff-protobuf.sh --no-prompt c0b7858946c253 4144c9294f7448 -- staging/src/k8s.io/api/testdata/HEAD/*.pb" + exit 1 +fi + +lhs="${1}" +rhs="${2}" +if [[ ! -f "${lhs}" && ! -f "${rhs}" ]]; then + echo "${lhs} and ${rhs} do not exist." + exit 1 +fi + +# simple case +diffcmd="diff" +if [ -t 1 ]; then + # if we're in a terminal, try to colorize + if diff --help | grep color >/dev/null; then + # diff supports --color + diffcmd="diff --color=always" + elif command -v colordiff &> /dev/null; then + # alternative color diff command + diffcmd="colordiff" + fi +fi + +echo "${BASE}" +if [[ "${lhs}" = *".pb" || "${rhs}" = *".pb" ]]; then + if ! command -v protoc &> /dev/null + then + echo "protoc command not found" + exit 1 + fi + + $diffcmd -u \ + <(tail -c +5 "${lhs}" | protoc --decode_raw) \ + <(tail -c +5 "${rhs}" | protoc --decode_raw) \ + | tail -n +3 +else + $diffcmd -u "${lhs}" "${rhs}" | tail -n +3 +fi +echo "" diff --git a/hack/ginkgo-e2e.sh b/hack/ginkgo-e2e.sh index b0fc78e6bca1b..1a4f97f18ab02 100755 --- a/hack/ginkgo-e2e.sh +++ b/hack/ginkgo-e2e.sh @@ -181,7 +181,16 @@ case "${E2E_TEST_DEBUG_TOOL:-ginkgo}" in if [[ -n "${GINKGO_PARALLEL_NODES:-}" ]]; then program+=("--nodes=${GINKGO_PARALLEL_NODES}") elif [[ ${GINKGO_PARALLEL} =~ ^[yY]$ ]]; then - program+=("--nodes=25") + if [[ "${KUBE_RACE:-}" == "-race" ]]; then + # When race detection is enabled, merely running 25 e2e.test instances was too much + # and the OOM killer shut down the Prow test pod because of the memory overhead. + # + # A CI job could control that via GINKGO_PARALLEL_NODES, but we should also have + # saner defaults which take this into account. + program+=("--nodes=10") + else + program+=("--nodes=25") + fi fi program+=("${ginkgo_args[@]:+${ginkgo_args[@]}}") ;; diff --git a/hack/golangci-hints.yaml b/hack/golangci-hints.yaml index 492f22d182174..005f869436d94 100644 --- a/hack/golangci-hints.yaml +++ b/hack/golangci-hints.yaml @@ -124,6 +124,25 @@ linters: # Exceptions for kube-api-linter. # Exceptions are used for kube-api-linter to ignore existing issues that cannot be fixed without breaking changes. + + # Pre-existing issues from the conditions linter + + # Conditions generally should be a metav1.Condition, and should not use custom condition types. + - text: "Conditions field in StorageVersionStatus|StatefulSetStatus|DeploymentStatus|DaemonSetStatus|ReplicaSetStatus|HorizontalPodAutoscalerStatus|JobStatus|CertificateSigningRequestStatus|PersistentVolumeClaimStatus|ReplicationControllerStatus|ServiceStatus|NodeStatus|NamespaceStatus|ComponentStatus|PodStatus|FlowSchemaStatus|PriorityLevelConfigurationStatus|FlowSchemaStatus|PriorityLevelConfigurationStatus|PodDisruptionBudgetStatus|AllocatedDeviceStatus|Endpoint|StatefulSetStatus|DeploymentStatus|DaemonSetStatus|ReplicaSetStatus|HorizontalPodAutoscalerStatus|JobStatus|CertificateSigningRequestStatus|PersistentVolumeClaimStatus|ReplicationControllerStatus|ServiceStatus|NodeStatus|NamespaceStatus|ComponentStatus|PodStatus|FlowSchemaStatus|PriorityLevelConfigurationStatus|FlowSchemaStatus|PriorityLevelConfigurationStatus|PodDisruptionBudgetStatus|AllocatedDeviceStatus|Endpoint|StorageVersionMigrationStatus must be a slice of metav1.Condition" + path: "staging/src/k8s.io/api/" + + # Conditions should have patch strategy markers, but changing these after shipping a client is a breaking change. + # Clients would treat these as atomic, when the patch strategy should be merge. + - text: "Conditions field in ValidatingAdmissionPolicyStatus is missing the following markers: patchStrategy=merge, patchMergeKey=type" + path: "staging/src/k8s.io/api/admissionregistration/" + - text: "Conditions field in ValidatingAdmissionPolicyStatus has incorrect tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,3,rep,name=conditions\"`" + path: "staging/src/k8s.io/api/admissionregistration/" + - text: "Conditions field in PodDisruptionBudgetStatus has incorrect tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`" + path: "staging/src/k8s.io/api/policy/" + - text: "Conditions field in AllocatedDeviceStatus is missing the following markers: patchStrategy=merge, patchMergeKey=type" + path: "staging/src/k8s.io/api/resource/" + - text: "Conditions field in AllocatedDeviceStatus has incorrect tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,5,rep,name=conditions\"`" + path: "staging/src/k8s.io/api/resource/" default: standard enable: # please keep this alphabetized @@ -173,6 +192,7 @@ linters: structured k8s.io/kms/.* structured k8s.io/apiserver/pkg/storage/value/.* structured k8s.io/apiserver/pkg/server/options/encryptionconfig/.* + structured k8s.io/kubernetes/pkg/credentialprovider/plugin/.* # The following packages have been migrated to contextual logging. # Packages matched here do not have to be listed above because @@ -200,9 +220,22 @@ linters: contextual k8s.io/kubernetes/cmd/kube-proxy/.* contextual k8s.io/kubernetes/cmd/kube-scheduler/.* contextual k8s.io/kubernetes/cmd/kubelet/.* + contextual k8s.io/kubernetes/pkg/api/.* + contextual k8s.io/kubernetes/pkg/apis/.* + contextual k8s.io/kubernetes/pkg/capabilities/.* + contextual k8s.io/kubernetes/pkg/client/.* + contextual k8s.io/kubernetes/pkg/cluster/.* contextual k8s.io/kubernetes/pkg/controller/.* + contextual k8s.io/kubernetes/pkg/features/.* + contextual k8s.io/kubernetes/pkg/fieldpath/.* + contextual k8s.io/kubernetes/pkg/generated/.* + contextual k8s.io/kubernetes/pkg/printers/.* + contextual k8s.io/kubernetes/pkg/quota/.* contextual k8s.io/kubernetes/pkg/scheduler/.* + contextual k8s.io/kubernetes/pkg/security/.* + contextual k8s.io/kubernetes/pkg/securitycontext/.* contextual k8s.io/kubernetes/test/e2e/dra/.* + contextual k8s.io/kubernetes/pkg/kubelet/certificate/.* contextual k8s.io/kubernetes/pkg/kubelet/cm/dra/.* contextual k8s.io/kubernetes/pkg/kubelet/cm/memorymanager/.* contextual k8s.io/kubernetes/pkg/kubelet/lifecycle/.* @@ -210,7 +243,9 @@ linters: contextual k8s.io/kubernetes/pkg/kubelet/clustertrustbundle/.* contextual k8s.io/kubernetes/pkg/kubelet/token/.* contextual k8s.io/kubernetes/pkg/kubelet/cadvisor/.* + contextual k8s.io/kubernetes/pkg/kubelet/config/.* contextual k8s.io/kubernetes/pkg/kubelet/oom/.* + contextual k8s.io/kubernetes/pkg/kubelet/server/.* contextual k8s.io/kubernetes/pkg/kubelet/status/.* contextual k8s.io/kubernetes/pkg/kubelet/sysctl/.* contextual k8s.io/kubernetes/pkg/kubelet/winstats/.* @@ -221,6 +256,8 @@ linters: contextual k8s.io/kubernetes/pkg/kubelet/pod/.* contextual k8s.io/kubernetes/pkg/kubelet/preemption/.* contextual k8s.io/kubernetes/pkg/kubelet/volumemanager/.* + contextual k8s.io/kubernetes/pkg/kubelet/util/.* + contextual k8s.io/kubernetes/pkg/kubelet/logs/.* # As long as contextual logging is alpha or beta, all WithName, WithValues, # NewContext calls have to go through klog. Once it is GA, we can lift @@ -252,7 +289,8 @@ linters: - '*' enable: # - "commentstart" # Ensure comments start with the serialized version of the field name. - # - "conditions" # Ensure conditions have the correct json tags and markers. + - "conditions" # Ensure conditions have the correct json tags and markers. + # - "conflictingmarkers" - Detect mutually exclusive markers on the same field. # - "integers" # Ensure only int32 and int64 are used for integers. # - "jsontags" # Ensure every field has a json tag. # - "maxlength" # Ensure all strings and arrays have maximum lengths/maximum items. ONLY for CRDs until declarative markers exist in core types. @@ -260,22 +298,55 @@ linters: # - "nofloats" # Ensure floats are not used. # - "nomaps" # Ensure maps are not used, unless they are `map[string]string` (for labels/annotations/etc). # - "nophase" # Ensure field names do not have the word "phase" in them. + # - "notimestamp" # Ensure fields are not named "timestamp", prefer "time". + # - "optionalfields" # Ensure fields marked optional have omitempty and pointers. # - "optionalorrequired" # Every field should be marked as `+optional` xor `+required`. - # - "requiredfields" # Required fields should not be pointers, and should not have `omitempty`. + # - "requiredfields" # Required fields should only be pointers when required based on the validity of the zero value, they should always have `omitempty`. + - "ssatags" # Ensure lists have a listType tag. + # - "uniquemarkers" # Ensure markers are not duplicated across field and type definitions. lintersConfig: - # conditions: - # isFirstField: Warn # Require conditions to be the first field in the status struct. - # usePatchStrategy: SuggestFix # Conditions should not use the patch strategy on CRDs. - # useProtobuf: SuggestFix # We don't use protobuf, so protobuf tags are not required. + conditions: + isFirstField: Ignore + usePatchStrategy: SuggestFix + useProtobuf: SuggestFix + # conflictingMarkers: + # conflicts: + # - name: "default_vs_required" + # sets: + # - ["default", "kubebuilder:default"] + # - ["required", "kubebuilder:validation:Required", "k8s:required"] + # description: "A field with a default value cannot be required" # jsonTags: # jsonTagRegex: "^[a-z][a-z0-9]*(?:[A-Z][a-z0-9]*)*$" # The default regex is appropriate for our use case. # nomaps: # policy: AllowStringToStringMaps # Determines how the linter should handle maps of basic types. Maps of objects are always disallowed. + # optionalFields: + # policy: AllowOptionalFields # Determines how the linter should handle optional fields.optionalfields: + # pointers: + # preference: Always | WhenRequired # Whether to always require pointers, or only when required. Defaults to `Always`. + # policy: SuggestFix | Warn # The policy for pointers in optional fields. Defaults to `SuggestFix`. + # omitempty: + # policy: SuggestFix | Warn | Ignore # The policy for omitempty in optional fields. Defaults to `SuggestFix`. + # omitzero: + # policy: SuggestFix | Warn | Forbid # The policy for omitzero in optional fields. Defaults to `SuggestFix`. # optionalOrRequired: # preferredOptionalMarker: optional # The preferred optional marker to use, fixes will suggest to use this marker. Defaults to `optional`. - # preferredRequiredMarker: required # The preferred required marker to use, fixes will suggest to use this marker. Defaults to `required`. + # preferredRequiredMarker: required # The preferred required marker to use, fixes will suggest to use this marker. Defaults to `required`. + # policy: AllowOptionalFields # Determines how the linter should handle optional fields. # requiredFields: - # pointerPolicy: SuggestFix # Defaults to `SuggestFix`. We want our required fields to not be pointers. + # pointers: + # policy: SuggestFix | Warn # The policy for pointers in required fields. Defaults to `SuggestFix`. + # omitempty: + # policy: SuggestFix | Warn | Ignore # The policy for omitempty in required fields. Defaults to `SuggestFix`. + # omitzero: + # policy: SuggestFix | Warn | Forbid # The policy for omitzero in required fields. Defaults to `SuggestFix`. + ssatags: + listTypeSetUsage: Ignore # The policy for listType=set usage on object arrays. Defaults to `Warn`. + # uniquemarkers: + # customMarkers: + # - identifier: custom:SomeCustomMarker + # attributes: + # - fruit depguard: rules: go-cmp: @@ -317,5 +388,6 @@ linters: staticcheck: checks: - "all" + - "-QF1008" # Omit embedded fields from selector expression testifylint: enable-all: true diff --git a/hack/golangci.yaml b/hack/golangci.yaml index 4c1725055e1cc..3efcb8035e697 100644 --- a/hack/golangci.yaml +++ b/hack/golangci.yaml @@ -140,6 +140,25 @@ linters: # Exceptions for kube-api-linter. # Exceptions are used for kube-api-linter to ignore existing issues that cannot be fixed without breaking changes. + + # Pre-existing issues from the conditions linter + + # Conditions generally should be a metav1.Condition, and should not use custom condition types. + - text: "Conditions field in StorageVersionStatus|StatefulSetStatus|DeploymentStatus|DaemonSetStatus|ReplicaSetStatus|HorizontalPodAutoscalerStatus|JobStatus|CertificateSigningRequestStatus|PersistentVolumeClaimStatus|ReplicationControllerStatus|ServiceStatus|NodeStatus|NamespaceStatus|ComponentStatus|PodStatus|FlowSchemaStatus|PriorityLevelConfigurationStatus|FlowSchemaStatus|PriorityLevelConfigurationStatus|PodDisruptionBudgetStatus|AllocatedDeviceStatus|Endpoint|StatefulSetStatus|DeploymentStatus|DaemonSetStatus|ReplicaSetStatus|HorizontalPodAutoscalerStatus|JobStatus|CertificateSigningRequestStatus|PersistentVolumeClaimStatus|ReplicationControllerStatus|ServiceStatus|NodeStatus|NamespaceStatus|ComponentStatus|PodStatus|FlowSchemaStatus|PriorityLevelConfigurationStatus|FlowSchemaStatus|PriorityLevelConfigurationStatus|PodDisruptionBudgetStatus|AllocatedDeviceStatus|Endpoint|StorageVersionMigrationStatus must be a slice of metav1.Condition" + path: "staging/src/k8s.io/api/" + + # Conditions should have patch strategy markers, but changing these after shipping a client is a breaking change. + # Clients would treat these as atomic, when the patch strategy should be merge. + - text: "Conditions field in ValidatingAdmissionPolicyStatus is missing the following markers: patchStrategy=merge, patchMergeKey=type" + path: "staging/src/k8s.io/api/admissionregistration/" + - text: "Conditions field in ValidatingAdmissionPolicyStatus has incorrect tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,3,rep,name=conditions\"`" + path: "staging/src/k8s.io/api/admissionregistration/" + - text: "Conditions field in PodDisruptionBudgetStatus has incorrect tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`" + path: "staging/src/k8s.io/api/policy/" + - text: "Conditions field in AllocatedDeviceStatus is missing the following markers: patchStrategy=merge, patchMergeKey=type" + path: "staging/src/k8s.io/api/resource/" + - text: "Conditions field in AllocatedDeviceStatus has incorrect tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,5,rep,name=conditions\"`" + path: "staging/src/k8s.io/api/resource/" default: none enable: # please keep this alphabetized @@ -187,6 +206,7 @@ linters: structured k8s.io/kms/.* structured k8s.io/apiserver/pkg/storage/value/.* structured k8s.io/apiserver/pkg/server/options/encryptionconfig/.* + structured k8s.io/kubernetes/pkg/credentialprovider/plugin/.* # The following packages have been migrated to contextual logging. # Packages matched here do not have to be listed above because @@ -214,9 +234,22 @@ linters: contextual k8s.io/kubernetes/cmd/kube-proxy/.* contextual k8s.io/kubernetes/cmd/kube-scheduler/.* contextual k8s.io/kubernetes/cmd/kubelet/.* + contextual k8s.io/kubernetes/pkg/api/.* + contextual k8s.io/kubernetes/pkg/apis/.* + contextual k8s.io/kubernetes/pkg/capabilities/.* + contextual k8s.io/kubernetes/pkg/client/.* + contextual k8s.io/kubernetes/pkg/cluster/.* contextual k8s.io/kubernetes/pkg/controller/.* + contextual k8s.io/kubernetes/pkg/features/.* + contextual k8s.io/kubernetes/pkg/fieldpath/.* + contextual k8s.io/kubernetes/pkg/generated/.* + contextual k8s.io/kubernetes/pkg/printers/.* + contextual k8s.io/kubernetes/pkg/quota/.* contextual k8s.io/kubernetes/pkg/scheduler/.* + contextual k8s.io/kubernetes/pkg/security/.* + contextual k8s.io/kubernetes/pkg/securitycontext/.* contextual k8s.io/kubernetes/test/e2e/dra/.* + contextual k8s.io/kubernetes/pkg/kubelet/certificate/.* contextual k8s.io/kubernetes/pkg/kubelet/cm/dra/.* contextual k8s.io/kubernetes/pkg/kubelet/cm/memorymanager/.* contextual k8s.io/kubernetes/pkg/kubelet/lifecycle/.* @@ -224,7 +257,9 @@ linters: contextual k8s.io/kubernetes/pkg/kubelet/clustertrustbundle/.* contextual k8s.io/kubernetes/pkg/kubelet/token/.* contextual k8s.io/kubernetes/pkg/kubelet/cadvisor/.* + contextual k8s.io/kubernetes/pkg/kubelet/config/.* contextual k8s.io/kubernetes/pkg/kubelet/oom/.* + contextual k8s.io/kubernetes/pkg/kubelet/server/.* contextual k8s.io/kubernetes/pkg/kubelet/status/.* contextual k8s.io/kubernetes/pkg/kubelet/sysctl/.* contextual k8s.io/kubernetes/pkg/kubelet/winstats/.* @@ -235,6 +270,8 @@ linters: contextual k8s.io/kubernetes/pkg/kubelet/pod/.* contextual k8s.io/kubernetes/pkg/kubelet/preemption/.* contextual k8s.io/kubernetes/pkg/kubelet/volumemanager/.* + contextual k8s.io/kubernetes/pkg/kubelet/util/.* + contextual k8s.io/kubernetes/pkg/kubelet/logs/.* # As long as contextual logging is alpha or beta, all WithName, WithValues, # NewContext calls have to go through klog. Once it is GA, we can lift @@ -266,7 +303,8 @@ linters: - '*' enable: # - "commentstart" # Ensure comments start with the serialized version of the field name. - # - "conditions" # Ensure conditions have the correct json tags and markers. + - "conditions" # Ensure conditions have the correct json tags and markers. + # - "conflictingmarkers" - Detect mutually exclusive markers on the same field. # - "integers" # Ensure only int32 and int64 are used for integers. # - "jsontags" # Ensure every field has a json tag. # - "maxlength" # Ensure all strings and arrays have maximum lengths/maximum items. ONLY for CRDs until declarative markers exist in core types. @@ -274,22 +312,55 @@ linters: # - "nofloats" # Ensure floats are not used. # - "nomaps" # Ensure maps are not used, unless they are `map[string]string` (for labels/annotations/etc). # - "nophase" # Ensure field names do not have the word "phase" in them. + # - "notimestamp" # Ensure fields are not named "timestamp", prefer "time". + # - "optionalfields" # Ensure fields marked optional have omitempty and pointers. # - "optionalorrequired" # Every field should be marked as `+optional` xor `+required`. - # - "requiredfields" # Required fields should not be pointers, and should not have `omitempty`. + # - "requiredfields" # Required fields should only be pointers when required based on the validity of the zero value, they should always have `omitempty`. + - "ssatags" # Ensure lists have a listType tag. + # - "uniquemarkers" # Ensure markers are not duplicated across field and type definitions. lintersConfig: - # conditions: - # isFirstField: Warn # Require conditions to be the first field in the status struct. - # usePatchStrategy: SuggestFix # Conditions should not use the patch strategy on CRDs. - # useProtobuf: SuggestFix # We don't use protobuf, so protobuf tags are not required. + conditions: + isFirstField: Ignore + usePatchStrategy: SuggestFix + useProtobuf: SuggestFix + # conflictingMarkers: + # conflicts: + # - name: "default_vs_required" + # sets: + # - ["default", "kubebuilder:default"] + # - ["required", "kubebuilder:validation:Required", "k8s:required"] + # description: "A field with a default value cannot be required" # jsonTags: # jsonTagRegex: "^[a-z][a-z0-9]*(?:[A-Z][a-z0-9]*)*$" # The default regex is appropriate for our use case. # nomaps: # policy: AllowStringToStringMaps # Determines how the linter should handle maps of basic types. Maps of objects are always disallowed. + # optionalFields: + # policy: AllowOptionalFields # Determines how the linter should handle optional fields.optionalfields: + # pointers: + # preference: Always | WhenRequired # Whether to always require pointers, or only when required. Defaults to `Always`. + # policy: SuggestFix | Warn # The policy for pointers in optional fields. Defaults to `SuggestFix`. + # omitempty: + # policy: SuggestFix | Warn | Ignore # The policy for omitempty in optional fields. Defaults to `SuggestFix`. + # omitzero: + # policy: SuggestFix | Warn | Forbid # The policy for omitzero in optional fields. Defaults to `SuggestFix`. # optionalOrRequired: # preferredOptionalMarker: optional # The preferred optional marker to use, fixes will suggest to use this marker. Defaults to `optional`. - # preferredRequiredMarker: required # The preferred required marker to use, fixes will suggest to use this marker. Defaults to `required`. + # preferredRequiredMarker: required # The preferred required marker to use, fixes will suggest to use this marker. Defaults to `required`. + # policy: AllowOptionalFields # Determines how the linter should handle optional fields. # requiredFields: - # pointerPolicy: SuggestFix # Defaults to `SuggestFix`. We want our required fields to not be pointers. + # pointers: + # policy: SuggestFix | Warn # The policy for pointers in required fields. Defaults to `SuggestFix`. + # omitempty: + # policy: SuggestFix | Warn | Ignore # The policy for omitempty in required fields. Defaults to `SuggestFix`. + # omitzero: + # policy: SuggestFix | Warn | Forbid # The policy for omitzero in required fields. Defaults to `SuggestFix`. + ssatags: + listTypeSetUsage: Ignore # The policy for listType=set usage on object arrays. Defaults to `Warn`. + # uniquemarkers: + # customMarkers: + # - identifier: custom:SomeCustomMarker + # attributes: + # - fruit depguard: rules: go-cmp: @@ -316,10 +387,11 @@ linters: - pattern: \.Add$ pkg: ^k8s\.io/component-base/featuregate$ msg: should not use Add, use AddVersioned instead - gocritic: - enabled-checks: - - equalFold + gocritic: + enabled-checks: + - equalFold - boolExprSimplify + - deprecatedComment revive: # Only these rules are enabled. rules: @@ -329,6 +401,7 @@ linters: staticcheck: checks: - "all" + - "-QF1008" # Omit embedded fields from selector expression - "-QF1001" # Apply De Morgan’s law - "-QF1002" # Convert untagged switch to tagged switch - "-QF1003" # Convert if/else-if chain to tagged switch diff --git a/hack/golangci.yaml.in b/hack/golangci.yaml.in index 0b6797cdcdb1c..5778faf335b23 100644 --- a/hack/golangci.yaml.in +++ b/hack/golangci.yaml.in @@ -237,10 +237,11 @@ linters: msg: "it does not produce a good failure message - use BeFalseBecause with an explicit printf-style failure message instead, or plain Go: if ... { ginkgo.Fail(...) }" {{- end}} {{- if .Base }} - gocritic: - enabled-checks: - - equalFold - - boolExprSimplify + gocritic: + enabled-checks: + - equalFold + - boolExprSimplify + - deprecatedComment {{- end}} revive: # Only these rules are enabled. @@ -251,6 +252,7 @@ linters: staticcheck: checks: - "all" + - "-QF1008" # Omit embedded fields from selector expression {{- if .Base }} - "-QF1001" # Apply De Morgan’s law - "-QF1002" # Convert untagged switch to tagged switch diff --git a/hack/jenkins/test-cmd-dockerized.sh b/hack/jenkins/test-cmd-dockerized.sh index 1dcb47a503c74..78792a574ecbb 100755 --- a/hack/jenkins/test-cmd-dockerized.sh +++ b/hack/jenkins/test-cmd-dockerized.sh @@ -17,7 +17,6 @@ set -o errexit set -o nounset set -o pipefail -set -o xtrace # Runs test-cmd, intended to be run in prow.k8s.io diff --git a/hack/jenkins/test-dockerized.sh b/hack/jenkins/test-dockerized.sh index 7a0c527beb29b..d118b3b3fdb42 100755 --- a/hack/jenkins/test-dockerized.sh +++ b/hack/jenkins/test-dockerized.sh @@ -17,7 +17,6 @@ set -o errexit set -o nounset set -o pipefail -set -o xtrace # Runs test-cmd and test-integration, intended to be run in prow.k8s.io diff --git a/hack/jenkins/test-integration-dockerized.sh b/hack/jenkins/test-integration-dockerized.sh index fe8c558ccece8..25f6f1b5fde44 100755 --- a/hack/jenkins/test-integration-dockerized.sh +++ b/hack/jenkins/test-integration-dockerized.sh @@ -17,7 +17,6 @@ set -o errexit set -o nounset set -o pipefail -set -o xtrace # Runs test-integration # This script is intended to be run from prow.k8s.io diff --git a/hack/kube-api-linter/exceptions.yaml b/hack/kube-api-linter/exceptions.yaml index 301d5f6738307..a5da9f67372e9 100644 --- a/hack/kube-api-linter/exceptions.yaml +++ b/hack/kube-api-linter/exceptions.yaml @@ -1,2 +1,21 @@ # Exceptions for kube-api-linter. # Exceptions are used for kube-api-linter to ignore existing issues that cannot be fixed without breaking changes. + +# Pre-existing issues from the conditions linter + +# Conditions generally should be a metav1.Condition, and should not use custom condition types. +- text: "Conditions field in StorageVersionStatus|StatefulSetStatus|DeploymentStatus|DaemonSetStatus|ReplicaSetStatus|HorizontalPodAutoscalerStatus|JobStatus|CertificateSigningRequestStatus|PersistentVolumeClaimStatus|ReplicationControllerStatus|ServiceStatus|NodeStatus|NamespaceStatus|ComponentStatus|PodStatus|FlowSchemaStatus|PriorityLevelConfigurationStatus|FlowSchemaStatus|PriorityLevelConfigurationStatus|PodDisruptionBudgetStatus|AllocatedDeviceStatus|Endpoint|StatefulSetStatus|DeploymentStatus|DaemonSetStatus|ReplicaSetStatus|HorizontalPodAutoscalerStatus|JobStatus|CertificateSigningRequestStatus|PersistentVolumeClaimStatus|ReplicationControllerStatus|ServiceStatus|NodeStatus|NamespaceStatus|ComponentStatus|PodStatus|FlowSchemaStatus|PriorityLevelConfigurationStatus|FlowSchemaStatus|PriorityLevelConfigurationStatus|PodDisruptionBudgetStatus|AllocatedDeviceStatus|Endpoint|StorageVersionMigrationStatus must be a slice of metav1.Condition" + path: "staging/src/k8s.io/api/" + +# Conditions should have patch strategy markers, but changing these after shipping a client is a breaking change. +# Clients would treat these as atomic, when the patch strategy should be merge. +- text: "Conditions field in ValidatingAdmissionPolicyStatus is missing the following markers: patchStrategy=merge, patchMergeKey=type" + path: "staging/src/k8s.io/api/admissionregistration/" +- text: "Conditions field in ValidatingAdmissionPolicyStatus has incorrect tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,3,rep,name=conditions\"`" + path: "staging/src/k8s.io/api/admissionregistration/" +- text: "Conditions field in PodDisruptionBudgetStatus has incorrect tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`" + path: "staging/src/k8s.io/api/policy/" +- text: "Conditions field in AllocatedDeviceStatus is missing the following markers: patchStrategy=merge, patchMergeKey=type" + path: "staging/src/k8s.io/api/resource/" +- text: "Conditions field in AllocatedDeviceStatus has incorrect tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,5,rep,name=conditions\"`" + path: "staging/src/k8s.io/api/resource/" diff --git a/hack/kube-api-linter/kube-api-linter.yaml b/hack/kube-api-linter/kube-api-linter.yaml index 2ad2fbdcd1237..dd4f68be6be88 100644 --- a/hack/kube-api-linter/kube-api-linter.yaml +++ b/hack/kube-api-linter/kube-api-linter.yaml @@ -4,7 +4,8 @@ linters: - '*' enable: # - "commentstart" # Ensure comments start with the serialized version of the field name. - # - "conditions" # Ensure conditions have the correct json tags and markers. + - "conditions" # Ensure conditions have the correct json tags and markers. + # - "conflictingmarkers" - Detect mutually exclusive markers on the same field. # - "integers" # Ensure only int32 and int64 are used for integers. # - "jsontags" # Ensure every field has a json tag. # - "maxlength" # Ensure all strings and arrays have maximum lengths/maximum items. ONLY for CRDs until declarative markers exist in core types. @@ -12,19 +13,52 @@ linters: # - "nofloats" # Ensure floats are not used. # - "nomaps" # Ensure maps are not used, unless they are `map[string]string` (for labels/annotations/etc). # - "nophase" # Ensure field names do not have the word "phase" in them. + # - "notimestamp" # Ensure fields are not named "timestamp", prefer "time". + # - "optionalfields" # Ensure fields marked optional have omitempty and pointers. # - "optionalorrequired" # Every field should be marked as `+optional` xor `+required`. - # - "requiredfields" # Required fields should not be pointers, and should not have `omitempty`. + # - "requiredfields" # Required fields should only be pointers when required based on the validity of the zero value, they should always have `omitempty`. + - "ssatags" # Ensure lists have a listType tag. + # - "uniquemarkers" # Ensure markers are not duplicated across field and type definitions. lintersConfig: - # conditions: - # isFirstField: Warn # Require conditions to be the first field in the status struct. - # usePatchStrategy: SuggestFix # Conditions should not use the patch strategy on CRDs. - # useProtobuf: SuggestFix # We don't use protobuf, so protobuf tags are not required. + conditions: + isFirstField: Ignore + usePatchStrategy: SuggestFix + useProtobuf: SuggestFix + # conflictingMarkers: + # conflicts: + # - name: "default_vs_required" + # sets: + # - ["default", "kubebuilder:default"] + # - ["required", "kubebuilder:validation:Required", "k8s:required"] + # description: "A field with a default value cannot be required" # jsonTags: # jsonTagRegex: "^[a-z][a-z0-9]*(?:[A-Z][a-z0-9]*)*$" # The default regex is appropriate for our use case. # nomaps: # policy: AllowStringToStringMaps # Determines how the linter should handle maps of basic types. Maps of objects are always disallowed. + # optionalFields: + # policy: AllowOptionalFields # Determines how the linter should handle optional fields.optionalfields: + # pointers: + # preference: Always | WhenRequired # Whether to always require pointers, or only when required. Defaults to `Always`. + # policy: SuggestFix | Warn # The policy for pointers in optional fields. Defaults to `SuggestFix`. + # omitempty: + # policy: SuggestFix | Warn | Ignore # The policy for omitempty in optional fields. Defaults to `SuggestFix`. + # omitzero: + # policy: SuggestFix | Warn | Forbid # The policy for omitzero in optional fields. Defaults to `SuggestFix`. # optionalOrRequired: # preferredOptionalMarker: optional # The preferred optional marker to use, fixes will suggest to use this marker. Defaults to `optional`. - # preferredRequiredMarker: required # The preferred required marker to use, fixes will suggest to use this marker. Defaults to `required`. + # preferredRequiredMarker: required # The preferred required marker to use, fixes will suggest to use this marker. Defaults to `required`. + # policy: AllowOptionalFields # Determines how the linter should handle optional fields. # requiredFields: - # pointerPolicy: SuggestFix # Defaults to `SuggestFix`. We want our required fields to not be pointers. + # pointers: + # policy: SuggestFix | Warn # The policy for pointers in required fields. Defaults to `SuggestFix`. + # omitempty: + # policy: SuggestFix | Warn | Ignore # The policy for omitempty in required fields. Defaults to `SuggestFix`. + # omitzero: + # policy: SuggestFix | Warn | Forbid # The policy for omitzero in required fields. Defaults to `SuggestFix`. + ssatags: + listTypeSetUsage: Ignore # The policy for listType=set usage on object arrays. Defaults to `Warn`. + # uniquemarkers: + # customMarkers: + # - identifier: custom:SomeCustomMarker + # attributes: + # - fruit diff --git a/hack/lib/etcd.sh b/hack/lib/etcd.sh index c6fc45a5fab63..6e99d244c808b 100755 --- a/hack/lib/etcd.sh +++ b/hack/lib/etcd.sh @@ -16,7 +16,7 @@ # A set of helpers for starting/running etcd for tests -ETCD_VERSION=${ETCD_VERSION:-3.6.4} +ETCD_VERSION=${ETCD_VERSION:-3.6.5} ETCD_HOST=${ETCD_HOST:-127.0.0.1} ETCD_PORT=${ETCD_PORT:-2379} # This is intentionally not called ETCD_LOG_LEVEL: diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index e4d97707cc5aa..bb7a7a697dedd 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -568,7 +568,7 @@ EOF local go_version IFS=" " read -ra go_version <<< "$(GOFLAGS='' go version)" local minimum_go_version - minimum_go_version=go1.24 + minimum_go_version=go1.25 if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then kube::log::usage_from_stdin </dev/null 2>&1; then - GOTOOLCHAIN="$(kube::golang::hack_tools_gotoolchain)" go -C "${KUBE_ROOT}/hack/tools" install ./ncpu || echo "Will not automatically set GOMAXPROCS" - fi - if command -v ncpu >/dev/null 2>&1; then - GOMAXPROCS=$(ncpu) - export GOMAXPROCS - kube::log::status "Set GOMAXPROCS automatically to ${GOMAXPROCS}" - fi - fi -} - # This will take binaries from $GOPATH/bin and copy them to the appropriate # place in ${KUBE_OUTPUT_BIN} # @@ -830,13 +815,13 @@ kube::golang::build_binaries_for_platform() { for binary in "${binaries[@]}"; do if [[ "${binary}" =~ ".test"$ ]]; then tests+=("${binary}") - kube::log::info " ${binary} (test)" + kube::log::info " ${binary} (test${KUBE_RACE:+, race detection})" elif kube::golang::is_statically_linked "${binary}"; then statics+=("${binary}") kube::log::info " ${binary} (static)" else nonstatics+=("${binary}") - kube::log::info " ${binary} (non-static)" + kube::log::info " ${binary} (non-static${KUBE_RACE:+, race detection})" fi done @@ -862,6 +847,9 @@ kube::golang::build_binaries_for_platform() { -ldflags="${goldflags}" -tags="${gotags:-}" ) + if [[ -n "${KUBE_RACE:-}" ]]; then + build_args+=("${KUBE_RACE}") + fi kube::golang::build_some_binaries "${nonstatics[@]}" fi @@ -871,13 +859,18 @@ kube::golang::build_binaries_for_platform() { testpkg=$(dirname "${test}") mkdir -p "$(dirname "${outfile}")" - go test -c \ - ${goflags:+"${goflags[@]}"} \ - -gcflags="${gogcflags}" \ - -ldflags="${goldflags}" \ - -tags="${gotags:-}" \ - -o "${outfile}" \ - "${testpkg}" + build_args=( + -c + ${goflags:+"${goflags[@]}"} + -gcflags="${gogcflags}" + -ldflags="${goldflags}" + -tags="${gotags:-}" + -o "${outfile}" + ) + if [[ -n "${KUBE_RACE:-}" ]]; then + build_args+=("${KUBE_RACE}") + fi + go test "${build_args[@]}" "${testpkg}" done } diff --git a/hack/lib/logging.sh b/hack/lib/logging.sh index 15a286cea7850..4b6428232a3e4 100644 --- a/hack/lib/logging.sh +++ b/hack/lib/logging.sh @@ -169,3 +169,13 @@ kube::log::status() { echo " ${message}" done } + +# Log a command and run it. Uses a subshell which gets replaced by the command after logging. +kube::log::run() ( + V="${V:-0}" + if (( KUBE_VERBOSE >= V )); then + timestamp=$(date +"[%m%d %H:%M:%S]") + echo "+++ ${timestamp} ${*}" + fi + exec "${@}" +) diff --git a/hack/lib/protoc.sh b/hack/lib/protoc.sh index 304d71bbbbcd4..3a49a92d846f5 100644 --- a/hack/lib/protoc.sh +++ b/hack/lib/protoc.sh @@ -42,20 +42,6 @@ function kube::protoc::generate_proto() { kube::protoc::format "${package}" } -# Generates $1/api.pb.go from the protobuf file $1/api.proto -# and formats it correctly -# $1: Full path to the directory where the api.proto file is -function kube::protoc::generate_proto_gogo() { - kube::golang::setup_env - GOPROXY=off go install k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo - - kube::protoc::check_protoc - - local package=${1} - kube::protoc::protoc_gogo "${package}" - kube::protoc::format "${package}" -} - # Checks that the current protoc version matches the required version and # exit 1 if it's not the case function kube::protoc::check_protoc() { @@ -70,29 +56,6 @@ function kube::protoc::check_protoc() { # Generates $1/api.pb.go from the protobuf file $1/api.proto # $1: Full path to the directory where the api.proto file is -function kube::protoc::protoc_gogo() { - local package=${1} - gogopath=$(dirname "$(kube::util::find-binary "protoc-gen-gogo")") - - ( - cd "${package}" - - # This invocation of --gogo_out produces its output in the current - # directory (despite gogo docs saying it would be source-relative, it - # isn't). The inputs to this function do not all have a common root, so - # this works best for all inputs. - PATH="${gogopath}:${PATH}" protoc \ - --proto_path="$(pwd -P)" \ - --proto_path="${KUBE_ROOT}/vendor" \ - --proto_path="${KUBE_ROOT}/staging/src" \ - --proto_path="${KUBE_ROOT}/third_party/protobuf" \ - --gogo_out=paths=source_relative,plugins=grpc:. \ - api.proto - ) -} - -# Generates $1/api.pb.go from the protobuf file $1/api.proto without using gogo -# $1: Full path to the directory where the api.proto file is function kube::protoc::protoc() { local package=${1} diff --git a/hack/lib/verify-generated.sh b/hack/lib/verify-generated.sh index 4770f99ca5c47..c795c15a5149a 100755 --- a/hack/lib/verify-generated.sh +++ b/hack/lib/verify-generated.sh @@ -39,7 +39,7 @@ kube::verify::generated() { _tmpdir="$(kube::realpath "$(mktemp -d -t "verify-generated-$(basename "$1").XXXXXX")")" git worktree add -f -q "${_tmpdir}" HEAD - kube::util::trap_add "git worktree remove -f ${_tmpdir}" EXIT + kube::util::trap_add "git worktree remove -f ${_tmpdir:?}; rm -rf ${_tmpdir:?}" EXIT cd "${_tmpdir}" # Update generated files. diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index fe6616f69ed0a..4f38b1b600410 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -59,7 +59,7 @@ LIMITED_SWAP=${LIMITED_SWAP:-""} # required for cni installation CNI_CONFIG_DIR=${CNI_CONFIG_DIR:-/etc/cni/net.d} -CNI_PLUGINS_VERSION=${CNI_PLUGINS_VERSION:-"v1.7.1"} +CNI_PLUGINS_VERSION=${CNI_PLUGINS_VERSION:-"v1.8.0"} # The arch of the CNI binary, if not set, will be fetched based on the value of `uname -m` CNI_TARGETARCH=${CNI_TARGETARCH:-""} CNI_PLUGINS_URL="https://github.com/containernetworking/plugins/releases/download" @@ -670,6 +670,7 @@ EOF --egress-selector-config-file="${EGRESS_SELECTOR_CONFIG_FILE:-}" \ --client-ca-file="${CERT_DIR}/client-ca.crt" \ --kubelet-client-certificate="${CERT_DIR}/client-kube-apiserver.crt" \ + --kubelet-certificate-authority="${CLUSTER_SIGNING_CERT_FILE}" \ --kubelet-client-key="${CERT_DIR}/client-kube-apiserver.key" \ --kubelet-port="${KUBELET_PORT}" \ --kubelet-read-only-port="${KUBELET_READ_ONLY_PORT}" \ @@ -794,6 +795,20 @@ function start_cloud_controller_manager { export CLOUD_CTLRMGR_PID=$! } +function wait_node_csr() { + local interval_time=2 + local csr_approved_time=300 + local newline='"\n"' + local unapproved_csr_names="--field-selector='spec.signerName=kubernetes.io/kubelet-serving' -o go-template='{{range .items}}{{if not .status}}{{.metadata.name}}{{${newline}}}{{end}}{{end}}" + local csr_approved="${KUBECTL} --kubeconfig '${CERT_DIR}/admin.kubeconfig' get csr ${unapproved_csr_names}' | xargs --no-run-if-empty ${KUBECTL} --kubeconfig '${CERT_DIR}/admin.kubeconfig' certificate approve | grep csr" + kube::util::wait_for_success "$csr_approved_time" "$interval_time" "$csr_approved" + if [ $? == "1" ]; then + echo "time out on waiting for CSR approval" + exit 1 + fi + echo "kubelet CSR approved" +} + function wait_node_ready(){ if [[ -n "${DRY_RUN}" ]]; then return @@ -923,6 +938,7 @@ readOnlyPort: ${KUBELET_READ_ONLY_PORT} healthzPort: ${KUBELET_HEALTHZ_PORT} healthzBindAddress: ${KUBELET_HOST} rotateCertificates: true +serverTLSBootstrap: true runtimeRequestTimeout: "${RUNTIME_REQUEST_TIMEOUT}" staticPodPath: "${POD_MANIFEST_PATH}" resolvConf: "${KUBELET_RESOLV_CONF}" @@ -1457,6 +1473,7 @@ if [[ "${START_MODE}" != *"nokubelet"* ]]; then Linux) install_cni_if_needed start_kubelet + wait_node_csr ;; *) print_color "Unsupported host OS. Must be Linux or Mac OS X, kubelet aborted." diff --git a/hack/logcheck.conf b/hack/logcheck.conf index 3fc412754c0c1..6b8a624b5fe17 100644 --- a/hack/logcheck.conf +++ b/hack/logcheck.conf @@ -19,6 +19,7 @@ structured k8s.io/kubernetes/pkg/proxy/.* structured k8s.io/kms/.* structured k8s.io/apiserver/pkg/storage/value/.* structured k8s.io/apiserver/pkg/server/options/encryptionconfig/.* +structured k8s.io/kubernetes/pkg/credentialprovider/plugin/.* # The following packages have been migrated to contextual logging. # Packages matched here do not have to be listed above because @@ -46,9 +47,22 @@ contextual k8s.io/sample-controller/.* contextual k8s.io/kubernetes/cmd/kube-proxy/.* contextual k8s.io/kubernetes/cmd/kube-scheduler/.* contextual k8s.io/kubernetes/cmd/kubelet/.* +contextual k8s.io/kubernetes/pkg/api/.* +contextual k8s.io/kubernetes/pkg/apis/.* +contextual k8s.io/kubernetes/pkg/capabilities/.* +contextual k8s.io/kubernetes/pkg/client/.* +contextual k8s.io/kubernetes/pkg/cluster/.* contextual k8s.io/kubernetes/pkg/controller/.* +contextual k8s.io/kubernetes/pkg/features/.* +contextual k8s.io/kubernetes/pkg/fieldpath/.* +contextual k8s.io/kubernetes/pkg/generated/.* +contextual k8s.io/kubernetes/pkg/printers/.* +contextual k8s.io/kubernetes/pkg/quota/.* contextual k8s.io/kubernetes/pkg/scheduler/.* +contextual k8s.io/kubernetes/pkg/security/.* +contextual k8s.io/kubernetes/pkg/securitycontext/.* contextual k8s.io/kubernetes/test/e2e/dra/.* +contextual k8s.io/kubernetes/pkg/kubelet/certificate/.* contextual k8s.io/kubernetes/pkg/kubelet/cm/dra/.* contextual k8s.io/kubernetes/pkg/kubelet/cm/memorymanager/.* contextual k8s.io/kubernetes/pkg/kubelet/lifecycle/.* @@ -56,7 +70,9 @@ contextual k8s.io/kubernetes/pkg/kubelet/pleg/.* contextual k8s.io/kubernetes/pkg/kubelet/clustertrustbundle/.* contextual k8s.io/kubernetes/pkg/kubelet/token/.* contextual k8s.io/kubernetes/pkg/kubelet/cadvisor/.* +contextual k8s.io/kubernetes/pkg/kubelet/config/.* contextual k8s.io/kubernetes/pkg/kubelet/oom/.* +contextual k8s.io/kubernetes/pkg/kubelet/server/.* contextual k8s.io/kubernetes/pkg/kubelet/status/.* contextual k8s.io/kubernetes/pkg/kubelet/sysctl/.* contextual k8s.io/kubernetes/pkg/kubelet/winstats/.* @@ -67,6 +83,8 @@ contextual k8s.io/kubernetes/pkg/kubelet/nodeshutdown/.* contextual k8s.io/kubernetes/pkg/kubelet/pod/.* contextual k8s.io/kubernetes/pkg/kubelet/preemption/.* contextual k8s.io/kubernetes/pkg/kubelet/volumemanager/.* +contextual k8s.io/kubernetes/pkg/kubelet/util/.* +contextual k8s.io/kubernetes/pkg/kubelet/logs/.* # As long as contextual logging is alpha or beta, all WithName, WithValues, # NewContext calls have to go through klog. Once it is GA, we can lift diff --git a/hack/make-rules/test-e2e-node.sh b/hack/make-rules/test-e2e-node.sh index 0ef5480c4daab..b42fd6d71318d 100755 --- a/hack/make-rules/test-e2e-node.sh +++ b/hack/make-rules/test-e2e-node.sh @@ -18,7 +18,6 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../.. source "${KUBE_ROOT}/hack/lib/init.sh" kube::golang::setup_env -kube::golang::setup_gomaxprocs # start the cache mutation detector by default so that cache mutators will be found KUBE_CACHE_MUTATION_DETECTOR="${KUBE_CACHE_MUTATION_DETECTOR:-true}" diff --git a/hack/make-rules/test-integration.sh b/hack/make-rules/test-integration.sh index ae208fa359115..7fca54e46c9a7 100755 --- a/hack/make-rules/test-integration.sh +++ b/hack/make-rules/test-integration.sh @@ -22,9 +22,10 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../.. source "${KUBE_ROOT}/hack/lib/init.sh" kube::golang::setup_env -kube::golang::setup_gomaxprocs kube::util::require-jq +set -x + # start the cache mutation detector by default so that cache mutators will be found KUBE_CACHE_MUTATION_DETECTOR="${KUBE_CACHE_MUTATION_DETECTOR:-true}" export KUBE_CACHE_MUTATION_DETECTOR @@ -47,6 +48,8 @@ KUBE_TEST_ARGS=${KUBE_TEST_ARGS:-} # Default glog module settings. KUBE_TEST_VMODULE=${KUBE_TEST_VMODULE:-""} +set +x + kube::test::find_integration_test_pkgs() { ( cd "${KUBE_ROOT}" diff --git a/hack/make-rules/test.sh b/hack/make-rules/test.sh index c683c2d1abb85..7d8e5664a1d9d 100755 --- a/hack/make-rules/test.sh +++ b/hack/make-rules/test.sh @@ -22,7 +22,6 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../.. source "${KUBE_ROOT}/hack/lib/init.sh" kube::golang::setup_env -kube::golang::setup_gomaxprocs kube::util::require-jq # start the cache mutation detector by default so that cache mutators will be found @@ -57,6 +56,8 @@ kube::test::find_go_packages() { ) } +set -x + # TODO: This timeout should really be lower, this is a *long* time to test one # package, however pkg/api/testing in particular will fail with a lower timeout # currently. We should attempt to lower this over time. @@ -85,6 +86,8 @@ KUBE_KEEP_VERBOSE_TEST_OUTPUT=${KUBE_KEEP_VERBOSE_TEST_OUTPUT:-n} # Set to 'false' to disable reduction of the JUnit file to only the top level tests. KUBE_PRUNE_JUNIT_TESTS=${KUBE_PRUNE_JUNIT_TESTS:-true} +set +x + kube::test::usage() { kube::log::usage_from_stdin </dev/null; then @@ -694,6 +695,8 @@ function codegen::openapi() { # The result file, in each pkg, of open-api generation. local output_file="${GENERATED_FILE_PREFIX}openapi.go" + local output_model_name_file="${GENERATED_FILE_PREFIX}model_name.go" + local output_dir="pkg/generated/openapi" local output_pkg="k8s.io/kubernetes/${output_dir}" local known_violations_file="${API_KNOWN_VIOLATIONS_DIR}/violation_exceptions.list" @@ -718,7 +721,7 @@ function codegen::openapi() { local tag_dirs=() kube::util::read-array tag_dirs < <( - grep -l --null '+k8s:openapi-gen=' "${tag_files[@]}" \ + grep -l --null '+k8s:openapi' "${tag_files[@]}" \ | while read -r -d $'\0' F; do dirname "${F}"; done \ | sort -u) @@ -740,6 +743,7 @@ function codegen::openapi() { fi git_find -z ':(glob)pkg/generated/**'/"${output_file}" | xargs -0 rm -f + git_find -z ':(glob)pkg/generated/**'/"${output_model_name_file}" | xargs -0 rm -f openapi-gen \ -v "${KUBE_VERBOSE}" \ @@ -748,6 +752,7 @@ function codegen::openapi() { --output-dir "${output_dir}" \ --output-pkg "${output_pkg}" \ --report-filename "${report_file}" \ + --output-model-name-file "${output_model_name_file}" \ "${tag_pkgs[@]}" \ "$@" @@ -1020,10 +1025,8 @@ function codegen::protobindings() { # Each element of this array is a directory containing subdirectories which # eventually contain a file named "api.proto". - local apis_using_gogo=( + local apis=( "staging/src/k8s.io/kubelet/pkg/apis/dra" - ) - local apis_using_protoc=( "staging/src/k8s.io/kubelet/pkg/apis/deviceplugin" "staging/src/k8s.io/kubelet/pkg/apis/podresources" "staging/src/k8s.io/kms/apis" @@ -1034,7 +1037,6 @@ function codegen::protobindings() { "staging/src/k8s.io/externaljwt/apis" "staging/src/k8s.io/kubelet/pkg/apis/dra-health" ) - local apis=("${apis_using_gogo[@]}" "${apis_using_protoc[@]}") kube::log::status "protobuf bindings: ${#apis[@]} targets" if [[ "${DBG_CODEGEN}" == 1 ]]; then @@ -1050,15 +1052,13 @@ function codegen::protobindings() { done if kube::protoc::check_protoc >/dev/null; then - hack/_update-generated-proto-bindings-dockerized.sh gogo "${apis_using_gogo[@]}" - hack/_update-generated-proto-bindings-dockerized.sh protoc "${apis_using_protoc[@]}" + hack/_update-generated-proto-bindings-dockerized.sh "${apis[@]}" else kube::log::status "protoc ${PROTOC_VERSION} not found (can install with hack/install-protoc.sh); generating containerized..." # NOTE: All output from this script needs to be copied back to the calling # source tree. This is managed in kube::build::copy_output in build/common.sh. # If the output set is changed update that function. - build/run.sh hack/_update-generated-proto-bindings-dockerized.sh gogo "${apis_using_gogo[@]}" - build/run.sh hack/_update-generated-proto-bindings-dockerized.sh protoc "${apis_using_protoc[@]}" + build/run.sh hack/_update-generated-proto-bindings-dockerized.sh "${apis[@]}" fi } diff --git a/hack/update-mocks.sh b/hack/update-mocks.sh index eb2b9760b8f1b..f84bb36852199 100755 --- a/hack/update-mocks.sh +++ b/hack/update-mocks.sh @@ -27,7 +27,7 @@ source "${KUBE_ROOT}/hack/lib/init.sh" kube::golang::setup_env echo 'installing mockery' -GOTOOLCHAIN="$(kube::golang::hack_tools_gotoolchain)" go -C "${KUBE_ROOT}/hack/tools" install github.com/vektra/mockery/v2 +GOTOOLCHAIN="$(kube::golang::hack_tools_gotoolchain)" go -C "${KUBE_ROOT}/hack/tools" install github.com/vektra/mockery/v3 function git_grep() { git grep --untracked --exclude-standard \ @@ -42,7 +42,7 @@ function git_grep() { cd "${KUBE_ROOT}" -GENERATED_MOCK_FILE_REGEX="^// Code generated by mockery v[0-9.]\+. DO NOT EDIT.$" +GENERATED_MOCK_FILE_REGEX="^// Code generated by mockery.* DO NOT EDIT.$" git_grep -l -z "${GENERATED_MOCK_FILE_REGEX}" | xargs -0 rm -f diff --git a/hack/verify-e2e-images.sh b/hack/verify-e2e-images.sh index faa28880e9b38..7c99a73d727b6 100755 --- a/hack/verify-e2e-images.sh +++ b/hack/verify-e2e-images.sh @@ -22,6 +22,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. cd "${KUBE_ROOT}" source hack/lib/init.sh +ret=0 # NOTE: Please do NOT add any to this list!! # @@ -34,16 +35,37 @@ kube::util::read-array PERMITTED_IMAGES < <(sed '/^#/d' ./test/images/.permitted echo "Getting e2e image list ..." make WHAT=test/e2e/e2e.test e2e_test="$(kube::util::find-binary e2e.test)" -kube::util::read-array IMAGES < <("${e2e_test}" --list-images | sed -E 's/^(.+):[^:]+$/\1/' | LC_ALL=C sort -u) + +# validate "e2e.test --list-images": +# - no unexpected output (whether it's on stderr or stdout) +# - zero exit code (indirectly ensures that tests are set up properly) +output=$("${e2e_test}" --list-images 2>&1) || ret=$? +if [[ $ret -ne 0 ]]; then + >&2 echo "FAIL: '${e2e_test} --list-images' failed:" + >&2 echo "${output}" + exit 1 +fi + +unexpected_output=$(echo "${output}" | grep -v -E '^([[:alnum:]/.-]+):[^:]+$' || true) +if [[ -n "${unexpected_output}" ]]; then + >&2 echo "FAIL: '${e2e_test} --list-images' printed unexpected output:" + >&2 echo "${unexpected_output}" + exit 1 +fi + +# extract image names without the version +kube::util::read-array IMAGES < <(echo "${output}" | sed -E 's/^([[:alnum:]/.-]+):[^:]+$/\1/' | LC_ALL=C sort -u) # diff versus known permitted images -ret=0 >&2 echo "Diffing e2e image list ..." -diff -Naupr <(printf '%s\n' "${IMAGES[@]}") <(printf '%s\n' "${PERMITTED_IMAGES[@]}") || ret=$? +# diff context is irrelevant here because of sorting. +# Instead we want to know about old images (no longer in use, need to be removed) +# and new images (should not get added). +diff <(printf '%s\n' "${PERMITTED_IMAGES[@]}") <(printf '%s\n' "${IMAGES[@]}") | sed -E -e '/^---$/d' -e '/^[[:digit:]]+[acd][[:digit:]]+$/d' -e 's/^/forbidden image:/' >&2 || ret=$? if [[ $ret -eq 0 ]]; then >&2 echo "PASS: e2e images used are OK." else - >&2 echo "FAIL: e2e images do not match the approved list!" + >&2 echo "FAIL: current e2e images do not match the approved list in test/images/.permitted-images!" >&2 echo "" >&2 echo "Please use registry.k8s.io/e2e-test-images/agnhost wherever possible, we are consolidating test images." >&2 echo "See: test/images/agnhost/README.md" diff --git a/hack/verify-golangci-lint-pr.sh b/hack/verify-golangci-lint-pr.sh deleted file mode 100755 index 689028add309d..0000000000000 --- a/hack/verify-golangci-lint-pr.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -# 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. - -# This script checks a PR for the coding style for the Go language files using -# golangci-lint. It does nothing when invoked as part of a normal "make -# verify". - -set -o nounset -set -o pipefail - -if [ ! "${PULL_NUMBER:-}" ]; then - echo 'Not testing anything because this is not a pull request.' - exit 0 -fi - -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. - -"${KUBE_ROOT}/hack/verify-golangci-lint.sh" -r "${PULL_BASE_SHA}" -s diff --git a/hack/verify-golangci-lint.sh b/hack/verify-golangci-lint.sh index 91550203cbe35..b2e00b9e8e572 100755 --- a/hack/verify-golangci-lint.sh +++ b/hack/verify-golangci-lint.sh @@ -21,7 +21,7 @@ usage () { cat <&2 -Usage: $0 [-r |-a] [-s] [-c none|] [-- ] [packages]" +Usage: $0 [-r |-a] [-c none|] [-- ] [packages]" -r : only report issues in code added since that revision -a: automatically select the common base of origin/master and HEAD as revision @@ -54,7 +54,7 @@ golangci_config="${KUBE_ROOT}/hack/golangci.yaml" base= hints= githubactions= -while getopts "ar:sng:c:" o; do +while getopts "ar:ng:c:" o; do case "${o}" in a) base="$(git merge-base origin/master HEAD)" diff --git a/pkg/api/service/warnings.go b/pkg/api/service/warnings.go index 41e69704bcd49..92fef3afa90dd 100644 --- a/pkg/api/service/warnings.go +++ b/pkg/api/service/warnings.go @@ -48,7 +48,7 @@ func GetWarningsForService(service, oldService *api.Service) []string { if len(service.Spec.ExternalIPs) > 0 { warnings = append(warnings, "spec.externalIPs is ignored for headless services") } - if service.Spec.SessionAffinity != "" { + if service.Spec.SessionAffinity != api.ServiceAffinityNone { warnings = append(warnings, "spec.SessionAffinity is ignored for headless services") } } diff --git a/pkg/api/service/warnings_test.go b/pkg/api/service/warnings_test.go index 763d16f101cab..dcf2a2ade19da 100644 --- a/pkg/api/service/warnings_test.go +++ b/pkg/api/service/warnings_test.go @@ -62,6 +62,7 @@ func TestGetWarningsForService(t *testing.T) { s.Spec.Type = api.ServiceTypeClusterIP s.Spec.ClusterIP = api.ClusterIPNone s.Spec.LoadBalancerIP = "1.2.3.4" + s.Spec.SessionAffinity = api.ServiceAffinityNone // default value }, numWarnings: 1, }, { @@ -70,10 +71,11 @@ func TestGetWarningsForService(t *testing.T) { s.Spec.Type = api.ServiceTypeClusterIP s.Spec.ClusterIP = api.ClusterIPNone s.Spec.ExternalIPs = []string{"1.2.3.4"} + s.Spec.SessionAffinity = api.ServiceAffinityNone // default value }, numWarnings: 1, }, { - name: "SessionAffinity set when headless service", + name: "SessionAffinity Client IP set when headless service", tweakSvc: func(s *api.Service) { s.Spec.Type = api.ServiceTypeClusterIP s.Spec.ClusterIP = api.ClusterIPNone @@ -81,16 +83,25 @@ func TestGetWarningsForService(t *testing.T) { }, numWarnings: 1, }, { - name: "ExternalIPs, LoadBalancerIP and SessionAffinity set when headless service", + name: "SessionAffinity None set when headless service", tweakSvc: func(s *api.Service) { s.Spec.Type = api.ServiceTypeClusterIP s.Spec.ClusterIP = api.ClusterIPNone - s.Spec.ExternalIPs = []string{"1.2.3.4"} - s.Spec.LoadBalancerIP = "1.2.3.4" - s.Spec.SessionAffinity = api.ServiceAffinityClientIP + s.Spec.SessionAffinity = api.ServiceAffinityNone }, - numWarnings: 3, - }} + numWarnings: 0, + }, + { + name: "ExternalIPs, LoadBalancerIP and SessionAffinity set when headless service", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + s.Spec.ClusterIP = api.ClusterIPNone + s.Spec.ExternalIPs = []string{"1.2.3.4"} + s.Spec.LoadBalancerIP = "1.2.3.4" + s.Spec.SessionAffinity = api.ServiceAffinityClientIP + }, + numWarnings: 3, + }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { diff --git a/pkg/api/testing/OWNERS b/pkg/api/testing/OWNERS index 9e252305ad200..23e6246b1d473 100644 --- a/pkg/api/testing/OWNERS +++ b/pkg/api/testing/OWNERS @@ -1,5 +1,7 @@ # See the OWNERS docs at https://go.k8s.io/owners +approvers: + - jpbetz reviewers: - thockin - smarterclayton @@ -16,3 +18,7 @@ reviewers: - soltysh - jsafrane - rata + - jpbetz + - aaron-prindle + - lalitc375 + - yongruilin diff --git a/pkg/api/testing/serialization_proto_test.go b/pkg/api/testing/serialization_proto_test.go index 6ba4a47e7406c..7cc03b9faffab 100644 --- a/pkg/api/testing/serialization_proto_test.go +++ b/pkg/api/testing/serialization_proto_test.go @@ -24,7 +24,6 @@ import ( "reflect" "testing" - "github.com/gogo/protobuf/proto" "github.com/google/go-cmp/cmp" v1 "k8s.io/api/core/v1" @@ -225,7 +224,7 @@ func BenchmarkDecodeCodecToInternalProtobuf(b *testing.B) { b.StopTimer() } -// BenchmarkDecodeJSON provides a baseline for regular JSON decode performance +// BenchmarkDecodeIntoProtobuf provides a baseline for regular protobuf decode performance func BenchmarkDecodeIntoProtobuf(b *testing.B) { items := benchmarkItems(b) width := len(items) @@ -237,14 +236,16 @@ func BenchmarkDecodeIntoProtobuf(b *testing.B) { } encoded[i] = data validate := &v1.Pod{} - if err := proto.Unmarshal(data, validate); err != nil { + validate.Reset() // decode normally resets internally + if err := validate.Unmarshal(data); err != nil { b.Fatalf("Failed to unmarshal %d: %v\n%#v", i, err, items[i]) } } for i := 0; i < b.N; i++ { - obj := v1.Pod{} - if err := proto.Unmarshal(encoded[i%width], &obj); err != nil { + obj := &v1.Pod{} + obj.Reset() // decode normally resets internally + if err := obj.Unmarshal(encoded[i%width]); err != nil { b.Fatal(err) } } diff --git a/pkg/api/testing/validation.go b/pkg/api/testing/validation.go index ecf635f20d89d..cc0c5f72dd34c 100644 --- a/pkg/api/testing/validation.go +++ b/pkg/api/testing/validation.go @@ -18,19 +18,29 @@ package testing import ( "bytes" + "context" "sort" "strconv" "testing" - k8sruntime "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" runtimetest "k8s.io/apimachinery/pkg/runtime/testing" "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/apiserver/pkg/features" + utilfeature "k8s.io/apiserver/pkg/util/feature" + featuregatetesting "k8s.io/component-base/featuregate/testing" "k8s.io/kubernetes/pkg/api/legacyscheme" ) +// ValidateFunc is a function that runs validation. +type ValidateFunc func(ctx context.Context, obj runtime.Object) field.ErrorList + +// ValidateUpdateFunc is a function that runs update validation. +type ValidateUpdateFunc func(ctx context.Context, obj, old runtime.Object) field.ErrorList + // VerifyVersionedValidationEquivalence tests that all versions of an API return equivalent validation errors. -func VerifyVersionedValidationEquivalence(t *testing.T, obj, old k8sruntime.Object, subresources ...string) { +func VerifyVersionedValidationEquivalence(t *testing.T, obj, old runtime.Object, subResources ...string) { t.Helper() // Accumulate errors from all versioned validation, per version. @@ -48,7 +58,7 @@ func VerifyVersionedValidationEquivalence(t *testing.T, obj, old k8sruntime.Obje return } if old == nil { - runtimetest.RunValidationForEachVersion(t, legacyscheme.Scheme, []string{}, internalObj, accumulate, subresources...) + runtimetest.RunValidationForEachVersion(t, legacyscheme.Scheme, []string{}, internalObj, accumulate, subResources...) } else { // Convert old versioned object to internal format before validation. // runtimetest.RunUpdateValidationForEachVersion requires unversioned (internal) objects as input. @@ -59,7 +69,7 @@ func VerifyVersionedValidationEquivalence(t *testing.T, obj, old k8sruntime.Obje if internalOld == nil { return } - runtimetest.RunUpdateValidationForEachVersion(t, legacyscheme.Scheme, []string{}, internalObj, internalOld, accumulate, subresources...) + runtimetest.RunUpdateValidationForEachVersion(t, legacyscheme.Scheme, []string{}, internalObj, internalOld, accumulate, subResources...) } // Make a copy so we can modify it. @@ -124,7 +134,7 @@ func fmtErrs(errs field.ErrorList) string { return buf.String() } -func convertToInternal(t *testing.T, scheme *k8sruntime.Scheme, obj k8sruntime.Object) (k8sruntime.Object, error) { +func convertToInternal(t *testing.T, scheme *runtime.Scheme, obj runtime.Object) (runtime.Object, error) { t.Helper() gvks, _, err := scheme.ObjectKinds(obj) @@ -135,13 +145,160 @@ func convertToInternal(t *testing.T, scheme *k8sruntime.Scheme, obj k8sruntime.O t.Fatal("no GVKs found for object") } gvk := gvks[0] - if gvk.Version == k8sruntime.APIVersionInternal { + if gvk.Version == runtime.APIVersionInternal { return obj, nil } - gvk.Version = k8sruntime.APIVersionInternal + gvk.Version = runtime.APIVersionInternal if !scheme.Recognizes(gvk) { t.Logf("no internal object found for GroupKind %s", gvk.GroupKind().String()) return nil, nil } - return scheme.ConvertToVersion(obj, schema.GroupVersion{Group: gvk.Group, Version: k8sruntime.APIVersionInternal}) + return scheme.ConvertToVersion(obj, schema.GroupVersion{Group: gvk.Group, Version: runtime.APIVersionInternal}) +} + +type ValidationTestConfig func(*validationOption) + +// validationOptions encapsulates optional parameters for validation equivalence tests. +type validationOption struct { + // SubResources are the subresources to validate. + SubResources []string + // NormalizationRules are the rules to apply to field paths before comparison. + NormalizationRules []field.NormalizationRule +} + +func WithSubResources(subResources ...string) ValidationTestConfig { + return func(o *validationOption) { + o.SubResources = subResources + } +} + +func WithNormalizationRules(rules ...field.NormalizationRule) ValidationTestConfig { + return func(o *validationOption) { + o.NormalizationRules = rules + } +} + +// VerifyValidationEquivalence provides a helper for testing the migration from +// hand-written imperative validation to declarative validation. It ensures that +// the validation logic remains consistent before and after the feature is enabled. +// +// The function operates by running the provided validation function under two scenarios: +// 1. With DeclarativeValidation and DeclarativeValidationTakeover feature gates disabled, +// simulating the legacy hand-written validation. +// 2. With both feature gates enabled, using the new declarative validation rules. +// +// It then asserts that the validation errors produced in both scenarios are equivalent, +// guaranteeing a safe migration. It also checks the errors against an expected set. +// It compares errors by field, origin and type; all three should match to be called equivalent. +// It also make sure all versions of the given API returns equivalent errors. +func VerifyValidationEquivalence(t *testing.T, ctx context.Context, obj runtime.Object, validateFn ValidateFunc, expectedErrs field.ErrorList, testConfigs ...ValidationTestConfig) { + t.Helper() + opts := &validationOption{} + for _, testcfg := range testConfigs { + testcfg(opts) + } + verifyValidationEquivalence(t, expectedErrs, func() field.ErrorList { + return validateFn(ctx, obj) + }, opts) + VerifyVersionedValidationEquivalence(t, obj, nil, opts.SubResources...) +} + +// VerifyUpdateValidationEquivalence provides a helper for testing the migration from +// hand-written imperative validation to declarative validation for update operations. +// It ensures that the validation logic remains consistent before and after the feature is enabled. +// +// The function operates by running the provided validation function under two scenarios: +// 1. With DeclarativeValidation and DeclarativeValidationTakeover feature gates disabled, +// simulating the legacy hand-written validation. +// 2. With both feature gates enabled, using the new declarative validation rules. +// +// It then asserts that the validation errors produced in both scenarios are equivalent, +// guaranteeing a safe migration. It also checks the errors against an expected set. +// It compares errors by field, origin and type; all three should match to be called equivalent. +// It also make sure all versions of the given API returns equivalent errors. +func VerifyUpdateValidationEquivalence(t *testing.T, ctx context.Context, obj, old runtime.Object, validateUpdateFn ValidateUpdateFunc, expectedErrs field.ErrorList, testConfigs ...ValidationTestConfig) { + t.Helper() + opts := &validationOption{} + for _, testcfg := range testConfigs { + testcfg(opts) + } + verifyValidationEquivalence(t, expectedErrs, func() field.ErrorList { + return validateUpdateFn(ctx, obj, old) + }, opts) + VerifyVersionedValidationEquivalence(t, obj, old, opts.SubResources...) +} + +// verifyValidationEquivalence is a generic helper that verifies validation equivalence with and without declarative validation. +func verifyValidationEquivalence(t *testing.T, expectedErrs field.ErrorList, runValidations func() field.ErrorList, opt *validationOption) { + t.Helper() + var declarativeTakeoverErrs field.ErrorList + var imperativeErrs field.ErrorList + + // The errOutputMatcher is used to verify the output matches the expected errors in test cases. + errOutputMatcher := field.ErrorMatcher{}.ByType().ByOrigin().ByFieldNormalized(opt.NormalizationRules) + + // We only need to test both gate enabled and disabled together, because + // 1) the DeclarativeValidationTakeover won't take effect if DeclarativeValidation is disabled. + // 2) the validation output, when only DeclarativeValidation is enabled, is the same as when both gates are disabled. + t.Run("with declarative validation", func(t *testing.T) { + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeclarativeValidation, true) + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeclarativeValidationTakeover, true) + declarativeTakeoverErrs = runValidations() + + if len(expectedErrs) > 0 { + errOutputMatcher.Test(t, expectedErrs, declarativeTakeoverErrs) + } else if len(declarativeTakeoverErrs) != 0 { + t.Errorf("expected no errors, but got: %v", declarativeTakeoverErrs) + } + }) + + t.Run("hand written validation", func(t *testing.T) { + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeclarativeValidationTakeover, false) + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeclarativeValidation, false) + imperativeErrs = runValidations() + + if len(expectedErrs) > 0 { + errOutputMatcher.Test(t, expectedErrs, imperativeErrs) + } else if len(imperativeErrs) != 0 { + t.Errorf("expected no errors, but got: %v", imperativeErrs) + } + }) + + if t.Failed() { + // There is no point in moving forward, if any of above tests failed for any reason. Running follow up tests will return noise. + t.SkipNow() + } + + // The equivalenceMatcher is used to verify the output errors from hand-written imperative validation + // are equivalent to the output errors when DeclarativeValidationTakeover is enabled. + equivalenceMatcher := field.ErrorMatcher{}.ByType().ByOrigin() + if len(opt.NormalizationRules) > 0 { + equivalenceMatcher = equivalenceMatcher.ByFieldNormalized(opt.NormalizationRules) + } else { + equivalenceMatcher = equivalenceMatcher.ByField() + } + + // The imperative validation may produce duplicate errors, which is not supported by the ErrorMatcher. + // TODO: remove this once ErrorMatcher has been extended to handle this form of deduplication. + imperativeErrs = deDuplicateErrors(imperativeErrs, equivalenceMatcher) + + equivalenceMatcher.Test(t, imperativeErrs, declarativeTakeoverErrs) +} + +// deDuplicateErrors removes duplicate errors from an ErrorList based on the provided matcher. +func deDuplicateErrors(errs field.ErrorList, matcher field.ErrorMatcher) field.ErrorList { + var deduped field.ErrorList + for _, err := range errs { + found := false + for _, existingErr := range deduped { + if matcher.Matches(existingErr, err) { + found = true + break + } + } + if !found { + deduped = append(deduped, err) + } + } + return deduped } diff --git a/pkg/api/testing/validation_test.go b/pkg/api/testing/validation_test.go index 922fb526f76c1..82f9fcbf10624 100644 --- a/pkg/api/testing/validation_test.go +++ b/pkg/api/testing/validation_test.go @@ -35,6 +35,9 @@ func TestVersionedValidationByFuzzing(t *testing.T) { {Group: "certificates.k8s.io", Version: "v1"}, {Group: "certificates.k8s.io", Version: "v1alpha1"}, {Group: "certificates.k8s.io", Version: "v1beta1"}, + {Group: "resource.k8s.io", Version: "v1beta1"}, + {Group: "resource.k8s.io", Version: "v1beta2"}, + {Group: "resource.k8s.io", Version: "v1"}, } for _, gv := range typesWithDeclarativeValidation { diff --git a/pkg/apis/abac/v1beta1/doc.go b/pkg/apis/abac/v1beta1/doc.go index 07647ddc3575a..f114c84f1c0b4 100644 --- a/pkg/apis/abac/v1beta1/doc.go +++ b/pkg/apis/abac/v1beta1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/abac // +k8s:openapi-gen=true // +k8s:defaulter-gen=TypeMeta +// +k8s:openapi-model-package=pkg.apis.abac.v1beta1 // +groupName=abac.authorization.kubernetes.io diff --git a/pkg/apis/abac/v1beta1/zz_generated.model_name.go b/pkg/apis/abac/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..811049c7f43ab --- /dev/null +++ b/pkg/apis/abac/v1beta1/zz_generated.model_name.go @@ -0,0 +1,32 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Policy) OpenAPIModelName() string { + return "pkg.apis.abac.v1beta1.Policy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PolicySpec) OpenAPIModelName() string { + return "pkg.apis.abac.v1beta1.PolicySpec" +} diff --git a/pkg/apis/admissionregistration/types.go b/pkg/apis/admissionregistration/types.go index 1665d38a26ff3..dad928096d8ce 100644 --- a/pkg/apis/admissionregistration/types.go +++ b/pkg/apis/admissionregistration/types.go @@ -1033,16 +1033,18 @@ type MutatingWebhook struct { MatchConditions []MatchCondition } -// ReinvocationPolicyType specifies what type of policy the admission hook uses. +// ReinvocationPolicyType specifies what type of policy is used when other admission plugins also perform +// modifications. +// +enum type ReinvocationPolicyType string var ( - // NeverReinvocationPolicy indicates that the webhook must not be called more than once in a + // NeverReinvocationPolicy indicates that the mutation must not be called more than once in a // single admission evaluation. NeverReinvocationPolicy ReinvocationPolicyType = "Never" - // IfNeededReinvocationPolicy indicates that the webhook may be called at least one + // IfNeededReinvocationPolicy indicates that the mutation may be called at least one // additional time as part of the admission evaluation if the object being admitted is - // modified by other admission plugins after the initial webhook call. + // modified by other admission plugins after the initial mutation call. IfNeededReinvocationPolicy ReinvocationPolicyType = "IfNeeded" ) diff --git a/pkg/apis/apps/types.go b/pkg/apis/apps/types.go index 7e4bf6d49bd63..e8e2f5b2ecaed 100644 --- a/pkg/apis/apps/types.go +++ b/pkg/apis/apps/types.go @@ -229,9 +229,12 @@ type StatefulSetSpec struct { // +optional MinReadySeconds int32 - // PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from - // the StatefulSet VolumeClaimTemplates. This requires the - // StatefulSetAutoDeletePVC feature gate to be enabled, which is beta and default on from 1.27. + // persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent + // volume claims created from volumeClaimTemplates. By default, all persistent + // volume claims are created as needed and retained until manually deleted. This + // policy allows the lifecycle to be altered, for example by deleting persistent + // volume claims when their stateful set is deleted, or when their pod is scaled + // down. // +optional PersistentVolumeClaimRetentionPolicy *StatefulSetPersistentVolumeClaimRetentionPolicy diff --git a/pkg/apis/apps/v1/defaults.go b/pkg/apis/apps/v1/defaults.go index 2179d0238443b..b52fa0a28f636 100644 --- a/pkg/apis/apps/v1/defaults.go +++ b/pkg/apis/apps/v1/defaults.go @@ -124,16 +124,14 @@ func SetDefaults_StatefulSet(obj *appsv1.StatefulSet) { } } - if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) { - if obj.Spec.PersistentVolumeClaimRetentionPolicy == nil { - obj.Spec.PersistentVolumeClaimRetentionPolicy = &appsv1.StatefulSetPersistentVolumeClaimRetentionPolicy{} - } - if len(obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenDeleted) == 0 { - obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenDeleted = appsv1.RetainPersistentVolumeClaimRetentionPolicyType - } - if len(obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenScaled) == 0 { - obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenScaled = appsv1.RetainPersistentVolumeClaimRetentionPolicyType - } + if obj.Spec.PersistentVolumeClaimRetentionPolicy == nil { + obj.Spec.PersistentVolumeClaimRetentionPolicy = &appsv1.StatefulSetPersistentVolumeClaimRetentionPolicy{} + } + if len(obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenDeleted) == 0 { + obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenDeleted = appsv1.RetainPersistentVolumeClaimRetentionPolicyType + } + if len(obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenScaled) == 0 { + obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenScaled = appsv1.RetainPersistentVolumeClaimRetentionPolicyType } if obj.Spec.Replicas == nil { diff --git a/pkg/apis/apps/v1/defaults_test.go b/pkg/apis/apps/v1/defaults_test.go index 1b5c6cdc27e10..73935213e6141 100644 --- a/pkg/apis/apps/v1/defaults_test.go +++ b/pkg/apis/apps/v1/defaults_test.go @@ -27,7 +27,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apimachinery/pkg/util/version" utilfeature "k8s.io/apiserver/pkg/util/feature" featuregatetesting "k8s.io/component-base/featuregate/testing" "k8s.io/kubernetes/pkg/api/legacyscheme" @@ -201,7 +200,6 @@ func TestSetDefaultStatefulSet(t *testing.T) { original *appsv1.StatefulSet expected *appsv1.StatefulSet enableMaxUnavailablePolicy bool - disablePVCDeletionPolicy bool }{ { name: "labels and default update strategy", @@ -594,76 +592,11 @@ func TestSetDefaultStatefulSet(t *testing.T) { }, enableMaxUnavailablePolicy: true, }, - { - name: "PVCDeletionPolicy disabled", - original: &appsv1.StatefulSet{ - Spec: appsv1.StatefulSetSpec{ - Template: defaultTemplate, - }, - }, - expected: &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{ - Labels: defaultLabels, - }, - Spec: appsv1.StatefulSetSpec{ - Replicas: &defaultReplicas, - MinReadySeconds: int32(0), - Template: defaultTemplate, - PodManagementPolicy: appsv1.OrderedReadyPodManagement, - UpdateStrategy: appsv1.StatefulSetUpdateStrategy{ - Type: appsv1.RollingUpdateStatefulSetStrategyType, - RollingUpdate: &appsv1.RollingUpdateStatefulSetStrategy{ - Partition: &defaultPartition, - }, - }, - RevisionHistoryLimit: ptr.To[int32](10), - }, - }, - disablePVCDeletionPolicy: true, - }, - { - name: "PVCDeletionPolicy disabled, scaledown set", - original: &appsv1.StatefulSet{ - Spec: appsv1.StatefulSetSpec{ - Template: defaultTemplate, - PersistentVolumeClaimRetentionPolicy: &appsv1.StatefulSetPersistentVolumeClaimRetentionPolicy{ - WhenScaled: appsv1.DeletePersistentVolumeClaimRetentionPolicyType, - }, - }, - }, - expected: &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{ - Labels: defaultLabels, - }, - Spec: appsv1.StatefulSetSpec{ - Replicas: &defaultReplicas, - MinReadySeconds: int32(0), - Template: defaultTemplate, - PersistentVolumeClaimRetentionPolicy: &appsv1.StatefulSetPersistentVolumeClaimRetentionPolicy{ - WhenScaled: appsv1.DeletePersistentVolumeClaimRetentionPolicyType, - }, - PodManagementPolicy: appsv1.OrderedReadyPodManagement, - UpdateStrategy: appsv1.StatefulSetUpdateStrategy{ - Type: appsv1.RollingUpdateStatefulSetStrategyType, - RollingUpdate: &appsv1.RollingUpdateStatefulSetStrategy{ - Partition: &defaultPartition, - }, - }, - RevisionHistoryLimit: ptr.To[int32](10), - }, - }, - disablePVCDeletionPolicy: true, - }, } for _, test := range tests { test := test t.Run(test.name, func(t *testing.T) { - if test.disablePVCDeletionPolicy { - // TODO: this will be removed in 1.35 - featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, utilfeature.DefaultFeatureGate, version.MustParse("1.31")) - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.StatefulSetAutoDeletePVC, false) - } featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.MaxUnavailableStatefulSet, test.enableMaxUnavailablePolicy) obj2 := roundTrip(t, runtime.Object(test.original)) diff --git a/pkg/apis/apps/v1beta1/defaults.go b/pkg/apis/apps/v1beta1/defaults.go index 0c5e18a73a07b..46db30b6a3d7d 100644 --- a/pkg/apis/apps/v1beta1/defaults.go +++ b/pkg/apis/apps/v1beta1/defaults.go @@ -50,16 +50,14 @@ func SetDefaults_StatefulSet(obj *appsv1beta1.StatefulSet) { } } - if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) { - if obj.Spec.PersistentVolumeClaimRetentionPolicy == nil { - obj.Spec.PersistentVolumeClaimRetentionPolicy = &appsv1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy{} - } - if len(obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenDeleted) == 0 { - obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenDeleted = appsv1beta1.RetainPersistentVolumeClaimRetentionPolicyType - } - if len(obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenScaled) == 0 { - obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenScaled = appsv1beta1.RetainPersistentVolumeClaimRetentionPolicyType - } + if obj.Spec.PersistentVolumeClaimRetentionPolicy == nil { + obj.Spec.PersistentVolumeClaimRetentionPolicy = &appsv1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy{} + } + if len(obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenDeleted) == 0 { + obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenDeleted = appsv1beta1.RetainPersistentVolumeClaimRetentionPolicyType + } + if len(obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenScaled) == 0 { + obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenScaled = appsv1beta1.RetainPersistentVolumeClaimRetentionPolicyType } if obj.Spec.Replicas == nil { diff --git a/pkg/apis/apps/v1beta1/defaults_test.go b/pkg/apis/apps/v1beta1/defaults_test.go index d9019f8adcc8f..245d81aa2a827 100644 --- a/pkg/apis/apps/v1beta1/defaults_test.go +++ b/pkg/apis/apps/v1beta1/defaults_test.go @@ -27,7 +27,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apimachinery/pkg/util/version" utilfeature "k8s.io/apiserver/pkg/util/feature" featuregatetesting "k8s.io/component-base/featuregate/testing" "k8s.io/kubernetes/pkg/api/legacyscheme" @@ -226,7 +225,6 @@ func TestSetDefaultStatefulSet(t *testing.T) { original *appsv1beta1.StatefulSet expected *appsv1beta1.StatefulSet enableMaxUnavailablePolicy bool - disablePVCDeletionPolicy bool }{ { name: "labels and default update strategy", @@ -491,80 +489,11 @@ func TestSetDefaultStatefulSet(t *testing.T) { }, enableMaxUnavailablePolicy: true, }, - { - name: "PVCDeletionPolicy disabled", - original: &appsv1beta1.StatefulSet{ - Spec: appsv1beta1.StatefulSetSpec{ - Template: defaultTemplate, - }, - }, - expected: &appsv1beta1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{ - Labels: defaultLabels, - }, - Spec: appsv1beta1.StatefulSetSpec{ - Replicas: &defaultReplicas, - MinReadySeconds: int32(0), - Template: defaultTemplate, - PodManagementPolicy: appsv1beta1.OrderedReadyPodManagement, - Selector: &metav1.LabelSelector{ - MatchLabels: map[string]string{"foo": "bar"}, - MatchExpressions: []metav1.LabelSelectorRequirement{}, - }, - UpdateStrategy: appsv1beta1.StatefulSetUpdateStrategy{ - Type: appsv1beta1.OnDeleteStatefulSetStrategyType, - RollingUpdate: nil, - }, - RevisionHistoryLimit: ptr.To[int32](10), - }, - }, - disablePVCDeletionPolicy: true, - }, - { - name: "PVCDeletionPolicy disabled, scaledown set", - original: &appsv1beta1.StatefulSet{ - Spec: appsv1beta1.StatefulSetSpec{ - Template: defaultTemplate, - PersistentVolumeClaimRetentionPolicy: &appsv1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy{ - WhenScaled: appsv1beta1.DeletePersistentVolumeClaimRetentionPolicyType, - }, - }, - }, - expected: &appsv1beta1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{ - Labels: defaultLabels, - }, - Spec: appsv1beta1.StatefulSetSpec{ - Replicas: &defaultReplicas, - MinReadySeconds: int32(0), - Template: defaultTemplate, - PersistentVolumeClaimRetentionPolicy: &appsv1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy{ - WhenScaled: appsv1beta1.DeletePersistentVolumeClaimRetentionPolicyType, - }, - PodManagementPolicy: appsv1beta1.OrderedReadyPodManagement, - Selector: &metav1.LabelSelector{ - MatchLabels: map[string]string{"foo": "bar"}, - MatchExpressions: []metav1.LabelSelectorRequirement{}, - }, - UpdateStrategy: appsv1beta1.StatefulSetUpdateStrategy{ - Type: appsv1beta1.OnDeleteStatefulSetStrategyType, - RollingUpdate: nil, - }, - RevisionHistoryLimit: ptr.To[int32](10), - }, - }, - disablePVCDeletionPolicy: true, - }, } for _, test := range tests { test := test t.Run(test.name, func(t *testing.T) { - if test.disablePVCDeletionPolicy { - // TODO: this will be removed in 1.35 - featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, utilfeature.DefaultFeatureGate, version.MustParse("1.31")) - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.StatefulSetAutoDeletePVC, false) - } featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.MaxUnavailableStatefulSet, test.enableMaxUnavailablePolicy) obj2 := roundTrip(t, runtime.Object(test.original)) got, ok := obj2.(*appsv1beta1.StatefulSet) diff --git a/pkg/apis/apps/v1beta1/zz_generated.validations.go b/pkg/apis/apps/v1beta1/zz_generated.validations.go index d3e13a4f9d9e5..6517cebc06f83 100644 --- a/pkg/apis/apps/v1beta1/zz_generated.validations.go +++ b/pkg/apis/apps/v1beta1/zz_generated.validations.go @@ -38,6 +38,7 @@ func init() { localSchemeBuilder.Register(RegisterValidations) } // RegisterValidations adds validation functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterValidations(scheme *runtime.Scheme) error { + // type Scale scheme.AddValidationFunc((*appsv1beta1.Scale)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { switch op.Request.SubresourcePath() { case "/scale": @@ -48,6 +49,8 @@ func RegisterValidations(scheme *runtime.Scheme) error { return nil } +// Validate_Scale validates an instance of Scale according +// to declarative validation rules in the API schema. func Validate_Scale(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *appsv1beta1.Scale) (errs field.ErrorList) { // field appsv1beta1.Scale.TypeMeta has no validation // field appsv1beta1.Scale.ObjectMeta has no validation @@ -55,6 +58,11 @@ func Validate_Scale(ctx context.Context, op operation.Operation, fldPath *field. // field appsv1beta1.Scale.Spec errs = append(errs, func(fldPath *field.Path, obj, oldObj *appsv1beta1.ScaleSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call the type's validation function errs = append(errs, Validate_ScaleSpec(ctx, op, fldPath, obj, oldObj)...) return }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *appsv1beta1.Scale) *appsv1beta1.ScaleSpec { return &oldObj.Spec }))...) @@ -63,14 +71,18 @@ func Validate_Scale(ctx context.Context, op operation.Operation, fldPath *field. return errs } +// Validate_ScaleSpec validates an instance of ScaleSpec according +// to declarative validation rules in the API schema. func Validate_ScaleSpec(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *appsv1beta1.ScaleSpec) (errs field.ErrorList) { // field appsv1beta1.ScaleSpec.Replicas errs = append(errs, func(fldPath *field.Path, obj, oldObj *int32) (errs field.ErrorList) { // optional value-type fields with zero-value defaults are purely documentation + // don't revalidate unchanged data if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { - return nil // no changes + return nil } + // call field-attached validations errs = append(errs, validate.Minimum(ctx, op, fldPath, obj, oldObj, 0)...) return }(fldPath.Child("replicas"), &obj.Replicas, safe.Field(oldObj, func(oldObj *appsv1beta1.ScaleSpec) *int32 { return &oldObj.Replicas }))...) diff --git a/pkg/apis/apps/v1beta2/defaults.go b/pkg/apis/apps/v1beta2/defaults.go index 1ed7190fb8c13..d1598d9f7aeba 100644 --- a/pkg/apis/apps/v1beta2/defaults.go +++ b/pkg/apis/apps/v1beta2/defaults.go @@ -81,16 +81,14 @@ func SetDefaults_StatefulSet(obj *appsv1beta2.StatefulSet) { } } - if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) { - if obj.Spec.PersistentVolumeClaimRetentionPolicy == nil { - obj.Spec.PersistentVolumeClaimRetentionPolicy = &appsv1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy{} - } - if len(obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenDeleted) == 0 { - obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenDeleted = appsv1beta2.RetainPersistentVolumeClaimRetentionPolicyType - } - if len(obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenScaled) == 0 { - obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenScaled = appsv1beta2.RetainPersistentVolumeClaimRetentionPolicyType - } + if obj.Spec.PersistentVolumeClaimRetentionPolicy == nil { + obj.Spec.PersistentVolumeClaimRetentionPolicy = &appsv1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy{} + } + if len(obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenDeleted) == 0 { + obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenDeleted = appsv1beta2.RetainPersistentVolumeClaimRetentionPolicyType + } + if len(obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenScaled) == 0 { + obj.Spec.PersistentVolumeClaimRetentionPolicy.WhenScaled = appsv1beta2.RetainPersistentVolumeClaimRetentionPolicyType } if obj.Spec.Replicas == nil { diff --git a/pkg/apis/apps/v1beta2/defaults_test.go b/pkg/apis/apps/v1beta2/defaults_test.go index 43ac5c518bc33..6cfc54c8e9ba5 100644 --- a/pkg/apis/apps/v1beta2/defaults_test.go +++ b/pkg/apis/apps/v1beta2/defaults_test.go @@ -27,7 +27,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apimachinery/pkg/util/version" utilfeature "k8s.io/apiserver/pkg/util/feature" featuregatetesting "k8s.io/component-base/featuregate/testing" "k8s.io/kubernetes/pkg/api/legacyscheme" @@ -201,7 +200,6 @@ func TestSetDefaultStatefulSet(t *testing.T) { original *appsv1beta2.StatefulSet expected *appsv1beta2.StatefulSet enableMaxUnavailablePolicy bool - disablePVCDeletionPolicy bool }{ { name: "labels and default update strategy", @@ -466,76 +464,11 @@ func TestSetDefaultStatefulSet(t *testing.T) { }, enableMaxUnavailablePolicy: true, }, - { - name: "PVCDeletionPolicy disabled", - original: &appsv1beta2.StatefulSet{ - Spec: appsv1beta2.StatefulSetSpec{ - Template: defaultTemplate, - }, - }, - expected: &appsv1beta2.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{ - Labels: defaultLabels, - }, - Spec: appsv1beta2.StatefulSetSpec{ - Replicas: &defaultReplicas, - MinReadySeconds: int32(0), - Template: defaultTemplate, - PodManagementPolicy: appsv1beta2.OrderedReadyPodManagement, - UpdateStrategy: appsv1beta2.StatefulSetUpdateStrategy{ - Type: appsv1beta2.RollingUpdateStatefulSetStrategyType, - RollingUpdate: &appsv1beta2.RollingUpdateStatefulSetStrategy{ - Partition: &defaultPartition, - }, - }, - RevisionHistoryLimit: ptr.To[int32](10), - }, - }, - disablePVCDeletionPolicy: true, - }, - { - name: "PVCDeletionPolicy disabled, scaledown set", - original: &appsv1beta2.StatefulSet{ - Spec: appsv1beta2.StatefulSetSpec{ - Template: defaultTemplate, - PersistentVolumeClaimRetentionPolicy: &appsv1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy{ - WhenScaled: appsv1beta2.DeletePersistentVolumeClaimRetentionPolicyType, - }, - }, - }, - expected: &appsv1beta2.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{ - Labels: defaultLabels, - }, - Spec: appsv1beta2.StatefulSetSpec{ - Replicas: &defaultReplicas, - MinReadySeconds: int32(0), - Template: defaultTemplate, - PersistentVolumeClaimRetentionPolicy: &appsv1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy{ - WhenScaled: appsv1beta2.DeletePersistentVolumeClaimRetentionPolicyType, - }, - PodManagementPolicy: appsv1beta2.OrderedReadyPodManagement, - UpdateStrategy: appsv1beta2.StatefulSetUpdateStrategy{ - Type: appsv1beta2.RollingUpdateStatefulSetStrategyType, - RollingUpdate: &appsv1beta2.RollingUpdateStatefulSetStrategy{ - Partition: &defaultPartition, - }, - }, - RevisionHistoryLimit: ptr.To[int32](10), - }, - }, - disablePVCDeletionPolicy: true, - }, } for _, test := range tests { test := test t.Run(test.name, func(t *testing.T) { - if test.disablePVCDeletionPolicy { - // TODO: this will be removed in 1.35 - featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, utilfeature.DefaultFeatureGate, version.MustParse("1.31")) - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.StatefulSetAutoDeletePVC, false) - } featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.MaxUnavailableStatefulSet, test.enableMaxUnavailablePolicy) obj2 := roundTrip(t, runtime.Object(test.original)) got, ok := obj2.(*appsv1beta2.StatefulSet) diff --git a/pkg/apis/apps/v1beta2/zz_generated.validations.go b/pkg/apis/apps/v1beta2/zz_generated.validations.go index 3c16d10b67441..0081b10a11d37 100644 --- a/pkg/apis/apps/v1beta2/zz_generated.validations.go +++ b/pkg/apis/apps/v1beta2/zz_generated.validations.go @@ -38,6 +38,7 @@ func init() { localSchemeBuilder.Register(RegisterValidations) } // RegisterValidations adds validation functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterValidations(scheme *runtime.Scheme) error { + // type Scale scheme.AddValidationFunc((*appsv1beta2.Scale)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { switch op.Request.SubresourcePath() { case "/scale": @@ -48,6 +49,8 @@ func RegisterValidations(scheme *runtime.Scheme) error { return nil } +// Validate_Scale validates an instance of Scale according +// to declarative validation rules in the API schema. func Validate_Scale(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *appsv1beta2.Scale) (errs field.ErrorList) { // field appsv1beta2.Scale.TypeMeta has no validation // field appsv1beta2.Scale.ObjectMeta has no validation @@ -55,6 +58,11 @@ func Validate_Scale(ctx context.Context, op operation.Operation, fldPath *field. // field appsv1beta2.Scale.Spec errs = append(errs, func(fldPath *field.Path, obj, oldObj *appsv1beta2.ScaleSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call the type's validation function errs = append(errs, Validate_ScaleSpec(ctx, op, fldPath, obj, oldObj)...) return }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *appsv1beta2.Scale) *appsv1beta2.ScaleSpec { return &oldObj.Spec }))...) @@ -63,14 +71,18 @@ func Validate_Scale(ctx context.Context, op operation.Operation, fldPath *field. return errs } +// Validate_ScaleSpec validates an instance of ScaleSpec according +// to declarative validation rules in the API schema. func Validate_ScaleSpec(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *appsv1beta2.ScaleSpec) (errs field.ErrorList) { // field appsv1beta2.ScaleSpec.Replicas errs = append(errs, func(fldPath *field.Path, obj, oldObj *int32) (errs field.ErrorList) { // optional value-type fields with zero-value defaults are purely documentation + // don't revalidate unchanged data if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { - return nil // no changes + return nil } + // call field-attached validations errs = append(errs, validate.Minimum(ctx, op, fldPath, obj, oldObj, 0)...) return }(fldPath.Child("replicas"), &obj.Replicas, safe.Field(oldObj, func(oldObj *appsv1beta2.ScaleSpec) *int32 { return &oldObj.Replicas }))...) diff --git a/pkg/apis/autoscaling/v1/zz_generated.validations.go b/pkg/apis/autoscaling/v1/zz_generated.validations.go index 1c71f7f80e537..86a0f84209c0a 100644 --- a/pkg/apis/autoscaling/v1/zz_generated.validations.go +++ b/pkg/apis/autoscaling/v1/zz_generated.validations.go @@ -38,6 +38,7 @@ func init() { localSchemeBuilder.Register(RegisterValidations) } // RegisterValidations adds validation functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterValidations(scheme *runtime.Scheme) error { + // type Scale scheme.AddValidationFunc((*autoscalingv1.Scale)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { switch op.Request.SubresourcePath() { case "/scale": @@ -48,6 +49,8 @@ func RegisterValidations(scheme *runtime.Scheme) error { return nil } +// Validate_Scale validates an instance of Scale according +// to declarative validation rules in the API schema. func Validate_Scale(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *autoscalingv1.Scale) (errs field.ErrorList) { // field autoscalingv1.Scale.TypeMeta has no validation // field autoscalingv1.Scale.ObjectMeta has no validation @@ -55,6 +58,11 @@ func Validate_Scale(ctx context.Context, op operation.Operation, fldPath *field. // field autoscalingv1.Scale.Spec errs = append(errs, func(fldPath *field.Path, obj, oldObj *autoscalingv1.ScaleSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call the type's validation function errs = append(errs, Validate_ScaleSpec(ctx, op, fldPath, obj, oldObj)...) return }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *autoscalingv1.Scale) *autoscalingv1.ScaleSpec { return &oldObj.Spec }))...) @@ -63,14 +71,18 @@ func Validate_Scale(ctx context.Context, op operation.Operation, fldPath *field. return errs } +// Validate_ScaleSpec validates an instance of ScaleSpec according +// to declarative validation rules in the API schema. func Validate_ScaleSpec(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *autoscalingv1.ScaleSpec) (errs field.ErrorList) { // field autoscalingv1.ScaleSpec.Replicas errs = append(errs, func(fldPath *field.Path, obj, oldObj *int32) (errs field.ErrorList) { // optional value-type fields with zero-value defaults are purely documentation + // don't revalidate unchanged data if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { - return nil // no changes + return nil } + // call field-attached validations errs = append(errs, validate.Minimum(ctx, op, fldPath, obj, oldObj, 0)...) return }(fldPath.Child("replicas"), &obj.Replicas, safe.Field(oldObj, func(oldObj *autoscalingv1.ScaleSpec) *int32 { return &oldObj.Replicas }))...) diff --git a/pkg/apis/autoscaling/validation/declarative_validation_test.go b/pkg/apis/autoscaling/validation/declarative_validation_test.go index 1e46787be2512..2c17bc0827bda 100644 --- a/pkg/apis/autoscaling/validation/declarative_validation_test.go +++ b/pkg/apis/autoscaling/validation/declarative_validation_test.go @@ -17,27 +17,27 @@ limitations under the License. package validation import ( - "fmt" "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/validation/field" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/apiserver/pkg/registry/rest" - utilfeature "k8s.io/apiserver/pkg/util/feature" - featuregatetesting "k8s.io/component-base/featuregate/testing" "k8s.io/kubernetes/pkg/api/legacyscheme" apitesting "k8s.io/kubernetes/pkg/api/testing" "k8s.io/kubernetes/pkg/apis/autoscaling" - "k8s.io/kubernetes/pkg/features" ) -func TestValidateScaleForDeclarative(t *testing.T) { +// TestScaleDeclarativeValidation verifies that the validation rules that are applied uniformly to the Scale API. +func TestScaleDeclarativeValidation(t *testing.T) { + apiGroup := "autoscaling" + apiVersion := "v1" ctx := genericapirequest.WithRequestInfo(genericapirequest.NewDefaultContext(), &genericapirequest.RequestInfo{ - APIGroup: "autoscaling", - APIVersion: "v1", + APIGroup: apiGroup, + APIVersion: apiVersion, Subresource: "scale", }) + testCases := map[string]struct { input autoscaling.Scale expectedErrs field.ErrorList @@ -58,35 +58,13 @@ func TestValidateScaleForDeclarative(t *testing.T) { } for k, tc := range testCases { t.Run(k, func(t *testing.T) { - var declarativeTakeoverErrs field.ErrorList - var imperativeErrs field.ErrorList - for _, gateVal := range []bool{true, false} { - t.Run(fmt.Sprintf("gates=%v", gateVal), func(t *testing.T) { - // We only need to test both gate enabled and disabled together, because - // 1) the DeclarativeValidationTakeover won't take effect if DeclarativeValidation is disabled. - // 2) the validation output, when only DeclarativeValidation is enabled, is the same as when both gates are disabled. - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeclarativeValidation, gateVal) - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeclarativeValidationTakeover, gateVal) - - errs := rest.ValidateDeclaratively(ctx, legacyscheme.Scheme, &tc.input) - if gateVal { - declarativeTakeoverErrs = errs - } else { - imperativeErrs = errs - } - // The errOutputMatcher is used to verify the output matches the expected errors in test cases. - errOutputMatcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin() - if len(tc.expectedErrs) > 0 { - errOutputMatcher.Test(t, tc.expectedErrs, errs) - } else if len(errs) != 0 { - t.Errorf("expected no errors, but got: %v", errs) - } - }) - } - // The equivalenceMatcher is used to verify the output errors from handwritten imperative validation - // are equivalent to the output errors when DeclarativeValidationTakeover is enabled. - equivalenceMatcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin() - equivalenceMatcher.Test(t, imperativeErrs, declarativeTakeoverErrs) + // The Scale API has no handwritten validation to compare against. So we simply test that all the versions + // of the Scale subresource are correct for our test cases. + // All resources that have a scale subresource are expected to test Scale validation against any handwritten + // validation code defined on that resource. + tester := field.ErrorMatcher{}.ByType().ByField().ByOrigin() + obj, _ := legacyscheme.Scheme.ConvertToVersion(&tc.input, schema.GroupVersion{Group: apiGroup, Version: apiVersion}) + tester.Test(t, tc.expectedErrs, legacyscheme.Scheme.Validate(ctx, nil, obj, "scale")) apitesting.VerifyVersionedValidationEquivalence(t, &tc.input, nil, "scale") }) diff --git a/pkg/apis/autoscaling/validation/validation.go b/pkg/apis/autoscaling/validation/validation.go index 2b34e46f32f76..524212f53a105 100644 --- a/pkg/apis/autoscaling/validation/validation.go +++ b/pkg/apis/autoscaling/validation/validation.go @@ -50,7 +50,7 @@ func ValidateScale(scale *autoscaling.Scale) field.ErrorList { // ValidateHorizontalPodAutoscalerName can be used to check whether the given autoscaler name is valid. // Prefix indicates this name will be used as part of generation, in which case trailing dashes are allowed. -var ValidateHorizontalPodAutoscalerName = apivalidation.ValidateReplicationControllerName +var ValidateHorizontalPodAutoscalerName = apimachineryvalidation.NameIsDNSSubdomain func validateHorizontalPodAutoscalerSpec(autoscaler autoscaling.HorizontalPodAutoscalerSpec, fldPath *field.Path, opts HorizontalPodAutoscalerSpecValidationOptions) field.ErrorList { allErrs := field.ErrorList{} diff --git a/pkg/apis/batch/types.go b/pkg/apis/batch/types.go index 7350bc7c1728d..b6678e5dd69df 100644 --- a/pkg/apis/batch/types.go +++ b/pkg/apis/batch/types.go @@ -212,6 +212,7 @@ type PodFailurePolicyOnPodConditionsPattern struct { // Specifies the required Pod condition status. To match a pod condition // it is required that the specified status equals the pod condition status. // Defaults to True. + // +optional Status api.ConditionStatus } diff --git a/pkg/apis/batch/validation/validation.go b/pkg/apis/batch/validation/validation.go index 5203c837ec514..cc8b72584fe55 100644 --- a/pkg/apis/batch/validation/validation.go +++ b/pkg/apis/batch/validation/validation.go @@ -23,9 +23,8 @@ import ( "strings" "time" - "github.com/robfig/cron/v3" - apiequality "k8s.io/apimachinery/pkg/api/equality" + apimachineryapivalidation "k8s.io/apimachinery/pkg/api/validation" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" unversionedvalidation "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/labels" @@ -36,6 +35,7 @@ import ( "k8s.io/kubernetes/pkg/apis/batch" api "k8s.io/kubernetes/pkg/apis/core" apivalidation "k8s.io/kubernetes/pkg/apis/core/validation" + "k8s.io/kubernetes/pkg/util/parsers" "k8s.io/utils/ptr" ) @@ -150,7 +150,7 @@ func validateGeneratedSelector(obj *batch.Job, validateBatchLabels bool) field.E // ValidateJob validates a Job and returns an ErrorList with any errors. func ValidateJob(job *batch.Job, opts JobValidationOptions) field.ErrorList { // Jobs and rcs have the same name validation - allErrs := apivalidation.ValidateObjectMeta(&job.ObjectMeta, true, apivalidation.ValidateReplicationControllerName, field.NewPath("metadata")) + allErrs := apivalidation.ValidateObjectMeta(&job.ObjectMeta, true, apimachineryapivalidation.NameIsDNSSubdomain, field.NewPath("metadata")) allErrs = append(allErrs, validateGeneratedSelector(job, opts.RequirePrefixedLabels)...) allErrs = append(allErrs, ValidateJobSpec(&job.Spec, field.NewPath("spec"), opts.PodValidationOptions)...) if job.Spec.CompletionMode != nil && *job.Spec.CompletionMode == batch.IndexedCompletion && job.Spec.Completions != nil && *job.Spec.Completions > 0 { @@ -714,7 +714,7 @@ func ValidateJobStatusUpdate(job, oldJob *batch.Job, opts JobStatusValidationOpt // ValidateCronJobCreate validates a CronJob on creation and returns an ErrorList with any errors. func ValidateCronJobCreate(cronJob *batch.CronJob, opts apivalidation.PodValidationOptions) field.ErrorList { // CronJobs and rcs have the same name validation - allErrs := apivalidation.ValidateObjectMeta(&cronJob.ObjectMeta, true, apivalidation.ValidateReplicationControllerName, field.NewPath("metadata")) + allErrs := apivalidation.ValidateObjectMeta(&cronJob.ObjectMeta, true, apimachineryapivalidation.NameIsDNSSubdomain, field.NewPath("metadata")) allErrs = append(allErrs, validateCronJobSpec(&cronJob.Spec, nil, field.NewPath("spec"), opts)...) if len(cronJob.ObjectMeta.Name) > apimachineryvalidation.DNS1035LabelMaxLength-11 { // The cronjob controller appends a 11-character suffix to the cronjob (`-$TIMESTAMP`) when @@ -790,7 +790,8 @@ func validateConcurrencyPolicy(concurrencyPolicy *batch.ConcurrencyPolicy, fldPa func validateScheduleFormat(schedule string, allowTZInSchedule bool, timeZone *string, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} - if _, err := cron.ParseStandard(schedule); err != nil { + + if _, err := parsers.ParseCronScheduleWithPanicRecovery(schedule); err != nil { allErrs = append(allErrs, field.Invalid(fldPath, schedule, err.Error())) } switch { diff --git a/pkg/apis/batch/validation/validation_test.go b/pkg/apis/batch/validation/validation_test.go index 2e30d0e1998fa..b9bc05ffe0ba9 100644 --- a/pkg/apis/batch/validation/validation_test.go +++ b/pkg/apis/batch/validation/validation_test.go @@ -18,11 +18,10 @@ package validation import ( "errors" - _ "time/tzdata" - "fmt" "strings" "testing" + _ "time/tzdata" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" @@ -4002,3 +4001,132 @@ func TestValidateFailedIndexesNotOverlapCompleted(t *testing.T) { }) } } + +// TestValidateScheduleFormatPanicRecovery tests that validateScheduleFormat +// properly recovers from panics in cron.ParseStandard and returns validation errors +func TestValidateScheduleFormatPanicRecovery(t *testing.T) { + testCases := []struct { + name string + schedule string + expected string + }{ + { + name: "TZ=0 without space should not panic", + schedule: "TZ=0", + expected: "invalid schedule format", + }, + { + name: "TZ= without value should not panic", + schedule: "TZ=", + expected: "invalid schedule format", + }, + { + name: "CRON_TZ= without space should not panic", + schedule: "CRON_TZ=UTC", + expected: "invalid schedule format", + }, + { + name: "malformed timezone spec should not panic", + schedule: "TZ=Invalid/Timezone", + expected: "invalid schedule format", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + // This should not panic and should return a validation error + errs := validateScheduleFormat(tc.schedule, false, nil, field.NewPath("spec", "schedule")) + + if len(errs) == 0 { + t.Errorf("Expected validation error for schedule %q, but got none", tc.schedule) + return + } + + // Check that the error message contains expected text + errMsg := errs[0].Error() + if !strings.Contains(errMsg, tc.expected) { + t.Errorf("Expected error message to contain %q, but got: %s", tc.expected, errMsg) + } + + // Verify it's an Invalid field error + if errs[0].Type != field.ErrorTypeInvalid { + t.Errorf("Expected ErrorTypeInvalid, but got: %v", errs[0].Type) + } + }) + } +} + +// TestValidateScheduleFormatNormalCases tests normal validation cases +// to ensure panic recovery doesn't interfere with normal operation +func TestValidateScheduleFormatNormalCases(t *testing.T) { + testCases := []struct { + name string + schedule string + allowTZInSchedule bool + timeZone *string + expectError bool + expectedError string + }{ + { + name: "valid schedule without timezone", + schedule: "0 0 * * *", + allowTZInSchedule: false, + timeZone: nil, + expectError: false, + }, + { + name: "valid schedule with timezone field", + schedule: "0 0 * * *", + allowTZInSchedule: false, + timeZone: &timeZoneUTC, + expectError: false, + }, + { + name: "TZ in schedule when not allowed", + schedule: "TZ=UTC 0 0 * * *", + allowTZInSchedule: false, + timeZone: nil, + expectError: true, + expectedError: "cannot use TZ or CRON_TZ in schedule", + }, + { + name: "TZ in schedule when allowed", + schedule: "TZ=UTC 0 0 * * *", + allowTZInSchedule: true, + timeZone: nil, + expectError: false, + }, + { + name: "TZ in schedule with timezone field", + schedule: "TZ=UTC 0 0 * * *", + allowTZInSchedule: true, + timeZone: &timeZoneUTC, + expectError: true, + expectedError: "cannot use both timeZone field and TZ or CRON_TZ in schedule", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + errs := validateScheduleFormat(tc.schedule, tc.allowTZInSchedule, tc.timeZone, field.NewPath("spec", "schedule")) + + if tc.expectError { + if len(errs) == 0 { + t.Errorf("Expected validation error for schedule %q, but got none", tc.schedule) + return + } + + if tc.expectedError != "" { + errMsg := errs[0].Error() + if !strings.Contains(errMsg, tc.expectedError) { + t.Errorf("Expected error message to contain %q, but got: %s", tc.expectedError, errMsg) + } + } + } else { + if len(errs) > 0 { + t.Errorf("Expected no validation errors for schedule %q, but got: %v", tc.schedule, errs) + } + } + }) + } +} diff --git a/pkg/apis/certificates/v1/zz_generated.validations.go b/pkg/apis/certificates/v1/zz_generated.validations.go index 42a1716c4d9b0..8bcdd5c6dd57d 100644 --- a/pkg/apis/certificates/v1/zz_generated.validations.go +++ b/pkg/apis/certificates/v1/zz_generated.validations.go @@ -39,6 +39,7 @@ func init() { localSchemeBuilder.Register(RegisterValidations) } // RegisterValidations adds validation functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterValidations(scheme *runtime.Scheme) error { + // type CertificateSigningRequest scheme.AddValidationFunc((*certificatesv1.CertificateSigningRequest)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { switch op.Request.SubresourcePath() { case "/", "/approval", "/status": @@ -46,6 +47,7 @@ func RegisterValidations(scheme *runtime.Scheme) error { } return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} }) + // type CertificateSigningRequestList scheme.AddValidationFunc((*certificatesv1.CertificateSigningRequestList)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { switch op.Request.SubresourcePath() { case "/": @@ -56,6 +58,8 @@ func RegisterValidations(scheme *runtime.Scheme) error { return nil } +// Validate_CertificateSigningRequest validates an instance of CertificateSigningRequest according +// to declarative validation rules in the API schema. func Validate_CertificateSigningRequest(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *certificatesv1.CertificateSigningRequest) (errs field.ErrorList) { // field certificatesv1.CertificateSigningRequest.TypeMeta has no validation // field certificatesv1.CertificateSigningRequest.ObjectMeta has no validation @@ -64,6 +68,11 @@ func Validate_CertificateSigningRequest(ctx context.Context, op operation.Operat // field certificatesv1.CertificateSigningRequest.Status errs = append(errs, func(fldPath *field.Path, obj, oldObj *certificatesv1.CertificateSigningRequestStatus) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function errs = append(errs, Validate_CertificateSigningRequestStatus(ctx, op, fldPath, obj, oldObj)...) return }(fldPath.Child("status"), &obj.Status, safe.Field(oldObj, func(oldObj *certificatesv1.CertificateSigningRequest) *certificatesv1.CertificateSigningRequestStatus { @@ -73,6 +82,8 @@ func Validate_CertificateSigningRequest(ctx context.Context, op operation.Operat return errs } +// Validate_CertificateSigningRequestList validates an instance of CertificateSigningRequestList according +// to declarative validation rules in the API schema. func Validate_CertificateSigningRequestList(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *certificatesv1.CertificateSigningRequestList) (errs field.ErrorList) { // field certificatesv1.CertificateSigningRequestList.TypeMeta has no validation // field certificatesv1.CertificateSigningRequestList.ListMeta has no validation @@ -80,9 +91,11 @@ func Validate_CertificateSigningRequestList(ctx context.Context, op operation.Op // field certificatesv1.CertificateSigningRequestList.Items errs = append(errs, func(fldPath *field.Path, obj, oldObj []certificatesv1.CertificateSigningRequest) (errs field.ErrorList) { + // don't revalidate unchanged data if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { - return nil // no changes + return nil } + // iterate the list and call the type's validation function errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_CertificateSigningRequest)...) return }(fldPath.Child("items"), obj.Items, safe.Field(oldObj, func(oldObj *certificatesv1.CertificateSigningRequestList) []certificatesv1.CertificateSigningRequest { @@ -92,19 +105,28 @@ func Validate_CertificateSigningRequestList(ctx context.Context, op operation.Op return errs } -var zeroOrOneOfMembershipFor_k8s_io_api_certificates_v1_CertificateSigningRequestStatus_Conditions_ = validate.NewUnionMembership([2]string{"Conditions[{\"type\": \"Approved\"}]", ""}, [2]string{"Conditions[{\"type\": \"Denied\"}]", ""}) +var zeroOrOneOfMembershipFor_k8s_io_api_certificates_v1_CertificateSigningRequestStatus_conditions_ = validate.NewUnionMembership(validate.NewUnionMember("conditions[{\"type\": \"Approved\"}]"), validate.NewUnionMember("conditions[{\"type\": \"Denied\"}]")) +// Validate_CertificateSigningRequestStatus validates an instance of CertificateSigningRequestStatus according +// to declarative validation rules in the API schema. func Validate_CertificateSigningRequestStatus(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *certificatesv1.CertificateSigningRequestStatus) (errs field.ErrorList) { // field certificatesv1.CertificateSigningRequestStatus.Conditions errs = append(errs, func(fldPath *field.Path, obj, oldObj []certificatesv1.CertificateSigningRequestCondition) (errs field.ErrorList) { + // Uniqueness validation is implemented via custom, handwritten validation + // don't revalidate unchanged data if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { - return nil // no changes + return nil } + // call field-attached validations + earlyReturn := false if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { return // do not proceed } - errs = append(errs, validate.ZeroOrOneOfUnion(ctx, op, fldPath, obj, oldObj, zeroOrOneOfMembershipFor_k8s_io_api_certificates_v1_CertificateSigningRequestStatus_Conditions_, func(list []certificatesv1.CertificateSigningRequestCondition) bool { + errs = append(errs, validate.ZeroOrOneOfUnion(ctx, op, fldPath, obj, oldObj, zeroOrOneOfMembershipFor_k8s_io_api_certificates_v1_CertificateSigningRequestStatus_conditions_, func(list []certificatesv1.CertificateSigningRequestCondition) bool { for i := range list { if list[i].Type == "Approved" { return true diff --git a/pkg/apis/certificates/v1beta1/zz_generated.validations.go b/pkg/apis/certificates/v1beta1/zz_generated.validations.go index 99d3dc0267b10..f4a8710bed1dd 100644 --- a/pkg/apis/certificates/v1beta1/zz_generated.validations.go +++ b/pkg/apis/certificates/v1beta1/zz_generated.validations.go @@ -39,6 +39,7 @@ func init() { localSchemeBuilder.Register(RegisterValidations) } // RegisterValidations adds validation functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterValidations(scheme *runtime.Scheme) error { + // type CertificateSigningRequest scheme.AddValidationFunc((*certificatesv1beta1.CertificateSigningRequest)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { switch op.Request.SubresourcePath() { case "/", "/approval", "/status": @@ -46,6 +47,7 @@ func RegisterValidations(scheme *runtime.Scheme) error { } return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} }) + // type CertificateSigningRequestList scheme.AddValidationFunc((*certificatesv1beta1.CertificateSigningRequestList)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { switch op.Request.SubresourcePath() { case "/": @@ -56,6 +58,8 @@ func RegisterValidations(scheme *runtime.Scheme) error { return nil } +// Validate_CertificateSigningRequest validates an instance of CertificateSigningRequest according +// to declarative validation rules in the API schema. func Validate_CertificateSigningRequest(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *certificatesv1beta1.CertificateSigningRequest) (errs field.ErrorList) { // field certificatesv1beta1.CertificateSigningRequest.TypeMeta has no validation // field certificatesv1beta1.CertificateSigningRequest.ObjectMeta has no validation @@ -64,6 +68,11 @@ func Validate_CertificateSigningRequest(ctx context.Context, op operation.Operat // field certificatesv1beta1.CertificateSigningRequest.Status errs = append(errs, func(fldPath *field.Path, obj, oldObj *certificatesv1beta1.CertificateSigningRequestStatus) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function errs = append(errs, Validate_CertificateSigningRequestStatus(ctx, op, fldPath, obj, oldObj)...) return }(fldPath.Child("status"), &obj.Status, safe.Field(oldObj, func(oldObj *certificatesv1beta1.CertificateSigningRequest) *certificatesv1beta1.CertificateSigningRequestStatus { @@ -73,6 +82,8 @@ func Validate_CertificateSigningRequest(ctx context.Context, op operation.Operat return errs } +// Validate_CertificateSigningRequestList validates an instance of CertificateSigningRequestList according +// to declarative validation rules in the API schema. func Validate_CertificateSigningRequestList(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *certificatesv1beta1.CertificateSigningRequestList) (errs field.ErrorList) { // field certificatesv1beta1.CertificateSigningRequestList.TypeMeta has no validation // field certificatesv1beta1.CertificateSigningRequestList.ListMeta has no validation @@ -80,9 +91,11 @@ func Validate_CertificateSigningRequestList(ctx context.Context, op operation.Op // field certificatesv1beta1.CertificateSigningRequestList.Items errs = append(errs, func(fldPath *field.Path, obj, oldObj []certificatesv1beta1.CertificateSigningRequest) (errs field.ErrorList) { + // don't revalidate unchanged data if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { - return nil // no changes + return nil } + // iterate the list and call the type's validation function errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_CertificateSigningRequest)...) return }(fldPath.Child("items"), obj.Items, safe.Field(oldObj, func(oldObj *certificatesv1beta1.CertificateSigningRequestList) []certificatesv1beta1.CertificateSigningRequest { @@ -92,19 +105,28 @@ func Validate_CertificateSigningRequestList(ctx context.Context, op operation.Op return errs } -var zeroOrOneOfMembershipFor_k8s_io_api_certificates_v1beta1_CertificateSigningRequestStatus_Conditions_ = validate.NewUnionMembership([2]string{"Conditions[{\"type\": \"Approved\"}]", ""}, [2]string{"Conditions[{\"type\": \"Denied\"}]", ""}) +var zeroOrOneOfMembershipFor_k8s_io_api_certificates_v1beta1_CertificateSigningRequestStatus_conditions_ = validate.NewUnionMembership(validate.NewUnionMember("conditions[{\"type\": \"Approved\"}]"), validate.NewUnionMember("conditions[{\"type\": \"Denied\"}]")) +// Validate_CertificateSigningRequestStatus validates an instance of CertificateSigningRequestStatus according +// to declarative validation rules in the API schema. func Validate_CertificateSigningRequestStatus(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *certificatesv1beta1.CertificateSigningRequestStatus) (errs field.ErrorList) { // field certificatesv1beta1.CertificateSigningRequestStatus.Conditions errs = append(errs, func(fldPath *field.Path, obj, oldObj []certificatesv1beta1.CertificateSigningRequestCondition) (errs field.ErrorList) { + // Uniqueness validation is implemented via custom, handwritten validation + // don't revalidate unchanged data if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { - return nil // no changes + return nil } + // call field-attached validations + earlyReturn := false if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { return // do not proceed } - errs = append(errs, validate.ZeroOrOneOfUnion(ctx, op, fldPath, obj, oldObj, zeroOrOneOfMembershipFor_k8s_io_api_certificates_v1beta1_CertificateSigningRequestStatus_Conditions_, func(list []certificatesv1beta1.CertificateSigningRequestCondition) bool { + errs = append(errs, validate.ZeroOrOneOfUnion(ctx, op, fldPath, obj, oldObj, zeroOrOneOfMembershipFor_k8s_io_api_certificates_v1beta1_CertificateSigningRequestStatus_conditions_, func(list []certificatesv1beta1.CertificateSigningRequestCondition) bool { for i := range list { if list[i].Type == "Approved" { return true diff --git a/pkg/apis/core/types.go b/pkg/apis/core/types.go index f62c07024b6f0..24448a8dd5895 100644 --- a/pkg/apis/core/types.go +++ b/pkg/apis/core/types.go @@ -724,9 +724,6 @@ type PersistentVolumeClaimStatus struct { // should ignore the update for the purpose it was designed. For example - a controller that // only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid // resources associated with PVC. - // - // This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - // +featureGate=RecoverVolumeExpansionFailure // +optional AllocatedResources ResourceList // AllocatedResourceStatuses stores status of resource being resized for the given PVC. @@ -762,9 +759,6 @@ type PersistentVolumeClaimStatus struct { // should ignore the update for the purpose it was designed. For example - a controller that // only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid // resources associated with PVC. - // - // This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - // +featureGate=RecoverVolumeExpansionFailure // +mapType=granular // +optional AllocatedResourceStatuses map[ResourceName]ClaimResourceStatus @@ -2153,8 +2147,6 @@ type VolumeMount struct { // None (or be unspecified, which defaults to None). // // If this field is not specified, it is treated as an equivalent of Disabled. - // - // +featureGate=RecursiveReadOnlyMounts // +optional RecursiveReadOnly *RecursiveReadOnlyMode // Required. If the path is not an absolute path (e.g. some/path) it @@ -2670,7 +2662,6 @@ type Container struct { // container. Instead, the next init container starts immediately after this // init container is started, or after any startupProbe has successfully // completed. - // +featureGate=SidecarContainers // +optional RestartPolicy *ContainerRestartPolicy // Represents a list of rules to be checked to determine if the @@ -2758,7 +2749,6 @@ type LifecycleHandler struct { // +optional TCPSocket *TCPSocketAction // Sleep represents the duration that the container should sleep before being terminated. - // +featureGate=PodLifecycleSleepAction // +optional Sleep *SleepAction } @@ -3000,7 +2990,6 @@ type ContainerStatus struct { // Status of volume mounts. // +listType=atomic // +optional - // +featureGate=RecursiveReadOnlyMounts VolumeMounts []VolumeMountStatus // User represents user identity information initially attached to the first process of the container // +featureGate=SupplementalGroupsPolicy @@ -3191,7 +3180,6 @@ type VolumeMountStatus struct { // RecursiveReadOnly must be set to Disabled, Enabled, or unspecified (for non-readonly mounts). // An IfPossible value in the original VolumeMount must be translated to Disabled or Enabled, // depending on the mount result. - // +featureGate=RecursiveReadOnlyMounts // +optional RecursiveReadOnly *RecursiveReadOnlyMode } @@ -3847,8 +3835,8 @@ type PodSpec struct { // will be made available to those containers which consume them // by name. // - // This is an alpha field and requires enabling the - // DynamicResourceAllocation feature gate. + // This is a stable field but requires that the + // DynamicResourceAllocation feature gate is enabled. // // This field is immutable. // @@ -4372,7 +4360,6 @@ type EphemeralContainerCommon struct { // Restart policy for the container to manage the restart behavior of each // container within a pod. Must be specified if restartPolicyRules are used. // You cannot set this field on ephemeral containers. - // +featureGate=SidecarContainers // +optional RestartPolicy *ContainerRestartPolicy // Represents a list of rules to be checked to determine if the @@ -4461,7 +4448,7 @@ type EphemeralContainer struct { // state of a system. type PodStatus struct { // If set, this represents the .metadata.generation that the pod status was set based upon. - // This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field. + // The PodObservedGenerationTracking feature gate must be enabled to use this field. // +featureGate=PodObservedGenerationTracking // +optional ObservedGeneration int64 @@ -5439,7 +5426,6 @@ type NodeDaemonEndpoints struct { // NodeRuntimeHandlerFeatures is a set of features implemented by the runtime handler. type NodeRuntimeHandlerFeatures struct { // RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts. - // +featureGate=RecursiveReadOnlyMounts // +optional RecursiveReadOnlyMounts *bool // UserNamespaces is set to true if the runtime handler supports UserNamespaces, including for volumes. @@ -5588,7 +5574,6 @@ type NodeStatus struct { // +optional Config *NodeConfigStatus // The available runtime handlers. - // +featureGate=RecursiveReadOnlyMounts // +featureGate=UserNamespacesSupport // +optional RuntimeHandlers []NodeRuntimeHandler diff --git a/pkg/apis/core/v1/zz_generated.validations.go b/pkg/apis/core/v1/zz_generated.validations.go index b7cb065edda70..d3ccbc5e62c03 100644 --- a/pkg/apis/core/v1/zz_generated.validations.go +++ b/pkg/apis/core/v1/zz_generated.validations.go @@ -30,6 +30,7 @@ import ( operation "k8s.io/apimachinery/pkg/api/operation" safe "k8s.io/apimachinery/pkg/api/safe" validate "k8s.io/apimachinery/pkg/api/validate" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" field "k8s.io/apimachinery/pkg/util/validation/field" ) @@ -39,6 +40,7 @@ func init() { localSchemeBuilder.Register(RegisterValidations) } // RegisterValidations adds validation functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterValidations(scheme *runtime.Scheme) error { + // type ReplicationController scheme.AddValidationFunc((*corev1.ReplicationController)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { switch op.Request.SubresourcePath() { case "/", "/scale": @@ -46,6 +48,7 @@ func RegisterValidations(scheme *runtime.Scheme) error { } return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} }) + // type ReplicationControllerList scheme.AddValidationFunc((*corev1.ReplicationControllerList)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { switch op.Request.SubresourcePath() { case "/": @@ -56,13 +59,40 @@ func RegisterValidations(scheme *runtime.Scheme) error { return nil } +// Validate_ReplicationController validates an instance of ReplicationController according +// to declarative validation rules in the API schema. func Validate_ReplicationController(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *corev1.ReplicationController) (errs field.ErrorList) { // field corev1.ReplicationController.TypeMeta has no validation - // field corev1.ReplicationController.ObjectMeta has no validation + + // field corev1.ReplicationController.ObjectMeta + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *metav1.ObjectMeta) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + func() { // cohort name + earlyReturn := false + if e := validate.Subfield(ctx, op, fldPath, obj, oldObj, "name", func(o *metav1.ObjectMeta) *string { return &o.Name }, validate.DirectEqualPtr, validate.OptionalValue); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.Subfield(ctx, op, fldPath, obj, oldObj, "name", func(o *metav1.ObjectMeta) *string { return &o.Name }, validate.DirectEqualPtr, validate.LongName)...) + }() + return + }(fldPath.Child("metadata"), &obj.ObjectMeta, safe.Field(oldObj, func(oldObj *corev1.ReplicationController) *metav1.ObjectMeta { return &oldObj.ObjectMeta }))...) // field corev1.ReplicationController.Spec errs = append(errs, func(fldPath *field.Path, obj, oldObj *corev1.ReplicationControllerSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function errs = append(errs, Validate_ReplicationControllerSpec(ctx, op, fldPath, obj, oldObj)...) return }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *corev1.ReplicationController) *corev1.ReplicationControllerSpec { return &oldObj.Spec }))...) @@ -71,6 +101,8 @@ func Validate_ReplicationController(ctx context.Context, op operation.Operation, return errs } +// Validate_ReplicationControllerList validates an instance of ReplicationControllerList according +// to declarative validation rules in the API schema. func Validate_ReplicationControllerList(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *corev1.ReplicationControllerList) (errs field.ErrorList) { // field corev1.ReplicationControllerList.TypeMeta has no validation // field corev1.ReplicationControllerList.ListMeta has no validation @@ -78,9 +110,11 @@ func Validate_ReplicationControllerList(ctx context.Context, op operation.Operat // field corev1.ReplicationControllerList.Items errs = append(errs, func(fldPath *field.Path, obj, oldObj []corev1.ReplicationController) (errs field.ErrorList) { + // don't revalidate unchanged data if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { - return nil // no changes + return nil } + // iterate the list and call the type's validation function errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_ReplicationController)...) return }(fldPath.Child("items"), obj.Items, safe.Field(oldObj, func(oldObj *corev1.ReplicationControllerList) []corev1.ReplicationController { return oldObj.Items }))...) @@ -88,16 +122,24 @@ func Validate_ReplicationControllerList(ctx context.Context, op operation.Operat return errs } +// Validate_ReplicationControllerSpec validates an instance of ReplicationControllerSpec according +// to declarative validation rules in the API schema. func Validate_ReplicationControllerSpec(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *corev1.ReplicationControllerSpec) (errs field.ErrorList) { // field corev1.ReplicationControllerSpec.Replicas errs = append(errs, func(fldPath *field.Path, obj, oldObj *int32) (errs field.ErrorList) { + // don't revalidate unchanged data if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { - return nil // no changes + return nil } + // call field-attached validations + earlyReturn := false // optional fields with default values are effectively required if e := validate.RequiredPointer(ctx, op, fldPath, obj, oldObj); len(e) != 0 { errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { return // do not proceed } errs = append(errs, validate.Minimum(ctx, op, fldPath, obj, oldObj, 0)...) @@ -108,9 +150,11 @@ func Validate_ReplicationControllerSpec(ctx context.Context, op operation.Operat errs = append(errs, func(fldPath *field.Path, obj, oldObj *int32) (errs field.ErrorList) { // optional value-type fields with zero-value defaults are purely documentation + // don't revalidate unchanged data if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { - return nil // no changes + return nil } + // call field-attached validations errs = append(errs, validate.Minimum(ctx, op, fldPath, obj, oldObj, 0)...) return }(fldPath.Child("minReadySeconds"), &obj.MinReadySeconds, safe.Field(oldObj, func(oldObj *corev1.ReplicationControllerSpec) *int32 { return &oldObj.MinReadySeconds }))...) diff --git a/pkg/apis/core/validation/validation.go b/pkg/apis/core/validation/validation.go index c9ea96aae3642..57bd6423967ab 100644 --- a/pkg/apis/core/validation/validation.go +++ b/pkg/apis/core/validation/validation.go @@ -17,6 +17,7 @@ limitations under the License. package validation import ( + "context" "encoding/json" "fmt" "math" @@ -35,7 +36,9 @@ import ( v1 "k8s.io/api/core/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/api/operation" "k8s.io/apimachinery/pkg/api/resource" + "k8s.io/apimachinery/pkg/api/validate" apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" unversionedvalidation "k8s.io/apimachinery/pkg/apis/meta/v1/validation" @@ -136,7 +139,7 @@ func ValidateAnnotations(annotations map[string]string, fldPath *field.Path) fie func ValidateDNS1123Label(value string, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} for _, msg := range validation.IsDNS1123Label(value) { - allErrs = append(allErrs, field.Invalid(fldPath, value, msg).WithOrigin("format=dns-label")) + allErrs = append(allErrs, field.Invalid(fldPath, value, msg).WithOrigin("format=k8s-short-name")) } return allErrs } @@ -154,7 +157,7 @@ func ValidateQualifiedName(value string, fldPath *field.Path) field.ErrorList { func ValidateDNS1123SubdomainWithUnderScore(value string, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} for _, msg := range validation.IsDNS1123SubdomainWithUnderscore(value) { - allErrs = append(allErrs, field.Invalid(fldPath, value, msg)) + allErrs = append(allErrs, field.Invalid(fldPath, value, msg)).WithOrigin("format=k8s-dns-subdomain-with-underscore") } return allErrs } @@ -163,7 +166,7 @@ func ValidateDNS1123SubdomainWithUnderScore(value string, fldPath *field.Path) f func ValidateDNS1123Subdomain(value string, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} for _, msg := range validation.IsDNS1123Subdomain(value) { - allErrs = append(allErrs, field.Invalid(fldPath, value, msg)) + allErrs = append(allErrs, field.Invalid(fldPath, value, msg)).WithOrigin("format=k8s-long-name") } return allErrs } @@ -253,17 +256,15 @@ func ValidateEndpointsSpecificAnnotations(annotations map[string]string, fldPath // value that were not valid. Otherwise this returns an empty list or nil. type ValidateNameFunc apimachineryvalidation.ValidateNameFunc +// ValidateNameFuncWithErrors validates that the provided name is valid for a +// given resource type. +type ValidateNameFuncWithErrors = apimachineryvalidation.ValidateNameFuncWithErrors + // ValidatePodName can be used to check whether the given pod name is valid. // Prefix indicates this name will be used as part of generation, in which case // trailing dashes are allowed. var ValidatePodName = apimachineryvalidation.NameIsDNSSubdomain -// ValidateReplicationControllerName can be used to check whether the given replication -// controller name is valid. -// Prefix indicates this name will be used as part of generation, in which case -// trailing dashes are allowed. -var ValidateReplicationControllerName = apimachineryvalidation.NameIsDNSSubdomain - // ValidateServiceName can be used to check whether the given service name is valid. // Prefix indicates this name will be used as part of generation, in which case // trailing dashes are allowed. @@ -384,9 +385,19 @@ func ValidateImmutableAnnotation(newVal string, oldVal string, annotation string return allErrs } +// ValidateObjectMetaWithOpts validates an object's metadata on creation. It expects that name generation has already +// been performed. +func ValidateObjectMetaWithOpts(meta *metav1.ObjectMeta, isNamespaced bool, nameFn ValidateNameFuncWithErrors, fldPath *field.Path) field.ErrorList { + allErrs := apimachineryvalidation.ValidateObjectMetaWithOpts(meta, isNamespaced, nameFn, fldPath) + // run additional checks for the finalizer name + for i := range meta.Finalizers { + allErrs = append(allErrs, validateKubeFinalizerName(string(meta.Finalizers[i]), fldPath.Child("finalizers").Index(i))...) + } + return allErrs +} + // ValidateObjectMeta validates an object's metadata on creation. It expects that name generation has already // been performed. -// It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before. // TODO: Remove calls to this method scattered in validations of specific resources, e.g., ValidatePodUpdate. func ValidateObjectMeta(meta *metav1.ObjectMeta, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList { allErrs := apimachineryvalidation.ValidateObjectMeta(meta, requiresNamespace, apimachineryvalidation.ValidateNameFunc(nameFn), fldPath) @@ -1753,19 +1764,46 @@ func validatePVSecretReference(secretRef *core.SecretReference, fldPath *field.P return allErrs } -func ValidateCSIDriverName(driverName string, fldPath *field.Path) field.ErrorList { +// ValidateCSIDriverNameOption is an option for ValidateCSIDriverName. +// These options are for marking if a validation error message is covered +// by declarative validation +type ValidateCSIDriverNameOption int + +const ( + // The required check is covered by declarative validation + RequiredCovered ValidateCSIDriverNameOption = iota + // The list size check is covered by declarative validation. + SizeCovered + // The format check is covered by declarative validation. + FormatCovered +) + +func ValidateCSIDriverName(driverName string, fldPath *field.Path, opts ...ValidateCSIDriverNameOption) field.ErrorList { allErrs := field.ErrorList{} if len(driverName) == 0 { - allErrs = append(allErrs, field.Required(fldPath, "")) + err := field.Required(fldPath, "") + if slices.Contains(opts, RequiredCovered) { + err = err.MarkCoveredByDeclarative() + } + allErrs = append(allErrs, err) + return allErrs } if len(driverName) > 63 { - allErrs = append(allErrs, field.TooLong(fldPath, "" /*unused*/, 63)) + err := field.TooLong(fldPath, "" /*unused*/, 63) + if slices.Contains(opts, SizeCovered) { + err = err.MarkCoveredByDeclarative() + } + allErrs = append(allErrs, err) } for _, msg := range validation.IsDNS1123Subdomain(strings.ToLower(driverName)) { - allErrs = append(allErrs, field.Invalid(fldPath, driverName, msg)) + err := field.Invalid(fldPath, driverName, msg) + if slices.Contains(opts, FormatCovered) { + err = err.WithOrigin("format=k8s-long-name-caseless").MarkCoveredByDeclarative() + } + allErrs = append(allErrs, err) } return allErrs @@ -4855,7 +4893,7 @@ func ValidateNodeSelectorRequirement(rq core.NodeSelectorRequirement, allowInval path := fldPath.Child("values") for valueIndex, value := range rq.Values { for _, msg := range validation.IsValidLabelValue(value) { - allErrs = append(allErrs, field.Invalid(path.Index(valueIndex), value, msg)) + allErrs = append(allErrs, field.Invalid(path.Index(valueIndex), value, msg)).WithOrigin("format=k8s-label-value") } } } @@ -6700,7 +6738,10 @@ func ValidateServiceStatusUpdate(service, oldService *core.Service) field.ErrorL // ValidateReplicationController tests if required fields in the replication controller are set. func ValidateReplicationController(controller *core.ReplicationController, opts PodValidationOptions) field.ErrorList { - allErrs := ValidateObjectMeta(&controller.ObjectMeta, true, ValidateReplicationControllerName, field.NewPath("metadata")) + validateLongName := func(fldPath *field.Path, name string) field.ErrorList { + return validate.LongName(context.Background(), operation.Operation{}, fldPath, &name, nil).MarkCoveredByDeclarative() + } + allErrs := ValidateObjectMetaWithOpts(&controller.ObjectMeta, true, validateLongName, field.NewPath("metadata")) allErrs = append(allErrs, ValidateReplicationControllerSpec(&controller.Spec, nil, field.NewPath("spec"), opts)...) return allErrs } @@ -8380,7 +8421,7 @@ func ValidateLoadBalancerStatus(status, oldStatus *core.LoadBalancerStatus, fldP for _, msg := range validation.IsDNS1123Subdomain(ingress.Hostname) { allErrs = append(allErrs, field.Invalid(idxPath.Child("hostname"), ingress.Hostname, msg)) } - if isIP := (netutils.ParseIPSloppy(ingress.Hostname) != nil); isIP { + if isIP := netutils.ParseIPSloppy(ingress.Hostname) != nil; isIP { allErrs = append(allErrs, field.Invalid(idxPath.Child("hostname"), ingress.Hostname, "must be a DNS name, not an IP address")) } } diff --git a/pkg/apis/core/validation/validation_test.go b/pkg/apis/core/validation/validation_test.go index 15aed1b0a5610..7c29131a79744 100644 --- a/pkg/apis/core/validation/validation_test.go +++ b/pkg/apis/core/validation/validation_test.go @@ -1081,6 +1081,7 @@ func pvcWithDataSource(dataSource *core.TypedLocalObjectReference) *core.Persist }, } } + func pvcWithDataSourceRef(ref *core.TypedObjectReference) *core.PersistentVolumeClaim { return &core.PersistentVolumeClaim{ Spec: core.PersistentVolumeClaimSpec{ @@ -7100,13 +7101,7 @@ func TestValidateEnvVarValueFromFileKeyRef(t *testing.T) { }, opts: PodValidationOptions{}, expectedErrs: field.ErrorList{ - { - Type: field.ErrorTypeInvalid, - Field: field.NewPath("valueFrom.fileKeyRef.volumeName").String(), - BadValue: "INVALID_NAME!", - Detail: "a lowercase RFC 1123 label must consist of", - Origin: "format=dns-label", - }, + field.Invalid(field.NewPath("valueFrom.fileKeyRef.volumeName"), "INVALID_NAME!", "").WithOrigin("format=k8s-short-name"), }, }, { @@ -7158,13 +7153,7 @@ func TestValidateEnvVarValueFromFileKeyRef(t *testing.T) { opts: PodValidationOptions{}, expectedErrs: field.ErrorList{ field.Invalid(field.NewPath("valueFrom.fileKeyRef.key"), "bad=key", "environment variable"), - { - Type: field.ErrorTypeInvalid, - Field: field.NewPath("valueFrom.fileKeyRef.volumeName").String(), - BadValue: "!badname", - Detail: "a lowercase RFC 1123 label must consist of", - Origin: "format=dns-label", - }, + field.Invalid(field.NewPath("valueFrom.fileKeyRef.volumeName"), "!badname", "").WithOrigin("format=k8s-short-name"), field.Invalid(field.NewPath("valueFrom.fileKeyRef.path"), "../badpath", "must not contain '..'"), }, }, @@ -17964,7 +17953,7 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { rc.Spec.Selector = invalid }), expectedErrs: field.ErrorList{ - field.Invalid(field.NewPath("spec.template.labels"), nil, "").WithOrigin("labelKey"), + field.Invalid(field.NewPath("spec.template.labels"), nil, "").WithOrigin("format=k8s-label-key"), }, }, "invalid pod": { @@ -18113,7 +18102,7 @@ func TestValidateReplicationController(t *testing.T) { } }), expectedErrs: field.ErrorList{ - field.Invalid(field.NewPath("metadata.labels"), nil, "").WithOrigin("labelKey"), + field.Invalid(field.NewPath("metadata.labels"), nil, "").WithOrigin("format=k8s-label-key"), }, }, "invalid label 2": { @@ -18124,7 +18113,7 @@ func TestValidateReplicationController(t *testing.T) { }), expectedErrs: field.ErrorList{ field.Invalid(field.NewPath("spec.template.metadata.labels"), nil, "does not match template"), - field.Invalid(field.NewPath("spec.template.labels"), nil, "").WithOrigin("labelKey"), + field.Invalid(field.NewPath("spec.template.labels"), nil, "").WithOrigin("format=k8s-label-key"), }, }, "invalid annotation": { @@ -18134,7 +18123,7 @@ func TestValidateReplicationController(t *testing.T) { } }), expectedErrs: field.ErrorList{ - field.Invalid(field.NewPath("metadata.annotations"), nil, "name part must consist of"), + field.Invalid(field.NewPath("metadata.annotations"), nil, "").WithOrigin("format=k8s-label-key"), }, }, "invalid restart policy 1": { @@ -24469,7 +24458,7 @@ func TestValidateTopologySpreadConstraints(t *testing.T) { MatchLabelKeys: []string{"/simple"}, }}, wantFieldErrors: field.ErrorList{ - field.Invalid(fieldPathMatchLabelKeys.Index(0), nil, "").WithOrigin("labelKey"), + field.Invalid(fieldPathMatchLabelKeys.Index(0), nil, "").WithOrigin("format=k8s-label-key"), }, opts: PodValidationOptions{ AllowMatchLabelKeysInPodTopologySpread: true, @@ -24485,7 +24474,7 @@ func TestValidateTopologySpreadConstraints(t *testing.T) { MatchLabelKeys: []string{"/simple"}, }}, wantFieldErrors: field.ErrorList{ - field.Invalid(fieldPathMatchLabelKeys.Index(0), nil, "").WithOrigin("labelKey"), + field.Invalid(fieldPathMatchLabelKeys.Index(0), nil, "").WithOrigin("format=k8s-label-key"), }, opts: PodValidationOptions{ AllowMatchLabelKeysInPodTopologySpread: true, @@ -24584,7 +24573,7 @@ func TestValidateTopologySpreadConstraints(t *testing.T) { LabelSelector: &metav1.LabelSelector{MatchLabels: map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "foo"}}, }}, wantFieldErrors: field.ErrorList{ - field.Invalid(labelSelectorField.Child("matchLabels"), nil, "").WithOrigin("labelKey"), + field.Invalid(labelSelectorField.Child("matchLabels"), nil, "").WithOrigin("format=k8s-label-key"), }, opts: PodValidationOptions{ AllowMatchLabelKeysInPodTopologySpread: true, @@ -26093,7 +26082,7 @@ func TestValidatePodHostName(t *testing.T) { HostnameOverride: ptr.To(""), }, expectedErrs: field.ErrorList{ - field.Invalid(field.NewPath("spec.hostnameOverride"), "", "RFC 1123"), + field.Invalid(field.NewPath("spec.hostnameOverride"), nil, "").WithOrigin("format=k8s-long-name"), }, }, { @@ -26132,7 +26121,7 @@ func TestValidatePodHostName(t *testing.T) { HostnameOverride: ptr.To("Not-RFC1123"), }, expectedErrs: field.ErrorList{ - field.Invalid(field.NewPath("spec.hostnameOverride"), "", "RFC 1123"), + field.Invalid(field.NewPath("spec.hostnameOverride"), nil, "").WithOrigin("format=k8s-long-name"), }, }, { diff --git a/pkg/apis/resource/install/install.go b/pkg/apis/resource/install/install.go index a747f62003dc7..ab936326c5ff4 100644 --- a/pkg/apis/resource/install/install.go +++ b/pkg/apis/resource/install/install.go @@ -40,6 +40,5 @@ func Install(scheme *runtime.Scheme) { utilruntime.Must(v1beta1.AddToScheme(scheme)) utilruntime.Must(v1beta2.AddToScheme(scheme)) utilruntime.Must(v1.AddToScheme(scheme)) - // TODO (https://github.com/kubernetes/kubernetes/issues/133131): put v1 first in 1.35 - utilruntime.Must(scheme.SetVersionPriority(v1beta2.SchemeGroupVersion, v1.SchemeGroupVersion, v1beta1.SchemeGroupVersion, v1alpha3.SchemeGroupVersion)) + utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion, v1beta2.SchemeGroupVersion, v1beta1.SchemeGroupVersion, v1alpha3.SchemeGroupVersion)) } diff --git a/pkg/apis/resource/v1/doc.go b/pkg/apis/resource/v1/doc.go index 9166fefdbd613..d608dbef1ef4d 100644 --- a/pkg/apis/resource/v1/doc.go +++ b/pkg/apis/resource/v1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:conversion-gen-external-types=k8s.io/api/resource/v1 // +k8s:defaulter-gen=TypeMeta // +k8s:defaulter-gen-input=k8s.io/api/resource/v1 +// +k8s:validation-gen=TypeMeta +// +k8s:validation-gen-input=k8s.io/api/resource/v1 // Package v1 is the v1 version of the resource API. package v1 diff --git a/pkg/apis/resource/v1/zz_generated.validations.go b/pkg/apis/resource/v1/zz_generated.validations.go new file mode 100644 index 0000000000000..fcbb4eeeef45b --- /dev/null +++ b/pkg/apis/resource/v1/zz_generated.validations.go @@ -0,0 +1,958 @@ +//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 validation-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + fmt "fmt" + + resourcev1 "k8s.io/api/resource/v1" + equality "k8s.io/apimachinery/pkg/api/equality" + operation "k8s.io/apimachinery/pkg/api/operation" + safe "k8s.io/apimachinery/pkg/api/safe" + validate "k8s.io/apimachinery/pkg/api/validate" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" + field "k8s.io/apimachinery/pkg/util/validation/field" +) + +func init() { localSchemeBuilder.Register(RegisterValidations) } + +// RegisterValidations adds validation functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterValidations(scheme *runtime.Scheme) error { + // type DeviceClass + scheme.AddValidationFunc((*resourcev1.DeviceClass)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/": + return Validate_DeviceClass(ctx, op, nil /* fldPath */, obj.(*resourcev1.DeviceClass), safe.Cast[*resourcev1.DeviceClass](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + // type DeviceClassList + scheme.AddValidationFunc((*resourcev1.DeviceClassList)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/": + return Validate_DeviceClassList(ctx, op, nil /* fldPath */, obj.(*resourcev1.DeviceClassList), safe.Cast[*resourcev1.DeviceClassList](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + // type ResourceClaim + scheme.AddValidationFunc((*resourcev1.ResourceClaim)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/", "/status": + return Validate_ResourceClaim(ctx, op, nil /* fldPath */, obj.(*resourcev1.ResourceClaim), safe.Cast[*resourcev1.ResourceClaim](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + // type ResourceClaimList + scheme.AddValidationFunc((*resourcev1.ResourceClaimList)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/": + return Validate_ResourceClaimList(ctx, op, nil /* fldPath */, obj.(*resourcev1.ResourceClaimList), safe.Cast[*resourcev1.ResourceClaimList](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + // type ResourceClaimTemplate + scheme.AddValidationFunc((*resourcev1.ResourceClaimTemplate)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/": + return Validate_ResourceClaimTemplate(ctx, op, nil /* fldPath */, obj.(*resourcev1.ResourceClaimTemplate), safe.Cast[*resourcev1.ResourceClaimTemplate](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + // type ResourceClaimTemplateList + scheme.AddValidationFunc((*resourcev1.ResourceClaimTemplateList)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/": + return Validate_ResourceClaimTemplateList(ctx, op, nil /* fldPath */, obj.(*resourcev1.ResourceClaimTemplateList), safe.Cast[*resourcev1.ResourceClaimTemplateList](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + return nil +} + +// Validate_AllocatedDeviceStatus validates an instance of AllocatedDeviceStatus according +// to declarative validation rules in the API schema. +func Validate_AllocatedDeviceStatus(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.AllocatedDeviceStatus) (errs field.ErrorList) { + // field resourcev1.AllocatedDeviceStatus.Driver has no validation + // field resourcev1.AllocatedDeviceStatus.Pool has no validation + // field resourcev1.AllocatedDeviceStatus.Device has no validation + + // field resourcev1.AllocatedDeviceStatus.ShareID + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.UUID(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("shareID"), obj.ShareID, safe.Field(oldObj, func(oldObj *resourcev1.AllocatedDeviceStatus) *string { return oldObj.ShareID }))...) + + // field resourcev1.AllocatedDeviceStatus.Conditions has no validation + // field resourcev1.AllocatedDeviceStatus.Data has no validation + // field resourcev1.AllocatedDeviceStatus.NetworkData has no validation + return errs +} + +// Validate_AllocationResult validates an instance of AllocationResult according +// to declarative validation rules in the API schema. +func Validate_AllocationResult(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.AllocationResult) (errs field.ErrorList) { + // field resourcev1.AllocationResult.Devices + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1.DeviceAllocationResult) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceAllocationResult(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("devices"), &obj.Devices, safe.Field(oldObj, func(oldObj *resourcev1.AllocationResult) *resourcev1.DeviceAllocationResult { return &oldObj.Devices }))...) + + // field resourcev1.AllocationResult.NodeSelector has no validation + // field resourcev1.AllocationResult.AllocationTimestamp has no validation + return errs +} + +// Validate_DeviceAllocationConfiguration validates an instance of DeviceAllocationConfiguration according +// to declarative validation rules in the API schema. +func Validate_DeviceAllocationConfiguration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.DeviceAllocationConfiguration) (errs field.ErrorList) { + // field resourcev1.DeviceAllocationConfiguration.Source has no validation + // field resourcev1.DeviceAllocationConfiguration.Requests has no validation + + // field resourcev1.DeviceAllocationConfiguration.DeviceConfiguration + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1.DeviceConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceConfiguration(ctx, op, fldPath, obj, oldObj)...) + return + }(safe.Value(fldPath, func() *field.Path { return fldPath.Child("resourcev1.DeviceConfiguration") }), &obj.DeviceConfiguration, safe.Field(oldObj, func(oldObj *resourcev1.DeviceAllocationConfiguration) *resourcev1.DeviceConfiguration { + return &oldObj.DeviceConfiguration + }))...) + + return errs +} + +// Validate_DeviceAllocationResult validates an instance of DeviceAllocationResult according +// to declarative validation rules in the API schema. +func Validate_DeviceAllocationResult(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.DeviceAllocationResult) (errs field.ErrorList) { + // field resourcev1.DeviceAllocationResult.Results + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.DeviceRequestAllocationResult) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceRequestAllocationResult)...) + return + }(fldPath.Child("results"), obj.Results, safe.Field(oldObj, func(oldObj *resourcev1.DeviceAllocationResult) []resourcev1.DeviceRequestAllocationResult { + return oldObj.Results + }))...) + + // field resourcev1.DeviceAllocationResult.Config + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.DeviceAllocationConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceAllocationConfiguration)...) + return + }(fldPath.Child("config"), obj.Config, safe.Field(oldObj, func(oldObj *resourcev1.DeviceAllocationResult) []resourcev1.DeviceAllocationConfiguration { + return oldObj.Config + }))...) + + return errs +} + +// Validate_DeviceClaim validates an instance of DeviceClaim according +// to declarative validation rules in the API schema. +func Validate_DeviceClaim(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.DeviceClaim) (errs field.ErrorList) { + // field resourcev1.DeviceClaim.Requests + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.DeviceRequest) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceRequest)...) + return + }(fldPath.Child("requests"), obj.Requests, safe.Field(oldObj, func(oldObj *resourcev1.DeviceClaim) []resourcev1.DeviceRequest { return oldObj.Requests }))...) + + // field resourcev1.DeviceClaim.Constraints + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.DeviceConstraint) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceConstraint)...) + return + }(fldPath.Child("constraints"), obj.Constraints, safe.Field(oldObj, func(oldObj *resourcev1.DeviceClaim) []resourcev1.DeviceConstraint { return oldObj.Constraints }))...) + + // field resourcev1.DeviceClaim.Config + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.DeviceClaimConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceClaimConfiguration)...) + return + }(fldPath.Child("config"), obj.Config, safe.Field(oldObj, func(oldObj *resourcev1.DeviceClaim) []resourcev1.DeviceClaimConfiguration { return oldObj.Config }))...) + + return errs +} + +// Validate_DeviceClaimConfiguration validates an instance of DeviceClaimConfiguration according +// to declarative validation rules in the API schema. +func Validate_DeviceClaimConfiguration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.DeviceClaimConfiguration) (errs field.ErrorList) { + // field resourcev1.DeviceClaimConfiguration.Requests + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + return + }(fldPath.Child("requests"), obj.Requests, safe.Field(oldObj, func(oldObj *resourcev1.DeviceClaimConfiguration) []string { return oldObj.Requests }))...) + + // field resourcev1.DeviceClaimConfiguration.DeviceConfiguration + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1.DeviceConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceConfiguration(ctx, op, fldPath, obj, oldObj)...) + return + }(safe.Value(fldPath, func() *field.Path { return fldPath.Child("resourcev1.DeviceConfiguration") }), &obj.DeviceConfiguration, safe.Field(oldObj, func(oldObj *resourcev1.DeviceClaimConfiguration) *resourcev1.DeviceConfiguration { + return &oldObj.DeviceConfiguration + }))...) + + return errs +} + +// Validate_DeviceClass validates an instance of DeviceClass according +// to declarative validation rules in the API schema. +func Validate_DeviceClass(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.DeviceClass) (errs field.ErrorList) { + // field resourcev1.DeviceClass.TypeMeta has no validation + // field resourcev1.DeviceClass.ObjectMeta has no validation + + // field resourcev1.DeviceClass.Spec + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1.DeviceClassSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceClassSpec(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *resourcev1.DeviceClass) *resourcev1.DeviceClassSpec { return &oldObj.Spec }))...) + + return errs +} + +// Validate_DeviceClassConfiguration validates an instance of DeviceClassConfiguration according +// to declarative validation rules in the API schema. +func Validate_DeviceClassConfiguration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.DeviceClassConfiguration) (errs field.ErrorList) { + // field resourcev1.DeviceClassConfiguration.DeviceConfiguration + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1.DeviceConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceConfiguration(ctx, op, fldPath, obj, oldObj)...) + return + }(safe.Value(fldPath, func() *field.Path { return fldPath.Child("resourcev1.DeviceConfiguration") }), &obj.DeviceConfiguration, safe.Field(oldObj, func(oldObj *resourcev1.DeviceClassConfiguration) *resourcev1.DeviceConfiguration { + return &oldObj.DeviceConfiguration + }))...) + + return errs +} + +// Validate_DeviceClassList validates an instance of DeviceClassList according +// to declarative validation rules in the API schema. +func Validate_DeviceClassList(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.DeviceClassList) (errs field.ErrorList) { + // field resourcev1.DeviceClassList.TypeMeta has no validation + // field resourcev1.DeviceClassList.ListMeta has no validation + + // field resourcev1.DeviceClassList.Items + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.DeviceClass) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceClass)...) + return + }(fldPath.Child("items"), obj.Items, safe.Field(oldObj, func(oldObj *resourcev1.DeviceClassList) []resourcev1.DeviceClass { return oldObj.Items }))...) + + return errs +} + +// Validate_DeviceClassSpec validates an instance of DeviceClassSpec according +// to declarative validation rules in the API schema. +func Validate_DeviceClassSpec(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.DeviceClassSpec) (errs field.ErrorList) { + // field resourcev1.DeviceClassSpec.Selectors + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.DeviceSelector) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + return + }(fldPath.Child("selectors"), obj.Selectors, safe.Field(oldObj, func(oldObj *resourcev1.DeviceClassSpec) []resourcev1.DeviceSelector { return oldObj.Selectors }))...) + + // field resourcev1.DeviceClassSpec.Config + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.DeviceClassConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceClassConfiguration)...) + return + }(fldPath.Child("config"), obj.Config, safe.Field(oldObj, func(oldObj *resourcev1.DeviceClassSpec) []resourcev1.DeviceClassConfiguration { return oldObj.Config }))...) + + // field resourcev1.DeviceClassSpec.ExtendedResourceName has no validation + return errs +} + +// Validate_DeviceConfiguration validates an instance of DeviceConfiguration according +// to declarative validation rules in the API schema. +func Validate_DeviceConfiguration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.DeviceConfiguration) (errs field.ErrorList) { + // field resourcev1.DeviceConfiguration.Opaque + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1.OpaqueDeviceConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // call the type's validation function + errs = append(errs, Validate_OpaqueDeviceConfiguration(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("opaque"), obj.Opaque, safe.Field(oldObj, func(oldObj *resourcev1.DeviceConfiguration) *resourcev1.OpaqueDeviceConfiguration { + return oldObj.Opaque + }))...) + + return errs +} + +// Validate_DeviceConstraint validates an instance of DeviceConstraint according +// to declarative validation rules in the API schema. +func Validate_DeviceConstraint(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.DeviceConstraint) (errs field.ErrorList) { + // field resourcev1.DeviceConstraint.Requests + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + return + }(fldPath.Child("requests"), obj.Requests, safe.Field(oldObj, func(oldObj *resourcev1.DeviceConstraint) []string { return oldObj.Requests }))...) + + // field resourcev1.DeviceConstraint.MatchAttribute has no validation + // field resourcev1.DeviceConstraint.DistinctAttribute has no validation + return errs +} + +// Validate_DeviceRequest validates an instance of DeviceRequest according +// to declarative validation rules in the API schema. +func Validate_DeviceRequest(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.DeviceRequest) (errs field.ErrorList) { + // field resourcev1.DeviceRequest.Name has no validation + + // field resourcev1.DeviceRequest.Exactly + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1.ExactDeviceRequest) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // call the type's validation function + errs = append(errs, Validate_ExactDeviceRequest(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("exactly"), obj.Exactly, safe.Field(oldObj, func(oldObj *resourcev1.DeviceRequest) *resourcev1.ExactDeviceRequest { return oldObj.Exactly }))...) + + // field resourcev1.DeviceRequest.FirstAvailable + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.DeviceSubRequest) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 8); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceSubRequest)...) + return + }(fldPath.Child("firstAvailable"), obj.FirstAvailable, safe.Field(oldObj, func(oldObj *resourcev1.DeviceRequest) []resourcev1.DeviceSubRequest { return oldObj.FirstAvailable }))...) + + return errs +} + +// Validate_DeviceRequestAllocationResult validates an instance of DeviceRequestAllocationResult according +// to declarative validation rules in the API schema. +func Validate_DeviceRequestAllocationResult(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.DeviceRequestAllocationResult) (errs field.ErrorList) { + // field resourcev1.DeviceRequestAllocationResult.Request has no validation + // field resourcev1.DeviceRequestAllocationResult.Driver has no validation + + // field resourcev1.DeviceRequestAllocationResult.Pool + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.ResourcePoolName(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("pool"), &obj.Pool, safe.Field(oldObj, func(oldObj *resourcev1.DeviceRequestAllocationResult) *string { return &oldObj.Pool }))...) + + // field resourcev1.DeviceRequestAllocationResult.Device has no validation + // field resourcev1.DeviceRequestAllocationResult.AdminAccess has no validation + + // field resourcev1.DeviceRequestAllocationResult.Tolerations + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.DeviceToleration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceToleration)...) + return + }(fldPath.Child("tolerations"), obj.Tolerations, safe.Field(oldObj, func(oldObj *resourcev1.DeviceRequestAllocationResult) []resourcev1.DeviceToleration { + return oldObj.Tolerations + }))...) + + // field resourcev1.DeviceRequestAllocationResult.BindingConditions has no validation + // field resourcev1.DeviceRequestAllocationResult.BindingFailureConditions has no validation + + // field resourcev1.DeviceRequestAllocationResult.ShareID + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *types.UID) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.UUID(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("shareID"), obj.ShareID, safe.Field(oldObj, func(oldObj *resourcev1.DeviceRequestAllocationResult) *types.UID { return oldObj.ShareID }))...) + + // field resourcev1.DeviceRequestAllocationResult.ConsumedCapacity has no validation + return errs +} + +// Validate_DeviceSubRequest validates an instance of DeviceSubRequest according +// to declarative validation rules in the API schema. +func Validate_DeviceSubRequest(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.DeviceSubRequest) (errs field.ErrorList) { + // field resourcev1.DeviceSubRequest.Name has no validation + // field resourcev1.DeviceSubRequest.DeviceClassName has no validation + + // field resourcev1.DeviceSubRequest.Selectors + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.DeviceSelector) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + return + }(fldPath.Child("selectors"), obj.Selectors, safe.Field(oldObj, func(oldObj *resourcev1.DeviceSubRequest) []resourcev1.DeviceSelector { return oldObj.Selectors }))...) + + // field resourcev1.DeviceSubRequest.AllocationMode has no validation + // field resourcev1.DeviceSubRequest.Count has no validation + + // field resourcev1.DeviceSubRequest.Tolerations + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.DeviceToleration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceToleration)...) + return + }(fldPath.Child("tolerations"), obj.Tolerations, safe.Field(oldObj, func(oldObj *resourcev1.DeviceSubRequest) []resourcev1.DeviceToleration { return oldObj.Tolerations }))...) + + // field resourcev1.DeviceSubRequest.Capacity has no validation + return errs +} + +// Validate_DeviceToleration validates an instance of DeviceToleration according +// to declarative validation rules in the API schema. +func Validate_DeviceToleration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.DeviceToleration) (errs field.ErrorList) { + // field resourcev1.DeviceToleration.Key + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalValue(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.LabelKey(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("key"), &obj.Key, safe.Field(oldObj, func(oldObj *resourcev1.DeviceToleration) *string { return &oldObj.Key }))...) + + // field resourcev1.DeviceToleration.Operator has no validation + // field resourcev1.DeviceToleration.Value has no validation + // field resourcev1.DeviceToleration.Effect has no validation + // field resourcev1.DeviceToleration.TolerationSeconds has no validation + return errs +} + +// Validate_ExactDeviceRequest validates an instance of ExactDeviceRequest according +// to declarative validation rules in the API schema. +func Validate_ExactDeviceRequest(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.ExactDeviceRequest) (errs field.ErrorList) { + // field resourcev1.ExactDeviceRequest.DeviceClassName has no validation + + // field resourcev1.ExactDeviceRequest.Selectors + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.DeviceSelector) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + return + }(fldPath.Child("selectors"), obj.Selectors, safe.Field(oldObj, func(oldObj *resourcev1.ExactDeviceRequest) []resourcev1.DeviceSelector { return oldObj.Selectors }))...) + + // field resourcev1.ExactDeviceRequest.AllocationMode has no validation + // field resourcev1.ExactDeviceRequest.Count has no validation + // field resourcev1.ExactDeviceRequest.AdminAccess has no validation + + // field resourcev1.ExactDeviceRequest.Tolerations + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.DeviceToleration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceToleration)...) + return + }(fldPath.Child("tolerations"), obj.Tolerations, safe.Field(oldObj, func(oldObj *resourcev1.ExactDeviceRequest) []resourcev1.DeviceToleration { return oldObj.Tolerations }))...) + + // field resourcev1.ExactDeviceRequest.Capacity has no validation + return errs +} + +// Validate_OpaqueDeviceConfiguration validates an instance of OpaqueDeviceConfiguration according +// to declarative validation rules in the API schema. +func Validate_OpaqueDeviceConfiguration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.OpaqueDeviceConfiguration) (errs field.ErrorList) { + // field resourcev1.OpaqueDeviceConfiguration.Driver + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.LongNameCaseless(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("driver"), &obj.Driver, safe.Field(oldObj, func(oldObj *resourcev1.OpaqueDeviceConfiguration) *string { return &oldObj.Driver }))...) + + // field resourcev1.OpaqueDeviceConfiguration.Parameters has no validation + return errs +} + +// Validate_ResourceClaim validates an instance of ResourceClaim according +// to declarative validation rules in the API schema. +func Validate_ResourceClaim(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.ResourceClaim) (errs field.ErrorList) { + // field resourcev1.ResourceClaim.TypeMeta has no validation + // field resourcev1.ResourceClaim.ObjectMeta has no validation + + // field resourcev1.ResourceClaim.Spec + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1.ResourceClaimSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.Immutable(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // call the type's validation function + errs = append(errs, Validate_ResourceClaimSpec(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *resourcev1.ResourceClaim) *resourcev1.ResourceClaimSpec { return &oldObj.Spec }))...) + + // field resourcev1.ResourceClaim.Status + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1.ResourceClaimStatus) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_ResourceClaimStatus(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("status"), &obj.Status, safe.Field(oldObj, func(oldObj *resourcev1.ResourceClaim) *resourcev1.ResourceClaimStatus { return &oldObj.Status }))...) + + return errs +} + +// Validate_ResourceClaimList validates an instance of ResourceClaimList according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimList(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.ResourceClaimList) (errs field.ErrorList) { + // field resourcev1.ResourceClaimList.TypeMeta has no validation + // field resourcev1.ResourceClaimList.ListMeta has no validation + + // field resourcev1.ResourceClaimList.Items + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.ResourceClaim) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_ResourceClaim)...) + return + }(fldPath.Child("items"), obj.Items, safe.Field(oldObj, func(oldObj *resourcev1.ResourceClaimList) []resourcev1.ResourceClaim { return oldObj.Items }))...) + + return errs +} + +// Validate_ResourceClaimSpec validates an instance of ResourceClaimSpec according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimSpec(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.ResourceClaimSpec) (errs field.ErrorList) { + // field resourcev1.ResourceClaimSpec.Devices + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1.DeviceClaim) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceClaim(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("devices"), &obj.Devices, safe.Field(oldObj, func(oldObj *resourcev1.ResourceClaimSpec) *resourcev1.DeviceClaim { return &oldObj.Devices }))...) + + return errs +} + +// Validate_ResourceClaimStatus validates an instance of ResourceClaimStatus according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimStatus(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.ResourceClaimStatus) (errs field.ErrorList) { + // field resourcev1.ResourceClaimStatus.Allocation + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1.AllocationResult) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // call the type's validation function + errs = append(errs, Validate_AllocationResult(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("allocation"), obj.Allocation, safe.Field(oldObj, func(oldObj *resourcev1.ResourceClaimStatus) *resourcev1.AllocationResult { return oldObj.Allocation }))...) + + // field resourcev1.ResourceClaimStatus.ReservedFor + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.ResourceClaimConsumerReference) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // lists with map semantics require unique keys + errs = append(errs, validate.Unique(ctx, op, fldPath, obj, oldObj, func(a resourcev1.ResourceClaimConsumerReference, b resourcev1.ResourceClaimConsumerReference) bool { + return a.UID == b.UID + })...) + return + }(fldPath.Child("reservedFor"), obj.ReservedFor, safe.Field(oldObj, func(oldObj *resourcev1.ResourceClaimStatus) []resourcev1.ResourceClaimConsumerReference { + return oldObj.ReservedFor + }))...) + + // field resourcev1.ResourceClaimStatus.Devices + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.AllocatedDeviceStatus) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_AllocatedDeviceStatus)...) + return + }(fldPath.Child("devices"), obj.Devices, safe.Field(oldObj, func(oldObj *resourcev1.ResourceClaimStatus) []resourcev1.AllocatedDeviceStatus { return oldObj.Devices }))...) + + return errs +} + +// Validate_ResourceClaimTemplate validates an instance of ResourceClaimTemplate according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimTemplate(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.ResourceClaimTemplate) (errs field.ErrorList) { + // field resourcev1.ResourceClaimTemplate.TypeMeta has no validation + // field resourcev1.ResourceClaimTemplate.ObjectMeta has no validation + + // field resourcev1.ResourceClaimTemplate.Spec + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1.ResourceClaimTemplateSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_ResourceClaimTemplateSpec(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *resourcev1.ResourceClaimTemplate) *resourcev1.ResourceClaimTemplateSpec { + return &oldObj.Spec + }))...) + + return errs +} + +// Validate_ResourceClaimTemplateList validates an instance of ResourceClaimTemplateList according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimTemplateList(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.ResourceClaimTemplateList) (errs field.ErrorList) { + // field resourcev1.ResourceClaimTemplateList.TypeMeta has no validation + // field resourcev1.ResourceClaimTemplateList.ListMeta has no validation + + // field resourcev1.ResourceClaimTemplateList.Items + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1.ResourceClaimTemplate) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_ResourceClaimTemplate)...) + return + }(fldPath.Child("items"), obj.Items, safe.Field(oldObj, func(oldObj *resourcev1.ResourceClaimTemplateList) []resourcev1.ResourceClaimTemplate { + return oldObj.Items + }))...) + + return errs +} + +// Validate_ResourceClaimTemplateSpec validates an instance of ResourceClaimTemplateSpec according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimTemplateSpec(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1.ResourceClaimTemplateSpec) (errs field.ErrorList) { + // field resourcev1.ResourceClaimTemplateSpec.ObjectMeta has no validation + + // field resourcev1.ResourceClaimTemplateSpec.Spec + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1.ResourceClaimSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_ResourceClaimSpec(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *resourcev1.ResourceClaimTemplateSpec) *resourcev1.ResourceClaimSpec { return &oldObj.Spec }))...) + + return errs +} diff --git a/pkg/apis/resource/v1beta1/doc.go b/pkg/apis/resource/v1beta1/doc.go index f014667f8da2e..f95eb5f3c9f0d 100644 --- a/pkg/apis/resource/v1beta1/doc.go +++ b/pkg/apis/resource/v1beta1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:conversion-gen-external-types=k8s.io/api/resource/v1beta1 // +k8s:defaulter-gen=TypeMeta // +k8s:defaulter-gen-input=k8s.io/api/resource/v1beta1 +// +k8s:validation-gen=TypeMeta +// +k8s:validation-gen-input=k8s.io/api/resource/v1beta1 // Package v1beta1 is the v1beta1 version of the resource API. package v1beta1 diff --git a/pkg/apis/resource/v1beta1/zz_generated.validations.go b/pkg/apis/resource/v1beta1/zz_generated.validations.go new file mode 100644 index 0000000000000..55fe714e9566e --- /dev/null +++ b/pkg/apis/resource/v1beta1/zz_generated.validations.go @@ -0,0 +1,966 @@ +//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 validation-gen. DO NOT EDIT. + +package v1beta1 + +import ( + context "context" + fmt "fmt" + + resourcev1beta1 "k8s.io/api/resource/v1beta1" + equality "k8s.io/apimachinery/pkg/api/equality" + operation "k8s.io/apimachinery/pkg/api/operation" + safe "k8s.io/apimachinery/pkg/api/safe" + validate "k8s.io/apimachinery/pkg/api/validate" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" + field "k8s.io/apimachinery/pkg/util/validation/field" +) + +func init() { localSchemeBuilder.Register(RegisterValidations) } + +// RegisterValidations adds validation functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterValidations(scheme *runtime.Scheme) error { + // type DeviceClass + scheme.AddValidationFunc((*resourcev1beta1.DeviceClass)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/": + return Validate_DeviceClass(ctx, op, nil /* fldPath */, obj.(*resourcev1beta1.DeviceClass), safe.Cast[*resourcev1beta1.DeviceClass](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + // type DeviceClassList + scheme.AddValidationFunc((*resourcev1beta1.DeviceClassList)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/": + return Validate_DeviceClassList(ctx, op, nil /* fldPath */, obj.(*resourcev1beta1.DeviceClassList), safe.Cast[*resourcev1beta1.DeviceClassList](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + // type ResourceClaim + scheme.AddValidationFunc((*resourcev1beta1.ResourceClaim)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/", "/status": + return Validate_ResourceClaim(ctx, op, nil /* fldPath */, obj.(*resourcev1beta1.ResourceClaim), safe.Cast[*resourcev1beta1.ResourceClaim](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + // type ResourceClaimList + scheme.AddValidationFunc((*resourcev1beta1.ResourceClaimList)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/": + return Validate_ResourceClaimList(ctx, op, nil /* fldPath */, obj.(*resourcev1beta1.ResourceClaimList), safe.Cast[*resourcev1beta1.ResourceClaimList](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + // type ResourceClaimTemplate + scheme.AddValidationFunc((*resourcev1beta1.ResourceClaimTemplate)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/": + return Validate_ResourceClaimTemplate(ctx, op, nil /* fldPath */, obj.(*resourcev1beta1.ResourceClaimTemplate), safe.Cast[*resourcev1beta1.ResourceClaimTemplate](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + // type ResourceClaimTemplateList + scheme.AddValidationFunc((*resourcev1beta1.ResourceClaimTemplateList)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/": + return Validate_ResourceClaimTemplateList(ctx, op, nil /* fldPath */, obj.(*resourcev1beta1.ResourceClaimTemplateList), safe.Cast[*resourcev1beta1.ResourceClaimTemplateList](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + return nil +} + +// Validate_AllocatedDeviceStatus validates an instance of AllocatedDeviceStatus according +// to declarative validation rules in the API schema. +func Validate_AllocatedDeviceStatus(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.AllocatedDeviceStatus) (errs field.ErrorList) { + // field resourcev1beta1.AllocatedDeviceStatus.Driver has no validation + // field resourcev1beta1.AllocatedDeviceStatus.Pool has no validation + // field resourcev1beta1.AllocatedDeviceStatus.Device has no validation + + // field resourcev1beta1.AllocatedDeviceStatus.ShareID + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.UUID(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("shareID"), obj.ShareID, safe.Field(oldObj, func(oldObj *resourcev1beta1.AllocatedDeviceStatus) *string { return oldObj.ShareID }))...) + + // field resourcev1beta1.AllocatedDeviceStatus.Conditions has no validation + // field resourcev1beta1.AllocatedDeviceStatus.Data has no validation + // field resourcev1beta1.AllocatedDeviceStatus.NetworkData has no validation + return errs +} + +// Validate_AllocationResult validates an instance of AllocationResult according +// to declarative validation rules in the API schema. +func Validate_AllocationResult(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.AllocationResult) (errs field.ErrorList) { + // field resourcev1beta1.AllocationResult.Devices + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceAllocationResult) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceAllocationResult(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("devices"), &obj.Devices, safe.Field(oldObj, func(oldObj *resourcev1beta1.AllocationResult) *resourcev1beta1.DeviceAllocationResult { + return &oldObj.Devices + }))...) + + // field resourcev1beta1.AllocationResult.NodeSelector has no validation + // field resourcev1beta1.AllocationResult.AllocationTimestamp has no validation + return errs +} + +// Validate_DeviceAllocationConfiguration validates an instance of DeviceAllocationConfiguration according +// to declarative validation rules in the API schema. +func Validate_DeviceAllocationConfiguration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceAllocationConfiguration) (errs field.ErrorList) { + // field resourcev1beta1.DeviceAllocationConfiguration.Source has no validation + // field resourcev1beta1.DeviceAllocationConfiguration.Requests has no validation + + // field resourcev1beta1.DeviceAllocationConfiguration.DeviceConfiguration + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceConfiguration(ctx, op, fldPath, obj, oldObj)...) + return + }(safe.Value(fldPath, func() *field.Path { return fldPath.Child("resourcev1beta1.DeviceConfiguration") }), &obj.DeviceConfiguration, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceAllocationConfiguration) *resourcev1beta1.DeviceConfiguration { + return &oldObj.DeviceConfiguration + }))...) + + return errs +} + +// Validate_DeviceAllocationResult validates an instance of DeviceAllocationResult according +// to declarative validation rules in the API schema. +func Validate_DeviceAllocationResult(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceAllocationResult) (errs field.ErrorList) { + // field resourcev1beta1.DeviceAllocationResult.Results + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.DeviceRequestAllocationResult) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceRequestAllocationResult)...) + return + }(fldPath.Child("results"), obj.Results, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceAllocationResult) []resourcev1beta1.DeviceRequestAllocationResult { + return oldObj.Results + }))...) + + // field resourcev1beta1.DeviceAllocationResult.Config + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.DeviceAllocationConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceAllocationConfiguration)...) + return + }(fldPath.Child("config"), obj.Config, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceAllocationResult) []resourcev1beta1.DeviceAllocationConfiguration { + return oldObj.Config + }))...) + + return errs +} + +// Validate_DeviceClaim validates an instance of DeviceClaim according +// to declarative validation rules in the API schema. +func Validate_DeviceClaim(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceClaim) (errs field.ErrorList) { + // field resourcev1beta1.DeviceClaim.Requests + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.DeviceRequest) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceRequest)...) + return + }(fldPath.Child("requests"), obj.Requests, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceClaim) []resourcev1beta1.DeviceRequest { return oldObj.Requests }))...) + + // field resourcev1beta1.DeviceClaim.Constraints + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.DeviceConstraint) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceConstraint)...) + return + }(fldPath.Child("constraints"), obj.Constraints, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceClaim) []resourcev1beta1.DeviceConstraint { + return oldObj.Constraints + }))...) + + // field resourcev1beta1.DeviceClaim.Config + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.DeviceClaimConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceClaimConfiguration)...) + return + }(fldPath.Child("config"), obj.Config, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceClaim) []resourcev1beta1.DeviceClaimConfiguration { + return oldObj.Config + }))...) + + return errs +} + +// Validate_DeviceClaimConfiguration validates an instance of DeviceClaimConfiguration according +// to declarative validation rules in the API schema. +func Validate_DeviceClaimConfiguration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceClaimConfiguration) (errs field.ErrorList) { + // field resourcev1beta1.DeviceClaimConfiguration.Requests + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + return + }(fldPath.Child("requests"), obj.Requests, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceClaimConfiguration) []string { return oldObj.Requests }))...) + + // field resourcev1beta1.DeviceClaimConfiguration.DeviceConfiguration + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceConfiguration(ctx, op, fldPath, obj, oldObj)...) + return + }(safe.Value(fldPath, func() *field.Path { return fldPath.Child("resourcev1beta1.DeviceConfiguration") }), &obj.DeviceConfiguration, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceClaimConfiguration) *resourcev1beta1.DeviceConfiguration { + return &oldObj.DeviceConfiguration + }))...) + + return errs +} + +// Validate_DeviceClass validates an instance of DeviceClass according +// to declarative validation rules in the API schema. +func Validate_DeviceClass(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceClass) (errs field.ErrorList) { + // field resourcev1beta1.DeviceClass.TypeMeta has no validation + // field resourcev1beta1.DeviceClass.ObjectMeta has no validation + + // field resourcev1beta1.DeviceClass.Spec + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceClassSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceClassSpec(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceClass) *resourcev1beta1.DeviceClassSpec { return &oldObj.Spec }))...) + + return errs +} + +// Validate_DeviceClassConfiguration validates an instance of DeviceClassConfiguration according +// to declarative validation rules in the API schema. +func Validate_DeviceClassConfiguration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceClassConfiguration) (errs field.ErrorList) { + // field resourcev1beta1.DeviceClassConfiguration.DeviceConfiguration + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceConfiguration(ctx, op, fldPath, obj, oldObj)...) + return + }(safe.Value(fldPath, func() *field.Path { return fldPath.Child("resourcev1beta1.DeviceConfiguration") }), &obj.DeviceConfiguration, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceClassConfiguration) *resourcev1beta1.DeviceConfiguration { + return &oldObj.DeviceConfiguration + }))...) + + return errs +} + +// Validate_DeviceClassList validates an instance of DeviceClassList according +// to declarative validation rules in the API schema. +func Validate_DeviceClassList(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceClassList) (errs field.ErrorList) { + // field resourcev1beta1.DeviceClassList.TypeMeta has no validation + // field resourcev1beta1.DeviceClassList.ListMeta has no validation + + // field resourcev1beta1.DeviceClassList.Items + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.DeviceClass) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceClass)...) + return + }(fldPath.Child("items"), obj.Items, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceClassList) []resourcev1beta1.DeviceClass { return oldObj.Items }))...) + + return errs +} + +// Validate_DeviceClassSpec validates an instance of DeviceClassSpec according +// to declarative validation rules in the API schema. +func Validate_DeviceClassSpec(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceClassSpec) (errs field.ErrorList) { + // field resourcev1beta1.DeviceClassSpec.Selectors + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.DeviceSelector) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + return + }(fldPath.Child("selectors"), obj.Selectors, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceClassSpec) []resourcev1beta1.DeviceSelector { + return oldObj.Selectors + }))...) + + // field resourcev1beta1.DeviceClassSpec.Config + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.DeviceClassConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceClassConfiguration)...) + return + }(fldPath.Child("config"), obj.Config, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceClassSpec) []resourcev1beta1.DeviceClassConfiguration { + return oldObj.Config + }))...) + + // field resourcev1beta1.DeviceClassSpec.ExtendedResourceName has no validation + return errs +} + +// Validate_DeviceConfiguration validates an instance of DeviceConfiguration according +// to declarative validation rules in the API schema. +func Validate_DeviceConfiguration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceConfiguration) (errs field.ErrorList) { + // field resourcev1beta1.DeviceConfiguration.Opaque + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta1.OpaqueDeviceConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // call the type's validation function + errs = append(errs, Validate_OpaqueDeviceConfiguration(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("opaque"), obj.Opaque, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceConfiguration) *resourcev1beta1.OpaqueDeviceConfiguration { + return oldObj.Opaque + }))...) + + return errs +} + +// Validate_DeviceConstraint validates an instance of DeviceConstraint according +// to declarative validation rules in the API schema. +func Validate_DeviceConstraint(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceConstraint) (errs field.ErrorList) { + // field resourcev1beta1.DeviceConstraint.Requests + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + return + }(fldPath.Child("requests"), obj.Requests, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceConstraint) []string { return oldObj.Requests }))...) + + // field resourcev1beta1.DeviceConstraint.MatchAttribute has no validation + // field resourcev1beta1.DeviceConstraint.DistinctAttribute has no validation + return errs +} + +// Validate_DeviceRequest validates an instance of DeviceRequest according +// to declarative validation rules in the API schema. +func Validate_DeviceRequest(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceRequest) (errs field.ErrorList) { + // field resourcev1beta1.DeviceRequest.Name has no validation + // field resourcev1beta1.DeviceRequest.DeviceClassName has no validation + + // field resourcev1beta1.DeviceRequest.Selectors + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.DeviceSelector) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + return + }(fldPath.Child("selectors"), obj.Selectors, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceRequest) []resourcev1beta1.DeviceSelector { return oldObj.Selectors }))...) + + // field resourcev1beta1.DeviceRequest.AllocationMode has no validation + // field resourcev1beta1.DeviceRequest.Count has no validation + // field resourcev1beta1.DeviceRequest.AdminAccess has no validation + + // field resourcev1beta1.DeviceRequest.FirstAvailable + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.DeviceSubRequest) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 8); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceSubRequest)...) + return + }(fldPath.Child("firstAvailable"), obj.FirstAvailable, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceRequest) []resourcev1beta1.DeviceSubRequest { + return oldObj.FirstAvailable + }))...) + + // field resourcev1beta1.DeviceRequest.Tolerations + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.DeviceToleration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceToleration)...) + return + }(fldPath.Child("tolerations"), obj.Tolerations, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceRequest) []resourcev1beta1.DeviceToleration { + return oldObj.Tolerations + }))...) + + // field resourcev1beta1.DeviceRequest.Capacity has no validation + return errs +} + +// Validate_DeviceRequestAllocationResult validates an instance of DeviceRequestAllocationResult according +// to declarative validation rules in the API schema. +func Validate_DeviceRequestAllocationResult(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceRequestAllocationResult) (errs field.ErrorList) { + // field resourcev1beta1.DeviceRequestAllocationResult.Request has no validation + // field resourcev1beta1.DeviceRequestAllocationResult.Driver has no validation + + // field resourcev1beta1.DeviceRequestAllocationResult.Pool + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.ResourcePoolName(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("pool"), &obj.Pool, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceRequestAllocationResult) *string { return &oldObj.Pool }))...) + + // field resourcev1beta1.DeviceRequestAllocationResult.Device has no validation + // field resourcev1beta1.DeviceRequestAllocationResult.AdminAccess has no validation + + // field resourcev1beta1.DeviceRequestAllocationResult.Tolerations + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.DeviceToleration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 16); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceToleration)...) + return + }(fldPath.Child("tolerations"), obj.Tolerations, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceRequestAllocationResult) []resourcev1beta1.DeviceToleration { + return oldObj.Tolerations + }))...) + + // field resourcev1beta1.DeviceRequestAllocationResult.BindingConditions has no validation + // field resourcev1beta1.DeviceRequestAllocationResult.BindingFailureConditions has no validation + + // field resourcev1beta1.DeviceRequestAllocationResult.ShareID + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *types.UID) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.UUID(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("shareID"), obj.ShareID, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceRequestAllocationResult) *types.UID { return oldObj.ShareID }))...) + + // field resourcev1beta1.DeviceRequestAllocationResult.ConsumedCapacity has no validation + return errs +} + +// Validate_DeviceSubRequest validates an instance of DeviceSubRequest according +// to declarative validation rules in the API schema. +func Validate_DeviceSubRequest(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceSubRequest) (errs field.ErrorList) { + // field resourcev1beta1.DeviceSubRequest.Name has no validation + // field resourcev1beta1.DeviceSubRequest.DeviceClassName has no validation + + // field resourcev1beta1.DeviceSubRequest.Selectors + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.DeviceSelector) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + return + }(fldPath.Child("selectors"), obj.Selectors, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceSubRequest) []resourcev1beta1.DeviceSelector { + return oldObj.Selectors + }))...) + + // field resourcev1beta1.DeviceSubRequest.AllocationMode has no validation + // field resourcev1beta1.DeviceSubRequest.Count has no validation + + // field resourcev1beta1.DeviceSubRequest.Tolerations + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.DeviceToleration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceToleration)...) + return + }(fldPath.Child("tolerations"), obj.Tolerations, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceSubRequest) []resourcev1beta1.DeviceToleration { + return oldObj.Tolerations + }))...) + + // field resourcev1beta1.DeviceSubRequest.Capacity has no validation + return errs +} + +// Validate_DeviceToleration validates an instance of DeviceToleration according +// to declarative validation rules in the API schema. +func Validate_DeviceToleration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceToleration) (errs field.ErrorList) { + // field resourcev1beta1.DeviceToleration.Key + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalValue(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.LabelKey(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("key"), &obj.Key, safe.Field(oldObj, func(oldObj *resourcev1beta1.DeviceToleration) *string { return &oldObj.Key }))...) + + // field resourcev1beta1.DeviceToleration.Operator has no validation + // field resourcev1beta1.DeviceToleration.Value has no validation + // field resourcev1beta1.DeviceToleration.Effect has no validation + // field resourcev1beta1.DeviceToleration.TolerationSeconds has no validation + return errs +} + +// Validate_OpaqueDeviceConfiguration validates an instance of OpaqueDeviceConfiguration according +// to declarative validation rules in the API schema. +func Validate_OpaqueDeviceConfiguration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.OpaqueDeviceConfiguration) (errs field.ErrorList) { + // field resourcev1beta1.OpaqueDeviceConfiguration.Driver + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.LongNameCaseless(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("driver"), &obj.Driver, safe.Field(oldObj, func(oldObj *resourcev1beta1.OpaqueDeviceConfiguration) *string { return &oldObj.Driver }))...) + + // field resourcev1beta1.OpaqueDeviceConfiguration.Parameters has no validation + return errs +} + +// Validate_ResourceClaim validates an instance of ResourceClaim according +// to declarative validation rules in the API schema. +func Validate_ResourceClaim(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.ResourceClaim) (errs field.ErrorList) { + // field resourcev1beta1.ResourceClaim.TypeMeta has no validation + // field resourcev1beta1.ResourceClaim.ObjectMeta has no validation + + // field resourcev1beta1.ResourceClaim.Spec + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta1.ResourceClaimSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.Immutable(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // call the type's validation function + errs = append(errs, Validate_ResourceClaimSpec(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *resourcev1beta1.ResourceClaim) *resourcev1beta1.ResourceClaimSpec { return &oldObj.Spec }))...) + + // field resourcev1beta1.ResourceClaim.Status + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta1.ResourceClaimStatus) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_ResourceClaimStatus(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("status"), &obj.Status, safe.Field(oldObj, func(oldObj *resourcev1beta1.ResourceClaim) *resourcev1beta1.ResourceClaimStatus { + return &oldObj.Status + }))...) + + return errs +} + +// Validate_ResourceClaimList validates an instance of ResourceClaimList according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimList(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.ResourceClaimList) (errs field.ErrorList) { + // field resourcev1beta1.ResourceClaimList.TypeMeta has no validation + // field resourcev1beta1.ResourceClaimList.ListMeta has no validation + + // field resourcev1beta1.ResourceClaimList.Items + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.ResourceClaim) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_ResourceClaim)...) + return + }(fldPath.Child("items"), obj.Items, safe.Field(oldObj, func(oldObj *resourcev1beta1.ResourceClaimList) []resourcev1beta1.ResourceClaim { return oldObj.Items }))...) + + return errs +} + +// Validate_ResourceClaimSpec validates an instance of ResourceClaimSpec according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimSpec(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.ResourceClaimSpec) (errs field.ErrorList) { + // field resourcev1beta1.ResourceClaimSpec.Devices + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta1.DeviceClaim) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceClaim(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("devices"), &obj.Devices, safe.Field(oldObj, func(oldObj *resourcev1beta1.ResourceClaimSpec) *resourcev1beta1.DeviceClaim { return &oldObj.Devices }))...) + + return errs +} + +// Validate_ResourceClaimStatus validates an instance of ResourceClaimStatus according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimStatus(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.ResourceClaimStatus) (errs field.ErrorList) { + // field resourcev1beta1.ResourceClaimStatus.Allocation + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta1.AllocationResult) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // call the type's validation function + errs = append(errs, Validate_AllocationResult(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("allocation"), obj.Allocation, safe.Field(oldObj, func(oldObj *resourcev1beta1.ResourceClaimStatus) *resourcev1beta1.AllocationResult { + return oldObj.Allocation + }))...) + + // field resourcev1beta1.ResourceClaimStatus.ReservedFor + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.ResourceClaimConsumerReference) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // lists with map semantics require unique keys + errs = append(errs, validate.Unique(ctx, op, fldPath, obj, oldObj, func(a resourcev1beta1.ResourceClaimConsumerReference, b resourcev1beta1.ResourceClaimConsumerReference) bool { + return a.UID == b.UID + })...) + return + }(fldPath.Child("reservedFor"), obj.ReservedFor, safe.Field(oldObj, func(oldObj *resourcev1beta1.ResourceClaimStatus) []resourcev1beta1.ResourceClaimConsumerReference { + return oldObj.ReservedFor + }))...) + + // field resourcev1beta1.ResourceClaimStatus.Devices + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.AllocatedDeviceStatus) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_AllocatedDeviceStatus)...) + return + }(fldPath.Child("devices"), obj.Devices, safe.Field(oldObj, func(oldObj *resourcev1beta1.ResourceClaimStatus) []resourcev1beta1.AllocatedDeviceStatus { + return oldObj.Devices + }))...) + + return errs +} + +// Validate_ResourceClaimTemplate validates an instance of ResourceClaimTemplate according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimTemplate(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.ResourceClaimTemplate) (errs field.ErrorList) { + // field resourcev1beta1.ResourceClaimTemplate.TypeMeta has no validation + // field resourcev1beta1.ResourceClaimTemplate.ObjectMeta has no validation + + // field resourcev1beta1.ResourceClaimTemplate.Spec + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta1.ResourceClaimTemplateSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_ResourceClaimTemplateSpec(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *resourcev1beta1.ResourceClaimTemplate) *resourcev1beta1.ResourceClaimTemplateSpec { + return &oldObj.Spec + }))...) + + return errs +} + +// Validate_ResourceClaimTemplateList validates an instance of ResourceClaimTemplateList according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimTemplateList(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.ResourceClaimTemplateList) (errs field.ErrorList) { + // field resourcev1beta1.ResourceClaimTemplateList.TypeMeta has no validation + // field resourcev1beta1.ResourceClaimTemplateList.ListMeta has no validation + + // field resourcev1beta1.ResourceClaimTemplateList.Items + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta1.ResourceClaimTemplate) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_ResourceClaimTemplate)...) + return + }(fldPath.Child("items"), obj.Items, safe.Field(oldObj, func(oldObj *resourcev1beta1.ResourceClaimTemplateList) []resourcev1beta1.ResourceClaimTemplate { + return oldObj.Items + }))...) + + return errs +} + +// Validate_ResourceClaimTemplateSpec validates an instance of ResourceClaimTemplateSpec according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimTemplateSpec(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta1.ResourceClaimTemplateSpec) (errs field.ErrorList) { + // field resourcev1beta1.ResourceClaimTemplateSpec.ObjectMeta has no validation + + // field resourcev1beta1.ResourceClaimTemplateSpec.Spec + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta1.ResourceClaimSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_ResourceClaimSpec(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *resourcev1beta1.ResourceClaimTemplateSpec) *resourcev1beta1.ResourceClaimSpec { + return &oldObj.Spec + }))...) + + return errs +} diff --git a/pkg/apis/resource/v1beta2/doc.go b/pkg/apis/resource/v1beta2/doc.go index beea4f266b95f..ca447ac715443 100644 --- a/pkg/apis/resource/v1beta2/doc.go +++ b/pkg/apis/resource/v1beta2/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:conversion-gen-external-types=k8s.io/api/resource/v1beta2 // +k8s:defaulter-gen=TypeMeta // +k8s:defaulter-gen-input=k8s.io/api/resource/v1beta2 +// +k8s:validation-gen=TypeMeta +// +k8s:validation-gen-input=k8s.io/api/resource/v1beta2 // Package v1beta2 is the v1beta2 version of the resource API. package v1beta2 diff --git a/pkg/apis/resource/v1beta2/zz_generated.validations.go b/pkg/apis/resource/v1beta2/zz_generated.validations.go new file mode 100644 index 0000000000000..79bf064880a0a --- /dev/null +++ b/pkg/apis/resource/v1beta2/zz_generated.validations.go @@ -0,0 +1,986 @@ +//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 validation-gen. DO NOT EDIT. + +package v1beta2 + +import ( + context "context" + fmt "fmt" + + resourcev1beta2 "k8s.io/api/resource/v1beta2" + equality "k8s.io/apimachinery/pkg/api/equality" + operation "k8s.io/apimachinery/pkg/api/operation" + safe "k8s.io/apimachinery/pkg/api/safe" + validate "k8s.io/apimachinery/pkg/api/validate" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" + field "k8s.io/apimachinery/pkg/util/validation/field" +) + +func init() { localSchemeBuilder.Register(RegisterValidations) } + +// RegisterValidations adds validation functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterValidations(scheme *runtime.Scheme) error { + // type DeviceClass + scheme.AddValidationFunc((*resourcev1beta2.DeviceClass)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/": + return Validate_DeviceClass(ctx, op, nil /* fldPath */, obj.(*resourcev1beta2.DeviceClass), safe.Cast[*resourcev1beta2.DeviceClass](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + // type DeviceClassList + scheme.AddValidationFunc((*resourcev1beta2.DeviceClassList)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/": + return Validate_DeviceClassList(ctx, op, nil /* fldPath */, obj.(*resourcev1beta2.DeviceClassList), safe.Cast[*resourcev1beta2.DeviceClassList](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + // type ResourceClaim + scheme.AddValidationFunc((*resourcev1beta2.ResourceClaim)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/", "/status": + return Validate_ResourceClaim(ctx, op, nil /* fldPath */, obj.(*resourcev1beta2.ResourceClaim), safe.Cast[*resourcev1beta2.ResourceClaim](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + // type ResourceClaimList + scheme.AddValidationFunc((*resourcev1beta2.ResourceClaimList)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/": + return Validate_ResourceClaimList(ctx, op, nil /* fldPath */, obj.(*resourcev1beta2.ResourceClaimList), safe.Cast[*resourcev1beta2.ResourceClaimList](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + // type ResourceClaimTemplate + scheme.AddValidationFunc((*resourcev1beta2.ResourceClaimTemplate)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/": + return Validate_ResourceClaimTemplate(ctx, op, nil /* fldPath */, obj.(*resourcev1beta2.ResourceClaimTemplate), safe.Cast[*resourcev1beta2.ResourceClaimTemplate](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + // type ResourceClaimTemplateList + scheme.AddValidationFunc((*resourcev1beta2.ResourceClaimTemplateList)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { + switch op.Request.SubresourcePath() { + case "/": + return Validate_ResourceClaimTemplateList(ctx, op, nil /* fldPath */, obj.(*resourcev1beta2.ResourceClaimTemplateList), safe.Cast[*resourcev1beta2.ResourceClaimTemplateList](oldObj)) + } + return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))} + }) + return nil +} + +// Validate_AllocatedDeviceStatus validates an instance of AllocatedDeviceStatus according +// to declarative validation rules in the API schema. +func Validate_AllocatedDeviceStatus(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.AllocatedDeviceStatus) (errs field.ErrorList) { + // field resourcev1beta2.AllocatedDeviceStatus.Driver has no validation + // field resourcev1beta2.AllocatedDeviceStatus.Pool has no validation + // field resourcev1beta2.AllocatedDeviceStatus.Device has no validation + + // field resourcev1beta2.AllocatedDeviceStatus.ShareID + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.UUID(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("shareID"), obj.ShareID, safe.Field(oldObj, func(oldObj *resourcev1beta2.AllocatedDeviceStatus) *string { return oldObj.ShareID }))...) + + // field resourcev1beta2.AllocatedDeviceStatus.Conditions has no validation + // field resourcev1beta2.AllocatedDeviceStatus.Data has no validation + // field resourcev1beta2.AllocatedDeviceStatus.NetworkData has no validation + return errs +} + +// Validate_AllocationResult validates an instance of AllocationResult according +// to declarative validation rules in the API schema. +func Validate_AllocationResult(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.AllocationResult) (errs field.ErrorList) { + // field resourcev1beta2.AllocationResult.Devices + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceAllocationResult) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceAllocationResult(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("devices"), &obj.Devices, safe.Field(oldObj, func(oldObj *resourcev1beta2.AllocationResult) *resourcev1beta2.DeviceAllocationResult { + return &oldObj.Devices + }))...) + + // field resourcev1beta2.AllocationResult.NodeSelector has no validation + // field resourcev1beta2.AllocationResult.AllocationTimestamp has no validation + return errs +} + +// Validate_DeviceAllocationConfiguration validates an instance of DeviceAllocationConfiguration according +// to declarative validation rules in the API schema. +func Validate_DeviceAllocationConfiguration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceAllocationConfiguration) (errs field.ErrorList) { + // field resourcev1beta2.DeviceAllocationConfiguration.Source has no validation + // field resourcev1beta2.DeviceAllocationConfiguration.Requests has no validation + + // field resourcev1beta2.DeviceAllocationConfiguration.DeviceConfiguration + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceConfiguration(ctx, op, fldPath, obj, oldObj)...) + return + }(safe.Value(fldPath, func() *field.Path { return fldPath.Child("resourcev1beta2.DeviceConfiguration") }), &obj.DeviceConfiguration, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceAllocationConfiguration) *resourcev1beta2.DeviceConfiguration { + return &oldObj.DeviceConfiguration + }))...) + + return errs +} + +// Validate_DeviceAllocationResult validates an instance of DeviceAllocationResult according +// to declarative validation rules in the API schema. +func Validate_DeviceAllocationResult(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceAllocationResult) (errs field.ErrorList) { + // field resourcev1beta2.DeviceAllocationResult.Results + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.DeviceRequestAllocationResult) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceRequestAllocationResult)...) + return + }(fldPath.Child("results"), obj.Results, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceAllocationResult) []resourcev1beta2.DeviceRequestAllocationResult { + return oldObj.Results + }))...) + + // field resourcev1beta2.DeviceAllocationResult.Config + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.DeviceAllocationConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceAllocationConfiguration)...) + return + }(fldPath.Child("config"), obj.Config, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceAllocationResult) []resourcev1beta2.DeviceAllocationConfiguration { + return oldObj.Config + }))...) + + return errs +} + +// Validate_DeviceClaim validates an instance of DeviceClaim according +// to declarative validation rules in the API schema. +func Validate_DeviceClaim(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceClaim) (errs field.ErrorList) { + // field resourcev1beta2.DeviceClaim.Requests + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.DeviceRequest) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceRequest)...) + return + }(fldPath.Child("requests"), obj.Requests, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceClaim) []resourcev1beta2.DeviceRequest { return oldObj.Requests }))...) + + // field resourcev1beta2.DeviceClaim.Constraints + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.DeviceConstraint) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceConstraint)...) + return + }(fldPath.Child("constraints"), obj.Constraints, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceClaim) []resourcev1beta2.DeviceConstraint { + return oldObj.Constraints + }))...) + + // field resourcev1beta2.DeviceClaim.Config + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.DeviceClaimConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceClaimConfiguration)...) + return + }(fldPath.Child("config"), obj.Config, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceClaim) []resourcev1beta2.DeviceClaimConfiguration { + return oldObj.Config + }))...) + + return errs +} + +// Validate_DeviceClaimConfiguration validates an instance of DeviceClaimConfiguration according +// to declarative validation rules in the API schema. +func Validate_DeviceClaimConfiguration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceClaimConfiguration) (errs field.ErrorList) { + // field resourcev1beta2.DeviceClaimConfiguration.Requests + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + return + }(fldPath.Child("requests"), obj.Requests, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceClaimConfiguration) []string { return oldObj.Requests }))...) + + // field resourcev1beta2.DeviceClaimConfiguration.DeviceConfiguration + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceConfiguration(ctx, op, fldPath, obj, oldObj)...) + return + }(safe.Value(fldPath, func() *field.Path { return fldPath.Child("resourcev1beta2.DeviceConfiguration") }), &obj.DeviceConfiguration, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceClaimConfiguration) *resourcev1beta2.DeviceConfiguration { + return &oldObj.DeviceConfiguration + }))...) + + return errs +} + +// Validate_DeviceClass validates an instance of DeviceClass according +// to declarative validation rules in the API schema. +func Validate_DeviceClass(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceClass) (errs field.ErrorList) { + // field resourcev1beta2.DeviceClass.TypeMeta has no validation + // field resourcev1beta2.DeviceClass.ObjectMeta has no validation + + // field resourcev1beta2.DeviceClass.Spec + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceClassSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceClassSpec(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceClass) *resourcev1beta2.DeviceClassSpec { return &oldObj.Spec }))...) + + return errs +} + +// Validate_DeviceClassConfiguration validates an instance of DeviceClassConfiguration according +// to declarative validation rules in the API schema. +func Validate_DeviceClassConfiguration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceClassConfiguration) (errs field.ErrorList) { + // field resourcev1beta2.DeviceClassConfiguration.DeviceConfiguration + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceConfiguration(ctx, op, fldPath, obj, oldObj)...) + return + }(safe.Value(fldPath, func() *field.Path { return fldPath.Child("resourcev1beta2.DeviceConfiguration") }), &obj.DeviceConfiguration, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceClassConfiguration) *resourcev1beta2.DeviceConfiguration { + return &oldObj.DeviceConfiguration + }))...) + + return errs +} + +// Validate_DeviceClassList validates an instance of DeviceClassList according +// to declarative validation rules in the API schema. +func Validate_DeviceClassList(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceClassList) (errs field.ErrorList) { + // field resourcev1beta2.DeviceClassList.TypeMeta has no validation + // field resourcev1beta2.DeviceClassList.ListMeta has no validation + + // field resourcev1beta2.DeviceClassList.Items + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.DeviceClass) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceClass)...) + return + }(fldPath.Child("items"), obj.Items, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceClassList) []resourcev1beta2.DeviceClass { return oldObj.Items }))...) + + return errs +} + +// Validate_DeviceClassSpec validates an instance of DeviceClassSpec according +// to declarative validation rules in the API schema. +func Validate_DeviceClassSpec(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceClassSpec) (errs field.ErrorList) { + // field resourcev1beta2.DeviceClassSpec.Selectors + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.DeviceSelector) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + return + }(fldPath.Child("selectors"), obj.Selectors, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceClassSpec) []resourcev1beta2.DeviceSelector { + return oldObj.Selectors + }))...) + + // field resourcev1beta2.DeviceClassSpec.Config + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.DeviceClassConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceClassConfiguration)...) + return + }(fldPath.Child("config"), obj.Config, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceClassSpec) []resourcev1beta2.DeviceClassConfiguration { + return oldObj.Config + }))...) + + // field resourcev1beta2.DeviceClassSpec.ExtendedResourceName has no validation + return errs +} + +// Validate_DeviceConfiguration validates an instance of DeviceConfiguration according +// to declarative validation rules in the API schema. +func Validate_DeviceConfiguration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceConfiguration) (errs field.ErrorList) { + // field resourcev1beta2.DeviceConfiguration.Opaque + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta2.OpaqueDeviceConfiguration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // call the type's validation function + errs = append(errs, Validate_OpaqueDeviceConfiguration(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("opaque"), obj.Opaque, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceConfiguration) *resourcev1beta2.OpaqueDeviceConfiguration { + return oldObj.Opaque + }))...) + + return errs +} + +// Validate_DeviceConstraint validates an instance of DeviceConstraint according +// to declarative validation rules in the API schema. +func Validate_DeviceConstraint(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceConstraint) (errs field.ErrorList) { + // field resourcev1beta2.DeviceConstraint.Requests + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + return + }(fldPath.Child("requests"), obj.Requests, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceConstraint) []string { return oldObj.Requests }))...) + + // field resourcev1beta2.DeviceConstraint.MatchAttribute has no validation + // field resourcev1beta2.DeviceConstraint.DistinctAttribute has no validation + return errs +} + +// Validate_DeviceRequest validates an instance of DeviceRequest according +// to declarative validation rules in the API schema. +func Validate_DeviceRequest(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceRequest) (errs field.ErrorList) { + // field resourcev1beta2.DeviceRequest.Name has no validation + + // field resourcev1beta2.DeviceRequest.Exactly + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta2.ExactDeviceRequest) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // call the type's validation function + errs = append(errs, Validate_ExactDeviceRequest(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("exactly"), obj.Exactly, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceRequest) *resourcev1beta2.ExactDeviceRequest { return oldObj.Exactly }))...) + + // field resourcev1beta2.DeviceRequest.FirstAvailable + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.DeviceSubRequest) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 8); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceSubRequest)...) + return + }(fldPath.Child("firstAvailable"), obj.FirstAvailable, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceRequest) []resourcev1beta2.DeviceSubRequest { + return oldObj.FirstAvailable + }))...) + + return errs +} + +// Validate_DeviceRequestAllocationResult validates an instance of DeviceRequestAllocationResult according +// to declarative validation rules in the API schema. +func Validate_DeviceRequestAllocationResult(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceRequestAllocationResult) (errs field.ErrorList) { + // field resourcev1beta2.DeviceRequestAllocationResult.Request has no validation + // field resourcev1beta2.DeviceRequestAllocationResult.Driver has no validation + + // field resourcev1beta2.DeviceRequestAllocationResult.Pool + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.ResourcePoolName(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("pool"), &obj.Pool, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceRequestAllocationResult) *string { return &oldObj.Pool }))...) + + // field resourcev1beta2.DeviceRequestAllocationResult.Device has no validation + // field resourcev1beta2.DeviceRequestAllocationResult.AdminAccess has no validation + + // field resourcev1beta2.DeviceRequestAllocationResult.Tolerations + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.DeviceToleration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceToleration)...) + return + }(fldPath.Child("tolerations"), obj.Tolerations, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceRequestAllocationResult) []resourcev1beta2.DeviceToleration { + return oldObj.Tolerations + }))...) + + // field resourcev1beta2.DeviceRequestAllocationResult.BindingConditions has no validation + // field resourcev1beta2.DeviceRequestAllocationResult.BindingFailureConditions has no validation + + // field resourcev1beta2.DeviceRequestAllocationResult.ShareID + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *types.UID) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.UUID(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("shareID"), obj.ShareID, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceRequestAllocationResult) *types.UID { return oldObj.ShareID }))...) + + // field resourcev1beta2.DeviceRequestAllocationResult.ConsumedCapacity has no validation + return errs +} + +// Validate_DeviceSubRequest validates an instance of DeviceSubRequest according +// to declarative validation rules in the API schema. +func Validate_DeviceSubRequest(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceSubRequest) (errs field.ErrorList) { + // field resourcev1beta2.DeviceSubRequest.Name has no validation + // field resourcev1beta2.DeviceSubRequest.DeviceClassName has no validation + + // field resourcev1beta2.DeviceSubRequest.Selectors + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.DeviceSelector) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + return + }(fldPath.Child("selectors"), obj.Selectors, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceSubRequest) []resourcev1beta2.DeviceSelector { + return oldObj.Selectors + }))...) + + // field resourcev1beta2.DeviceSubRequest.AllocationMode has no validation + // field resourcev1beta2.DeviceSubRequest.Count has no validation + + // field resourcev1beta2.DeviceSubRequest.Tolerations + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.DeviceToleration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceToleration)...) + return + }(fldPath.Child("tolerations"), obj.Tolerations, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceSubRequest) []resourcev1beta2.DeviceToleration { + return oldObj.Tolerations + }))...) + + // field resourcev1beta2.DeviceSubRequest.Capacity has no validation + return errs +} + +// Validate_DeviceToleration validates an instance of DeviceToleration according +// to declarative validation rules in the API schema. +func Validate_DeviceToleration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceToleration) (errs field.ErrorList) { + // field resourcev1beta2.DeviceToleration.Key + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalValue(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.LabelKey(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("key"), &obj.Key, safe.Field(oldObj, func(oldObj *resourcev1beta2.DeviceToleration) *string { return &oldObj.Key }))...) + + // field resourcev1beta2.DeviceToleration.Operator has no validation + // field resourcev1beta2.DeviceToleration.Value has no validation + // field resourcev1beta2.DeviceToleration.Effect has no validation + // field resourcev1beta2.DeviceToleration.TolerationSeconds has no validation + return errs +} + +// Validate_ExactDeviceRequest validates an instance of ExactDeviceRequest according +// to declarative validation rules in the API schema. +func Validate_ExactDeviceRequest(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.ExactDeviceRequest) (errs field.ErrorList) { + // field resourcev1beta2.ExactDeviceRequest.DeviceClassName has no validation + + // field resourcev1beta2.ExactDeviceRequest.Selectors + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.DeviceSelector) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + return + }(fldPath.Child("selectors"), obj.Selectors, safe.Field(oldObj, func(oldObj *resourcev1beta2.ExactDeviceRequest) []resourcev1beta2.DeviceSelector { + return oldObj.Selectors + }))...) + + // field resourcev1beta2.ExactDeviceRequest.AllocationMode has no validation + // field resourcev1beta2.ExactDeviceRequest.Count has no validation + // field resourcev1beta2.ExactDeviceRequest.AdminAccess has no validation + + // field resourcev1beta2.ExactDeviceRequest.Tolerations + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.DeviceToleration) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceToleration)...) + return + }(fldPath.Child("tolerations"), obj.Tolerations, safe.Field(oldObj, func(oldObj *resourcev1beta2.ExactDeviceRequest) []resourcev1beta2.DeviceToleration { + return oldObj.Tolerations + }))...) + + // field resourcev1beta2.ExactDeviceRequest.Capacity has no validation + return errs +} + +// Validate_OpaqueDeviceConfiguration validates an instance of OpaqueDeviceConfiguration according +// to declarative validation rules in the API schema. +func Validate_OpaqueDeviceConfiguration(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.OpaqueDeviceConfiguration) (errs field.ErrorList) { + // field resourcev1beta2.OpaqueDeviceConfiguration.Driver + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *string) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + errs = append(errs, validate.LongNameCaseless(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("driver"), &obj.Driver, safe.Field(oldObj, func(oldObj *resourcev1beta2.OpaqueDeviceConfiguration) *string { return &oldObj.Driver }))...) + + // field resourcev1beta2.OpaqueDeviceConfiguration.Parameters has no validation + return errs +} + +// Validate_ResourceClaim validates an instance of ResourceClaim according +// to declarative validation rules in the API schema. +func Validate_ResourceClaim(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.ResourceClaim) (errs field.ErrorList) { + // field resourcev1beta2.ResourceClaim.TypeMeta has no validation + // field resourcev1beta2.ResourceClaim.ObjectMeta has no validation + + // field resourcev1beta2.ResourceClaim.Spec + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta2.ResourceClaimSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.Immutable(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + errs = append(errs, e...) + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // call the type's validation function + errs = append(errs, Validate_ResourceClaimSpec(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *resourcev1beta2.ResourceClaim) *resourcev1beta2.ResourceClaimSpec { return &oldObj.Spec }))...) + + // field resourcev1beta2.ResourceClaim.Status + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta2.ResourceClaimStatus) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_ResourceClaimStatus(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("status"), &obj.Status, safe.Field(oldObj, func(oldObj *resourcev1beta2.ResourceClaim) *resourcev1beta2.ResourceClaimStatus { + return &oldObj.Status + }))...) + + return errs +} + +// Validate_ResourceClaimList validates an instance of ResourceClaimList according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimList(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.ResourceClaimList) (errs field.ErrorList) { + // field resourcev1beta2.ResourceClaimList.TypeMeta has no validation + // field resourcev1beta2.ResourceClaimList.ListMeta has no validation + + // field resourcev1beta2.ResourceClaimList.Items + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.ResourceClaim) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_ResourceClaim)...) + return + }(fldPath.Child("items"), obj.Items, safe.Field(oldObj, func(oldObj *resourcev1beta2.ResourceClaimList) []resourcev1beta2.ResourceClaim { return oldObj.Items }))...) + + return errs +} + +// Validate_ResourceClaimSpec validates an instance of ResourceClaimSpec according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimSpec(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.ResourceClaimSpec) (errs field.ErrorList) { + // field resourcev1beta2.ResourceClaimSpec.Devices + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta2.DeviceClaim) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_DeviceClaim(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("devices"), &obj.Devices, safe.Field(oldObj, func(oldObj *resourcev1beta2.ResourceClaimSpec) *resourcev1beta2.DeviceClaim { return &oldObj.Devices }))...) + + return errs +} + +// Validate_ResourceClaimStatus validates an instance of ResourceClaimStatus according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimStatus(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.ResourceClaimStatus) (errs field.ErrorList) { + // field resourcev1beta2.ResourceClaimStatus.Allocation + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta2.AllocationResult) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // call the type's validation function + errs = append(errs, Validate_AllocationResult(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("allocation"), obj.Allocation, safe.Field(oldObj, func(oldObj *resourcev1beta2.ResourceClaimStatus) *resourcev1beta2.AllocationResult { + return oldObj.Allocation + }))...) + + // field resourcev1beta2.ResourceClaimStatus.ReservedFor + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.ResourceClaimConsumerReference) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // lists with map semantics require unique keys + errs = append(errs, validate.Unique(ctx, op, fldPath, obj, oldObj, func(a resourcev1beta2.ResourceClaimConsumerReference, b resourcev1beta2.ResourceClaimConsumerReference) bool { + return a.UID == b.UID + })...) + return + }(fldPath.Child("reservedFor"), obj.ReservedFor, safe.Field(oldObj, func(oldObj *resourcev1beta2.ResourceClaimStatus) []resourcev1beta2.ResourceClaimConsumerReference { + return oldObj.ReservedFor + }))...) + + // field resourcev1beta2.ResourceClaimStatus.Devices + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.AllocatedDeviceStatus) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call field-attached validations + earlyReturn := false + if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj); len(e) != 0 { + earlyReturn = true + } + if earlyReturn { + return // do not proceed + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_AllocatedDeviceStatus)...) + return + }(fldPath.Child("devices"), obj.Devices, safe.Field(oldObj, func(oldObj *resourcev1beta2.ResourceClaimStatus) []resourcev1beta2.AllocatedDeviceStatus { + return oldObj.Devices + }))...) + + return errs +} + +// Validate_ResourceClaimTemplate validates an instance of ResourceClaimTemplate according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimTemplate(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.ResourceClaimTemplate) (errs field.ErrorList) { + // field resourcev1beta2.ResourceClaimTemplate.TypeMeta has no validation + // field resourcev1beta2.ResourceClaimTemplate.ObjectMeta has no validation + + // field resourcev1beta2.ResourceClaimTemplate.Spec + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta2.ResourceClaimTemplateSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_ResourceClaimTemplateSpec(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *resourcev1beta2.ResourceClaimTemplate) *resourcev1beta2.ResourceClaimTemplateSpec { + return &oldObj.Spec + }))...) + + return errs +} + +// Validate_ResourceClaimTemplateList validates an instance of ResourceClaimTemplateList according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimTemplateList(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.ResourceClaimTemplateList) (errs field.ErrorList) { + // field resourcev1beta2.ResourceClaimTemplateList.TypeMeta has no validation + // field resourcev1beta2.ResourceClaimTemplateList.ListMeta has no validation + + // field resourcev1beta2.ResourceClaimTemplateList.Items + errs = append(errs, + func(fldPath *field.Path, obj, oldObj []resourcev1beta2.ResourceClaimTemplate) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // iterate the list and call the type's validation function + errs = append(errs, validate.EachSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_ResourceClaimTemplate)...) + return + }(fldPath.Child("items"), obj.Items, safe.Field(oldObj, func(oldObj *resourcev1beta2.ResourceClaimTemplateList) []resourcev1beta2.ResourceClaimTemplate { + return oldObj.Items + }))...) + + return errs +} + +// Validate_ResourceClaimTemplateSpec validates an instance of ResourceClaimTemplateSpec according +// to declarative validation rules in the API schema. +func Validate_ResourceClaimTemplateSpec(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *resourcev1beta2.ResourceClaimTemplateSpec) (errs field.ErrorList) { + // field resourcev1beta2.ResourceClaimTemplateSpec.ObjectMeta has no validation + + // field resourcev1beta2.ResourceClaimTemplateSpec.Spec + errs = append(errs, + func(fldPath *field.Path, obj, oldObj *resourcev1beta2.ResourceClaimSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && equality.Semantic.DeepEqual(obj, oldObj) { + return nil + } + // call the type's validation function + errs = append(errs, Validate_ResourceClaimSpec(ctx, op, fldPath, obj, oldObj)...) + return + }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *resourcev1beta2.ResourceClaimTemplateSpec) *resourcev1beta2.ResourceClaimSpec { + return &oldObj.Spec + }))...) + + return errs +} diff --git a/pkg/apis/resource/validation/validation.go b/pkg/apis/resource/validation/validation.go index b06472a453756..f74d2ff611819 100644 --- a/pkg/apis/resource/validation/validation.go +++ b/pkg/apis/resource/validation/validation.go @@ -21,10 +21,12 @@ import ( "errors" "fmt" "regexp" + "slices" "strconv" "strings" "github.com/google/uuid" + corev1 "k8s.io/api/core/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" apiresource "k8s.io/apimachinery/pkg/api/resource" @@ -65,11 +67,11 @@ func validatePoolName(name string, fldPath *field.Path) field.ErrorList { allErrs = append(allErrs, field.Required(fldPath, "")) } else { if len(name) > resource.PoolNameMaxLength { - allErrs = append(allErrs, field.TooLong(fldPath, "" /*unused*/, resource.PoolNameMaxLength)) + allErrs = append(allErrs, field.TooLong(fldPath, "" /*unused*/, resource.PoolNameMaxLength).WithOrigin("format=k8s-resource-pool-name")) } parts := strings.Split(name, "/") for _, part := range parts { - allErrs = append(allErrs, corevalidation.ValidateDNS1123Subdomain(part, fldPath)...) + allErrs = append(allErrs, corevalidation.ValidateDNS1123Subdomain(part, fldPath).WithOrigin("format=k8s-resource-pool-name")...) } } return allErrs @@ -82,7 +84,7 @@ func validateUID(uid string, fldPath *field.Path) field.ErrorList { } else if len(uid) != 36 || uid != strings.ToLower(uid) { allErrs = append(allErrs, field.Invalid(fldPath, uid, "uid must be in RFC 4122 normalized form, `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` with lowercase hexadecimal characters")) } - return allErrs + return allErrs.WithOrigin("format=k8s-uuid") } // ValidateResourceClaim validates a ResourceClaim. @@ -94,12 +96,12 @@ func ValidateResourceClaim(resourceClaim *resource.ResourceClaim) field.ErrorLis // ValidateResourceClaimUpdate tests if an update to ResourceClaim is valid. func ValidateResourceClaimUpdate(resourceClaim, oldClaim *resource.ResourceClaim) field.ErrorList { - allErrs := corevalidation.ValidateObjectMetaUpdate(&resourceClaim.ObjectMeta, &oldClaim.ObjectMeta, field.NewPath("metadata")) - allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(resourceClaim.Spec, oldClaim.Spec, field.NewPath("spec"))...) - // Because the spec is immutable, all CEL expressions in it must have been stored. - // If the user tries an update, this is not true and checking is less strict, but - // as there are errors, it doesn't matter. - allErrs = append(allErrs, validateResourceClaimSpec(&resourceClaim.Spec, field.NewPath("spec"), true)...) + allErrs := corevalidation.ValidateObjectMeta(&resourceClaim.ObjectMeta, true, corevalidation.ValidateResourceClaimName, field.NewPath("metadata")) + allErrs = append(allErrs, corevalidation.ValidateObjectMetaUpdate(&resourceClaim.ObjectMeta, &oldClaim.ObjectMeta, field.NewPath("metadata"))...) + // The spec is immutable. On update, we only check for immutability. + // Re-validating other fields is skipped because the user cannot change them; + // the only actionable error is for the immutability violation. + allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(resourceClaim.Spec, oldClaim.Spec, field.NewPath("spec")).WithOrigin("immutable").MarkCoveredByDeclarative()...) return allErrs } @@ -124,18 +126,18 @@ func validateDeviceClaim(deviceClaim *resource.DeviceClaim, fldPath *field.Path, func(request resource.DeviceRequest, fldPath *field.Path) field.ErrorList { return validateDeviceRequest(request, fldPath, stored) }, - func(request resource.DeviceRequest) (string, string) { - return request.Name, "name" + func(request resource.DeviceRequest) string { + return request.Name }, - fldPath.Child("requests"))...) + fldPath.Child("requests"), sizeCovered)...) allErrs = append(allErrs, validateSlice(deviceClaim.Constraints, resource.DeviceConstraintsMaxSize, func(constraint resource.DeviceConstraint, fldPath *field.Path) field.ErrorList { return validateDeviceConstraint(constraint, fldPath, requestNames) - }, fldPath.Child("constraints"))...) + }, fldPath.Child("constraints"), sizeCovered)...) allErrs = append(allErrs, validateSlice(deviceClaim.Config, resource.DeviceConfigMaxSize, func(config resource.DeviceClaimConfiguration, fldPath *field.Path) field.ErrorList { return validateDeviceClaimConfiguration(config, fldPath, requestNames, stored) - }, fldPath.Child("config"))...) + }, fldPath.Child("config"), sizeCovered)...) return allErrs } @@ -191,31 +193,34 @@ func gatherAllocatedDevices(allocationResult *resource.DeviceAllocationResult) s func validateDeviceRequest(request resource.DeviceRequest, fldPath *field.Path, stored bool) field.ErrorList { allErrs := validateRequestName(request.Name, fldPath.Child("name")) - numDeviceRequestType := 0 - if len(request.FirstAvailable) > 0 { + + hasFirstAvailable := len(request.FirstAvailable) > 0 + hasExactly := request.Exactly != nil + + if hasFirstAvailable { numDeviceRequestType++ - allErrs = append(allErrs, validateSet(request.FirstAvailable, resource.FirstAvailableDeviceRequestMaxSize, - func(subRequest resource.DeviceSubRequest, fldPath *field.Path) field.ErrorList { - return validateDeviceSubRequest(subRequest, fldPath, stored) - }, - func(subRequest resource.DeviceSubRequest) (string, string) { - return subRequest.Name, "name" - }, - fldPath.Child("firstAvailable"))...) } - - if request.Exactly != nil { + if hasExactly { numDeviceRequestType++ - allErrs = append(allErrs, validateExactDeviceRequest(*request.Exactly, fldPath.Child("exactly"), stored)...) } - switch numDeviceRequestType { - case 0: + switch { + case numDeviceRequestType == 0: allErrs = append(allErrs, field.Required(fldPath, "exactly one of `exactly` or `firstAvailable` is required")) - case 1: - default: + case numDeviceRequestType > 1: allErrs = append(allErrs, field.Invalid(fldPath, nil, "exactly one of `exactly` or `firstAvailable` is required, but multiple fields are set")) + case hasFirstAvailable: + allErrs = append(allErrs, validateSet(request.FirstAvailable, resource.FirstAvailableDeviceRequestMaxSize, + func(subRequest resource.DeviceSubRequest, fldPath *field.Path) field.ErrorList { + return validateDeviceSubRequest(subRequest, fldPath, stored) + }, + func(subRequest resource.DeviceSubRequest) string { + return subRequest.Name + }, + fldPath.Child("firstAvailable"), sizeCovered)...) + case hasExactly: + allErrs = append(allErrs, validateExactDeviceRequest(*request.Exactly, fldPath.Child("exactly"), stored)...) } return allErrs } @@ -274,7 +279,7 @@ func validateSelectorSlice(selectors []resource.DeviceSelector, fldPath *field.P func(selector resource.DeviceSelector, fldPath *field.Path) field.ErrorList { return validateSelector(selector, fldPath, stored) }, - fldPath) + fldPath, sizeCovered) } func validateSelector(selector resource.DeviceSelector, fldPath *field.Path, stored bool) field.ErrorList { @@ -330,7 +335,7 @@ func validateDeviceConstraint(constraint resource.DeviceConstraint, fldPath *fie func(name string, fldPath *field.Path) field.ErrorList { return validateRequestNameRef(name, fldPath, requestNames) }, - stringKey, fldPath.Child("requests"))...) + stringKey, fldPath.Child("requests"), sizeCovered)...) if constraint.MatchAttribute != nil { allErrs = append(allErrs, validateFullyQualifiedName(*constraint.MatchAttribute, fldPath.Child("matchAttribute"))...) } else if constraint.DistinctAttribute != nil { @@ -348,7 +353,7 @@ func validateDeviceClaimConfiguration(config resource.DeviceClaimConfiguration, allErrs = append(allErrs, validateSet(config.Requests, resource.DeviceRequestsMaxSize, func(name string, fldPath *field.Path) field.ErrorList { return validateRequestNameRef(name, fldPath, requestNames) - }, stringKey, fldPath.Child("requests"))...) + }, stringKey, fldPath.Child("requests"), sizeCovered)...) allErrs = append(allErrs, validateDeviceConfiguration(config.DeviceConfiguration, fldPath, stored)...) return allErrs } @@ -383,7 +388,7 @@ func validateDeviceConfiguration(config resource.DeviceConfiguration, fldPath *f func validateOpaqueConfiguration(config resource.OpaqueDeviceConfiguration, fldPath *field.Path, stored bool) field.ErrorList { var allErrs field.ErrorList - allErrs = append(allErrs, validateDriverName(config.Driver, fldPath.Child("driver"))...) + allErrs = append(allErrs, validateDriverName(config.Driver, fldPath.Child("driver"), corevalidation.RequiredCovered, corevalidation.FormatCovered)...) allErrs = append(allErrs, validateRawExtension(config.Parameters, fldPath.Child("parameters"), stored, resource.OpaqueParametersMaxLength)...) return allErrs } @@ -392,8 +397,8 @@ func validateResourceClaimStatusUpdate(status, oldStatus *resource.ResourceClaim var allErrs field.ErrorList allErrs = append(allErrs, validateSet(status.ReservedFor, resource.ResourceClaimReservedForMaxSize, validateResourceClaimUserReference, - func(consumer resource.ResourceClaimConsumerReference) (types.UID, string) { return consumer.UID, "uid" }, - fldPath.Child("reservedFor"))...) + func(consumer resource.ResourceClaimConsumerReference) types.UID { return consumer.UID }, + fldPath.Child("reservedFor"), uniquenessCovered)...) var allocatedDevices sets.Set[structured.SharedDeviceID] if status.Allocation != nil { @@ -403,9 +408,9 @@ func validateResourceClaimStatusUpdate(status, oldStatus *resource.ResourceClaim func(device resource.AllocatedDeviceStatus, fldPath *field.Path) field.ErrorList { return validateDeviceStatus(device, fldPath, allocatedDevices) }, - func(device resource.AllocatedDeviceStatus) (structured.SharedDeviceID, string) { + func(device resource.AllocatedDeviceStatus) structured.SharedDeviceID { deviceID := structured.MakeDeviceID(device.Driver, device.Pool, device.Device) - return structured.MakeSharedDeviceID(deviceID, (*types.UID)(device.ShareID)), "deviceID" + return structured.MakeSharedDeviceID(deviceID, (*types.UID)(device.ShareID)) }, fldPath.Child("devices"))...) @@ -484,11 +489,11 @@ func validateDeviceRequestAllocationResult(result resource.DeviceRequestAllocati var allErrs field.ErrorList allErrs = append(allErrs, validateRequestNameRef(result.Request, fldPath.Child("request"), requestNames)...) allErrs = append(allErrs, validateDriverName(result.Driver, fldPath.Child("driver"))...) - allErrs = append(allErrs, validatePoolName(result.Pool, fldPath.Child("pool"))...) + allErrs = append(allErrs, validatePoolName(result.Pool, fldPath.Child("pool")).MarkCoveredByDeclarative()...) allErrs = append(allErrs, validateDeviceName(result.Device, fldPath.Child("device"))...) allErrs = append(allErrs, validateDeviceBindingParameters(result.BindingConditions, result.BindingFailureConditions, fldPath)...) if result.ShareID != nil { - allErrs = append(allErrs, validateUID(string(*result.ShareID), fldPath.Child("shareID"))...) + allErrs = append(allErrs, validateUID(string(*result.ShareID), fldPath.Child("shareID")).MarkCoveredByDeclarative()...) } return allErrs } @@ -543,8 +548,9 @@ func validateDeviceClassSpec(spec, oldSpec *resource.DeviceClassSpec, fldPath *f func(selector resource.DeviceSelector, fldPath *field.Path) field.ErrorList { return validateSelector(selector, fldPath, stored) }, - fldPath.Child("selectors"))...) + fldPath.Child("selectors"), sizeCovered)...) // Same logic as above for configs. + stored = false if oldSpec != nil { stored = apiequality.Semantic.DeepEqual(spec.Config, oldSpec.Config) } @@ -552,7 +558,7 @@ func validateDeviceClassSpec(spec, oldSpec *resource.DeviceClassSpec, fldPath *f func(config resource.DeviceClassConfiguration, fldPath *field.Path) field.ErrorList { return validateDeviceClassConfiguration(config, fldPath, stored) }, - fldPath.Child("config"))...) + fldPath.Child("config"), sizeCovered)...) if spec.ExtendedResourceName != nil && !v1helper.IsExtendedResourceName(corev1.ResourceName(*spec.ExtendedResourceName)) { allErrs = append(allErrs, field.Invalid(fldPath.Child("extendedResourceName"), *spec.ExtendedResourceName, "must be a valid extended resource name")) @@ -580,11 +586,10 @@ func validateResourceClaimTemplateSpec(spec *resource.ResourceClaimTemplateSpec, // ValidateResourceClaimTemplateUpdate tests if an update to template is valid. func ValidateResourceClaimTemplateUpdate(template, oldTemplate *resource.ResourceClaimTemplate) field.ErrorList { allErrs := corevalidation.ValidateObjectMetaUpdate(&template.ObjectMeta, &oldTemplate.ObjectMeta, field.NewPath("metadata")) + // The spec is immutable. On update, we only check for immutability. + // Re-validating other fields is skipped because the user cannot change them; + // the only actionable error is for the immutability violation. allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(template.Spec, oldTemplate.Spec, field.NewPath("spec"))...) - // Because the spec is immutable, all CEL expressions in it must have been stored. - // If the user tries an update, this is not true and checking is less strict, but - // as there are errors, it doesn't matter. - allErrs = append(allErrs, validateResourceClaimTemplateSpec(&template.Spec, field.NewPath("spec"), true)...) return allErrs } @@ -672,8 +677,8 @@ func validateResourceSliceSpec(spec, oldSpec *resource.ResourceSliceSpec, fldPat func(device resource.Device, fldPath *field.Path) field.ErrorList { return validateDevice(device, fldPath, sharedCounterToCounterNames, spec.PerDeviceNodeSelection) }, - func(device resource.Device) (string, string) { - return device.Name, "name" + func(device resource.Device) string { + return device.Name }, fldPath.Child("devices"))...) // Size limit for total number of counters in devices enforced here. @@ -697,8 +702,8 @@ func validateResourceSliceSpec(spec, oldSpec *resource.ResourceSliceSpec, fldPat } allErrs = append(allErrs, validateSet(spec.SharedCounters, -1, validateCounterSet, - func(counterSet resource.CounterSet) (string, string) { - return counterSet.Name, "name" + func(counterSet resource.CounterSet) string { + return counterSet.Name }, fldPath.Child("sharedCounters"))...) return allErrs @@ -767,8 +772,8 @@ func validateDevice(device resource.Device, fldPath *field.Path, sharedCounterTo allErrs = append(allErrs, validateSet(device.ConsumesCounters, -1, validateDeviceCounterConsumption, - func(deviceCapacityConsumption resource.DeviceCounterConsumption) (string, string) { - return deviceCapacityConsumption.CounterSet, "counterSet" + func(deviceCapacityConsumption resource.DeviceCounterConsumption) string { + return deviceCapacityConsumption.CounterSet }, fldPath.Child("consumesCounters"))...) var countersLength int @@ -1097,38 +1102,60 @@ func validateCIdentifier(id string, fldPath *field.Path) field.ErrorList { return allErrs } +// validationOption is an option for validation. +type validationOption int + +const ( + // The validation of each item is covered by declarative validation. + itemsCovered validationOption = iota + // The list size check is covered by declarative validation. + sizeCovered + // The uniqueness check is covered by declarative validation. + uniquenessCovered +) + // validateSlice ensures that a slice does not exceed a certain maximum size // and that all entries are valid. // A negative maxSize disables the length check. -func validateSlice[T any](slice []T, maxSize int, validateItem func(T, *field.Path) field.ErrorList, fldPath *field.Path) field.ErrorList { +func validateSlice[T any](slice []T, maxSize int, validateItem func(T, *field.Path) field.ErrorList, fldPath *field.Path, opts ...validationOption) field.ErrorList { var allErrs field.ErrorList for i, item := range slice { idxPath := fldPath.Index(i) - allErrs = append(allErrs, validateItem(item, idxPath)...) + errs := validateItem(item, idxPath) + if slices.Contains(opts, itemsCovered) { + errs = errs.MarkCoveredByDeclarative() + } + allErrs = append(allErrs, errs...) } if maxSize >= 0 && len(slice) > maxSize { // Dumping the entire field into the error message is likely to be too long, // in particular when it is already beyond the maximum size. Instead this // just shows the number of entries. - allErrs = append(allErrs, field.TooMany(fldPath, len(slice), maxSize)) + err := field.TooMany(fldPath, len(slice), maxSize).WithOrigin("maxItems") + if slices.Contains(opts, sizeCovered) { + err = err.MarkCoveredByDeclarative() + } + allErrs = append(allErrs, err) } return allErrs } // validateSet ensures that a slice contains no duplicates, does not // exceed a certain maximum size and that all entries are valid. -func validateSet[T any, K comparable](slice []T, maxSize int, validateItem func(item T, fldPath *field.Path) field.ErrorList, itemKey func(T) (K, string), fldPath *field.Path) field.ErrorList { - allErrs := validateSlice(slice, maxSize, validateItem, fldPath) +func validateSet[T any, K comparable](slice []T, maxSize int, validateItem func(item T, fldPath *field.Path) field.ErrorList, itemKey func(T) K, fldPath *field.Path, opts ...validationOption) field.ErrorList { + allErrs := validateSlice(slice, maxSize, validateItem, fldPath, opts...) + allItems := sets.New[K]() for i, item := range slice { idxPath := fldPath.Index(i) - key, fieldName := itemKey(item) + key := itemKey(item) childPath := idxPath - if fieldName != "" { - childPath = childPath.Child(fieldName) - } if allItems.Has(key) { - allErrs = append(allErrs, field.Duplicate(childPath, key)) + err := field.Duplicate(childPath, key) + if slices.Contains(opts, uniquenessCovered) { + err = err.MarkCoveredByDeclarative() + } + allErrs = append(allErrs, err) } else { allItems.Insert(key) } @@ -1137,13 +1164,13 @@ func validateSet[T any, K comparable](slice []T, maxSize int, validateItem func( } // stringKey uses the item itself as a key for validateSet. -func stringKey(item string) (string, string) { - return item, "" +func stringKey(item string) string { + return item } // quantityKey uses the item itself as a key for validateSet. -func quantityKey(item apiresource.Quantity) (string, string) { - return strconv.FormatInt(item.Value(), 10), "" +func quantityKey(item apiresource.Quantity) string { + return strconv.FormatInt(item.Value(), 10) } // validateMap validates keys, items and the maximum length of a map. @@ -1186,7 +1213,7 @@ func validateDeviceStatus(device resource.AllocatedDeviceStatus, fldPath *field. allErrs = append(allErrs, validatePoolName(device.Pool, fldPath.Child("pool"))...) allErrs = append(allErrs, validateDeviceName(device.Device, fldPath.Child("device"))...) if device.ShareID != nil { - allErrs = append(allErrs, validateUID(*device.ShareID, fldPath.Child("shareID"))...) + allErrs = append(allErrs, validateUID(*device.ShareID, fldPath.Child("shareID")).MarkCoveredByDeclarative()...) } deviceID := structured.MakeDeviceID(device.Driver, device.Pool, device.Device) sharedDeviceID := structured.MakeSharedDeviceID(deviceID, (*types.UID)(device.ShareID)) @@ -1332,7 +1359,7 @@ func validateDeviceToleration(toleration resource.DeviceToleration, fldPath *fie var allErrs field.ErrorList if toleration.Key != "" { - allErrs = append(allErrs, metav1validation.ValidateLabelName(toleration.Key, fldPath.Child("key"))...) + allErrs = append(allErrs, metav1validation.ValidateLabelName(toleration.Key, fldPath.Child("key")).MarkCoveredByDeclarative()...) } switch toleration.Operator { case resource.DeviceTolerationOpExists: diff --git a/pkg/apis/resource/validation/validation_deviceclass_test.go b/pkg/apis/resource/validation/validation_deviceclass_test.go index 34de83bcbe935..f3d7779a522b6 100644 --- a/pkg/apis/resource/validation/validation_deviceclass_test.go +++ b/pkg/apis/resource/validation/validation_deviceclass_test.go @@ -219,7 +219,7 @@ func TestValidateClass(t *testing.T) { }, "too-many-selectors": { wantFailures: field.ErrorList{ - field.TooMany(field.NewPath("spec", "selectors"), resource.DeviceSelectorsMaxSize+1, resource.DeviceSelectorsMaxSize), + field.TooMany(field.NewPath("spec", "selectors"), resource.DeviceSelectorsMaxSize+1, resource.DeviceSelectorsMaxSize).WithOrigin("maxItems").MarkCoveredByDeclarative(), }, class: func() *resource.DeviceClass { class := testClass(goodName) @@ -236,8 +236,7 @@ func TestValidateClass(t *testing.T) { }, "configuration": { wantFailures: field.ErrorList{ - field.Required(field.NewPath("spec", "config").Index(1).Child("opaque", "driver"), ""), - field.Invalid(field.NewPath("spec", "config").Index(1).Child("opaque", "driver"), "", "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')"), + field.Required(field.NewPath("spec", "config").Index(1).Child("opaque", "driver"), "").MarkCoveredByDeclarative(), field.Required(field.NewPath("spec", "config").Index(1).Child("opaque", "parameters"), ""), field.Invalid(field.NewPath("spec", "config").Index(2).Child("opaque", "parameters"), "", "error parsing data as JSON: invalid character 'x' looking for beginning of value"), field.Invalid(field.NewPath("spec", "config").Index(3).Child("opaque", "parameters"), "", "must be a valid JSON object"), @@ -314,7 +313,7 @@ func TestValidateClass(t *testing.T) { }, "too-many-configs": { wantFailures: field.ErrorList{ - field.TooMany(field.NewPath("spec", "config"), resource.DeviceConfigMaxSize+1, resource.DeviceConfigMaxSize), + field.TooMany(field.NewPath("spec", "config"), resource.DeviceConfigMaxSize+1, resource.DeviceConfigMaxSize).WithOrigin("maxItems").MarkCoveredByDeclarative(), }, class: func() *resource.DeviceClass { class := testClass(goodName) diff --git a/pkg/apis/resource/validation/validation_resourceclaim_test.go b/pkg/apis/resource/validation/validation_resourceclaim_test.go index 96100b328d8a8..991f8cef768b1 100644 --- a/pkg/apis/resource/validation/validation_resourceclaim_test.go +++ b/pkg/apis/resource/validation/validation_resourceclaim_test.go @@ -259,17 +259,17 @@ func TestValidateClaim(t *testing.T) { }, "invalid-request": { wantFailures: field.ErrorList{ - field.TooMany(field.NewPath("spec", "devices", "requests"), resource.DeviceRequestsMaxSize+1, resource.DeviceRequestsMaxSize), + field.TooMany(field.NewPath("spec", "devices", "requests"), resource.DeviceRequestsMaxSize+1, resource.DeviceRequestsMaxSize).MarkCoveredByDeclarative(), field.Invalid(field.NewPath("spec", "devices", "constraints").Index(0).Child("requests").Index(1), badName, "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')"), field.Invalid(field.NewPath("spec", "devices", "constraints").Index(0).Child("requests").Index(1), badName, "must be the name of a request in the claim or the name of a request and a subrequest separated by '/'"), field.Invalid(field.NewPath("spec", "devices", "constraints").Index(0).Child("matchAttribute"), "missing-domain", "a valid C identifier must start with alphabetic character or '_', followed by a string of alphanumeric characters or '_' (e.g. 'my_name', or 'MY_NAME', or 'MyName', regex used for validation is '[A-Za-z_][A-Za-z0-9_]*')"), field.Invalid(field.NewPath("spec", "devices", "constraints").Index(0).Child("matchAttribute"), resource.FullyQualifiedName("missing-domain"), "must include a domain"), field.Required(field.NewPath("spec", "devices", "constraints").Index(1).Child("matchAttribute"), "name required"), field.Required(field.NewPath("spec", "devices", "constraints").Index(2).Child("matchAttribute"), ""), - field.TooMany(field.NewPath("spec", "devices", "constraints"), resource.DeviceConstraintsMaxSize+1, resource.DeviceConstraintsMaxSize), + field.TooMany(field.NewPath("spec", "devices", "constraints"), resource.DeviceConstraintsMaxSize+1, resource.DeviceConstraintsMaxSize).MarkCoveredByDeclarative(), field.Invalid(field.NewPath("spec", "devices", "config").Index(0).Child("requests").Index(1), badName, "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')"), field.Invalid(field.NewPath("spec", "devices", "config").Index(0).Child("requests").Index(1), badName, "must be the name of a request in the claim or the name of a request and a subrequest separated by '/'"), - field.TooMany(field.NewPath("spec", "devices", "config"), resource.DeviceConfigMaxSize+1, resource.DeviceConfigMaxSize), + field.TooMany(field.NewPath("spec", "devices", "config"), resource.DeviceConfigMaxSize+1, resource.DeviceConfigMaxSize).MarkCoveredByDeclarative(), }, claim: func() *resource.ResourceClaim { claim := testClaim(goodName, goodNS, validClaimSpec) @@ -414,7 +414,7 @@ func TestValidateClaim(t *testing.T) { field.Invalid(field.NewPath("spec", "devices", "requests").Index(2).Child("exactly", "count"), int64(-1), "must be greater than zero"), field.NotSupported(field.NewPath("spec", "devices", "requests").Index(3).Child("exactly", "allocationMode"), resource.DeviceAllocationMode("other"), []resource.DeviceAllocationMode{resource.DeviceAllocationModeAll, resource.DeviceAllocationModeExactCount}), field.Invalid(field.NewPath("spec", "devices", "requests").Index(4).Child("exactly", "count"), int64(2), "must not be specified when allocationMode is 'All'"), - field.Duplicate(field.NewPath("spec", "devices", "requests").Index(5).Child("name"), "foo"), + field.Duplicate(field.NewPath("spec", "devices", "requests").Index(5), "foo"), }, claim: func() *resource.ResourceClaim { claim := testClaim(goodName, goodNS, validClaimSpec) @@ -622,6 +622,16 @@ func TestValidateClaim(t *testing.T) { return claim }(), }, + "first-available-with-zero-exactly-fails-old-validation": { + wantFailures: field.ErrorList{ + field.Invalid(field.NewPath("spec", "devices", "requests").Index(0), nil, "exactly one of `exactly` or `firstAvailable` is required, but multiple fields are set"), + }, + claim: func() *resource.ResourceClaim { + claim := testClaim(goodName, goodNS, validClaimSpecWithFirstAvailable) + claim.Spec.Devices.Requests[0].Exactly = &resource.ExactDeviceRequest{} + return claim + }(), + }, "prioritized-list-invalid-nested-request": { wantFailures: field.ErrorList{ field.Invalid(field.NewPath("spec", "devices", "requests").Index(0).Child("firstAvailable").Index(0).Child("name"), badName, "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')"), @@ -638,7 +648,7 @@ func TestValidateClaim(t *testing.T) { }, "prioritized-list-nested-requests-same-name": { wantFailures: field.ErrorList{ - field.Duplicate(field.NewPath("spec", "devices", "requests").Index(0).Child("firstAvailable").Index(1).Child("name"), "foo"), + field.Duplicate(field.NewPath("spec", "devices", "requests").Index(0).Child("firstAvailable").Index(1), "foo"), }, claim: func() *resource.ResourceClaim { claim := testClaim(goodName, goodNS, validClaimSpecWithFirstAvailable) @@ -648,7 +658,7 @@ func TestValidateClaim(t *testing.T) { }, "prioritized-list-too-many-subrequests": { wantFailures: field.ErrorList{ - field.TooMany(field.NewPath("spec", "devices", "requests").Index(0).Child("firstAvailable"), 9, 8), + field.TooMany(field.NewPath("spec", "devices", "requests").Index(0).Child("firstAvailable"), 9, 8).MarkCoveredByDeclarative(), }, claim: func() *resource.ResourceClaim { claim := testClaim(goodName, goodNS, validClaimSpec) @@ -778,7 +788,7 @@ func TestValidateClaim(t *testing.T) { field.NotSupported(fldPath.Index(4).Child("operator"), resource.DeviceTolerationOperator("some-other-op"), []resource.DeviceTolerationOperator{resource.DeviceTolerationOpEqual, resource.DeviceTolerationOpExists}), - field.Invalid(fldPath.Index(5).Child("key"), badName, "name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')"), + field.Invalid(fldPath.Index(5).Child("key"), badName, "name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')").MarkCoveredByDeclarative(), field.Invalid(fldPath.Index(5).Child("value"), badName, "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')"), field.NotSupported(fldPath.Index(5).Child("effect"), resource.DeviceTaintEffect("some-other-effect"), []resource.DeviceTaintEffect{resource.DeviceTaintEffectNoExecute, resource.DeviceTaintEffectNoSchedule}), ) @@ -855,7 +865,7 @@ func TestValidateClaimUpdate(t *testing.T) { spec := validClaim.Spec.DeepCopy() spec.Devices.Requests[0].Exactly.DeviceClassName += "2" return *spec - }(), "field is immutable")}, + }(), "field is immutable")}.MarkCoveredByDeclarative(), oldClaim: validClaim, update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { claim.Spec.Devices.Requests[0].Exactly.DeviceClassName += "2" @@ -1064,7 +1074,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) { }, }, "invalid-reserved-for-duplicate": { - wantFailures: field.ErrorList{field.Duplicate(field.NewPath("status", "reservedFor").Index(1).Child("uid"), types.UID("1"))}, + wantFailures: field.ErrorList{field.Duplicate(field.NewPath("status", "reservedFor").Index(1), types.UID("1")).MarkCoveredByDeclarative()}, oldClaim: validAllocatedClaim, update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { for i := 0; i < 2; i++ { @@ -1191,8 +1201,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) { field.Required(field.NewPath("status", "allocation", "devices", "config").Index(1).Child("source"), ""), field.NotSupported(field.NewPath("status", "allocation", "devices", "config").Index(2).Child("source"), resource.AllocationConfigSource("no-such-source"), []resource.AllocationConfigSource{resource.AllocationConfigSourceClaim, resource.AllocationConfigSourceClass}), field.Required(field.NewPath("status", "allocation", "devices", "config").Index(3).Child("opaque"), ""), - field.Required(field.NewPath("status", "allocation", "devices", "config").Index(4).Child("opaque", "driver"), ""), - field.Invalid(field.NewPath("status", "allocation", "devices", "config").Index(4).Child("opaque", "driver"), "", "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')"), + field.Required(field.NewPath("status", "allocation", "devices", "config").Index(4).Child("opaque", "driver"), "").MarkCoveredByDeclarative(), field.Required(field.NewPath("status", "allocation", "devices", "config").Index(4).Child("opaque", "parameters"), ""), field.TooLong(field.NewPath("status", "allocation", "devices", "config").Index(6).Child("opaque", "parameters"), "" /* unused */, resource.OpaqueParametersMaxLength), }, @@ -1331,7 +1340,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) { "invalid-device-status-duplicate": { wantFailures: field.ErrorList{ field.Duplicate(field.NewPath("status", "devices").Index(0).Child("networkData", "ips").Index(1), "2001:db8::1/64"), - field.Duplicate(field.NewPath("status", "devices").Index(1).Child("deviceID"), structured.MakeSharedDeviceID(structured.MakeDeviceID(goodName, goodName, goodName), nil)), + field.Duplicate(field.NewPath("status", "devices").Index(1), structured.MakeSharedDeviceID(structured.MakeDeviceID(goodName, goodName, goodName), nil)), }, oldClaim: func() *resource.ResourceClaim { return validAllocatedClaim }(), update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { @@ -1359,7 +1368,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) { }, "invalid-device-status-duplicate-with-share-id": { wantFailures: field.ErrorList{ - field.Duplicate(field.NewPath("status", "devices").Index(1).Child("deviceID"), + field.Duplicate(field.NewPath("status", "devices").Index(1), structured.MakeSharedDeviceID(structured.MakeDeviceID(goodName, goodName, goodName), ptr.To(goodShareID))), }, oldClaim: func() *resource.ResourceClaim { @@ -1494,7 +1503,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) { "invalid-device-status-duplicate-disabled-feature-gate": { wantFailures: field.ErrorList{ field.Duplicate(field.NewPath("status", "devices").Index(0).Child("networkData", "ips").Index(1), "2001:db8::1/64"), - field.Duplicate(field.NewPath("status", "devices").Index(1).Child("deviceID"), structured.MakeSharedDeviceID(structured.MakeDeviceID(goodName, goodName, goodName), nil)), + field.Duplicate(field.NewPath("status", "devices").Index(1), structured.MakeSharedDeviceID(structured.MakeDeviceID(goodName, goodName, goodName), nil)), }, oldClaim: func() *resource.ResourceClaim { return validAllocatedClaim }(), update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { @@ -1522,7 +1531,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) { }, "invalid-device-status-duplicate-with-share-id-disabled-feature-gate": { wantFailures: field.ErrorList{ - field.Duplicate(field.NewPath("status", "devices").Index(1).Child("deviceID"), + field.Duplicate(field.NewPath("status", "devices").Index(1), structured.MakeSharedDeviceID(structured.MakeDeviceID(goodName, goodName, goodName), ptr.To(goodShareID))), }, oldClaim: func() *resource.ResourceClaim { @@ -2158,10 +2167,10 @@ func TestValidateClaimStatusUpdate(t *testing.T) { }, "invalid-add-allocated-status-invalid-share-id": { wantFailures: field.ErrorList{ - field.Invalid(field.NewPath("status", "devices").Index(0).Child("shareID"), badLengthShareIDStr, "error validating uid: invalid UUID length: 1"), - field.Invalid(field.NewPath("status", "devices").Index(1).Child("shareID"), badFormatShareIDStr, "uid must be in RFC 4122 normalized form, `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` with lowercase hexadecimal characters"), - field.Invalid(field.NewPath("status", "allocation", "devices", "results").Index(0).Child("shareID"), badLengthShareIDStr, "error validating uid: invalid UUID length: 1"), - field.Invalid(field.NewPath("status", "allocation", "devices", "results").Index(1).Child("shareID"), badFormatShareIDStr, "uid must be in RFC 4122 normalized form, `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` with lowercase hexadecimal characters"), + field.Invalid(field.NewPath("status", "devices").Index(0).Child("shareID"), badLengthShareIDStr, "error validating uid: invalid UUID length: 1").MarkCoveredByDeclarative(), + field.Invalid(field.NewPath("status", "devices").Index(1).Child("shareID"), badFormatShareIDStr, "uid must be in RFC 4122 normalized form, `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` with lowercase hexadecimal characters").MarkCoveredByDeclarative(), + field.Invalid(field.NewPath("status", "allocation", "devices", "results").Index(0).Child("shareID"), badLengthShareIDStr, "error validating uid: invalid UUID length: 1").MarkCoveredByDeclarative(), + field.Invalid(field.NewPath("status", "allocation", "devices", "results").Index(1).Child("shareID"), badFormatShareIDStr, "uid must be in RFC 4122 normalized form, `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` with lowercase hexadecimal characters").MarkCoveredByDeclarative(), }, oldClaim: testClaim(goodName, goodNS, validClaimSpec), update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { diff --git a/pkg/apis/resource/validation/validation_resourceslice_test.go b/pkg/apis/resource/validation/validation_resourceslice_test.go index 7669cf15fa4c1..3552733b510fe 100644 --- a/pkg/apis/resource/validation/validation_resourceslice_test.go +++ b/pkg/apis/resource/validation/validation_resourceslice_test.go @@ -694,7 +694,7 @@ func TestValidateResourceSlice(t *testing.T) { }, "duplicate-shared-counters": { wantFailures: field.ErrorList{ - field.Duplicate(field.NewPath("spec", "sharedCounters").Index(1).Child("name"), goodName), + field.Duplicate(field.NewPath("spec", "sharedCounters").Index(1), goodName), }, slice: func() *resourceapi.ResourceSlice { slice := testResourceSlice(goodName, goodName, driverName, 1) diff --git a/pkg/apis/scheduling/v1/helpers.go b/pkg/apis/scheduling/v1/helpers.go index d4af4933cfa69..907014a7f4254 100644 --- a/pkg/apis/scheduling/v1/helpers.go +++ b/pkg/apis/scheduling/v1/helpers.go @@ -43,16 +43,29 @@ var systemPriorityClasses = []*v1.PriorityClass{ }, } -// SystemPriorityClasses returns the list of system priority classes. -// NOTE: be careful not to modify any of elements of the returned array directly. +// SystemPriorityClasses returns a deep copy of the list of system priority classes. +// If only the names are needed, use SystemPriorityClassNames(). func SystemPriorityClasses() []*v1.PriorityClass { - return systemPriorityClasses + retval := make([]*v1.PriorityClass, 0, len(systemPriorityClasses)) + for _, c := range systemPriorityClasses { + retval = append(retval, c.DeepCopy()) + } + return retval +} + +// SystemPriorityClassNames returns the names of system priority classes. +func SystemPriorityClassNames() []string { + retval := make([]string, 0, len(systemPriorityClasses)) + for _, c := range systemPriorityClasses { + retval = append(retval, c.Name) + } + return retval } // IsKnownSystemPriorityClass returns true if there's any of the system priority classes exactly // matches "name", "value", "globalDefault". otherwise it will return an error. func IsKnownSystemPriorityClass(name string, value int32, globalDefault bool) (bool, error) { - for _, spc := range SystemPriorityClasses() { + for _, spc := range systemPriorityClasses { if spc.Name == name { if spc.Value != value { return false, fmt.Errorf("value of %v PriorityClass must be %v", spc.Name, spc.Value) diff --git a/pkg/controller/OWNERS b/pkg/controller/OWNERS index 88cecd8f96060..be732c048fbc9 100644 --- a/pkg/controller/OWNERS +++ b/pkg/controller/OWNERS @@ -12,6 +12,7 @@ reviewers: - andrewsykim - deads2k - cheftako + - jefftree - sig-apps-reviewers labels: - sig/apps diff --git a/pkg/controller/bootstrap/bootstrapsigner.go b/pkg/controller/bootstrap/bootstrapsigner.go index b0472eddeee78..84f15aeb402ad 100644 --- a/pkg/controller/bootstrap/bootstrapsigner.go +++ b/pkg/controller/bootstrap/bootstrapsigner.go @@ -159,7 +159,7 @@ func (e *Signer) Run(ctx context.Context) { defer utilruntime.HandleCrash() defer e.syncQueue.ShutDown() - if !cache.WaitForNamedCacheSync("bootstrap_signer", ctx.Done(), e.configMapSynced, e.secretSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, e.configMapSynced, e.secretSynced) { return } diff --git a/pkg/controller/bootstrap/tokencleaner.go b/pkg/controller/bootstrap/tokencleaner.go index 52fa81bd49e6a..600f446359cae 100644 --- a/pkg/controller/bootstrap/tokencleaner.go +++ b/pkg/controller/bootstrap/tokencleaner.go @@ -117,7 +117,7 @@ func (tc *TokenCleaner) Run(ctx context.Context) { logger.Info("Starting token cleaner controller") defer logger.Info("Shutting down token cleaner controller") - if !cache.WaitForNamedCacheSync("token_cleaner", ctx.Done(), tc.secretSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, tc.secretSynced) { return } diff --git a/pkg/controller/certificates/certificate_controller.go b/pkg/controller/certificates/certificate_controller.go index 1306eef892b9e..25bfcf4ca9afc 100644 --- a/pkg/controller/certificates/certificate_controller.go +++ b/pkg/controller/certificates/certificate_controller.go @@ -120,7 +120,7 @@ func (cc *CertificateController) Run(ctx context.Context, workers int) { logger.Info("Starting certificate controller", "name", cc.name) defer logger.Info("Shutting down certificate controller", "name", cc.name) - if !cache.WaitForNamedCacheSync(fmt.Sprintf("certificate-%s", cc.name), ctx.Done(), cc.csrsSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, cc.csrsSynced) { return } diff --git a/pkg/controller/certificates/cleaner/cleaner.go b/pkg/controller/certificates/cleaner/cleaner.go index 32c0830d1d580..ab5a713d5410e 100644 --- a/pkg/controller/certificates/cleaner/cleaner.go +++ b/pkg/controller/certificates/cleaner/cleaner.go @@ -107,7 +107,12 @@ func (ccc *CSRCleanerController) worker(ctx context.Context) { func (ccc *CSRCleanerController) handle(ctx context.Context, csr *capi.CertificateSigningRequest) error { logger := klog.FromContext(ctx) - if isIssuedPastDeadline(logger, csr) || isDeniedPastDeadline(logger, csr) || isFailedPastDeadline(logger, csr) || isPendingPastDeadline(logger, csr) || isIssuedExpired(logger, csr) { + if isIssuedPastDeadline(logger, csr) || + isDeniedPastDeadline(logger, csr) || + isFailedPastDeadline(logger, csr) || + isPendingPastDeadline(logger, csr) || + isIssuedExpired(logger, csr) || + isApprovedUnissuedPastDeadline(logger, csr) { if err := ccc.csrClient.Delete(ctx, csr.Name, metav1.DeleteOptions{}); err != nil { return fmt.Errorf("unable to delete CSR %q: %v", csr.Name, err) } @@ -170,8 +175,11 @@ func isFailedPastDeadline(logger klog.Logger, csr *capi.CertificateSigningReques // creation time of the CSR is passed the deadline that issued requests are // maintained for. func isIssuedPastDeadline(logger klog.Logger, csr *capi.CertificateSigningRequest) bool { + if !isIssued(csr) { + return false + } for _, c := range csr.Status.Conditions { - if c.Type == capi.CertificateApproved && isIssued(csr) && isOlderThan(c.LastUpdateTime, approvedExpiration) { + if c.Type == capi.CertificateApproved && isOlderThan(c.LastUpdateTime, approvedExpiration) { logger.Info("Cleaning CSR as it is more than approvedExpiration duration old and approved.", "csr", csr.Name, "approvedExpiration", approvedExpiration) return true } @@ -179,6 +187,22 @@ func isIssuedPastDeadline(logger klog.Logger, csr *capi.CertificateSigningReques return false } +// isApprovedUnissuedPastDeadline checks if the certificate has an Approved status but +// no certificate has been issued, and the approval time has passed the deadline +// that pending requests are maintained for. +func isApprovedUnissuedPastDeadline(logger klog.Logger, csr *capi.CertificateSigningRequest) bool { + if isIssued(csr) { + return false + } + for _, c := range csr.Status.Conditions { + if c.Type == capi.CertificateApproved && isOlderThan(c.LastUpdateTime, pendingExpiration) { + logger.Info("Cleaning CSR as it is approved but unissued for more than pendingExpiration duration.", "csr", csr.Name, "pendingExpiration", pendingExpiration) + return true + } + } + return false +} + // isOlderThan checks that t is a non-zero and older than d from time.Now(). func isOlderThan(t metav1.Time, d time.Duration) bool { return !t.IsZero() && time.Since(t.Time) > d diff --git a/pkg/controller/certificates/cleaner/cleaner_test.go b/pkg/controller/certificates/cleaner/cleaner_test.go index 6faeeb7bdf0b8..bb7c3a7d172a0 100644 --- a/pkg/controller/certificates/cleaner/cleaner_test.go +++ b/pkg/controller/certificates/cleaner/cleaner_test.go @@ -171,6 +171,30 @@ func TestCleanerWithApprovedExpiredCSR(t *testing.T) { []capi.CertificateSigningRequestCondition{}, []string{"delete"}, }, + { + "delete approved unissued past deadline", + metav1.NewTime(time.Now().Add(-1 * time.Minute)), + nil, + []capi.CertificateSigningRequestCondition{ + { + Type: capi.CertificateApproved, + LastUpdateTime: metav1.NewTime(time.Now().Add(-25 * time.Hour)), + }, + }, + []string{"delete"}, + }, + { + "no delete approved unissued not past deadline", + metav1.NewTime(time.Now().Add(-1 * time.Minute)), + nil, + []capi.CertificateSigningRequestCondition{ + { + Type: capi.CertificateApproved, + LastUpdateTime: metav1.NewTime(time.Now().Add(-5 * time.Hour)), + }, + }, + []string{}, + }, { "no delete approved not passed deadline unexpired", metav1.NewTime(time.Now().Add(-1 * time.Minute)), diff --git a/pkg/controller/certificates/clustertrustbundlepublisher/publisher.go b/pkg/controller/certificates/clustertrustbundlepublisher/publisher.go index f5293b0583ea9..50bcc1d4487ff 100644 --- a/pkg/controller/certificates/clustertrustbundlepublisher/publisher.go +++ b/pkg/controller/certificates/clustertrustbundlepublisher/publisher.go @@ -280,7 +280,7 @@ func (p *ClusterTrustBundlePublisher[T]) Run(ctx context.Context) { go p.ctbInformer.Run(ctx.Done()) - if !cache.WaitForNamedCacheSync("cluster trust bundle", ctx.Done(), p.ctbListerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, p.ctbListerSynced) { return } diff --git a/pkg/controller/certificates/rootcacertpublisher/publisher.go b/pkg/controller/certificates/rootcacertpublisher/publisher.go index 36127e883e3ad..fe0f98dd1a789 100644 --- a/pkg/controller/certificates/rootcacertpublisher/publisher.go +++ b/pkg/controller/certificates/rootcacertpublisher/publisher.go @@ -107,7 +107,7 @@ func (c *Publisher) Run(ctx context.Context, workers int) { logger.Info("Starting root CA cert publisher controller") defer logger.Info("Shutting down root CA cert publisher controller") - if !cache.WaitForNamedCacheSync("crt configmap", ctx.Done(), c.cmListerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.cmListerSynced) { return } diff --git a/pkg/controller/clusterroleaggregation/clusterroleaggregation_controller.go b/pkg/controller/clusterroleaggregation/clusterroleaggregation_controller.go index bebc45160ebaa..e3b98618963a7 100644 --- a/pkg/controller/clusterroleaggregation/clusterroleaggregation_controller.go +++ b/pkg/controller/clusterroleaggregation/clusterroleaggregation_controller.go @@ -194,7 +194,7 @@ func (c *ClusterRoleAggregationController) Run(ctx context.Context, workers int) logger.Info("Starting ClusterRoleAggregator controller") defer logger.Info("Shutting down ClusterRoleAggregator controller") - if !cache.WaitForNamedCacheSync("ClusterRoleAggregator", ctx.Done(), c.clusterRolesSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.clusterRolesSynced) { return } diff --git a/pkg/controller/cronjob/cronjob_controllerv2.go b/pkg/controller/cronjob/cronjob_controllerv2.go index f67bd466ba213..a015218430048 100644 --- a/pkg/controller/cronjob/cronjob_controllerv2.go +++ b/pkg/controller/cronjob/cronjob_controllerv2.go @@ -24,8 +24,6 @@ import ( "strings" "time" - "github.com/robfig/cron/v3" - batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -48,6 +46,7 @@ import ( "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/cronjob/metrics" jobutil "k8s.io/kubernetes/pkg/controller/job/util" + "k8s.io/kubernetes/pkg/util/parsers" "k8s.io/utils/ptr" ) @@ -145,7 +144,7 @@ func (jm *ControllerV2) Run(ctx context.Context, workers int) { logger.Info("Starting cronjob controller v2") defer logger.Info("Shutting down cronjob controller v2") - if !cache.WaitForNamedCacheSync("cronjob", ctx.Done(), jm.jobListerSynced, jm.cronJobListerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, jm.jobListerSynced, jm.cronJobListerSynced) { return } @@ -391,7 +390,7 @@ func (jm *ControllerV2) updateCronJob(logger klog.Logger, old interface{}, curr // the sync loop will essentially be a no-op for the already queued key with old schedule. if oldCJ.Spec.Schedule != newCJ.Spec.Schedule || !ptr.Equal(oldCJ.Spec.TimeZone, newCJ.Spec.TimeZone) { // schedule changed, change the requeue time, pass nil recorder so that syncCronJob will output any warnings - sched, err := cron.ParseStandard(formatSchedule(newCJ, nil)) + sched, err := parsers.ParseCronScheduleWithPanicRecovery(formatSchedule(newCJ, nil)) if err != nil { // this is likely a user error in defining the spec value // we should log the error and not reconcile this cronjob until an update to spec @@ -511,7 +510,7 @@ func (jm *ControllerV2) syncCronJob( return nil, updateStatus, nil } - sched, err := cron.ParseStandard(formatSchedule(cronJob, jm.recorder)) + sched, err := parsers.ParseCronScheduleWithPanicRecovery(formatSchedule(cronJob, jm.recorder)) if err != nil { // this is likely a user error in defining the spec value // we should log the error and not reconcile this cronjob until an update to spec diff --git a/pkg/controller/cronjob/utils.go b/pkg/controller/cronjob/utils.go index 78b4ab7ab0eeb..47d740763ad6f 100644 --- a/pkg/controller/cronjob/utils.go +++ b/pkg/controller/cronjob/utils.go @@ -27,10 +27,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" - utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/tools/record" "k8s.io/klog/v2" - "k8s.io/kubernetes/pkg/features" "k8s.io/utils/ptr" ) @@ -245,19 +243,15 @@ func copyAnnotations(template *batchv1.JobTemplateSpec) labels.Set { // granularity of 1 minute for scheduling job. func getJobFromTemplate2(cj *batchv1.CronJob, scheduledTime time.Time) (*batchv1.Job, error) { labels := copyLabels(&cj.Spec.JobTemplate) - annotations := copyAnnotations(&cj.Spec.JobTemplate) // We want job names for a given nominal start time to have a deterministic name to avoid the same job being created twice name := getJobName(cj, scheduledTime) - - if utilfeature.DefaultFeatureGate.Enabled(features.CronJobsScheduledAnnotation) { - - timeZoneLocation, err := time.LoadLocation(ptr.Deref(cj.Spec.TimeZone, "")) - if err != nil { - return nil, err - } - // Append job creation timestamp to the cronJob annotations. The time will be in RFC3339 form. - annotations[batchv1.CronJobScheduledTimestampAnnotation] = scheduledTime.In(timeZoneLocation).Format(time.RFC3339) + annotations := copyAnnotations(&cj.Spec.JobTemplate) + timeZoneLocation, err := time.LoadLocation(ptr.Deref(cj.Spec.TimeZone, "")) + if err != nil { + return nil, err } + // Append job creation timestamp to the cronJob annotations. The time will be in RFC3339 form. + annotations[batchv1.CronJobScheduledTimestampAnnotation] = scheduledTime.In(timeZoneLocation).Format(time.RFC3339) job := &batchv1.Job{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/controller/cronjob/utils_test.go b/pkg/controller/cronjob/utils_test.go index 7be27e23b0084..6d6e4820d735d 100644 --- a/pkg/controller/cronjob/utils_test.go +++ b/pkg/controller/cronjob/utils_test.go @@ -28,11 +28,8 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/tools/record" - featuregatetesting "k8s.io/component-base/featuregate/testing" "k8s.io/klog/v2/ktesting" - "k8s.io/kubernetes/pkg/features" "k8s.io/utils/ptr" ) @@ -47,8 +44,6 @@ func TestGetJobFromTemplate2(t *testing.T) { scheduledTime = *topOfTheHour() ) - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.CronJobsScheduledAnnotation, true) - cj := batchv1.CronJob{ ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", diff --git a/pkg/controller/daemon/daemon_controller.go b/pkg/controller/daemon/daemon_controller.go index a17b85b1e0a1a..9da1d356efce1 100644 --- a/pkg/controller/daemon/daemon_controller.go +++ b/pkg/controller/daemon/daemon_controller.go @@ -310,7 +310,7 @@ func (dsc *DaemonSetsController) Run(ctx context.Context, workers int) { logger.Info("Starting daemon sets controller") defer logger.Info("Shutting down daemon sets controller") - if !cache.WaitForNamedCacheSync("daemon sets", ctx.Done(), dsc.podStoreSynced, dsc.nodeStoreSynced, dsc.historyStoreSynced, dsc.dsStoreSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, dsc.podStoreSynced, dsc.nodeStoreSynced, dsc.historyStoreSynced, dsc.dsStoreSynced) { return } @@ -1445,7 +1445,15 @@ func (dsc *DaemonSetsController) syncNodeUpdate(ctx context.Context, nodeName st daemonPods := podsByDS[dsKey] scheduled := len(daemonPods) > 0 - if (shouldRun && !scheduled) || (!shouldContinueRunning && scheduled) { + // Enqueue DaemonSet for sync in the following scenarios: + // 1. (shouldRun && !scheduled): Node now meets scheduling requirements but no pod exists + // - Need to create a new pod on this node + // 2. (!shouldContinueRunning && scheduled): Node no longer meets requirements but pod exists + // - Need to delete the existing pod from this node + // 3. (scheduled && ds.Status.NumberMisscheduled > 0): DaemonSet pod exists and misscheduled count is nonzero. + // - For example: a pod was scheduled before the node became unready and tainted; after the node becomes ready and taints are removed, the pod may now be valid again. + // - Need to recalculate NumberMisscheduled to ensure the DaemonSet status accurately reflects the current scheduling state. + if (shouldRun && !scheduled) || (!shouldContinueRunning && scheduled) || (scheduled && ds.Status.NumberMisscheduled > 0) { dsc.enqueueDaemonSet(ds) } } diff --git a/pkg/controller/daemon/daemon_controller_test.go b/pkg/controller/daemon/daemon_controller_test.go index bf25f34d55d35..1f26d2a416b29 100644 --- a/pkg/controller/daemon/daemon_controller_test.go +++ b/pkg/controller/daemon/daemon_controller_test.go @@ -2410,6 +2410,9 @@ func TestUpdateNode(t *testing.T) { expectedEventsFunc func(strategyType apps.DaemonSetUpdateStrategyType) int shouldEnqueue bool expectedCreates func() int + // Indicates whether a DaemonSet pod was already present on the node before the node transitioned to Ready and schedulable state. + // (In other words, was the DaemonSet pod scheduled before the node lost its readiness / was tainted?) + preExistingPod bool }{ { test: "Nothing changed, should not enqueue", @@ -2422,6 +2425,7 @@ func TestUpdateNode(t *testing.T) { }(), shouldEnqueue: false, expectedCreates: func() int { return 0 }, + preExistingPod: false, }, { test: "Node labels changed", @@ -2434,6 +2438,7 @@ func TestUpdateNode(t *testing.T) { }(), shouldEnqueue: true, expectedCreates: func() int { return 0 }, + preExistingPod: false, }, { test: "Node taints changed", @@ -2446,6 +2451,7 @@ func TestUpdateNode(t *testing.T) { ds: newDaemonSet("ds"), shouldEnqueue: true, expectedCreates: func() int { return 0 }, + preExistingPod: false, }, { test: "Node Allocatable changed", @@ -2475,6 +2481,21 @@ func TestUpdateNode(t *testing.T) { expectedCreates: func() int { return 1 }, + preExistingPod: false, + }, + { + test: "Pod transitions from misscheduled to scheduled due to node label change", + oldNode: newNode("node1", nil), + newNode: newNode("node1", simpleNodeLabel), + ds: func() *apps.DaemonSet { + ds := newDaemonSet("ds") + ds.Spec.Template.Spec.NodeSelector = simpleNodeLabel + ds.Status.NumberMisscheduled = 1 + return ds + }(), + shouldEnqueue: true, + expectedCreates: func() int { return 0 }, + preExistingPod: true, }, } for _, c := range cases { @@ -2511,6 +2532,10 @@ func TestUpdateNode(t *testing.T) { } expectSyncDaemonSets(t, manager, c.ds, podControl, expectedCreates, 0, expectedEvents) + if c.preExistingPod { + addPods(manager.podStore, c.oldNode.Name, simpleDaemonSetLabel, c.ds, 1) + } + manager.enqueueDaemonSet = func(ds *apps.DaemonSet) { if ds.Name == "ds" { enqueued = true diff --git a/pkg/controller/deployment/deployment_controller.go b/pkg/controller/deployment/deployment_controller.go index ec63afd24fbe2..694b8196f4e54 100644 --- a/pkg/controller/deployment/deployment_controller.go +++ b/pkg/controller/deployment/deployment_controller.go @@ -173,7 +173,7 @@ func (dc *DeploymentController) Run(ctx context.Context, workers int) { logger.Info("Starting controller", "controller", "deployment") defer logger.Info("Shutting down controller", "controller", "deployment") - if !cache.WaitForNamedCacheSync("deployment", ctx.Done(), dc.dListerSynced, dc.rsListerSynced, dc.podListerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, dc.dListerSynced, dc.rsListerSynced, dc.podListerSynced) { return } diff --git a/pkg/controller/devicetainteviction/device_taint_eviction.go b/pkg/controller/devicetainteviction/device_taint_eviction.go index d3198e66f1f38..72562a423fa1f 100644 --- a/pkg/controller/devicetainteviction/device_taint_eviction.go +++ b/pkg/controller/devicetainteviction/device_taint_eviction.go @@ -557,7 +557,7 @@ func (tc *Controller) handleClaimChange(oldClaim, newClaim *resourceapi.Resource } tc.allocatedClaims[name] = allocatedClaim{ ResourceClaim: claim, - evictionTime: tc.evictionTime(claim.Status.Allocation), + evictionTime: tc.evictionTime(claim), } tc.handlePods(claim) return @@ -586,7 +586,7 @@ func (tc *Controller) handleClaimChange(oldClaim, newClaim *resourceapi.Resource if oldClaim.Status.Allocation == nil && newClaim.Status.Allocation != nil { tc.allocatedClaims[name] = allocatedClaim{ ResourceClaim: claim, - evictionTime: tc.evictionTime(claim.Status.Allocation), + evictionTime: tc.evictionTime(claim), } syncBothClaims() return @@ -615,12 +615,14 @@ func (tc *Controller) handleClaimChange(oldClaim, newClaim *resourceapi.Resource } // evictionTime returns the earliest TimeAdded of any NoExecute taint in any allocated device -// unless that taint is tolerated, nil if none. -func (tc *Controller) evictionTime(allocation *resourceapi.AllocationResult) *metav1.Time { +// unless that taint is tolerated, nil if none. May only be called for allocated claims. +func (tc *Controller) evictionTime(claim *resourceapi.ResourceClaim) *metav1.Time { var evictionTime *metav1.Time + allocation := claim.Status.Allocation for _, allocatedDevice := range allocation.Devices.Results { - device := tc.pools[poolID{driverName: allocatedDevice.Driver, poolName: allocatedDevice.Pool}].getDevice(allocatedDevice.Device) + id := poolID{driverName: allocatedDevice.Driver, poolName: allocatedDevice.Pool} + device := tc.pools[id].getDevice(allocatedDevice.Device) if device == nil { // Unknown device? Can't be tainted... continue @@ -658,10 +660,12 @@ func (tc *Controller) evictionTime(allocation *resourceapi.AllocationResult) *me if evictionTime == nil { evictionTime = newEvictionTime + tc.logger.V(5).Info("Claim is affected by device taint", "claim", klog.KObj(claim), "device", allocatedDevice, "taint", taint, "evictionTime", evictionTime) continue } if newEvictionTime != nil && newEvictionTime.Before(evictionTime) { evictionTime = newEvictionTime + tc.logger.V(5).Info("Claim is affected by device taint", "claim", klog.KObj(claim), "device", allocatedDevice, "taint", taint, "evictionTime", evictionTime) } } } @@ -745,7 +749,7 @@ func (tc *Controller) handleSliceChange(oldSlice, newSlice *resourceapi.Resource if !usesDevice(claim.Status.Allocation, poolID, modifiedDevices) { continue } - newEvictionTime := tc.evictionTime(claim.ResourceClaim.Status.Allocation) + newEvictionTime := tc.evictionTime(claim.ResourceClaim) if newEvictionTime.Equal(claim.evictionTime) { // No change. continue @@ -863,6 +867,7 @@ func (tc *Controller) handlePod(pod *v1.Pod) { if evictionTime == nil || allocatedClaim.evictionTime.Before(evictionTime) { evictionTime = allocatedClaim.evictionTime } + tc.logger.V(3).Info("Going to evict pod", "evictionTime", *evictionTime, "claim", klog.KObj(allocatedClaim)) } podRef := newObject(pod) diff --git a/pkg/controller/disruption/disruption.go b/pkg/controller/disruption/disruption.go index 05f9aa8166efe..e58c4adfe2c71 100644 --- a/pkg/controller/disruption/disruption.go +++ b/pkg/controller/disruption/disruption.go @@ -468,7 +468,7 @@ func (dc *DisruptionController) Run(ctx context.Context) { logger.Info("Starting disruption controller") defer logger.Info("Shutting down disruption controller") - if !cache.WaitForNamedCacheSync("disruption", ctx.Done(), dc.podListerSynced, dc.pdbListerSynced, dc.rcListerSynced, dc.rsListerSynced, dc.dListerSynced, dc.ssListerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, dc.podListerSynced, dc.pdbListerSynced, dc.rcListerSynced, dc.rsListerSynced, dc.dListerSynced, dc.ssListerSynced) { return } @@ -813,7 +813,7 @@ func (dc *DisruptionController) getExpectedPodCount(ctx context.Context, pdb *po // handled the same way for integer and percentage minAvailable if pdb.Spec.MaxUnavailable != nil { - expectedCount, unmanagedPods, err = dc.getExpectedScale(ctx, pdb, pods) + expectedCount, unmanagedPods, err = dc.getExpectedScale(ctx, pods) if err != nil { return } @@ -831,7 +831,7 @@ func (dc *DisruptionController) getExpectedPodCount(ctx context.Context, pdb *po desiredHealthy = pdb.Spec.MinAvailable.IntVal expectedCount = int32(len(pods)) } else if pdb.Spec.MinAvailable.Type == intstr.String { - expectedCount, unmanagedPods, err = dc.getExpectedScale(ctx, pdb, pods) + expectedCount, unmanagedPods, err = dc.getExpectedScale(ctx, pods) if err != nil { return } @@ -847,7 +847,7 @@ func (dc *DisruptionController) getExpectedPodCount(ctx context.Context, pdb *po return } -func (dc *DisruptionController) getExpectedScale(ctx context.Context, pdb *policy.PodDisruptionBudget, pods []*v1.Pod) (expectedCount int32, unmanagedPods []string, err error) { +func (dc *DisruptionController) getExpectedScale(ctx context.Context, pods []*v1.Pod) (expectedCount int32, unmanagedPods []string, err error) { // When the user specifies a fraction of pods that must be available, we // use as the fraction's denominator // SUM_{all c in C} scale(c) diff --git a/pkg/controller/disruption/disruption_test.go b/pkg/controller/disruption/disruption_test.go index 01c77371bdf43..4f9fa4b8996f6 100644 --- a/pkg/controller/disruption/disruption_test.go +++ b/pkg/controller/disruption/disruption_test.go @@ -625,7 +625,7 @@ func TestTotalUnmanagedPods(t *testing.T) { dc.sync(ctx, pdbName) var pods []*v1.Pod pods = append(pods, pod) - _, unmanagedPods, _ := dc.getExpectedScale(ctx, pdb, pods) + _, unmanagedPods, _ := dc.getExpectedScale(ctx, pods) if len(unmanagedPods) != 1 { t.Fatalf("expected one pod to be unmanaged pod but found %d", len(unmanagedPods)) } diff --git a/pkg/controller/endpoint/endpoints_controller.go b/pkg/controller/endpoint/endpoints_controller.go index 3624c1aa7d64d..c7d6166ac8952 100644 --- a/pkg/controller/endpoint/endpoints_controller.go +++ b/pkg/controller/endpoint/endpoints_controller.go @@ -188,7 +188,7 @@ func (e *Controller) Run(ctx context.Context, workers int) { logger.Info("Starting endpoint controller") defer logger.Info("Shutting down endpoint controller") - if !cache.WaitForNamedCacheSync("endpoint", ctx.Done(), e.podsSynced, e.servicesSynced, e.endpointsSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, e.podsSynced, e.servicesSynced, e.endpointsSynced) { return } diff --git a/pkg/controller/endpointslice/endpointslice_controller.go b/pkg/controller/endpointslice/endpointslice_controller.go index 5e01fd334dcd2..a1057a0701af2 100644 --- a/pkg/controller/endpointslice/endpointslice_controller.go +++ b/pkg/controller/endpointslice/endpointslice_controller.go @@ -281,7 +281,7 @@ func (c *Controller) Run(ctx context.Context, workers int) { logger.Info("Starting endpoint slice controller") defer logger.Info("Shutting down endpoint slice controller") - if !cache.WaitForNamedCacheSync("endpoint_slice", ctx.Done(), c.podsSynced, c.servicesSynced, c.endpointSlicesSynced, c.nodesSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.podsSynced, c.servicesSynced, c.endpointSlicesSynced, c.nodesSynced) { return } diff --git a/pkg/controller/endpointslicemirroring/endpointslicemirroring_controller.go b/pkg/controller/endpointslicemirroring/endpointslicemirroring_controller.go index 7262dc1015eed..bfdd25e898059 100644 --- a/pkg/controller/endpointslicemirroring/endpointslicemirroring_controller.go +++ b/pkg/controller/endpointslicemirroring/endpointslicemirroring_controller.go @@ -227,7 +227,7 @@ func (c *Controller) Run(ctx context.Context, workers int) { logger.Info("Starting EndpointSliceMirroring controller") defer logger.Info("Shutting down EndpointSliceMirroring controller") - if !cache.WaitForNamedCacheSync("endpoint_slice_mirroring", ctx.Done(), c.endpointsSynced, c.endpointSlicesSynced, c.servicesSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.endpointsSynced, c.endpointSlicesSynced, c.servicesSynced) { return } diff --git a/pkg/controller/garbagecollector/garbagecollector.go b/pkg/controller/garbagecollector/garbagecollector.go index a829714b4b9b5..54872a7c94efc 100644 --- a/pkg/controller/garbagecollector/garbagecollector.go +++ b/pkg/controller/garbagecollector/garbagecollector.go @@ -146,7 +146,11 @@ func (gc *GarbageCollector) Run(ctx context.Context, workers int, initialSyncTim go gc.dependencyGraphBuilder.Run(ctx) - if !cache.WaitForNamedCacheSync("garbage collector", waitForStopOrTimeout(ctx.Done(), initialSyncTimeout), func() bool { + // Create a new context that is cancelled after the initialSyncTimeout. + syncCtx, cancel := context.WithTimeout(ctx, initialSyncTimeout) + defer cancel() + + if !cache.WaitForNamedCacheSyncWithContext(syncCtx, func() bool { return gc.dependencyGraphBuilder.IsSynced(logger) }) { logger.Info("Garbage collector: not all resource monitors could be synced, proceeding anyways") @@ -227,8 +231,11 @@ func (gc *GarbageCollector) Sync(ctx context.Context, discoveryClient discovery. } logger.V(4).Info("resynced monitors") + syncCtx, cancel := context.WithTimeout(ctx, period) + defer cancel() + // gc worker no longer waits for cache to be synced, but we will keep the periodical check to provide logs & metrics - cacheSynced := cache.WaitForNamedCacheSync("garbage collector", waitForStopOrTimeout(ctx.Done(), period), func() bool { + cacheSynced := cache.WaitForNamedCacheSyncWithContext(syncCtx, func() bool { return gc.dependencyGraphBuilder.IsSynced(logger) }) if cacheSynced { @@ -262,19 +269,6 @@ func printDiff(oldResources, newResources map[schema.GroupVersionResource]struct return fmt.Sprintf("added: %v, removed: %v", added.List(), removed.List()) } -// waitForStopOrTimeout returns a stop channel that closes when the provided stop channel closes or when the specified timeout is reached -func waitForStopOrTimeout(stopCh <-chan struct{}, timeout time.Duration) <-chan struct{} { - stopChWithTimeout := make(chan struct{}) - go func() { - select { - case <-stopCh: - case <-time.After(timeout): - } - close(stopChWithTimeout) - }() - return stopChWithTimeout -} - // IsSynced returns true if dependencyGraphBuilder is synced. func (gc *GarbageCollector) IsSynced(logger klog.Logger) bool { return gc.dependencyGraphBuilder.IsSynced(logger) diff --git a/pkg/controller/garbagecollector/graph.go b/pkg/controller/garbagecollector/graph.go index de017b4c40ba7..77715309729e1 100644 --- a/pkg/controller/garbagecollector/graph.go +++ b/pkg/controller/garbagecollector/graph.go @@ -206,10 +206,17 @@ func ownerReferenceMatchesCoordinates(a, b metav1.OwnerReference) bool { } // String renders node as a string using fmt. Acquires a read lock to ensure the -// reflective dump of dependents doesn't race with any concurrent writes. +// reflective dump of fields doesn't race with any concurrent writes. func (n *node) String() string { + n.beingDeletedLock.RLock() + defer n.beingDeletedLock.RUnlock() + + n.virtualLock.RLock() + defer n.virtualLock.RUnlock() + n.dependentsLock.RLock() defer n.dependentsLock.RUnlock() + return fmt.Sprintf("%#v", n) } diff --git a/pkg/controller/garbagecollector/graph_builder.go b/pkg/controller/garbagecollector/graph_builder.go index d608b37cbc115..faa4cb9d5a60b 100644 --- a/pkg/controller/garbagecollector/graph_builder.go +++ b/pkg/controller/garbagecollector/graph_builder.go @@ -1022,9 +1022,8 @@ func (gb *GraphBuilder) GetMonitor(ctx context.Context, resource schema.GroupVer Controller: monitor.controller, } - if !cache.WaitForNamedCacheSync( - gb.Name(), - ctx.Done(), + if !cache.WaitForNamedCacheSyncWithContext( + ctx, func() bool { return monitor.controller.HasSynced() }, diff --git a/pkg/controller/job/indexed_job_utils.go b/pkg/controller/job/indexed_job_utils.go index 921c679d41df1..afc8b0ce8d73f 100644 --- a/pkg/controller/job/indexed_job_utils.go +++ b/pkg/controller/job/indexed_job_utils.go @@ -467,12 +467,7 @@ func addCompletionIndexEnvVariable(container *v1.Container) { return } } - var fieldPath string - if feature.DefaultFeatureGate.Enabled(features.PodIndexLabel) { - fieldPath = fmt.Sprintf("metadata.labels['%s']", batch.JobCompletionIndexAnnotation) - } else { - fieldPath = fmt.Sprintf("metadata.annotations['%s']", batch.JobCompletionIndexAnnotation) - } + fieldPath := fmt.Sprintf("metadata.labels['%s']", batch.JobCompletionIndexAnnotation) container.Env = append(container.Env, v1.EnvVar{ Name: completionIndexEnvName, ValueFrom: &v1.EnvVarSource{ diff --git a/pkg/controller/job/job_controller.go b/pkg/controller/job/job_controller.go index 6a74ee0bd53a9..732470531ebab 100644 --- a/pkg/controller/job/job_controller.go +++ b/pkg/controller/job/job_controller.go @@ -257,7 +257,7 @@ func (jm *Controller) Run(ctx context.Context, workers int) { logger.Info("Starting job controller") defer logger.Info("Shutting down job controller") - if !cache.WaitForNamedCacheSync("job", ctx.Done(), jm.podStoreSynced, jm.jobStoreSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, jm.podStoreSynced, jm.jobStoreSynced) { return } @@ -1782,10 +1782,7 @@ func (jm *Controller) manageJob(ctx context.Context, job *batch.Job, jobCtx *syn if completionIndex != unknownCompletionIndex { template = podTemplate.DeepCopy() addCompletionIndexAnnotation(template, completionIndex) - - if feature.DefaultFeatureGate.Enabled(features.PodIndexLabel) { - addCompletionIndexLabel(template, completionIndex) - } + addCompletionIndexLabel(template, completionIndex) template.Spec.Hostname = fmt.Sprintf("%s-%d", job.Name, completionIndex) generateName = podGenerateNameWithIndex(job.Name, completionIndex) if hasBackoffLimitPerIndex(job) { diff --git a/pkg/controller/job/job_controller_test.go b/pkg/controller/job/job_controller_test.go index 891feef67a33d..e82bb7939d0c6 100644 --- a/pkg/controller/job/job_controller_test.go +++ b/pkg/controller/job/job_controller_test.go @@ -289,7 +289,6 @@ func TestControllerSyncJob(t *testing.T) { expectedPodPatches int // features - podIndexLabelDisabled bool jobPodReplacementPolicy bool jobSuccessPolicy bool jobManagedBy bool @@ -1145,17 +1144,6 @@ func TestControllerSyncJob(t *testing.T) { expectedReady: ptr.To[int32](0), expectedTerminating: ptr.To[int32](0), }, - "indexed job with podIndexLabel feature disabled": { - parallelism: 2, - completions: 5, - backoffLimit: 6, - completionMode: batch.IndexedCompletion, - expectedCreations: 2, - expectedActive: 2, - expectedCreatedIndexes: sets.New(0, 1), - podIndexLabelDisabled: true, - expectedReady: ptr.To[int32](0), - }, "FailureTarget=False condition added manually is ignored": { parallelism: 1, completions: 1, @@ -1250,17 +1238,13 @@ func TestControllerSyncJob(t *testing.T) { for name, tc := range testCases { t.Run(name, func(t *testing.T) { logger, _ := ktesting.NewTestContext(t) - if tc.podIndexLabelDisabled { - // TODO: this will be removed in 1.35 when 1.31 will fall out of support matrix - featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, feature.DefaultFeatureGate, utilversion.MustParse("1.31")) - } else if !tc.jobSuccessPolicy { + if !tc.jobSuccessPolicy { // TODO: this will be removed in 1.36. featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, feature.DefaultFeatureGate, utilversion.MustParse("1.32")) } else if !tc.jobPodReplacementPolicy { // TODO: this will be removed in 1.37. featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, feature.DefaultFeatureGate, utilversion.MustParse("1.33")) } - featuregatetesting.SetFeatureGateDuringTest(t, feature.DefaultFeatureGate, features.PodIndexLabel, !tc.podIndexLabelDisabled) featuregatetesting.SetFeatureGateDuringTest(t, feature.DefaultFeatureGate, features.JobPodReplacementPolicy, tc.jobPodReplacementPolicy) featuregatetesting.SetFeatureGateDuringTest(t, feature.DefaultFeatureGate, features.JobSuccessPolicy, tc.jobSuccessPolicy) featuregatetesting.SetFeatureGateDuringTest(t, feature.DefaultFeatureGate, features.JobManagedBy, tc.jobManagedBy) @@ -1351,7 +1335,7 @@ func TestControllerSyncJob(t *testing.T) { t.Errorf("Unexpected number of creates. Expected %d, saw %d\n", tc.expectedCreations, len(fakePodControl.Templates)) } if tc.completionMode == batch.IndexedCompletion { - checkIndexedJobPods(t, &fakePodControl, tc.expectedCreatedIndexes, job.Name, tc.podIndexLabelDisabled) + checkIndexedJobPods(t, &fakePodControl, tc.expectedCreatedIndexes, job.Name) } else { for _, p := range fakePodControl.Templates { // Fake pod control doesn't add generate name from the owner reference. @@ -1432,14 +1416,12 @@ func TestControllerSyncJob(t *testing.T) { } } -func checkIndexedJobPods(t *testing.T, control *controller.FakePodControl, wantIndexes sets.Set[int], jobName string, podIndexLabelDisabled bool) { +func checkIndexedJobPods(t *testing.T, control *controller.FakePodControl, wantIndexes sets.Set[int], jobName string) { t.Helper() gotIndexes := sets.New[int]() for _, p := range control.Templates { - checkJobCompletionEnvVariable(t, &p.Spec, podIndexLabelDisabled) - if !podIndexLabelDisabled { - checkJobCompletionLabel(t, &p) - } + checkJobCompletionEnvVariable(t, &p.Spec) + checkJobCompletionLabel(t, &p) ix := getCompletionIndex(p.Annotations) if ix == -1 { t.Errorf("Created pod %s didn't have completion index", p.Name) @@ -7863,14 +7845,9 @@ func checkJobCompletionLabel(t *testing.T, p *v1.PodTemplateSpec) { } } -func checkJobCompletionEnvVariable(t *testing.T, spec *v1.PodSpec, podIndexLabelDisabled bool) { +func checkJobCompletionEnvVariable(t *testing.T, spec *v1.PodSpec) { t.Helper() - var fieldPath string - if podIndexLabelDisabled { - fieldPath = fmt.Sprintf("metadata.annotations['%s']", batch.JobCompletionIndexAnnotation) - } else { - fieldPath = fmt.Sprintf("metadata.labels['%s']", batch.JobCompletionIndexAnnotation) - } + fieldPath := fmt.Sprintf("metadata.labels['%s']", batch.JobCompletionIndexAnnotation) want := []v1.EnvVar{ { Name: "JOB_COMPLETION_INDEX", diff --git a/pkg/controller/namespace/deletion/namespaced_resources_deleter.go b/pkg/controller/namespace/deletion/namespaced_resources_deleter.go index 8d9af4a235764..f4ac1f5a612a4 100644 --- a/pkg/controller/namespace/deletion/namespaced_resources_deleter.go +++ b/pkg/controller/namespace/deletion/namespaced_resources_deleter.go @@ -161,7 +161,7 @@ func (d *namespacedResourcesDeleter) initOpCache(ctx context.Context) { // TODO(sttts): get rid of opCache and http 405 logic around it and trust discovery info resources, err := d.discoverResourcesFn() if err != nil { - utilruntime.HandleError(fmt.Errorf("unable to get all supported resources from server: %v", err)) + utilruntime.HandleErrorWithContext(ctx, err, "Unable to get all supported resources from server") } logger := klog.FromContext(ctx) if len(resources) == 0 { @@ -555,7 +555,7 @@ func (d *namespacedResourcesDeleter) deleteAllContent(ctx context.Context, ns *v logger.V(5).Info("Namespace controller - pods still remain, delaying deletion of other resources", "namespace", namespace) if hasChanged := conditionUpdater.Update(ns); hasChanged { if _, err = d.nsClient.UpdateStatus(ctx, ns, metav1.UpdateOptions{}); err != nil { - utilruntime.HandleError(fmt.Errorf("couldn't update status condition for namespace %q: %w", namespace, err)) + utilruntime.HandleErrorWithContext(ctx, err, "Couldn't update status condition for namespace", "namespace", namespace) } } return estimate, utilerrors.NewAggregate(errs) @@ -595,7 +595,7 @@ func (d *namespacedResourcesDeleter) deleteAllContent(ctx context.Context, ns *v // NOT remove the resource instance. if hasChanged := conditionUpdater.Update(ns); hasChanged { if _, err = d.nsClient.UpdateStatus(ctx, ns, metav1.UpdateOptions{}); err != nil { - utilruntime.HandleError(fmt.Errorf("couldn't update status condition for namespace %q: %v", namespace, err)) + utilruntime.HandleErrorWithContext(ctx, err, "Couldn't update status condition for namespace", "namespace", namespace) } } diff --git a/pkg/controller/namespace/namespace_controller.go b/pkg/controller/namespace/namespace_controller.go index 9f2c0d85e972f..42c8ec3b8c20d 100644 --- a/pkg/controller/namespace/namespace_controller.go +++ b/pkg/controller/namespace/namespace_controller.go @@ -18,7 +18,6 @@ package namespace import ( "context" - "fmt" "time" "golang.org/x/time/rate" @@ -88,11 +87,11 @@ func NewNamespaceController( cache.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) { namespace := obj.(*v1.Namespace) - namespaceController.enqueueNamespace(namespace) + namespaceController.enqueueNamespace(ctx, namespace) }, UpdateFunc: func(oldObj, newObj interface{}) { namespace := newObj.(*v1.Namespace) - namespaceController.enqueueNamespace(namespace) + namespaceController.enqueueNamespace(ctx, namespace) }, }, resyncPeriod, @@ -117,10 +116,10 @@ func nsControllerRateLimiter() workqueue.TypedRateLimiter[string] { // enqueueNamespace adds an object to the controller work queue // obj could be an *v1.Namespace, or a DeletionFinalStateUnknown item. -func (nm *NamespaceController) enqueueNamespace(obj interface{}) { +func (nm *NamespaceController) enqueueNamespace(ctx context.Context, obj interface{}) { key, err := controller.KeyFunc(obj) if err != nil { - utilruntime.HandleError(fmt.Errorf("Couldn't get key for object %+v: %v", obj, err)) + utilruntime.HandleErrorWithContext(ctx, err, "Couldn't get key for object", "object", obj) return } @@ -161,7 +160,7 @@ func (nm *NamespaceController) worker(ctx context.Context) { } else { // rather than wait for a full resync, re-add the namespace to the queue to be processed nm.queue.AddRateLimited(key) - utilruntime.HandleError(fmt.Errorf("deletion of namespace %v failed: %v", key, err)) + utilruntime.HandleErrorWithContext(ctx, err, "Deletion of namespace failed", "namespace", key) } return false } @@ -188,7 +187,7 @@ func (nm *NamespaceController) syncNamespaceFromKey(ctx context.Context, key str return nil } if err != nil { - utilruntime.HandleError(fmt.Errorf("Unable to retrieve namespace %v from store: %v", key, err)) + utilruntime.HandleErrorWithContext(ctx, err, "Unable to retrieve namespace from store", "namespace", key) return err } return nm.namespacedResourcesDeleter.Delete(ctx, namespace.Name) @@ -196,13 +195,13 @@ func (nm *NamespaceController) syncNamespaceFromKey(ctx context.Context, key str // Run starts observing the system with the specified number of workers. func (nm *NamespaceController) Run(ctx context.Context, workers int) { - defer utilruntime.HandleCrash() + defer utilruntime.HandleCrashWithContext(ctx) defer nm.queue.ShutDown() logger := klog.FromContext(ctx) logger.Info("Starting namespace controller") defer logger.Info("Shutting down namespace controller") - if !cache.WaitForNamedCacheSync("namespace", ctx.Done(), nm.listerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, nm.listerSynced) { return } diff --git a/pkg/controller/nodeipam/ipam/range_allocator.go b/pkg/controller/nodeipam/ipam/range_allocator.go index 50df3de49ce41..cbcc91678fa82 100644 --- a/pkg/controller/nodeipam/ipam/range_allocator.go +++ b/pkg/controller/nodeipam/ipam/range_allocator.go @@ -183,7 +183,7 @@ func (r *rangeAllocator) Run(ctx context.Context) { logger.Info("Starting range CIDR allocator") defer logger.Info("Shutting down range CIDR allocator") - if !cache.WaitForNamedCacheSync("cidrallocator", ctx.Done(), r.nodesSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, r.nodesSynced) { return } diff --git a/pkg/controller/nodeipam/node_ipam_controller.go b/pkg/controller/nodeipam/node_ipam_controller.go index 27b079839d041..ce101c840b9b7 100644 --- a/pkg/controller/nodeipam/node_ipam_controller.go +++ b/pkg/controller/nodeipam/node_ipam_controller.go @@ -141,7 +141,7 @@ func (nc *Controller) Run(ctx context.Context) { klog.FromContext(ctx).Info("Starting ipam controller") defer klog.FromContext(ctx).Info("Shutting down ipam controller") - if !cache.WaitForNamedCacheSync("node", ctx.Done(), nc.nodeInformerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, nc.nodeInformerSynced) { return } diff --git a/pkg/controller/nodelifecycle/node_lifecycle_controller.go b/pkg/controller/nodelifecycle/node_lifecycle_controller.go index 3aff066e83262..818984e73dd2e 100644 --- a/pkg/controller/nodelifecycle/node_lifecycle_controller.go +++ b/pkg/controller/nodelifecycle/node_lifecycle_controller.go @@ -445,7 +445,7 @@ func NewNodeLifecycleController( // Run starts an asynchronous loop that monitors the status of cluster nodes. func (nc *Controller) Run(ctx context.Context) { - defer utilruntime.HandleCrash() + defer utilruntime.HandleCrashWithContext(ctx) // Start events processing pipeline. nc.broadcaster.StartStructuredLogging(3) @@ -464,7 +464,7 @@ func (nc *Controller) Run(ctx context.Context) { logger.Info("Starting node controller") defer logger.Info("Shutting down node controller") - if !cache.WaitForNamedCacheSync("taint", ctx.Done(), nc.leaseInformerSynced, nc.nodeInformerSynced, nc.podInformerSynced, nc.daemonSetInformerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, nc.leaseInformerSynced, nc.nodeInformerSynced, nc.podInformerSynced, nc.daemonSetInformerSynced) { return } @@ -725,7 +725,7 @@ func (nc *Controller) monitorNodeHealth(ctx context.Context) error { if currentReadyCondition != nil { pods, err := nc.getPodsAssignedToNode(node.Name) if err != nil { - utilruntime.HandleError(fmt.Errorf("unable to list pods of node %v: %v", node.Name, err)) + utilruntime.HandleErrorWithContext(ctx, err, "Unable to list pods of node", node.Name) if currentReadyCondition.Status != v1.ConditionTrue && observedReadyCondition.Status == v1.ConditionTrue { // If error happened during node status transition (Ready -> NotReady) // we need to mark node for retry to force MarkPodsNotReady execution @@ -744,7 +744,7 @@ func (nc *Controller) monitorNodeHealth(ctx context.Context) error { fallthrough case needsRetry && observedReadyCondition.Status != v1.ConditionTrue: if err = controllerutil.MarkPodsNotReady(ctx, nc.kubeClient, nc.recorder, pods, node.Name); err != nil { - utilruntime.HandleError(fmt.Errorf("unable to mark all pods NotReady on node %v: %v; queuing for retry", node.Name, err)) + utilruntime.HandleErrorWithContext(ctx, err, "Unable to mark all pods NotReady on node; queuing for retry", "node", node.Name) nc.nodesToRetry.Store(node.Name, struct{}{}) return } @@ -1259,7 +1259,8 @@ func (nc *Controller) markNodeAsReachable(ctx context.Context, node *v1.Node) (b return nc.zoneNoExecuteTainter[nodetopology.GetZoneKey(node)].Remove(node.Name), nil } -// ComputeZoneState returns a slice of NodeReadyConditions for all Nodes in a given zone. +// ComputeZoneState computes the state of a zone based on node ready conditions. +// It returns the number of not-ready nodes and the zone state. // The zone is considered: // - fullyDisrupted if there're no Ready Nodes, // - partiallyDisrupted if at least than nc.unhealthyZoneThreshold percent of Nodes are not Ready, diff --git a/pkg/controller/podautoscaler/horizontal.go b/pkg/controller/podautoscaler/horizontal.go index 8e4aac1a433ab..75a05e65c9f7d 100644 --- a/pkg/controller/podautoscaler/horizontal.go +++ b/pkg/controller/podautoscaler/horizontal.go @@ -205,7 +205,7 @@ func (a *HorizontalController) Run(ctx context.Context, workers int) { logger.Info("Starting HPA controller") defer logger.Info("Shutting down HPA controller") - if !cache.WaitForNamedCacheSync("HPA", ctx.Done(), a.hpaListerSynced, a.podListerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, a.hpaListerSynced, a.podListerSynced) { return } @@ -241,6 +241,8 @@ func (a *HorizontalController) enqueueHPA(obj interface{}) { defer a.hpaSelectorsMux.Unlock() if hpaKey := selectors.Parse(key); !a.hpaSelectors.SelectorExists(hpaKey) { a.hpaSelectors.PutSelector(hpaKey, labels.Nothing()) + // Observe HPA addition - only when it's a new HPA + a.monitor.ObserveHPAAddition() } } @@ -258,6 +260,8 @@ func (a *HorizontalController) deleteHPA(obj interface{}) { a.hpaSelectorsMux.Lock() defer a.hpaSelectorsMux.Unlock() a.hpaSelectors.DeleteSelector(selectors.Parse(key)) + // Observe HPA deletion + a.monitor.ObserveHPADeletion() } func (a *HorizontalController) worker(ctx context.Context) { @@ -936,15 +940,22 @@ func (a *HorizontalController) reconcileAutoscaler(ctx context.Context, hpaShare actionLabel = monitor.ActionLabelScaleDown } } else { + lastScaleTime := "" + if hpa.Status.LastScaleTime != nil { + lastScaleTime = hpa.Status.LastScaleTime.String() + } logger.V(4).Info("Decided not to scale", "scaleTarget", reference, "desiredReplicas", desiredReplicas, - "lastScaleTime", hpa.Status.LastScaleTime) + "lastScaleTime", lastScaleTime) desiredReplicas = currentReplicas } a.setStatus(hpa, currentReplicas, desiredReplicas, metricStatuses, rescale) + // Monitor the desired replicas + a.monitor.ObserveDesiredReplicas(hpa.Namespace, hpa.Name, desiredReplicas) + err = a.updateStatusIfNeeded(ctx, hpaStatusOriginal, hpa) if err != nil { // we can overwrite retErr in this case because it's an internal error. diff --git a/pkg/controller/podautoscaler/horizontal_test.go b/pkg/controller/podautoscaler/horizontal_test.go index 1c9070c15ba21..1aa8ff1a99296 100644 --- a/pkg/controller/podautoscaler/horizontal_test.go +++ b/pkg/controller/podautoscaler/horizontal_test.go @@ -93,7 +93,7 @@ func statusOkWithOverrides(overrides ...autoscalingv2.HorizontalPodAutoscalerCon resv1 := make([]autoscalingv2.HorizontalPodAutoscalerCondition, len(resv2)) for i, cond := range resv2 { resv1[i] = autoscalingv2.HorizontalPodAutoscalerCondition{ - Type: autoscalingv2.HorizontalPodAutoscalerConditionType(cond.Type), + Type: cond.Type, Status: cond.Status, Reason: cond.Reason, } @@ -146,6 +146,7 @@ type testCase struct { expectedReportedReconciliationErrorLabel monitor.ErrorLabel expectedReportedMetricComputationActionLabels map[autoscalingv2.MetricSourceType]monitor.ActionLabel expectedReportedMetricComputationErrorLabels map[autoscalingv2.MetricSourceType]monitor.ErrorLabel + checkDesiredReplicaMetric bool // Target resource information. resource *fakeResource @@ -727,6 +728,14 @@ func (tc *testCase) verifyRecordedMetric(ctx context.Context, t *testing.T, m *m } assert.Equal(t, l, m.metricComputationErrorLabels[metricType][0], "the metric computation error should be recorded in monitor expectedly") } + + // TODO: Retrieve the namespace and HPA names from the test case (tc) to replace hardcoded values below (and check). + if tc.checkDesiredReplicaMetric { + currentValue := m.GetDesiredReplicasValue("test-namespace", "test-hpa") + assert.Equal(t, tc.expectedDesiredReplicas, currentValue, + "the desired replicas should be recorded in monitor expectedly") + } + } func (tc *testCase) setupController(t *testing.T) (*HorizontalController, informers.SharedInformerFactory) { @@ -861,12 +870,15 @@ type mockMonitor struct { metricComputationActionLabels map[autoscalingv2.MetricSourceType][]monitor.ActionLabel metricComputationErrorLabels map[autoscalingv2.MetricSourceType][]monitor.ErrorLabel + metricObjectsCount int + desiredReplicasValues map[string]int32 // key is "namespace/name" } func newMockMonitor() *mockMonitor { return &mockMonitor{ metricComputationActionLabels: make(map[autoscalingv2.MetricSourceType][]monitor.ActionLabel), metricComputationErrorLabels: make(map[autoscalingv2.MetricSourceType][]monitor.ErrorLabel), + desiredReplicasValues: make(map[string]int32), } } @@ -899,6 +911,39 @@ func (m *mockMonitor) waitUntilRecorded(ctx context.Context, t *testing.T) { } } +func (m *mockMonitor) ObserveHPAAddition() { + m.Lock() + defer m.Unlock() + m.metricObjectsCount++ +} + +func (m *mockMonitor) ObserveHPADeletion() { + m.Lock() + defer m.Unlock() + m.metricObjectsCount-- +} + +func (m *mockMonitor) GetObjectsCount() int { + m.RLock() + defer m.RUnlock() + return m.metricObjectsCount +} + +func (m *mockMonitor) ObserveDesiredReplicas(namespace, hpaName string, desiredReplicas int32) { + fmt.Printf("putting %s/%s with %v", namespace, hpaName, desiredReplicas) + m.Lock() + defer m.Unlock() + key := fmt.Sprintf("%s/%s", namespace, hpaName) + m.desiredReplicasValues[key] = desiredReplicas +} + +func (m *mockMonitor) GetDesiredReplicasValue(namespace, hpaName string) int32 { + m.RLock() + defer m.RUnlock() + key := fmt.Sprintf("%s/%s", namespace, hpaName) + return m.desiredReplicasValues[key] +} + func TestScaleUp(t *testing.T) { tc := testCase{ minReplicas: 2, @@ -919,6 +964,7 @@ func TestScaleUp(t *testing.T) { expectedReportedMetricComputationErrorLabels: map[autoscalingv2.MetricSourceType]monitor.ErrorLabel{ autoscalingv2.ResourceMetricSourceType: monitor.ErrorLabelNone, }, + checkDesiredReplicaMetric: true, } tc.runTest(t) } @@ -4003,7 +4049,7 @@ func TestCalculateScaleDownLimitWithBehaviors(t *testing.T) { func generateScalingRules(pods, podsPeriod, percent, percentPeriod, stabilizationWindow int32) *autoscalingv2.HPAScalingRules { policy := autoscalingv2.MaxChangePolicySelect directionBehavior := autoscalingv2.HPAScalingRules{ - StabilizationWindowSeconds: ptr.To(int32(stabilizationWindow)), + StabilizationWindowSeconds: ptr.To(stabilizationWindow), SelectPolicy: &policy, } if pods != 0 { @@ -5146,10 +5192,16 @@ func TestMultipleHPAs(t *testing.T) { const testNamespace = "dummy-namespace" processed := make(chan string, hpaCount) + processedDeleted := make(chan string, 1) testClient := &fake.Clientset{} testScaleClient := &scalefake.FakeScaleClient{} testMetricsClient := &metricsfake.Clientset{} + hpaWatcher := watch.NewFake() + podWatcher := watch.NewFake() + + testClient.AddWatchReactor("horizontalpodautoscalers", core.DefaultWatchReactor(hpaWatcher, nil)) + testClient.AddWatchReactor("pods", core.DefaultWatchReactor(podWatcher, nil)) hpaList := [hpaCount]autoscalingv2.HorizontalPodAutoscaler{} scaleUpEventsMap := map[string][]timestampedScaleEvent{} @@ -5369,6 +5421,13 @@ func TestMultipleHPAs(t *testing.T) { return handled, obj, err }) + testClient.AddReactor("delete", "horizontalpodautoscalers", func(action core.Action) (handled bool, ret runtime.Object, err error) { + deleteAction := action.(core.DeleteAction) + hpaName := deleteAction.GetName() + processedDeleted <- hpaName + return true, nil, nil + }) + informerFactory := informers.NewSharedInformerFactory(testClient, controller.NoResyncPeriodFunc()) tCtx := ktesting.Init(t) @@ -5389,6 +5448,7 @@ func TestMultipleHPAs(t *testing.T) { ) hpaController.scaleUpEvents = scaleUpEventsMap hpaController.scaleDownEvents = scaleDownEventsMap + hpaController.monitor = newMockMonitor() informerFactory.Start(tCtx.Done()) go hpaController.Run(tCtx, 5) @@ -5406,6 +5466,32 @@ func TestMultipleHPAs(t *testing.T) { } assert.Len(t, processedHPA, hpaCount, "Expected to process all HPAs") + assert.Equal(t, hpaCount, hpaController.monitor.(*mockMonitor).GetObjectsCount(), "Expected objects count to match number of HPAs") + + // Test HPA deletion + hpaName := "dummy-hpa-0" + + // Delete the HPA through the API + err := testClient.AutoscalingV2().HorizontalPodAutoscalers(testNamespace).Delete(tCtx, hpaName, metav1.DeleteOptions{}) + if err != nil { + t.Fatalf("Failed to delete HPA: %v", err) + } + + // Simulate the watch event for deletion + hpaWatcher.Delete(&hpaList[0]) + + // Wait for deletion to be processed + select { + case deletedHPAName := <-processedDeleted: + assert.Equal(t, hpaName, deletedHPAName, "Expected the deleted HPA name to match") + case <-time.After(5 * time.Second): + t.Fatalf("Timeout waiting for HPA deletion to be processed") + } + + // Give the controller time to process the deletion and update the monitor + assert.Eventually(t, func() bool { + return hpaController.monitor.(*mockMonitor).GetObjectsCount() == hpaCount-1 + }, 5*time.Second, 100*time.Millisecond, "Expected objects count to be hpaCount-1 after an HPA was deleted") } func TestHPARescaleWithSuccessfulConflictRetry(t *testing.T) { diff --git a/pkg/controller/podautoscaler/metrics/client.go b/pkg/controller/podautoscaler/metrics/client.go index 71f2cc616bb41..437f5337b3a99 100644 --- a/pkg/controller/podautoscaler/metrics/client.go +++ b/pkg/controller/podautoscaler/metrics/client.go @@ -159,10 +159,8 @@ func (c *customMetricsClient) GetRawMetric(metricName string, namespace string, res[m.DescribedObject.Name] = PodMetric{ Timestamp: m.Timestamp.Time, Window: window, - Value: int64(m.Value.MilliValue()), + Value: m.Value.MilliValue(), } - - m.Value.MilliValue() } timestamp := metrics.Items[0].Timestamp.Time diff --git a/pkg/controller/podautoscaler/metrics/client_test.go b/pkg/controller/podautoscaler/metrics/client_test.go index 59fbcc804aad3..cf81d20fa92f5 100644 --- a/pkg/controller/podautoscaler/metrics/client_test.go +++ b/pkg/controller/podautoscaler/metrics/client_test.go @@ -241,7 +241,7 @@ func (tc *restClientTestCase) runTest(t *testing.T) { isResource := len(tc.resourceName) > 0 isExternal := tc.metricSelector != nil if isResource { - info, timestamp, err := metricsClient.GetResourceMetric(context.TODO(), v1.ResourceName(tc.resourceName), tc.namespace, tc.selector, tc.container) + info, timestamp, err := metricsClient.GetResourceMetric(context.TODO(), tc.resourceName, tc.namespace, tc.selector, tc.container) tc.verifyResults(t, info, timestamp, err) } else if isExternal { tc.metricLabelSelector, err = metav1.LabelSelectorAsSelector(tc.metricSelector) diff --git a/pkg/controller/podautoscaler/monitor/metrics.go b/pkg/controller/podautoscaler/monitor/metrics.go index 01f48e02b685c..d91b11f058de5 100644 --- a/pkg/controller/podautoscaler/monitor/metrics.go +++ b/pkg/controller/podautoscaler/monitor/metrics.go @@ -37,7 +37,6 @@ var ( Help: "Number of reconciliations of HPA controller. The label 'action' should be either 'scale_down', 'scale_up', or 'none'. Also, the label 'error' should be either 'spec', 'internal', or 'none'. Note that if both spec and internal errors happen during a reconciliation, the first one to occur is reported in `error` label.", StabilityLevel: metrics.ALPHA, }, []string{"action", "error"}) - reconciliationsDuration = metrics.NewHistogramVec( &metrics.HistogramOpts{ Subsystem: hpaControllerSubsystem, @@ -61,12 +60,29 @@ var ( Buckets: metrics.ExponentialBuckets(0.001, 2, 15), StabilityLevel: metrics.ALPHA, }, []string{"action", "error", "metric_type"}) + numHorizontalPodAutoscalers = metrics.NewGauge( + &metrics.GaugeOpts{ + Subsystem: hpaControllerSubsystem, + Name: "num_horizontal_pod_autoscalers", + Help: "Current number of controlled HPA objects.", + StabilityLevel: metrics.ALPHA, + }, + ) + desiredReplicasCount = metrics.NewGaugeVec( + &metrics.GaugeOpts{ + Subsystem: hpaControllerSubsystem, + Name: "desired_replicas", + Help: "Current desired replica count for HPA objects.", + StabilityLevel: metrics.ALPHA, + }, []string{"namespace", "hpa_name"}) metricsList = []metrics.Registerable{ reconciliationsTotal, reconciliationsDuration, metricComputationTotal, metricComputationDuration, + numHorizontalPodAutoscalers, + desiredReplicasCount, } ) diff --git a/pkg/controller/podautoscaler/monitor/monitor.go b/pkg/controller/podautoscaler/monitor/monitor.go index 39f9fb8441bed..e5d5b75f5ace8 100644 --- a/pkg/controller/podautoscaler/monitor/monitor.go +++ b/pkg/controller/podautoscaler/monitor/monitor.go @@ -41,6 +41,9 @@ const ( type Monitor interface { ObserveReconciliationResult(action ActionLabel, err ErrorLabel, duration time.Duration) ObserveMetricComputationResult(action ActionLabel, err ErrorLabel, duration time.Duration, metricType v2.MetricSourceType) + ObserveHPAAddition() + ObserveHPADeletion() + ObserveDesiredReplicas(namespace, hpaName string, desiredReplicas int32) } type monitor struct{} @@ -60,3 +63,18 @@ func (r *monitor) ObserveMetricComputationResult(action ActionLabel, err ErrorLa metricComputationTotal.WithLabelValues(string(action), string(err), string(metricType)).Inc() metricComputationDuration.WithLabelValues(string(action), string(err), string(metricType)).Observe(duration.Seconds()) } + +// ObserveHPAAddition observes the addition of an HPA object. +func (r *monitor) ObserveHPAAddition() { + numHorizontalPodAutoscalers.Inc() +} + +// ObserveHPADeletion observes the deletion of an HPA object. +func (r *monitor) ObserveHPADeletion() { + numHorizontalPodAutoscalers.Dec() +} + +// ObserveDesiredReplicas records the desired replica count for an HPA object. +func (r *monitor) ObserveDesiredReplicas(namespace, hpaName string, desiredReplicas int32) { + desiredReplicasCount.WithLabelValues(namespace, hpaName).Set(float64(desiredReplicas)) +} diff --git a/pkg/controller/podautoscaler/replica_calculator.go b/pkg/controller/podautoscaler/replica_calculator.go index 656cf3ca51cde..00ae980d47a78 100644 --- a/pkg/controller/podautoscaler/replica_calculator.go +++ b/pkg/controller/podautoscaler/replica_calculator.go @@ -185,7 +185,7 @@ func (c *ReplicaCalculator) GetMetricReplicas(currentReplicas int32, targetUsage return 0, 0, time.Time{}, fmt.Errorf("unable to get metric %s: %v", metricName, err) } - replicaCount, usage, err = c.calcPlainMetricReplicas(metrics, currentReplicas, targetUsage, tolerances, namespace, selector, v1.ResourceName("")) + replicaCount, usage, err = c.calcPlainMetricReplicas(metrics, currentReplicas, targetUsage, tolerances, namespace, selector, "") return replicaCount, usage, timestamp, err } @@ -290,7 +290,14 @@ func (c *ReplicaCalculator) getUsageRatioReplicaCount(currentReplicas int32, usa if err != nil { return 0, time.Time{}, fmt.Errorf("unable to calculate ready pods: %s", err) } - replicaCount = int32(math.Ceil(usageRatio * float64(readyPodCount))) + // Calculate replicaCount as float64 first + replicaCountFloat := usageRatio * float64(readyPodCount) + // Check if replicaCount exceeds max int32 + if replicaCountFloat > math.MaxInt32 { + replicaCount = math.MaxInt32 + } else { + replicaCount = int32(math.Ceil(replicaCountFloat)) + } } else { // Scale to zero or n pods depending on usageRatio replicaCount = int32(math.Ceil(usageRatio)) @@ -353,8 +360,14 @@ func (c *ReplicaCalculator) GetExternalMetricReplicas(currentReplicas int32, tar if err != nil { return 0, 0, time.Time{}, fmt.Errorf("unable to get external metric %s/%s/%+v: %s", namespace, metricName, metricSelector, err) } + usage = 0 for _, val := range metrics { + // Cap at MaxInt64 for positive overflow + if val > 0 && usage > math.MaxInt64-val { + usage = math.MaxInt64 + break + } usage = usage + val } @@ -501,7 +514,6 @@ func calculatePodLevelRequests(pod *v1.Pod, resource v1.ResourceName) (int64, er // resource by summing requests from all containers in the pod. // If a container name is specified, it uses only that container. func calculatePodRequestsFromContainers(pod *v1.Pod, container string, resource v1.ResourceName) (int64, error) { - // Calculate all regular containers and restartable init containers requests. containers := append([]v1.Container{}, pod.Spec.Containers...) for _, c := range pod.Spec.InitContainers { if c.RestartPolicy != nil && *c.RestartPolicy == v1.ContainerRestartPolicyAlways { @@ -518,7 +530,17 @@ func calculatePodRequestsFromContainers(pod *v1.Pod, container string, resource } request += containerRequest.MilliValue() } + // container names are unique inside the pod + if container == c.Name { + return request, nil + } } + + // If we're looking for a specific container and didn't find it + if container != "" { + return 0, fmt.Errorf("container %s not found in Pod %s", container, pod.Name) + } + return request, nil } diff --git a/pkg/controller/podautoscaler/replica_calculator_test.go b/pkg/controller/podautoscaler/replica_calculator_test.go index fc164f7c6ab95..2a903b5bb566f 100644 --- a/pkg/controller/podautoscaler/replica_calculator_test.go +++ b/pkg/controller/podautoscaler/replica_calculator_test.go @@ -41,6 +41,7 @@ import ( "k8s.io/kubernetes/pkg/controller" metricsclient "k8s.io/kubernetes/pkg/controller/podautoscaler/metrics" "k8s.io/kubernetes/pkg/features" + "k8s.io/kubernetes/test/utils/ktesting" cmapi "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2" emapi "k8s.io/metrics/pkg/apis/external_metrics/v1beta1" metricsapi "k8s.io/metrics/pkg/apis/metrics/v1beta1" @@ -287,7 +288,7 @@ func (tc *replicaCalcTestCase) prepareTestCMClient(t *testing.T) *cmfake.FakeCus Metric: cmapi.MetricIdentifier{ Name: tc.metric.name, }, - Value: *resource.NewMilliQuantity(int64(tc.metric.levels[0]), resource.DecimalSI), + Value: *resource.NewMilliQuantity(tc.metric.levels[0], resource.DecimalSI), }, } @@ -341,6 +342,9 @@ func (tc *replicaCalcTestCase) prepareTestClient(t *testing.T) (*fake.Clientset, } func (tc *replicaCalcTestCase) runTest(t *testing.T) { + // Create the special test-aware context. + tCtx := ktesting.Init(t) + testClient, testMetricsClient, testCMClient, testEMClient := tc.prepareTestClient(t) metricsClient := metricsclient.NewRESTMetricsClient(testMetricsClient.MetricsV1beta1(), testCMClient, testEMClient) @@ -349,11 +353,15 @@ func (tc *replicaCalcTestCase) runTest(t *testing.T) { replicaCalc := NewReplicaCalculator(metricsClient, informer.Lister(), defaultTestingCPUInitializationPeriod, defaultTestingDelayOfInitialReadinessStatus) - stop := make(chan struct{}) - defer close(stop) - informerFactory.Start(stop) - if !cache.WaitForNamedCacheSync("HPA", stop, informer.Informer().HasSynced) { - return + // Use the test context's Done() channel to manage the informer's lifecycle. + informerFactory.Start(tCtx.Done()) + + // Create a new context specifically for the cache sync operation with a timeout. + syncCtx, cancel := context.WithTimeout(tCtx, 10*time.Second) + defer cancel() + + if !cache.WaitForNamedCacheSyncWithContext(syncCtx, informer.Informer().HasSynced) { + tCtx.Fatal("Failed to sync informer cache within the 10s timeout") } selector, err := metav1.LabelSelectorAsSelector(&metav1.LabelSelector{ @@ -368,7 +376,7 @@ func (tc *replicaCalcTestCase) runTest(t *testing.T) { } if tc.resource != nil { - outReplicas, outUtilization, outRawValue, outTimestamp, err := replicaCalc.GetResourceReplicas(context.TODO(), tc.currentReplicas, tc.resource.targetUtilization, tc.resource.name, tolerances, testNamespace, selector, tc.container) + outReplicas, outUtilization, outRawValue, outTimestamp, err := replicaCalc.GetResourceReplicas(tCtx, tc.currentReplicas, tc.resource.targetUtilization, tc.resource.name, tolerances, testNamespace, selector, tc.container) if tc.expectedError != nil { require.Error(t, err, "there should be an error calculating the replica count") @@ -509,6 +517,26 @@ func TestReplicaCalcScaleUpUnreadyLessScale(t *testing.T) { tc.runTest(t) } +func TestReplicaCalcScaleUpOverflow(t *testing.T) { + tc := replicaCalcTestCase{ + currentReplicas: 3, + expectedReplicas: math.MaxInt32, + metric: &metricInfo{ + name: "qps", + levels: []int64{math.MaxInt64}, // Use MaxInt64 to ensure a very large value + targetUsage: 1, // Set a very low target to force high scaling + metricType: objectMetric, + expectedUsage: math.MaxInt64, + singleObject: &autoscalingv2.CrossVersionObjectReference{ + Kind: "Deployment", + APIVersion: "apps/v1", + Name: "some-deployment", + }, + }, + } + tc.runTest(t) +} + func TestReplicaCalcScaleUpContainerHotCpuLessScale(t *testing.T) { tc := replicaCalcTestCase{ currentReplicas: 3, @@ -2430,3 +2458,48 @@ func TestCalculateRequests(t *testing.T) { }) } } +func TestCalculatePodRequestsFromContainers_NonExistentContainer(t *testing.T) { + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-pod", + Namespace: testNamespace, + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + { + Name: "container1", + Resources: v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("100m"), + }, + }, + }, + }, + }, + } + + request, err := calculatePodRequestsFromContainers(pod, "non-existent-container", v1.ResourceCPU) + + require.Error(t, err, "expected error for non-existent container") + expectedErr := "container non-existent-container not found in Pod test-pod" + assert.Equal(t, expectedErr, err.Error(), "error message should match expected format") + assert.Equal(t, int64(0), request, "request should be 0 when container does not exist") +} + +func TestReplicaCalcExternalMetricUsageOverflow(t *testing.T) { + tc := replicaCalcTestCase{ + currentReplicas: 3, + expectedReplicas: 3, + metric: &metricInfo{ + name: "qps", + // Two values that when added together will overflow int64 + levels: []int64{math.MaxInt64/2 + 1, math.MaxInt64/2 + 1}, + targetUsage: math.MaxInt64, // Set high target + metricType: externalMetric, + selector: &metav1.LabelSelector{MatchLabels: map[string]string{"label": "value"}}, + expectedUsage: math.MaxInt64, // expect capped value + + }, + } + tc.runTest(t) +} diff --git a/pkg/controller/podgc/gc_controller.go b/pkg/controller/podgc/gc_controller.go index 305543e9192bc..d4934f3271957 100644 --- a/pkg/controller/podgc/gc_controller.go +++ b/pkg/controller/podgc/gc_controller.go @@ -100,7 +100,7 @@ func (gcc *PodGCController) Run(ctx context.Context) { defer gcc.nodeQueue.ShutDown() defer logger.Info("Shutting down GC controller") - if !cache.WaitForNamedCacheSync("GC", ctx.Done(), gcc.podListerSynced, gcc.nodeListerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, gcc.podListerSynced, gcc.nodeListerSynced) { return } diff --git a/pkg/controller/replicaset/replica_set.go b/pkg/controller/replicaset/replica_set.go index 8934bd4605500..0348943b0aa13 100644 --- a/pkg/controller/replicaset/replica_set.go +++ b/pkg/controller/replicaset/replica_set.go @@ -243,7 +243,7 @@ func (rsc *ReplicaSetController) Run(ctx context.Context, workers int) { logger.Info("Starting controller", "name", controllerName) defer logger.Info("Shutting down controller", "name", controllerName) - if !cache.WaitForNamedCacheSync(rsc.Kind, ctx.Done(), rsc.podListerSynced, rsc.rsListerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, rsc.podListerSynced, rsc.rsListerSynced) { return } diff --git a/pkg/controller/resourceclaim/controller.go b/pkg/controller/resourceclaim/controller.go index 099994b29ba5f..f3b94b1331b2b 100644 --- a/pkg/controller/resourceclaim/controller.go +++ b/pkg/controller/resourceclaim/controller.go @@ -223,7 +223,15 @@ func (ec *Controller) enqueuePod(logger klog.Logger, obj interface{}, deleted bo return } - if len(pod.Spec.ResourceClaims) == 0 { + // Check if pod has any resource claims to process. + // Extended resource claims are stored in pod.Status.ExtendedResourceClaimStatus, + // not in pod.Spec.ResourceClaims, so we need to check both locations. + hasResourceClaims := len(pod.Spec.ResourceClaims) > 0 + // For cleanup of extended resource claims, we must consider claims present + // in pod status regardless of the current feature gate state. The claim may + // have been created when the feature was enabled and still needs cleanup. + hasExtendedResourceClaims := pod.Status.ExtendedResourceClaimStatus != nil + if !hasResourceClaims && !hasExtendedResourceClaims { // Nothing to do for it at all. return } @@ -257,6 +265,18 @@ func (ec *Controller) enqueuePod(logger klog.Logger, obj interface{}, deleted bo logger.V(6).Info("Nothing to do for skipped claim during pod change", "pod", klog.KObj(pod), "podClaim", podClaim.Name, "reason", reason) } } + + // Process extended resource claims for completed/deleted pods. + // Extended resource claims are created by the scheduler and stored in + // pod.Status.ExtendedResourceClaimStatus, not in pod.Spec.ResourceClaims. + // Without this, extended resource claims would never be cleaned up when + // pods complete, causing device resources to remain allocated indefinitely. + if hasExtendedResourceClaims { + claimName := pod.Status.ExtendedResourceClaimStatus.ResourceClaimName + key := claimKeyPrefix + pod.Namespace + "/" + claimName + logger.V(6).Info("Process extended resource claim", "pod", klog.KObj(pod), "claim", klog.KRef(pod.Namespace, claimName), "key", key, "reason", reason) + ec.queue.Add(key) + } } needsWork, reason := ec.podNeedsWork(pod) @@ -403,7 +423,7 @@ func (ec *Controller) Run(ctx context.Context, workers int) { ec.recorder = eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "resource_claim"}) defer eventBroadcaster.Shutdown() - if !cache.WaitForNamedCacheSync("resource_claim", ctx.Done(), ec.podSynced, ec.claimsSynced, ec.templatesSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, ec.podSynced, ec.claimsSynced, ec.templatesSynced) { return } diff --git a/pkg/controller/resourceclaim/controller_test.go b/pkg/controller/resourceclaim/controller_test.go index bdcda37be32ef..b8b465245e14d 100644 --- a/pkg/controller/resourceclaim/controller_test.go +++ b/pkg/controller/resourceclaim/controller_test.go @@ -34,15 +34,18 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/diff" + utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes/fake" resourcelisters "k8s.io/client-go/listers/resource/v1" k8stesting "k8s.io/client-go/testing" + featuregatetesting "k8s.io/component-base/featuregate/testing" "k8s.io/component-base/metrics" "k8s.io/component-base/metrics/testutil" "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller" resourceclaimmetrics "k8s.io/kubernetes/pkg/controller/resourceclaim/metrics" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/test/utils/ktesting" "k8s.io/utils/ptr" ) @@ -1127,3 +1130,195 @@ func (em numMetrics) withUpdates(notAllocatedDelta, notAllocatedWithAdminDelta, lister: em.lister, } } + +func TestEnqueuePodExtendedResourceClaims(t *testing.T) { + tests := []struct { + name string + pod *v1.Pod + featureGateEnabled bool + deleted bool + expectEarlyReturn bool + expectExtendedClaimEnqueued bool + }{ + { + name: "pod with no resource claims", + pod: &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "test-pod", Namespace: "default"}, + Spec: v1.PodSpec{}, + Status: v1.PodStatus{}, + }, + featureGateEnabled: true, + expectEarlyReturn: true, + expectExtendedClaimEnqueued: false, + }, + { + name: "pod with regular resource claims only", + pod: &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "test-pod", Namespace: "default"}, + Spec: v1.PodSpec{ + ResourceClaims: []v1.PodResourceClaim{{Name: "regular-claim"}}, + }, + Status: v1.PodStatus{Phase: v1.PodRunning}, + }, + featureGateEnabled: true, + expectEarlyReturn: false, + expectExtendedClaimEnqueued: false, + }, + { + name: "pod with extended resource claim, feature enabled, running pod", + pod: &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "test-pod", Namespace: "default"}, + Spec: v1.PodSpec{}, + Status: v1.PodStatus{ + Phase: v1.PodRunning, + ExtendedResourceClaimStatus: &v1.PodExtendedResourceClaimStatus{ + ResourceClaimName: "test-extended-claim", + }, + }, + }, + featureGateEnabled: true, + expectEarlyReturn: false, + expectExtendedClaimEnqueued: false, + }, + { + name: "pod with extended resource claim, feature enabled, completed pod", + pod: &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "test-pod", Namespace: "default"}, + Spec: v1.PodSpec{}, + Status: v1.PodStatus{ + Phase: v1.PodSucceeded, + ExtendedResourceClaimStatus: &v1.PodExtendedResourceClaimStatus{ + ResourceClaimName: "test-extended-claim", + }, + }, + }, + featureGateEnabled: true, + expectEarlyReturn: false, + expectExtendedClaimEnqueued: true, + }, + { + name: "pod with extended resource claim, feature enabled, failed pod", + pod: &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "test-pod", Namespace: "default"}, + Spec: v1.PodSpec{}, + Status: v1.PodStatus{ + Phase: v1.PodFailed, // Failed pod + ExtendedResourceClaimStatus: &v1.PodExtendedResourceClaimStatus{ + ResourceClaimName: "test-extended-claim", + }, + }, + }, + featureGateEnabled: true, + expectEarlyReturn: false, + expectExtendedClaimEnqueued: true, + }, + { + name: "pod with extended resource claim, feature disabled", + pod: &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "test-pod", Namespace: "default"}, + Spec: v1.PodSpec{}, + Status: v1.PodStatus{ + Phase: v1.PodSucceeded, + ExtendedResourceClaimStatus: &v1.PodExtendedResourceClaimStatus{ + ResourceClaimName: "test-extended-claim", + }, + }, + }, + featureGateEnabled: false, + expectEarlyReturn: false, + expectExtendedClaimEnqueued: true, + }, + { + name: "deleted pod with extended resource claim", + pod: &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "test-pod", Namespace: "default"}, + Spec: v1.PodSpec{}, + Status: v1.PodStatus{ + Phase: v1.PodSucceeded, + ExtendedResourceClaimStatus: &v1.PodExtendedResourceClaimStatus{ + ResourceClaimName: "test-extended-claim", + }, + }, + }, + featureGateEnabled: true, + deleted: true, + expectEarlyReturn: false, + expectExtendedClaimEnqueued: true, + }, + { + name: "pod with both regular and extended resource claims, completed", + pod: &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "test-pod", Namespace: "default"}, + Spec: v1.PodSpec{ + ResourceClaims: []v1.PodResourceClaim{{Name: "regular-claim"}}, + }, + Status: v1.PodStatus{ + Phase: v1.PodSucceeded, + ExtendedResourceClaimStatus: &v1.PodExtendedResourceClaimStatus{ + ResourceClaimName: "test-extended-claim", + }, + }, + }, + featureGateEnabled: true, + expectEarlyReturn: false, + expectExtendedClaimEnqueued: true, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DRAExtendedResource, test.featureGateEnabled) + + tCtx := ktesting.Init(t) + tCtx = ktesting.WithCancel(tCtx) + + fakeKubeClient := createTestClient() + informerFactory := informers.NewSharedInformerFactory(fakeKubeClient, controller.NoResyncPeriodFunc()) + podInformer := informerFactory.Core().V1().Pods() + claimInformer := informerFactory.Resource().V1().ResourceClaims() + templateInformer := informerFactory.Resource().V1().ResourceClaimTemplates() + + setupMetrics() + + ec, err := NewController(tCtx.Logger(), Features{}, fakeKubeClient, podInformer, claimInformer, templateInformer) + if err != nil { + t.Fatalf("error creating controller: %v", err) + } + + ec.enqueuePod(tCtx.Logger(), test.pod, test.deleted) + + var keys []string + for ec.queue.Len() > 0 { + k, _ := ec.queue.Get() + keys = append(keys, k) + ec.queue.Forget(k) + ec.queue.Done(k) + } + + if test.expectEarlyReturn { + if len(keys) != 0 { + t.Errorf("expected no keys enqueued on early return, got: %v", keys) + } + return + } + + var expectedClaimKey string + if test.pod.Status.ExtendedResourceClaimStatus != nil { + expectedClaimKey = claimKeyPrefix + test.pod.Namespace + "/" + test.pod.Status.ExtendedResourceClaimStatus.ResourceClaimName + } + found := false + for _, k := range keys { + if k == expectedClaimKey { + found = true + break + } + } + if test.expectExtendedClaimEnqueued && !found { + t.Errorf("expected extended claim key %q to be enqueued, got keys: %v", expectedClaimKey, keys) + } + if !test.expectExtendedClaimEnqueued && found { + t.Errorf("did not expect extended claim key %q to be enqueued, got keys: %v", expectedClaimKey, keys) + } + }) + } +} diff --git a/pkg/controller/resourceclaim/metrics/metrics.go b/pkg/controller/resourceclaim/metrics/metrics.go index f9fe6f78fa7e7..b5a926ff3eac4 100644 --- a/pkg/controller/resourceclaim/metrics/metrics.go +++ b/pkg/controller/resourceclaim/metrics/metrics.go @@ -42,7 +42,8 @@ var ( // NumResourceClaimsDesc tracks the number of ResourceClaims, // categorized by their allocation status and admin access. - NumResourceClaimsDesc = metrics.NewDesc(ResourceClaimSubsystem+"_resource_claims", + NumResourceClaimsDesc = metrics.NewDesc( + metrics.BuildFQName("", ResourceClaimSubsystem, "resource_claims"), "Number of ResourceClaims, categorized by allocation status and admin access", []string{"allocated", "admin_access"}, nil, metrics.ALPHA, "") diff --git a/pkg/controller/resourcequota/resource_quota_controller.go b/pkg/controller/resourcequota/resource_quota_controller.go index dcfd6c6a88ef0..351e1c0fb911c 100644 --- a/pkg/controller/resourcequota/resource_quota_controller.go +++ b/pkg/controller/resourcequota/resource_quota_controller.go @@ -304,7 +304,7 @@ func (rq *Controller) Run(ctx context.Context, workers int) { go rq.quotaMonitor.Run(ctx) } - if !cache.WaitForNamedCacheSync("resource quota", ctx.Done(), rq.informerSyncedFuncs...) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, rq.informerSyncedFuncs...) { return } @@ -489,14 +489,17 @@ func (rq *Controller) Sync(ctx context.Context, discoveryFunc NamespacedResource // this protects us from deadlocks where available resources changed and one of our informer caches will never fill. // informers keep attempting to sync in the background, so retrying doesn't interrupt them. // the call to resyncMonitors on the reattempt will no-op for resources that still exist. - if rq.quotaMonitor != nil && - !cache.WaitForNamedCacheSync( - "resource quota", - waitForStopOrTimeout(ctx.Done(), period), + if rq.quotaMonitor != nil { + syncCtx, cancel := context.WithTimeout(ctx, period) + defer cancel() + + if !cache.WaitForNamedCacheSyncWithContext( + syncCtx, func() bool { return rq.quotaMonitor.IsSynced(ctx) }, ) { - utilruntime.HandleError(fmt.Errorf("timed out waiting for quota monitor sync")) - return + utilruntime.HandleError(fmt.Errorf("timed out waiting for quota monitor sync")) + return + } } logger.V(2).Info("synced quota controller") @@ -520,19 +523,6 @@ func printDiff(oldResources, newResources map[schema.GroupVersionResource]struct return fmt.Sprintf("added: %v, removed: %v", added.List(), removed.List()) } -// waitForStopOrTimeout returns a stop channel that closes when the provided stop channel closes or when the specified timeout is reached -func waitForStopOrTimeout(stopCh <-chan struct{}, timeout time.Duration) <-chan struct{} { - stopChWithTimeout := make(chan struct{}) - go func() { - defer close(stopChWithTimeout) - select { - case <-stopCh: - case <-time.After(timeout): - } - }() - return stopChWithTimeout -} - // resyncMonitors starts or stops quota monitors as needed to ensure that all // (and only) those resources present in the map are monitored. func (rq *Controller) resyncMonitors(ctx context.Context, resources map[schema.GroupVersionResource]struct{}) error { diff --git a/pkg/controller/serviceaccount/legacy_serviceaccount_token_cleaner.go b/pkg/controller/serviceaccount/legacy_serviceaccount_token_cleaner.go index 1f6bb88a850b9..a7c070bf92962 100644 --- a/pkg/controller/serviceaccount/legacy_serviceaccount_token_cleaner.go +++ b/pkg/controller/serviceaccount/legacy_serviceaccount_token_cleaner.go @@ -103,7 +103,7 @@ func (tc *LegacySATokenCleaner) Run(ctx context.Context) { logger.Info("Starting legacy service account token cleaner controller") defer logger.Info("Shutting down legacy service account token cleaner controller") - if !cache.WaitForNamedCacheSync("legacy-service-account-token-cleaner", ctx.Done(), tc.saInformerSynced, tc.secretInformerSynced, tc.podInformerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, tc.saInformerSynced, tc.secretInformerSynced, tc.podInformerSynced) { return } diff --git a/pkg/controller/serviceaccount/serviceaccounts_controller.go b/pkg/controller/serviceaccount/serviceaccounts_controller.go index 4395136d066dd..25326b281f495 100644 --- a/pkg/controller/serviceaccount/serviceaccounts_controller.go +++ b/pkg/controller/serviceaccount/serviceaccounts_controller.go @@ -114,7 +114,7 @@ func (c *ServiceAccountsController) Run(ctx context.Context, workers int) { klog.FromContext(ctx).Info("Starting service account controller") defer klog.FromContext(ctx).Info("Shutting down service account controller") - if !cache.WaitForNamedCacheSync("service account", ctx.Done(), c.saListerSynced, c.nsListerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.saListerSynced, c.nsListerSynced) { return } diff --git a/pkg/controller/serviceaccount/tokens_controller.go b/pkg/controller/serviceaccount/tokens_controller.go index 8d2acbd7dac08..d106573a1d8d6 100644 --- a/pkg/controller/serviceaccount/tokens_controller.go +++ b/pkg/controller/serviceaccount/tokens_controller.go @@ -171,7 +171,7 @@ func (e *TokensController) Run(ctx context.Context, workers int) { defer e.syncServiceAccountQueue.ShutDown() defer e.syncSecretQueue.ShutDown() - if !cache.WaitForNamedCacheSync("tokens", ctx.Done(), e.serviceAccountSynced, e.secretSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, e.serviceAccountSynced, e.secretSynced) { return } diff --git a/pkg/controller/servicecidrs/servicecidrs_controller.go b/pkg/controller/servicecidrs/servicecidrs_controller.go index 4700c42fa74a0..b003d18873c25 100644 --- a/pkg/controller/servicecidrs/servicecidrs_controller.go +++ b/pkg/controller/servicecidrs/servicecidrs_controller.go @@ -137,7 +137,7 @@ func (c *Controller) Run(ctx context.Context, workers int) { logger.Info("Starting", "controller", controllerName) defer logger.Info("Shutting down", "controller", controllerName) - if !cache.WaitForNamedCacheSync(controllerName, ctx.Done(), c.serviceCIDRsSynced, c.ipAddressSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.serviceCIDRsSynced, c.ipAddressSynced) { return } diff --git a/pkg/controller/statefulset/metrics/metrics.go b/pkg/controller/statefulset/metrics/metrics.go new file mode 100644 index 0000000000000..ff530a3426258 --- /dev/null +++ b/pkg/controller/statefulset/metrics/metrics.go @@ -0,0 +1,74 @@ +/* +Copyright 2025 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 metrics + +import ( + "sync" + + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" +) + +const StatefulSetControllerSubsystem = "statefulset_controller" + +var ( + // MaxUnavailable tracks the current .spec.updateStrategy.rollingUpdate.maxUnavailable value with the + // MaxUnavailableStatefulSet feature enabled. This gauge reflects the configured maximum number of pods + // that can be unavailable during rolling updates, providing visibility into the availability constraints. + // The metric is set to 1 by default. + // + // Sample monitoring queries: + // - Current maxUnavailable setting: statefulset_max_unavailable + // - Compare with actual unavailable: statefulset_unavailable_replicas - statefulset_max_unavailable + // - Alert when exceeding limit: statefulset_unavailable_replicas > statefulset_max_unavailable + // - Monitor configuration changes: changes(statefulset_max_unavailable[1h]) + MaxUnavailable = metrics.NewGaugeVec( + &metrics.GaugeOpts{ + Subsystem: StatefulSetControllerSubsystem, + Name: "statefulset_max_unavailable", + Help: "Maximum number of unavailable pods allowed during StatefulSet rolling updates", + StabilityLevel: metrics.ALPHA, + }, []string{"statefulset_namespace", "statefulset_name", "pod_management_policy"}, + ) + + // UnavailableReplicas tracks the current number of unavailable pods in a StatefulSet. + // This gauge reflects the real-time count of pods that are either missing or unavailable + // (i.e., not ready for .spec.minReadySeconds). + // + // Sample monitoring queries: + // - Current unavailable pods: statefulset_unavailable_replicas + // - Availability percentage: (statefulset_replicas - statefulset_unavailable_replicas) / statefulset_replicas * 100 + // - Alert on high unavailability: statefulset_unavailable_replicas > statefulset_max_unavailable + // - Monitor availability trends: statefulset_unavailable_replicas + UnavailableReplicas = metrics.NewGaugeVec( + &metrics.GaugeOpts{ + Subsystem: StatefulSetControllerSubsystem, + Name: "statefulset_unavailable_replicas", + Help: "Current number of unavailable pods in StatefulSet", + StabilityLevel: metrics.ALPHA, + }, []string{"statefulset_namespace", "statefulset_name", "pod_management_policy"}, + ) +) + +var registerMetrics sync.Once + +func Register() { + registerMetrics.Do(func() { + legacyregistry.MustRegister(MaxUnavailable) + legacyregistry.MustRegister(UnavailableReplicas) + }) +} diff --git a/pkg/controller/statefulset/stateful_pod_control.go b/pkg/controller/statefulset/stateful_pod_control.go index 76945d336932e..c77dc404d2acd 100644 --- a/pkg/controller/statefulset/stateful_pod_control.go +++ b/pkg/controller/statefulset/stateful_pod_control.go @@ -19,21 +19,20 @@ package statefulset import ( "context" "fmt" - "strings" + "golang.org/x/text/cases" + "golang.org/x/text/language" apps "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" errorutils "k8s.io/apimachinery/pkg/util/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - utilfeature "k8s.io/apiserver/pkg/util/feature" clientset "k8s.io/client-go/kubernetes" corelisters "k8s.io/client-go/listers/core/v1" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/retry" "k8s.io/klog/v2" - "k8s.io/kubernetes/pkg/features" ) // StatefulPodControlObjectManager abstracts the manipulation of Pods and PVCs. The real controller implements this @@ -124,12 +123,10 @@ func (spc *StatefulPodControl) CreateStatefulPod(ctx context.Context, set *apps. if apierrors.IsAlreadyExists(err) { return err } - if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) { - // Set PVC policy as much as is possible at this point. - if err := spc.UpdatePodClaimForRetentionPolicy(ctx, set, pod); err != nil { - spc.recordPodEvent("update", set, pod, err) - return err - } + // Set PVC policy as much as is possible at this point. + if err := spc.UpdatePodClaimForRetentionPolicy(ctx, set, pod); err != nil { + spc.recordPodEvent("update", set, pod, err) + return err } spc.recordPodEvent("create", set, pod, err) return err @@ -155,19 +152,17 @@ func (spc *StatefulPodControl) UpdateStatefulPod(ctx context.Context, set *apps. return err } } - if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) { - // if the Pod's PVCs are not consistent with the StatefulSet's PVC deletion policy, update the PVC - // and dirty the pod. - if match, err := spc.ClaimsMatchRetentionPolicy(ctx, set, pod); err != nil { + // if the Pod's PVCs are not consistent with the StatefulSet's PVC deletion policy, update the PVC + // and dirty the pod. + if match, err := spc.ClaimsMatchRetentionPolicy(ctx, set, pod); err != nil { + spc.recordPodEvent("update", set, pod, err) + return err + } else if !match { + if err := spc.UpdatePodClaimForRetentionPolicy(ctx, set, pod); err != nil { spc.recordPodEvent("update", set, pod, err) return err - } else if !match { - if err := spc.UpdatePodClaimForRetentionPolicy(ctx, set, pod); err != nil { - spc.recordPodEvent("update", set, pod, err) - return err - } - consistent = false } + consistent = false } // if the Pod is not dirty, do nothing @@ -289,14 +284,14 @@ func (spc *StatefulPodControl) PodClaimIsStale(set *apps.StatefulSet, pod *v1.Po // have a reason of v1.EventTypeNormal. If err is not nil the generated event will have a reason of v1.EventTypeWarning. func (spc *StatefulPodControl) recordPodEvent(verb string, set *apps.StatefulSet, pod *v1.Pod, err error) { if err == nil { - reason := fmt.Sprintf("Successful%s", strings.Title(verb)) + reason := fmt.Sprintf("Successful%s", cases.Title(language.English).String(verb)) message := fmt.Sprintf("%s Pod %s in StatefulSet %s successful", - strings.ToLower(verb), pod.Name, set.Name) + cases.Title(language.English).String(verb), pod.Name, set.Name) spc.recorder.Event(set, v1.EventTypeNormal, reason, message) } else { - reason := fmt.Sprintf("Failed%s", strings.Title(verb)) + reason := fmt.Sprintf("Failed%s", cases.Title(language.English).String(verb)) message := fmt.Sprintf("%s Pod %s in StatefulSet %s failed error: %s", - strings.ToLower(verb), pod.Name, set.Name, err) + cases.Title(language.English).String(verb), pod.Name, set.Name, err) spc.recorder.Event(set, v1.EventTypeWarning, reason, message) } } @@ -306,14 +301,14 @@ func (spc *StatefulPodControl) recordPodEvent(verb string, set *apps.StatefulSet // reason of v1.EventTypeWarning. func (spc *StatefulPodControl) recordClaimEvent(verb string, set *apps.StatefulSet, pod *v1.Pod, claim *v1.PersistentVolumeClaim, err error) { if err == nil { - reason := fmt.Sprintf("Successful%s", strings.Title(verb)) + reason := fmt.Sprintf("Successful%s", cases.Title(language.English).String(verb)) message := fmt.Sprintf("%s Claim %s Pod %s in StatefulSet %s success", - strings.ToLower(verb), claim.Name, pod.Name, set.Name) + cases.Title(language.English).String(verb), claim.Name, pod.Name, set.Name) spc.recorder.Event(set, v1.EventTypeNormal, reason, message) } else { - reason := fmt.Sprintf("Failed%s", strings.Title(verb)) + reason := fmt.Sprintf("Failed%s", cases.Title(language.English).String(verb)) message := fmt.Sprintf("%s Claim %s for Pod %s in StatefulSet %s failed error: %s", - strings.ToLower(verb), claim.Name, pod.Name, set.Name, err) + cases.Title(language.English).String(verb), claim.Name, pod.Name, set.Name, err) spc.recorder.Event(set, v1.EventTypeWarning, reason, message) } } @@ -323,13 +318,10 @@ func (spc *StatefulPodControl) createMissingPersistentVolumeClaims(ctx context.C if err := spc.createPersistentVolumeClaims(set, pod); err != nil { return err } - - if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) { - // Set PVC policy as much as is possible at this point. - if err := spc.UpdatePodClaimForRetentionPolicy(ctx, set, pod); err != nil { - spc.recordPodEvent("update", set, pod, err) - return err - } + // Set PVC policy as much as is possible at this point. + if err := spc.UpdatePodClaimForRetentionPolicy(ctx, set, pod); err != nil { + spc.recordPodEvent("update", set, pod, err) + return err } return nil } diff --git a/pkg/controller/statefulset/stateful_pod_control_test.go b/pkg/controller/statefulset/stateful_pod_control_test.go index 6925b53e4c7d3..27528e77e0f51 100644 --- a/pkg/controller/statefulset/stateful_pod_control_test.go +++ b/pkg/controller/statefulset/stateful_pod_control_test.go @@ -30,18 +30,14 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/version" - utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/kubernetes/fake" corelisters "k8s.io/client-go/listers/core/v1" core "k8s.io/client-go/testing" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" - featuregatetesting "k8s.io/component-base/featuregate/testing" "k8s.io/klog/v2/ktesting" _ "k8s.io/kubernetes/pkg/apis/apps/install" _ "k8s.io/kubernetes/pkg/apis/core/install" - "k8s.io/kubernetes/pkg/features" "k8s.io/utils/ptr" ) @@ -541,81 +537,65 @@ func TestStatefulPodControlClaimsMatchDeletionPolcy(t *testing.T) { func TestStatefulPodControlUpdatePodClaimForRetentionPolicy(t *testing.T) { // All the update conditions are tested exhaustively in stateful_set_utils_test. This // tests the wiring from the pod control to that method. + _, ctx := ktesting.NewTestContext(t) + testCases := []struct { + name string + ownerRef []metav1.OwnerReference + expectRef bool + }{ + { + name: "bare PVC", + expectRef: true, + }, + { + name: "PVC already controller", + ownerRef: []metav1.OwnerReference{{Controller: ptr.To(true), Name: "foobar"}}, + expectRef: false, + }, + } - testFn := func(t *testing.T) { - _, ctx := ktesting.NewTestContext(t) - testCases := []struct { - name string - ownerRef []metav1.OwnerReference - expectRef bool - }{ - { - name: "bare PVC", - expectRef: true, - }, - { - name: "PVC already controller", - ownerRef: []metav1.OwnerReference{{Controller: ptr.To(true), Name: "foobar"}}, - expectRef: false, - }, - } - - for _, tc := range testCases { - fakeClient := &fake.Clientset{} - indexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) - claimLister := corelisters.NewPersistentVolumeClaimLister(indexer) - fakeClient.AddReactor("update", "persistentvolumeclaims", func(action core.Action) (bool, runtime.Object, error) { - update := action.(core.UpdateAction) - if err := indexer.Update(update.GetObject()); err != nil { - t.Fatalf("could not update index: %v", err) - } - return true, update.GetObject(), nil - }) - set := newStatefulSet(3) - set.GetObjectMeta().SetUID("set-123") - pod0 := newStatefulSetPod(set, 0) - claims0 := getPersistentVolumeClaims(set, pod0) - for k := range claims0 { - claim := claims0[k] - if tc.ownerRef != nil { - claim.SetOwnerReferences(tc.ownerRef) - } - if err := indexer.Add(&claim); err != nil { - t.Errorf("Could not add claim %s: %v", k, err) - } + for _, tc := range testCases { + fakeClient := &fake.Clientset{} + indexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) + claimLister := corelisters.NewPersistentVolumeClaimLister(indexer) + fakeClient.AddReactor("update", "persistentvolumeclaims", func(action core.Action) (bool, runtime.Object, error) { + update := action.(core.UpdateAction) + if err := indexer.Update(update.GetObject()); err != nil { + t.Fatalf("could not update index: %v", err) } - control := NewStatefulPodControl(fakeClient, nil, claimLister, &noopRecorder{}) - set.Spec.PersistentVolumeClaimRetentionPolicy = &apps.StatefulSetPersistentVolumeClaimRetentionPolicy{ - WhenDeleted: apps.DeletePersistentVolumeClaimRetentionPolicyType, - WhenScaled: apps.RetainPersistentVolumeClaimRetentionPolicyType, + return true, update.GetObject(), nil + }) + set := newStatefulSet(3) + set.GetObjectMeta().SetUID("set-123") + pod0 := newStatefulSetPod(set, 0) + claims0 := getPersistentVolumeClaims(set, pod0) + for k := range claims0 { + claim := claims0[k] + if tc.ownerRef != nil { + claim.SetOwnerReferences(tc.ownerRef) } - if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) { - if err := control.UpdatePodClaimForRetentionPolicy(ctx, set, pod0); err != nil { - t.Errorf("Unexpected error for UpdatePodClaimForRetentionPolicy (retain), pod0: %v", err) - } + if err := indexer.Add(&claim); err != nil { + t.Errorf("Could not add claim %s: %v", k, err) } - expectRef := tc.expectRef && utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) - for k := range claims0 { - claim, err := claimLister.PersistentVolumeClaims(claims0[k].Namespace).Get(claims0[k].Name) - if err != nil { - t.Errorf("Unexpected error getting Claim %s/%s: %v", claim.Namespace, claim.Name, err) - } - if hasOwnerRef(claim, set) != expectRef { - t.Errorf("%s: Claim %s/%s bad set owner ref", tc.name, claim.Namespace, claim.Name) - } + } + control := NewStatefulPodControl(fakeClient, nil, claimLister, &noopRecorder{}) + set.Spec.PersistentVolumeClaimRetentionPolicy = &apps.StatefulSetPersistentVolumeClaimRetentionPolicy{ + WhenDeleted: apps.DeletePersistentVolumeClaimRetentionPolicyType, + WhenScaled: apps.RetainPersistentVolumeClaimRetentionPolicyType, + } + if err := control.UpdatePodClaimForRetentionPolicy(ctx, set, pod0); err != nil { + t.Errorf("Unexpected error for UpdatePodClaimForRetentionPolicy (retain), pod0: %v", err) + } + for k := range claims0 { + claim, err := claimLister.PersistentVolumeClaims(claims0[k].Namespace).Get(claims0[k].Name) + if err != nil { + t.Errorf("Unexpected error getting Claim %s/%s: %v", claim.Namespace, claim.Name, err) + } + if hasOwnerRef(claim, set) != tc.expectRef { + t.Errorf("%s: Claim %s/%s bad set owner ref", tc.name, claim.Namespace, claim.Name) } } } - t.Run("StatefulSetAutoDeletePVCEnabled", func(t *testing.T) { - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.StatefulSetAutoDeletePVC, true) - testFn(t) - }) - t.Run("StatefulSetAutoDeletePVCDisabled", func(t *testing.T) { - // TODO: this will be removed in 1.35 - featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, utilfeature.DefaultFeatureGate, version.MustParse("1.31")) - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.StatefulSetAutoDeletePVC, false) - testFn(t) - }) } func TestPodClaimIsStale(t *testing.T) { @@ -730,66 +710,48 @@ func TestPodClaimIsStale(t *testing.T) { } func TestStatefulPodControlRetainDeletionPolicyUpdate(t *testing.T) { - testFn := func(t *testing.T) { - _, ctx := ktesting.NewTestContext(t) - recorder := record.NewFakeRecorder(10) - set := newStatefulSet(1) - set.Spec.PersistentVolumeClaimRetentionPolicy = &apps.StatefulSetPersistentVolumeClaimRetentionPolicy{ - WhenDeleted: apps.RetainPersistentVolumeClaimRetentionPolicyType, - WhenScaled: apps.RetainPersistentVolumeClaimRetentionPolicyType, - } - pod := newStatefulSetPod(set, 0) - fakeClient := &fake.Clientset{} - podIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) - podLister := corelisters.NewPodLister(podIndexer) - claimIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) - claimLister := corelisters.NewPersistentVolumeClaimLister(claimIndexer) - if err := podIndexer.Add(pod); err != nil { - t.Errorf("couldn't add %s to index: %v", pod.GetName(), err) - } - claims := getPersistentVolumeClaims(set, pod) - if len(claims) < 1 { - t.Errorf("Unexpected missing PVCs") - } - for k := range claims { - claim := claims[k] - // This ownerRef should be removed in the update. - claim.SetOwnerReferences(addControllerRef(claim.GetOwnerReferences(), set, controllerKind)) - if err := claimIndexer.Add(&claim); err != nil { - t.Errorf("couldn't add %s to index: %v", claim.GetName(), err) - } - } - control := NewStatefulPodControl(fakeClient, podLister, claimLister, recorder) - if err := control.UpdateStatefulPod(ctx, set, pod); err != nil { - t.Errorf("Successful update returned an error: %s", err) - } - for k := range claims { - claim := claims[k] - if hasOwnerRef(&claim, set) { - t.Errorf("ownerRef not removed: %s/%s", claim.Namespace, claim.Name) - } + _, ctx := ktesting.NewTestContext(t) + recorder := record.NewFakeRecorder(10) + set := newStatefulSet(1) + set.Spec.PersistentVolumeClaimRetentionPolicy = &apps.StatefulSetPersistentVolumeClaimRetentionPolicy{ + WhenDeleted: apps.RetainPersistentVolumeClaimRetentionPolicyType, + WhenScaled: apps.RetainPersistentVolumeClaimRetentionPolicyType, + } + pod := newStatefulSetPod(set, 0) + fakeClient := &fake.Clientset{} + podIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) + podLister := corelisters.NewPodLister(podIndexer) + claimIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) + claimLister := corelisters.NewPersistentVolumeClaimLister(claimIndexer) + if err := podIndexer.Add(pod); err != nil { + t.Errorf("couldn't add %s to index: %v", pod.GetName(), err) + } + claims := getPersistentVolumeClaims(set, pod) + if len(claims) < 1 { + t.Errorf("Unexpected missing PVCs") + } + for k := range claims { + claim := claims[k] + // This ownerRef should be removed in the update. + claim.SetOwnerReferences(addControllerRef(claim.GetOwnerReferences(), set, controllerKind)) + if err := claimIndexer.Add(&claim); err != nil { + t.Errorf("couldn't add %s to index: %v", claim.GetName(), err) } - events := collectEvents(recorder.Events) - if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) { - if eventCount := len(events); eventCount != 1 { - t.Errorf("delete failed: got %d events, but want 1", eventCount) - } - } else { - if len(events) != 0 { - t.Errorf("delete failed: expected no events, but got %v", events) - } + } + control := NewStatefulPodControl(fakeClient, podLister, claimLister, recorder) + if err := control.UpdateStatefulPod(ctx, set, pod); err != nil { + t.Errorf("Successful update returned an error: %s", err) + } + for k := range claims { + claim := claims[k] + if hasOwnerRef(&claim, set) { + t.Errorf("ownerRef not removed: %s/%s", claim.Namespace, claim.Name) } } - t.Run("StatefulSetAutoDeletePVCEnabled", func(t *testing.T) { - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.StatefulSetAutoDeletePVC, true) - testFn(t) - }) - t.Run("StatefulSetAutoDeletePVCDisabled", func(t *testing.T) { - // TODO: this will be removed in 1.35 - featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, utilfeature.DefaultFeatureGate, version.MustParse("1.31")) - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.StatefulSetAutoDeletePVC, false) - testFn(t) - }) + events := collectEvents(recorder.Events) + if eventCount := len(events); eventCount != 1 { + t.Errorf("delete failed: got %d events, but want 1", eventCount) + } } func TestStatefulPodControlRetentionPolicyUpdate(t *testing.T) { diff --git a/pkg/controller/statefulset/stateful_set.go b/pkg/controller/statefulset/stateful_set.go index 36e49ca0844d3..5c5022e30ec13 100644 --- a/pkg/controller/statefulset/stateful_set.go +++ b/pkg/controller/statefulset/stateful_set.go @@ -42,6 +42,7 @@ import ( podutil "k8s.io/kubernetes/pkg/api/v1/pod" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/history" + "k8s.io/kubernetes/pkg/controller/statefulset/metrics" "k8s.io/klog/v2" ) @@ -93,6 +94,9 @@ func NewStatefulSetController( logger := klog.FromContext(ctx) eventBroadcaster := record.NewBroadcaster(record.WithContext(ctx)) recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "statefulset-controller"}) + + // Register metrics + metrics.Register() ssc := &StatefulSetController{ kubeClient: kubeClient, control: NewDefaultStatefulSetControl( @@ -169,7 +173,7 @@ func (ssc *StatefulSetController) Run(ctx context.Context, workers int) { logger.Info("Starting stateful set controller") defer logger.Info("Shutting down statefulset controller") - if !cache.WaitForNamedCacheSync("stateful set", ctx.Done(), ssc.podListerSynced, ssc.setListerSynced, ssc.pvcListerSynced, ssc.revListerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, ssc.podListerSynced, ssc.setListerSynced, ssc.pvcListerSynced, ssc.revListerSynced) { return } diff --git a/pkg/controller/statefulset/stateful_set_control.go b/pkg/controller/statefulset/stateful_set_control.go index 7d4f4990ba76c..1460f569fc9bd 100644 --- a/pkg/controller/statefulset/stateful_set_control.go +++ b/pkg/controller/statefulset/stateful_set_control.go @@ -21,14 +21,16 @@ import ( "sort" "sync" + "k8s.io/klog/v2" + apps "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller/history" + "k8s.io/kubernetes/pkg/controller/statefulset/metrics" "k8s.io/kubernetes/pkg/features" ) @@ -386,13 +388,11 @@ func (ssc *defaultStatefulSetControl) processReplica( } // If we find a Pod that has not been created we create the Pod if !isCreated(replicas[i]) { - if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) { - if isStale, err := ssc.podControl.PodClaimIsStale(set, replicas[i]); err != nil { - return true, err - } else if isStale { - // If a pod has a stale PVC, no more work can be done this round. - return true, err - } + if isStale, err := ssc.podControl.PodClaimIsStale(set, replicas[i]); err != nil { + return true, err + } else if isStale { + // If a pod has a stale PVC, no more work can be done this round. + return true, err } if err := ssc.podControl.CreateStatefulPod(ctx, set, replicas[i]); err != nil { return true, err @@ -440,14 +440,10 @@ func (ssc *defaultStatefulSetControl) processReplica( } // Enforce the StatefulSet invariants - retentionMatch := true - if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) { - var err error - retentionMatch, err = ssc.podControl.ClaimsMatchRetentionPolicy(ctx, updateSet, replicas[i]) - // An error is expected if the pod is not yet fully updated, and so return is treated as matching. - if err != nil { - retentionMatch = true - } + retentionMatch, err := ssc.podControl.ClaimsMatchRetentionPolicy(ctx, updateSet, replicas[i]) + // An error is expected if the pod is not yet fully updated, and so return is treated as matching. + if err != nil { + retentionMatch = true } if identityMatches(set, replicas[i]) && storageMatches(set, replicas[i]) && retentionMatch { @@ -623,21 +619,19 @@ func (ssc *defaultStatefulSetControl) updateStatefulSet( } // Fix pod claims for condemned pods, if necessary. - if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) { - fixPodClaim := func(i int) (bool, error) { - if matchPolicy, err := ssc.podControl.ClaimsMatchRetentionPolicy(ctx, updateSet, condemned[i]); err != nil { + fixPodClaim := func(i int) (bool, error) { + if matchPolicy, err := ssc.podControl.ClaimsMatchRetentionPolicy(ctx, updateSet, condemned[i]); err != nil { + return true, err + } else if !matchPolicy { + if err := ssc.podControl.UpdatePodClaimForRetentionPolicy(ctx, updateSet, condemned[i]); err != nil { return true, err - } else if !matchPolicy { - if err := ssc.podControl.UpdatePodClaimForRetentionPolicy(ctx, updateSet, condemned[i]); err != nil { - return true, err - } } - return false, nil - } - if shouldExit, err := runForAll(condemned, fixPodClaim, monotonic); shouldExit || err != nil { - updateStatus(&status, set.Spec.MinReadySeconds, currentRevision, updateRevision, replicas, condemned) - return &status, err } + return false, nil + } + if shouldExit, err := runForAll(condemned, fixPodClaim, monotonic); shouldExit || err != nil { + updateStatus(&status, set.Spec.MinReadySeconds, currentRevision, updateRevision, replicas, condemned) + return &status, err } // At this point, in monotonic mode all of the current Replicas are Running, Ready and Available, @@ -714,7 +708,7 @@ func updateStatefulSetAfterInvariantEstablished( logger := klog.FromContext(ctx) replicaCount := int(*set.Spec.Replicas) - + podManagementPolicy := string(set.Spec.PodManagementPolicy) // we compute the minimum ordinal of the target sequence for a destructive update based on the strategy. updateMin := 0 maxUnavailable := 1 @@ -736,17 +730,23 @@ func updateStatefulSetAfterInvariantEstablished( // (MaxUnavailable - Unavailable) Pods, in order with respect to their ordinal for termination. Delete // those pods and count the successful deletions. Update the status with the correct number of deletions. unavailablePods := 0 + for target := len(replicas) - 1; target >= 0; target-- { if isUnavailable(replicas[target], set.Spec.MinReadySeconds) { unavailablePods++ } } + metrics.UnavailableReplicas.WithLabelValues(set.Namespace, set.Name, podManagementPolicy).Set(float64(unavailablePods)) if unavailablePods >= maxUnavailable { - logger.V(2).Info("StatefulSet found unavailablePods, more than or equal to allowed maxUnavailable", - "statefulSet", klog.KObj(set), - "unavailablePods", unavailablePods, - "maxUnavailable", maxUnavailable) + // log only when a true violation occurs. + if unavailablePods > maxUnavailable { + logger.V(4).Info("StatefulSet found unavailablePods, more than the allowed maxUnavailable", + "statefulSet", klog.KObj(set), + "unavailablePods", unavailablePods, + "maxUnavailable", maxUnavailable) + } + return &status, nil } @@ -757,9 +757,9 @@ func updateStatefulSetAfterInvariantEstablished( deletedPods := 0 for target := len(replicas) - 1; target >= updateMin && deletedPods < podsToDelete; target-- { - // delete the Pod if it is healthy and the revision doesnt match the target + // delete the Pod if it is healthy and the revision does not match the target if getPodRevision(replicas[target]) != updateRevision.Name && !isTerminating(replicas[target]) { - // delete the Pod if it is healthy and the revision doesnt match the target + // delete the Pod if it is healthy and the revision does not match the target logger.V(2).Info("StatefulSet terminating Pod for update", "statefulSet", klog.KObj(set), "pod", klog.KObj(replicas[target])) @@ -785,6 +785,21 @@ func (ssc *defaultStatefulSetControl) updateStatefulSetStatus( // complete any in progress rolling update if necessary completeRollingUpdate(set, status) + if utilfeature.DefaultFeatureGate.Enabled(features.MaxUnavailableStatefulSet) { + // Update metrics - this ensures metrics are always updated regardless of update strategy + podManagementPolicy := string(set.Spec.PodManagementPolicy) + replicaCount := int(*set.Spec.Replicas) + + var err error + maxUnavailable := 1 + if set.Spec.UpdateStrategy.RollingUpdate != nil { + maxUnavailable, err = getStatefulSetMaxUnavailable(set.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable, replicaCount) + if err != nil { + return err + } + } + metrics.MaxUnavailable.WithLabelValues(set.Namespace, set.Name, podManagementPolicy).Set(float64(maxUnavailable)) + } // if the status is not inconsistent do not perform an update if !inconsistentStatus(set, status) { return nil diff --git a/pkg/controller/statefulset/stateful_set_control_test.go b/pkg/controller/statefulset/stateful_set_control_test.go index 897ec9c2976ec..3c881f6df4e3c 100644 --- a/pkg/controller/statefulset/stateful_set_control_test.go +++ b/pkg/controller/statefulset/stateful_set_control_test.go @@ -41,7 +41,6 @@ import ( "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/intstr" - utilversion "k8s.io/apimachinery/pkg/util/version" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/informers" appsinformers "k8s.io/client-go/informers/apps/v1" @@ -51,9 +50,11 @@ import ( corelisters "k8s.io/client-go/listers/core/v1" "k8s.io/client-go/tools/cache" featuregatetesting "k8s.io/component-base/featuregate/testing" + "k8s.io/component-base/metrics/testutil" podutil "k8s.io/kubernetes/pkg/api/v1/pod" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/history" + "k8s.io/kubernetes/pkg/controller/statefulset/metrics" "k8s.io/kubernetes/pkg/features" ) @@ -98,14 +99,7 @@ func setMinReadySeconds(set *apps.StatefulSet, minReadySeconds int32) *apps.Stat } func runTestOverPVCRetentionPolicies(t *testing.T, testName string, testFn func(*testing.T, *apps.StatefulSetPersistentVolumeClaimRetentionPolicy)) { - subtestName := "StatefulSetAutoDeletePVCDisabled" - if testName != "" { - subtestName = fmt.Sprintf("%s/%s", testName, subtestName) - } - t.Run(subtestName, func(t *testing.T) { - // TODO: this will be removed in 1.35 - featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, utilfeature.DefaultFeatureGate, utilversion.MustParse("1.31")) - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.StatefulSetAutoDeletePVC, false) + t.Run(testName, func(t *testing.T) { testFn(t, &apps.StatefulSetPersistentVolumeClaimRetentionPolicy{ WhenScaled: apps.RetainPersistentVolumeClaimRetentionPolicyType, WhenDeleted: apps.RetainPersistentVolumeClaimRetentionPolicyType, @@ -131,7 +125,7 @@ func runTestOverPVCRetentionPolicies(t *testing.T, testName string, testFn func( // tests the case when no policy is set. nil, } { - subtestName := pvcDeletePolicyString(policy) + "/StatefulSetAutoDeletePVCEnabled" + subtestName := pvcDeletePolicyString(policy) if testName != "" { subtestName = fmt.Sprintf("%s/%s", testName, subtestName) } @@ -168,8 +162,7 @@ func TestStatefulSetControl(t *testing.T) { fn func(*testing.T, *apps.StatefulSet, invariantFunc) obj func() *apps.StatefulSet }{ - {CreatesPodsWithPodIndexLabelFeature, simpleSetFn}, - {CreatesPodsWithoutPodIndexLabelFeature, simpleSetFn}, + {CreatePods, simpleSetFn}, {ScalesUp, simpleSetFn}, {ScalesDown, simpleSetFn}, {ReplacesPods, largeSetFn}, @@ -212,20 +205,7 @@ func TestStatefulSetControl(t *testing.T) { } } -func CreatesPodsWithPodIndexLabelFeature(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) { - createPods(t, set, invariants, true) -} - -func CreatesPodsWithoutPodIndexLabelFeature(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) { - createPods(t, set, invariants, false) -} - -func createPods(t *testing.T, set *apps.StatefulSet, invariants invariantFunc, isPodIndexLabelEnabled bool) { - if !isPodIndexLabelEnabled { - // TODO: this will be removed in 1.35 - featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, utilfeature.DefaultFeatureGate, utilversion.MustParse("1.31")) - } - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.PodIndexLabel, isPodIndexLabelEnabled) +func CreatePods(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) { client := fake.NewSimpleClientset(set) om, _, ssc := setupController(client) @@ -260,22 +240,14 @@ func createPods(t *testing.T, set *apps.StatefulSet, invariants invariantFunc, i t.Errorf("Expected 3 pods, got %d", len(pods)) } for _, pod := range pods { - if isPodIndexLabelEnabled { - podIndexFromLabel, exists := pod.Labels[apps.PodIndexLabel] - if !exists { - t.Errorf("Missing pod index label: %s", apps.PodIndexLabel) - continue - } - podIndexFromName := strconv.Itoa(getOrdinal(pod)) - if podIndexFromLabel != podIndexFromName { - t.Errorf("Pod index label value (%s) does not match pod index in pod name (%s)", podIndexFromLabel, podIndexFromName) - } - } else { - _, exists := pod.Labels[apps.PodIndexLabel] - if exists { - t.Errorf("Pod index label should not exist when feature gate is disabled: %s", apps.PodIndexLabel) - continue - } + podIndexFromLabel, exists := pod.Labels[apps.PodIndexLabel] + if !exists { + t.Errorf("Missing pod index label: %s", apps.PodIndexLabel) + continue + } + podIndexFromName := strconv.Itoa(getOrdinal(pod)) + if podIndexFromLabel != podIndexFromName { + t.Errorf("Pod index label value (%s) does not match pod index in pod name (%s)", podIndexFromLabel, podIndexFromName) } } } @@ -403,7 +375,7 @@ func ReplacesPods(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) if err != nil { t.Fatalf("Error getting updated StatefulSet: %v", err) } - if _, err = om.setPodReady(set, i); err != nil { + if _, err = om.setPodReadyCondition(set, i, true); err != nil { t.Error(err) } } @@ -1017,10 +989,9 @@ func TestStatefulSetControlRollingUpdateWithMaxUnavailable(t *testing.T) { t.Fatalf("Expected create pods 4/5, got pods %v", len(pods)) } - // if pod 4 ready, start to update pod 3, even though 5 is not ready + // if pod 4 ready, start to update pod 3. spc.setPodRunning(set, 4) - spc.setPodRunning(set, 5) - originalPods, _ := spc.setPodReady(set, 4) + originalPods, _ := spc.setPodReadyCondition(set, 4, true) sort.Sort(ascendingOrdinal(originalPods)) if _, err := ssc.UpdateStatefulSet(context.TODO(), set, originalPods); err != nil { t.Fatal(err) @@ -1062,9 +1033,9 @@ func TestStatefulSetControlRollingUpdateWithMaxUnavailable(t *testing.T) { t.Fatalf("Expected create pods 5, got pods %v", len(pods)) } spc.setPodRunning(set, 4) - pods, _ = spc.setPodReady(set, 4) + spc.setPodReadyCondition(set, 4, true) - // create new pods 4(only one pod gets created at a time due to OrderedReady) + // create new pod 4 (only one pod gets created at a time due to OrderedReady) if _, err := ssc.UpdateStatefulSet(context.TODO(), set, pods); err != nil { t.Fatal(err) } @@ -1073,37 +1044,9 @@ func TestStatefulSetControlRollingUpdateWithMaxUnavailable(t *testing.T) { t.Fatal(err) } - if len(pods) != totalPods { - t.Fatalf("Expected create pods 4, got pods %v", len(pods)) - } - // if pod 4 ready, start to update pod 3 - spc.setPodRunning(set, 5) - originalPods, _ := spc.setPodReady(set, 5) - sort.Sort(ascendingOrdinal(originalPods)) - if _, err = ssc.UpdateStatefulSet(context.TODO(), set, originalPods); err != nil { - t.Fatal(err) - } - pods, err = spc.podsLister.Pods(set.Namespace).List(selector) - if err != nil { - t.Fatal(err) - } - sort.Sort(ascendingOrdinal(pods)) - - // verify the remaining pods are 0,1,2,4,5 (3 got deleted) - if !reflect.DeepEqual(pods, append(originalPods[:3], originalPods[4:]...)) { - t.Fatalf("Expected pods %v, got pods %v", append(originalPods[:3], originalPods[4:]...), pods) - } - - // create new pod 3 - if _, err = ssc.UpdateStatefulSet(context.TODO(), set, pods); err != nil { - t.Fatal(err) - } - pods, err = spc.podsLister.Pods(set.Namespace).List(selector) - if err != nil { - t.Fatal(err) - } - if len(pods) != totalPods { - t.Fatalf("Expected create pods 2/3, got pods %v", pods) + // In OrderedReady mode, only 4 pods exist at this point (pod 5 not created yet) + if len(pods) != totalPods-1 { + t.Fatalf("Expected create pods %d, got pods %v", totalPods-1, len(pods)) } return pods @@ -1191,8 +1134,8 @@ func TestStatefulSetControlRollingUpdateWithMaxUnavailable(t *testing.T) { // pods 3/4/5 ready, should not update other pods spc.setPodRunning(set, 3) spc.setPodRunning(set, 5) - spc.setPodReady(set, 5) - originalPods, _ = spc.setPodReady(set, 3) + spc.setPodReadyCondition(set, 5, true) + originalPods, _ = spc.setPodReadyCondition(set, 3, true) sort.Sort(ascendingOrdinal(originalPods)) if _, err = ssc.UpdateStatefulSet(context.TODO(), set, originalPods); err != nil { t.Fatal(err) @@ -2690,7 +2633,7 @@ func (om *fakeObjectManager) setPodRunning(set *apps.StatefulSet, ordinal int) ( return om.podsLister.Pods(set.Namespace).List(selector) } -func (om *fakeObjectManager) setPodReady(set *apps.StatefulSet, ordinal int) ([]*v1.Pod, error) { +func (om *fakeObjectManager) setPodReadyCondition(set *apps.StatefulSet, ordinal int, ready bool) ([]*v1.Pod, error) { selector, err := metav1.LabelSelectorAsSelector(set.Spec.Selector) if err != nil { return nil, err @@ -2701,9 +2644,15 @@ func (om *fakeObjectManager) setPodReady(set *apps.StatefulSet, ordinal int) ([] } pod := findPodByOrdinal(pods, ordinal) if pod == nil { - return nil, fmt.Errorf("setPodReady: pod ordinal %d not found", ordinal) + return nil, fmt.Errorf("setPodReadyCondition: pod ordinal %d not found", ordinal) } - condition := v1.PodCondition{Type: v1.PodReady, Status: v1.ConditionTrue} + var condition v1.PodCondition + if ready { + condition = v1.PodCondition{Type: v1.PodReady, Status: v1.ConditionTrue} + } else { + condition = v1.PodCondition{Type: v1.PodReady, Status: v1.ConditionFalse} + } + podutil.UpdatePodCondition(&pod.Status, &condition) fakeResourceVersion(pod) om.podsIndexer.Update(pod) @@ -2929,7 +2878,7 @@ func checkClaimInvarients(set *apps.StatefulSet, pod *v1.Pod, claim *v1.Persiste WhenScaled: apps.RetainPersistentVolumeClaimRetentionPolicyType, WhenDeleted: apps.RetainPersistentVolumeClaimRetentionPolicyType, } - if set.Spec.PersistentVolumeClaimRetentionPolicy != nil && utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) { + if set.Spec.PersistentVolumeClaimRetentionPolicy != nil { policy = *set.Spec.PersistentVolumeClaimRetentionPolicy } claimShouldBeRetained := policy.WhenScaled == apps.RetainPersistentVolumeClaimRetentionPolicyType @@ -3221,7 +3170,7 @@ func scaleUpStatefulSetControl(set *apps.StatefulSet, return err } case v1.PodRunning: - if pods, err = om.setPodReady(set, getOrdinal(pod)); err != nil { + if pods, err = om.setPodReadyCondition(set, getOrdinal(pod), true); err != nil { return err } default: @@ -3417,7 +3366,7 @@ func updateStatefulSetControl(set *apps.StatefulSet, return err } case v1.PodRunning: - if pods, err = om.setPodReady(set, getOrdinal(pod)); err != nil { + if pods, err = om.setPodReadyCondition(set, getOrdinal(pod), true); err != nil { return err } default: @@ -3763,3 +3712,255 @@ func TestStatefulSetPartitionRollingUpdateWithMinReadySeconds(t *testing.T) { t.Errorf("expected 4 pods to still exist (partition update blocked), got %d", len(newPods)) } } + +func TestStatefulSetMetrics(t *testing.T) { + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.MaxUnavailableStatefulSet, true) + metrics.Register() + + type testcase struct { + name string + totalPods int32 + maxUnavailable *intstr.IntOrString + updateStrategy apps.StatefulSetUpdateStrategyType + podManagementPolicy apps.PodManagementPolicyType + unavailablePodCount int + expectedMaxUnavailableValue int + expectedUnavailableReplicasValue int + } + + testFn := func(test *testcase, t *testing.T) { + + // Create StatefulSet + set := newStatefulSet(test.totalPods) + if test.updateStrategy == apps.RollingUpdateStatefulSetStrategyType { + var partition int32 = 0 + set.Spec.UpdateStrategy = apps.StatefulSetUpdateStrategy{ + Type: apps.RollingUpdateStatefulSetStrategyType, + RollingUpdate: &apps.RollingUpdateStatefulSetStrategy{ + Partition: &partition, + MaxUnavailable: test.maxUnavailable, + }, + } + } else { + set.Spec.UpdateStrategy = apps.StatefulSetUpdateStrategy{ + Type: test.updateStrategy, + } + } + set = setupPodManagementPolicy(test.podManagementPolicy, set) + set.Status.CollisionCount = new(int32) + + // Setup controller + client := fake.NewClientset(set) + spc, _, ssc := setupController(client) + + // Scale up StatefulSet + if err := scaleUpStatefulSetControl(set, ssc, spc, assertBurstInvariants); err != nil { + t.Fatal(err) + } + set, err := spc.setsLister.StatefulSets(set.Namespace).Get(set.Name) + if err != nil { + t.Fatal(err) + } + + // Change the image to trigger an update + set.Spec.Template.Spec.Containers[0].Image = "foo" + + // Get selector + selector, err := metav1.LabelSelectorAsSelector(set.Spec.Selector) + if err != nil { + t.Fatal(err) + } + + // Make some pods unavailable + var pods []*v1.Pod + for i := 0; i < test.unavailablePodCount; i++ { + if test.podManagementPolicy == apps.OrderedReadyPodManagement { + _, _ = spc.setPodRunning(set, i) + pods, _ = spc.setPodReadyCondition(set, i, false) + } else { + pods, _ = spc.addTerminatingPod(set, i) + } + } + + // Make remaining pods ready + for i := test.unavailablePodCount; i < int(test.totalPods); i++ { + _, _ = spc.setPodRunning(set, i) + pods, _ = spc.setPodReadyCondition(set, i, true) + } + sort.Sort(ascendingOrdinal(pods)) + + // Update StatefulSet + // Calculate ready replicas based on the test setup + readyReplicas := test.totalPods - int32(test.unavailablePodCount) + status := apps.StatefulSetStatus{ + Replicas: test.totalPods, + ReadyReplicas: readyReplicas, + } + updateRevision := &apps.ControllerRevision{} + _, err = updateStatefulSetAfterInvariantEstablished(context.TODO(), ssc.(*defaultStatefulSetControl), set, pods, updateRevision, status) + if err != nil { + t.Fatal(err) + } + + // Also call updateStatefulSetStatus to ensure metrics are updated + err = ssc.(*defaultStatefulSetControl).updateStatefulSetStatus(context.TODO(), set, &status) + if err != nil { + t.Fatal(err) + } + + // Get updated pods + pods, err = spc.podsLister.Pods(set.Namespace).List(selector) + if err != nil { + t.Fatal(err) + } + sort.Sort(ascendingOrdinal(pods)) + + // Verify metrics + maxUnavailableValue, err := testutil.GetGaugeMetricValue( + metrics.MaxUnavailable.WithLabelValues(set.Namespace, set.Name, string(test.podManagementPolicy))) + if err != nil { + t.Fatal(err) + } + if int(maxUnavailableValue) != test.expectedMaxUnavailableValue { + t.Errorf("Expected MaxUnavailable gauge value %d, got %d", test.expectedMaxUnavailableValue, int(maxUnavailableValue)) + } + + unavailableReplicasValue, err := testutil.GetGaugeMetricValue( + metrics.UnavailableReplicas.WithLabelValues(set.Namespace, set.Name, string(test.podManagementPolicy))) + if err != nil { + t.Fatal(err) + } + if int(unavailableReplicasValue) != test.expectedUnavailableReplicasValue { + t.Errorf("Expected UnavailableReplicas gauge value %d, got %d", test.expectedUnavailableReplicasValue, int(unavailableReplicasValue)) + } + } + + tests := []testcase{ + { + name: "ordered pods within limit", + totalPods: 5, + maxUnavailable: &intstr.IntOrString{Type: intstr.Int, IntVal: 2}, + updateStrategy: apps.RollingUpdateStatefulSetStrategyType, + podManagementPolicy: apps.OrderedReadyPodManagement, + unavailablePodCount: 1, + expectedMaxUnavailableValue: 2, + expectedUnavailableReplicasValue: 1, + }, + { + name: "parallel pods exceeding limit", + totalPods: 10, + maxUnavailable: &intstr.IntOrString{Type: intstr.String, StrVal: "20%"}, + updateStrategy: apps.RollingUpdateStatefulSetStrategyType, + podManagementPolicy: apps.ParallelPodManagement, + unavailablePodCount: 3, // (20% of 10), violation but gauge shows current values + expectedMaxUnavailableValue: 2, + expectedUnavailableReplicasValue: 3, + }, + { + name: "ordered pods exactly at limit", + totalPods: 6, + maxUnavailable: &intstr.IntOrString{Type: intstr.Int, IntVal: 3}, + updateStrategy: apps.RollingUpdateStatefulSetStrategyType, + podManagementPolicy: apps.OrderedReadyPodManagement, + unavailablePodCount: 3, // exactly at limit + expectedMaxUnavailableValue: 3, + expectedUnavailableReplicasValue: 3, + }, + { + name: "parallel pods all available", + totalPods: 4, + maxUnavailable: &intstr.IntOrString{Type: intstr.Int, IntVal: 1}, + updateStrategy: apps.RollingUpdateStatefulSetStrategyType, + podManagementPolicy: apps.ParallelPodManagement, + unavailablePodCount: 0, // all pods available + expectedMaxUnavailableValue: 1, + expectedUnavailableReplicasValue: 0, + }, + { + name: "ordered pods with percentage maxUnavailable", + totalPods: 8, + maxUnavailable: &intstr.IntOrString{Type: intstr.String, StrVal: "25%"}, + updateStrategy: apps.RollingUpdateStatefulSetStrategyType, + podManagementPolicy: apps.OrderedReadyPodManagement, + unavailablePodCount: 1, // (25% of 8), within limit + expectedMaxUnavailableValue: 2, + expectedUnavailableReplicasValue: 1, + }, + { + name: "parallel pods with large percentage", + totalPods: 5, + maxUnavailable: &intstr.IntOrString{Type: intstr.String, StrVal: "80%"}, + updateStrategy: apps.RollingUpdateStatefulSetStrategyType, + podManagementPolicy: apps.ParallelPodManagement, + unavailablePodCount: 4, // (80% of 5), exactly at limit + expectedMaxUnavailableValue: 4, + expectedUnavailableReplicasValue: 4, + }, + { + name: "small statefulset with maxUnavailable 1", + totalPods: 2, + maxUnavailable: &intstr.IntOrString{Type: intstr.Int, IntVal: 1}, + updateStrategy: apps.RollingUpdateStatefulSetStrategyType, + podManagementPolicy: apps.OrderedReadyPodManagement, + unavailablePodCount: 1, // exactly at limit + expectedMaxUnavailableValue: 1, + expectedUnavailableReplicasValue: 1, + }, + { + name: "single pod statefulset", + totalPods: 1, + maxUnavailable: &intstr.IntOrString{Type: intstr.Int, IntVal: 1}, + updateStrategy: apps.RollingUpdateStatefulSetStrategyType, + podManagementPolicy: apps.ParallelPodManagement, + unavailablePodCount: 1, // single pod unavailable + expectedMaxUnavailableValue: 1, + expectedUnavailableReplicasValue: 1, + }, + { + name: "OnDelete strategy defaults to maxUnavailable 1", + totalPods: 3, + maxUnavailable: nil, // OnDelete doesn't use maxUnavailable + updateStrategy: apps.OnDeleteStatefulSetStrategyType, + podManagementPolicy: apps.OrderedReadyPodManagement, + unavailablePodCount: 2, + expectedMaxUnavailableValue: 1, // default value + expectedUnavailableReplicasValue: 2, + }, + { + name: "OnDelete strategy with parallel management", + totalPods: 4, + maxUnavailable: nil, // OnDelete doesn't use maxUnavailable + updateStrategy: apps.OnDeleteStatefulSetStrategyType, + podManagementPolicy: apps.ParallelPodManagement, + unavailablePodCount: 1, + expectedMaxUnavailableValue: 1, + expectedUnavailableReplicasValue: 1, + }, + { + name: "RollingUpdate with nil maxUnavailable defaults to 1", + totalPods: 5, + maxUnavailable: nil, // nil should default to 1 + updateStrategy: apps.RollingUpdateStatefulSetStrategyType, + podManagementPolicy: apps.OrderedReadyPodManagement, + unavailablePodCount: 2, + expectedMaxUnavailableValue: 1, + expectedUnavailableReplicasValue: 2, + }, + { + name: "RollingUpdate with nil maxUnavailable and parallel pods", + totalPods: 6, + maxUnavailable: nil, // nil should default to 1 + updateStrategy: apps.RollingUpdateStatefulSetStrategyType, + podManagementPolicy: apps.ParallelPodManagement, + unavailablePodCount: 0, + expectedMaxUnavailableValue: 1, + expectedUnavailableReplicasValue: 0, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + testFn(&test, t) + }) + } +} diff --git a/pkg/controller/statefulset/stateful_set_test.go b/pkg/controller/statefulset/stateful_set_test.go index 8cd5875251800..f7a2e2ea019e6 100644 --- a/pkg/controller/statefulset/stateful_set_test.go +++ b/pkg/controller/statefulset/stateful_set_test.go @@ -721,7 +721,7 @@ func TestOrphanedPodsWithPVCDeletePolicy(t *testing.T) { } for i := range pods { - if _, err := om.setPodReady(set, i); err != nil { + if _, err := om.setPodReadyCondition(set, i, true); err != nil { t.Errorf("%d: %v", i, err) } if _, err := om.setPodRunning(set, i); err != nil { @@ -980,7 +980,7 @@ func scaleUpStatefulSetControllerBounded(logger klog.Logger, set *apps.StatefulS fakeWorker(ssc) pod = getPodAtOrdinal(pods, ord) prev = *pod - if pods, err = om.setPodReady(set, ord); err != nil { + if pods, err = om.setPodReadyCondition(set, ord, true); err != nil { return err } pod = getPodAtOrdinal(pods, ord) diff --git a/pkg/controller/statefulset/stateful_set_utils.go b/pkg/controller/statefulset/stateful_set_utils.go index 11136d63c7981..27465419bc0d9 100644 --- a/pkg/controller/statefulset/stateful_set_utils.go +++ b/pkg/controller/statefulset/stateful_set_utils.go @@ -29,13 +29,11 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/strategicpatch" - utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/kubernetes/scheme" "k8s.io/klog/v2" podutil "k8s.io/kubernetes/pkg/api/v1/pod" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/history" - "k8s.io/kubernetes/pkg/features" ) var patchCodec = scheme.Codecs.LegacyCodec(apps.SchemeGroupVersion) @@ -451,9 +449,7 @@ func updateIdentity(set *apps.StatefulSet, pod *v1.Pod) { pod.Labels = make(map[string]string) } pod.Labels[apps.StatefulSetPodNameLabel] = pod.Name - if utilfeature.DefaultFeatureGate.Enabled(features.PodIndexLabel) { - pod.Labels[apps.PodIndexLabel] = strconv.Itoa(ordinal) - } + pod.Labels[apps.PodIndexLabel] = strconv.Itoa(ordinal) } // isRunningAndReady returns true if pod is in the PodRunning Phase, if it has a condition of PodReady. diff --git a/pkg/controller/storageversionmigrator/resourceversion.go b/pkg/controller/storageversionmigrator/resourceversion.go index 7ce40ba4113a4..36b8c8e928a90 100644 --- a/pkg/controller/storageversionmigrator/resourceversion.go +++ b/pkg/controller/storageversionmigrator/resourceversion.go @@ -23,6 +23,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/discovery" "k8s.io/client-go/metadata" @@ -46,11 +47,13 @@ const ( ResourceVersionControllerName string = "resource-version-controller" ) +var verbsRequiredForMigration = []string{"update", "patch", "list"} + // ResourceVersionController adds the resource version obtained from a randomly nonexistent namespace // to the SVM status before the migration is initiated. This resource version is utilized for checking // freshness of GC cache before the migration is initiated. type ResourceVersionController struct { - discoveryClient *discovery.DiscoveryClient + discoveryClient discovery.DiscoveryInterface metadataClient metadata.Interface svmListers svmlisters.StorageVersionMigrationLister svmSynced cache.InformerSynced @@ -62,7 +65,7 @@ type ResourceVersionController struct { func NewResourceVersionController( ctx context.Context, kubeClient clientset.Interface, - discoveryClient *discovery.DiscoveryClient, + discoveryClient discovery.DiscoveryInterface, metadataClient metadata.Interface, svmInformer svminformers.StorageVersionMigrationInformer, mapper meta.ResettableRESTMapper, @@ -125,7 +128,7 @@ func (rv *ResourceVersionController) Run(ctx context.Context) { logger.Info("Starting", "controller", ResourceVersionControllerName) defer logger.Info("Shutting down", "controller", ResourceVersionControllerName) - if !cache.WaitForNamedCacheSync(ResourceVersionControllerName, ctx.Done(), rv.svmSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, rv.svmSynced) { return } @@ -195,18 +198,18 @@ func (rv *ResourceVersionController) sync(ctx context.Context, key string) error return err } if !exists { - _, err = rv.kubeClient.StoragemigrationV1alpha1(). - StorageVersionMigrations(). - UpdateStatus( - ctx, - setStatusConditions(toBeProcessedSVM, svmv1alpha1.MigrationFailed, migrationFailedStatusReason, "resource does not exist in discovery"), - metav1.UpdateOptions{}, - ) - if err != nil { - return err - } + return rv.failMigration(ctx, toBeProcessedSVM, "resource does not exist in discovery") + } - return nil + isMigratable, err := rv.isResourceMigratable(gvr) + if err != nil { + return err + } + + if !isMigratable { + err := fmt.Errorf("resource %q does not support discovery operations: %v", gvr.String(), verbsRequiredForMigration) + logger.Error(err, "resource is not able to be migrated, not retrying", "gvr", gvr.String()) + return rv.failMigration(ctx, toBeProcessedSVM, err.Error()) } toBeProcessedSVM.Status.ResourceVersion, err = rv.getLatestResourceVersion(gvr, ctx) @@ -284,3 +287,46 @@ func (rv *ResourceVersionController) isResourceNamespaceScoped(gvr schema.GroupV return false, fmt.Errorf("resource %q not found", gvr.String()) } + +// isResourceMigratable checks if the GVR has the list of verbs required for +// migration. Returns true if all verbs are in the discovery document and false +// otherwise. If there is an error querying the discovery client or we fail to +// get the GVR, return an error. +func (rv *ResourceVersionController) isResourceMigratable(gvr schema.GroupVersionResource) (bool, error) { + resourceList, err := rv.discoveryClient.ServerResourcesForGroupVersion(gvr.GroupVersion().String()) + if apierrors.IsNotFound(err) { + return false, nil + } + + if resourceList != nil { + // even in case of an error above there might be a partial list for APIs that + // were already successfully discovered. + for _, resource := range resourceList.APIResources { + if resource.Name == gvr.Resource { + if resource.Verbs != nil && sets.NewString(resource.Verbs...).HasAll(verbsRequiredForMigration...) { + return true, nil + } + return false, nil + } + } + } + + if err != nil { + return false, err + } + return false, fmt.Errorf("resource %q not found in discovery", gvr.String()) +} + +func (rv *ResourceVersionController) failMigration(ctx context.Context, svm *svmv1alpha1.StorageVersionMigration, message string) error { + _, err := rv.kubeClient.StoragemigrationV1alpha1(). + StorageVersionMigrations(). + UpdateStatus( + ctx, + setStatusConditions(svm, svmv1alpha1.MigrationFailed, migrationFailedStatusReason, message), + metav1.UpdateOptions{}, + ) + if err != nil { + return err + } + return nil +} diff --git a/pkg/controller/storageversionmigrator/resourceversion_test.go b/pkg/controller/storageversionmigrator/resourceversion_test.go new file mode 100644 index 0000000000000..417f2bc9117e5 --- /dev/null +++ b/pkg/controller/storageversionmigrator/resourceversion_test.go @@ -0,0 +1,184 @@ +/* +Copyright 2025 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 storageversionmigrator + +import ( + "net/http" + "net/http/httptest" + "strings" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + fakediscovery "k8s.io/client-go/discovery/fake" + kubetesting "k8s.io/client-go/testing" +) + +func TestIsResourceMigratable(t *testing.T) { + tcs := []struct { + name string + resources []*metav1.APIResourceList + resource schema.GroupVersionResource + want bool + wantErr string + }{ + { + name: "migratable resource", + resources: []*metav1.APIResourceList{ + { + GroupVersion: "v1", + APIResources: []metav1.APIResource{ + {Name: "pods", Namespaced: true, Kind: "Pod", Verbs: []string{"get", "list", "watch", "create", "update", "patch", "delete"}}, + {Name: "events", Namespaced: true, Kind: "Event", Verbs: []string{"get", "list", "watch", "create", "delete"}}, + {Name: "configmaps", Namespaced: true, Kind: "Event", Verbs: []string{"get", "watch", "create", "delete", "update", "patch", "delete"}}, + }, + }, + }, + resource: schema.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"}, + want: true, + }, + { + name: "non-updatable resource", + resources: []*metav1.APIResourceList{ + { + GroupVersion: "v1", + APIResources: []metav1.APIResource{ + {Name: "pods", Namespaced: true, Kind: "Pod", Verbs: []string{"get", "list", "watch", "create", "update", "patch", "delete"}}, + {Name: "events", Namespaced: true, Kind: "Event", Verbs: []string{"get", "list", "watch", "create", "delete"}}, + {Name: "configmaps", Namespaced: true, Kind: "Event", Verbs: []string{"get", "watch", "create", "delete", "update", "patch", "delete"}}, + }, + }, + }, + resource: schema.GroupVersionResource{Group: "", Version: "v1", Resource: "events"}, + want: false, + }, + { + name: "non-patchable resource", + resources: []*metav1.APIResourceList{ + { + GroupVersion: "v1", + APIResources: []metav1.APIResource{ + {Name: "pods", Namespaced: true, Kind: "Pod", Verbs: []string{"get", "list", "watch", "create", "update", "patch", "delete"}}, + {Name: "events", Namespaced: true, Kind: "Event", Verbs: []string{"get", "list", "watch", "create", "delete"}}, + {Name: "configmaps", Namespaced: true, Kind: "Configmap", Verbs: []string{"get", "watch", "create", "delete", "update", "patch", "delete"}}, + {Name: "secrets", Namespaced: true, Kind: "Secret", Verbs: []string{"get", "watch", "create", "delete", "update", "delete"}}, + }, + }, + }, + resource: schema.GroupVersionResource{Group: "", Version: "v1", Resource: "secrets"}, + want: false, + }, + { + name: "non-listable resource", + resources: []*metav1.APIResourceList{ + { + GroupVersion: "v1", + APIResources: []metav1.APIResource{ + {Name: "pods", Namespaced: true, Kind: "Pod", Verbs: []string{"get", "list", "watch", "create", "update", "patch", "delete"}}, + {Name: "events", Namespaced: true, Kind: "Event", Verbs: []string{"get", "list", "watch", "create", "delete"}}, + {Name: "configmaps", Namespaced: true, Kind: "Event", Verbs: []string{"get", "watch", "create", "delete", "update", "patch", "delete"}}, + }, + }, + }, + resource: schema.GroupVersionResource{Group: "", Version: "v1", Resource: "configmaps"}, + want: false, + }, + { + name: "unknown resource", + resources: []*metav1.APIResourceList{ + { + GroupVersion: "v1", + APIResources: []metav1.APIResource{ + {Name: "pods", Namespaced: true, Kind: "Pod", Verbs: []string{"get", "list", "watch", "create", "update", "patch", "delete"}}, + {Name: "events", Namespaced: true, Kind: "Event", Verbs: []string{"get", "list", "watch", "create", "delete"}}, + {Name: "configmaps", Namespaced: true, Kind: "Configmap", Verbs: []string{"get", "watch", "create", "delete", "update", "patch", "delete"}}, + }, + }, + }, + resource: schema.GroupVersionResource{Group: "", Version: "v1", Resource: "foo"}, + wantErr: "resource \"/v1, Resource=foo\" not found in discovery", + }, + { + name: "multiple versions", + resources: []*metav1.APIResourceList{ + { + GroupVersion: "v1", + APIResources: []metav1.APIResource{ + {Name: "foo", Namespaced: true, Kind: "Pod", Verbs: []string{"get", "list", "watch", "create", "update", "patch", "delete"}}, + }, + }, + { + GroupVersion: "v1alpha1", + APIResources: []metav1.APIResource{ + {Name: "foo", Namespaced: true, Kind: "Pod", Verbs: []string{"get", "watch", "create", "update", "patch", "delete"}}, + }, + }, + }, + resource: schema.GroupVersionResource{Group: "", Version: "v1alpha", Resource: "foo"}, + want: false, + }, + { + name: "multiple versions and groups", + resources: []*metav1.APIResourceList{ + { + GroupVersion: "v1", + APIResources: []metav1.APIResource{ + {Name: "foo", Namespaced: true, Kind: "Foo", Verbs: []string{"get", "list", "watch", "create", "update", "patch", "delete"}}, + }, + }, + { + GroupVersion: "v1alpha1", + APIResources: []metav1.APIResource{ + {Name: "foo", Namespaced: true, Kind: "Foo", Verbs: []string{"get", "list", "watch", "create", "update", "patch", "delete"}}, + }, + }, + { + GroupVersion: "bar/v1alpha1", + APIResources: []metav1.APIResource{ + {Name: "foo", Namespaced: true, Kind: "Foo", Group: "bar", Verbs: []string{"get", "watch", "create", "update", "patch", "delete"}}, + }, + }, + }, + resource: schema.GroupVersionResource{Group: "bar", Version: "v1alpha1", Resource: "foo"}, + want: false, + }, + } + + for _, tc := range tcs { + t.Run(tc.name, func(t *testing.T) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {})) + defer server.Close() + discoveryClient := fakediscovery.FakeDiscovery{Fake: &kubetesting.Fake{}} + discoveryClient.Resources = tc.resources + rvController := ResourceVersionController{ + discoveryClient: &discoveryClient, + } + + isMigratable, err := rvController.isResourceMigratable(tc.resource) + if err != nil { + if !strings.Contains(err.Error(), tc.wantErr) { + t.Errorf("Unexpected error: %v, want: %v", err, tc.wantErr) + } + return + } + if isMigratable != tc.want { + t.Errorf("Expected %v, got %v", tc.want, isMigratable) + } + }) + } + +} diff --git a/pkg/controller/storageversionmigrator/storageversionmigrator.go b/pkg/controller/storageversionmigrator/storageversionmigrator.go index e90653751d7d5..069f0cbc2a967 100644 --- a/pkg/controller/storageversionmigrator/storageversionmigrator.go +++ b/pkg/controller/storageversionmigrator/storageversionmigrator.go @@ -132,7 +132,7 @@ func (svmc *SVMController) Run(ctx context.Context) { logger.Info("Starting", "controller", svmc.controllerName) defer logger.Info("Shutting down", "controller", svmc.controllerName) - if !cache.WaitForNamedCacheSync(svmc.controllerName, ctx.Done(), svmc.svmSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, svmc.svmSynced) { return } diff --git a/pkg/controller/tainteviction/taint_eviction.go b/pkg/controller/tainteviction/taint_eviction.go index 4e505c06ffe46..c4a24e14b2ebf 100644 --- a/pkg/controller/tainteviction/taint_eviction.go +++ b/pkg/controller/tainteviction/taint_eviction.go @@ -296,7 +296,7 @@ func (tc *Controller) Run(ctx context.Context) { defer tc.podUpdateQueue.ShutDown() // wait for the cache to be synced - if !cache.WaitForNamedCacheSync(tc.name, ctx.Done(), tc.podListerSynced, tc.nodeListerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, tc.podListerSynced, tc.nodeListerSynced) { return } diff --git a/pkg/controller/ttl/ttl_controller.go b/pkg/controller/ttl/ttl_controller.go index c85758bcf6820..5991e541a149a 100644 --- a/pkg/controller/ttl/ttl_controller.go +++ b/pkg/controller/ttl/ttl_controller.go @@ -127,7 +127,7 @@ func (ttlc *Controller) Run(ctx context.Context, workers int) { logger.Info("Starting TTL controller") defer logger.Info("Shutting down TTL controller") - if !cache.WaitForNamedCacheSync("TTL", ctx.Done(), ttlc.hasSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, ttlc.hasSynced) { return } diff --git a/pkg/controller/ttlafterfinished/ttlafterfinished_controller.go b/pkg/controller/ttlafterfinished/ttlafterfinished_controller.go index 0ca68cb6e0b13..5eb9fa2935efd 100644 --- a/pkg/controller/ttlafterfinished/ttlafterfinished_controller.go +++ b/pkg/controller/ttlafterfinished/ttlafterfinished_controller.go @@ -112,7 +112,7 @@ func (tc *Controller) Run(ctx context.Context, workers int) { logger.Info("Starting TTL after finished controller") defer logger.Info("Shutting down TTL after finished controller") - if !cache.WaitForNamedCacheSync("TTL after finished", ctx.Done(), tc.jListerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, tc.jListerSynced) { return } diff --git a/pkg/controller/validatingadmissionpolicystatus/controller.go b/pkg/controller/validatingadmissionpolicystatus/controller.go index 4e9bf280c387b..6a8a048b3f771 100644 --- a/pkg/controller/validatingadmissionpolicystatus/controller.go +++ b/pkg/controller/validatingadmissionpolicystatus/controller.go @@ -54,7 +54,7 @@ type Controller struct { func (c *Controller) Run(ctx context.Context, workers int) { defer utilruntime.HandleCrash() - if !cache.WaitForNamedCacheSync(ControllerName, ctx.Done(), c.policySynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.policySynced) { return } diff --git a/pkg/controller/volume/attachdetach/attach_detach_controller.go b/pkg/controller/volume/attachdetach/attach_detach_controller.go index 1c98c6159c967..67a752badc601 100644 --- a/pkg/controller/volume/attachdetach/attach_detach_controller.go +++ b/pkg/controller/volume/attachdetach/attach_detach_controller.go @@ -338,7 +338,7 @@ func (adc *attachDetachController) Run(ctx context.Context) { synced := []kcache.InformerSynced{adc.podsSynced, adc.nodesSynced, adc.pvcsSynced, adc.pvsSynced, adc.csiNodeSynced, adc.csiDriversSynced, adc.volumeAttachmentSynced} - if !kcache.WaitForNamedCacheSync("attach detach", ctx.Done(), synced...) { + if !kcache.WaitForNamedCacheSyncWithContext(ctx, synced...) { return } diff --git a/pkg/controller/volume/attachdetach/attach_detach_controller_test.go b/pkg/controller/volume/attachdetach/attach_detach_controller_test.go index 52ff5348125d1..0567c0ca63510 100644 --- a/pkg/controller/volume/attachdetach/attach_detach_controller_test.go +++ b/pkg/controller/volume/attachdetach/attach_detach_controller_test.go @@ -344,7 +344,7 @@ func attachDetachRecoveryTestCase(t *testing.T, extraPods1 []*v1.Pod, extraPods2 informerFactory.Start(tCtx.Done()) - if !kcache.WaitForNamedCacheSync("attach detach", tCtx.Done(), + if !kcache.WaitForNamedCacheSyncWithContext(tCtx, informerFactory.Core().V1().Pods().Informer().HasSynced, informerFactory.Core().V1().Nodes().Informer().HasSynced, informerFactory.Storage().V1().CSINodes().Informer().HasSynced) { @@ -622,7 +622,7 @@ func volumeAttachmentRecoveryTestCase(t *testing.T, tc vaTest) { // Makesure the informer cache is synced informerFactory.Start(tCtx.Done()) - if !kcache.WaitForNamedCacheSync("attach detach", tCtx.Done(), + if !kcache.WaitForNamedCacheSyncWithContext(tCtx, informerFactory.Core().V1().Pods().Informer().HasSynced, informerFactory.Core().V1().Nodes().Informer().HasSynced, informerFactory.Core().V1().PersistentVolumes().Informer().HasSynced, diff --git a/pkg/controller/volume/attachdetach/reconciler/reconciler.go b/pkg/controller/volume/attachdetach/reconciler/reconciler.go index c5090957f36bc..b79ad1c7f362e 100644 --- a/pkg/controller/volume/attachdetach/reconciler/reconciler.go +++ b/pkg/controller/volume/attachdetach/reconciler/reconciler.go @@ -222,11 +222,11 @@ func (rc *reconciler) reconcile(ctx context.Context) { // Force detach volumes from unhealthy nodes after maxWaitForUnmountDuration if force detach is enabled // Ensure that the timeout condition checks this correctly so that the correct metric is updated below - forceDetatchTimeoutExpired := maxWaitForUnmountDurationExpired && !rc.disableForceDetachOnTimeout + forceDetachTimeoutExpired := maxWaitForUnmountDurationExpired && !rc.disableForceDetachOnTimeout if maxWaitForUnmountDurationExpired && rc.disableForceDetachOnTimeout { logger.V(5).Info("Drain timeout expired for volume but disableForceDetachOnTimeout was set", "node", klog.KRef("", string(attachedVolume.NodeName)), "volumeName", attachedVolume.VolumeName) } - forceDetach := !isHealthy && forceDetatchTimeoutExpired + forceDetach := !isHealthy && forceDetachTimeoutExpired hasOutOfServiceTaint, err := rc.hasOutOfServiceTaint(attachedVolume.NodeName) if err != nil { @@ -266,19 +266,19 @@ func (rc *reconciler) reconcile(ctx context.Context) { } // Trigger detach volume which requires verifying safe to detach step - // If forceDetatchTimeoutExpired is true, skip verifySafeToDetach check + // If forceDetachTimeoutExpired is true, skip verifySafeToDetach check // If the node has node.kubernetes.io/out-of-service taint with NoExecute effect, skip verifySafeToDetach check logger.V(5).Info("Starting attacherDetacher.DetachVolume", "node", klog.KRef("", string(attachedVolume.NodeName)), "volumeName", attachedVolume.VolumeName) if hasOutOfServiceTaint { logger.V(4).Info("node has out-of-service taint", "node", klog.KRef("", string(attachedVolume.NodeName))) } - verifySafeToDetach := !(forceDetatchTimeoutExpired || hasOutOfServiceTaint) + verifySafeToDetach := !forceDetachTimeoutExpired && !hasOutOfServiceTaint err = rc.attacherDetacher.DetachVolume(logger, attachedVolume.AttachedVolume, verifySafeToDetach, rc.actualStateOfWorld) if err == nil { if verifySafeToDetach { // normal detach logger.Info("attacherDetacher.DetachVolume started", "node", klog.KRef("", string(attachedVolume.NodeName)), "volumeName", attachedVolume.VolumeName) } else { // force detach - if forceDetatchTimeoutExpired { + if forceDetachTimeoutExpired { metrics.RecordForcedDetachMetric(metrics.ForceDetachReasonTimeout) logger.Info("attacherDetacher.DetachVolume started: this volume is not safe to detach, but maxWaitForUnmountDuration expired, force detaching", "duration", rc.maxWaitForUnmountDuration, diff --git a/pkg/controller/volume/ephemeral/controller.go b/pkg/controller/volume/ephemeral/controller.go index c4ff709dd3cb1..f2e9a715f0314 100644 --- a/pkg/controller/volume/ephemeral/controller.go +++ b/pkg/controller/volume/ephemeral/controller.go @@ -173,7 +173,7 @@ func (ec *ephemeralController) Run(ctx context.Context, workers int) { logger.Info("Starting ephemeral volume controller") defer logger.Info("Shutting down ephemeral volume controller") - if !cache.WaitForNamedCacheSync("ephemeral", ctx.Done(), ec.podSynced, ec.pvcsSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, ec.podSynced, ec.pvcsSynced) { return } diff --git a/pkg/controller/volume/expand/expand_controller.go b/pkg/controller/volume/expand/expand_controller.go index d3c85747abcf9..b7044d1af2b04 100644 --- a/pkg/controller/volume/expand/expand_controller.go +++ b/pkg/controller/volume/expand/expand_controller.go @@ -327,7 +327,7 @@ func (expc *expandController) Run(ctx context.Context) { logger.Info("Starting expand controller") defer logger.Info("Shutting down expand controller") - if !cache.WaitForNamedCacheSync("expand", ctx.Done(), expc.pvcsSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, expc.pvcsSynced) { return } diff --git a/pkg/controller/volume/persistentvolume/pv_controller_base.go b/pkg/controller/volume/persistentvolume/pv_controller_base.go index 87620399096b1..d4a2522b9b448 100644 --- a/pkg/controller/volume/persistentvolume/pv_controller_base.go +++ b/pkg/controller/volume/persistentvolume/pv_controller_base.go @@ -308,7 +308,7 @@ func (ctrl *PersistentVolumeController) Run(ctx context.Context) { logger.Info("Starting persistent volume controller") defer logger.Info("Shutting down persistent volume controller") - if !cache.WaitForNamedCacheSync("persistent volume", ctx.Done(), ctrl.volumeListerSynced, ctrl.claimListerSynced, ctrl.classListerSynced, ctrl.podListerSynced, ctrl.NodeListerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, ctrl.volumeListerSynced, ctrl.claimListerSynced, ctrl.classListerSynced, ctrl.podListerSynced, ctrl.NodeListerSynced) { return } diff --git a/pkg/controller/volume/pvcprotection/pvc_protection_controller.go b/pkg/controller/volume/pvcprotection/pvc_protection_controller.go index 005a15d4b5128..331fe546efa36 100644 --- a/pkg/controller/volume/pvcprotection/pvc_protection_controller.go +++ b/pkg/controller/volume/pvcprotection/pvc_protection_controller.go @@ -168,7 +168,7 @@ func (c *Controller) Run(ctx context.Context, workers int) { logger.Info("Starting PVC protection controller") defer logger.Info("Shutting down PVC protection controller") - if !cache.WaitForNamedCacheSync("PVC protection", ctx.Done(), c.pvcListerSynced, c.podListerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.pvcListerSynced, c.podListerSynced) { return } diff --git a/pkg/controller/volume/pvprotection/pv_protection_controller.go b/pkg/controller/volume/pvprotection/pv_protection_controller.go index 8f29f383f9c2e..48757b1552abd 100644 --- a/pkg/controller/volume/pvprotection/pv_protection_controller.go +++ b/pkg/controller/volume/pvprotection/pv_protection_controller.go @@ -81,7 +81,7 @@ func (c *Controller) Run(ctx context.Context, workers int) { logger.Info("Starting PV protection controller") defer logger.Info("Shutting down PV protection controller") - if !cache.WaitForNamedCacheSync("PV protection", ctx.Done(), c.pvListerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.pvListerSynced) { return } diff --git a/pkg/controller/volume/selinuxwarning/cache/volumecache_test.go b/pkg/controller/volume/selinuxwarning/cache/volumecache_test.go index f951a082b2ecb..5bba301b6920a 100644 --- a/pkg/controller/volume/selinuxwarning/cache/volumecache_test.go +++ b/pkg/controller/volume/selinuxwarning/cache/volumecache_test.go @@ -345,7 +345,7 @@ func TestVolumeCache_AddVolumeSendConflicts(t *testing.T) { expectedConflicts: []Conflict{}, }, { - name: "existing volume in a new pod with existing policy and new incomparable label (missing categories)", + name: "existing volume in a new pod with existing policy and new comparable label (missing categories)", initialPods: existingPods, podToAdd: podWithVolume{ podNamespace: "testns", @@ -354,7 +354,16 @@ func TestVolumeCache_AddVolumeSendConflicts(t *testing.T) { label: "system_u:system_r:label7", changePolicy: v1.SELinuxChangePolicyMountOption, }, - expectedConflicts: []Conflict{}, + expectedConflicts: []Conflict{ + { + PropertyName: "SELinuxLabel", + EventReason: "SELinuxLabelConflict", + Pod: cache.ObjectName{Namespace: "testns", Name: "testpod"}, + PropertyValue: "system_u:system_r:label7", + OtherPod: cache.ObjectName{Namespace: "ns7", Name: "pod7"}, + OtherPropertyValue: "::label7:c0,c1", + }, + }, }, { name: "existing volume in a new pod with existing policy and new incomparable label (missing everything)", @@ -368,6 +377,27 @@ func TestVolumeCache_AddVolumeSendConflicts(t *testing.T) { }, expectedConflicts: []Conflict{}, }, + { + name: "existing volume in a new pod with existing policy and new comparable label (missing everything but categories)", + initialPods: existingPods, + podToAdd: podWithVolume{ + podNamespace: "testns", + podName: "testpod", + volumeName: "vol8", + label: "system_u:system_r:label8:c0,c1", + changePolicy: v1.SELinuxChangePolicyMountOption, + }, + expectedConflicts: []Conflict{ + { + PropertyName: "SELinuxLabel", + EventReason: "SELinuxLabelConflict", + Pod: cache.ObjectName{Namespace: "testns", Name: "testpod"}, + PropertyValue: "system_u:system_r:label8:c0,c1", + OtherPod: cache.ObjectName{Namespace: "ns8", Name: "pod8"}, + OtherPropertyValue: "", + }, + }, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/pkg/controller/volume/selinuxwarning/selinux_warning_controller.go b/pkg/controller/volume/selinuxwarning/selinux_warning_controller.go index e5049e05abc39..560579ec46362 100644 --- a/pkg/controller/volume/selinuxwarning/selinux_warning_controller.go +++ b/pkg/controller/volume/selinuxwarning/selinux_warning_controller.go @@ -352,7 +352,7 @@ func (c *Controller) Run(ctx context.Context, workers int) { c.eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: c.kubeClient.CoreV1().Events("")}) defer c.eventBroadcaster.Shutdown() - if !cache.WaitForNamedCacheSync("selinux_warning", ctx.Done(), c.podsSynced, c.pvcsSynced, c.pvsSynced, c.csiDriversSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.podsSynced, c.pvcsSynced, c.pvsSynced, c.csiDriversSynced) { return } diff --git a/pkg/controller/volume/selinuxwarning/translator/selinux_translator.go b/pkg/controller/volume/selinuxwarning/translator/selinux_translator.go index 88743ef2aed2a..99ce3e97dd7ca 100644 --- a/pkg/controller/volume/selinuxwarning/translator/selinux_translator.go +++ b/pkg/controller/volume/selinuxwarning/translator/selinux_translator.go @@ -60,12 +60,15 @@ func (c *ControllerSELinuxTranslator) SELinuxOptionsToFileLabel(opts *v1.SELinux // Conflicts returns true if two SELinux labels conflict. // These labels must be generated by SELinuxOptionsToFileLabel above // (the function expects strict nr. of elements in the labels). -// Since this translator cannot default missing components, -// the missing components are treated as incomparable and they do not -// conflict with anything. +// Since this translator cannot default missing label components from the operating system, +// the first three components can be empty. In this case, the empty components don't lead to a +// conflict when compared to a real SELinux label and this function returns false (as no +// conflict can be detected). +// The last component (level) is always compared, as it is not defaulted by the operating system. // Example: "system_u:system_r:container_t:s0:c1,c2" *does not* conflict with ":::s0:c1,c2", -// because the node that will run such a Pod may expand "":::s0:c1,c2" to "system_u:system_r:container_t:s0:c1,c2". -// However, "system_u:system_r:container_t:s0:c1,c2" *does* conflict with ":::s0:c98,c99". +// because the node that will run such a Pod may expand ":::s0:c1,c2" to "system_u:system_r:container_t:s0:c1,c2". +// However: "system_u:system_r:container_t:s0:c1,c2" *does* conflict with ":::s0:c98,c99". +// And ":::s0:c1,c2" *does* conflict with "" or ":::", because it's never defaulted by the OS. func (c *ControllerSELinuxTranslator) Conflicts(labelA, labelB string) bool { partsA := strings.SplitN(labelA, ":", 4) partsB := strings.SplitN(labelB, ":", 4) @@ -82,16 +85,20 @@ func (c *ControllerSELinuxTranslator) Conflicts(labelA, labelB string) bool { if partsA[i] == partsB[i] { continue } + if i == 3 { + // The last component must always match + return true + } + // i<3, empty parts are incomparable if partsA[i] == "" { - // incomparable part, no conflict continue } if partsB[i] == "" { - // incomparable part, no conflict continue } // Parts are not equal and neither of them is "" -> conflict return true } + return false } diff --git a/pkg/controller/volume/selinuxwarning/translator/selinux_translator_test.go b/pkg/controller/volume/selinuxwarning/translator/selinux_translator_test.go index 5aab3e401555b..5d5d83efe3bb8 100644 --- a/pkg/controller/volume/selinuxwarning/translator/selinux_translator_test.go +++ b/pkg/controller/volume/selinuxwarning/translator/selinux_translator_test.go @@ -93,26 +93,32 @@ func TestLabelsConflict(t *testing.T) { conflict: false, }, { - name: "empty string don't conflict with anything", + name: "empty strings don't conflict with anything except the level", a: "", b: "system_u:system_r:container_t", conflict: false, }, + { + name: "empty string conflicts with level", + a: "", + b: "system_u:system_r:container_t:s0:c1,c2", + conflict: true, + }, { name: "empty parts don't conflict with anything", - a: ":::::::::::::", + a: ":::", b: "system_u:system_r:container_t", conflict: false, }, { name: "different lengths don't conflict if the common parts are the same", - a: "system_u:system_r:container_t:c0,c2", - b: "system_u:system_r:container_t", + a: "system_u:system_r:container_t:", + b: "system_u:system_r", conflict: false, }, { name: "different lengths conflict if the common parts differ", - a: "system_u:system_r:conflict_t:c0,c2", + a: "system_u:system_r:conflict_t:", b: "system_u:system_r:container_t", conflict: true, }, @@ -125,9 +131,15 @@ func TestLabelsConflict(t *testing.T) { { name: "non-conflicting empty parts", a: "system_u::container_t", - b: ":system_r::c0,c2", + b: ":system_r::", conflict: false, }, + { + name: "empty level conflicts with non-empty level", + a: ":::s0:c1,c2", + b: "", + conflict: true, + }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { diff --git a/pkg/controller/volume/vacprotection/vac_protection_controller.go b/pkg/controller/volume/vacprotection/vac_protection_controller.go index 51b082571b90d..4d394780e22ab 100644 --- a/pkg/controller/volume/vacprotection/vac_protection_controller.go +++ b/pkg/controller/volume/vacprotection/vac_protection_controller.go @@ -206,7 +206,7 @@ func (c *Controller) Run(ctx context.Context, workers int) { logger.Info("Starting VAC protection controller") defer logger.Info("Shutting down VAC protection controller") - if !cache.WaitForNamedCacheSync("VAC protection", ctx.Done(), c.pvSynced, c.pvcSynced, c.vacSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.pvSynced, c.pvcSynced, c.vacSynced) { return } diff --git a/pkg/controlplane/apiserver/config.go b/pkg/controlplane/apiserver/config.go index b81cb296876fc..b9204103c5c39 100644 --- a/pkg/controlplane/apiserver/config.go +++ b/pkg/controlplane/apiserver/config.go @@ -40,6 +40,7 @@ import ( "k8s.io/apiserver/pkg/server/egressselector" "k8s.io/apiserver/pkg/server/filters" serverstorage "k8s.io/apiserver/pkg/server/storage" + "k8s.io/apiserver/pkg/util/compatibility" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/apiserver/pkg/util/openapi" utilpeerproxy "k8s.io/apiserver/pkg/util/peerproxy" @@ -47,9 +48,9 @@ import ( clientgoinformers "k8s.io/client-go/informers" clientgoclientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/util/keyutil" + basecompatibility "k8s.io/component-base/compatibility" aggregatorapiserver "k8s.io/kube-aggregator/pkg/apiserver" openapicommon "k8s.io/kube-openapi/pkg/common" - "k8s.io/kubernetes/pkg/api/legacyscheme" controlplaneadmission "k8s.io/kubernetes/pkg/controlplane/apiserver/admission" "k8s.io/kubernetes/pkg/controlplane/apiserver/options" @@ -379,6 +380,7 @@ func CreateConfig( clientgoExternalClient, dynamicExternalClient, utilfeature.DefaultFeatureGate, + compatibility.DefaultComponentGlobalsRegistry.EffectiveVersionFor(basecompatibility.DefaultKubeComponent), append(genericInitializers, additionalInitializers...)..., ) if err != nil { diff --git a/pkg/controlplane/apiserver/server.go b/pkg/controlplane/apiserver/server.go index 26bf8c1210f17..02057ba0f0d9b 100644 --- a/pkg/controlplane/apiserver/server.go +++ b/pkg/controlplane/apiserver/server.go @@ -289,7 +289,7 @@ func (c completedConfig) New(name string, delegationTarget genericapiserver.Dele IdentityLeaseGCPeriod, metav1.NamespaceSystem, IdentityLeaseComponentLabelKey+"="+name, - ).Run(hookContext.Done()) + ).RunWithContext(hookContext) return nil }) } @@ -299,7 +299,7 @@ func (c completedConfig) New(name string, delegationTarget genericapiserver.Dele } s.GenericAPIServer.AddPostStartHookOrDie("start-legacy-token-tracking-controller", func(hookContext genericapiserver.PostStartHookContext) error { - go legacytokentracking.NewController(client).Run(hookContext.Done()) + go legacytokentracking.NewController(client).RunWithContext(hookContext) return nil }) diff --git a/pkg/controlplane/controller/apiserverleasegc/gc_controller.go b/pkg/controlplane/controller/apiserverleasegc/gc_controller.go index 814fedad1be5c..c406467aa8e0e 100644 --- a/pkg/controlplane/controller/apiserverleasegc/gc_controller.go +++ b/pkg/controlplane/controller/apiserverleasegc/gc_controller.go @@ -18,7 +18,6 @@ package apiserverleasegc import ( "context" - "fmt" "time" v1 "k8s.io/api/coordination/v1" @@ -71,29 +70,38 @@ func NewAPIServerLeaseGC(clientset kubernetes.Interface, gcCheckPeriod time.Dura } // Run starts one worker. +// +//logcheck:context // RunWithContext should be used instead of Run in code which supports contextual logging. func (c *Controller) Run(stopCh <-chan struct{}) { - defer utilruntime.HandleCrash() - defer klog.Infof("Shutting down apiserver lease garbage collector") + c.RunWithContext(wait.ContextForChannel(stopCh)) +} + +// RunWithContext starts one worker with a context. +func (c *Controller) RunWithContext(ctx context.Context) { + logger := klog.FromContext(ctx) + defer utilruntime.HandleCrashWithContext(ctx) + defer logger.Info("Shutting down apiserver lease garbage collector") - klog.Infof("Starting apiserver lease garbage collector") + logger.Info("Starting apiserver lease garbage collector") // we have a personal informer that is narrowly scoped, start it. - go c.leaseInformer.Run(stopCh) + go c.leaseInformer.RunWithContext(ctx) - if !cache.WaitForCacheSync(stopCh, c.leasesSynced) { - utilruntime.HandleError(fmt.Errorf("timed out waiting for caches to sync")) + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.leasesSynced) { + utilruntime.HandleErrorWithContext(ctx, nil, "Timed out waiting for caches to sync") return } - go wait.Until(c.gc, c.gcCheckPeriod, stopCh) + go wait.UntilWithContext(ctx, c.gc, c.gcCheckPeriod) - <-stopCh + <-ctx.Done() } -func (c *Controller) gc() { +func (c *Controller) gc(ctx context.Context) { leases, err := c.leaseLister.Leases(c.leaseNamespace).List(labels.Everything()) + logger := klog.FromContext(ctx) if err != nil { - klog.ErrorS(err, "Error while listing apiserver leases") + logger.Error(err, "Error while listing apiserver leases") return } for _, lease := range leases { @@ -102,16 +110,16 @@ func (c *Controller) gc() { continue } // double check latest lease from apiserver before deleting - lease, err := c.kubeclientset.CoordinationV1().Leases(c.leaseNamespace).Get(context.TODO(), lease.Name, metav1.GetOptions{}) + lease, err := c.kubeclientset.CoordinationV1().Leases(c.leaseNamespace).Get(ctx, lease.Name, metav1.GetOptions{}) if err != nil && !errors.IsNotFound(err) { - klog.ErrorS(err, "Error getting lease") + logger.Error(err, "Error getting lease") continue } if errors.IsNotFound(err) || lease == nil { // In an HA cluster, this can happen if the lease was deleted // by the same GC controller in another apiserver, which is legit. // We don't expect other components to delete the lease. - klog.V(4).InfoS("Cannot find apiserver lease", "err", err) + logger.V(4).Info("Cannot find apiserver lease", "err", err) continue } // evaluate lease from apiserver @@ -119,14 +127,14 @@ func (c *Controller) gc() { continue } if err := c.kubeclientset.CoordinationV1().Leases(c.leaseNamespace).Delete( - context.TODO(), lease.Name, metav1.DeleteOptions{}); err != nil { + ctx, lease.Name, metav1.DeleteOptions{}); err != nil { if errors.IsNotFound(err) { // In an HA cluster, this can happen if the lease was deleted // by the same GC controller in another apiserver, which is legit. // We don't expect other components to delete the lease. - klog.V(4).InfoS("Apiserver lease is gone already", "err", err) + logger.V(4).Info("Apiserver lease is gone already", "err", err) } else { - klog.ErrorS(err, "Error deleting lease") + logger.Error(err, "Error deleting lease") } } } diff --git a/pkg/controlplane/controller/clusterauthenticationtrust/cluster_authentication_trust_controller.go b/pkg/controlplane/controller/clusterauthenticationtrust/cluster_authentication_trust_controller.go index 10d45d80e5301..c3fe7ffe58aa0 100644 --- a/pkg/controlplane/controller/clusterauthenticationtrust/cluster_authentication_trust_controller.go +++ b/pkg/controlplane/controller/clusterauthenticationtrust/cluster_authentication_trust_controller.go @@ -463,7 +463,7 @@ func (c *Controller) Run(ctx context.Context, workers int) { go c.kubeSystemConfigMapInformer.Run(ctx.Done()) // wait for your secondary caches to fill before starting your work - if !cache.WaitForNamedCacheSync("cluster_authentication_trust_controller", ctx.Done(), c.preRunCaches...) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.preRunCaches...) { return } diff --git a/pkg/controlplane/controller/defaultservicecidr/default_servicecidr_controller.go b/pkg/controlplane/controller/defaultservicecidr/default_servicecidr_controller.go index 6d0bb0a0b89a3..0cc5d71e098f8 100644 --- a/pkg/controlplane/controller/defaultservicecidr/default_servicecidr_controller.go +++ b/pkg/controlplane/controller/defaultservicecidr/default_servicecidr_controller.go @@ -106,10 +106,13 @@ func (c *Controller) Start(ctx context.Context) { c.eventRecorder = c.eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: controllerName}) c.eventBroadcaster.StartStructuredLogging(0) c.eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: c.client.CoreV1().Events("")}) - defer c.eventBroadcaster.Shutdown() klog.Infof("Starting %s", controllerName) - defer klog.Infof("Shutting down %s", controllerName) + go func() { + <-ctx.Done() + klog.Infof("Shutting down %s", controllerName) + c.eventBroadcaster.Shutdown() + }() go c.serviceCIDRInformer.Run(stopCh) if !cache.WaitForNamedCacheSync(controllerName, stopCh, c.serviceCIDRsSynced) { diff --git a/pkg/controlplane/controller/leaderelection/OWNERS b/pkg/controlplane/controller/leaderelection/OWNERS new file mode 100644 index 0000000000000..29219fbb070a4 --- /dev/null +++ b/pkg/controlplane/controller/leaderelection/OWNERS @@ -0,0 +1,8 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +approvers: + - jefftree +reviewers: + - jefftree +labels: + - sig/api-machinery diff --git a/pkg/controlplane/controller/leaderelection/leaderelection_controller.go b/pkg/controlplane/controller/leaderelection/leaderelection_controller.go index 0df141a29ae90..3b44c30e452f9 100644 --- a/pkg/controlplane/controller/leaderelection/leaderelection_controller.go +++ b/pkg/controlplane/controller/leaderelection/leaderelection_controller.go @@ -88,7 +88,7 @@ func (c *Controller) Run(ctx context.Context, workers int) { } }() - if !cache.WaitForNamedCacheSync(controllerName, ctx.Done(), c.leaseRegistration.HasSynced, c.leaseCandidateRegistration.HasSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.leaseRegistration.HasSynced, c.leaseCandidateRegistration.HasSynced) { return } diff --git a/pkg/controlplane/controller/legacytokentracking/controller.go b/pkg/controlplane/controller/legacytokentracking/controller.go index 512db25096acb..31ef0dc08ad85 100644 --- a/pkg/controlplane/controller/legacytokentracking/controller.go +++ b/pkg/controlplane/controller/legacytokentracking/controller.go @@ -18,7 +18,6 @@ package legacytokentracking import ( "context" - "fmt" "time" "golang.org/x/time/rate" @@ -112,40 +111,49 @@ func (c *Controller) enqueue() { } // Run starts the controller sync loop. +// +//logcheck:context // RunWithContext should be used instead of Run in code which supports contextual logging. func (c *Controller) Run(stopCh <-chan struct{}) { + c.RunWithContext(wait.ContextForChannel(stopCh)) +} + +// RunWithContext starts the controller sync loop with a context. +func (c *Controller) RunWithContext(ctx context.Context) { defer utilruntime.HandleCrash() defer c.queue.ShutDown() - klog.Info("Starting legacy_token_tracking_controller") - defer klog.Infof("Shutting down legacy_token_tracking_controller") + logger := klog.FromContext(ctx) + + logger.Info("Starting legacy_token_tracking_controller") + defer logger.Info("Shutting down legacy_token_tracking_controller") - go c.configMapInformer.Run(stopCh) - if !cache.WaitForNamedCacheSync("configmaps", stopCh, c.configMapSynced) { + go c.configMapInformer.Run(ctx.Done()) + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.configMapSynced) { return } - go wait.Until(c.runWorker, time.Second, stopCh) + go wait.UntilWithContext(ctx, c.runWorker, time.Second) c.queue.Add(queueKey) - <-stopCh - klog.Info("Ending legacy_token_tracking_controller") + <-ctx.Done() + logger.Info("Ending legacy_token_tracking_controller") } -func (c *Controller) runWorker() { - for c.processNext() { +func (c *Controller) runWorker(ctx context.Context) { + for c.processNext(ctx) { } } -func (c *Controller) processNext() bool { +func (c *Controller) processNext(ctx context.Context) bool { key, quit := c.queue.Get() if quit { return false } defer c.queue.Done(key) - if err := c.syncConfigMap(); err != nil { - utilruntime.HandleError(fmt.Errorf("while syncing ConfigMap %q, err: %w", key, err)) + if err := c.syncConfigMap(ctx); err != nil { + utilruntime.HandleErrorWithContext(ctx, err, "Error while syncing ConfigMap", "configmap", key) c.queue.AddRateLimited(key) return true } @@ -153,7 +161,7 @@ func (c *Controller) processNext() bool { return true } -func (c *Controller) syncConfigMap() error { +func (c *Controller) syncConfigMap(ctx context.Context) error { obj, exists, err := c.configMapCache.GetByKey(queueKey) if err != nil { return err @@ -168,7 +176,7 @@ func (c *Controller) syncConfigMap() error { return nil } - if _, err = c.configMapClient.ConfigMaps(metav1.NamespaceSystem).Create(context.TODO(), &corev1.ConfigMap{ + if _, err = c.configMapClient.ConfigMaps(metav1.NamespaceSystem).Create(ctx, &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceSystem, Name: ConfigMapName}, Data: map[string]string{ConfigMapDataKey: now.UTC().Format(dateFormat)}, }, metav1.CreateOptions{}); err != nil { @@ -187,7 +195,7 @@ func (c *Controller) syncConfigMap() error { configMap.Data = map[string]string{} } configMap.Data[ConfigMapDataKey] = now.UTC().Format(dateFormat) - if _, err = c.configMapClient.ConfigMaps(metav1.NamespaceSystem).Update(context.TODO(), configMap, metav1.UpdateOptions{}); err != nil { + if _, err = c.configMapClient.ConfigMaps(metav1.NamespaceSystem).Update(ctx, configMap, metav1.UpdateOptions{}); err != nil { if apierrors.IsNotFound(err) || apierrors.IsConflict(err) { return nil } diff --git a/pkg/controlplane/controller/legacytokentracking/controller_test.go b/pkg/controlplane/controller/legacytokentracking/controller_test.go index a05146e6c5914..bb292476d9e3e 100644 --- a/pkg/controlplane/controller/legacytokentracking/controller_test.go +++ b/pkg/controlplane/controller/legacytokentracking/controller_test.go @@ -29,6 +29,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/kubernetes/fake" core "k8s.io/client-go/testing" + "k8s.io/kubernetes/test/utils/ktesting" testingclock "k8s.io/utils/clock/testing" ) @@ -126,6 +127,7 @@ func TestSyncConfigMap(t *testing.T) { }, }, } + _, ctx := ktesting.NewTestContext(t) for _, test := range tests { t.Run(test.name, func(t *testing.T) { client := fake.NewSimpleClientset(test.clientObjects...) @@ -135,7 +137,7 @@ func TestSyncConfigMap(t *testing.T) { controller.configMapCache.Add(test.existingConfigMap) } - if err := controller.syncConfigMap(); err != nil { + if err := controller.syncConfigMap(ctx); err != nil { t.Errorf("Failed to sync ConfigMap, err: %v", err) } @@ -145,7 +147,7 @@ func TestSyncConfigMap(t *testing.T) { ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceSystem, Name: ConfigMapName}, }) controller.clock.(*testingclock.FakeClock).SetTime(createAt) - if err := controller.syncConfigMap(); err != nil { + if err := controller.syncConfigMap(ctx); err != nil { t.Errorf("Failed to sync ConfigMap, err: %v", err) } } diff --git a/pkg/controlplane/reconcilers/lease.go b/pkg/controlplane/reconcilers/lease.go index 5a2aff1b9e968..a6c5782900013 100644 --- a/pkg/controlplane/reconcilers/lease.go +++ b/pkg/controlplane/reconcilers/lease.go @@ -132,9 +132,9 @@ func (s *storageLeases) Destroy() { // NewLeases creates a new etcd-based Leases implementation. func NewLeases(config *storagebackend.ConfigForResource, baseKey string, leaseTime time.Duration) (Leases, error) { - // note that newFunc, newListFunc and resourcePrefix + // note that newFunc, newListFunc // can be left blank unless the storage.Watch method is used - leaseStorage, destroyFn, err := storagefactory.Create(*config, nil, nil, "") + leaseStorage, destroyFn, err := storagefactory.Create(*config, nil, nil, baseKey) if err != nil { return nil, fmt.Errorf("error creating storage factory: %v", err) } diff --git a/pkg/controlplane/reconcilers/lease_test.go b/pkg/controlplane/reconcilers/lease_test.go index 1e9d3ce13ae1d..3fb912a92dc45 100644 --- a/pkg/controlplane/reconcilers/lease_test.go +++ b/pkg/controlplane/reconcilers/lease_test.go @@ -62,18 +62,12 @@ type fakeLeases struct { var _ Leases = &fakeLeases{} -func newFakeLeases(t *testing.T, s storage.Interface) *fakeLeases { - // use the same base key used by the controlplane, but add a random - // prefix so we can reuse the etcd instance for subtests independently. - // pkg/controlplane/instance.go:268: - // masterLeases, err := reconcilers.NewLeases(config, "/masterleases/", ttl) - // ref: https://issues.k8s.io/114049 - base := "/" + uuid.New().String() + "/masterleases/" +func newFakeLeases(t *testing.T, baseKey string, s storage.Interface) *fakeLeases { return &fakeLeases{ storageLeases{ storage: s, destroyFn: func() {}, - baseKey: base, + baseKey: baseKey, leaseTime: 1 * time.Minute, // avoid the lease to timeout on tests }, } @@ -96,12 +90,6 @@ func TestLeaseEndpointReconciler(t *testing.T) { newListFunc := func() runtime.Object { return &corev1.EndpointsList{} } sc.Codec = apitesting.TestStorageCodec(codecs, corev1.SchemeGroupVersion) - s, dFunc, err := factory.Create(*sc.ForResource(schema.GroupResource{Resource: "endpoints"}), newFunc, newListFunc, "") - if err != nil { - t.Fatalf("Error creating storage: %v", err) - } - t.Cleanup(dFunc) - reconcileTests := []struct { testName string serviceName string @@ -341,8 +329,19 @@ func TestLeaseEndpointReconciler(t *testing.T) { } for _, test := range reconcileTests { t.Run(test.testName, func(t *testing.T) { - fakeLeases := newFakeLeases(t, s) - err := fakeLeases.SetKeys(test.endpointKeys) + // use the same base key used by the controlplane, but add a random + // prefix so we can reuse the etcd instance for subtests independently. + // pkg/controlplane/instance.go:268: + // masterLeases, err := reconcilers.NewLeases(config, "/masterleases/", ttl) + // ref: https://issues.k8s.io/114049 + baseKey := "/" + uuid.New().String() + "/masterleases/" + s, dFunc, err := factory.Create(*sc.ForResource(schema.GroupResource{Resource: "endpoints"}), newFunc, newListFunc, baseKey) + if err != nil { + t.Fatalf("Error creating storage: %v", err) + } + t.Cleanup(dFunc) + fakeLeases := newFakeLeases(t, baseKey, s) + err = fakeLeases.SetKeys(test.endpointKeys) if err != nil { t.Errorf("unexpected error creating keys: %v", err) } @@ -420,8 +419,19 @@ func TestLeaseEndpointReconciler(t *testing.T) { } for _, test := range nonReconcileTests { t.Run(test.testName, func(t *testing.T) { - fakeLeases := newFakeLeases(t, s) - err := fakeLeases.SetKeys(test.endpointKeys) + // use the same base key used by the controlplane, but add a random + // prefix so we can reuse the etcd instance for subtests independently. + // pkg/controlplane/instance.go:268: + // masterLeases, err := reconcilers.NewLeases(config, "/masterleases/", ttl) + // ref: https://issues.k8s.io/114049 + baseKey := "/" + uuid.New().String() + "/masterleases/" + s, dFunc, err := factory.Create(*sc.ForResource(schema.GroupResource{Resource: "endpoints"}), newFunc, newListFunc, baseKey) + if err != nil { + t.Fatalf("Error creating storage: %v", err) + } + t.Cleanup(dFunc) + fakeLeases := newFakeLeases(t, baseKey, s) + err = fakeLeases.SetKeys(test.endpointKeys) if err != nil { t.Errorf("unexpected error creating keys: %v", err) } @@ -460,12 +470,6 @@ func TestLeaseRemoveEndpoints(t *testing.T) { newListFunc := func() runtime.Object { return &corev1.EndpointsList{} } sc.Codec = apitesting.TestStorageCodec(codecs, corev1.SchemeGroupVersion) - s, dFunc, err := factory.Create(*sc.ForResource(schema.GroupResource{Resource: "pods"}), newFunc, newListFunc, "") - if err != nil { - t.Fatalf("Error creating storage: %v", err) - } - t.Cleanup(dFunc) - stopTests := []struct { testName string serviceName string @@ -530,8 +534,19 @@ func TestLeaseRemoveEndpoints(t *testing.T) { } for _, test := range stopTests { t.Run(test.testName, func(t *testing.T) { - fakeLeases := newFakeLeases(t, s) - err := fakeLeases.SetKeys(test.endpointKeys) + // use the same base key used by the controlplane, but add a random + // prefix so we can reuse the etcd instance for subtests independently. + // pkg/controlplane/instance.go:268: + // masterLeases, err := reconcilers.NewLeases(config, "/masterleases/", ttl) + // ref: https://issues.k8s.io/114049 + baseKey := "/" + uuid.New().String() + "/masterleases/" + s, dFunc, err := factory.Create(*sc.ForResource(schema.GroupResource{Resource: "pods"}), newFunc, newListFunc, baseKey) + if err != nil { + t.Fatalf("Error creating storage: %v", err) + } + t.Cleanup(dFunc) + fakeLeases := newFakeLeases(t, baseKey, s) + err = fakeLeases.SetKeys(test.endpointKeys) if err != nil { t.Errorf("unexpected error creating keys: %v", err) } @@ -587,12 +602,6 @@ func TestApiserverShutdown(t *testing.T) { newListFunc := func() runtime.Object { return &corev1.EndpointsList{} } sc.Codec = apitesting.TestStorageCodec(codecs, corev1.SchemeGroupVersion) - s, dFunc, err := factory.Create(*sc.ForResource(schema.GroupResource{Resource: "endpoints"}), newFunc, newListFunc, "") - if err != nil { - t.Fatalf("Error creating storage: %v", err) - } - t.Cleanup(dFunc) - reconcileTests := []struct { testName string serviceName string @@ -651,8 +660,19 @@ func TestApiserverShutdown(t *testing.T) { } for _, test := range reconcileTests { t.Run(test.testName, func(t *testing.T) { - fakeLeases := newFakeLeases(t, s) - err := fakeLeases.SetKeys(test.endpointKeys) + // use the same base key used by the controlplane, but add a random + // prefix so we can reuse the etcd instance for subtests independently. + // pkg/controlplane/instance.go:268: + // masterLeases, err := reconcilers.NewLeases(config, "/masterleases/", ttl) + // ref: https://issues.k8s.io/114049 + baseKey := "/" + uuid.New().String() + "/masterleases/" + s, dFunc, err := factory.Create(*sc.ForResource(schema.GroupResource{Resource: "endpoints"}), newFunc, newListFunc, baseKey) + if err != nil { + t.Fatalf("Error creating storage: %v", err) + } + t.Cleanup(dFunc) + fakeLeases := newFakeLeases(t, baseKey, s) + err = fakeLeases.SetKeys(test.endpointKeys) if err != nil { t.Errorf("unexpected error creating keys: %v", err) } diff --git a/pkg/controlplane/storageversionhashdata/data.go b/pkg/controlplane/storageversionhashdata/data.go index 028fc75f03c63..eef787a688c21 100644 --- a/pkg/controlplane/storageversionhashdata/data.go +++ b/pkg/controlplane/storageversionhashdata/data.go @@ -70,10 +70,10 @@ var GVRToStorageVersionHash = map[string]string{ "rbac.authorization.k8s.io/v1/clusterroles": "bYE5ZWDrJ44=", "rbac.authorization.k8s.io/v1/rolebindings": "eGsCzGH6b1g=", "rbac.authorization.k8s.io/v1/roles": "7FuwZcIIItM=", - "resource.k8s.io/v1/deviceclasses": "weQRMT6DeYM=", - "resource.k8s.io/v1/resourceclaims": "EJAWH5WrAYg=", - "resource.k8s.io/v1/resourceclaimtemplates": "24m0okHrUtk=", - "resource.k8s.io/v1/resourceslices": "z6Bc9vgk6yE=", + "resource.k8s.io/v1/deviceclasses": "Yk2PTc1Ybxk=", + "resource.k8s.io/v1/resourceclaims": "wgAZaHcZxUg=", + "resource.k8s.io/v1/resourceclaimtemplates": "TuzjC49aUfM=", + "resource.k8s.io/v1/resourceslices": "KsC072WgaEY=", "scheduling.k8s.io/v1/priorityclasses": "1QwjyaZjj3Y=", "storage.k8s.io/v1/csidrivers": "hL6j/rwBV5w=", "storage.k8s.io/v1/csinodes": "Pe62DkZtjuo=", diff --git a/pkg/credentialprovider/plugin/plugin.go b/pkg/credentialprovider/plugin/plugin.go index 5c38823c8f1fc..8033b5944fb42 100644 --- a/pkg/credentialprovider/plugin/plugin.go +++ b/pkg/credentialprovider/plugin/plugin.go @@ -210,6 +210,7 @@ func newPluginProvider(pluginBinDir string, provider kubeletconfig.CredentialPro clock := clock.RealClock{} return &pluginProvider{ + name: provider.Name, clock: clock, matchImages: provider.MatchImages, cache: cache.NewExpirationStore(cacheKeyFunc, &cacheExpirationPolicy{clock: clock}), @@ -230,6 +231,7 @@ func newPluginProvider(pluginBinDir string, provider kubeletconfig.CredentialPro // pluginProvider is the plugin-based implementation of the DockerConfigProvider interface. type pluginProvider struct { + name string clock clock.Clock sync.Mutex @@ -390,8 +392,6 @@ func (c *cacheExpirationPolicy) IsExpired(entry *cache.TimestampedEntry) bool { // that the plugin can use this information to get the pod's service account and generate bound service account tokens // for plugins running in service account token mode. type perPodPluginProvider struct { - name string - provider *pluginProvider podNamespace string @@ -406,7 +406,19 @@ type perPodPluginProvider struct { // context was used (e.g., the plugin is not operating in service account token mode or no service // account was provided for the request). func (p *perPodPluginProvider) provideWithCoordinates(image string) (credentialprovider.DockerConfig, *credentialprovider.ServiceAccountCoordinates) { - return p.provider.provide(image, p.podNamespace, p.podName, p.podUID, p.serviceAccountName) + credentials, coordinates, err := p.provider.provide(image, p.podNamespace, p.podName, p.podUID, p.serviceAccountName) + if err == nil { + return credentials, coordinates + } + + // If there was an error providing credentials, we log the error but do not return it. + if p.provider.serviceAccountProvider != nil { + klog.ErrorS(err, "Failed to provide credentials for image", "provider", p.provider.name, "image", image, "pod", klog.KRef(p.podNamespace, p.podName), "podUID", p.podUID, "serviceAccount", klog.KRef(p.podNamespace, p.serviceAccountName)) + } else { + klog.ErrorS(err, "Failed to provide credentials for image", "provider", p.provider.name, "image", image) + } + + return credentialprovider.DockerConfig{}, nil } // provide returns a credentialprovider.DockerConfig based on the credentials returned @@ -414,9 +426,9 @@ func (p *perPodPluginProvider) provideWithCoordinates(image string) (credentialp // If ServiceAccountCoordinates is nil, it means no service account context was used // (e.g., the plugin is not operating in service account token mode or no service account // was provided for the request). -func (p *pluginProvider) provide(image, podNamespace, podName string, podUID types.UID, serviceAccountName string) (credentialprovider.DockerConfig, *credentialprovider.ServiceAccountCoordinates) { +func (p *pluginProvider) provide(image, podNamespace, podName string, podUID types.UID, serviceAccountName string) (credentialprovider.DockerConfig, *credentialprovider.ServiceAccountCoordinates, error) { if !p.isImageAllowed(image) { - return credentialprovider.DockerConfig{}, nil + return credentialprovider.DockerConfig{}, nil, nil } var serviceAccountUID types.UID @@ -429,8 +441,8 @@ func (p *pluginProvider) provide(image, podNamespace, podName string, podUID typ if p.serviceAccountProvider != nil { if len(serviceAccountName) == 0 && p.serviceAccountProvider.requireServiceAccount { - klog.V(5).Infof("Service account name is empty for pod %s/%s", podNamespace, podName) - return credentialprovider.DockerConfig{}, nil + klog.V(5).InfoS("Service account name is empty", "provider", p.name, "image", image, "pod", klog.KRef(podNamespace, podName), "podUID", podUID) + return credentialprovider.DockerConfig{}, nil, nil } // If the service account name is empty and the plugin has indicated that invoking the plugin @@ -443,17 +455,15 @@ func (p *pluginProvider) provide(image, podNamespace, podName string, podUID typ // The required annotation could be a mechanism for individual workloads to opt in to using service account tokens // for image pull. If any of the required annotation is missing, we will not invoke the plugin. We will log the error // at higher verbosity level as it could be noisy. - klog.V(5).Infof("Failed to get service account data %s/%s: %v", podNamespace, serviceAccountName, err) - return credentialprovider.DockerConfig{}, nil + klog.V(5).ErrorS(err, "Failed to get service account data", "provider", p.name, "image", image, "pod", klog.KRef(podNamespace, podName), "podUID", podUID, "serviceAccount", klog.KRef(podNamespace, serviceAccountName)) + return credentialprovider.DockerConfig{}, nil, nil } - klog.Errorf("Failed to get service account %s/%s: %v", podNamespace, serviceAccountName, err) - return credentialprovider.DockerConfig{}, nil + return credentialprovider.DockerConfig{}, nil, fmt.Errorf("failed to get service account: %w", err) } if serviceAccountToken, err = p.serviceAccountProvider.getServiceAccountToken(podNamespace, podName, serviceAccountName, serviceAccountUID, podUID); err != nil { - klog.Errorf("Error getting service account token %s/%s: %v", podNamespace, serviceAccountName, err) - return credentialprovider.DockerConfig{}, nil + return credentialprovider.DockerConfig{}, nil, fmt.Errorf("failed to get service account token: %w", err) } serviceAccountTokenHash = getHashIfNotEmpty(serviceAccountToken) @@ -470,8 +480,7 @@ func (p *pluginProvider) provide(image, podNamespace, podName string, podUID typ serviceAccountCacheKey, err = generateServiceAccountCacheKey(c) if err != nil { - klog.Errorf("Error generating service account cache key: %v", err) - return credentialprovider.DockerConfig{}, nil + return credentialprovider.DockerConfig{}, nil, fmt.Errorf("error generating service account cache key: %w", err) } serviceAccountCoordinates = &credentialprovider.ServiceAccountCoordinates{ @@ -485,12 +494,11 @@ func (p *pluginProvider) provide(image, podNamespace, podName string, podUID typ // Check if the credentials are cached and return them if found. cachedConfig, found, errCache := p.getCachedCredentials(image, serviceAccountCacheKey) if errCache != nil { - klog.Errorf("Failed to get cached docker config: %v", err) - return credentialprovider.DockerConfig{}, nil + return credentialprovider.DockerConfig{}, nil, fmt.Errorf("failed to get cached docker config: %w", errCache) } if found { - return cachedConfig, serviceAccountCoordinates + return cachedConfig, serviceAccountCoordinates, nil } // ExecPlugin is wrapped in single flight to exec plugin once for concurrent same image request. @@ -508,8 +516,7 @@ func (p *pluginProvider) provide(image, podNamespace, podName string, podUID typ // This does mean the singleflight key is different for each image pull request (even if the image is the same) // and the workload is using the same service account. if singleFlightKey, err = generateSingleFlightKey(image, serviceAccountTokenHash, saAnnotations); err != nil { - klog.Errorf("Error generating singleflight key: %v", err) - return credentialprovider.DockerConfig{}, nil + return credentialprovider.DockerConfig{}, nil, fmt.Errorf("error generating singleflight key: %w", err) } } res, err, _ := p.group.Do(singleFlightKey, func() (interface{}, error) { @@ -517,14 +524,12 @@ func (p *pluginProvider) provide(image, podNamespace, podName string, podUID typ }) if err != nil { - klog.Errorf("Failed getting credential from external registry credential provider: %v", err) - return credentialprovider.DockerConfig{}, nil + return credentialprovider.DockerConfig{}, nil, fmt.Errorf("failed to get credential from external registry credential provider: %w", err) } response, ok := res.(*credentialproviderapi.CredentialProviderResponse) if !ok { - klog.Errorf("Invalid response type returned by external credential provider") - return credentialprovider.DockerConfig{}, nil + return credentialprovider.DockerConfig{}, nil, fmt.Errorf("invalid response type returned by external credential provider: %T", res) } if len(serviceAccountToken) > 0 && p.serviceAccountProvider.cacheType != kubeletconfig.TokenServiceAccountTokenCacheType { // validate that the response credentials are not the echoed token back verbatim when cache @@ -532,8 +537,7 @@ func (p *pluginProvider) provide(image, podNamespace, podName string, podUID typ // is returned as the registry credentials. for _, authConfig := range response.Auth { if authConfig.Password == serviceAccountToken { - klog.Errorf("Credential provider plugin returned the service account token as the password for image %q, which is not allowed when service account cache type is not set to 'Token'", image) - return credentialprovider.DockerConfig{}, nil + return credentialprovider.DockerConfig{}, nil, fmt.Errorf("credential provider plugin returned the service account token as the password which is not allowed when service account cache type is not set to 'Token'") } } } @@ -548,8 +552,7 @@ func (p *pluginProvider) provide(image, podNamespace, podName string, podUID typ case credentialproviderapi.GlobalPluginCacheKeyType: cacheKey = globalCacheKey default: - klog.Errorf("credential provider plugin did not return a valid cacheKeyType: %q", cacheKeyType) - return credentialprovider.DockerConfig{}, nil + return credentialprovider.DockerConfig{}, nil, fmt.Errorf("credential provider plugin did not return a valid cacheKeyType: %s", cacheKeyType) } dockerConfig := make(credentialprovider.DockerConfig, len(response.Auth)) @@ -562,14 +565,14 @@ func (p *pluginProvider) provide(image, podNamespace, podName string, podUID typ // cache duration was explicitly 0 so don't cache this response at all. if response.CacheDuration != nil && response.CacheDuration.Duration == 0 { - return dockerConfig, serviceAccountCoordinates + return dockerConfig, serviceAccountCoordinates, nil } var expiresAt time.Time // nil cache duration means use the default cache duration if response.CacheDuration == nil { if p.defaultCacheDuration == 0 { - return dockerConfig, serviceAccountCoordinates + return dockerConfig, serviceAccountCoordinates, nil } expiresAt = p.clock.Now().Add(p.defaultCacheDuration) } else { @@ -578,8 +581,7 @@ func (p *pluginProvider) provide(image, podNamespace, podName string, podUID typ cacheKey, err = generateCacheKey(cacheKey, serviceAccountCacheKey) if err != nil { - klog.Errorf("Error generating cache key: %v", err) - return credentialprovider.DockerConfig{}, nil + return credentialprovider.DockerConfig{}, nil, fmt.Errorf("error generating cache key: %w", err) } cachedEntry := &cacheEntry{ @@ -589,10 +591,12 @@ func (p *pluginProvider) provide(image, podNamespace, podName string, podUID typ } if err := p.cache.Add(cachedEntry); err != nil { - klog.Errorf("Error adding auth entry to cache: %v", err) + // If we fail to add the credentials to the cache, we still return the credentials + // to the caller, but we log an error. + return dockerConfig, serviceAccountCoordinates, fmt.Errorf("failed to add credentials to cache: %w", err) } - return dockerConfig, serviceAccountCoordinates + return dockerConfig, serviceAccountCoordinates, nil } // isImageAllowed returns true if the image matches against the list of allowed matches by the plugin. @@ -680,7 +684,7 @@ type execPlugin struct { // The plugin is expected to receive the CredentialProviderRequest API via stdin from the kubelet and // return CredentialProviderResponse via stdout. func (e *execPlugin) ExecPlugin(ctx context.Context, image, serviceAccountToken string, serviceAccountAnnotations map[string]string) (*credentialproviderapi.CredentialProviderResponse, error) { - klog.V(5).Infof("Getting image %s credentials from external exec plugin %s", image, e.name) + klog.V(5).InfoS("Getting image credentials from external exec plugin", "pluginName", e.name, "image", image) authRequest := &credentialproviderapi.CredentialProviderRequest{Image: image, ServiceAccountToken: serviceAccountToken, ServiceAccountAnnotations: serviceAccountAnnotations} data, err := e.encodeRequest(authRequest) diff --git a/pkg/credentialprovider/plugin/plugin_test.go b/pkg/credentialprovider/plugin/plugin_test.go index ab088e99989b6..5f940964eb498 100644 --- a/pkg/credentialprovider/plugin/plugin_test.go +++ b/pkg/credentialprovider/plugin/plugin_test.go @@ -373,6 +373,7 @@ func Test_ProvideWithCoordinates(t *testing.T) { name: "[service account mode] sa name required but empty", pluginProvider: &perPodPluginProvider{ provider: &pluginProvider{ + name: "test-plugin", matchImages: []string{"test.registry.io"}, serviceAccountProvider: &serviceAccountProvider{ requireServiceAccount: true, @@ -380,15 +381,17 @@ func Test_ProvideWithCoordinates(t *testing.T) { }, podName: "pod-name", podNamespace: "ns", + podUID: "pod-uid", }, image: "test.registry.io/foo/bar", dockerconfig: credentialprovider.DockerConfig{}, - wantLog: "Service account name is empty for pod ns/pod-name", + wantLog: `Service account name is empty" provider="test-plugin" image="test.registry.io/foo/bar" pod="ns/pod-name" podUID="pod-uid"`, }, { name: "[service account mode] sa does not have required annotations", pluginProvider: &perPodPluginProvider{ provider: &pluginProvider{ + name: "test-plugin", matchImages: []string{"test.registry.io"}, serviceAccountProvider: &serviceAccountProvider{ requireServiceAccount: true, @@ -408,16 +411,18 @@ func Test_ProvideWithCoordinates(t *testing.T) { }, podName: "pod-name", podNamespace: "ns", + podUID: "pod-uid", serviceAccountName: "sa-name", }, image: "test.registry.io/foo/bar", dockerconfig: credentialprovider.DockerConfig{}, - wantLog: "Failed to get service account data ns/sa-name: required annotation domain.io/identity-id not found", + wantLog: `"Failed to get service account data" err="required annotation domain.io/identity-id not found" provider="test-plugin" image="test.registry.io/foo/bar" pod="ns/pod-name" podUID="pod-uid" serviceAccount="ns/sa-name"`, }, { name: "[service account mode] failed to get service account token", pluginProvider: &perPodPluginProvider{ provider: &pluginProvider{ + name: "test-plugin", matchImages: []string{"test.registry.io"}, serviceAccountProvider: &serviceAccountProvider{ requireServiceAccount: true, @@ -445,16 +450,18 @@ func Test_ProvideWithCoordinates(t *testing.T) { }, podName: "pod-name", podNamespace: "ns", + podUID: "pod-uid", serviceAccountName: "sa-name", }, image: "test.registry.io/foo/bar", dockerconfig: credentialprovider.DockerConfig{}, - wantLog: "Error getting service account token ns/sa-name: failed to get token", + wantLog: `"Failed to provide credentials for image" err="failed to get service account token: failed to get token" provider="test-plugin" image="test.registry.io/foo/bar" pod="ns/pod-name" podUID="pod-uid" serviceAccount="ns/sa-name"`, }, { name: "[service account mode] cache type not token but service account echoed back", pluginProvider: &perPodPluginProvider{ provider: &pluginProvider{ + name: "test-plugin", clock: tclock, lastCachePurge: tclock.Now(), matchImages: []string{"test.registry.io"}, @@ -494,11 +501,12 @@ func Test_ProvideWithCoordinates(t *testing.T) { }, podName: "pod-name", podNamespace: "ns", + podUID: "pod-uid", serviceAccountName: "sa-name", }, image: "test.registry.io/foo/bar", dockerconfig: credentialprovider.DockerConfig{}, - wantLog: `Credential provider plugin returned the service account token as the password for image "test.registry.io/foo/bar", which is not allowed when service account cache type is not set to 'Token'`, + wantLog: `"Failed to provide credentials for image" err="credential provider plugin returned the service account token as the password which is not allowed when service account cache type is not set to 'Token'" provider="test-plugin" image="test.registry.io/foo/bar" pod="ns/pod-name" podUID="pod-uid" serviceAccount="ns/sa-name"`, }, { name: "[service account mode] exact image match", @@ -588,6 +596,7 @@ func Test_ProvideWithCoordinates(t *testing.T) { capturedOutput := buf.String() if len(testcase.wantLog) > 0 && !strings.Contains(capturedOutput, testcase.wantLog) { + t.Log("Captured output:", capturedOutput) t.Errorf("expected log message %q not found in captured output: %q", testcase.wantLog, capturedOutput) } }) diff --git a/pkg/credentialprovider/plugin/plugins.go b/pkg/credentialprovider/plugin/plugins.go index e37d908e1a53a..e3f97cc09c8b4 100644 --- a/pkg/credentialprovider/plugin/plugins.go +++ b/pkg/credentialprovider/plugin/plugins.go @@ -52,7 +52,7 @@ func registerCredentialProviderPlugin(name string, p *pluginProvider) { seenProviderNames.Insert(name) providers = append(providers, provider{name, p}) - klog.V(4).Infof("Registered credential provider %q", name) + klog.V(4).InfoS("Registered credential provider", "provider", name) } type externalCredentialProviderKeyring struct { @@ -69,7 +69,6 @@ func NewExternalCredentialProviderDockerKeyring(podNamespace, podName, podUID, s for _, p := range providers { pp := &perPodPluginProvider{ - name: p.name, provider: p.impl, } if utilfeature.DefaultFeatureGate.Enabled(features.KubeletServiceAccountTokenForCredentialProviders) { diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go index cf5d933767a0b..8cc208a2799ca 100644 --- a/pkg/features/kube_features.go +++ b/pkg/features/kube_features.go @@ -161,12 +161,6 @@ const ( // Enables coordinated leader election in the API server CoordinatedLeaderElection featuregate.Feature = "CoordinatedLeaderElection" - // owner: @helayoty - // kep: https://kep.k8s.io/4026 - // - // Set the scheduled time as an annotation in the job. - CronJobsScheduledAnnotation featuregate.Feature = "CronJobsScheduledAnnotation" - // owner: @ttakahashi21 @mkimuram // kep: https://kep.k8s.io/3294 // @@ -242,28 +236,6 @@ const ( // scheduler plugin configuration). DRASchedulerFilterTimeout featuregate.Feature = "DRASchedulerFilterTimeout" - // owner: @jpbetz @aaron-prindle @yongruilin - // kep: http://kep.k8s.io/5073 - // beta: v1.33 - // - // Enables running declarative validation of APIs, where declared. When enabled, APIs with - // declarative validation rules will validate objects using the generated - // declarative validation code and compare the results to the regular imperative validation. - // See DeclarativeValidationTakeover for more. - DeclarativeValidation featuregate.Feature = "DeclarativeValidation" - - // owner: @jpbetz @aaron-prindle @yongruilin - // kep: http://kep.k8s.io/5073 - // beta: v1.33 - // - // When enabled, declarative validation errors are returned directly to the caller, - // replacing hand-written validation errors for rules that have declarative implementations. - // When disabled, hand-written validation errors are always returned, effectively putting - // declarative validation in a "shadow mode" that monitors but does not affect API responses. - // Note: Although declarative validation aims for functional equivalence with hand-written validation, - // the exact number, format, and content of error messages may differ between the two approaches. - DeclarativeValidationTakeover featuregate.Feature = "DeclarativeValidationTakeover" - // owner: @atiratree // kep: http://kep.k8s.io/3973 // @@ -669,12 +641,6 @@ const ( // Enables controlling pod ranking on replicaset scale-down. PodDeletionCost featuregate.Feature = "PodDeletionCost" - // owner: @danielvegamyhre - // kep: https://kep.k8s.io/4017 - // - // Set pod completion index as a pod label for Indexed Jobs. - PodIndexLabel featuregate.Feature = "PodIndexLabel" - // owner: @ndixita // key: https://kep.k8s.io/2837 // @@ -748,12 +714,6 @@ const ( // Denies pod admission if static pods reference other API objects. PreventStaticPodAPIReferences featuregate.Feature = "PreventStaticPodAPIReferences" - // owner: @tssurya - // kep: https://kep.k8s.io/4559 - // - // Enables probe host enforcement for Pod Security Standards. - ProbeHostPodSecurityStandards featuregate.Feature = "ProbeHostPodSecurityStandards" - // owner: @jessfraz // // Enables control over ProcMountType for containers. @@ -929,18 +889,6 @@ const ( // pod's lifecycle and will not block pod termination. SidecarContainers featuregate.Feature = "SidecarContainers" - // owner: @derekwaynecarr - // - // Enables kubelet support to size memory backed volumes - // This is a kubelet only feature gate. - // Code can be removed in 1.35 without any consideration for emulated versions. - SizeMemoryBackedVolumes featuregate.Feature = "SizeMemoryBackedVolumes" - - // owner: @mattcary - // - // Enables policies controlling deletion of PVCs created by a StatefulSet. - StatefulSetAutoDeletePVC featuregate.Feature = "StatefulSetAutoDeletePVC" - // owner: @cupnes // kep: https://kep.k8s.io/4049 // @@ -1108,6 +1056,7 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate AllowOverwriteTerminationGracePeriodSeconds: { {Version: version.MustParse("1.0"), Default: true, PreRelease: featuregate.GA}, {Version: version.MustParse("1.32"), Default: false, PreRelease: featuregate.Deprecated}, + {Version: version.MustParse("1.35"), Default: false, PreRelease: featuregate.Deprecated, LockToDefault: true}, // remove in 1.38 }, AllowServiceLBStatusOnNonLB: { @@ -1184,11 +1133,6 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate {Version: version.MustParse("1.33"), Default: false, PreRelease: featuregate.Alpha}, }, - CronJobsScheduledAnnotation: { - {Version: version.MustParse("1.28"), Default: true, PreRelease: featuregate.Beta}, - {Version: version.MustParse("1.32"), Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.35 - }, - CrossNamespaceVolumeDataSource: { {Version: version.MustParse("1.26"), Default: false, PreRelease: featuregate.Alpha}, }, @@ -1232,14 +1176,6 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate {Version: version.MustParse("1.34"), Default: true, PreRelease: featuregate.Beta}, }, - DeclarativeValidation: { - {Version: version.MustParse("1.33"), Default: true, PreRelease: featuregate.Beta}, - }, - - DeclarativeValidationTakeover: { - {Version: version.MustParse("1.33"), Default: false, PreRelease: featuregate.Beta}, - }, - DeploymentReplicaSetTerminatingReplicas: { {Version: version.MustParse("1.33"), Default: false, PreRelease: featuregate.Alpha}, }, @@ -1247,7 +1183,8 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate DisableAllocatorDualWrite: { {Version: version.MustParse("1.31"), Default: false, PreRelease: featuregate.Alpha}, {Version: version.MustParse("1.33"), Default: false, PreRelease: featuregate.Beta}, - {Version: version.MustParse("1.34"), Default: true, PreRelease: featuregate.GA}, // remove after MultiCIDRServiceAllocator is GA + {Version: version.MustParse("1.34"), Default: true, PreRelease: featuregate.GA}, + {Version: version.MustParse("1.35"), Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove after MultiCIDRServiceAllocator is GA }, DisableCPUQuotaWithExclusiveCPUs: { @@ -1538,11 +1475,6 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate {Version: version.MustParse("1.22"), Default: true, PreRelease: featuregate.Beta}, }, - PodIndexLabel: { - {Version: version.MustParse("1.28"), Default: true, PreRelease: featuregate.Beta}, - {Version: version.MustParse("1.32"), Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.35 - }, - PodLevelResources: { {Version: version.MustParse("1.32"), Default: false, PreRelease: featuregate.Alpha}, {Version: version.MustParse("1.34"), Default: true, PreRelease: featuregate.Beta}, @@ -1598,11 +1530,6 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate {Version: version.MustParse("1.34"), Default: true, PreRelease: featuregate.Beta}, }, - // Policy is GA in first release, this gate only exists to disable the enforcement when emulating older minors - ProbeHostPodSecurityStandards: { - {Version: version.MustParse("1.34"), Default: true, PreRelease: featuregate.GA, LockToDefault: true}, - }, - ProcMountType: { {Version: version.MustParse("1.12"), Default: false, PreRelease: featuregate.Alpha}, {Version: version.MustParse("1.31"), Default: false, PreRelease: featuregate.Beta}, @@ -1679,7 +1606,7 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate }, SchedulerAsyncAPICalls: { - {Version: version.MustParse("1.34"), Default: true, PreRelease: featuregate.Beta}, + {Version: version.MustParse("1.34"), Default: false, PreRelease: featuregate.Beta}, }, SchedulerAsyncPreemption: { @@ -1743,18 +1670,6 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate {Version: version.MustParse("1.33"), Default: true, LockToDefault: true, PreRelease: featuregate.GA}, // GA in 1.33 remove in 1.36 }, - SizeMemoryBackedVolumes: { - {Version: version.MustParse("1.20"), Default: false, PreRelease: featuregate.Alpha}, - {Version: version.MustParse("1.22"), Default: true, PreRelease: featuregate.Beta}, - {Version: version.MustParse("1.32"), Default: true, LockToDefault: true, PreRelease: featuregate.GA}, - }, - - StatefulSetAutoDeletePVC: { - {Version: version.MustParse("1.23"), Default: false, PreRelease: featuregate.Alpha}, - {Version: version.MustParse("1.27"), Default: true, PreRelease: featuregate.Beta}, - {Version: version.MustParse("1.32"), Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // GA in 1.32, remove in 1.35 - }, - StorageCapacityScoring: { {Version: version.MustParse("1.33"), Default: false, PreRelease: featuregate.Alpha}, }, @@ -1945,6 +1860,14 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate {Version: version.MustParse("1.33"), Default: false, PreRelease: featuregate.Beta}, }, + genericfeatures.DeclarativeValidation: { + {Version: version.MustParse("1.33"), Default: true, PreRelease: featuregate.Beta}, + }, + + genericfeatures.DeclarativeValidationTakeover: { + {Version: version.MustParse("1.33"), Default: false, PreRelease: featuregate.Beta}, + }, + genericfeatures.DetectCacheInconsistency: { {Version: version.MustParse("1.34"), Default: true, PreRelease: featuregate.Beta}, }, @@ -2069,8 +1992,21 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate }, } +// defaultKubernetesFeatureGateDependencies enumerates the dependencies of any feature gate that +// depends on another. Dependencies ensure that a dependent feature gate can only be enabled if all +// of its dependencies are also enabled, and ensures a feature at a higher stability level cannot +// depend on a less stable feature. +// +// Entries are alphabetized. +var defaultKubernetesFeatureGateDependencies = map[featuregate.Feature][]featuregate.Feature{ + InPlacePodVerticalScalingAllocatedStatus: {InPlacePodVerticalScaling}, + InPlacePodVerticalScalingExclusiveCPUs: {InPlacePodVerticalScaling}, + InPlacePodVerticalScalingExclusiveMemory: {InPlacePodVerticalScaling, MemoryManager}, +} + func init() { runtime.Must(utilfeature.DefaultMutableFeatureGate.AddVersioned(defaultVersionedKubernetesFeatureGates)) + runtime.Must(utilfeature.DefaultMutableFeatureGate.AddDependencies(defaultKubernetesFeatureGateDependencies)) runtime.Must(zpagesfeatures.AddFeatureGates(utilfeature.DefaultMutableFeatureGate)) // Register all client-go features with kube's feature gate instance and make all client-go diff --git a/pkg/generated/openapi/cmd/models-schema/main.go b/pkg/generated/openapi/cmd/models-schema/main.go index 1ea02a2036eeb..e3ca808c8e432 100644 --- a/pkg/generated/openapi/cmd/models-schema/main.go +++ b/pkg/generated/openapi/cmd/models-schema/main.go @@ -22,7 +22,6 @@ import ( "os" "k8s.io/kube-openapi/pkg/common" - "k8s.io/kube-openapi/pkg/util" "k8s.io/kube-openapi/pkg/validation/spec" "k8s.io/kubernetes/pkg/generated/openapi" ) @@ -38,7 +37,7 @@ func main() { func output() error { refFunc := func(name string) spec.Ref { - return spec.MustCreateRef(fmt.Sprintf("#/definitions/%s", util.ToRESTFriendlyName(name))) + return spec.MustCreateRef(fmt.Sprintf("#/definitions/%s", name)) } defs := openapi.GetOpenAPIDefinitions(refFunc) schemaDefs := make(map[string]spec.Schema, len(defs)) @@ -50,12 +49,12 @@ func output() error { // the type. if schema, ok := v.Schema.Extensions[common.ExtensionV2Schema]; ok { if v2Schema, isOpenAPISchema := schema.(spec.Schema); isOpenAPISchema { - schemaDefs[util.ToRESTFriendlyName(k)] = v2Schema + schemaDefs[k] = v2Schema continue } } - schemaDefs[util.ToRESTFriendlyName(k)] = v.Schema + schemaDefs[k] = v.Schema } data, err := json.Marshal(&spec.Swagger{ SwaggerProps: spec.SwaggerProps{ diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 1e27dfc6b6e81..d1acfb695e20d 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -22,1380 +22,1473 @@ limitations under the License. package openapi import ( - v1 "k8s.io/api/core/v1" + v1 "k8s.io/api/admissionregistration/v1" + v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" + v1beta1 "k8s.io/api/admissionregistration/v1beta1" + v2 "k8s.io/api/apidiscovery/v2" + v2beta1 "k8s.io/api/apidiscovery/v2beta1" + apiserverinternalv1alpha1 "k8s.io/api/apiserverinternal/v1alpha1" + appsv1 "k8s.io/api/apps/v1" + appsv1beta1 "k8s.io/api/apps/v1beta1" + v1beta2 "k8s.io/api/apps/v1beta2" + authenticationv1 "k8s.io/api/authentication/v1" + authenticationv1alpha1 "k8s.io/api/authentication/v1alpha1" + authenticationv1beta1 "k8s.io/api/authentication/v1beta1" + authorizationv1 "k8s.io/api/authorization/v1" + authorizationv1beta1 "k8s.io/api/authorization/v1beta1" + autoscalingv1 "k8s.io/api/autoscaling/v1" + autoscalingv2 "k8s.io/api/autoscaling/v2" + autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1" + v2beta2 "k8s.io/api/autoscaling/v2beta2" + batchv1 "k8s.io/api/batch/v1" + batchv1beta1 "k8s.io/api/batch/v1beta1" + certificatesv1 "k8s.io/api/certificates/v1" + certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1" + certificatesv1beta1 "k8s.io/api/certificates/v1beta1" + coordinationv1 "k8s.io/api/coordination/v1" + v1alpha2 "k8s.io/api/coordination/v1alpha2" + coordinationv1beta1 "k8s.io/api/coordination/v1beta1" + corev1 "k8s.io/api/core/v1" + discoveryv1 "k8s.io/api/discovery/v1" + discoveryv1beta1 "k8s.io/api/discovery/v1beta1" + eventsv1 "k8s.io/api/events/v1" + eventsv1beta1 "k8s.io/api/events/v1beta1" + extensionsv1beta1 "k8s.io/api/extensions/v1beta1" + flowcontrolv1 "k8s.io/api/flowcontrol/v1" + flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1" + flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" + v1beta3 "k8s.io/api/flowcontrol/v1beta3" + imagepolicyv1alpha1 "k8s.io/api/imagepolicy/v1alpha1" + networkingv1 "k8s.io/api/networking/v1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" + nodev1 "k8s.io/api/node/v1" + nodev1alpha1 "k8s.io/api/node/v1alpha1" + nodev1beta1 "k8s.io/api/node/v1beta1" + policyv1 "k8s.io/api/policy/v1" + policyv1beta1 "k8s.io/api/policy/v1beta1" + rbacv1 "k8s.io/api/rbac/v1" + rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" + rbacv1beta1 "k8s.io/api/rbac/v1beta1" + resourcev1 "k8s.io/api/resource/v1" + v1alpha3 "k8s.io/api/resource/v1alpha3" + resourcev1beta1 "k8s.io/api/resource/v1beta1" + resourcev1beta2 "k8s.io/api/resource/v1beta2" + schedulingv1 "k8s.io/api/scheduling/v1" + schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" + schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" + storagev1 "k8s.io/api/storage/v1" + storagev1alpha1 "k8s.io/api/storage/v1alpha1" + storagev1beta1 "k8s.io/api/storage/v1beta1" + storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - v1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" resource "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1" + testapigroupv1 "k8s.io/apimachinery/pkg/apis/testapigroup/v1" + runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" + version "k8s.io/apimachinery/pkg/version" + auditv1 "k8s.io/apiserver/pkg/apis/audit/v1" + clientauthenticationv1 "k8s.io/client-go/pkg/apis/clientauthentication/v1" + clientauthenticationv1beta1 "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" + configv1alpha1 "k8s.io/cloud-provider/config/v1alpha1" + nodeconfigv1alpha1 "k8s.io/cloud-provider/controllers/node/config/v1alpha1" + serviceconfigv1alpha1 "k8s.io/cloud-provider/controllers/service/config/v1alpha1" + componentbaseconfigv1alpha1 "k8s.io/component-base/config/v1alpha1" + logsapiv1 "k8s.io/component-base/logs/api/v1" + apiv1 "k8s.io/component-base/tracing/api/v1" + controllermanagerconfigv1alpha1 "k8s.io/controller-manager/config/v1alpha1" + configv1beta1 "k8s.io/controller-manager/config/v1beta1" + apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" + apiregistrationv1beta1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" + kubecontrollermanagerconfigv1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1" common "k8s.io/kube-openapi/pkg/common" spec "k8s.io/kube-openapi/pkg/validation/spec" + kubeproxyconfigv1alpha1 "k8s.io/kube-proxy/config/v1alpha1" + configv1 "k8s.io/kube-scheduler/config/v1" + pkgconfigv1alpha1 "k8s.io/kubectl/pkg/config/v1alpha1" + pkgconfigv1beta1 "k8s.io/kubectl/pkg/config/v1beta1" + kubeletconfigv1 "k8s.io/kubelet/config/v1" + kubeletconfigv1alpha1 "k8s.io/kubelet/config/v1alpha1" + kubeletconfigv1beta1 "k8s.io/kubelet/config/v1beta1" + abacv1beta1 "k8s.io/kubernetes/pkg/apis/abac/v1beta1" + custommetricsv1beta1 "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1" + custommetricsv1beta2 "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2" + externalmetricsv1beta1 "k8s.io/metrics/pkg/apis/external_metrics/v1beta1" + metricsv1alpha1 "k8s.io/metrics/pkg/apis/metrics/v1alpha1" + metricsv1beta1 "k8s.io/metrics/pkg/apis/metrics/v1beta1" ) func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "k8s.io/api/admissionregistration/v1.AuditAnnotation": schema_k8sio_api_admissionregistration_v1_AuditAnnotation(ref), - "k8s.io/api/admissionregistration/v1.ExpressionWarning": schema_k8sio_api_admissionregistration_v1_ExpressionWarning(ref), - "k8s.io/api/admissionregistration/v1.MatchCondition": schema_k8sio_api_admissionregistration_v1_MatchCondition(ref), - "k8s.io/api/admissionregistration/v1.MatchResources": schema_k8sio_api_admissionregistration_v1_MatchResources(ref), - "k8s.io/api/admissionregistration/v1.MutatingWebhook": schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref), - "k8s.io/api/admissionregistration/v1.MutatingWebhookConfiguration": schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfiguration(ref), - "k8s.io/api/admissionregistration/v1.MutatingWebhookConfigurationList": schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfigurationList(ref), - "k8s.io/api/admissionregistration/v1.NamedRuleWithOperations": schema_k8sio_api_admissionregistration_v1_NamedRuleWithOperations(ref), - "k8s.io/api/admissionregistration/v1.ParamKind": schema_k8sio_api_admissionregistration_v1_ParamKind(ref), - "k8s.io/api/admissionregistration/v1.ParamRef": schema_k8sio_api_admissionregistration_v1_ParamRef(ref), - "k8s.io/api/admissionregistration/v1.Rule": schema_k8sio_api_admissionregistration_v1_Rule(ref), - "k8s.io/api/admissionregistration/v1.RuleWithOperations": schema_k8sio_api_admissionregistration_v1_RuleWithOperations(ref), - "k8s.io/api/admissionregistration/v1.ServiceReference": schema_k8sio_api_admissionregistration_v1_ServiceReference(ref), - "k8s.io/api/admissionregistration/v1.TypeChecking": schema_k8sio_api_admissionregistration_v1_TypeChecking(ref), - "k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicy": schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicy(ref), - "k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicyBinding": schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyBinding(ref), - "k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicyBindingList": schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyBindingList(ref), - "k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicyBindingSpec": schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyBindingSpec(ref), - "k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicyList": schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyList(ref), - "k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicySpec": schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicySpec(ref), - "k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicyStatus": schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyStatus(ref), - "k8s.io/api/admissionregistration/v1.ValidatingWebhook": schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref), - "k8s.io/api/admissionregistration/v1.ValidatingWebhookConfiguration": schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfiguration(ref), - "k8s.io/api/admissionregistration/v1.ValidatingWebhookConfigurationList": schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfigurationList(ref), - "k8s.io/api/admissionregistration/v1.Validation": schema_k8sio_api_admissionregistration_v1_Validation(ref), - "k8s.io/api/admissionregistration/v1.Variable": schema_k8sio_api_admissionregistration_v1_Variable(ref), - "k8s.io/api/admissionregistration/v1.WebhookClientConfig": schema_k8sio_api_admissionregistration_v1_WebhookClientConfig(ref), - "k8s.io/api/admissionregistration/v1alpha1.ApplyConfiguration": schema_k8sio_api_admissionregistration_v1alpha1_ApplyConfiguration(ref), - "k8s.io/api/admissionregistration/v1alpha1.AuditAnnotation": schema_k8sio_api_admissionregistration_v1alpha1_AuditAnnotation(ref), - "k8s.io/api/admissionregistration/v1alpha1.ExpressionWarning": schema_k8sio_api_admissionregistration_v1alpha1_ExpressionWarning(ref), - "k8s.io/api/admissionregistration/v1alpha1.JSONPatch": schema_k8sio_api_admissionregistration_v1alpha1_JSONPatch(ref), - "k8s.io/api/admissionregistration/v1alpha1.MatchCondition": schema_k8sio_api_admissionregistration_v1alpha1_MatchCondition(ref), - "k8s.io/api/admissionregistration/v1alpha1.MatchResources": schema_k8sio_api_admissionregistration_v1alpha1_MatchResources(ref), - "k8s.io/api/admissionregistration/v1alpha1.MutatingAdmissionPolicy": schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicy(ref), - "k8s.io/api/admissionregistration/v1alpha1.MutatingAdmissionPolicyBinding": schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyBinding(ref), - "k8s.io/api/admissionregistration/v1alpha1.MutatingAdmissionPolicyBindingList": schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyBindingList(ref), - "k8s.io/api/admissionregistration/v1alpha1.MutatingAdmissionPolicyBindingSpec": schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyBindingSpec(ref), - "k8s.io/api/admissionregistration/v1alpha1.MutatingAdmissionPolicyList": schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyList(ref), - "k8s.io/api/admissionregistration/v1alpha1.MutatingAdmissionPolicySpec": schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicySpec(ref), - "k8s.io/api/admissionregistration/v1alpha1.Mutation": schema_k8sio_api_admissionregistration_v1alpha1_Mutation(ref), - "k8s.io/api/admissionregistration/v1alpha1.NamedRuleWithOperations": schema_k8sio_api_admissionregistration_v1alpha1_NamedRuleWithOperations(ref), - "k8s.io/api/admissionregistration/v1alpha1.ParamKind": schema_k8sio_api_admissionregistration_v1alpha1_ParamKind(ref), - "k8s.io/api/admissionregistration/v1alpha1.ParamRef": schema_k8sio_api_admissionregistration_v1alpha1_ParamRef(ref), - "k8s.io/api/admissionregistration/v1alpha1.TypeChecking": schema_k8sio_api_admissionregistration_v1alpha1_TypeChecking(ref), - "k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicy": schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicy(ref), - "k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicyBinding": schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyBinding(ref), - "k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicyBindingList": schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyBindingList(ref), - "k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicyBindingSpec": schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyBindingSpec(ref), - "k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicyList": schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyList(ref), - "k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicySpec": schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicySpec(ref), - "k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicyStatus": schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyStatus(ref), - "k8s.io/api/admissionregistration/v1alpha1.Validation": schema_k8sio_api_admissionregistration_v1alpha1_Validation(ref), - "k8s.io/api/admissionregistration/v1alpha1.Variable": schema_k8sio_api_admissionregistration_v1alpha1_Variable(ref), - "k8s.io/api/admissionregistration/v1beta1.ApplyConfiguration": schema_k8sio_api_admissionregistration_v1beta1_ApplyConfiguration(ref), - "k8s.io/api/admissionregistration/v1beta1.AuditAnnotation": schema_k8sio_api_admissionregistration_v1beta1_AuditAnnotation(ref), - "k8s.io/api/admissionregistration/v1beta1.ExpressionWarning": schema_k8sio_api_admissionregistration_v1beta1_ExpressionWarning(ref), - "k8s.io/api/admissionregistration/v1beta1.JSONPatch": schema_k8sio_api_admissionregistration_v1beta1_JSONPatch(ref), - "k8s.io/api/admissionregistration/v1beta1.MatchCondition": schema_k8sio_api_admissionregistration_v1beta1_MatchCondition(ref), - "k8s.io/api/admissionregistration/v1beta1.MatchResources": schema_k8sio_api_admissionregistration_v1beta1_MatchResources(ref), - "k8s.io/api/admissionregistration/v1beta1.MutatingAdmissionPolicy": schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicy(ref), - "k8s.io/api/admissionregistration/v1beta1.MutatingAdmissionPolicyBinding": schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyBinding(ref), - "k8s.io/api/admissionregistration/v1beta1.MutatingAdmissionPolicyBindingList": schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyBindingList(ref), - "k8s.io/api/admissionregistration/v1beta1.MutatingAdmissionPolicyBindingSpec": schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyBindingSpec(ref), - "k8s.io/api/admissionregistration/v1beta1.MutatingAdmissionPolicyList": schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyList(ref), - "k8s.io/api/admissionregistration/v1beta1.MutatingAdmissionPolicySpec": schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicySpec(ref), - "k8s.io/api/admissionregistration/v1beta1.MutatingWebhook": schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref), - "k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration": schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration(ref), - "k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfigurationList": schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfigurationList(ref), - "k8s.io/api/admissionregistration/v1beta1.Mutation": schema_k8sio_api_admissionregistration_v1beta1_Mutation(ref), - "k8s.io/api/admissionregistration/v1beta1.NamedRuleWithOperations": schema_k8sio_api_admissionregistration_v1beta1_NamedRuleWithOperations(ref), - "k8s.io/api/admissionregistration/v1beta1.ParamKind": schema_k8sio_api_admissionregistration_v1beta1_ParamKind(ref), - "k8s.io/api/admissionregistration/v1beta1.ParamRef": schema_k8sio_api_admissionregistration_v1beta1_ParamRef(ref), - "k8s.io/api/admissionregistration/v1beta1.ServiceReference": schema_k8sio_api_admissionregistration_v1beta1_ServiceReference(ref), - "k8s.io/api/admissionregistration/v1beta1.TypeChecking": schema_k8sio_api_admissionregistration_v1beta1_TypeChecking(ref), - "k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicy": schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicy(ref), - "k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicyBinding": schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyBinding(ref), - "k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicyBindingList": schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyBindingList(ref), - "k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicyBindingSpec": schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyBindingSpec(ref), - "k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicyList": schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyList(ref), - "k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicySpec": schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicySpec(ref), - "k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicyStatus": schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyStatus(ref), - "k8s.io/api/admissionregistration/v1beta1.ValidatingWebhook": schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref), - "k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfiguration": schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfiguration(ref), - "k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfigurationList": schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurationList(ref), - "k8s.io/api/admissionregistration/v1beta1.Validation": schema_k8sio_api_admissionregistration_v1beta1_Validation(ref), - "k8s.io/api/admissionregistration/v1beta1.Variable": schema_k8sio_api_admissionregistration_v1beta1_Variable(ref), - "k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig": schema_k8sio_api_admissionregistration_v1beta1_WebhookClientConfig(ref), - "k8s.io/api/apidiscovery/v2.APIGroupDiscovery": schema_k8sio_api_apidiscovery_v2_APIGroupDiscovery(ref), - "k8s.io/api/apidiscovery/v2.APIGroupDiscoveryList": schema_k8sio_api_apidiscovery_v2_APIGroupDiscoveryList(ref), - "k8s.io/api/apidiscovery/v2.APIResourceDiscovery": schema_k8sio_api_apidiscovery_v2_APIResourceDiscovery(ref), - "k8s.io/api/apidiscovery/v2.APISubresourceDiscovery": schema_k8sio_api_apidiscovery_v2_APISubresourceDiscovery(ref), - "k8s.io/api/apidiscovery/v2.APIVersionDiscovery": schema_k8sio_api_apidiscovery_v2_APIVersionDiscovery(ref), - "k8s.io/api/apidiscovery/v2beta1.APIGroupDiscovery": schema_k8sio_api_apidiscovery_v2beta1_APIGroupDiscovery(ref), - "k8s.io/api/apidiscovery/v2beta1.APIGroupDiscoveryList": schema_k8sio_api_apidiscovery_v2beta1_APIGroupDiscoveryList(ref), - "k8s.io/api/apidiscovery/v2beta1.APIResourceDiscovery": schema_k8sio_api_apidiscovery_v2beta1_APIResourceDiscovery(ref), - "k8s.io/api/apidiscovery/v2beta1.APISubresourceDiscovery": schema_k8sio_api_apidiscovery_v2beta1_APISubresourceDiscovery(ref), - "k8s.io/api/apidiscovery/v2beta1.APIVersionDiscovery": schema_k8sio_api_apidiscovery_v2beta1_APIVersionDiscovery(ref), - "k8s.io/api/apiserverinternal/v1alpha1.ServerStorageVersion": schema_k8sio_api_apiserverinternal_v1alpha1_ServerStorageVersion(ref), - "k8s.io/api/apiserverinternal/v1alpha1.StorageVersion": schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersion(ref), - "k8s.io/api/apiserverinternal/v1alpha1.StorageVersionCondition": schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionCondition(ref), - "k8s.io/api/apiserverinternal/v1alpha1.StorageVersionList": schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionList(ref), - "k8s.io/api/apiserverinternal/v1alpha1.StorageVersionSpec": schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionSpec(ref), - "k8s.io/api/apiserverinternal/v1alpha1.StorageVersionStatus": schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionStatus(ref), - "k8s.io/api/apps/v1.ControllerRevision": schema_k8sio_api_apps_v1_ControllerRevision(ref), - "k8s.io/api/apps/v1.ControllerRevisionList": schema_k8sio_api_apps_v1_ControllerRevisionList(ref), - "k8s.io/api/apps/v1.DaemonSet": schema_k8sio_api_apps_v1_DaemonSet(ref), - "k8s.io/api/apps/v1.DaemonSetCondition": schema_k8sio_api_apps_v1_DaemonSetCondition(ref), - "k8s.io/api/apps/v1.DaemonSetList": schema_k8sio_api_apps_v1_DaemonSetList(ref), - "k8s.io/api/apps/v1.DaemonSetSpec": schema_k8sio_api_apps_v1_DaemonSetSpec(ref), - "k8s.io/api/apps/v1.DaemonSetStatus": schema_k8sio_api_apps_v1_DaemonSetStatus(ref), - "k8s.io/api/apps/v1.DaemonSetUpdateStrategy": schema_k8sio_api_apps_v1_DaemonSetUpdateStrategy(ref), - "k8s.io/api/apps/v1.Deployment": schema_k8sio_api_apps_v1_Deployment(ref), - "k8s.io/api/apps/v1.DeploymentCondition": schema_k8sio_api_apps_v1_DeploymentCondition(ref), - "k8s.io/api/apps/v1.DeploymentList": schema_k8sio_api_apps_v1_DeploymentList(ref), - "k8s.io/api/apps/v1.DeploymentSpec": schema_k8sio_api_apps_v1_DeploymentSpec(ref), - "k8s.io/api/apps/v1.DeploymentStatus": schema_k8sio_api_apps_v1_DeploymentStatus(ref), - "k8s.io/api/apps/v1.DeploymentStrategy": schema_k8sio_api_apps_v1_DeploymentStrategy(ref), - "k8s.io/api/apps/v1.ReplicaSet": schema_k8sio_api_apps_v1_ReplicaSet(ref), - "k8s.io/api/apps/v1.ReplicaSetCondition": schema_k8sio_api_apps_v1_ReplicaSetCondition(ref), - "k8s.io/api/apps/v1.ReplicaSetList": schema_k8sio_api_apps_v1_ReplicaSetList(ref), - "k8s.io/api/apps/v1.ReplicaSetSpec": schema_k8sio_api_apps_v1_ReplicaSetSpec(ref), - "k8s.io/api/apps/v1.ReplicaSetStatus": schema_k8sio_api_apps_v1_ReplicaSetStatus(ref), - "k8s.io/api/apps/v1.RollingUpdateDaemonSet": schema_k8sio_api_apps_v1_RollingUpdateDaemonSet(ref), - "k8s.io/api/apps/v1.RollingUpdateDeployment": schema_k8sio_api_apps_v1_RollingUpdateDeployment(ref), - "k8s.io/api/apps/v1.RollingUpdateStatefulSetStrategy": schema_k8sio_api_apps_v1_RollingUpdateStatefulSetStrategy(ref), - "k8s.io/api/apps/v1.StatefulSet": schema_k8sio_api_apps_v1_StatefulSet(ref), - "k8s.io/api/apps/v1.StatefulSetCondition": schema_k8sio_api_apps_v1_StatefulSetCondition(ref), - "k8s.io/api/apps/v1.StatefulSetList": schema_k8sio_api_apps_v1_StatefulSetList(ref), - "k8s.io/api/apps/v1.StatefulSetOrdinals": schema_k8sio_api_apps_v1_StatefulSetOrdinals(ref), - "k8s.io/api/apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy": schema_k8sio_api_apps_v1_StatefulSetPersistentVolumeClaimRetentionPolicy(ref), - "k8s.io/api/apps/v1.StatefulSetSpec": schema_k8sio_api_apps_v1_StatefulSetSpec(ref), - "k8s.io/api/apps/v1.StatefulSetStatus": schema_k8sio_api_apps_v1_StatefulSetStatus(ref), - "k8s.io/api/apps/v1.StatefulSetUpdateStrategy": schema_k8sio_api_apps_v1_StatefulSetUpdateStrategy(ref), - "k8s.io/api/apps/v1beta1.ControllerRevision": schema_k8sio_api_apps_v1beta1_ControllerRevision(ref), - "k8s.io/api/apps/v1beta1.ControllerRevisionList": schema_k8sio_api_apps_v1beta1_ControllerRevisionList(ref), - "k8s.io/api/apps/v1beta1.Deployment": schema_k8sio_api_apps_v1beta1_Deployment(ref), - "k8s.io/api/apps/v1beta1.DeploymentCondition": schema_k8sio_api_apps_v1beta1_DeploymentCondition(ref), - "k8s.io/api/apps/v1beta1.DeploymentList": schema_k8sio_api_apps_v1beta1_DeploymentList(ref), - "k8s.io/api/apps/v1beta1.DeploymentRollback": schema_k8sio_api_apps_v1beta1_DeploymentRollback(ref), - "k8s.io/api/apps/v1beta1.DeploymentSpec": schema_k8sio_api_apps_v1beta1_DeploymentSpec(ref), - "k8s.io/api/apps/v1beta1.DeploymentStatus": schema_k8sio_api_apps_v1beta1_DeploymentStatus(ref), - "k8s.io/api/apps/v1beta1.DeploymentStrategy": schema_k8sio_api_apps_v1beta1_DeploymentStrategy(ref), - "k8s.io/api/apps/v1beta1.RollbackConfig": schema_k8sio_api_apps_v1beta1_RollbackConfig(ref), - "k8s.io/api/apps/v1beta1.RollingUpdateDeployment": schema_k8sio_api_apps_v1beta1_RollingUpdateDeployment(ref), - "k8s.io/api/apps/v1beta1.RollingUpdateStatefulSetStrategy": schema_k8sio_api_apps_v1beta1_RollingUpdateStatefulSetStrategy(ref), - "k8s.io/api/apps/v1beta1.Scale": schema_k8sio_api_apps_v1beta1_Scale(ref), - "k8s.io/api/apps/v1beta1.ScaleSpec": schema_k8sio_api_apps_v1beta1_ScaleSpec(ref), - "k8s.io/api/apps/v1beta1.ScaleStatus": schema_k8sio_api_apps_v1beta1_ScaleStatus(ref), - "k8s.io/api/apps/v1beta1.StatefulSet": schema_k8sio_api_apps_v1beta1_StatefulSet(ref), - "k8s.io/api/apps/v1beta1.StatefulSetCondition": schema_k8sio_api_apps_v1beta1_StatefulSetCondition(ref), - "k8s.io/api/apps/v1beta1.StatefulSetList": schema_k8sio_api_apps_v1beta1_StatefulSetList(ref), - "k8s.io/api/apps/v1beta1.StatefulSetOrdinals": schema_k8sio_api_apps_v1beta1_StatefulSetOrdinals(ref), - "k8s.io/api/apps/v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy": schema_k8sio_api_apps_v1beta1_StatefulSetPersistentVolumeClaimRetentionPolicy(ref), - "k8s.io/api/apps/v1beta1.StatefulSetSpec": schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref), - "k8s.io/api/apps/v1beta1.StatefulSetStatus": schema_k8sio_api_apps_v1beta1_StatefulSetStatus(ref), - "k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy": schema_k8sio_api_apps_v1beta1_StatefulSetUpdateStrategy(ref), - "k8s.io/api/apps/v1beta2.ControllerRevision": schema_k8sio_api_apps_v1beta2_ControllerRevision(ref), - "k8s.io/api/apps/v1beta2.ControllerRevisionList": schema_k8sio_api_apps_v1beta2_ControllerRevisionList(ref), - "k8s.io/api/apps/v1beta2.DaemonSet": schema_k8sio_api_apps_v1beta2_DaemonSet(ref), - "k8s.io/api/apps/v1beta2.DaemonSetCondition": schema_k8sio_api_apps_v1beta2_DaemonSetCondition(ref), - "k8s.io/api/apps/v1beta2.DaemonSetList": schema_k8sio_api_apps_v1beta2_DaemonSetList(ref), - "k8s.io/api/apps/v1beta2.DaemonSetSpec": schema_k8sio_api_apps_v1beta2_DaemonSetSpec(ref), - "k8s.io/api/apps/v1beta2.DaemonSetStatus": schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref), - "k8s.io/api/apps/v1beta2.DaemonSetUpdateStrategy": schema_k8sio_api_apps_v1beta2_DaemonSetUpdateStrategy(ref), - "k8s.io/api/apps/v1beta2.Deployment": schema_k8sio_api_apps_v1beta2_Deployment(ref), - "k8s.io/api/apps/v1beta2.DeploymentCondition": schema_k8sio_api_apps_v1beta2_DeploymentCondition(ref), - "k8s.io/api/apps/v1beta2.DeploymentList": schema_k8sio_api_apps_v1beta2_DeploymentList(ref), - "k8s.io/api/apps/v1beta2.DeploymentSpec": schema_k8sio_api_apps_v1beta2_DeploymentSpec(ref), - "k8s.io/api/apps/v1beta2.DeploymentStatus": schema_k8sio_api_apps_v1beta2_DeploymentStatus(ref), - "k8s.io/api/apps/v1beta2.DeploymentStrategy": schema_k8sio_api_apps_v1beta2_DeploymentStrategy(ref), - "k8s.io/api/apps/v1beta2.ReplicaSet": schema_k8sio_api_apps_v1beta2_ReplicaSet(ref), - "k8s.io/api/apps/v1beta2.ReplicaSetCondition": schema_k8sio_api_apps_v1beta2_ReplicaSetCondition(ref), - "k8s.io/api/apps/v1beta2.ReplicaSetList": schema_k8sio_api_apps_v1beta2_ReplicaSetList(ref), - "k8s.io/api/apps/v1beta2.ReplicaSetSpec": schema_k8sio_api_apps_v1beta2_ReplicaSetSpec(ref), - "k8s.io/api/apps/v1beta2.ReplicaSetStatus": schema_k8sio_api_apps_v1beta2_ReplicaSetStatus(ref), - "k8s.io/api/apps/v1beta2.RollingUpdateDaemonSet": schema_k8sio_api_apps_v1beta2_RollingUpdateDaemonSet(ref), - "k8s.io/api/apps/v1beta2.RollingUpdateDeployment": schema_k8sio_api_apps_v1beta2_RollingUpdateDeployment(ref), - "k8s.io/api/apps/v1beta2.RollingUpdateStatefulSetStrategy": schema_k8sio_api_apps_v1beta2_RollingUpdateStatefulSetStrategy(ref), - "k8s.io/api/apps/v1beta2.Scale": schema_k8sio_api_apps_v1beta2_Scale(ref), - "k8s.io/api/apps/v1beta2.ScaleSpec": schema_k8sio_api_apps_v1beta2_ScaleSpec(ref), - "k8s.io/api/apps/v1beta2.ScaleStatus": schema_k8sio_api_apps_v1beta2_ScaleStatus(ref), - "k8s.io/api/apps/v1beta2.StatefulSet": schema_k8sio_api_apps_v1beta2_StatefulSet(ref), - "k8s.io/api/apps/v1beta2.StatefulSetCondition": schema_k8sio_api_apps_v1beta2_StatefulSetCondition(ref), - "k8s.io/api/apps/v1beta2.StatefulSetList": schema_k8sio_api_apps_v1beta2_StatefulSetList(ref), - "k8s.io/api/apps/v1beta2.StatefulSetOrdinals": schema_k8sio_api_apps_v1beta2_StatefulSetOrdinals(ref), - "k8s.io/api/apps/v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy": schema_k8sio_api_apps_v1beta2_StatefulSetPersistentVolumeClaimRetentionPolicy(ref), - "k8s.io/api/apps/v1beta2.StatefulSetSpec": schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref), - "k8s.io/api/apps/v1beta2.StatefulSetStatus": schema_k8sio_api_apps_v1beta2_StatefulSetStatus(ref), - "k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy": schema_k8sio_api_apps_v1beta2_StatefulSetUpdateStrategy(ref), - "k8s.io/api/authentication/v1.BoundObjectReference": schema_k8sio_api_authentication_v1_BoundObjectReference(ref), - "k8s.io/api/authentication/v1.SelfSubjectReview": schema_k8sio_api_authentication_v1_SelfSubjectReview(ref), - "k8s.io/api/authentication/v1.SelfSubjectReviewStatus": schema_k8sio_api_authentication_v1_SelfSubjectReviewStatus(ref), - "k8s.io/api/authentication/v1.TokenRequest": schema_k8sio_api_authentication_v1_TokenRequest(ref), - "k8s.io/api/authentication/v1.TokenRequestSpec": schema_k8sio_api_authentication_v1_TokenRequestSpec(ref), - "k8s.io/api/authentication/v1.TokenRequestStatus": schema_k8sio_api_authentication_v1_TokenRequestStatus(ref), - "k8s.io/api/authentication/v1.TokenReview": schema_k8sio_api_authentication_v1_TokenReview(ref), - "k8s.io/api/authentication/v1.TokenReviewSpec": schema_k8sio_api_authentication_v1_TokenReviewSpec(ref), - "k8s.io/api/authentication/v1.TokenReviewStatus": schema_k8sio_api_authentication_v1_TokenReviewStatus(ref), - "k8s.io/api/authentication/v1.UserInfo": schema_k8sio_api_authentication_v1_UserInfo(ref), - "k8s.io/api/authentication/v1alpha1.SelfSubjectReview": schema_k8sio_api_authentication_v1alpha1_SelfSubjectReview(ref), - "k8s.io/api/authentication/v1alpha1.SelfSubjectReviewStatus": schema_k8sio_api_authentication_v1alpha1_SelfSubjectReviewStatus(ref), - "k8s.io/api/authentication/v1beta1.SelfSubjectReview": schema_k8sio_api_authentication_v1beta1_SelfSubjectReview(ref), - "k8s.io/api/authentication/v1beta1.SelfSubjectReviewStatus": schema_k8sio_api_authentication_v1beta1_SelfSubjectReviewStatus(ref), - "k8s.io/api/authentication/v1beta1.TokenReview": schema_k8sio_api_authentication_v1beta1_TokenReview(ref), - "k8s.io/api/authentication/v1beta1.TokenReviewSpec": schema_k8sio_api_authentication_v1beta1_TokenReviewSpec(ref), - "k8s.io/api/authentication/v1beta1.TokenReviewStatus": schema_k8sio_api_authentication_v1beta1_TokenReviewStatus(ref), - "k8s.io/api/authentication/v1beta1.UserInfo": schema_k8sio_api_authentication_v1beta1_UserInfo(ref), - "k8s.io/api/authorization/v1.FieldSelectorAttributes": schema_k8sio_api_authorization_v1_FieldSelectorAttributes(ref), - "k8s.io/api/authorization/v1.LabelSelectorAttributes": schema_k8sio_api_authorization_v1_LabelSelectorAttributes(ref), - "k8s.io/api/authorization/v1.LocalSubjectAccessReview": schema_k8sio_api_authorization_v1_LocalSubjectAccessReview(ref), - "k8s.io/api/authorization/v1.NonResourceAttributes": schema_k8sio_api_authorization_v1_NonResourceAttributes(ref), - "k8s.io/api/authorization/v1.NonResourceRule": schema_k8sio_api_authorization_v1_NonResourceRule(ref), - "k8s.io/api/authorization/v1.ResourceAttributes": schema_k8sio_api_authorization_v1_ResourceAttributes(ref), - "k8s.io/api/authorization/v1.ResourceRule": schema_k8sio_api_authorization_v1_ResourceRule(ref), - "k8s.io/api/authorization/v1.SelfSubjectAccessReview": schema_k8sio_api_authorization_v1_SelfSubjectAccessReview(ref), - "k8s.io/api/authorization/v1.SelfSubjectAccessReviewSpec": schema_k8sio_api_authorization_v1_SelfSubjectAccessReviewSpec(ref), - "k8s.io/api/authorization/v1.SelfSubjectRulesReview": schema_k8sio_api_authorization_v1_SelfSubjectRulesReview(ref), - "k8s.io/api/authorization/v1.SelfSubjectRulesReviewSpec": schema_k8sio_api_authorization_v1_SelfSubjectRulesReviewSpec(ref), - "k8s.io/api/authorization/v1.SubjectAccessReview": schema_k8sio_api_authorization_v1_SubjectAccessReview(ref), - "k8s.io/api/authorization/v1.SubjectAccessReviewSpec": schema_k8sio_api_authorization_v1_SubjectAccessReviewSpec(ref), - "k8s.io/api/authorization/v1.SubjectAccessReviewStatus": schema_k8sio_api_authorization_v1_SubjectAccessReviewStatus(ref), - "k8s.io/api/authorization/v1.SubjectRulesReviewStatus": schema_k8sio_api_authorization_v1_SubjectRulesReviewStatus(ref), - "k8s.io/api/authorization/v1beta1.LocalSubjectAccessReview": schema_k8sio_api_authorization_v1beta1_LocalSubjectAccessReview(ref), - "k8s.io/api/authorization/v1beta1.NonResourceAttributes": schema_k8sio_api_authorization_v1beta1_NonResourceAttributes(ref), - "k8s.io/api/authorization/v1beta1.NonResourceRule": schema_k8sio_api_authorization_v1beta1_NonResourceRule(ref), - "k8s.io/api/authorization/v1beta1.ResourceAttributes": schema_k8sio_api_authorization_v1beta1_ResourceAttributes(ref), - "k8s.io/api/authorization/v1beta1.ResourceRule": schema_k8sio_api_authorization_v1beta1_ResourceRule(ref), - "k8s.io/api/authorization/v1beta1.SelfSubjectAccessReview": schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReview(ref), - "k8s.io/api/authorization/v1beta1.SelfSubjectAccessReviewSpec": schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReviewSpec(ref), - "k8s.io/api/authorization/v1beta1.SelfSubjectRulesReview": schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReview(ref), - "k8s.io/api/authorization/v1beta1.SelfSubjectRulesReviewSpec": schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReviewSpec(ref), - "k8s.io/api/authorization/v1beta1.SubjectAccessReview": schema_k8sio_api_authorization_v1beta1_SubjectAccessReview(ref), - "k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec": schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewSpec(ref), - "k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus": schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewStatus(ref), - "k8s.io/api/authorization/v1beta1.SubjectRulesReviewStatus": schema_k8sio_api_authorization_v1beta1_SubjectRulesReviewStatus(ref), - "k8s.io/api/autoscaling/v1.ContainerResourceMetricSource": schema_k8sio_api_autoscaling_v1_ContainerResourceMetricSource(ref), - "k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus": schema_k8sio_api_autoscaling_v1_ContainerResourceMetricStatus(ref), - "k8s.io/api/autoscaling/v1.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref), - "k8s.io/api/autoscaling/v1.ExternalMetricSource": schema_k8sio_api_autoscaling_v1_ExternalMetricSource(ref), - "k8s.io/api/autoscaling/v1.ExternalMetricStatus": schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref), - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref), - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerCondition": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref), - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerList": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref), - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref), - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref), - "k8s.io/api/autoscaling/v1.MetricSpec": schema_k8sio_api_autoscaling_v1_MetricSpec(ref), - "k8s.io/api/autoscaling/v1.MetricStatus": schema_k8sio_api_autoscaling_v1_MetricStatus(ref), - "k8s.io/api/autoscaling/v1.ObjectMetricSource": schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref), - "k8s.io/api/autoscaling/v1.ObjectMetricStatus": schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref), - "k8s.io/api/autoscaling/v1.PodsMetricSource": schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref), - "k8s.io/api/autoscaling/v1.PodsMetricStatus": schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref), - "k8s.io/api/autoscaling/v1.ResourceMetricSource": schema_k8sio_api_autoscaling_v1_ResourceMetricSource(ref), - "k8s.io/api/autoscaling/v1.ResourceMetricStatus": schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref), - "k8s.io/api/autoscaling/v1.Scale": schema_k8sio_api_autoscaling_v1_Scale(ref), - "k8s.io/api/autoscaling/v1.ScaleSpec": schema_k8sio_api_autoscaling_v1_ScaleSpec(ref), - "k8s.io/api/autoscaling/v1.ScaleStatus": schema_k8sio_api_autoscaling_v1_ScaleStatus(ref), - "k8s.io/api/autoscaling/v2.ContainerResourceMetricSource": schema_k8sio_api_autoscaling_v2_ContainerResourceMetricSource(ref), - "k8s.io/api/autoscaling/v2.ContainerResourceMetricStatus": schema_k8sio_api_autoscaling_v2_ContainerResourceMetricStatus(ref), - "k8s.io/api/autoscaling/v2.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v2_CrossVersionObjectReference(ref), - "k8s.io/api/autoscaling/v2.ExternalMetricSource": schema_k8sio_api_autoscaling_v2_ExternalMetricSource(ref), - "k8s.io/api/autoscaling/v2.ExternalMetricStatus": schema_k8sio_api_autoscaling_v2_ExternalMetricStatus(ref), - "k8s.io/api/autoscaling/v2.HPAScalingPolicy": schema_k8sio_api_autoscaling_v2_HPAScalingPolicy(ref), - "k8s.io/api/autoscaling/v2.HPAScalingRules": schema_k8sio_api_autoscaling_v2_HPAScalingRules(ref), - "k8s.io/api/autoscaling/v2.HorizontalPodAutoscaler": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscaler(ref), - "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerBehavior": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerBehavior(ref), - "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerCondition": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerCondition(ref), - "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerList": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerList(ref), - "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerSpec": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerSpec(ref), - "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerStatus": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerStatus(ref), - "k8s.io/api/autoscaling/v2.MetricIdentifier": schema_k8sio_api_autoscaling_v2_MetricIdentifier(ref), - "k8s.io/api/autoscaling/v2.MetricSpec": schema_k8sio_api_autoscaling_v2_MetricSpec(ref), - "k8s.io/api/autoscaling/v2.MetricStatus": schema_k8sio_api_autoscaling_v2_MetricStatus(ref), - "k8s.io/api/autoscaling/v2.MetricTarget": schema_k8sio_api_autoscaling_v2_MetricTarget(ref), - "k8s.io/api/autoscaling/v2.MetricValueStatus": schema_k8sio_api_autoscaling_v2_MetricValueStatus(ref), - "k8s.io/api/autoscaling/v2.ObjectMetricSource": schema_k8sio_api_autoscaling_v2_ObjectMetricSource(ref), - "k8s.io/api/autoscaling/v2.ObjectMetricStatus": schema_k8sio_api_autoscaling_v2_ObjectMetricStatus(ref), - "k8s.io/api/autoscaling/v2.PodsMetricSource": schema_k8sio_api_autoscaling_v2_PodsMetricSource(ref), - "k8s.io/api/autoscaling/v2.PodsMetricStatus": schema_k8sio_api_autoscaling_v2_PodsMetricStatus(ref), - "k8s.io/api/autoscaling/v2.ResourceMetricSource": schema_k8sio_api_autoscaling_v2_ResourceMetricSource(ref), - "k8s.io/api/autoscaling/v2.ResourceMetricStatus": schema_k8sio_api_autoscaling_v2_ResourceMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricSource": schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricSource(ref), - "k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricStatus": schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v2beta1_CrossVersionObjectReference(ref), - "k8s.io/api/autoscaling/v2beta1.ExternalMetricSource": schema_k8sio_api_autoscaling_v2beta1_ExternalMetricSource(ref), - "k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus": schema_k8sio_api_autoscaling_v2beta1_ExternalMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscaler(ref), - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref), - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerList": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref), - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref), - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref), - "k8s.io/api/autoscaling/v2beta1.MetricSpec": schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref), - "k8s.io/api/autoscaling/v2beta1.MetricStatus": schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref), - "k8s.io/api/autoscaling/v2beta1.ObjectMetricSource": schema_k8sio_api_autoscaling_v2beta1_ObjectMetricSource(ref), - "k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus": schema_k8sio_api_autoscaling_v2beta1_ObjectMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta1.PodsMetricSource": schema_k8sio_api_autoscaling_v2beta1_PodsMetricSource(ref), - "k8s.io/api/autoscaling/v2beta1.PodsMetricStatus": schema_k8sio_api_autoscaling_v2beta1_PodsMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta1.ResourceMetricSource": schema_k8sio_api_autoscaling_v2beta1_ResourceMetricSource(ref), - "k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus": schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricSource": schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricSource(ref), - "k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricStatus": schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref), - "k8s.io/api/autoscaling/v2beta2.ExternalMetricSource": schema_k8sio_api_autoscaling_v2beta2_ExternalMetricSource(ref), - "k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus": schema_k8sio_api_autoscaling_v2beta2_ExternalMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy": schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref), - "k8s.io/api/autoscaling/v2beta2.HPAScalingRules": schema_k8sio_api_autoscaling_v2beta2_HPAScalingRules(ref), - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscaler(ref), - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerBehavior": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior(ref), - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref), - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerList": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref), - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref), - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref), - "k8s.io/api/autoscaling/v2beta2.MetricIdentifier": schema_k8sio_api_autoscaling_v2beta2_MetricIdentifier(ref), - "k8s.io/api/autoscaling/v2beta2.MetricSpec": schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref), - "k8s.io/api/autoscaling/v2beta2.MetricStatus": schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref), - "k8s.io/api/autoscaling/v2beta2.MetricTarget": schema_k8sio_api_autoscaling_v2beta2_MetricTarget(ref), - "k8s.io/api/autoscaling/v2beta2.MetricValueStatus": schema_k8sio_api_autoscaling_v2beta2_MetricValueStatus(ref), - "k8s.io/api/autoscaling/v2beta2.ObjectMetricSource": schema_k8sio_api_autoscaling_v2beta2_ObjectMetricSource(ref), - "k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus": schema_k8sio_api_autoscaling_v2beta2_ObjectMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta2.PodsMetricSource": schema_k8sio_api_autoscaling_v2beta2_PodsMetricSource(ref), - "k8s.io/api/autoscaling/v2beta2.PodsMetricStatus": schema_k8sio_api_autoscaling_v2beta2_PodsMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta2.ResourceMetricSource": schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref), - "k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus": schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref), - "k8s.io/api/batch/v1.CronJob": schema_k8sio_api_batch_v1_CronJob(ref), - "k8s.io/api/batch/v1.CronJobList": schema_k8sio_api_batch_v1_CronJobList(ref), - "k8s.io/api/batch/v1.CronJobSpec": schema_k8sio_api_batch_v1_CronJobSpec(ref), - "k8s.io/api/batch/v1.CronJobStatus": schema_k8sio_api_batch_v1_CronJobStatus(ref), - "k8s.io/api/batch/v1.Job": schema_k8sio_api_batch_v1_Job(ref), - "k8s.io/api/batch/v1.JobCondition": schema_k8sio_api_batch_v1_JobCondition(ref), - "k8s.io/api/batch/v1.JobList": schema_k8sio_api_batch_v1_JobList(ref), - "k8s.io/api/batch/v1.JobSpec": schema_k8sio_api_batch_v1_JobSpec(ref), - "k8s.io/api/batch/v1.JobStatus": schema_k8sio_api_batch_v1_JobStatus(ref), - "k8s.io/api/batch/v1.JobTemplateSpec": schema_k8sio_api_batch_v1_JobTemplateSpec(ref), - "k8s.io/api/batch/v1.PodFailurePolicy": schema_k8sio_api_batch_v1_PodFailurePolicy(ref), - "k8s.io/api/batch/v1.PodFailurePolicyOnExitCodesRequirement": schema_k8sio_api_batch_v1_PodFailurePolicyOnExitCodesRequirement(ref), - "k8s.io/api/batch/v1.PodFailurePolicyOnPodConditionsPattern": schema_k8sio_api_batch_v1_PodFailurePolicyOnPodConditionsPattern(ref), - "k8s.io/api/batch/v1.PodFailurePolicyRule": schema_k8sio_api_batch_v1_PodFailurePolicyRule(ref), - "k8s.io/api/batch/v1.SuccessPolicy": schema_k8sio_api_batch_v1_SuccessPolicy(ref), - "k8s.io/api/batch/v1.SuccessPolicyRule": schema_k8sio_api_batch_v1_SuccessPolicyRule(ref), - "k8s.io/api/batch/v1.UncountedTerminatedPods": schema_k8sio_api_batch_v1_UncountedTerminatedPods(ref), - "k8s.io/api/batch/v1beta1.CronJob": schema_k8sio_api_batch_v1beta1_CronJob(ref), - "k8s.io/api/batch/v1beta1.CronJobList": schema_k8sio_api_batch_v1beta1_CronJobList(ref), - "k8s.io/api/batch/v1beta1.CronJobSpec": schema_k8sio_api_batch_v1beta1_CronJobSpec(ref), - "k8s.io/api/batch/v1beta1.CronJobStatus": schema_k8sio_api_batch_v1beta1_CronJobStatus(ref), - "k8s.io/api/batch/v1beta1.JobTemplateSpec": schema_k8sio_api_batch_v1beta1_JobTemplateSpec(ref), - "k8s.io/api/certificates/v1.CertificateSigningRequest": schema_k8sio_api_certificates_v1_CertificateSigningRequest(ref), - "k8s.io/api/certificates/v1.CertificateSigningRequestCondition": schema_k8sio_api_certificates_v1_CertificateSigningRequestCondition(ref), - "k8s.io/api/certificates/v1.CertificateSigningRequestList": schema_k8sio_api_certificates_v1_CertificateSigningRequestList(ref), - "k8s.io/api/certificates/v1.CertificateSigningRequestSpec": schema_k8sio_api_certificates_v1_CertificateSigningRequestSpec(ref), - "k8s.io/api/certificates/v1.CertificateSigningRequestStatus": schema_k8sio_api_certificates_v1_CertificateSigningRequestStatus(ref), - "k8s.io/api/certificates/v1alpha1.ClusterTrustBundle": schema_k8sio_api_certificates_v1alpha1_ClusterTrustBundle(ref), - "k8s.io/api/certificates/v1alpha1.ClusterTrustBundleList": schema_k8sio_api_certificates_v1alpha1_ClusterTrustBundleList(ref), - "k8s.io/api/certificates/v1alpha1.ClusterTrustBundleSpec": schema_k8sio_api_certificates_v1alpha1_ClusterTrustBundleSpec(ref), - "k8s.io/api/certificates/v1alpha1.PodCertificateRequest": schema_k8sio_api_certificates_v1alpha1_PodCertificateRequest(ref), - "k8s.io/api/certificates/v1alpha1.PodCertificateRequestList": schema_k8sio_api_certificates_v1alpha1_PodCertificateRequestList(ref), - "k8s.io/api/certificates/v1alpha1.PodCertificateRequestSpec": schema_k8sio_api_certificates_v1alpha1_PodCertificateRequestSpec(ref), - "k8s.io/api/certificates/v1alpha1.PodCertificateRequestStatus": schema_k8sio_api_certificates_v1alpha1_PodCertificateRequestStatus(ref), - "k8s.io/api/certificates/v1beta1.CertificateSigningRequest": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequest(ref), - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestCondition(ref), - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestList": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref), - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestSpec(ref), - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestStatus(ref), - "k8s.io/api/certificates/v1beta1.ClusterTrustBundle": schema_k8sio_api_certificates_v1beta1_ClusterTrustBundle(ref), - "k8s.io/api/certificates/v1beta1.ClusterTrustBundleList": schema_k8sio_api_certificates_v1beta1_ClusterTrustBundleList(ref), - "k8s.io/api/certificates/v1beta1.ClusterTrustBundleSpec": schema_k8sio_api_certificates_v1beta1_ClusterTrustBundleSpec(ref), - "k8s.io/api/coordination/v1.Lease": schema_k8sio_api_coordination_v1_Lease(ref), - "k8s.io/api/coordination/v1.LeaseList": schema_k8sio_api_coordination_v1_LeaseList(ref), - "k8s.io/api/coordination/v1.LeaseSpec": schema_k8sio_api_coordination_v1_LeaseSpec(ref), - "k8s.io/api/coordination/v1alpha2.LeaseCandidate": schema_k8sio_api_coordination_v1alpha2_LeaseCandidate(ref), - "k8s.io/api/coordination/v1alpha2.LeaseCandidateList": schema_k8sio_api_coordination_v1alpha2_LeaseCandidateList(ref), - "k8s.io/api/coordination/v1alpha2.LeaseCandidateSpec": schema_k8sio_api_coordination_v1alpha2_LeaseCandidateSpec(ref), - "k8s.io/api/coordination/v1beta1.Lease": schema_k8sio_api_coordination_v1beta1_Lease(ref), - "k8s.io/api/coordination/v1beta1.LeaseCandidate": schema_k8sio_api_coordination_v1beta1_LeaseCandidate(ref), - "k8s.io/api/coordination/v1beta1.LeaseCandidateList": schema_k8sio_api_coordination_v1beta1_LeaseCandidateList(ref), - "k8s.io/api/coordination/v1beta1.LeaseCandidateSpec": schema_k8sio_api_coordination_v1beta1_LeaseCandidateSpec(ref), - "k8s.io/api/coordination/v1beta1.LeaseList": schema_k8sio_api_coordination_v1beta1_LeaseList(ref), - "k8s.io/api/coordination/v1beta1.LeaseSpec": schema_k8sio_api_coordination_v1beta1_LeaseSpec(ref), - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource": schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), - "k8s.io/api/core/v1.Affinity": schema_k8sio_api_core_v1_Affinity(ref), - "k8s.io/api/core/v1.AppArmorProfile": schema_k8sio_api_core_v1_AppArmorProfile(ref), - "k8s.io/api/core/v1.AttachedVolume": schema_k8sio_api_core_v1_AttachedVolume(ref), - "k8s.io/api/core/v1.AvoidPods": schema_k8sio_api_core_v1_AvoidPods(ref), - "k8s.io/api/core/v1.AzureDiskVolumeSource": schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref), - "k8s.io/api/core/v1.AzureFilePersistentVolumeSource": schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref), - "k8s.io/api/core/v1.AzureFileVolumeSource": schema_k8sio_api_core_v1_AzureFileVolumeSource(ref), - "k8s.io/api/core/v1.Binding": schema_k8sio_api_core_v1_Binding(ref), - "k8s.io/api/core/v1.CSIPersistentVolumeSource": schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CSIVolumeSource": schema_k8sio_api_core_v1_CSIVolumeSource(ref), - "k8s.io/api/core/v1.Capabilities": schema_k8sio_api_core_v1_Capabilities(ref), - "k8s.io/api/core/v1.CephFSPersistentVolumeSource": schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CephFSVolumeSource": schema_k8sio_api_core_v1_CephFSVolumeSource(ref), - "k8s.io/api/core/v1.CinderPersistentVolumeSource": schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CinderVolumeSource": schema_k8sio_api_core_v1_CinderVolumeSource(ref), - "k8s.io/api/core/v1.ClientIPConfig": schema_k8sio_api_core_v1_ClientIPConfig(ref), - "k8s.io/api/core/v1.ClusterTrustBundleProjection": schema_k8sio_api_core_v1_ClusterTrustBundleProjection(ref), - "k8s.io/api/core/v1.ComponentCondition": schema_k8sio_api_core_v1_ComponentCondition(ref), - "k8s.io/api/core/v1.ComponentStatus": schema_k8sio_api_core_v1_ComponentStatus(ref), - "k8s.io/api/core/v1.ComponentStatusList": schema_k8sio_api_core_v1_ComponentStatusList(ref), - "k8s.io/api/core/v1.ConfigMap": schema_k8sio_api_core_v1_ConfigMap(ref), - "k8s.io/api/core/v1.ConfigMapEnvSource": schema_k8sio_api_core_v1_ConfigMapEnvSource(ref), - "k8s.io/api/core/v1.ConfigMapKeySelector": schema_k8sio_api_core_v1_ConfigMapKeySelector(ref), - "k8s.io/api/core/v1.ConfigMapList": schema_k8sio_api_core_v1_ConfigMapList(ref), - "k8s.io/api/core/v1.ConfigMapNodeConfigSource": schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref), - "k8s.io/api/core/v1.ConfigMapProjection": schema_k8sio_api_core_v1_ConfigMapProjection(ref), - "k8s.io/api/core/v1.ConfigMapVolumeSource": schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref), - "k8s.io/api/core/v1.Container": schema_k8sio_api_core_v1_Container(ref), - "k8s.io/api/core/v1.ContainerExtendedResourceRequest": schema_k8sio_api_core_v1_ContainerExtendedResourceRequest(ref), - "k8s.io/api/core/v1.ContainerImage": schema_k8sio_api_core_v1_ContainerImage(ref), - "k8s.io/api/core/v1.ContainerPort": schema_k8sio_api_core_v1_ContainerPort(ref), - "k8s.io/api/core/v1.ContainerResizePolicy": schema_k8sio_api_core_v1_ContainerResizePolicy(ref), - "k8s.io/api/core/v1.ContainerRestartRule": schema_k8sio_api_core_v1_ContainerRestartRule(ref), - "k8s.io/api/core/v1.ContainerRestartRuleOnExitCodes": schema_k8sio_api_core_v1_ContainerRestartRuleOnExitCodes(ref), - "k8s.io/api/core/v1.ContainerState": schema_k8sio_api_core_v1_ContainerState(ref), - "k8s.io/api/core/v1.ContainerStateRunning": schema_k8sio_api_core_v1_ContainerStateRunning(ref), - "k8s.io/api/core/v1.ContainerStateTerminated": schema_k8sio_api_core_v1_ContainerStateTerminated(ref), - "k8s.io/api/core/v1.ContainerStateWaiting": schema_k8sio_api_core_v1_ContainerStateWaiting(ref), - "k8s.io/api/core/v1.ContainerStatus": schema_k8sio_api_core_v1_ContainerStatus(ref), - "k8s.io/api/core/v1.ContainerUser": schema_k8sio_api_core_v1_ContainerUser(ref), - "k8s.io/api/core/v1.DaemonEndpoint": schema_k8sio_api_core_v1_DaemonEndpoint(ref), - "k8s.io/api/core/v1.DownwardAPIProjection": schema_k8sio_api_core_v1_DownwardAPIProjection(ref), - "k8s.io/api/core/v1.DownwardAPIVolumeFile": schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref), - "k8s.io/api/core/v1.DownwardAPIVolumeSource": schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref), - "k8s.io/api/core/v1.EmptyDirVolumeSource": schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref), - "k8s.io/api/core/v1.EndpointAddress": schema_k8sio_api_core_v1_EndpointAddress(ref), - "k8s.io/api/core/v1.EndpointPort": schema_k8sio_api_core_v1_EndpointPort(ref), - "k8s.io/api/core/v1.EndpointSubset": schema_k8sio_api_core_v1_EndpointSubset(ref), - "k8s.io/api/core/v1.Endpoints": schema_k8sio_api_core_v1_Endpoints(ref), - "k8s.io/api/core/v1.EndpointsList": schema_k8sio_api_core_v1_EndpointsList(ref), - "k8s.io/api/core/v1.EnvFromSource": schema_k8sio_api_core_v1_EnvFromSource(ref), - "k8s.io/api/core/v1.EnvVar": schema_k8sio_api_core_v1_EnvVar(ref), - "k8s.io/api/core/v1.EnvVarSource": schema_k8sio_api_core_v1_EnvVarSource(ref), - "k8s.io/api/core/v1.EphemeralContainer": schema_k8sio_api_core_v1_EphemeralContainer(ref), - "k8s.io/api/core/v1.EphemeralContainerCommon": schema_k8sio_api_core_v1_EphemeralContainerCommon(ref), - "k8s.io/api/core/v1.EphemeralVolumeSource": schema_k8sio_api_core_v1_EphemeralVolumeSource(ref), - "k8s.io/api/core/v1.Event": schema_k8sio_api_core_v1_Event(ref), - "k8s.io/api/core/v1.EventList": schema_k8sio_api_core_v1_EventList(ref), - "k8s.io/api/core/v1.EventSeries": schema_k8sio_api_core_v1_EventSeries(ref), - "k8s.io/api/core/v1.EventSource": schema_k8sio_api_core_v1_EventSource(ref), - "k8s.io/api/core/v1.ExecAction": schema_k8sio_api_core_v1_ExecAction(ref), - "k8s.io/api/core/v1.FCVolumeSource": schema_k8sio_api_core_v1_FCVolumeSource(ref), - "k8s.io/api/core/v1.FileKeySelector": schema_k8sio_api_core_v1_FileKeySelector(ref), - "k8s.io/api/core/v1.FlexPersistentVolumeSource": schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref), - "k8s.io/api/core/v1.FlexVolumeSource": schema_k8sio_api_core_v1_FlexVolumeSource(ref), - "k8s.io/api/core/v1.FlockerVolumeSource": schema_k8sio_api_core_v1_FlockerVolumeSource(ref), - "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource": schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref), - "k8s.io/api/core/v1.GRPCAction": schema_k8sio_api_core_v1_GRPCAction(ref), - "k8s.io/api/core/v1.GitRepoVolumeSource": schema_k8sio_api_core_v1_GitRepoVolumeSource(ref), - "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource": schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref), - "k8s.io/api/core/v1.GlusterfsVolumeSource": schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref), - "k8s.io/api/core/v1.HTTPGetAction": schema_k8sio_api_core_v1_HTTPGetAction(ref), - "k8s.io/api/core/v1.HTTPHeader": schema_k8sio_api_core_v1_HTTPHeader(ref), - "k8s.io/api/core/v1.HostAlias": schema_k8sio_api_core_v1_HostAlias(ref), - "k8s.io/api/core/v1.HostIP": schema_k8sio_api_core_v1_HostIP(ref), - "k8s.io/api/core/v1.HostPathVolumeSource": schema_k8sio_api_core_v1_HostPathVolumeSource(ref), - "k8s.io/api/core/v1.ISCSIPersistentVolumeSource": schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref), - "k8s.io/api/core/v1.ISCSIVolumeSource": schema_k8sio_api_core_v1_ISCSIVolumeSource(ref), - "k8s.io/api/core/v1.ImageVolumeSource": schema_k8sio_api_core_v1_ImageVolumeSource(ref), - "k8s.io/api/core/v1.KeyToPath": schema_k8sio_api_core_v1_KeyToPath(ref), - "k8s.io/api/core/v1.Lifecycle": schema_k8sio_api_core_v1_Lifecycle(ref), - "k8s.io/api/core/v1.LifecycleHandler": schema_k8sio_api_core_v1_LifecycleHandler(ref), - "k8s.io/api/core/v1.LimitRange": schema_k8sio_api_core_v1_LimitRange(ref), - "k8s.io/api/core/v1.LimitRangeItem": schema_k8sio_api_core_v1_LimitRangeItem(ref), - "k8s.io/api/core/v1.LimitRangeList": schema_k8sio_api_core_v1_LimitRangeList(ref), - "k8s.io/api/core/v1.LimitRangeSpec": schema_k8sio_api_core_v1_LimitRangeSpec(ref), - "k8s.io/api/core/v1.LinuxContainerUser": schema_k8sio_api_core_v1_LinuxContainerUser(ref), - "k8s.io/api/core/v1.List": schema_k8sio_api_core_v1_List(ref), - "k8s.io/api/core/v1.LoadBalancerIngress": schema_k8sio_api_core_v1_LoadBalancerIngress(ref), - "k8s.io/api/core/v1.LoadBalancerStatus": schema_k8sio_api_core_v1_LoadBalancerStatus(ref), - "k8s.io/api/core/v1.LocalObjectReference": schema_k8sio_api_core_v1_LocalObjectReference(ref), - "k8s.io/api/core/v1.LocalVolumeSource": schema_k8sio_api_core_v1_LocalVolumeSource(ref), - "k8s.io/api/core/v1.ModifyVolumeStatus": schema_k8sio_api_core_v1_ModifyVolumeStatus(ref), - "k8s.io/api/core/v1.NFSVolumeSource": schema_k8sio_api_core_v1_NFSVolumeSource(ref), - "k8s.io/api/core/v1.Namespace": schema_k8sio_api_core_v1_Namespace(ref), - "k8s.io/api/core/v1.NamespaceCondition": schema_k8sio_api_core_v1_NamespaceCondition(ref), - "k8s.io/api/core/v1.NamespaceList": schema_k8sio_api_core_v1_NamespaceList(ref), - "k8s.io/api/core/v1.NamespaceSpec": schema_k8sio_api_core_v1_NamespaceSpec(ref), - "k8s.io/api/core/v1.NamespaceStatus": schema_k8sio_api_core_v1_NamespaceStatus(ref), - "k8s.io/api/core/v1.Node": schema_k8sio_api_core_v1_Node(ref), - "k8s.io/api/core/v1.NodeAddress": schema_k8sio_api_core_v1_NodeAddress(ref), - "k8s.io/api/core/v1.NodeAffinity": schema_k8sio_api_core_v1_NodeAffinity(ref), - "k8s.io/api/core/v1.NodeCondition": schema_k8sio_api_core_v1_NodeCondition(ref), - "k8s.io/api/core/v1.NodeConfigSource": schema_k8sio_api_core_v1_NodeConfigSource(ref), - "k8s.io/api/core/v1.NodeConfigStatus": schema_k8sio_api_core_v1_NodeConfigStatus(ref), - "k8s.io/api/core/v1.NodeDaemonEndpoints": schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref), - "k8s.io/api/core/v1.NodeFeatures": schema_k8sio_api_core_v1_NodeFeatures(ref), - "k8s.io/api/core/v1.NodeList": schema_k8sio_api_core_v1_NodeList(ref), - "k8s.io/api/core/v1.NodeProxyOptions": schema_k8sio_api_core_v1_NodeProxyOptions(ref), - "k8s.io/api/core/v1.NodeRuntimeHandler": schema_k8sio_api_core_v1_NodeRuntimeHandler(ref), - "k8s.io/api/core/v1.NodeRuntimeHandlerFeatures": schema_k8sio_api_core_v1_NodeRuntimeHandlerFeatures(ref), - "k8s.io/api/core/v1.NodeSelector": schema_k8sio_api_core_v1_NodeSelector(ref), - "k8s.io/api/core/v1.NodeSelectorRequirement": schema_k8sio_api_core_v1_NodeSelectorRequirement(ref), - "k8s.io/api/core/v1.NodeSelectorTerm": schema_k8sio_api_core_v1_NodeSelectorTerm(ref), - "k8s.io/api/core/v1.NodeSpec": schema_k8sio_api_core_v1_NodeSpec(ref), - "k8s.io/api/core/v1.NodeStatus": schema_k8sio_api_core_v1_NodeStatus(ref), - "k8s.io/api/core/v1.NodeSwapStatus": schema_k8sio_api_core_v1_NodeSwapStatus(ref), - "k8s.io/api/core/v1.NodeSystemInfo": schema_k8sio_api_core_v1_NodeSystemInfo(ref), - "k8s.io/api/core/v1.ObjectFieldSelector": schema_k8sio_api_core_v1_ObjectFieldSelector(ref), - "k8s.io/api/core/v1.ObjectReference": schema_k8sio_api_core_v1_ObjectReference(ref), - "k8s.io/api/core/v1.PersistentVolume": schema_k8sio_api_core_v1_PersistentVolume(ref), - "k8s.io/api/core/v1.PersistentVolumeClaim": schema_k8sio_api_core_v1_PersistentVolumeClaim(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimCondition": schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimList": schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimSpec": schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimStatus": schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimTemplate": schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref), - "k8s.io/api/core/v1.PersistentVolumeList": schema_k8sio_api_core_v1_PersistentVolumeList(ref), - "k8s.io/api/core/v1.PersistentVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeSource(ref), - "k8s.io/api/core/v1.PersistentVolumeSpec": schema_k8sio_api_core_v1_PersistentVolumeSpec(ref), - "k8s.io/api/core/v1.PersistentVolumeStatus": schema_k8sio_api_core_v1_PersistentVolumeStatus(ref), - "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource": schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref), - "k8s.io/api/core/v1.Pod": schema_k8sio_api_core_v1_Pod(ref), - "k8s.io/api/core/v1.PodAffinity": schema_k8sio_api_core_v1_PodAffinity(ref), - "k8s.io/api/core/v1.PodAffinityTerm": schema_k8sio_api_core_v1_PodAffinityTerm(ref), - "k8s.io/api/core/v1.PodAntiAffinity": schema_k8sio_api_core_v1_PodAntiAffinity(ref), - "k8s.io/api/core/v1.PodAttachOptions": schema_k8sio_api_core_v1_PodAttachOptions(ref), - "k8s.io/api/core/v1.PodCertificateProjection": schema_k8sio_api_core_v1_PodCertificateProjection(ref), - "k8s.io/api/core/v1.PodCondition": schema_k8sio_api_core_v1_PodCondition(ref), - "k8s.io/api/core/v1.PodDNSConfig": schema_k8sio_api_core_v1_PodDNSConfig(ref), - "k8s.io/api/core/v1.PodDNSConfigOption": schema_k8sio_api_core_v1_PodDNSConfigOption(ref), - "k8s.io/api/core/v1.PodExecOptions": schema_k8sio_api_core_v1_PodExecOptions(ref), - "k8s.io/api/core/v1.PodExtendedResourceClaimStatus": schema_k8sio_api_core_v1_PodExtendedResourceClaimStatus(ref), - "k8s.io/api/core/v1.PodIP": schema_k8sio_api_core_v1_PodIP(ref), - "k8s.io/api/core/v1.PodList": schema_k8sio_api_core_v1_PodList(ref), - "k8s.io/api/core/v1.PodLogOptions": schema_k8sio_api_core_v1_PodLogOptions(ref), - "k8s.io/api/core/v1.PodOS": schema_k8sio_api_core_v1_PodOS(ref), - "k8s.io/api/core/v1.PodPortForwardOptions": schema_k8sio_api_core_v1_PodPortForwardOptions(ref), - "k8s.io/api/core/v1.PodProxyOptions": schema_k8sio_api_core_v1_PodProxyOptions(ref), - "k8s.io/api/core/v1.PodReadinessGate": schema_k8sio_api_core_v1_PodReadinessGate(ref), - "k8s.io/api/core/v1.PodResourceClaim": schema_k8sio_api_core_v1_PodResourceClaim(ref), - "k8s.io/api/core/v1.PodResourceClaimStatus": schema_k8sio_api_core_v1_PodResourceClaimStatus(ref), - "k8s.io/api/core/v1.PodSchedulingGate": schema_k8sio_api_core_v1_PodSchedulingGate(ref), - "k8s.io/api/core/v1.PodSecurityContext": schema_k8sio_api_core_v1_PodSecurityContext(ref), - "k8s.io/api/core/v1.PodSignature": schema_k8sio_api_core_v1_PodSignature(ref), - "k8s.io/api/core/v1.PodSpec": schema_k8sio_api_core_v1_PodSpec(ref), - "k8s.io/api/core/v1.PodStatus": schema_k8sio_api_core_v1_PodStatus(ref), - "k8s.io/api/core/v1.PodStatusResult": schema_k8sio_api_core_v1_PodStatusResult(ref), - "k8s.io/api/core/v1.PodTemplate": schema_k8sio_api_core_v1_PodTemplate(ref), - "k8s.io/api/core/v1.PodTemplateList": schema_k8sio_api_core_v1_PodTemplateList(ref), - "k8s.io/api/core/v1.PodTemplateSpec": schema_k8sio_api_core_v1_PodTemplateSpec(ref), - "k8s.io/api/core/v1.PortStatus": schema_k8sio_api_core_v1_PortStatus(ref), - "k8s.io/api/core/v1.PortworxVolumeSource": schema_k8sio_api_core_v1_PortworxVolumeSource(ref), - "k8s.io/api/core/v1.PreferAvoidPodsEntry": schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref), - "k8s.io/api/core/v1.PreferredSchedulingTerm": schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref), - "k8s.io/api/core/v1.Probe": schema_k8sio_api_core_v1_Probe(ref), - "k8s.io/api/core/v1.ProbeHandler": schema_k8sio_api_core_v1_ProbeHandler(ref), - "k8s.io/api/core/v1.ProjectedVolumeSource": schema_k8sio_api_core_v1_ProjectedVolumeSource(ref), - "k8s.io/api/core/v1.QuobyteVolumeSource": schema_k8sio_api_core_v1_QuobyteVolumeSource(ref), - "k8s.io/api/core/v1.RBDPersistentVolumeSource": schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref), - "k8s.io/api/core/v1.RBDVolumeSource": schema_k8sio_api_core_v1_RBDVolumeSource(ref), - "k8s.io/api/core/v1.RangeAllocation": schema_k8sio_api_core_v1_RangeAllocation(ref), - "k8s.io/api/core/v1.ReplicationController": schema_k8sio_api_core_v1_ReplicationController(ref), - "k8s.io/api/core/v1.ReplicationControllerCondition": schema_k8sio_api_core_v1_ReplicationControllerCondition(ref), - "k8s.io/api/core/v1.ReplicationControllerList": schema_k8sio_api_core_v1_ReplicationControllerList(ref), - "k8s.io/api/core/v1.ReplicationControllerSpec": schema_k8sio_api_core_v1_ReplicationControllerSpec(ref), - "k8s.io/api/core/v1.ReplicationControllerStatus": schema_k8sio_api_core_v1_ReplicationControllerStatus(ref), - "k8s.io/api/core/v1.ResourceClaim": schema_k8sio_api_core_v1_ResourceClaim(ref), - "k8s.io/api/core/v1.ResourceFieldSelector": schema_k8sio_api_core_v1_ResourceFieldSelector(ref), - "k8s.io/api/core/v1.ResourceHealth": schema_k8sio_api_core_v1_ResourceHealth(ref), - "k8s.io/api/core/v1.ResourceQuota": schema_k8sio_api_core_v1_ResourceQuota(ref), - "k8s.io/api/core/v1.ResourceQuotaList": schema_k8sio_api_core_v1_ResourceQuotaList(ref), - "k8s.io/api/core/v1.ResourceQuotaSpec": schema_k8sio_api_core_v1_ResourceQuotaSpec(ref), - "k8s.io/api/core/v1.ResourceQuotaStatus": schema_k8sio_api_core_v1_ResourceQuotaStatus(ref), - "k8s.io/api/core/v1.ResourceRequirements": schema_k8sio_api_core_v1_ResourceRequirements(ref), - "k8s.io/api/core/v1.ResourceStatus": schema_k8sio_api_core_v1_ResourceStatus(ref), - "k8s.io/api/core/v1.SELinuxOptions": schema_k8sio_api_core_v1_SELinuxOptions(ref), - "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource": schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref), - "k8s.io/api/core/v1.ScaleIOVolumeSource": schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref), - "k8s.io/api/core/v1.ScopeSelector": schema_k8sio_api_core_v1_ScopeSelector(ref), - "k8s.io/api/core/v1.ScopedResourceSelectorRequirement": schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref), - "k8s.io/api/core/v1.SeccompProfile": schema_k8sio_api_core_v1_SeccompProfile(ref), - "k8s.io/api/core/v1.Secret": schema_k8sio_api_core_v1_Secret(ref), - "k8s.io/api/core/v1.SecretEnvSource": schema_k8sio_api_core_v1_SecretEnvSource(ref), - "k8s.io/api/core/v1.SecretKeySelector": schema_k8sio_api_core_v1_SecretKeySelector(ref), - "k8s.io/api/core/v1.SecretList": schema_k8sio_api_core_v1_SecretList(ref), - "k8s.io/api/core/v1.SecretProjection": schema_k8sio_api_core_v1_SecretProjection(ref), - "k8s.io/api/core/v1.SecretReference": schema_k8sio_api_core_v1_SecretReference(ref), - "k8s.io/api/core/v1.SecretVolumeSource": schema_k8sio_api_core_v1_SecretVolumeSource(ref), - "k8s.io/api/core/v1.SecurityContext": schema_k8sio_api_core_v1_SecurityContext(ref), - "k8s.io/api/core/v1.SerializedReference": schema_k8sio_api_core_v1_SerializedReference(ref), - "k8s.io/api/core/v1.Service": schema_k8sio_api_core_v1_Service(ref), - "k8s.io/api/core/v1.ServiceAccount": schema_k8sio_api_core_v1_ServiceAccount(ref), - "k8s.io/api/core/v1.ServiceAccountList": schema_k8sio_api_core_v1_ServiceAccountList(ref), - "k8s.io/api/core/v1.ServiceAccountTokenProjection": schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref), - "k8s.io/api/core/v1.ServiceList": schema_k8sio_api_core_v1_ServiceList(ref), - "k8s.io/api/core/v1.ServicePort": schema_k8sio_api_core_v1_ServicePort(ref), - "k8s.io/api/core/v1.ServiceProxyOptions": schema_k8sio_api_core_v1_ServiceProxyOptions(ref), - "k8s.io/api/core/v1.ServiceSpec": schema_k8sio_api_core_v1_ServiceSpec(ref), - "k8s.io/api/core/v1.ServiceStatus": schema_k8sio_api_core_v1_ServiceStatus(ref), - "k8s.io/api/core/v1.SessionAffinityConfig": schema_k8sio_api_core_v1_SessionAffinityConfig(ref), - "k8s.io/api/core/v1.SleepAction": schema_k8sio_api_core_v1_SleepAction(ref), - "k8s.io/api/core/v1.StorageOSPersistentVolumeSource": schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref), - "k8s.io/api/core/v1.StorageOSVolumeSource": schema_k8sio_api_core_v1_StorageOSVolumeSource(ref), - "k8s.io/api/core/v1.Sysctl": schema_k8sio_api_core_v1_Sysctl(ref), - "k8s.io/api/core/v1.TCPSocketAction": schema_k8sio_api_core_v1_TCPSocketAction(ref), - "k8s.io/api/core/v1.Taint": schema_k8sio_api_core_v1_Taint(ref), - "k8s.io/api/core/v1.Toleration": schema_k8sio_api_core_v1_Toleration(ref), - "k8s.io/api/core/v1.TopologySelectorLabelRequirement": schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref), - "k8s.io/api/core/v1.TopologySelectorTerm": schema_k8sio_api_core_v1_TopologySelectorTerm(ref), - "k8s.io/api/core/v1.TopologySpreadConstraint": schema_k8sio_api_core_v1_TopologySpreadConstraint(ref), - "k8s.io/api/core/v1.TypedLocalObjectReference": schema_k8sio_api_core_v1_TypedLocalObjectReference(ref), - "k8s.io/api/core/v1.TypedObjectReference": schema_k8sio_api_core_v1_TypedObjectReference(ref), - "k8s.io/api/core/v1.Volume": schema_k8sio_api_core_v1_Volume(ref), - "k8s.io/api/core/v1.VolumeDevice": schema_k8sio_api_core_v1_VolumeDevice(ref), - "k8s.io/api/core/v1.VolumeMount": schema_k8sio_api_core_v1_VolumeMount(ref), - "k8s.io/api/core/v1.VolumeMountStatus": schema_k8sio_api_core_v1_VolumeMountStatus(ref), - "k8s.io/api/core/v1.VolumeNodeAffinity": schema_k8sio_api_core_v1_VolumeNodeAffinity(ref), - "k8s.io/api/core/v1.VolumeProjection": schema_k8sio_api_core_v1_VolumeProjection(ref), - "k8s.io/api/core/v1.VolumeResourceRequirements": schema_k8sio_api_core_v1_VolumeResourceRequirements(ref), - "k8s.io/api/core/v1.VolumeSource": schema_k8sio_api_core_v1_VolumeSource(ref), - "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource": schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref), - "k8s.io/api/core/v1.WeightedPodAffinityTerm": schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref), - "k8s.io/api/core/v1.WindowsSecurityContextOptions": schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref), - "k8s.io/api/discovery/v1.Endpoint": schema_k8sio_api_discovery_v1_Endpoint(ref), - "k8s.io/api/discovery/v1.EndpointConditions": schema_k8sio_api_discovery_v1_EndpointConditions(ref), - "k8s.io/api/discovery/v1.EndpointHints": schema_k8sio_api_discovery_v1_EndpointHints(ref), - "k8s.io/api/discovery/v1.EndpointPort": schema_k8sio_api_discovery_v1_EndpointPort(ref), - "k8s.io/api/discovery/v1.EndpointSlice": schema_k8sio_api_discovery_v1_EndpointSlice(ref), - "k8s.io/api/discovery/v1.EndpointSliceList": schema_k8sio_api_discovery_v1_EndpointSliceList(ref), - "k8s.io/api/discovery/v1.ForNode": schema_k8sio_api_discovery_v1_ForNode(ref), - "k8s.io/api/discovery/v1.ForZone": schema_k8sio_api_discovery_v1_ForZone(ref), - "k8s.io/api/discovery/v1beta1.Endpoint": schema_k8sio_api_discovery_v1beta1_Endpoint(ref), - "k8s.io/api/discovery/v1beta1.EndpointConditions": schema_k8sio_api_discovery_v1beta1_EndpointConditions(ref), - "k8s.io/api/discovery/v1beta1.EndpointHints": schema_k8sio_api_discovery_v1beta1_EndpointHints(ref), - "k8s.io/api/discovery/v1beta1.EndpointPort": schema_k8sio_api_discovery_v1beta1_EndpointPort(ref), - "k8s.io/api/discovery/v1beta1.EndpointSlice": schema_k8sio_api_discovery_v1beta1_EndpointSlice(ref), - "k8s.io/api/discovery/v1beta1.EndpointSliceList": schema_k8sio_api_discovery_v1beta1_EndpointSliceList(ref), - "k8s.io/api/discovery/v1beta1.ForNode": schema_k8sio_api_discovery_v1beta1_ForNode(ref), - "k8s.io/api/discovery/v1beta1.ForZone": schema_k8sio_api_discovery_v1beta1_ForZone(ref), - "k8s.io/api/events/v1.Event": schema_k8sio_api_events_v1_Event(ref), - "k8s.io/api/events/v1.EventList": schema_k8sio_api_events_v1_EventList(ref), - "k8s.io/api/events/v1.EventSeries": schema_k8sio_api_events_v1_EventSeries(ref), - "k8s.io/api/events/v1beta1.Event": schema_k8sio_api_events_v1beta1_Event(ref), - "k8s.io/api/events/v1beta1.EventList": schema_k8sio_api_events_v1beta1_EventList(ref), - "k8s.io/api/events/v1beta1.EventSeries": schema_k8sio_api_events_v1beta1_EventSeries(ref), - "k8s.io/api/extensions/v1beta1.DaemonSet": schema_k8sio_api_extensions_v1beta1_DaemonSet(ref), - "k8s.io/api/extensions/v1beta1.DaemonSetCondition": schema_k8sio_api_extensions_v1beta1_DaemonSetCondition(ref), - "k8s.io/api/extensions/v1beta1.DaemonSetList": schema_k8sio_api_extensions_v1beta1_DaemonSetList(ref), - "k8s.io/api/extensions/v1beta1.DaemonSetSpec": schema_k8sio_api_extensions_v1beta1_DaemonSetSpec(ref), - "k8s.io/api/extensions/v1beta1.DaemonSetStatus": schema_k8sio_api_extensions_v1beta1_DaemonSetStatus(ref), - "k8s.io/api/extensions/v1beta1.DaemonSetUpdateStrategy": schema_k8sio_api_extensions_v1beta1_DaemonSetUpdateStrategy(ref), - "k8s.io/api/extensions/v1beta1.Deployment": schema_k8sio_api_extensions_v1beta1_Deployment(ref), - "k8s.io/api/extensions/v1beta1.DeploymentCondition": schema_k8sio_api_extensions_v1beta1_DeploymentCondition(ref), - "k8s.io/api/extensions/v1beta1.DeploymentList": schema_k8sio_api_extensions_v1beta1_DeploymentList(ref), - "k8s.io/api/extensions/v1beta1.DeploymentRollback": schema_k8sio_api_extensions_v1beta1_DeploymentRollback(ref), - "k8s.io/api/extensions/v1beta1.DeploymentSpec": schema_k8sio_api_extensions_v1beta1_DeploymentSpec(ref), - "k8s.io/api/extensions/v1beta1.DeploymentStatus": schema_k8sio_api_extensions_v1beta1_DeploymentStatus(ref), - "k8s.io/api/extensions/v1beta1.DeploymentStrategy": schema_k8sio_api_extensions_v1beta1_DeploymentStrategy(ref), - "k8s.io/api/extensions/v1beta1.HTTPIngressPath": schema_k8sio_api_extensions_v1beta1_HTTPIngressPath(ref), - "k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue": schema_k8sio_api_extensions_v1beta1_HTTPIngressRuleValue(ref), - "k8s.io/api/extensions/v1beta1.IPBlock": schema_k8sio_api_extensions_v1beta1_IPBlock(ref), - "k8s.io/api/extensions/v1beta1.Ingress": schema_k8sio_api_extensions_v1beta1_Ingress(ref), - "k8s.io/api/extensions/v1beta1.IngressBackend": schema_k8sio_api_extensions_v1beta1_IngressBackend(ref), - "k8s.io/api/extensions/v1beta1.IngressList": schema_k8sio_api_extensions_v1beta1_IngressList(ref), - "k8s.io/api/extensions/v1beta1.IngressLoadBalancerIngress": schema_k8sio_api_extensions_v1beta1_IngressLoadBalancerIngress(ref), - "k8s.io/api/extensions/v1beta1.IngressLoadBalancerStatus": schema_k8sio_api_extensions_v1beta1_IngressLoadBalancerStatus(ref), - "k8s.io/api/extensions/v1beta1.IngressPortStatus": schema_k8sio_api_extensions_v1beta1_IngressPortStatus(ref), - "k8s.io/api/extensions/v1beta1.IngressRule": schema_k8sio_api_extensions_v1beta1_IngressRule(ref), - "k8s.io/api/extensions/v1beta1.IngressRuleValue": schema_k8sio_api_extensions_v1beta1_IngressRuleValue(ref), - "k8s.io/api/extensions/v1beta1.IngressSpec": schema_k8sio_api_extensions_v1beta1_IngressSpec(ref), - "k8s.io/api/extensions/v1beta1.IngressStatus": schema_k8sio_api_extensions_v1beta1_IngressStatus(ref), - "k8s.io/api/extensions/v1beta1.IngressTLS": schema_k8sio_api_extensions_v1beta1_IngressTLS(ref), - "k8s.io/api/extensions/v1beta1.NetworkPolicy": schema_k8sio_api_extensions_v1beta1_NetworkPolicy(ref), - "k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule": schema_k8sio_api_extensions_v1beta1_NetworkPolicyEgressRule(ref), - "k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule": schema_k8sio_api_extensions_v1beta1_NetworkPolicyIngressRule(ref), - "k8s.io/api/extensions/v1beta1.NetworkPolicyList": schema_k8sio_api_extensions_v1beta1_NetworkPolicyList(ref), - "k8s.io/api/extensions/v1beta1.NetworkPolicyPeer": schema_k8sio_api_extensions_v1beta1_NetworkPolicyPeer(ref), - "k8s.io/api/extensions/v1beta1.NetworkPolicyPort": schema_k8sio_api_extensions_v1beta1_NetworkPolicyPort(ref), - "k8s.io/api/extensions/v1beta1.NetworkPolicySpec": schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref), - "k8s.io/api/extensions/v1beta1.ReplicaSet": schema_k8sio_api_extensions_v1beta1_ReplicaSet(ref), - "k8s.io/api/extensions/v1beta1.ReplicaSetCondition": schema_k8sio_api_extensions_v1beta1_ReplicaSetCondition(ref), - "k8s.io/api/extensions/v1beta1.ReplicaSetList": schema_k8sio_api_extensions_v1beta1_ReplicaSetList(ref), - "k8s.io/api/extensions/v1beta1.ReplicaSetSpec": schema_k8sio_api_extensions_v1beta1_ReplicaSetSpec(ref), - "k8s.io/api/extensions/v1beta1.ReplicaSetStatus": schema_k8sio_api_extensions_v1beta1_ReplicaSetStatus(ref), - "k8s.io/api/extensions/v1beta1.RollbackConfig": schema_k8sio_api_extensions_v1beta1_RollbackConfig(ref), - "k8s.io/api/extensions/v1beta1.RollingUpdateDaemonSet": schema_k8sio_api_extensions_v1beta1_RollingUpdateDaemonSet(ref), - "k8s.io/api/extensions/v1beta1.RollingUpdateDeployment": schema_k8sio_api_extensions_v1beta1_RollingUpdateDeployment(ref), - "k8s.io/api/extensions/v1beta1.Scale": schema_k8sio_api_extensions_v1beta1_Scale(ref), - "k8s.io/api/extensions/v1beta1.ScaleSpec": schema_k8sio_api_extensions_v1beta1_ScaleSpec(ref), - "k8s.io/api/extensions/v1beta1.ScaleStatus": schema_k8sio_api_extensions_v1beta1_ScaleStatus(ref), - "k8s.io/api/flowcontrol/v1.ExemptPriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1_ExemptPriorityLevelConfiguration(ref), - "k8s.io/api/flowcontrol/v1.FlowDistinguisherMethod": schema_k8sio_api_flowcontrol_v1_FlowDistinguisherMethod(ref), - "k8s.io/api/flowcontrol/v1.FlowSchema": schema_k8sio_api_flowcontrol_v1_FlowSchema(ref), - "k8s.io/api/flowcontrol/v1.FlowSchemaCondition": schema_k8sio_api_flowcontrol_v1_FlowSchemaCondition(ref), - "k8s.io/api/flowcontrol/v1.FlowSchemaList": schema_k8sio_api_flowcontrol_v1_FlowSchemaList(ref), - "k8s.io/api/flowcontrol/v1.FlowSchemaSpec": schema_k8sio_api_flowcontrol_v1_FlowSchemaSpec(ref), - "k8s.io/api/flowcontrol/v1.FlowSchemaStatus": schema_k8sio_api_flowcontrol_v1_FlowSchemaStatus(ref), - "k8s.io/api/flowcontrol/v1.GroupSubject": schema_k8sio_api_flowcontrol_v1_GroupSubject(ref), - "k8s.io/api/flowcontrol/v1.LimitResponse": schema_k8sio_api_flowcontrol_v1_LimitResponse(ref), - "k8s.io/api/flowcontrol/v1.LimitedPriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1_LimitedPriorityLevelConfiguration(ref), - "k8s.io/api/flowcontrol/v1.NonResourcePolicyRule": schema_k8sio_api_flowcontrol_v1_NonResourcePolicyRule(ref), - "k8s.io/api/flowcontrol/v1.PolicyRulesWithSubjects": schema_k8sio_api_flowcontrol_v1_PolicyRulesWithSubjects(ref), - "k8s.io/api/flowcontrol/v1.PriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1_PriorityLevelConfiguration(ref), - "k8s.io/api/flowcontrol/v1.PriorityLevelConfigurationCondition": schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationCondition(ref), - "k8s.io/api/flowcontrol/v1.PriorityLevelConfigurationList": schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationList(ref), - "k8s.io/api/flowcontrol/v1.PriorityLevelConfigurationReference": schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationReference(ref), - "k8s.io/api/flowcontrol/v1.PriorityLevelConfigurationSpec": schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationSpec(ref), - "k8s.io/api/flowcontrol/v1.PriorityLevelConfigurationStatus": schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationStatus(ref), - "k8s.io/api/flowcontrol/v1.QueuingConfiguration": schema_k8sio_api_flowcontrol_v1_QueuingConfiguration(ref), - "k8s.io/api/flowcontrol/v1.ResourcePolicyRule": schema_k8sio_api_flowcontrol_v1_ResourcePolicyRule(ref), - "k8s.io/api/flowcontrol/v1.ServiceAccountSubject": schema_k8sio_api_flowcontrol_v1_ServiceAccountSubject(ref), - "k8s.io/api/flowcontrol/v1.Subject": schema_k8sio_api_flowcontrol_v1_Subject(ref), - "k8s.io/api/flowcontrol/v1.UserSubject": schema_k8sio_api_flowcontrol_v1_UserSubject(ref), - "k8s.io/api/flowcontrol/v1beta1.ExemptPriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1beta1_ExemptPriorityLevelConfiguration(ref), - "k8s.io/api/flowcontrol/v1beta1.FlowDistinguisherMethod": schema_k8sio_api_flowcontrol_v1beta1_FlowDistinguisherMethod(ref), - "k8s.io/api/flowcontrol/v1beta1.FlowSchema": schema_k8sio_api_flowcontrol_v1beta1_FlowSchema(ref), - "k8s.io/api/flowcontrol/v1beta1.FlowSchemaCondition": schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaCondition(ref), - "k8s.io/api/flowcontrol/v1beta1.FlowSchemaList": schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaList(ref), - "k8s.io/api/flowcontrol/v1beta1.FlowSchemaSpec": schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaSpec(ref), - "k8s.io/api/flowcontrol/v1beta1.FlowSchemaStatus": schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaStatus(ref), - "k8s.io/api/flowcontrol/v1beta1.GroupSubject": schema_k8sio_api_flowcontrol_v1beta1_GroupSubject(ref), - "k8s.io/api/flowcontrol/v1beta1.LimitResponse": schema_k8sio_api_flowcontrol_v1beta1_LimitResponse(ref), - "k8s.io/api/flowcontrol/v1beta1.LimitedPriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1beta1_LimitedPriorityLevelConfiguration(ref), - "k8s.io/api/flowcontrol/v1beta1.NonResourcePolicyRule": schema_k8sio_api_flowcontrol_v1beta1_NonResourcePolicyRule(ref), - "k8s.io/api/flowcontrol/v1beta1.PolicyRulesWithSubjects": schema_k8sio_api_flowcontrol_v1beta1_PolicyRulesWithSubjects(ref), - "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfiguration(ref), - "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationCondition": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationCondition(ref), - "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationList": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationList(ref), - "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationReference": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationReference(ref), - "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationSpec": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationSpec(ref), - "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationStatus": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationStatus(ref), - "k8s.io/api/flowcontrol/v1beta1.QueuingConfiguration": schema_k8sio_api_flowcontrol_v1beta1_QueuingConfiguration(ref), - "k8s.io/api/flowcontrol/v1beta1.ResourcePolicyRule": schema_k8sio_api_flowcontrol_v1beta1_ResourcePolicyRule(ref), - "k8s.io/api/flowcontrol/v1beta1.ServiceAccountSubject": schema_k8sio_api_flowcontrol_v1beta1_ServiceAccountSubject(ref), - "k8s.io/api/flowcontrol/v1beta1.Subject": schema_k8sio_api_flowcontrol_v1beta1_Subject(ref), - "k8s.io/api/flowcontrol/v1beta1.UserSubject": schema_k8sio_api_flowcontrol_v1beta1_UserSubject(ref), - "k8s.io/api/flowcontrol/v1beta2.ExemptPriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1beta2_ExemptPriorityLevelConfiguration(ref), - "k8s.io/api/flowcontrol/v1beta2.FlowDistinguisherMethod": schema_k8sio_api_flowcontrol_v1beta2_FlowDistinguisherMethod(ref), - "k8s.io/api/flowcontrol/v1beta2.FlowSchema": schema_k8sio_api_flowcontrol_v1beta2_FlowSchema(ref), - "k8s.io/api/flowcontrol/v1beta2.FlowSchemaCondition": schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaCondition(ref), - "k8s.io/api/flowcontrol/v1beta2.FlowSchemaList": schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaList(ref), - "k8s.io/api/flowcontrol/v1beta2.FlowSchemaSpec": schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaSpec(ref), - "k8s.io/api/flowcontrol/v1beta2.FlowSchemaStatus": schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaStatus(ref), - "k8s.io/api/flowcontrol/v1beta2.GroupSubject": schema_k8sio_api_flowcontrol_v1beta2_GroupSubject(ref), - "k8s.io/api/flowcontrol/v1beta2.LimitResponse": schema_k8sio_api_flowcontrol_v1beta2_LimitResponse(ref), - "k8s.io/api/flowcontrol/v1beta2.LimitedPriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1beta2_LimitedPriorityLevelConfiguration(ref), - "k8s.io/api/flowcontrol/v1beta2.NonResourcePolicyRule": schema_k8sio_api_flowcontrol_v1beta2_NonResourcePolicyRule(ref), - "k8s.io/api/flowcontrol/v1beta2.PolicyRulesWithSubjects": schema_k8sio_api_flowcontrol_v1beta2_PolicyRulesWithSubjects(ref), - "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfiguration(ref), - "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationCondition": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationCondition(ref), - "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationList": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationList(ref), - "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationReference": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationReference(ref), - "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationSpec": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationSpec(ref), - "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationStatus": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationStatus(ref), - "k8s.io/api/flowcontrol/v1beta2.QueuingConfiguration": schema_k8sio_api_flowcontrol_v1beta2_QueuingConfiguration(ref), - "k8s.io/api/flowcontrol/v1beta2.ResourcePolicyRule": schema_k8sio_api_flowcontrol_v1beta2_ResourcePolicyRule(ref), - "k8s.io/api/flowcontrol/v1beta2.ServiceAccountSubject": schema_k8sio_api_flowcontrol_v1beta2_ServiceAccountSubject(ref), - "k8s.io/api/flowcontrol/v1beta2.Subject": schema_k8sio_api_flowcontrol_v1beta2_Subject(ref), - "k8s.io/api/flowcontrol/v1beta2.UserSubject": schema_k8sio_api_flowcontrol_v1beta2_UserSubject(ref), - "k8s.io/api/flowcontrol/v1beta3.ExemptPriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1beta3_ExemptPriorityLevelConfiguration(ref), - "k8s.io/api/flowcontrol/v1beta3.FlowDistinguisherMethod": schema_k8sio_api_flowcontrol_v1beta3_FlowDistinguisherMethod(ref), - "k8s.io/api/flowcontrol/v1beta3.FlowSchema": schema_k8sio_api_flowcontrol_v1beta3_FlowSchema(ref), - "k8s.io/api/flowcontrol/v1beta3.FlowSchemaCondition": schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaCondition(ref), - "k8s.io/api/flowcontrol/v1beta3.FlowSchemaList": schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaList(ref), - "k8s.io/api/flowcontrol/v1beta3.FlowSchemaSpec": schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaSpec(ref), - "k8s.io/api/flowcontrol/v1beta3.FlowSchemaStatus": schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaStatus(ref), - "k8s.io/api/flowcontrol/v1beta3.GroupSubject": schema_k8sio_api_flowcontrol_v1beta3_GroupSubject(ref), - "k8s.io/api/flowcontrol/v1beta3.LimitResponse": schema_k8sio_api_flowcontrol_v1beta3_LimitResponse(ref), - "k8s.io/api/flowcontrol/v1beta3.LimitedPriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1beta3_LimitedPriorityLevelConfiguration(ref), - "k8s.io/api/flowcontrol/v1beta3.NonResourcePolicyRule": schema_k8sio_api_flowcontrol_v1beta3_NonResourcePolicyRule(ref), - "k8s.io/api/flowcontrol/v1beta3.PolicyRulesWithSubjects": schema_k8sio_api_flowcontrol_v1beta3_PolicyRulesWithSubjects(ref), - "k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfiguration(ref), - "k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfigurationCondition": schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationCondition(ref), - "k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfigurationList": schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationList(ref), - "k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfigurationReference": schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationReference(ref), - "k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfigurationSpec": schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationSpec(ref), - "k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfigurationStatus": schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationStatus(ref), - "k8s.io/api/flowcontrol/v1beta3.QueuingConfiguration": schema_k8sio_api_flowcontrol_v1beta3_QueuingConfiguration(ref), - "k8s.io/api/flowcontrol/v1beta3.ResourcePolicyRule": schema_k8sio_api_flowcontrol_v1beta3_ResourcePolicyRule(ref), - "k8s.io/api/flowcontrol/v1beta3.ServiceAccountSubject": schema_k8sio_api_flowcontrol_v1beta3_ServiceAccountSubject(ref), - "k8s.io/api/flowcontrol/v1beta3.Subject": schema_k8sio_api_flowcontrol_v1beta3_Subject(ref), - "k8s.io/api/flowcontrol/v1beta3.UserSubject": schema_k8sio_api_flowcontrol_v1beta3_UserSubject(ref), - "k8s.io/api/imagepolicy/v1alpha1.ImageReview": schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref), - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewContainerSpec(ref), - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref), - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewStatus(ref), - "k8s.io/api/networking/v1.HTTPIngressPath": schema_k8sio_api_networking_v1_HTTPIngressPath(ref), - "k8s.io/api/networking/v1.HTTPIngressRuleValue": schema_k8sio_api_networking_v1_HTTPIngressRuleValue(ref), - "k8s.io/api/networking/v1.IPAddress": schema_k8sio_api_networking_v1_IPAddress(ref), - "k8s.io/api/networking/v1.IPAddressList": schema_k8sio_api_networking_v1_IPAddressList(ref), - "k8s.io/api/networking/v1.IPAddressSpec": schema_k8sio_api_networking_v1_IPAddressSpec(ref), - "k8s.io/api/networking/v1.IPBlock": schema_k8sio_api_networking_v1_IPBlock(ref), - "k8s.io/api/networking/v1.Ingress": schema_k8sio_api_networking_v1_Ingress(ref), - "k8s.io/api/networking/v1.IngressBackend": schema_k8sio_api_networking_v1_IngressBackend(ref), - "k8s.io/api/networking/v1.IngressClass": schema_k8sio_api_networking_v1_IngressClass(ref), - "k8s.io/api/networking/v1.IngressClassList": schema_k8sio_api_networking_v1_IngressClassList(ref), - "k8s.io/api/networking/v1.IngressClassParametersReference": schema_k8sio_api_networking_v1_IngressClassParametersReference(ref), - "k8s.io/api/networking/v1.IngressClassSpec": schema_k8sio_api_networking_v1_IngressClassSpec(ref), - "k8s.io/api/networking/v1.IngressList": schema_k8sio_api_networking_v1_IngressList(ref), - "k8s.io/api/networking/v1.IngressLoadBalancerIngress": schema_k8sio_api_networking_v1_IngressLoadBalancerIngress(ref), - "k8s.io/api/networking/v1.IngressLoadBalancerStatus": schema_k8sio_api_networking_v1_IngressLoadBalancerStatus(ref), - "k8s.io/api/networking/v1.IngressPortStatus": schema_k8sio_api_networking_v1_IngressPortStatus(ref), - "k8s.io/api/networking/v1.IngressRule": schema_k8sio_api_networking_v1_IngressRule(ref), - "k8s.io/api/networking/v1.IngressRuleValue": schema_k8sio_api_networking_v1_IngressRuleValue(ref), - "k8s.io/api/networking/v1.IngressServiceBackend": schema_k8sio_api_networking_v1_IngressServiceBackend(ref), - "k8s.io/api/networking/v1.IngressSpec": schema_k8sio_api_networking_v1_IngressSpec(ref), - "k8s.io/api/networking/v1.IngressStatus": schema_k8sio_api_networking_v1_IngressStatus(ref), - "k8s.io/api/networking/v1.IngressTLS": schema_k8sio_api_networking_v1_IngressTLS(ref), - "k8s.io/api/networking/v1.NetworkPolicy": schema_k8sio_api_networking_v1_NetworkPolicy(ref), - "k8s.io/api/networking/v1.NetworkPolicyEgressRule": schema_k8sio_api_networking_v1_NetworkPolicyEgressRule(ref), - "k8s.io/api/networking/v1.NetworkPolicyIngressRule": schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref), - "k8s.io/api/networking/v1.NetworkPolicyList": schema_k8sio_api_networking_v1_NetworkPolicyList(ref), - "k8s.io/api/networking/v1.NetworkPolicyPeer": schema_k8sio_api_networking_v1_NetworkPolicyPeer(ref), - "k8s.io/api/networking/v1.NetworkPolicyPort": schema_k8sio_api_networking_v1_NetworkPolicyPort(ref), - "k8s.io/api/networking/v1.NetworkPolicySpec": schema_k8sio_api_networking_v1_NetworkPolicySpec(ref), - "k8s.io/api/networking/v1.ParentReference": schema_k8sio_api_networking_v1_ParentReference(ref), - "k8s.io/api/networking/v1.ServiceBackendPort": schema_k8sio_api_networking_v1_ServiceBackendPort(ref), - "k8s.io/api/networking/v1.ServiceCIDR": schema_k8sio_api_networking_v1_ServiceCIDR(ref), - "k8s.io/api/networking/v1.ServiceCIDRList": schema_k8sio_api_networking_v1_ServiceCIDRList(ref), - "k8s.io/api/networking/v1.ServiceCIDRSpec": schema_k8sio_api_networking_v1_ServiceCIDRSpec(ref), - "k8s.io/api/networking/v1.ServiceCIDRStatus": schema_k8sio_api_networking_v1_ServiceCIDRStatus(ref), - "k8s.io/api/networking/v1beta1.HTTPIngressPath": schema_k8sio_api_networking_v1beta1_HTTPIngressPath(ref), - "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue": schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref), - "k8s.io/api/networking/v1beta1.IPAddress": schema_k8sio_api_networking_v1beta1_IPAddress(ref), - "k8s.io/api/networking/v1beta1.IPAddressList": schema_k8sio_api_networking_v1beta1_IPAddressList(ref), - "k8s.io/api/networking/v1beta1.IPAddressSpec": schema_k8sio_api_networking_v1beta1_IPAddressSpec(ref), - "k8s.io/api/networking/v1beta1.Ingress": schema_k8sio_api_networking_v1beta1_Ingress(ref), - "k8s.io/api/networking/v1beta1.IngressBackend": schema_k8sio_api_networking_v1beta1_IngressBackend(ref), - "k8s.io/api/networking/v1beta1.IngressClass": schema_k8sio_api_networking_v1beta1_IngressClass(ref), - "k8s.io/api/networking/v1beta1.IngressClassList": schema_k8sio_api_networking_v1beta1_IngressClassList(ref), - "k8s.io/api/networking/v1beta1.IngressClassParametersReference": schema_k8sio_api_networking_v1beta1_IngressClassParametersReference(ref), - "k8s.io/api/networking/v1beta1.IngressClassSpec": schema_k8sio_api_networking_v1beta1_IngressClassSpec(ref), - "k8s.io/api/networking/v1beta1.IngressList": schema_k8sio_api_networking_v1beta1_IngressList(ref), - "k8s.io/api/networking/v1beta1.IngressLoadBalancerIngress": schema_k8sio_api_networking_v1beta1_IngressLoadBalancerIngress(ref), - "k8s.io/api/networking/v1beta1.IngressLoadBalancerStatus": schema_k8sio_api_networking_v1beta1_IngressLoadBalancerStatus(ref), - "k8s.io/api/networking/v1beta1.IngressPortStatus": schema_k8sio_api_networking_v1beta1_IngressPortStatus(ref), - "k8s.io/api/networking/v1beta1.IngressRule": schema_k8sio_api_networking_v1beta1_IngressRule(ref), - "k8s.io/api/networking/v1beta1.IngressRuleValue": schema_k8sio_api_networking_v1beta1_IngressRuleValue(ref), - "k8s.io/api/networking/v1beta1.IngressSpec": schema_k8sio_api_networking_v1beta1_IngressSpec(ref), - "k8s.io/api/networking/v1beta1.IngressStatus": schema_k8sio_api_networking_v1beta1_IngressStatus(ref), - "k8s.io/api/networking/v1beta1.IngressTLS": schema_k8sio_api_networking_v1beta1_IngressTLS(ref), - "k8s.io/api/networking/v1beta1.ParentReference": schema_k8sio_api_networking_v1beta1_ParentReference(ref), - "k8s.io/api/networking/v1beta1.ServiceCIDR": schema_k8sio_api_networking_v1beta1_ServiceCIDR(ref), - "k8s.io/api/networking/v1beta1.ServiceCIDRList": schema_k8sio_api_networking_v1beta1_ServiceCIDRList(ref), - "k8s.io/api/networking/v1beta1.ServiceCIDRSpec": schema_k8sio_api_networking_v1beta1_ServiceCIDRSpec(ref), - "k8s.io/api/networking/v1beta1.ServiceCIDRStatus": schema_k8sio_api_networking_v1beta1_ServiceCIDRStatus(ref), - "k8s.io/api/node/v1.Overhead": schema_k8sio_api_node_v1_Overhead(ref), - "k8s.io/api/node/v1.RuntimeClass": schema_k8sio_api_node_v1_RuntimeClass(ref), - "k8s.io/api/node/v1.RuntimeClassList": schema_k8sio_api_node_v1_RuntimeClassList(ref), - "k8s.io/api/node/v1.Scheduling": schema_k8sio_api_node_v1_Scheduling(ref), - "k8s.io/api/node/v1alpha1.Overhead": schema_k8sio_api_node_v1alpha1_Overhead(ref), - "k8s.io/api/node/v1alpha1.RuntimeClass": schema_k8sio_api_node_v1alpha1_RuntimeClass(ref), - "k8s.io/api/node/v1alpha1.RuntimeClassList": schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref), - "k8s.io/api/node/v1alpha1.RuntimeClassSpec": schema_k8sio_api_node_v1alpha1_RuntimeClassSpec(ref), - "k8s.io/api/node/v1alpha1.Scheduling": schema_k8sio_api_node_v1alpha1_Scheduling(ref), - "k8s.io/api/node/v1beta1.Overhead": schema_k8sio_api_node_v1beta1_Overhead(ref), - "k8s.io/api/node/v1beta1.RuntimeClass": schema_k8sio_api_node_v1beta1_RuntimeClass(ref), - "k8s.io/api/node/v1beta1.RuntimeClassList": schema_k8sio_api_node_v1beta1_RuntimeClassList(ref), - "k8s.io/api/node/v1beta1.Scheduling": schema_k8sio_api_node_v1beta1_Scheduling(ref), - "k8s.io/api/policy/v1.Eviction": schema_k8sio_api_policy_v1_Eviction(ref), - "k8s.io/api/policy/v1.PodDisruptionBudget": schema_k8sio_api_policy_v1_PodDisruptionBudget(ref), - "k8s.io/api/policy/v1.PodDisruptionBudgetList": schema_k8sio_api_policy_v1_PodDisruptionBudgetList(ref), - "k8s.io/api/policy/v1.PodDisruptionBudgetSpec": schema_k8sio_api_policy_v1_PodDisruptionBudgetSpec(ref), - "k8s.io/api/policy/v1.PodDisruptionBudgetStatus": schema_k8sio_api_policy_v1_PodDisruptionBudgetStatus(ref), - "k8s.io/api/policy/v1beta1.Eviction": schema_k8sio_api_policy_v1beta1_Eviction(ref), - "k8s.io/api/policy/v1beta1.PodDisruptionBudget": schema_k8sio_api_policy_v1beta1_PodDisruptionBudget(ref), - "k8s.io/api/policy/v1beta1.PodDisruptionBudgetList": schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref), - "k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec": schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetSpec(ref), - "k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus": schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetStatus(ref), - "k8s.io/api/rbac/v1.AggregationRule": schema_k8sio_api_rbac_v1_AggregationRule(ref), - "k8s.io/api/rbac/v1.ClusterRole": schema_k8sio_api_rbac_v1_ClusterRole(ref), - "k8s.io/api/rbac/v1.ClusterRoleBinding": schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref), - "k8s.io/api/rbac/v1.ClusterRoleBindingList": schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref), - "k8s.io/api/rbac/v1.ClusterRoleList": schema_k8sio_api_rbac_v1_ClusterRoleList(ref), - "k8s.io/api/rbac/v1.PolicyRule": schema_k8sio_api_rbac_v1_PolicyRule(ref), - "k8s.io/api/rbac/v1.Role": schema_k8sio_api_rbac_v1_Role(ref), - "k8s.io/api/rbac/v1.RoleBinding": schema_k8sio_api_rbac_v1_RoleBinding(ref), - "k8s.io/api/rbac/v1.RoleBindingList": schema_k8sio_api_rbac_v1_RoleBindingList(ref), - "k8s.io/api/rbac/v1.RoleList": schema_k8sio_api_rbac_v1_RoleList(ref), - "k8s.io/api/rbac/v1.RoleRef": schema_k8sio_api_rbac_v1_RoleRef(ref), - "k8s.io/api/rbac/v1.Subject": schema_k8sio_api_rbac_v1_Subject(ref), - "k8s.io/api/rbac/v1alpha1.AggregationRule": schema_k8sio_api_rbac_v1alpha1_AggregationRule(ref), - "k8s.io/api/rbac/v1alpha1.ClusterRole": schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref), - "k8s.io/api/rbac/v1alpha1.ClusterRoleBinding": schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref), - "k8s.io/api/rbac/v1alpha1.ClusterRoleBindingList": schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref), - "k8s.io/api/rbac/v1alpha1.ClusterRoleList": schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref), - "k8s.io/api/rbac/v1alpha1.PolicyRule": schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref), - "k8s.io/api/rbac/v1alpha1.Role": schema_k8sio_api_rbac_v1alpha1_Role(ref), - "k8s.io/api/rbac/v1alpha1.RoleBinding": schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref), - "k8s.io/api/rbac/v1alpha1.RoleBindingList": schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref), - "k8s.io/api/rbac/v1alpha1.RoleList": schema_k8sio_api_rbac_v1alpha1_RoleList(ref), - "k8s.io/api/rbac/v1alpha1.RoleRef": schema_k8sio_api_rbac_v1alpha1_RoleRef(ref), - "k8s.io/api/rbac/v1alpha1.Subject": schema_k8sio_api_rbac_v1alpha1_Subject(ref), - "k8s.io/api/rbac/v1beta1.AggregationRule": schema_k8sio_api_rbac_v1beta1_AggregationRule(ref), - "k8s.io/api/rbac/v1beta1.ClusterRole": schema_k8sio_api_rbac_v1beta1_ClusterRole(ref), - "k8s.io/api/rbac/v1beta1.ClusterRoleBinding": schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref), - "k8s.io/api/rbac/v1beta1.ClusterRoleBindingList": schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref), - "k8s.io/api/rbac/v1beta1.ClusterRoleList": schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref), - "k8s.io/api/rbac/v1beta1.PolicyRule": schema_k8sio_api_rbac_v1beta1_PolicyRule(ref), - "k8s.io/api/rbac/v1beta1.Role": schema_k8sio_api_rbac_v1beta1_Role(ref), - "k8s.io/api/rbac/v1beta1.RoleBinding": schema_k8sio_api_rbac_v1beta1_RoleBinding(ref), - "k8s.io/api/rbac/v1beta1.RoleBindingList": schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref), - "k8s.io/api/rbac/v1beta1.RoleList": schema_k8sio_api_rbac_v1beta1_RoleList(ref), - "k8s.io/api/rbac/v1beta1.RoleRef": schema_k8sio_api_rbac_v1beta1_RoleRef(ref), - "k8s.io/api/rbac/v1beta1.Subject": schema_k8sio_api_rbac_v1beta1_Subject(ref), - "k8s.io/api/resource/v1.AllocatedDeviceStatus": schema_k8sio_api_resource_v1_AllocatedDeviceStatus(ref), - "k8s.io/api/resource/v1.AllocationResult": schema_k8sio_api_resource_v1_AllocationResult(ref), - "k8s.io/api/resource/v1.CELDeviceSelector": schema_k8sio_api_resource_v1_CELDeviceSelector(ref), - "k8s.io/api/resource/v1.CapacityRequestPolicy": schema_k8sio_api_resource_v1_CapacityRequestPolicy(ref), - "k8s.io/api/resource/v1.CapacityRequestPolicyRange": schema_k8sio_api_resource_v1_CapacityRequestPolicyRange(ref), - "k8s.io/api/resource/v1.CapacityRequirements": schema_k8sio_api_resource_v1_CapacityRequirements(ref), - "k8s.io/api/resource/v1.Counter": schema_k8sio_api_resource_v1_Counter(ref), - "k8s.io/api/resource/v1.CounterSet": schema_k8sio_api_resource_v1_CounterSet(ref), - "k8s.io/api/resource/v1.Device": schema_k8sio_api_resource_v1_Device(ref), - "k8s.io/api/resource/v1.DeviceAllocationConfiguration": schema_k8sio_api_resource_v1_DeviceAllocationConfiguration(ref), - "k8s.io/api/resource/v1.DeviceAllocationResult": schema_k8sio_api_resource_v1_DeviceAllocationResult(ref), - "k8s.io/api/resource/v1.DeviceAttribute": schema_k8sio_api_resource_v1_DeviceAttribute(ref), - "k8s.io/api/resource/v1.DeviceCapacity": schema_k8sio_api_resource_v1_DeviceCapacity(ref), - "k8s.io/api/resource/v1.DeviceClaim": schema_k8sio_api_resource_v1_DeviceClaim(ref), - "k8s.io/api/resource/v1.DeviceClaimConfiguration": schema_k8sio_api_resource_v1_DeviceClaimConfiguration(ref), - "k8s.io/api/resource/v1.DeviceClass": schema_k8sio_api_resource_v1_DeviceClass(ref), - "k8s.io/api/resource/v1.DeviceClassConfiguration": schema_k8sio_api_resource_v1_DeviceClassConfiguration(ref), - "k8s.io/api/resource/v1.DeviceClassList": schema_k8sio_api_resource_v1_DeviceClassList(ref), - "k8s.io/api/resource/v1.DeviceClassSpec": schema_k8sio_api_resource_v1_DeviceClassSpec(ref), - "k8s.io/api/resource/v1.DeviceConfiguration": schema_k8sio_api_resource_v1_DeviceConfiguration(ref), - "k8s.io/api/resource/v1.DeviceConstraint": schema_k8sio_api_resource_v1_DeviceConstraint(ref), - "k8s.io/api/resource/v1.DeviceCounterConsumption": schema_k8sio_api_resource_v1_DeviceCounterConsumption(ref), - "k8s.io/api/resource/v1.DeviceRequest": schema_k8sio_api_resource_v1_DeviceRequest(ref), - "k8s.io/api/resource/v1.DeviceRequestAllocationResult": schema_k8sio_api_resource_v1_DeviceRequestAllocationResult(ref), - "k8s.io/api/resource/v1.DeviceSelector": schema_k8sio_api_resource_v1_DeviceSelector(ref), - "k8s.io/api/resource/v1.DeviceSubRequest": schema_k8sio_api_resource_v1_DeviceSubRequest(ref), - "k8s.io/api/resource/v1.DeviceTaint": schema_k8sio_api_resource_v1_DeviceTaint(ref), - "k8s.io/api/resource/v1.DeviceToleration": schema_k8sio_api_resource_v1_DeviceToleration(ref), - "k8s.io/api/resource/v1.ExactDeviceRequest": schema_k8sio_api_resource_v1_ExactDeviceRequest(ref), - "k8s.io/api/resource/v1.NetworkDeviceData": schema_k8sio_api_resource_v1_NetworkDeviceData(ref), - "k8s.io/api/resource/v1.OpaqueDeviceConfiguration": schema_k8sio_api_resource_v1_OpaqueDeviceConfiguration(ref), - "k8s.io/api/resource/v1.ResourceClaim": schema_k8sio_api_resource_v1_ResourceClaim(ref), - "k8s.io/api/resource/v1.ResourceClaimConsumerReference": schema_k8sio_api_resource_v1_ResourceClaimConsumerReference(ref), - "k8s.io/api/resource/v1.ResourceClaimList": schema_k8sio_api_resource_v1_ResourceClaimList(ref), - "k8s.io/api/resource/v1.ResourceClaimSpec": schema_k8sio_api_resource_v1_ResourceClaimSpec(ref), - "k8s.io/api/resource/v1.ResourceClaimStatus": schema_k8sio_api_resource_v1_ResourceClaimStatus(ref), - "k8s.io/api/resource/v1.ResourceClaimTemplate": schema_k8sio_api_resource_v1_ResourceClaimTemplate(ref), - "k8s.io/api/resource/v1.ResourceClaimTemplateList": schema_k8sio_api_resource_v1_ResourceClaimTemplateList(ref), - "k8s.io/api/resource/v1.ResourceClaimTemplateSpec": schema_k8sio_api_resource_v1_ResourceClaimTemplateSpec(ref), - "k8s.io/api/resource/v1.ResourcePool": schema_k8sio_api_resource_v1_ResourcePool(ref), - "k8s.io/api/resource/v1.ResourceSlice": schema_k8sio_api_resource_v1_ResourceSlice(ref), - "k8s.io/api/resource/v1.ResourceSliceList": schema_k8sio_api_resource_v1_ResourceSliceList(ref), - "k8s.io/api/resource/v1.ResourceSliceSpec": schema_k8sio_api_resource_v1_ResourceSliceSpec(ref), - "k8s.io/api/resource/v1alpha3.CELDeviceSelector": schema_k8sio_api_resource_v1alpha3_CELDeviceSelector(ref), - "k8s.io/api/resource/v1alpha3.DeviceSelector": schema_k8sio_api_resource_v1alpha3_DeviceSelector(ref), - "k8s.io/api/resource/v1alpha3.DeviceTaint": schema_k8sio_api_resource_v1alpha3_DeviceTaint(ref), - "k8s.io/api/resource/v1alpha3.DeviceTaintRule": schema_k8sio_api_resource_v1alpha3_DeviceTaintRule(ref), - "k8s.io/api/resource/v1alpha3.DeviceTaintRuleList": schema_k8sio_api_resource_v1alpha3_DeviceTaintRuleList(ref), - "k8s.io/api/resource/v1alpha3.DeviceTaintRuleSpec": schema_k8sio_api_resource_v1alpha3_DeviceTaintRuleSpec(ref), - "k8s.io/api/resource/v1alpha3.DeviceTaintSelector": schema_k8sio_api_resource_v1alpha3_DeviceTaintSelector(ref), - "k8s.io/api/resource/v1beta1.AllocatedDeviceStatus": schema_k8sio_api_resource_v1beta1_AllocatedDeviceStatus(ref), - "k8s.io/api/resource/v1beta1.AllocationResult": schema_k8sio_api_resource_v1beta1_AllocationResult(ref), - "k8s.io/api/resource/v1beta1.BasicDevice": schema_k8sio_api_resource_v1beta1_BasicDevice(ref), - "k8s.io/api/resource/v1beta1.CELDeviceSelector": schema_k8sio_api_resource_v1beta1_CELDeviceSelector(ref), - "k8s.io/api/resource/v1beta1.CapacityRequestPolicy": schema_k8sio_api_resource_v1beta1_CapacityRequestPolicy(ref), - "k8s.io/api/resource/v1beta1.CapacityRequestPolicyRange": schema_k8sio_api_resource_v1beta1_CapacityRequestPolicyRange(ref), - "k8s.io/api/resource/v1beta1.CapacityRequirements": schema_k8sio_api_resource_v1beta1_CapacityRequirements(ref), - "k8s.io/api/resource/v1beta1.Counter": schema_k8sio_api_resource_v1beta1_Counter(ref), - "k8s.io/api/resource/v1beta1.CounterSet": schema_k8sio_api_resource_v1beta1_CounterSet(ref), - "k8s.io/api/resource/v1beta1.Device": schema_k8sio_api_resource_v1beta1_Device(ref), - "k8s.io/api/resource/v1beta1.DeviceAllocationConfiguration": schema_k8sio_api_resource_v1beta1_DeviceAllocationConfiguration(ref), - "k8s.io/api/resource/v1beta1.DeviceAllocationResult": schema_k8sio_api_resource_v1beta1_DeviceAllocationResult(ref), - "k8s.io/api/resource/v1beta1.DeviceAttribute": schema_k8sio_api_resource_v1beta1_DeviceAttribute(ref), - "k8s.io/api/resource/v1beta1.DeviceCapacity": schema_k8sio_api_resource_v1beta1_DeviceCapacity(ref), - "k8s.io/api/resource/v1beta1.DeviceClaim": schema_k8sio_api_resource_v1beta1_DeviceClaim(ref), - "k8s.io/api/resource/v1beta1.DeviceClaimConfiguration": schema_k8sio_api_resource_v1beta1_DeviceClaimConfiguration(ref), - "k8s.io/api/resource/v1beta1.DeviceClass": schema_k8sio_api_resource_v1beta1_DeviceClass(ref), - "k8s.io/api/resource/v1beta1.DeviceClassConfiguration": schema_k8sio_api_resource_v1beta1_DeviceClassConfiguration(ref), - "k8s.io/api/resource/v1beta1.DeviceClassList": schema_k8sio_api_resource_v1beta1_DeviceClassList(ref), - "k8s.io/api/resource/v1beta1.DeviceClassSpec": schema_k8sio_api_resource_v1beta1_DeviceClassSpec(ref), - "k8s.io/api/resource/v1beta1.DeviceConfiguration": schema_k8sio_api_resource_v1beta1_DeviceConfiguration(ref), - "k8s.io/api/resource/v1beta1.DeviceConstraint": schema_k8sio_api_resource_v1beta1_DeviceConstraint(ref), - "k8s.io/api/resource/v1beta1.DeviceCounterConsumption": schema_k8sio_api_resource_v1beta1_DeviceCounterConsumption(ref), - "k8s.io/api/resource/v1beta1.DeviceRequest": schema_k8sio_api_resource_v1beta1_DeviceRequest(ref), - "k8s.io/api/resource/v1beta1.DeviceRequestAllocationResult": schema_k8sio_api_resource_v1beta1_DeviceRequestAllocationResult(ref), - "k8s.io/api/resource/v1beta1.DeviceSelector": schema_k8sio_api_resource_v1beta1_DeviceSelector(ref), - "k8s.io/api/resource/v1beta1.DeviceSubRequest": schema_k8sio_api_resource_v1beta1_DeviceSubRequest(ref), - "k8s.io/api/resource/v1beta1.DeviceTaint": schema_k8sio_api_resource_v1beta1_DeviceTaint(ref), - "k8s.io/api/resource/v1beta1.DeviceToleration": schema_k8sio_api_resource_v1beta1_DeviceToleration(ref), - "k8s.io/api/resource/v1beta1.NetworkDeviceData": schema_k8sio_api_resource_v1beta1_NetworkDeviceData(ref), - "k8s.io/api/resource/v1beta1.OpaqueDeviceConfiguration": schema_k8sio_api_resource_v1beta1_OpaqueDeviceConfiguration(ref), - "k8s.io/api/resource/v1beta1.ResourceClaim": schema_k8sio_api_resource_v1beta1_ResourceClaim(ref), - "k8s.io/api/resource/v1beta1.ResourceClaimConsumerReference": schema_k8sio_api_resource_v1beta1_ResourceClaimConsumerReference(ref), - "k8s.io/api/resource/v1beta1.ResourceClaimList": schema_k8sio_api_resource_v1beta1_ResourceClaimList(ref), - "k8s.io/api/resource/v1beta1.ResourceClaimSpec": schema_k8sio_api_resource_v1beta1_ResourceClaimSpec(ref), - "k8s.io/api/resource/v1beta1.ResourceClaimStatus": schema_k8sio_api_resource_v1beta1_ResourceClaimStatus(ref), - "k8s.io/api/resource/v1beta1.ResourceClaimTemplate": schema_k8sio_api_resource_v1beta1_ResourceClaimTemplate(ref), - "k8s.io/api/resource/v1beta1.ResourceClaimTemplateList": schema_k8sio_api_resource_v1beta1_ResourceClaimTemplateList(ref), - "k8s.io/api/resource/v1beta1.ResourceClaimTemplateSpec": schema_k8sio_api_resource_v1beta1_ResourceClaimTemplateSpec(ref), - "k8s.io/api/resource/v1beta1.ResourcePool": schema_k8sio_api_resource_v1beta1_ResourcePool(ref), - "k8s.io/api/resource/v1beta1.ResourceSlice": schema_k8sio_api_resource_v1beta1_ResourceSlice(ref), - "k8s.io/api/resource/v1beta1.ResourceSliceList": schema_k8sio_api_resource_v1beta1_ResourceSliceList(ref), - "k8s.io/api/resource/v1beta1.ResourceSliceSpec": schema_k8sio_api_resource_v1beta1_ResourceSliceSpec(ref), - "k8s.io/api/resource/v1beta2.AllocatedDeviceStatus": schema_k8sio_api_resource_v1beta2_AllocatedDeviceStatus(ref), - "k8s.io/api/resource/v1beta2.AllocationResult": schema_k8sio_api_resource_v1beta2_AllocationResult(ref), - "k8s.io/api/resource/v1beta2.CELDeviceSelector": schema_k8sio_api_resource_v1beta2_CELDeviceSelector(ref), - "k8s.io/api/resource/v1beta2.CapacityRequestPolicy": schema_k8sio_api_resource_v1beta2_CapacityRequestPolicy(ref), - "k8s.io/api/resource/v1beta2.CapacityRequestPolicyRange": schema_k8sio_api_resource_v1beta2_CapacityRequestPolicyRange(ref), - "k8s.io/api/resource/v1beta2.CapacityRequirements": schema_k8sio_api_resource_v1beta2_CapacityRequirements(ref), - "k8s.io/api/resource/v1beta2.Counter": schema_k8sio_api_resource_v1beta2_Counter(ref), - "k8s.io/api/resource/v1beta2.CounterSet": schema_k8sio_api_resource_v1beta2_CounterSet(ref), - "k8s.io/api/resource/v1beta2.Device": schema_k8sio_api_resource_v1beta2_Device(ref), - "k8s.io/api/resource/v1beta2.DeviceAllocationConfiguration": schema_k8sio_api_resource_v1beta2_DeviceAllocationConfiguration(ref), - "k8s.io/api/resource/v1beta2.DeviceAllocationResult": schema_k8sio_api_resource_v1beta2_DeviceAllocationResult(ref), - "k8s.io/api/resource/v1beta2.DeviceAttribute": schema_k8sio_api_resource_v1beta2_DeviceAttribute(ref), - "k8s.io/api/resource/v1beta2.DeviceCapacity": schema_k8sio_api_resource_v1beta2_DeviceCapacity(ref), - "k8s.io/api/resource/v1beta2.DeviceClaim": schema_k8sio_api_resource_v1beta2_DeviceClaim(ref), - "k8s.io/api/resource/v1beta2.DeviceClaimConfiguration": schema_k8sio_api_resource_v1beta2_DeviceClaimConfiguration(ref), - "k8s.io/api/resource/v1beta2.DeviceClass": schema_k8sio_api_resource_v1beta2_DeviceClass(ref), - "k8s.io/api/resource/v1beta2.DeviceClassConfiguration": schema_k8sio_api_resource_v1beta2_DeviceClassConfiguration(ref), - "k8s.io/api/resource/v1beta2.DeviceClassList": schema_k8sio_api_resource_v1beta2_DeviceClassList(ref), - "k8s.io/api/resource/v1beta2.DeviceClassSpec": schema_k8sio_api_resource_v1beta2_DeviceClassSpec(ref), - "k8s.io/api/resource/v1beta2.DeviceConfiguration": schema_k8sio_api_resource_v1beta2_DeviceConfiguration(ref), - "k8s.io/api/resource/v1beta2.DeviceConstraint": schema_k8sio_api_resource_v1beta2_DeviceConstraint(ref), - "k8s.io/api/resource/v1beta2.DeviceCounterConsumption": schema_k8sio_api_resource_v1beta2_DeviceCounterConsumption(ref), - "k8s.io/api/resource/v1beta2.DeviceRequest": schema_k8sio_api_resource_v1beta2_DeviceRequest(ref), - "k8s.io/api/resource/v1beta2.DeviceRequestAllocationResult": schema_k8sio_api_resource_v1beta2_DeviceRequestAllocationResult(ref), - "k8s.io/api/resource/v1beta2.DeviceSelector": schema_k8sio_api_resource_v1beta2_DeviceSelector(ref), - "k8s.io/api/resource/v1beta2.DeviceSubRequest": schema_k8sio_api_resource_v1beta2_DeviceSubRequest(ref), - "k8s.io/api/resource/v1beta2.DeviceTaint": schema_k8sio_api_resource_v1beta2_DeviceTaint(ref), - "k8s.io/api/resource/v1beta2.DeviceToleration": schema_k8sio_api_resource_v1beta2_DeviceToleration(ref), - "k8s.io/api/resource/v1beta2.ExactDeviceRequest": schema_k8sio_api_resource_v1beta2_ExactDeviceRequest(ref), - "k8s.io/api/resource/v1beta2.NetworkDeviceData": schema_k8sio_api_resource_v1beta2_NetworkDeviceData(ref), - "k8s.io/api/resource/v1beta2.OpaqueDeviceConfiguration": schema_k8sio_api_resource_v1beta2_OpaqueDeviceConfiguration(ref), - "k8s.io/api/resource/v1beta2.ResourceClaim": schema_k8sio_api_resource_v1beta2_ResourceClaim(ref), - "k8s.io/api/resource/v1beta2.ResourceClaimConsumerReference": schema_k8sio_api_resource_v1beta2_ResourceClaimConsumerReference(ref), - "k8s.io/api/resource/v1beta2.ResourceClaimList": schema_k8sio_api_resource_v1beta2_ResourceClaimList(ref), - "k8s.io/api/resource/v1beta2.ResourceClaimSpec": schema_k8sio_api_resource_v1beta2_ResourceClaimSpec(ref), - "k8s.io/api/resource/v1beta2.ResourceClaimStatus": schema_k8sio_api_resource_v1beta2_ResourceClaimStatus(ref), - "k8s.io/api/resource/v1beta2.ResourceClaimTemplate": schema_k8sio_api_resource_v1beta2_ResourceClaimTemplate(ref), - "k8s.io/api/resource/v1beta2.ResourceClaimTemplateList": schema_k8sio_api_resource_v1beta2_ResourceClaimTemplateList(ref), - "k8s.io/api/resource/v1beta2.ResourceClaimTemplateSpec": schema_k8sio_api_resource_v1beta2_ResourceClaimTemplateSpec(ref), - "k8s.io/api/resource/v1beta2.ResourcePool": schema_k8sio_api_resource_v1beta2_ResourcePool(ref), - "k8s.io/api/resource/v1beta2.ResourceSlice": schema_k8sio_api_resource_v1beta2_ResourceSlice(ref), - "k8s.io/api/resource/v1beta2.ResourceSliceList": schema_k8sio_api_resource_v1beta2_ResourceSliceList(ref), - "k8s.io/api/resource/v1beta2.ResourceSliceSpec": schema_k8sio_api_resource_v1beta2_ResourceSliceSpec(ref), - "k8s.io/api/scheduling/v1.PriorityClass": schema_k8sio_api_scheduling_v1_PriorityClass(ref), - "k8s.io/api/scheduling/v1.PriorityClassList": schema_k8sio_api_scheduling_v1_PriorityClassList(ref), - "k8s.io/api/scheduling/v1alpha1.PriorityClass": schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref), - "k8s.io/api/scheduling/v1alpha1.PriorityClassList": schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref), - "k8s.io/api/scheduling/v1beta1.PriorityClass": schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref), - "k8s.io/api/scheduling/v1beta1.PriorityClassList": schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref), - "k8s.io/api/storage/v1.CSIDriver": schema_k8sio_api_storage_v1_CSIDriver(ref), - "k8s.io/api/storage/v1.CSIDriverList": schema_k8sio_api_storage_v1_CSIDriverList(ref), - "k8s.io/api/storage/v1.CSIDriverSpec": schema_k8sio_api_storage_v1_CSIDriverSpec(ref), - "k8s.io/api/storage/v1.CSINode": schema_k8sio_api_storage_v1_CSINode(ref), - "k8s.io/api/storage/v1.CSINodeDriver": schema_k8sio_api_storage_v1_CSINodeDriver(ref), - "k8s.io/api/storage/v1.CSINodeList": schema_k8sio_api_storage_v1_CSINodeList(ref), - "k8s.io/api/storage/v1.CSINodeSpec": schema_k8sio_api_storage_v1_CSINodeSpec(ref), - "k8s.io/api/storage/v1.CSIStorageCapacity": schema_k8sio_api_storage_v1_CSIStorageCapacity(ref), - "k8s.io/api/storage/v1.CSIStorageCapacityList": schema_k8sio_api_storage_v1_CSIStorageCapacityList(ref), - "k8s.io/api/storage/v1.StorageClass": schema_k8sio_api_storage_v1_StorageClass(ref), - "k8s.io/api/storage/v1.StorageClassList": schema_k8sio_api_storage_v1_StorageClassList(ref), - "k8s.io/api/storage/v1.TokenRequest": schema_k8sio_api_storage_v1_TokenRequest(ref), - "k8s.io/api/storage/v1.VolumeAttachment": schema_k8sio_api_storage_v1_VolumeAttachment(ref), - "k8s.io/api/storage/v1.VolumeAttachmentList": schema_k8sio_api_storage_v1_VolumeAttachmentList(ref), - "k8s.io/api/storage/v1.VolumeAttachmentSource": schema_k8sio_api_storage_v1_VolumeAttachmentSource(ref), - "k8s.io/api/storage/v1.VolumeAttachmentSpec": schema_k8sio_api_storage_v1_VolumeAttachmentSpec(ref), - "k8s.io/api/storage/v1.VolumeAttachmentStatus": schema_k8sio_api_storage_v1_VolumeAttachmentStatus(ref), - "k8s.io/api/storage/v1.VolumeAttributesClass": schema_k8sio_api_storage_v1_VolumeAttributesClass(ref), - "k8s.io/api/storage/v1.VolumeAttributesClassList": schema_k8sio_api_storage_v1_VolumeAttributesClassList(ref), - "k8s.io/api/storage/v1.VolumeError": schema_k8sio_api_storage_v1_VolumeError(ref), - "k8s.io/api/storage/v1.VolumeNodeResources": schema_k8sio_api_storage_v1_VolumeNodeResources(ref), - "k8s.io/api/storage/v1alpha1.CSIStorageCapacity": schema_k8sio_api_storage_v1alpha1_CSIStorageCapacity(ref), - "k8s.io/api/storage/v1alpha1.CSIStorageCapacityList": schema_k8sio_api_storage_v1alpha1_CSIStorageCapacityList(ref), - "k8s.io/api/storage/v1alpha1.VolumeAttachment": schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref), - "k8s.io/api/storage/v1alpha1.VolumeAttachmentList": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref), - "k8s.io/api/storage/v1alpha1.VolumeAttachmentSource": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSource(ref), - "k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSpec(ref), - "k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentStatus(ref), - "k8s.io/api/storage/v1alpha1.VolumeAttributesClass": schema_k8sio_api_storage_v1alpha1_VolumeAttributesClass(ref), - "k8s.io/api/storage/v1alpha1.VolumeAttributesClassList": schema_k8sio_api_storage_v1alpha1_VolumeAttributesClassList(ref), - "k8s.io/api/storage/v1alpha1.VolumeError": schema_k8sio_api_storage_v1alpha1_VolumeError(ref), - "k8s.io/api/storage/v1beta1.CSIDriver": schema_k8sio_api_storage_v1beta1_CSIDriver(ref), - "k8s.io/api/storage/v1beta1.CSIDriverList": schema_k8sio_api_storage_v1beta1_CSIDriverList(ref), - "k8s.io/api/storage/v1beta1.CSIDriverSpec": schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref), - "k8s.io/api/storage/v1beta1.CSINode": schema_k8sio_api_storage_v1beta1_CSINode(ref), - "k8s.io/api/storage/v1beta1.CSINodeDriver": schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref), - "k8s.io/api/storage/v1beta1.CSINodeList": schema_k8sio_api_storage_v1beta1_CSINodeList(ref), - "k8s.io/api/storage/v1beta1.CSINodeSpec": schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref), - "k8s.io/api/storage/v1beta1.CSIStorageCapacity": schema_k8sio_api_storage_v1beta1_CSIStorageCapacity(ref), - "k8s.io/api/storage/v1beta1.CSIStorageCapacityList": schema_k8sio_api_storage_v1beta1_CSIStorageCapacityList(ref), - "k8s.io/api/storage/v1beta1.StorageClass": schema_k8sio_api_storage_v1beta1_StorageClass(ref), - "k8s.io/api/storage/v1beta1.StorageClassList": schema_k8sio_api_storage_v1beta1_StorageClassList(ref), - "k8s.io/api/storage/v1beta1.TokenRequest": schema_k8sio_api_storage_v1beta1_TokenRequest(ref), - "k8s.io/api/storage/v1beta1.VolumeAttachment": schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref), - "k8s.io/api/storage/v1beta1.VolumeAttachmentList": schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref), - "k8s.io/api/storage/v1beta1.VolumeAttachmentSource": schema_k8sio_api_storage_v1beta1_VolumeAttachmentSource(ref), - "k8s.io/api/storage/v1beta1.VolumeAttachmentSpec": schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref), - "k8s.io/api/storage/v1beta1.VolumeAttachmentStatus": schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref), - "k8s.io/api/storage/v1beta1.VolumeAttributesClass": schema_k8sio_api_storage_v1beta1_VolumeAttributesClass(ref), - "k8s.io/api/storage/v1beta1.VolumeAttributesClassList": schema_k8sio_api_storage_v1beta1_VolumeAttributesClassList(ref), - "k8s.io/api/storage/v1beta1.VolumeError": schema_k8sio_api_storage_v1beta1_VolumeError(ref), - "k8s.io/api/storage/v1beta1.VolumeNodeResources": schema_k8sio_api_storage_v1beta1_VolumeNodeResources(ref), - "k8s.io/api/storagemigration/v1alpha1.GroupVersionResource": schema_k8sio_api_storagemigration_v1alpha1_GroupVersionResource(ref), - "k8s.io/api/storagemigration/v1alpha1.MigrationCondition": schema_k8sio_api_storagemigration_v1alpha1_MigrationCondition(ref), - "k8s.io/api/storagemigration/v1alpha1.StorageVersionMigration": schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigration(ref), - "k8s.io/api/storagemigration/v1alpha1.StorageVersionMigrationList": schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigrationList(ref), - "k8s.io/api/storagemigration/v1alpha1.StorageVersionMigrationSpec": schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigrationSpec(ref), - "k8s.io/api/storagemigration/v1alpha1.StorageVersionMigrationStatus": schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigrationStatus(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest": schema_pkg_apis_apiextensions_v1_ConversionRequest(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse": schema_pkg_apis_apiextensions_v1_ConversionResponse(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionReview": schema_pkg_apis_apiextensions_v1_ConversionReview(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition": schema_pkg_apis_apiextensions_v1_CustomResourceColumnDefinition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion": schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition": schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionList": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionNames(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale": schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceScale(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus": schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceStatus(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources": schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation": schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation": schema_pkg_apis_apiextensions_v1_ExternalDocumentation(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON": schema_pkg_apis_apiextensions_v1_JSON(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps": schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrArray(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.SelectableField": schema_pkg_apis_apiextensions_v1_SelectableField(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference": schema_pkg_apis_apiextensions_v1_ServiceReference(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ValidationRule": schema_pkg_apis_apiextensions_v1_ValidationRule(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig": schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion": schema_pkg_apis_apiextensions_v1_WebhookConversion(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest": schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse": schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionReview": schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition": schema_pkg_apis_apiextensions_v1beta1_CustomResourceColumnDefinition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion": schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionList": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionNames(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceScale(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceStatus(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation": schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation": schema_pkg_apis_apiextensions_v1beta1_ExternalDocumentation(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON": schema_pkg_apis_apiextensions_v1beta1_JSON(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrArray(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.SelectableField": schema_pkg_apis_apiextensions_v1beta1_SelectableField(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference": schema_pkg_apis_apiextensions_v1beta1_ServiceReference(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ValidationRule": schema_pkg_apis_apiextensions_v1beta1_ValidationRule(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig": schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref), - "k8s.io/apimachinery/pkg/api/resource.Quantity": schema_apimachinery_pkg_api_resource_Quantity(ref), - "k8s.io/apimachinery/pkg/api/resource.int64Amount": schema_apimachinery_pkg_api_resource_int64Amount(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ApplyOptions": schema_pkg_apis_meta_v1_ApplyOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition": schema_pkg_apis_meta_v1_Condition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldSelectorRequirement": schema_pkg_apis_meta_v1_FieldSelectorRequirement(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": schema_pkg_apis_meta_v1_GroupResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": schema_pkg_apis_meta_v1_GroupVersion(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": schema_pkg_apis_meta_v1_GroupVersionKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": schema_pkg_apis_meta_v1_GroupVersionResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": schema_pkg_apis_meta_v1_InternalEvent(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": schema_pkg_apis_meta_v1_LabelSelector(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.List": schema_pkg_apis_meta_v1_List(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": schema_pkg_apis_meta_v1_ListMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": schema_pkg_apis_meta_v1_ListOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": schema_pkg_apis_meta_v1_MicroTime(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": schema_pkg_apis_meta_v1_ObjectMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": schema_pkg_apis_meta_v1_OwnerReference(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": schema_pkg_apis_meta_v1_Patch(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions": schema_pkg_apis_meta_v1_PatchOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": schema_pkg_apis_meta_v1_Preconditions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": schema_pkg_apis_meta_v1_RootPaths(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Status": schema_pkg_apis_meta_v1_Status(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": schema_pkg_apis_meta_v1_StatusCause(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": schema_pkg_apis_meta_v1_StatusDetails(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Table": schema_pkg_apis_meta_v1_Table(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions": schema_pkg_apis_meta_v1_TableOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow": schema_pkg_apis_meta_v1_TableRow(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition": schema_pkg_apis_meta_v1_TableRowCondition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Time": schema_pkg_apis_meta_v1_Time(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": schema_pkg_apis_meta_v1_Timestamp(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": schema_pkg_apis_meta_v1_TypeMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions": schema_pkg_apis_meta_v1_UpdateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": schema_pkg_apis_meta_v1_WatchEvent(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1beta1.PartialObjectMetadataList": schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref), - "k8s.io/apimachinery/pkg/apis/testapigroup/v1.Carp": schema_pkg_apis_testapigroup_v1_Carp(ref), - "k8s.io/apimachinery/pkg/apis/testapigroup/v1.CarpCondition": schema_pkg_apis_testapigroup_v1_CarpCondition(ref), - "k8s.io/apimachinery/pkg/apis/testapigroup/v1.CarpInfo": schema_pkg_apis_testapigroup_v1_CarpInfo(ref), - "k8s.io/apimachinery/pkg/apis/testapigroup/v1.CarpList": schema_pkg_apis_testapigroup_v1_CarpList(ref), - "k8s.io/apimachinery/pkg/apis/testapigroup/v1.CarpSpec": schema_pkg_apis_testapigroup_v1_CarpSpec(ref), - "k8s.io/apimachinery/pkg/apis/testapigroup/v1.CarpStatus": schema_pkg_apis_testapigroup_v1_CarpStatus(ref), - "k8s.io/apimachinery/pkg/runtime.RawExtension": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), - "k8s.io/apimachinery/pkg/runtime.TypeMeta": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), - "k8s.io/apimachinery/pkg/runtime.Unknown": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), - "k8s.io/apimachinery/pkg/util/intstr.IntOrString": schema_apimachinery_pkg_util_intstr_IntOrString(ref), - "k8s.io/apimachinery/pkg/version.Info": schema_k8sio_apimachinery_pkg_version_Info(ref), - "k8s.io/apiserver/pkg/apis/audit/v1.Event": schema_pkg_apis_audit_v1_Event(ref), - "k8s.io/apiserver/pkg/apis/audit/v1.EventList": schema_pkg_apis_audit_v1_EventList(ref), - "k8s.io/apiserver/pkg/apis/audit/v1.GroupResources": schema_pkg_apis_audit_v1_GroupResources(ref), - "k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference": schema_pkg_apis_audit_v1_ObjectReference(ref), - "k8s.io/apiserver/pkg/apis/audit/v1.Policy": schema_pkg_apis_audit_v1_Policy(ref), - "k8s.io/apiserver/pkg/apis/audit/v1.PolicyList": schema_pkg_apis_audit_v1_PolicyList(ref), - "k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule": schema_pkg_apis_audit_v1_PolicyRule(ref), - "k8s.io/client-go/pkg/apis/clientauthentication/v1.Cluster": schema_pkg_apis_clientauthentication_v1_Cluster(ref), - "k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredential": schema_pkg_apis_clientauthentication_v1_ExecCredential(ref), - "k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialSpec": schema_pkg_apis_clientauthentication_v1_ExecCredentialSpec(ref), - "k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialStatus": schema_pkg_apis_clientauthentication_v1_ExecCredentialStatus(ref), - "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.Cluster": schema_pkg_apis_clientauthentication_v1beta1_Cluster(ref), - "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredential": schema_pkg_apis_clientauthentication_v1beta1_ExecCredential(ref), - "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec": schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialSpec(ref), - "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus": schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialStatus(ref), - "k8s.io/cloud-provider/config/v1alpha1.CloudControllerManagerConfiguration": schema_k8sio_cloud_provider_config_v1alpha1_CloudControllerManagerConfiguration(ref), - "k8s.io/cloud-provider/config/v1alpha1.CloudProviderConfiguration": schema_k8sio_cloud_provider_config_v1alpha1_CloudProviderConfiguration(ref), - "k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration": schema_k8sio_cloud_provider_config_v1alpha1_KubeCloudSharedConfiguration(ref), - "k8s.io/cloud-provider/config/v1alpha1.WebhookConfiguration": schema_k8sio_cloud_provider_config_v1alpha1_WebhookConfiguration(ref), - "k8s.io/controller-manager/config/v1alpha1.ControllerLeaderConfiguration": schema_k8sio_controller_manager_config_v1alpha1_ControllerLeaderConfiguration(ref), - "k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration": schema_k8sio_controller_manager_config_v1alpha1_GenericControllerManagerConfiguration(ref), - "k8s.io/controller-manager/config/v1alpha1.LeaderMigrationConfiguration": schema_k8sio_controller_manager_config_v1alpha1_LeaderMigrationConfiguration(ref), - "k8s.io/controller-manager/config/v1beta1.ControllerLeaderConfiguration": schema_k8sio_controller_manager_config_v1beta1_ControllerLeaderConfiguration(ref), - "k8s.io/controller-manager/config/v1beta1.LeaderMigrationConfiguration": schema_k8sio_controller_manager_config_v1beta1_LeaderMigrationConfiguration(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService": schema_pkg_apis_apiregistration_v1_APIService(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition": schema_pkg_apis_apiregistration_v1_APIServiceCondition(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceList": schema_pkg_apis_apiregistration_v1_APIServiceList(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec": schema_pkg_apis_apiregistration_v1_APIServiceSpec(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus": schema_pkg_apis_apiregistration_v1_APIServiceStatus(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference": schema_pkg_apis_apiregistration_v1_ServiceReference(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService": schema_pkg_apis_apiregistration_v1beta1_APIService(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition": schema_pkg_apis_apiregistration_v1beta1_APIServiceCondition(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceList": schema_pkg_apis_apiregistration_v1beta1_APIServiceList(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec": schema_pkg_apis_apiregistration_v1beta1_APIServiceSpec(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus": schema_pkg_apis_apiregistration_v1beta1_APIServiceStatus(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference": schema_pkg_apis_apiregistration_v1beta1_ServiceReference(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_AttachDetachControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.CronJobControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_CronJobControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_DaemonSetControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_DeploymentControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_DeprecatedControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceMirroringControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceMirroringControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.EphemeralVolumeControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_EphemeralVolumeControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_GarbageCollectorControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.GroupResource": schema_k8sio_kube_controller_manager_config_v1alpha1_GroupResource(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_JobControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.KubeControllerManagerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_KubeControllerManagerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.LegacySATokenCleanerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_LegacySATokenCleanerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_NamespaceControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_NodeIPAMControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_NodeLifecycleControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeBinderControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeRecyclerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_PodGCControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicaSetControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicationControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_ResourceQuotaControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_SAControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_StatefulSetControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_TTLAfterFinishedControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.ValidatingAdmissionPolicyStatusControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_ValidatingAdmissionPolicyStatusControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_VolumeConfiguration(ref), - "k8s.io/kube-proxy/config/v1alpha1.DetectLocalConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_DetectLocalConfiguration(ref), - "k8s.io/kube-proxy/config/v1alpha1.KubeProxyConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref), - "k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConntrackConfiguration(ref), - "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref), - "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref), - "k8s.io/kube-proxy/config/v1alpha1.KubeProxyNFTablesConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyNFTablesConfiguration(ref), - "k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyWinkernelConfiguration(ref), - "k8s.io/kube-scheduler/config/v1.DefaultPreemptionArgs": schema_k8sio_kube_scheduler_config_v1_DefaultPreemptionArgs(ref), - "k8s.io/kube-scheduler/config/v1.DynamicResourcesArgs": schema_k8sio_kube_scheduler_config_v1_DynamicResourcesArgs(ref), - "k8s.io/kube-scheduler/config/v1.Extender": schema_k8sio_kube_scheduler_config_v1_Extender(ref), - "k8s.io/kube-scheduler/config/v1.ExtenderManagedResource": schema_k8sio_kube_scheduler_config_v1_ExtenderManagedResource(ref), - "k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig": schema_k8sio_kube_scheduler_config_v1_ExtenderTLSConfig(ref), - "k8s.io/kube-scheduler/config/v1.InterPodAffinityArgs": schema_k8sio_kube_scheduler_config_v1_InterPodAffinityArgs(ref), - "k8s.io/kube-scheduler/config/v1.KubeSchedulerConfiguration": schema_k8sio_kube_scheduler_config_v1_KubeSchedulerConfiguration(ref), - "k8s.io/kube-scheduler/config/v1.KubeSchedulerProfile": schema_k8sio_kube_scheduler_config_v1_KubeSchedulerProfile(ref), - "k8s.io/kube-scheduler/config/v1.NodeAffinityArgs": schema_k8sio_kube_scheduler_config_v1_NodeAffinityArgs(ref), - "k8s.io/kube-scheduler/config/v1.NodeResourcesBalancedAllocationArgs": schema_k8sio_kube_scheduler_config_v1_NodeResourcesBalancedAllocationArgs(ref), - "k8s.io/kube-scheduler/config/v1.NodeResourcesFitArgs": schema_k8sio_kube_scheduler_config_v1_NodeResourcesFitArgs(ref), - "k8s.io/kube-scheduler/config/v1.Plugin": schema_k8sio_kube_scheduler_config_v1_Plugin(ref), - "k8s.io/kube-scheduler/config/v1.PluginConfig": schema_k8sio_kube_scheduler_config_v1_PluginConfig(ref), - "k8s.io/kube-scheduler/config/v1.PluginSet": schema_k8sio_kube_scheduler_config_v1_PluginSet(ref), - "k8s.io/kube-scheduler/config/v1.Plugins": schema_k8sio_kube_scheduler_config_v1_Plugins(ref), - "k8s.io/kube-scheduler/config/v1.PodTopologySpreadArgs": schema_k8sio_kube_scheduler_config_v1_PodTopologySpreadArgs(ref), - "k8s.io/kube-scheduler/config/v1.RequestedToCapacityRatioParam": schema_k8sio_kube_scheduler_config_v1_RequestedToCapacityRatioParam(ref), - "k8s.io/kube-scheduler/config/v1.ResourceSpec": schema_k8sio_kube_scheduler_config_v1_ResourceSpec(ref), - "k8s.io/kube-scheduler/config/v1.ScoringStrategy": schema_k8sio_kube_scheduler_config_v1_ScoringStrategy(ref), - "k8s.io/kube-scheduler/config/v1.UtilizationShapePoint": schema_k8sio_kube_scheduler_config_v1_UtilizationShapePoint(ref), - "k8s.io/kube-scheduler/config/v1.VolumeBindingArgs": schema_k8sio_kube_scheduler_config_v1_VolumeBindingArgs(ref), - "k8s.io/kubectl/pkg/config/v1alpha1.AliasOverride": schema_kubectl_pkg_config_v1alpha1_AliasOverride(ref), - "k8s.io/kubectl/pkg/config/v1alpha1.CommandDefaults": schema_kubectl_pkg_config_v1alpha1_CommandDefaults(ref), - "k8s.io/kubectl/pkg/config/v1alpha1.CommandOptionDefault": schema_kubectl_pkg_config_v1alpha1_CommandOptionDefault(ref), - "k8s.io/kubectl/pkg/config/v1alpha1.Preference": schema_kubectl_pkg_config_v1alpha1_Preference(ref), - "k8s.io/kubectl/pkg/config/v1beta1.AliasOverride": schema_kubectl_pkg_config_v1beta1_AliasOverride(ref), - "k8s.io/kubectl/pkg/config/v1beta1.CommandDefaults": schema_kubectl_pkg_config_v1beta1_CommandDefaults(ref), - "k8s.io/kubectl/pkg/config/v1beta1.CommandOptionDefault": schema_kubectl_pkg_config_v1beta1_CommandOptionDefault(ref), - "k8s.io/kubectl/pkg/config/v1beta1.Preference": schema_kubectl_pkg_config_v1beta1_Preference(ref), - "k8s.io/kubelet/config/v1.CredentialProvider": schema_k8sio_kubelet_config_v1_CredentialProvider(ref), - "k8s.io/kubelet/config/v1.CredentialProviderConfig": schema_k8sio_kubelet_config_v1_CredentialProviderConfig(ref), - "k8s.io/kubelet/config/v1.ExecEnvVar": schema_k8sio_kubelet_config_v1_ExecEnvVar(ref), - "k8s.io/kubelet/config/v1.ServiceAccountTokenAttributes": schema_k8sio_kubelet_config_v1_ServiceAccountTokenAttributes(ref), - "k8s.io/kubelet/config/v1alpha1.CredentialProvider": schema_k8sio_kubelet_config_v1alpha1_CredentialProvider(ref), - "k8s.io/kubelet/config/v1alpha1.CredentialProviderConfig": schema_k8sio_kubelet_config_v1alpha1_CredentialProviderConfig(ref), - "k8s.io/kubelet/config/v1alpha1.ExecEnvVar": schema_k8sio_kubelet_config_v1alpha1_ExecEnvVar(ref), - "k8s.io/kubelet/config/v1alpha1.ImagePullCredentials": schema_k8sio_kubelet_config_v1alpha1_ImagePullCredentials(ref), - "k8s.io/kubelet/config/v1alpha1.ImagePullIntent": schema_k8sio_kubelet_config_v1alpha1_ImagePullIntent(ref), - "k8s.io/kubelet/config/v1alpha1.ImagePullSecret": schema_k8sio_kubelet_config_v1alpha1_ImagePullSecret(ref), - "k8s.io/kubelet/config/v1alpha1.ImagePullServiceAccount": schema_k8sio_kubelet_config_v1alpha1_ImagePullServiceAccount(ref), - "k8s.io/kubelet/config/v1alpha1.ImagePulledRecord": schema_k8sio_kubelet_config_v1alpha1_ImagePulledRecord(ref), - "k8s.io/kubelet/config/v1beta1.CrashLoopBackOffConfig": schema_k8sio_kubelet_config_v1beta1_CrashLoopBackOffConfig(ref), - "k8s.io/kubelet/config/v1beta1.CredentialProvider": schema_k8sio_kubelet_config_v1beta1_CredentialProvider(ref), - "k8s.io/kubelet/config/v1beta1.CredentialProviderConfig": schema_k8sio_kubelet_config_v1beta1_CredentialProviderConfig(ref), - "k8s.io/kubelet/config/v1beta1.ExecEnvVar": schema_k8sio_kubelet_config_v1beta1_ExecEnvVar(ref), - "k8s.io/kubelet/config/v1beta1.KubeletAnonymousAuthentication": schema_k8sio_kubelet_config_v1beta1_KubeletAnonymousAuthentication(ref), - "k8s.io/kubelet/config/v1beta1.KubeletAuthentication": schema_k8sio_kubelet_config_v1beta1_KubeletAuthentication(ref), - "k8s.io/kubelet/config/v1beta1.KubeletAuthorization": schema_k8sio_kubelet_config_v1beta1_KubeletAuthorization(ref), - "k8s.io/kubelet/config/v1beta1.KubeletConfiguration": schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref), - "k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthentication": schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthentication(ref), - "k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthorization": schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthorization(ref), - "k8s.io/kubelet/config/v1beta1.KubeletX509Authentication": schema_k8sio_kubelet_config_v1beta1_KubeletX509Authentication(ref), - "k8s.io/kubelet/config/v1beta1.MemoryReservation": schema_k8sio_kubelet_config_v1beta1_MemoryReservation(ref), - "k8s.io/kubelet/config/v1beta1.MemorySwapConfiguration": schema_k8sio_kubelet_config_v1beta1_MemorySwapConfiguration(ref), - "k8s.io/kubelet/config/v1beta1.SerializedNodeConfigSource": schema_k8sio_kubelet_config_v1beta1_SerializedNodeConfigSource(ref), - "k8s.io/kubelet/config/v1beta1.ShutdownGracePeriodByPodPriority": schema_k8sio_kubelet_config_v1beta1_ShutdownGracePeriodByPodPriority(ref), - "k8s.io/kubelet/config/v1beta1.UserNamespaces": schema_k8sio_kubelet_config_v1beta1_UserNamespaces(ref), - "k8s.io/kubernetes/pkg/apis/abac/v1beta1.Policy": schema_pkg_apis_abac_v1beta1_Policy(ref), - "k8s.io/kubernetes/pkg/apis/abac/v1beta1.PolicySpec": schema_pkg_apis_abac_v1beta1_PolicySpec(ref), - "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricListOptions": schema_pkg_apis_custom_metrics_v1beta1_MetricListOptions(ref), - "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValue": schema_pkg_apis_custom_metrics_v1beta1_MetricValue(ref), - "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValueList": schema_pkg_apis_custom_metrics_v1beta1_MetricValueList(ref), - "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricIdentifier": schema_pkg_apis_custom_metrics_v1beta2_MetricIdentifier(ref), - "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricListOptions": schema_pkg_apis_custom_metrics_v1beta2_MetricListOptions(ref), - "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValue": schema_pkg_apis_custom_metrics_v1beta2_MetricValue(ref), - "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValueList": schema_pkg_apis_custom_metrics_v1beta2_MetricValueList(ref), - "k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValue": schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValue(ref), - "k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValueList": schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValueList(ref), - "k8s.io/metrics/pkg/apis/metrics/v1alpha1.ContainerMetrics": schema_pkg_apis_metrics_v1alpha1_ContainerMetrics(ref), - "k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetrics": schema_pkg_apis_metrics_v1alpha1_NodeMetrics(ref), - "k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetricsList": schema_pkg_apis_metrics_v1alpha1_NodeMetricsList(ref), - "k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetrics": schema_pkg_apis_metrics_v1alpha1_PodMetrics(ref), - "k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetricsList": schema_pkg_apis_metrics_v1alpha1_PodMetricsList(ref), - "k8s.io/metrics/pkg/apis/metrics/v1beta1.ContainerMetrics": schema_pkg_apis_metrics_v1beta1_ContainerMetrics(ref), - "k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetrics": schema_pkg_apis_metrics_v1beta1_NodeMetrics(ref), - "k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetricsList": schema_pkg_apis_metrics_v1beta1_NodeMetricsList(ref), - "k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetrics": schema_pkg_apis_metrics_v1beta1_PodMetrics(ref), - "k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetricsList": schema_pkg_apis_metrics_v1beta1_PodMetricsList(ref), + v1.AuditAnnotation{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_AuditAnnotation(ref), + v1.ExpressionWarning{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_ExpressionWarning(ref), + v1.MatchCondition{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_MatchCondition(ref), + v1.MatchResources{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_MatchResources(ref), + v1.MutatingWebhook{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref), + v1.MutatingWebhookConfiguration{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfiguration(ref), + v1.MutatingWebhookConfigurationList{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfigurationList(ref), + v1.NamedRuleWithOperations{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_NamedRuleWithOperations(ref), + v1.ParamKind{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_ParamKind(ref), + v1.ParamRef{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_ParamRef(ref), + v1.Rule{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_Rule(ref), + v1.RuleWithOperations{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_RuleWithOperations(ref), + v1.ServiceReference{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_ServiceReference(ref), + v1.TypeChecking{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_TypeChecking(ref), + v1.ValidatingAdmissionPolicy{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicy(ref), + v1.ValidatingAdmissionPolicyBinding{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyBinding(ref), + v1.ValidatingAdmissionPolicyBindingList{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyBindingList(ref), + v1.ValidatingAdmissionPolicyBindingSpec{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyBindingSpec(ref), + v1.ValidatingAdmissionPolicyList{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyList(ref), + v1.ValidatingAdmissionPolicySpec{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicySpec(ref), + v1.ValidatingAdmissionPolicyStatus{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyStatus(ref), + v1.ValidatingWebhook{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref), + v1.ValidatingWebhookConfiguration{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfiguration(ref), + v1.ValidatingWebhookConfigurationList{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfigurationList(ref), + v1.Validation{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_Validation(ref), + v1.Variable{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_Variable(ref), + v1.WebhookClientConfig{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1_WebhookClientConfig(ref), + v1alpha1.ApplyConfiguration{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_ApplyConfiguration(ref), + v1alpha1.AuditAnnotation{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_AuditAnnotation(ref), + v1alpha1.ExpressionWarning{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_ExpressionWarning(ref), + v1alpha1.JSONPatch{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_JSONPatch(ref), + v1alpha1.MatchCondition{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_MatchCondition(ref), + v1alpha1.MatchResources{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_MatchResources(ref), + v1alpha1.MutatingAdmissionPolicy{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicy(ref), + v1alpha1.MutatingAdmissionPolicyBinding{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyBinding(ref), + v1alpha1.MutatingAdmissionPolicyBindingList{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyBindingList(ref), + v1alpha1.MutatingAdmissionPolicyBindingSpec{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyBindingSpec(ref), + v1alpha1.MutatingAdmissionPolicyList{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyList(ref), + v1alpha1.MutatingAdmissionPolicySpec{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicySpec(ref), + v1alpha1.Mutation{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_Mutation(ref), + v1alpha1.NamedRuleWithOperations{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_NamedRuleWithOperations(ref), + v1alpha1.ParamKind{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_ParamKind(ref), + v1alpha1.ParamRef{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_ParamRef(ref), + v1alpha1.TypeChecking{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_TypeChecking(ref), + v1alpha1.ValidatingAdmissionPolicy{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicy(ref), + v1alpha1.ValidatingAdmissionPolicyBinding{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyBinding(ref), + v1alpha1.ValidatingAdmissionPolicyBindingList{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyBindingList(ref), + v1alpha1.ValidatingAdmissionPolicyBindingSpec{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyBindingSpec(ref), + v1alpha1.ValidatingAdmissionPolicyList{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyList(ref), + v1alpha1.ValidatingAdmissionPolicySpec{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicySpec(ref), + v1alpha1.ValidatingAdmissionPolicyStatus{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyStatus(ref), + v1alpha1.Validation{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_Validation(ref), + v1alpha1.Variable{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1alpha1_Variable(ref), + v1beta1.ApplyConfiguration{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_ApplyConfiguration(ref), + v1beta1.AuditAnnotation{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_AuditAnnotation(ref), + v1beta1.ExpressionWarning{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_ExpressionWarning(ref), + v1beta1.JSONPatch{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_JSONPatch(ref), + v1beta1.MatchCondition{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_MatchCondition(ref), + v1beta1.MatchResources{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_MatchResources(ref), + v1beta1.MutatingAdmissionPolicy{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicy(ref), + v1beta1.MutatingAdmissionPolicyBinding{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyBinding(ref), + v1beta1.MutatingAdmissionPolicyBindingList{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyBindingList(ref), + v1beta1.MutatingAdmissionPolicyBindingSpec{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyBindingSpec(ref), + v1beta1.MutatingAdmissionPolicyList{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyList(ref), + v1beta1.MutatingAdmissionPolicySpec{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicySpec(ref), + v1beta1.MutatingWebhook{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref), + v1beta1.MutatingWebhookConfiguration{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration(ref), + v1beta1.MutatingWebhookConfigurationList{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfigurationList(ref), + v1beta1.Mutation{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_Mutation(ref), + v1beta1.NamedRuleWithOperations{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_NamedRuleWithOperations(ref), + v1beta1.ParamKind{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_ParamKind(ref), + v1beta1.ParamRef{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_ParamRef(ref), + v1beta1.ServiceReference{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_ServiceReference(ref), + v1beta1.TypeChecking{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_TypeChecking(ref), + v1beta1.ValidatingAdmissionPolicy{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicy(ref), + v1beta1.ValidatingAdmissionPolicyBinding{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyBinding(ref), + v1beta1.ValidatingAdmissionPolicyBindingList{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyBindingList(ref), + v1beta1.ValidatingAdmissionPolicyBindingSpec{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyBindingSpec(ref), + v1beta1.ValidatingAdmissionPolicyList{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyList(ref), + v1beta1.ValidatingAdmissionPolicySpec{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicySpec(ref), + v1beta1.ValidatingAdmissionPolicyStatus{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyStatus(ref), + v1beta1.ValidatingWebhook{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref), + v1beta1.ValidatingWebhookConfiguration{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfiguration(ref), + v1beta1.ValidatingWebhookConfigurationList{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurationList(ref), + v1beta1.Validation{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_Validation(ref), + v1beta1.Variable{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_Variable(ref), + v1beta1.WebhookClientConfig{}.OpenAPIModelName(): schema_k8sio_api_admissionregistration_v1beta1_WebhookClientConfig(ref), + v2.APIGroupDiscovery{}.OpenAPIModelName(): schema_k8sio_api_apidiscovery_v2_APIGroupDiscovery(ref), + v2.APIGroupDiscoveryList{}.OpenAPIModelName(): schema_k8sio_api_apidiscovery_v2_APIGroupDiscoveryList(ref), + v2.APIResourceDiscovery{}.OpenAPIModelName(): schema_k8sio_api_apidiscovery_v2_APIResourceDiscovery(ref), + v2.APISubresourceDiscovery{}.OpenAPIModelName(): schema_k8sio_api_apidiscovery_v2_APISubresourceDiscovery(ref), + v2.APIVersionDiscovery{}.OpenAPIModelName(): schema_k8sio_api_apidiscovery_v2_APIVersionDiscovery(ref), + v2beta1.APIGroupDiscovery{}.OpenAPIModelName(): schema_k8sio_api_apidiscovery_v2beta1_APIGroupDiscovery(ref), + v2beta1.APIGroupDiscoveryList{}.OpenAPIModelName(): schema_k8sio_api_apidiscovery_v2beta1_APIGroupDiscoveryList(ref), + v2beta1.APIResourceDiscovery{}.OpenAPIModelName(): schema_k8sio_api_apidiscovery_v2beta1_APIResourceDiscovery(ref), + v2beta1.APISubresourceDiscovery{}.OpenAPIModelName(): schema_k8sio_api_apidiscovery_v2beta1_APISubresourceDiscovery(ref), + v2beta1.APIVersionDiscovery{}.OpenAPIModelName(): schema_k8sio_api_apidiscovery_v2beta1_APIVersionDiscovery(ref), + apiserverinternalv1alpha1.ServerStorageVersion{}.OpenAPIModelName(): schema_k8sio_api_apiserverinternal_v1alpha1_ServerStorageVersion(ref), + apiserverinternalv1alpha1.StorageVersion{}.OpenAPIModelName(): schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersion(ref), + apiserverinternalv1alpha1.StorageVersionCondition{}.OpenAPIModelName(): schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionCondition(ref), + apiserverinternalv1alpha1.StorageVersionList{}.OpenAPIModelName(): schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionList(ref), + apiserverinternalv1alpha1.StorageVersionSpec{}.OpenAPIModelName(): schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionSpec(ref), + apiserverinternalv1alpha1.StorageVersionStatus{}.OpenAPIModelName(): schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionStatus(ref), + appsv1.ControllerRevision{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_ControllerRevision(ref), + appsv1.ControllerRevisionList{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_ControllerRevisionList(ref), + appsv1.DaemonSet{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_DaemonSet(ref), + appsv1.DaemonSetCondition{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_DaemonSetCondition(ref), + appsv1.DaemonSetList{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_DaemonSetList(ref), + appsv1.DaemonSetSpec{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_DaemonSetSpec(ref), + appsv1.DaemonSetStatus{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_DaemonSetStatus(ref), + appsv1.DaemonSetUpdateStrategy{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_DaemonSetUpdateStrategy(ref), + appsv1.Deployment{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_Deployment(ref), + appsv1.DeploymentCondition{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_DeploymentCondition(ref), + appsv1.DeploymentList{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_DeploymentList(ref), + appsv1.DeploymentSpec{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_DeploymentSpec(ref), + appsv1.DeploymentStatus{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_DeploymentStatus(ref), + appsv1.DeploymentStrategy{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_DeploymentStrategy(ref), + appsv1.ReplicaSet{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_ReplicaSet(ref), + appsv1.ReplicaSetCondition{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_ReplicaSetCondition(ref), + appsv1.ReplicaSetList{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_ReplicaSetList(ref), + appsv1.ReplicaSetSpec{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_ReplicaSetSpec(ref), + appsv1.ReplicaSetStatus{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_ReplicaSetStatus(ref), + appsv1.RollingUpdateDaemonSet{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_RollingUpdateDaemonSet(ref), + appsv1.RollingUpdateDeployment{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_RollingUpdateDeployment(ref), + appsv1.RollingUpdateStatefulSetStrategy{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_RollingUpdateStatefulSetStrategy(ref), + appsv1.StatefulSet{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_StatefulSet(ref), + appsv1.StatefulSetCondition{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_StatefulSetCondition(ref), + appsv1.StatefulSetList{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_StatefulSetList(ref), + appsv1.StatefulSetOrdinals{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_StatefulSetOrdinals(ref), + appsv1.StatefulSetPersistentVolumeClaimRetentionPolicy{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_StatefulSetPersistentVolumeClaimRetentionPolicy(ref), + appsv1.StatefulSetSpec{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_StatefulSetSpec(ref), + appsv1.StatefulSetStatus{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_StatefulSetStatus(ref), + appsv1.StatefulSetUpdateStrategy{}.OpenAPIModelName(): schema_k8sio_api_apps_v1_StatefulSetUpdateStrategy(ref), + appsv1beta1.ControllerRevision{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_ControllerRevision(ref), + appsv1beta1.ControllerRevisionList{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_ControllerRevisionList(ref), + appsv1beta1.Deployment{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_Deployment(ref), + appsv1beta1.DeploymentCondition{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_DeploymentCondition(ref), + appsv1beta1.DeploymentList{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_DeploymentList(ref), + appsv1beta1.DeploymentRollback{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_DeploymentRollback(ref), + appsv1beta1.DeploymentSpec{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_DeploymentSpec(ref), + appsv1beta1.DeploymentStatus{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_DeploymentStatus(ref), + appsv1beta1.DeploymentStrategy{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_DeploymentStrategy(ref), + appsv1beta1.RollbackConfig{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_RollbackConfig(ref), + appsv1beta1.RollingUpdateDeployment{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_RollingUpdateDeployment(ref), + appsv1beta1.RollingUpdateStatefulSetStrategy{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_RollingUpdateStatefulSetStrategy(ref), + appsv1beta1.Scale{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_Scale(ref), + appsv1beta1.ScaleSpec{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_ScaleSpec(ref), + appsv1beta1.ScaleStatus{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_ScaleStatus(ref), + appsv1beta1.StatefulSet{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_StatefulSet(ref), + appsv1beta1.StatefulSetCondition{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_StatefulSetCondition(ref), + appsv1beta1.StatefulSetList{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_StatefulSetList(ref), + appsv1beta1.StatefulSetOrdinals{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_StatefulSetOrdinals(ref), + appsv1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_StatefulSetPersistentVolumeClaimRetentionPolicy(ref), + appsv1beta1.StatefulSetSpec{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref), + appsv1beta1.StatefulSetStatus{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_StatefulSetStatus(ref), + appsv1beta1.StatefulSetUpdateStrategy{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta1_StatefulSetUpdateStrategy(ref), + v1beta2.ControllerRevision{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_ControllerRevision(ref), + v1beta2.ControllerRevisionList{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_ControllerRevisionList(ref), + v1beta2.DaemonSet{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_DaemonSet(ref), + v1beta2.DaemonSetCondition{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_DaemonSetCondition(ref), + v1beta2.DaemonSetList{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_DaemonSetList(ref), + v1beta2.DaemonSetSpec{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_DaemonSetSpec(ref), + v1beta2.DaemonSetStatus{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref), + v1beta2.DaemonSetUpdateStrategy{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_DaemonSetUpdateStrategy(ref), + v1beta2.Deployment{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_Deployment(ref), + v1beta2.DeploymentCondition{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_DeploymentCondition(ref), + v1beta2.DeploymentList{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_DeploymentList(ref), + v1beta2.DeploymentSpec{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_DeploymentSpec(ref), + v1beta2.DeploymentStatus{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_DeploymentStatus(ref), + v1beta2.DeploymentStrategy{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_DeploymentStrategy(ref), + v1beta2.ReplicaSet{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_ReplicaSet(ref), + v1beta2.ReplicaSetCondition{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_ReplicaSetCondition(ref), + v1beta2.ReplicaSetList{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_ReplicaSetList(ref), + v1beta2.ReplicaSetSpec{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_ReplicaSetSpec(ref), + v1beta2.ReplicaSetStatus{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_ReplicaSetStatus(ref), + v1beta2.RollingUpdateDaemonSet{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_RollingUpdateDaemonSet(ref), + v1beta2.RollingUpdateDeployment{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_RollingUpdateDeployment(ref), + v1beta2.RollingUpdateStatefulSetStrategy{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_RollingUpdateStatefulSetStrategy(ref), + v1beta2.Scale{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_Scale(ref), + v1beta2.ScaleSpec{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_ScaleSpec(ref), + v1beta2.ScaleStatus{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_ScaleStatus(ref), + v1beta2.StatefulSet{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_StatefulSet(ref), + v1beta2.StatefulSetCondition{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_StatefulSetCondition(ref), + v1beta2.StatefulSetList{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_StatefulSetList(ref), + v1beta2.StatefulSetOrdinals{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_StatefulSetOrdinals(ref), + v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_StatefulSetPersistentVolumeClaimRetentionPolicy(ref), + v1beta2.StatefulSetSpec{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref), + v1beta2.StatefulSetStatus{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_StatefulSetStatus(ref), + v1beta2.StatefulSetUpdateStrategy{}.OpenAPIModelName(): schema_k8sio_api_apps_v1beta2_StatefulSetUpdateStrategy(ref), + authenticationv1.BoundObjectReference{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1_BoundObjectReference(ref), + authenticationv1.SelfSubjectReview{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1_SelfSubjectReview(ref), + authenticationv1.SelfSubjectReviewStatus{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1_SelfSubjectReviewStatus(ref), + authenticationv1.TokenRequest{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1_TokenRequest(ref), + authenticationv1.TokenRequestSpec{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1_TokenRequestSpec(ref), + authenticationv1.TokenRequestStatus{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1_TokenRequestStatus(ref), + authenticationv1.TokenReview{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1_TokenReview(ref), + authenticationv1.TokenReviewSpec{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1_TokenReviewSpec(ref), + authenticationv1.TokenReviewStatus{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1_TokenReviewStatus(ref), + authenticationv1.UserInfo{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1_UserInfo(ref), + authenticationv1alpha1.SelfSubjectReview{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1alpha1_SelfSubjectReview(ref), + authenticationv1alpha1.SelfSubjectReviewStatus{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1alpha1_SelfSubjectReviewStatus(ref), + authenticationv1beta1.SelfSubjectReview{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1beta1_SelfSubjectReview(ref), + authenticationv1beta1.SelfSubjectReviewStatus{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1beta1_SelfSubjectReviewStatus(ref), + authenticationv1beta1.TokenReview{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1beta1_TokenReview(ref), + authenticationv1beta1.TokenReviewSpec{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1beta1_TokenReviewSpec(ref), + authenticationv1beta1.TokenReviewStatus{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1beta1_TokenReviewStatus(ref), + authenticationv1beta1.UserInfo{}.OpenAPIModelName(): schema_k8sio_api_authentication_v1beta1_UserInfo(ref), + authorizationv1.FieldSelectorAttributes{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1_FieldSelectorAttributes(ref), + authorizationv1.LabelSelectorAttributes{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1_LabelSelectorAttributes(ref), + authorizationv1.LocalSubjectAccessReview{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1_LocalSubjectAccessReview(ref), + authorizationv1.NonResourceAttributes{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1_NonResourceAttributes(ref), + authorizationv1.NonResourceRule{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1_NonResourceRule(ref), + authorizationv1.ResourceAttributes{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1_ResourceAttributes(ref), + authorizationv1.ResourceRule{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1_ResourceRule(ref), + authorizationv1.SelfSubjectAccessReview{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1_SelfSubjectAccessReview(ref), + authorizationv1.SelfSubjectAccessReviewSpec{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1_SelfSubjectAccessReviewSpec(ref), + authorizationv1.SelfSubjectRulesReview{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1_SelfSubjectRulesReview(ref), + authorizationv1.SelfSubjectRulesReviewSpec{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1_SelfSubjectRulesReviewSpec(ref), + authorizationv1.SubjectAccessReview{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1_SubjectAccessReview(ref), + authorizationv1.SubjectAccessReviewSpec{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1_SubjectAccessReviewSpec(ref), + authorizationv1.SubjectAccessReviewStatus{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1_SubjectAccessReviewStatus(ref), + authorizationv1.SubjectRulesReviewStatus{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1_SubjectRulesReviewStatus(ref), + authorizationv1beta1.LocalSubjectAccessReview{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1beta1_LocalSubjectAccessReview(ref), + authorizationv1beta1.NonResourceAttributes{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1beta1_NonResourceAttributes(ref), + authorizationv1beta1.NonResourceRule{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1beta1_NonResourceRule(ref), + authorizationv1beta1.ResourceAttributes{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1beta1_ResourceAttributes(ref), + authorizationv1beta1.ResourceRule{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1beta1_ResourceRule(ref), + authorizationv1beta1.SelfSubjectAccessReview{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReview(ref), + authorizationv1beta1.SelfSubjectAccessReviewSpec{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReviewSpec(ref), + authorizationv1beta1.SelfSubjectRulesReview{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReview(ref), + authorizationv1beta1.SelfSubjectRulesReviewSpec{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReviewSpec(ref), + authorizationv1beta1.SubjectAccessReview{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1beta1_SubjectAccessReview(ref), + authorizationv1beta1.SubjectAccessReviewSpec{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewSpec(ref), + authorizationv1beta1.SubjectAccessReviewStatus{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewStatus(ref), + authorizationv1beta1.SubjectRulesReviewStatus{}.OpenAPIModelName(): schema_k8sio_api_authorization_v1beta1_SubjectRulesReviewStatus(ref), + autoscalingv1.ContainerResourceMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ContainerResourceMetricSource(ref), + autoscalingv1.ContainerResourceMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ContainerResourceMetricStatus(ref), + autoscalingv1.CrossVersionObjectReference{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref), + autoscalingv1.ExternalMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ExternalMetricSource(ref), + autoscalingv1.ExternalMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref), + autoscalingv1.HorizontalPodAutoscaler{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref), + autoscalingv1.HorizontalPodAutoscalerCondition{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref), + autoscalingv1.HorizontalPodAutoscalerList{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref), + autoscalingv1.HorizontalPodAutoscalerSpec{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref), + autoscalingv1.HorizontalPodAutoscalerStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref), + autoscalingv1.MetricSpec{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_MetricSpec(ref), + autoscalingv1.MetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_MetricStatus(ref), + autoscalingv1.ObjectMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref), + autoscalingv1.ObjectMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref), + autoscalingv1.PodsMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref), + autoscalingv1.PodsMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref), + autoscalingv1.ResourceMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ResourceMetricSource(ref), + autoscalingv1.ResourceMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref), + autoscalingv1.Scale{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_Scale(ref), + autoscalingv1.ScaleSpec{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ScaleSpec(ref), + autoscalingv1.ScaleStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ScaleStatus(ref), + autoscalingv2.ContainerResourceMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_ContainerResourceMetricSource(ref), + autoscalingv2.ContainerResourceMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_ContainerResourceMetricStatus(ref), + autoscalingv2.CrossVersionObjectReference{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_CrossVersionObjectReference(ref), + autoscalingv2.ExternalMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_ExternalMetricSource(ref), + autoscalingv2.ExternalMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_ExternalMetricStatus(ref), + autoscalingv2.HPAScalingPolicy{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_HPAScalingPolicy(ref), + autoscalingv2.HPAScalingRules{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_HPAScalingRules(ref), + autoscalingv2.HorizontalPodAutoscaler{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscaler(ref), + autoscalingv2.HorizontalPodAutoscalerBehavior{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerBehavior(ref), + autoscalingv2.HorizontalPodAutoscalerCondition{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerCondition(ref), + autoscalingv2.HorizontalPodAutoscalerList{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerList(ref), + autoscalingv2.HorizontalPodAutoscalerSpec{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerSpec(ref), + autoscalingv2.HorizontalPodAutoscalerStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerStatus(ref), + autoscalingv2.MetricIdentifier{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_MetricIdentifier(ref), + autoscalingv2.MetricSpec{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_MetricSpec(ref), + autoscalingv2.MetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_MetricStatus(ref), + autoscalingv2.MetricTarget{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_MetricTarget(ref), + autoscalingv2.MetricValueStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_MetricValueStatus(ref), + autoscalingv2.ObjectMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_ObjectMetricSource(ref), + autoscalingv2.ObjectMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_ObjectMetricStatus(ref), + autoscalingv2.PodsMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_PodsMetricSource(ref), + autoscalingv2.PodsMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_PodsMetricStatus(ref), + autoscalingv2.ResourceMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_ResourceMetricSource(ref), + autoscalingv2.ResourceMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2_ResourceMetricStatus(ref), + autoscalingv2beta1.ContainerResourceMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricSource(ref), + autoscalingv2beta1.ContainerResourceMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricStatus(ref), + autoscalingv2beta1.CrossVersionObjectReference{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_CrossVersionObjectReference(ref), + autoscalingv2beta1.ExternalMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_ExternalMetricSource(ref), + autoscalingv2beta1.ExternalMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_ExternalMetricStatus(ref), + autoscalingv2beta1.HorizontalPodAutoscaler{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscaler(ref), + autoscalingv2beta1.HorizontalPodAutoscalerCondition{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref), + autoscalingv2beta1.HorizontalPodAutoscalerList{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref), + autoscalingv2beta1.HorizontalPodAutoscalerSpec{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref), + autoscalingv2beta1.HorizontalPodAutoscalerStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref), + autoscalingv2beta1.MetricSpec{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref), + autoscalingv2beta1.MetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref), + autoscalingv2beta1.ObjectMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_ObjectMetricSource(ref), + autoscalingv2beta1.ObjectMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_ObjectMetricStatus(ref), + autoscalingv2beta1.PodsMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_PodsMetricSource(ref), + autoscalingv2beta1.PodsMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_PodsMetricStatus(ref), + autoscalingv2beta1.ResourceMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_ResourceMetricSource(ref), + autoscalingv2beta1.ResourceMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref), + v2beta2.ContainerResourceMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricSource(ref), + v2beta2.ContainerResourceMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricStatus(ref), + v2beta2.CrossVersionObjectReference{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref), + v2beta2.ExternalMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_ExternalMetricSource(ref), + v2beta2.ExternalMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_ExternalMetricStatus(ref), + v2beta2.HPAScalingPolicy{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref), + v2beta2.HPAScalingRules{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_HPAScalingRules(ref), + v2beta2.HorizontalPodAutoscaler{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscaler(ref), + v2beta2.HorizontalPodAutoscalerBehavior{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior(ref), + v2beta2.HorizontalPodAutoscalerCondition{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref), + v2beta2.HorizontalPodAutoscalerList{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref), + v2beta2.HorizontalPodAutoscalerSpec{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref), + v2beta2.HorizontalPodAutoscalerStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref), + v2beta2.MetricIdentifier{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_MetricIdentifier(ref), + v2beta2.MetricSpec{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref), + v2beta2.MetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref), + v2beta2.MetricTarget{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_MetricTarget(ref), + v2beta2.MetricValueStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_MetricValueStatus(ref), + v2beta2.ObjectMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_ObjectMetricSource(ref), + v2beta2.ObjectMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_ObjectMetricStatus(ref), + v2beta2.PodsMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_PodsMetricSource(ref), + v2beta2.PodsMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_PodsMetricStatus(ref), + v2beta2.ResourceMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref), + v2beta2.ResourceMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref), + batchv1.CronJob{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_CronJob(ref), + batchv1.CronJobList{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_CronJobList(ref), + batchv1.CronJobSpec{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_CronJobSpec(ref), + batchv1.CronJobStatus{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_CronJobStatus(ref), + batchv1.Job{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_Job(ref), + batchv1.JobCondition{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_JobCondition(ref), + batchv1.JobList{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_JobList(ref), + batchv1.JobSpec{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_JobSpec(ref), + batchv1.JobStatus{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_JobStatus(ref), + batchv1.JobTemplateSpec{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_JobTemplateSpec(ref), + batchv1.PodFailurePolicy{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_PodFailurePolicy(ref), + batchv1.PodFailurePolicyOnExitCodesRequirement{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_PodFailurePolicyOnExitCodesRequirement(ref), + batchv1.PodFailurePolicyOnPodConditionsPattern{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_PodFailurePolicyOnPodConditionsPattern(ref), + batchv1.PodFailurePolicyRule{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_PodFailurePolicyRule(ref), + batchv1.SuccessPolicy{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_SuccessPolicy(ref), + batchv1.SuccessPolicyRule{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_SuccessPolicyRule(ref), + batchv1.UncountedTerminatedPods{}.OpenAPIModelName(): schema_k8sio_api_batch_v1_UncountedTerminatedPods(ref), + batchv1beta1.CronJob{}.OpenAPIModelName(): schema_k8sio_api_batch_v1beta1_CronJob(ref), + batchv1beta1.CronJobList{}.OpenAPIModelName(): schema_k8sio_api_batch_v1beta1_CronJobList(ref), + batchv1beta1.CronJobSpec{}.OpenAPIModelName(): schema_k8sio_api_batch_v1beta1_CronJobSpec(ref), + batchv1beta1.CronJobStatus{}.OpenAPIModelName(): schema_k8sio_api_batch_v1beta1_CronJobStatus(ref), + batchv1beta1.JobTemplateSpec{}.OpenAPIModelName(): schema_k8sio_api_batch_v1beta1_JobTemplateSpec(ref), + certificatesv1.CertificateSigningRequest{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1_CertificateSigningRequest(ref), + certificatesv1.CertificateSigningRequestCondition{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1_CertificateSigningRequestCondition(ref), + certificatesv1.CertificateSigningRequestList{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1_CertificateSigningRequestList(ref), + certificatesv1.CertificateSigningRequestSpec{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1_CertificateSigningRequestSpec(ref), + certificatesv1.CertificateSigningRequestStatus{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1_CertificateSigningRequestStatus(ref), + certificatesv1alpha1.ClusterTrustBundle{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1alpha1_ClusterTrustBundle(ref), + certificatesv1alpha1.ClusterTrustBundleList{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1alpha1_ClusterTrustBundleList(ref), + certificatesv1alpha1.ClusterTrustBundleSpec{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1alpha1_ClusterTrustBundleSpec(ref), + certificatesv1alpha1.PodCertificateRequest{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1alpha1_PodCertificateRequest(ref), + certificatesv1alpha1.PodCertificateRequestList{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1alpha1_PodCertificateRequestList(ref), + certificatesv1alpha1.PodCertificateRequestSpec{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1alpha1_PodCertificateRequestSpec(ref), + certificatesv1alpha1.PodCertificateRequestStatus{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1alpha1_PodCertificateRequestStatus(ref), + certificatesv1beta1.CertificateSigningRequest{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1beta1_CertificateSigningRequest(ref), + certificatesv1beta1.CertificateSigningRequestCondition{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestCondition(ref), + certificatesv1beta1.CertificateSigningRequestList{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref), + certificatesv1beta1.CertificateSigningRequestSpec{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestSpec(ref), + certificatesv1beta1.CertificateSigningRequestStatus{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestStatus(ref), + certificatesv1beta1.ClusterTrustBundle{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1beta1_ClusterTrustBundle(ref), + certificatesv1beta1.ClusterTrustBundleList{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1beta1_ClusterTrustBundleList(ref), + certificatesv1beta1.ClusterTrustBundleSpec{}.OpenAPIModelName(): schema_k8sio_api_certificates_v1beta1_ClusterTrustBundleSpec(ref), + coordinationv1.Lease{}.OpenAPIModelName(): schema_k8sio_api_coordination_v1_Lease(ref), + coordinationv1.LeaseList{}.OpenAPIModelName(): schema_k8sio_api_coordination_v1_LeaseList(ref), + coordinationv1.LeaseSpec{}.OpenAPIModelName(): schema_k8sio_api_coordination_v1_LeaseSpec(ref), + v1alpha2.LeaseCandidate{}.OpenAPIModelName(): schema_k8sio_api_coordination_v1alpha2_LeaseCandidate(ref), + v1alpha2.LeaseCandidateList{}.OpenAPIModelName(): schema_k8sio_api_coordination_v1alpha2_LeaseCandidateList(ref), + v1alpha2.LeaseCandidateSpec{}.OpenAPIModelName(): schema_k8sio_api_coordination_v1alpha2_LeaseCandidateSpec(ref), + coordinationv1beta1.Lease{}.OpenAPIModelName(): schema_k8sio_api_coordination_v1beta1_Lease(ref), + coordinationv1beta1.LeaseCandidate{}.OpenAPIModelName(): schema_k8sio_api_coordination_v1beta1_LeaseCandidate(ref), + coordinationv1beta1.LeaseCandidateList{}.OpenAPIModelName(): schema_k8sio_api_coordination_v1beta1_LeaseCandidateList(ref), + coordinationv1beta1.LeaseCandidateSpec{}.OpenAPIModelName(): schema_k8sio_api_coordination_v1beta1_LeaseCandidateSpec(ref), + coordinationv1beta1.LeaseList{}.OpenAPIModelName(): schema_k8sio_api_coordination_v1beta1_LeaseList(ref), + coordinationv1beta1.LeaseSpec{}.OpenAPIModelName(): schema_k8sio_api_coordination_v1beta1_LeaseSpec(ref), + corev1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), + corev1.Affinity{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Affinity(ref), + corev1.AppArmorProfile{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AppArmorProfile(ref), + corev1.AttachedVolume{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AttachedVolume(ref), + corev1.AvoidPods{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AvoidPods(ref), + corev1.AzureDiskVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref), + corev1.AzureFilePersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref), + corev1.AzureFileVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AzureFileVolumeSource(ref), + corev1.Binding{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Binding(ref), + corev1.CSIPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref), + corev1.CSIVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CSIVolumeSource(ref), + corev1.Capabilities{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Capabilities(ref), + corev1.CephFSPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref), + corev1.CephFSVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CephFSVolumeSource(ref), + corev1.CinderPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref), + corev1.CinderVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CinderVolumeSource(ref), + corev1.ClientIPConfig{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ClientIPConfig(ref), + corev1.ClusterTrustBundleProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ClusterTrustBundleProjection(ref), + corev1.ComponentCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ComponentCondition(ref), + corev1.ComponentStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ComponentStatus(ref), + corev1.ComponentStatusList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ComponentStatusList(ref), + corev1.ConfigMap{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMap(ref), + corev1.ConfigMapEnvSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapEnvSource(ref), + corev1.ConfigMapKeySelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapKeySelector(ref), + corev1.ConfigMapList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapList(ref), + corev1.ConfigMapNodeConfigSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref), + corev1.ConfigMapProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapProjection(ref), + corev1.ConfigMapVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref), + corev1.Container{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Container(ref), + corev1.ContainerExtendedResourceRequest{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerExtendedResourceRequest(ref), + corev1.ContainerImage{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerImage(ref), + corev1.ContainerPort{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerPort(ref), + corev1.ContainerResizePolicy{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerResizePolicy(ref), + corev1.ContainerRestartRule{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerRestartRule(ref), + corev1.ContainerRestartRuleOnExitCodes{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerRestartRuleOnExitCodes(ref), + corev1.ContainerState{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerState(ref), + corev1.ContainerStateRunning{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerStateRunning(ref), + corev1.ContainerStateTerminated{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerStateTerminated(ref), + corev1.ContainerStateWaiting{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerStateWaiting(ref), + corev1.ContainerStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerStatus(ref), + corev1.ContainerUser{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerUser(ref), + corev1.DaemonEndpoint{}.OpenAPIModelName(): schema_k8sio_api_core_v1_DaemonEndpoint(ref), + corev1.DownwardAPIProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_DownwardAPIProjection(ref), + corev1.DownwardAPIVolumeFile{}.OpenAPIModelName(): schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref), + corev1.DownwardAPIVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref), + corev1.EmptyDirVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref), + corev1.EndpointAddress{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EndpointAddress(ref), + corev1.EndpointPort{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EndpointPort(ref), + corev1.EndpointSubset{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EndpointSubset(ref), + corev1.Endpoints{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Endpoints(ref), + corev1.EndpointsList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EndpointsList(ref), + corev1.EnvFromSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EnvFromSource(ref), + corev1.EnvVar{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EnvVar(ref), + corev1.EnvVarSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EnvVarSource(ref), + corev1.EphemeralContainer{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EphemeralContainer(ref), + corev1.EphemeralContainerCommon{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EphemeralContainerCommon(ref), + corev1.EphemeralVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EphemeralVolumeSource(ref), + corev1.Event{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Event(ref), + corev1.EventList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EventList(ref), + corev1.EventSeries{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EventSeries(ref), + corev1.EventSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EventSource(ref), + corev1.ExecAction{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ExecAction(ref), + corev1.FCVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_FCVolumeSource(ref), + corev1.FileKeySelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_FileKeySelector(ref), + corev1.FlexPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref), + corev1.FlexVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_FlexVolumeSource(ref), + corev1.FlockerVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_FlockerVolumeSource(ref), + corev1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref), + corev1.GRPCAction{}.OpenAPIModelName(): schema_k8sio_api_core_v1_GRPCAction(ref), + corev1.GitRepoVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_GitRepoVolumeSource(ref), + corev1.GlusterfsPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref), + corev1.GlusterfsVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref), + corev1.HTTPGetAction{}.OpenAPIModelName(): schema_k8sio_api_core_v1_HTTPGetAction(ref), + corev1.HTTPHeader{}.OpenAPIModelName(): schema_k8sio_api_core_v1_HTTPHeader(ref), + corev1.HostAlias{}.OpenAPIModelName(): schema_k8sio_api_core_v1_HostAlias(ref), + corev1.HostIP{}.OpenAPIModelName(): schema_k8sio_api_core_v1_HostIP(ref), + corev1.HostPathVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_HostPathVolumeSource(ref), + corev1.ISCSIPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref), + corev1.ISCSIVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ISCSIVolumeSource(ref), + corev1.ImageVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ImageVolumeSource(ref), + corev1.KeyToPath{}.OpenAPIModelName(): schema_k8sio_api_core_v1_KeyToPath(ref), + corev1.Lifecycle{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Lifecycle(ref), + corev1.LifecycleHandler{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LifecycleHandler(ref), + corev1.LimitRange{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LimitRange(ref), + corev1.LimitRangeItem{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LimitRangeItem(ref), + corev1.LimitRangeList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LimitRangeList(ref), + corev1.LimitRangeSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LimitRangeSpec(ref), + corev1.LinuxContainerUser{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LinuxContainerUser(ref), + corev1.List{}.OpenAPIModelName(): schema_k8sio_api_core_v1_List(ref), + corev1.LoadBalancerIngress{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LoadBalancerIngress(ref), + corev1.LoadBalancerStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LoadBalancerStatus(ref), + corev1.LocalObjectReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LocalObjectReference(ref), + corev1.LocalVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LocalVolumeSource(ref), + corev1.ModifyVolumeStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ModifyVolumeStatus(ref), + corev1.NFSVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NFSVolumeSource(ref), + corev1.Namespace{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Namespace(ref), + corev1.NamespaceCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NamespaceCondition(ref), + corev1.NamespaceList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NamespaceList(ref), + corev1.NamespaceSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NamespaceSpec(ref), + corev1.NamespaceStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NamespaceStatus(ref), + corev1.Node{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Node(ref), + corev1.NodeAddress{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeAddress(ref), + corev1.NodeAffinity{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeAffinity(ref), + corev1.NodeCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeCondition(ref), + corev1.NodeConfigSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeConfigSource(ref), + corev1.NodeConfigStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeConfigStatus(ref), + corev1.NodeDaemonEndpoints{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref), + corev1.NodeFeatures{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeFeatures(ref), + corev1.NodeList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeList(ref), + corev1.NodeProxyOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeProxyOptions(ref), + corev1.NodeRuntimeHandler{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeRuntimeHandler(ref), + corev1.NodeRuntimeHandlerFeatures{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeRuntimeHandlerFeatures(ref), + corev1.NodeSelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSelector(ref), + corev1.NodeSelectorRequirement{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSelectorRequirement(ref), + corev1.NodeSelectorTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSelectorTerm(ref), + corev1.NodeSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSpec(ref), + corev1.NodeStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeStatus(ref), + corev1.NodeSwapStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSwapStatus(ref), + corev1.NodeSystemInfo{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSystemInfo(ref), + corev1.ObjectFieldSelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ObjectFieldSelector(ref), + corev1.ObjectReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ObjectReference(ref), + corev1.PersistentVolume{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolume(ref), + corev1.PersistentVolumeClaim{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaim(ref), + corev1.PersistentVolumeClaimCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref), + corev1.PersistentVolumeClaimList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref), + corev1.PersistentVolumeClaimSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref), + corev1.PersistentVolumeClaimStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref), + corev1.PersistentVolumeClaimTemplate{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref), + corev1.PersistentVolumeClaimVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref), + corev1.PersistentVolumeList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeList(ref), + corev1.PersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeSource(ref), + corev1.PersistentVolumeSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeSpec(ref), + corev1.PersistentVolumeStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeStatus(ref), + corev1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref), + corev1.Pod{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Pod(ref), + corev1.PodAffinity{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodAffinity(ref), + corev1.PodAffinityTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodAffinityTerm(ref), + corev1.PodAntiAffinity{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodAntiAffinity(ref), + corev1.PodAttachOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodAttachOptions(ref), + corev1.PodCertificateProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodCertificateProjection(ref), + corev1.PodCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodCondition(ref), + corev1.PodDNSConfig{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodDNSConfig(ref), + corev1.PodDNSConfigOption{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodDNSConfigOption(ref), + corev1.PodExecOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodExecOptions(ref), + corev1.PodExtendedResourceClaimStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodExtendedResourceClaimStatus(ref), + corev1.PodIP{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodIP(ref), + corev1.PodList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodList(ref), + corev1.PodLogOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodLogOptions(ref), + corev1.PodOS{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodOS(ref), + corev1.PodPortForwardOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodPortForwardOptions(ref), + corev1.PodProxyOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodProxyOptions(ref), + corev1.PodReadinessGate{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodReadinessGate(ref), + corev1.PodResourceClaim{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodResourceClaim(ref), + corev1.PodResourceClaimStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodResourceClaimStatus(ref), + corev1.PodSchedulingGate{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodSchedulingGate(ref), + corev1.PodSecurityContext{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodSecurityContext(ref), + corev1.PodSignature{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodSignature(ref), + corev1.PodSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodSpec(ref), + corev1.PodStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodStatus(ref), + corev1.PodStatusResult{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodStatusResult(ref), + corev1.PodTemplate{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodTemplate(ref), + corev1.PodTemplateList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodTemplateList(ref), + corev1.PodTemplateSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodTemplateSpec(ref), + corev1.PortStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PortStatus(ref), + corev1.PortworxVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PortworxVolumeSource(ref), + corev1.PreferAvoidPodsEntry{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref), + corev1.PreferredSchedulingTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref), + corev1.Probe{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Probe(ref), + corev1.ProbeHandler{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ProbeHandler(ref), + corev1.ProjectedVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ProjectedVolumeSource(ref), + corev1.QuobyteVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_QuobyteVolumeSource(ref), + corev1.RBDPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref), + corev1.RBDVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_RBDVolumeSource(ref), + corev1.RangeAllocation{}.OpenAPIModelName(): schema_k8sio_api_core_v1_RangeAllocation(ref), + corev1.ReplicationController{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ReplicationController(ref), + corev1.ReplicationControllerCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ReplicationControllerCondition(ref), + corev1.ReplicationControllerList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ReplicationControllerList(ref), + corev1.ReplicationControllerSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ReplicationControllerSpec(ref), + corev1.ReplicationControllerStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ReplicationControllerStatus(ref), + corev1.ResourceClaim{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceClaim(ref), + corev1.ResourceFieldSelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceFieldSelector(ref), + corev1.ResourceHealth{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceHealth(ref), + corev1.ResourceQuota{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceQuota(ref), + corev1.ResourceQuotaList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceQuotaList(ref), + corev1.ResourceQuotaSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceQuotaSpec(ref), + corev1.ResourceQuotaStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceQuotaStatus(ref), + corev1.ResourceRequirements{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceRequirements(ref), + corev1.ResourceStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceStatus(ref), + corev1.SELinuxOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SELinuxOptions(ref), + corev1.ScaleIOPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref), + corev1.ScaleIOVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref), + corev1.ScopeSelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ScopeSelector(ref), + corev1.ScopedResourceSelectorRequirement{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref), + corev1.SeccompProfile{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SeccompProfile(ref), + corev1.Secret{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Secret(ref), + corev1.SecretEnvSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretEnvSource(ref), + corev1.SecretKeySelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretKeySelector(ref), + corev1.SecretList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretList(ref), + corev1.SecretProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretProjection(ref), + corev1.SecretReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretReference(ref), + corev1.SecretVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretVolumeSource(ref), + corev1.SecurityContext{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecurityContext(ref), + corev1.SerializedReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SerializedReference(ref), + corev1.Service{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Service(ref), + corev1.ServiceAccount{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceAccount(ref), + corev1.ServiceAccountList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceAccountList(ref), + corev1.ServiceAccountTokenProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref), + corev1.ServiceList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceList(ref), + corev1.ServicePort{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServicePort(ref), + corev1.ServiceProxyOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceProxyOptions(ref), + corev1.ServiceSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceSpec(ref), + corev1.ServiceStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceStatus(ref), + corev1.SessionAffinityConfig{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SessionAffinityConfig(ref), + corev1.SleepAction{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SleepAction(ref), + corev1.StorageOSPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref), + corev1.StorageOSVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_StorageOSVolumeSource(ref), + corev1.Sysctl{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Sysctl(ref), + corev1.TCPSocketAction{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TCPSocketAction(ref), + corev1.Taint{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Taint(ref), + corev1.Toleration{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Toleration(ref), + corev1.TopologySelectorLabelRequirement{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref), + corev1.TopologySelectorTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TopologySelectorTerm(ref), + corev1.TopologySpreadConstraint{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TopologySpreadConstraint(ref), + corev1.TypedLocalObjectReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TypedLocalObjectReference(ref), + corev1.TypedObjectReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TypedObjectReference(ref), + corev1.Volume{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Volume(ref), + corev1.VolumeDevice{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeDevice(ref), + corev1.VolumeMount{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeMount(ref), + corev1.VolumeMountStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeMountStatus(ref), + corev1.VolumeNodeAffinity{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeNodeAffinity(ref), + corev1.VolumeProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeProjection(ref), + corev1.VolumeResourceRequirements{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeResourceRequirements(ref), + corev1.VolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeSource(ref), + corev1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref), + corev1.WeightedPodAffinityTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref), + corev1.WindowsSecurityContextOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref), + discoveryv1.Endpoint{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1_Endpoint(ref), + discoveryv1.EndpointConditions{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1_EndpointConditions(ref), + discoveryv1.EndpointHints{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1_EndpointHints(ref), + discoveryv1.EndpointPort{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1_EndpointPort(ref), + discoveryv1.EndpointSlice{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1_EndpointSlice(ref), + discoveryv1.EndpointSliceList{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1_EndpointSliceList(ref), + discoveryv1.ForNode{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1_ForNode(ref), + discoveryv1.ForZone{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1_ForZone(ref), + discoveryv1beta1.Endpoint{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1beta1_Endpoint(ref), + discoveryv1beta1.EndpointConditions{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1beta1_EndpointConditions(ref), + discoveryv1beta1.EndpointHints{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1beta1_EndpointHints(ref), + discoveryv1beta1.EndpointPort{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1beta1_EndpointPort(ref), + discoveryv1beta1.EndpointSlice{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1beta1_EndpointSlice(ref), + discoveryv1beta1.EndpointSliceList{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1beta1_EndpointSliceList(ref), + discoveryv1beta1.ForNode{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1beta1_ForNode(ref), + discoveryv1beta1.ForZone{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1beta1_ForZone(ref), + eventsv1.Event{}.OpenAPIModelName(): schema_k8sio_api_events_v1_Event(ref), + eventsv1.EventList{}.OpenAPIModelName(): schema_k8sio_api_events_v1_EventList(ref), + eventsv1.EventSeries{}.OpenAPIModelName(): schema_k8sio_api_events_v1_EventSeries(ref), + eventsv1beta1.Event{}.OpenAPIModelName(): schema_k8sio_api_events_v1beta1_Event(ref), + eventsv1beta1.EventList{}.OpenAPIModelName(): schema_k8sio_api_events_v1beta1_EventList(ref), + eventsv1beta1.EventSeries{}.OpenAPIModelName(): schema_k8sio_api_events_v1beta1_EventSeries(ref), + extensionsv1beta1.DaemonSet{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_DaemonSet(ref), + extensionsv1beta1.DaemonSetCondition{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_DaemonSetCondition(ref), + extensionsv1beta1.DaemonSetList{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_DaemonSetList(ref), + extensionsv1beta1.DaemonSetSpec{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_DaemonSetSpec(ref), + extensionsv1beta1.DaemonSetStatus{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_DaemonSetStatus(ref), + extensionsv1beta1.DaemonSetUpdateStrategy{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_DaemonSetUpdateStrategy(ref), + extensionsv1beta1.Deployment{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_Deployment(ref), + extensionsv1beta1.DeploymentCondition{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_DeploymentCondition(ref), + extensionsv1beta1.DeploymentList{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_DeploymentList(ref), + extensionsv1beta1.DeploymentRollback{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_DeploymentRollback(ref), + extensionsv1beta1.DeploymentSpec{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_DeploymentSpec(ref), + extensionsv1beta1.DeploymentStatus{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_DeploymentStatus(ref), + extensionsv1beta1.DeploymentStrategy{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_DeploymentStrategy(ref), + extensionsv1beta1.HTTPIngressPath{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_HTTPIngressPath(ref), + extensionsv1beta1.HTTPIngressRuleValue{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_HTTPIngressRuleValue(ref), + extensionsv1beta1.IPBlock{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_IPBlock(ref), + extensionsv1beta1.Ingress{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_Ingress(ref), + extensionsv1beta1.IngressBackend{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_IngressBackend(ref), + extensionsv1beta1.IngressList{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_IngressList(ref), + extensionsv1beta1.IngressLoadBalancerIngress{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_IngressLoadBalancerIngress(ref), + extensionsv1beta1.IngressLoadBalancerStatus{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_IngressLoadBalancerStatus(ref), + extensionsv1beta1.IngressPortStatus{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_IngressPortStatus(ref), + extensionsv1beta1.IngressRule{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_IngressRule(ref), + extensionsv1beta1.IngressRuleValue{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_IngressRuleValue(ref), + extensionsv1beta1.IngressSpec{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_IngressSpec(ref), + extensionsv1beta1.IngressStatus{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_IngressStatus(ref), + extensionsv1beta1.IngressTLS{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_IngressTLS(ref), + extensionsv1beta1.NetworkPolicy{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_NetworkPolicy(ref), + extensionsv1beta1.NetworkPolicyEgressRule{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_NetworkPolicyEgressRule(ref), + extensionsv1beta1.NetworkPolicyIngressRule{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_NetworkPolicyIngressRule(ref), + extensionsv1beta1.NetworkPolicyList{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_NetworkPolicyList(ref), + extensionsv1beta1.NetworkPolicyPeer{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_NetworkPolicyPeer(ref), + extensionsv1beta1.NetworkPolicyPort{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_NetworkPolicyPort(ref), + extensionsv1beta1.NetworkPolicySpec{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref), + extensionsv1beta1.ReplicaSet{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_ReplicaSet(ref), + extensionsv1beta1.ReplicaSetCondition{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_ReplicaSetCondition(ref), + extensionsv1beta1.ReplicaSetList{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_ReplicaSetList(ref), + extensionsv1beta1.ReplicaSetSpec{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_ReplicaSetSpec(ref), + extensionsv1beta1.ReplicaSetStatus{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_ReplicaSetStatus(ref), + extensionsv1beta1.RollbackConfig{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_RollbackConfig(ref), + extensionsv1beta1.RollingUpdateDaemonSet{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_RollingUpdateDaemonSet(ref), + extensionsv1beta1.RollingUpdateDeployment{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_RollingUpdateDeployment(ref), + extensionsv1beta1.Scale{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_Scale(ref), + extensionsv1beta1.ScaleSpec{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_ScaleSpec(ref), + extensionsv1beta1.ScaleStatus{}.OpenAPIModelName(): schema_k8sio_api_extensions_v1beta1_ScaleStatus(ref), + flowcontrolv1.ExemptPriorityLevelConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_ExemptPriorityLevelConfiguration(ref), + flowcontrolv1.FlowDistinguisherMethod{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_FlowDistinguisherMethod(ref), + flowcontrolv1.FlowSchema{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_FlowSchema(ref), + flowcontrolv1.FlowSchemaCondition{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_FlowSchemaCondition(ref), + flowcontrolv1.FlowSchemaList{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_FlowSchemaList(ref), + flowcontrolv1.FlowSchemaSpec{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_FlowSchemaSpec(ref), + flowcontrolv1.FlowSchemaStatus{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_FlowSchemaStatus(ref), + flowcontrolv1.GroupSubject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_GroupSubject(ref), + flowcontrolv1.LimitResponse{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_LimitResponse(ref), + flowcontrolv1.LimitedPriorityLevelConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_LimitedPriorityLevelConfiguration(ref), + flowcontrolv1.NonResourcePolicyRule{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_NonResourcePolicyRule(ref), + flowcontrolv1.PolicyRulesWithSubjects{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_PolicyRulesWithSubjects(ref), + flowcontrolv1.PriorityLevelConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_PriorityLevelConfiguration(ref), + flowcontrolv1.PriorityLevelConfigurationCondition{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationCondition(ref), + flowcontrolv1.PriorityLevelConfigurationList{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationList(ref), + flowcontrolv1.PriorityLevelConfigurationReference{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationReference(ref), + flowcontrolv1.PriorityLevelConfigurationSpec{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationSpec(ref), + flowcontrolv1.PriorityLevelConfigurationStatus{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationStatus(ref), + flowcontrolv1.QueuingConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_QueuingConfiguration(ref), + flowcontrolv1.ResourcePolicyRule{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_ResourcePolicyRule(ref), + flowcontrolv1.ServiceAccountSubject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_ServiceAccountSubject(ref), + flowcontrolv1.Subject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_Subject(ref), + flowcontrolv1.UserSubject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1_UserSubject(ref), + flowcontrolv1beta1.ExemptPriorityLevelConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_ExemptPriorityLevelConfiguration(ref), + flowcontrolv1beta1.FlowDistinguisherMethod{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_FlowDistinguisherMethod(ref), + flowcontrolv1beta1.FlowSchema{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_FlowSchema(ref), + flowcontrolv1beta1.FlowSchemaCondition{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaCondition(ref), + flowcontrolv1beta1.FlowSchemaList{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaList(ref), + flowcontrolv1beta1.FlowSchemaSpec{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaSpec(ref), + flowcontrolv1beta1.FlowSchemaStatus{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaStatus(ref), + flowcontrolv1beta1.GroupSubject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_GroupSubject(ref), + flowcontrolv1beta1.LimitResponse{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_LimitResponse(ref), + flowcontrolv1beta1.LimitedPriorityLevelConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_LimitedPriorityLevelConfiguration(ref), + flowcontrolv1beta1.NonResourcePolicyRule{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_NonResourcePolicyRule(ref), + flowcontrolv1beta1.PolicyRulesWithSubjects{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_PolicyRulesWithSubjects(ref), + flowcontrolv1beta1.PriorityLevelConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfiguration(ref), + flowcontrolv1beta1.PriorityLevelConfigurationCondition{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationCondition(ref), + flowcontrolv1beta1.PriorityLevelConfigurationList{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationList(ref), + flowcontrolv1beta1.PriorityLevelConfigurationReference{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationReference(ref), + flowcontrolv1beta1.PriorityLevelConfigurationSpec{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationSpec(ref), + flowcontrolv1beta1.PriorityLevelConfigurationStatus{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationStatus(ref), + flowcontrolv1beta1.QueuingConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_QueuingConfiguration(ref), + flowcontrolv1beta1.ResourcePolicyRule{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_ResourcePolicyRule(ref), + flowcontrolv1beta1.ServiceAccountSubject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_ServiceAccountSubject(ref), + flowcontrolv1beta1.Subject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_Subject(ref), + flowcontrolv1beta1.UserSubject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta1_UserSubject(ref), + flowcontrolv1beta2.ExemptPriorityLevelConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_ExemptPriorityLevelConfiguration(ref), + flowcontrolv1beta2.FlowDistinguisherMethod{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_FlowDistinguisherMethod(ref), + flowcontrolv1beta2.FlowSchema{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_FlowSchema(ref), + flowcontrolv1beta2.FlowSchemaCondition{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaCondition(ref), + flowcontrolv1beta2.FlowSchemaList{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaList(ref), + flowcontrolv1beta2.FlowSchemaSpec{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaSpec(ref), + flowcontrolv1beta2.FlowSchemaStatus{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaStatus(ref), + flowcontrolv1beta2.GroupSubject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_GroupSubject(ref), + flowcontrolv1beta2.LimitResponse{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_LimitResponse(ref), + flowcontrolv1beta2.LimitedPriorityLevelConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_LimitedPriorityLevelConfiguration(ref), + flowcontrolv1beta2.NonResourcePolicyRule{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_NonResourcePolicyRule(ref), + flowcontrolv1beta2.PolicyRulesWithSubjects{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_PolicyRulesWithSubjects(ref), + flowcontrolv1beta2.PriorityLevelConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfiguration(ref), + flowcontrolv1beta2.PriorityLevelConfigurationCondition{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationCondition(ref), + flowcontrolv1beta2.PriorityLevelConfigurationList{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationList(ref), + flowcontrolv1beta2.PriorityLevelConfigurationReference{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationReference(ref), + flowcontrolv1beta2.PriorityLevelConfigurationSpec{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationSpec(ref), + flowcontrolv1beta2.PriorityLevelConfigurationStatus{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationStatus(ref), + flowcontrolv1beta2.QueuingConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_QueuingConfiguration(ref), + flowcontrolv1beta2.ResourcePolicyRule{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_ResourcePolicyRule(ref), + flowcontrolv1beta2.ServiceAccountSubject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_ServiceAccountSubject(ref), + flowcontrolv1beta2.Subject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_Subject(ref), + flowcontrolv1beta2.UserSubject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta2_UserSubject(ref), + v1beta3.ExemptPriorityLevelConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_ExemptPriorityLevelConfiguration(ref), + v1beta3.FlowDistinguisherMethod{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_FlowDistinguisherMethod(ref), + v1beta3.FlowSchema{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_FlowSchema(ref), + v1beta3.FlowSchemaCondition{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaCondition(ref), + v1beta3.FlowSchemaList{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaList(ref), + v1beta3.FlowSchemaSpec{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaSpec(ref), + v1beta3.FlowSchemaStatus{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaStatus(ref), + v1beta3.GroupSubject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_GroupSubject(ref), + v1beta3.LimitResponse{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_LimitResponse(ref), + v1beta3.LimitedPriorityLevelConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_LimitedPriorityLevelConfiguration(ref), + v1beta3.NonResourcePolicyRule{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_NonResourcePolicyRule(ref), + v1beta3.PolicyRulesWithSubjects{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_PolicyRulesWithSubjects(ref), + v1beta3.PriorityLevelConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfiguration(ref), + v1beta3.PriorityLevelConfigurationCondition{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationCondition(ref), + v1beta3.PriorityLevelConfigurationList{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationList(ref), + v1beta3.PriorityLevelConfigurationReference{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationReference(ref), + v1beta3.PriorityLevelConfigurationSpec{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationSpec(ref), + v1beta3.PriorityLevelConfigurationStatus{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationStatus(ref), + v1beta3.QueuingConfiguration{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_QueuingConfiguration(ref), + v1beta3.ResourcePolicyRule{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_ResourcePolicyRule(ref), + v1beta3.ServiceAccountSubject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_ServiceAccountSubject(ref), + v1beta3.Subject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_Subject(ref), + v1beta3.UserSubject{}.OpenAPIModelName(): schema_k8sio_api_flowcontrol_v1beta3_UserSubject(ref), + imagepolicyv1alpha1.ImageReview{}.OpenAPIModelName(): schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref), + imagepolicyv1alpha1.ImageReviewContainerSpec{}.OpenAPIModelName(): schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewContainerSpec(ref), + imagepolicyv1alpha1.ImageReviewSpec{}.OpenAPIModelName(): schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref), + imagepolicyv1alpha1.ImageReviewStatus{}.OpenAPIModelName(): schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewStatus(ref), + networkingv1.HTTPIngressPath{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_HTTPIngressPath(ref), + networkingv1.HTTPIngressRuleValue{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_HTTPIngressRuleValue(ref), + networkingv1.IPAddress{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IPAddress(ref), + networkingv1.IPAddressList{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IPAddressList(ref), + networkingv1.IPAddressSpec{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IPAddressSpec(ref), + networkingv1.IPBlock{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IPBlock(ref), + networkingv1.Ingress{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_Ingress(ref), + networkingv1.IngressBackend{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IngressBackend(ref), + networkingv1.IngressClass{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IngressClass(ref), + networkingv1.IngressClassList{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IngressClassList(ref), + networkingv1.IngressClassParametersReference{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IngressClassParametersReference(ref), + networkingv1.IngressClassSpec{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IngressClassSpec(ref), + networkingv1.IngressList{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IngressList(ref), + networkingv1.IngressLoadBalancerIngress{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IngressLoadBalancerIngress(ref), + networkingv1.IngressLoadBalancerStatus{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IngressLoadBalancerStatus(ref), + networkingv1.IngressPortStatus{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IngressPortStatus(ref), + networkingv1.IngressRule{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IngressRule(ref), + networkingv1.IngressRuleValue{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IngressRuleValue(ref), + networkingv1.IngressServiceBackend{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IngressServiceBackend(ref), + networkingv1.IngressSpec{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IngressSpec(ref), + networkingv1.IngressStatus{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IngressStatus(ref), + networkingv1.IngressTLS{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_IngressTLS(ref), + networkingv1.NetworkPolicy{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_NetworkPolicy(ref), + networkingv1.NetworkPolicyEgressRule{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_NetworkPolicyEgressRule(ref), + networkingv1.NetworkPolicyIngressRule{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref), + networkingv1.NetworkPolicyList{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_NetworkPolicyList(ref), + networkingv1.NetworkPolicyPeer{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_NetworkPolicyPeer(ref), + networkingv1.NetworkPolicyPort{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_NetworkPolicyPort(ref), + networkingv1.NetworkPolicySpec{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_NetworkPolicySpec(ref), + networkingv1.ParentReference{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_ParentReference(ref), + networkingv1.ServiceBackendPort{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_ServiceBackendPort(ref), + networkingv1.ServiceCIDR{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_ServiceCIDR(ref), + networkingv1.ServiceCIDRList{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_ServiceCIDRList(ref), + networkingv1.ServiceCIDRSpec{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_ServiceCIDRSpec(ref), + networkingv1.ServiceCIDRStatus{}.OpenAPIModelName(): schema_k8sio_api_networking_v1_ServiceCIDRStatus(ref), + networkingv1beta1.HTTPIngressPath{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_HTTPIngressPath(ref), + networkingv1beta1.HTTPIngressRuleValue{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref), + networkingv1beta1.IPAddress{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IPAddress(ref), + networkingv1beta1.IPAddressList{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IPAddressList(ref), + networkingv1beta1.IPAddressSpec{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IPAddressSpec(ref), + networkingv1beta1.Ingress{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_Ingress(ref), + networkingv1beta1.IngressBackend{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IngressBackend(ref), + networkingv1beta1.IngressClass{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IngressClass(ref), + networkingv1beta1.IngressClassList{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IngressClassList(ref), + networkingv1beta1.IngressClassParametersReference{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IngressClassParametersReference(ref), + networkingv1beta1.IngressClassSpec{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IngressClassSpec(ref), + networkingv1beta1.IngressList{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IngressList(ref), + networkingv1beta1.IngressLoadBalancerIngress{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IngressLoadBalancerIngress(ref), + networkingv1beta1.IngressLoadBalancerStatus{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IngressLoadBalancerStatus(ref), + networkingv1beta1.IngressPortStatus{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IngressPortStatus(ref), + networkingv1beta1.IngressRule{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IngressRule(ref), + networkingv1beta1.IngressRuleValue{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IngressRuleValue(ref), + networkingv1beta1.IngressSpec{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IngressSpec(ref), + networkingv1beta1.IngressStatus{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IngressStatus(ref), + networkingv1beta1.IngressTLS{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_IngressTLS(ref), + networkingv1beta1.ParentReference{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_ParentReference(ref), + networkingv1beta1.ServiceCIDR{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_ServiceCIDR(ref), + networkingv1beta1.ServiceCIDRList{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_ServiceCIDRList(ref), + networkingv1beta1.ServiceCIDRSpec{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_ServiceCIDRSpec(ref), + networkingv1beta1.ServiceCIDRStatus{}.OpenAPIModelName(): schema_k8sio_api_networking_v1beta1_ServiceCIDRStatus(ref), + nodev1.Overhead{}.OpenAPIModelName(): schema_k8sio_api_node_v1_Overhead(ref), + nodev1.RuntimeClass{}.OpenAPIModelName(): schema_k8sio_api_node_v1_RuntimeClass(ref), + nodev1.RuntimeClassList{}.OpenAPIModelName(): schema_k8sio_api_node_v1_RuntimeClassList(ref), + nodev1.Scheduling{}.OpenAPIModelName(): schema_k8sio_api_node_v1_Scheduling(ref), + nodev1alpha1.Overhead{}.OpenAPIModelName(): schema_k8sio_api_node_v1alpha1_Overhead(ref), + nodev1alpha1.RuntimeClass{}.OpenAPIModelName(): schema_k8sio_api_node_v1alpha1_RuntimeClass(ref), + nodev1alpha1.RuntimeClassList{}.OpenAPIModelName(): schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref), + nodev1alpha1.RuntimeClassSpec{}.OpenAPIModelName(): schema_k8sio_api_node_v1alpha1_RuntimeClassSpec(ref), + nodev1alpha1.Scheduling{}.OpenAPIModelName(): schema_k8sio_api_node_v1alpha1_Scheduling(ref), + nodev1beta1.Overhead{}.OpenAPIModelName(): schema_k8sio_api_node_v1beta1_Overhead(ref), + nodev1beta1.RuntimeClass{}.OpenAPIModelName(): schema_k8sio_api_node_v1beta1_RuntimeClass(ref), + nodev1beta1.RuntimeClassList{}.OpenAPIModelName(): schema_k8sio_api_node_v1beta1_RuntimeClassList(ref), + nodev1beta1.Scheduling{}.OpenAPIModelName(): schema_k8sio_api_node_v1beta1_Scheduling(ref), + policyv1.Eviction{}.OpenAPIModelName(): schema_k8sio_api_policy_v1_Eviction(ref), + policyv1.PodDisruptionBudget{}.OpenAPIModelName(): schema_k8sio_api_policy_v1_PodDisruptionBudget(ref), + policyv1.PodDisruptionBudgetList{}.OpenAPIModelName(): schema_k8sio_api_policy_v1_PodDisruptionBudgetList(ref), + policyv1.PodDisruptionBudgetSpec{}.OpenAPIModelName(): schema_k8sio_api_policy_v1_PodDisruptionBudgetSpec(ref), + policyv1.PodDisruptionBudgetStatus{}.OpenAPIModelName(): schema_k8sio_api_policy_v1_PodDisruptionBudgetStatus(ref), + policyv1beta1.Eviction{}.OpenAPIModelName(): schema_k8sio_api_policy_v1beta1_Eviction(ref), + policyv1beta1.PodDisruptionBudget{}.OpenAPIModelName(): schema_k8sio_api_policy_v1beta1_PodDisruptionBudget(ref), + policyv1beta1.PodDisruptionBudgetList{}.OpenAPIModelName(): schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref), + policyv1beta1.PodDisruptionBudgetSpec{}.OpenAPIModelName(): schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetSpec(ref), + policyv1beta1.PodDisruptionBudgetStatus{}.OpenAPIModelName(): schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetStatus(ref), + rbacv1.AggregationRule{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1_AggregationRule(ref), + rbacv1.ClusterRole{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1_ClusterRole(ref), + rbacv1.ClusterRoleBinding{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref), + rbacv1.ClusterRoleBindingList{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref), + rbacv1.ClusterRoleList{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1_ClusterRoleList(ref), + rbacv1.PolicyRule{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1_PolicyRule(ref), + rbacv1.Role{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1_Role(ref), + rbacv1.RoleBinding{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1_RoleBinding(ref), + rbacv1.RoleBindingList{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1_RoleBindingList(ref), + rbacv1.RoleList{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1_RoleList(ref), + rbacv1.RoleRef{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1_RoleRef(ref), + rbacv1.Subject{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1_Subject(ref), + rbacv1alpha1.AggregationRule{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1alpha1_AggregationRule(ref), + rbacv1alpha1.ClusterRole{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref), + rbacv1alpha1.ClusterRoleBinding{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref), + rbacv1alpha1.ClusterRoleBindingList{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref), + rbacv1alpha1.ClusterRoleList{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref), + rbacv1alpha1.PolicyRule{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref), + rbacv1alpha1.Role{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1alpha1_Role(ref), + rbacv1alpha1.RoleBinding{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref), + rbacv1alpha1.RoleBindingList{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref), + rbacv1alpha1.RoleList{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1alpha1_RoleList(ref), + rbacv1alpha1.RoleRef{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1alpha1_RoleRef(ref), + rbacv1alpha1.Subject{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1alpha1_Subject(ref), + rbacv1beta1.AggregationRule{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1beta1_AggregationRule(ref), + rbacv1beta1.ClusterRole{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1beta1_ClusterRole(ref), + rbacv1beta1.ClusterRoleBinding{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref), + rbacv1beta1.ClusterRoleBindingList{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref), + rbacv1beta1.ClusterRoleList{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref), + rbacv1beta1.PolicyRule{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1beta1_PolicyRule(ref), + rbacv1beta1.Role{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1beta1_Role(ref), + rbacv1beta1.RoleBinding{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1beta1_RoleBinding(ref), + rbacv1beta1.RoleBindingList{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref), + rbacv1beta1.RoleList{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1beta1_RoleList(ref), + rbacv1beta1.RoleRef{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1beta1_RoleRef(ref), + rbacv1beta1.Subject{}.OpenAPIModelName(): schema_k8sio_api_rbac_v1beta1_Subject(ref), + resourcev1.AllocatedDeviceStatus{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_AllocatedDeviceStatus(ref), + resourcev1.AllocationResult{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_AllocationResult(ref), + resourcev1.CELDeviceSelector{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_CELDeviceSelector(ref), + resourcev1.CapacityRequestPolicy{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_CapacityRequestPolicy(ref), + resourcev1.CapacityRequestPolicyRange{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_CapacityRequestPolicyRange(ref), + resourcev1.CapacityRequirements{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_CapacityRequirements(ref), + resourcev1.Counter{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_Counter(ref), + resourcev1.CounterSet{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_CounterSet(ref), + resourcev1.Device{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_Device(ref), + resourcev1.DeviceAllocationConfiguration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceAllocationConfiguration(ref), + resourcev1.DeviceAllocationResult{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceAllocationResult(ref), + resourcev1.DeviceAttribute{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceAttribute(ref), + resourcev1.DeviceCapacity{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceCapacity(ref), + resourcev1.DeviceClaim{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceClaim(ref), + resourcev1.DeviceClaimConfiguration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceClaimConfiguration(ref), + resourcev1.DeviceClass{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceClass(ref), + resourcev1.DeviceClassConfiguration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceClassConfiguration(ref), + resourcev1.DeviceClassList{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceClassList(ref), + resourcev1.DeviceClassSpec{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceClassSpec(ref), + resourcev1.DeviceConfiguration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceConfiguration(ref), + resourcev1.DeviceConstraint{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceConstraint(ref), + resourcev1.DeviceCounterConsumption{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceCounterConsumption(ref), + resourcev1.DeviceRequest{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceRequest(ref), + resourcev1.DeviceRequestAllocationResult{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceRequestAllocationResult(ref), + resourcev1.DeviceSelector{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceSelector(ref), + resourcev1.DeviceSubRequest{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceSubRequest(ref), + resourcev1.DeviceTaint{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceTaint(ref), + resourcev1.DeviceToleration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_DeviceToleration(ref), + resourcev1.ExactDeviceRequest{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_ExactDeviceRequest(ref), + resourcev1.NetworkDeviceData{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_NetworkDeviceData(ref), + resourcev1.OpaqueDeviceConfiguration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_OpaqueDeviceConfiguration(ref), + resourcev1.ResourceClaim{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_ResourceClaim(ref), + resourcev1.ResourceClaimConsumerReference{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_ResourceClaimConsumerReference(ref), + resourcev1.ResourceClaimList{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_ResourceClaimList(ref), + resourcev1.ResourceClaimSpec{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_ResourceClaimSpec(ref), + resourcev1.ResourceClaimStatus{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_ResourceClaimStatus(ref), + resourcev1.ResourceClaimTemplate{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_ResourceClaimTemplate(ref), + resourcev1.ResourceClaimTemplateList{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_ResourceClaimTemplateList(ref), + resourcev1.ResourceClaimTemplateSpec{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_ResourceClaimTemplateSpec(ref), + resourcev1.ResourcePool{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_ResourcePool(ref), + resourcev1.ResourceSlice{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_ResourceSlice(ref), + resourcev1.ResourceSliceList{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_ResourceSliceList(ref), + resourcev1.ResourceSliceSpec{}.OpenAPIModelName(): schema_k8sio_api_resource_v1_ResourceSliceSpec(ref), + v1alpha3.CELDeviceSelector{}.OpenAPIModelName(): schema_k8sio_api_resource_v1alpha3_CELDeviceSelector(ref), + v1alpha3.DeviceSelector{}.OpenAPIModelName(): schema_k8sio_api_resource_v1alpha3_DeviceSelector(ref), + v1alpha3.DeviceTaint{}.OpenAPIModelName(): schema_k8sio_api_resource_v1alpha3_DeviceTaint(ref), + v1alpha3.DeviceTaintRule{}.OpenAPIModelName(): schema_k8sio_api_resource_v1alpha3_DeviceTaintRule(ref), + v1alpha3.DeviceTaintRuleList{}.OpenAPIModelName(): schema_k8sio_api_resource_v1alpha3_DeviceTaintRuleList(ref), + v1alpha3.DeviceTaintRuleSpec{}.OpenAPIModelName(): schema_k8sio_api_resource_v1alpha3_DeviceTaintRuleSpec(ref), + v1alpha3.DeviceTaintSelector{}.OpenAPIModelName(): schema_k8sio_api_resource_v1alpha3_DeviceTaintSelector(ref), + resourcev1beta1.AllocatedDeviceStatus{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_AllocatedDeviceStatus(ref), + resourcev1beta1.AllocationResult{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_AllocationResult(ref), + resourcev1beta1.BasicDevice{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_BasicDevice(ref), + resourcev1beta1.CELDeviceSelector{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_CELDeviceSelector(ref), + resourcev1beta1.CapacityRequestPolicy{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_CapacityRequestPolicy(ref), + resourcev1beta1.CapacityRequestPolicyRange{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_CapacityRequestPolicyRange(ref), + resourcev1beta1.CapacityRequirements{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_CapacityRequirements(ref), + resourcev1beta1.Counter{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_Counter(ref), + resourcev1beta1.CounterSet{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_CounterSet(ref), + resourcev1beta1.Device{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_Device(ref), + resourcev1beta1.DeviceAllocationConfiguration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceAllocationConfiguration(ref), + resourcev1beta1.DeviceAllocationResult{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceAllocationResult(ref), + resourcev1beta1.DeviceAttribute{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceAttribute(ref), + resourcev1beta1.DeviceCapacity{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceCapacity(ref), + resourcev1beta1.DeviceClaim{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceClaim(ref), + resourcev1beta1.DeviceClaimConfiguration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceClaimConfiguration(ref), + resourcev1beta1.DeviceClass{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceClass(ref), + resourcev1beta1.DeviceClassConfiguration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceClassConfiguration(ref), + resourcev1beta1.DeviceClassList{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceClassList(ref), + resourcev1beta1.DeviceClassSpec{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceClassSpec(ref), + resourcev1beta1.DeviceConfiguration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceConfiguration(ref), + resourcev1beta1.DeviceConstraint{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceConstraint(ref), + resourcev1beta1.DeviceCounterConsumption{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceCounterConsumption(ref), + resourcev1beta1.DeviceRequest{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceRequest(ref), + resourcev1beta1.DeviceRequestAllocationResult{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceRequestAllocationResult(ref), + resourcev1beta1.DeviceSelector{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceSelector(ref), + resourcev1beta1.DeviceSubRequest{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceSubRequest(ref), + resourcev1beta1.DeviceTaint{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceTaint(ref), + resourcev1beta1.DeviceToleration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_DeviceToleration(ref), + resourcev1beta1.NetworkDeviceData{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_NetworkDeviceData(ref), + resourcev1beta1.OpaqueDeviceConfiguration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_OpaqueDeviceConfiguration(ref), + resourcev1beta1.ResourceClaim{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_ResourceClaim(ref), + resourcev1beta1.ResourceClaimConsumerReference{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_ResourceClaimConsumerReference(ref), + resourcev1beta1.ResourceClaimList{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_ResourceClaimList(ref), + resourcev1beta1.ResourceClaimSpec{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_ResourceClaimSpec(ref), + resourcev1beta1.ResourceClaimStatus{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_ResourceClaimStatus(ref), + resourcev1beta1.ResourceClaimTemplate{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_ResourceClaimTemplate(ref), + resourcev1beta1.ResourceClaimTemplateList{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_ResourceClaimTemplateList(ref), + resourcev1beta1.ResourceClaimTemplateSpec{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_ResourceClaimTemplateSpec(ref), + resourcev1beta1.ResourcePool{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_ResourcePool(ref), + resourcev1beta1.ResourceSlice{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_ResourceSlice(ref), + resourcev1beta1.ResourceSliceList{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_ResourceSliceList(ref), + resourcev1beta1.ResourceSliceSpec{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta1_ResourceSliceSpec(ref), + resourcev1beta2.AllocatedDeviceStatus{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_AllocatedDeviceStatus(ref), + resourcev1beta2.AllocationResult{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_AllocationResult(ref), + resourcev1beta2.CELDeviceSelector{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_CELDeviceSelector(ref), + resourcev1beta2.CapacityRequestPolicy{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_CapacityRequestPolicy(ref), + resourcev1beta2.CapacityRequestPolicyRange{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_CapacityRequestPolicyRange(ref), + resourcev1beta2.CapacityRequirements{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_CapacityRequirements(ref), + resourcev1beta2.Counter{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_Counter(ref), + resourcev1beta2.CounterSet{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_CounterSet(ref), + resourcev1beta2.Device{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_Device(ref), + resourcev1beta2.DeviceAllocationConfiguration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceAllocationConfiguration(ref), + resourcev1beta2.DeviceAllocationResult{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceAllocationResult(ref), + resourcev1beta2.DeviceAttribute{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceAttribute(ref), + resourcev1beta2.DeviceCapacity{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceCapacity(ref), + resourcev1beta2.DeviceClaim{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceClaim(ref), + resourcev1beta2.DeviceClaimConfiguration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceClaimConfiguration(ref), + resourcev1beta2.DeviceClass{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceClass(ref), + resourcev1beta2.DeviceClassConfiguration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceClassConfiguration(ref), + resourcev1beta2.DeviceClassList{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceClassList(ref), + resourcev1beta2.DeviceClassSpec{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceClassSpec(ref), + resourcev1beta2.DeviceConfiguration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceConfiguration(ref), + resourcev1beta2.DeviceConstraint{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceConstraint(ref), + resourcev1beta2.DeviceCounterConsumption{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceCounterConsumption(ref), + resourcev1beta2.DeviceRequest{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceRequest(ref), + resourcev1beta2.DeviceRequestAllocationResult{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceRequestAllocationResult(ref), + resourcev1beta2.DeviceSelector{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceSelector(ref), + resourcev1beta2.DeviceSubRequest{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceSubRequest(ref), + resourcev1beta2.DeviceTaint{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceTaint(ref), + resourcev1beta2.DeviceToleration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_DeviceToleration(ref), + resourcev1beta2.ExactDeviceRequest{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_ExactDeviceRequest(ref), + resourcev1beta2.NetworkDeviceData{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_NetworkDeviceData(ref), + resourcev1beta2.OpaqueDeviceConfiguration{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_OpaqueDeviceConfiguration(ref), + resourcev1beta2.ResourceClaim{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_ResourceClaim(ref), + resourcev1beta2.ResourceClaimConsumerReference{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_ResourceClaimConsumerReference(ref), + resourcev1beta2.ResourceClaimList{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_ResourceClaimList(ref), + resourcev1beta2.ResourceClaimSpec{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_ResourceClaimSpec(ref), + resourcev1beta2.ResourceClaimStatus{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_ResourceClaimStatus(ref), + resourcev1beta2.ResourceClaimTemplate{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_ResourceClaimTemplate(ref), + resourcev1beta2.ResourceClaimTemplateList{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_ResourceClaimTemplateList(ref), + resourcev1beta2.ResourceClaimTemplateSpec{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_ResourceClaimTemplateSpec(ref), + resourcev1beta2.ResourcePool{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_ResourcePool(ref), + resourcev1beta2.ResourceSlice{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_ResourceSlice(ref), + resourcev1beta2.ResourceSliceList{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_ResourceSliceList(ref), + resourcev1beta2.ResourceSliceSpec{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_ResourceSliceSpec(ref), + schedulingv1.PriorityClass{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1_PriorityClass(ref), + schedulingv1.PriorityClassList{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1_PriorityClassList(ref), + schedulingv1alpha1.PriorityClass{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref), + schedulingv1alpha1.PriorityClassList{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref), + schedulingv1beta1.PriorityClass{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref), + schedulingv1beta1.PriorityClassList{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref), + storagev1.CSIDriver{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_CSIDriver(ref), + storagev1.CSIDriverList{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_CSIDriverList(ref), + storagev1.CSIDriverSpec{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_CSIDriverSpec(ref), + storagev1.CSINode{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_CSINode(ref), + storagev1.CSINodeDriver{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_CSINodeDriver(ref), + storagev1.CSINodeList{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_CSINodeList(ref), + storagev1.CSINodeSpec{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_CSINodeSpec(ref), + storagev1.CSIStorageCapacity{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_CSIStorageCapacity(ref), + storagev1.CSIStorageCapacityList{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_CSIStorageCapacityList(ref), + storagev1.StorageClass{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_StorageClass(ref), + storagev1.StorageClassList{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_StorageClassList(ref), + storagev1.TokenRequest{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_TokenRequest(ref), + storagev1.VolumeAttachment{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_VolumeAttachment(ref), + storagev1.VolumeAttachmentList{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_VolumeAttachmentList(ref), + storagev1.VolumeAttachmentSource{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_VolumeAttachmentSource(ref), + storagev1.VolumeAttachmentSpec{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_VolumeAttachmentSpec(ref), + storagev1.VolumeAttachmentStatus{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_VolumeAttachmentStatus(ref), + storagev1.VolumeAttributesClass{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_VolumeAttributesClass(ref), + storagev1.VolumeAttributesClassList{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_VolumeAttributesClassList(ref), + storagev1.VolumeError{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_VolumeError(ref), + storagev1.VolumeNodeResources{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_VolumeNodeResources(ref), + storagev1alpha1.CSIStorageCapacity{}.OpenAPIModelName(): schema_k8sio_api_storage_v1alpha1_CSIStorageCapacity(ref), + storagev1alpha1.CSIStorageCapacityList{}.OpenAPIModelName(): schema_k8sio_api_storage_v1alpha1_CSIStorageCapacityList(ref), + storagev1alpha1.VolumeAttachment{}.OpenAPIModelName(): schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref), + storagev1alpha1.VolumeAttachmentList{}.OpenAPIModelName(): schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref), + storagev1alpha1.VolumeAttachmentSource{}.OpenAPIModelName(): schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSource(ref), + storagev1alpha1.VolumeAttachmentSpec{}.OpenAPIModelName(): schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSpec(ref), + storagev1alpha1.VolumeAttachmentStatus{}.OpenAPIModelName(): schema_k8sio_api_storage_v1alpha1_VolumeAttachmentStatus(ref), + storagev1alpha1.VolumeAttributesClass{}.OpenAPIModelName(): schema_k8sio_api_storage_v1alpha1_VolumeAttributesClass(ref), + storagev1alpha1.VolumeAttributesClassList{}.OpenAPIModelName(): schema_k8sio_api_storage_v1alpha1_VolumeAttributesClassList(ref), + storagev1alpha1.VolumeError{}.OpenAPIModelName(): schema_k8sio_api_storage_v1alpha1_VolumeError(ref), + storagev1beta1.CSIDriver{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_CSIDriver(ref), + storagev1beta1.CSIDriverList{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_CSIDriverList(ref), + storagev1beta1.CSIDriverSpec{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref), + storagev1beta1.CSINode{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_CSINode(ref), + storagev1beta1.CSINodeDriver{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref), + storagev1beta1.CSINodeList{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_CSINodeList(ref), + storagev1beta1.CSINodeSpec{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref), + storagev1beta1.CSIStorageCapacity{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_CSIStorageCapacity(ref), + storagev1beta1.CSIStorageCapacityList{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_CSIStorageCapacityList(ref), + storagev1beta1.StorageClass{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_StorageClass(ref), + storagev1beta1.StorageClassList{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_StorageClassList(ref), + storagev1beta1.TokenRequest{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_TokenRequest(ref), + storagev1beta1.VolumeAttachment{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref), + storagev1beta1.VolumeAttachmentList{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref), + storagev1beta1.VolumeAttachmentSource{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_VolumeAttachmentSource(ref), + storagev1beta1.VolumeAttachmentSpec{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref), + storagev1beta1.VolumeAttachmentStatus{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref), + storagev1beta1.VolumeAttributesClass{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_VolumeAttributesClass(ref), + storagev1beta1.VolumeAttributesClassList{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_VolumeAttributesClassList(ref), + storagev1beta1.VolumeError{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_VolumeError(ref), + storagev1beta1.VolumeNodeResources{}.OpenAPIModelName(): schema_k8sio_api_storage_v1beta1_VolumeNodeResources(ref), + storagemigrationv1alpha1.GroupVersionResource{}.OpenAPIModelName(): schema_k8sio_api_storagemigration_v1alpha1_GroupVersionResource(ref), + storagemigrationv1alpha1.MigrationCondition{}.OpenAPIModelName(): schema_k8sio_api_storagemigration_v1alpha1_MigrationCondition(ref), + storagemigrationv1alpha1.StorageVersionMigration{}.OpenAPIModelName(): schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigration(ref), + storagemigrationv1alpha1.StorageVersionMigrationList{}.OpenAPIModelName(): schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigrationList(ref), + storagemigrationv1alpha1.StorageVersionMigrationSpec{}.OpenAPIModelName(): schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigrationSpec(ref), + storagemigrationv1alpha1.StorageVersionMigrationStatus{}.OpenAPIModelName(): schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigrationStatus(ref), + apiextensionsv1.ConversionRequest{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_ConversionRequest(ref), + apiextensionsv1.ConversionResponse{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_ConversionResponse(ref), + apiextensionsv1.ConversionReview{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_ConversionReview(ref), + apiextensionsv1.CustomResourceColumnDefinition{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceColumnDefinition(ref), + apiextensionsv1.CustomResourceConversion{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref), + apiextensionsv1.CustomResourceDefinition{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref), + apiextensionsv1.CustomResourceDefinitionCondition{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref), + apiextensionsv1.CustomResourceDefinitionList{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref), + apiextensionsv1.CustomResourceDefinitionNames{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionNames(ref), + apiextensionsv1.CustomResourceDefinitionSpec{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref), + apiextensionsv1.CustomResourceDefinitionStatus{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref), + apiextensionsv1.CustomResourceDefinitionVersion{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref), + apiextensionsv1.CustomResourceSubresourceScale{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceScale(ref), + apiextensionsv1.CustomResourceSubresourceStatus{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceStatus(ref), + apiextensionsv1.CustomResourceSubresources{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref), + apiextensionsv1.CustomResourceValidation{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref), + apiextensionsv1.ExternalDocumentation{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_ExternalDocumentation(ref), + apiextensionsv1.JSON{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_JSON(ref), + apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref), + apiextensionsv1.JSONSchemaPropsOrArray{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrArray(ref), + apiextensionsv1.JSONSchemaPropsOrBool{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref), + apiextensionsv1.JSONSchemaPropsOrStringArray{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref), + apiextensionsv1.SelectableField{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_SelectableField(ref), + apiextensionsv1.ServiceReference{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_ServiceReference(ref), + apiextensionsv1.ValidationRule{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_ValidationRule(ref), + apiextensionsv1.WebhookClientConfig{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref), + apiextensionsv1.WebhookConversion{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_WebhookConversion(ref), + apiextensionsv1beta1.ConversionRequest{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref), + apiextensionsv1beta1.ConversionResponse{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref), + apiextensionsv1beta1.ConversionReview{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref), + apiextensionsv1beta1.CustomResourceColumnDefinition{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceColumnDefinition(ref), + apiextensionsv1beta1.CustomResourceConversion{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref), + apiextensionsv1beta1.CustomResourceDefinition{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref), + apiextensionsv1beta1.CustomResourceDefinitionCondition{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref), + apiextensionsv1beta1.CustomResourceDefinitionList{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref), + apiextensionsv1beta1.CustomResourceDefinitionNames{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionNames(ref), + apiextensionsv1beta1.CustomResourceDefinitionSpec{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref), + apiextensionsv1beta1.CustomResourceDefinitionStatus{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref), + apiextensionsv1beta1.CustomResourceDefinitionVersion{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref), + apiextensionsv1beta1.CustomResourceSubresourceScale{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceScale(ref), + apiextensionsv1beta1.CustomResourceSubresourceStatus{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceStatus(ref), + apiextensionsv1beta1.CustomResourceSubresources{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref), + apiextensionsv1beta1.CustomResourceValidation{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref), + apiextensionsv1beta1.ExternalDocumentation{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_ExternalDocumentation(ref), + apiextensionsv1beta1.JSON{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_JSON(ref), + apiextensionsv1beta1.JSONSchemaProps{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref), + apiextensionsv1beta1.JSONSchemaPropsOrArray{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrArray(ref), + apiextensionsv1beta1.JSONSchemaPropsOrBool{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref), + apiextensionsv1beta1.JSONSchemaPropsOrStringArray{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref), + apiextensionsv1beta1.SelectableField{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_SelectableField(ref), + apiextensionsv1beta1.ServiceReference{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_ServiceReference(ref), + apiextensionsv1beta1.ValidationRule{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_ValidationRule(ref), + apiextensionsv1beta1.WebhookClientConfig{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref), + resource.Quantity{}.OpenAPIModelName(): schema_apimachinery_pkg_api_resource_Quantity(ref), + metav1.APIGroup{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIGroup(ref), + metav1.APIGroupList{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIGroupList(ref), + metav1.APIResource{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIResource(ref), + metav1.APIResourceList{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIResourceList(ref), + metav1.APIVersions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIVersions(ref), + metav1.ApplyOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ApplyOptions(ref), + metav1.Condition{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Condition(ref), + metav1.CreateOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_CreateOptions(ref), + metav1.DeleteOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_DeleteOptions(ref), + metav1.Duration{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Duration(ref), + metav1.FieldSelectorRequirement{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_FieldSelectorRequirement(ref), + metav1.FieldsV1{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_FieldsV1(ref), + metav1.GetOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GetOptions(ref), + metav1.GroupKind{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupKind(ref), + metav1.GroupResource{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupResource(ref), + metav1.GroupVersion{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersion(ref), + metav1.GroupVersionForDiscovery{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), + metav1.GroupVersionKind{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersionKind(ref), + metav1.GroupVersionResource{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersionResource(ref), + metav1.InternalEvent{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_InternalEvent(ref), + metav1.LabelSelector{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_LabelSelector(ref), + metav1.LabelSelectorRequirement{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), + metav1.List{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_List(ref), + metav1.ListMeta{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ListMeta(ref), + metav1.ListOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ListOptions(ref), + metav1.ManagedFieldsEntry{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), + metav1.MicroTime{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_MicroTime(ref), + metav1.ObjectMeta{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ObjectMeta(ref), + metav1.OwnerReference{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_OwnerReference(ref), + metav1.PartialObjectMetadata{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), + metav1.PartialObjectMetadataList{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), + metav1.Patch{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Patch(ref), + metav1.PatchOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_PatchOptions(ref), + metav1.Preconditions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Preconditions(ref), + metav1.RootPaths{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_RootPaths(ref), + metav1.ServerAddressByClientCIDR{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), + metav1.Status{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Status(ref), + metav1.StatusCause{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_StatusCause(ref), + metav1.StatusDetails{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_StatusDetails(ref), + metav1.Table{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Table(ref), + metav1.TableColumnDefinition{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableColumnDefinition(ref), + metav1.TableOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableOptions(ref), + metav1.TableRow{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableRow(ref), + metav1.TableRowCondition{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableRowCondition(ref), + metav1.Time{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Time(ref), + metav1.Timestamp{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Timestamp(ref), + metav1.TypeMeta{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TypeMeta(ref), + metav1.UpdateOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_UpdateOptions(ref), + metav1.WatchEvent{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_WatchEvent(ref), + metav1beta1.PartialObjectMetadataList{}.OpenAPIModelName(): schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref), + testapigroupv1.Carp{}.OpenAPIModelName(): schema_pkg_apis_testapigroup_v1_Carp(ref), + testapigroupv1.CarpCondition{}.OpenAPIModelName(): schema_pkg_apis_testapigroup_v1_CarpCondition(ref), + testapigroupv1.CarpInfo{}.OpenAPIModelName(): schema_pkg_apis_testapigroup_v1_CarpInfo(ref), + testapigroupv1.CarpList{}.OpenAPIModelName(): schema_pkg_apis_testapigroup_v1_CarpList(ref), + testapigroupv1.CarpSpec{}.OpenAPIModelName(): schema_pkg_apis_testapigroup_v1_CarpSpec(ref), + testapigroupv1.CarpStatus{}.OpenAPIModelName(): schema_pkg_apis_testapigroup_v1_CarpStatus(ref), + runtime.RawExtension{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), + runtime.TypeMeta{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), + runtime.Unknown{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), + intstr.IntOrString{}.OpenAPIModelName(): schema_apimachinery_pkg_util_intstr_IntOrString(ref), + version.Info{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_version_Info(ref), + auditv1.Event{}.OpenAPIModelName(): schema_pkg_apis_audit_v1_Event(ref), + auditv1.EventList{}.OpenAPIModelName(): schema_pkg_apis_audit_v1_EventList(ref), + auditv1.GroupResources{}.OpenAPIModelName(): schema_pkg_apis_audit_v1_GroupResources(ref), + auditv1.ObjectReference{}.OpenAPIModelName(): schema_pkg_apis_audit_v1_ObjectReference(ref), + auditv1.Policy{}.OpenAPIModelName(): schema_pkg_apis_audit_v1_Policy(ref), + auditv1.PolicyList{}.OpenAPIModelName(): schema_pkg_apis_audit_v1_PolicyList(ref), + auditv1.PolicyRule{}.OpenAPIModelName(): schema_pkg_apis_audit_v1_PolicyRule(ref), + clientauthenticationv1.Cluster{}.OpenAPIModelName(): schema_pkg_apis_clientauthentication_v1_Cluster(ref), + clientauthenticationv1.ExecCredential{}.OpenAPIModelName(): schema_pkg_apis_clientauthentication_v1_ExecCredential(ref), + clientauthenticationv1.ExecCredentialSpec{}.OpenAPIModelName(): schema_pkg_apis_clientauthentication_v1_ExecCredentialSpec(ref), + clientauthenticationv1.ExecCredentialStatus{}.OpenAPIModelName(): schema_pkg_apis_clientauthentication_v1_ExecCredentialStatus(ref), + clientauthenticationv1beta1.Cluster{}.OpenAPIModelName(): schema_pkg_apis_clientauthentication_v1beta1_Cluster(ref), + clientauthenticationv1beta1.ExecCredential{}.OpenAPIModelName(): schema_pkg_apis_clientauthentication_v1beta1_ExecCredential(ref), + clientauthenticationv1beta1.ExecCredentialSpec{}.OpenAPIModelName(): schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialSpec(ref), + clientauthenticationv1beta1.ExecCredentialStatus{}.OpenAPIModelName(): schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialStatus(ref), + configv1alpha1.CloudControllerManagerConfiguration{}.OpenAPIModelName(): schema_k8sio_cloud_provider_config_v1alpha1_CloudControllerManagerConfiguration(ref), + configv1alpha1.CloudProviderConfiguration{}.OpenAPIModelName(): schema_k8sio_cloud_provider_config_v1alpha1_CloudProviderConfiguration(ref), + configv1alpha1.KubeCloudSharedConfiguration{}.OpenAPIModelName(): schema_k8sio_cloud_provider_config_v1alpha1_KubeCloudSharedConfiguration(ref), + configv1alpha1.WebhookConfiguration{}.OpenAPIModelName(): schema_k8sio_cloud_provider_config_v1alpha1_WebhookConfiguration(ref), + nodeconfigv1alpha1.NodeControllerConfiguration{}.OpenAPIModelName(): schema_controllers_node_config_v1alpha1_NodeControllerConfiguration(ref), + serviceconfigv1alpha1.ServiceControllerConfiguration{}.OpenAPIModelName(): schema_controllers_service_config_v1alpha1_ServiceControllerConfiguration(ref), + componentbaseconfigv1alpha1.ClientConnectionConfiguration{}.OpenAPIModelName(): schema_k8sio_component_base_config_v1alpha1_ClientConnectionConfiguration(ref), + componentbaseconfigv1alpha1.DebuggingConfiguration{}.OpenAPIModelName(): schema_k8sio_component_base_config_v1alpha1_DebuggingConfiguration(ref), + componentbaseconfigv1alpha1.LeaderElectionConfiguration{}.OpenAPIModelName(): schema_k8sio_component_base_config_v1alpha1_LeaderElectionConfiguration(ref), + apiv1.TracingConfiguration{}.OpenAPIModelName(): schema_component_base_tracing_api_v1_TracingConfiguration(ref), + controllermanagerconfigv1alpha1.ControllerLeaderConfiguration{}.OpenAPIModelName(): schema_k8sio_controller_manager_config_v1alpha1_ControllerLeaderConfiguration(ref), + controllermanagerconfigv1alpha1.GenericControllerManagerConfiguration{}.OpenAPIModelName(): schema_k8sio_controller_manager_config_v1alpha1_GenericControllerManagerConfiguration(ref), + controllermanagerconfigv1alpha1.LeaderMigrationConfiguration{}.OpenAPIModelName(): schema_k8sio_controller_manager_config_v1alpha1_LeaderMigrationConfiguration(ref), + configv1beta1.ControllerLeaderConfiguration{}.OpenAPIModelName(): schema_k8sio_controller_manager_config_v1beta1_ControllerLeaderConfiguration(ref), + configv1beta1.LeaderMigrationConfiguration{}.OpenAPIModelName(): schema_k8sio_controller_manager_config_v1beta1_LeaderMigrationConfiguration(ref), + apiregistrationv1.APIService{}.OpenAPIModelName(): schema_pkg_apis_apiregistration_v1_APIService(ref), + apiregistrationv1.APIServiceCondition{}.OpenAPIModelName(): schema_pkg_apis_apiregistration_v1_APIServiceCondition(ref), + apiregistrationv1.APIServiceList{}.OpenAPIModelName(): schema_pkg_apis_apiregistration_v1_APIServiceList(ref), + apiregistrationv1.APIServiceSpec{}.OpenAPIModelName(): schema_pkg_apis_apiregistration_v1_APIServiceSpec(ref), + apiregistrationv1.APIServiceStatus{}.OpenAPIModelName(): schema_pkg_apis_apiregistration_v1_APIServiceStatus(ref), + apiregistrationv1.ServiceReference{}.OpenAPIModelName(): schema_pkg_apis_apiregistration_v1_ServiceReference(ref), + apiregistrationv1beta1.APIService{}.OpenAPIModelName(): schema_pkg_apis_apiregistration_v1beta1_APIService(ref), + apiregistrationv1beta1.APIServiceCondition{}.OpenAPIModelName(): schema_pkg_apis_apiregistration_v1beta1_APIServiceCondition(ref), + apiregistrationv1beta1.APIServiceList{}.OpenAPIModelName(): schema_pkg_apis_apiregistration_v1beta1_APIServiceList(ref), + apiregistrationv1beta1.APIServiceSpec{}.OpenAPIModelName(): schema_pkg_apis_apiregistration_v1beta1_APIServiceSpec(ref), + apiregistrationv1beta1.APIServiceStatus{}.OpenAPIModelName(): schema_pkg_apis_apiregistration_v1beta1_APIServiceStatus(ref), + apiregistrationv1beta1.ServiceReference{}.OpenAPIModelName(): schema_pkg_apis_apiregistration_v1beta1_ServiceReference(ref), + kubecontrollermanagerconfigv1alpha1.AttachDetachControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_AttachDetachControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.CSRSigningConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.CSRSigningControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.CronJobControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_CronJobControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.DaemonSetControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_DaemonSetControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.DeploymentControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_DeploymentControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.DeprecatedControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_DeprecatedControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.EndpointControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.EndpointSliceControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.EndpointSliceMirroringControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceMirroringControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.EphemeralVolumeControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_EphemeralVolumeControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.GarbageCollectorControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_GarbageCollectorControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.GroupResource{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_GroupResource(ref), + kubecontrollermanagerconfigv1alpha1.HPAControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.JobControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_JobControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.KubeControllerManagerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_KubeControllerManagerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.LegacySATokenCleanerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_LegacySATokenCleanerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.NamespaceControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_NamespaceControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.NodeIPAMControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_NodeIPAMControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.NodeLifecycleControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_NodeLifecycleControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.PersistentVolumeBinderControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeBinderControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.PersistentVolumeRecyclerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeRecyclerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.PodGCControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_PodGCControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.ReplicaSetControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicaSetControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.ReplicationControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicationControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.ResourceQuotaControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_ResourceQuotaControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.SAControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_SAControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.StatefulSetControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_StatefulSetControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.TTLAfterFinishedControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_TTLAfterFinishedControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.ValidatingAdmissionPolicyStatusControllerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_ValidatingAdmissionPolicyStatusControllerConfiguration(ref), + kubecontrollermanagerconfigv1alpha1.VolumeConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_controller_manager_config_v1alpha1_VolumeConfiguration(ref), + kubeproxyconfigv1alpha1.DetectLocalConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_proxy_config_v1alpha1_DetectLocalConfiguration(ref), + kubeproxyconfigv1alpha1.KubeProxyConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref), + kubeproxyconfigv1alpha1.KubeProxyConntrackConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConntrackConfiguration(ref), + kubeproxyconfigv1alpha1.KubeProxyIPTablesConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref), + kubeproxyconfigv1alpha1.KubeProxyIPVSConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref), + kubeproxyconfigv1alpha1.KubeProxyNFTablesConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyNFTablesConfiguration(ref), + kubeproxyconfigv1alpha1.KubeProxyWinkernelConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyWinkernelConfiguration(ref), + configv1.DefaultPreemptionArgs{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_DefaultPreemptionArgs(ref), + configv1.DynamicResourcesArgs{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_DynamicResourcesArgs(ref), + configv1.Extender{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_Extender(ref), + configv1.ExtenderManagedResource{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_ExtenderManagedResource(ref), + configv1.ExtenderTLSConfig{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_ExtenderTLSConfig(ref), + configv1.InterPodAffinityArgs{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_InterPodAffinityArgs(ref), + configv1.KubeSchedulerConfiguration{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_KubeSchedulerConfiguration(ref), + configv1.KubeSchedulerProfile{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_KubeSchedulerProfile(ref), + configv1.NodeAffinityArgs{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_NodeAffinityArgs(ref), + configv1.NodeResourcesBalancedAllocationArgs{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_NodeResourcesBalancedAllocationArgs(ref), + configv1.NodeResourcesFitArgs{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_NodeResourcesFitArgs(ref), + configv1.Plugin{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_Plugin(ref), + configv1.PluginConfig{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_PluginConfig(ref), + configv1.PluginSet{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_PluginSet(ref), + configv1.Plugins{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_Plugins(ref), + configv1.PodTopologySpreadArgs{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_PodTopologySpreadArgs(ref), + configv1.RequestedToCapacityRatioParam{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_RequestedToCapacityRatioParam(ref), + configv1.ResourceSpec{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_ResourceSpec(ref), + configv1.ScoringStrategy{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_ScoringStrategy(ref), + configv1.UtilizationShapePoint{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_UtilizationShapePoint(ref), + configv1.VolumeBindingArgs{}.OpenAPIModelName(): schema_k8sio_kube_scheduler_config_v1_VolumeBindingArgs(ref), + pkgconfigv1alpha1.AliasOverride{}.OpenAPIModelName(): schema_kubectl_pkg_config_v1alpha1_AliasOverride(ref), + pkgconfigv1alpha1.CommandDefaults{}.OpenAPIModelName(): schema_kubectl_pkg_config_v1alpha1_CommandDefaults(ref), + pkgconfigv1alpha1.CommandOptionDefault{}.OpenAPIModelName(): schema_kubectl_pkg_config_v1alpha1_CommandOptionDefault(ref), + pkgconfigv1alpha1.Preference{}.OpenAPIModelName(): schema_kubectl_pkg_config_v1alpha1_Preference(ref), + pkgconfigv1beta1.AliasOverride{}.OpenAPIModelName(): schema_kubectl_pkg_config_v1beta1_AliasOverride(ref), + pkgconfigv1beta1.CommandDefaults{}.OpenAPIModelName(): schema_kubectl_pkg_config_v1beta1_CommandDefaults(ref), + pkgconfigv1beta1.CommandOptionDefault{}.OpenAPIModelName(): schema_kubectl_pkg_config_v1beta1_CommandOptionDefault(ref), + pkgconfigv1beta1.Preference{}.OpenAPIModelName(): schema_kubectl_pkg_config_v1beta1_Preference(ref), + kubeletconfigv1.CredentialProvider{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1_CredentialProvider(ref), + kubeletconfigv1.CredentialProviderConfig{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1_CredentialProviderConfig(ref), + kubeletconfigv1.ExecEnvVar{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1_ExecEnvVar(ref), + kubeletconfigv1.ServiceAccountTokenAttributes{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1_ServiceAccountTokenAttributes(ref), + kubeletconfigv1alpha1.CredentialProvider{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1alpha1_CredentialProvider(ref), + kubeletconfigv1alpha1.CredentialProviderConfig{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1alpha1_CredentialProviderConfig(ref), + kubeletconfigv1alpha1.ExecEnvVar{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1alpha1_ExecEnvVar(ref), + kubeletconfigv1alpha1.ImagePullCredentials{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1alpha1_ImagePullCredentials(ref), + kubeletconfigv1alpha1.ImagePullIntent{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1alpha1_ImagePullIntent(ref), + kubeletconfigv1alpha1.ImagePullSecret{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1alpha1_ImagePullSecret(ref), + kubeletconfigv1alpha1.ImagePullServiceAccount{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1alpha1_ImagePullServiceAccount(ref), + kubeletconfigv1alpha1.ImagePulledRecord{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1alpha1_ImagePulledRecord(ref), + kubeletconfigv1beta1.CrashLoopBackOffConfig{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_CrashLoopBackOffConfig(ref), + kubeletconfigv1beta1.CredentialProvider{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_CredentialProvider(ref), + kubeletconfigv1beta1.CredentialProviderConfig{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_CredentialProviderConfig(ref), + kubeletconfigv1beta1.ExecEnvVar{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_ExecEnvVar(ref), + kubeletconfigv1beta1.KubeletAnonymousAuthentication{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_KubeletAnonymousAuthentication(ref), + kubeletconfigv1beta1.KubeletAuthentication{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_KubeletAuthentication(ref), + kubeletconfigv1beta1.KubeletAuthorization{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_KubeletAuthorization(ref), + kubeletconfigv1beta1.KubeletConfiguration{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref), + kubeletconfigv1beta1.KubeletWebhookAuthentication{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthentication(ref), + kubeletconfigv1beta1.KubeletWebhookAuthorization{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthorization(ref), + kubeletconfigv1beta1.KubeletX509Authentication{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_KubeletX509Authentication(ref), + kubeletconfigv1beta1.MemoryReservation{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_MemoryReservation(ref), + kubeletconfigv1beta1.MemorySwapConfiguration{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_MemorySwapConfiguration(ref), + kubeletconfigv1beta1.SerializedNodeConfigSource{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_SerializedNodeConfigSource(ref), + kubeletconfigv1beta1.ShutdownGracePeriodByPodPriority{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_ShutdownGracePeriodByPodPriority(ref), + kubeletconfigv1beta1.UserNamespaces{}.OpenAPIModelName(): schema_k8sio_kubelet_config_v1beta1_UserNamespaces(ref), + abacv1beta1.Policy{}.OpenAPIModelName(): schema_pkg_apis_abac_v1beta1_Policy(ref), + abacv1beta1.PolicySpec{}.OpenAPIModelName(): schema_pkg_apis_abac_v1beta1_PolicySpec(ref), + custommetricsv1beta1.MetricListOptions{}.OpenAPIModelName(): schema_pkg_apis_custom_metrics_v1beta1_MetricListOptions(ref), + custommetricsv1beta1.MetricValue{}.OpenAPIModelName(): schema_pkg_apis_custom_metrics_v1beta1_MetricValue(ref), + custommetricsv1beta1.MetricValueList{}.OpenAPIModelName(): schema_pkg_apis_custom_metrics_v1beta1_MetricValueList(ref), + custommetricsv1beta2.MetricIdentifier{}.OpenAPIModelName(): schema_pkg_apis_custom_metrics_v1beta2_MetricIdentifier(ref), + custommetricsv1beta2.MetricListOptions{}.OpenAPIModelName(): schema_pkg_apis_custom_metrics_v1beta2_MetricListOptions(ref), + custommetricsv1beta2.MetricValue{}.OpenAPIModelName(): schema_pkg_apis_custom_metrics_v1beta2_MetricValue(ref), + custommetricsv1beta2.MetricValueList{}.OpenAPIModelName(): schema_pkg_apis_custom_metrics_v1beta2_MetricValueList(ref), + externalmetricsv1beta1.ExternalMetricValue{}.OpenAPIModelName(): schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValue(ref), + externalmetricsv1beta1.ExternalMetricValueList{}.OpenAPIModelName(): schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValueList(ref), + metricsv1alpha1.ContainerMetrics{}.OpenAPIModelName(): schema_pkg_apis_metrics_v1alpha1_ContainerMetrics(ref), + metricsv1alpha1.NodeMetrics{}.OpenAPIModelName(): schema_pkg_apis_metrics_v1alpha1_NodeMetrics(ref), + metricsv1alpha1.NodeMetricsList{}.OpenAPIModelName(): schema_pkg_apis_metrics_v1alpha1_NodeMetricsList(ref), + metricsv1alpha1.PodMetrics{}.OpenAPIModelName(): schema_pkg_apis_metrics_v1alpha1_PodMetrics(ref), + metricsv1alpha1.PodMetricsList{}.OpenAPIModelName(): schema_pkg_apis_metrics_v1alpha1_PodMetricsList(ref), + metricsv1beta1.ContainerMetrics{}.OpenAPIModelName(): schema_pkg_apis_metrics_v1beta1_ContainerMetrics(ref), + metricsv1beta1.NodeMetrics{}.OpenAPIModelName(): schema_pkg_apis_metrics_v1beta1_NodeMetrics(ref), + metricsv1beta1.NodeMetricsList{}.OpenAPIModelName(): schema_pkg_apis_metrics_v1beta1_NodeMetricsList(ref), + metricsv1beta1.PodMetrics{}.OpenAPIModelName(): schema_pkg_apis_metrics_v1beta1_PodMetrics(ref), + metricsv1beta1.PodMetricsList{}.OpenAPIModelName(): schema_pkg_apis_metrics_v1beta1_PodMetricsList(ref), } } @@ -1499,13 +1592,13 @@ func schema_k8sio_api_admissionregistration_v1_MatchResources(ref common.Referen "namespaceSelector": { SchemaProps: spec.SchemaProps{ Description: "NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the policy on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "objectSelector": { SchemaProps: spec.SchemaProps{ Description: "ObjectSelector decides whether to run the validation based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "resourceRules": { @@ -1521,7 +1614,7 @@ func schema_k8sio_api_admissionregistration_v1_MatchResources(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.NamedRuleWithOperations"), + Ref: ref(v1.NamedRuleWithOperations{}.OpenAPIModelName()), }, }, }, @@ -1540,7 +1633,7 @@ func schema_k8sio_api_admissionregistration_v1_MatchResources(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.NamedRuleWithOperations"), + Ref: ref(v1.NamedRuleWithOperations{}.OpenAPIModelName()), }, }, }, @@ -1563,7 +1656,7 @@ func schema_k8sio_api_admissionregistration_v1_MatchResources(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.NamedRuleWithOperations", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + v1.NamedRuleWithOperations{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -1586,7 +1679,7 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "ClientConfig defines how to communicate with the hook. Required", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.WebhookClientConfig"), + Ref: ref(v1.WebhookClientConfig{}.OpenAPIModelName()), }, }, "rules": { @@ -1602,7 +1695,7 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.RuleWithOperations"), + Ref: ref(v1.RuleWithOperations{}.OpenAPIModelName()), }, }, }, @@ -1627,13 +1720,13 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref common.Refere "namespaceSelector": { SchemaProps: spec.SchemaProps{ Description: "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "objectSelector": { SchemaProps: spec.SchemaProps{ Description: "ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "sideEffects": { @@ -1673,9 +1766,10 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref common.Refere }, "reinvocationPolicy": { SchemaProps: spec.SchemaProps{ - Description: "reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: the webhook will not be called more than once in a single admission evaluation.\n\nIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.\n\nDefaults to \"Never\".", + Description: "reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: the webhook will not be called more than once in a single admission evaluation.\n\nIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.\n\nDefaults to \"Never\".\n\nPossible enum values:\n - `\"IfNeeded\"` indicates that the mutation may be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial mutation call.\n - `\"Never\"` indicates that the mutation must not be called more than once in a single admission evaluation.", Type: []string{"string"}, Format: "", + Enum: []interface{}{"IfNeeded", "Never"}, }, }, "matchConditions": { @@ -1696,7 +1790,7 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.MatchCondition"), + Ref: ref(v1.MatchCondition{}.OpenAPIModelName()), }, }, }, @@ -1707,7 +1801,7 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.MatchCondition", "k8s.io/api/admissionregistration/v1.RuleWithOperations", "k8s.io/api/admissionregistration/v1.WebhookClientConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + v1.MatchCondition{}.OpenAPIModelName(), v1.RuleWithOperations{}.OpenAPIModelName(), v1.WebhookClientConfig{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -1736,7 +1830,7 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfiguration(ref SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "webhooks": { @@ -1757,7 +1851,7 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfiguration(ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.MutatingWebhook"), + Ref: ref(v1.MutatingWebhook{}.OpenAPIModelName()), }, }, }, @@ -1767,7 +1861,7 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfiguration(ref }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.MutatingWebhook", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.MutatingWebhook{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -1796,7 +1890,7 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfigurationList( SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -1807,7 +1901,7 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfigurationList( Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.MutatingWebhookConfiguration"), + Ref: ref(v1.MutatingWebhookConfiguration{}.OpenAPIModelName()), }, }, }, @@ -1818,7 +1912,7 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfigurationList( }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.MutatingWebhookConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.MutatingWebhookConfiguration{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -1932,9 +2026,10 @@ func schema_k8sio_api_admissionregistration_v1_NamedRuleWithOperations(ref commo }, "scope": { SchemaProps: spec.SchemaProps{ - Description: "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + Description: "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\n\n\nPossible enum values:\n - `\"*\"` means that all scopes are included.\n - `\"Cluster\"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped.\n - `\"Namespaced\"` means that scope is limited to namespaced objects.", Type: []string{"string"}, Format: "", + Enum: []interface{}{"*", "Cluster", "Namespaced"}, }, }, }, @@ -2004,7 +2099,7 @@ func schema_k8sio_api_admissionregistration_v1_ParamRef(ref common.ReferenceCall "selector": { SchemaProps: spec.SchemaProps{ Description: "selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.\n\nIf multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "parameterNotFoundAction": { @@ -2023,7 +2118,7 @@ func schema_k8sio_api_admissionregistration_v1_ParamRef(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -2096,9 +2191,10 @@ func schema_k8sio_api_admissionregistration_v1_Rule(ref common.ReferenceCallback }, "scope": { SchemaProps: spec.SchemaProps{ - Description: "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + Description: "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\n\n\nPossible enum values:\n - `\"*\"` means that all scopes are included.\n - `\"Cluster\"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped.\n - `\"Namespaced\"` means that scope is limited to namespaced objects.", Type: []string{"string"}, Format: "", + Enum: []interface{}{"*", "Cluster", "Namespaced"}, }, }, }, @@ -2197,9 +2293,10 @@ func schema_k8sio_api_admissionregistration_v1_RuleWithOperations(ref common.Ref }, "scope": { SchemaProps: spec.SchemaProps{ - Description: "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + Description: "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\n\n\nPossible enum values:\n - `\"*\"` means that all scopes are included.\n - `\"Cluster\"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped.\n - `\"Namespaced\"` means that scope is limited to namespaced objects.", Type: []string{"string"}, Format: "", + Enum: []interface{}{"*", "Cluster", "Namespaced"}, }, }, }, @@ -2272,7 +2369,7 @@ func schema_k8sio_api_admissionregistration_v1_TypeChecking(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.ExpressionWarning"), + Ref: ref(v1.ExpressionWarning{}.OpenAPIModelName()), }, }, }, @@ -2282,7 +2379,7 @@ func schema_k8sio_api_admissionregistration_v1_TypeChecking(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.ExpressionWarning"}, + v1.ExpressionWarning{}.OpenAPIModelName()}, } } @@ -2311,28 +2408,28 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicy(ref com SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the ValidatingAdmissionPolicy.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicySpec"), + Ref: ref(v1.ValidatingAdmissionPolicySpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy behaves in the expected way. Populated by the system. Read-only.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicyStatus"), + Ref: ref(v1.ValidatingAdmissionPolicyStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicySpec", "k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicyStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.ValidatingAdmissionPolicySpec{}.OpenAPIModelName(), v1.ValidatingAdmissionPolicyStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -2361,21 +2458,21 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyBinding( SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicyBindingSpec"), + Ref: ref(v1.ValidatingAdmissionPolicyBindingSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicyBindingSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.ValidatingAdmissionPolicyBindingSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -2404,7 +2501,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyBindingL SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -2415,7 +2512,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyBindingL Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicyBinding"), + Ref: ref(v1.ValidatingAdmissionPolicyBinding{}.OpenAPIModelName()), }, }, }, @@ -2426,7 +2523,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyBindingL }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicyBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.ValidatingAdmissionPolicyBinding{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -2447,13 +2544,13 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyBindingS "paramRef": { SchemaProps: spec.SchemaProps{ Description: "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.", - Ref: ref("k8s.io/api/admissionregistration/v1.ParamRef"), + Ref: ref(v1.ParamRef{}.OpenAPIModelName()), }, }, "matchResources": { SchemaProps: spec.SchemaProps{ Description: "MatchResources declares what resources match this binding and will be validated by it. Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. If this is unset, all resources matched by the policy are validated by this binding When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required.", - Ref: ref("k8s.io/api/admissionregistration/v1.MatchResources"), + Ref: ref(v1.MatchResources{}.OpenAPIModelName()), }, }, "validationActions": { @@ -2481,7 +2578,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyBindingS }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.MatchResources", "k8s.io/api/admissionregistration/v1.ParamRef"}, + v1.MatchResources{}.OpenAPIModelName(), v1.ParamRef{}.OpenAPIModelName()}, } } @@ -2510,7 +2607,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyList(ref SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -2521,7 +2618,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyList(ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicy"), + Ref: ref(v1.ValidatingAdmissionPolicy{}.OpenAPIModelName()), }, }, }, @@ -2532,7 +2629,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyList(ref }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.ValidatingAdmissionPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.ValidatingAdmissionPolicy{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -2546,13 +2643,13 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicySpec(ref "paramKind": { SchemaProps: spec.SchemaProps{ Description: "ParamKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.", - Ref: ref("k8s.io/api/admissionregistration/v1.ParamKind"), + Ref: ref(v1.ParamKind{}.OpenAPIModelName()), }, }, "matchConstraints": { SchemaProps: spec.SchemaProps{ Description: "MatchConstraints specifies what resources this policy is designed to validate. The AdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required.", - Ref: ref("k8s.io/api/admissionregistration/v1.MatchResources"), + Ref: ref(v1.MatchResources{}.OpenAPIModelName()), }, }, "validations": { @@ -2568,7 +2665,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicySpec(ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.Validation"), + Ref: ref(v1.Validation{}.OpenAPIModelName()), }, }, }, @@ -2595,7 +2692,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicySpec(ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.AuditAnnotation"), + Ref: ref(v1.AuditAnnotation{}.OpenAPIModelName()), }, }, }, @@ -2619,7 +2716,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicySpec(ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.MatchCondition"), + Ref: ref(v1.MatchCondition{}.OpenAPIModelName()), }, }, }, @@ -2643,7 +2740,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicySpec(ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.Variable"), + Ref: ref(v1.Variable{}.OpenAPIModelName()), }, }, }, @@ -2653,7 +2750,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicySpec(ref }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.AuditAnnotation", "k8s.io/api/admissionregistration/v1.MatchCondition", "k8s.io/api/admissionregistration/v1.MatchResources", "k8s.io/api/admissionregistration/v1.ParamKind", "k8s.io/api/admissionregistration/v1.Validation", "k8s.io/api/admissionregistration/v1.Variable"}, + v1.AuditAnnotation{}.OpenAPIModelName(), v1.MatchCondition{}.OpenAPIModelName(), v1.MatchResources{}.OpenAPIModelName(), v1.ParamKind{}.OpenAPIModelName(), v1.Validation{}.OpenAPIModelName(), v1.Variable{}.OpenAPIModelName()}, } } @@ -2674,7 +2771,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyStatus(r "typeChecking": { SchemaProps: spec.SchemaProps{ Description: "The results of type checking for each expression. Presence of this field indicates the completion of the type checking.", - Ref: ref("k8s.io/api/admissionregistration/v1.TypeChecking"), + Ref: ref(v1.TypeChecking{}.OpenAPIModelName()), }, }, "conditions": { @@ -2693,7 +2790,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyStatus(r Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -2703,7 +2800,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyStatus(r }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.TypeChecking", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + v1.TypeChecking{}.OpenAPIModelName(), metav1.Condition{}.OpenAPIModelName()}, } } @@ -2726,7 +2823,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "ClientConfig defines how to communicate with the hook. Required", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.WebhookClientConfig"), + Ref: ref(v1.WebhookClientConfig{}.OpenAPIModelName()), }, }, "rules": { @@ -2742,7 +2839,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.RuleWithOperations"), + Ref: ref(v1.RuleWithOperations{}.OpenAPIModelName()), }, }, }, @@ -2767,13 +2864,13 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref common.Refe "namespaceSelector": { SchemaProps: spec.SchemaProps{ Description: "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "objectSelector": { SchemaProps: spec.SchemaProps{ Description: "ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "sideEffects": { @@ -2829,7 +2926,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.MatchCondition"), + Ref: ref(v1.MatchCondition{}.OpenAPIModelName()), }, }, }, @@ -2840,7 +2937,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.MatchCondition", "k8s.io/api/admissionregistration/v1.RuleWithOperations", "k8s.io/api/admissionregistration/v1.WebhookClientConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + v1.MatchCondition{}.OpenAPIModelName(), v1.RuleWithOperations{}.OpenAPIModelName(), v1.WebhookClientConfig{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -2869,7 +2966,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfiguration(re SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "webhooks": { @@ -2890,7 +2987,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfiguration(re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.ValidatingWebhook"), + Ref: ref(v1.ValidatingWebhook{}.OpenAPIModelName()), }, }, }, @@ -2900,7 +2997,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfiguration(re }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.ValidatingWebhook", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.ValidatingWebhook{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -2929,7 +3026,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfigurationLis SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -2940,7 +3037,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfigurationLis Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.ValidatingWebhookConfiguration"), + Ref: ref(v1.ValidatingWebhookConfiguration{}.OpenAPIModelName()), }, }, }, @@ -2951,7 +3048,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfigurationLis }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.ValidatingWebhookConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.ValidatingWebhookConfiguration{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -3050,7 +3147,7 @@ func schema_k8sio_api_admissionregistration_v1_WebhookClientConfig(ref common.Re "service": { SchemaProps: spec.SchemaProps{ Description: "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", - Ref: ref("k8s.io/api/admissionregistration/v1.ServiceReference"), + Ref: ref(v1.ServiceReference{}.OpenAPIModelName()), }, }, "caBundle": { @@ -3064,7 +3161,7 @@ func schema_k8sio_api_admissionregistration_v1_WebhookClientConfig(ref common.Re }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.ServiceReference"}, + v1.ServiceReference{}.OpenAPIModelName()}, } } @@ -3207,13 +3304,13 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MatchResources(ref common.R "namespaceSelector": { SchemaProps: spec.SchemaProps{ Description: "NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the policy on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "objectSelector": { SchemaProps: spec.SchemaProps{ Description: "ObjectSelector decides whether to run the policy based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the policy's expression (CEL), and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "resourceRules": { @@ -3229,7 +3326,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MatchResources(ref common.R Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.NamedRuleWithOperations"), + Ref: ref(v1alpha1.NamedRuleWithOperations{}.OpenAPIModelName()), }, }, }, @@ -3248,7 +3345,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MatchResources(ref common.R Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.NamedRuleWithOperations"), + Ref: ref(v1alpha1.NamedRuleWithOperations{}.OpenAPIModelName()), }, }, }, @@ -3271,7 +3368,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MatchResources(ref common.R }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.NamedRuleWithOperations", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + v1alpha1.NamedRuleWithOperations{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -3300,21 +3397,21 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicy(ref SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the MutatingAdmissionPolicy.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.MutatingAdmissionPolicySpec"), + Ref: ref(v1alpha1.MutatingAdmissionPolicySpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.MutatingAdmissionPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1alpha1.MutatingAdmissionPolicySpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -3343,21 +3440,21 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyBind SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the MutatingAdmissionPolicyBinding.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.MutatingAdmissionPolicyBindingSpec"), + Ref: ref(v1alpha1.MutatingAdmissionPolicyBindingSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.MutatingAdmissionPolicyBindingSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1alpha1.MutatingAdmissionPolicyBindingSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -3386,7 +3483,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyBind SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -3397,7 +3494,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyBind Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.MutatingAdmissionPolicyBinding"), + Ref: ref(v1alpha1.MutatingAdmissionPolicyBinding{}.OpenAPIModelName()), }, }, }, @@ -3408,7 +3505,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyBind }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.MutatingAdmissionPolicyBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1alpha1.MutatingAdmissionPolicyBinding{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -3429,20 +3526,20 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyBind "paramRef": { SchemaProps: spec.SchemaProps{ Description: "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.", - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.ParamRef"), + Ref: ref(v1alpha1.ParamRef{}.OpenAPIModelName()), }, }, "matchResources": { SchemaProps: spec.SchemaProps{ Description: "matchResources limits what resources match this binding and may be mutated by it. Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and matchConditions before the resource may be mutated. When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints and matchConditions must match for the resource to be mutated. Additionally, matchResources.resourceRules are optional and do not constraint matching when unset. Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT.", - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.MatchResources"), + Ref: ref(v1alpha1.MatchResources{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.MatchResources", "k8s.io/api/admissionregistration/v1alpha1.ParamRef"}, + v1alpha1.MatchResources{}.OpenAPIModelName(), v1alpha1.ParamRef{}.OpenAPIModelName()}, } } @@ -3471,7 +3568,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyList SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -3482,7 +3579,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyList Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.MutatingAdmissionPolicy"), + Ref: ref(v1alpha1.MutatingAdmissionPolicy{}.OpenAPIModelName()), }, }, }, @@ -3493,7 +3590,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicyList }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.MutatingAdmissionPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1alpha1.MutatingAdmissionPolicy{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -3507,13 +3604,13 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicySpec "paramKind": { SchemaProps: spec.SchemaProps{ Description: "paramKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null.", - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.ParamKind"), + Ref: ref(v1alpha1.ParamKind{}.OpenAPIModelName()), }, }, "matchConstraints": { SchemaProps: spec.SchemaProps{ Description: "matchConstraints specifies what resources this policy is designed to validate. The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT. Required.", - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.MatchResources"), + Ref: ref(v1alpha1.MatchResources{}.OpenAPIModelName()), }, }, "variables": { @@ -3529,7 +3626,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicySpec Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.Variable"), + Ref: ref(v1alpha1.Variable{}.OpenAPIModelName()), }, }, }, @@ -3548,7 +3645,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicySpec Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.Mutation"), + Ref: ref(v1alpha1.Mutation{}.OpenAPIModelName()), }, }, }, @@ -3580,7 +3677,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicySpec Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.MatchCondition"), + Ref: ref(v1alpha1.MatchCondition{}.OpenAPIModelName()), }, }, }, @@ -3588,16 +3685,17 @@ func schema_k8sio_api_admissionregistration_v1alpha1_MutatingAdmissionPolicySpec }, "reinvocationPolicy": { SchemaProps: spec.SchemaProps{ - Description: "reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: These mutations will not be called more than once per binding in a single admission evaluation.\n\nIfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required.", + Description: "reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: These mutations will not be called more than once per binding in a single admission evaluation.\n\nIfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required.\n\nPossible enum values:\n - `\"IfNeeded\"` indicates that the mutation may be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial mutation call.\n - `\"Never\"` indicates that the mutation must not be called more than once in a single admission evaluation.", Type: []string{"string"}, Format: "", + Enum: []interface{}{"IfNeeded", "Never"}, }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.MatchCondition", "k8s.io/api/admissionregistration/v1alpha1.MatchResources", "k8s.io/api/admissionregistration/v1alpha1.Mutation", "k8s.io/api/admissionregistration/v1alpha1.ParamKind", "k8s.io/api/admissionregistration/v1alpha1.Variable"}, + v1alpha1.MatchCondition{}.OpenAPIModelName(), v1alpha1.MatchResources{}.OpenAPIModelName(), v1alpha1.Mutation{}.OpenAPIModelName(), v1alpha1.ParamKind{}.OpenAPIModelName(), v1alpha1.Variable{}.OpenAPIModelName()}, } } @@ -3620,13 +3718,13 @@ func schema_k8sio_api_admissionregistration_v1alpha1_Mutation(ref common.Referen "applyConfiguration": { SchemaProps: spec.SchemaProps{ Description: "applyConfiguration defines the desired configuration values of an object. The configuration is applied to the admission object using [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff). A CEL expression is used to create apply configuration.", - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.ApplyConfiguration"), + Ref: ref(v1alpha1.ApplyConfiguration{}.OpenAPIModelName()), }, }, "jsonPatch": { SchemaProps: spec.SchemaProps{ Description: "jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object. A CEL expression is used to create the JSON patch.", - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.JSONPatch"), + Ref: ref(v1alpha1.JSONPatch{}.OpenAPIModelName()), }, }, }, @@ -3634,7 +3732,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_Mutation(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.ApplyConfiguration", "k8s.io/api/admissionregistration/v1alpha1.JSONPatch"}, + v1alpha1.ApplyConfiguration{}.OpenAPIModelName(), v1alpha1.JSONPatch{}.OpenAPIModelName()}, } } @@ -3748,9 +3846,10 @@ func schema_k8sio_api_admissionregistration_v1alpha1_NamedRuleWithOperations(ref }, "scope": { SchemaProps: spec.SchemaProps{ - Description: "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + Description: "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\n\n\nPossible enum values:\n - `\"*\"` means that all scopes are included.\n - `\"Cluster\"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped.\n - `\"Namespaced\"` means that scope is limited to namespaced objects.", Type: []string{"string"}, Format: "", + Enum: []interface{}{"*", "Cluster", "Namespaced"}, }, }, }, @@ -3820,7 +3919,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ParamRef(ref common.Referen "selector": { SchemaProps: spec.SchemaProps{ Description: "selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.\n\nIf multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "parameterNotFoundAction": { @@ -3840,7 +3939,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ParamRef(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -3864,7 +3963,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_TypeChecking(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.ExpressionWarning"), + Ref: ref(v1alpha1.ExpressionWarning{}.OpenAPIModelName()), }, }, }, @@ -3874,7 +3973,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_TypeChecking(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.ExpressionWarning"}, + v1alpha1.ExpressionWarning{}.OpenAPIModelName()}, } } @@ -3903,28 +4002,28 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicy(r SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the ValidatingAdmissionPolicy.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicySpec"), + Ref: ref(v1alpha1.ValidatingAdmissionPolicySpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy behaves in the expected way. Populated by the system. Read-only.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicyStatus"), + Ref: ref(v1alpha1.ValidatingAdmissionPolicyStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicySpec", "k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicyStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1alpha1.ValidatingAdmissionPolicySpec{}.OpenAPIModelName(), v1alpha1.ValidatingAdmissionPolicyStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -3953,21 +4052,21 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyBi SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicyBindingSpec"), + Ref: ref(v1alpha1.ValidatingAdmissionPolicyBindingSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicyBindingSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1alpha1.ValidatingAdmissionPolicyBindingSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -3996,7 +4095,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyBi SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -4007,7 +4106,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyBi Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicyBinding"), + Ref: ref(v1alpha1.ValidatingAdmissionPolicyBinding{}.OpenAPIModelName()), }, }, }, @@ -4018,7 +4117,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyBi }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicyBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1alpha1.ValidatingAdmissionPolicyBinding{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -4039,13 +4138,13 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyBi "paramRef": { SchemaProps: spec.SchemaProps{ Description: "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.", - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.ParamRef"), + Ref: ref(v1alpha1.ParamRef{}.OpenAPIModelName()), }, }, "matchResources": { SchemaProps: spec.SchemaProps{ Description: "MatchResources declares what resources match this binding and will be validated by it. Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. If this is unset, all resources matched by the policy are validated by this binding When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required.", - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.MatchResources"), + Ref: ref(v1alpha1.MatchResources{}.OpenAPIModelName()), }, }, "validationActions": { @@ -4073,7 +4172,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyBi }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.MatchResources", "k8s.io/api/admissionregistration/v1alpha1.ParamRef"}, + v1alpha1.MatchResources{}.OpenAPIModelName(), v1alpha1.ParamRef{}.OpenAPIModelName()}, } } @@ -4102,7 +4201,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyLi SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -4113,7 +4212,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyLi Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicy"), + Ref: ref(v1alpha1.ValidatingAdmissionPolicy{}.OpenAPIModelName()), }, }, }, @@ -4124,7 +4223,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyLi }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.ValidatingAdmissionPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1alpha1.ValidatingAdmissionPolicy{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -4138,13 +4237,13 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicySp "paramKind": { SchemaProps: spec.SchemaProps{ Description: "ParamKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.", - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.ParamKind"), + Ref: ref(v1alpha1.ParamKind{}.OpenAPIModelName()), }, }, "matchConstraints": { SchemaProps: spec.SchemaProps{ Description: "MatchConstraints specifies what resources this policy is designed to validate. The AdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required.", - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.MatchResources"), + Ref: ref(v1alpha1.MatchResources{}.OpenAPIModelName()), }, }, "validations": { @@ -4160,7 +4259,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicySp Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.Validation"), + Ref: ref(v1alpha1.Validation{}.OpenAPIModelName()), }, }, }, @@ -4187,7 +4286,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicySp Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.AuditAnnotation"), + Ref: ref(v1alpha1.AuditAnnotation{}.OpenAPIModelName()), }, }, }, @@ -4211,7 +4310,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicySp Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.MatchCondition"), + Ref: ref(v1alpha1.MatchCondition{}.OpenAPIModelName()), }, }, }, @@ -4235,7 +4334,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicySp Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.Variable"), + Ref: ref(v1alpha1.Variable{}.OpenAPIModelName()), }, }, }, @@ -4245,7 +4344,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicySp }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.AuditAnnotation", "k8s.io/api/admissionregistration/v1alpha1.MatchCondition", "k8s.io/api/admissionregistration/v1alpha1.MatchResources", "k8s.io/api/admissionregistration/v1alpha1.ParamKind", "k8s.io/api/admissionregistration/v1alpha1.Validation", "k8s.io/api/admissionregistration/v1alpha1.Variable"}, + v1alpha1.AuditAnnotation{}.OpenAPIModelName(), v1alpha1.MatchCondition{}.OpenAPIModelName(), v1alpha1.MatchResources{}.OpenAPIModelName(), v1alpha1.ParamKind{}.OpenAPIModelName(), v1alpha1.Validation{}.OpenAPIModelName(), v1alpha1.Variable{}.OpenAPIModelName()}, } } @@ -4266,7 +4365,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicySt "typeChecking": { SchemaProps: spec.SchemaProps{ Description: "The results of type checking for each expression. Presence of this field indicates the completion of the type checking.", - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.TypeChecking"), + Ref: ref(v1alpha1.TypeChecking{}.OpenAPIModelName()), }, }, "conditions": { @@ -4285,7 +4384,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicySt Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -4295,7 +4394,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicySt }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.TypeChecking", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + v1alpha1.TypeChecking{}.OpenAPIModelName(), metav1.Condition{}.OpenAPIModelName()}, } } @@ -4512,13 +4611,13 @@ func schema_k8sio_api_admissionregistration_v1beta1_MatchResources(ref common.Re "namespaceSelector": { SchemaProps: spec.SchemaProps{ Description: "NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the policy on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "objectSelector": { SchemaProps: spec.SchemaProps{ Description: "ObjectSelector decides whether to run the validation based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "resourceRules": { @@ -4534,7 +4633,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MatchResources(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.NamedRuleWithOperations"), + Ref: ref(v1beta1.NamedRuleWithOperations{}.OpenAPIModelName()), }, }, }, @@ -4553,7 +4652,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MatchResources(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.NamedRuleWithOperations"), + Ref: ref(v1beta1.NamedRuleWithOperations{}.OpenAPIModelName()), }, }, }, @@ -4575,7 +4674,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MatchResources(ref common.Re }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.NamedRuleWithOperations", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + v1beta1.NamedRuleWithOperations{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -4604,21 +4703,21 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicy(ref SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the MutatingAdmissionPolicy.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MutatingAdmissionPolicySpec"), + Ref: ref(v1beta1.MutatingAdmissionPolicySpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.MutatingAdmissionPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1beta1.MutatingAdmissionPolicySpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -4647,21 +4746,21 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyBindi SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the MutatingAdmissionPolicyBinding.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MutatingAdmissionPolicyBindingSpec"), + Ref: ref(v1beta1.MutatingAdmissionPolicyBindingSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.MutatingAdmissionPolicyBindingSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1beta1.MutatingAdmissionPolicyBindingSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -4690,7 +4789,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyBindi SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -4701,7 +4800,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyBindi Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MutatingAdmissionPolicyBinding"), + Ref: ref(v1beta1.MutatingAdmissionPolicyBinding{}.OpenAPIModelName()), }, }, }, @@ -4712,7 +4811,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyBindi }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.MutatingAdmissionPolicyBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1beta1.MutatingAdmissionPolicyBinding{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -4733,20 +4832,20 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyBindi "paramRef": { SchemaProps: spec.SchemaProps{ Description: "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.", - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ParamRef"), + Ref: ref(v1beta1.ParamRef{}.OpenAPIModelName()), }, }, "matchResources": { SchemaProps: spec.SchemaProps{ Description: "matchResources limits what resources match this binding and may be mutated by it. Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and matchConditions before the resource may be mutated. When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints and matchConditions must match for the resource to be mutated. Additionally, matchResources.resourceRules are optional and do not constraint matching when unset. Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT.", - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MatchResources"), + Ref: ref(v1beta1.MatchResources{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.MatchResources", "k8s.io/api/admissionregistration/v1beta1.ParamRef"}, + v1beta1.MatchResources{}.OpenAPIModelName(), v1beta1.ParamRef{}.OpenAPIModelName()}, } } @@ -4775,7 +4874,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyList( SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -4786,7 +4885,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyList( Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MutatingAdmissionPolicy"), + Ref: ref(v1beta1.MutatingAdmissionPolicy{}.OpenAPIModelName()), }, }, }, @@ -4797,7 +4896,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicyList( }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.MutatingAdmissionPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1beta1.MutatingAdmissionPolicy{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -4811,13 +4910,13 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicySpec( "paramKind": { SchemaProps: spec.SchemaProps{ Description: "paramKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null.", - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ParamKind"), + Ref: ref(v1beta1.ParamKind{}.OpenAPIModelName()), }, }, "matchConstraints": { SchemaProps: spec.SchemaProps{ Description: "matchConstraints specifies what resources this policy is designed to validate. The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT. Required.", - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MatchResources"), + Ref: ref(v1beta1.MatchResources{}.OpenAPIModelName()), }, }, "variables": { @@ -4833,7 +4932,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicySpec( Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.Variable"), + Ref: ref(v1beta1.Variable{}.OpenAPIModelName()), }, }, }, @@ -4852,7 +4951,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicySpec( Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.Mutation"), + Ref: ref(v1beta1.Mutation{}.OpenAPIModelName()), }, }, }, @@ -4883,7 +4982,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicySpec( Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MatchCondition"), + Ref: ref(v1beta1.MatchCondition{}.OpenAPIModelName()), }, }, }, @@ -4891,16 +4990,17 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingAdmissionPolicySpec( }, "reinvocationPolicy": { SchemaProps: spec.SchemaProps{ - Description: "reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: These mutations will not be called more than once per binding in a single admission evaluation.\n\nIfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required.", + Description: "reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: These mutations will not be called more than once per binding in a single admission evaluation.\n\nIfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required.\n\nPossible enum values:\n - `\"IfNeeded\"` indicates that the mutation may be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial mutation call.\n - `\"Never\"` indicates that the mutation must not be called more than once in a single admission evaluation.", Type: []string{"string"}, Format: "", + Enum: []interface{}{"IfNeeded", "Never"}, }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.MatchCondition", "k8s.io/api/admissionregistration/v1beta1.MatchResources", "k8s.io/api/admissionregistration/v1beta1.Mutation", "k8s.io/api/admissionregistration/v1beta1.ParamKind", "k8s.io/api/admissionregistration/v1beta1.Variable"}, + v1beta1.MatchCondition{}.OpenAPIModelName(), v1beta1.MatchResources{}.OpenAPIModelName(), v1beta1.Mutation{}.OpenAPIModelName(), v1beta1.ParamKind{}.OpenAPIModelName(), v1beta1.Variable{}.OpenAPIModelName()}, } } @@ -4923,7 +5023,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref common.R SchemaProps: spec.SchemaProps{ Description: "ClientConfig defines how to communicate with the hook. Required", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig"), + Ref: ref(v1beta1.WebhookClientConfig{}.OpenAPIModelName()), }, }, "rules": { @@ -4939,7 +5039,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref common.R Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.RuleWithOperations"), + Ref: ref(v1.RuleWithOperations{}.OpenAPIModelName()), }, }, }, @@ -4962,13 +5062,13 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref common.R "namespaceSelector": { SchemaProps: spec.SchemaProps{ Description: "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "objectSelector": { SchemaProps: spec.SchemaProps{ Description: "ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "sideEffects": { @@ -5007,9 +5107,10 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref common.R }, "reinvocationPolicy": { SchemaProps: spec.SchemaProps{ - Description: "reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: the webhook will not be called more than once in a single admission evaluation.\n\nIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.\n\nDefaults to \"Never\".", + Description: "reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: the webhook will not be called more than once in a single admission evaluation.\n\nIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.\n\nDefaults to \"Never\".\n\nPossible enum values:\n - `\"IfNeeded\"` indicates that the mutation may be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial mutation call.\n - `\"Never\"` indicates that the mutation must not be called more than once in a single admission evaluation.", Type: []string{"string"}, Format: "", + Enum: []interface{}{"IfNeeded", "Never"}, }, }, "matchConditions": { @@ -5030,7 +5131,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref common.R Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MatchCondition"), + Ref: ref(v1beta1.MatchCondition{}.OpenAPIModelName()), }, }, }, @@ -5041,7 +5142,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref common.R }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.RuleWithOperations", "k8s.io/api/admissionregistration/v1beta1.MatchCondition", "k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + v1.RuleWithOperations{}.OpenAPIModelName(), v1beta1.MatchCondition{}.OpenAPIModelName(), v1beta1.WebhookClientConfig{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -5070,7 +5171,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "webhooks": { @@ -5091,7 +5192,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MutatingWebhook"), + Ref: ref(v1beta1.MutatingWebhook{}.OpenAPIModelName()), }, }, }, @@ -5101,7 +5202,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.MutatingWebhook", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1beta1.MutatingWebhook{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -5130,7 +5231,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -5141,7 +5242,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration"), + Ref: ref(v1beta1.MutatingWebhookConfiguration{}.OpenAPIModelName()), }, }, }, @@ -5152,7 +5253,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1beta1.MutatingWebhookConfiguration{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -5175,13 +5276,13 @@ func schema_k8sio_api_admissionregistration_v1beta1_Mutation(ref common.Referenc "applyConfiguration": { SchemaProps: spec.SchemaProps{ Description: "applyConfiguration defines the desired configuration values of an object. The configuration is applied to the admission object using [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff). A CEL expression is used to create apply configuration.", - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ApplyConfiguration"), + Ref: ref(v1beta1.ApplyConfiguration{}.OpenAPIModelName()), }, }, "jsonPatch": { SchemaProps: spec.SchemaProps{ Description: "jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object. A CEL expression is used to create the JSON patch.", - Ref: ref("k8s.io/api/admissionregistration/v1beta1.JSONPatch"), + Ref: ref(v1beta1.JSONPatch{}.OpenAPIModelName()), }, }, }, @@ -5189,7 +5290,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_Mutation(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.ApplyConfiguration", "k8s.io/api/admissionregistration/v1beta1.JSONPatch"}, + v1beta1.ApplyConfiguration{}.OpenAPIModelName(), v1beta1.JSONPatch{}.OpenAPIModelName()}, } } @@ -5303,9 +5404,10 @@ func schema_k8sio_api_admissionregistration_v1beta1_NamedRuleWithOperations(ref }, "scope": { SchemaProps: spec.SchemaProps{ - Description: "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + Description: "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\n\n\nPossible enum values:\n - `\"*\"` means that all scopes are included.\n - `\"Cluster\"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped.\n - `\"Namespaced\"` means that scope is limited to namespaced objects.", Type: []string{"string"}, Format: "", + Enum: []interface{}{"*", "Cluster", "Namespaced"}, }, }, }, @@ -5375,7 +5477,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ParamRef(ref common.Referenc "selector": { SchemaProps: spec.SchemaProps{ Description: "selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.\n\nIf multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "parameterNotFoundAction": { @@ -5394,7 +5496,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ParamRef(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -5462,7 +5564,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_TypeChecking(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ExpressionWarning"), + Ref: ref(v1beta1.ExpressionWarning{}.OpenAPIModelName()), }, }, }, @@ -5472,7 +5574,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_TypeChecking(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.ExpressionWarning"}, + v1beta1.ExpressionWarning{}.OpenAPIModelName()}, } } @@ -5501,28 +5603,28 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicy(re SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the ValidatingAdmissionPolicy.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicySpec"), + Ref: ref(v1beta1.ValidatingAdmissionPolicySpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy behaves in the expected way. Populated by the system. Read-only.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicyStatus"), + Ref: ref(v1beta1.ValidatingAdmissionPolicyStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicySpec", "k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicyStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1beta1.ValidatingAdmissionPolicySpec{}.OpenAPIModelName(), v1beta1.ValidatingAdmissionPolicyStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -5551,21 +5653,21 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyBin SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicyBindingSpec"), + Ref: ref(v1beta1.ValidatingAdmissionPolicyBindingSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicyBindingSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1beta1.ValidatingAdmissionPolicyBindingSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -5594,7 +5696,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyBin SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -5605,7 +5707,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyBin Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicyBinding"), + Ref: ref(v1beta1.ValidatingAdmissionPolicyBinding{}.OpenAPIModelName()), }, }, }, @@ -5616,7 +5718,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyBin }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicyBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1beta1.ValidatingAdmissionPolicyBinding{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -5637,13 +5739,13 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyBin "paramRef": { SchemaProps: spec.SchemaProps{ Description: "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.", - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ParamRef"), + Ref: ref(v1beta1.ParamRef{}.OpenAPIModelName()), }, }, "matchResources": { SchemaProps: spec.SchemaProps{ Description: "MatchResources declares what resources match this binding and will be validated by it. Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. If this is unset, all resources matched by the policy are validated by this binding When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required.", - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MatchResources"), + Ref: ref(v1beta1.MatchResources{}.OpenAPIModelName()), }, }, "validationActions": { @@ -5671,7 +5773,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyBin }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.MatchResources", "k8s.io/api/admissionregistration/v1beta1.ParamRef"}, + v1beta1.MatchResources{}.OpenAPIModelName(), v1beta1.ParamRef{}.OpenAPIModelName()}, } } @@ -5700,7 +5802,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyLis SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -5711,7 +5813,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyLis Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicy"), + Ref: ref(v1beta1.ValidatingAdmissionPolicy{}.OpenAPIModelName()), }, }, }, @@ -5722,7 +5824,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyLis }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.ValidatingAdmissionPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1beta1.ValidatingAdmissionPolicy{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -5736,13 +5838,13 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicySpe "paramKind": { SchemaProps: spec.SchemaProps{ Description: "ParamKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.", - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ParamKind"), + Ref: ref(v1beta1.ParamKind{}.OpenAPIModelName()), }, }, "matchConstraints": { SchemaProps: spec.SchemaProps{ Description: "MatchConstraints specifies what resources this policy is designed to validate. The AdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required.", - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MatchResources"), + Ref: ref(v1beta1.MatchResources{}.OpenAPIModelName()), }, }, "validations": { @@ -5758,7 +5860,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicySpe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.Validation"), + Ref: ref(v1beta1.Validation{}.OpenAPIModelName()), }, }, }, @@ -5784,7 +5886,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicySpe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.AuditAnnotation"), + Ref: ref(v1beta1.AuditAnnotation{}.OpenAPIModelName()), }, }, }, @@ -5808,7 +5910,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicySpe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MatchCondition"), + Ref: ref(v1beta1.MatchCondition{}.OpenAPIModelName()), }, }, }, @@ -5832,7 +5934,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicySpe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.Variable"), + Ref: ref(v1beta1.Variable{}.OpenAPIModelName()), }, }, }, @@ -5842,7 +5944,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicySpe }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.AuditAnnotation", "k8s.io/api/admissionregistration/v1beta1.MatchCondition", "k8s.io/api/admissionregistration/v1beta1.MatchResources", "k8s.io/api/admissionregistration/v1beta1.ParamKind", "k8s.io/api/admissionregistration/v1beta1.Validation", "k8s.io/api/admissionregistration/v1beta1.Variable"}, + v1beta1.AuditAnnotation{}.OpenAPIModelName(), v1beta1.MatchCondition{}.OpenAPIModelName(), v1beta1.MatchResources{}.OpenAPIModelName(), v1beta1.ParamKind{}.OpenAPIModelName(), v1beta1.Validation{}.OpenAPIModelName(), v1beta1.Variable{}.OpenAPIModelName()}, } } @@ -5863,7 +5965,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicySta "typeChecking": { SchemaProps: spec.SchemaProps{ Description: "The results of type checking for each expression. Presence of this field indicates the completion of the type checking.", - Ref: ref("k8s.io/api/admissionregistration/v1beta1.TypeChecking"), + Ref: ref(v1beta1.TypeChecking{}.OpenAPIModelName()), }, }, "conditions": { @@ -5882,7 +5984,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicySta Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -5892,7 +5994,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicySta }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.TypeChecking", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + v1beta1.TypeChecking{}.OpenAPIModelName(), metav1.Condition{}.OpenAPIModelName()}, } } @@ -5915,7 +6017,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref common SchemaProps: spec.SchemaProps{ Description: "ClientConfig defines how to communicate with the hook. Required", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig"), + Ref: ref(v1beta1.WebhookClientConfig{}.OpenAPIModelName()), }, }, "rules": { @@ -5931,7 +6033,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1.RuleWithOperations"), + Ref: ref(v1.RuleWithOperations{}.OpenAPIModelName()), }, }, }, @@ -5954,13 +6056,13 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref common "namespaceSelector": { SchemaProps: spec.SchemaProps{ Description: "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "objectSelector": { SchemaProps: spec.SchemaProps{ Description: "ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "sideEffects": { @@ -6020,7 +6122,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MatchCondition"), + Ref: ref(v1beta1.MatchCondition{}.OpenAPIModelName()), }, }, }, @@ -6031,7 +6133,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref common }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1.RuleWithOperations", "k8s.io/api/admissionregistration/v1beta1.MatchCondition", "k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + v1.RuleWithOperations{}.OpenAPIModelName(), v1beta1.MatchCondition{}.OpenAPIModelName(), v1beta1.WebhookClientConfig{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -6060,7 +6162,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurati SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "webhooks": { @@ -6081,7 +6183,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurati Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ValidatingWebhook"), + Ref: ref(v1beta1.ValidatingWebhook{}.OpenAPIModelName()), }, }, }, @@ -6091,7 +6193,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurati }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.ValidatingWebhook", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1beta1.ValidatingWebhook{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -6120,7 +6222,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurati SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -6131,7 +6233,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurati Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfiguration"), + Ref: ref(v1beta1.ValidatingWebhookConfiguration{}.OpenAPIModelName()), }, }, }, @@ -6142,7 +6244,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurati }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1beta1.ValidatingWebhookConfiguration{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -6241,7 +6343,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_WebhookClientConfig(ref comm "service": { SchemaProps: spec.SchemaProps{ Description: "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ServiceReference"), + Ref: ref(v1beta1.ServiceReference{}.OpenAPIModelName()), }, }, "caBundle": { @@ -6255,7 +6357,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_WebhookClientConfig(ref comm }, }, Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.ServiceReference"}, + v1beta1.ServiceReference{}.OpenAPIModelName()}, } } @@ -6284,7 +6386,7 @@ func schema_k8sio_api_apidiscovery_v2_APIGroupDiscovery(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. The only field completed will be name. For instance, resourceVersion will be empty. name is the name of the API group whose discovery information is presented here. name is allowed to be \"\" to represent the legacy, ungroupified resources. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "versions": { @@ -6303,7 +6405,7 @@ func schema_k8sio_api_apidiscovery_v2_APIGroupDiscovery(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apidiscovery/v2.APIVersionDiscovery"), + Ref: ref(v2.APIVersionDiscovery{}.OpenAPIModelName()), }, }, }, @@ -6313,7 +6415,7 @@ func schema_k8sio_api_apidiscovery_v2_APIGroupDiscovery(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/apidiscovery/v2.APIVersionDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v2.APIVersionDiscovery{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -6342,7 +6444,7 @@ func schema_k8sio_api_apidiscovery_v2_APIGroupDiscoveryList(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "ResourceVersion will not be set, because this does not have a replayable ordering among multiple apiservers. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -6353,7 +6455,7 @@ func schema_k8sio_api_apidiscovery_v2_APIGroupDiscoveryList(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apidiscovery/v2.APIGroupDiscovery"), + Ref: ref(v2.APIGroupDiscovery{}.OpenAPIModelName()), }, }, }, @@ -6364,7 +6466,7 @@ func schema_k8sio_api_apidiscovery_v2_APIGroupDiscoveryList(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/apidiscovery/v2.APIGroupDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v2.APIGroupDiscovery{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -6386,7 +6488,7 @@ func schema_k8sio_api_apidiscovery_v2_APIResourceDiscovery(ref common.ReferenceC "responseKind": { SchemaProps: spec.SchemaProps{ Description: "responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns. APIs may return other objects types at their discretion, such as error conditions, requests for alternate representations, or other operation specific behavior. This value will be null or empty if an APIService reports subresources but supports no operations on the parent resource", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"), + Ref: ref(metav1.GroupVersionKind{}.OpenAPIModelName()), }, }, "scope": { @@ -6481,7 +6583,7 @@ func schema_k8sio_api_apidiscovery_v2_APIResourceDiscovery(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apidiscovery/v2.APISubresourceDiscovery"), + Ref: ref(v2.APISubresourceDiscovery{}.OpenAPIModelName()), }, }, }, @@ -6492,7 +6594,7 @@ func schema_k8sio_api_apidiscovery_v2_APIResourceDiscovery(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/apidiscovery/v2.APISubresourceDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"}, + v2.APISubresourceDiscovery{}.OpenAPIModelName(), metav1.GroupVersionKind{}.OpenAPIModelName()}, } } @@ -6514,7 +6616,7 @@ func schema_k8sio_api_apidiscovery_v2_APISubresourceDiscovery(ref common.Referen "responseKind": { SchemaProps: spec.SchemaProps{ Description: "responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns. Some subresources do not return normal resources, these will have null or empty return types.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"), + Ref: ref(metav1.GroupVersionKind{}.OpenAPIModelName()), }, }, "acceptedTypes": { @@ -6535,7 +6637,7 @@ func schema_k8sio_api_apidiscovery_v2_APISubresourceDiscovery(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"), + Ref: ref(metav1.GroupVersionKind{}.OpenAPIModelName()), }, }, }, @@ -6566,7 +6668,7 @@ func schema_k8sio_api_apidiscovery_v2_APISubresourceDiscovery(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"}, + metav1.GroupVersionKind{}.OpenAPIModelName()}, } } @@ -6601,7 +6703,7 @@ func schema_k8sio_api_apidiscovery_v2_APIVersionDiscovery(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apidiscovery/v2.APIResourceDiscovery"), + Ref: ref(v2.APIResourceDiscovery{}.OpenAPIModelName()), }, }, }, @@ -6619,7 +6721,7 @@ func schema_k8sio_api_apidiscovery_v2_APIVersionDiscovery(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/apidiscovery/v2.APIResourceDiscovery"}, + v2.APIResourceDiscovery{}.OpenAPIModelName()}, } } @@ -6648,7 +6750,7 @@ func schema_k8sio_api_apidiscovery_v2beta1_APIGroupDiscovery(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. The only field completed will be name. For instance, resourceVersion will be empty. name is the name of the API group whose discovery information is presented here. name is allowed to be \"\" to represent the legacy, ungroupified resources. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "versions": { @@ -6667,7 +6769,7 @@ func schema_k8sio_api_apidiscovery_v2beta1_APIGroupDiscovery(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apidiscovery/v2beta1.APIVersionDiscovery"), + Ref: ref(v2beta1.APIVersionDiscovery{}.OpenAPIModelName()), }, }, }, @@ -6677,7 +6779,7 @@ func schema_k8sio_api_apidiscovery_v2beta1_APIGroupDiscovery(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/apidiscovery/v2beta1.APIVersionDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v2beta1.APIVersionDiscovery{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -6706,7 +6808,7 @@ func schema_k8sio_api_apidiscovery_v2beta1_APIGroupDiscoveryList(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "ResourceVersion will not be set, because this does not have a replayable ordering among multiple apiservers. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -6717,7 +6819,7 @@ func schema_k8sio_api_apidiscovery_v2beta1_APIGroupDiscoveryList(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apidiscovery/v2beta1.APIGroupDiscovery"), + Ref: ref(v2beta1.APIGroupDiscovery{}.OpenAPIModelName()), }, }, }, @@ -6728,7 +6830,7 @@ func schema_k8sio_api_apidiscovery_v2beta1_APIGroupDiscoveryList(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/apidiscovery/v2beta1.APIGroupDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v2beta1.APIGroupDiscovery{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -6750,7 +6852,7 @@ func schema_k8sio_api_apidiscovery_v2beta1_APIResourceDiscovery(ref common.Refer "responseKind": { SchemaProps: spec.SchemaProps{ Description: "responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns. APIs may return other objects types at their discretion, such as error conditions, requests for alternate representations, or other operation specific behavior. This value will be null or empty if an APIService reports subresources but supports no operations on the parent resource", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"), + Ref: ref(metav1.GroupVersionKind{}.OpenAPIModelName()), }, }, "scope": { @@ -6845,7 +6947,7 @@ func schema_k8sio_api_apidiscovery_v2beta1_APIResourceDiscovery(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apidiscovery/v2beta1.APISubresourceDiscovery"), + Ref: ref(v2beta1.APISubresourceDiscovery{}.OpenAPIModelName()), }, }, }, @@ -6856,7 +6958,7 @@ func schema_k8sio_api_apidiscovery_v2beta1_APIResourceDiscovery(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/apidiscovery/v2beta1.APISubresourceDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"}, + v2beta1.APISubresourceDiscovery{}.OpenAPIModelName(), metav1.GroupVersionKind{}.OpenAPIModelName()}, } } @@ -6878,7 +6980,7 @@ func schema_k8sio_api_apidiscovery_v2beta1_APISubresourceDiscovery(ref common.Re "responseKind": { SchemaProps: spec.SchemaProps{ Description: "responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns. Some subresources do not return normal resources, these will have null or empty return types.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"), + Ref: ref(metav1.GroupVersionKind{}.OpenAPIModelName()), }, }, "acceptedTypes": { @@ -6899,7 +7001,7 @@ func schema_k8sio_api_apidiscovery_v2beta1_APISubresourceDiscovery(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"), + Ref: ref(metav1.GroupVersionKind{}.OpenAPIModelName()), }, }, }, @@ -6930,7 +7032,7 @@ func schema_k8sio_api_apidiscovery_v2beta1_APISubresourceDiscovery(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"}, + metav1.GroupVersionKind{}.OpenAPIModelName()}, } } @@ -6965,7 +7067,7 @@ func schema_k8sio_api_apidiscovery_v2beta1_APIVersionDiscovery(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apidiscovery/v2beta1.APIResourceDiscovery"), + Ref: ref(v2beta1.APIResourceDiscovery{}.OpenAPIModelName()), }, }, }, @@ -6983,7 +7085,7 @@ func schema_k8sio_api_apidiscovery_v2beta1_APIVersionDiscovery(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/api/apidiscovery/v2beta1.APIResourceDiscovery"}, + v2beta1.APIResourceDiscovery{}.OpenAPIModelName()}, } } @@ -7079,21 +7181,21 @@ func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersion(ref common.Refer SchemaProps: spec.SchemaProps{ Description: "The name is ..", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec is an empty spec. It is here to comply with Kubernetes API style.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apiserverinternal/v1alpha1.StorageVersionSpec"), + Ref: ref(apiserverinternalv1alpha1.StorageVersionSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "API server instances report the version they can decode and the version they encode objects to when persisting objects in the backend.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apiserverinternal/v1alpha1.StorageVersionStatus"), + Ref: ref(apiserverinternalv1alpha1.StorageVersionStatus{}.OpenAPIModelName()), }, }, }, @@ -7101,7 +7203,7 @@ func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersion(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/apiserverinternal/v1alpha1.StorageVersionSpec", "k8s.io/api/apiserverinternal/v1alpha1.StorageVersionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + apiserverinternalv1alpha1.StorageVersionSpec{}.OpenAPIModelName(), apiserverinternalv1alpha1.StorageVersionStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -7138,7 +7240,7 @@ func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionCondition(ref com "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -7161,7 +7263,7 @@ func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionCondition(ref com }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -7190,7 +7292,7 @@ func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionList(ref common.R SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -7201,7 +7303,7 @@ func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionList(ref common.R Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apiserverinternal/v1alpha1.StorageVersion"), + Ref: ref(apiserverinternalv1alpha1.StorageVersion{}.OpenAPIModelName()), }, }, }, @@ -7212,7 +7314,7 @@ func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionList(ref common.R }, }, Dependencies: []string{ - "k8s.io/api/apiserverinternal/v1alpha1.StorageVersion", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + apiserverinternalv1alpha1.StorageVersion{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -7250,7 +7352,7 @@ func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionStatus(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apiserverinternal/v1alpha1.ServerStorageVersion"), + Ref: ref(apiserverinternalv1alpha1.ServerStorageVersion{}.OpenAPIModelName()), }, }, }, @@ -7279,7 +7381,7 @@ func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionStatus(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apiserverinternal/v1alpha1.StorageVersionCondition"), + Ref: ref(apiserverinternalv1alpha1.StorageVersionCondition{}.OpenAPIModelName()), }, }, }, @@ -7289,7 +7391,7 @@ func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionStatus(ref common }, }, Dependencies: []string{ - "k8s.io/api/apiserverinternal/v1alpha1.ServerStorageVersion", "k8s.io/api/apiserverinternal/v1alpha1.StorageVersionCondition"}, + apiserverinternalv1alpha1.ServerStorageVersion{}.OpenAPIModelName(), apiserverinternalv1alpha1.StorageVersionCondition{}.OpenAPIModelName()}, } } @@ -7318,13 +7420,13 @@ func schema_k8sio_api_apps_v1_ControllerRevision(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "data": { SchemaProps: spec.SchemaProps{ Description: "Data is the serialized representation of the state.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, "revision": { @@ -7340,7 +7442,7 @@ func schema_k8sio_api_apps_v1_ControllerRevision(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.ObjectMeta{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -7369,7 +7471,7 @@ func schema_k8sio_api_apps_v1_ControllerRevisionList(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -7380,7 +7482,7 @@ func schema_k8sio_api_apps_v1_ControllerRevisionList(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.ControllerRevision"), + Ref: ref(appsv1.ControllerRevision{}.OpenAPIModelName()), }, }, }, @@ -7391,7 +7493,7 @@ func schema_k8sio_api_apps_v1_ControllerRevisionList(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.ControllerRevision", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + appsv1.ControllerRevision{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -7420,28 +7522,28 @@ func schema_k8sio_api_apps_v1_DaemonSet(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.DaemonSetSpec"), + Ref: ref(appsv1.DaemonSetSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.DaemonSetStatus"), + Ref: ref(appsv1.DaemonSetStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.DaemonSetSpec", "k8s.io/api/apps/v1.DaemonSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + appsv1.DaemonSetSpec{}.OpenAPIModelName(), appsv1.DaemonSetStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -7471,7 +7573,7 @@ func schema_k8sio_api_apps_v1_DaemonSetCondition(ref common.ReferenceCallback) c "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -7493,7 +7595,7 @@ func schema_k8sio_api_apps_v1_DaemonSetCondition(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -7522,7 +7624,7 @@ func schema_k8sio_api_apps_v1_DaemonSetList(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -7533,7 +7635,7 @@ func schema_k8sio_api_apps_v1_DaemonSetList(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.DaemonSet"), + Ref: ref(appsv1.DaemonSet{}.OpenAPIModelName()), }, }, }, @@ -7544,7 +7646,7 @@ func schema_k8sio_api_apps_v1_DaemonSetList(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.DaemonSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + appsv1.DaemonSet{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -7558,21 +7660,21 @@ func schema_k8sio_api_apps_v1_DaemonSetSpec(ref common.ReferenceCallback) common "selector": { SchemaProps: spec.SchemaProps{ Description: "A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). The only allowed template.spec.restartPolicy value is \"Always\". More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, "updateStrategy": { SchemaProps: spec.SchemaProps{ Description: "An update strategy to replace existing DaemonSet pods with new pods.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.DaemonSetUpdateStrategy"), + Ref: ref(appsv1.DaemonSetUpdateStrategy{}.OpenAPIModelName()), }, }, "minReadySeconds": { @@ -7594,7 +7696,7 @@ func schema_k8sio_api_apps_v1_DaemonSetSpec(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.DaemonSetUpdateStrategy", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + appsv1.DaemonSetUpdateStrategy{}.OpenAPIModelName(), corev1.PodTemplateSpec{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -7690,7 +7792,7 @@ func schema_k8sio_api_apps_v1_DaemonSetStatus(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.DaemonSetCondition"), + Ref: ref(appsv1.DaemonSetCondition{}.OpenAPIModelName()), }, }, }, @@ -7701,7 +7803,7 @@ func schema_k8sio_api_apps_v1_DaemonSetStatus(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.DaemonSetCondition"}, + appsv1.DaemonSetCondition{}.OpenAPIModelName()}, } } @@ -7723,14 +7825,14 @@ func schema_k8sio_api_apps_v1_DaemonSetUpdateStrategy(ref common.ReferenceCallba "rollingUpdate": { SchemaProps: spec.SchemaProps{ Description: "Rolling update config params. Present only if type = \"RollingUpdate\".", - Ref: ref("k8s.io/api/apps/v1.RollingUpdateDaemonSet"), + Ref: ref(appsv1.RollingUpdateDaemonSet{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.RollingUpdateDaemonSet"}, + appsv1.RollingUpdateDaemonSet{}.OpenAPIModelName()}, } } @@ -7759,28 +7861,28 @@ func schema_k8sio_api_apps_v1_Deployment(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the Deployment.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.DeploymentSpec"), + Ref: ref(appsv1.DeploymentSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the Deployment.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.DeploymentStatus"), + Ref: ref(appsv1.DeploymentStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.DeploymentSpec", "k8s.io/api/apps/v1.DeploymentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + appsv1.DeploymentSpec{}.OpenAPIModelName(), appsv1.DeploymentStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -7810,13 +7912,13 @@ func schema_k8sio_api_apps_v1_DeploymentCondition(ref common.ReferenceCallback) "lastUpdateTime": { SchemaProps: spec.SchemaProps{ Description: "The last time this condition was updated.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -7838,7 +7940,7 @@ func schema_k8sio_api_apps_v1_DeploymentCondition(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -7867,7 +7969,7 @@ func schema_k8sio_api_apps_v1_DeploymentList(ref common.ReferenceCallback) commo SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -7878,7 +7980,7 @@ func schema_k8sio_api_apps_v1_DeploymentList(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.Deployment"), + Ref: ref(appsv1.Deployment{}.OpenAPIModelName()), }, }, }, @@ -7889,7 +7991,7 @@ func schema_k8sio_api_apps_v1_DeploymentList(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.Deployment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + appsv1.Deployment{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -7910,14 +8012,14 @@ func schema_k8sio_api_apps_v1_DeploymentSpec(ref common.ReferenceCallback) commo "selector": { SchemaProps: spec.SchemaProps{ Description: "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "Template describes the pods that will be created. The only allowed template.spec.restartPolicy value is \"Always\".", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, "strategy": { @@ -7929,7 +8031,7 @@ func schema_k8sio_api_apps_v1_DeploymentSpec(ref common.ReferenceCallback) commo SchemaProps: spec.SchemaProps{ Description: "The deployment strategy to use to replace existing pods with new ones.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.DeploymentStrategy"), + Ref: ref(appsv1.DeploymentStrategy{}.OpenAPIModelName()), }, }, "minReadySeconds": { @@ -7965,7 +8067,7 @@ func schema_k8sio_api_apps_v1_DeploymentSpec(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.DeploymentStrategy", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + appsv1.DeploymentStrategy{}.OpenAPIModelName(), corev1.PodTemplateSpec{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -8043,7 +8145,7 @@ func schema_k8sio_api_apps_v1_DeploymentStatus(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.DeploymentCondition"), + Ref: ref(appsv1.DeploymentCondition{}.OpenAPIModelName()), }, }, }, @@ -8060,7 +8162,7 @@ func schema_k8sio_api_apps_v1_DeploymentStatus(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.DeploymentCondition"}, + appsv1.DeploymentCondition{}.OpenAPIModelName()}, } } @@ -8082,14 +8184,14 @@ func schema_k8sio_api_apps_v1_DeploymentStrategy(ref common.ReferenceCallback) c "rollingUpdate": { SchemaProps: spec.SchemaProps{ Description: "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", - Ref: ref("k8s.io/api/apps/v1.RollingUpdateDeployment"), + Ref: ref(appsv1.RollingUpdateDeployment{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.RollingUpdateDeployment"}, + appsv1.RollingUpdateDeployment{}.OpenAPIModelName()}, } } @@ -8118,28 +8220,28 @@ func schema_k8sio_api_apps_v1_ReplicaSet(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.ReplicaSetSpec"), + Ref: ref(appsv1.ReplicaSetSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.ReplicaSetStatus"), + Ref: ref(appsv1.ReplicaSetStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.ReplicaSetSpec", "k8s.io/api/apps/v1.ReplicaSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + appsv1.ReplicaSetSpec{}.OpenAPIModelName(), appsv1.ReplicaSetStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -8169,7 +8271,7 @@ func schema_k8sio_api_apps_v1_ReplicaSetCondition(ref common.ReferenceCallback) "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "The last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -8191,7 +8293,7 @@ func schema_k8sio_api_apps_v1_ReplicaSetCondition(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -8220,7 +8322,7 @@ func schema_k8sio_api_apps_v1_ReplicaSetList(ref common.ReferenceCallback) commo SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -8231,7 +8333,7 @@ func schema_k8sio_api_apps_v1_ReplicaSetList(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.ReplicaSet"), + Ref: ref(appsv1.ReplicaSet{}.OpenAPIModelName()), }, }, }, @@ -8242,7 +8344,7 @@ func schema_k8sio_api_apps_v1_ReplicaSetList(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.ReplicaSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + appsv1.ReplicaSet{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -8270,14 +8372,14 @@ func schema_k8sio_api_apps_v1_ReplicaSetSpec(ref common.ReferenceCallback) commo "selector": { SchemaProps: spec.SchemaProps{ Description: "Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, }, @@ -8285,7 +8387,7 @@ func schema_k8sio_api_apps_v1_ReplicaSetSpec(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + corev1.PodTemplateSpec{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -8357,7 +8459,7 @@ func schema_k8sio_api_apps_v1_ReplicaSetStatus(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.ReplicaSetCondition"), + Ref: ref(appsv1.ReplicaSetCondition{}.OpenAPIModelName()), }, }, }, @@ -8368,7 +8470,7 @@ func schema_k8sio_api_apps_v1_ReplicaSetStatus(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.ReplicaSetCondition"}, + appsv1.ReplicaSetCondition{}.OpenAPIModelName()}, } } @@ -8382,20 +8484,20 @@ func schema_k8sio_api_apps_v1_RollingUpdateDaemonSet(ref common.ReferenceCallbac "maxUnavailable": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "maxSurge": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediately created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -8409,20 +8511,20 @@ func schema_k8sio_api_apps_v1_RollingUpdateDeployment(ref common.ReferenceCallba "maxUnavailable": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "maxSurge": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -8443,14 +8545,14 @@ func schema_k8sio_api_apps_v1_RollingUpdateStatefulSetStrategy(ref common.Refere "maxUnavailable": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0. Defaults to 1. This field is alpha-level and is only honored by servers that enable the MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it will be counted towards MaxUnavailable.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -8479,28 +8581,28 @@ func schema_k8sio_api_apps_v1_StatefulSet(ref common.ReferenceCallback) common.O SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the desired identities of pods in this set.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.StatefulSetSpec"), + Ref: ref(appsv1.StatefulSetSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.StatefulSetStatus"), + Ref: ref(appsv1.StatefulSetStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.StatefulSetSpec", "k8s.io/api/apps/v1.StatefulSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + appsv1.StatefulSetSpec{}.OpenAPIModelName(), appsv1.StatefulSetStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -8530,7 +8632,7 @@ func schema_k8sio_api_apps_v1_StatefulSetCondition(ref common.ReferenceCallback) "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -8552,7 +8654,7 @@ func schema_k8sio_api_apps_v1_StatefulSetCondition(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -8581,7 +8683,7 @@ func schema_k8sio_api_apps_v1_StatefulSetList(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -8592,7 +8694,7 @@ func schema_k8sio_api_apps_v1_StatefulSetList(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.StatefulSet"), + Ref: ref(appsv1.StatefulSet{}.OpenAPIModelName()), }, }, }, @@ -8603,7 +8705,7 @@ func schema_k8sio_api_apps_v1_StatefulSetList(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.StatefulSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + appsv1.StatefulSet{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -8672,14 +8774,14 @@ func schema_k8sio_api_apps_v1_StatefulSetSpec(ref common.ReferenceCallback) comm "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. Each pod will be named with the format -. For example, a pod in a StatefulSet named \"web\" with index number \"3\" would be named \"web-3\". The only allowed template.spec.restartPolicy value is \"Always\".", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, "volumeClaimTemplates": { @@ -8695,7 +8797,7 @@ func schema_k8sio_api_apps_v1_StatefulSetSpec(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), + Ref: ref(corev1.PersistentVolumeClaim{}.OpenAPIModelName()), }, }, }, @@ -8721,7 +8823,7 @@ func schema_k8sio_api_apps_v1_StatefulSetSpec(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.StatefulSetUpdateStrategy"), + Ref: ref(appsv1.StatefulSetUpdateStrategy{}.OpenAPIModelName()), }, }, "revisionHistoryLimit": { @@ -8741,13 +8843,13 @@ func schema_k8sio_api_apps_v1_StatefulSetSpec(ref common.ReferenceCallback) comm "persistentVolumeClaimRetentionPolicy": { SchemaProps: spec.SchemaProps{ Description: "persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down.", - Ref: ref("k8s.io/api/apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy"), + Ref: ref(appsv1.StatefulSetPersistentVolumeClaimRetentionPolicy{}.OpenAPIModelName()), }, }, "ordinals": { SchemaProps: spec.SchemaProps{ Description: "ordinals controls the numbering of replica indices in a StatefulSet. The default ordinals behavior assigns a \"0\" index to the first replica and increments the index by one for each additional replica requested.", - Ref: ref("k8s.io/api/apps/v1.StatefulSetOrdinals"), + Ref: ref(appsv1.StatefulSetOrdinals{}.OpenAPIModelName()), }, }, }, @@ -8755,7 +8857,7 @@ func schema_k8sio_api_apps_v1_StatefulSetSpec(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.StatefulSetOrdinals", "k8s.io/api/apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy", "k8s.io/api/apps/v1.StatefulSetUpdateStrategy", "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + appsv1.StatefulSetOrdinals{}.OpenAPIModelName(), appsv1.StatefulSetPersistentVolumeClaimRetentionPolicy{}.OpenAPIModelName(), appsv1.StatefulSetUpdateStrategy{}.OpenAPIModelName(), corev1.PersistentVolumeClaim{}.OpenAPIModelName(), corev1.PodTemplateSpec{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -8841,7 +8943,7 @@ func schema_k8sio_api_apps_v1_StatefulSetStatus(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1.StatefulSetCondition"), + Ref: ref(appsv1.StatefulSetCondition{}.OpenAPIModelName()), }, }, }, @@ -8860,7 +8962,7 @@ func schema_k8sio_api_apps_v1_StatefulSetStatus(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.StatefulSetCondition"}, + appsv1.StatefulSetCondition{}.OpenAPIModelName()}, } } @@ -8882,14 +8984,14 @@ func schema_k8sio_api_apps_v1_StatefulSetUpdateStrategy(ref common.ReferenceCall "rollingUpdate": { SchemaProps: spec.SchemaProps{ Description: "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.", - Ref: ref("k8s.io/api/apps/v1.RollingUpdateStatefulSetStrategy"), + Ref: ref(appsv1.RollingUpdateStatefulSetStrategy{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.RollingUpdateStatefulSetStrategy"}, + appsv1.RollingUpdateStatefulSetStrategy{}.OpenAPIModelName()}, } } @@ -8918,13 +9020,13 @@ func schema_k8sio_api_apps_v1beta1_ControllerRevision(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "data": { SchemaProps: spec.SchemaProps{ Description: "data is the serialized representation of the state.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, "revision": { @@ -8940,7 +9042,7 @@ func schema_k8sio_api_apps_v1beta1_ControllerRevision(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.ObjectMeta{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -8969,7 +9071,7 @@ func schema_k8sio_api_apps_v1beta1_ControllerRevisionList(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -8980,7 +9082,7 @@ func schema_k8sio_api_apps_v1beta1_ControllerRevisionList(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta1.ControllerRevision"), + Ref: ref(appsv1beta1.ControllerRevision{}.OpenAPIModelName()), }, }, }, @@ -8991,7 +9093,7 @@ func schema_k8sio_api_apps_v1beta1_ControllerRevisionList(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta1.ControllerRevision", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + appsv1beta1.ControllerRevision{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -9020,28 +9122,28 @@ func schema_k8sio_api_apps_v1beta1_Deployment(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the Deployment.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta1.DeploymentSpec"), + Ref: ref(appsv1beta1.DeploymentSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the Deployment.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta1.DeploymentStatus"), + Ref: ref(appsv1beta1.DeploymentStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta1.DeploymentSpec", "k8s.io/api/apps/v1beta1.DeploymentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + appsv1beta1.DeploymentSpec{}.OpenAPIModelName(), appsv1beta1.DeploymentStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -9071,13 +9173,13 @@ func schema_k8sio_api_apps_v1beta1_DeploymentCondition(ref common.ReferenceCallb "lastUpdateTime": { SchemaProps: spec.SchemaProps{ Description: "The last time this condition was updated.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -9099,7 +9201,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentCondition(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -9128,7 +9230,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentList(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -9139,7 +9241,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta1.Deployment"), + Ref: ref(appsv1beta1.Deployment{}.OpenAPIModelName()), }, }, }, @@ -9150,7 +9252,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta1.Deployment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + appsv1beta1.Deployment{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -9203,7 +9305,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentRollback(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "The config of this deployment rollback.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta1.RollbackConfig"), + Ref: ref(appsv1beta1.RollbackConfig{}.OpenAPIModelName()), }, }, }, @@ -9211,7 +9313,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentRollback(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta1.RollbackConfig"}, + appsv1beta1.RollbackConfig{}.OpenAPIModelName()}, } } @@ -9232,14 +9334,14 @@ func schema_k8sio_api_apps_v1beta1_DeploymentSpec(ref common.ReferenceCallback) "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is the label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "Template describes the pods that will be created. The only allowed template.spec.restartPolicy value is \"Always\".", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, "strategy": { @@ -9251,7 +9353,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentSpec(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "The deployment strategy to use to replace existing pods with new ones.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta1.DeploymentStrategy"), + Ref: ref(appsv1beta1.DeploymentStrategy{}.OpenAPIModelName()), }, }, "minReadySeconds": { @@ -9278,7 +9380,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentSpec(ref common.ReferenceCallback) "rollbackTo": { SchemaProps: spec.SchemaProps{ Description: "DEPRECATED. rollbackTo is the config this deployment is rolling back to. Will be cleared after rollback is done.", - Ref: ref("k8s.io/api/apps/v1beta1.RollbackConfig"), + Ref: ref(appsv1beta1.RollbackConfig{}.OpenAPIModelName()), }, }, "progressDeadlineSeconds": { @@ -9293,7 +9395,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentSpec(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta1.DeploymentStrategy", "k8s.io/api/apps/v1beta1.RollbackConfig", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + appsv1beta1.DeploymentStrategy{}.OpenAPIModelName(), appsv1beta1.RollbackConfig{}.OpenAPIModelName(), corev1.PodTemplateSpec{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -9371,7 +9473,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentStatus(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta1.DeploymentCondition"), + Ref: ref(appsv1beta1.DeploymentCondition{}.OpenAPIModelName()), }, }, }, @@ -9388,7 +9490,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentStatus(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta1.DeploymentCondition"}, + appsv1beta1.DeploymentCondition{}.OpenAPIModelName()}, } } @@ -9409,14 +9511,14 @@ func schema_k8sio_api_apps_v1beta1_DeploymentStrategy(ref common.ReferenceCallba "rollingUpdate": { SchemaProps: spec.SchemaProps{ Description: "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", - Ref: ref("k8s.io/api/apps/v1beta1.RollingUpdateDeployment"), + Ref: ref(appsv1beta1.RollingUpdateDeployment{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta1.RollingUpdateDeployment"}, + appsv1beta1.RollingUpdateDeployment{}.OpenAPIModelName()}, } } @@ -9450,20 +9552,20 @@ func schema_k8sio_api_apps_v1beta1_RollingUpdateDeployment(ref common.ReferenceC "maxUnavailable": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "maxSurge": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -9484,14 +9586,14 @@ func schema_k8sio_api_apps_v1beta1_RollingUpdateStatefulSetStrategy(ref common.R "maxUnavailable": { SchemaProps: spec.SchemaProps{ Description: "maxUnavailable is the maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0. Defaults to 1. This field is alpha-level and is only honored by servers that enable the MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it will be counted towards MaxUnavailable.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -9520,28 +9622,28 @@ func schema_k8sio_api_apps_v1beta1_Scale(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta1.ScaleSpec"), + Ref: ref(appsv1beta1.ScaleSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status defines current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta1.ScaleStatus"), + Ref: ref(appsv1beta1.ScaleStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta1.ScaleSpec", "k8s.io/api/apps/v1beta1.ScaleStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + appsv1beta1.ScaleSpec{}.OpenAPIModelName(), appsv1beta1.ScaleStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -9635,28 +9737,28 @@ func schema_k8sio_api_apps_v1beta1_StatefulSet(ref common.ReferenceCallback) com "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the desired identities of pods in this set.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetSpec"), + Ref: ref(appsv1beta1.StatefulSetSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetStatus"), + Ref: ref(appsv1beta1.StatefulSetStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta1.StatefulSetSpec", "k8s.io/api/apps/v1beta1.StatefulSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + appsv1beta1.StatefulSetSpec{}.OpenAPIModelName(), appsv1beta1.StatefulSetStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -9686,7 +9788,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetCondition(ref common.ReferenceCall "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -9708,7 +9810,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetCondition(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -9736,7 +9838,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetList(ref common.ReferenceCallback) "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -9746,7 +9848,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta1.StatefulSet"), + Ref: ref(appsv1beta1.StatefulSet{}.OpenAPIModelName()), }, }, }, @@ -9757,7 +9859,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta1.StatefulSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + appsv1beta1.StatefulSet{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -9826,14 +9928,14 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref common.ReferenceCallback) "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. Each pod will be named with the format -. For example, a pod in a StatefulSet named \"web\" with index number \"3\" would be named \"web-3\".", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, "volumeClaimTemplates": { @@ -9849,7 +9951,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), + Ref: ref(corev1.PersistentVolumeClaim{}.OpenAPIModelName()), }, }, }, @@ -9874,7 +9976,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy"), + Ref: ref(appsv1beta1.StatefulSetUpdateStrategy{}.OpenAPIModelName()), }, }, "revisionHistoryLimit": { @@ -9893,14 +9995,14 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref common.ReferenceCallback) }, "persistentVolumeClaimRetentionPolicy": { SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.", - Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy"), + Description: "persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down.", + Ref: ref(appsv1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy{}.OpenAPIModelName()), }, }, "ordinals": { SchemaProps: spec.SchemaProps{ Description: "ordinals controls the numbering of replica indices in a StatefulSet. The default ordinals behavior assigns a \"0\" index to the first replica and increments the index by one for each additional replica requested.", - Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetOrdinals"), + Ref: ref(appsv1beta1.StatefulSetOrdinals{}.OpenAPIModelName()), }, }, }, @@ -9908,7 +10010,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta1.StatefulSetOrdinals", "k8s.io/api/apps/v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy", "k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy", "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + appsv1beta1.StatefulSetOrdinals{}.OpenAPIModelName(), appsv1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy{}.OpenAPIModelName(), appsv1beta1.StatefulSetUpdateStrategy{}.OpenAPIModelName(), corev1.PersistentVolumeClaim{}.OpenAPIModelName(), corev1.PodTemplateSpec{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -9994,7 +10096,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetStatus(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetCondition"), + Ref: ref(appsv1beta1.StatefulSetCondition{}.OpenAPIModelName()), }, }, }, @@ -10013,7 +10115,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetStatus(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta1.StatefulSetCondition"}, + appsv1beta1.StatefulSetCondition{}.OpenAPIModelName()}, } } @@ -10034,14 +10136,14 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetUpdateStrategy(ref common.Referenc "rollingUpdate": { SchemaProps: spec.SchemaProps{ Description: "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.", - Ref: ref("k8s.io/api/apps/v1beta1.RollingUpdateStatefulSetStrategy"), + Ref: ref(appsv1beta1.RollingUpdateStatefulSetStrategy{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta1.RollingUpdateStatefulSetStrategy"}, + appsv1beta1.RollingUpdateStatefulSetStrategy{}.OpenAPIModelName()}, } } @@ -10070,13 +10172,13 @@ func schema_k8sio_api_apps_v1beta2_ControllerRevision(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "data": { SchemaProps: spec.SchemaProps{ Description: "Data is the serialized representation of the state.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, "revision": { @@ -10092,7 +10194,7 @@ func schema_k8sio_api_apps_v1beta2_ControllerRevision(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.ObjectMeta{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -10121,7 +10223,7 @@ func schema_k8sio_api_apps_v1beta2_ControllerRevisionList(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -10132,7 +10234,7 @@ func schema_k8sio_api_apps_v1beta2_ControllerRevisionList(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.ControllerRevision"), + Ref: ref(v1beta2.ControllerRevision{}.OpenAPIModelName()), }, }, }, @@ -10143,7 +10245,7 @@ func schema_k8sio_api_apps_v1beta2_ControllerRevisionList(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.ControllerRevision", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1beta2.ControllerRevision{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -10172,28 +10274,28 @@ func schema_k8sio_api_apps_v1beta2_DaemonSet(ref common.ReferenceCallback) commo SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetSpec"), + Ref: ref(v1beta2.DaemonSetSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetStatus"), + Ref: ref(v1beta2.DaemonSetStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.DaemonSetSpec", "k8s.io/api/apps/v1beta2.DaemonSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1beta2.DaemonSetSpec{}.OpenAPIModelName(), v1beta2.DaemonSetStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -10223,7 +10325,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetCondition(ref common.ReferenceCallba "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -10245,7 +10347,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetCondition(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -10274,7 +10376,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetList(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -10285,7 +10387,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetList(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.DaemonSet"), + Ref: ref(v1beta2.DaemonSet{}.OpenAPIModelName()), }, }, }, @@ -10296,7 +10398,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetList(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.DaemonSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1beta2.DaemonSet{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -10310,21 +10412,21 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetSpec(ref common.ReferenceCallback) c "selector": { SchemaProps: spec.SchemaProps{ Description: "A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). The only allowed template.spec.restartPolicy value is \"Always\". More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, "updateStrategy": { SchemaProps: spec.SchemaProps{ Description: "An update strategy to replace existing DaemonSet pods with new pods.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetUpdateStrategy"), + Ref: ref(v1beta2.DaemonSetUpdateStrategy{}.OpenAPIModelName()), }, }, "minReadySeconds": { @@ -10346,7 +10448,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetSpec(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.DaemonSetUpdateStrategy", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + v1beta2.DaemonSetUpdateStrategy{}.OpenAPIModelName(), corev1.PodTemplateSpec{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -10442,7 +10544,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetCondition"), + Ref: ref(v1beta2.DaemonSetCondition{}.OpenAPIModelName()), }, }, }, @@ -10453,7 +10555,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.DaemonSetCondition"}, + v1beta2.DaemonSetCondition{}.OpenAPIModelName()}, } } @@ -10474,14 +10576,14 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetUpdateStrategy(ref common.ReferenceC "rollingUpdate": { SchemaProps: spec.SchemaProps{ Description: "Rolling update config params. Present only if type = \"RollingUpdate\".", - Ref: ref("k8s.io/api/apps/v1beta2.RollingUpdateDaemonSet"), + Ref: ref(v1beta2.RollingUpdateDaemonSet{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.RollingUpdateDaemonSet"}, + v1beta2.RollingUpdateDaemonSet{}.OpenAPIModelName()}, } } @@ -10510,28 +10612,28 @@ func schema_k8sio_api_apps_v1beta2_Deployment(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the Deployment.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.DeploymentSpec"), + Ref: ref(v1beta2.DeploymentSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the Deployment.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.DeploymentStatus"), + Ref: ref(v1beta2.DeploymentStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.DeploymentSpec", "k8s.io/api/apps/v1beta2.DeploymentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1beta2.DeploymentSpec{}.OpenAPIModelName(), v1beta2.DeploymentStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -10561,13 +10663,13 @@ func schema_k8sio_api_apps_v1beta2_DeploymentCondition(ref common.ReferenceCallb "lastUpdateTime": { SchemaProps: spec.SchemaProps{ Description: "The last time this condition was updated.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -10589,7 +10691,7 @@ func schema_k8sio_api_apps_v1beta2_DeploymentCondition(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -10618,7 +10720,7 @@ func schema_k8sio_api_apps_v1beta2_DeploymentList(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -10629,7 +10731,7 @@ func schema_k8sio_api_apps_v1beta2_DeploymentList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.Deployment"), + Ref: ref(v1beta2.Deployment{}.OpenAPIModelName()), }, }, }, @@ -10640,7 +10742,7 @@ func schema_k8sio_api_apps_v1beta2_DeploymentList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.Deployment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1beta2.Deployment{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -10661,14 +10763,14 @@ func schema_k8sio_api_apps_v1beta2_DeploymentSpec(ref common.ReferenceCallback) "selector": { SchemaProps: spec.SchemaProps{ Description: "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "Template describes the pods that will be created. The only allowed template.spec.restartPolicy value is \"Always\".", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, "strategy": { @@ -10680,7 +10782,7 @@ func schema_k8sio_api_apps_v1beta2_DeploymentSpec(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "The deployment strategy to use to replace existing pods with new ones.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.DeploymentStrategy"), + Ref: ref(v1beta2.DeploymentStrategy{}.OpenAPIModelName()), }, }, "minReadySeconds": { @@ -10716,7 +10818,7 @@ func schema_k8sio_api_apps_v1beta2_DeploymentSpec(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.DeploymentStrategy", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + v1beta2.DeploymentStrategy{}.OpenAPIModelName(), corev1.PodTemplateSpec{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -10794,7 +10896,7 @@ func schema_k8sio_api_apps_v1beta2_DeploymentStatus(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.DeploymentCondition"), + Ref: ref(v1beta2.DeploymentCondition{}.OpenAPIModelName()), }, }, }, @@ -10811,7 +10913,7 @@ func schema_k8sio_api_apps_v1beta2_DeploymentStatus(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.DeploymentCondition"}, + v1beta2.DeploymentCondition{}.OpenAPIModelName()}, } } @@ -10832,14 +10934,14 @@ func schema_k8sio_api_apps_v1beta2_DeploymentStrategy(ref common.ReferenceCallba "rollingUpdate": { SchemaProps: spec.SchemaProps{ Description: "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", - Ref: ref("k8s.io/api/apps/v1beta2.RollingUpdateDeployment"), + Ref: ref(v1beta2.RollingUpdateDeployment{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.RollingUpdateDeployment"}, + v1beta2.RollingUpdateDeployment{}.OpenAPIModelName()}, } } @@ -10868,28 +10970,28 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSet(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSetSpec"), + Ref: ref(v1beta2.ReplicaSetSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSetStatus"), + Ref: ref(v1beta2.ReplicaSetStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.ReplicaSetSpec", "k8s.io/api/apps/v1beta2.ReplicaSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1beta2.ReplicaSetSpec{}.OpenAPIModelName(), v1beta2.ReplicaSetStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -10919,7 +11021,7 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetCondition(ref common.ReferenceCallb "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "The last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -10941,7 +11043,7 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetCondition(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -10970,7 +11072,7 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetList(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -10981,7 +11083,7 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSet"), + Ref: ref(v1beta2.ReplicaSet{}.OpenAPIModelName()), }, }, }, @@ -10992,7 +11094,7 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.ReplicaSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1beta2.ReplicaSet{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -11020,14 +11122,14 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetSpec(ref common.ReferenceCallback) "selector": { SchemaProps: spec.SchemaProps{ Description: "Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, }, @@ -11035,7 +11137,7 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetSpec(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + corev1.PodTemplateSpec{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -11107,7 +11209,7 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetStatus(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSetCondition"), + Ref: ref(v1beta2.ReplicaSetCondition{}.OpenAPIModelName()), }, }, }, @@ -11118,7 +11220,7 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetStatus(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.ReplicaSetCondition"}, + v1beta2.ReplicaSetCondition{}.OpenAPIModelName()}, } } @@ -11132,20 +11234,20 @@ func schema_k8sio_api_apps_v1beta2_RollingUpdateDaemonSet(ref common.ReferenceCa "maxUnavailable": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "maxSurge": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediately created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -11159,20 +11261,20 @@ func schema_k8sio_api_apps_v1beta2_RollingUpdateDeployment(ref common.ReferenceC "maxUnavailable": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "maxSurge": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -11193,14 +11295,14 @@ func schema_k8sio_api_apps_v1beta2_RollingUpdateStatefulSetStrategy(ref common.R "maxUnavailable": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0. Defaults to 1. This field is alpha-level and is only honored by servers that enable the MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it will be counted towards MaxUnavailable.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -11229,28 +11331,28 @@ func schema_k8sio_api_apps_v1beta2_Scale(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.ScaleSpec"), + Ref: ref(v1beta2.ScaleSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.ScaleStatus"), + Ref: ref(v1beta2.ScaleStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.ScaleSpec", "k8s.io/api/apps/v1beta2.ScaleStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1beta2.ScaleSpec{}.OpenAPIModelName(), v1beta2.ScaleStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -11349,28 +11451,28 @@ func schema_k8sio_api_apps_v1beta2_StatefulSet(ref common.ReferenceCallback) com "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the desired identities of pods in this set.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetSpec"), + Ref: ref(v1beta2.StatefulSetSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetStatus"), + Ref: ref(v1beta2.StatefulSetStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.StatefulSetSpec", "k8s.io/api/apps/v1beta2.StatefulSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1beta2.StatefulSetSpec{}.OpenAPIModelName(), v1beta2.StatefulSetStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -11400,7 +11502,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetCondition(ref common.ReferenceCall "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -11422,7 +11524,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetCondition(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -11450,7 +11552,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetList(ref common.ReferenceCallback) "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -11460,7 +11562,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.StatefulSet"), + Ref: ref(v1beta2.StatefulSet{}.OpenAPIModelName()), }, }, }, @@ -11471,7 +11573,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.StatefulSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1beta2.StatefulSet{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -11540,14 +11642,14 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref common.ReferenceCallback) "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. Each pod will be named with the format -. For example, a pod in a StatefulSet named \"web\" with index number \"3\" would be named \"web-3\". The only allowed template.spec.restartPolicy value is \"Always\".", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, "volumeClaimTemplates": { @@ -11563,7 +11665,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), + Ref: ref(corev1.PersistentVolumeClaim{}.OpenAPIModelName()), }, }, }, @@ -11588,7 +11690,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy"), + Ref: ref(v1beta2.StatefulSetUpdateStrategy{}.OpenAPIModelName()), }, }, "revisionHistoryLimit": { @@ -11607,14 +11709,14 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref common.ReferenceCallback) }, "persistentVolumeClaimRetentionPolicy": { SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.", - Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy"), + Description: "persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down.", + Ref: ref(v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy{}.OpenAPIModelName()), }, }, "ordinals": { SchemaProps: spec.SchemaProps{ Description: "ordinals controls the numbering of replica indices in a StatefulSet. The default ordinals behavior assigns a \"0\" index to the first replica and increments the index by one for each additional replica requested.", - Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetOrdinals"), + Ref: ref(v1beta2.StatefulSetOrdinals{}.OpenAPIModelName()), }, }, }, @@ -11622,7 +11724,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.StatefulSetOrdinals", "k8s.io/api/apps/v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy", "k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy", "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + v1beta2.StatefulSetOrdinals{}.OpenAPIModelName(), v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy{}.OpenAPIModelName(), v1beta2.StatefulSetUpdateStrategy{}.OpenAPIModelName(), corev1.PersistentVolumeClaim{}.OpenAPIModelName(), corev1.PodTemplateSpec{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -11708,7 +11810,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetStatus(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetCondition"), + Ref: ref(v1beta2.StatefulSetCondition{}.OpenAPIModelName()), }, }, }, @@ -11727,7 +11829,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetStatus(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.StatefulSetCondition"}, + v1beta2.StatefulSetCondition{}.OpenAPIModelName()}, } } @@ -11748,14 +11850,14 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetUpdateStrategy(ref common.Referenc "rollingUpdate": { SchemaProps: spec.SchemaProps{ Description: "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.", - Ref: ref("k8s.io/api/apps/v1beta2.RollingUpdateStatefulSetStrategy"), + Ref: ref(v1beta2.RollingUpdateStatefulSetStrategy{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.RollingUpdateStatefulSetStrategy"}, + v1beta2.RollingUpdateStatefulSetStrategy{}.OpenAPIModelName()}, } } @@ -11825,21 +11927,21 @@ func schema_k8sio_api_authentication_v1_SelfSubjectReview(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server with the user attributes.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1.SelfSubjectReviewStatus"), + Ref: ref(authenticationv1.SelfSubjectReviewStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1.SelfSubjectReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + authenticationv1.SelfSubjectReviewStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -11854,14 +11956,14 @@ func schema_k8sio_api_authentication_v1_SelfSubjectReviewStatus(ref common.Refer SchemaProps: spec.SchemaProps{ Description: "User attributes of the user making this request.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + Ref: ref(authenticationv1.UserInfo{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1.UserInfo"}, + authenticationv1.UserInfo{}.OpenAPIModelName()}, } } @@ -11890,21 +11992,21 @@ func schema_k8sio_api_authentication_v1_TokenRequest(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1.TokenRequestSpec"), + Ref: ref(authenticationv1.TokenRequestSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the token can be authenticated.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1.TokenRequestStatus"), + Ref: ref(authenticationv1.TokenRequestStatus{}.OpenAPIModelName()), }, }, }, @@ -11912,7 +12014,7 @@ func schema_k8sio_api_authentication_v1_TokenRequest(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1.TokenRequestSpec", "k8s.io/api/authentication/v1.TokenRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + authenticationv1.TokenRequestSpec{}.OpenAPIModelName(), authenticationv1.TokenRequestStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -11953,7 +12055,7 @@ func schema_k8sio_api_authentication_v1_TokenRequestSpec(ref common.ReferenceCal "boundObjectRef": { SchemaProps: spec.SchemaProps{ Description: "BoundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound object exists. NOTE: The API server's TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation.", - Ref: ref("k8s.io/api/authentication/v1.BoundObjectReference"), + Ref: ref(authenticationv1.BoundObjectReference{}.OpenAPIModelName()), }, }, }, @@ -11961,7 +12063,7 @@ func schema_k8sio_api_authentication_v1_TokenRequestSpec(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1.BoundObjectReference"}, + authenticationv1.BoundObjectReference{}.OpenAPIModelName()}, } } @@ -11983,7 +12085,7 @@ func schema_k8sio_api_authentication_v1_TokenRequestStatus(ref common.ReferenceC "expirationTimestamp": { SchemaProps: spec.SchemaProps{ Description: "ExpirationTimestamp is the time of expiration of the returned token.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, @@ -11991,7 +12093,7 @@ func schema_k8sio_api_authentication_v1_TokenRequestStatus(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -12020,21 +12122,21 @@ func schema_k8sio_api_authentication_v1_TokenReview(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1.TokenReviewSpec"), + Ref: ref(authenticationv1.TokenReviewSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the request can be authenticated.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1.TokenReviewStatus"), + Ref: ref(authenticationv1.TokenReviewStatus{}.OpenAPIModelName()), }, }, }, @@ -12042,7 +12144,7 @@ func schema_k8sio_api_authentication_v1_TokenReview(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1.TokenReviewSpec", "k8s.io/api/authentication/v1.TokenReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + authenticationv1.TokenReviewSpec{}.OpenAPIModelName(), authenticationv1.TokenReviewStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -12104,7 +12206,7 @@ func schema_k8sio_api_authentication_v1_TokenReviewStatus(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "User is the UserInfo associated with the provided token.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + Ref: ref(authenticationv1.UserInfo{}.OpenAPIModelName()), }, }, "audiences": { @@ -12138,7 +12240,7 @@ func schema_k8sio_api_authentication_v1_TokenReviewStatus(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1.UserInfo"}, + authenticationv1.UserInfo{}.OpenAPIModelName()}, } } @@ -12237,21 +12339,21 @@ func schema_k8sio_api_authentication_v1alpha1_SelfSubjectReview(ref common.Refer SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server with the user attributes.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1alpha1.SelfSubjectReviewStatus"), + Ref: ref(authenticationv1alpha1.SelfSubjectReviewStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1alpha1.SelfSubjectReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + authenticationv1alpha1.SelfSubjectReviewStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -12266,14 +12368,14 @@ func schema_k8sio_api_authentication_v1alpha1_SelfSubjectReviewStatus(ref common SchemaProps: spec.SchemaProps{ Description: "User attributes of the user making this request.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + Ref: ref(authenticationv1.UserInfo{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1.UserInfo"}, + authenticationv1.UserInfo{}.OpenAPIModelName()}, } } @@ -12302,21 +12404,21 @@ func schema_k8sio_api_authentication_v1beta1_SelfSubjectReview(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server with the user attributes.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1beta1.SelfSubjectReviewStatus"), + Ref: ref(authenticationv1beta1.SelfSubjectReviewStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1beta1.SelfSubjectReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + authenticationv1beta1.SelfSubjectReviewStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -12331,14 +12433,14 @@ func schema_k8sio_api_authentication_v1beta1_SelfSubjectReviewStatus(ref common. SchemaProps: spec.SchemaProps{ Description: "User attributes of the user making this request.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + Ref: ref(authenticationv1.UserInfo{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1.UserInfo"}, + authenticationv1.UserInfo{}.OpenAPIModelName()}, } } @@ -12367,21 +12469,21 @@ func schema_k8sio_api_authentication_v1beta1_TokenReview(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1beta1.TokenReviewSpec"), + Ref: ref(authenticationv1beta1.TokenReviewSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the token can be authenticated.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1beta1.TokenReviewStatus"), + Ref: ref(authenticationv1beta1.TokenReviewStatus{}.OpenAPIModelName()), }, }, }, @@ -12389,7 +12491,7 @@ func schema_k8sio_api_authentication_v1beta1_TokenReview(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1beta1.TokenReviewSpec", "k8s.io/api/authentication/v1beta1.TokenReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + authenticationv1beta1.TokenReviewSpec{}.OpenAPIModelName(), authenticationv1beta1.TokenReviewStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -12451,7 +12553,7 @@ func schema_k8sio_api_authentication_v1beta1_TokenReviewStatus(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "User is the UserInfo associated with the provided token.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1beta1.UserInfo"), + Ref: ref(authenticationv1beta1.UserInfo{}.OpenAPIModelName()), }, }, "audiences": { @@ -12485,7 +12587,7 @@ func schema_k8sio_api_authentication_v1beta1_TokenReviewStatus(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1beta1.UserInfo"}, + authenticationv1beta1.UserInfo{}.OpenAPIModelName()}, } } @@ -12586,7 +12688,7 @@ func schema_k8sio_api_authorization_v1_FieldSelectorAttributes(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.FieldSelectorRequirement"), + Ref: ref(metav1.FieldSelectorRequirement{}.OpenAPIModelName()), }, }, }, @@ -12596,7 +12698,7 @@ func schema_k8sio_api_authorization_v1_FieldSelectorAttributes(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldSelectorRequirement"}, + metav1.FieldSelectorRequirement{}.OpenAPIModelName()}, } } @@ -12627,7 +12729,7 @@ func schema_k8sio_api_authorization_v1_LabelSelectorAttributes(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"), + Ref: ref(metav1.LabelSelectorRequirement{}.OpenAPIModelName()), }, }, }, @@ -12637,7 +12739,7 @@ func schema_k8sio_api_authorization_v1_LabelSelectorAttributes(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, + metav1.LabelSelectorRequirement{}.OpenAPIModelName()}, } } @@ -12666,21 +12768,21 @@ func schema_k8sio_api_authorization_v1_LocalSubjectAccessReview(ref common.Refer SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewSpec"), + Ref: ref(authorizationv1.SubjectAccessReviewSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the request is allowed or not", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewStatus"), + Ref: ref(authorizationv1.SubjectAccessReviewStatus{}.OpenAPIModelName()), }, }, }, @@ -12688,7 +12790,7 @@ func schema_k8sio_api_authorization_v1_LocalSubjectAccessReview(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1.SubjectAccessReviewSpec", "k8s.io/api/authorization/v1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + authorizationv1.SubjectAccessReviewSpec{}.OpenAPIModelName(), authorizationv1.SubjectAccessReviewStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -12832,20 +12934,20 @@ func schema_k8sio_api_authorization_v1_ResourceAttributes(ref common.ReferenceCa "fieldSelector": { SchemaProps: spec.SchemaProps{ Description: "fieldSelector describes the limitation on access based on field. It can only limit access, not broaden it.", - Ref: ref("k8s.io/api/authorization/v1.FieldSelectorAttributes"), + Ref: ref(authorizationv1.FieldSelectorAttributes{}.OpenAPIModelName()), }, }, "labelSelector": { SchemaProps: spec.SchemaProps{ Description: "labelSelector describes the limitation on access based on labels. It can only limit access, not broaden it.", - Ref: ref("k8s.io/api/authorization/v1.LabelSelectorAttributes"), + Ref: ref(authorizationv1.LabelSelectorAttributes{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1.FieldSelectorAttributes", "k8s.io/api/authorization/v1.LabelSelectorAttributes"}, + authorizationv1.FieldSelectorAttributes{}.OpenAPIModelName(), authorizationv1.LabelSelectorAttributes{}.OpenAPIModelName()}, } } @@ -12968,21 +13070,21 @@ func schema_k8sio_api_authorization_v1_SelfSubjectAccessReview(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated. user and groups must be empty", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1.SelfSubjectAccessReviewSpec"), + Ref: ref(authorizationv1.SelfSubjectAccessReviewSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the request is allowed or not", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewStatus"), + Ref: ref(authorizationv1.SubjectAccessReviewStatus{}.OpenAPIModelName()), }, }, }, @@ -12990,7 +13092,7 @@ func schema_k8sio_api_authorization_v1_SelfSubjectAccessReview(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1.SelfSubjectAccessReviewSpec", "k8s.io/api/authorization/v1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + authorizationv1.SelfSubjectAccessReviewSpec{}.OpenAPIModelName(), authorizationv1.SubjectAccessReviewStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -13004,20 +13106,20 @@ func schema_k8sio_api_authorization_v1_SelfSubjectAccessReviewSpec(ref common.Re "resourceAttributes": { SchemaProps: spec.SchemaProps{ Description: "ResourceAuthorizationAttributes describes information for a resource access request", - Ref: ref("k8s.io/api/authorization/v1.ResourceAttributes"), + Ref: ref(authorizationv1.ResourceAttributes{}.OpenAPIModelName()), }, }, "nonResourceAttributes": { SchemaProps: spec.SchemaProps{ Description: "NonResourceAttributes describes information for a non-resource access request", - Ref: ref("k8s.io/api/authorization/v1.NonResourceAttributes"), + Ref: ref(authorizationv1.NonResourceAttributes{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1.NonResourceAttributes", "k8s.io/api/authorization/v1.ResourceAttributes"}, + authorizationv1.NonResourceAttributes{}.OpenAPIModelName(), authorizationv1.ResourceAttributes{}.OpenAPIModelName()}, } } @@ -13046,21 +13148,21 @@ func schema_k8sio_api_authorization_v1_SelfSubjectRulesReview(ref common.Referen SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1.SelfSubjectRulesReviewSpec"), + Ref: ref(authorizationv1.SelfSubjectRulesReviewSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates the set of actions a user can perform.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1.SubjectRulesReviewStatus"), + Ref: ref(authorizationv1.SubjectRulesReviewStatus{}.OpenAPIModelName()), }, }, }, @@ -13068,7 +13170,7 @@ func schema_k8sio_api_authorization_v1_SelfSubjectRulesReview(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1.SelfSubjectRulesReviewSpec", "k8s.io/api/authorization/v1.SubjectRulesReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + authorizationv1.SelfSubjectRulesReviewSpec{}.OpenAPIModelName(), authorizationv1.SubjectRulesReviewStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -13117,21 +13219,21 @@ func schema_k8sio_api_authorization_v1_SubjectAccessReview(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewSpec"), + Ref: ref(authorizationv1.SubjectAccessReviewSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the request is allowed or not", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewStatus"), + Ref: ref(authorizationv1.SubjectAccessReviewStatus{}.OpenAPIModelName()), }, }, }, @@ -13139,7 +13241,7 @@ func schema_k8sio_api_authorization_v1_SubjectAccessReview(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1.SubjectAccessReviewSpec", "k8s.io/api/authorization/v1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + authorizationv1.SubjectAccessReviewSpec{}.OpenAPIModelName(), authorizationv1.SubjectAccessReviewStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -13153,13 +13255,13 @@ func schema_k8sio_api_authorization_v1_SubjectAccessReviewSpec(ref common.Refere "resourceAttributes": { SchemaProps: spec.SchemaProps{ Description: "ResourceAuthorizationAttributes describes information for a resource access request", - Ref: ref("k8s.io/api/authorization/v1.ResourceAttributes"), + Ref: ref(authorizationv1.ResourceAttributes{}.OpenAPIModelName()), }, }, "nonResourceAttributes": { SchemaProps: spec.SchemaProps{ Description: "NonResourceAttributes describes information for a non-resource access request", - Ref: ref("k8s.io/api/authorization/v1.NonResourceAttributes"), + Ref: ref(authorizationv1.NonResourceAttributes{}.OpenAPIModelName()), }, }, "user": { @@ -13223,7 +13325,7 @@ func schema_k8sio_api_authorization_v1_SubjectAccessReviewSpec(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1.NonResourceAttributes", "k8s.io/api/authorization/v1.ResourceAttributes"}, + authorizationv1.NonResourceAttributes{}.OpenAPIModelName(), authorizationv1.ResourceAttributes{}.OpenAPIModelName()}, } } @@ -13290,7 +13392,7 @@ func schema_k8sio_api_authorization_v1_SubjectRulesReviewStatus(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1.ResourceRule"), + Ref: ref(authorizationv1.ResourceRule{}.OpenAPIModelName()), }, }, }, @@ -13309,7 +13411,7 @@ func schema_k8sio_api_authorization_v1_SubjectRulesReviewStatus(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1.NonResourceRule"), + Ref: ref(authorizationv1.NonResourceRule{}.OpenAPIModelName()), }, }, }, @@ -13335,7 +13437,7 @@ func schema_k8sio_api_authorization_v1_SubjectRulesReviewStatus(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1.NonResourceRule", "k8s.io/api/authorization/v1.ResourceRule"}, + authorizationv1.NonResourceRule{}.OpenAPIModelName(), authorizationv1.ResourceRule{}.OpenAPIModelName()}, } } @@ -13364,21 +13466,21 @@ func schema_k8sio_api_authorization_v1beta1_LocalSubjectAccessReview(ref common. SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec"), + Ref: ref(authorizationv1beta1.SubjectAccessReviewSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the request is allowed or not", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus"), + Ref: ref(authorizationv1beta1.SubjectAccessReviewStatus{}.OpenAPIModelName()), }, }, }, @@ -13386,7 +13488,7 @@ func schema_k8sio_api_authorization_v1beta1_LocalSubjectAccessReview(ref common. }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec", "k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + authorizationv1beta1.SubjectAccessReviewSpec{}.OpenAPIModelName(), authorizationv1beta1.SubjectAccessReviewStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -13530,20 +13632,20 @@ func schema_k8sio_api_authorization_v1beta1_ResourceAttributes(ref common.Refere "fieldSelector": { SchemaProps: spec.SchemaProps{ Description: "fieldSelector describes the limitation on access based on field. It can only limit access, not broaden it.", - Ref: ref("k8s.io/api/authorization/v1.FieldSelectorAttributes"), + Ref: ref(authorizationv1.FieldSelectorAttributes{}.OpenAPIModelName()), }, }, "labelSelector": { SchemaProps: spec.SchemaProps{ Description: "labelSelector describes the limitation on access based on labels. It can only limit access, not broaden it.", - Ref: ref("k8s.io/api/authorization/v1.LabelSelectorAttributes"), + Ref: ref(authorizationv1.LabelSelectorAttributes{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1.FieldSelectorAttributes", "k8s.io/api/authorization/v1.LabelSelectorAttributes"}, + authorizationv1.FieldSelectorAttributes{}.OpenAPIModelName(), authorizationv1.LabelSelectorAttributes{}.OpenAPIModelName()}, } } @@ -13666,21 +13768,21 @@ func schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReview(ref common.R SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated. user and groups must be empty", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1beta1.SelfSubjectAccessReviewSpec"), + Ref: ref(authorizationv1beta1.SelfSubjectAccessReviewSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the request is allowed or not", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus"), + Ref: ref(authorizationv1beta1.SubjectAccessReviewStatus{}.OpenAPIModelName()), }, }, }, @@ -13688,7 +13790,7 @@ func schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReview(ref common.R }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1beta1.SelfSubjectAccessReviewSpec", "k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + authorizationv1beta1.SelfSubjectAccessReviewSpec{}.OpenAPIModelName(), authorizationv1beta1.SubjectAccessReviewStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -13702,20 +13804,20 @@ func schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReviewSpec(ref comm "resourceAttributes": { SchemaProps: spec.SchemaProps{ Description: "ResourceAuthorizationAttributes describes information for a resource access request", - Ref: ref("k8s.io/api/authorization/v1beta1.ResourceAttributes"), + Ref: ref(authorizationv1beta1.ResourceAttributes{}.OpenAPIModelName()), }, }, "nonResourceAttributes": { SchemaProps: spec.SchemaProps{ Description: "NonResourceAttributes describes information for a non-resource access request", - Ref: ref("k8s.io/api/authorization/v1beta1.NonResourceAttributes"), + Ref: ref(authorizationv1beta1.NonResourceAttributes{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1beta1.NonResourceAttributes", "k8s.io/api/authorization/v1beta1.ResourceAttributes"}, + authorizationv1beta1.NonResourceAttributes{}.OpenAPIModelName(), authorizationv1beta1.ResourceAttributes{}.OpenAPIModelName()}, } } @@ -13744,21 +13846,21 @@ func schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReview(ref common.Re SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1beta1.SelfSubjectRulesReviewSpec"), + Ref: ref(authorizationv1beta1.SelfSubjectRulesReviewSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates the set of actions a user can perform.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1beta1.SubjectRulesReviewStatus"), + Ref: ref(authorizationv1beta1.SubjectRulesReviewStatus{}.OpenAPIModelName()), }, }, }, @@ -13766,7 +13868,7 @@ func schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReview(ref common.Re }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1beta1.SelfSubjectRulesReviewSpec", "k8s.io/api/authorization/v1beta1.SubjectRulesReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + authorizationv1beta1.SelfSubjectRulesReviewSpec{}.OpenAPIModelName(), authorizationv1beta1.SubjectRulesReviewStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -13815,21 +13917,21 @@ func schema_k8sio_api_authorization_v1beta1_SubjectAccessReview(ref common.Refer SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec"), + Ref: ref(authorizationv1beta1.SubjectAccessReviewSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the request is allowed or not", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus"), + Ref: ref(authorizationv1beta1.SubjectAccessReviewStatus{}.OpenAPIModelName()), }, }, }, @@ -13837,7 +13939,7 @@ func schema_k8sio_api_authorization_v1beta1_SubjectAccessReview(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec", "k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + authorizationv1beta1.SubjectAccessReviewSpec{}.OpenAPIModelName(), authorizationv1beta1.SubjectAccessReviewStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -13851,13 +13953,13 @@ func schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewSpec(ref common.R "resourceAttributes": { SchemaProps: spec.SchemaProps{ Description: "ResourceAuthorizationAttributes describes information for a resource access request", - Ref: ref("k8s.io/api/authorization/v1beta1.ResourceAttributes"), + Ref: ref(authorizationv1beta1.ResourceAttributes{}.OpenAPIModelName()), }, }, "nonResourceAttributes": { SchemaProps: spec.SchemaProps{ Description: "NonResourceAttributes describes information for a non-resource access request", - Ref: ref("k8s.io/api/authorization/v1beta1.NonResourceAttributes"), + Ref: ref(authorizationv1beta1.NonResourceAttributes{}.OpenAPIModelName()), }, }, "user": { @@ -13921,7 +14023,7 @@ func schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewSpec(ref common.R }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1beta1.NonResourceAttributes", "k8s.io/api/authorization/v1beta1.ResourceAttributes"}, + authorizationv1beta1.NonResourceAttributes{}.OpenAPIModelName(), authorizationv1beta1.ResourceAttributes{}.OpenAPIModelName()}, } } @@ -13988,7 +14090,7 @@ func schema_k8sio_api_authorization_v1beta1_SubjectRulesReviewStatus(ref common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1beta1.ResourceRule"), + Ref: ref(authorizationv1beta1.ResourceRule{}.OpenAPIModelName()), }, }, }, @@ -14007,7 +14109,7 @@ func schema_k8sio_api_authorization_v1beta1_SubjectRulesReviewStatus(ref common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authorization/v1beta1.NonResourceRule"), + Ref: ref(authorizationv1beta1.NonResourceRule{}.OpenAPIModelName()), }, }, }, @@ -14033,7 +14135,7 @@ func schema_k8sio_api_authorization_v1beta1_SubjectRulesReviewStatus(ref common. }, }, Dependencies: []string{ - "k8s.io/api/authorization/v1beta1.NonResourceRule", "k8s.io/api/authorization/v1beta1.ResourceRule"}, + authorizationv1beta1.NonResourceRule{}.OpenAPIModelName(), authorizationv1beta1.ResourceRule{}.OpenAPIModelName()}, } } @@ -14062,7 +14164,7 @@ func schema_k8sio_api_autoscaling_v1_ContainerResourceMetricSource(ref common.Re "targetAverageValue": { SchemaProps: spec.SchemaProps{ Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "container": { @@ -14078,7 +14180,7 @@ func schema_k8sio_api_autoscaling_v1_ContainerResourceMetricSource(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -14107,7 +14209,7 @@ func schema_k8sio_api_autoscaling_v1_ContainerResourceMetricStatus(ref common.Re "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "container": { @@ -14123,7 +14225,7 @@ func schema_k8sio_api_autoscaling_v1_ContainerResourceMetricStatus(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -14187,19 +14289,19 @@ func schema_k8sio_api_autoscaling_v1_ExternalMetricSource(ref common.ReferenceCa "metricSelector": { SchemaProps: spec.SchemaProps{ Description: "metricSelector is used to identify a specific time series within a given metric.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "targetValue": { SchemaProps: spec.SchemaProps{ Description: "targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "targetAverageValue": { SchemaProps: spec.SchemaProps{ Description: "targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -14207,7 +14309,7 @@ func schema_k8sio_api_autoscaling_v1_ExternalMetricSource(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -14229,19 +14331,19 @@ func schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref common.ReferenceCa "metricSelector": { SchemaProps: spec.SchemaProps{ Description: "metricSelector is used to identify a specific time series within a given metric.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "currentValue": { SchemaProps: spec.SchemaProps{ Description: "currentValue is the current value of the metric (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of metric averaged over autoscaled pods.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -14249,7 +14351,7 @@ func schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -14278,28 +14380,28 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec"), + Ref: ref(autoscalingv1.HorizontalPodAutoscalerSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the current information about the autoscaler.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus"), + Ref: ref(autoscalingv1.HorizontalPodAutoscalerStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec", "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + autoscalingv1.HorizontalPodAutoscalerSpec{}.OpenAPIModelName(), autoscalingv1.HorizontalPodAutoscalerStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -14329,7 +14431,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref common "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the last time the condition transitioned from one status to another", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -14351,7 +14453,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref common }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -14380,7 +14482,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -14391,7 +14493,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler"), + Ref: ref(autoscalingv1.HorizontalPodAutoscaler{}.OpenAPIModelName()), }, }, }, @@ -14402,7 +14504,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + autoscalingv1.HorizontalPodAutoscaler{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -14417,7 +14519,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.CrossVersionObjectReference"), + Ref: ref(autoscalingv1.CrossVersionObjectReference{}.OpenAPIModelName()), }, }, "minReplicas": { @@ -14447,7 +14549,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.CrossVersionObjectReference"}, + autoscalingv1.CrossVersionObjectReference{}.OpenAPIModelName()}, } } @@ -14468,7 +14570,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref common.Re "lastScaleTime": { SchemaProps: spec.SchemaProps{ Description: "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "currentReplicas": { @@ -14499,7 +14601,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -14522,31 +14624,31 @@ func schema_k8sio_api_autoscaling_v1_MetricSpec(ref common.ReferenceCallback) co "object": { SchemaProps: spec.SchemaProps{ Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v1.ObjectMetricSource"), + Ref: ref(autoscalingv1.ObjectMetricSource{}.OpenAPIModelName()), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v1.PodsMetricSource"), + Ref: ref(autoscalingv1.PodsMetricSource{}.OpenAPIModelName()), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v1.ResourceMetricSource"), + Ref: ref(autoscalingv1.ResourceMetricSource{}.OpenAPIModelName()), }, }, "containerResource": { SchemaProps: spec.SchemaProps{ Description: "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v1.ContainerResourceMetricSource"), + Ref: ref(autoscalingv1.ContainerResourceMetricSource{}.OpenAPIModelName()), }, }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", - Ref: ref("k8s.io/api/autoscaling/v1.ExternalMetricSource"), + Ref: ref(autoscalingv1.ExternalMetricSource{}.OpenAPIModelName()), }, }, }, @@ -14554,7 +14656,7 @@ func schema_k8sio_api_autoscaling_v1_MetricSpec(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.ContainerResourceMetricSource", "k8s.io/api/autoscaling/v1.ExternalMetricSource", "k8s.io/api/autoscaling/v1.ObjectMetricSource", "k8s.io/api/autoscaling/v1.PodsMetricSource", "k8s.io/api/autoscaling/v1.ResourceMetricSource"}, + autoscalingv1.ContainerResourceMetricSource{}.OpenAPIModelName(), autoscalingv1.ExternalMetricSource{}.OpenAPIModelName(), autoscalingv1.ObjectMetricSource{}.OpenAPIModelName(), autoscalingv1.PodsMetricSource{}.OpenAPIModelName(), autoscalingv1.ResourceMetricSource{}.OpenAPIModelName()}, } } @@ -14577,31 +14679,31 @@ func schema_k8sio_api_autoscaling_v1_MetricStatus(ref common.ReferenceCallback) "object": { SchemaProps: spec.SchemaProps{ Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v1.ObjectMetricStatus"), + Ref: ref(autoscalingv1.ObjectMetricStatus{}.OpenAPIModelName()), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v1.PodsMetricStatus"), + Ref: ref(autoscalingv1.PodsMetricStatus{}.OpenAPIModelName()), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v1.ResourceMetricStatus"), + Ref: ref(autoscalingv1.ResourceMetricStatus{}.OpenAPIModelName()), }, }, "containerResource": { SchemaProps: spec.SchemaProps{ Description: "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus"), + Ref: ref(autoscalingv1.ContainerResourceMetricStatus{}.OpenAPIModelName()), }, }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", - Ref: ref("k8s.io/api/autoscaling/v1.ExternalMetricStatus"), + Ref: ref(autoscalingv1.ExternalMetricStatus{}.OpenAPIModelName()), }, }, }, @@ -14609,7 +14711,7 @@ func schema_k8sio_api_autoscaling_v1_MetricStatus(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus", "k8s.io/api/autoscaling/v1.ExternalMetricStatus", "k8s.io/api/autoscaling/v1.ObjectMetricStatus", "k8s.io/api/autoscaling/v1.PodsMetricStatus", "k8s.io/api/autoscaling/v1.ResourceMetricStatus"}, + autoscalingv1.ContainerResourceMetricStatus{}.OpenAPIModelName(), autoscalingv1.ExternalMetricStatus{}.OpenAPIModelName(), autoscalingv1.ObjectMetricStatus{}.OpenAPIModelName(), autoscalingv1.PodsMetricStatus{}.OpenAPIModelName(), autoscalingv1.ResourceMetricStatus{}.OpenAPIModelName()}, } } @@ -14624,7 +14726,7 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "target is the described Kubernetes object.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.CrossVersionObjectReference"), + Ref: ref(autoscalingv1.CrossVersionObjectReference{}.OpenAPIModelName()), }, }, "metricName": { @@ -14638,19 +14740,19 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref common.ReferenceCall "targetValue": { SchemaProps: spec.SchemaProps{ Description: "targetValue is the target value of the metric (as a quantity).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric. When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "averageValue": { SchemaProps: spec.SchemaProps{ Description: "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -14658,7 +14760,7 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + autoscalingv1.CrossVersionObjectReference{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -14673,7 +14775,7 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "target is the described Kubernetes object.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.CrossVersionObjectReference"), + Ref: ref(autoscalingv1.CrossVersionObjectReference{}.OpenAPIModelName()), }, }, "metricName": { @@ -14687,19 +14789,19 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref common.ReferenceCall "currentValue": { SchemaProps: spec.SchemaProps{ Description: "currentValue is the current value of the metric (as a quantity).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "averageValue": { SchemaProps: spec.SchemaProps{ Description: "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -14707,7 +14809,7 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + autoscalingv1.CrossVersionObjectReference{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -14729,13 +14831,13 @@ func schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref common.ReferenceCallba "targetAverageValue": { SchemaProps: spec.SchemaProps{ Description: "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, @@ -14743,7 +14845,7 @@ func schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -14765,13 +14867,13 @@ func schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref common.ReferenceCallba "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, @@ -14779,7 +14881,7 @@ func schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -14808,7 +14910,7 @@ func schema_k8sio_api_autoscaling_v1_ResourceMetricSource(ref common.ReferenceCa "targetAverageValue": { SchemaProps: spec.SchemaProps{ Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -14816,7 +14918,7 @@ func schema_k8sio_api_autoscaling_v1_ResourceMetricSource(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -14845,7 +14947,7 @@ func schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref common.ReferenceCa "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -14853,7 +14955,7 @@ func schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -14882,28 +14984,28 @@ func schema_k8sio_api_autoscaling_v1_Scale(ref common.ReferenceCallback) common. SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.ScaleSpec"), + Ref: ref(autoscalingv1.ScaleSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.ScaleStatus"), + Ref: ref(autoscalingv1.ScaleStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.ScaleSpec", "k8s.io/api/autoscaling/v1.ScaleStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + autoscalingv1.ScaleSpec{}.OpenAPIModelName(), autoscalingv1.ScaleStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -14976,7 +15078,7 @@ func schema_k8sio_api_autoscaling_v2_ContainerResourceMetricSource(ref common.Re SchemaProps: spec.SchemaProps{ Description: "target specifies the target value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricTarget"), + Ref: ref(autoscalingv2.MetricTarget{}.OpenAPIModelName()), }, }, "container": { @@ -14992,7 +15094,7 @@ func schema_k8sio_api_autoscaling_v2_ContainerResourceMetricSource(ref common.Re }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.MetricTarget"}, + autoscalingv2.MetricTarget{}.OpenAPIModelName()}, } } @@ -15015,7 +15117,7 @@ func schema_k8sio_api_autoscaling_v2_ContainerResourceMetricStatus(ref common.Re SchemaProps: spec.SchemaProps{ Description: "current contains the current value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricValueStatus"), + Ref: ref(autoscalingv2.MetricValueStatus{}.OpenAPIModelName()), }, }, "container": { @@ -15031,7 +15133,7 @@ func schema_k8sio_api_autoscaling_v2_ContainerResourceMetricStatus(ref common.Re }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.MetricValueStatus"}, + autoscalingv2.MetricValueStatus{}.OpenAPIModelName()}, } } @@ -15083,14 +15185,14 @@ func schema_k8sio_api_autoscaling_v2_ExternalMetricSource(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricIdentifier"), + Ref: ref(autoscalingv2.MetricIdentifier{}.OpenAPIModelName()), }, }, "target": { SchemaProps: spec.SchemaProps{ Description: "target specifies the target value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricTarget"), + Ref: ref(autoscalingv2.MetricTarget{}.OpenAPIModelName()), }, }, }, @@ -15098,7 +15200,7 @@ func schema_k8sio_api_autoscaling_v2_ExternalMetricSource(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.MetricIdentifier", "k8s.io/api/autoscaling/v2.MetricTarget"}, + autoscalingv2.MetricIdentifier{}.OpenAPIModelName(), autoscalingv2.MetricTarget{}.OpenAPIModelName()}, } } @@ -15113,14 +15215,14 @@ func schema_k8sio_api_autoscaling_v2_ExternalMetricStatus(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricIdentifier"), + Ref: ref(autoscalingv2.MetricIdentifier{}.OpenAPIModelName()), }, }, "current": { SchemaProps: spec.SchemaProps{ Description: "current contains the current value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricValueStatus"), + Ref: ref(autoscalingv2.MetricValueStatus{}.OpenAPIModelName()), }, }, }, @@ -15128,7 +15230,7 @@ func schema_k8sio_api_autoscaling_v2_ExternalMetricStatus(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.MetricIdentifier", "k8s.io/api/autoscaling/v2.MetricValueStatus"}, + autoscalingv2.MetricIdentifier{}.OpenAPIModelName(), autoscalingv2.MetricValueStatus{}.OpenAPIModelName()}, } } @@ -15204,7 +15306,7 @@ func schema_k8sio_api_autoscaling_v2_HPAScalingRules(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.HPAScalingPolicy"), + Ref: ref(autoscalingv2.HPAScalingPolicy{}.OpenAPIModelName()), }, }, }, @@ -15213,14 +15315,14 @@ func schema_k8sio_api_autoscaling_v2_HPAScalingRules(ref common.ReferenceCallbac "tolerance": { SchemaProps: spec.SchemaProps{ Description: "tolerance is the tolerance on the ratio between the current and desired metric value under which no updates are made to the desired number of replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not set, the default cluster-wide tolerance is applied (by default 10%).\n\nFor example, if autoscaling is configured with a memory consumption target of 100Mi, and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be triggered when the actual consumption falls below 95Mi or exceeds 101Mi.\n\nThis is an alpha field and requires enabling the HPAConfigurableTolerance feature gate.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.HPAScalingPolicy", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + autoscalingv2.HPAScalingPolicy{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -15249,28 +15351,28 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscaler(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerSpec"), + Ref: ref(autoscalingv2.HorizontalPodAutoscalerSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the current information about the autoscaler.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerStatus"), + Ref: ref(autoscalingv2.HorizontalPodAutoscalerStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerSpec", "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + autoscalingv2.HorizontalPodAutoscalerSpec{}.OpenAPIModelName(), autoscalingv2.HorizontalPodAutoscalerStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -15284,20 +15386,20 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerBehavior(ref common. "scaleUp": { SchemaProps: spec.SchemaProps{ Description: "scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of:\n * increase no more than 4 pods per 60 seconds\n * double the number of pods per 60 seconds\nNo stabilization is used.", - Ref: ref("k8s.io/api/autoscaling/v2.HPAScalingRules"), + Ref: ref(autoscalingv2.HPAScalingRules{}.OpenAPIModelName()), }, }, "scaleDown": { SchemaProps: spec.SchemaProps{ Description: "scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).", - Ref: ref("k8s.io/api/autoscaling/v2.HPAScalingRules"), + Ref: ref(autoscalingv2.HPAScalingRules{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.HPAScalingRules"}, + autoscalingv2.HPAScalingRules{}.OpenAPIModelName()}, } } @@ -15327,7 +15429,7 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerCondition(ref common "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the last time the condition transitioned from one status to another", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -15349,7 +15451,7 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerCondition(ref common }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -15378,7 +15480,7 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerList(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -15389,7 +15491,7 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerList(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.HorizontalPodAutoscaler"), + Ref: ref(autoscalingv2.HorizontalPodAutoscaler{}.OpenAPIModelName()), }, }, }, @@ -15400,7 +15502,7 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerList(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.HorizontalPodAutoscaler", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + autoscalingv2.HorizontalPodAutoscaler{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -15415,7 +15517,7 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerSpec(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.CrossVersionObjectReference"), + Ref: ref(autoscalingv2.CrossVersionObjectReference{}.OpenAPIModelName()), }, }, "minReplicas": { @@ -15446,7 +15548,7 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerSpec(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricSpec"), + Ref: ref(autoscalingv2.MetricSpec{}.OpenAPIModelName()), }, }, }, @@ -15455,7 +15557,7 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerSpec(ref common.Refe "behavior": { SchemaProps: spec.SchemaProps{ Description: "behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used.", - Ref: ref("k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerBehavior"), + Ref: ref(autoscalingv2.HorizontalPodAutoscalerBehavior{}.OpenAPIModelName()), }, }, }, @@ -15463,7 +15565,7 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerSpec(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerBehavior", "k8s.io/api/autoscaling/v2.MetricSpec"}, + autoscalingv2.CrossVersionObjectReference{}.OpenAPIModelName(), autoscalingv2.HorizontalPodAutoscalerBehavior{}.OpenAPIModelName(), autoscalingv2.MetricSpec{}.OpenAPIModelName()}, } } @@ -15484,7 +15586,7 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerStatus(ref common.Re "lastScaleTime": { SchemaProps: spec.SchemaProps{ Description: "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "currentReplicas": { @@ -15515,7 +15617,7 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerStatus(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricStatus"), + Ref: ref(autoscalingv2.MetricStatus{}.OpenAPIModelName()), }, }, }, @@ -15539,7 +15641,7 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerStatus(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerCondition"), + Ref: ref(autoscalingv2.HorizontalPodAutoscalerCondition{}.OpenAPIModelName()), }, }, }, @@ -15550,7 +15652,7 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerStatus(ref common.Re }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerCondition", "k8s.io/api/autoscaling/v2.MetricStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + autoscalingv2.HorizontalPodAutoscalerCondition{}.OpenAPIModelName(), autoscalingv2.MetricStatus{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -15572,7 +15674,7 @@ func schema_k8sio_api_autoscaling_v2_MetricIdentifier(ref common.ReferenceCallba "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, @@ -15580,7 +15682,7 @@ func schema_k8sio_api_autoscaling_v2_MetricIdentifier(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -15602,31 +15704,31 @@ func schema_k8sio_api_autoscaling_v2_MetricSpec(ref common.ReferenceCallback) co "object": { SchemaProps: spec.SchemaProps{ Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v2.ObjectMetricSource"), + Ref: ref(autoscalingv2.ObjectMetricSource{}.OpenAPIModelName()), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v2.PodsMetricSource"), + Ref: ref(autoscalingv2.PodsMetricSource{}.OpenAPIModelName()), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2.ResourceMetricSource"), + Ref: ref(autoscalingv2.ResourceMetricSource{}.OpenAPIModelName()), }, }, "containerResource": { SchemaProps: spec.SchemaProps{ Description: "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2.ContainerResourceMetricSource"), + Ref: ref(autoscalingv2.ContainerResourceMetricSource{}.OpenAPIModelName()), }, }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", - Ref: ref("k8s.io/api/autoscaling/v2.ExternalMetricSource"), + Ref: ref(autoscalingv2.ExternalMetricSource{}.OpenAPIModelName()), }, }, }, @@ -15634,7 +15736,7 @@ func schema_k8sio_api_autoscaling_v2_MetricSpec(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.ContainerResourceMetricSource", "k8s.io/api/autoscaling/v2.ExternalMetricSource", "k8s.io/api/autoscaling/v2.ObjectMetricSource", "k8s.io/api/autoscaling/v2.PodsMetricSource", "k8s.io/api/autoscaling/v2.ResourceMetricSource"}, + autoscalingv2.ContainerResourceMetricSource{}.OpenAPIModelName(), autoscalingv2.ExternalMetricSource{}.OpenAPIModelName(), autoscalingv2.ObjectMetricSource{}.OpenAPIModelName(), autoscalingv2.PodsMetricSource{}.OpenAPIModelName(), autoscalingv2.ResourceMetricSource{}.OpenAPIModelName()}, } } @@ -15656,31 +15758,31 @@ func schema_k8sio_api_autoscaling_v2_MetricStatus(ref common.ReferenceCallback) "object": { SchemaProps: spec.SchemaProps{ Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v2.ObjectMetricStatus"), + Ref: ref(autoscalingv2.ObjectMetricStatus{}.OpenAPIModelName()), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v2.PodsMetricStatus"), + Ref: ref(autoscalingv2.PodsMetricStatus{}.OpenAPIModelName()), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2.ResourceMetricStatus"), + Ref: ref(autoscalingv2.ResourceMetricStatus{}.OpenAPIModelName()), }, }, "containerResource": { SchemaProps: spec.SchemaProps{ Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2.ContainerResourceMetricStatus"), + Ref: ref(autoscalingv2.ContainerResourceMetricStatus{}.OpenAPIModelName()), }, }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", - Ref: ref("k8s.io/api/autoscaling/v2.ExternalMetricStatus"), + Ref: ref(autoscalingv2.ExternalMetricStatus{}.OpenAPIModelName()), }, }, }, @@ -15688,7 +15790,7 @@ func schema_k8sio_api_autoscaling_v2_MetricStatus(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.ContainerResourceMetricStatus", "k8s.io/api/autoscaling/v2.ExternalMetricStatus", "k8s.io/api/autoscaling/v2.ObjectMetricStatus", "k8s.io/api/autoscaling/v2.PodsMetricStatus", "k8s.io/api/autoscaling/v2.ResourceMetricStatus"}, + autoscalingv2.ContainerResourceMetricStatus{}.OpenAPIModelName(), autoscalingv2.ExternalMetricStatus{}.OpenAPIModelName(), autoscalingv2.ObjectMetricStatus{}.OpenAPIModelName(), autoscalingv2.PodsMetricStatus{}.OpenAPIModelName(), autoscalingv2.ResourceMetricStatus{}.OpenAPIModelName()}, } } @@ -15710,13 +15812,13 @@ func schema_k8sio_api_autoscaling_v2_MetricTarget(ref common.ReferenceCallback) "value": { SchemaProps: spec.SchemaProps{ Description: "value is the target value of the metric (as a quantity).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "averageValue": { SchemaProps: spec.SchemaProps{ Description: "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "averageUtilization": { @@ -15731,7 +15833,7 @@ func schema_k8sio_api_autoscaling_v2_MetricTarget(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -15745,13 +15847,13 @@ func schema_k8sio_api_autoscaling_v2_MetricValueStatus(ref common.ReferenceCallb "value": { SchemaProps: spec.SchemaProps{ Description: "value is the current value of the metric (as a quantity).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "averageValue": { SchemaProps: spec.SchemaProps{ Description: "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "averageUtilization": { @@ -15765,7 +15867,7 @@ func schema_k8sio_api_autoscaling_v2_MetricValueStatus(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -15780,21 +15882,21 @@ func schema_k8sio_api_autoscaling_v2_ObjectMetricSource(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "describedObject specifies the descriptions of a object,such as kind,name apiVersion", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.CrossVersionObjectReference"), + Ref: ref(autoscalingv2.CrossVersionObjectReference{}.OpenAPIModelName()), }, }, "target": { SchemaProps: spec.SchemaProps{ Description: "target specifies the target value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricTarget"), + Ref: ref(autoscalingv2.MetricTarget{}.OpenAPIModelName()), }, }, "metric": { SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricIdentifier"), + Ref: ref(autoscalingv2.MetricIdentifier{}.OpenAPIModelName()), }, }, }, @@ -15802,7 +15904,7 @@ func schema_k8sio_api_autoscaling_v2_ObjectMetricSource(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2.MetricIdentifier", "k8s.io/api/autoscaling/v2.MetricTarget"}, + autoscalingv2.CrossVersionObjectReference{}.OpenAPIModelName(), autoscalingv2.MetricIdentifier{}.OpenAPIModelName(), autoscalingv2.MetricTarget{}.OpenAPIModelName()}, } } @@ -15817,21 +15919,21 @@ func schema_k8sio_api_autoscaling_v2_ObjectMetricStatus(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricIdentifier"), + Ref: ref(autoscalingv2.MetricIdentifier{}.OpenAPIModelName()), }, }, "current": { SchemaProps: spec.SchemaProps{ Description: "current contains the current value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricValueStatus"), + Ref: ref(autoscalingv2.MetricValueStatus{}.OpenAPIModelName()), }, }, "describedObject": { SchemaProps: spec.SchemaProps{ Description: "DescribedObject specifies the descriptions of a object,such as kind,name apiVersion", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.CrossVersionObjectReference"), + Ref: ref(autoscalingv2.CrossVersionObjectReference{}.OpenAPIModelName()), }, }, }, @@ -15839,7 +15941,7 @@ func schema_k8sio_api_autoscaling_v2_ObjectMetricStatus(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2.MetricIdentifier", "k8s.io/api/autoscaling/v2.MetricValueStatus"}, + autoscalingv2.CrossVersionObjectReference{}.OpenAPIModelName(), autoscalingv2.MetricIdentifier{}.OpenAPIModelName(), autoscalingv2.MetricValueStatus{}.OpenAPIModelName()}, } } @@ -15854,14 +15956,14 @@ func schema_k8sio_api_autoscaling_v2_PodsMetricSource(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricIdentifier"), + Ref: ref(autoscalingv2.MetricIdentifier{}.OpenAPIModelName()), }, }, "target": { SchemaProps: spec.SchemaProps{ Description: "target specifies the target value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricTarget"), + Ref: ref(autoscalingv2.MetricTarget{}.OpenAPIModelName()), }, }, }, @@ -15869,7 +15971,7 @@ func schema_k8sio_api_autoscaling_v2_PodsMetricSource(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.MetricIdentifier", "k8s.io/api/autoscaling/v2.MetricTarget"}, + autoscalingv2.MetricIdentifier{}.OpenAPIModelName(), autoscalingv2.MetricTarget{}.OpenAPIModelName()}, } } @@ -15884,14 +15986,14 @@ func schema_k8sio_api_autoscaling_v2_PodsMetricStatus(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricIdentifier"), + Ref: ref(autoscalingv2.MetricIdentifier{}.OpenAPIModelName()), }, }, "current": { SchemaProps: spec.SchemaProps{ Description: "current contains the current value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricValueStatus"), + Ref: ref(autoscalingv2.MetricValueStatus{}.OpenAPIModelName()), }, }, }, @@ -15899,7 +16001,7 @@ func schema_k8sio_api_autoscaling_v2_PodsMetricStatus(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.MetricIdentifier", "k8s.io/api/autoscaling/v2.MetricValueStatus"}, + autoscalingv2.MetricIdentifier{}.OpenAPIModelName(), autoscalingv2.MetricValueStatus{}.OpenAPIModelName()}, } } @@ -15922,7 +16024,7 @@ func schema_k8sio_api_autoscaling_v2_ResourceMetricSource(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "target specifies the target value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricTarget"), + Ref: ref(autoscalingv2.MetricTarget{}.OpenAPIModelName()), }, }, }, @@ -15930,7 +16032,7 @@ func schema_k8sio_api_autoscaling_v2_ResourceMetricSource(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.MetricTarget"}, + autoscalingv2.MetricTarget{}.OpenAPIModelName()}, } } @@ -15953,7 +16055,7 @@ func schema_k8sio_api_autoscaling_v2_ResourceMetricStatus(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "current contains the current value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2.MetricValueStatus"), + Ref: ref(autoscalingv2.MetricValueStatus{}.OpenAPIModelName()), }, }, }, @@ -15961,7 +16063,7 @@ func schema_k8sio_api_autoscaling_v2_ResourceMetricStatus(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2.MetricValueStatus"}, + autoscalingv2.MetricValueStatus{}.OpenAPIModelName()}, } } @@ -15990,7 +16092,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricSource(ref comm "targetAverageValue": { SchemaProps: spec.SchemaProps{ Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "container": { @@ -16006,7 +16108,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricSource(ref comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -16035,7 +16137,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricStatus(ref comm "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "container": { @@ -16051,7 +16153,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricStatus(ref comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -16110,19 +16212,19 @@ func schema_k8sio_api_autoscaling_v2beta1_ExternalMetricSource(ref common.Refere "metricSelector": { SchemaProps: spec.SchemaProps{ Description: "metricSelector is used to identify a specific time series within a given metric.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "targetValue": { SchemaProps: spec.SchemaProps{ Description: "targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "targetAverageValue": { SchemaProps: spec.SchemaProps{ Description: "targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -16130,7 +16232,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ExternalMetricSource(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -16152,19 +16254,19 @@ func schema_k8sio_api_autoscaling_v2beta1_ExternalMetricStatus(ref common.Refere "metricSelector": { SchemaProps: spec.SchemaProps{ Description: "metricSelector is used to identify a specific time series within a given metric.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "currentValue": { SchemaProps: spec.SchemaProps{ Description: "currentValue is the current value of the metric (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of metric averaged over autoscaled pods.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -16172,7 +16274,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ExternalMetricStatus(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -16201,28 +16303,28 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscaler(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec"), + Ref: ref(autoscalingv2beta1.HorizontalPodAutoscalerSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the current information about the autoscaler.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus"), + Ref: ref(autoscalingv2beta1.HorizontalPodAutoscalerStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec", "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + autoscalingv2beta1.HorizontalPodAutoscalerSpec{}.OpenAPIModelName(), autoscalingv2beta1.HorizontalPodAutoscalerStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -16252,7 +16354,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref c "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the last time the condition transitioned from one status to another", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -16274,7 +16376,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref c }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -16303,7 +16405,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref common SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -16314,7 +16416,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler"), + Ref: ref(autoscalingv2beta1.HorizontalPodAutoscaler{}.OpenAPIModelName()), }, }, }, @@ -16325,7 +16427,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref common }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + autoscalingv2beta1.HorizontalPodAutoscaler{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -16340,7 +16442,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref common SchemaProps: spec.SchemaProps{ Description: "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), + Ref: ref(autoscalingv2beta1.CrossVersionObjectReference{}.OpenAPIModelName()), }, }, "minReplicas": { @@ -16371,7 +16473,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.MetricSpec"), + Ref: ref(autoscalingv2beta1.MetricSpec{}.OpenAPIModelName()), }, }, }, @@ -16382,7 +16484,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref common }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta1.MetricSpec"}, + autoscalingv2beta1.CrossVersionObjectReference{}.OpenAPIModelName(), autoscalingv2beta1.MetricSpec{}.OpenAPIModelName()}, } } @@ -16403,7 +16505,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref comm "lastScaleTime": { SchemaProps: spec.SchemaProps{ Description: "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "currentReplicas": { @@ -16435,7 +16537,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.MetricStatus"), + Ref: ref(autoscalingv2beta1.MetricStatus{}.OpenAPIModelName()), }, }, }, @@ -16454,7 +16556,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition"), + Ref: ref(autoscalingv2beta1.HorizontalPodAutoscalerCondition{}.OpenAPIModelName()), }, }, }, @@ -16465,7 +16567,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref comm }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition", "k8s.io/api/autoscaling/v2beta1.MetricStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + autoscalingv2beta1.HorizontalPodAutoscalerCondition{}.OpenAPIModelName(), autoscalingv2beta1.MetricStatus{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -16487,31 +16589,31 @@ func schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref common.ReferenceCallbac "object": { SchemaProps: spec.SchemaProps{ Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ObjectMetricSource"), + Ref: ref(autoscalingv2beta1.ObjectMetricSource{}.OpenAPIModelName()), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.PodsMetricSource"), + Ref: ref(autoscalingv2beta1.PodsMetricSource{}.OpenAPIModelName()), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ResourceMetricSource"), + Ref: ref(autoscalingv2beta1.ResourceMetricSource{}.OpenAPIModelName()), }, }, "containerResource": { SchemaProps: spec.SchemaProps{ Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricSource"), + Ref: ref(autoscalingv2beta1.ContainerResourceMetricSource{}.OpenAPIModelName()), }, }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ExternalMetricSource"), + Ref: ref(autoscalingv2beta1.ExternalMetricSource{}.OpenAPIModelName()), }, }, }, @@ -16519,7 +16621,7 @@ func schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricSource", "k8s.io/api/autoscaling/v2beta1.ExternalMetricSource", "k8s.io/api/autoscaling/v2beta1.ObjectMetricSource", "k8s.io/api/autoscaling/v2beta1.PodsMetricSource", "k8s.io/api/autoscaling/v2beta1.ResourceMetricSource"}, + autoscalingv2beta1.ContainerResourceMetricSource{}.OpenAPIModelName(), autoscalingv2beta1.ExternalMetricSource{}.OpenAPIModelName(), autoscalingv2beta1.ObjectMetricSource{}.OpenAPIModelName(), autoscalingv2beta1.PodsMetricSource{}.OpenAPIModelName(), autoscalingv2beta1.ResourceMetricSource{}.OpenAPIModelName()}, } } @@ -16541,31 +16643,31 @@ func schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref common.ReferenceCallb "object": { SchemaProps: spec.SchemaProps{ Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus"), + Ref: ref(autoscalingv2beta1.ObjectMetricStatus{}.OpenAPIModelName()), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.PodsMetricStatus"), + Ref: ref(autoscalingv2beta1.PodsMetricStatus{}.OpenAPIModelName()), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus"), + Ref: ref(autoscalingv2beta1.ResourceMetricStatus{}.OpenAPIModelName()), }, }, "containerResource": { SchemaProps: spec.SchemaProps{ Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricStatus"), + Ref: ref(autoscalingv2beta1.ContainerResourceMetricStatus{}.OpenAPIModelName()), }, }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus"), + Ref: ref(autoscalingv2beta1.ExternalMetricStatus{}.OpenAPIModelName()), }, }, }, @@ -16573,7 +16675,7 @@ func schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricStatus", "k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus", "k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus", "k8s.io/api/autoscaling/v2beta1.PodsMetricStatus", "k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus"}, + autoscalingv2beta1.ContainerResourceMetricStatus{}.OpenAPIModelName(), autoscalingv2beta1.ExternalMetricStatus{}.OpenAPIModelName(), autoscalingv2beta1.ObjectMetricStatus{}.OpenAPIModelName(), autoscalingv2beta1.PodsMetricStatus{}.OpenAPIModelName(), autoscalingv2beta1.ResourceMetricStatus{}.OpenAPIModelName()}, } } @@ -16588,7 +16690,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricSource(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "target is the described Kubernetes object.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), + Ref: ref(autoscalingv2beta1.CrossVersionObjectReference{}.OpenAPIModelName()), }, }, "metricName": { @@ -16602,19 +16704,19 @@ func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricSource(ref common.Referenc "targetValue": { SchemaProps: spec.SchemaProps{ Description: "targetValue is the target value of the metric (as a quantity).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "averageValue": { SchemaProps: spec.SchemaProps{ Description: "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -16622,7 +16724,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricSource(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + autoscalingv2beta1.CrossVersionObjectReference{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -16637,7 +16739,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricStatus(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "target is the described Kubernetes object.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), + Ref: ref(autoscalingv2beta1.CrossVersionObjectReference{}.OpenAPIModelName()), }, }, "metricName": { @@ -16651,19 +16753,19 @@ func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricStatus(ref common.Referenc "currentValue": { SchemaProps: spec.SchemaProps{ Description: "currentValue is the current value of the metric (as a quantity).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "averageValue": { SchemaProps: spec.SchemaProps{ Description: "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -16671,7 +16773,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricStatus(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + autoscalingv2beta1.CrossVersionObjectReference{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -16693,13 +16795,13 @@ func schema_k8sio_api_autoscaling_v2beta1_PodsMetricSource(ref common.ReferenceC "targetAverageValue": { SchemaProps: spec.SchemaProps{ Description: "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, @@ -16707,7 +16809,7 @@ func schema_k8sio_api_autoscaling_v2beta1_PodsMetricSource(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -16729,13 +16831,13 @@ func schema_k8sio_api_autoscaling_v2beta1_PodsMetricStatus(ref common.ReferenceC "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, @@ -16743,7 +16845,7 @@ func schema_k8sio_api_autoscaling_v2beta1_PodsMetricStatus(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -16772,7 +16874,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricSource(ref common.Refere "targetAverageValue": { SchemaProps: spec.SchemaProps{ Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -16780,7 +16882,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricSource(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -16809,7 +16911,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref common.Refere "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -16817,7 +16919,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -16840,7 +16942,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricSource(ref comm SchemaProps: spec.SchemaProps{ Description: "target specifies the target value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), + Ref: ref(v2beta2.MetricTarget{}.OpenAPIModelName()), }, }, "container": { @@ -16856,7 +16958,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricSource(ref comm }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, + v2beta2.MetricTarget{}.OpenAPIModelName()}, } } @@ -16879,7 +16981,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricStatus(ref comm SchemaProps: spec.SchemaProps{ Description: "current contains the current value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + Ref: ref(v2beta2.MetricValueStatus{}.OpenAPIModelName()), }, }, "container": { @@ -16895,7 +16997,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricStatus(ref comm }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, + v2beta2.MetricValueStatus{}.OpenAPIModelName()}, } } @@ -16947,14 +17049,14 @@ func schema_k8sio_api_autoscaling_v2beta2_ExternalMetricSource(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + Ref: ref(v2beta2.MetricIdentifier{}.OpenAPIModelName()), }, }, "target": { SchemaProps: spec.SchemaProps{ Description: "target specifies the target value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), + Ref: ref(v2beta2.MetricTarget{}.OpenAPIModelName()), }, }, }, @@ -16962,7 +17064,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ExternalMetricSource(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, + v2beta2.MetricIdentifier{}.OpenAPIModelName(), v2beta2.MetricTarget{}.OpenAPIModelName()}, } } @@ -16977,14 +17079,14 @@ func schema_k8sio_api_autoscaling_v2beta2_ExternalMetricStatus(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + Ref: ref(v2beta2.MetricIdentifier{}.OpenAPIModelName()), }, }, "current": { SchemaProps: spec.SchemaProps{ Description: "current contains the current value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + Ref: ref(v2beta2.MetricValueStatus{}.OpenAPIModelName()), }, }, }, @@ -16992,7 +17094,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ExternalMetricStatus(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, + v2beta2.MetricIdentifier{}.OpenAPIModelName(), v2beta2.MetricValueStatus{}.OpenAPIModelName()}, } } @@ -17068,7 +17170,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HPAScalingRules(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy"), + Ref: ref(v2beta2.HPAScalingPolicy{}.OpenAPIModelName()), }, }, }, @@ -17078,7 +17180,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HPAScalingRules(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy"}, + v2beta2.HPAScalingPolicy{}.OpenAPIModelName()}, } } @@ -17107,28 +17209,28 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscaler(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec"), + Ref: ref(v2beta2.HorizontalPodAutoscalerSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the current information about the autoscaler.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus"), + Ref: ref(v2beta2.HorizontalPodAutoscalerStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec", "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v2beta2.HorizontalPodAutoscalerSpec{}.OpenAPIModelName(), v2beta2.HorizontalPodAutoscalerStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -17142,20 +17244,20 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior(ref co "scaleUp": { SchemaProps: spec.SchemaProps{ Description: "scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of:\n * increase no more than 4 pods per 60 seconds\n * double the number of pods per 60 seconds\nNo stabilization is used.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.HPAScalingRules"), + Ref: ref(v2beta2.HPAScalingRules{}.OpenAPIModelName()), }, }, "scaleDown": { SchemaProps: spec.SchemaProps{ Description: "scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).", - Ref: ref("k8s.io/api/autoscaling/v2beta2.HPAScalingRules"), + Ref: ref(v2beta2.HPAScalingRules{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.HPAScalingRules"}, + v2beta2.HPAScalingRules{}.OpenAPIModelName()}, } } @@ -17185,7 +17287,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref c "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the last time the condition transitioned from one status to another", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -17207,7 +17309,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref c }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -17236,7 +17338,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref common SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -17247,7 +17349,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler"), + Ref: ref(v2beta2.HorizontalPodAutoscaler{}.OpenAPIModelName()), }, }, }, @@ -17258,7 +17360,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref common }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v2beta2.HorizontalPodAutoscaler{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -17273,7 +17375,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref common SchemaProps: spec.SchemaProps{ Description: "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), + Ref: ref(v2beta2.CrossVersionObjectReference{}.OpenAPIModelName()), }, }, "minReplicas": { @@ -17304,7 +17406,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricSpec"), + Ref: ref(v2beta2.MetricSpec{}.OpenAPIModelName()), }, }, }, @@ -17313,7 +17415,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref common "behavior": { SchemaProps: spec.SchemaProps{ Description: "behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerBehavior"), + Ref: ref(v2beta2.HorizontalPodAutoscalerBehavior{}.OpenAPIModelName()), }, }, }, @@ -17321,7 +17423,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref common }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerBehavior", "k8s.io/api/autoscaling/v2beta2.MetricSpec"}, + v2beta2.CrossVersionObjectReference{}.OpenAPIModelName(), v2beta2.HorizontalPodAutoscalerBehavior{}.OpenAPIModelName(), v2beta2.MetricSpec{}.OpenAPIModelName()}, } } @@ -17342,7 +17444,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref comm "lastScaleTime": { SchemaProps: spec.SchemaProps{ Description: "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "currentReplicas": { @@ -17374,7 +17476,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricStatus"), + Ref: ref(v2beta2.MetricStatus{}.OpenAPIModelName()), }, }, }, @@ -17393,7 +17495,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition"), + Ref: ref(v2beta2.HorizontalPodAutoscalerCondition{}.OpenAPIModelName()), }, }, }, @@ -17404,7 +17506,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref comm }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition", "k8s.io/api/autoscaling/v2beta2.MetricStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + v2beta2.HorizontalPodAutoscalerCondition{}.OpenAPIModelName(), v2beta2.MetricStatus{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -17426,7 +17528,7 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricIdentifier(ref common.ReferenceC "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, @@ -17434,7 +17536,7 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricIdentifier(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -17456,31 +17558,31 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref common.ReferenceCallbac "object": { SchemaProps: spec.SchemaProps{ Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ObjectMetricSource"), + Ref: ref(v2beta2.ObjectMetricSource{}.OpenAPIModelName()), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.PodsMetricSource"), + Ref: ref(v2beta2.PodsMetricSource{}.OpenAPIModelName()), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ResourceMetricSource"), + Ref: ref(v2beta2.ResourceMetricSource{}.OpenAPIModelName()), }, }, "containerResource": { SchemaProps: spec.SchemaProps{ Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricSource"), + Ref: ref(v2beta2.ContainerResourceMetricSource{}.OpenAPIModelName()), }, }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ExternalMetricSource"), + Ref: ref(v2beta2.ExternalMetricSource{}.OpenAPIModelName()), }, }, }, @@ -17488,7 +17590,7 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricSource", "k8s.io/api/autoscaling/v2beta2.ExternalMetricSource", "k8s.io/api/autoscaling/v2beta2.ObjectMetricSource", "k8s.io/api/autoscaling/v2beta2.PodsMetricSource", "k8s.io/api/autoscaling/v2beta2.ResourceMetricSource"}, + v2beta2.ContainerResourceMetricSource{}.OpenAPIModelName(), v2beta2.ExternalMetricSource{}.OpenAPIModelName(), v2beta2.ObjectMetricSource{}.OpenAPIModelName(), v2beta2.PodsMetricSource{}.OpenAPIModelName(), v2beta2.ResourceMetricSource{}.OpenAPIModelName()}, } } @@ -17510,31 +17612,31 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref common.ReferenceCallb "object": { SchemaProps: spec.SchemaProps{ Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus"), + Ref: ref(v2beta2.ObjectMetricStatus{}.OpenAPIModelName()), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.PodsMetricStatus"), + Ref: ref(v2beta2.PodsMetricStatus{}.OpenAPIModelName()), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus"), + Ref: ref(v2beta2.ResourceMetricStatus{}.OpenAPIModelName()), }, }, "containerResource": { SchemaProps: spec.SchemaProps{ Description: "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricStatus"), + Ref: ref(v2beta2.ContainerResourceMetricStatus{}.OpenAPIModelName()), }, }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus"), + Ref: ref(v2beta2.ExternalMetricStatus{}.OpenAPIModelName()), }, }, }, @@ -17542,7 +17644,7 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricStatus", "k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus", "k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus", "k8s.io/api/autoscaling/v2beta2.PodsMetricStatus", "k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus"}, + v2beta2.ContainerResourceMetricStatus{}.OpenAPIModelName(), v2beta2.ExternalMetricStatus{}.OpenAPIModelName(), v2beta2.ObjectMetricStatus{}.OpenAPIModelName(), v2beta2.PodsMetricStatus{}.OpenAPIModelName(), v2beta2.ResourceMetricStatus{}.OpenAPIModelName()}, } } @@ -17564,13 +17666,13 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricTarget(ref common.ReferenceCallb "value": { SchemaProps: spec.SchemaProps{ Description: "value is the target value of the metric (as a quantity).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "averageValue": { SchemaProps: spec.SchemaProps{ Description: "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "averageUtilization": { @@ -17585,7 +17687,7 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricTarget(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -17599,13 +17701,13 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricValueStatus(ref common.Reference "value": { SchemaProps: spec.SchemaProps{ Description: "value is the current value of the metric (as a quantity).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "averageValue": { SchemaProps: spec.SchemaProps{ Description: "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "averageUtilization": { @@ -17619,7 +17721,7 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricValueStatus(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -17633,21 +17735,21 @@ func schema_k8sio_api_autoscaling_v2beta2_ObjectMetricSource(ref common.Referenc "describedObject": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), + Ref: ref(v2beta2.CrossVersionObjectReference{}.OpenAPIModelName()), }, }, "target": { SchemaProps: spec.SchemaProps{ Description: "target specifies the target value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), + Ref: ref(v2beta2.MetricTarget{}.OpenAPIModelName()), }, }, "metric": { SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + Ref: ref(v2beta2.MetricIdentifier{}.OpenAPIModelName()), }, }, }, @@ -17655,7 +17757,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ObjectMetricSource(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, + v2beta2.CrossVersionObjectReference{}.OpenAPIModelName(), v2beta2.MetricIdentifier{}.OpenAPIModelName(), v2beta2.MetricTarget{}.OpenAPIModelName()}, } } @@ -17670,20 +17772,20 @@ func schema_k8sio_api_autoscaling_v2beta2_ObjectMetricStatus(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + Ref: ref(v2beta2.MetricIdentifier{}.OpenAPIModelName()), }, }, "current": { SchemaProps: spec.SchemaProps{ Description: "current contains the current value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + Ref: ref(v2beta2.MetricValueStatus{}.OpenAPIModelName()), }, }, "describedObject": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), + Ref: ref(v2beta2.CrossVersionObjectReference{}.OpenAPIModelName()), }, }, }, @@ -17691,7 +17793,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ObjectMetricStatus(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, + v2beta2.CrossVersionObjectReference{}.OpenAPIModelName(), v2beta2.MetricIdentifier{}.OpenAPIModelName(), v2beta2.MetricValueStatus{}.OpenAPIModelName()}, } } @@ -17706,14 +17808,14 @@ func schema_k8sio_api_autoscaling_v2beta2_PodsMetricSource(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + Ref: ref(v2beta2.MetricIdentifier{}.OpenAPIModelName()), }, }, "target": { SchemaProps: spec.SchemaProps{ Description: "target specifies the target value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), + Ref: ref(v2beta2.MetricTarget{}.OpenAPIModelName()), }, }, }, @@ -17721,7 +17823,7 @@ func schema_k8sio_api_autoscaling_v2beta2_PodsMetricSource(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, + v2beta2.MetricIdentifier{}.OpenAPIModelName(), v2beta2.MetricTarget{}.OpenAPIModelName()}, } } @@ -17736,14 +17838,14 @@ func schema_k8sio_api_autoscaling_v2beta2_PodsMetricStatus(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + Ref: ref(v2beta2.MetricIdentifier{}.OpenAPIModelName()), }, }, "current": { SchemaProps: spec.SchemaProps{ Description: "current contains the current value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + Ref: ref(v2beta2.MetricValueStatus{}.OpenAPIModelName()), }, }, }, @@ -17751,7 +17853,7 @@ func schema_k8sio_api_autoscaling_v2beta2_PodsMetricStatus(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, + v2beta2.MetricIdentifier{}.OpenAPIModelName(), v2beta2.MetricValueStatus{}.OpenAPIModelName()}, } } @@ -17774,7 +17876,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "target specifies the target value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), + Ref: ref(v2beta2.MetricTarget{}.OpenAPIModelName()), }, }, }, @@ -17782,7 +17884,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, + v2beta2.MetricTarget{}.OpenAPIModelName()}, } } @@ -17805,7 +17907,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "current contains the current value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + Ref: ref(v2beta2.MetricValueStatus{}.OpenAPIModelName()), }, }, }, @@ -17813,7 +17915,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, + v2beta2.MetricValueStatus{}.OpenAPIModelName()}, } } @@ -17842,28 +17944,28 @@ func schema_k8sio_api_batch_v1_CronJob(ref common.ReferenceCallback) common.Open SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.CronJobSpec"), + Ref: ref(batchv1.CronJobSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.CronJobStatus"), + Ref: ref(batchv1.CronJobStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.CronJobSpec", "k8s.io/api/batch/v1.CronJobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + batchv1.CronJobSpec{}.OpenAPIModelName(), batchv1.CronJobStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -17892,7 +17994,7 @@ func schema_k8sio_api_batch_v1_CronJobList(ref common.ReferenceCallback) common. SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -17903,7 +18005,7 @@ func schema_k8sio_api_batch_v1_CronJobList(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.CronJob"), + Ref: ref(batchv1.CronJob{}.OpenAPIModelName()), }, }, }, @@ -17914,7 +18016,7 @@ func schema_k8sio_api_batch_v1_CronJobList(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.CronJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + batchv1.CronJob{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -17966,7 +18068,7 @@ func schema_k8sio_api_batch_v1_CronJobSpec(ref common.ReferenceCallback) common. SchemaProps: spec.SchemaProps{ Description: "Specifies the job that will be created when executing a CronJob.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.JobTemplateSpec"), + Ref: ref(batchv1.JobTemplateSpec{}.OpenAPIModelName()), }, }, "successfulJobsHistoryLimit": { @@ -17988,7 +18090,7 @@ func schema_k8sio_api_batch_v1_CronJobSpec(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.JobTemplateSpec"}, + batchv1.JobTemplateSpec{}.OpenAPIModelName()}, } } @@ -18012,7 +18114,7 @@ func schema_k8sio_api_batch_v1_CronJobStatus(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, }, @@ -18021,20 +18123,20 @@ func schema_k8sio_api_batch_v1_CronJobStatus(ref common.ReferenceCallback) commo "lastScheduleTime": { SchemaProps: spec.SchemaProps{ Description: "Information when was the last time the job was successfully scheduled.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastSuccessfulTime": { SchemaProps: spec.SchemaProps{ Description: "Information when was the last time the job successfully completed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + corev1.ObjectReference{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -18063,28 +18165,28 @@ func schema_k8sio_api_batch_v1_Job(ref common.ReferenceCallback) common.OpenAPID SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.JobSpec"), + Ref: ref(batchv1.JobSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Current status of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.JobStatus"), + Ref: ref(batchv1.JobStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.JobSpec", "k8s.io/api/batch/v1.JobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + batchv1.JobSpec{}.OpenAPIModelName(), batchv1.JobStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -18114,13 +18216,13 @@ func schema_k8sio_api_batch_v1_JobCondition(ref common.ReferenceCallback) common "lastProbeTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition was checked.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transit from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -18142,7 +18244,7 @@ func schema_k8sio_api_batch_v1_JobCondition(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -18171,7 +18273,7 @@ func schema_k8sio_api_batch_v1_JobList(ref common.ReferenceCallback) common.Open SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -18182,7 +18284,7 @@ func schema_k8sio_api_batch_v1_JobList(ref common.ReferenceCallback) common.Open Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.Job"), + Ref: ref(batchv1.Job{}.OpenAPIModelName()), }, }, }, @@ -18193,7 +18295,7 @@ func schema_k8sio_api_batch_v1_JobList(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.Job", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + batchv1.Job{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -18228,13 +18330,13 @@ func schema_k8sio_api_batch_v1_JobSpec(ref common.ReferenceCallback) common.Open "podFailurePolicy": { SchemaProps: spec.SchemaProps{ Description: "Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure.", - Ref: ref("k8s.io/api/batch/v1.PodFailurePolicy"), + Ref: ref(batchv1.PodFailurePolicy{}.OpenAPIModelName()), }, }, "successPolicy": { SchemaProps: spec.SchemaProps{ Description: "successPolicy specifies the policy when the Job can be declared as succeeded. If empty, the default behavior applies - the Job is declared as succeeded only when the number of succeeded pods equals to the completions. When the field is specified, it must be immutable and works only for the Indexed Jobs. Once the Job meets the SuccessPolicy, the lingering pods are terminated.", - Ref: ref("k8s.io/api/batch/v1.SuccessPolicy"), + Ref: ref(batchv1.SuccessPolicy{}.OpenAPIModelName()), }, }, "backoffLimit": { @@ -18261,7 +18363,7 @@ func schema_k8sio_api_batch_v1_JobSpec(ref common.ReferenceCallback) common.Open "selector": { SchemaProps: spec.SchemaProps{ Description: "A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "manualSelector": { @@ -18275,7 +18377,7 @@ func schema_k8sio_api_batch_v1_JobSpec(ref common.ReferenceCallback) common.Open SchemaProps: spec.SchemaProps{ Description: "Describes the pod that will be created when executing a job. The only allowed template.spec.restartPolicy values are \"Never\" or \"OnFailure\". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, "ttlSecondsAfterFinished": { @@ -18320,7 +18422,7 @@ func schema_k8sio_api_batch_v1_JobSpec(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.PodFailurePolicy", "k8s.io/api/batch/v1.SuccessPolicy", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + batchv1.PodFailurePolicy{}.OpenAPIModelName(), batchv1.SuccessPolicy{}.OpenAPIModelName(), corev1.PodTemplateSpec{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -18346,7 +18448,7 @@ func schema_k8sio_api_batch_v1_JobStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.JobCondition"), + Ref: ref(batchv1.JobCondition{}.OpenAPIModelName()), }, }, }, @@ -18355,13 +18457,13 @@ func schema_k8sio_api_batch_v1_JobStatus(ref common.ReferenceCallback) common.Op "startTime": { SchemaProps: spec.SchemaProps{ Description: "Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC.\n\nOnce set, the field can only be removed when the job is suspended. The field cannot be modified while the job is unsuspended or finished.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "completionTime": { SchemaProps: spec.SchemaProps{ Description: "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is set when the job finishes successfully, and only then. The value cannot be updated or removed. The value indicates the same or later point in time as the startTime field.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "active": { @@ -18409,7 +18511,7 @@ func schema_k8sio_api_batch_v1_JobStatus(ref common.ReferenceCallback) common.Op "uncountedTerminatedPods": { SchemaProps: spec.SchemaProps{ Description: "uncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.\n\nThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status:\n\n1. Add the pod UID to the arrays in this field. 2. Remove the pod finalizer. 3. Remove the pod UID from the arrays while increasing the corresponding\n counter.\n\nOld jobs might not be tracked using this field, in which case the field remains null. The structure is empty for finished jobs.", - Ref: ref("k8s.io/api/batch/v1.UncountedTerminatedPods"), + Ref: ref(batchv1.UncountedTerminatedPods{}.OpenAPIModelName()), }, }, "ready": { @@ -18423,7 +18525,7 @@ func schema_k8sio_api_batch_v1_JobStatus(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.JobCondition", "k8s.io/api/batch/v1.UncountedTerminatedPods", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + batchv1.JobCondition{}.OpenAPIModelName(), batchv1.UncountedTerminatedPods{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -18438,21 +18540,21 @@ func schema_k8sio_api_batch_v1_JobTemplateSpec(ref common.ReferenceCallback) com SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.JobSpec"), + Ref: ref(batchv1.JobSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.JobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + batchv1.JobSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -18476,7 +18578,7 @@ func schema_k8sio_api_batch_v1_PodFailurePolicy(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.PodFailurePolicyRule"), + Ref: ref(batchv1.PodFailurePolicyRule{}.OpenAPIModelName()), }, }, }, @@ -18487,7 +18589,7 @@ func schema_k8sio_api_batch_v1_PodFailurePolicy(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.PodFailurePolicyRule"}, + batchv1.PodFailurePolicyRule{}.OpenAPIModelName()}, } } @@ -18565,7 +18667,7 @@ func schema_k8sio_api_batch_v1_PodFailurePolicyOnPodConditionsPattern(ref common }, }, }, - Required: []string{"type", "status"}, + Required: []string{"type"}, }, }, } @@ -18590,7 +18692,7 @@ func schema_k8sio_api_batch_v1_PodFailurePolicyRule(ref common.ReferenceCallback "onExitCodes": { SchemaProps: spec.SchemaProps{ Description: "Represents the requirement on the container exit codes.", - Ref: ref("k8s.io/api/batch/v1.PodFailurePolicyOnExitCodesRequirement"), + Ref: ref(batchv1.PodFailurePolicyOnExitCodesRequirement{}.OpenAPIModelName()), }, }, "onPodConditions": { @@ -18606,7 +18708,7 @@ func schema_k8sio_api_batch_v1_PodFailurePolicyRule(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.PodFailurePolicyOnPodConditionsPattern"), + Ref: ref(batchv1.PodFailurePolicyOnPodConditionsPattern{}.OpenAPIModelName()), }, }, }, @@ -18617,7 +18719,7 @@ func schema_k8sio_api_batch_v1_PodFailurePolicyRule(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.PodFailurePolicyOnExitCodesRequirement", "k8s.io/api/batch/v1.PodFailurePolicyOnPodConditionsPattern"}, + batchv1.PodFailurePolicyOnExitCodesRequirement{}.OpenAPIModelName(), batchv1.PodFailurePolicyOnPodConditionsPattern{}.OpenAPIModelName()}, } } @@ -18641,7 +18743,7 @@ func schema_k8sio_api_batch_v1_SuccessPolicy(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.SuccessPolicyRule"), + Ref: ref(batchv1.SuccessPolicyRule{}.OpenAPIModelName()), }, }, }, @@ -18652,7 +18754,7 @@ func schema_k8sio_api_batch_v1_SuccessPolicy(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.SuccessPolicyRule"}, + batchv1.SuccessPolicyRule{}.OpenAPIModelName()}, } } @@ -18761,28 +18863,28 @@ func schema_k8sio_api_batch_v1beta1_CronJob(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1beta1.CronJobSpec"), + Ref: ref(batchv1beta1.CronJobSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1beta1.CronJobStatus"), + Ref: ref(batchv1beta1.CronJobStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1beta1.CronJobSpec", "k8s.io/api/batch/v1beta1.CronJobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + batchv1beta1.CronJobSpec{}.OpenAPIModelName(), batchv1beta1.CronJobStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -18811,7 +18913,7 @@ func schema_k8sio_api_batch_v1beta1_CronJobList(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -18822,7 +18924,7 @@ func schema_k8sio_api_batch_v1beta1_CronJobList(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1beta1.CronJob"), + Ref: ref(batchv1beta1.CronJob{}.OpenAPIModelName()), }, }, }, @@ -18833,7 +18935,7 @@ func schema_k8sio_api_batch_v1beta1_CronJobList(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/batch/v1beta1.CronJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + batchv1beta1.CronJob{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -18884,7 +18986,7 @@ func schema_k8sio_api_batch_v1beta1_CronJobSpec(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Specifies the job that will be created when executing a CronJob.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1beta1.JobTemplateSpec"), + Ref: ref(batchv1beta1.JobTemplateSpec{}.OpenAPIModelName()), }, }, "successfulJobsHistoryLimit": { @@ -18906,7 +19008,7 @@ func schema_k8sio_api_batch_v1beta1_CronJobSpec(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/batch/v1beta1.JobTemplateSpec"}, + batchv1beta1.JobTemplateSpec{}.OpenAPIModelName()}, } } @@ -18930,7 +19032,7 @@ func schema_k8sio_api_batch_v1beta1_CronJobStatus(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, }, @@ -18939,20 +19041,20 @@ func schema_k8sio_api_batch_v1beta1_CronJobStatus(ref common.ReferenceCallback) "lastScheduleTime": { SchemaProps: spec.SchemaProps{ Description: "Information when was the last time the job was successfully scheduled.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastSuccessfulTime": { SchemaProps: spec.SchemaProps{ Description: "Information when was the last time the job successfully completed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + corev1.ObjectReference{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -18967,21 +19069,21 @@ func schema_k8sio_api_batch_v1beta1_JobTemplateSpec(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.JobSpec"), + Ref: ref(batchv1.JobSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.JobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + batchv1.JobSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -19009,21 +19111,21 @@ func schema_k8sio_api_certificates_v1_CertificateSigningRequest(ref common.Refer "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec contains the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequestSpec"), + Ref: ref(certificatesv1.CertificateSigningRequestSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status contains information about whether the request is approved or denied, and the certificate issued by the signer, or the failure condition indicating signer failure.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequestStatus"), + Ref: ref(certificatesv1.CertificateSigningRequestStatus{}.OpenAPIModelName()), }, }, }, @@ -19031,7 +19133,7 @@ func schema_k8sio_api_certificates_v1_CertificateSigningRequest(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1.CertificateSigningRequestSpec", "k8s.io/api/certificates/v1.CertificateSigningRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + certificatesv1.CertificateSigningRequestSpec{}.OpenAPIModelName(), certificatesv1.CertificateSigningRequestStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -19075,13 +19177,13 @@ func schema_k8sio_api_certificates_v1_CertificateSigningRequestCondition(ref com "lastUpdateTime": { SchemaProps: spec.SchemaProps{ Description: "lastUpdateTime is the time of the last update to this condition", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, @@ -19089,7 +19191,7 @@ func schema_k8sio_api_certificates_v1_CertificateSigningRequestCondition(ref com }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -19117,7 +19219,7 @@ func schema_k8sio_api_certificates_v1_CertificateSigningRequestList(ref common.R "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -19128,7 +19230,7 @@ func schema_k8sio_api_certificates_v1_CertificateSigningRequestList(ref common.R Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequest"), + Ref: ref(certificatesv1.CertificateSigningRequest{}.OpenAPIModelName()), }, }, }, @@ -19139,7 +19241,7 @@ func schema_k8sio_api_certificates_v1_CertificateSigningRequestList(ref common.R }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1.CertificateSigningRequest", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + certificatesv1.CertificateSigningRequest{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -19151,11 +19253,6 @@ func schema_k8sio_api_certificates_v1_CertificateSigningRequestSpec(ref common.R Type: []string{"object"}, Properties: map[string]spec.Schema{ "request": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, SchemaProps: spec.SchemaProps{ Description: "request contains an x509 certificate signing request encoded in a \"CERTIFICATE REQUEST\" PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded.", Type: []string{"string"}, @@ -19285,18 +19382,13 @@ func schema_k8sio_api_certificates_v1_CertificateSigningRequestStatus(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequestCondition"), + Ref: ref(certificatesv1.CertificateSigningRequestCondition{}.OpenAPIModelName()), }, }, }, }, }, "certificate": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, SchemaProps: spec.SchemaProps{ Description: "certificate is populated with an issued certificate by the signer after an Approved condition is present. This field is set via the /status subresource. Once populated, this field is immutable.\n\nIf the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty.\n\nValidation requirements:\n 1. certificate must contain one or more PEM blocks.\n 2. All PEM blocks must have the \"CERTIFICATE\" label, contain no headers, and the encoded data\n must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280.\n 3. Non-PEM content may appear before or after the \"CERTIFICATE\" PEM blocks and is unvalidated,\n to allow for explanatory text as described in section 5.2 of RFC7468.\n\nIf more than one PEM block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes.\n\nThe certificate is encoded in PEM format.\n\nWhen serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of:\n\n base64(\n -----BEGIN CERTIFICATE-----\n ...\n -----END CERTIFICATE-----\n )", Type: []string{"string"}, @@ -19307,7 +19399,7 @@ func schema_k8sio_api_certificates_v1_CertificateSigningRequestStatus(ref common }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1.CertificateSigningRequestCondition"}, + certificatesv1.CertificateSigningRequestCondition{}.OpenAPIModelName()}, } } @@ -19336,14 +19428,14 @@ func schema_k8sio_api_certificates_v1alpha1_ClusterTrustBundle(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "metadata contains the object metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec contains the signer (if any) and trust anchors.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1alpha1.ClusterTrustBundleSpec"), + Ref: ref(certificatesv1alpha1.ClusterTrustBundleSpec{}.OpenAPIModelName()), }, }, }, @@ -19351,7 +19443,7 @@ func schema_k8sio_api_certificates_v1alpha1_ClusterTrustBundle(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1alpha1.ClusterTrustBundleSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + certificatesv1alpha1.ClusterTrustBundleSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -19380,7 +19472,7 @@ func schema_k8sio_api_certificates_v1alpha1_ClusterTrustBundleList(ref common.Re SchemaProps: spec.SchemaProps{ Description: "metadata contains the list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -19391,7 +19483,7 @@ func schema_k8sio_api_certificates_v1alpha1_ClusterTrustBundleList(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1alpha1.ClusterTrustBundle"), + Ref: ref(certificatesv1alpha1.ClusterTrustBundle{}.OpenAPIModelName()), }, }, }, @@ -19402,7 +19494,7 @@ func schema_k8sio_api_certificates_v1alpha1_ClusterTrustBundleList(ref common.Re }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1alpha1.ClusterTrustBundle", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + certificatesv1alpha1.ClusterTrustBundle{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -19460,21 +19552,21 @@ func schema_k8sio_api_certificates_v1alpha1_PodCertificateRequest(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "metadata contains the object metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec contains the details about the certificate being requested.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1alpha1.PodCertificateRequestSpec"), + Ref: ref(certificatesv1alpha1.PodCertificateRequestSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status contains the issued certificate, and a standard set of conditions.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1alpha1.PodCertificateRequestStatus"), + Ref: ref(certificatesv1alpha1.PodCertificateRequestStatus{}.OpenAPIModelName()), }, }, }, @@ -19482,7 +19574,7 @@ func schema_k8sio_api_certificates_v1alpha1_PodCertificateRequest(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1alpha1.PodCertificateRequestSpec", "k8s.io/api/certificates/v1alpha1.PodCertificateRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + certificatesv1alpha1.PodCertificateRequestSpec{}.OpenAPIModelName(), certificatesv1alpha1.PodCertificateRequestStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -19511,7 +19603,7 @@ func schema_k8sio_api_certificates_v1alpha1_PodCertificateRequestList(ref common SchemaProps: spec.SchemaProps{ Description: "metadata contains the list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -19522,7 +19614,7 @@ func schema_k8sio_api_certificates_v1alpha1_PodCertificateRequestList(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1alpha1.PodCertificateRequest"), + Ref: ref(certificatesv1alpha1.PodCertificateRequest{}.OpenAPIModelName()), }, }, }, @@ -19533,7 +19625,7 @@ func schema_k8sio_api_certificates_v1alpha1_PodCertificateRequestList(ref common }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1alpha1.PodCertificateRequest", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + certificatesv1alpha1.PodCertificateRequest{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -19654,7 +19746,7 @@ func schema_k8sio_api_certificates_v1alpha1_PodCertificateRequestStatus(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -19670,26 +19762,26 @@ func schema_k8sio_api_certificates_v1alpha1_PodCertificateRequestStatus(ref comm "notBefore": { SchemaProps: spec.SchemaProps{ Description: "notBefore is the time at which the certificate becomes valid. The value must be the same as the notBefore value in the leaf certificate in certificateChain. This field is set via the /status subresource. Once populated, it is immutable. The signer must set this field at the same time it sets certificateChain.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "beginRefreshAt": { SchemaProps: spec.SchemaProps{ Description: "beginRefreshAt is the time at which the kubelet should begin trying to refresh the certificate. This field is set via the /status subresource, and must be set at the same time as certificateChain. Once populated, this field is immutable.\n\nThis field is only a hint. Kubelet may start refreshing before or after this time if necessary.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "notAfter": { SchemaProps: spec.SchemaProps{ Description: "notAfter is the time at which the certificate expires. The value must be the same as the notAfter value in the leaf certificate in certificateChain. This field is set via the /status subresource. Once populated, it is immutable. The signer must set this field at the same time it sets certificateChain.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Condition{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -19717,21 +19809,21 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequest(ref common. "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec contains the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec"), + Ref: ref(certificatesv1beta1.CertificateSigningRequestSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Derived information about the request.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus"), + Ref: ref(certificatesv1beta1.CertificateSigningRequestStatus{}.OpenAPIModelName()), }, }, }, @@ -19739,7 +19831,7 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequest(ref common. }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec", "k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + certificatesv1beta1.CertificateSigningRequestSpec{}.OpenAPIModelName(), certificatesv1beta1.CertificateSigningRequestStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -19782,13 +19874,13 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestCondition(re "lastUpdateTime": { SchemaProps: spec.SchemaProps{ Description: "timestamp for the last update to this condition", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, @@ -19796,7 +19888,7 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestCondition(re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -19823,7 +19915,7 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref com "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -19833,7 +19925,7 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequest"), + Ref: ref(certificatesv1beta1.CertificateSigningRequest{}.OpenAPIModelName()), }, }, }, @@ -19844,7 +19936,7 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref com }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1beta1.CertificateSigningRequest", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + certificatesv1beta1.CertificateSigningRequest{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -19856,11 +19948,6 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestSpec(ref com Type: []string{"object"}, Properties: map[string]spec.Schema{ "request": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, SchemaProps: spec.SchemaProps{ Description: "Base64-encoded PKCS#10 CSR data", Type: []string{"string"}, @@ -19987,18 +20074,13 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestStatus(ref c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition"), + Ref: ref(certificatesv1beta1.CertificateSigningRequestCondition{}.OpenAPIModelName()), }, }, }, }, }, "certificate": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, SchemaProps: spec.SchemaProps{ Description: "If request was approved, the controller will place the issued certificate here.", Type: []string{"string"}, @@ -20009,7 +20091,7 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestStatus(ref c }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition"}, + certificatesv1beta1.CertificateSigningRequestCondition{}.OpenAPIModelName()}, } } @@ -20038,14 +20120,14 @@ func schema_k8sio_api_certificates_v1beta1_ClusterTrustBundle(ref common.Referen SchemaProps: spec.SchemaProps{ Description: "metadata contains the object metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec contains the signer (if any) and trust anchors.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1beta1.ClusterTrustBundleSpec"), + Ref: ref(certificatesv1beta1.ClusterTrustBundleSpec{}.OpenAPIModelName()), }, }, }, @@ -20053,7 +20135,7 @@ func schema_k8sio_api_certificates_v1beta1_ClusterTrustBundle(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1beta1.ClusterTrustBundleSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + certificatesv1beta1.ClusterTrustBundleSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -20082,7 +20164,7 @@ func schema_k8sio_api_certificates_v1beta1_ClusterTrustBundleList(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "metadata contains the list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -20093,7 +20175,7 @@ func schema_k8sio_api_certificates_v1beta1_ClusterTrustBundleList(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1beta1.ClusterTrustBundle"), + Ref: ref(certificatesv1beta1.ClusterTrustBundle{}.OpenAPIModelName()), }, }, }, @@ -20104,7 +20186,7 @@ func schema_k8sio_api_certificates_v1beta1_ClusterTrustBundleList(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1beta1.ClusterTrustBundle", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + certificatesv1beta1.ClusterTrustBundle{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -20162,21 +20244,21 @@ func schema_k8sio_api_coordination_v1_Lease(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/coordination/v1.LeaseSpec"), + Ref: ref(coordinationv1.LeaseSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/coordination/v1.LeaseSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + coordinationv1.LeaseSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -20205,7 +20287,7 @@ func schema_k8sio_api_coordination_v1_LeaseList(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -20216,7 +20298,7 @@ func schema_k8sio_api_coordination_v1_LeaseList(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/coordination/v1.Lease"), + Ref: ref(coordinationv1.Lease{}.OpenAPIModelName()), }, }, }, @@ -20227,7 +20309,7 @@ func schema_k8sio_api_coordination_v1_LeaseList(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/coordination/v1.Lease", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + coordinationv1.Lease{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -20255,13 +20337,13 @@ func schema_k8sio_api_coordination_v1_LeaseSpec(ref common.ReferenceCallback) co "acquireTime": { SchemaProps: spec.SchemaProps{ Description: "acquireTime is a time when the current lease was acquired.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, "renewTime": { SchemaProps: spec.SchemaProps{ Description: "renewTime is a time when the current holder of a lease has last updated the lease.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, "leaseTransitions": { @@ -20289,7 +20371,7 @@ func schema_k8sio_api_coordination_v1_LeaseSpec(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + metav1.MicroTime{}.OpenAPIModelName()}, } } @@ -20318,21 +20400,21 @@ func schema_k8sio_api_coordination_v1alpha2_LeaseCandidate(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/coordination/v1alpha2.LeaseCandidateSpec"), + Ref: ref(v1alpha2.LeaseCandidateSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/coordination/v1alpha2.LeaseCandidateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1alpha2.LeaseCandidateSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -20361,7 +20443,7 @@ func schema_k8sio_api_coordination_v1alpha2_LeaseCandidateList(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -20372,7 +20454,7 @@ func schema_k8sio_api_coordination_v1alpha2_LeaseCandidateList(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/coordination/v1alpha2.LeaseCandidate"), + Ref: ref(v1alpha2.LeaseCandidate{}.OpenAPIModelName()), }, }, }, @@ -20383,7 +20465,7 @@ func schema_k8sio_api_coordination_v1alpha2_LeaseCandidateList(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/api/coordination/v1alpha2.LeaseCandidate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1alpha2.LeaseCandidate{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -20405,13 +20487,13 @@ func schema_k8sio_api_coordination_v1alpha2_LeaseCandidateSpec(ref common.Refere "pingTime": { SchemaProps: spec.SchemaProps{ Description: "PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, "renewTime": { SchemaProps: spec.SchemaProps{ Description: "RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, "binaryVersion": { @@ -20441,7 +20523,7 @@ func schema_k8sio_api_coordination_v1alpha2_LeaseCandidateSpec(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + metav1.MicroTime{}.OpenAPIModelName()}, } } @@ -20470,21 +20552,21 @@ func schema_k8sio_api_coordination_v1beta1_Lease(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/coordination/v1beta1.LeaseSpec"), + Ref: ref(coordinationv1beta1.LeaseSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/coordination/v1beta1.LeaseSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + coordinationv1beta1.LeaseSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -20513,21 +20595,21 @@ func schema_k8sio_api_coordination_v1beta1_LeaseCandidate(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/coordination/v1beta1.LeaseCandidateSpec"), + Ref: ref(coordinationv1beta1.LeaseCandidateSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/coordination/v1beta1.LeaseCandidateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + coordinationv1beta1.LeaseCandidateSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -20556,7 +20638,7 @@ func schema_k8sio_api_coordination_v1beta1_LeaseCandidateList(ref common.Referen SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -20567,7 +20649,7 @@ func schema_k8sio_api_coordination_v1beta1_LeaseCandidateList(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/coordination/v1beta1.LeaseCandidate"), + Ref: ref(coordinationv1beta1.LeaseCandidate{}.OpenAPIModelName()), }, }, }, @@ -20578,7 +20660,7 @@ func schema_k8sio_api_coordination_v1beta1_LeaseCandidateList(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/api/coordination/v1beta1.LeaseCandidate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + coordinationv1beta1.LeaseCandidate{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -20600,13 +20682,13 @@ func schema_k8sio_api_coordination_v1beta1_LeaseCandidateSpec(ref common.Referen "pingTime": { SchemaProps: spec.SchemaProps{ Description: "PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, "renewTime": { SchemaProps: spec.SchemaProps{ Description: "RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, "binaryVersion": { @@ -20636,7 +20718,7 @@ func schema_k8sio_api_coordination_v1beta1_LeaseCandidateSpec(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + metav1.MicroTime{}.OpenAPIModelName()}, } } @@ -20665,7 +20747,7 @@ func schema_k8sio_api_coordination_v1beta1_LeaseList(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -20676,7 +20758,7 @@ func schema_k8sio_api_coordination_v1beta1_LeaseList(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/coordination/v1beta1.Lease"), + Ref: ref(coordinationv1beta1.Lease{}.OpenAPIModelName()), }, }, }, @@ -20687,7 +20769,7 @@ func schema_k8sio_api_coordination_v1beta1_LeaseList(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/coordination/v1beta1.Lease", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + coordinationv1beta1.Lease{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -20715,13 +20797,13 @@ func schema_k8sio_api_coordination_v1beta1_LeaseSpec(ref common.ReferenceCallbac "acquireTime": { SchemaProps: spec.SchemaProps{ Description: "acquireTime is a time when the current lease was acquired.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, "renewTime": { SchemaProps: spec.SchemaProps{ Description: "renewTime is a time when the current holder of a lease has last updated the lease.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, "leaseTransitions": { @@ -20749,7 +20831,7 @@ func schema_k8sio_api_coordination_v1beta1_LeaseSpec(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + metav1.MicroTime{}.OpenAPIModelName()}, } } @@ -20806,26 +20888,26 @@ func schema_k8sio_api_core_v1_Affinity(ref common.ReferenceCallback) common.Open "nodeAffinity": { SchemaProps: spec.SchemaProps{ Description: "Describes node affinity scheduling rules for the pod.", - Ref: ref("k8s.io/api/core/v1.NodeAffinity"), + Ref: ref(corev1.NodeAffinity{}.OpenAPIModelName()), }, }, "podAffinity": { SchemaProps: spec.SchemaProps{ Description: "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).", - Ref: ref("k8s.io/api/core/v1.PodAffinity"), + Ref: ref(corev1.PodAffinity{}.OpenAPIModelName()), }, }, "podAntiAffinity": { SchemaProps: spec.SchemaProps{ Description: "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).", - Ref: ref("k8s.io/api/core/v1.PodAntiAffinity"), + Ref: ref(corev1.PodAntiAffinity{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeAffinity", "k8s.io/api/core/v1.PodAffinity", "k8s.io/api/core/v1.PodAntiAffinity"}, + corev1.NodeAffinity{}.OpenAPIModelName(), corev1.PodAffinity{}.OpenAPIModelName(), corev1.PodAntiAffinity{}.OpenAPIModelName()}, } } @@ -20921,7 +21003,7 @@ func schema_k8sio_api_core_v1_AvoidPods(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PreferAvoidPodsEntry"), + Ref: ref(corev1.PreferAvoidPodsEntry{}.OpenAPIModelName()), }, }, }, @@ -20931,7 +21013,7 @@ func schema_k8sio_api_core_v1_AvoidPods(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PreferAvoidPodsEntry"}, + corev1.PreferAvoidPodsEntry{}.OpenAPIModelName()}, } } @@ -20961,7 +21043,7 @@ func schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref common.ReferenceCallback "cachingMode": { SchemaProps: spec.SchemaProps{ Description: "cachingMode is the Host Caching mode: None, Read Only, Read Write.\n\nPossible enum values:\n - `\"None\"`\n - `\"ReadOnly\"`\n - `\"ReadWrite\"`", - Default: v1.AzureDataDiskCachingReadWrite, + Default: corev1.AzureDataDiskCachingReadWrite, Type: []string{"string"}, Format: "", Enum: []interface{}{"None", "ReadOnly", "ReadWrite"}, @@ -20986,7 +21068,7 @@ func schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref common.ReferenceCallback "kind": { SchemaProps: spec.SchemaProps{ Description: "kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared\n\nPossible enum values:\n - `\"Dedicated\"`\n - `\"Managed\"`\n - `\"Shared\"`", - Default: v1.AzureSharedBlobDisk, + Default: corev1.AzureSharedBlobDisk, Type: []string{"string"}, Format: "", Enum: []interface{}{"Dedicated", "Managed", "Shared"}, @@ -21105,14 +21187,14 @@ func schema_k8sio_api_core_v1_Binding(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "target": { SchemaProps: spec.SchemaProps{ Description: "The target object that you want to bind to the standard object.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, }, @@ -21120,7 +21202,7 @@ func schema_k8sio_api_core_v1_Binding(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.ObjectReference{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -21180,31 +21262,31 @@ func schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref common.ReferenceCall "controllerPublishSecretRef": { SchemaProps: spec.SchemaProps{ Description: "controllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(corev1.SecretReference{}.OpenAPIModelName()), }, }, "nodeStageSecretRef": { SchemaProps: spec.SchemaProps{ Description: "nodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(corev1.SecretReference{}.OpenAPIModelName()), }, }, "nodePublishSecretRef": { SchemaProps: spec.SchemaProps{ Description: "nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(corev1.SecretReference{}.OpenAPIModelName()), }, }, "controllerExpandSecretRef": { SchemaProps: spec.SchemaProps{ Description: "controllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(corev1.SecretReference{}.OpenAPIModelName()), }, }, "nodeExpandSecretRef": { SchemaProps: spec.SchemaProps{ Description: "nodeExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeExpandVolume call. This field is optional, may be omitted if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(corev1.SecretReference{}.OpenAPIModelName()), }, }, }, @@ -21212,7 +21294,7 @@ func schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + corev1.SecretReference{}.OpenAPIModelName()}, } } @@ -21264,7 +21346,7 @@ func schema_k8sio_api_core_v1_CSIVolumeSource(ref common.ReferenceCallback) comm "nodePublishSecretRef": { SchemaProps: spec.SchemaProps{ Description: "nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(corev1.LocalObjectReference{}.OpenAPIModelName()), }, }, }, @@ -21272,7 +21354,7 @@ func schema_k8sio_api_core_v1_CSIVolumeSource(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + corev1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -21380,7 +21462,7 @@ func schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref common.ReferenceC "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(corev1.SecretReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -21395,7 +21477,7 @@ func schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + corev1.SecretReference{}.OpenAPIModelName()}, } } @@ -21450,7 +21532,7 @@ func schema_k8sio_api_core_v1_CephFSVolumeSource(ref common.ReferenceCallback) c "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(corev1.LocalObjectReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -21465,7 +21547,7 @@ func schema_k8sio_api_core_v1_CephFSVolumeSource(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + corev1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -21501,7 +21583,7 @@ func schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref common.ReferenceC "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is Optional: points to a secret object containing parameters used to connect to OpenStack.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(corev1.SecretReference{}.OpenAPIModelName()), }, }, }, @@ -21509,7 +21591,7 @@ func schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + corev1.SecretReference{}.OpenAPIModelName()}, } } @@ -21545,7 +21627,7 @@ func schema_k8sio_api_core_v1_CinderVolumeSource(ref common.ReferenceCallback) c "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(corev1.LocalObjectReference{}.OpenAPIModelName()), }, }, }, @@ -21553,7 +21635,7 @@ func schema_k8sio_api_core_v1_CinderVolumeSource(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + corev1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -21601,7 +21683,7 @@ func schema_k8sio_api_core_v1_ClusterTrustBundleProjection(ref common.ReferenceC "labelSelector": { SchemaProps: spec.SchemaProps{ Description: "Select all ClusterTrustBundles that match this label selector. Only has effect if signerName is set. Mutually-exclusive with name. If unset, interpreted as \"match nothing\". If set but empty, interpreted as \"match everything\".", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "optional": { @@ -21624,7 +21706,7 @@ func schema_k8sio_api_core_v1_ClusterTrustBundleProjection(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -21697,7 +21779,7 @@ func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "conditions": { @@ -21718,7 +21800,7 @@ func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ComponentCondition"), + Ref: ref(corev1.ComponentCondition{}.OpenAPIModelName()), }, }, }, @@ -21728,7 +21810,7 @@ func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ComponentCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.ComponentCondition{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -21757,7 +21839,7 @@ func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -21768,7 +21850,7 @@ func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ComponentStatus"), + Ref: ref(corev1.ComponentStatus{}.OpenAPIModelName()), }, }, }, @@ -21779,7 +21861,7 @@ func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ComponentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.ComponentStatus{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -21808,7 +21890,7 @@ func schema_k8sio_api_core_v1_ConfigMap(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "immutable": { @@ -21853,7 +21935,7 @@ func schema_k8sio_api_core_v1_ConfigMap(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -21952,7 +22034,7 @@ func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -21963,7 +22045,7 @@ func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ConfigMap"), + Ref: ref(corev1.ConfigMap{}.OpenAPIModelName()), }, }, }, @@ -21974,7 +22056,7 @@ func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMap", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.ConfigMap{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -22058,7 +22140,7 @@ func schema_k8sio_api_core_v1_ConfigMapProjection(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Ref: ref(corev1.KeyToPath{}.OpenAPIModelName()), }, }, }, @@ -22075,7 +22157,7 @@ func schema_k8sio_api_core_v1_ConfigMapProjection(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, + corev1.KeyToPath{}.OpenAPIModelName()}, } } @@ -22107,7 +22189,7 @@ func schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Ref: ref(corev1.KeyToPath{}.OpenAPIModelName()), }, }, }, @@ -22131,7 +22213,7 @@ func schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, + corev1.KeyToPath{}.OpenAPIModelName()}, } } @@ -22223,7 +22305,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerPort"), + Ref: ref(corev1.ContainerPort{}.OpenAPIModelName()), }, }, }, @@ -22242,7 +22324,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + Ref: ref(corev1.EnvFromSource{}.OpenAPIModelName()), }, }, }, @@ -22266,7 +22348,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvVar"), + Ref: ref(corev1.EnvVar{}.OpenAPIModelName()), }, }, }, @@ -22276,7 +22358,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Ref: ref(corev1.ResourceRequirements{}.OpenAPIModelName()), }, }, "resizePolicy": { @@ -22292,7 +22374,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerResizePolicy"), + Ref: ref(corev1.ContainerResizePolicy{}.OpenAPIModelName()), }, }, }, @@ -22318,7 +22400,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerRestartRule"), + Ref: ref(corev1.ContainerRestartRule{}.OpenAPIModelName()), }, }, }, @@ -22342,7 +22424,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMount"), + Ref: ref(corev1.VolumeMount{}.OpenAPIModelName()), }, }, }, @@ -22366,7 +22448,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + Ref: ref(corev1.VolumeDevice{}.OpenAPIModelName()), }, }, }, @@ -22375,25 +22457,25 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope "livenessProbe": { SchemaProps: spec.SchemaProps{ Description: "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(corev1.Probe{}.OpenAPIModelName()), }, }, "readinessProbe": { SchemaProps: spec.SchemaProps{ Description: "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(corev1.Probe{}.OpenAPIModelName()), }, }, "startupProbe": { SchemaProps: spec.SchemaProps{ Description: "StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(corev1.Probe{}.OpenAPIModelName()), }, }, "lifecycle": { SchemaProps: spec.SchemaProps{ Description: "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), + Ref: ref(corev1.Lifecycle{}.OpenAPIModelName()), }, }, "terminationMessagePath": { @@ -22422,7 +22504,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope "securityContext": { SchemaProps: spec.SchemaProps{ Description: "SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), + Ref: ref(corev1.SecurityContext{}.OpenAPIModelName()), }, }, "stdin": { @@ -22451,7 +22533,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.ContainerResizePolicy", "k8s.io/api/core/v1.ContainerRestartRule", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + corev1.ContainerPort{}.OpenAPIModelName(), corev1.ContainerResizePolicy{}.OpenAPIModelName(), corev1.ContainerRestartRule{}.OpenAPIModelName(), corev1.EnvFromSource{}.OpenAPIModelName(), corev1.EnvVar{}.OpenAPIModelName(), corev1.Lifecycle{}.OpenAPIModelName(), corev1.Probe{}.OpenAPIModelName(), corev1.ResourceRequirements{}.OpenAPIModelName(), corev1.SecurityContext{}.OpenAPIModelName(), corev1.VolumeDevice{}.OpenAPIModelName(), corev1.VolumeMount{}.OpenAPIModelName()}, } } @@ -22632,7 +22714,7 @@ func schema_k8sio_api_core_v1_ContainerRestartRule(ref common.ReferenceCallback) "exitCodes": { SchemaProps: spec.SchemaProps{ Description: "Represents the exit codes to check on container exits.", - Ref: ref("k8s.io/api/core/v1.ContainerRestartRuleOnExitCodes"), + Ref: ref(corev1.ContainerRestartRuleOnExitCodes{}.OpenAPIModelName()), }, }, }, @@ -22640,7 +22722,7 @@ func schema_k8sio_api_core_v1_ContainerRestartRule(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerRestartRuleOnExitCodes"}, + corev1.ContainerRestartRuleOnExitCodes{}.OpenAPIModelName()}, } } @@ -22695,26 +22777,26 @@ func schema_k8sio_api_core_v1_ContainerState(ref common.ReferenceCallback) commo "waiting": { SchemaProps: spec.SchemaProps{ Description: "Details about a waiting container", - Ref: ref("k8s.io/api/core/v1.ContainerStateWaiting"), + Ref: ref(corev1.ContainerStateWaiting{}.OpenAPIModelName()), }, }, "running": { SchemaProps: spec.SchemaProps{ Description: "Details about a running container", - Ref: ref("k8s.io/api/core/v1.ContainerStateRunning"), + Ref: ref(corev1.ContainerStateRunning{}.OpenAPIModelName()), }, }, "terminated": { SchemaProps: spec.SchemaProps{ Description: "Details about a terminated container", - Ref: ref("k8s.io/api/core/v1.ContainerStateTerminated"), + Ref: ref(corev1.ContainerStateTerminated{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerStateRunning", "k8s.io/api/core/v1.ContainerStateTerminated", "k8s.io/api/core/v1.ContainerStateWaiting"}, + corev1.ContainerStateRunning{}.OpenAPIModelName(), corev1.ContainerStateTerminated{}.OpenAPIModelName(), corev1.ContainerStateWaiting{}.OpenAPIModelName()}, } } @@ -22728,14 +22810,14 @@ func schema_k8sio_api_core_v1_ContainerStateRunning(ref common.ReferenceCallback "startedAt": { SchemaProps: spec.SchemaProps{ Description: "Time at which the container was last (re-)started", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -22778,13 +22860,13 @@ func schema_k8sio_api_core_v1_ContainerStateTerminated(ref common.ReferenceCallb "startedAt": { SchemaProps: spec.SchemaProps{ Description: "Time at which previous execution of the container started", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "finishedAt": { SchemaProps: spec.SchemaProps{ Description: "Time at which the container last terminated", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "containerID": { @@ -22799,7 +22881,7 @@ func schema_k8sio_api_core_v1_ContainerStateTerminated(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -22849,14 +22931,14 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "State holds details about the container's current condition.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerState"), + Ref: ref(corev1.ContainerState{}.OpenAPIModelName()), }, }, "lastState": { SchemaProps: spec.SchemaProps{ Description: "LastTerminationState holds the last termination state of the container to help debug container crashes and restarts. This field is not populated if the container is still running and RestartCount is 0.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerState"), + Ref: ref(corev1.ContainerState{}.OpenAPIModelName()), }, }, "ready": { @@ -22913,7 +22995,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -22922,7 +23004,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm "resources": { SchemaProps: spec.SchemaProps{ Description: "Resources represents the compute resource requests and limits that have been successfully enacted on the running container after it has been started or has been successfully resized.", - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Ref: ref(corev1.ResourceRequirements{}.OpenAPIModelName()), }, }, "volumeMounts": { @@ -22943,7 +23025,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMountStatus"), + Ref: ref(corev1.VolumeMountStatus{}.OpenAPIModelName()), }, }, }, @@ -22952,7 +23034,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm "user": { SchemaProps: spec.SchemaProps{ Description: "User represents user identity information initially attached to the first process of the container", - Ref: ref("k8s.io/api/core/v1.ContainerUser"), + Ref: ref(corev1.ContainerUser{}.OpenAPIModelName()), }, }, "allocatedResourcesStatus": { @@ -22973,7 +23055,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceStatus"), + Ref: ref(corev1.ResourceStatus{}.OpenAPIModelName()), }, }, }, @@ -22992,7 +23074,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerState", "k8s.io/api/core/v1.ContainerUser", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.ResourceStatus", "k8s.io/api/core/v1.VolumeMountStatus", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + corev1.ContainerState{}.OpenAPIModelName(), corev1.ContainerUser{}.OpenAPIModelName(), corev1.ResourceRequirements{}.OpenAPIModelName(), corev1.ResourceStatus{}.OpenAPIModelName(), corev1.VolumeMountStatus{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -23006,14 +23088,14 @@ func schema_k8sio_api_core_v1_ContainerUser(ref common.ReferenceCallback) common "linux": { SchemaProps: spec.SchemaProps{ Description: "Linux holds user identity information initially attached to the first process of the containers in Linux. Note that the actual running identity can be changed if the process has enough privilege to do so.", - Ref: ref("k8s.io/api/core/v1.LinuxContainerUser"), + Ref: ref(corev1.LinuxContainerUser{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LinuxContainerUser"}, + corev1.LinuxContainerUser{}.OpenAPIModelName()}, } } @@ -23059,7 +23141,7 @@ func schema_k8sio_api_core_v1_DownwardAPIProjection(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), + Ref: ref(corev1.DownwardAPIVolumeFile{}.OpenAPIModelName()), }, }, }, @@ -23069,7 +23151,7 @@ func schema_k8sio_api_core_v1_DownwardAPIProjection(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, + corev1.DownwardAPIVolumeFile{}.OpenAPIModelName()}, } } @@ -23091,13 +23173,13 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref common.ReferenceCallback "fieldRef": { SchemaProps: spec.SchemaProps{ Description: "Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported.", - Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), + Ref: ref(corev1.ObjectFieldSelector{}.OpenAPIModelName()), }, }, "resourceFieldRef": { SchemaProps: spec.SchemaProps{ Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", - Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), + Ref: ref(corev1.ResourceFieldSelector{}.OpenAPIModelName()), }, }, "mode": { @@ -23112,7 +23194,7 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector"}, + corev1.ObjectFieldSelector{}.OpenAPIModelName(), corev1.ResourceFieldSelector{}.OpenAPIModelName()}, } } @@ -23136,7 +23218,7 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), + Ref: ref(corev1.DownwardAPIVolumeFile{}.OpenAPIModelName()), }, }, }, @@ -23153,7 +23235,7 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, + corev1.DownwardAPIVolumeFile{}.OpenAPIModelName()}, } } @@ -23174,14 +23256,14 @@ func schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref common.ReferenceCallback) "sizeLimit": { SchemaProps: spec.SchemaProps{ Description: "sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -23217,7 +23299,7 @@ func schema_k8sio_api_core_v1_EndpointAddress(ref common.ReferenceCallback) comm "targetRef": { SchemaProps: spec.SchemaProps{ Description: "Reference to object providing the endpoint.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, }, @@ -23230,7 +23312,7 @@ func schema_k8sio_api_core_v1_EndpointAddress(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, + corev1.ObjectReference{}.OpenAPIModelName()}, } } @@ -23303,7 +23385,7 @@ func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), + Ref: ref(corev1.EndpointAddress{}.OpenAPIModelName()), }, }, }, @@ -23322,7 +23404,7 @@ func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), + Ref: ref(corev1.EndpointAddress{}.OpenAPIModelName()), }, }, }, @@ -23341,7 +23423,7 @@ func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointPort"), + Ref: ref(corev1.EndpointPort{}.OpenAPIModelName()), }, }, }, @@ -23351,7 +23433,7 @@ func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EndpointAddress", "k8s.io/api/core/v1.EndpointPort"}, + corev1.EndpointAddress{}.OpenAPIModelName(), corev1.EndpointPort{}.OpenAPIModelName()}, } } @@ -23380,7 +23462,7 @@ func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "subsets": { @@ -23396,7 +23478,7 @@ func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointSubset"), + Ref: ref(corev1.EndpointSubset{}.OpenAPIModelName()), }, }, }, @@ -23406,7 +23488,7 @@ func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EndpointSubset", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.EndpointSubset{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -23435,7 +23517,7 @@ func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -23446,7 +23528,7 @@ func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Endpoints"), + Ref: ref(corev1.Endpoints{}.OpenAPIModelName()), }, }, }, @@ -23457,7 +23539,7 @@ func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Endpoints", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.Endpoints{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -23478,20 +23560,20 @@ func schema_k8sio_api_core_v1_EnvFromSource(ref common.ReferenceCallback) common "configMapRef": { SchemaProps: spec.SchemaProps{ Description: "The ConfigMap to select from", - Ref: ref("k8s.io/api/core/v1.ConfigMapEnvSource"), + Ref: ref(corev1.ConfigMapEnvSource{}.OpenAPIModelName()), }, }, "secretRef": { SchemaProps: spec.SchemaProps{ Description: "The Secret to select from", - Ref: ref("k8s.io/api/core/v1.SecretEnvSource"), + Ref: ref(corev1.SecretEnvSource{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapEnvSource", "k8s.io/api/core/v1.SecretEnvSource"}, + corev1.ConfigMapEnvSource{}.OpenAPIModelName(), corev1.SecretEnvSource{}.OpenAPIModelName()}, } } @@ -23520,7 +23602,7 @@ func schema_k8sio_api_core_v1_EnvVar(ref common.ReferenceCallback) common.OpenAP "valueFrom": { SchemaProps: spec.SchemaProps{ Description: "Source for the environment variable's value. Cannot be used if value is not empty.", - Ref: ref("k8s.io/api/core/v1.EnvVarSource"), + Ref: ref(corev1.EnvVarSource{}.OpenAPIModelName()), }, }, }, @@ -23528,7 +23610,7 @@ func schema_k8sio_api_core_v1_EnvVar(ref common.ReferenceCallback) common.OpenAP }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EnvVarSource"}, + corev1.EnvVarSource{}.OpenAPIModelName()}, } } @@ -23542,38 +23624,38 @@ func schema_k8sio_api_core_v1_EnvVarSource(ref common.ReferenceCallback) common. "fieldRef": { SchemaProps: spec.SchemaProps{ Description: "Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.", - Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), + Ref: ref(corev1.ObjectFieldSelector{}.OpenAPIModelName()), }, }, "resourceFieldRef": { SchemaProps: spec.SchemaProps{ Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.", - Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), + Ref: ref(corev1.ResourceFieldSelector{}.OpenAPIModelName()), }, }, "configMapKeyRef": { SchemaProps: spec.SchemaProps{ Description: "Selects a key of a ConfigMap.", - Ref: ref("k8s.io/api/core/v1.ConfigMapKeySelector"), + Ref: ref(corev1.ConfigMapKeySelector{}.OpenAPIModelName()), }, }, "secretKeyRef": { SchemaProps: spec.SchemaProps{ Description: "Selects a key of a secret in the pod's namespace", - Ref: ref("k8s.io/api/core/v1.SecretKeySelector"), + Ref: ref(corev1.SecretKeySelector{}.OpenAPIModelName()), }, }, "fileKeyRef": { SchemaProps: spec.SchemaProps{ Description: "FileKeyRef selects a key of the env file. Requires the EnvFiles feature gate to be enabled.", - Ref: ref("k8s.io/api/core/v1.FileKeySelector"), + Ref: ref(corev1.FileKeySelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapKeySelector", "k8s.io/api/core/v1.FileKeySelector", "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector", "k8s.io/api/core/v1.SecretKeySelector"}, + corev1.ConfigMapKeySelector{}.OpenAPIModelName(), corev1.FileKeySelector{}.OpenAPIModelName(), corev1.ObjectFieldSelector{}.OpenAPIModelName(), corev1.ResourceFieldSelector{}.OpenAPIModelName(), corev1.SecretKeySelector{}.OpenAPIModelName()}, } } @@ -23665,7 +23747,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerPort"), + Ref: ref(corev1.ContainerPort{}.OpenAPIModelName()), }, }, }, @@ -23684,7 +23766,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + Ref: ref(corev1.EnvFromSource{}.OpenAPIModelName()), }, }, }, @@ -23708,7 +23790,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvVar"), + Ref: ref(corev1.EnvVar{}.OpenAPIModelName()), }, }, }, @@ -23718,7 +23800,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Ref: ref(corev1.ResourceRequirements{}.OpenAPIModelName()), }, }, "resizePolicy": { @@ -23734,7 +23816,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerResizePolicy"), + Ref: ref(corev1.ContainerResizePolicy{}.OpenAPIModelName()), }, }, }, @@ -23760,7 +23842,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerRestartRule"), + Ref: ref(corev1.ContainerRestartRule{}.OpenAPIModelName()), }, }, }, @@ -23784,7 +23866,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMount"), + Ref: ref(corev1.VolumeMount{}.OpenAPIModelName()), }, }, }, @@ -23808,7 +23890,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + Ref: ref(corev1.VolumeDevice{}.OpenAPIModelName()), }, }, }, @@ -23817,25 +23899,25 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c "livenessProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(corev1.Probe{}.OpenAPIModelName()), }, }, "readinessProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(corev1.Probe{}.OpenAPIModelName()), }, }, "startupProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(corev1.Probe{}.OpenAPIModelName()), }, }, "lifecycle": { SchemaProps: spec.SchemaProps{ Description: "Lifecycle is not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), + Ref: ref(corev1.Lifecycle{}.OpenAPIModelName()), }, }, "terminationMessagePath": { @@ -23864,7 +23946,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c "securityContext": { SchemaProps: spec.SchemaProps{ Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), + Ref: ref(corev1.SecurityContext{}.OpenAPIModelName()), }, }, "stdin": { @@ -23900,7 +23982,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.ContainerResizePolicy", "k8s.io/api/core/v1.ContainerRestartRule", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + corev1.ContainerPort{}.OpenAPIModelName(), corev1.ContainerResizePolicy{}.OpenAPIModelName(), corev1.ContainerRestartRule{}.OpenAPIModelName(), corev1.EnvFromSource{}.OpenAPIModelName(), corev1.EnvVar{}.OpenAPIModelName(), corev1.Lifecycle{}.OpenAPIModelName(), corev1.Probe{}.OpenAPIModelName(), corev1.ResourceRequirements{}.OpenAPIModelName(), corev1.SecurityContext{}.OpenAPIModelName(), corev1.VolumeDevice{}.OpenAPIModelName(), corev1.VolumeMount{}.OpenAPIModelName()}, } } @@ -23992,7 +24074,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerPort"), + Ref: ref(corev1.ContainerPort{}.OpenAPIModelName()), }, }, }, @@ -24011,7 +24093,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + Ref: ref(corev1.EnvFromSource{}.OpenAPIModelName()), }, }, }, @@ -24035,7 +24117,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvVar"), + Ref: ref(corev1.EnvVar{}.OpenAPIModelName()), }, }, }, @@ -24045,7 +24127,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Ref: ref(corev1.ResourceRequirements{}.OpenAPIModelName()), }, }, "resizePolicy": { @@ -24061,7 +24143,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerResizePolicy"), + Ref: ref(corev1.ContainerResizePolicy{}.OpenAPIModelName()), }, }, }, @@ -24087,7 +24169,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerRestartRule"), + Ref: ref(corev1.ContainerRestartRule{}.OpenAPIModelName()), }, }, }, @@ -24111,7 +24193,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMount"), + Ref: ref(corev1.VolumeMount{}.OpenAPIModelName()), }, }, }, @@ -24135,7 +24217,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + Ref: ref(corev1.VolumeDevice{}.OpenAPIModelName()), }, }, }, @@ -24144,25 +24226,25 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb "livenessProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(corev1.Probe{}.OpenAPIModelName()), }, }, "readinessProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(corev1.Probe{}.OpenAPIModelName()), }, }, "startupProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(corev1.Probe{}.OpenAPIModelName()), }, }, "lifecycle": { SchemaProps: spec.SchemaProps{ Description: "Lifecycle is not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), + Ref: ref(corev1.Lifecycle{}.OpenAPIModelName()), }, }, "terminationMessagePath": { @@ -24191,7 +24273,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb "securityContext": { SchemaProps: spec.SchemaProps{ Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), + Ref: ref(corev1.SecurityContext{}.OpenAPIModelName()), }, }, "stdin": { @@ -24220,7 +24302,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.ContainerResizePolicy", "k8s.io/api/core/v1.ContainerRestartRule", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + corev1.ContainerPort{}.OpenAPIModelName(), corev1.ContainerResizePolicy{}.OpenAPIModelName(), corev1.ContainerRestartRule{}.OpenAPIModelName(), corev1.EnvFromSource{}.OpenAPIModelName(), corev1.EnvVar{}.OpenAPIModelName(), corev1.Lifecycle{}.OpenAPIModelName(), corev1.Probe{}.OpenAPIModelName(), corev1.ResourceRequirements{}.OpenAPIModelName(), corev1.SecurityContext{}.OpenAPIModelName(), corev1.VolumeDevice{}.OpenAPIModelName(), corev1.VolumeMount{}.OpenAPIModelName()}, } } @@ -24234,14 +24316,14 @@ func schema_k8sio_api_core_v1_EphemeralVolumeSource(ref common.ReferenceCallback "volumeClaimTemplate": { SchemaProps: spec.SchemaProps{ Description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes to the PVC after it has been created.\n\nRequired, must not be nil.", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimTemplate"), + Ref: ref(corev1.PersistentVolumeClaimTemplate{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimTemplate"}, + corev1.PersistentVolumeClaimTemplate{}.OpenAPIModelName()}, } } @@ -24270,14 +24352,14 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "involvedObject": { SchemaProps: spec.SchemaProps{ Description: "The object that this event is about.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, "reason": { @@ -24298,19 +24380,19 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI SchemaProps: spec.SchemaProps{ Description: "The component reporting this event. Should be a short machine understandable string.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EventSource"), + Ref: ref(corev1.EventSource{}.OpenAPIModelName()), }, }, "firstTimestamp": { SchemaProps: spec.SchemaProps{ Description: "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTimestamp": { SchemaProps: spec.SchemaProps{ Description: "The time at which the most recent occurrence of this event was recorded.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "count": { @@ -24330,13 +24412,13 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI "eventTime": { SchemaProps: spec.SchemaProps{ Description: "Time when this Event was first observed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, "series": { SchemaProps: spec.SchemaProps{ Description: "Data about the Event series this event represents or nil if it's a singleton Event.", - Ref: ref("k8s.io/api/core/v1.EventSeries"), + Ref: ref(corev1.EventSeries{}.OpenAPIModelName()), }, }, "action": { @@ -24349,7 +24431,7 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI "related": { SchemaProps: spec.SchemaProps{ Description: "Optional secondary object for more complex actions.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, "reportingComponent": { @@ -24373,7 +24455,7 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EventSeries", "k8s.io/api/core/v1.EventSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + corev1.EventSeries{}.OpenAPIModelName(), corev1.EventSource{}.OpenAPIModelName(), corev1.ObjectReference{}.OpenAPIModelName(), metav1.MicroTime{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -24402,7 +24484,7 @@ func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -24413,7 +24495,7 @@ func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Event"), + Ref: ref(corev1.Event{}.OpenAPIModelName()), }, }, }, @@ -24424,7 +24506,7 @@ func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Event", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.Event{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -24445,14 +24527,14 @@ func schema_k8sio_api_core_v1_EventSeries(ref common.ReferenceCallback) common.O "lastObservedTime": { SchemaProps: spec.SchemaProps{ Description: "Time of the last occurrence observed", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + metav1.MicroTime{}.OpenAPIModelName()}, } } @@ -24666,7 +24748,7 @@ func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCal "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(corev1.SecretReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -24697,7 +24779,7 @@ func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + corev1.SecretReference{}.OpenAPIModelName()}, } } @@ -24726,7 +24808,7 @@ func schema_k8sio_api_core_v1_FlexVolumeSource(ref common.ReferenceCallback) com "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(corev1.LocalObjectReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -24757,7 +24839,7 @@ func schema_k8sio_api_core_v1_FlexVolumeSource(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + corev1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -24995,7 +25077,7 @@ func schema_k8sio_api_core_v1_HTTPGetAction(ref common.ReferenceCallback) common "port": { SchemaProps: spec.SchemaProps{ Description: "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "host": { @@ -25026,7 +25108,7 @@ func schema_k8sio_api_core_v1_HTTPGetAction(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.HTTPHeader"), + Ref: ref(corev1.HTTPHeader{}.OpenAPIModelName()), }, }, }, @@ -25037,7 +25119,7 @@ func schema_k8sio_api_core_v1_HTTPGetAction(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.HTTPHeader", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + corev1.HTTPHeader{}.OpenAPIModelName(), intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -25255,7 +25337,7 @@ func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCa "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is the CHAP Secret for iSCSI target and initiator authentication", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(corev1.SecretReference{}.OpenAPIModelName()), }, }, "initiatorName": { @@ -25270,7 +25352,7 @@ func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + corev1.SecretReference{}.OpenAPIModelName()}, } } @@ -25364,7 +25446,7 @@ func schema_k8sio_api_core_v1_ISCSIVolumeSource(ref common.ReferenceCallback) co "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is the CHAP Secret for iSCSI target and initiator authentication", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(corev1.LocalObjectReference{}.OpenAPIModelName()), }, }, "initiatorName": { @@ -25379,7 +25461,7 @@ func schema_k8sio_api_core_v1_ISCSIVolumeSource(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + corev1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -25458,13 +25540,13 @@ func schema_k8sio_api_core_v1_Lifecycle(ref common.ReferenceCallback) common.Ope "postStart": { SchemaProps: spec.SchemaProps{ Description: "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - Ref: ref("k8s.io/api/core/v1.LifecycleHandler"), + Ref: ref(corev1.LifecycleHandler{}.OpenAPIModelName()), }, }, "preStop": { SchemaProps: spec.SchemaProps{ Description: "PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - Ref: ref("k8s.io/api/core/v1.LifecycleHandler"), + Ref: ref(corev1.LifecycleHandler{}.OpenAPIModelName()), }, }, "stopSignal": { @@ -25479,7 +25561,7 @@ func schema_k8sio_api_core_v1_Lifecycle(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LifecycleHandler"}, + corev1.LifecycleHandler{}.OpenAPIModelName()}, } } @@ -25493,32 +25575,32 @@ func schema_k8sio_api_core_v1_LifecycleHandler(ref common.ReferenceCallback) com "exec": { SchemaProps: spec.SchemaProps{ Description: "Exec specifies a command to execute in the container.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), + Ref: ref(corev1.ExecAction{}.OpenAPIModelName()), }, }, "httpGet": { SchemaProps: spec.SchemaProps{ Description: "HTTPGet specifies an HTTP GET request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + Ref: ref(corev1.HTTPGetAction{}.OpenAPIModelName()), }, }, "tcpSocket": { SchemaProps: spec.SchemaProps{ Description: "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for backward compatibility. There is no validation of this field and lifecycle hooks will fail at runtime when it is specified.", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + Ref: ref(corev1.TCPSocketAction{}.OpenAPIModelName()), }, }, "sleep": { SchemaProps: spec.SchemaProps{ Description: "Sleep represents a duration that the container should sleep.", - Ref: ref("k8s.io/api/core/v1.SleepAction"), + Ref: ref(corev1.SleepAction{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.SleepAction", "k8s.io/api/core/v1.TCPSocketAction"}, + corev1.ExecAction{}.OpenAPIModelName(), corev1.HTTPGetAction{}.OpenAPIModelName(), corev1.SleepAction{}.OpenAPIModelName(), corev1.TCPSocketAction{}.OpenAPIModelName()}, } } @@ -25547,21 +25629,21 @@ func schema_k8sio_api_core_v1_LimitRange(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LimitRangeSpec"), + Ref: ref(corev1.LimitRangeSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LimitRangeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.LimitRangeSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -25588,7 +25670,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -25602,7 +25684,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -25616,7 +25698,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -25630,7 +25712,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -25644,7 +25726,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -25655,7 +25737,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -25684,7 +25766,7 @@ func schema_k8sio_api_core_v1_LimitRangeList(ref common.ReferenceCallback) commo SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -25695,7 +25777,7 @@ func schema_k8sio_api_core_v1_LimitRangeList(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LimitRange"), + Ref: ref(corev1.LimitRange{}.OpenAPIModelName()), }, }, }, @@ -25706,7 +25788,7 @@ func schema_k8sio_api_core_v1_LimitRangeList(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LimitRange", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.LimitRange{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -25730,7 +25812,7 @@ func schema_k8sio_api_core_v1_LimitRangeSpec(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LimitRangeItem"), + Ref: ref(corev1.LimitRangeItem{}.OpenAPIModelName()), }, }, }, @@ -25741,7 +25823,7 @@ func schema_k8sio_api_core_v1_LimitRangeSpec(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LimitRangeItem"}, + corev1.LimitRangeItem{}.OpenAPIModelName()}, } } @@ -25820,7 +25902,7 @@ func schema_k8sio_api_core_v1_List(ref common.ReferenceCallback) common.OpenAPID SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -25830,7 +25912,7 @@ func schema_k8sio_api_core_v1_List(ref common.ReferenceCallback) common.OpenAPID Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -25841,7 +25923,7 @@ func schema_k8sio_api_core_v1_List(ref common.ReferenceCallback) common.OpenAPID }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.ListMeta{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -25886,7 +25968,7 @@ func schema_k8sio_api_core_v1_LoadBalancerIngress(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PortStatus"), + Ref: ref(corev1.PortStatus{}.OpenAPIModelName()), }, }, }, @@ -25896,7 +25978,7 @@ func schema_k8sio_api_core_v1_LoadBalancerIngress(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PortStatus"}, + corev1.PortStatus{}.OpenAPIModelName()}, } } @@ -25920,7 +26002,7 @@ func schema_k8sio_api_core_v1_LoadBalancerStatus(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LoadBalancerIngress"), + Ref: ref(corev1.LoadBalancerIngress{}.OpenAPIModelName()), }, }, }, @@ -25930,7 +26012,7 @@ func schema_k8sio_api_core_v1_LoadBalancerStatus(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerIngress"}, + corev1.LoadBalancerIngress{}.OpenAPIModelName()}, } } @@ -26081,28 +26163,28 @@ func schema_k8sio_api_core_v1_Namespace(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NamespaceSpec"), + Ref: ref(corev1.NamespaceSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NamespaceStatus"), + Ref: ref(corev1.NamespaceStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NamespaceSpec", "k8s.io/api/core/v1.NamespaceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.NamespaceSpec{}.OpenAPIModelName(), corev1.NamespaceStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -26132,7 +26214,7 @@ func schema_k8sio_api_core_v1_NamespaceCondition(ref common.ReferenceCallback) c "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -26154,7 +26236,7 @@ func schema_k8sio_api_core_v1_NamespaceCondition(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -26183,7 +26265,7 @@ func schema_k8sio_api_core_v1_NamespaceList(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -26194,7 +26276,7 @@ func schema_k8sio_api_core_v1_NamespaceList(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Namespace"), + Ref: ref(corev1.Namespace{}.OpenAPIModelName()), }, }, }, @@ -26205,7 +26287,7 @@ func schema_k8sio_api_core_v1_NamespaceList(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Namespace", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.Namespace{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -26275,7 +26357,7 @@ func schema_k8sio_api_core_v1_NamespaceStatus(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NamespaceCondition"), + Ref: ref(corev1.NamespaceCondition{}.OpenAPIModelName()), }, }, }, @@ -26285,7 +26367,7 @@ func schema_k8sio_api_core_v1_NamespaceStatus(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NamespaceCondition"}, + corev1.NamespaceCondition{}.OpenAPIModelName()}, } } @@ -26314,28 +26396,28 @@ func schema_k8sio_api_core_v1_Node(ref common.ReferenceCallback) common.OpenAPID SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSpec"), + Ref: ref(corev1.NodeSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeStatus"), + Ref: ref(corev1.NodeStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSpec", "k8s.io/api/core/v1.NodeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.NodeSpec{}.OpenAPIModelName(), corev1.NodeStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -26379,7 +26461,7 @@ func schema_k8sio_api_core_v1_NodeAffinity(ref common.ReferenceCallback) common. "requiredDuringSchedulingIgnoredDuringExecution": { SchemaProps: spec.SchemaProps{ Description: "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Ref: ref(corev1.NodeSelector{}.OpenAPIModelName()), }, }, "preferredDuringSchedulingIgnoredDuringExecution": { @@ -26395,7 +26477,7 @@ func schema_k8sio_api_core_v1_NodeAffinity(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PreferredSchedulingTerm"), + Ref: ref(corev1.PreferredSchedulingTerm{}.OpenAPIModelName()), }, }, }, @@ -26405,7 +26487,7 @@ func schema_k8sio_api_core_v1_NodeAffinity(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/core/v1.PreferredSchedulingTerm"}, + corev1.NodeSelector{}.OpenAPIModelName(), corev1.PreferredSchedulingTerm{}.OpenAPIModelName()}, } } @@ -26435,13 +26517,13 @@ func schema_k8sio_api_core_v1_NodeCondition(ref common.ReferenceCallback) common "lastHeartbeatTime": { SchemaProps: spec.SchemaProps{ Description: "Last time we got an update on a given condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transit from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -26463,7 +26545,7 @@ func schema_k8sio_api_core_v1_NodeCondition(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -26477,14 +26559,14 @@ func schema_k8sio_api_core_v1_NodeConfigSource(ref common.ReferenceCallback) com "configMap": { SchemaProps: spec.SchemaProps{ Description: "ConfigMap is a reference to a Node's ConfigMap", - Ref: ref("k8s.io/api/core/v1.ConfigMapNodeConfigSource"), + Ref: ref(corev1.ConfigMapNodeConfigSource{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapNodeConfigSource"}, + corev1.ConfigMapNodeConfigSource{}.OpenAPIModelName()}, } } @@ -26498,19 +26580,19 @@ func schema_k8sio_api_core_v1_NodeConfigStatus(ref common.ReferenceCallback) com "assigned": { SchemaProps: spec.SchemaProps{ Description: "Assigned reports the checkpointed config the node will try to use. When Node.Spec.ConfigSource is updated, the node checkpoints the associated config payload to local disk, along with a record indicating intended config. The node refers to this record to choose its config checkpoint, and reports this record in Assigned. Assigned only updates in the status after the record has been checkpointed to disk. When the Kubelet is restarted, it tries to make the Assigned config the Active config by loading and validating the checkpointed payload identified by Assigned.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + Ref: ref(corev1.NodeConfigSource{}.OpenAPIModelName()), }, }, "active": { SchemaProps: spec.SchemaProps{ Description: "Active reports the checkpointed config the node is actively using. Active will represent either the current version of the Assigned config, or the current LastKnownGood config, depending on whether attempting to use the Assigned config results in an error.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + Ref: ref(corev1.NodeConfigSource{}.OpenAPIModelName()), }, }, "lastKnownGood": { SchemaProps: spec.SchemaProps{ Description: "LastKnownGood reports the checkpointed config the node will fall back to when it encounters an error attempting to use the Assigned config. The Assigned config becomes the LastKnownGood config when the node determines that the Assigned config is stable and correct. This is currently implemented as a 10-minute soak period starting when the local record of Assigned config is updated. If the Assigned config is Active at the end of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, because the local default config is always assumed good. You should not make assumptions about the node's method of determining config stability and correctness, as this may change or become configurable in the future.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + Ref: ref(corev1.NodeConfigSource{}.OpenAPIModelName()), }, }, "error": { @@ -26524,7 +26606,7 @@ func schema_k8sio_api_core_v1_NodeConfigStatus(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeConfigSource"}, + corev1.NodeConfigSource{}.OpenAPIModelName()}, } } @@ -26539,14 +26621,14 @@ func schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Endpoint on which Kubelet is listening.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.DaemonEndpoint"), + Ref: ref(corev1.DaemonEndpoint{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.DaemonEndpoint"}, + corev1.DaemonEndpoint{}.OpenAPIModelName()}, } } @@ -26595,7 +26677,7 @@ func schema_k8sio_api_core_v1_NodeList(ref common.ReferenceCallback) common.Open SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -26606,7 +26688,7 @@ func schema_k8sio_api_core_v1_NodeList(ref common.ReferenceCallback) common.Open Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Node"), + Ref: ref(corev1.Node{}.OpenAPIModelName()), }, }, }, @@ -26617,7 +26699,7 @@ func schema_k8sio_api_core_v1_NodeList(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Node", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.Node{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -26673,14 +26755,14 @@ func schema_k8sio_api_core_v1_NodeRuntimeHandler(ref common.ReferenceCallback) c "features": { SchemaProps: spec.SchemaProps{ Description: "Supported features.", - Ref: ref("k8s.io/api/core/v1.NodeRuntimeHandlerFeatures"), + Ref: ref(corev1.NodeRuntimeHandlerFeatures{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeRuntimeHandlerFeatures"}, + corev1.NodeRuntimeHandlerFeatures{}.OpenAPIModelName()}, } } @@ -26731,7 +26813,7 @@ func schema_k8sio_api_core_v1_NodeSelector(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), + Ref: ref(corev1.NodeSelectorTerm{}.OpenAPIModelName()), }, }, }, @@ -26747,7 +26829,7 @@ func schema_k8sio_api_core_v1_NodeSelector(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorTerm"}, + corev1.NodeSelectorTerm{}.OpenAPIModelName()}, } } @@ -26822,7 +26904,7 @@ func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), + Ref: ref(corev1.NodeSelectorRequirement{}.OpenAPIModelName()), }, }, }, @@ -26841,7 +26923,7 @@ func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), + Ref: ref(corev1.NodeSelectorRequirement{}.OpenAPIModelName()), }, }, }, @@ -26856,7 +26938,7 @@ func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorRequirement"}, + corev1.NodeSelectorRequirement{}.OpenAPIModelName()}, } } @@ -26922,7 +27004,7 @@ func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.Open Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Taint"), + Ref: ref(corev1.Taint{}.OpenAPIModelName()), }, }, }, @@ -26931,7 +27013,7 @@ func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.Open "configSource": { SchemaProps: spec.SchemaProps{ Description: "Deprecated: Previously used to specify the source of the node's configuration for the DynamicKubeletConfig feature. This feature is removed.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + Ref: ref(corev1.NodeConfigSource{}.OpenAPIModelName()), }, }, "externalID": { @@ -26945,7 +27027,7 @@ func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeConfigSource", "k8s.io/api/core/v1.Taint"}, + corev1.NodeConfigSource{}.OpenAPIModelName(), corev1.Taint{}.OpenAPIModelName()}, } } @@ -26964,7 +27046,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -26978,7 +27060,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -27010,7 +27092,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeCondition"), + Ref: ref(corev1.NodeCondition{}.OpenAPIModelName()), }, }, }, @@ -27034,7 +27116,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeAddress"), + Ref: ref(corev1.NodeAddress{}.OpenAPIModelName()), }, }, }, @@ -27044,14 +27126,14 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "Endpoints of daemons running on the Node.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeDaemonEndpoints"), + Ref: ref(corev1.NodeDaemonEndpoints{}.OpenAPIModelName()), }, }, "nodeInfo": { SchemaProps: spec.SchemaProps{ Description: "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/reference/node/node-status/#info", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSystemInfo"), + Ref: ref(corev1.NodeSystemInfo{}.OpenAPIModelName()), }, }, "images": { @@ -27067,7 +27149,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerImage"), + Ref: ref(corev1.ContainerImage{}.OpenAPIModelName()), }, }, }, @@ -27106,7 +27188,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.AttachedVolume"), + Ref: ref(corev1.AttachedVolume{}.OpenAPIModelName()), }, }, }, @@ -27115,7 +27197,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op "config": { SchemaProps: spec.SchemaProps{ Description: "Status of the config assigned to the node via the dynamic Kubelet config feature.", - Ref: ref("k8s.io/api/core/v1.NodeConfigStatus"), + Ref: ref(corev1.NodeConfigStatus{}.OpenAPIModelName()), }, }, "runtimeHandlers": { @@ -27131,7 +27213,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeRuntimeHandler"), + Ref: ref(corev1.NodeRuntimeHandler{}.OpenAPIModelName()), }, }, }, @@ -27140,14 +27222,14 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op "features": { SchemaProps: spec.SchemaProps{ Description: "Features describes the set of features implemented by the CRI implementation.", - Ref: ref("k8s.io/api/core/v1.NodeFeatures"), + Ref: ref(corev1.NodeFeatures{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AttachedVolume", "k8s.io/api/core/v1.ContainerImage", "k8s.io/api/core/v1.NodeAddress", "k8s.io/api/core/v1.NodeCondition", "k8s.io/api/core/v1.NodeConfigStatus", "k8s.io/api/core/v1.NodeDaemonEndpoints", "k8s.io/api/core/v1.NodeFeatures", "k8s.io/api/core/v1.NodeRuntimeHandler", "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + corev1.AttachedVolume{}.OpenAPIModelName(), corev1.ContainerImage{}.OpenAPIModelName(), corev1.NodeAddress{}.OpenAPIModelName(), corev1.NodeCondition{}.OpenAPIModelName(), corev1.NodeConfigStatus{}.OpenAPIModelName(), corev1.NodeDaemonEndpoints{}.OpenAPIModelName(), corev1.NodeFeatures{}.OpenAPIModelName(), corev1.NodeRuntimeHandler{}.OpenAPIModelName(), corev1.NodeSystemInfo{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -27261,7 +27343,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo "swap": { SchemaProps: spec.SchemaProps{ Description: "Swap Info reported by the node.", - Ref: ref("k8s.io/api/core/v1.NodeSwapStatus"), + Ref: ref(corev1.NodeSwapStatus{}.OpenAPIModelName()), }, }, }, @@ -27269,7 +27351,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSwapStatus"}, + corev1.NodeSwapStatus{}.OpenAPIModelName()}, } } @@ -27399,28 +27481,28 @@ func schema_k8sio_api_core_v1_PersistentVolume(ref common.ReferenceCallback) com SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), + Ref: ref(corev1.PersistentVolumeSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeStatus"), + Ref: ref(corev1.PersistentVolumeStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeSpec", "k8s.io/api/core/v1.PersistentVolumeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.PersistentVolumeSpec{}.OpenAPIModelName(), corev1.PersistentVolumeStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -27449,28 +27531,28 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaim(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + Ref: ref(corev1.PersistentVolumeClaimSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimStatus"), + Ref: ref(corev1.PersistentVolumeClaimStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/api/core/v1.PersistentVolumeClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.PersistentVolumeClaimSpec{}.OpenAPIModelName(), corev1.PersistentVolumeClaimStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -27500,13 +27582,13 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref common.Referenc "lastProbeTime": { SchemaProps: spec.SchemaProps{ Description: "lastProbeTime is the time we probed the condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -27528,7 +27610,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -27557,7 +27639,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -27568,7 +27650,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), + Ref: ref(corev1.PersistentVolumeClaim{}.OpenAPIModelName()), }, }, }, @@ -27579,7 +27661,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.PersistentVolumeClaim{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -27614,14 +27696,14 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCall "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is a label query over volumes to consider for binding.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "resources": { SchemaProps: spec.SchemaProps{ - Description: "resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + Description: "resources represents the minimum resources the volume should have. Users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeResourceRequirements"), + Ref: ref(corev1.VolumeResourceRequirements{}.OpenAPIModelName()), }, }, "volumeName": { @@ -27649,13 +27731,13 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCall "dataSource": { SchemaProps: spec.SchemaProps{ Description: "dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.", - Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + Ref: ref(corev1.TypedLocalObjectReference{}.OpenAPIModelName()), }, }, "dataSourceRef": { SchemaProps: spec.SchemaProps{ Description: "dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef\n allows any non-core object, as well as PersistentVolumeClaim objects.\n* While dataSource ignores disallowed values (dropping them), dataSourceRef\n preserves all values, and generates an error if a disallowed value is\n specified.\n* While dataSource only allows local objects, dataSourceRef allows objects\n in any namespaces.\n(Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.", - Ref: ref("k8s.io/api/core/v1.TypedObjectReference"), + Ref: ref(corev1.TypedObjectReference{}.OpenAPIModelName()), }, }, "volumeAttributesClassName": { @@ -27669,7 +27751,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/api/core/v1.TypedObjectReference", "k8s.io/api/core/v1.VolumeResourceRequirements", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + corev1.TypedLocalObjectReference{}.OpenAPIModelName(), corev1.TypedObjectReference{}.OpenAPIModelName(), corev1.VolumeResourceRequirements{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -27717,7 +27799,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -27741,7 +27823,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimCondition"), + Ref: ref(corev1.PersistentVolumeClaimCondition{}.OpenAPIModelName()), }, }, }, @@ -27749,13 +27831,13 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa }, "allocatedResources": { SchemaProps: spec.SchemaProps{ - Description: "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + Description: "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -27768,7 +27850,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa }, }, SchemaProps: spec.SchemaProps{ - Description: "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + Description: "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, @@ -27793,14 +27875,14 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa "modifyVolumeStatus": { SchemaProps: spec.SchemaProps{ Description: "ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. When this is unset, there is no ModifyVolume operation being attempted.", - Ref: ref("k8s.io/api/core/v1.ModifyVolumeStatus"), + Ref: ref(corev1.ModifyVolumeStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ModifyVolumeStatus", "k8s.io/api/core/v1.PersistentVolumeClaimCondition", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + corev1.ModifyVolumeStatus{}.OpenAPIModelName(), corev1.PersistentVolumeClaimCondition{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -27815,14 +27897,14 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + Ref: ref(corev1.PersistentVolumeClaimSpec{}.OpenAPIModelName()), }, }, }, @@ -27830,7 +27912,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.PersistentVolumeClaimSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -27888,7 +27970,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeList(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -27899,7 +27981,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolume"), + Ref: ref(corev1.PersistentVolume{}.OpenAPIModelName()), }, }, }, @@ -27910,7 +27992,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolume", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.PersistentVolume{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -27924,140 +28006,140 @@ func schema_k8sio_api_core_v1_PersistentVolumeSource(ref common.ReferenceCallbac "gcePersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + Ref: ref(corev1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "awsElasticBlockStore": { SchemaProps: spec.SchemaProps{ Description: "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + Ref: ref(corev1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName()), }, }, "hostPath": { SchemaProps: spec.SchemaProps{ Description: "hostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + Ref: ref(corev1.HostPathVolumeSource{}.OpenAPIModelName()), }, }, "glusterfs": { SchemaProps: spec.SchemaProps{ Description: "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsPersistentVolumeSource"), + Ref: ref(corev1.GlusterfsPersistentVolumeSource{}.OpenAPIModelName()), }, }, "nfs": { SchemaProps: spec.SchemaProps{ Description: "nfs represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + Ref: ref(corev1.NFSVolumeSource{}.OpenAPIModelName()), }, }, "rbd": { SchemaProps: spec.SchemaProps{ Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), + Ref: ref(corev1.RBDPersistentVolumeSource{}.OpenAPIModelName()), }, }, "iscsi": { SchemaProps: spec.SchemaProps{ Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", - Ref: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), + Ref: ref(corev1.ISCSIPersistentVolumeSource{}.OpenAPIModelName()), }, }, "cinder": { SchemaProps: spec.SchemaProps{ Description: "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderPersistentVolumeSource"), + Ref: ref(corev1.CinderPersistentVolumeSource{}.OpenAPIModelName()), }, }, "cephfs": { SchemaProps: spec.SchemaProps{ Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), + Ref: ref(corev1.CephFSPersistentVolumeSource{}.OpenAPIModelName()), }, }, "fc": { SchemaProps: spec.SchemaProps{ Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + Ref: ref(corev1.FCVolumeSource{}.OpenAPIModelName()), }, }, "flocker": { SchemaProps: spec.SchemaProps{ Description: "flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + Ref: ref(corev1.FlockerVolumeSource{}.OpenAPIModelName()), }, }, "flexVolume": { SchemaProps: spec.SchemaProps{ Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", - Ref: ref("k8s.io/api/core/v1.FlexPersistentVolumeSource"), + Ref: ref(corev1.FlexPersistentVolumeSource{}.OpenAPIModelName()), }, }, "azureFile": { SchemaProps: spec.SchemaProps{ Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), + Ref: ref(corev1.AzureFilePersistentVolumeSource{}.OpenAPIModelName()), }, }, "vsphereVolume": { SchemaProps: spec.SchemaProps{ Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + Ref: ref(corev1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()), }, }, "quobyte": { SchemaProps: spec.SchemaProps{ Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + Ref: ref(corev1.QuobyteVolumeSource{}.OpenAPIModelName()), }, }, "azureDisk": { SchemaProps: spec.SchemaProps{ Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + Ref: ref(corev1.AzureDiskVolumeSource{}.OpenAPIModelName()), }, }, "photonPersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + Ref: ref(corev1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "portworxVolume": { SchemaProps: spec.SchemaProps{ Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + Ref: ref(corev1.PortworxVolumeSource{}.OpenAPIModelName()), }, }, "scaleIO": { SchemaProps: spec.SchemaProps{ Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), + Ref: ref(corev1.ScaleIOPersistentVolumeSource{}.OpenAPIModelName()), }, }, "local": { SchemaProps: spec.SchemaProps{ Description: "local represents directly-attached storage with node affinity", - Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), + Ref: ref(corev1.LocalVolumeSource{}.OpenAPIModelName()), }, }, "storageos": { SchemaProps: spec.SchemaProps{ Description: "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. More info: https://examples.k8s.io/volumes/storageos/README.md", - Ref: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), + Ref: ref(corev1.StorageOSPersistentVolumeSource{}.OpenAPIModelName()), }, }, "csi": { SchemaProps: spec.SchemaProps{ Description: "csi represents storage that is handled by an external CSI driver.", - Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), + Ref: ref(corev1.CSIPersistentVolumeSource{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderPersistentVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexPersistentVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + corev1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName(), corev1.AzureDiskVolumeSource{}.OpenAPIModelName(), corev1.AzureFilePersistentVolumeSource{}.OpenAPIModelName(), corev1.CSIPersistentVolumeSource{}.OpenAPIModelName(), corev1.CephFSPersistentVolumeSource{}.OpenAPIModelName(), corev1.CinderPersistentVolumeSource{}.OpenAPIModelName(), corev1.FCVolumeSource{}.OpenAPIModelName(), corev1.FlexPersistentVolumeSource{}.OpenAPIModelName(), corev1.FlockerVolumeSource{}.OpenAPIModelName(), corev1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName(), corev1.GlusterfsPersistentVolumeSource{}.OpenAPIModelName(), corev1.HostPathVolumeSource{}.OpenAPIModelName(), corev1.ISCSIPersistentVolumeSource{}.OpenAPIModelName(), corev1.LocalVolumeSource{}.OpenAPIModelName(), corev1.NFSVolumeSource{}.OpenAPIModelName(), corev1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName(), corev1.PortworxVolumeSource{}.OpenAPIModelName(), corev1.QuobyteVolumeSource{}.OpenAPIModelName(), corev1.RBDPersistentVolumeSource{}.OpenAPIModelName(), corev1.ScaleIOPersistentVolumeSource{}.OpenAPIModelName(), corev1.StorageOSPersistentVolumeSource{}.OpenAPIModelName(), corev1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()}, } } @@ -28076,7 +28158,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -28085,133 +28167,133 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) "gcePersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + Ref: ref(corev1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "awsElasticBlockStore": { SchemaProps: spec.SchemaProps{ Description: "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + Ref: ref(corev1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName()), }, }, "hostPath": { SchemaProps: spec.SchemaProps{ Description: "hostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + Ref: ref(corev1.HostPathVolumeSource{}.OpenAPIModelName()), }, }, "glusterfs": { SchemaProps: spec.SchemaProps{ Description: "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsPersistentVolumeSource"), + Ref: ref(corev1.GlusterfsPersistentVolumeSource{}.OpenAPIModelName()), }, }, "nfs": { SchemaProps: spec.SchemaProps{ Description: "nfs represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + Ref: ref(corev1.NFSVolumeSource{}.OpenAPIModelName()), }, }, "rbd": { SchemaProps: spec.SchemaProps{ Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), + Ref: ref(corev1.RBDPersistentVolumeSource{}.OpenAPIModelName()), }, }, "iscsi": { SchemaProps: spec.SchemaProps{ Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", - Ref: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), + Ref: ref(corev1.ISCSIPersistentVolumeSource{}.OpenAPIModelName()), }, }, "cinder": { SchemaProps: spec.SchemaProps{ Description: "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderPersistentVolumeSource"), + Ref: ref(corev1.CinderPersistentVolumeSource{}.OpenAPIModelName()), }, }, "cephfs": { SchemaProps: spec.SchemaProps{ Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), + Ref: ref(corev1.CephFSPersistentVolumeSource{}.OpenAPIModelName()), }, }, "fc": { SchemaProps: spec.SchemaProps{ Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + Ref: ref(corev1.FCVolumeSource{}.OpenAPIModelName()), }, }, "flocker": { SchemaProps: spec.SchemaProps{ Description: "flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + Ref: ref(corev1.FlockerVolumeSource{}.OpenAPIModelName()), }, }, "flexVolume": { SchemaProps: spec.SchemaProps{ Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", - Ref: ref("k8s.io/api/core/v1.FlexPersistentVolumeSource"), + Ref: ref(corev1.FlexPersistentVolumeSource{}.OpenAPIModelName()), }, }, "azureFile": { SchemaProps: spec.SchemaProps{ Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), + Ref: ref(corev1.AzureFilePersistentVolumeSource{}.OpenAPIModelName()), }, }, "vsphereVolume": { SchemaProps: spec.SchemaProps{ Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + Ref: ref(corev1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()), }, }, "quobyte": { SchemaProps: spec.SchemaProps{ Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + Ref: ref(corev1.QuobyteVolumeSource{}.OpenAPIModelName()), }, }, "azureDisk": { SchemaProps: spec.SchemaProps{ Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + Ref: ref(corev1.AzureDiskVolumeSource{}.OpenAPIModelName()), }, }, "photonPersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + Ref: ref(corev1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "portworxVolume": { SchemaProps: spec.SchemaProps{ Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + Ref: ref(corev1.PortworxVolumeSource{}.OpenAPIModelName()), }, }, "scaleIO": { SchemaProps: spec.SchemaProps{ Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), + Ref: ref(corev1.ScaleIOPersistentVolumeSource{}.OpenAPIModelName()), }, }, "local": { SchemaProps: spec.SchemaProps{ Description: "local represents directly-attached storage with node affinity", - Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), + Ref: ref(corev1.LocalVolumeSource{}.OpenAPIModelName()), }, }, "storageos": { SchemaProps: spec.SchemaProps{ Description: "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. More info: https://examples.k8s.io/volumes/storageos/README.md", - Ref: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), + Ref: ref(corev1.StorageOSPersistentVolumeSource{}.OpenAPIModelName()), }, }, "csi": { SchemaProps: spec.SchemaProps{ Description: "csi represents storage that is handled by an external CSI driver.", - Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), + Ref: ref(corev1.CSIPersistentVolumeSource{}.OpenAPIModelName()), }, }, "accessModes": { @@ -28243,7 +28325,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) }, SchemaProps: spec.SchemaProps{ Description: "claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, "persistentVolumeReclaimPolicy": { @@ -28292,7 +28374,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) "nodeAffinity": { SchemaProps: spec.SchemaProps{ Description: "nodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume.", - Ref: ref("k8s.io/api/core/v1.VolumeNodeAffinity"), + Ref: ref(corev1.VolumeNodeAffinity{}.OpenAPIModelName()), }, }, "volumeAttributesClassName": { @@ -28306,7 +28388,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderPersistentVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexPersistentVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VolumeNodeAffinity", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + corev1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName(), corev1.AzureDiskVolumeSource{}.OpenAPIModelName(), corev1.AzureFilePersistentVolumeSource{}.OpenAPIModelName(), corev1.CSIPersistentVolumeSource{}.OpenAPIModelName(), corev1.CephFSPersistentVolumeSource{}.OpenAPIModelName(), corev1.CinderPersistentVolumeSource{}.OpenAPIModelName(), corev1.FCVolumeSource{}.OpenAPIModelName(), corev1.FlexPersistentVolumeSource{}.OpenAPIModelName(), corev1.FlockerVolumeSource{}.OpenAPIModelName(), corev1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName(), corev1.GlusterfsPersistentVolumeSource{}.OpenAPIModelName(), corev1.HostPathVolumeSource{}.OpenAPIModelName(), corev1.ISCSIPersistentVolumeSource{}.OpenAPIModelName(), corev1.LocalVolumeSource{}.OpenAPIModelName(), corev1.NFSVolumeSource{}.OpenAPIModelName(), corev1.ObjectReference{}.OpenAPIModelName(), corev1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName(), corev1.PortworxVolumeSource{}.OpenAPIModelName(), corev1.QuobyteVolumeSource{}.OpenAPIModelName(), corev1.RBDPersistentVolumeSource{}.OpenAPIModelName(), corev1.ScaleIOPersistentVolumeSource{}.OpenAPIModelName(), corev1.StorageOSPersistentVolumeSource{}.OpenAPIModelName(), corev1.VolumeNodeAffinity{}.OpenAPIModelName(), corev1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -28342,14 +28424,14 @@ func schema_k8sio_api_core_v1_PersistentVolumeStatus(ref common.ReferenceCallbac "lastPhaseTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -28407,28 +28489,28 @@ func schema_k8sio_api_core_v1_Pod(ref common.ReferenceCallback) common.OpenAPIDe SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSpec"), + Ref: ref(corev1.PodSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodStatus"), + Ref: ref(corev1.PodStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodSpec", "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.PodSpec{}.OpenAPIModelName(), corev1.PodStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -28452,7 +28534,7 @@ func schema_k8sio_api_core_v1_PodAffinity(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + Ref: ref(corev1.PodAffinityTerm{}.OpenAPIModelName()), }, }, }, @@ -28471,7 +28553,7 @@ func schema_k8sio_api_core_v1_PodAffinity(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), + Ref: ref(corev1.WeightedPodAffinityTerm{}.OpenAPIModelName()), }, }, }, @@ -28481,7 +28563,7 @@ func schema_k8sio_api_core_v1_PodAffinity(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, + corev1.PodAffinityTerm{}.OpenAPIModelName(), corev1.WeightedPodAffinityTerm{}.OpenAPIModelName()}, } } @@ -28495,7 +28577,7 @@ func schema_k8sio_api_core_v1_PodAffinityTerm(ref common.ReferenceCallback) comm "labelSelector": { SchemaProps: spec.SchemaProps{ Description: "A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "namespaces": { @@ -28529,7 +28611,7 @@ func schema_k8sio_api_core_v1_PodAffinityTerm(ref common.ReferenceCallback) comm "namespaceSelector": { SchemaProps: spec.SchemaProps{ Description: "A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means \"this pod's namespace\". An empty selector ({}) matches all namespaces.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "matchLabelKeys": { @@ -28577,7 +28659,7 @@ func schema_k8sio_api_core_v1_PodAffinityTerm(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -28601,7 +28683,7 @@ func schema_k8sio_api_core_v1_PodAntiAffinity(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + Ref: ref(corev1.PodAffinityTerm{}.OpenAPIModelName()), }, }, }, @@ -28620,7 +28702,7 @@ func schema_k8sio_api_core_v1_PodAntiAffinity(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), + Ref: ref(corev1.WeightedPodAffinityTerm{}.OpenAPIModelName()), }, }, }, @@ -28630,7 +28712,7 @@ func schema_k8sio_api_core_v1_PodAntiAffinity(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, + corev1.PodAffinityTerm{}.OpenAPIModelName(), corev1.WeightedPodAffinityTerm{}.OpenAPIModelName()}, } } @@ -28769,7 +28851,7 @@ func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common. }, "observedGeneration": { SchemaProps: spec.SchemaProps{ - Description: "If set, this represents the .metadata.generation that the pod condition was set based upon. This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field.", + Description: "If set, this represents the .metadata.generation that the pod condition was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.", Type: []string{"integer"}, Format: "int64", }, @@ -28785,13 +28867,13 @@ func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common. "lastProbeTime": { SchemaProps: spec.SchemaProps{ Description: "Last time we probed the condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -28813,7 +28895,7 @@ func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -28877,7 +28959,7 @@ func schema_k8sio_api_core_v1_PodDNSConfig(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodDNSConfigOption"), + Ref: ref(corev1.PodDNSConfigOption{}.OpenAPIModelName()), }, }, }, @@ -28887,7 +28969,7 @@ func schema_k8sio_api_core_v1_PodDNSConfig(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodDNSConfigOption"}, + corev1.PodDNSConfigOption{}.OpenAPIModelName()}, } } @@ -29021,7 +29103,7 @@ func schema_k8sio_api_core_v1_PodExtendedResourceClaimStatus(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerExtendedResourceRequest"), + Ref: ref(corev1.ContainerExtendedResourceRequest{}.OpenAPIModelName()), }, }, }, @@ -29040,7 +29122,7 @@ func schema_k8sio_api_core_v1_PodExtendedResourceClaimStatus(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerExtendedResourceRequest"}, + corev1.ContainerExtendedResourceRequest{}.OpenAPIModelName()}, } } @@ -29091,7 +29173,7 @@ func schema_k8sio_api_core_v1_PodList(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -29102,7 +29184,7 @@ func schema_k8sio_api_core_v1_PodList(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Pod"), + Ref: ref(corev1.Pod{}.OpenAPIModelName()), }, }, }, @@ -29113,7 +29195,7 @@ func schema_k8sio_api_core_v1_PodList(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Pod", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.Pod{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -29169,7 +29251,7 @@ func schema_k8sio_api_core_v1_PodLogOptions(ref common.ReferenceCallback) common "sinceTime": { SchemaProps: spec.SchemaProps{ Description: "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "timestamps": { @@ -29211,7 +29293,7 @@ func schema_k8sio_api_core_v1_PodLogOptions(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -29437,13 +29519,13 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c "seLinuxOptions": { SchemaProps: spec.SchemaProps{ Description: "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), + Ref: ref(corev1.SELinuxOptions{}.OpenAPIModelName()), }, }, "windowsOptions": { SchemaProps: spec.SchemaProps{ Description: "The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.", - Ref: ref("k8s.io/api/core/v1.WindowsSecurityContextOptions"), + Ref: ref(corev1.WindowsSecurityContextOptions{}.OpenAPIModelName()), }, }, "runAsUser": { @@ -29515,7 +29597,7 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Sysctl"), + Ref: ref(corev1.Sysctl{}.OpenAPIModelName()), }, }, }, @@ -29532,13 +29614,13 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c "seccompProfile": { SchemaProps: spec.SchemaProps{ Description: "The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SeccompProfile"), + Ref: ref(corev1.SeccompProfile{}.OpenAPIModelName()), }, }, "appArmorProfile": { SchemaProps: spec.SchemaProps{ Description: "appArmorProfile is the AppArmor options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.AppArmorProfile"), + Ref: ref(corev1.AppArmorProfile{}.OpenAPIModelName()), }, }, "seLinuxChangePolicy": { @@ -29552,7 +29634,7 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AppArmorProfile", "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.SeccompProfile", "k8s.io/api/core/v1.Sysctl", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, + corev1.AppArmorProfile{}.OpenAPIModelName(), corev1.SELinuxOptions{}.OpenAPIModelName(), corev1.SeccompProfile{}.OpenAPIModelName(), corev1.Sysctl{}.OpenAPIModelName(), corev1.WindowsSecurityContextOptions{}.OpenAPIModelName()}, } } @@ -29566,14 +29648,14 @@ func schema_k8sio_api_core_v1_PodSignature(ref common.ReferenceCallback) common. "podController": { SchemaProps: spec.SchemaProps{ Description: "Reference to controller whose pods should avoid this node.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), + Ref: ref(metav1.OwnerReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"}, + metav1.OwnerReference{}.OpenAPIModelName()}, } } @@ -29602,7 +29684,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Volume"), + Ref: ref(corev1.Volume{}.OpenAPIModelName()), }, }, }, @@ -29626,7 +29708,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Container"), + Ref: ref(corev1.Container{}.OpenAPIModelName()), }, }, }, @@ -29650,7 +29732,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Container"), + Ref: ref(corev1.Container{}.OpenAPIModelName()), }, }, }, @@ -29674,7 +29756,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EphemeralContainer"), + Ref: ref(corev1.EphemeralContainer{}.OpenAPIModelName()), }, }, }, @@ -29790,7 +29872,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA "securityContext": { SchemaProps: spec.SchemaProps{ Description: "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", - Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), + Ref: ref(corev1.PodSecurityContext{}.OpenAPIModelName()), }, }, "imagePullSecrets": { @@ -29811,7 +29893,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(corev1.LocalObjectReference{}.OpenAPIModelName()), }, }, }, @@ -29834,7 +29916,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA "affinity": { SchemaProps: spec.SchemaProps{ Description: "If specified, the pod's scheduling constraints", - Ref: ref("k8s.io/api/core/v1.Affinity"), + Ref: ref(corev1.Affinity{}.OpenAPIModelName()), }, }, "schedulerName": { @@ -29857,7 +29939,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Toleration"), + Ref: ref(corev1.Toleration{}.OpenAPIModelName()), }, }, }, @@ -29881,7 +29963,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.HostAlias"), + Ref: ref(corev1.HostAlias{}.OpenAPIModelName()), }, }, }, @@ -29904,7 +29986,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA "dnsConfig": { SchemaProps: spec.SchemaProps{ Description: "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", - Ref: ref("k8s.io/api/core/v1.PodDNSConfig"), + Ref: ref(corev1.PodDNSConfig{}.OpenAPIModelName()), }, }, "readinessGates": { @@ -29920,7 +30002,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodReadinessGate"), + Ref: ref(corev1.PodReadinessGate{}.OpenAPIModelName()), }, }, }, @@ -29956,7 +30038,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -29981,7 +30063,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.TopologySpreadConstraint"), + Ref: ref(corev1.TopologySpreadConstraint{}.OpenAPIModelName()), }, }, }, @@ -29997,7 +30079,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA "os": { SchemaProps: spec.SchemaProps{ Description: "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.resources - spec.securityContext.appArmorProfile - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.securityContext.supplementalGroupsPolicy - spec.containers[*].securityContext.appArmorProfile - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup", - Ref: ref("k8s.io/api/core/v1.PodOS"), + Ref: ref(corev1.PodOS{}.OpenAPIModelName()), }, }, "hostUsers": { @@ -30025,7 +30107,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSchedulingGate"), + Ref: ref(corev1.PodSchedulingGate{}.OpenAPIModelName()), }, }, }, @@ -30043,13 +30125,13 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, }, SchemaProps: spec.SchemaProps{ - Description: "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.", + Description: "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is a stable field but requires that the DynamicResourceAllocation feature gate is enabled.\n\nThis field is immutable.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodResourceClaim"), + Ref: ref(corev1.PodResourceClaim{}.OpenAPIModelName()), }, }, }, @@ -30058,7 +30140,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA "resources": { SchemaProps: spec.SchemaProps{ Description: "Resources is the total amount of CPU and Memory resources required by all containers in the pod. It supports specifying Requests and Limits for \"cpu\", \"memory\" and \"hugepages-\" resource names only. ResourceClaims are not supported.\n\nThis field enables fine-grained control over resource allocation for the entire pod, allowing resource sharing among containers in a pod.\n\nThis is an alpha field and requires enabling the PodLevelResources feature gate.", - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Ref: ref(corev1.ResourceRequirements{}.OpenAPIModelName()), }, }, "hostnameOverride": { @@ -30073,7 +30155,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EphemeralContainer", "k8s.io/api/core/v1.HostAlias", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodDNSConfig", "k8s.io/api/core/v1.PodOS", "k8s.io/api/core/v1.PodReadinessGate", "k8s.io/api/core/v1.PodResourceClaim", "k8s.io/api/core/v1.PodSchedulingGate", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.TopologySpreadConstraint", "k8s.io/api/core/v1.Volume", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + corev1.Affinity{}.OpenAPIModelName(), corev1.Container{}.OpenAPIModelName(), corev1.EphemeralContainer{}.OpenAPIModelName(), corev1.HostAlias{}.OpenAPIModelName(), corev1.LocalObjectReference{}.OpenAPIModelName(), corev1.PodDNSConfig{}.OpenAPIModelName(), corev1.PodOS{}.OpenAPIModelName(), corev1.PodReadinessGate{}.OpenAPIModelName(), corev1.PodResourceClaim{}.OpenAPIModelName(), corev1.PodSchedulingGate{}.OpenAPIModelName(), corev1.PodSecurityContext{}.OpenAPIModelName(), corev1.ResourceRequirements{}.OpenAPIModelName(), corev1.Toleration{}.OpenAPIModelName(), corev1.TopologySpreadConstraint{}.OpenAPIModelName(), corev1.Volume{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -30086,7 +30168,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Properties: map[string]spec.Schema{ "observedGeneration": { SchemaProps: spec.SchemaProps{ - Description: "If set, this represents the .metadata.generation that the pod status was set based upon. This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field.", + Description: "If set, this represents the .metadata.generation that the pod status was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.", Type: []string{"integer"}, Format: "int64", }, @@ -30117,7 +30199,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodCondition"), + Ref: ref(corev1.PodCondition{}.OpenAPIModelName()), }, }, }, @@ -30166,7 +30248,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.HostIP"), + Ref: ref(corev1.HostIP{}.OpenAPIModelName()), }, }, }, @@ -30197,7 +30279,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodIP"), + Ref: ref(corev1.PodIP{}.OpenAPIModelName()), }, }, }, @@ -30206,7 +30288,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope "startTime": { SchemaProps: spec.SchemaProps{ Description: "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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "initContainerStatuses": { @@ -30222,7 +30304,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + Ref: ref(corev1.ContainerStatus{}.OpenAPIModelName()), }, }, }, @@ -30241,7 +30323,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + Ref: ref(corev1.ContainerStatus{}.OpenAPIModelName()), }, }, }, @@ -30268,7 +30350,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + Ref: ref(corev1.ContainerStatus{}.OpenAPIModelName()), }, }, }, @@ -30299,7 +30381,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodResourceClaimStatus"), + Ref: ref(corev1.PodResourceClaimStatus{}.OpenAPIModelName()), }, }, }, @@ -30308,14 +30390,14 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope "extendedResourceClaimStatus": { SchemaProps: spec.SchemaProps{ Description: "Status of extended resource claim backed by DRA.", - Ref: ref("k8s.io/api/core/v1.PodExtendedResourceClaimStatus"), + Ref: ref(corev1.PodExtendedResourceClaimStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerStatus", "k8s.io/api/core/v1.HostIP", "k8s.io/api/core/v1.PodCondition", "k8s.io/api/core/v1.PodExtendedResourceClaimStatus", "k8s.io/api/core/v1.PodIP", "k8s.io/api/core/v1.PodResourceClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + corev1.ContainerStatus{}.OpenAPIModelName(), corev1.HostIP{}.OpenAPIModelName(), corev1.PodCondition{}.OpenAPIModelName(), corev1.PodExtendedResourceClaimStatus{}.OpenAPIModelName(), corev1.PodIP{}.OpenAPIModelName(), corev1.PodResourceClaimStatus{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -30344,21 +30426,21 @@ func schema_k8sio_api_core_v1_PodStatusResult(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodStatus"), + Ref: ref(corev1.PodStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.PodStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -30387,21 +30469,21 @@ func schema_k8sio_api_core_v1_PodTemplate(ref common.ReferenceCallback) common.O SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.PodTemplateSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -30430,7 +30512,7 @@ func schema_k8sio_api_core_v1_PodTemplateList(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -30441,7 +30523,7 @@ func schema_k8sio_api_core_v1_PodTemplateList(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplate"), + Ref: ref(corev1.PodTemplate{}.OpenAPIModelName()), }, }, }, @@ -30452,7 +30534,7 @@ func schema_k8sio_api_core_v1_PodTemplateList(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.PodTemplate{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -30467,21 +30549,21 @@ func schema_k8sio_api_core_v1_PodTemplateSpec(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSpec"), + Ref: ref(corev1.PodSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.PodSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -30570,13 +30652,13 @@ func schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "The class of pods.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSignature"), + Ref: ref(corev1.PodSignature{}.OpenAPIModelName()), }, }, "evictionTime": { SchemaProps: spec.SchemaProps{ Description: "Time at which this entry was added to the list.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -30598,7 +30680,7 @@ func schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodSignature", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + corev1.PodSignature{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -30621,7 +30703,7 @@ func schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "A node selector term, associated with the corresponding weight.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), + Ref: ref(corev1.NodeSelectorTerm{}.OpenAPIModelName()), }, }, }, @@ -30629,7 +30711,7 @@ func schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorTerm"}, + corev1.NodeSelectorTerm{}.OpenAPIModelName()}, } } @@ -30643,25 +30725,25 @@ func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPI "exec": { SchemaProps: spec.SchemaProps{ Description: "Exec specifies a command to execute in the container.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), + Ref: ref(corev1.ExecAction{}.OpenAPIModelName()), }, }, "httpGet": { SchemaProps: spec.SchemaProps{ Description: "HTTPGet specifies an HTTP GET request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + Ref: ref(corev1.HTTPGetAction{}.OpenAPIModelName()), }, }, "tcpSocket": { SchemaProps: spec.SchemaProps{ Description: "TCPSocket specifies a connection to a TCP port.", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + Ref: ref(corev1.TCPSocketAction{}.OpenAPIModelName()), }, }, "grpc": { SchemaProps: spec.SchemaProps{ Description: "GRPC specifies a GRPC HealthCheckRequest.", - Ref: ref("k8s.io/api/core/v1.GRPCAction"), + Ref: ref(corev1.GRPCAction{}.OpenAPIModelName()), }, }, "initialDelaySeconds": { @@ -30710,7 +30792,7 @@ func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPI }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.GRPCAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, + corev1.ExecAction{}.OpenAPIModelName(), corev1.GRPCAction{}.OpenAPIModelName(), corev1.HTTPGetAction{}.OpenAPIModelName(), corev1.TCPSocketAction{}.OpenAPIModelName()}, } } @@ -30724,32 +30806,32 @@ func schema_k8sio_api_core_v1_ProbeHandler(ref common.ReferenceCallback) common. "exec": { SchemaProps: spec.SchemaProps{ Description: "Exec specifies a command to execute in the container.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), + Ref: ref(corev1.ExecAction{}.OpenAPIModelName()), }, }, "httpGet": { SchemaProps: spec.SchemaProps{ Description: "HTTPGet specifies an HTTP GET request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + Ref: ref(corev1.HTTPGetAction{}.OpenAPIModelName()), }, }, "tcpSocket": { SchemaProps: spec.SchemaProps{ Description: "TCPSocket specifies a connection to a TCP port.", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + Ref: ref(corev1.TCPSocketAction{}.OpenAPIModelName()), }, }, "grpc": { SchemaProps: spec.SchemaProps{ Description: "GRPC specifies a GRPC HealthCheckRequest.", - Ref: ref("k8s.io/api/core/v1.GRPCAction"), + Ref: ref(corev1.GRPCAction{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.GRPCAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, + corev1.ExecAction{}.OpenAPIModelName(), corev1.GRPCAction{}.OpenAPIModelName(), corev1.HTTPGetAction{}.OpenAPIModelName(), corev1.TCPSocketAction{}.OpenAPIModelName()}, } } @@ -30773,7 +30855,7 @@ func schema_k8sio_api_core_v1_ProjectedVolumeSource(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeProjection"), + Ref: ref(corev1.VolumeProjection{}.OpenAPIModelName()), }, }, }, @@ -30790,7 +30872,7 @@ func schema_k8sio_api_core_v1_ProjectedVolumeSource(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/core/v1.VolumeProjection"}, + corev1.VolumeProjection{}.OpenAPIModelName()}, } } @@ -30921,7 +31003,7 @@ func schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref common.ReferenceCall "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(corev1.SecretReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -30936,7 +31018,7 @@ func schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + corev1.SecretReference{}.OpenAPIModelName()}, } } @@ -31009,7 +31091,7 @@ func schema_k8sio_api_core_v1_RBDVolumeSource(ref common.ReferenceCallback) comm "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(corev1.LocalObjectReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -31024,7 +31106,7 @@ func schema_k8sio_api_core_v1_RBDVolumeSource(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + corev1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -31053,7 +31135,7 @@ func schema_k8sio_api_core_v1_RangeAllocation(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "range": { @@ -31076,7 +31158,7 @@ func schema_k8sio_api_core_v1_RangeAllocation(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -31105,28 +31187,28 @@ func schema_k8sio_api_core_v1_ReplicationController(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationControllerSpec"), + Ref: ref(corev1.ReplicationControllerSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationControllerStatus"), + Ref: ref(corev1.ReplicationControllerStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationControllerSpec", "k8s.io/api/core/v1.ReplicationControllerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.ReplicationControllerSpec{}.OpenAPIModelName(), corev1.ReplicationControllerStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -31156,7 +31238,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerCondition(ref common.Referenc "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "The last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -31178,7 +31260,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerCondition(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -31207,7 +31289,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerList(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -31218,7 +31300,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerList(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationController"), + Ref: ref(corev1.ReplicationController{}.OpenAPIModelName()), }, }, }, @@ -31229,7 +31311,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerList(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationController", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.ReplicationController{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -31280,14 +31362,14 @@ func schema_k8sio_api_core_v1_ReplicationControllerSpec(ref common.ReferenceCall "template": { SchemaProps: spec.SchemaProps{ Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. The only allowed template.spec.restartPolicy value is \"Always\". More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec"}, + corev1.PodTemplateSpec{}.OpenAPIModelName()}, } } @@ -31352,7 +31434,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerStatus(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationControllerCondition"), + Ref: ref(corev1.ReplicationControllerCondition{}.OpenAPIModelName()), }, }, }, @@ -31363,7 +31445,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerStatus(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationControllerCondition"}, + corev1.ReplicationControllerCondition{}.OpenAPIModelName()}, } } @@ -31421,7 +31503,7 @@ func schema_k8sio_api_core_v1_ResourceFieldSelector(ref common.ReferenceCallback "divisor": { SchemaProps: spec.SchemaProps{ Description: "Specifies the output format of the exposed resources, defaults to \"1\"", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -31434,7 +31516,7 @@ func schema_k8sio_api_core_v1_ResourceFieldSelector(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -31492,28 +31574,28 @@ func schema_k8sio_api_core_v1_ResourceQuota(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceQuotaSpec"), + Ref: ref(corev1.ResourceQuotaSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceQuotaStatus"), + Ref: ref(corev1.ResourceQuotaStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ResourceQuotaSpec", "k8s.io/api/core/v1.ResourceQuotaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.ResourceQuotaSpec{}.OpenAPIModelName(), corev1.ResourceQuotaStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -31542,7 +31624,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaList(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -31553,7 +31635,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaList(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceQuota"), + Ref: ref(corev1.ResourceQuota{}.OpenAPIModelName()), }, }, }, @@ -31564,7 +31646,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaList(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ResourceQuota", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.ResourceQuota{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -31583,7 +31665,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaSpec(ref common.ReferenceCallback) co Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -31613,14 +31695,14 @@ func schema_k8sio_api_core_v1_ResourceQuotaSpec(ref common.ReferenceCallback) co "scopeSelector": { SchemaProps: spec.SchemaProps{ Description: "scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.", - Ref: ref("k8s.io/api/core/v1.ScopeSelector"), + Ref: ref(corev1.ScopeSelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ScopeSelector", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + corev1.ScopeSelector{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -31639,7 +31721,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaStatus(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -31653,7 +31735,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaStatus(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -31663,7 +31745,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaStatus(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -31682,7 +31764,7 @@ func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -31696,7 +31778,7 @@ func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -31718,7 +31800,7 @@ func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceClaim"), + Ref: ref(corev1.ResourceClaim{}.OpenAPIModelName()), }, }, }, @@ -31728,7 +31810,7 @@ func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ResourceClaim", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + corev1.ResourceClaim{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -31763,7 +31845,7 @@ func schema_k8sio_api_core_v1_ResourceStatus(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceHealth"), + Ref: ref(corev1.ResourceHealth{}.OpenAPIModelName()), }, }, }, @@ -31774,7 +31856,7 @@ func schema_k8sio_api_core_v1_ResourceStatus(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ResourceHealth"}, + corev1.ResourceHealth{}.OpenAPIModelName()}, } } @@ -31845,7 +31927,7 @@ func schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref common.Reference "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(corev1.SecretReference{}.OpenAPIModelName()), }, }, "sslEnabled": { @@ -31904,7 +31986,7 @@ func schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + corev1.SecretReference{}.OpenAPIModelName()}, } } @@ -31934,7 +32016,7 @@ func schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref common.ReferenceCallback) "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(corev1.LocalObjectReference{}.OpenAPIModelName()), }, }, "sslEnabled": { @@ -31993,7 +32075,7 @@ func schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + corev1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -32017,7 +32099,7 @@ func schema_k8sio_api_core_v1_ScopeSelector(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ScopedResourceSelectorRequirement"), + Ref: ref(corev1.ScopedResourceSelectorRequirement{}.OpenAPIModelName()), }, }, }, @@ -32032,7 +32114,7 @@ func schema_k8sio_api_core_v1_ScopeSelector(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ScopedResourceSelectorRequirement"}, + corev1.ScopedResourceSelectorRequirement{}.OpenAPIModelName()}, } } @@ -32155,7 +32237,7 @@ func schema_k8sio_api_core_v1_Secret(ref common.ReferenceCallback) common.OpenAP SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "immutable": { @@ -32207,7 +32289,7 @@ func schema_k8sio_api_core_v1_Secret(ref common.ReferenceCallback) common.OpenAP }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -32306,7 +32388,7 @@ func schema_k8sio_api_core_v1_SecretList(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -32317,7 +32399,7 @@ func schema_k8sio_api_core_v1_SecretList(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Secret"), + Ref: ref(corev1.Secret{}.OpenAPIModelName()), }, }, }, @@ -32328,7 +32410,7 @@ func schema_k8sio_api_core_v1_SecretList(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Secret", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.Secret{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -32360,7 +32442,7 @@ func schema_k8sio_api_core_v1_SecretProjection(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Ref: ref(corev1.KeyToPath{}.OpenAPIModelName()), }, }, }, @@ -32377,7 +32459,7 @@ func schema_k8sio_api_core_v1_SecretProjection(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, + corev1.KeyToPath{}.OpenAPIModelName()}, } } @@ -32440,7 +32522,7 @@ func schema_k8sio_api_core_v1_SecretVolumeSource(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Ref: ref(corev1.KeyToPath{}.OpenAPIModelName()), }, }, }, @@ -32464,7 +32546,7 @@ func schema_k8sio_api_core_v1_SecretVolumeSource(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, + corev1.KeyToPath{}.OpenAPIModelName()}, } } @@ -32478,7 +32560,7 @@ func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) comm "capabilities": { SchemaProps: spec.SchemaProps{ Description: "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.Capabilities"), + Ref: ref(corev1.Capabilities{}.OpenAPIModelName()), }, }, "privileged": { @@ -32491,13 +32573,13 @@ func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) comm "seLinuxOptions": { SchemaProps: spec.SchemaProps{ Description: "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), + Ref: ref(corev1.SELinuxOptions{}.OpenAPIModelName()), }, }, "windowsOptions": { SchemaProps: spec.SchemaProps{ Description: "The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.", - Ref: ref("k8s.io/api/core/v1.WindowsSecurityContextOptions"), + Ref: ref(corev1.WindowsSecurityContextOptions{}.OpenAPIModelName()), }, }, "runAsUser": { @@ -32546,20 +32628,20 @@ func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) comm "seccompProfile": { SchemaProps: spec.SchemaProps{ Description: "The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SeccompProfile"), + Ref: ref(corev1.SeccompProfile{}.OpenAPIModelName()), }, }, "appArmorProfile": { SchemaProps: spec.SchemaProps{ Description: "appArmorProfile is the AppArmor options to use by this container. If set, this profile overrides the pod's appArmorProfile. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.AppArmorProfile"), + Ref: ref(corev1.AppArmorProfile{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AppArmorProfile", "k8s.io/api/core/v1.Capabilities", "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.SeccompProfile", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, + corev1.AppArmorProfile{}.OpenAPIModelName(), corev1.Capabilities{}.OpenAPIModelName(), corev1.SELinuxOptions{}.OpenAPIModelName(), corev1.SeccompProfile{}.OpenAPIModelName(), corev1.WindowsSecurityContextOptions{}.OpenAPIModelName()}, } } @@ -32588,14 +32670,14 @@ func schema_k8sio_api_core_v1_SerializedReference(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "The reference to an object in the system.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, + corev1.ObjectReference{}.OpenAPIModelName()}, } } @@ -32624,28 +32706,28 @@ func schema_k8sio_api_core_v1_Service(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServiceSpec"), + Ref: ref(corev1.ServiceSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServiceStatus"), + Ref: ref(corev1.ServiceStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ServiceSpec", "k8s.io/api/core/v1.ServiceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.ServiceSpec{}.OpenAPIModelName(), corev1.ServiceStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -32674,7 +32756,7 @@ func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) commo SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "secrets": { @@ -32695,7 +32777,7 @@ func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, }, @@ -32714,7 +32796,7 @@ func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(corev1.LocalObjectReference{}.OpenAPIModelName()), }, }, }, @@ -32731,7 +32813,7 @@ func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.LocalObjectReference{}.OpenAPIModelName(), corev1.ObjectReference{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -32760,7 +32842,7 @@ func schema_k8sio_api_core_v1_ServiceAccountList(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -32771,7 +32853,7 @@ func schema_k8sio_api_core_v1_ServiceAccountList(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServiceAccount"), + Ref: ref(corev1.ServiceAccount{}.OpenAPIModelName()), }, }, }, @@ -32782,7 +32864,7 @@ func schema_k8sio_api_core_v1_ServiceAccountList(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ServiceAccount", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.ServiceAccount{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -32847,7 +32929,7 @@ func schema_k8sio_api_core_v1_ServiceList(ref common.ReferenceCallback) common.O SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -32858,7 +32940,7 @@ func schema_k8sio_api_core_v1_ServiceList(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Service"), + Ref: ref(corev1.Service{}.OpenAPIModelName()), }, }, }, @@ -32869,7 +32951,7 @@ func schema_k8sio_api_core_v1_ServiceList(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Service", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + corev1.Service{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -32914,7 +32996,7 @@ func schema_k8sio_api_core_v1_ServicePort(ref common.ReferenceCallback) common.O "targetPort": { SchemaProps: spec.SchemaProps{ Description: "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "nodePort": { @@ -32929,7 +33011,7 @@ func schema_k8sio_api_core_v1_ServicePort(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -32993,7 +33075,7 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServicePort"), + Ref: ref(corev1.ServicePort{}.OpenAPIModelName()), }, }, }, @@ -33142,7 +33224,7 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O "sessionAffinityConfig": { SchemaProps: spec.SchemaProps{ Description: "sessionAffinityConfig contains the configurations of session affinity.", - Ref: ref("k8s.io/api/core/v1.SessionAffinityConfig"), + Ref: ref(corev1.SessionAffinityConfig{}.OpenAPIModelName()), }, }, "ipFamilies": { @@ -33207,7 +33289,7 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ServicePort", "k8s.io/api/core/v1.SessionAffinityConfig"}, + corev1.ServicePort{}.OpenAPIModelName(), corev1.SessionAffinityConfig{}.OpenAPIModelName()}, } } @@ -33222,7 +33304,7 @@ func schema_k8sio_api_core_v1_ServiceStatus(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "LoadBalancer contains the current status of the load-balancer, if one is present.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), + Ref: ref(corev1.LoadBalancerStatus{}.OpenAPIModelName()), }, }, "conditions": { @@ -33243,7 +33325,7 @@ func schema_k8sio_api_core_v1_ServiceStatus(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -33253,7 +33335,7 @@ func schema_k8sio_api_core_v1_ServiceStatus(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + corev1.LoadBalancerStatus{}.OpenAPIModelName(), metav1.Condition{}.OpenAPIModelName()}, } } @@ -33267,14 +33349,14 @@ func schema_k8sio_api_core_v1_SessionAffinityConfig(ref common.ReferenceCallback "clientIP": { SchemaProps: spec.SchemaProps{ Description: "clientIP contains the configurations of Client IP based session affinity.", - Ref: ref("k8s.io/api/core/v1.ClientIPConfig"), + Ref: ref(corev1.ClientIPConfig{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ClientIPConfig"}, + corev1.ClientIPConfig{}.OpenAPIModelName()}, } } @@ -33338,14 +33420,14 @@ func schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref common.Referen "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, + corev1.ObjectReference{}.OpenAPIModelName()}, } } @@ -33387,14 +33469,14 @@ func schema_k8sio_api_core_v1_StorageOSVolumeSource(ref common.ReferenceCallback "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(corev1.LocalObjectReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + corev1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -33438,7 +33520,7 @@ func schema_k8sio_api_core_v1_TCPSocketAction(ref common.ReferenceCallback) comm "port": { SchemaProps: spec.SchemaProps{ Description: "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "host": { @@ -33453,7 +33535,7 @@ func schema_k8sio_api_core_v1_TCPSocketAction(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -33491,7 +33573,7 @@ func schema_k8sio_api_core_v1_Taint(ref common.ReferenceCallback) common.OpenAPI "timeAdded": { SchemaProps: spec.SchemaProps{ Description: "TimeAdded represents the time at which the taint was added.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, @@ -33499,7 +33581,7 @@ func schema_k8sio_api_core_v1_Taint(ref common.ReferenceCallback) common.OpenAPI }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -33615,7 +33697,7 @@ func schema_k8sio_api_core_v1_TopologySelectorTerm(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.TopologySelectorLabelRequirement"), + Ref: ref(corev1.TopologySelectorLabelRequirement{}.OpenAPIModelName()), }, }, }, @@ -33630,7 +33712,7 @@ func schema_k8sio_api_core_v1_TopologySelectorTerm(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.TopologySelectorLabelRequirement"}, + corev1.TopologySelectorLabelRequirement{}.OpenAPIModelName()}, } } @@ -33669,7 +33751,7 @@ func schema_k8sio_api_core_v1_TopologySpreadConstraint(ref common.ReferenceCallb "labelSelector": { SchemaProps: spec.SchemaProps{ Description: "LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "minDomains": { @@ -33720,7 +33802,7 @@ func schema_k8sio_api_core_v1_TopologySpreadConstraint(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -33828,181 +33910,181 @@ func schema_k8sio_api_core_v1_Volume(ref common.ReferenceCallback) common.OpenAP "hostPath": { SchemaProps: spec.SchemaProps{ Description: "hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + Ref: ref(corev1.HostPathVolumeSource{}.OpenAPIModelName()), }, }, "emptyDir": { SchemaProps: spec.SchemaProps{ Description: "emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), + Ref: ref(corev1.EmptyDirVolumeSource{}.OpenAPIModelName()), }, }, "gcePersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + Ref: ref(corev1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "awsElasticBlockStore": { SchemaProps: spec.SchemaProps{ Description: "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + Ref: ref(corev1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName()), }, }, "gitRepo": { SchemaProps: spec.SchemaProps{ Description: "gitRepo represents a git repository at a particular revision. Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", - Ref: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), + Ref: ref(corev1.GitRepoVolumeSource{}.OpenAPIModelName()), }, }, "secret": { SchemaProps: spec.SchemaProps{ Description: "secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), + Ref: ref(corev1.SecretVolumeSource{}.OpenAPIModelName()), }, }, "nfs": { SchemaProps: spec.SchemaProps{ Description: "nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + Ref: ref(corev1.NFSVolumeSource{}.OpenAPIModelName()), }, }, "iscsi": { SchemaProps: spec.SchemaProps{ Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes/#iscsi", - Ref: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), + Ref: ref(corev1.ISCSIVolumeSource{}.OpenAPIModelName()), }, }, "glusterfs": { SchemaProps: spec.SchemaProps{ Description: "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), + Ref: ref(corev1.GlusterfsVolumeSource{}.OpenAPIModelName()), }, }, "persistentVolumeClaim": { SchemaProps: spec.SchemaProps{ Description: "persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), + Ref: ref(corev1.PersistentVolumeClaimVolumeSource{}.OpenAPIModelName()), }, }, "rbd": { SchemaProps: spec.SchemaProps{ Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.RBDVolumeSource"), + Ref: ref(corev1.RBDVolumeSource{}.OpenAPIModelName()), }, }, "flexVolume": { SchemaProps: spec.SchemaProps{ Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", - Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), + Ref: ref(corev1.FlexVolumeSource{}.OpenAPIModelName()), }, }, "cinder": { SchemaProps: spec.SchemaProps{ Description: "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), + Ref: ref(corev1.CinderVolumeSource{}.OpenAPIModelName()), }, }, "cephfs": { SchemaProps: spec.SchemaProps{ Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), + Ref: ref(corev1.CephFSVolumeSource{}.OpenAPIModelName()), }, }, "flocker": { SchemaProps: spec.SchemaProps{ Description: "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + Ref: ref(corev1.FlockerVolumeSource{}.OpenAPIModelName()), }, }, "downwardAPI": { SchemaProps: spec.SchemaProps{ Description: "downwardAPI represents downward API about the pod that should populate this volume", - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), + Ref: ref(corev1.DownwardAPIVolumeSource{}.OpenAPIModelName()), }, }, "fc": { SchemaProps: spec.SchemaProps{ Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + Ref: ref(corev1.FCVolumeSource{}.OpenAPIModelName()), }, }, "azureFile": { SchemaProps: spec.SchemaProps{ Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), + Ref: ref(corev1.AzureFileVolumeSource{}.OpenAPIModelName()), }, }, "configMap": { SchemaProps: spec.SchemaProps{ Description: "configMap represents a configMap that should populate this volume", - Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), + Ref: ref(corev1.ConfigMapVolumeSource{}.OpenAPIModelName()), }, }, "vsphereVolume": { SchemaProps: spec.SchemaProps{ Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + Ref: ref(corev1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()), }, }, "quobyte": { SchemaProps: spec.SchemaProps{ Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + Ref: ref(corev1.QuobyteVolumeSource{}.OpenAPIModelName()), }, }, "azureDisk": { SchemaProps: spec.SchemaProps{ Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + Ref: ref(corev1.AzureDiskVolumeSource{}.OpenAPIModelName()), }, }, "photonPersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + Ref: ref(corev1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "projected": { SchemaProps: spec.SchemaProps{ Description: "projected items for all in one resources secrets, configmaps, and downward API", - Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), + Ref: ref(corev1.ProjectedVolumeSource{}.OpenAPIModelName()), }, }, "portworxVolume": { SchemaProps: spec.SchemaProps{ Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + Ref: ref(corev1.PortworxVolumeSource{}.OpenAPIModelName()), }, }, "scaleIO": { SchemaProps: spec.SchemaProps{ Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), + Ref: ref(corev1.ScaleIOVolumeSource{}.OpenAPIModelName()), }, }, "storageos": { SchemaProps: spec.SchemaProps{ Description: "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), + Ref: ref(corev1.StorageOSVolumeSource{}.OpenAPIModelName()), }, }, "csi": { SchemaProps: spec.SchemaProps{ Description: "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers.", - Ref: ref("k8s.io/api/core/v1.CSIVolumeSource"), + Ref: ref(corev1.CSIVolumeSource{}.OpenAPIModelName()), }, }, "ephemeral": { SchemaProps: spec.SchemaProps{ Description: "ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.", - Ref: ref("k8s.io/api/core/v1.EphemeralVolumeSource"), + Ref: ref(corev1.EphemeralVolumeSource{}.OpenAPIModelName()), }, }, "image": { SchemaProps: spec.SchemaProps{ Description: "image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. The volume is resolved at pod startup depending on which PullPolicy value is provided:\n\n- Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.\n\nThe volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.", - Ref: ref("k8s.io/api/core/v1.ImageVolumeSource"), + Ref: ref(corev1.ImageVolumeSource{}.OpenAPIModelName()), }, }, }, @@ -34010,7 +34092,7 @@ func schema_k8sio_api_core_v1_Volume(ref common.ReferenceCallback) common.OpenAP }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.EphemeralVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.ImageVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + corev1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName(), corev1.AzureDiskVolumeSource{}.OpenAPIModelName(), corev1.AzureFileVolumeSource{}.OpenAPIModelName(), corev1.CSIVolumeSource{}.OpenAPIModelName(), corev1.CephFSVolumeSource{}.OpenAPIModelName(), corev1.CinderVolumeSource{}.OpenAPIModelName(), corev1.ConfigMapVolumeSource{}.OpenAPIModelName(), corev1.DownwardAPIVolumeSource{}.OpenAPIModelName(), corev1.EmptyDirVolumeSource{}.OpenAPIModelName(), corev1.EphemeralVolumeSource{}.OpenAPIModelName(), corev1.FCVolumeSource{}.OpenAPIModelName(), corev1.FlexVolumeSource{}.OpenAPIModelName(), corev1.FlockerVolumeSource{}.OpenAPIModelName(), corev1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName(), corev1.GitRepoVolumeSource{}.OpenAPIModelName(), corev1.GlusterfsVolumeSource{}.OpenAPIModelName(), corev1.HostPathVolumeSource{}.OpenAPIModelName(), corev1.ISCSIVolumeSource{}.OpenAPIModelName(), corev1.ImageVolumeSource{}.OpenAPIModelName(), corev1.NFSVolumeSource{}.OpenAPIModelName(), corev1.PersistentVolumeClaimVolumeSource{}.OpenAPIModelName(), corev1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName(), corev1.PortworxVolumeSource{}.OpenAPIModelName(), corev1.ProjectedVolumeSource{}.OpenAPIModelName(), corev1.QuobyteVolumeSource{}.OpenAPIModelName(), corev1.RBDVolumeSource{}.OpenAPIModelName(), corev1.ScaleIOVolumeSource{}.OpenAPIModelName(), corev1.SecretVolumeSource{}.OpenAPIModelName(), corev1.StorageOSVolumeSource{}.OpenAPIModelName(), corev1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()}, } } @@ -34164,14 +34246,14 @@ func schema_k8sio_api_core_v1_VolumeNodeAffinity(ref common.ReferenceCallback) c "required": { SchemaProps: spec.SchemaProps{ Description: "required specifies hard node constraints that must be met.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Ref: ref(corev1.NodeSelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector"}, + corev1.NodeSelector{}.OpenAPIModelName()}, } } @@ -34185,44 +34267,44 @@ func schema_k8sio_api_core_v1_VolumeProjection(ref common.ReferenceCallback) com "secret": { SchemaProps: spec.SchemaProps{ Description: "secret information about the secret data to project", - Ref: ref("k8s.io/api/core/v1.SecretProjection"), + Ref: ref(corev1.SecretProjection{}.OpenAPIModelName()), }, }, "downwardAPI": { SchemaProps: spec.SchemaProps{ Description: "downwardAPI information about the downwardAPI data to project", - Ref: ref("k8s.io/api/core/v1.DownwardAPIProjection"), + Ref: ref(corev1.DownwardAPIProjection{}.OpenAPIModelName()), }, }, "configMap": { SchemaProps: spec.SchemaProps{ Description: "configMap information about the configMap data to project", - Ref: ref("k8s.io/api/core/v1.ConfigMapProjection"), + Ref: ref(corev1.ConfigMapProjection{}.OpenAPIModelName()), }, }, "serviceAccountToken": { SchemaProps: spec.SchemaProps{ Description: "serviceAccountToken is information about the serviceAccountToken data to project", - Ref: ref("k8s.io/api/core/v1.ServiceAccountTokenProjection"), + Ref: ref(corev1.ServiceAccountTokenProjection{}.OpenAPIModelName()), }, }, "clusterTrustBundle": { SchemaProps: spec.SchemaProps{ Description: "ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field of ClusterTrustBundle objects in an auto-updating file.\n\nAlpha, gated by the ClusterTrustBundleProjection feature gate.\n\nClusterTrustBundle objects can either be selected by name, or by the combination of signer name and a label selector.\n\nKubelet performs aggressive normalization of the PEM contents written into the pod filesystem. Esoteric PEM features such as inter-block comments and block headers are stripped. Certificates are deduplicated. The ordering of certificates within the file is arbitrary, and Kubelet may change the order over time.", - Ref: ref("k8s.io/api/core/v1.ClusterTrustBundleProjection"), + Ref: ref(corev1.ClusterTrustBundleProjection{}.OpenAPIModelName()), }, }, "podCertificate": { SchemaProps: spec.SchemaProps{ Description: "Projects an auto-rotating credential bundle (private key and certificate chain) that the pod can use either as a TLS client or server.\n\nKubelet generates a private key and uses it to send a PodCertificateRequest to the named signer. Once the signer approves the request and issues a certificate chain, Kubelet writes the key and certificate chain to the pod filesystem. The pod does not start until certificates have been issued for each podCertificate projected volume source in its spec.\n\nKubelet will begin trying to rotate the certificate at the time indicated by the signer using the PodCertificateRequest.Status.BeginRefreshAt timestamp.\n\nKubelet can write a single file, indicated by the credentialBundlePath field, or separate files, indicated by the keyPath and certificateChainPath fields.\n\nThe credential bundle is a single file in PEM format. The first PEM entry is the private key (in PKCS#8 format), and the remaining PEM entries are the certificate chain issued by the signer (typically, signers will return their certificate chain in leaf-to-root order).\n\nPrefer using the credential bundle format, since your application code can read it atomically. If you use keyPath and certificateChainPath, your application must make two separate file reads. If these coincide with a certificate rotation, it is possible that the private key and leaf certificate you read may not correspond to each other. Your application will need to check for this condition, and re-read until they are consistent.\n\nThe named signer controls chooses the format of the certificate it issues; consult the signer implementation's documentation to learn how to use the certificates it issues.", - Ref: ref("k8s.io/api/core/v1.PodCertificateProjection"), + Ref: ref(corev1.PodCertificateProjection{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ClusterTrustBundleProjection", "k8s.io/api/core/v1.ConfigMapProjection", "k8s.io/api/core/v1.DownwardAPIProjection", "k8s.io/api/core/v1.PodCertificateProjection", "k8s.io/api/core/v1.SecretProjection", "k8s.io/api/core/v1.ServiceAccountTokenProjection"}, + corev1.ClusterTrustBundleProjection{}.OpenAPIModelName(), corev1.ConfigMapProjection{}.OpenAPIModelName(), corev1.DownwardAPIProjection{}.OpenAPIModelName(), corev1.PodCertificateProjection{}.OpenAPIModelName(), corev1.SecretProjection{}.OpenAPIModelName(), corev1.ServiceAccountTokenProjection{}.OpenAPIModelName()}, } } @@ -34241,7 +34323,7 @@ func schema_k8sio_api_core_v1_VolumeResourceRequirements(ref common.ReferenceCal Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -34255,7 +34337,7 @@ func schema_k8sio_api_core_v1_VolumeResourceRequirements(ref common.ReferenceCal Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -34265,7 +34347,7 @@ func schema_k8sio_api_core_v1_VolumeResourceRequirements(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -34279,188 +34361,188 @@ func schema_k8sio_api_core_v1_VolumeSource(ref common.ReferenceCallback) common. "hostPath": { SchemaProps: spec.SchemaProps{ Description: "hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + Ref: ref(corev1.HostPathVolumeSource{}.OpenAPIModelName()), }, }, "emptyDir": { SchemaProps: spec.SchemaProps{ Description: "emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), + Ref: ref(corev1.EmptyDirVolumeSource{}.OpenAPIModelName()), }, }, "gcePersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + Ref: ref(corev1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "awsElasticBlockStore": { SchemaProps: spec.SchemaProps{ Description: "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + Ref: ref(corev1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName()), }, }, "gitRepo": { SchemaProps: spec.SchemaProps{ Description: "gitRepo represents a git repository at a particular revision. Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", - Ref: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), + Ref: ref(corev1.GitRepoVolumeSource{}.OpenAPIModelName()), }, }, "secret": { SchemaProps: spec.SchemaProps{ Description: "secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), + Ref: ref(corev1.SecretVolumeSource{}.OpenAPIModelName()), }, }, "nfs": { SchemaProps: spec.SchemaProps{ Description: "nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + Ref: ref(corev1.NFSVolumeSource{}.OpenAPIModelName()), }, }, "iscsi": { SchemaProps: spec.SchemaProps{ Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes/#iscsi", - Ref: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), + Ref: ref(corev1.ISCSIVolumeSource{}.OpenAPIModelName()), }, }, "glusterfs": { SchemaProps: spec.SchemaProps{ Description: "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), + Ref: ref(corev1.GlusterfsVolumeSource{}.OpenAPIModelName()), }, }, "persistentVolumeClaim": { SchemaProps: spec.SchemaProps{ Description: "persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), + Ref: ref(corev1.PersistentVolumeClaimVolumeSource{}.OpenAPIModelName()), }, }, "rbd": { SchemaProps: spec.SchemaProps{ Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.RBDVolumeSource"), + Ref: ref(corev1.RBDVolumeSource{}.OpenAPIModelName()), }, }, "flexVolume": { SchemaProps: spec.SchemaProps{ Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", - Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), + Ref: ref(corev1.FlexVolumeSource{}.OpenAPIModelName()), }, }, "cinder": { SchemaProps: spec.SchemaProps{ Description: "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), + Ref: ref(corev1.CinderVolumeSource{}.OpenAPIModelName()), }, }, "cephfs": { SchemaProps: spec.SchemaProps{ Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), + Ref: ref(corev1.CephFSVolumeSource{}.OpenAPIModelName()), }, }, "flocker": { SchemaProps: spec.SchemaProps{ Description: "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + Ref: ref(corev1.FlockerVolumeSource{}.OpenAPIModelName()), }, }, "downwardAPI": { SchemaProps: spec.SchemaProps{ Description: "downwardAPI represents downward API about the pod that should populate this volume", - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), + Ref: ref(corev1.DownwardAPIVolumeSource{}.OpenAPIModelName()), }, }, "fc": { SchemaProps: spec.SchemaProps{ Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + Ref: ref(corev1.FCVolumeSource{}.OpenAPIModelName()), }, }, "azureFile": { SchemaProps: spec.SchemaProps{ Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), + Ref: ref(corev1.AzureFileVolumeSource{}.OpenAPIModelName()), }, }, "configMap": { SchemaProps: spec.SchemaProps{ Description: "configMap represents a configMap that should populate this volume", - Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), + Ref: ref(corev1.ConfigMapVolumeSource{}.OpenAPIModelName()), }, }, "vsphereVolume": { SchemaProps: spec.SchemaProps{ Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + Ref: ref(corev1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()), }, }, "quobyte": { SchemaProps: spec.SchemaProps{ Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + Ref: ref(corev1.QuobyteVolumeSource{}.OpenAPIModelName()), }, }, "azureDisk": { SchemaProps: spec.SchemaProps{ Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + Ref: ref(corev1.AzureDiskVolumeSource{}.OpenAPIModelName()), }, }, "photonPersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + Ref: ref(corev1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "projected": { SchemaProps: spec.SchemaProps{ Description: "projected items for all in one resources secrets, configmaps, and downward API", - Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), + Ref: ref(corev1.ProjectedVolumeSource{}.OpenAPIModelName()), }, }, "portworxVolume": { SchemaProps: spec.SchemaProps{ Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + Ref: ref(corev1.PortworxVolumeSource{}.OpenAPIModelName()), }, }, "scaleIO": { SchemaProps: spec.SchemaProps{ Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), + Ref: ref(corev1.ScaleIOVolumeSource{}.OpenAPIModelName()), }, }, "storageos": { SchemaProps: spec.SchemaProps{ Description: "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), + Ref: ref(corev1.StorageOSVolumeSource{}.OpenAPIModelName()), }, }, "csi": { SchemaProps: spec.SchemaProps{ Description: "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers.", - Ref: ref("k8s.io/api/core/v1.CSIVolumeSource"), + Ref: ref(corev1.CSIVolumeSource{}.OpenAPIModelName()), }, }, "ephemeral": { SchemaProps: spec.SchemaProps{ Description: "ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.", - Ref: ref("k8s.io/api/core/v1.EphemeralVolumeSource"), + Ref: ref(corev1.EphemeralVolumeSource{}.OpenAPIModelName()), }, }, "image": { SchemaProps: spec.SchemaProps{ Description: "image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. The volume is resolved at pod startup depending on which PullPolicy value is provided:\n\n- Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.\n\nThe volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.", - Ref: ref("k8s.io/api/core/v1.ImageVolumeSource"), + Ref: ref(corev1.ImageVolumeSource{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.EphemeralVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.ImageVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + corev1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName(), corev1.AzureDiskVolumeSource{}.OpenAPIModelName(), corev1.AzureFileVolumeSource{}.OpenAPIModelName(), corev1.CSIVolumeSource{}.OpenAPIModelName(), corev1.CephFSVolumeSource{}.OpenAPIModelName(), corev1.CinderVolumeSource{}.OpenAPIModelName(), corev1.ConfigMapVolumeSource{}.OpenAPIModelName(), corev1.DownwardAPIVolumeSource{}.OpenAPIModelName(), corev1.EmptyDirVolumeSource{}.OpenAPIModelName(), corev1.EphemeralVolumeSource{}.OpenAPIModelName(), corev1.FCVolumeSource{}.OpenAPIModelName(), corev1.FlexVolumeSource{}.OpenAPIModelName(), corev1.FlockerVolumeSource{}.OpenAPIModelName(), corev1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName(), corev1.GitRepoVolumeSource{}.OpenAPIModelName(), corev1.GlusterfsVolumeSource{}.OpenAPIModelName(), corev1.HostPathVolumeSource{}.OpenAPIModelName(), corev1.ISCSIVolumeSource{}.OpenAPIModelName(), corev1.ImageVolumeSource{}.OpenAPIModelName(), corev1.NFSVolumeSource{}.OpenAPIModelName(), corev1.PersistentVolumeClaimVolumeSource{}.OpenAPIModelName(), corev1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName(), corev1.PortworxVolumeSource{}.OpenAPIModelName(), corev1.ProjectedVolumeSource{}.OpenAPIModelName(), corev1.QuobyteVolumeSource{}.OpenAPIModelName(), corev1.RBDVolumeSource{}.OpenAPIModelName(), corev1.ScaleIOVolumeSource{}.OpenAPIModelName(), corev1.SecretVolumeSource{}.OpenAPIModelName(), corev1.StorageOSVolumeSource{}.OpenAPIModelName(), corev1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()}, } } @@ -34526,7 +34608,7 @@ func schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "Required. A pod affinity term, associated with the corresponding weight.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + Ref: ref(corev1.PodAffinityTerm{}.OpenAPIModelName()), }, }, }, @@ -34534,7 +34616,7 @@ func schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm"}, + corev1.PodAffinityTerm{}.OpenAPIModelName()}, } } @@ -34610,7 +34692,7 @@ func schema_k8sio_api_discovery_v1_Endpoint(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "conditions contains information about the current status of the endpoint.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/discovery/v1.EndpointConditions"), + Ref: ref(discoveryv1.EndpointConditions{}.OpenAPIModelName()), }, }, "hostname": { @@ -34623,7 +34705,7 @@ func schema_k8sio_api_discovery_v1_Endpoint(ref common.ReferenceCallback) common "targetRef": { SchemaProps: spec.SchemaProps{ Description: "targetRef is a reference to a Kubernetes object that represents this endpoint.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, "deprecatedTopology": { @@ -34659,7 +34741,7 @@ func schema_k8sio_api_discovery_v1_Endpoint(ref common.ReferenceCallback) common "hints": { SchemaProps: spec.SchemaProps{ Description: "hints contains information associated with how an endpoint should be consumed.", - Ref: ref("k8s.io/api/discovery/v1.EndpointHints"), + Ref: ref(discoveryv1.EndpointHints{}.OpenAPIModelName()), }, }, }, @@ -34667,7 +34749,7 @@ func schema_k8sio_api_discovery_v1_Endpoint(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/discovery/v1.EndpointConditions", "k8s.io/api/discovery/v1.EndpointHints"}, + corev1.ObjectReference{}.OpenAPIModelName(), discoveryv1.EndpointConditions{}.OpenAPIModelName(), discoveryv1.EndpointHints{}.OpenAPIModelName()}, } } @@ -34725,7 +34807,7 @@ func schema_k8sio_api_discovery_v1_EndpointHints(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/discovery/v1.ForZone"), + Ref: ref(discoveryv1.ForZone{}.OpenAPIModelName()), }, }, }, @@ -34744,7 +34826,7 @@ func schema_k8sio_api_discovery_v1_EndpointHints(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/discovery/v1.ForNode"), + Ref: ref(discoveryv1.ForNode{}.OpenAPIModelName()), }, }, }, @@ -34754,7 +34836,7 @@ func schema_k8sio_api_discovery_v1_EndpointHints(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/discovery/v1.ForNode", "k8s.io/api/discovery/v1.ForZone"}, + discoveryv1.ForNode{}.OpenAPIModelName(), discoveryv1.ForZone{}.OpenAPIModelName()}, } } @@ -34830,7 +34912,7 @@ func schema_k8sio_api_discovery_v1_EndpointSlice(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "addressType": { @@ -34855,7 +34937,7 @@ func schema_k8sio_api_discovery_v1_EndpointSlice(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/discovery/v1.Endpoint"), + Ref: ref(discoveryv1.Endpoint{}.OpenAPIModelName()), }, }, }, @@ -34874,7 +34956,7 @@ func schema_k8sio_api_discovery_v1_EndpointSlice(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/discovery/v1.EndpointPort"), + Ref: ref(discoveryv1.EndpointPort{}.OpenAPIModelName()), }, }, }, @@ -34885,7 +34967,7 @@ func schema_k8sio_api_discovery_v1_EndpointSlice(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/discovery/v1.Endpoint", "k8s.io/api/discovery/v1.EndpointPort", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + discoveryv1.Endpoint{}.OpenAPIModelName(), discoveryv1.EndpointPort{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -34914,7 +34996,7 @@ func schema_k8sio_api_discovery_v1_EndpointSliceList(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -34925,7 +35007,7 @@ func schema_k8sio_api_discovery_v1_EndpointSliceList(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/discovery/v1.EndpointSlice"), + Ref: ref(discoveryv1.EndpointSlice{}.OpenAPIModelName()), }, }, }, @@ -34936,7 +35018,7 @@ func schema_k8sio_api_discovery_v1_EndpointSliceList(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/discovery/v1.EndpointSlice", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + discoveryv1.EndpointSlice{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -35015,7 +35097,7 @@ func schema_k8sio_api_discovery_v1beta1_Endpoint(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "conditions contains information about the current status of the endpoint.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/discovery/v1beta1.EndpointConditions"), + Ref: ref(discoveryv1beta1.EndpointConditions{}.OpenAPIModelName()), }, }, "hostname": { @@ -35028,7 +35110,7 @@ func schema_k8sio_api_discovery_v1beta1_Endpoint(ref common.ReferenceCallback) c "targetRef": { SchemaProps: spec.SchemaProps{ Description: "targetRef is a reference to a Kubernetes object that represents this endpoint.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, "topology": { @@ -35057,7 +35139,7 @@ func schema_k8sio_api_discovery_v1beta1_Endpoint(ref common.ReferenceCallback) c "hints": { SchemaProps: spec.SchemaProps{ Description: "hints contains information associated with how an endpoint should be consumed.", - Ref: ref("k8s.io/api/discovery/v1beta1.EndpointHints"), + Ref: ref(discoveryv1beta1.EndpointHints{}.OpenAPIModelName()), }, }, }, @@ -35065,7 +35147,7 @@ func schema_k8sio_api_discovery_v1beta1_Endpoint(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/discovery/v1beta1.EndpointConditions", "k8s.io/api/discovery/v1beta1.EndpointHints"}, + corev1.ObjectReference{}.OpenAPIModelName(), discoveryv1beta1.EndpointConditions{}.OpenAPIModelName(), discoveryv1beta1.EndpointHints{}.OpenAPIModelName()}, } } @@ -35123,7 +35205,7 @@ func schema_k8sio_api_discovery_v1beta1_EndpointHints(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/discovery/v1beta1.ForZone"), + Ref: ref(discoveryv1beta1.ForZone{}.OpenAPIModelName()), }, }, }, @@ -35142,7 +35224,7 @@ func schema_k8sio_api_discovery_v1beta1_EndpointHints(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/discovery/v1beta1.ForNode"), + Ref: ref(discoveryv1beta1.ForNode{}.OpenAPIModelName()), }, }, }, @@ -35152,7 +35234,7 @@ func schema_k8sio_api_discovery_v1beta1_EndpointHints(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/discovery/v1beta1.ForNode", "k8s.io/api/discovery/v1beta1.ForZone"}, + discoveryv1beta1.ForNode{}.OpenAPIModelName(), discoveryv1beta1.ForZone{}.OpenAPIModelName()}, } } @@ -35223,7 +35305,7 @@ func schema_k8sio_api_discovery_v1beta1_EndpointSlice(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "addressType": { @@ -35247,7 +35329,7 @@ func schema_k8sio_api_discovery_v1beta1_EndpointSlice(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/discovery/v1beta1.Endpoint"), + Ref: ref(discoveryv1beta1.Endpoint{}.OpenAPIModelName()), }, }, }, @@ -35266,7 +35348,7 @@ func schema_k8sio_api_discovery_v1beta1_EndpointSlice(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/discovery/v1beta1.EndpointPort"), + Ref: ref(discoveryv1beta1.EndpointPort{}.OpenAPIModelName()), }, }, }, @@ -35277,7 +35359,7 @@ func schema_k8sio_api_discovery_v1beta1_EndpointSlice(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/discovery/v1beta1.Endpoint", "k8s.io/api/discovery/v1beta1.EndpointPort", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + discoveryv1beta1.Endpoint{}.OpenAPIModelName(), discoveryv1beta1.EndpointPort{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -35306,7 +35388,7 @@ func schema_k8sio_api_discovery_v1beta1_EndpointSliceList(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -35317,7 +35399,7 @@ func schema_k8sio_api_discovery_v1beta1_EndpointSliceList(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/discovery/v1beta1.EndpointSlice"), + Ref: ref(discoveryv1beta1.EndpointSlice{}.OpenAPIModelName()), }, }, }, @@ -35328,7 +35410,7 @@ func schema_k8sio_api_discovery_v1beta1_EndpointSliceList(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/discovery/v1beta1.EndpointSlice", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + discoveryv1beta1.EndpointSlice{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -35401,19 +35483,19 @@ func schema_k8sio_api_events_v1_Event(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "eventTime": { SchemaProps: spec.SchemaProps{ Description: "eventTime is the time when this Event was first observed. It is required.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, "series": { SchemaProps: spec.SchemaProps{ Description: "series is data about the Event series this event represents or nil if it's a singleton Event.", - Ref: ref("k8s.io/api/events/v1.EventSeries"), + Ref: ref(eventsv1.EventSeries{}.OpenAPIModelName()), }, }, "reportingController": { @@ -35448,13 +35530,13 @@ func schema_k8sio_api_events_v1_Event(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, "related": { SchemaProps: spec.SchemaProps{ Description: "related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, "note": { @@ -35475,19 +35557,19 @@ func schema_k8sio_api_events_v1_Event(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EventSource"), + Ref: ref(corev1.EventSource{}.OpenAPIModelName()), }, }, "deprecatedFirstTimestamp": { SchemaProps: spec.SchemaProps{ Description: "deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "deprecatedLastTimestamp": { SchemaProps: spec.SchemaProps{ Description: "deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "deprecatedCount": { @@ -35502,7 +35584,7 @@ func schema_k8sio_api_events_v1_Event(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EventSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/events/v1.EventSeries", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + corev1.EventSource{}.OpenAPIModelName(), corev1.ObjectReference{}.OpenAPIModelName(), eventsv1.EventSeries{}.OpenAPIModelName(), metav1.MicroTime{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -35531,7 +35613,7 @@ func schema_k8sio_api_events_v1_EventList(ref common.ReferenceCallback) common.O SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -35542,7 +35624,7 @@ func schema_k8sio_api_events_v1_EventList(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/events/v1.Event"), + Ref: ref(eventsv1.Event{}.OpenAPIModelName()), }, }, }, @@ -35553,7 +35635,7 @@ func schema_k8sio_api_events_v1_EventList(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/api/events/v1.Event", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + eventsv1.Event{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -35575,7 +35657,7 @@ func schema_k8sio_api_events_v1_EventSeries(ref common.ReferenceCallback) common "lastObservedTime": { SchemaProps: spec.SchemaProps{ Description: "lastObservedTime is the time when last Event from the series was seen before last heartbeat.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, }, @@ -35583,7 +35665,7 @@ func schema_k8sio_api_events_v1_EventSeries(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + metav1.MicroTime{}.OpenAPIModelName()}, } } @@ -35612,19 +35694,19 @@ func schema_k8sio_api_events_v1beta1_Event(ref common.ReferenceCallback) common. SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "eventTime": { SchemaProps: spec.SchemaProps{ Description: "eventTime is the time when this Event was first observed. It is required.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, "series": { SchemaProps: spec.SchemaProps{ Description: "series is data about the Event series this event represents or nil if it's a singleton Event.", - Ref: ref("k8s.io/api/events/v1beta1.EventSeries"), + Ref: ref(eventsv1beta1.EventSeries{}.OpenAPIModelName()), }, }, "reportingController": { @@ -35659,13 +35741,13 @@ func schema_k8sio_api_events_v1beta1_Event(ref common.ReferenceCallback) common. SchemaProps: spec.SchemaProps{ Description: "regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, "related": { SchemaProps: spec.SchemaProps{ Description: "related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, "note": { @@ -35686,19 +35768,19 @@ func schema_k8sio_api_events_v1beta1_Event(ref common.ReferenceCallback) common. SchemaProps: spec.SchemaProps{ Description: "deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EventSource"), + Ref: ref(corev1.EventSource{}.OpenAPIModelName()), }, }, "deprecatedFirstTimestamp": { SchemaProps: spec.SchemaProps{ Description: "deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "deprecatedLastTimestamp": { SchemaProps: spec.SchemaProps{ Description: "deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "deprecatedCount": { @@ -35713,7 +35795,7 @@ func schema_k8sio_api_events_v1beta1_Event(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EventSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/events/v1beta1.EventSeries", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + corev1.EventSource{}.OpenAPIModelName(), corev1.ObjectReference{}.OpenAPIModelName(), eventsv1beta1.EventSeries{}.OpenAPIModelName(), metav1.MicroTime{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -35742,7 +35824,7 @@ func schema_k8sio_api_events_v1beta1_EventList(ref common.ReferenceCallback) com SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -35753,7 +35835,7 @@ func schema_k8sio_api_events_v1beta1_EventList(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/events/v1beta1.Event"), + Ref: ref(eventsv1beta1.Event{}.OpenAPIModelName()), }, }, }, @@ -35764,7 +35846,7 @@ func schema_k8sio_api_events_v1beta1_EventList(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/events/v1beta1.Event", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + eventsv1beta1.Event{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -35786,7 +35868,7 @@ func schema_k8sio_api_events_v1beta1_EventSeries(ref common.ReferenceCallback) c "lastObservedTime": { SchemaProps: spec.SchemaProps{ Description: "lastObservedTime is the time when last Event from the series was seen before last heartbeat.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, }, @@ -35794,7 +35876,7 @@ func schema_k8sio_api_events_v1beta1_EventSeries(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + metav1.MicroTime{}.OpenAPIModelName()}, } } @@ -35823,28 +35905,28 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSet(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetSpec"), + Ref: ref(extensionsv1beta1.DaemonSetSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetStatus"), + Ref: ref(extensionsv1beta1.DaemonSetStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.DaemonSetSpec", "k8s.io/api/extensions/v1beta1.DaemonSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + extensionsv1beta1.DaemonSetSpec{}.OpenAPIModelName(), extensionsv1beta1.DaemonSetStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -35874,7 +35956,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetCondition(ref common.Reference "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -35896,7 +35978,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetCondition(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -35925,7 +36007,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetList(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -35936,7 +36018,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetList(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSet"), + Ref: ref(extensionsv1beta1.DaemonSet{}.OpenAPIModelName()), }, }, }, @@ -35947,7 +36029,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetList(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.DaemonSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + extensionsv1beta1.DaemonSet{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -35961,21 +36043,21 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetSpec(ref common.ReferenceCallb "selector": { SchemaProps: spec.SchemaProps{ Description: "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, "updateStrategy": { SchemaProps: spec.SchemaProps{ Description: "An update strategy to replace existing DaemonSet pods with new pods.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetUpdateStrategy"), + Ref: ref(extensionsv1beta1.DaemonSetUpdateStrategy{}.OpenAPIModelName()), }, }, "minReadySeconds": { @@ -36004,7 +36086,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetSpec(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/api/extensions/v1beta1.DaemonSetUpdateStrategy", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + corev1.PodTemplateSpec{}.OpenAPIModelName(), extensionsv1beta1.DaemonSetUpdateStrategy{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -36100,7 +36182,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetStatus(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetCondition"), + Ref: ref(extensionsv1beta1.DaemonSetCondition{}.OpenAPIModelName()), }, }, }, @@ -36111,7 +36193,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetStatus(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.DaemonSetCondition"}, + extensionsv1beta1.DaemonSetCondition{}.OpenAPIModelName()}, } } @@ -36132,14 +36214,14 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetUpdateStrategy(ref common.Refe "rollingUpdate": { SchemaProps: spec.SchemaProps{ Description: "Rolling update config params. Present only if type = \"RollingUpdate\".", - Ref: ref("k8s.io/api/extensions/v1beta1.RollingUpdateDaemonSet"), + Ref: ref(extensionsv1beta1.RollingUpdateDaemonSet{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.RollingUpdateDaemonSet"}, + extensionsv1beta1.RollingUpdateDaemonSet{}.OpenAPIModelName()}, } } @@ -36168,28 +36250,28 @@ func schema_k8sio_api_extensions_v1beta1_Deployment(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard object metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the Deployment.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentSpec"), + Ref: ref(extensionsv1beta1.DeploymentSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the Deployment.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentStatus"), + Ref: ref(extensionsv1beta1.DeploymentStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.DeploymentSpec", "k8s.io/api/extensions/v1beta1.DeploymentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + extensionsv1beta1.DeploymentSpec{}.OpenAPIModelName(), extensionsv1beta1.DeploymentStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -36219,13 +36301,13 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentCondition(ref common.Referenc "lastUpdateTime": { SchemaProps: spec.SchemaProps{ Description: "The last time this condition was updated.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -36247,7 +36329,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentCondition(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -36276,7 +36358,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentList(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -36287,7 +36369,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentList(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.Deployment"), + Ref: ref(extensionsv1beta1.Deployment{}.OpenAPIModelName()), }, }, }, @@ -36298,7 +36380,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentList(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.Deployment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + extensionsv1beta1.Deployment{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -36351,7 +36433,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentRollback(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "The config of this deployment rollback.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.RollbackConfig"), + Ref: ref(extensionsv1beta1.RollbackConfig{}.OpenAPIModelName()), }, }, }, @@ -36359,7 +36441,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentRollback(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.RollbackConfig"}, + extensionsv1beta1.RollbackConfig{}.OpenAPIModelName()}, } } @@ -36380,14 +36462,14 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentSpec(ref common.ReferenceCall "selector": { SchemaProps: spec.SchemaProps{ Description: "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "Template describes the pods that will be created.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, "strategy": { @@ -36399,7 +36481,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentSpec(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "The deployment strategy to use to replace existing pods with new ones.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentStrategy"), + Ref: ref(extensionsv1beta1.DeploymentStrategy{}.OpenAPIModelName()), }, }, "minReadySeconds": { @@ -36426,7 +36508,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentSpec(ref common.ReferenceCall "rollbackTo": { SchemaProps: spec.SchemaProps{ Description: "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.", - Ref: ref("k8s.io/api/extensions/v1beta1.RollbackConfig"), + Ref: ref(extensionsv1beta1.RollbackConfig{}.OpenAPIModelName()), }, }, "progressDeadlineSeconds": { @@ -36441,7 +36523,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentSpec(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/api/extensions/v1beta1.DeploymentStrategy", "k8s.io/api/extensions/v1beta1.RollbackConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + corev1.PodTemplateSpec{}.OpenAPIModelName(), extensionsv1beta1.DeploymentStrategy{}.OpenAPIModelName(), extensionsv1beta1.RollbackConfig{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -36519,7 +36601,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentStatus(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentCondition"), + Ref: ref(extensionsv1beta1.DeploymentCondition{}.OpenAPIModelName()), }, }, }, @@ -36536,7 +36618,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentStatus(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.DeploymentCondition"}, + extensionsv1beta1.DeploymentCondition{}.OpenAPIModelName()}, } } @@ -36557,14 +36639,14 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentStrategy(ref common.Reference "rollingUpdate": { SchemaProps: spec.SchemaProps{ Description: "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", - Ref: ref("k8s.io/api/extensions/v1beta1.RollingUpdateDeployment"), + Ref: ref(extensionsv1beta1.RollingUpdateDeployment{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.RollingUpdateDeployment"}, + extensionsv1beta1.RollingUpdateDeployment{}.OpenAPIModelName()}, } } @@ -36593,7 +36675,7 @@ func schema_k8sio_api_extensions_v1beta1_HTTPIngressPath(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.IngressBackend"), + Ref: ref(extensionsv1beta1.IngressBackend{}.OpenAPIModelName()), }, }, }, @@ -36601,7 +36683,7 @@ func schema_k8sio_api_extensions_v1beta1_HTTPIngressPath(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.IngressBackend"}, + extensionsv1beta1.IngressBackend{}.OpenAPIModelName()}, } } @@ -36625,7 +36707,7 @@ func schema_k8sio_api_extensions_v1beta1_HTTPIngressRuleValue(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.HTTPIngressPath"), + Ref: ref(extensionsv1beta1.HTTPIngressPath{}.OpenAPIModelName()), }, }, }, @@ -36636,7 +36718,7 @@ func schema_k8sio_api_extensions_v1beta1_HTTPIngressRuleValue(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.HTTPIngressPath"}, + extensionsv1beta1.HTTPIngressPath{}.OpenAPIModelName()}, } } @@ -36707,28 +36789,28 @@ func schema_k8sio_api_extensions_v1beta1_Ingress(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.IngressSpec"), + Ref: ref(extensionsv1beta1.IngressSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.IngressStatus"), + Ref: ref(extensionsv1beta1.IngressStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.IngressSpec", "k8s.io/api/extensions/v1beta1.IngressStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + extensionsv1beta1.IngressSpec{}.OpenAPIModelName(), extensionsv1beta1.IngressStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -36749,20 +36831,20 @@ func schema_k8sio_api_extensions_v1beta1_IngressBackend(ref common.ReferenceCall "servicePort": { SchemaProps: spec.SchemaProps{ Description: "Specifies the port of the referenced service.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.", - Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + Ref: ref(corev1.TypedLocalObjectReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + corev1.TypedLocalObjectReference{}.OpenAPIModelName(), intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -36791,7 +36873,7 @@ func schema_k8sio_api_extensions_v1beta1_IngressList(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -36802,7 +36884,7 @@ func schema_k8sio_api_extensions_v1beta1_IngressList(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.Ingress"), + Ref: ref(extensionsv1beta1.Ingress{}.OpenAPIModelName()), }, }, }, @@ -36813,7 +36895,7 @@ func schema_k8sio_api_extensions_v1beta1_IngressList(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.Ingress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + extensionsv1beta1.Ingress{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -36851,7 +36933,7 @@ func schema_k8sio_api_extensions_v1beta1_IngressLoadBalancerIngress(ref common.R Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.IngressPortStatus"), + Ref: ref(extensionsv1beta1.IngressPortStatus{}.OpenAPIModelName()), }, }, }, @@ -36861,7 +36943,7 @@ func schema_k8sio_api_extensions_v1beta1_IngressLoadBalancerIngress(ref common.R }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.IngressPortStatus"}, + extensionsv1beta1.IngressPortStatus{}.OpenAPIModelName()}, } } @@ -36885,7 +36967,7 @@ func schema_k8sio_api_extensions_v1beta1_IngressLoadBalancerStatus(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.IngressLoadBalancerIngress"), + Ref: ref(extensionsv1beta1.IngressLoadBalancerIngress{}.OpenAPIModelName()), }, }, }, @@ -36895,7 +36977,7 @@ func schema_k8sio_api_extensions_v1beta1_IngressLoadBalancerStatus(ref common.Re }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.IngressLoadBalancerIngress"}, + extensionsv1beta1.IngressLoadBalancerIngress{}.OpenAPIModelName()}, } } @@ -36954,14 +37036,14 @@ func schema_k8sio_api_extensions_v1beta1_IngressRule(ref common.ReferenceCallbac "http": { SchemaProps: spec.SchemaProps{ Description: "http is a list of http selectors pointing to backends. A path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. A backend defines the referenced service endpoint to which the traffic will be forwarded to.", - Ref: ref("k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"), + Ref: ref(extensionsv1beta1.HTTPIngressRuleValue{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"}, + extensionsv1beta1.HTTPIngressRuleValue{}.OpenAPIModelName()}, } } @@ -36975,14 +37057,14 @@ func schema_k8sio_api_extensions_v1beta1_IngressRuleValue(ref common.ReferenceCa "http": { SchemaProps: spec.SchemaProps{ Description: "http is a list of http selectors pointing to backends. A path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. A backend defines the referenced service endpoint to which the traffic will be forwarded to.", - Ref: ref("k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"), + Ref: ref(extensionsv1beta1.HTTPIngressRuleValue{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"}, + extensionsv1beta1.HTTPIngressRuleValue{}.OpenAPIModelName()}, } } @@ -37003,7 +37085,7 @@ func schema_k8sio_api_extensions_v1beta1_IngressSpec(ref common.ReferenceCallbac "backend": { SchemaProps: spec.SchemaProps{ Description: "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", - Ref: ref("k8s.io/api/extensions/v1beta1.IngressBackend"), + Ref: ref(extensionsv1beta1.IngressBackend{}.OpenAPIModelName()), }, }, "tls": { @@ -37019,7 +37101,7 @@ func schema_k8sio_api_extensions_v1beta1_IngressSpec(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.IngressTLS"), + Ref: ref(extensionsv1beta1.IngressTLS{}.OpenAPIModelName()), }, }, }, @@ -37038,7 +37120,7 @@ func schema_k8sio_api_extensions_v1beta1_IngressSpec(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.IngressRule"), + Ref: ref(extensionsv1beta1.IngressRule{}.OpenAPIModelName()), }, }, }, @@ -37048,7 +37130,7 @@ func schema_k8sio_api_extensions_v1beta1_IngressSpec(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.IngressBackend", "k8s.io/api/extensions/v1beta1.IngressRule", "k8s.io/api/extensions/v1beta1.IngressTLS"}, + extensionsv1beta1.IngressBackend{}.OpenAPIModelName(), extensionsv1beta1.IngressRule{}.OpenAPIModelName(), extensionsv1beta1.IngressTLS{}.OpenAPIModelName()}, } } @@ -37063,14 +37145,14 @@ func schema_k8sio_api_extensions_v1beta1_IngressStatus(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "LoadBalancer contains the current status of the load-balancer.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.IngressLoadBalancerStatus"), + Ref: ref(extensionsv1beta1.IngressLoadBalancerStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.IngressLoadBalancerStatus"}, + extensionsv1beta1.IngressLoadBalancerStatus{}.OpenAPIModelName()}, } } @@ -37139,21 +37221,21 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicy(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior for this NetworkPolicy.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicySpec"), + Ref: ref(extensionsv1beta1.NetworkPolicySpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.NetworkPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + extensionsv1beta1.NetworkPolicySpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -37177,7 +37259,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyEgressRule(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPort"), + Ref: ref(extensionsv1beta1.NetworkPolicyPort{}.OpenAPIModelName()), }, }, }, @@ -37196,7 +37278,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyEgressRule(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPeer"), + Ref: ref(extensionsv1beta1.NetworkPolicyPeer{}.OpenAPIModelName()), }, }, }, @@ -37206,7 +37288,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyEgressRule(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.NetworkPolicyPeer", "k8s.io/api/extensions/v1beta1.NetworkPolicyPort"}, + extensionsv1beta1.NetworkPolicyPeer{}.OpenAPIModelName(), extensionsv1beta1.NetworkPolicyPort{}.OpenAPIModelName()}, } } @@ -37230,7 +37312,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyIngressRule(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPort"), + Ref: ref(extensionsv1beta1.NetworkPolicyPort{}.OpenAPIModelName()), }, }, }, @@ -37249,7 +37331,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyIngressRule(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPeer"), + Ref: ref(extensionsv1beta1.NetworkPolicyPeer{}.OpenAPIModelName()), }, }, }, @@ -37259,7 +37341,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyIngressRule(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.NetworkPolicyPeer", "k8s.io/api/extensions/v1beta1.NetworkPolicyPort"}, + extensionsv1beta1.NetworkPolicyPeer{}.OpenAPIModelName(), extensionsv1beta1.NetworkPolicyPort{}.OpenAPIModelName()}, } } @@ -37288,7 +37370,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyList(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -37299,7 +37381,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyList(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicy"), + Ref: ref(extensionsv1beta1.NetworkPolicy{}.OpenAPIModelName()), }, }, }, @@ -37310,7 +37392,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyList(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.NetworkPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + extensionsv1beta1.NetworkPolicy{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -37324,26 +37406,26 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyPeer(ref common.ReferenceC "podSelector": { SchemaProps: spec.SchemaProps{ Description: "This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "namespaceSelector": { SchemaProps: spec.SchemaProps{ Description: "Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "ipBlock": { SchemaProps: spec.SchemaProps{ Description: "IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.", - Ref: ref("k8s.io/api/extensions/v1beta1.IPBlock"), + Ref: ref(extensionsv1beta1.IPBlock{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.IPBlock", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + extensionsv1beta1.IPBlock{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -37365,7 +37447,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyPort(ref common.ReferenceC "port": { SchemaProps: spec.SchemaProps{ Description: "The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "endPort": { @@ -37379,7 +37461,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyPort(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -37394,7 +37476,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "ingress": { @@ -37410,7 +37492,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule"), + Ref: ref(extensionsv1beta1.NetworkPolicyIngressRule{}.OpenAPIModelName()), }, }, }, @@ -37429,7 +37511,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule"), + Ref: ref(extensionsv1beta1.NetworkPolicyEgressRule{}.OpenAPIModelName()), }, }, }, @@ -37460,7 +37542,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule", "k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + extensionsv1beta1.NetworkPolicyEgressRule{}.OpenAPIModelName(), extensionsv1beta1.NetworkPolicyIngressRule{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -37489,28 +37571,28 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSet(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSetSpec"), + Ref: ref(extensionsv1beta1.ReplicaSetSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSetStatus"), + Ref: ref(extensionsv1beta1.ReplicaSetStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.ReplicaSetSpec", "k8s.io/api/extensions/v1beta1.ReplicaSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + extensionsv1beta1.ReplicaSetSpec{}.OpenAPIModelName(), extensionsv1beta1.ReplicaSetStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -37540,7 +37622,7 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetCondition(ref common.Referenc "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "The last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -37562,7 +37644,7 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetCondition(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -37591,7 +37673,7 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetList(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -37602,7 +37684,7 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetList(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSet"), + Ref: ref(extensionsv1beta1.ReplicaSet{}.OpenAPIModelName()), }, }, }, @@ -37613,7 +37695,7 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetList(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.ReplicaSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + extensionsv1beta1.ReplicaSet{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -37641,21 +37723,21 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetSpec(ref common.ReferenceCall "selector": { SchemaProps: spec.SchemaProps{ Description: "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(corev1.PodTemplateSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + corev1.PodTemplateSpec{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -37727,7 +37809,7 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetStatus(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSetCondition"), + Ref: ref(extensionsv1beta1.ReplicaSetCondition{}.OpenAPIModelName()), }, }, }, @@ -37738,7 +37820,7 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetStatus(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.ReplicaSetCondition"}, + extensionsv1beta1.ReplicaSetCondition{}.OpenAPIModelName()}, } } @@ -37772,20 +37854,20 @@ func schema_k8sio_api_extensions_v1beta1_RollingUpdateDaemonSet(ref common.Refer "maxUnavailable": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "maxSurge": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediately created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -37799,20 +37881,20 @@ func schema_k8sio_api_extensions_v1beta1_RollingUpdateDeployment(ref common.Refe "maxUnavailable": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "maxSurge": { SchemaProps: spec.SchemaProps{ Description: "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -37841,28 +37923,28 @@ func schema_k8sio_api_extensions_v1beta1_Scale(ref common.ReferenceCallback) com SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.ScaleSpec"), + Ref: ref(extensionsv1beta1.ScaleSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/extensions/v1beta1.ScaleStatus"), + Ref: ref(extensionsv1beta1.ScaleStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.ScaleSpec", "k8s.io/api/extensions/v1beta1.ScaleStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + extensionsv1beta1.ScaleSpec{}.OpenAPIModelName(), extensionsv1beta1.ScaleStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -38011,28 +38093,28 @@ func schema_k8sio_api_flowcontrol_v1_FlowSchema(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1.FlowSchemaSpec"), + Ref: ref(flowcontrolv1.FlowSchemaSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1.FlowSchemaStatus"), + Ref: ref(flowcontrolv1.FlowSchemaStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1.FlowSchemaSpec", "k8s.io/api/flowcontrol/v1.FlowSchemaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + flowcontrolv1.FlowSchemaSpec{}.OpenAPIModelName(), flowcontrolv1.FlowSchemaStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -38060,7 +38142,7 @@ func schema_k8sio_api_flowcontrol_v1_FlowSchemaCondition(ref common.ReferenceCal "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -38081,7 +38163,7 @@ func schema_k8sio_api_flowcontrol_v1_FlowSchemaCondition(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -38110,7 +38192,7 @@ func schema_k8sio_api_flowcontrol_v1_FlowSchemaList(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -38121,7 +38203,7 @@ func schema_k8sio_api_flowcontrol_v1_FlowSchemaList(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1.FlowSchema"), + Ref: ref(flowcontrolv1.FlowSchema{}.OpenAPIModelName()), }, }, }, @@ -38132,7 +38214,7 @@ func schema_k8sio_api_flowcontrol_v1_FlowSchemaList(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1.FlowSchema", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + flowcontrolv1.FlowSchema{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -38147,7 +38229,7 @@ func schema_k8sio_api_flowcontrol_v1_FlowSchemaSpec(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1.PriorityLevelConfigurationReference"), + Ref: ref(flowcontrolv1.PriorityLevelConfigurationReference{}.OpenAPIModelName()), }, }, "matchingPrecedence": { @@ -38161,7 +38243,7 @@ func schema_k8sio_api_flowcontrol_v1_FlowSchemaSpec(ref common.ReferenceCallback "distinguisherMethod": { SchemaProps: spec.SchemaProps{ Description: "`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.", - Ref: ref("k8s.io/api/flowcontrol/v1.FlowDistinguisherMethod"), + Ref: ref(flowcontrolv1.FlowDistinguisherMethod{}.OpenAPIModelName()), }, }, "rules": { @@ -38177,7 +38259,7 @@ func schema_k8sio_api_flowcontrol_v1_FlowSchemaSpec(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1.PolicyRulesWithSubjects"), + Ref: ref(flowcontrolv1.PolicyRulesWithSubjects{}.OpenAPIModelName()), }, }, }, @@ -38188,7 +38270,7 @@ func schema_k8sio_api_flowcontrol_v1_FlowSchemaSpec(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1.FlowDistinguisherMethod", "k8s.io/api/flowcontrol/v1.PolicyRulesWithSubjects", "k8s.io/api/flowcontrol/v1.PriorityLevelConfigurationReference"}, + flowcontrolv1.FlowDistinguisherMethod{}.OpenAPIModelName(), flowcontrolv1.PolicyRulesWithSubjects{}.OpenAPIModelName(), flowcontrolv1.PriorityLevelConfigurationReference{}.OpenAPIModelName()}, } } @@ -38217,7 +38299,7 @@ func schema_k8sio_api_flowcontrol_v1_FlowSchemaStatus(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1.FlowSchemaCondition"), + Ref: ref(flowcontrolv1.FlowSchemaCondition{}.OpenAPIModelName()), }, }, }, @@ -38227,7 +38309,7 @@ func schema_k8sio_api_flowcontrol_v1_FlowSchemaStatus(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1.FlowSchemaCondition"}, + flowcontrolv1.FlowSchemaCondition{}.OpenAPIModelName()}, } } @@ -38271,7 +38353,7 @@ func schema_k8sio_api_flowcontrol_v1_LimitResponse(ref common.ReferenceCallback) "queuing": { SchemaProps: spec.SchemaProps{ Description: "`queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `\"Queue\"`.", - Ref: ref("k8s.io/api/flowcontrol/v1.QueuingConfiguration"), + Ref: ref(flowcontrolv1.QueuingConfiguration{}.OpenAPIModelName()), }, }, }, @@ -38291,7 +38373,7 @@ func schema_k8sio_api_flowcontrol_v1_LimitResponse(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1.QueuingConfiguration"}, + flowcontrolv1.QueuingConfiguration{}.OpenAPIModelName()}, } } @@ -38313,7 +38395,7 @@ func schema_k8sio_api_flowcontrol_v1_LimitedPriorityLevelConfiguration(ref commo SchemaProps: spec.SchemaProps{ Description: "`limitResponse` indicates what to do with requests that can not be executed right now", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1.LimitResponse"), + Ref: ref(flowcontrolv1.LimitResponse{}.OpenAPIModelName()), }, }, "lendablePercent": { @@ -38334,7 +38416,7 @@ func schema_k8sio_api_flowcontrol_v1_LimitedPriorityLevelConfiguration(ref commo }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1.LimitResponse"}, + flowcontrolv1.LimitResponse{}.OpenAPIModelName()}, } } @@ -38412,7 +38494,7 @@ func schema_k8sio_api_flowcontrol_v1_PolicyRulesWithSubjects(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1.Subject"), + Ref: ref(flowcontrolv1.Subject{}.OpenAPIModelName()), }, }, }, @@ -38431,7 +38513,7 @@ func schema_k8sio_api_flowcontrol_v1_PolicyRulesWithSubjects(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1.ResourcePolicyRule"), + Ref: ref(flowcontrolv1.ResourcePolicyRule{}.OpenAPIModelName()), }, }, }, @@ -38450,7 +38532,7 @@ func schema_k8sio_api_flowcontrol_v1_PolicyRulesWithSubjects(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1.NonResourcePolicyRule"), + Ref: ref(flowcontrolv1.NonResourcePolicyRule{}.OpenAPIModelName()), }, }, }, @@ -38461,7 +38543,7 @@ func schema_k8sio_api_flowcontrol_v1_PolicyRulesWithSubjects(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1.NonResourcePolicyRule", "k8s.io/api/flowcontrol/v1.ResourcePolicyRule", "k8s.io/api/flowcontrol/v1.Subject"}, + flowcontrolv1.NonResourcePolicyRule{}.OpenAPIModelName(), flowcontrolv1.ResourcePolicyRule{}.OpenAPIModelName(), flowcontrolv1.Subject{}.OpenAPIModelName()}, } } @@ -38490,28 +38572,28 @@ func schema_k8sio_api_flowcontrol_v1_PriorityLevelConfiguration(ref common.Refer SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1.PriorityLevelConfigurationSpec"), + Ref: ref(flowcontrolv1.PriorityLevelConfigurationSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1.PriorityLevelConfigurationStatus"), + Ref: ref(flowcontrolv1.PriorityLevelConfigurationStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1.PriorityLevelConfigurationSpec", "k8s.io/api/flowcontrol/v1.PriorityLevelConfigurationStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + flowcontrolv1.PriorityLevelConfigurationSpec{}.OpenAPIModelName(), flowcontrolv1.PriorityLevelConfigurationStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -38539,7 +38621,7 @@ func schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationCondition(ref com "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -38560,7 +38642,7 @@ func schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationCondition(ref com }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -38589,7 +38671,7 @@ func schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationList(ref common.R SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -38600,7 +38682,7 @@ func schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationList(ref common.R Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1.PriorityLevelConfiguration"), + Ref: ref(flowcontrolv1.PriorityLevelConfiguration{}.OpenAPIModelName()), }, }, }, @@ -38611,7 +38693,7 @@ func schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationList(ref common.R }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1.PriorityLevelConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + flowcontrolv1.PriorityLevelConfiguration{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -38655,13 +38737,13 @@ func schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationSpec(ref common.R "limited": { SchemaProps: spec.SchemaProps{ Description: "`limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `\"Limited\"`.", - Ref: ref("k8s.io/api/flowcontrol/v1.LimitedPriorityLevelConfiguration"), + Ref: ref(flowcontrolv1.LimitedPriorityLevelConfiguration{}.OpenAPIModelName()), }, }, "exempt": { SchemaProps: spec.SchemaProps{ Description: "`exempt` specifies how requests are handled for an exempt priority level. This field MUST be empty if `type` is `\"Limited\"`. This field MAY be non-empty if `type` is `\"Exempt\"`. If empty and `type` is `\"Exempt\"` then the default values for `ExemptPriorityLevelConfiguration` apply.", - Ref: ref("k8s.io/api/flowcontrol/v1.ExemptPriorityLevelConfiguration"), + Ref: ref(flowcontrolv1.ExemptPriorityLevelConfiguration{}.OpenAPIModelName()), }, }, }, @@ -38682,7 +38764,7 @@ func schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationSpec(ref common.R }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1.ExemptPriorityLevelConfiguration", "k8s.io/api/flowcontrol/v1.LimitedPriorityLevelConfiguration"}, + flowcontrolv1.ExemptPriorityLevelConfiguration{}.OpenAPIModelName(), flowcontrolv1.LimitedPriorityLevelConfiguration{}.OpenAPIModelName()}, } } @@ -38711,7 +38793,7 @@ func schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationStatus(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1.PriorityLevelConfigurationCondition"), + Ref: ref(flowcontrolv1.PriorityLevelConfigurationCondition{}.OpenAPIModelName()), }, }, }, @@ -38721,7 +38803,7 @@ func schema_k8sio_api_flowcontrol_v1_PriorityLevelConfigurationStatus(ref common }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1.PriorityLevelConfigurationCondition"}, + flowcontrolv1.PriorityLevelConfigurationCondition{}.OpenAPIModelName()}, } } @@ -38911,19 +38993,19 @@ func schema_k8sio_api_flowcontrol_v1_Subject(ref common.ReferenceCallback) commo "user": { SchemaProps: spec.SchemaProps{ Description: "`user` matches based on username.", - Ref: ref("k8s.io/api/flowcontrol/v1.UserSubject"), + Ref: ref(flowcontrolv1.UserSubject{}.OpenAPIModelName()), }, }, "group": { SchemaProps: spec.SchemaProps{ Description: "`group` matches based on user group name.", - Ref: ref("k8s.io/api/flowcontrol/v1.GroupSubject"), + Ref: ref(flowcontrolv1.GroupSubject{}.OpenAPIModelName()), }, }, "serviceAccount": { SchemaProps: spec.SchemaProps{ Description: "`serviceAccount` matches ServiceAccounts.", - Ref: ref("k8s.io/api/flowcontrol/v1.ServiceAccountSubject"), + Ref: ref(flowcontrolv1.ServiceAccountSubject{}.OpenAPIModelName()), }, }, }, @@ -38945,7 +39027,7 @@ func schema_k8sio_api_flowcontrol_v1_Subject(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1.GroupSubject", "k8s.io/api/flowcontrol/v1.ServiceAccountSubject", "k8s.io/api/flowcontrol/v1.UserSubject"}, + flowcontrolv1.GroupSubject{}.OpenAPIModelName(), flowcontrolv1.ServiceAccountSubject{}.OpenAPIModelName(), flowcontrolv1.UserSubject{}.OpenAPIModelName()}, } } @@ -39045,28 +39127,28 @@ func schema_k8sio_api_flowcontrol_v1beta1_FlowSchema(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta1.FlowSchemaSpec"), + Ref: ref(flowcontrolv1beta1.FlowSchemaSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta1.FlowSchemaStatus"), + Ref: ref(flowcontrolv1beta1.FlowSchemaStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta1.FlowSchemaSpec", "k8s.io/api/flowcontrol/v1beta1.FlowSchemaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + flowcontrolv1beta1.FlowSchemaSpec{}.OpenAPIModelName(), flowcontrolv1beta1.FlowSchemaStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -39094,7 +39176,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaCondition(ref common.Referen "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -39115,7 +39197,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaCondition(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -39144,7 +39226,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaList(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -39155,7 +39237,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaList(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta1.FlowSchema"), + Ref: ref(flowcontrolv1beta1.FlowSchema{}.OpenAPIModelName()), }, }, }, @@ -39166,7 +39248,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaList(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta1.FlowSchema", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + flowcontrolv1beta1.FlowSchema{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -39181,7 +39263,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaSpec(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationReference"), + Ref: ref(flowcontrolv1beta1.PriorityLevelConfigurationReference{}.OpenAPIModelName()), }, }, "matchingPrecedence": { @@ -39195,7 +39277,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaSpec(ref common.ReferenceCal "distinguisherMethod": { SchemaProps: spec.SchemaProps{ Description: "`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.", - Ref: ref("k8s.io/api/flowcontrol/v1beta1.FlowDistinguisherMethod"), + Ref: ref(flowcontrolv1beta1.FlowDistinguisherMethod{}.OpenAPIModelName()), }, }, "rules": { @@ -39211,7 +39293,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaSpec(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta1.PolicyRulesWithSubjects"), + Ref: ref(flowcontrolv1beta1.PolicyRulesWithSubjects{}.OpenAPIModelName()), }, }, }, @@ -39222,7 +39304,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaSpec(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta1.FlowDistinguisherMethod", "k8s.io/api/flowcontrol/v1beta1.PolicyRulesWithSubjects", "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationReference"}, + flowcontrolv1beta1.FlowDistinguisherMethod{}.OpenAPIModelName(), flowcontrolv1beta1.PolicyRulesWithSubjects{}.OpenAPIModelName(), flowcontrolv1beta1.PriorityLevelConfigurationReference{}.OpenAPIModelName()}, } } @@ -39249,7 +39331,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaStatus(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta1.FlowSchemaCondition"), + Ref: ref(flowcontrolv1beta1.FlowSchemaCondition{}.OpenAPIModelName()), }, }, }, @@ -39259,7 +39341,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaStatus(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta1.FlowSchemaCondition"}, + flowcontrolv1beta1.FlowSchemaCondition{}.OpenAPIModelName()}, } } @@ -39303,7 +39385,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_LimitResponse(ref common.ReferenceCall "queuing": { SchemaProps: spec.SchemaProps{ Description: "`queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `\"Queue\"`.", - Ref: ref("k8s.io/api/flowcontrol/v1beta1.QueuingConfiguration"), + Ref: ref(flowcontrolv1beta1.QueuingConfiguration{}.OpenAPIModelName()), }, }, }, @@ -39323,7 +39405,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_LimitResponse(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta1.QueuingConfiguration"}, + flowcontrolv1beta1.QueuingConfiguration{}.OpenAPIModelName()}, } } @@ -39346,7 +39428,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_LimitedPriorityLevelConfiguration(ref SchemaProps: spec.SchemaProps{ Description: "`limitResponse` indicates what to do with requests that can not be executed right now", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta1.LimitResponse"), + Ref: ref(flowcontrolv1beta1.LimitResponse{}.OpenAPIModelName()), }, }, "lendablePercent": { @@ -39367,7 +39449,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_LimitedPriorityLevelConfiguration(ref }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta1.LimitResponse"}, + flowcontrolv1beta1.LimitResponse{}.OpenAPIModelName()}, } } @@ -39445,7 +39527,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_PolicyRulesWithSubjects(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta1.Subject"), + Ref: ref(flowcontrolv1beta1.Subject{}.OpenAPIModelName()), }, }, }, @@ -39464,7 +39546,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_PolicyRulesWithSubjects(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta1.ResourcePolicyRule"), + Ref: ref(flowcontrolv1beta1.ResourcePolicyRule{}.OpenAPIModelName()), }, }, }, @@ -39483,7 +39565,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_PolicyRulesWithSubjects(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta1.NonResourcePolicyRule"), + Ref: ref(flowcontrolv1beta1.NonResourcePolicyRule{}.OpenAPIModelName()), }, }, }, @@ -39494,7 +39576,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_PolicyRulesWithSubjects(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta1.NonResourcePolicyRule", "k8s.io/api/flowcontrol/v1beta1.ResourcePolicyRule", "k8s.io/api/flowcontrol/v1beta1.Subject"}, + flowcontrolv1beta1.NonResourcePolicyRule{}.OpenAPIModelName(), flowcontrolv1beta1.ResourcePolicyRule{}.OpenAPIModelName(), flowcontrolv1beta1.Subject{}.OpenAPIModelName()}, } } @@ -39523,28 +39605,28 @@ func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfiguration(ref common. SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationSpec"), + Ref: ref(flowcontrolv1beta1.PriorityLevelConfigurationSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationStatus"), + Ref: ref(flowcontrolv1beta1.PriorityLevelConfigurationStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationSpec", "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + flowcontrolv1beta1.PriorityLevelConfigurationSpec{}.OpenAPIModelName(), flowcontrolv1beta1.PriorityLevelConfigurationStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -39572,7 +39654,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationCondition(re "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -39593,7 +39675,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationCondition(re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -39622,7 +39704,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationList(ref com SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -39633,7 +39715,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationList(ref com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfiguration"), + Ref: ref(flowcontrolv1beta1.PriorityLevelConfiguration{}.OpenAPIModelName()), }, }, }, @@ -39644,7 +39726,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationList(ref com }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + flowcontrolv1beta1.PriorityLevelConfiguration{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -39688,13 +39770,13 @@ func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationSpec(ref com "limited": { SchemaProps: spec.SchemaProps{ Description: "`limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `\"Limited\"`.", - Ref: ref("k8s.io/api/flowcontrol/v1beta1.LimitedPriorityLevelConfiguration"), + Ref: ref(flowcontrolv1beta1.LimitedPriorityLevelConfiguration{}.OpenAPIModelName()), }, }, "exempt": { SchemaProps: spec.SchemaProps{ Description: "`exempt` specifies how requests are handled for an exempt priority level. This field MUST be empty if `type` is `\"Limited\"`. This field MAY be non-empty if `type` is `\"Exempt\"`. If empty and `type` is `\"Exempt\"` then the default values for `ExemptPriorityLevelConfiguration` apply.", - Ref: ref("k8s.io/api/flowcontrol/v1beta1.ExemptPriorityLevelConfiguration"), + Ref: ref(flowcontrolv1beta1.ExemptPriorityLevelConfiguration{}.OpenAPIModelName()), }, }, }, @@ -39715,7 +39797,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationSpec(ref com }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta1.ExemptPriorityLevelConfiguration", "k8s.io/api/flowcontrol/v1beta1.LimitedPriorityLevelConfiguration"}, + flowcontrolv1beta1.ExemptPriorityLevelConfiguration{}.OpenAPIModelName(), flowcontrolv1beta1.LimitedPriorityLevelConfiguration{}.OpenAPIModelName()}, } } @@ -39742,7 +39824,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationStatus(ref c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationCondition"), + Ref: ref(flowcontrolv1beta1.PriorityLevelConfigurationCondition{}.OpenAPIModelName()), }, }, }, @@ -39752,7 +39834,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationStatus(ref c }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationCondition"}, + flowcontrolv1beta1.PriorityLevelConfigurationCondition{}.OpenAPIModelName()}, } } @@ -39942,19 +40024,19 @@ func schema_k8sio_api_flowcontrol_v1beta1_Subject(ref common.ReferenceCallback) "user": { SchemaProps: spec.SchemaProps{ Description: "`user` matches based on username.", - Ref: ref("k8s.io/api/flowcontrol/v1beta1.UserSubject"), + Ref: ref(flowcontrolv1beta1.UserSubject{}.OpenAPIModelName()), }, }, "group": { SchemaProps: spec.SchemaProps{ Description: "`group` matches based on user group name.", - Ref: ref("k8s.io/api/flowcontrol/v1beta1.GroupSubject"), + Ref: ref(flowcontrolv1beta1.GroupSubject{}.OpenAPIModelName()), }, }, "serviceAccount": { SchemaProps: spec.SchemaProps{ Description: "`serviceAccount` matches ServiceAccounts.", - Ref: ref("k8s.io/api/flowcontrol/v1beta1.ServiceAccountSubject"), + Ref: ref(flowcontrolv1beta1.ServiceAccountSubject{}.OpenAPIModelName()), }, }, }, @@ -39976,7 +40058,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_Subject(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta1.GroupSubject", "k8s.io/api/flowcontrol/v1beta1.ServiceAccountSubject", "k8s.io/api/flowcontrol/v1beta1.UserSubject"}, + flowcontrolv1beta1.GroupSubject{}.OpenAPIModelName(), flowcontrolv1beta1.ServiceAccountSubject{}.OpenAPIModelName(), flowcontrolv1beta1.UserSubject{}.OpenAPIModelName()}, } } @@ -40076,28 +40158,28 @@ func schema_k8sio_api_flowcontrol_v1beta2_FlowSchema(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta2.FlowSchemaSpec"), + Ref: ref(flowcontrolv1beta2.FlowSchemaSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta2.FlowSchemaStatus"), + Ref: ref(flowcontrolv1beta2.FlowSchemaStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta2.FlowSchemaSpec", "k8s.io/api/flowcontrol/v1beta2.FlowSchemaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + flowcontrolv1beta2.FlowSchemaSpec{}.OpenAPIModelName(), flowcontrolv1beta2.FlowSchemaStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -40125,7 +40207,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaCondition(ref common.Referen "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -40146,7 +40228,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaCondition(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -40175,7 +40257,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaList(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -40186,7 +40268,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaList(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta2.FlowSchema"), + Ref: ref(flowcontrolv1beta2.FlowSchema{}.OpenAPIModelName()), }, }, }, @@ -40197,7 +40279,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaList(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta2.FlowSchema", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + flowcontrolv1beta2.FlowSchema{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -40212,7 +40294,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaSpec(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationReference"), + Ref: ref(flowcontrolv1beta2.PriorityLevelConfigurationReference{}.OpenAPIModelName()), }, }, "matchingPrecedence": { @@ -40226,7 +40308,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaSpec(ref common.ReferenceCal "distinguisherMethod": { SchemaProps: spec.SchemaProps{ Description: "`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.", - Ref: ref("k8s.io/api/flowcontrol/v1beta2.FlowDistinguisherMethod"), + Ref: ref(flowcontrolv1beta2.FlowDistinguisherMethod{}.OpenAPIModelName()), }, }, "rules": { @@ -40242,7 +40324,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaSpec(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta2.PolicyRulesWithSubjects"), + Ref: ref(flowcontrolv1beta2.PolicyRulesWithSubjects{}.OpenAPIModelName()), }, }, }, @@ -40253,7 +40335,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaSpec(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta2.FlowDistinguisherMethod", "k8s.io/api/flowcontrol/v1beta2.PolicyRulesWithSubjects", "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationReference"}, + flowcontrolv1beta2.FlowDistinguisherMethod{}.OpenAPIModelName(), flowcontrolv1beta2.PolicyRulesWithSubjects{}.OpenAPIModelName(), flowcontrolv1beta2.PriorityLevelConfigurationReference{}.OpenAPIModelName()}, } } @@ -40280,7 +40362,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaStatus(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta2.FlowSchemaCondition"), + Ref: ref(flowcontrolv1beta2.FlowSchemaCondition{}.OpenAPIModelName()), }, }, }, @@ -40290,7 +40372,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaStatus(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta2.FlowSchemaCondition"}, + flowcontrolv1beta2.FlowSchemaCondition{}.OpenAPIModelName()}, } } @@ -40334,7 +40416,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_LimitResponse(ref common.ReferenceCall "queuing": { SchemaProps: spec.SchemaProps{ Description: "`queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `\"Queue\"`.", - Ref: ref("k8s.io/api/flowcontrol/v1beta2.QueuingConfiguration"), + Ref: ref(flowcontrolv1beta2.QueuingConfiguration{}.OpenAPIModelName()), }, }, }, @@ -40354,7 +40436,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_LimitResponse(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta2.QueuingConfiguration"}, + flowcontrolv1beta2.QueuingConfiguration{}.OpenAPIModelName()}, } } @@ -40377,7 +40459,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_LimitedPriorityLevelConfiguration(ref SchemaProps: spec.SchemaProps{ Description: "`limitResponse` indicates what to do with requests that can not be executed right now", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta2.LimitResponse"), + Ref: ref(flowcontrolv1beta2.LimitResponse{}.OpenAPIModelName()), }, }, "lendablePercent": { @@ -40398,7 +40480,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_LimitedPriorityLevelConfiguration(ref }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta2.LimitResponse"}, + flowcontrolv1beta2.LimitResponse{}.OpenAPIModelName()}, } } @@ -40476,7 +40558,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_PolicyRulesWithSubjects(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta2.Subject"), + Ref: ref(flowcontrolv1beta2.Subject{}.OpenAPIModelName()), }, }, }, @@ -40495,7 +40577,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_PolicyRulesWithSubjects(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta2.ResourcePolicyRule"), + Ref: ref(flowcontrolv1beta2.ResourcePolicyRule{}.OpenAPIModelName()), }, }, }, @@ -40514,7 +40596,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_PolicyRulesWithSubjects(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta2.NonResourcePolicyRule"), + Ref: ref(flowcontrolv1beta2.NonResourcePolicyRule{}.OpenAPIModelName()), }, }, }, @@ -40525,7 +40607,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_PolicyRulesWithSubjects(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta2.NonResourcePolicyRule", "k8s.io/api/flowcontrol/v1beta2.ResourcePolicyRule", "k8s.io/api/flowcontrol/v1beta2.Subject"}, + flowcontrolv1beta2.NonResourcePolicyRule{}.OpenAPIModelName(), flowcontrolv1beta2.ResourcePolicyRule{}.OpenAPIModelName(), flowcontrolv1beta2.Subject{}.OpenAPIModelName()}, } } @@ -40554,28 +40636,28 @@ func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfiguration(ref common. SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationSpec"), + Ref: ref(flowcontrolv1beta2.PriorityLevelConfigurationSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationStatus"), + Ref: ref(flowcontrolv1beta2.PriorityLevelConfigurationStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationSpec", "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + flowcontrolv1beta2.PriorityLevelConfigurationSpec{}.OpenAPIModelName(), flowcontrolv1beta2.PriorityLevelConfigurationStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -40603,7 +40685,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationCondition(re "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -40624,7 +40706,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationCondition(re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -40653,7 +40735,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationList(ref com SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -40664,7 +40746,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationList(ref com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfiguration"), + Ref: ref(flowcontrolv1beta2.PriorityLevelConfiguration{}.OpenAPIModelName()), }, }, }, @@ -40675,7 +40757,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationList(ref com }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + flowcontrolv1beta2.PriorityLevelConfiguration{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -40719,13 +40801,13 @@ func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationSpec(ref com "limited": { SchemaProps: spec.SchemaProps{ Description: "`limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `\"Limited\"`.", - Ref: ref("k8s.io/api/flowcontrol/v1beta2.LimitedPriorityLevelConfiguration"), + Ref: ref(flowcontrolv1beta2.LimitedPriorityLevelConfiguration{}.OpenAPIModelName()), }, }, "exempt": { SchemaProps: spec.SchemaProps{ Description: "`exempt` specifies how requests are handled for an exempt priority level. This field MUST be empty if `type` is `\"Limited\"`. This field MAY be non-empty if `type` is `\"Exempt\"`. If empty and `type` is `\"Exempt\"` then the default values for `ExemptPriorityLevelConfiguration` apply.", - Ref: ref("k8s.io/api/flowcontrol/v1beta2.ExemptPriorityLevelConfiguration"), + Ref: ref(flowcontrolv1beta2.ExemptPriorityLevelConfiguration{}.OpenAPIModelName()), }, }, }, @@ -40746,7 +40828,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationSpec(ref com }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta2.ExemptPriorityLevelConfiguration", "k8s.io/api/flowcontrol/v1beta2.LimitedPriorityLevelConfiguration"}, + flowcontrolv1beta2.ExemptPriorityLevelConfiguration{}.OpenAPIModelName(), flowcontrolv1beta2.LimitedPriorityLevelConfiguration{}.OpenAPIModelName()}, } } @@ -40773,7 +40855,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationStatus(ref c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationCondition"), + Ref: ref(flowcontrolv1beta2.PriorityLevelConfigurationCondition{}.OpenAPIModelName()), }, }, }, @@ -40783,7 +40865,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationStatus(ref c }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationCondition"}, + flowcontrolv1beta2.PriorityLevelConfigurationCondition{}.OpenAPIModelName()}, } } @@ -40973,19 +41055,19 @@ func schema_k8sio_api_flowcontrol_v1beta2_Subject(ref common.ReferenceCallback) "user": { SchemaProps: spec.SchemaProps{ Description: "`user` matches based on username.", - Ref: ref("k8s.io/api/flowcontrol/v1beta2.UserSubject"), + Ref: ref(flowcontrolv1beta2.UserSubject{}.OpenAPIModelName()), }, }, "group": { SchemaProps: spec.SchemaProps{ Description: "`group` matches based on user group name.", - Ref: ref("k8s.io/api/flowcontrol/v1beta2.GroupSubject"), + Ref: ref(flowcontrolv1beta2.GroupSubject{}.OpenAPIModelName()), }, }, "serviceAccount": { SchemaProps: spec.SchemaProps{ Description: "`serviceAccount` matches ServiceAccounts.", - Ref: ref("k8s.io/api/flowcontrol/v1beta2.ServiceAccountSubject"), + Ref: ref(flowcontrolv1beta2.ServiceAccountSubject{}.OpenAPIModelName()), }, }, }, @@ -41007,7 +41089,7 @@ func schema_k8sio_api_flowcontrol_v1beta2_Subject(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta2.GroupSubject", "k8s.io/api/flowcontrol/v1beta2.ServiceAccountSubject", "k8s.io/api/flowcontrol/v1beta2.UserSubject"}, + flowcontrolv1beta2.GroupSubject{}.OpenAPIModelName(), flowcontrolv1beta2.ServiceAccountSubject{}.OpenAPIModelName(), flowcontrolv1beta2.UserSubject{}.OpenAPIModelName()}, } } @@ -41107,28 +41189,28 @@ func schema_k8sio_api_flowcontrol_v1beta3_FlowSchema(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta3.FlowSchemaSpec"), + Ref: ref(v1beta3.FlowSchemaSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta3.FlowSchemaStatus"), + Ref: ref(v1beta3.FlowSchemaStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta3.FlowSchemaSpec", "k8s.io/api/flowcontrol/v1beta3.FlowSchemaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1beta3.FlowSchemaSpec{}.OpenAPIModelName(), v1beta3.FlowSchemaStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -41156,7 +41238,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaCondition(ref common.Referen "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -41177,7 +41259,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaCondition(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -41206,7 +41288,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaList(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -41217,7 +41299,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaList(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta3.FlowSchema"), + Ref: ref(v1beta3.FlowSchema{}.OpenAPIModelName()), }, }, }, @@ -41228,7 +41310,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaList(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta3.FlowSchema", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1beta3.FlowSchema{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -41243,7 +41325,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaSpec(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfigurationReference"), + Ref: ref(v1beta3.PriorityLevelConfigurationReference{}.OpenAPIModelName()), }, }, "matchingPrecedence": { @@ -41257,7 +41339,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaSpec(ref common.ReferenceCal "distinguisherMethod": { SchemaProps: spec.SchemaProps{ Description: "`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.", - Ref: ref("k8s.io/api/flowcontrol/v1beta3.FlowDistinguisherMethod"), + Ref: ref(v1beta3.FlowDistinguisherMethod{}.OpenAPIModelName()), }, }, "rules": { @@ -41273,7 +41355,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaSpec(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta3.PolicyRulesWithSubjects"), + Ref: ref(v1beta3.PolicyRulesWithSubjects{}.OpenAPIModelName()), }, }, }, @@ -41284,7 +41366,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaSpec(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta3.FlowDistinguisherMethod", "k8s.io/api/flowcontrol/v1beta3.PolicyRulesWithSubjects", "k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfigurationReference"}, + v1beta3.FlowDistinguisherMethod{}.OpenAPIModelName(), v1beta3.PolicyRulesWithSubjects{}.OpenAPIModelName(), v1beta3.PriorityLevelConfigurationReference{}.OpenAPIModelName()}, } } @@ -41313,7 +41395,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaStatus(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta3.FlowSchemaCondition"), + Ref: ref(v1beta3.FlowSchemaCondition{}.OpenAPIModelName()), }, }, }, @@ -41323,7 +41405,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_FlowSchemaStatus(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta3.FlowSchemaCondition"}, + v1beta3.FlowSchemaCondition{}.OpenAPIModelName()}, } } @@ -41367,7 +41449,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_LimitResponse(ref common.ReferenceCall "queuing": { SchemaProps: spec.SchemaProps{ Description: "`queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `\"Queue\"`.", - Ref: ref("k8s.io/api/flowcontrol/v1beta3.QueuingConfiguration"), + Ref: ref(v1beta3.QueuingConfiguration{}.OpenAPIModelName()), }, }, }, @@ -41387,7 +41469,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_LimitResponse(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta3.QueuingConfiguration"}, + v1beta3.QueuingConfiguration{}.OpenAPIModelName()}, } } @@ -41410,7 +41492,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_LimitedPriorityLevelConfiguration(ref SchemaProps: spec.SchemaProps{ Description: "`limitResponse` indicates what to do with requests that can not be executed right now", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta3.LimitResponse"), + Ref: ref(v1beta3.LimitResponse{}.OpenAPIModelName()), }, }, "lendablePercent": { @@ -41431,7 +41513,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_LimitedPriorityLevelConfiguration(ref }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta3.LimitResponse"}, + v1beta3.LimitResponse{}.OpenAPIModelName()}, } } @@ -41509,7 +41591,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_PolicyRulesWithSubjects(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta3.Subject"), + Ref: ref(v1beta3.Subject{}.OpenAPIModelName()), }, }, }, @@ -41528,7 +41610,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_PolicyRulesWithSubjects(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta3.ResourcePolicyRule"), + Ref: ref(v1beta3.ResourcePolicyRule{}.OpenAPIModelName()), }, }, }, @@ -41547,7 +41629,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_PolicyRulesWithSubjects(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta3.NonResourcePolicyRule"), + Ref: ref(v1beta3.NonResourcePolicyRule{}.OpenAPIModelName()), }, }, }, @@ -41558,7 +41640,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_PolicyRulesWithSubjects(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta3.NonResourcePolicyRule", "k8s.io/api/flowcontrol/v1beta3.ResourcePolicyRule", "k8s.io/api/flowcontrol/v1beta3.Subject"}, + v1beta3.NonResourcePolicyRule{}.OpenAPIModelName(), v1beta3.ResourcePolicyRule{}.OpenAPIModelName(), v1beta3.Subject{}.OpenAPIModelName()}, } } @@ -41587,28 +41669,28 @@ func schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfiguration(ref common. SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfigurationSpec"), + Ref: ref(v1beta3.PriorityLevelConfigurationSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfigurationStatus"), + Ref: ref(v1beta3.PriorityLevelConfigurationStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfigurationSpec", "k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfigurationStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1beta3.PriorityLevelConfigurationSpec{}.OpenAPIModelName(), v1beta3.PriorityLevelConfigurationStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -41636,7 +41718,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationCondition(re "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -41657,7 +41739,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationCondition(re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -41686,7 +41768,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationList(ref com SchemaProps: spec.SchemaProps{ Description: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -41697,7 +41779,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationList(ref com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfiguration"), + Ref: ref(v1beta3.PriorityLevelConfiguration{}.OpenAPIModelName()), }, }, }, @@ -41708,7 +41790,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationList(ref com }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1beta3.PriorityLevelConfiguration{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -41752,13 +41834,13 @@ func schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationSpec(ref com "limited": { SchemaProps: spec.SchemaProps{ Description: "`limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `\"Limited\"`.", - Ref: ref("k8s.io/api/flowcontrol/v1beta3.LimitedPriorityLevelConfiguration"), + Ref: ref(v1beta3.LimitedPriorityLevelConfiguration{}.OpenAPIModelName()), }, }, "exempt": { SchemaProps: spec.SchemaProps{ Description: "`exempt` specifies how requests are handled for an exempt priority level. This field MUST be empty if `type` is `\"Limited\"`. This field MAY be non-empty if `type` is `\"Exempt\"`. If empty and `type` is `\"Exempt\"` then the default values for `ExemptPriorityLevelConfiguration` apply.", - Ref: ref("k8s.io/api/flowcontrol/v1beta3.ExemptPriorityLevelConfiguration"), + Ref: ref(v1beta3.ExemptPriorityLevelConfiguration{}.OpenAPIModelName()), }, }, }, @@ -41779,7 +41861,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationSpec(ref com }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta3.ExemptPriorityLevelConfiguration", "k8s.io/api/flowcontrol/v1beta3.LimitedPriorityLevelConfiguration"}, + v1beta3.ExemptPriorityLevelConfiguration{}.OpenAPIModelName(), v1beta3.LimitedPriorityLevelConfiguration{}.OpenAPIModelName()}, } } @@ -41808,7 +41890,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationStatus(ref c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfigurationCondition"), + Ref: ref(v1beta3.PriorityLevelConfigurationCondition{}.OpenAPIModelName()), }, }, }, @@ -41818,7 +41900,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_PriorityLevelConfigurationStatus(ref c }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta3.PriorityLevelConfigurationCondition"}, + v1beta3.PriorityLevelConfigurationCondition{}.OpenAPIModelName()}, } } @@ -42008,19 +42090,19 @@ func schema_k8sio_api_flowcontrol_v1beta3_Subject(ref common.ReferenceCallback) "user": { SchemaProps: spec.SchemaProps{ Description: "`user` matches based on username.", - Ref: ref("k8s.io/api/flowcontrol/v1beta3.UserSubject"), + Ref: ref(v1beta3.UserSubject{}.OpenAPIModelName()), }, }, "group": { SchemaProps: spec.SchemaProps{ Description: "`group` matches based on user group name.", - Ref: ref("k8s.io/api/flowcontrol/v1beta3.GroupSubject"), + Ref: ref(v1beta3.GroupSubject{}.OpenAPIModelName()), }, }, "serviceAccount": { SchemaProps: spec.SchemaProps{ Description: "`serviceAccount` matches ServiceAccounts.", - Ref: ref("k8s.io/api/flowcontrol/v1beta3.ServiceAccountSubject"), + Ref: ref(v1beta3.ServiceAccountSubject{}.OpenAPIModelName()), }, }, }, @@ -42042,7 +42124,7 @@ func schema_k8sio_api_flowcontrol_v1beta3_Subject(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta3.GroupSubject", "k8s.io/api/flowcontrol/v1beta3.ServiceAccountSubject", "k8s.io/api/flowcontrol/v1beta3.UserSubject"}, + v1beta3.GroupSubject{}.OpenAPIModelName(), v1beta3.ServiceAccountSubject{}.OpenAPIModelName(), v1beta3.UserSubject{}.OpenAPIModelName()}, } } @@ -42093,21 +42175,21 @@ func schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the pod being evaluated", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec"), + Ref: ref(imagepolicyv1alpha1.ImageReviewSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the backend and indicates whether the pod should be allowed.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus"), + Ref: ref(imagepolicyv1alpha1.ImageReviewStatus{}.OpenAPIModelName()), }, }, }, @@ -42115,7 +42197,7 @@ func schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec", "k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + imagepolicyv1alpha1.ImageReviewSpec{}.OpenAPIModelName(), imagepolicyv1alpha1.ImageReviewStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -42159,7 +42241,7 @@ func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec"), + Ref: ref(imagepolicyv1alpha1.ImageReviewContainerSpec{}.OpenAPIModelName()), }, }, }, @@ -42192,7 +42274,7 @@ func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec"}, + imagepolicyv1alpha1.ImageReviewContainerSpec{}.OpenAPIModelName()}, } } @@ -42267,7 +42349,7 @@ func schema_k8sio_api_networking_v1_HTTPIngressPath(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "backend defines the referenced service endpoint to which the traffic will be forwarded to.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressBackend"), + Ref: ref(networkingv1.IngressBackend{}.OpenAPIModelName()), }, }, }, @@ -42275,7 +42357,7 @@ func schema_k8sio_api_networking_v1_HTTPIngressPath(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IngressBackend"}, + networkingv1.IngressBackend{}.OpenAPIModelName()}, } } @@ -42299,7 +42381,7 @@ func schema_k8sio_api_networking_v1_HTTPIngressRuleValue(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.HTTPIngressPath"), + Ref: ref(networkingv1.HTTPIngressPath{}.OpenAPIModelName()), }, }, }, @@ -42310,7 +42392,7 @@ func schema_k8sio_api_networking_v1_HTTPIngressRuleValue(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.HTTPIngressPath"}, + networkingv1.HTTPIngressPath{}.OpenAPIModelName()}, } } @@ -42339,21 +42421,21 @@ func schema_k8sio_api_networking_v1_IPAddress(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IPAddressSpec"), + Ref: ref(networkingv1.IPAddressSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IPAddressSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + networkingv1.IPAddressSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -42382,7 +42464,7 @@ func schema_k8sio_api_networking_v1_IPAddressList(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -42393,7 +42475,7 @@ func schema_k8sio_api_networking_v1_IPAddressList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IPAddress"), + Ref: ref(networkingv1.IPAddress{}.OpenAPIModelName()), }, }, }, @@ -42404,7 +42486,7 @@ func schema_k8sio_api_networking_v1_IPAddressList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IPAddress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + networkingv1.IPAddress{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -42418,7 +42500,7 @@ func schema_k8sio_api_networking_v1_IPAddressSpec(ref common.ReferenceCallback) "parentRef": { SchemaProps: spec.SchemaProps{ Description: "ParentRef references the resource that an IPAddress is attached to. An IPAddress must reference a parent object.", - Ref: ref("k8s.io/api/networking/v1.ParentReference"), + Ref: ref(networkingv1.ParentReference{}.OpenAPIModelName()), }, }, }, @@ -42426,7 +42508,7 @@ func schema_k8sio_api_networking_v1_IPAddressSpec(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.ParentReference"}, + networkingv1.ParentReference{}.OpenAPIModelName()}, } } @@ -42497,28 +42579,28 @@ func schema_k8sio_api_networking_v1_Ingress(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressSpec"), + Ref: ref(networkingv1.IngressSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressStatus"), + Ref: ref(networkingv1.IngressStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IngressSpec", "k8s.io/api/networking/v1.IngressStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + networkingv1.IngressSpec{}.OpenAPIModelName(), networkingv1.IngressStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -42532,20 +42614,20 @@ func schema_k8sio_api_networking_v1_IngressBackend(ref common.ReferenceCallback) "service": { SchemaProps: spec.SchemaProps{ Description: "service references a service as a backend. This is a mutually exclusive setting with \"Resource\".", - Ref: ref("k8s.io/api/networking/v1.IngressServiceBackend"), + Ref: ref(networkingv1.IngressServiceBackend{}.OpenAPIModelName()), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with \"Service\".", - Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + Ref: ref(corev1.TypedLocalObjectReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/api/networking/v1.IngressServiceBackend"}, + corev1.TypedLocalObjectReference{}.OpenAPIModelName(), networkingv1.IngressServiceBackend{}.OpenAPIModelName()}, } } @@ -42574,21 +42656,21 @@ func schema_k8sio_api_networking_v1_IngressClass(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressClassSpec"), + Ref: ref(networkingv1.IngressClassSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IngressClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + networkingv1.IngressClassSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -42617,7 +42699,7 @@ func schema_k8sio_api_networking_v1_IngressClassList(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -42628,7 +42710,7 @@ func schema_k8sio_api_networking_v1_IngressClassList(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressClass"), + Ref: ref(networkingv1.IngressClass{}.OpenAPIModelName()), }, }, }, @@ -42639,7 +42721,7 @@ func schema_k8sio_api_networking_v1_IngressClassList(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IngressClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + networkingv1.IngressClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -42711,14 +42793,14 @@ func schema_k8sio_api_networking_v1_IngressClassSpec(ref common.ReferenceCallbac "parameters": { SchemaProps: spec.SchemaProps{ Description: "parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", - Ref: ref("k8s.io/api/networking/v1.IngressClassParametersReference"), + Ref: ref(networkingv1.IngressClassParametersReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IngressClassParametersReference"}, + networkingv1.IngressClassParametersReference{}.OpenAPIModelName()}, } } @@ -42747,7 +42829,7 @@ func schema_k8sio_api_networking_v1_IngressList(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -42758,7 +42840,7 @@ func schema_k8sio_api_networking_v1_IngressList(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.Ingress"), + Ref: ref(networkingv1.Ingress{}.OpenAPIModelName()), }, }, }, @@ -42769,7 +42851,7 @@ func schema_k8sio_api_networking_v1_IngressList(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.Ingress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + networkingv1.Ingress{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -42807,7 +42889,7 @@ func schema_k8sio_api_networking_v1_IngressLoadBalancerIngress(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressPortStatus"), + Ref: ref(networkingv1.IngressPortStatus{}.OpenAPIModelName()), }, }, }, @@ -42817,7 +42899,7 @@ func schema_k8sio_api_networking_v1_IngressLoadBalancerIngress(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IngressPortStatus"}, + networkingv1.IngressPortStatus{}.OpenAPIModelName()}, } } @@ -42841,7 +42923,7 @@ func schema_k8sio_api_networking_v1_IngressLoadBalancerStatus(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressLoadBalancerIngress"), + Ref: ref(networkingv1.IngressLoadBalancerIngress{}.OpenAPIModelName()), }, }, }, @@ -42851,7 +42933,7 @@ func schema_k8sio_api_networking_v1_IngressLoadBalancerStatus(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IngressLoadBalancerIngress"}, + networkingv1.IngressLoadBalancerIngress{}.OpenAPIModelName()}, } } @@ -42909,14 +42991,14 @@ func schema_k8sio_api_networking_v1_IngressRule(ref common.ReferenceCallback) co }, "http": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.HTTPIngressRuleValue"), + Ref: ref(networkingv1.HTTPIngressRuleValue{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.HTTPIngressRuleValue"}, + networkingv1.HTTPIngressRuleValue{}.OpenAPIModelName()}, } } @@ -42929,14 +43011,14 @@ func schema_k8sio_api_networking_v1_IngressRuleValue(ref common.ReferenceCallbac Properties: map[string]spec.Schema{ "http": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.HTTPIngressRuleValue"), + Ref: ref(networkingv1.HTTPIngressRuleValue{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.HTTPIngressRuleValue"}, + networkingv1.HTTPIngressRuleValue{}.OpenAPIModelName()}, } } @@ -42959,7 +43041,7 @@ func schema_k8sio_api_networking_v1_IngressServiceBackend(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "port of the referenced service. A port name or port number is required for a IngressServiceBackend.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.ServiceBackendPort"), + Ref: ref(networkingv1.ServiceBackendPort{}.OpenAPIModelName()), }, }, }, @@ -42967,7 +43049,7 @@ func schema_k8sio_api_networking_v1_IngressServiceBackend(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.ServiceBackendPort"}, + networkingv1.ServiceBackendPort{}.OpenAPIModelName()}, } } @@ -42988,7 +43070,7 @@ func schema_k8sio_api_networking_v1_IngressSpec(ref common.ReferenceCallback) co "defaultBackend": { SchemaProps: spec.SchemaProps{ Description: "defaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller.", - Ref: ref("k8s.io/api/networking/v1.IngressBackend"), + Ref: ref(networkingv1.IngressBackend{}.OpenAPIModelName()), }, }, "tls": { @@ -43004,7 +43086,7 @@ func schema_k8sio_api_networking_v1_IngressSpec(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressTLS"), + Ref: ref(networkingv1.IngressTLS{}.OpenAPIModelName()), }, }, }, @@ -43023,7 +43105,7 @@ func schema_k8sio_api_networking_v1_IngressSpec(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressRule"), + Ref: ref(networkingv1.IngressRule{}.OpenAPIModelName()), }, }, }, @@ -43033,7 +43115,7 @@ func schema_k8sio_api_networking_v1_IngressSpec(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IngressBackend", "k8s.io/api/networking/v1.IngressRule", "k8s.io/api/networking/v1.IngressTLS"}, + networkingv1.IngressBackend{}.OpenAPIModelName(), networkingv1.IngressRule{}.OpenAPIModelName(), networkingv1.IngressTLS{}.OpenAPIModelName()}, } } @@ -43048,14 +43130,14 @@ func schema_k8sio_api_networking_v1_IngressStatus(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "loadBalancer contains the current status of the load-balancer.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressLoadBalancerStatus"), + Ref: ref(networkingv1.IngressLoadBalancerStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IngressLoadBalancerStatus"}, + networkingv1.IngressLoadBalancerStatus{}.OpenAPIModelName()}, } } @@ -43124,21 +43206,21 @@ func schema_k8sio_api_networking_v1_NetworkPolicy(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec represents the specification of the desired behavior for this NetworkPolicy.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicySpec"), + Ref: ref(networkingv1.NetworkPolicySpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + networkingv1.NetworkPolicySpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -43162,7 +43244,7 @@ func schema_k8sio_api_networking_v1_NetworkPolicyEgressRule(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPort"), + Ref: ref(networkingv1.NetworkPolicyPort{}.OpenAPIModelName()), }, }, }, @@ -43181,7 +43263,7 @@ func schema_k8sio_api_networking_v1_NetworkPolicyEgressRule(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPeer"), + Ref: ref(networkingv1.NetworkPolicyPeer{}.OpenAPIModelName()), }, }, }, @@ -43191,7 +43273,7 @@ func schema_k8sio_api_networking_v1_NetworkPolicyEgressRule(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicyPeer", "k8s.io/api/networking/v1.NetworkPolicyPort"}, + networkingv1.NetworkPolicyPeer{}.OpenAPIModelName(), networkingv1.NetworkPolicyPort{}.OpenAPIModelName()}, } } @@ -43215,7 +43297,7 @@ func schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPort"), + Ref: ref(networkingv1.NetworkPolicyPort{}.OpenAPIModelName()), }, }, }, @@ -43234,7 +43316,7 @@ func schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPeer"), + Ref: ref(networkingv1.NetworkPolicyPeer{}.OpenAPIModelName()), }, }, }, @@ -43244,7 +43326,7 @@ func schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicyPeer", "k8s.io/api/networking/v1.NetworkPolicyPort"}, + networkingv1.NetworkPolicyPeer{}.OpenAPIModelName(), networkingv1.NetworkPolicyPort{}.OpenAPIModelName()}, } } @@ -43273,7 +43355,7 @@ func schema_k8sio_api_networking_v1_NetworkPolicyList(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -43284,7 +43366,7 @@ func schema_k8sio_api_networking_v1_NetworkPolicyList(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicy"), + Ref: ref(networkingv1.NetworkPolicy{}.OpenAPIModelName()), }, }, }, @@ -43295,7 +43377,7 @@ func schema_k8sio_api_networking_v1_NetworkPolicyList(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + networkingv1.NetworkPolicy{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -43309,26 +43391,26 @@ func schema_k8sio_api_networking_v1_NetworkPolicyPeer(ref common.ReferenceCallba "podSelector": { SchemaProps: spec.SchemaProps{ Description: "podSelector is a label selector which selects pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the pods matching podSelector in the policy's own namespace.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "namespaceSelector": { SchemaProps: spec.SchemaProps{ Description: "namespaceSelector selects namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf podSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the namespaces selected by namespaceSelector. Otherwise it selects all pods in the namespaces selected by namespaceSelector.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "ipBlock": { SchemaProps: spec.SchemaProps{ Description: "ipBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.", - Ref: ref("k8s.io/api/networking/v1.IPBlock"), + Ref: ref(networkingv1.IPBlock{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IPBlock", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + networkingv1.IPBlock{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -43350,7 +43432,7 @@ func schema_k8sio_api_networking_v1_NetworkPolicyPort(ref common.ReferenceCallba "port": { SchemaProps: spec.SchemaProps{ Description: "port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "endPort": { @@ -43364,7 +43446,7 @@ func schema_k8sio_api_networking_v1_NetworkPolicyPort(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -43379,7 +43461,7 @@ func schema_k8sio_api_networking_v1_NetworkPolicySpec(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "podSelector selects the pods to which this NetworkPolicy object applies. The array of rules is applied to any pods selected by this field. An empty selector matches all pods in the policy's namespace. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is optional. If it is not specified, it defaults to an empty selector.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "ingress": { @@ -43395,7 +43477,7 @@ func schema_k8sio_api_networking_v1_NetworkPolicySpec(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyIngressRule"), + Ref: ref(networkingv1.NetworkPolicyIngressRule{}.OpenAPIModelName()), }, }, }, @@ -43414,7 +43496,7 @@ func schema_k8sio_api_networking_v1_NetworkPolicySpec(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyEgressRule"), + Ref: ref(networkingv1.NetworkPolicyEgressRule{}.OpenAPIModelName()), }, }, }, @@ -43445,7 +43527,7 @@ func schema_k8sio_api_networking_v1_NetworkPolicySpec(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicyEgressRule", "k8s.io/api/networking/v1.NetworkPolicyIngressRule", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + networkingv1.NetworkPolicyEgressRule{}.OpenAPIModelName(), networkingv1.NetworkPolicyIngressRule{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -43548,28 +43630,28 @@ func schema_k8sio_api_networking_v1_ServiceCIDR(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.ServiceCIDRSpec"), + Ref: ref(networkingv1.ServiceCIDRSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status represents the current state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.ServiceCIDRStatus"), + Ref: ref(networkingv1.ServiceCIDRStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.ServiceCIDRSpec", "k8s.io/api/networking/v1.ServiceCIDRStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + networkingv1.ServiceCIDRSpec{}.OpenAPIModelName(), networkingv1.ServiceCIDRStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -43598,7 +43680,7 @@ func schema_k8sio_api_networking_v1_ServiceCIDRList(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -43609,7 +43691,7 @@ func schema_k8sio_api_networking_v1_ServiceCIDRList(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.ServiceCIDR"), + Ref: ref(networkingv1.ServiceCIDR{}.OpenAPIModelName()), }, }, }, @@ -43620,7 +43702,7 @@ func schema_k8sio_api_networking_v1_ServiceCIDRList(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.ServiceCIDR", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + networkingv1.ServiceCIDR{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -43682,7 +43764,7 @@ func schema_k8sio_api_networking_v1_ServiceCIDRStatus(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -43692,7 +43774,7 @@ func schema_k8sio_api_networking_v1_ServiceCIDRStatus(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + metav1.Condition{}.OpenAPIModelName()}, } } @@ -43721,7 +43803,7 @@ func schema_k8sio_api_networking_v1beta1_HTTPIngressPath(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "backend defines the referenced service endpoint to which the traffic will be forwarded to.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressBackend"), + Ref: ref(networkingv1beta1.IngressBackend{}.OpenAPIModelName()), }, }, }, @@ -43729,7 +43811,7 @@ func schema_k8sio_api_networking_v1beta1_HTTPIngressPath(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressBackend"}, + networkingv1beta1.IngressBackend{}.OpenAPIModelName()}, } } @@ -43753,7 +43835,7 @@ func schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressPath"), + Ref: ref(networkingv1beta1.HTTPIngressPath{}.OpenAPIModelName()), }, }, }, @@ -43764,7 +43846,7 @@ func schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.HTTPIngressPath"}, + networkingv1beta1.HTTPIngressPath{}.OpenAPIModelName()}, } } @@ -43793,21 +43875,21 @@ func schema_k8sio_api_networking_v1beta1_IPAddress(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IPAddressSpec"), + Ref: ref(networkingv1beta1.IPAddressSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IPAddressSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + networkingv1beta1.IPAddressSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -43836,7 +43918,7 @@ func schema_k8sio_api_networking_v1beta1_IPAddressList(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -43847,7 +43929,7 @@ func schema_k8sio_api_networking_v1beta1_IPAddressList(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IPAddress"), + Ref: ref(networkingv1beta1.IPAddress{}.OpenAPIModelName()), }, }, }, @@ -43858,7 +43940,7 @@ func schema_k8sio_api_networking_v1beta1_IPAddressList(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IPAddress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + networkingv1beta1.IPAddress{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -43872,7 +43954,7 @@ func schema_k8sio_api_networking_v1beta1_IPAddressSpec(ref common.ReferenceCallb "parentRef": { SchemaProps: spec.SchemaProps{ Description: "ParentRef references the resource that an IPAddress is attached to. An IPAddress must reference a parent object.", - Ref: ref("k8s.io/api/networking/v1beta1.ParentReference"), + Ref: ref(networkingv1beta1.ParentReference{}.OpenAPIModelName()), }, }, }, @@ -43880,7 +43962,7 @@ func schema_k8sio_api_networking_v1beta1_IPAddressSpec(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.ParentReference"}, + networkingv1beta1.ParentReference{}.OpenAPIModelName()}, } } @@ -43909,28 +43991,28 @@ func schema_k8sio_api_networking_v1beta1_Ingress(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressSpec"), + Ref: ref(networkingv1beta1.IngressSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressStatus"), + Ref: ref(networkingv1beta1.IngressStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressSpec", "k8s.io/api/networking/v1beta1.IngressStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + networkingv1beta1.IngressSpec{}.OpenAPIModelName(), networkingv1beta1.IngressStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -43951,20 +44033,20 @@ func schema_k8sio_api_networking_v1beta1_IngressBackend(ref common.ReferenceCall "servicePort": { SchemaProps: spec.SchemaProps{ Description: "servicePort Specifies the port of the referenced service.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.", - Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + Ref: ref(corev1.TypedLocalObjectReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + corev1.TypedLocalObjectReference{}.OpenAPIModelName(), intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -43993,21 +44075,21 @@ func schema_k8sio_api_networking_v1beta1_IngressClass(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressClassSpec"), + Ref: ref(networkingv1beta1.IngressClassSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + networkingv1beta1.IngressClassSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -44036,7 +44118,7 @@ func schema_k8sio_api_networking_v1beta1_IngressClassList(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -44047,7 +44129,7 @@ func schema_k8sio_api_networking_v1beta1_IngressClassList(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressClass"), + Ref: ref(networkingv1beta1.IngressClass{}.OpenAPIModelName()), }, }, }, @@ -44058,7 +44140,7 @@ func schema_k8sio_api_networking_v1beta1_IngressClassList(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + networkingv1beta1.IngressClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -44130,14 +44212,14 @@ func schema_k8sio_api_networking_v1beta1_IngressClassSpec(ref common.ReferenceCa "parameters": { SchemaProps: spec.SchemaProps{ Description: "parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", - Ref: ref("k8s.io/api/networking/v1beta1.IngressClassParametersReference"), + Ref: ref(networkingv1beta1.IngressClassParametersReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressClassParametersReference"}, + networkingv1beta1.IngressClassParametersReference{}.OpenAPIModelName()}, } } @@ -44166,7 +44248,7 @@ func schema_k8sio_api_networking_v1beta1_IngressList(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -44177,7 +44259,7 @@ func schema_k8sio_api_networking_v1beta1_IngressList(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.Ingress"), + Ref: ref(networkingv1beta1.Ingress{}.OpenAPIModelName()), }, }, }, @@ -44188,7 +44270,7 @@ func schema_k8sio_api_networking_v1beta1_IngressList(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.Ingress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + networkingv1beta1.Ingress{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -44226,7 +44308,7 @@ func schema_k8sio_api_networking_v1beta1_IngressLoadBalancerIngress(ref common.R Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressPortStatus"), + Ref: ref(networkingv1beta1.IngressPortStatus{}.OpenAPIModelName()), }, }, }, @@ -44236,7 +44318,7 @@ func schema_k8sio_api_networking_v1beta1_IngressLoadBalancerIngress(ref common.R }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressPortStatus"}, + networkingv1beta1.IngressPortStatus{}.OpenAPIModelName()}, } } @@ -44260,7 +44342,7 @@ func schema_k8sio_api_networking_v1beta1_IngressLoadBalancerStatus(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressLoadBalancerIngress"), + Ref: ref(networkingv1beta1.IngressLoadBalancerIngress{}.OpenAPIModelName()), }, }, }, @@ -44270,7 +44352,7 @@ func schema_k8sio_api_networking_v1beta1_IngressLoadBalancerStatus(ref common.Re }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressLoadBalancerIngress"}, + networkingv1beta1.IngressLoadBalancerIngress{}.OpenAPIModelName()}, } } @@ -44328,14 +44410,14 @@ func schema_k8sio_api_networking_v1beta1_IngressRule(ref common.ReferenceCallbac }, "http": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"), + Ref: ref(networkingv1beta1.HTTPIngressRuleValue{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"}, + networkingv1beta1.HTTPIngressRuleValue{}.OpenAPIModelName()}, } } @@ -44348,14 +44430,14 @@ func schema_k8sio_api_networking_v1beta1_IngressRuleValue(ref common.ReferenceCa Properties: map[string]spec.Schema{ "http": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"), + Ref: ref(networkingv1beta1.HTTPIngressRuleValue{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"}, + networkingv1beta1.HTTPIngressRuleValue{}.OpenAPIModelName()}, } } @@ -44376,7 +44458,7 @@ func schema_k8sio_api_networking_v1beta1_IngressSpec(ref common.ReferenceCallbac "backend": { SchemaProps: spec.SchemaProps{ Description: "backend is the default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", - Ref: ref("k8s.io/api/networking/v1beta1.IngressBackend"), + Ref: ref(networkingv1beta1.IngressBackend{}.OpenAPIModelName()), }, }, "tls": { @@ -44392,7 +44474,7 @@ func schema_k8sio_api_networking_v1beta1_IngressSpec(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressTLS"), + Ref: ref(networkingv1beta1.IngressTLS{}.OpenAPIModelName()), }, }, }, @@ -44411,7 +44493,7 @@ func schema_k8sio_api_networking_v1beta1_IngressSpec(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressRule"), + Ref: ref(networkingv1beta1.IngressRule{}.OpenAPIModelName()), }, }, }, @@ -44421,7 +44503,7 @@ func schema_k8sio_api_networking_v1beta1_IngressSpec(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressBackend", "k8s.io/api/networking/v1beta1.IngressRule", "k8s.io/api/networking/v1beta1.IngressTLS"}, + networkingv1beta1.IngressBackend{}.OpenAPIModelName(), networkingv1beta1.IngressRule{}.OpenAPIModelName(), networkingv1beta1.IngressTLS{}.OpenAPIModelName()}, } } @@ -44436,14 +44518,14 @@ func schema_k8sio_api_networking_v1beta1_IngressStatus(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "loadBalancer contains the current status of the load-balancer.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressLoadBalancerStatus"), + Ref: ref(networkingv1beta1.IngressLoadBalancerStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressLoadBalancerStatus"}, + networkingv1beta1.IngressLoadBalancerStatus{}.OpenAPIModelName()}, } } @@ -44554,28 +44636,28 @@ func schema_k8sio_api_networking_v1beta1_ServiceCIDR(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.ServiceCIDRSpec"), + Ref: ref(networkingv1beta1.ServiceCIDRSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status represents the current state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.ServiceCIDRStatus"), + Ref: ref(networkingv1beta1.ServiceCIDRStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.ServiceCIDRSpec", "k8s.io/api/networking/v1beta1.ServiceCIDRStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + networkingv1beta1.ServiceCIDRSpec{}.OpenAPIModelName(), networkingv1beta1.ServiceCIDRStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -44604,7 +44686,7 @@ func schema_k8sio_api_networking_v1beta1_ServiceCIDRList(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -44615,7 +44697,7 @@ func schema_k8sio_api_networking_v1beta1_ServiceCIDRList(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.ServiceCIDR"), + Ref: ref(networkingv1beta1.ServiceCIDR{}.OpenAPIModelName()), }, }, }, @@ -44626,7 +44708,7 @@ func schema_k8sio_api_networking_v1beta1_ServiceCIDRList(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.ServiceCIDR", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + networkingv1beta1.ServiceCIDR{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -44688,7 +44770,7 @@ func schema_k8sio_api_networking_v1beta1_ServiceCIDRStatus(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -44698,7 +44780,7 @@ func schema_k8sio_api_networking_v1beta1_ServiceCIDRStatus(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + metav1.Condition{}.OpenAPIModelName()}, } } @@ -44717,7 +44799,7 @@ func schema_k8sio_api_node_v1_Overhead(ref common.ReferenceCallback) common.Open Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -44727,7 +44809,7 @@ func schema_k8sio_api_node_v1_Overhead(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -44756,7 +44838,7 @@ func schema_k8sio_api_node_v1_RuntimeClass(ref common.ReferenceCallback) common. SchemaProps: spec.SchemaProps{ Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "handler": { @@ -44770,13 +44852,13 @@ func schema_k8sio_api_node_v1_RuntimeClass(ref common.ReferenceCallback) common. "overhead": { SchemaProps: spec.SchemaProps{ Description: "overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see\n https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/", - Ref: ref("k8s.io/api/node/v1.Overhead"), + Ref: ref(nodev1.Overhead{}.OpenAPIModelName()), }, }, "scheduling": { SchemaProps: spec.SchemaProps{ Description: "scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", - Ref: ref("k8s.io/api/node/v1.Scheduling"), + Ref: ref(nodev1.Scheduling{}.OpenAPIModelName()), }, }, }, @@ -44784,7 +44866,7 @@ func schema_k8sio_api_node_v1_RuntimeClass(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/api/node/v1.Overhead", "k8s.io/api/node/v1.Scheduling", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + nodev1.Overhead{}.OpenAPIModelName(), nodev1.Scheduling{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -44813,7 +44895,7 @@ func schema_k8sio_api_node_v1_RuntimeClassList(ref common.ReferenceCallback) com SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -44824,7 +44906,7 @@ func schema_k8sio_api_node_v1_RuntimeClassList(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/node/v1.RuntimeClass"), + Ref: ref(nodev1.RuntimeClass{}.OpenAPIModelName()), }, }, }, @@ -44835,7 +44917,7 @@ func schema_k8sio_api_node_v1_RuntimeClassList(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/node/v1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + nodev1.RuntimeClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -44880,7 +44962,7 @@ func schema_k8sio_api_node_v1_Scheduling(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Toleration"), + Ref: ref(corev1.Toleration{}.OpenAPIModelName()), }, }, }, @@ -44890,7 +44972,7 @@ func schema_k8sio_api_node_v1_Scheduling(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Toleration"}, + corev1.Toleration{}.OpenAPIModelName()}, } } @@ -44909,7 +44991,7 @@ func schema_k8sio_api_node_v1alpha1_Overhead(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -44919,7 +45001,7 @@ func schema_k8sio_api_node_v1alpha1_Overhead(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -44948,14 +45030,14 @@ func schema_k8sio_api_node_v1alpha1_RuntimeClass(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec represents specification of the RuntimeClass More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/node/v1alpha1.RuntimeClassSpec"), + Ref: ref(nodev1alpha1.RuntimeClassSpec{}.OpenAPIModelName()), }, }, }, @@ -44963,7 +45045,7 @@ func schema_k8sio_api_node_v1alpha1_RuntimeClass(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/node/v1alpha1.RuntimeClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + nodev1alpha1.RuntimeClassSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -44992,7 +45074,7 @@ func schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -45003,7 +45085,7 @@ func schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/node/v1alpha1.RuntimeClass"), + Ref: ref(nodev1alpha1.RuntimeClass{}.OpenAPIModelName()), }, }, }, @@ -45014,7 +45096,7 @@ func schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/node/v1alpha1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + nodev1alpha1.RuntimeClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -45036,13 +45118,13 @@ func schema_k8sio_api_node_v1alpha1_RuntimeClassSpec(ref common.ReferenceCallbac "overhead": { SchemaProps: spec.SchemaProps{ Description: "overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md", - Ref: ref("k8s.io/api/node/v1alpha1.Overhead"), + Ref: ref(nodev1alpha1.Overhead{}.OpenAPIModelName()), }, }, "scheduling": { SchemaProps: spec.SchemaProps{ Description: "scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", - Ref: ref("k8s.io/api/node/v1alpha1.Scheduling"), + Ref: ref(nodev1alpha1.Scheduling{}.OpenAPIModelName()), }, }, }, @@ -45050,7 +45132,7 @@ func schema_k8sio_api_node_v1alpha1_RuntimeClassSpec(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/node/v1alpha1.Overhead", "k8s.io/api/node/v1alpha1.Scheduling"}, + nodev1alpha1.Overhead{}.OpenAPIModelName(), nodev1alpha1.Scheduling{}.OpenAPIModelName()}, } } @@ -45095,7 +45177,7 @@ func schema_k8sio_api_node_v1alpha1_Scheduling(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Toleration"), + Ref: ref(corev1.Toleration{}.OpenAPIModelName()), }, }, }, @@ -45105,7 +45187,7 @@ func schema_k8sio_api_node_v1alpha1_Scheduling(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Toleration"}, + corev1.Toleration{}.OpenAPIModelName()}, } } @@ -45124,7 +45206,7 @@ func schema_k8sio_api_node_v1beta1_Overhead(ref common.ReferenceCallback) common Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -45134,7 +45216,7 @@ func schema_k8sio_api_node_v1beta1_Overhead(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -45163,7 +45245,7 @@ func schema_k8sio_api_node_v1beta1_RuntimeClass(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "handler": { @@ -45177,13 +45259,13 @@ func schema_k8sio_api_node_v1beta1_RuntimeClass(ref common.ReferenceCallback) co "overhead": { SchemaProps: spec.SchemaProps{ Description: "overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md", - Ref: ref("k8s.io/api/node/v1beta1.Overhead"), + Ref: ref(nodev1beta1.Overhead{}.OpenAPIModelName()), }, }, "scheduling": { SchemaProps: spec.SchemaProps{ Description: "scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", - Ref: ref("k8s.io/api/node/v1beta1.Scheduling"), + Ref: ref(nodev1beta1.Scheduling{}.OpenAPIModelName()), }, }, }, @@ -45191,7 +45273,7 @@ func schema_k8sio_api_node_v1beta1_RuntimeClass(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/node/v1beta1.Overhead", "k8s.io/api/node/v1beta1.Scheduling", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + nodev1beta1.Overhead{}.OpenAPIModelName(), nodev1beta1.Scheduling{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -45220,7 +45302,7 @@ func schema_k8sio_api_node_v1beta1_RuntimeClassList(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -45231,7 +45313,7 @@ func schema_k8sio_api_node_v1beta1_RuntimeClassList(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/node/v1beta1.RuntimeClass"), + Ref: ref(nodev1beta1.RuntimeClass{}.OpenAPIModelName()), }, }, }, @@ -45242,7 +45324,7 @@ func schema_k8sio_api_node_v1beta1_RuntimeClassList(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/node/v1beta1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + nodev1beta1.RuntimeClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -45287,7 +45369,7 @@ func schema_k8sio_api_node_v1beta1_Scheduling(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Toleration"), + Ref: ref(corev1.Toleration{}.OpenAPIModelName()), }, }, }, @@ -45297,7 +45379,7 @@ func schema_k8sio_api_node_v1beta1_Scheduling(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Toleration"}, + corev1.Toleration{}.OpenAPIModelName()}, } } @@ -45326,20 +45408,20 @@ func schema_k8sio_api_policy_v1_Eviction(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "ObjectMeta describes the pod that is being evicted.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "deleteOptions": { SchemaProps: spec.SchemaProps{ Description: "DeleteOptions may be provided", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions"), + Ref: ref(metav1.DeleteOptions{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.DeleteOptions{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -45368,28 +45450,28 @@ func schema_k8sio_api_policy_v1_PodDisruptionBudget(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the PodDisruptionBudget.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1.PodDisruptionBudgetSpec"), + Ref: ref(policyv1.PodDisruptionBudgetSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the PodDisruptionBudget.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1.PodDisruptionBudgetStatus"), + Ref: ref(policyv1.PodDisruptionBudgetStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1.PodDisruptionBudgetSpec", "k8s.io/api/policy/v1.PodDisruptionBudgetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + policyv1.PodDisruptionBudgetSpec{}.OpenAPIModelName(), policyv1.PodDisruptionBudgetStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -45418,7 +45500,7 @@ func schema_k8sio_api_policy_v1_PodDisruptionBudgetList(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -45429,7 +45511,7 @@ func schema_k8sio_api_policy_v1_PodDisruptionBudgetList(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1.PodDisruptionBudget"), + Ref: ref(policyv1.PodDisruptionBudget{}.OpenAPIModelName()), }, }, }, @@ -45440,7 +45522,7 @@ func schema_k8sio_api_policy_v1_PodDisruptionBudgetList(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/policy/v1.PodDisruptionBudget", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + policyv1.PodDisruptionBudget{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -45454,7 +45536,7 @@ func schema_k8sio_api_policy_v1_PodDisruptionBudgetSpec(ref common.ReferenceCall "minAvailable": { SchemaProps: spec.SchemaProps{ Description: "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "selector": { @@ -45465,13 +45547,13 @@ func schema_k8sio_api_policy_v1_PodDisruptionBudgetSpec(ref common.ReferenceCall }, SchemaProps: spec.SchemaProps{ Description: "Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "maxUnavailable": { SchemaProps: spec.SchemaProps{ Description: "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "unhealthyPodEvictionPolicy": { @@ -45486,7 +45568,7 @@ func schema_k8sio_api_policy_v1_PodDisruptionBudgetSpec(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + metav1.LabelSelector{}.OpenAPIModelName(), intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -45512,7 +45594,7 @@ func schema_k8sio_api_policy_v1_PodDisruptionBudgetStatus(ref common.ReferenceCa Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, @@ -45568,7 +45650,7 @@ func schema_k8sio_api_policy_v1_PodDisruptionBudgetStatus(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -45579,7 +45661,7 @@ func schema_k8sio_api_policy_v1_PodDisruptionBudgetStatus(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Condition{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -45608,20 +45690,20 @@ func schema_k8sio_api_policy_v1beta1_Eviction(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "ObjectMeta describes the pod that is being evicted.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "deleteOptions": { SchemaProps: spec.SchemaProps{ Description: "DeleteOptions may be provided", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions"), + Ref: ref(metav1.DeleteOptions{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.DeleteOptions{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -45650,28 +45732,28 @@ func schema_k8sio_api_policy_v1beta1_PodDisruptionBudget(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the PodDisruptionBudget.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec"), + Ref: ref(policyv1beta1.PodDisruptionBudgetSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the PodDisruptionBudget.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus"), + Ref: ref(policyv1beta1.PodDisruptionBudgetStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec", "k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + policyv1beta1.PodDisruptionBudgetSpec{}.OpenAPIModelName(), policyv1beta1.PodDisruptionBudgetStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -45700,7 +45782,7 @@ func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -45711,7 +45793,7 @@ func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudget"), + Ref: ref(policyv1beta1.PodDisruptionBudget{}.OpenAPIModelName()), }, }, }, @@ -45722,7 +45804,7 @@ func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.PodDisruptionBudget", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + policyv1beta1.PodDisruptionBudget{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -45736,19 +45818,19 @@ func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetSpec(ref common.Referenc "minAvailable": { SchemaProps: spec.SchemaProps{ Description: "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "selector": { SchemaProps: spec.SchemaProps{ Description: "Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "maxUnavailable": { SchemaProps: spec.SchemaProps{ Description: "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Ref: ref(intstr.IntOrString{}.OpenAPIModelName()), }, }, "unhealthyPodEvictionPolicy": { @@ -45763,7 +45845,7 @@ func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetSpec(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + metav1.LabelSelector{}.OpenAPIModelName(), intstr.IntOrString{}.OpenAPIModelName()}, } } @@ -45789,7 +45871,7 @@ func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetStatus(ref common.Refere Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, @@ -45845,7 +45927,7 @@ func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetStatus(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -45856,7 +45938,7 @@ func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetStatus(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Condition{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -45880,7 +45962,7 @@ func schema_k8sio_api_rbac_v1_AggregationRule(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, @@ -45890,7 +45972,7 @@ func schema_k8sio_api_rbac_v1_AggregationRule(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -45919,7 +46001,7 @@ func schema_k8sio_api_rbac_v1_ClusterRole(ref common.ReferenceCallback) common.O SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "rules": { @@ -45935,7 +46017,7 @@ func schema_k8sio_api_rbac_v1_ClusterRole(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.PolicyRule"), + Ref: ref(rbacv1.PolicyRule{}.OpenAPIModelName()), }, }, }, @@ -45944,14 +46026,14 @@ func schema_k8sio_api_rbac_v1_ClusterRole(ref common.ReferenceCallback) common.O "aggregationRule": { SchemaProps: spec.SchemaProps{ Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", - Ref: ref("k8s.io/api/rbac/v1.AggregationRule"), + Ref: ref(rbacv1.AggregationRule{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.AggregationRule", "k8s.io/api/rbac/v1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + rbacv1.AggregationRule{}.OpenAPIModelName(), rbacv1.PolicyRule{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -45980,7 +46062,7 @@ func schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "subjects": { @@ -45996,7 +46078,7 @@ func schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.Subject"), + Ref: ref(rbacv1.Subject{}.OpenAPIModelName()), }, }, }, @@ -46006,7 +46088,7 @@ func schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.RoleRef"), + Ref: ref(rbacv1.RoleRef{}.OpenAPIModelName()), }, }, }, @@ -46014,7 +46096,7 @@ func schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.RoleRef", "k8s.io/api/rbac/v1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + rbacv1.RoleRef{}.OpenAPIModelName(), rbacv1.Subject{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -46043,7 +46125,7 @@ func schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -46054,7 +46136,7 @@ func schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.ClusterRoleBinding"), + Ref: ref(rbacv1.ClusterRoleBinding{}.OpenAPIModelName()), }, }, }, @@ -46065,7 +46147,7 @@ func schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + rbacv1.ClusterRoleBinding{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -46094,7 +46176,7 @@ func schema_k8sio_api_rbac_v1_ClusterRoleList(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -46105,7 +46187,7 @@ func schema_k8sio_api_rbac_v1_ClusterRoleList(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.ClusterRole"), + Ref: ref(rbacv1.ClusterRole{}.OpenAPIModelName()), }, }, }, @@ -46116,7 +46198,7 @@ func schema_k8sio_api_rbac_v1_ClusterRoleList(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + rbacv1.ClusterRole{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -46259,7 +46341,7 @@ func schema_k8sio_api_rbac_v1_Role(ref common.ReferenceCallback) common.OpenAPID SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "rules": { @@ -46275,7 +46357,7 @@ func schema_k8sio_api_rbac_v1_Role(ref common.ReferenceCallback) common.OpenAPID Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.PolicyRule"), + Ref: ref(rbacv1.PolicyRule{}.OpenAPIModelName()), }, }, }, @@ -46285,7 +46367,7 @@ func schema_k8sio_api_rbac_v1_Role(ref common.ReferenceCallback) common.OpenAPID }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + rbacv1.PolicyRule{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -46314,7 +46396,7 @@ func schema_k8sio_api_rbac_v1_RoleBinding(ref common.ReferenceCallback) common.O SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "subjects": { @@ -46330,7 +46412,7 @@ func schema_k8sio_api_rbac_v1_RoleBinding(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.Subject"), + Ref: ref(rbacv1.Subject{}.OpenAPIModelName()), }, }, }, @@ -46340,7 +46422,7 @@ func schema_k8sio_api_rbac_v1_RoleBinding(ref common.ReferenceCallback) common.O SchemaProps: spec.SchemaProps{ Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.RoleRef"), + Ref: ref(rbacv1.RoleRef{}.OpenAPIModelName()), }, }, }, @@ -46348,7 +46430,7 @@ func schema_k8sio_api_rbac_v1_RoleBinding(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.RoleRef", "k8s.io/api/rbac/v1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + rbacv1.RoleRef{}.OpenAPIModelName(), rbacv1.Subject{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -46377,7 +46459,7 @@ func schema_k8sio_api_rbac_v1_RoleBindingList(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -46388,7 +46470,7 @@ func schema_k8sio_api_rbac_v1_RoleBindingList(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.RoleBinding"), + Ref: ref(rbacv1.RoleBinding{}.OpenAPIModelName()), }, }, }, @@ -46399,7 +46481,7 @@ func schema_k8sio_api_rbac_v1_RoleBindingList(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + rbacv1.RoleBinding{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -46428,7 +46510,7 @@ func schema_k8sio_api_rbac_v1_RoleList(ref common.ReferenceCallback) common.Open SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -46439,7 +46521,7 @@ func schema_k8sio_api_rbac_v1_RoleList(ref common.ReferenceCallback) common.Open Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.Role"), + Ref: ref(rbacv1.Role{}.OpenAPIModelName()), }, }, }, @@ -46450,7 +46532,7 @@ func schema_k8sio_api_rbac_v1_RoleList(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + rbacv1.Role{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -46566,7 +46648,7 @@ func schema_k8sio_api_rbac_v1alpha1_AggregationRule(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, @@ -46576,7 +46658,7 @@ func schema_k8sio_api_rbac_v1alpha1_AggregationRule(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -46605,7 +46687,7 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "rules": { @@ -46621,7 +46703,7 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.PolicyRule"), + Ref: ref(rbacv1alpha1.PolicyRule{}.OpenAPIModelName()), }, }, }, @@ -46630,14 +46712,14 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref common.ReferenceCallback) co "aggregationRule": { SchemaProps: spec.SchemaProps{ Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", - Ref: ref("k8s.io/api/rbac/v1alpha1.AggregationRule"), + Ref: ref(rbacv1alpha1.AggregationRule{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.AggregationRule", "k8s.io/api/rbac/v1alpha1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + rbacv1alpha1.AggregationRule{}.OpenAPIModelName(), rbacv1alpha1.PolicyRule{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -46666,7 +46748,7 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "subjects": { @@ -46682,7 +46764,7 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.Subject"), + Ref: ref(rbacv1alpha1.Subject{}.OpenAPIModelName()), }, }, }, @@ -46692,7 +46774,7 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.RoleRef"), + Ref: ref(rbacv1alpha1.RoleRef{}.OpenAPIModelName()), }, }, }, @@ -46700,7 +46782,7 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.RoleRef", "k8s.io/api/rbac/v1alpha1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + rbacv1alpha1.RoleRef{}.OpenAPIModelName(), rbacv1alpha1.Subject{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -46729,7 +46811,7 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -46740,7 +46822,7 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.ClusterRoleBinding"), + Ref: ref(rbacv1alpha1.ClusterRoleBinding{}.OpenAPIModelName()), }, }, }, @@ -46751,7 +46833,7 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + rbacv1alpha1.ClusterRoleBinding{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -46780,7 +46862,7 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -46791,7 +46873,7 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.ClusterRole"), + Ref: ref(rbacv1alpha1.ClusterRole{}.OpenAPIModelName()), }, }, }, @@ -46802,7 +46884,7 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + rbacv1alpha1.ClusterRole{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -46945,7 +47027,7 @@ func schema_k8sio_api_rbac_v1alpha1_Role(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "rules": { @@ -46961,7 +47043,7 @@ func schema_k8sio_api_rbac_v1alpha1_Role(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.PolicyRule"), + Ref: ref(rbacv1alpha1.PolicyRule{}.OpenAPIModelName()), }, }, }, @@ -46971,7 +47053,7 @@ func schema_k8sio_api_rbac_v1alpha1_Role(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + rbacv1alpha1.PolicyRule{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -47000,7 +47082,7 @@ func schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "subjects": { @@ -47016,7 +47098,7 @@ func schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.Subject"), + Ref: ref(rbacv1alpha1.Subject{}.OpenAPIModelName()), }, }, }, @@ -47026,7 +47108,7 @@ func schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.RoleRef"), + Ref: ref(rbacv1alpha1.RoleRef{}.OpenAPIModelName()), }, }, }, @@ -47034,7 +47116,7 @@ func schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.RoleRef", "k8s.io/api/rbac/v1alpha1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + rbacv1alpha1.RoleRef{}.OpenAPIModelName(), rbacv1alpha1.Subject{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -47063,7 +47145,7 @@ func schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -47074,7 +47156,7 @@ func schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.RoleBinding"), + Ref: ref(rbacv1alpha1.RoleBinding{}.OpenAPIModelName()), }, }, }, @@ -47085,7 +47167,7 @@ func schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + rbacv1alpha1.RoleBinding{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -47114,7 +47196,7 @@ func schema_k8sio_api_rbac_v1alpha1_RoleList(ref common.ReferenceCallback) commo SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -47125,7 +47207,7 @@ func schema_k8sio_api_rbac_v1alpha1_RoleList(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.Role"), + Ref: ref(rbacv1alpha1.Role{}.OpenAPIModelName()), }, }, }, @@ -47136,7 +47218,7 @@ func schema_k8sio_api_rbac_v1alpha1_RoleList(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + rbacv1alpha1.Role{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -47242,7 +47324,7 @@ func schema_k8sio_api_rbac_v1beta1_AggregationRule(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, @@ -47252,7 +47334,7 @@ func schema_k8sio_api_rbac_v1beta1_AggregationRule(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -47281,7 +47363,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRole(ref common.ReferenceCallback) com SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "rules": { @@ -47297,7 +47379,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRole(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.PolicyRule"), + Ref: ref(rbacv1beta1.PolicyRule{}.OpenAPIModelName()), }, }, }, @@ -47306,14 +47388,14 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRole(ref common.ReferenceCallback) com "aggregationRule": { SchemaProps: spec.SchemaProps{ Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", - Ref: ref("k8s.io/api/rbac/v1beta1.AggregationRule"), + Ref: ref(rbacv1beta1.AggregationRule{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.AggregationRule", "k8s.io/api/rbac/v1beta1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + rbacv1beta1.AggregationRule{}.OpenAPIModelName(), rbacv1beta1.PolicyRule{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -47342,7 +47424,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "subjects": { @@ -47358,7 +47440,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.Subject"), + Ref: ref(rbacv1beta1.Subject{}.OpenAPIModelName()), }, }, }, @@ -47368,7 +47450,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.RoleRef"), + Ref: ref(rbacv1beta1.RoleRef{}.OpenAPIModelName()), }, }, }, @@ -47376,7 +47458,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.RoleRef", "k8s.io/api/rbac/v1beta1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + rbacv1beta1.RoleRef{}.OpenAPIModelName(), rbacv1beta1.Subject{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -47405,7 +47487,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -47416,7 +47498,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.ClusterRoleBinding"), + Ref: ref(rbacv1beta1.ClusterRoleBinding{}.OpenAPIModelName()), }, }, }, @@ -47427,7 +47509,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + rbacv1beta1.ClusterRoleBinding{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -47456,7 +47538,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -47467,7 +47549,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.ClusterRole"), + Ref: ref(rbacv1beta1.ClusterRole{}.OpenAPIModelName()), }, }, }, @@ -47478,7 +47560,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + rbacv1beta1.ClusterRole{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -47621,7 +47703,7 @@ func schema_k8sio_api_rbac_v1beta1_Role(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "rules": { @@ -47637,7 +47719,7 @@ func schema_k8sio_api_rbac_v1beta1_Role(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.PolicyRule"), + Ref: ref(rbacv1beta1.PolicyRule{}.OpenAPIModelName()), }, }, }, @@ -47647,7 +47729,7 @@ func schema_k8sio_api_rbac_v1beta1_Role(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + rbacv1beta1.PolicyRule{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -47676,7 +47758,7 @@ func schema_k8sio_api_rbac_v1beta1_RoleBinding(ref common.ReferenceCallback) com SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "subjects": { @@ -47692,7 +47774,7 @@ func schema_k8sio_api_rbac_v1beta1_RoleBinding(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.Subject"), + Ref: ref(rbacv1beta1.Subject{}.OpenAPIModelName()), }, }, }, @@ -47702,7 +47784,7 @@ func schema_k8sio_api_rbac_v1beta1_RoleBinding(ref common.ReferenceCallback) com SchemaProps: spec.SchemaProps{ Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.RoleRef"), + Ref: ref(rbacv1beta1.RoleRef{}.OpenAPIModelName()), }, }, }, @@ -47710,7 +47792,7 @@ func schema_k8sio_api_rbac_v1beta1_RoleBinding(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.RoleRef", "k8s.io/api/rbac/v1beta1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + rbacv1beta1.RoleRef{}.OpenAPIModelName(), rbacv1beta1.Subject{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -47739,7 +47821,7 @@ func schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -47750,7 +47832,7 @@ func schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.RoleBinding"), + Ref: ref(rbacv1beta1.RoleBinding{}.OpenAPIModelName()), }, }, }, @@ -47761,7 +47843,7 @@ func schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + rbacv1beta1.RoleBinding{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -47790,7 +47872,7 @@ func schema_k8sio_api_rbac_v1beta1_RoleList(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -47801,7 +47883,7 @@ func schema_k8sio_api_rbac_v1beta1_RoleList(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.Role"), + Ref: ref(rbacv1beta1.Role{}.OpenAPIModelName()), }, }, }, @@ -47812,7 +47894,7 @@ func schema_k8sio_api_rbac_v1beta1_RoleList(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + rbacv1beta1.Role{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -47907,7 +47989,7 @@ func schema_k8sio_api_resource_v1_AllocatedDeviceStatus(ref common.ReferenceCall Properties: map[string]spec.Schema{ "driver": { SchemaProps: spec.SchemaProps{ - Description: "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + Description: "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", Default: "", Type: []string{"string"}, Format: "", @@ -47952,7 +48034,7 @@ func schema_k8sio_api_resource_v1_AllocatedDeviceStatus(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -47961,13 +48043,13 @@ func schema_k8sio_api_resource_v1_AllocatedDeviceStatus(ref common.ReferenceCall "data": { SchemaProps: spec.SchemaProps{ Description: "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, "networkData": { SchemaProps: spec.SchemaProps{ Description: "NetworkData contains network-related information specific to the device.", - Ref: ref("k8s.io/api/resource/v1.NetworkDeviceData"), + Ref: ref(resourcev1.NetworkDeviceData{}.OpenAPIModelName()), }, }, }, @@ -47975,7 +48057,7 @@ func schema_k8sio_api_resource_v1_AllocatedDeviceStatus(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.NetworkDeviceData", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + resourcev1.NetworkDeviceData{}.OpenAPIModelName(), metav1.Condition{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -47990,26 +48072,26 @@ func schema_k8sio_api_resource_v1_AllocationResult(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Devices is the result of allocating devices.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceAllocationResult"), + Ref: ref(resourcev1.DeviceAllocationResult{}.OpenAPIModelName()), }, }, "nodeSelector": { SchemaProps: spec.SchemaProps{ Description: "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Ref: ref(corev1.NodeSelector{}.OpenAPIModelName()), }, }, "allocationTimestamp": { SchemaProps: spec.SchemaProps{ Description: "AllocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown.\n\nThis is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gate.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1.DeviceAllocationResult", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + corev1.NodeSelector{}.OpenAPIModelName(), resourcev1.DeviceAllocationResult{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -48045,7 +48127,7 @@ func schema_k8sio_api_resource_v1_CapacityRequestPolicy(ref common.ReferenceCall "default": { SchemaProps: spec.SchemaProps{ Description: "Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "validValues": { @@ -48060,7 +48142,7 @@ func schema_k8sio_api_resource_v1_CapacityRequestPolicy(ref common.ReferenceCall Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -48069,14 +48151,14 @@ func schema_k8sio_api_resource_v1_CapacityRequestPolicy(ref common.ReferenceCall "validRange": { SchemaProps: spec.SchemaProps{ Description: "ValidRange defines an acceptable quantity value range in consuming requests.\n\nIf this field is set, Default must be defined and it must fall within the defined ValidRange.\n\nIf the requested amount does not fall within the defined range, the request violates the policy, and this device cannot be allocated.\n\nIf the request doesn't contain this capacity entry, Default value is used.", - Ref: ref("k8s.io/api/resource/v1.CapacityRequestPolicyRange"), + Ref: ref(resourcev1.CapacityRequestPolicyRange{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.CapacityRequestPolicyRange", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resourcev1.CapacityRequestPolicyRange{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -48090,19 +48172,19 @@ func schema_k8sio_api_resource_v1_CapacityRequestPolicyRange(ref common.Referenc "min": { SchemaProps: spec.SchemaProps{ Description: "Min specifies the minimum capacity allowed for a consumption request.\n\nMin must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "max": { SchemaProps: spec.SchemaProps{ Description: "Max defines the upper limit for capacity that can be requested.\n\nMax must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "step": { SchemaProps: spec.SchemaProps{ Description: "Step defines the step size between valid capacity amounts within the range.\n\nMax (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -48110,7 +48192,7 @@ func schema_k8sio_api_resource_v1_CapacityRequestPolicyRange(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -48129,7 +48211,7 @@ func schema_k8sio_api_resource_v1_CapacityRequirements(ref common.ReferenceCallb Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -48139,7 +48221,7 @@ func schema_k8sio_api_resource_v1_CapacityRequirements(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -48153,7 +48235,7 @@ func schema_k8sio_api_resource_v1_Counter(ref common.ReferenceCallback) common.O "value": { SchemaProps: spec.SchemaProps{ Description: "Value defines how much of a certain device counter is available.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -48161,7 +48243,7 @@ func schema_k8sio_api_resource_v1_Counter(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -48189,7 +48271,7 @@ func schema_k8sio_api_resource_v1_CounterSet(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.Counter"), + Ref: ref(resourcev1.Counter{}.OpenAPIModelName()), }, }, }, @@ -48200,7 +48282,7 @@ func schema_k8sio_api_resource_v1_CounterSet(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.Counter"}, + resourcev1.Counter{}.OpenAPIModelName()}, } } @@ -48228,7 +48310,7 @@ func schema_k8sio_api_resource_v1_Device(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceAttribute"), + Ref: ref(resourcev1.DeviceAttribute{}.OpenAPIModelName()), }, }, }, @@ -48243,7 +48325,7 @@ func schema_k8sio_api_resource_v1_Device(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceCapacity"), + Ref: ref(resourcev1.DeviceCapacity{}.OpenAPIModelName()), }, }, }, @@ -48262,7 +48344,7 @@ func schema_k8sio_api_resource_v1_Device(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceCounterConsumption"), + Ref: ref(resourcev1.DeviceCounterConsumption{}.OpenAPIModelName()), }, }, }, @@ -48278,7 +48360,7 @@ func schema_k8sio_api_resource_v1_Device(ref common.ReferenceCallback) common.Op "nodeSelector": { SchemaProps: spec.SchemaProps{ Description: "NodeSelector defines the nodes where the device is available.\n\nMust use exactly one term.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Ref: ref(corev1.NodeSelector{}.OpenAPIModelName()), }, }, "allNodes": { @@ -48301,7 +48383,7 @@ func schema_k8sio_api_resource_v1_Device(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceTaint"), + Ref: ref(resourcev1.DeviceTaint{}.OpenAPIModelName()), }, }, }, @@ -48366,7 +48448,7 @@ func schema_k8sio_api_resource_v1_Device(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1.DeviceAttribute", "k8s.io/api/resource/v1.DeviceCapacity", "k8s.io/api/resource/v1.DeviceCounterConsumption", "k8s.io/api/resource/v1.DeviceTaint"}, + corev1.NodeSelector{}.OpenAPIModelName(), resourcev1.DeviceAttribute{}.OpenAPIModelName(), resourcev1.DeviceCapacity{}.OpenAPIModelName(), resourcev1.DeviceCounterConsumption{}.OpenAPIModelName(), resourcev1.DeviceTaint{}.OpenAPIModelName()}, } } @@ -48408,7 +48490,7 @@ func schema_k8sio_api_resource_v1_DeviceAllocationConfiguration(ref common.Refer "opaque": { SchemaProps: spec.SchemaProps{ Description: "Opaque provides driver-specific configuration parameters.", - Ref: ref("k8s.io/api/resource/v1.OpaqueDeviceConfiguration"), + Ref: ref(resourcev1.OpaqueDeviceConfiguration{}.OpenAPIModelName()), }, }, }, @@ -48416,7 +48498,7 @@ func schema_k8sio_api_resource_v1_DeviceAllocationConfiguration(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.OpaqueDeviceConfiguration"}, + resourcev1.OpaqueDeviceConfiguration{}.OpenAPIModelName()}, } } @@ -48440,7 +48522,7 @@ func schema_k8sio_api_resource_v1_DeviceAllocationResult(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceRequestAllocationResult"), + Ref: ref(resourcev1.DeviceRequestAllocationResult{}.OpenAPIModelName()), }, }, }, @@ -48459,7 +48541,7 @@ func schema_k8sio_api_resource_v1_DeviceAllocationResult(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceAllocationConfiguration"), + Ref: ref(resourcev1.DeviceAllocationConfiguration{}.OpenAPIModelName()), }, }, }, @@ -48469,7 +48551,7 @@ func schema_k8sio_api_resource_v1_DeviceAllocationResult(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.DeviceAllocationConfiguration", "k8s.io/api/resource/v1.DeviceRequestAllocationResult"}, + resourcev1.DeviceAllocationConfiguration{}.OpenAPIModelName(), resourcev1.DeviceRequestAllocationResult{}.OpenAPIModelName()}, } } @@ -48524,13 +48606,13 @@ func schema_k8sio_api_resource_v1_DeviceCapacity(ref common.ReferenceCallback) c "value": { SchemaProps: spec.SchemaProps{ Description: "Value defines how much of a certain capacity that device has.\n\nThis field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "requestPolicy": { SchemaProps: spec.SchemaProps{ Description: "RequestPolicy defines how this DeviceCapacity must be consumed when the device is allowed to be shared by multiple allocations.\n\nThe Device must have allowMultipleAllocations set to true in order to set a requestPolicy.\n\nIf unset, capacity requests are unconstrained: requests can consume any amount of capacity, as long as the total consumed across all allocations does not exceed the device's defined capacity. If request is also unset, default is the full capacity value.", - Ref: ref("k8s.io/api/resource/v1.CapacityRequestPolicy"), + Ref: ref(resourcev1.CapacityRequestPolicy{}.OpenAPIModelName()), }, }, }, @@ -48538,7 +48620,7 @@ func schema_k8sio_api_resource_v1_DeviceCapacity(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.CapacityRequestPolicy", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resourcev1.CapacityRequestPolicy{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -48562,7 +48644,7 @@ func schema_k8sio_api_resource_v1_DeviceClaim(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceRequest"), + Ref: ref(resourcev1.DeviceRequest{}.OpenAPIModelName()), }, }, }, @@ -48581,7 +48663,7 @@ func schema_k8sio_api_resource_v1_DeviceClaim(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceConstraint"), + Ref: ref(resourcev1.DeviceConstraint{}.OpenAPIModelName()), }, }, }, @@ -48600,7 +48682,7 @@ func schema_k8sio_api_resource_v1_DeviceClaim(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceClaimConfiguration"), + Ref: ref(resourcev1.DeviceClaimConfiguration{}.OpenAPIModelName()), }, }, }, @@ -48610,7 +48692,7 @@ func schema_k8sio_api_resource_v1_DeviceClaim(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.DeviceClaimConfiguration", "k8s.io/api/resource/v1.DeviceConstraint", "k8s.io/api/resource/v1.DeviceRequest"}, + resourcev1.DeviceClaimConfiguration{}.OpenAPIModelName(), resourcev1.DeviceConstraint{}.OpenAPIModelName(), resourcev1.DeviceRequest{}.OpenAPIModelName()}, } } @@ -48644,14 +48726,14 @@ func schema_k8sio_api_resource_v1_DeviceClaimConfiguration(ref common.ReferenceC "opaque": { SchemaProps: spec.SchemaProps{ Description: "Opaque provides driver-specific configuration parameters.", - Ref: ref("k8s.io/api/resource/v1.OpaqueDeviceConfiguration"), + Ref: ref(resourcev1.OpaqueDeviceConfiguration{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.OpaqueDeviceConfiguration"}, + resourcev1.OpaqueDeviceConfiguration{}.OpenAPIModelName()}, } } @@ -48680,14 +48762,14 @@ func schema_k8sio_api_resource_v1_DeviceClass(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines what can be allocated and how to configure it.\n\nThis is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.\n\nChanging the spec automatically increments the metadata.generation number.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceClassSpec"), + Ref: ref(resourcev1.DeviceClassSpec{}.OpenAPIModelName()), }, }, }, @@ -48695,7 +48777,7 @@ func schema_k8sio_api_resource_v1_DeviceClass(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.DeviceClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resourcev1.DeviceClassSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -48709,14 +48791,14 @@ func schema_k8sio_api_resource_v1_DeviceClassConfiguration(ref common.ReferenceC "opaque": { SchemaProps: spec.SchemaProps{ Description: "Opaque provides driver-specific configuration parameters.", - Ref: ref("k8s.io/api/resource/v1.OpaqueDeviceConfiguration"), + Ref: ref(resourcev1.OpaqueDeviceConfiguration{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.OpaqueDeviceConfiguration"}, + resourcev1.OpaqueDeviceConfiguration{}.OpenAPIModelName()}, } } @@ -48745,7 +48827,7 @@ func schema_k8sio_api_resource_v1_DeviceClassList(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard list metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -48756,7 +48838,7 @@ func schema_k8sio_api_resource_v1_DeviceClassList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceClass"), + Ref: ref(resourcev1.DeviceClass{}.OpenAPIModelName()), }, }, }, @@ -48767,7 +48849,7 @@ func schema_k8sio_api_resource_v1_DeviceClassList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.DeviceClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + resourcev1.DeviceClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -48791,7 +48873,7 @@ func schema_k8sio_api_resource_v1_DeviceClassSpec(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceSelector"), + Ref: ref(resourcev1.DeviceSelector{}.OpenAPIModelName()), }, }, }, @@ -48810,7 +48892,7 @@ func schema_k8sio_api_resource_v1_DeviceClassSpec(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceClassConfiguration"), + Ref: ref(resourcev1.DeviceClassConfiguration{}.OpenAPIModelName()), }, }, }, @@ -48827,7 +48909,7 @@ func schema_k8sio_api_resource_v1_DeviceClassSpec(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.DeviceClassConfiguration", "k8s.io/api/resource/v1.DeviceSelector"}, + resourcev1.DeviceClassConfiguration{}.OpenAPIModelName(), resourcev1.DeviceSelector{}.OpenAPIModelName()}, } } @@ -48841,14 +48923,14 @@ func schema_k8sio_api_resource_v1_DeviceConfiguration(ref common.ReferenceCallba "opaque": { SchemaProps: spec.SchemaProps{ Description: "Opaque provides driver-specific configuration parameters.", - Ref: ref("k8s.io/api/resource/v1.OpaqueDeviceConfiguration"), + Ref: ref(resourcev1.OpaqueDeviceConfiguration{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.OpaqueDeviceConfiguration"}, + resourcev1.OpaqueDeviceConfiguration{}.OpenAPIModelName()}, } } @@ -48923,7 +49005,7 @@ func schema_k8sio_api_resource_v1_DeviceCounterConsumption(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.Counter"), + Ref: ref(resourcev1.Counter{}.OpenAPIModelName()), }, }, }, @@ -48934,7 +49016,7 @@ func schema_k8sio_api_resource_v1_DeviceCounterConsumption(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.Counter"}, + resourcev1.Counter{}.OpenAPIModelName()}, } } @@ -48956,7 +49038,7 @@ func schema_k8sio_api_resource_v1_DeviceRequest(ref common.ReferenceCallback) co "exactly": { SchemaProps: spec.SchemaProps{ Description: "Exactly specifies the details for a single request that must be met exactly for the request to be satisfied.\n\nOne of Exactly or FirstAvailable must be set.", - Ref: ref("k8s.io/api/resource/v1.ExactDeviceRequest"), + Ref: ref(resourcev1.ExactDeviceRequest{}.OpenAPIModelName()), }, }, "firstAvailable": { @@ -48972,7 +49054,7 @@ func schema_k8sio_api_resource_v1_DeviceRequest(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceSubRequest"), + Ref: ref(resourcev1.DeviceSubRequest{}.OpenAPIModelName()), }, }, }, @@ -48983,7 +49065,7 @@ func schema_k8sio_api_resource_v1_DeviceRequest(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.DeviceSubRequest", "k8s.io/api/resource/v1.ExactDeviceRequest"}, + resourcev1.DeviceSubRequest{}.OpenAPIModelName(), resourcev1.ExactDeviceRequest{}.OpenAPIModelName()}, } } @@ -49004,7 +49086,7 @@ func schema_k8sio_api_resource_v1_DeviceRequestAllocationResult(ref common.Refer }, "driver": { SchemaProps: spec.SchemaProps{ - Description: "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + Description: "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", Default: "", Type: []string{"string"}, Format: "", @@ -49046,7 +49128,7 @@ func schema_k8sio_api_resource_v1_DeviceRequestAllocationResult(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceToleration"), + Ref: ref(resourcev1.DeviceToleration{}.OpenAPIModelName()), }, }, }, @@ -49107,7 +49189,7 @@ func schema_k8sio_api_resource_v1_DeviceRequestAllocationResult(ref common.Refer Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -49118,7 +49200,7 @@ func schema_k8sio_api_resource_v1_DeviceRequestAllocationResult(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.DeviceToleration", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resourcev1.DeviceToleration{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -49132,14 +49214,14 @@ func schema_k8sio_api_resource_v1_DeviceSelector(ref common.ReferenceCallback) c "cel": { SchemaProps: spec.SchemaProps{ Description: "CEL contains a CEL expression for selecting a device.", - Ref: ref("k8s.io/api/resource/v1.CELDeviceSelector"), + Ref: ref(resourcev1.CELDeviceSelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.CELDeviceSelector"}, + resourcev1.CELDeviceSelector{}.OpenAPIModelName()}, } } @@ -49179,7 +49261,7 @@ func schema_k8sio_api_resource_v1_DeviceSubRequest(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceSelector"), + Ref: ref(resourcev1.DeviceSelector{}.OpenAPIModelName()), }, }, }, @@ -49187,9 +49269,10 @@ func schema_k8sio_api_resource_v1_DeviceSubRequest(ref common.ReferenceCallback) }, "allocationMode": { SchemaProps: spec.SchemaProps{ - Description: "AllocationMode and its related fields define how devices are allocated to satisfy this subrequest. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This subrequest is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other subrequests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.", + Description: "AllocationMode and its related fields define how devices are allocated to satisfy this subrequest. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This subrequest is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other subrequests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.\n\n\nPossible enum values:\n - `\"All\"`\n - `\"ExactCount\"`", Type: []string{"string"}, Format: "", + Enum: []interface{}{"All", "ExactCount"}, }, }, "count": { @@ -49212,7 +49295,7 @@ func schema_k8sio_api_resource_v1_DeviceSubRequest(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceToleration"), + Ref: ref(resourcev1.DeviceToleration{}.OpenAPIModelName()), }, }, }, @@ -49221,7 +49304,7 @@ func schema_k8sio_api_resource_v1_DeviceSubRequest(ref common.ReferenceCallback) "capacity": { SchemaProps: spec.SchemaProps{ Description: "Capacity define resource requirements against each capacity.\n\nIf this field is unset and the device supports multiple allocations, the default value will be applied to each capacity according to requestPolicy. For the capacity that has no requestPolicy, default is the full capacity value.\n\nApplies to each device allocation. If Count > 1, the request fails if there aren't enough devices that meet the requirements. If AllocationMode is set to All, the request fails if there are devices that otherwise match the request, and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.", - Ref: ref("k8s.io/api/resource/v1.CapacityRequirements"), + Ref: ref(resourcev1.CapacityRequirements{}.OpenAPIModelName()), }, }, }, @@ -49229,7 +49312,7 @@ func schema_k8sio_api_resource_v1_DeviceSubRequest(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.CapacityRequirements", "k8s.io/api/resource/v1.DeviceSelector", "k8s.io/api/resource/v1.DeviceToleration"}, + resourcev1.CapacityRequirements{}.OpenAPIModelName(), resourcev1.DeviceSelector{}.OpenAPIModelName(), resourcev1.DeviceToleration{}.OpenAPIModelName()}, } } @@ -49267,7 +49350,7 @@ func schema_k8sio_api_resource_v1_DeviceTaint(ref common.ReferenceCallback) comm "timeAdded": { SchemaProps: spec.SchemaProps{ Description: "TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, @@ -49275,7 +49358,7 @@ func schema_k8sio_api_resource_v1_DeviceTaint(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -49358,7 +49441,7 @@ func schema_k8sio_api_resource_v1_ExactDeviceRequest(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceSelector"), + Ref: ref(resourcev1.DeviceSelector{}.OpenAPIModelName()), }, }, }, @@ -49366,9 +49449,10 @@ func schema_k8sio_api_resource_v1_ExactDeviceRequest(ref common.ReferenceCallbac }, "allocationMode": { SchemaProps: spec.SchemaProps{ - Description: "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n At least one device must exist on the node for the allocation to succeed.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.", + Description: "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n At least one device must exist on the node for the allocation to succeed.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.\n\n\nPossible enum values:\n - `\"All\"`\n - `\"ExactCount\"`", Type: []string{"string"}, Format: "", + Enum: []interface{}{"All", "ExactCount"}, }, }, "count": { @@ -49398,7 +49482,7 @@ func schema_k8sio_api_resource_v1_ExactDeviceRequest(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceToleration"), + Ref: ref(resourcev1.DeviceToleration{}.OpenAPIModelName()), }, }, }, @@ -49407,7 +49491,7 @@ func schema_k8sio_api_resource_v1_ExactDeviceRequest(ref common.ReferenceCallbac "capacity": { SchemaProps: spec.SchemaProps{ Description: "Capacity define resource requirements against each capacity.\n\nIf this field is unset and the device supports multiple allocations, the default value will be applied to each capacity according to requestPolicy. For the capacity that has no requestPolicy, default is the full capacity value.\n\nApplies to each device allocation. If Count > 1, the request fails if there aren't enough devices that meet the requirements. If AllocationMode is set to All, the request fails if there are devices that otherwise match the request, and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.", - Ref: ref("k8s.io/api/resource/v1.CapacityRequirements"), + Ref: ref(resourcev1.CapacityRequirements{}.OpenAPIModelName()), }, }, }, @@ -49415,7 +49499,7 @@ func schema_k8sio_api_resource_v1_ExactDeviceRequest(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.CapacityRequirements", "k8s.io/api/resource/v1.DeviceSelector", "k8s.io/api/resource/v1.DeviceToleration"}, + resourcev1.CapacityRequirements{}.OpenAPIModelName(), resourcev1.DeviceSelector{}.OpenAPIModelName(), resourcev1.DeviceToleration{}.OpenAPIModelName()}, } } @@ -49475,7 +49559,7 @@ func schema_k8sio_api_resource_v1_OpaqueDeviceConfiguration(ref common.Reference Properties: map[string]spec.Schema{ "driver": { SchemaProps: spec.SchemaProps{ - Description: "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + Description: "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", Default: "", Type: []string{"string"}, Format: "", @@ -49484,7 +49568,7 @@ func schema_k8sio_api_resource_v1_OpaqueDeviceConfiguration(ref common.Reference "parameters": { SchemaProps: spec.SchemaProps{ Description: "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -49492,7 +49576,7 @@ func schema_k8sio_api_resource_v1_OpaqueDeviceConfiguration(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -49521,21 +49605,21 @@ func schema_k8sio_api_resource_v1_ResourceClaim(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Standard object metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec describes what is being requested and how to configure it. The spec is immutable.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.ResourceClaimSpec"), + Ref: ref(resourcev1.ResourceClaimSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status describes whether the claim is ready to use and what has been allocated.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.ResourceClaimStatus"), + Ref: ref(resourcev1.ResourceClaimStatus{}.OpenAPIModelName()), }, }, }, @@ -49543,7 +49627,7 @@ func schema_k8sio_api_resource_v1_ResourceClaim(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.ResourceClaimSpec", "k8s.io/api/resource/v1.ResourceClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resourcev1.ResourceClaimSpec{}.OpenAPIModelName(), resourcev1.ResourceClaimStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -49617,7 +49701,7 @@ func schema_k8sio_api_resource_v1_ResourceClaimList(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard list metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -49628,7 +49712,7 @@ func schema_k8sio_api_resource_v1_ResourceClaimList(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.ResourceClaim"), + Ref: ref(resourcev1.ResourceClaim{}.OpenAPIModelName()), }, }, }, @@ -49639,7 +49723,7 @@ func schema_k8sio_api_resource_v1_ResourceClaimList(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.ResourceClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + resourcev1.ResourceClaim{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -49654,14 +49738,14 @@ func schema_k8sio_api_resource_v1_ResourceClaimSpec(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Devices defines how to request devices.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.DeviceClaim"), + Ref: ref(resourcev1.DeviceClaim{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.DeviceClaim"}, + resourcev1.DeviceClaim{}.OpenAPIModelName()}, } } @@ -49675,7 +49759,7 @@ func schema_k8sio_api_resource_v1_ResourceClaimStatus(ref common.ReferenceCallba "allocation": { SchemaProps: spec.SchemaProps{ Description: "Allocation is set once the claim has been allocated successfully.", - Ref: ref("k8s.io/api/resource/v1.AllocationResult"), + Ref: ref(resourcev1.AllocationResult{}.OpenAPIModelName()), }, }, "reservedFor": { @@ -49696,7 +49780,7 @@ func schema_k8sio_api_resource_v1_ResourceClaimStatus(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.ResourceClaimConsumerReference"), + Ref: ref(resourcev1.ResourceClaimConsumerReference{}.OpenAPIModelName()), }, }, }, @@ -49721,7 +49805,7 @@ func schema_k8sio_api_resource_v1_ResourceClaimStatus(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.AllocatedDeviceStatus"), + Ref: ref(resourcev1.AllocatedDeviceStatus{}.OpenAPIModelName()), }, }, }, @@ -49731,7 +49815,7 @@ func schema_k8sio_api_resource_v1_ResourceClaimStatus(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.AllocatedDeviceStatus", "k8s.io/api/resource/v1.AllocationResult", "k8s.io/api/resource/v1.ResourceClaimConsumerReference"}, + resourcev1.AllocatedDeviceStatus{}.OpenAPIModelName(), resourcev1.AllocationResult{}.OpenAPIModelName(), resourcev1.ResourceClaimConsumerReference{}.OpenAPIModelName()}, } } @@ -49760,14 +49844,14 @@ func schema_k8sio_api_resource_v1_ResourceClaimTemplate(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard object metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.ResourceClaimTemplateSpec"), + Ref: ref(resourcev1.ResourceClaimTemplateSpec{}.OpenAPIModelName()), }, }, }, @@ -49775,7 +49859,7 @@ func schema_k8sio_api_resource_v1_ResourceClaimTemplate(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.ResourceClaimTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resourcev1.ResourceClaimTemplateSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -49804,7 +49888,7 @@ func schema_k8sio_api_resource_v1_ResourceClaimTemplateList(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "Standard list metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -49815,7 +49899,7 @@ func schema_k8sio_api_resource_v1_ResourceClaimTemplateList(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.ResourceClaimTemplate"), + Ref: ref(resourcev1.ResourceClaimTemplate{}.OpenAPIModelName()), }, }, }, @@ -49826,7 +49910,7 @@ func schema_k8sio_api_resource_v1_ResourceClaimTemplateList(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.ResourceClaimTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + resourcev1.ResourceClaimTemplate{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -49841,14 +49925,14 @@ func schema_k8sio_api_resource_v1_ResourceClaimTemplateSpec(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim when creating it. No other fields are allowed and will be rejected during validation.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.ResourceClaimSpec"), + Ref: ref(resourcev1.ResourceClaimSpec{}.OpenAPIModelName()), }, }, }, @@ -49856,7 +49940,7 @@ func schema_k8sio_api_resource_v1_ResourceClaimTemplateSpec(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.ResourceClaimSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resourcev1.ResourceClaimSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -49923,14 +50007,14 @@ func schema_k8sio_api_resource_v1_ResourceSlice(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Standard object metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Contains the information published by the driver.\n\nChanging the spec automatically increments the metadata.generation number.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.ResourceSliceSpec"), + Ref: ref(resourcev1.ResourceSliceSpec{}.OpenAPIModelName()), }, }, }, @@ -49938,7 +50022,7 @@ func schema_k8sio_api_resource_v1_ResourceSlice(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.ResourceSliceSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resourcev1.ResourceSliceSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -49967,7 +50051,7 @@ func schema_k8sio_api_resource_v1_ResourceSliceList(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard list metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -49978,7 +50062,7 @@ func schema_k8sio_api_resource_v1_ResourceSliceList(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.ResourceSlice"), + Ref: ref(resourcev1.ResourceSlice{}.OpenAPIModelName()), }, }, }, @@ -49989,7 +50073,7 @@ func schema_k8sio_api_resource_v1_ResourceSliceList(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/resource/v1.ResourceSlice", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + resourcev1.ResourceSlice{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -50002,7 +50086,7 @@ func schema_k8sio_api_resource_v1_ResourceSliceSpec(ref common.ReferenceCallback Properties: map[string]spec.Schema{ "driver": { SchemaProps: spec.SchemaProps{ - Description: "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + Description: "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. This field is immutable.", Default: "", Type: []string{"string"}, Format: "", @@ -50012,7 +50096,7 @@ func schema_k8sio_api_resource_v1_ResourceSliceSpec(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Pool describes the pool that this ResourceSlice belongs to.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.ResourcePool"), + Ref: ref(resourcev1.ResourcePool{}.OpenAPIModelName()), }, }, "nodeName": { @@ -50025,7 +50109,7 @@ func schema_k8sio_api_resource_v1_ResourceSliceSpec(ref common.ReferenceCallback "nodeSelector": { SchemaProps: spec.SchemaProps{ Description: "NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.\n\nMust use exactly one term.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Ref: ref(corev1.NodeSelector{}.OpenAPIModelName()), }, }, "allNodes": { @@ -50048,7 +50132,7 @@ func schema_k8sio_api_resource_v1_ResourceSliceSpec(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.Device"), + Ref: ref(resourcev1.Device{}.OpenAPIModelName()), }, }, }, @@ -50074,7 +50158,7 @@ func schema_k8sio_api_resource_v1_ResourceSliceSpec(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1.CounterSet"), + Ref: ref(resourcev1.CounterSet{}.OpenAPIModelName()), }, }, }, @@ -50085,7 +50169,7 @@ func schema_k8sio_api_resource_v1_ResourceSliceSpec(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1.CounterSet", "k8s.io/api/resource/v1.Device", "k8s.io/api/resource/v1.ResourcePool"}, + corev1.NodeSelector{}.OpenAPIModelName(), resourcev1.CounterSet{}.OpenAPIModelName(), resourcev1.Device{}.OpenAPIModelName(), resourcev1.ResourcePool{}.OpenAPIModelName()}, } } @@ -50121,14 +50205,14 @@ func schema_k8sio_api_resource_v1alpha3_DeviceSelector(ref common.ReferenceCallb "cel": { SchemaProps: spec.SchemaProps{ Description: "CEL contains a CEL expression for selecting a device.", - Ref: ref("k8s.io/api/resource/v1alpha3.CELDeviceSelector"), + Ref: ref(v1alpha3.CELDeviceSelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.CELDeviceSelector"}, + v1alpha3.CELDeviceSelector{}.OpenAPIModelName()}, } } @@ -50166,7 +50250,7 @@ func schema_k8sio_api_resource_v1alpha3_DeviceTaint(ref common.ReferenceCallback "timeAdded": { SchemaProps: spec.SchemaProps{ Description: "TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, @@ -50174,7 +50258,7 @@ func schema_k8sio_api_resource_v1alpha3_DeviceTaint(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -50203,14 +50287,14 @@ func schema_k8sio_api_resource_v1alpha3_DeviceTaintRule(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard object metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec specifies the selector and one taint.\n\nChanging the spec automatically increments the metadata.generation number.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.DeviceTaintRuleSpec"), + Ref: ref(v1alpha3.DeviceTaintRuleSpec{}.OpenAPIModelName()), }, }, }, @@ -50218,7 +50302,7 @@ func schema_k8sio_api_resource_v1alpha3_DeviceTaintRule(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.DeviceTaintRuleSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1alpha3.DeviceTaintRuleSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -50247,7 +50331,7 @@ func schema_k8sio_api_resource_v1alpha3_DeviceTaintRuleList(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "Standard list metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -50258,7 +50342,7 @@ func schema_k8sio_api_resource_v1alpha3_DeviceTaintRuleList(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.DeviceTaintRule"), + Ref: ref(v1alpha3.DeviceTaintRule{}.OpenAPIModelName()), }, }, }, @@ -50269,7 +50353,7 @@ func schema_k8sio_api_resource_v1alpha3_DeviceTaintRuleList(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.DeviceTaintRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1alpha3.DeviceTaintRule{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -50283,14 +50367,14 @@ func schema_k8sio_api_resource_v1alpha3_DeviceTaintRuleSpec(ref common.Reference "deviceSelector": { SchemaProps: spec.SchemaProps{ Description: "DeviceSelector defines which device(s) the taint is applied to. All selector criteria must be satified for a device to match. The empty selector matches all devices. Without a selector, no devices are matches.", - Ref: ref("k8s.io/api/resource/v1alpha3.DeviceTaintSelector"), + Ref: ref(v1alpha3.DeviceTaintSelector{}.OpenAPIModelName()), }, }, "taint": { SchemaProps: spec.SchemaProps{ Description: "The taint that gets applied to matching devices.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.DeviceTaint"), + Ref: ref(v1alpha3.DeviceTaint{}.OpenAPIModelName()), }, }, }, @@ -50298,7 +50382,7 @@ func schema_k8sio_api_resource_v1alpha3_DeviceTaintRuleSpec(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.DeviceTaint", "k8s.io/api/resource/v1alpha3.DeviceTaintSelector"}, + v1alpha3.DeviceTaint{}.OpenAPIModelName(), v1alpha3.DeviceTaintSelector{}.OpenAPIModelName()}, } } @@ -50350,7 +50434,7 @@ func schema_k8sio_api_resource_v1alpha3_DeviceTaintSelector(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.DeviceSelector"), + Ref: ref(v1alpha3.DeviceSelector{}.OpenAPIModelName()), }, }, }, @@ -50360,7 +50444,7 @@ func schema_k8sio_api_resource_v1alpha3_DeviceTaintSelector(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.DeviceSelector"}, + v1alpha3.DeviceSelector{}.OpenAPIModelName()}, } } @@ -50373,7 +50457,7 @@ func schema_k8sio_api_resource_v1beta1_AllocatedDeviceStatus(ref common.Referenc Properties: map[string]spec.Schema{ "driver": { SchemaProps: spec.SchemaProps{ - Description: "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + Description: "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", Default: "", Type: []string{"string"}, Format: "", @@ -50418,7 +50502,7 @@ func schema_k8sio_api_resource_v1beta1_AllocatedDeviceStatus(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -50427,13 +50511,13 @@ func schema_k8sio_api_resource_v1beta1_AllocatedDeviceStatus(ref common.Referenc "data": { SchemaProps: spec.SchemaProps{ Description: "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, "networkData": { SchemaProps: spec.SchemaProps{ Description: "NetworkData contains network-related information specific to the device.", - Ref: ref("k8s.io/api/resource/v1beta1.NetworkDeviceData"), + Ref: ref(resourcev1beta1.NetworkDeviceData{}.OpenAPIModelName()), }, }, }, @@ -50441,7 +50525,7 @@ func schema_k8sio_api_resource_v1beta1_AllocatedDeviceStatus(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.NetworkDeviceData", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + resourcev1beta1.NetworkDeviceData{}.OpenAPIModelName(), metav1.Condition{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -50456,26 +50540,26 @@ func schema_k8sio_api_resource_v1beta1_AllocationResult(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Devices is the result of allocating devices.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceAllocationResult"), + Ref: ref(resourcev1beta1.DeviceAllocationResult{}.OpenAPIModelName()), }, }, "nodeSelector": { SchemaProps: spec.SchemaProps{ Description: "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Ref: ref(corev1.NodeSelector{}.OpenAPIModelName()), }, }, "allocationTimestamp": { SchemaProps: spec.SchemaProps{ Description: "AllocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown.\n\nThis is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gate.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1beta1.DeviceAllocationResult", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + corev1.NodeSelector{}.OpenAPIModelName(), resourcev1beta1.DeviceAllocationResult{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -50495,7 +50579,7 @@ func schema_k8sio_api_resource_v1beta1_BasicDevice(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceAttribute"), + Ref: ref(resourcev1beta1.DeviceAttribute{}.OpenAPIModelName()), }, }, }, @@ -50510,7 +50594,7 @@ func schema_k8sio_api_resource_v1beta1_BasicDevice(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceCapacity"), + Ref: ref(resourcev1beta1.DeviceCapacity{}.OpenAPIModelName()), }, }, }, @@ -50529,7 +50613,7 @@ func schema_k8sio_api_resource_v1beta1_BasicDevice(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceCounterConsumption"), + Ref: ref(resourcev1beta1.DeviceCounterConsumption{}.OpenAPIModelName()), }, }, }, @@ -50545,7 +50629,7 @@ func schema_k8sio_api_resource_v1beta1_BasicDevice(ref common.ReferenceCallback) "nodeSelector": { SchemaProps: spec.SchemaProps{ Description: "NodeSelector defines the nodes where the device is available.\n\nMust use exactly one term.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Ref: ref(corev1.NodeSelector{}.OpenAPIModelName()), }, }, "allNodes": { @@ -50568,7 +50652,7 @@ func schema_k8sio_api_resource_v1beta1_BasicDevice(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceTaint"), + Ref: ref(resourcev1beta1.DeviceTaint{}.OpenAPIModelName()), }, }, }, @@ -50632,7 +50716,7 @@ func schema_k8sio_api_resource_v1beta1_BasicDevice(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1beta1.DeviceAttribute", "k8s.io/api/resource/v1beta1.DeviceCapacity", "k8s.io/api/resource/v1beta1.DeviceCounterConsumption", "k8s.io/api/resource/v1beta1.DeviceTaint"}, + corev1.NodeSelector{}.OpenAPIModelName(), resourcev1beta1.DeviceAttribute{}.OpenAPIModelName(), resourcev1beta1.DeviceCapacity{}.OpenAPIModelName(), resourcev1beta1.DeviceCounterConsumption{}.OpenAPIModelName(), resourcev1beta1.DeviceTaint{}.OpenAPIModelName()}, } } @@ -50668,7 +50752,7 @@ func schema_k8sio_api_resource_v1beta1_CapacityRequestPolicy(ref common.Referenc "default": { SchemaProps: spec.SchemaProps{ Description: "Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "validValues": { @@ -50683,7 +50767,7 @@ func schema_k8sio_api_resource_v1beta1_CapacityRequestPolicy(ref common.Referenc Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -50692,14 +50776,14 @@ func schema_k8sio_api_resource_v1beta1_CapacityRequestPolicy(ref common.Referenc "validRange": { SchemaProps: spec.SchemaProps{ Description: "ValidRange defines an acceptable quantity value range in consuming requests.\n\nIf this field is set, Default must be defined and it must fall within the defined ValidRange.\n\nIf the requested amount does not fall within the defined range, the request violates the policy, and this device cannot be allocated.\n\nIf the request doesn't contain this capacity entry, Default value is used.", - Ref: ref("k8s.io/api/resource/v1beta1.CapacityRequestPolicyRange"), + Ref: ref(resourcev1beta1.CapacityRequestPolicyRange{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.CapacityRequestPolicyRange", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resourcev1beta1.CapacityRequestPolicyRange{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -50713,19 +50797,19 @@ func schema_k8sio_api_resource_v1beta1_CapacityRequestPolicyRange(ref common.Ref "min": { SchemaProps: spec.SchemaProps{ Description: "Min specifies the minimum capacity allowed for a consumption request.\n\nMin must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "max": { SchemaProps: spec.SchemaProps{ Description: "Max defines the upper limit for capacity that can be requested.\n\nMax must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "step": { SchemaProps: spec.SchemaProps{ Description: "Step defines the step size between valid capacity amounts within the range.\n\nMax (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -50733,7 +50817,7 @@ func schema_k8sio_api_resource_v1beta1_CapacityRequestPolicyRange(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -50752,7 +50836,7 @@ func schema_k8sio_api_resource_v1beta1_CapacityRequirements(ref common.Reference Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -50762,7 +50846,7 @@ func schema_k8sio_api_resource_v1beta1_CapacityRequirements(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -50776,7 +50860,7 @@ func schema_k8sio_api_resource_v1beta1_Counter(ref common.ReferenceCallback) com "value": { SchemaProps: spec.SchemaProps{ Description: "Value defines how much of a certain device counter is available.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -50784,7 +50868,7 @@ func schema_k8sio_api_resource_v1beta1_Counter(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -50812,7 +50896,7 @@ func schema_k8sio_api_resource_v1beta1_CounterSet(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.Counter"), + Ref: ref(resourcev1beta1.Counter{}.OpenAPIModelName()), }, }, }, @@ -50823,7 +50907,7 @@ func schema_k8sio_api_resource_v1beta1_CounterSet(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.Counter"}, + resourcev1beta1.Counter{}.OpenAPIModelName()}, } } @@ -50845,7 +50929,7 @@ func schema_k8sio_api_resource_v1beta1_Device(ref common.ReferenceCallback) comm "basic": { SchemaProps: spec.SchemaProps{ Description: "Basic defines one device instance.", - Ref: ref("k8s.io/api/resource/v1beta1.BasicDevice"), + Ref: ref(resourcev1beta1.BasicDevice{}.OpenAPIModelName()), }, }, }, @@ -50853,7 +50937,7 @@ func schema_k8sio_api_resource_v1beta1_Device(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.BasicDevice"}, + resourcev1beta1.BasicDevice{}.OpenAPIModelName()}, } } @@ -50895,7 +50979,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceAllocationConfiguration(ref common. "opaque": { SchemaProps: spec.SchemaProps{ Description: "Opaque provides driver-specific configuration parameters.", - Ref: ref("k8s.io/api/resource/v1beta1.OpaqueDeviceConfiguration"), + Ref: ref(resourcev1beta1.OpaqueDeviceConfiguration{}.OpenAPIModelName()), }, }, }, @@ -50903,7 +50987,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceAllocationConfiguration(ref common. }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.OpaqueDeviceConfiguration"}, + resourcev1beta1.OpaqueDeviceConfiguration{}.OpenAPIModelName()}, } } @@ -50927,7 +51011,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceAllocationResult(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceRequestAllocationResult"), + Ref: ref(resourcev1beta1.DeviceRequestAllocationResult{}.OpenAPIModelName()), }, }, }, @@ -50946,7 +51030,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceAllocationResult(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceAllocationConfiguration"), + Ref: ref(resourcev1beta1.DeviceAllocationConfiguration{}.OpenAPIModelName()), }, }, }, @@ -50956,7 +51040,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceAllocationResult(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.DeviceAllocationConfiguration", "k8s.io/api/resource/v1beta1.DeviceRequestAllocationResult"}, + resourcev1beta1.DeviceAllocationConfiguration{}.OpenAPIModelName(), resourcev1beta1.DeviceRequestAllocationResult{}.OpenAPIModelName()}, } } @@ -51011,13 +51095,13 @@ func schema_k8sio_api_resource_v1beta1_DeviceCapacity(ref common.ReferenceCallba "value": { SchemaProps: spec.SchemaProps{ Description: "Value defines how much of a certain capacity that device has.\n\nThis field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "requestPolicy": { SchemaProps: spec.SchemaProps{ Description: "RequestPolicy defines how this DeviceCapacity must be consumed when the device is allowed to be shared by multiple allocations.\n\nThe Device must have allowMultipleAllocations set to true in order to set a requestPolicy.\n\nIf unset, capacity requests are unconstrained: requests can consume any amount of capacity, as long as the total consumed across all allocations does not exceed the device's defined capacity. If request is also unset, default is the full capacity value.", - Ref: ref("k8s.io/api/resource/v1beta1.CapacityRequestPolicy"), + Ref: ref(resourcev1beta1.CapacityRequestPolicy{}.OpenAPIModelName()), }, }, }, @@ -51025,7 +51109,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceCapacity(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.CapacityRequestPolicy", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resourcev1beta1.CapacityRequestPolicy{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -51049,7 +51133,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceClaim(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceRequest"), + Ref: ref(resourcev1beta1.DeviceRequest{}.OpenAPIModelName()), }, }, }, @@ -51068,7 +51152,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceClaim(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceConstraint"), + Ref: ref(resourcev1beta1.DeviceConstraint{}.OpenAPIModelName()), }, }, }, @@ -51087,7 +51171,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceClaim(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceClaimConfiguration"), + Ref: ref(resourcev1beta1.DeviceClaimConfiguration{}.OpenAPIModelName()), }, }, }, @@ -51097,7 +51181,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceClaim(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.DeviceClaimConfiguration", "k8s.io/api/resource/v1beta1.DeviceConstraint", "k8s.io/api/resource/v1beta1.DeviceRequest"}, + resourcev1beta1.DeviceClaimConfiguration{}.OpenAPIModelName(), resourcev1beta1.DeviceConstraint{}.OpenAPIModelName(), resourcev1beta1.DeviceRequest{}.OpenAPIModelName()}, } } @@ -51131,14 +51215,14 @@ func schema_k8sio_api_resource_v1beta1_DeviceClaimConfiguration(ref common.Refer "opaque": { SchemaProps: spec.SchemaProps{ Description: "Opaque provides driver-specific configuration parameters.", - Ref: ref("k8s.io/api/resource/v1beta1.OpaqueDeviceConfiguration"), + Ref: ref(resourcev1beta1.OpaqueDeviceConfiguration{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.OpaqueDeviceConfiguration"}, + resourcev1beta1.OpaqueDeviceConfiguration{}.OpenAPIModelName()}, } } @@ -51167,14 +51251,14 @@ func schema_k8sio_api_resource_v1beta1_DeviceClass(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines what can be allocated and how to configure it.\n\nThis is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.\n\nChanging the spec automatically increments the metadata.generation number.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceClassSpec"), + Ref: ref(resourcev1beta1.DeviceClassSpec{}.OpenAPIModelName()), }, }, }, @@ -51182,7 +51266,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceClass(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.DeviceClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resourcev1beta1.DeviceClassSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -51196,14 +51280,14 @@ func schema_k8sio_api_resource_v1beta1_DeviceClassConfiguration(ref common.Refer "opaque": { SchemaProps: spec.SchemaProps{ Description: "Opaque provides driver-specific configuration parameters.", - Ref: ref("k8s.io/api/resource/v1beta1.OpaqueDeviceConfiguration"), + Ref: ref(resourcev1beta1.OpaqueDeviceConfiguration{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.OpaqueDeviceConfiguration"}, + resourcev1beta1.OpaqueDeviceConfiguration{}.OpenAPIModelName()}, } } @@ -51232,7 +51316,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceClassList(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard list metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -51243,7 +51327,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceClassList(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceClass"), + Ref: ref(resourcev1beta1.DeviceClass{}.OpenAPIModelName()), }, }, }, @@ -51254,7 +51338,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceClassList(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.DeviceClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + resourcev1beta1.DeviceClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -51278,7 +51362,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceClassSpec(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceSelector"), + Ref: ref(resourcev1beta1.DeviceSelector{}.OpenAPIModelName()), }, }, }, @@ -51297,7 +51381,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceClassSpec(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceClassConfiguration"), + Ref: ref(resourcev1beta1.DeviceClassConfiguration{}.OpenAPIModelName()), }, }, }, @@ -51314,7 +51398,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceClassSpec(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.DeviceClassConfiguration", "k8s.io/api/resource/v1beta1.DeviceSelector"}, + resourcev1beta1.DeviceClassConfiguration{}.OpenAPIModelName(), resourcev1beta1.DeviceSelector{}.OpenAPIModelName()}, } } @@ -51328,14 +51412,14 @@ func schema_k8sio_api_resource_v1beta1_DeviceConfiguration(ref common.ReferenceC "opaque": { SchemaProps: spec.SchemaProps{ Description: "Opaque provides driver-specific configuration parameters.", - Ref: ref("k8s.io/api/resource/v1beta1.OpaqueDeviceConfiguration"), + Ref: ref(resourcev1beta1.OpaqueDeviceConfiguration{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.OpaqueDeviceConfiguration"}, + resourcev1beta1.OpaqueDeviceConfiguration{}.OpenAPIModelName()}, } } @@ -51410,7 +51494,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceCounterConsumption(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.Counter"), + Ref: ref(resourcev1beta1.Counter{}.OpenAPIModelName()), }, }, }, @@ -51421,7 +51505,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceCounterConsumption(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.Counter"}, + resourcev1beta1.Counter{}.OpenAPIModelName()}, } } @@ -51461,7 +51545,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceRequest(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceSelector"), + Ref: ref(resourcev1beta1.DeviceSelector{}.OpenAPIModelName()), }, }, }, @@ -51469,9 +51553,10 @@ func schema_k8sio_api_resource_v1beta1_DeviceRequest(ref common.ReferenceCallbac }, "allocationMode": { SchemaProps: spec.SchemaProps{ - Description: "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n At least one device must exist on the node for the allocation to succeed.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.", + Description: "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n At least one device must exist on the node for the allocation to succeed.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.\n\n\nPossible enum values:\n - `\"All\"`\n - `\"ExactCount\"`", Type: []string{"string"}, Format: "", + Enum: []interface{}{"All", "ExactCount"}, }, }, "count": { @@ -51501,7 +51586,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceRequest(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceSubRequest"), + Ref: ref(resourcev1beta1.DeviceSubRequest{}.OpenAPIModelName()), }, }, }, @@ -51520,7 +51605,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceRequest(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceToleration"), + Ref: ref(resourcev1beta1.DeviceToleration{}.OpenAPIModelName()), }, }, }, @@ -51529,7 +51614,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceRequest(ref common.ReferenceCallbac "capacity": { SchemaProps: spec.SchemaProps{ Description: "Capacity define resource requirements against each capacity.\n\nIf this field is unset and the device supports multiple allocations, the default value will be applied to each capacity according to requestPolicy. For the capacity that has no requestPolicy, default is the full capacity value.\n\nApplies to each device allocation. If Count > 1, the request fails if there aren't enough devices that meet the requirements. If AllocationMode is set to All, the request fails if there are devices that otherwise match the request, and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.", - Ref: ref("k8s.io/api/resource/v1beta1.CapacityRequirements"), + Ref: ref(resourcev1beta1.CapacityRequirements{}.OpenAPIModelName()), }, }, }, @@ -51537,7 +51622,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceRequest(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.CapacityRequirements", "k8s.io/api/resource/v1beta1.DeviceSelector", "k8s.io/api/resource/v1beta1.DeviceSubRequest", "k8s.io/api/resource/v1beta1.DeviceToleration"}, + resourcev1beta1.CapacityRequirements{}.OpenAPIModelName(), resourcev1beta1.DeviceSelector{}.OpenAPIModelName(), resourcev1beta1.DeviceSubRequest{}.OpenAPIModelName(), resourcev1beta1.DeviceToleration{}.OpenAPIModelName()}, } } @@ -51558,7 +51643,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceRequestAllocationResult(ref common. }, "driver": { SchemaProps: spec.SchemaProps{ - Description: "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + Description: "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", Default: "", Type: []string{"string"}, Format: "", @@ -51600,7 +51685,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceRequestAllocationResult(ref common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceToleration"), + Ref: ref(resourcev1beta1.DeviceToleration{}.OpenAPIModelName()), }, }, }, @@ -51661,7 +51746,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceRequestAllocationResult(ref common. Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -51672,7 +51757,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceRequestAllocationResult(ref common. }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.DeviceToleration", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resourcev1beta1.DeviceToleration{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -51686,14 +51771,14 @@ func schema_k8sio_api_resource_v1beta1_DeviceSelector(ref common.ReferenceCallba "cel": { SchemaProps: spec.SchemaProps{ Description: "CEL contains a CEL expression for selecting a device.", - Ref: ref("k8s.io/api/resource/v1beta1.CELDeviceSelector"), + Ref: ref(resourcev1beta1.CELDeviceSelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.CELDeviceSelector"}, + resourcev1beta1.CELDeviceSelector{}.OpenAPIModelName()}, } } @@ -51733,7 +51818,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceSubRequest(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceSelector"), + Ref: ref(resourcev1beta1.DeviceSelector{}.OpenAPIModelName()), }, }, }, @@ -51741,9 +51826,10 @@ func schema_k8sio_api_resource_v1beta1_DeviceSubRequest(ref common.ReferenceCall }, "allocationMode": { SchemaProps: spec.SchemaProps{ - Description: "AllocationMode and its related fields define how devices are allocated to satisfy this subrequest. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This subrequest is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other subrequests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.", + Description: "AllocationMode and its related fields define how devices are allocated to satisfy this subrequest. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This subrequest is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other subrequests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.\n\n\nPossible enum values:\n - `\"All\"`\n - `\"ExactCount\"`", Type: []string{"string"}, Format: "", + Enum: []interface{}{"All", "ExactCount"}, }, }, "count": { @@ -51766,7 +51852,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceSubRequest(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceToleration"), + Ref: ref(resourcev1beta1.DeviceToleration{}.OpenAPIModelName()), }, }, }, @@ -51775,7 +51861,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceSubRequest(ref common.ReferenceCall "capacity": { SchemaProps: spec.SchemaProps{ Description: "Capacity define resource requirements against each capacity.\n\nIf this field is unset and the device supports multiple allocations, the default value will be applied to each capacity according to requestPolicy. For the capacity that has no requestPolicy, default is the full capacity value.\n\nApplies to each device allocation. If Count > 1, the request fails if there aren't enough devices that meet the requirements. If AllocationMode is set to All, the request fails if there are devices that otherwise match the request, and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.", - Ref: ref("k8s.io/api/resource/v1beta1.CapacityRequirements"), + Ref: ref(resourcev1beta1.CapacityRequirements{}.OpenAPIModelName()), }, }, }, @@ -51783,7 +51869,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceSubRequest(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.CapacityRequirements", "k8s.io/api/resource/v1beta1.DeviceSelector", "k8s.io/api/resource/v1beta1.DeviceToleration"}, + resourcev1beta1.CapacityRequirements{}.OpenAPIModelName(), resourcev1beta1.DeviceSelector{}.OpenAPIModelName(), resourcev1beta1.DeviceToleration{}.OpenAPIModelName()}, } } @@ -51821,7 +51907,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceTaint(ref common.ReferenceCallback) "timeAdded": { SchemaProps: spec.SchemaProps{ Description: "TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, @@ -51829,7 +51915,7 @@ func schema_k8sio_api_resource_v1beta1_DeviceTaint(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -51940,7 +52026,7 @@ func schema_k8sio_api_resource_v1beta1_OpaqueDeviceConfiguration(ref common.Refe Properties: map[string]spec.Schema{ "driver": { SchemaProps: spec.SchemaProps{ - Description: "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + Description: "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", Default: "", Type: []string{"string"}, Format: "", @@ -51949,7 +52035,7 @@ func schema_k8sio_api_resource_v1beta1_OpaqueDeviceConfiguration(ref common.Refe "parameters": { SchemaProps: spec.SchemaProps{ Description: "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -51957,7 +52043,7 @@ func schema_k8sio_api_resource_v1beta1_OpaqueDeviceConfiguration(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -51986,21 +52072,21 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaim(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard object metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec describes what is being requested and how to configure it. The spec is immutable.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.ResourceClaimSpec"), + Ref: ref(resourcev1beta1.ResourceClaimSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status describes whether the claim is ready to use and what has been allocated.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.ResourceClaimStatus"), + Ref: ref(resourcev1beta1.ResourceClaimStatus{}.OpenAPIModelName()), }, }, }, @@ -52008,7 +52094,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaim(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.ResourceClaimSpec", "k8s.io/api/resource/v1beta1.ResourceClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resourcev1beta1.ResourceClaimSpec{}.OpenAPIModelName(), resourcev1beta1.ResourceClaimStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -52082,7 +52168,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimList(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "Standard list metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -52093,7 +52179,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimList(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.ResourceClaim"), + Ref: ref(resourcev1beta1.ResourceClaim{}.OpenAPIModelName()), }, }, }, @@ -52104,7 +52190,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimList(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.ResourceClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + resourcev1beta1.ResourceClaim{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -52119,14 +52205,14 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimSpec(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "Devices defines how to request devices.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.DeviceClaim"), + Ref: ref(resourcev1beta1.DeviceClaim{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.DeviceClaim"}, + resourcev1beta1.DeviceClaim{}.OpenAPIModelName()}, } } @@ -52140,7 +52226,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimStatus(ref common.ReferenceC "allocation": { SchemaProps: spec.SchemaProps{ Description: "Allocation is set once the claim has been allocated successfully.", - Ref: ref("k8s.io/api/resource/v1beta1.AllocationResult"), + Ref: ref(resourcev1beta1.AllocationResult{}.OpenAPIModelName()), }, }, "reservedFor": { @@ -52161,7 +52247,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimStatus(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.ResourceClaimConsumerReference"), + Ref: ref(resourcev1beta1.ResourceClaimConsumerReference{}.OpenAPIModelName()), }, }, }, @@ -52186,7 +52272,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimStatus(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.AllocatedDeviceStatus"), + Ref: ref(resourcev1beta1.AllocatedDeviceStatus{}.OpenAPIModelName()), }, }, }, @@ -52196,7 +52282,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimStatus(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.AllocatedDeviceStatus", "k8s.io/api/resource/v1beta1.AllocationResult", "k8s.io/api/resource/v1beta1.ResourceClaimConsumerReference"}, + resourcev1beta1.AllocatedDeviceStatus{}.OpenAPIModelName(), resourcev1beta1.AllocationResult{}.OpenAPIModelName(), resourcev1beta1.ResourceClaimConsumerReference{}.OpenAPIModelName()}, } } @@ -52225,14 +52311,14 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimTemplate(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "Standard object metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.ResourceClaimTemplateSpec"), + Ref: ref(resourcev1beta1.ResourceClaimTemplateSpec{}.OpenAPIModelName()), }, }, }, @@ -52240,7 +52326,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimTemplate(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.ResourceClaimTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resourcev1beta1.ResourceClaimTemplateSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -52269,7 +52355,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimTemplateList(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "Standard list metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -52280,7 +52366,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimTemplateList(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.ResourceClaimTemplate"), + Ref: ref(resourcev1beta1.ResourceClaimTemplate{}.OpenAPIModelName()), }, }, }, @@ -52291,7 +52377,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimTemplateList(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.ResourceClaimTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + resourcev1beta1.ResourceClaimTemplate{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -52306,14 +52392,14 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimTemplateSpec(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim when creating it. No other fields are allowed and will be rejected during validation.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.ResourceClaimSpec"), + Ref: ref(resourcev1beta1.ResourceClaimSpec{}.OpenAPIModelName()), }, }, }, @@ -52321,7 +52407,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimTemplateSpec(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.ResourceClaimSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resourcev1beta1.ResourceClaimSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -52388,14 +52474,14 @@ func schema_k8sio_api_resource_v1beta1_ResourceSlice(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard object metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Contains the information published by the driver.\n\nChanging the spec automatically increments the metadata.generation number.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.ResourceSliceSpec"), + Ref: ref(resourcev1beta1.ResourceSliceSpec{}.OpenAPIModelName()), }, }, }, @@ -52403,7 +52489,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceSlice(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.ResourceSliceSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resourcev1beta1.ResourceSliceSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -52432,7 +52518,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceSliceList(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "Standard list metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -52443,7 +52529,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceSliceList(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.ResourceSlice"), + Ref: ref(resourcev1beta1.ResourceSlice{}.OpenAPIModelName()), }, }, }, @@ -52454,7 +52540,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceSliceList(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta1.ResourceSlice", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + resourcev1beta1.ResourceSlice{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -52467,7 +52553,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceSliceSpec(ref common.ReferenceCal Properties: map[string]spec.Schema{ "driver": { SchemaProps: spec.SchemaProps{ - Description: "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + Description: "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. This field is immutable.", Default: "", Type: []string{"string"}, Format: "", @@ -52477,7 +52563,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceSliceSpec(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "Pool describes the pool that this ResourceSlice belongs to.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.ResourcePool"), + Ref: ref(resourcev1beta1.ResourcePool{}.OpenAPIModelName()), }, }, "nodeName": { @@ -52490,7 +52576,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceSliceSpec(ref common.ReferenceCal "nodeSelector": { SchemaProps: spec.SchemaProps{ Description: "NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.\n\nMust use exactly one term.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Ref: ref(corev1.NodeSelector{}.OpenAPIModelName()), }, }, "allNodes": { @@ -52513,7 +52599,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceSliceSpec(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.Device"), + Ref: ref(resourcev1beta1.Device{}.OpenAPIModelName()), }, }, }, @@ -52539,7 +52625,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceSliceSpec(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta1.CounterSet"), + Ref: ref(resourcev1beta1.CounterSet{}.OpenAPIModelName()), }, }, }, @@ -52550,7 +52636,7 @@ func schema_k8sio_api_resource_v1beta1_ResourceSliceSpec(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1beta1.CounterSet", "k8s.io/api/resource/v1beta1.Device", "k8s.io/api/resource/v1beta1.ResourcePool"}, + corev1.NodeSelector{}.OpenAPIModelName(), resourcev1beta1.CounterSet{}.OpenAPIModelName(), resourcev1beta1.Device{}.OpenAPIModelName(), resourcev1beta1.ResourcePool{}.OpenAPIModelName()}, } } @@ -52563,7 +52649,7 @@ func schema_k8sio_api_resource_v1beta2_AllocatedDeviceStatus(ref common.Referenc Properties: map[string]spec.Schema{ "driver": { SchemaProps: spec.SchemaProps{ - Description: "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + Description: "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", Default: "", Type: []string{"string"}, Format: "", @@ -52608,7 +52694,7 @@ func schema_k8sio_api_resource_v1beta2_AllocatedDeviceStatus(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -52617,13 +52703,13 @@ func schema_k8sio_api_resource_v1beta2_AllocatedDeviceStatus(ref common.Referenc "data": { SchemaProps: spec.SchemaProps{ Description: "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, "networkData": { SchemaProps: spec.SchemaProps{ Description: "NetworkData contains network-related information specific to the device.", - Ref: ref("k8s.io/api/resource/v1beta2.NetworkDeviceData"), + Ref: ref(resourcev1beta2.NetworkDeviceData{}.OpenAPIModelName()), }, }, }, @@ -52631,7 +52717,7 @@ func schema_k8sio_api_resource_v1beta2_AllocatedDeviceStatus(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.NetworkDeviceData", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + resourcev1beta2.NetworkDeviceData{}.OpenAPIModelName(), metav1.Condition{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -52646,26 +52732,26 @@ func schema_k8sio_api_resource_v1beta2_AllocationResult(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Devices is the result of allocating devices.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceAllocationResult"), + Ref: ref(resourcev1beta2.DeviceAllocationResult{}.OpenAPIModelName()), }, }, "nodeSelector": { SchemaProps: spec.SchemaProps{ Description: "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Ref: ref(corev1.NodeSelector{}.OpenAPIModelName()), }, }, "allocationTimestamp": { SchemaProps: spec.SchemaProps{ Description: "AllocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown.\n\nThis is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gate.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1beta2.DeviceAllocationResult", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + corev1.NodeSelector{}.OpenAPIModelName(), resourcev1beta2.DeviceAllocationResult{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -52701,7 +52787,7 @@ func schema_k8sio_api_resource_v1beta2_CapacityRequestPolicy(ref common.Referenc "default": { SchemaProps: spec.SchemaProps{ Description: "Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "validValues": { @@ -52716,7 +52802,7 @@ func schema_k8sio_api_resource_v1beta2_CapacityRequestPolicy(ref common.Referenc Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -52725,14 +52811,14 @@ func schema_k8sio_api_resource_v1beta2_CapacityRequestPolicy(ref common.Referenc "validRange": { SchemaProps: spec.SchemaProps{ Description: "ValidRange defines an acceptable quantity value range in consuming requests.\n\nIf this field is set, Default must be defined and it must fall within the defined ValidRange.\n\nIf the requested amount does not fall within the defined range, the request violates the policy, and this device cannot be allocated.\n\nIf the request doesn't contain this capacity entry, Default value is used.", - Ref: ref("k8s.io/api/resource/v1beta2.CapacityRequestPolicyRange"), + Ref: ref(resourcev1beta2.CapacityRequestPolicyRange{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.CapacityRequestPolicyRange", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resourcev1beta2.CapacityRequestPolicyRange{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -52746,19 +52832,19 @@ func schema_k8sio_api_resource_v1beta2_CapacityRequestPolicyRange(ref common.Ref "min": { SchemaProps: spec.SchemaProps{ Description: "Min specifies the minimum capacity allowed for a consumption request.\n\nMin must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "max": { SchemaProps: spec.SchemaProps{ Description: "Max defines the upper limit for capacity that can be requested.\n\nMax must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "step": { SchemaProps: spec.SchemaProps{ Description: "Step defines the step size between valid capacity amounts within the range.\n\nMax (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -52766,7 +52852,7 @@ func schema_k8sio_api_resource_v1beta2_CapacityRequestPolicyRange(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -52785,7 +52871,7 @@ func schema_k8sio_api_resource_v1beta2_CapacityRequirements(ref common.Reference Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -52795,7 +52881,7 @@ func schema_k8sio_api_resource_v1beta2_CapacityRequirements(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -52809,7 +52895,7 @@ func schema_k8sio_api_resource_v1beta2_Counter(ref common.ReferenceCallback) com "value": { SchemaProps: spec.SchemaProps{ Description: "Value defines how much of a certain device counter is available.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -52817,7 +52903,7 @@ func schema_k8sio_api_resource_v1beta2_Counter(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -52845,7 +52931,7 @@ func schema_k8sio_api_resource_v1beta2_CounterSet(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.Counter"), + Ref: ref(resourcev1beta2.Counter{}.OpenAPIModelName()), }, }, }, @@ -52856,7 +52942,7 @@ func schema_k8sio_api_resource_v1beta2_CounterSet(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.Counter"}, + resourcev1beta2.Counter{}.OpenAPIModelName()}, } } @@ -52884,7 +52970,7 @@ func schema_k8sio_api_resource_v1beta2_Device(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceAttribute"), + Ref: ref(resourcev1beta2.DeviceAttribute{}.OpenAPIModelName()), }, }, }, @@ -52899,7 +52985,7 @@ func schema_k8sio_api_resource_v1beta2_Device(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceCapacity"), + Ref: ref(resourcev1beta2.DeviceCapacity{}.OpenAPIModelName()), }, }, }, @@ -52918,7 +53004,7 @@ func schema_k8sio_api_resource_v1beta2_Device(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceCounterConsumption"), + Ref: ref(resourcev1beta2.DeviceCounterConsumption{}.OpenAPIModelName()), }, }, }, @@ -52934,7 +53020,7 @@ func schema_k8sio_api_resource_v1beta2_Device(ref common.ReferenceCallback) comm "nodeSelector": { SchemaProps: spec.SchemaProps{ Description: "NodeSelector defines the nodes where the device is available.\n\nMust use exactly one term.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Ref: ref(corev1.NodeSelector{}.OpenAPIModelName()), }, }, "allNodes": { @@ -52957,7 +53043,7 @@ func schema_k8sio_api_resource_v1beta2_Device(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceTaint"), + Ref: ref(resourcev1beta2.DeviceTaint{}.OpenAPIModelName()), }, }, }, @@ -53022,7 +53108,7 @@ func schema_k8sio_api_resource_v1beta2_Device(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1beta2.DeviceAttribute", "k8s.io/api/resource/v1beta2.DeviceCapacity", "k8s.io/api/resource/v1beta2.DeviceCounterConsumption", "k8s.io/api/resource/v1beta2.DeviceTaint"}, + corev1.NodeSelector{}.OpenAPIModelName(), resourcev1beta2.DeviceAttribute{}.OpenAPIModelName(), resourcev1beta2.DeviceCapacity{}.OpenAPIModelName(), resourcev1beta2.DeviceCounterConsumption{}.OpenAPIModelName(), resourcev1beta2.DeviceTaint{}.OpenAPIModelName()}, } } @@ -53064,7 +53150,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceAllocationConfiguration(ref common. "opaque": { SchemaProps: spec.SchemaProps{ Description: "Opaque provides driver-specific configuration parameters.", - Ref: ref("k8s.io/api/resource/v1beta2.OpaqueDeviceConfiguration"), + Ref: ref(resourcev1beta2.OpaqueDeviceConfiguration{}.OpenAPIModelName()), }, }, }, @@ -53072,7 +53158,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceAllocationConfiguration(ref common. }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.OpaqueDeviceConfiguration"}, + resourcev1beta2.OpaqueDeviceConfiguration{}.OpenAPIModelName()}, } } @@ -53096,7 +53182,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceAllocationResult(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceRequestAllocationResult"), + Ref: ref(resourcev1beta2.DeviceRequestAllocationResult{}.OpenAPIModelName()), }, }, }, @@ -53115,7 +53201,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceAllocationResult(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceAllocationConfiguration"), + Ref: ref(resourcev1beta2.DeviceAllocationConfiguration{}.OpenAPIModelName()), }, }, }, @@ -53125,7 +53211,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceAllocationResult(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.DeviceAllocationConfiguration", "k8s.io/api/resource/v1beta2.DeviceRequestAllocationResult"}, + resourcev1beta2.DeviceAllocationConfiguration{}.OpenAPIModelName(), resourcev1beta2.DeviceRequestAllocationResult{}.OpenAPIModelName()}, } } @@ -53180,13 +53266,13 @@ func schema_k8sio_api_resource_v1beta2_DeviceCapacity(ref common.ReferenceCallba "value": { SchemaProps: spec.SchemaProps{ Description: "Value defines how much of a certain capacity that device has.\n\nThis field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "requestPolicy": { SchemaProps: spec.SchemaProps{ Description: "RequestPolicy defines how this DeviceCapacity must be consumed when the device is allowed to be shared by multiple allocations.\n\nThe Device must have allowMultipleAllocations set to true in order to set a requestPolicy.\n\nIf unset, capacity requests are unconstrained: requests can consume any amount of capacity, as long as the total consumed across all allocations does not exceed the device's defined capacity. If request is also unset, default is the full capacity value.", - Ref: ref("k8s.io/api/resource/v1beta2.CapacityRequestPolicy"), + Ref: ref(resourcev1beta2.CapacityRequestPolicy{}.OpenAPIModelName()), }, }, }, @@ -53194,7 +53280,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceCapacity(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.CapacityRequestPolicy", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resourcev1beta2.CapacityRequestPolicy{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -53218,7 +53304,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceClaim(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceRequest"), + Ref: ref(resourcev1beta2.DeviceRequest{}.OpenAPIModelName()), }, }, }, @@ -53237,7 +53323,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceClaim(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceConstraint"), + Ref: ref(resourcev1beta2.DeviceConstraint{}.OpenAPIModelName()), }, }, }, @@ -53256,7 +53342,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceClaim(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceClaimConfiguration"), + Ref: ref(resourcev1beta2.DeviceClaimConfiguration{}.OpenAPIModelName()), }, }, }, @@ -53266,7 +53352,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceClaim(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.DeviceClaimConfiguration", "k8s.io/api/resource/v1beta2.DeviceConstraint", "k8s.io/api/resource/v1beta2.DeviceRequest"}, + resourcev1beta2.DeviceClaimConfiguration{}.OpenAPIModelName(), resourcev1beta2.DeviceConstraint{}.OpenAPIModelName(), resourcev1beta2.DeviceRequest{}.OpenAPIModelName()}, } } @@ -53300,14 +53386,14 @@ func schema_k8sio_api_resource_v1beta2_DeviceClaimConfiguration(ref common.Refer "opaque": { SchemaProps: spec.SchemaProps{ Description: "Opaque provides driver-specific configuration parameters.", - Ref: ref("k8s.io/api/resource/v1beta2.OpaqueDeviceConfiguration"), + Ref: ref(resourcev1beta2.OpaqueDeviceConfiguration{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.OpaqueDeviceConfiguration"}, + resourcev1beta2.OpaqueDeviceConfiguration{}.OpenAPIModelName()}, } } @@ -53336,14 +53422,14 @@ func schema_k8sio_api_resource_v1beta2_DeviceClass(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines what can be allocated and how to configure it.\n\nThis is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.\n\nChanging the spec automatically increments the metadata.generation number.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceClassSpec"), + Ref: ref(resourcev1beta2.DeviceClassSpec{}.OpenAPIModelName()), }, }, }, @@ -53351,7 +53437,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceClass(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.DeviceClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resourcev1beta2.DeviceClassSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -53365,14 +53451,14 @@ func schema_k8sio_api_resource_v1beta2_DeviceClassConfiguration(ref common.Refer "opaque": { SchemaProps: spec.SchemaProps{ Description: "Opaque provides driver-specific configuration parameters.", - Ref: ref("k8s.io/api/resource/v1beta2.OpaqueDeviceConfiguration"), + Ref: ref(resourcev1beta2.OpaqueDeviceConfiguration{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.OpaqueDeviceConfiguration"}, + resourcev1beta2.OpaqueDeviceConfiguration{}.OpenAPIModelName()}, } } @@ -53401,7 +53487,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceClassList(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard list metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -53412,7 +53498,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceClassList(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceClass"), + Ref: ref(resourcev1beta2.DeviceClass{}.OpenAPIModelName()), }, }, }, @@ -53423,7 +53509,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceClassList(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.DeviceClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + resourcev1beta2.DeviceClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -53447,7 +53533,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceClassSpec(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceSelector"), + Ref: ref(resourcev1beta2.DeviceSelector{}.OpenAPIModelName()), }, }, }, @@ -53466,7 +53552,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceClassSpec(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceClassConfiguration"), + Ref: ref(resourcev1beta2.DeviceClassConfiguration{}.OpenAPIModelName()), }, }, }, @@ -53483,7 +53569,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceClassSpec(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.DeviceClassConfiguration", "k8s.io/api/resource/v1beta2.DeviceSelector"}, + resourcev1beta2.DeviceClassConfiguration{}.OpenAPIModelName(), resourcev1beta2.DeviceSelector{}.OpenAPIModelName()}, } } @@ -53497,14 +53583,14 @@ func schema_k8sio_api_resource_v1beta2_DeviceConfiguration(ref common.ReferenceC "opaque": { SchemaProps: spec.SchemaProps{ Description: "Opaque provides driver-specific configuration parameters.", - Ref: ref("k8s.io/api/resource/v1beta2.OpaqueDeviceConfiguration"), + Ref: ref(resourcev1beta2.OpaqueDeviceConfiguration{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.OpaqueDeviceConfiguration"}, + resourcev1beta2.OpaqueDeviceConfiguration{}.OpenAPIModelName()}, } } @@ -53579,7 +53665,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceCounterConsumption(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.Counter"), + Ref: ref(resourcev1beta2.Counter{}.OpenAPIModelName()), }, }, }, @@ -53590,7 +53676,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceCounterConsumption(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.Counter"}, + resourcev1beta2.Counter{}.OpenAPIModelName()}, } } @@ -53612,7 +53698,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceRequest(ref common.ReferenceCallbac "exactly": { SchemaProps: spec.SchemaProps{ Description: "Exactly specifies the details for a single request that must be met exactly for the request to be satisfied.\n\nOne of Exactly or FirstAvailable must be set.", - Ref: ref("k8s.io/api/resource/v1beta2.ExactDeviceRequest"), + Ref: ref(resourcev1beta2.ExactDeviceRequest{}.OpenAPIModelName()), }, }, "firstAvailable": { @@ -53628,7 +53714,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceRequest(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceSubRequest"), + Ref: ref(resourcev1beta2.DeviceSubRequest{}.OpenAPIModelName()), }, }, }, @@ -53639,7 +53725,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceRequest(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.DeviceSubRequest", "k8s.io/api/resource/v1beta2.ExactDeviceRequest"}, + resourcev1beta2.DeviceSubRequest{}.OpenAPIModelName(), resourcev1beta2.ExactDeviceRequest{}.OpenAPIModelName()}, } } @@ -53660,7 +53746,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceRequestAllocationResult(ref common. }, "driver": { SchemaProps: spec.SchemaProps{ - Description: "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + Description: "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", Default: "", Type: []string{"string"}, Format: "", @@ -53702,7 +53788,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceRequestAllocationResult(ref common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceToleration"), + Ref: ref(resourcev1beta2.DeviceToleration{}.OpenAPIModelName()), }, }, }, @@ -53763,7 +53849,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceRequestAllocationResult(ref common. Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -53774,7 +53860,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceRequestAllocationResult(ref common. }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.DeviceToleration", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resourcev1beta2.DeviceToleration{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -53788,14 +53874,14 @@ func schema_k8sio_api_resource_v1beta2_DeviceSelector(ref common.ReferenceCallba "cel": { SchemaProps: spec.SchemaProps{ Description: "CEL contains a CEL expression for selecting a device.", - Ref: ref("k8s.io/api/resource/v1beta2.CELDeviceSelector"), + Ref: ref(resourcev1beta2.CELDeviceSelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.CELDeviceSelector"}, + resourcev1beta2.CELDeviceSelector{}.OpenAPIModelName()}, } } @@ -53835,7 +53921,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceSubRequest(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceSelector"), + Ref: ref(resourcev1beta2.DeviceSelector{}.OpenAPIModelName()), }, }, }, @@ -53843,9 +53929,10 @@ func schema_k8sio_api_resource_v1beta2_DeviceSubRequest(ref common.ReferenceCall }, "allocationMode": { SchemaProps: spec.SchemaProps{ - Description: "AllocationMode and its related fields define how devices are allocated to satisfy this subrequest. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This subrequest is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other subrequests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.", + Description: "AllocationMode and its related fields define how devices are allocated to satisfy this subrequest. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This subrequest is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other subrequests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.\n\n\nPossible enum values:\n - `\"All\"`\n - `\"ExactCount\"`", Type: []string{"string"}, Format: "", + Enum: []interface{}{"All", "ExactCount"}, }, }, "count": { @@ -53868,7 +53955,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceSubRequest(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceToleration"), + Ref: ref(resourcev1beta2.DeviceToleration{}.OpenAPIModelName()), }, }, }, @@ -53877,7 +53964,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceSubRequest(ref common.ReferenceCall "capacity": { SchemaProps: spec.SchemaProps{ Description: "Capacity define resource requirements against each capacity.\n\nIf this field is unset and the device supports multiple allocations, the default value will be applied to each capacity according to requestPolicy. For the capacity that has no requestPolicy, default is the full capacity value.\n\nApplies to each device allocation. If Count > 1, the request fails if there aren't enough devices that meet the requirements. If AllocationMode is set to All, the request fails if there are devices that otherwise match the request, and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.", - Ref: ref("k8s.io/api/resource/v1beta2.CapacityRequirements"), + Ref: ref(resourcev1beta2.CapacityRequirements{}.OpenAPIModelName()), }, }, }, @@ -53885,7 +53972,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceSubRequest(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.CapacityRequirements", "k8s.io/api/resource/v1beta2.DeviceSelector", "k8s.io/api/resource/v1beta2.DeviceToleration"}, + resourcev1beta2.CapacityRequirements{}.OpenAPIModelName(), resourcev1beta2.DeviceSelector{}.OpenAPIModelName(), resourcev1beta2.DeviceToleration{}.OpenAPIModelName()}, } } @@ -53923,7 +54010,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceTaint(ref common.ReferenceCallback) "timeAdded": { SchemaProps: spec.SchemaProps{ Description: "TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, @@ -53931,7 +54018,7 @@ func schema_k8sio_api_resource_v1beta2_DeviceTaint(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -54014,7 +54101,7 @@ func schema_k8sio_api_resource_v1beta2_ExactDeviceRequest(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceSelector"), + Ref: ref(resourcev1beta2.DeviceSelector{}.OpenAPIModelName()), }, }, }, @@ -54022,9 +54109,10 @@ func schema_k8sio_api_resource_v1beta2_ExactDeviceRequest(ref common.ReferenceCa }, "allocationMode": { SchemaProps: spec.SchemaProps{ - Description: "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n At least one device must exist on the node for the allocation to succeed.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.", + Description: "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n At least one device must exist on the node for the allocation to succeed.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.\n\n\nPossible enum values:\n - `\"All\"`\n - `\"ExactCount\"`", Type: []string{"string"}, Format: "", + Enum: []interface{}{"All", "ExactCount"}, }, }, "count": { @@ -54054,7 +54142,7 @@ func schema_k8sio_api_resource_v1beta2_ExactDeviceRequest(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceToleration"), + Ref: ref(resourcev1beta2.DeviceToleration{}.OpenAPIModelName()), }, }, }, @@ -54063,7 +54151,7 @@ func schema_k8sio_api_resource_v1beta2_ExactDeviceRequest(ref common.ReferenceCa "capacity": { SchemaProps: spec.SchemaProps{ Description: "Capacity define resource requirements against each capacity.\n\nIf this field is unset and the device supports multiple allocations, the default value will be applied to each capacity according to requestPolicy. For the capacity that has no requestPolicy, default is the full capacity value.\n\nApplies to each device allocation. If Count > 1, the request fails if there aren't enough devices that meet the requirements. If AllocationMode is set to All, the request fails if there are devices that otherwise match the request, and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.", - Ref: ref("k8s.io/api/resource/v1beta2.CapacityRequirements"), + Ref: ref(resourcev1beta2.CapacityRequirements{}.OpenAPIModelName()), }, }, }, @@ -54071,7 +54159,7 @@ func schema_k8sio_api_resource_v1beta2_ExactDeviceRequest(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.CapacityRequirements", "k8s.io/api/resource/v1beta2.DeviceSelector", "k8s.io/api/resource/v1beta2.DeviceToleration"}, + resourcev1beta2.CapacityRequirements{}.OpenAPIModelName(), resourcev1beta2.DeviceSelector{}.OpenAPIModelName(), resourcev1beta2.DeviceToleration{}.OpenAPIModelName()}, } } @@ -54131,7 +54219,7 @@ func schema_k8sio_api_resource_v1beta2_OpaqueDeviceConfiguration(ref common.Refe Properties: map[string]spec.Schema{ "driver": { SchemaProps: spec.SchemaProps{ - Description: "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + Description: "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", Default: "", Type: []string{"string"}, Format: "", @@ -54140,7 +54228,7 @@ func schema_k8sio_api_resource_v1beta2_OpaqueDeviceConfiguration(ref common.Refe "parameters": { SchemaProps: spec.SchemaProps{ Description: "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -54148,7 +54236,7 @@ func schema_k8sio_api_resource_v1beta2_OpaqueDeviceConfiguration(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -54177,21 +54265,21 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaim(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard object metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec describes what is being requested and how to configure it. The spec is immutable.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.ResourceClaimSpec"), + Ref: ref(resourcev1beta2.ResourceClaimSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status describes whether the claim is ready to use and what has been allocated.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.ResourceClaimStatus"), + Ref: ref(resourcev1beta2.ResourceClaimStatus{}.OpenAPIModelName()), }, }, }, @@ -54199,7 +54287,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaim(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.ResourceClaimSpec", "k8s.io/api/resource/v1beta2.ResourceClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resourcev1beta2.ResourceClaimSpec{}.OpenAPIModelName(), resourcev1beta2.ResourceClaimStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -54273,7 +54361,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaimList(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "Standard list metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -54284,7 +54372,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaimList(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.ResourceClaim"), + Ref: ref(resourcev1beta2.ResourceClaim{}.OpenAPIModelName()), }, }, }, @@ -54295,7 +54383,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaimList(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.ResourceClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + resourcev1beta2.ResourceClaim{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -54310,14 +54398,14 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaimSpec(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "Devices defines how to request devices.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.DeviceClaim"), + Ref: ref(resourcev1beta2.DeviceClaim{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.DeviceClaim"}, + resourcev1beta2.DeviceClaim{}.OpenAPIModelName()}, } } @@ -54331,7 +54419,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaimStatus(ref common.ReferenceC "allocation": { SchemaProps: spec.SchemaProps{ Description: "Allocation is set once the claim has been allocated successfully.", - Ref: ref("k8s.io/api/resource/v1beta2.AllocationResult"), + Ref: ref(resourcev1beta2.AllocationResult{}.OpenAPIModelName()), }, }, "reservedFor": { @@ -54352,7 +54440,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaimStatus(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.ResourceClaimConsumerReference"), + Ref: ref(resourcev1beta2.ResourceClaimConsumerReference{}.OpenAPIModelName()), }, }, }, @@ -54377,7 +54465,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaimStatus(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.AllocatedDeviceStatus"), + Ref: ref(resourcev1beta2.AllocatedDeviceStatus{}.OpenAPIModelName()), }, }, }, @@ -54387,7 +54475,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaimStatus(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.AllocatedDeviceStatus", "k8s.io/api/resource/v1beta2.AllocationResult", "k8s.io/api/resource/v1beta2.ResourceClaimConsumerReference"}, + resourcev1beta2.AllocatedDeviceStatus{}.OpenAPIModelName(), resourcev1beta2.AllocationResult{}.OpenAPIModelName(), resourcev1beta2.ResourceClaimConsumerReference{}.OpenAPIModelName()}, } } @@ -54416,14 +54504,14 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaimTemplate(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "Standard object metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.ResourceClaimTemplateSpec"), + Ref: ref(resourcev1beta2.ResourceClaimTemplateSpec{}.OpenAPIModelName()), }, }, }, @@ -54431,7 +54519,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaimTemplate(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.ResourceClaimTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resourcev1beta2.ResourceClaimTemplateSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -54460,7 +54548,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaimTemplateList(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "Standard list metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -54471,7 +54559,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaimTemplateList(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.ResourceClaimTemplate"), + Ref: ref(resourcev1beta2.ResourceClaimTemplate{}.OpenAPIModelName()), }, }, }, @@ -54482,7 +54570,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaimTemplateList(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.ResourceClaimTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + resourcev1beta2.ResourceClaimTemplate{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -54497,14 +54585,14 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaimTemplateSpec(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim when creating it. No other fields are allowed and will be rejected during validation.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.ResourceClaimSpec"), + Ref: ref(resourcev1beta2.ResourceClaimSpec{}.OpenAPIModelName()), }, }, }, @@ -54512,7 +54600,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceClaimTemplateSpec(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.ResourceClaimSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resourcev1beta2.ResourceClaimSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -54579,14 +54667,14 @@ func schema_k8sio_api_resource_v1beta2_ResourceSlice(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard object metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Contains the information published by the driver.\n\nChanging the spec automatically increments the metadata.generation number.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.ResourceSliceSpec"), + Ref: ref(resourcev1beta2.ResourceSliceSpec{}.OpenAPIModelName()), }, }, }, @@ -54594,7 +54682,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceSlice(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.ResourceSliceSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resourcev1beta2.ResourceSliceSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -54623,7 +54711,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceSliceList(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "Standard list metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -54634,7 +54722,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceSliceList(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.ResourceSlice"), + Ref: ref(resourcev1beta2.ResourceSlice{}.OpenAPIModelName()), }, }, }, @@ -54645,7 +54733,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceSliceList(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/resource/v1beta2.ResourceSlice", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + resourcev1beta2.ResourceSlice{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -54658,7 +54746,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceSliceSpec(ref common.ReferenceCal Properties: map[string]spec.Schema{ "driver": { SchemaProps: spec.SchemaProps{ - Description: "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + Description: "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. This field is immutable.", Default: "", Type: []string{"string"}, Format: "", @@ -54668,7 +54756,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceSliceSpec(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "Pool describes the pool that this ResourceSlice belongs to.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.ResourcePool"), + Ref: ref(resourcev1beta2.ResourcePool{}.OpenAPIModelName()), }, }, "nodeName": { @@ -54681,7 +54769,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceSliceSpec(ref common.ReferenceCal "nodeSelector": { SchemaProps: spec.SchemaProps{ Description: "NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.\n\nMust use exactly one term.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Ref: ref(corev1.NodeSelector{}.OpenAPIModelName()), }, }, "allNodes": { @@ -54704,7 +54792,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceSliceSpec(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.Device"), + Ref: ref(resourcev1beta2.Device{}.OpenAPIModelName()), }, }, }, @@ -54730,7 +54818,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceSliceSpec(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1beta2.CounterSet"), + Ref: ref(resourcev1beta2.CounterSet{}.OpenAPIModelName()), }, }, }, @@ -54741,7 +54829,7 @@ func schema_k8sio_api_resource_v1beta2_ResourceSliceSpec(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1beta2.CounterSet", "k8s.io/api/resource/v1beta2.Device", "k8s.io/api/resource/v1beta2.ResourcePool"}, + corev1.NodeSelector{}.OpenAPIModelName(), resourcev1beta2.CounterSet{}.OpenAPIModelName(), resourcev1beta2.Device{}.OpenAPIModelName(), resourcev1beta2.ResourcePool{}.OpenAPIModelName()}, } } @@ -54770,7 +54858,7 @@ func schema_k8sio_api_scheduling_v1_PriorityClass(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "value": { @@ -54808,7 +54896,7 @@ func schema_k8sio_api_scheduling_v1_PriorityClass(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -54837,7 +54925,7 @@ func schema_k8sio_api_scheduling_v1_PriorityClassList(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -54848,7 +54936,7 @@ func schema_k8sio_api_scheduling_v1_PriorityClassList(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/scheduling/v1.PriorityClass"), + Ref: ref(schedulingv1.PriorityClass{}.OpenAPIModelName()), }, }, }, @@ -54859,7 +54947,7 @@ func schema_k8sio_api_scheduling_v1_PriorityClassList(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/scheduling/v1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + schedulingv1.PriorityClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -54888,7 +54976,7 @@ func schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "value": { @@ -54926,7 +55014,7 @@ func schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -54955,7 +55043,7 @@ func schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -54966,7 +55054,7 @@ func schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/scheduling/v1alpha1.PriorityClass"), + Ref: ref(schedulingv1alpha1.PriorityClass{}.OpenAPIModelName()), }, }, }, @@ -54977,7 +55065,7 @@ func schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/scheduling/v1alpha1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + schedulingv1alpha1.PriorityClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -55006,7 +55094,7 @@ func schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "value": { @@ -55044,7 +55132,7 @@ func schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -55073,7 +55161,7 @@ func schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -55084,7 +55172,7 @@ func schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/scheduling/v1beta1.PriorityClass"), + Ref: ref(schedulingv1beta1.PriorityClass{}.OpenAPIModelName()), }, }, }, @@ -55095,7 +55183,7 @@ func schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/scheduling/v1beta1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + schedulingv1beta1.PriorityClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -55124,14 +55212,14 @@ func schema_k8sio_api_storage_v1_CSIDriver(ref common.ReferenceCallback) common. SchemaProps: spec.SchemaProps{ Description: "Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec represents the specification of the CSI Driver.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.CSIDriverSpec"), + Ref: ref(storagev1.CSIDriverSpec{}.OpenAPIModelName()), }, }, }, @@ -55139,7 +55227,7 @@ func schema_k8sio_api_storage_v1_CSIDriver(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.CSIDriverSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + storagev1.CSIDriverSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -55168,7 +55256,7 @@ func schema_k8sio_api_storage_v1_CSIDriverList(ref common.ReferenceCallback) com SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -55179,7 +55267,7 @@ func schema_k8sio_api_storage_v1_CSIDriverList(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.CSIDriver"), + Ref: ref(storagev1.CSIDriver{}.OpenAPIModelName()), }, }, }, @@ -55190,7 +55278,7 @@ func schema_k8sio_api_storage_v1_CSIDriverList(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.CSIDriver", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagev1.CSIDriver{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -55262,7 +55350,7 @@ func schema_k8sio_api_storage_v1_CSIDriverSpec(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.TokenRequest"), + Ref: ref(storagev1.TokenRequest{}.OpenAPIModelName()), }, }, }, @@ -55293,7 +55381,7 @@ func schema_k8sio_api_storage_v1_CSIDriverSpec(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.TokenRequest"}, + storagev1.TokenRequest{}.OpenAPIModelName()}, } } @@ -55322,14 +55410,14 @@ func schema_k8sio_api_storage_v1_CSINode(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. metadata.name must be the Kubernetes node name.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the specification of CSINode", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.CSINodeSpec"), + Ref: ref(storagev1.CSINodeSpec{}.OpenAPIModelName()), }, }, }, @@ -55337,7 +55425,7 @@ func schema_k8sio_api_storage_v1_CSINode(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.CSINodeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + storagev1.CSINodeSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -55387,7 +55475,7 @@ func schema_k8sio_api_storage_v1_CSINodeDriver(ref common.ReferenceCallback) com "allocatable": { SchemaProps: spec.SchemaProps{ Description: "allocatable represents the volume resources of a node that are available for scheduling. This field is beta.", - Ref: ref("k8s.io/api/storage/v1.VolumeNodeResources"), + Ref: ref(storagev1.VolumeNodeResources{}.OpenAPIModelName()), }, }, }, @@ -55395,7 +55483,7 @@ func schema_k8sio_api_storage_v1_CSINodeDriver(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeNodeResources"}, + storagev1.VolumeNodeResources{}.OpenAPIModelName()}, } } @@ -55424,7 +55512,7 @@ func schema_k8sio_api_storage_v1_CSINodeList(ref common.ReferenceCallback) commo SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -55435,7 +55523,7 @@ func schema_k8sio_api_storage_v1_CSINodeList(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.CSINode"), + Ref: ref(storagev1.CSINode{}.OpenAPIModelName()), }, }, }, @@ -55446,7 +55534,7 @@ func schema_k8sio_api_storage_v1_CSINodeList(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.CSINode", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagev1.CSINode{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -55475,7 +55563,7 @@ func schema_k8sio_api_storage_v1_CSINodeSpec(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.CSINodeDriver"), + Ref: ref(storagev1.CSINodeDriver{}.OpenAPIModelName()), }, }, }, @@ -55486,7 +55574,7 @@ func schema_k8sio_api_storage_v1_CSINodeSpec(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.CSINodeDriver"}, + storagev1.CSINodeDriver{}.OpenAPIModelName()}, } } @@ -55515,13 +55603,13 @@ func schema_k8sio_api_storage_v1_CSIStorageCapacity(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. The name has no particular meaning. It must be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "nodeTopology": { SchemaProps: spec.SchemaProps{ Description: "nodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "storageClassName": { @@ -55535,13 +55623,13 @@ func schema_k8sio_api_storage_v1_CSIStorageCapacity(ref common.ReferenceCallback "capacity": { SchemaProps: spec.SchemaProps{ Description: "capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "maximumVolumeSize": { SchemaProps: spec.SchemaProps{ Description: "maximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -55549,7 +55637,7 @@ func schema_k8sio_api_storage_v1_CSIStorageCapacity(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -55578,7 +55666,7 @@ func schema_k8sio_api_storage_v1_CSIStorageCapacityList(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -55589,7 +55677,7 @@ func schema_k8sio_api_storage_v1_CSIStorageCapacityList(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.CSIStorageCapacity"), + Ref: ref(storagev1.CSIStorageCapacity{}.OpenAPIModelName()), }, }, }, @@ -55600,7 +55688,7 @@ func schema_k8sio_api_storage_v1_CSIStorageCapacityList(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.CSIStorageCapacity", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagev1.CSIStorageCapacity{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -55629,7 +55717,7 @@ func schema_k8sio_api_storage_v1_StorageClass(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "provisioner": { @@ -55712,7 +55800,7 @@ func schema_k8sio_api_storage_v1_StorageClass(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.TopologySelectorTerm"), + Ref: ref(corev1.TopologySelectorTerm{}.OpenAPIModelName()), }, }, }, @@ -55723,7 +55811,7 @@ func schema_k8sio_api_storage_v1_StorageClass(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.TopologySelectorTerm", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.TopologySelectorTerm{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -55752,7 +55840,7 @@ func schema_k8sio_api_storage_v1_StorageClassList(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -55763,7 +55851,7 @@ func schema_k8sio_api_storage_v1_StorageClassList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.StorageClass"), + Ref: ref(storagev1.StorageClass{}.OpenAPIModelName()), }, }, }, @@ -55774,7 +55862,7 @@ func schema_k8sio_api_storage_v1_StorageClassList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.StorageClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagev1.StorageClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -55832,21 +55920,21 @@ func schema_k8sio_api_storage_v1_VolumeAttachment(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec represents specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentSpec"), + Ref: ref(storagev1.VolumeAttachmentSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status represents status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentStatus"), + Ref: ref(storagev1.VolumeAttachmentStatus{}.OpenAPIModelName()), }, }, }, @@ -55854,7 +55942,7 @@ func schema_k8sio_api_storage_v1_VolumeAttachment(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeAttachmentSpec", "k8s.io/api/storage/v1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + storagev1.VolumeAttachmentSpec{}.OpenAPIModelName(), storagev1.VolumeAttachmentStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -55883,7 +55971,7 @@ func schema_k8sio_api_storage_v1_VolumeAttachmentList(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -55894,7 +55982,7 @@ func schema_k8sio_api_storage_v1_VolumeAttachmentList(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.VolumeAttachment"), + Ref: ref(storagev1.VolumeAttachment{}.OpenAPIModelName()), }, }, }, @@ -55905,7 +55993,7 @@ func schema_k8sio_api_storage_v1_VolumeAttachmentList(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagev1.VolumeAttachment{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -55926,14 +56014,14 @@ func schema_k8sio_api_storage_v1_VolumeAttachmentSource(ref common.ReferenceCall "inlineVolumeSpec": { SchemaProps: spec.SchemaProps{ Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature.", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), + Ref: ref(corev1.PersistentVolumeSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeSpec"}, + corev1.PersistentVolumeSpec{}.OpenAPIModelName()}, } } @@ -55956,7 +56044,7 @@ func schema_k8sio_api_storage_v1_VolumeAttachmentSpec(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "source represents the volume that should be attached.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentSource"), + Ref: ref(storagev1.VolumeAttachmentSource{}.OpenAPIModelName()), }, }, "nodeName": { @@ -55972,7 +56060,7 @@ func schema_k8sio_api_storage_v1_VolumeAttachmentSpec(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeAttachmentSource"}, + storagev1.VolumeAttachmentSource{}.OpenAPIModelName()}, } } @@ -56010,13 +56098,13 @@ func schema_k8sio_api_storage_v1_VolumeAttachmentStatus(ref common.ReferenceCall "attachError": { SchemaProps: spec.SchemaProps{ Description: "attachError represents the last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1.VolumeError"), + Ref: ref(storagev1.VolumeError{}.OpenAPIModelName()), }, }, "detachError": { SchemaProps: spec.SchemaProps{ Description: "detachError represents the last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1.VolumeError"), + Ref: ref(storagev1.VolumeError{}.OpenAPIModelName()), }, }, }, @@ -56024,7 +56112,7 @@ func schema_k8sio_api_storage_v1_VolumeAttachmentStatus(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeError"}, + storagev1.VolumeError{}.OpenAPIModelName()}, } } @@ -56053,7 +56141,7 @@ func schema_k8sio_api_storage_v1_VolumeAttributesClass(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "driverName": { @@ -56085,7 +56173,7 @@ func schema_k8sio_api_storage_v1_VolumeAttributesClass(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -56114,7 +56202,7 @@ func schema_k8sio_api_storage_v1_VolumeAttributesClassList(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -56125,7 +56213,7 @@ func schema_k8sio_api_storage_v1_VolumeAttributesClassList(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.VolumeAttributesClass"), + Ref: ref(storagev1.VolumeAttributesClass{}.OpenAPIModelName()), }, }, }, @@ -56136,7 +56224,7 @@ func schema_k8sio_api_storage_v1_VolumeAttributesClassList(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeAttributesClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagev1.VolumeAttributesClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -56150,7 +56238,7 @@ func schema_k8sio_api_storage_v1_VolumeError(ref common.ReferenceCallback) commo "time": { SchemaProps: spec.SchemaProps{ Description: "time represents the time the error was encountered.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "message": { @@ -56171,7 +56259,7 @@ func schema_k8sio_api_storage_v1_VolumeError(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -56220,13 +56308,13 @@ func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacity(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "nodeTopology": { SchemaProps: spec.SchemaProps{ Description: "nodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "storageClassName": { @@ -56240,13 +56328,13 @@ func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacity(ref common.ReferenceCa "capacity": { SchemaProps: spec.SchemaProps{ Description: "capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "maximumVolumeSize": { SchemaProps: spec.SchemaProps{ Description: "maximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -56254,7 +56342,7 @@ func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacity(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -56283,7 +56371,7 @@ func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacityList(ref common.Referen SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -56294,7 +56382,7 @@ func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacityList(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1alpha1.CSIStorageCapacity"), + Ref: ref(storagev1alpha1.CSIStorageCapacity{}.OpenAPIModelName()), }, }, }, @@ -56305,7 +56393,7 @@ func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacityList(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.CSIStorageCapacity", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagev1alpha1.CSIStorageCapacity{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -56334,21 +56422,21 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec represents specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec"), + Ref: ref(storagev1alpha1.VolumeAttachmentSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status represents status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus"), + Ref: ref(storagev1alpha1.VolumeAttachmentStatus{}.OpenAPIModelName()), }, }, }, @@ -56356,7 +56444,7 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec", "k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + storagev1alpha1.VolumeAttachmentSpec{}.OpenAPIModelName(), storagev1alpha1.VolumeAttachmentStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -56385,7 +56473,7 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -56396,7 +56484,7 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachment"), + Ref: ref(storagev1alpha1.VolumeAttachment{}.OpenAPIModelName()), }, }, }, @@ -56407,7 +56495,7 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagev1alpha1.VolumeAttachment{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -56428,14 +56516,14 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSource(ref common.Referen "inlineVolumeSpec": { SchemaProps: spec.SchemaProps{ Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature.", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), + Ref: ref(corev1.PersistentVolumeSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeSpec"}, + corev1.PersistentVolumeSpec{}.OpenAPIModelName()}, } } @@ -56458,7 +56546,7 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSpec(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "source represents the volume that should be attached.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentSource"), + Ref: ref(storagev1alpha1.VolumeAttachmentSource{}.OpenAPIModelName()), }, }, "nodeName": { @@ -56474,7 +56562,7 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSpec(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeAttachmentSource"}, + storagev1alpha1.VolumeAttachmentSource{}.OpenAPIModelName()}, } } @@ -56512,13 +56600,13 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentStatus(ref common.Referen "attachError": { SchemaProps: spec.SchemaProps{ Description: "attachError represents the last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeError"), + Ref: ref(storagev1alpha1.VolumeError{}.OpenAPIModelName()), }, }, "detachError": { SchemaProps: spec.SchemaProps{ Description: "detachError represents the last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeError"), + Ref: ref(storagev1alpha1.VolumeError{}.OpenAPIModelName()), }, }, }, @@ -56526,7 +56614,7 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentStatus(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeError"}, + storagev1alpha1.VolumeError{}.OpenAPIModelName()}, } } @@ -56555,7 +56643,7 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttributesClass(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "driverName": { @@ -56587,7 +56675,7 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttributesClass(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -56616,7 +56704,7 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttributesClassList(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -56627,7 +56715,7 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttributesClassList(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttributesClass"), + Ref: ref(storagev1alpha1.VolumeAttributesClass{}.OpenAPIModelName()), }, }, }, @@ -56638,7 +56726,7 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttributesClassList(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeAttributesClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagev1alpha1.VolumeAttributesClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -56652,7 +56740,7 @@ func schema_k8sio_api_storage_v1alpha1_VolumeError(ref common.ReferenceCallback) "time": { SchemaProps: spec.SchemaProps{ Description: "time represents the time the error was encountered.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "message": { @@ -56673,7 +56761,7 @@ func schema_k8sio_api_storage_v1alpha1_VolumeError(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -56702,14 +56790,14 @@ func schema_k8sio_api_storage_v1beta1_CSIDriver(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec represents the specification of the CSI Driver.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.CSIDriverSpec"), + Ref: ref(storagev1beta1.CSIDriverSpec{}.OpenAPIModelName()), }, }, }, @@ -56717,7 +56805,7 @@ func schema_k8sio_api_storage_v1beta1_CSIDriver(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSIDriverSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + storagev1beta1.CSIDriverSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -56746,7 +56834,7 @@ func schema_k8sio_api_storage_v1beta1_CSIDriverList(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -56757,7 +56845,7 @@ func schema_k8sio_api_storage_v1beta1_CSIDriverList(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.CSIDriver"), + Ref: ref(storagev1beta1.CSIDriver{}.OpenAPIModelName()), }, }, }, @@ -56768,7 +56856,7 @@ func schema_k8sio_api_storage_v1beta1_CSIDriverList(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSIDriver", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagev1beta1.CSIDriver{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -56840,7 +56928,7 @@ func schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.TokenRequest"), + Ref: ref(storagev1beta1.TokenRequest{}.OpenAPIModelName()), }, }, }, @@ -56871,7 +56959,7 @@ func schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.TokenRequest"}, + storagev1beta1.TokenRequest{}.OpenAPIModelName()}, } } @@ -56900,14 +56988,14 @@ func schema_k8sio_api_storage_v1beta1_CSINode(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "metadata.name must be the Kubernetes node name.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the specification of CSINode", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.CSINodeSpec"), + Ref: ref(storagev1beta1.CSINodeSpec{}.OpenAPIModelName()), }, }, }, @@ -56915,7 +57003,7 @@ func schema_k8sio_api_storage_v1beta1_CSINode(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSINodeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + storagev1beta1.CSINodeSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -56965,7 +57053,7 @@ func schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref common.ReferenceCallback "allocatable": { SchemaProps: spec.SchemaProps{ Description: "allocatable represents the volume resources of a node that are available for scheduling.", - Ref: ref("k8s.io/api/storage/v1beta1.VolumeNodeResources"), + Ref: ref(storagev1beta1.VolumeNodeResources{}.OpenAPIModelName()), }, }, }, @@ -56973,7 +57061,7 @@ func schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeNodeResources"}, + storagev1beta1.VolumeNodeResources{}.OpenAPIModelName()}, } } @@ -57002,7 +57090,7 @@ func schema_k8sio_api_storage_v1beta1_CSINodeList(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -57013,7 +57101,7 @@ func schema_k8sio_api_storage_v1beta1_CSINodeList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.CSINode"), + Ref: ref(storagev1beta1.CSINode{}.OpenAPIModelName()), }, }, }, @@ -57024,7 +57112,7 @@ func schema_k8sio_api_storage_v1beta1_CSINodeList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSINode", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagev1beta1.CSINode{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -57053,7 +57141,7 @@ func schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.CSINodeDriver"), + Ref: ref(storagev1beta1.CSINodeDriver{}.OpenAPIModelName()), }, }, }, @@ -57064,7 +57152,7 @@ func schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSINodeDriver"}, + storagev1beta1.CSINodeDriver{}.OpenAPIModelName()}, } } @@ -57093,13 +57181,13 @@ func schema_k8sio_api_storage_v1beta1_CSIStorageCapacity(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "nodeTopology": { SchemaProps: spec.SchemaProps{ Description: "nodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "storageClassName": { @@ -57113,13 +57201,13 @@ func schema_k8sio_api_storage_v1beta1_CSIStorageCapacity(ref common.ReferenceCal "capacity": { SchemaProps: spec.SchemaProps{ Description: "capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "maximumVolumeSize": { SchemaProps: spec.SchemaProps{ Description: "maximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -57127,7 +57215,7 @@ func schema_k8sio_api_storage_v1beta1_CSIStorageCapacity(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -57156,7 +57244,7 @@ func schema_k8sio_api_storage_v1beta1_CSIStorageCapacityList(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -57167,7 +57255,7 @@ func schema_k8sio_api_storage_v1beta1_CSIStorageCapacityList(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.CSIStorageCapacity"), + Ref: ref(storagev1beta1.CSIStorageCapacity{}.OpenAPIModelName()), }, }, }, @@ -57178,7 +57266,7 @@ func schema_k8sio_api_storage_v1beta1_CSIStorageCapacityList(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSIStorageCapacity", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagev1beta1.CSIStorageCapacity{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -57207,7 +57295,7 @@ func schema_k8sio_api_storage_v1beta1_StorageClass(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "provisioner": { @@ -57289,7 +57377,7 @@ func schema_k8sio_api_storage_v1beta1_StorageClass(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.TopologySelectorTerm"), + Ref: ref(corev1.TopologySelectorTerm{}.OpenAPIModelName()), }, }, }, @@ -57300,7 +57388,7 @@ func schema_k8sio_api_storage_v1beta1_StorageClass(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.TopologySelectorTerm", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + corev1.TopologySelectorTerm{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -57329,7 +57417,7 @@ func schema_k8sio_api_storage_v1beta1_StorageClassList(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -57340,7 +57428,7 @@ func schema_k8sio_api_storage_v1beta1_StorageClassList(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.StorageClass"), + Ref: ref(storagev1beta1.StorageClass{}.OpenAPIModelName()), }, }, }, @@ -57351,7 +57439,7 @@ func schema_k8sio_api_storage_v1beta1_StorageClassList(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.StorageClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagev1beta1.StorageClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -57409,21 +57497,21 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec represents specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentSpec"), + Ref: ref(storagev1beta1.VolumeAttachmentSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status represents status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentStatus"), + Ref: ref(storagev1beta1.VolumeAttachmentStatus{}.OpenAPIModelName()), }, }, }, @@ -57431,7 +57519,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeAttachmentSpec", "k8s.io/api/storage/v1beta1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + storagev1beta1.VolumeAttachmentSpec{}.OpenAPIModelName(), storagev1beta1.VolumeAttachmentStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -57460,7 +57548,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -57471,7 +57559,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachment"), + Ref: ref(storagev1beta1.VolumeAttachment{}.OpenAPIModelName()), }, }, }, @@ -57482,7 +57570,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagev1beta1.VolumeAttachment{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -57503,14 +57591,14 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSource(ref common.Referenc "inlineVolumeSpec": { SchemaProps: spec.SchemaProps{ Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature.", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), + Ref: ref(corev1.PersistentVolumeSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeSpec"}, + corev1.PersistentVolumeSpec{}.OpenAPIModelName()}, } } @@ -57533,7 +57621,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "source represents the volume that should be attached.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentSource"), + Ref: ref(storagev1beta1.VolumeAttachmentSource{}.OpenAPIModelName()), }, }, "nodeName": { @@ -57549,7 +57637,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeAttachmentSource"}, + storagev1beta1.VolumeAttachmentSource{}.OpenAPIModelName()}, } } @@ -57587,13 +57675,13 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref common.Referenc "attachError": { SchemaProps: spec.SchemaProps{ Description: "attachError represents the last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1beta1.VolumeError"), + Ref: ref(storagev1beta1.VolumeError{}.OpenAPIModelName()), }, }, "detachError": { SchemaProps: spec.SchemaProps{ Description: "detachError represents the last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1beta1.VolumeError"), + Ref: ref(storagev1beta1.VolumeError{}.OpenAPIModelName()), }, }, }, @@ -57601,7 +57689,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeError"}, + storagev1beta1.VolumeError{}.OpenAPIModelName()}, } } @@ -57630,7 +57718,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttributesClass(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "driverName": { @@ -57662,7 +57750,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttributesClass(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -57691,7 +57779,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttributesClassList(ref common.Refer SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -57702,7 +57790,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttributesClassList(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttributesClass"), + Ref: ref(storagev1beta1.VolumeAttributesClass{}.OpenAPIModelName()), }, }, }, @@ -57713,7 +57801,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttributesClassList(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeAttributesClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagev1beta1.VolumeAttributesClass{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -57727,7 +57815,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeError(ref common.ReferenceCallback) "time": { SchemaProps: spec.SchemaProps{ Description: "time represents the time the error was encountered.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "message": { @@ -57748,7 +57836,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeError(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -57832,7 +57920,7 @@ func schema_k8sio_api_storagemigration_v1alpha1_MigrationCondition(ref common.Re "lastUpdateTime": { SchemaProps: spec.SchemaProps{ Description: "The last time this condition was updated.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -57854,7 +57942,7 @@ func schema_k8sio_api_storagemigration_v1alpha1_MigrationCondition(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -57883,28 +57971,28 @@ func schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigration(ref comm SchemaProps: spec.SchemaProps{ Description: "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the migration.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storagemigration/v1alpha1.StorageVersionMigrationSpec"), + Ref: ref(storagemigrationv1alpha1.StorageVersionMigrationSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the migration.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storagemigration/v1alpha1.StorageVersionMigrationStatus"), + Ref: ref(storagemigrationv1alpha1.StorageVersionMigrationStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/storagemigration/v1alpha1.StorageVersionMigrationSpec", "k8s.io/api/storagemigration/v1alpha1.StorageVersionMigrationStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + storagemigrationv1alpha1.StorageVersionMigrationSpec{}.OpenAPIModelName(), storagemigrationv1alpha1.StorageVersionMigrationStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -57933,7 +58021,7 @@ func schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigrationList(ref SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -57954,7 +58042,7 @@ func schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigrationList(ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storagemigration/v1alpha1.StorageVersionMigration"), + Ref: ref(storagemigrationv1alpha1.StorageVersionMigration{}.OpenAPIModelName()), }, }, }, @@ -57965,7 +58053,7 @@ func schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigrationList(ref }, }, Dependencies: []string{ - "k8s.io/api/storagemigration/v1alpha1.StorageVersionMigration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + storagemigrationv1alpha1.StorageVersionMigration{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -57980,7 +58068,7 @@ func schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigrationSpec(ref SchemaProps: spec.SchemaProps{ Description: "The resource that is being migrated. The migrator sends requests to the endpoint serving the resource. Immutable.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storagemigration/v1alpha1.GroupVersionResource"), + Ref: ref(storagemigrationv1alpha1.GroupVersionResource{}.OpenAPIModelName()), }, }, "continueToken": { @@ -57995,7 +58083,7 @@ func schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigrationSpec(ref }, }, Dependencies: []string{ - "k8s.io/api/storagemigration/v1alpha1.GroupVersionResource"}, + storagemigrationv1alpha1.GroupVersionResource{}.OpenAPIModelName()}, } } @@ -58024,7 +58112,7 @@ func schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigrationStatus(re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storagemigration/v1alpha1.MigrationCondition"), + Ref: ref(storagemigrationv1alpha1.MigrationCondition{}.OpenAPIModelName()), }, }, }, @@ -58041,7 +58129,7 @@ func schema_k8sio_api_storagemigration_v1alpha1_StorageVersionMigrationStatus(re }, }, Dependencies: []string{ - "k8s.io/api/storagemigration/v1alpha1.MigrationCondition"}, + storagemigrationv1alpha1.MigrationCondition{}.OpenAPIModelName()}, } } @@ -58080,7 +58168,7 @@ func schema_pkg_apis_apiextensions_v1_ConversionRequest(ref common.ReferenceCall Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -58091,7 +58179,7 @@ func schema_pkg_apis_apiextensions_v1_ConversionRequest(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -58122,7 +58210,7 @@ func schema_pkg_apis_apiextensions_v1_ConversionResponse(ref common.ReferenceCal Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -58132,7 +58220,7 @@ func schema_pkg_apis_apiextensions_v1_ConversionResponse(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "result contains the result of conversion with extra details if the conversion failed. `result.status` determines if the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` will be used to construct an error message for the end user.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + Ref: ref(metav1.Status{}.OpenAPIModelName()), }, }, }, @@ -58140,7 +58228,7 @@ func schema_pkg_apis_apiextensions_v1_ConversionResponse(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.Status{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -58168,20 +58256,20 @@ func schema_pkg_apis_apiextensions_v1_ConversionReview(ref common.ReferenceCallb "request": { SchemaProps: spec.SchemaProps{ Description: "request describes the attributes for the conversion request.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest"), + Ref: ref(apiextensionsv1.ConversionRequest{}.OpenAPIModelName()), }, }, "response": { SchemaProps: spec.SchemaProps{ Description: "response describes the attributes for the conversion response.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse"), + Ref: ref(apiextensionsv1.ConversionResponse{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse"}, + apiextensionsv1.ConversionRequest{}.OpenAPIModelName(), apiextensionsv1.ConversionResponse{}.OpenAPIModelName()}, } } @@ -58262,7 +58350,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref common.Refere "webhook": { SchemaProps: spec.SchemaProps{ Description: "webhook describes how to call the conversion webhook. Required when `strategy` is set to `\"Webhook\"`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion"), + Ref: ref(apiextensionsv1.WebhookConversion{}.OpenAPIModelName()), }, }, }, @@ -58270,7 +58358,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion"}, + apiextensionsv1.WebhookConversion{}.OpenAPIModelName()}, } } @@ -58299,21 +58387,21 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec describes how the user wants the resources to appear", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec"), + Ref: ref(apiextensionsv1.CustomResourceDefinitionSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status indicates the actual state of the CustomResourceDefinition", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus"), + Ref: ref(apiextensionsv1.CustomResourceDefinitionStatus{}.OpenAPIModelName()), }, }, }, @@ -58321,7 +58409,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + apiextensionsv1.CustomResourceDefinitionSpec{}.OpenAPIModelName(), apiextensionsv1.CustomResourceDefinitionStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -58351,7 +58439,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref comm "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -58373,7 +58461,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -58402,7 +58490,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.Re SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -58413,7 +58501,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition"), + Ref: ref(apiextensionsv1.CustomResourceDefinition{}.OpenAPIModelName()), }, }, }, @@ -58424,7 +58512,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + apiextensionsv1.CustomResourceDefinition{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -58531,7 +58619,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref common.Re SchemaProps: spec.SchemaProps{ Description: "names specify the resource and kind names for the custom resource.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"), + Ref: ref(apiextensionsv1.CustomResourceDefinitionNames{}.OpenAPIModelName()), }, }, "scope": { @@ -58555,7 +58643,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion"), + Ref: ref(apiextensionsv1.CustomResourceDefinitionVersion{}.OpenAPIModelName()), }, }, }, @@ -58564,7 +58652,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref common.Re "conversion": { SchemaProps: spec.SchemaProps{ Description: "conversion defines conversion settings for the CRD.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion"), + Ref: ref(apiextensionsv1.CustomResourceConversion{}.OpenAPIModelName()), }, }, "preserveUnknownFields": { @@ -58579,7 +58667,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion"}, + apiextensionsv1.CustomResourceConversion{}.OpenAPIModelName(), apiextensionsv1.CustomResourceDefinitionNames{}.OpenAPIModelName(), apiextensionsv1.CustomResourceDefinitionVersion{}.OpenAPIModelName()}, } } @@ -58606,7 +58694,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition"), + Ref: ref(apiextensionsv1.CustomResourceDefinitionCondition{}.OpenAPIModelName()), }, }, }, @@ -58616,7 +58704,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref common. SchemaProps: spec.SchemaProps{ Description: "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"), + Ref: ref(apiextensionsv1.CustomResourceDefinitionNames{}.OpenAPIModelName()), }, }, "storedVersions": { @@ -58643,7 +58731,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref common. }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"}, + apiextensionsv1.CustomResourceDefinitionCondition{}.OpenAPIModelName(), apiextensionsv1.CustomResourceDefinitionNames{}.OpenAPIModelName()}, } } @@ -58695,13 +58783,13 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref common "schema": { SchemaProps: spec.SchemaProps{ Description: "schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation"), + Ref: ref(apiextensionsv1.CustomResourceValidation{}.OpenAPIModelName()), }, }, "subresources": { SchemaProps: spec.SchemaProps{ Description: "subresources specify what subresources this version of the defined custom resource have.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources"), + Ref: ref(apiextensionsv1.CustomResourceSubresources{}.OpenAPIModelName()), }, }, "additionalPrinterColumns": { @@ -58717,7 +58805,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition"), + Ref: ref(apiextensionsv1.CustomResourceColumnDefinition{}.OpenAPIModelName()), }, }, }, @@ -58736,7 +58824,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.SelectableField"), + Ref: ref(apiextensionsv1.SelectableField{}.OpenAPIModelName()), }, }, }, @@ -58747,7 +58835,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref common }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.SelectableField"}, + apiextensionsv1.CustomResourceColumnDefinition{}.OpenAPIModelName(), apiextensionsv1.CustomResourceSubresources{}.OpenAPIModelName(), apiextensionsv1.CustomResourceValidation{}.OpenAPIModelName(), apiextensionsv1.SelectableField{}.OpenAPIModelName()}, } } @@ -58809,20 +58897,20 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref common.Refe "status": { SchemaProps: spec.SchemaProps{ Description: "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus"), + Ref: ref(apiextensionsv1.CustomResourceSubresourceStatus{}.OpenAPIModelName()), }, }, "scale": { SchemaProps: spec.SchemaProps{ Description: "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale"), + Ref: ref(apiextensionsv1.CustomResourceSubresourceScale{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus"}, + apiextensionsv1.CustomResourceSubresourceScale{}.OpenAPIModelName(), apiextensionsv1.CustomResourceSubresourceStatus{}.OpenAPIModelName()}, } } @@ -58836,14 +58924,14 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref common.Refere "openAPIV3Schema": { SchemaProps: spec.SchemaProps{ Description: "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"}, + apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()}, } } @@ -58937,7 +59025,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba "default": { SchemaProps: spec.SchemaProps{ Description: "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. Defaulting requires spec.preserveUnknownFields to be false.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + Ref: ref(apiextensionsv1.JSON{}.OpenAPIModelName()), }, }, "maximum": { @@ -59017,7 +59105,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + Ref: ref(apiextensionsv1.JSON{}.OpenAPIModelName()), }, }, }, @@ -59056,7 +59144,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba }, "items": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray"), + Ref: ref(apiextensionsv1.JSONSchemaPropsOrArray{}.OpenAPIModelName()), }, }, "allOf": { @@ -59071,7 +59159,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -59089,7 +59177,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -59107,7 +59195,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -59115,7 +59203,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba }, "not": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, "properties": { @@ -59126,7 +59214,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -59134,7 +59222,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba }, "additionalProperties": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool"), + Ref: ref(apiextensionsv1.JSONSchemaPropsOrBool{}.OpenAPIModelName()), }, }, "patternProperties": { @@ -59145,7 +59233,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -59158,7 +59246,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray"), + Ref: ref(apiextensionsv1.JSONSchemaPropsOrStringArray{}.OpenAPIModelName()), }, }, }, @@ -59166,7 +59254,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba }, "additionalItems": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool"), + Ref: ref(apiextensionsv1.JSONSchemaPropsOrBool{}.OpenAPIModelName()), }, }, "definitions": { @@ -59177,7 +59265,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -59185,12 +59273,12 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba }, "externalDocs": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation"), + Ref: ref(apiextensionsv1.ExternalDocumentation{}.OpenAPIModelName()), }, }, "example": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + Ref: ref(apiextensionsv1.JSON{}.OpenAPIModelName()), }, }, "nullable": { @@ -59272,7 +59360,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ValidationRule"), + Ref: ref(apiextensionsv1.ValidationRule{}.OpenAPIModelName()), }, }, }, @@ -59282,7 +59370,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ValidationRule"}, + apiextensionsv1.ExternalDocumentation{}.OpenAPIModelName(), apiextensionsv1.JSON{}.OpenAPIModelName(), apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName(), apiextensionsv1.JSONSchemaPropsOrArray{}.OpenAPIModelName(), apiextensionsv1.JSONSchemaPropsOrBool{}.OpenAPIModelName(), apiextensionsv1.JSONSchemaPropsOrStringArray{}.OpenAPIModelName(), apiextensionsv1.ValidationRule{}.OpenAPIModelName()}, } } @@ -59463,7 +59551,7 @@ func schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref common.ReferenceCa "service": { SchemaProps: spec.SchemaProps{ Description: "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference"), + Ref: ref(apiextensionsv1.ServiceReference{}.OpenAPIModelName()), }, }, "caBundle": { @@ -59477,7 +59565,7 @@ func schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference"}, + apiextensionsv1.ServiceReference{}.OpenAPIModelName()}, } } @@ -59491,7 +59579,7 @@ func schema_pkg_apis_apiextensions_v1_WebhookConversion(ref common.ReferenceCall "clientConfig": { SchemaProps: spec.SchemaProps{ Description: "clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig"), + Ref: ref(apiextensionsv1.WebhookClientConfig{}.OpenAPIModelName()), }, }, "conversionReviewVersions": { @@ -59519,7 +59607,7 @@ func schema_pkg_apis_apiextensions_v1_WebhookConversion(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig"}, + apiextensionsv1.WebhookClientConfig{}.OpenAPIModelName()}, } } @@ -59558,7 +59646,7 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref common.Referenc Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -59569,7 +59657,7 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -59600,7 +59688,7 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref common.Referen Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -59610,7 +59698,7 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref common.Referen SchemaProps: spec.SchemaProps{ Description: "result contains the result of conversion with extra details if the conversion failed. `result.status` determines if the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` will be used to construct an error message for the end user.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + Ref: ref(metav1.Status{}.OpenAPIModelName()), }, }, }, @@ -59618,7 +59706,7 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.Status{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -59646,20 +59734,20 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref common.Reference "request": { SchemaProps: spec.SchemaProps{ Description: "request describes the attributes for the conversion request.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest"), + Ref: ref(apiextensionsv1beta1.ConversionRequest{}.OpenAPIModelName()), }, }, "response": { SchemaProps: spec.SchemaProps{ Description: "response describes the attributes for the conversion response.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse"), + Ref: ref(apiextensionsv1beta1.ConversionResponse{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse"}, + apiextensionsv1beta1.ConversionRequest{}.OpenAPIModelName(), apiextensionsv1beta1.ConversionResponse{}.OpenAPIModelName()}, } } @@ -59740,7 +59828,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref common.R "webhookClientConfig": { SchemaProps: spec.SchemaProps{ Description: "webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`. Required when `strategy` is set to `Webhook`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig"), + Ref: ref(apiextensionsv1beta1.WebhookClientConfig{}.OpenAPIModelName()), }, }, "conversionReviewVersions": { @@ -59768,7 +59856,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref common.R }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig"}, + apiextensionsv1beta1.WebhookClientConfig{}.OpenAPIModelName()}, } } @@ -59797,21 +59885,21 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref common.R SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec describes how the user wants the resources to appear", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec"), + Ref: ref(apiextensionsv1beta1.CustomResourceDefinitionSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status indicates the actual state of the CustomResourceDefinition", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus"), + Ref: ref(apiextensionsv1beta1.CustomResourceDefinitionStatus{}.OpenAPIModelName()), }, }, }, @@ -59819,7 +59907,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref common.R }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + apiextensionsv1beta1.CustomResourceDefinitionSpec{}.OpenAPIModelName(), apiextensionsv1beta1.CustomResourceDefinitionStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -59849,7 +59937,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -59871,7 +59959,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -59900,7 +59988,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -59911,7 +59999,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition"), + Ref: ref(apiextensionsv1beta1.CustomResourceDefinition{}.OpenAPIModelName()), }, }, }, @@ -59922,7 +60010,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref comm }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + apiextensionsv1beta1.CustomResourceDefinition{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -60036,7 +60124,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm SchemaProps: spec.SchemaProps{ Description: "names specify the resource and kind names for the custom resource.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"), + Ref: ref(apiextensionsv1beta1.CustomResourceDefinitionNames{}.OpenAPIModelName()), }, }, "scope": { @@ -60050,13 +60138,13 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm "validation": { SchemaProps: spec.SchemaProps{ Description: "validation describes the schema used for validation and pruning of the custom resource. If present, this validation schema is used to validate all versions. Top-level and per-version schemas are mutually exclusive.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"), + Ref: ref(apiextensionsv1beta1.CustomResourceValidation{}.OpenAPIModelName()), }, }, "subresources": { SchemaProps: spec.SchemaProps{ Description: "subresources specify what subresources the defined custom resource has. If present, this field configures subresources for all versions. Top-level and per-version subresources are mutually exclusive.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources"), + Ref: ref(apiextensionsv1beta1.CustomResourceSubresources{}.OpenAPIModelName()), }, }, "versions": { @@ -60072,7 +60160,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion"), + Ref: ref(apiextensionsv1beta1.CustomResourceDefinitionVersion{}.OpenAPIModelName()), }, }, }, @@ -60091,7 +60179,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition"), + Ref: ref(apiextensionsv1beta1.CustomResourceColumnDefinition{}.OpenAPIModelName()), }, }, }, @@ -60110,7 +60198,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.SelectableField"), + Ref: ref(apiextensionsv1beta1.SelectableField{}.OpenAPIModelName()), }, }, }, @@ -60119,7 +60207,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm "conversion": { SchemaProps: spec.SchemaProps{ Description: "conversion defines conversion settings for the CRD.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion"), + Ref: ref(apiextensionsv1beta1.CustomResourceConversion{}.OpenAPIModelName()), }, }, "preserveUnknownFields": { @@ -60134,7 +60222,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.SelectableField"}, + apiextensionsv1beta1.CustomResourceColumnDefinition{}.OpenAPIModelName(), apiextensionsv1beta1.CustomResourceConversion{}.OpenAPIModelName(), apiextensionsv1beta1.CustomResourceDefinitionNames{}.OpenAPIModelName(), apiextensionsv1beta1.CustomResourceDefinitionVersion{}.OpenAPIModelName(), apiextensionsv1beta1.CustomResourceSubresources{}.OpenAPIModelName(), apiextensionsv1beta1.CustomResourceValidation{}.OpenAPIModelName(), apiextensionsv1beta1.SelectableField{}.OpenAPIModelName()}, } } @@ -60161,7 +60249,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition"), + Ref: ref(apiextensionsv1beta1.CustomResourceDefinitionCondition{}.OpenAPIModelName()), }, }, }, @@ -60171,7 +60259,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref co SchemaProps: spec.SchemaProps{ Description: "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"), + Ref: ref(apiextensionsv1beta1.CustomResourceDefinitionNames{}.OpenAPIModelName()), }, }, "storedVersions": { @@ -60198,7 +60286,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref co }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"}, + apiextensionsv1beta1.CustomResourceDefinitionCondition{}.OpenAPIModelName(), apiextensionsv1beta1.CustomResourceDefinitionNames{}.OpenAPIModelName()}, } } @@ -60250,13 +60338,13 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref c "schema": { SchemaProps: spec.SchemaProps{ Description: "schema describes the schema used for validation and pruning of this version of the custom resource. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead).", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"), + Ref: ref(apiextensionsv1beta1.CustomResourceValidation{}.OpenAPIModelName()), }, }, "subresources": { SchemaProps: spec.SchemaProps{ Description: "subresources specify what subresources this version of the defined custom resource have. Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead).", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources"), + Ref: ref(apiextensionsv1beta1.CustomResourceSubresources{}.OpenAPIModelName()), }, }, "additionalPrinterColumns": { @@ -60272,7 +60360,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition"), + Ref: ref(apiextensionsv1beta1.CustomResourceColumnDefinition{}.OpenAPIModelName()), }, }, }, @@ -60291,7 +60379,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.SelectableField"), + Ref: ref(apiextensionsv1beta1.SelectableField{}.OpenAPIModelName()), }, }, }, @@ -60302,7 +60390,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref c }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.SelectableField"}, + apiextensionsv1beta1.CustomResourceColumnDefinition{}.OpenAPIModelName(), apiextensionsv1beta1.CustomResourceSubresources{}.OpenAPIModelName(), apiextensionsv1beta1.CustomResourceValidation{}.OpenAPIModelName(), apiextensionsv1beta1.SelectableField{}.OpenAPIModelName()}, } } @@ -60364,20 +60452,20 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref common "status": { SchemaProps: spec.SchemaProps{ Description: "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus"), + Ref: ref(apiextensionsv1beta1.CustomResourceSubresourceStatus{}.OpenAPIModelName()), }, }, "scale": { SchemaProps: spec.SchemaProps{ Description: "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale"), + Ref: ref(apiextensionsv1beta1.CustomResourceSubresourceScale{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus"}, + apiextensionsv1beta1.CustomResourceSubresourceScale{}.OpenAPIModelName(), apiextensionsv1beta1.CustomResourceSubresourceStatus{}.OpenAPIModelName()}, } } @@ -60391,14 +60479,14 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref common.R "openAPIV3Schema": { SchemaProps: spec.SchemaProps{ Description: "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(apiextensionsv1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"}, + apiextensionsv1beta1.JSONSchemaProps{}.OpenAPIModelName()}, } } @@ -60432,8 +60520,8 @@ func schema_pkg_apis_apiextensions_v1beta1_JSON(ref common.ReferenceCallback) co Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.", - Type: v1beta1.JSON{}.OpenAPISchemaType(), - Format: v1beta1.JSON{}.OpenAPISchemaFormat(), + Type: apiextensionsv1beta1.JSON{}.OpenAPISchemaType(), + Format: apiextensionsv1beta1.JSON{}.OpenAPISchemaFormat(), }, }, } @@ -60492,7 +60580,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC "default": { SchemaProps: spec.SchemaProps{ Description: "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + Ref: ref(apiextensionsv1beta1.JSON{}.OpenAPIModelName()), }, }, "maximum": { @@ -60572,7 +60660,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + Ref: ref(apiextensionsv1beta1.JSON{}.OpenAPIModelName()), }, }, }, @@ -60611,7 +60699,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, "items": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray"), + Ref: ref(apiextensionsv1beta1.JSONSchemaPropsOrArray{}.OpenAPIModelName()), }, }, "allOf": { @@ -60626,7 +60714,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(apiextensionsv1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -60644,7 +60732,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(apiextensionsv1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -60662,7 +60750,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(apiextensionsv1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -60670,7 +60758,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, "not": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(apiextensionsv1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, "properties": { @@ -60681,7 +60769,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(apiextensionsv1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -60689,7 +60777,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, "additionalProperties": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool"), + Ref: ref(apiextensionsv1beta1.JSONSchemaPropsOrBool{}.OpenAPIModelName()), }, }, "patternProperties": { @@ -60700,7 +60788,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(apiextensionsv1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -60713,7 +60801,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray"), + Ref: ref(apiextensionsv1beta1.JSONSchemaPropsOrStringArray{}.OpenAPIModelName()), }, }, }, @@ -60721,7 +60809,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, "additionalItems": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool"), + Ref: ref(apiextensionsv1beta1.JSONSchemaPropsOrBool{}.OpenAPIModelName()), }, }, "definitions": { @@ -60732,7 +60820,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(apiextensionsv1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -60740,12 +60828,12 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, "externalDocs": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation"), + Ref: ref(apiextensionsv1beta1.ExternalDocumentation{}.OpenAPIModelName()), }, }, "example": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + Ref: ref(apiextensionsv1beta1.JSON{}.OpenAPIModelName()), }, }, "nullable": { @@ -60827,7 +60915,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ValidationRule"), + Ref: ref(apiextensionsv1beta1.ValidationRule{}.OpenAPIModelName()), }, }, }, @@ -60837,7 +60925,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ValidationRule"}, + apiextensionsv1beta1.ExternalDocumentation{}.OpenAPIModelName(), apiextensionsv1beta1.JSON{}.OpenAPIModelName(), apiextensionsv1beta1.JSONSchemaProps{}.OpenAPIModelName(), apiextensionsv1beta1.JSONSchemaPropsOrArray{}.OpenAPIModelName(), apiextensionsv1beta1.JSONSchemaPropsOrBool{}.OpenAPIModelName(), apiextensionsv1beta1.JSONSchemaPropsOrStringArray{}.OpenAPIModelName(), apiextensionsv1beta1.ValidationRule{}.OpenAPIModelName()}, } } @@ -60846,8 +60934,8 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrArray(ref common.Ref Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.", - Type: v1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), - Format: v1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), + Type: apiextensionsv1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), + Format: apiextensionsv1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), }, }, } @@ -60858,8 +60946,8 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref common.Refe Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.", - Type: v1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), - Format: v1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), + Type: apiextensionsv1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), + Format: apiextensionsv1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), }, }, } @@ -60870,8 +60958,8 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref comm Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.", - Type: v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), - Format: v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), + Type: apiextensionsv1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), + Format: apiextensionsv1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), }, }, } @@ -61018,7 +61106,7 @@ func schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref common.Refere "service": { SchemaProps: spec.SchemaProps{ Description: "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference"), + Ref: ref(apiextensionsv1beta1.ServiceReference{}.OpenAPIModelName()), }, }, "caBundle": { @@ -61032,7 +61120,7 @@ func schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference"}, + apiextensionsv1beta1.ServiceReference{}.OpenAPIModelName()}, } } @@ -61126,7 +61214,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + Ref: ref(metav1.GroupVersionForDiscovery{}.OpenAPIModelName()), }, }, }, @@ -61136,7 +61224,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "preferredVersion is the version preferred by the API server, which probably is the storage version.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + Ref: ref(metav1.GroupVersionForDiscovery{}.OpenAPIModelName()), }, }, "serverAddressByClientCIDRs": { @@ -61152,7 +61240,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + Ref: ref(metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()), }, }, }, @@ -61163,7 +61251,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + metav1.GroupVersionForDiscovery{}.OpenAPIModelName(), metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()}, } } @@ -61201,7 +61289,7 @@ func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"), + Ref: ref(metav1.APIGroup{}.OpenAPIModelName()), }, }, }, @@ -61212,7 +61300,7 @@ func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"}, + metav1.APIGroup{}.OpenAPIModelName()}, } } @@ -61380,7 +61468,7 @@ func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"), + Ref: ref(metav1.APIResource{}.OpenAPIModelName()), }, }, }, @@ -61391,7 +61479,7 @@ func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"}, + metav1.APIResource{}.OpenAPIModelName()}, } } @@ -61449,7 +61537,7 @@ func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + Ref: ref(metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()), }, }, }, @@ -61460,7 +61548,7 @@ func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()}, } } @@ -61561,7 +61649,7 @@ func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.Open "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -61585,7 +61673,7 @@ func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -61681,7 +61769,7 @@ func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common. "preconditions": { SchemaProps: spec.SchemaProps{ Description: "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"), + Ref: ref(metav1.Preconditions{}.OpenAPIModelName()), }, }, "orphanDependents": { @@ -61729,7 +61817,7 @@ func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"}, + metav1.Preconditions{}.OpenAPIModelName()}, } } @@ -62041,15 +62129,12 @@ func schema_pkg_apis_meta_v1_InternalEvent(ref common.ReferenceCallback) common. "Object": { SchemaProps: spec.SchemaProps{ Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Bookmark: the object (instance of a type being watched) where\n only ResourceVersion field is set. On successful restart of watch from a\n bookmark resourceVersion, client is guaranteed to not get repeat event\n nor miss any events.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Object"), }, }, }, Required: []string{"Type", "Object"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.Object"}, } } @@ -62089,7 +62174,7 @@ func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"), + Ref: ref(metav1.LabelSelectorRequirement{}.OpenAPIModelName()), }, }, }, @@ -62104,7 +62189,7 @@ func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, + metav1.LabelSelectorRequirement{}.OpenAPIModelName()}, } } @@ -62183,7 +62268,7 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -62193,7 +62278,7 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -62204,7 +62289,7 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.ListMeta{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -62377,7 +62462,7 @@ func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) co "time": { SchemaProps: spec.SchemaProps{ Description: "Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "fieldsType": { @@ -62390,7 +62475,7 @@ func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) co "fieldsV1": { SchemaProps: spec.SchemaProps{ Description: "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1"), + Ref: ref(metav1.FieldsV1{}.OpenAPIModelName()), }, }, "subresource": { @@ -62404,7 +62489,7 @@ func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.FieldsV1{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -62479,13 +62564,13 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope "creationTimestamp": { SchemaProps: spec.SchemaProps{ Description: "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "deletionTimestamp": { SchemaProps: spec.SchemaProps{ Description: "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "deletionGracePeriodSeconds": { @@ -62545,7 +62630,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), + Ref: ref(metav1.OwnerReference{}.OpenAPIModelName()), }, }, }, @@ -62585,7 +62670,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry"), + Ref: ref(metav1.ManagedFieldsEntry{}.OpenAPIModelName()), }, }, }, @@ -62595,7 +62680,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry", "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.ManagedFieldsEntry{}.OpenAPIModelName(), metav1.OwnerReference{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -62689,14 +62774,14 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadata(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -62725,7 +62810,7 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -62736,7 +62821,7 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"), + Ref: ref(metav1.PartialObjectMetadata{}.OpenAPIModelName()), }, }, }, @@ -62747,7 +62832,7 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"}, + metav1.ListMeta{}.OpenAPIModelName(), metav1.PartialObjectMetadata{}.OpenAPIModelName()}, } } @@ -62946,7 +63031,7 @@ func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPI SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "status": { @@ -62971,14 +63056,9 @@ func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPI }, }, "details": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, SchemaProps: spec.SchemaProps{ Description: "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"), + Ref: ref(metav1.StatusDetails{}.OpenAPIModelName()), }, }, "code": { @@ -62992,7 +63072,7 @@ func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPI }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"}, + metav1.ListMeta{}.OpenAPIModelName(), metav1.StatusDetails{}.OpenAPIModelName()}, } } @@ -63078,7 +63158,7 @@ func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"), + Ref: ref(metav1.StatusCause{}.OpenAPIModelName()), }, }, }, @@ -63095,7 +63175,7 @@ func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"}, + metav1.StatusCause{}.OpenAPIModelName()}, } } @@ -63124,7 +63204,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "columnDefinitions": { @@ -63140,7 +63220,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition"), + Ref: ref(metav1.TableColumnDefinition{}.OpenAPIModelName()), }, }, }, @@ -63159,7 +63239,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"), + Ref: ref(metav1.TableRow{}.OpenAPIModelName()), }, }, }, @@ -63170,7 +63250,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"}, + metav1.ListMeta{}.OpenAPIModelName(), metav1.TableColumnDefinition{}.OpenAPIModelName(), metav1.TableRow{}.OpenAPIModelName()}, } } @@ -63301,7 +63381,7 @@ func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition"), + Ref: ref(metav1.TableRowCondition{}.OpenAPIModelName()), }, }, }, @@ -63310,7 +63390,7 @@ func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenA "object": { SchemaProps: spec.SchemaProps{ Description: "This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing. The media type of the object will always match the enclosing list - if this as a JSON table, these will be JSON encoded objects.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -63318,7 +63398,7 @@ func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.TableRowCondition{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -63513,7 +63593,7 @@ func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.Ope "object": { SchemaProps: spec.SchemaProps{ Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -63521,7 +63601,7 @@ func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -63550,7 +63630,7 @@ func schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -63561,7 +63641,7 @@ func schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"), + Ref: ref(metav1.PartialObjectMetadata{}.OpenAPIModelName()), }, }, }, @@ -63572,7 +63652,7 @@ func schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"}, + metav1.ListMeta{}.OpenAPIModelName(), metav1.PartialObjectMetadata{}.OpenAPIModelName()}, } } @@ -63601,28 +63681,28 @@ func schema_pkg_apis_testapigroup_v1_Carp(ref common.ReferenceCallback) common.O SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the carp. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/testapigroup/v1.CarpSpec"), + Ref: ref(testapigroupv1.CarpSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the carp. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/testapigroup/v1.CarpStatus"), + Ref: ref(testapigroupv1.CarpStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/testapigroup/v1.CarpSpec", "k8s.io/apimachinery/pkg/apis/testapigroup/v1.CarpStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), testapigroupv1.CarpSpec{}.OpenAPIModelName(), testapigroupv1.CarpStatus{}.OpenAPIModelName()}, } } @@ -63651,13 +63731,13 @@ func schema_pkg_apis_testapigroup_v1_CarpCondition(ref common.ReferenceCallback) "lastProbeTime": { SchemaProps: spec.SchemaProps{ Description: "Last time we probed the condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -63679,7 +63759,7 @@ func schema_pkg_apis_testapigroup_v1_CarpCondition(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -63752,7 +63832,7 @@ func schema_pkg_apis_testapigroup_v1_CarpList(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -63763,7 +63843,7 @@ func schema_pkg_apis_testapigroup_v1_CarpList(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/testapigroup/v1.Carp"), + Ref: ref(testapigroupv1.Carp{}.OpenAPIModelName()), }, }, }, @@ -63774,7 +63854,7 @@ func schema_pkg_apis_testapigroup_v1_CarpList(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/testapigroup/v1.Carp"}, + metav1.ListMeta{}.OpenAPIModelName(), testapigroupv1.Carp{}.OpenAPIModelName()}, } } @@ -63923,7 +64003,7 @@ func schema_pkg_apis_testapigroup_v1_CarpStatus(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/testapigroup/v1.CarpCondition"), + Ref: ref(testapigroupv1.CarpCondition{}.OpenAPIModelName()), }, }, }, @@ -63960,7 +64040,7 @@ func schema_pkg_apis_testapigroup_v1_CarpStatus(ref common.ReferenceCallback) co "startTime": { SchemaProps: spec.SchemaProps{ Description: "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 carp.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "infos": { @@ -63981,7 +64061,7 @@ func schema_pkg_apis_testapigroup_v1_CarpStatus(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/testapigroup/v1.CarpInfo"), + Ref: ref(testapigroupv1.CarpInfo{}.OpenAPIModelName()), }, }, }, @@ -63991,7 +64071,7 @@ func schema_pkg_apis_testapigroup_v1_CarpStatus(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/apimachinery/pkg/apis/testapigroup/v1.CarpCondition", "k8s.io/apimachinery/pkg/apis/testapigroup/v1.CarpInfo"}, + metav1.Time{}.OpenAPIModelName(), testapigroupv1.CarpCondition{}.OpenAPIModelName(), testapigroupv1.CarpInfo{}.OpenAPIModelName()}, } } @@ -64265,13 +64345,13 @@ func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPI SchemaProps: spec.SchemaProps{ Description: "Authenticated user information.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + Ref: ref(authenticationv1.UserInfo{}.OpenAPIModelName()), }, }, "impersonatedUser": { SchemaProps: spec.SchemaProps{ Description: "Impersonated user information.", - Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + Ref: ref(authenticationv1.UserInfo{}.OpenAPIModelName()), }, }, "sourceIPs": { @@ -64304,37 +64384,37 @@ func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPI "objectRef": { SchemaProps: spec.SchemaProps{ Description: "Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.", - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference"), + Ref: ref(auditv1.ObjectReference{}.OpenAPIModelName()), }, }, "responseStatus": { SchemaProps: spec.SchemaProps{ Description: "The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + Ref: ref(metav1.Status{}.OpenAPIModelName()), }, }, "requestObject": { SchemaProps: spec.SchemaProps{ Description: "API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + Ref: ref(runtime.Unknown{}.OpenAPIModelName()), }, }, "responseObject": { SchemaProps: spec.SchemaProps{ Description: "API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + Ref: ref(runtime.Unknown{}.OpenAPIModelName()), }, }, "requestReceivedTimestamp": { SchemaProps: spec.SchemaProps{ Description: "Time the request reached the apiserver.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, "stageTimestamp": { SchemaProps: spec.SchemaProps{ Description: "Time the request reached current audit stage.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, "annotations": { @@ -64358,7 +64438,7 @@ func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPI }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference"}, + authenticationv1.UserInfo{}.OpenAPIModelName(), metav1.MicroTime{}.OpenAPIModelName(), metav1.Status{}.OpenAPIModelName(), runtime.Unknown{}.OpenAPIModelName(), auditv1.ObjectReference{}.OpenAPIModelName()}, } } @@ -64386,7 +64466,7 @@ func schema_pkg_apis_audit_v1_EventList(ref common.ReferenceCallback) common.Ope "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -64396,7 +64476,7 @@ func schema_pkg_apis_audit_v1_EventList(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.Event"), + Ref: ref(auditv1.Event{}.OpenAPIModelName()), }, }, }, @@ -64407,7 +64487,7 @@ func schema_pkg_apis_audit_v1_EventList(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1.Event"}, + metav1.ListMeta{}.OpenAPIModelName(), auditv1.Event{}.OpenAPIModelName()}, } } @@ -64559,7 +64639,7 @@ func schema_pkg_apis_audit_v1_Policy(ref common.ReferenceCallback) common.OpenAP SchemaProps: spec.SchemaProps{ Description: "ObjectMeta is included for interoperability with API infrastructure.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "rules": { @@ -64575,7 +64655,7 @@ func schema_pkg_apis_audit_v1_Policy(ref common.ReferenceCallback) common.OpenAP Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule"), + Ref: ref(auditv1.PolicyRule{}.OpenAPIModelName()), }, }, }, @@ -64613,7 +64693,7 @@ func schema_pkg_apis_audit_v1_Policy(ref common.ReferenceCallback) common.OpenAP }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule"}, + metav1.ObjectMeta{}.OpenAPIModelName(), auditv1.PolicyRule{}.OpenAPIModelName()}, } } @@ -64641,7 +64721,7 @@ func schema_pkg_apis_audit_v1_PolicyList(ref common.ReferenceCallback) common.Op "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -64651,7 +64731,7 @@ func schema_pkg_apis_audit_v1_PolicyList(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.Policy"), + Ref: ref(auditv1.Policy{}.OpenAPIModelName()), }, }, }, @@ -64662,7 +64742,7 @@ func schema_pkg_apis_audit_v1_PolicyList(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1.Policy"}, + metav1.ListMeta{}.OpenAPIModelName(), auditv1.Policy{}.OpenAPIModelName()}, } } @@ -64754,7 +64834,7 @@ func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.GroupResources"), + Ref: ref(auditv1.GroupResources{}.OpenAPIModelName()), }, }, }, @@ -64832,7 +64912,7 @@ func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/apiserver/pkg/apis/audit/v1.GroupResources"}, + auditv1.GroupResources{}.OpenAPIModelName()}, } } @@ -64894,7 +64974,7 @@ func schema_pkg_apis_clientauthentication_v1_Cluster(ref common.ReferenceCallbac "config": { SchemaProps: spec.SchemaProps{ Description: "Config holds additional config data that is specific to the exec plugin with regards to the cluster being authenticated to.\n\nThis data is sourced from the clientcmd Cluster object's extensions[client.authentication.k8s.io/exec] field:\n\nclusters: - name: my-cluster\n cluster:\n ...\n extensions:\n - name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config\n extension:\n audience: 06e3fbd18de8 # arbitrary config\n\nIn some environments, the user config may be exactly the same across many clusters (i.e. call this exec plugin) minus some details that are specific to each cluster such as the audience. This field allows the per cluster config to be directly specified with the cluster info. Using this field to store secret data is not recommended as one of the prime benefits of exec plugins is that no secrets need to be stored directly in the kubeconfig.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -64902,7 +64982,7 @@ func schema_pkg_apis_clientauthentication_v1_Cluster(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -64931,20 +65011,20 @@ func schema_pkg_apis_clientauthentication_v1_ExecCredential(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "Spec holds information passed to the plugin by the transport.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialSpec"), + Ref: ref(clientauthenticationv1.ExecCredentialSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.", - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialStatus"), + Ref: ref(clientauthenticationv1.ExecCredentialStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialSpec", "k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialStatus"}, + clientauthenticationv1.ExecCredentialSpec{}.OpenAPIModelName(), clientauthenticationv1.ExecCredentialStatus{}.OpenAPIModelName()}, } } @@ -64958,7 +65038,7 @@ func schema_pkg_apis_clientauthentication_v1_ExecCredentialSpec(ref common.Refer "cluster": { SchemaProps: spec.SchemaProps{ Description: "Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to. Note that Cluster is non-nil only when provideClusterInfo is set to true in the exec provider config (i.e., ExecConfig.ProvideClusterInfo).", - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1.Cluster"), + Ref: ref(clientauthenticationv1.Cluster{}.OpenAPIModelName()), }, }, "interactive": { @@ -64974,7 +65054,7 @@ func schema_pkg_apis_clientauthentication_v1_ExecCredentialSpec(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/client-go/pkg/apis/clientauthentication/v1.Cluster"}, + clientauthenticationv1.Cluster{}.OpenAPIModelName()}, } } @@ -64988,7 +65068,7 @@ func schema_pkg_apis_clientauthentication_v1_ExecCredentialStatus(ref common.Ref "expirationTimestamp": { SchemaProps: spec.SchemaProps{ Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "token": { @@ -65016,7 +65096,7 @@ func schema_pkg_apis_clientauthentication_v1_ExecCredentialStatus(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -65078,7 +65158,7 @@ func schema_pkg_apis_clientauthentication_v1beta1_Cluster(ref common.ReferenceCa "config": { SchemaProps: spec.SchemaProps{ Description: "Config holds additional config data that is specific to the exec plugin with regards to the cluster being authenticated to.\n\nThis data is sourced from the clientcmd Cluster object's extensions[client.authentication.k8s.io/exec] field:\n\nclusters: - name: my-cluster\n cluster:\n ...\n extensions:\n - name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config\n extension:\n audience: 06e3fbd18de8 # arbitrary config\n\nIn some environments, the user config may be exactly the same across many clusters (i.e. call this exec plugin) minus some details that are specific to each cluster such as the audience. This field allows the per cluster config to be directly specified with the cluster info. Using this field to store secret data is not recommended as one of the prime benefits of exec plugins is that no secrets need to be stored directly in the kubeconfig.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -65086,7 +65166,7 @@ func schema_pkg_apis_clientauthentication_v1beta1_Cluster(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -65115,20 +65195,20 @@ func schema_pkg_apis_clientauthentication_v1beta1_ExecCredential(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "Spec holds information passed to the plugin by the transport.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec"), + Ref: ref(clientauthenticationv1beta1.ExecCredentialSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.", - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus"), + Ref: ref(clientauthenticationv1beta1.ExecCredentialStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec", "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus"}, + clientauthenticationv1beta1.ExecCredentialSpec{}.OpenAPIModelName(), clientauthenticationv1beta1.ExecCredentialStatus{}.OpenAPIModelName()}, } } @@ -65142,7 +65222,7 @@ func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialSpec(ref common. "cluster": { SchemaProps: spec.SchemaProps{ Description: "Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to. Note that Cluster is non-nil only when provideClusterInfo is set to true in the exec provider config (i.e., ExecConfig.ProvideClusterInfo).", - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.Cluster"), + Ref: ref(clientauthenticationv1beta1.Cluster{}.OpenAPIModelName()), }, }, "interactive": { @@ -65158,7 +65238,7 @@ func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialSpec(ref common. }, }, Dependencies: []string{ - "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.Cluster"}, + clientauthenticationv1beta1.Cluster{}.OpenAPIModelName()}, } } @@ -65172,7 +65252,7 @@ func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialStatus(ref commo "expirationTimestamp": { SchemaProps: spec.SchemaProps{ Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "token": { @@ -65200,7 +65280,7 @@ func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialStatus(ref commo }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -65229,41 +65309,41 @@ func schema_k8sio_cloud_provider_config_v1alpha1_CloudControllerManagerConfigura SchemaProps: spec.SchemaProps{ Description: "Generic holds configuration for a generic controller-manager", Default: map[string]interface{}{}, - Ref: ref("k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"), + Ref: ref(controllermanagerconfigv1alpha1.GenericControllerManagerConfiguration{}.OpenAPIModelName()), }, }, "KubeCloudShared": { SchemaProps: spec.SchemaProps{ Description: "KubeCloudSharedConfiguration holds configuration for shared related features both in cloud controller manager and kube-controller manager.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration"), + Ref: ref(configv1alpha1.KubeCloudSharedConfiguration{}.OpenAPIModelName()), }, }, "NodeController": { SchemaProps: spec.SchemaProps{ Description: "NodeController holds configuration for node controller related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/cloud-provider/controllers/node/config/v1alpha1.NodeControllerConfiguration"), + Ref: ref(nodeconfigv1alpha1.NodeControllerConfiguration{}.OpenAPIModelName()), }, }, "ServiceController": { SchemaProps: spec.SchemaProps{ Description: "ServiceControllerConfiguration holds configuration for ServiceController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration"), + Ref: ref(serviceconfigv1alpha1.ServiceControllerConfiguration{}.OpenAPIModelName()), }, }, "NodeStatusUpdateFrequency": { SchemaProps: spec.SchemaProps{ Description: "NodeStatusUpdateFrequency is the frequency at which the controller updates nodes' status", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "Webhook": { SchemaProps: spec.SchemaProps{ Description: "Webhook is the configuration for cloud-controller-manager hosted webhooks", Default: map[string]interface{}{}, - Ref: ref("k8s.io/cloud-provider/config/v1alpha1.WebhookConfiguration"), + Ref: ref(configv1alpha1.WebhookConfiguration{}.OpenAPIModelName()), }, }, }, @@ -65271,7 +65351,7 @@ func schema_k8sio_cloud_provider_config_v1alpha1_CloudControllerManagerConfigura }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration", "k8s.io/cloud-provider/config/v1alpha1.WebhookConfiguration", "k8s.io/cloud-provider/controllers/node/config/v1alpha1.NodeControllerConfiguration", "k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration", "k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"}, + metav1.Duration{}.OpenAPIModelName(), configv1alpha1.KubeCloudSharedConfiguration{}.OpenAPIModelName(), configv1alpha1.WebhookConfiguration{}.OpenAPIModelName(), nodeconfigv1alpha1.NodeControllerConfiguration{}.OpenAPIModelName(), serviceconfigv1alpha1.ServiceControllerConfiguration{}.OpenAPIModelName(), controllermanagerconfigv1alpha1.GenericControllerManagerConfiguration{}.OpenAPIModelName()}, } } @@ -65316,7 +65396,7 @@ func schema_k8sio_cloud_provider_config_v1alpha1_KubeCloudSharedConfiguration(re SchemaProps: spec.SchemaProps{ Description: "CloudProviderConfiguration holds configuration for CloudProvider related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/cloud-provider/config/v1alpha1.CloudProviderConfiguration"), + Ref: ref(configv1alpha1.CloudProviderConfiguration{}.OpenAPIModelName()), }, }, "ExternalCloudVolumePlugin": { @@ -65346,13 +65426,13 @@ func schema_k8sio_cloud_provider_config_v1alpha1_KubeCloudSharedConfiguration(re "RouteReconciliationPeriod": { SchemaProps: spec.SchemaProps{ Description: "routeReconciliationPeriod is the period for reconciling routes created for Nodes by cloud provider..", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "NodeMonitorPeriod": { SchemaProps: spec.SchemaProps{ Description: "nodeMonitorPeriod is the period for syncing NodeStatus in NodeController.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "ClusterName": { @@ -65397,7 +65477,7 @@ func schema_k8sio_cloud_provider_config_v1alpha1_KubeCloudSharedConfiguration(re "NodeSyncPeriod": { SchemaProps: spec.SchemaProps{ Description: "nodeSyncPeriod is the period for syncing nodes from cloudprovider. Longer periods will result in fewer calls to cloud provider, but may delay addition of new nodes to cluster.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, @@ -65405,7 +65485,7 @@ func schema_k8sio_cloud_provider_config_v1alpha1_KubeCloudSharedConfiguration(re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/cloud-provider/config/v1alpha1.CloudProviderConfiguration"}, + metav1.Duration{}.OpenAPIModelName(), configv1alpha1.CloudProviderConfiguration{}.OpenAPIModelName()}, } } @@ -65438,6 +65518,223 @@ func schema_k8sio_cloud_provider_config_v1alpha1_WebhookConfiguration(ref common } } +func schema_controllers_node_config_v1alpha1_NodeControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeControllerConfiguration contains elements describing NodeController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentNodeSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "ConcurrentNodeSyncs is the number of workers concurrently synchronizing nodes", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"ConcurrentNodeSyncs"}, + }, + }, + } +} + +func schema_controllers_service_config_v1alpha1_ServiceControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceControllerConfiguration contains elements describing ServiceController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentServiceSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentServiceSyncs is the number of services that are allowed to sync concurrently. Larger number = more responsive service management, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"ConcurrentServiceSyncs"}, + }, + }, + } +} + +func schema_k8sio_component_base_config_v1alpha1_ClientConnectionConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClientConnectionConfiguration contains details for constructing a client.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kubeconfig": { + SchemaProps: spec.SchemaProps{ + Description: "kubeconfig is the path to a KubeConfig file.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "acceptContentTypes": { + SchemaProps: spec.SchemaProps{ + Description: "acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the default value of 'application/json'. This field will control all connections to the server used by a particular client.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "contentType": { + SchemaProps: spec.SchemaProps{ + Description: "contentType is the content type used when sending data to the server from this client.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "qps": { + SchemaProps: spec.SchemaProps{ + Description: "qps controls the number of queries per second allowed for this connection.", + Default: 0, + Type: []string{"number"}, + Format: "float", + }, + }, + "burst": { + SchemaProps: spec.SchemaProps{ + Description: "burst allows extra queries to accumulate when a client is exceeding its rate.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"kubeconfig", "acceptContentTypes", "contentType", "qps", "burst"}, + }, + }, + } +} + +func schema_k8sio_component_base_config_v1alpha1_DebuggingConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DebuggingConfiguration holds configuration for Debugging related features.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enableProfiling": { + SchemaProps: spec.SchemaProps{ + Description: "enableProfiling enables profiling via web interface host:port/debug/pprof/", + Type: []string{"boolean"}, + Format: "", + }, + }, + "enableContentionProfiling": { + SchemaProps: spec.SchemaProps{ + Description: "enableContentionProfiling enables block profiling, if enableProfiling is true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_component_base_config_v1alpha1_LeaderElectionConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LeaderElectionConfiguration defines the configuration of leader election clients for components that can run with leader election enabled.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "leaderElect": { + SchemaProps: spec.SchemaProps{ + Description: "leaderElect enables a leader election client to gain leadership before executing the main loop. Enable this when running replicated components for high availability.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "leaseDuration": { + SchemaProps: spec.SchemaProps{ + Description: "leaseDuration is the duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is enabled.", + Ref: ref(metav1.Duration{}.OpenAPIModelName()), + }, + }, + "renewDeadline": { + SchemaProps: spec.SchemaProps{ + Description: "renewDeadline is the interval between attempts by the acting master to renew a leadership slot before it stops leading. This must be less than or equal to the lease duration. This is only applicable if leader election is enabled.", + Ref: ref(metav1.Duration{}.OpenAPIModelName()), + }, + }, + "retryPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "retryPeriod is the duration the clients should wait between attempting acquisition and renewal of a leadership. This is only applicable if leader election is enabled.", + Ref: ref(metav1.Duration{}.OpenAPIModelName()), + }, + }, + "resourceLock": { + SchemaProps: spec.SchemaProps{ + Description: "resourceLock indicates the resource object type that will be used to lock during leader election cycles.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceName": { + SchemaProps: spec.SchemaProps{ + Description: "resourceName indicates the name of resource object that will be used to lock during leader election cycles.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "resourceName indicates the namespace of resource object that will be used to lock during leader election cycles.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"leaderElect", "leaseDuration", "renewDeadline", "retryPeriod", "resourceLock", "resourceName", "resourceNamespace"}, + }, + }, + Dependencies: []string{ + metav1.Duration{}.OpenAPIModelName()}, + } +} + +func schema_component_base_tracing_api_v1_TracingConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TracingConfiguration provides versioned configuration for OpenTelemetry tracing clients.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "endpoint": { + SchemaProps: spec.SchemaProps{ + Description: "Endpoint of the collector this component will report traces to. The connection is insecure, and does not currently support TLS. Recommended is unset, and endpoint is the otlp grpc default, localhost:4317.", + Type: []string{"string"}, + Format: "", + }, + }, + "samplingRatePerMillion": { + SchemaProps: spec.SchemaProps{ + Description: "SamplingRatePerMillion is the number of samples to collect per million spans. Recommended is unset. If unset, sampler respects its parent span's sampling rate, but otherwise never samples.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + func schema_k8sio_controller_manager_config_v1alpha1_ControllerLeaderConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -65494,27 +65791,27 @@ func schema_k8sio_controller_manager_config_v1alpha1_GenericControllerManagerCon "MinResyncPeriod": { SchemaProps: spec.SchemaProps{ Description: "minResyncPeriod is the resync period in reflectors; will be random between minResyncPeriod and 2*minResyncPeriod.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "ClientConnection": { SchemaProps: spec.SchemaProps{ Description: "ClientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), + Ref: ref(componentbaseconfigv1alpha1.ClientConnectionConfiguration{}.OpenAPIModelName()), }, }, "ControllerStartInterval": { SchemaProps: spec.SchemaProps{ Description: "How long to wait between starting controller managers", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "LeaderElection": { SchemaProps: spec.SchemaProps{ Description: "leaderElection defines the configuration of leader election client.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration"), + Ref: ref(componentbaseconfigv1alpha1.LeaderElectionConfiguration{}.OpenAPIModelName()), }, }, "Controllers": { @@ -65536,7 +65833,7 @@ func schema_k8sio_controller_manager_config_v1alpha1_GenericControllerManagerCon SchemaProps: spec.SchemaProps{ Description: "DebuggingConfiguration holds configuration for Debugging related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/component-base/config/v1alpha1.DebuggingConfiguration"), + Ref: ref(componentbaseconfigv1alpha1.DebuggingConfiguration{}.OpenAPIModelName()), }, }, "LeaderMigrationEnabled": { @@ -65551,7 +65848,7 @@ func schema_k8sio_controller_manager_config_v1alpha1_GenericControllerManagerCon SchemaProps: spec.SchemaProps{ Description: "LeaderMigration holds the configuration for Leader Migration.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/controller-manager/config/v1alpha1.LeaderMigrationConfiguration"), + Ref: ref(controllermanagerconfigv1alpha1.LeaderMigrationConfiguration{}.OpenAPIModelName()), }, }, }, @@ -65559,7 +65856,7 @@ func schema_k8sio_controller_manager_config_v1alpha1_GenericControllerManagerCon }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/component-base/config/v1alpha1.DebuggingConfiguration", "k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration", "k8s.io/controller-manager/config/v1alpha1.LeaderMigrationConfiguration"}, + metav1.Duration{}.OpenAPIModelName(), componentbaseconfigv1alpha1.ClientConnectionConfiguration{}.OpenAPIModelName(), componentbaseconfigv1alpha1.DebuggingConfiguration{}.OpenAPIModelName(), componentbaseconfigv1alpha1.LeaderElectionConfiguration{}.OpenAPIModelName(), controllermanagerconfigv1alpha1.LeaderMigrationConfiguration{}.OpenAPIModelName()}, } } @@ -65608,7 +65905,7 @@ func schema_k8sio_controller_manager_config_v1alpha1_LeaderMigrationConfiguratio Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/controller-manager/config/v1alpha1.ControllerLeaderConfiguration"), + Ref: ref(controllermanagerconfigv1alpha1.ControllerLeaderConfiguration{}.OpenAPIModelName()), }, }, }, @@ -65619,7 +65916,7 @@ func schema_k8sio_controller_manager_config_v1alpha1_LeaderMigrationConfiguratio }, }, Dependencies: []string{ - "k8s.io/controller-manager/config/v1alpha1.ControllerLeaderConfiguration"}, + controllermanagerconfigv1alpha1.ControllerLeaderConfiguration{}.OpenAPIModelName()}, } } @@ -65703,7 +66000,7 @@ func schema_k8sio_controller_manager_config_v1beta1_LeaderMigrationConfiguration Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/controller-manager/config/v1beta1.ControllerLeaderConfiguration"), + Ref: ref(configv1beta1.ControllerLeaderConfiguration{}.OpenAPIModelName()), }, }, }, @@ -65714,7 +66011,7 @@ func schema_k8sio_controller_manager_config_v1beta1_LeaderMigrationConfiguration }, }, Dependencies: []string{ - "k8s.io/controller-manager/config/v1beta1.ControllerLeaderConfiguration"}, + configv1beta1.ControllerLeaderConfiguration{}.OpenAPIModelName()}, } } @@ -65743,28 +66040,28 @@ func schema_pkg_apis_apiregistration_v1_APIService(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec contains information for locating and communicating with a server", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec"), + Ref: ref(apiregistrationv1.APIServiceSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status contains derived information about an API server", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus"), + Ref: ref(apiregistrationv1.APIServiceStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), apiregistrationv1.APIServiceSpec{}.OpenAPIModelName(), apiregistrationv1.APIServiceStatus{}.OpenAPIModelName()}, } } @@ -65794,7 +66091,7 @@ func schema_pkg_apis_apiregistration_v1_APIServiceCondition(ref common.Reference "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -65816,7 +66113,7 @@ func schema_pkg_apis_apiregistration_v1_APIServiceCondition(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -65845,7 +66142,7 @@ func schema_pkg_apis_apiregistration_v1_APIServiceList(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -65856,7 +66153,7 @@ func schema_pkg_apis_apiregistration_v1_APIServiceList(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService"), + Ref: ref(apiregistrationv1.APIService{}.OpenAPIModelName()), }, }, }, @@ -65867,7 +66164,7 @@ func schema_pkg_apis_apiregistration_v1_APIServiceList(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService"}, + metav1.ListMeta{}.OpenAPIModelName(), apiregistrationv1.APIService{}.OpenAPIModelName()}, } } @@ -65881,7 +66178,7 @@ func schema_pkg_apis_apiregistration_v1_APIServiceSpec(ref common.ReferenceCallb "service": { SchemaProps: spec.SchemaProps{ Description: "Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.", - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference"), + Ref: ref(apiregistrationv1.ServiceReference{}.OpenAPIModelName()), }, }, "group": { @@ -65938,7 +66235,7 @@ func schema_pkg_apis_apiregistration_v1_APIServiceSpec(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference"}, + apiregistrationv1.ServiceReference{}.OpenAPIModelName()}, } } @@ -65967,7 +66264,7 @@ func schema_pkg_apis_apiregistration_v1_APIServiceStatus(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition"), + Ref: ref(apiregistrationv1.APIServiceCondition{}.OpenAPIModelName()), }, }, }, @@ -65977,7 +66274,7 @@ func schema_pkg_apis_apiregistration_v1_APIServiceStatus(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition"}, + apiregistrationv1.APIServiceCondition{}.OpenAPIModelName()}, } } @@ -66040,28 +66337,28 @@ func schema_pkg_apis_apiregistration_v1beta1_APIService(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec contains information for locating and communicating with a server", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec"), + Ref: ref(apiregistrationv1beta1.APIServiceSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status contains derived information about an API server", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus"), + Ref: ref(apiregistrationv1beta1.APIServiceStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), apiregistrationv1beta1.APIServiceSpec{}.OpenAPIModelName(), apiregistrationv1beta1.APIServiceStatus{}.OpenAPIModelName()}, } } @@ -66091,7 +66388,7 @@ func schema_pkg_apis_apiregistration_v1beta1_APIServiceCondition(ref common.Refe "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -66113,7 +66410,7 @@ func schema_pkg_apis_apiregistration_v1beta1_APIServiceCondition(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -66142,7 +66439,7 @@ func schema_pkg_apis_apiregistration_v1beta1_APIServiceList(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -66153,7 +66450,7 @@ func schema_pkg_apis_apiregistration_v1beta1_APIServiceList(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService"), + Ref: ref(apiregistrationv1beta1.APIService{}.OpenAPIModelName()), }, }, }, @@ -66164,7 +66461,7 @@ func schema_pkg_apis_apiregistration_v1beta1_APIServiceList(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService"}, + metav1.ListMeta{}.OpenAPIModelName(), apiregistrationv1beta1.APIService{}.OpenAPIModelName()}, } } @@ -66178,7 +66475,7 @@ func schema_pkg_apis_apiregistration_v1beta1_APIServiceSpec(ref common.Reference "service": { SchemaProps: spec.SchemaProps{ Description: "Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.", - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference"), + Ref: ref(apiregistrationv1beta1.ServiceReference{}.OpenAPIModelName()), }, }, "group": { @@ -66235,7 +66532,7 @@ func schema_pkg_apis_apiregistration_v1beta1_APIServiceSpec(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference"}, + apiregistrationv1beta1.ServiceReference{}.OpenAPIModelName()}, } } @@ -66264,7 +66561,7 @@ func schema_pkg_apis_apiregistration_v1beta1_APIServiceStatus(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition"), + Ref: ref(apiregistrationv1beta1.APIServiceCondition{}.OpenAPIModelName()), }, }, }, @@ -66274,7 +66571,7 @@ func schema_pkg_apis_apiregistration_v1beta1_APIServiceStatus(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition"}, + apiregistrationv1beta1.APIServiceCondition{}.OpenAPIModelName()}, } } @@ -66330,7 +66627,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_AttachDetachController "ReconcilerSyncLoopPeriod": { SchemaProps: spec.SchemaProps{ Description: "ReconcilerSyncLoopPeriod is the amount of time the reconciler sync states loop wait between successive executions. Is set to 60 sec by default.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "disableForceDetachOnTimeout": { @@ -66346,7 +66643,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_AttachDetachController }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -66407,34 +66704,34 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningControllerCo SchemaProps: spec.SchemaProps{ Description: "kubeletServingSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kubelet-serving signer", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.CSRSigningConfiguration{}.OpenAPIModelName()), }, }, "KubeletClientSignerConfiguration": { SchemaProps: spec.SchemaProps{ Description: "kubeletClientSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kube-apiserver-client-kubelet", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.CSRSigningConfiguration{}.OpenAPIModelName()), }, }, "KubeAPIServerClientSignerConfiguration": { SchemaProps: spec.SchemaProps{ Description: "kubeAPIServerClientSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kube-apiserver-client", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.CSRSigningConfiguration{}.OpenAPIModelName()), }, }, "LegacyUnknownSignerConfiguration": { SchemaProps: spec.SchemaProps{ Description: "legacyUnknownSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/legacy-unknown", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.CSRSigningConfiguration{}.OpenAPIModelName()), }, }, "ClusterSigningDuration": { SchemaProps: spec.SchemaProps{ Description: "clusterSigningDuration is the max length of duration signed certificates will be given. Individual CSRs may request shorter certs by setting spec.expirationSeconds.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, @@ -66442,7 +66739,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningControllerCo }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"}, + metav1.Duration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.CSRSigningConfiguration{}.OpenAPIModelName()}, } } @@ -66541,7 +66838,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointControllerConf "EndpointUpdatesBatchPeriod": { SchemaProps: spec.SchemaProps{ Description: "EndpointUpdatesBatchPeriod describes the length of endpoint updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, @@ -66549,7 +66846,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointControllerConf }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -66579,7 +66876,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceControlle "EndpointUpdatesBatchPeriod": { SchemaProps: spec.SchemaProps{ Description: "EndpointUpdatesBatchPeriod describes the length of endpoint updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, @@ -66587,7 +66884,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceControlle }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -66617,7 +66914,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceMirroring "MirroringEndpointUpdatesBatchPeriod": { SchemaProps: spec.SchemaProps{ Description: "mirroringEndpointUpdatesBatchPeriod can be used to batch EndpointSlice updates. All updates triggered by EndpointSlice changes will be delayed by up to 'mirroringEndpointUpdatesBatchPeriod'. If other addresses in the same Endpoints resource change in that period, they will be batched to a single EndpointSlice update. Default 0 value means that each Endpoints update triggers an EndpointSlice update.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, @@ -66625,7 +66922,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceMirroring }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -66681,7 +66978,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_GarbageCollectorContro Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GroupResource"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.GroupResource{}.OpenAPIModelName()), }, }, }, @@ -66692,7 +66989,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_GarbageCollectorContro }, }, Dependencies: []string{ - "k8s.io/kube-controller-manager/config/v1alpha1.GroupResource"}, + kubecontrollermanagerconfigv1alpha1.GroupResource{}.OpenAPIModelName()}, } } @@ -66744,13 +67041,13 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfigura "HorizontalPodAutoscalerSyncPeriod": { SchemaProps: spec.SchemaProps{ Description: "HorizontalPodAutoscalerSyncPeriod is the period for syncing the number of pods in horizontal pod autoscaler.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "HorizontalPodAutoscalerDownscaleStabilizationWindow": { SchemaProps: spec.SchemaProps{ Description: "HorizontalPodAutoscalerDowncaleStabilizationWindow is a period for which autoscaler will look backwards and not scale down below any recommendation it made during that period.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "HorizontalPodAutoscalerTolerance": { @@ -66764,13 +67061,13 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfigura "HorizontalPodAutoscalerCPUInitializationPeriod": { SchemaProps: spec.SchemaProps{ Description: "HorizontalPodAutoscalerCPUInitializationPeriod is the period after pod start when CPU samples might be skipped.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "HorizontalPodAutoscalerInitialReadinessDelay": { SchemaProps: spec.SchemaProps{ Description: "HorizontalPodAutoscalerInitialReadinessDelay is period after pod start during which readiness changes are treated as readiness being set for the first time. The only effect of this is that HPA will disregard CPU samples from unready pods that had last readiness change during that period.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, @@ -66778,7 +67075,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfigura }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -66829,203 +67126,203 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_KubeControllerManagerC SchemaProps: spec.SchemaProps{ Description: "Generic holds configuration for a generic controller-manager", Default: map[string]interface{}{}, - Ref: ref("k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"), + Ref: ref(controllermanagerconfigv1alpha1.GenericControllerManagerConfiguration{}.OpenAPIModelName()), }, }, "KubeCloudShared": { SchemaProps: spec.SchemaProps{ Description: "KubeCloudSharedConfiguration holds configuration for shared related features both in cloud controller manager and kube-controller manager.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration"), + Ref: ref(configv1alpha1.KubeCloudSharedConfiguration{}.OpenAPIModelName()), }, }, "AttachDetachController": { SchemaProps: spec.SchemaProps{ Description: "AttachDetachControllerConfiguration holds configuration for AttachDetachController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.AttachDetachControllerConfiguration{}.OpenAPIModelName()), }, }, "CSRSigningController": { SchemaProps: spec.SchemaProps{ Description: "CSRSigningControllerConfiguration holds configuration for CSRSigningController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.CSRSigningControllerConfiguration{}.OpenAPIModelName()), }, }, "DaemonSetController": { SchemaProps: spec.SchemaProps{ Description: "DaemonSetControllerConfiguration holds configuration for DaemonSetController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.DaemonSetControllerConfiguration{}.OpenAPIModelName()), }, }, "DeploymentController": { SchemaProps: spec.SchemaProps{ Description: "DeploymentControllerConfiguration holds configuration for DeploymentController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.DeploymentControllerConfiguration{}.OpenAPIModelName()), }, }, "StatefulSetController": { SchemaProps: spec.SchemaProps{ Description: "StatefulSetControllerConfiguration holds configuration for StatefulSetController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.StatefulSetControllerConfiguration{}.OpenAPIModelName()), }, }, "DeprecatedController": { SchemaProps: spec.SchemaProps{ Description: "DeprecatedControllerConfiguration holds configuration for some deprecated features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.DeprecatedControllerConfiguration{}.OpenAPIModelName()), }, }, "EndpointController": { SchemaProps: spec.SchemaProps{ Description: "EndpointControllerConfiguration holds configuration for EndpointController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.EndpointControllerConfiguration{}.OpenAPIModelName()), }, }, "EndpointSliceController": { SchemaProps: spec.SchemaProps{ Description: "EndpointSliceControllerConfiguration holds configuration for EndpointSliceController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.EndpointSliceControllerConfiguration{}.OpenAPIModelName()), }, }, "EndpointSliceMirroringController": { SchemaProps: spec.SchemaProps{ Description: "EndpointSliceMirroringControllerConfiguration holds configuration for EndpointSliceMirroringController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceMirroringControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.EndpointSliceMirroringControllerConfiguration{}.OpenAPIModelName()), }, }, "EphemeralVolumeController": { SchemaProps: spec.SchemaProps{ Description: "EphemeralVolumeControllerConfiguration holds configuration for EphemeralVolumeController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EphemeralVolumeControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.EphemeralVolumeControllerConfiguration{}.OpenAPIModelName()), }, }, "GarbageCollectorController": { SchemaProps: spec.SchemaProps{ Description: "GarbageCollectorControllerConfiguration holds configuration for GarbageCollectorController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.GarbageCollectorControllerConfiguration{}.OpenAPIModelName()), }, }, "HPAController": { SchemaProps: spec.SchemaProps{ Description: "HPAControllerConfiguration holds configuration for HPAController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.HPAControllerConfiguration{}.OpenAPIModelName()), }, }, "JobController": { SchemaProps: spec.SchemaProps{ Description: "JobControllerConfiguration holds configuration for JobController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.JobControllerConfiguration{}.OpenAPIModelName()), }, }, "CronJobController": { SchemaProps: spec.SchemaProps{ Description: "CronJobControllerConfiguration holds configuration for CronJobController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CronJobControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.CronJobControllerConfiguration{}.OpenAPIModelName()), }, }, "LegacySATokenCleaner": { SchemaProps: spec.SchemaProps{ Description: "LegacySATokenCleanerConfiguration holds configuration for LegacySATokenCleaner related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.LegacySATokenCleanerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.LegacySATokenCleanerConfiguration{}.OpenAPIModelName()), }, }, "NamespaceController": { SchemaProps: spec.SchemaProps{ Description: "NamespaceControllerConfiguration holds configuration for NamespaceController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.NamespaceControllerConfiguration{}.OpenAPIModelName()), }, }, "NodeIPAMController": { SchemaProps: spec.SchemaProps{ Description: "NodeIPAMControllerConfiguration holds configuration for NodeIPAMController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.NodeIPAMControllerConfiguration{}.OpenAPIModelName()), }, }, "NodeLifecycleController": { SchemaProps: spec.SchemaProps{ Description: "NodeLifecycleControllerConfiguration holds configuration for NodeLifecycleController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.NodeLifecycleControllerConfiguration{}.OpenAPIModelName()), }, }, "PersistentVolumeBinderController": { SchemaProps: spec.SchemaProps{ Description: "PersistentVolumeBinderControllerConfiguration holds configuration for PersistentVolumeBinderController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.PersistentVolumeBinderControllerConfiguration{}.OpenAPIModelName()), }, }, "PodGCController": { SchemaProps: spec.SchemaProps{ Description: "PodGCControllerConfiguration holds configuration for PodGCController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.PodGCControllerConfiguration{}.OpenAPIModelName()), }, }, "ReplicaSetController": { SchemaProps: spec.SchemaProps{ Description: "ReplicaSetControllerConfiguration holds configuration for ReplicaSet related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.ReplicaSetControllerConfiguration{}.OpenAPIModelName()), }, }, "ReplicationController": { SchemaProps: spec.SchemaProps{ Description: "ReplicationControllerConfiguration holds configuration for ReplicationController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.ReplicationControllerConfiguration{}.OpenAPIModelName()), }, }, "ResourceQuotaController": { SchemaProps: spec.SchemaProps{ Description: "ResourceQuotaControllerConfiguration holds configuration for ResourceQuotaController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.ResourceQuotaControllerConfiguration{}.OpenAPIModelName()), }, }, "SAController": { SchemaProps: spec.SchemaProps{ Description: "SAControllerConfiguration holds configuration for ServiceAccountController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.SAControllerConfiguration{}.OpenAPIModelName()), }, }, "ServiceController": { SchemaProps: spec.SchemaProps{ Description: "ServiceControllerConfiguration holds configuration for ServiceController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration"), + Ref: ref(serviceconfigv1alpha1.ServiceControllerConfiguration{}.OpenAPIModelName()), }, }, "TTLAfterFinishedController": { SchemaProps: spec.SchemaProps{ Description: "TTLAfterFinishedControllerConfiguration holds configuration for TTLAfterFinishedController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.TTLAfterFinishedControllerConfiguration{}.OpenAPIModelName()), }, }, "ValidatingAdmissionPolicyStatusController": { SchemaProps: spec.SchemaProps{ Description: "ValidatingAdmissionPolicyStatusControllerConfiguration holds configuration for ValidatingAdmissionPolicyStatusController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ValidatingAdmissionPolicyStatusControllerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.ValidatingAdmissionPolicyStatusControllerConfiguration{}.OpenAPIModelName()), }, }, }, @@ -67033,7 +67330,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_KubeControllerManagerC }, }, Dependencies: []string{ - "k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration", "k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration", "k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.CronJobControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceMirroringControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EphemeralVolumeControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.LegacySATokenCleanerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ValidatingAdmissionPolicyStatusControllerConfiguration"}, + configv1alpha1.KubeCloudSharedConfiguration{}.OpenAPIModelName(), serviceconfigv1alpha1.ServiceControllerConfiguration{}.OpenAPIModelName(), controllermanagerconfigv1alpha1.GenericControllerManagerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.AttachDetachControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.CSRSigningControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.CronJobControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.DaemonSetControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.DeploymentControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.DeprecatedControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.EndpointControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.EndpointSliceControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.EndpointSliceMirroringControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.EphemeralVolumeControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.GarbageCollectorControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.HPAControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.JobControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.LegacySATokenCleanerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.NamespaceControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.NodeIPAMControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.NodeLifecycleControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.PersistentVolumeBinderControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.PodGCControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.ReplicaSetControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.ReplicationControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.ResourceQuotaControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.SAControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.StatefulSetControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.TTLAfterFinishedControllerConfiguration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.ValidatingAdmissionPolicyStatusControllerConfiguration{}.OpenAPIModelName()}, } } @@ -67047,7 +67344,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_LegacySATokenCleanerCo "CleanUpPeriod": { SchemaProps: spec.SchemaProps{ Description: "CleanUpPeriod is the period of time since the last usage of an auto-generated service account token before it can be deleted.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, @@ -67055,7 +67352,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_LegacySATokenCleanerCo }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -67069,7 +67366,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_NamespaceControllerCon "NamespaceSyncPeriod": { SchemaProps: spec.SchemaProps{ Description: "namespaceSyncPeriod is the period for syncing namespace life-cycle updates.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "ConcurrentNamespaceSyncs": { @@ -67085,7 +67382,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_NamespaceControllerCon }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -67169,19 +67466,19 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_NodeLifecycleControlle "NodeStartupGracePeriod": { SchemaProps: spec.SchemaProps{ Description: "nodeStartupGracePeriod is the amount of time which we allow starting a node to be unresponsive before marking it unhealthy.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "NodeMonitorGracePeriod": { SchemaProps: spec.SchemaProps{ Description: "nodeMontiorGracePeriod is the amount of time which we allow a running node to be unresponsive before marking it unhealthy. Must be N times more than kubelet's nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet to post node status. This value should also be greater than the sum of HTTP2_PING_TIMEOUT_SECONDS and HTTP2_READ_IDLE_TIMEOUT_SECONDS.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "PodEvictionTimeout": { SchemaProps: spec.SchemaProps{ Description: "podEvictionTimeout is the grace period for deleting pods on failed nodes.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "LargeClusterSizeThreshold": { @@ -67205,7 +67502,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_NodeLifecycleControlle }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -67219,14 +67516,14 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeBinder "PVClaimBinderSyncPeriod": { SchemaProps: spec.SchemaProps{ Description: "pvClaimBinderSyncPeriod is the period for syncing persistent volumes and persistent volume claims.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "VolumeConfiguration": { SchemaProps: spec.SchemaProps{ Description: "volumeConfiguration holds configuration for volume related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.VolumeConfiguration{}.OpenAPIModelName()), }, }, }, @@ -67234,7 +67531,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeBinder }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration"}, + metav1.Duration{}.OpenAPIModelName(), kubecontrollermanagerconfigv1alpha1.VolumeConfiguration{}.OpenAPIModelName()}, } } @@ -67384,7 +67681,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_ResourceQuotaControlle "ResourceQuotaSyncPeriod": { SchemaProps: spec.SchemaProps{ Description: "resourceQuotaSyncPeriod is the period for syncing quota usage status in the system.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "ConcurrentResourceQuotaSyncs": { @@ -67400,7 +67697,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_ResourceQuotaControlle }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -67533,7 +67830,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_VolumeConfiguration(re SchemaProps: spec.SchemaProps{ Description: "persistentVolumeRecyclerConfiguration holds configuration for persistent volume plugins.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration"), + Ref: ref(kubecontrollermanagerconfigv1alpha1.PersistentVolumeRecyclerConfiguration{}.OpenAPIModelName()), }, }, "FlexVolumePluginDir": { @@ -67549,7 +67846,7 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_VolumeConfiguration(re }, }, Dependencies: []string{ - "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration"}, + kubecontrollermanagerconfigv1alpha1.PersistentVolumeRecyclerConfiguration{}.OpenAPIModelName()}, } } @@ -67624,14 +67921,14 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref common.R SchemaProps: spec.SchemaProps{ Description: "clientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), + Ref: ref(componentbaseconfigv1alpha1.ClientConnectionConfiguration{}.OpenAPIModelName()), }, }, "logging": { SchemaProps: spec.SchemaProps{ Description: "logging specifies the options of logging. Refer to [Logs Options](https://github.com/kubernetes/component-base/blob/master/logs/options.go) for more information.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/component-base/logs/api/v1.LoggingConfiguration"), + Ref: ref(logsapiv1.LoggingConfiguration{}.OpenAPIModelName()), }, }, "hostnameOverride": { @@ -67702,28 +67999,28 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref common.R SchemaProps: spec.SchemaProps{ Description: "iptables contains iptables-related configuration options.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration"), + Ref: ref(kubeproxyconfigv1alpha1.KubeProxyIPTablesConfiguration{}.OpenAPIModelName()), }, }, "ipvs": { SchemaProps: spec.SchemaProps{ Description: "ipvs contains ipvs-related configuration options.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration"), + Ref: ref(kubeproxyconfigv1alpha1.KubeProxyIPVSConfiguration{}.OpenAPIModelName()), }, }, "nftables": { SchemaProps: spec.SchemaProps{ Description: "nftables contains nftables-related configuration options.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyNFTablesConfiguration"), + Ref: ref(kubeproxyconfigv1alpha1.KubeProxyNFTablesConfiguration{}.OpenAPIModelName()), }, }, "winkernel": { SchemaProps: spec.SchemaProps{ Description: "winkernel contains winkernel-related configuration options.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration"), + Ref: ref(kubeproxyconfigv1alpha1.KubeProxyWinkernelConfiguration{}.OpenAPIModelName()), }, }, "detectLocalMode": { @@ -67738,7 +68035,7 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref common.R SchemaProps: spec.SchemaProps{ Description: "detectLocal contains optional configuration settings related to DetectLocalMode.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-proxy/config/v1alpha1.DetectLocalConfiguration"), + Ref: ref(kubeproxyconfigv1alpha1.DetectLocalConfiguration{}.OpenAPIModelName()), }, }, "clusterCIDR": { @@ -67775,13 +68072,13 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref common.R SchemaProps: spec.SchemaProps{ Description: "conntrack contains conntrack-related configuration options.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration"), + Ref: ref(kubeproxyconfigv1alpha1.KubeProxyConntrackConfiguration{}.OpenAPIModelName()), }, }, "configSyncPeriod": { SchemaProps: spec.SchemaProps{ Description: "configSyncPeriod is how often configuration from the apiserver is refreshed. Must be greater than 0.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "portRange": { @@ -67804,7 +68101,7 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref common.R }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/component-base/logs/api/v1.LoggingConfiguration", "k8s.io/kube-proxy/config/v1alpha1.DetectLocalConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyNFTablesConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration"}, + metav1.Duration{}.OpenAPIModelName(), componentbaseconfigv1alpha1.ClientConnectionConfiguration{}.OpenAPIModelName(), logsapiv1.LoggingConfiguration{}.OpenAPIModelName(), kubeproxyconfigv1alpha1.DetectLocalConfiguration{}.OpenAPIModelName(), kubeproxyconfigv1alpha1.KubeProxyConntrackConfiguration{}.OpenAPIModelName(), kubeproxyconfigv1alpha1.KubeProxyIPTablesConfiguration{}.OpenAPIModelName(), kubeproxyconfigv1alpha1.KubeProxyIPVSConfiguration{}.OpenAPIModelName(), kubeproxyconfigv1alpha1.KubeProxyNFTablesConfiguration{}.OpenAPIModelName(), kubeproxyconfigv1alpha1.KubeProxyWinkernelConfiguration{}.OpenAPIModelName()}, } } @@ -67832,13 +68129,13 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConntrackConfiguration(ref "tcpEstablishedTimeout": { SchemaProps: spec.SchemaProps{ Description: "tcpEstablishedTimeout is how long an idle TCP connection will be kept open (e.g. '2s'). Must be greater than 0 to set.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "tcpCloseWaitTimeout": { SchemaProps: spec.SchemaProps{ Description: "tcpCloseWaitTimeout is how long an idle conntrack entry in CLOSE_WAIT state will remain in the conntrack table. (e.g. '60s'). Must be greater than 0 to set.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "tcpBeLiberal": { @@ -67852,13 +68149,13 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConntrackConfiguration(ref "udpTimeout": { SchemaProps: spec.SchemaProps{ Description: "udpTimeout is how long an idle UDP conntrack entry in UNREPLIED state will remain in the conntrack table (e.g. '30s'). Must be greater than 0 to set.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "udpStreamTimeout": { SchemaProps: spec.SchemaProps{ Description: "udpStreamTimeout is how long an idle UDP conntrack entry in ASSURED state will remain in the conntrack table (e.g. '300s'). Must be greater than 0 to set.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, @@ -67866,7 +68163,7 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConntrackConfiguration(ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -67902,13 +68199,13 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref "syncPeriod": { SchemaProps: spec.SchemaProps{ Description: "syncPeriod is an interval (e.g. '5s', '1m', '2h22m') indicating how frequently various re-synchronizing and cleanup operations are performed. Must be greater than 0.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "minSyncPeriod": { SchemaProps: spec.SchemaProps{ Description: "minSyncPeriod is the minimum period between iptables rule resyncs (e.g. '5s', '1m', '2h22m'). A value of 0 means every Service or EndpointSlice change will result in an immediate iptables resync.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, @@ -67916,7 +68213,7 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -67930,13 +68227,13 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref comm "syncPeriod": { SchemaProps: spec.SchemaProps{ Description: "syncPeriod is an interval (e.g. '5s', '1m', '2h22m') indicating how frequently various re-synchronizing and cleanup operations are performed. Must be greater than 0.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "minSyncPeriod": { SchemaProps: spec.SchemaProps{ Description: "minSyncPeriod is the minimum period between IPVS rule resyncs (e.g. '5s', '1m', '2h22m'). A value of 0 means every Service or EndpointSlice change will result in an immediate IPVS resync.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "scheduler": { @@ -67973,19 +68270,19 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref comm "tcpTimeout": { SchemaProps: spec.SchemaProps{ Description: "tcpTimeout is the timeout value used for idle IPVS TCP sessions. The default value is 0, which preserves the current timeout value on the system.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "tcpFinTimeout": { SchemaProps: spec.SchemaProps{ Description: "tcpFinTimeout is the timeout value used for IPVS TCP sessions after receiving a FIN. The default value is 0, which preserves the current timeout value on the system.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "udpTimeout": { SchemaProps: spec.SchemaProps{ Description: "udpTimeout is the timeout value used for IPVS UDP packets. The default value is 0, which preserves the current timeout value on the system.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, @@ -67993,7 +68290,7 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -68022,13 +68319,13 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyNFTablesConfiguration(ref "syncPeriod": { SchemaProps: spec.SchemaProps{ Description: "syncPeriod is an interval (e.g. '5s', '1m', '2h22m') indicating how frequently various re-synchronizing and cleanup operations are performed. Must be greater than 0.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "minSyncPeriod": { SchemaProps: spec.SchemaProps{ Description: "minSyncPeriod is the minimum period between iptables rule resyncs (e.g. '5s', '1m', '2h22m'). A value of 0 means every Service or EndpointSlice change will result in an immediate iptables resync.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, @@ -68036,7 +68333,7 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyNFTablesConfiguration(ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -68159,7 +68456,7 @@ func schema_k8sio_kube_scheduler_config_v1_DynamicResourcesArgs(ref common.Refer "filterTimeout": { SchemaProps: spec.SchemaProps{ Description: "FilterTimeout limits the amount of time that the filter operation may take per node to search for devices that can be allocated to scheduler a pod to that node.\n\nIn typical scenarios, this operation should complete in 10 to 200 milliseconds, but could also be longer depending on the number of requests per ResourceClaim, number of ResourceClaims, number of published devices in ResourceSlices, and the complexity of the requests. Other checks besides CEL evaluation also take time (usage checks, match attributes, etc.).\n\nTherefore the scheduler plugin applies this timeout. If the timeout is reached, the Pod is considered unschedulable for the node. If filtering succeeds for some other node(s), those are picked instead. If filtering fails for all of them, the Pod is placed in the unschedulable queue. It will get checked again if changes in e.g. ResourceSlices or ResourceClaims indicate that another scheduling attempt might succeed. If this fails repeatedly, exponential backoff slows down future attempts.\n\nThe default is 10 seconds. This is sufficient to prevent worst-case scenarios while not impacting normal usage of DRA. However, slow filtering can slow down Pod scheduling also for Pods not using DRA. Administators can reduce the timeout after checking the `scheduler_framework_extension_point_duration_seconds` metrics.\n\nSetting it to zero completely disables the timeout.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, @@ -68167,7 +68464,7 @@ func schema_k8sio_kube_scheduler_config_v1_DynamicResourcesArgs(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -68231,13 +68528,13 @@ func schema_k8sio_kube_scheduler_config_v1_Extender(ref common.ReferenceCallback "tlsConfig": { SchemaProps: spec.SchemaProps{ Description: "TLSConfig specifies the transport layer security config", - Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"), + Ref: ref(configv1.ExtenderTLSConfig{}.OpenAPIModelName()), }, }, "httpTimeout": { SchemaProps: spec.SchemaProps{ Description: "HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize timeout is ignored, k8s/other extenders priorities are used to select the node.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeCacheCapable": { @@ -68260,7 +68557,7 @@ func schema_k8sio_kube_scheduler_config_v1_Extender(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderManagedResource"), + Ref: ref(configv1.ExtenderManagedResource{}.OpenAPIModelName()), }, }, }, @@ -68278,7 +68575,7 @@ func schema_k8sio_kube_scheduler_config_v1_Extender(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-scheduler/config/v1.ExtenderManagedResource", "k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"}, + metav1.Duration{}.OpenAPIModelName(), configv1.ExtenderManagedResource{}.OpenAPIModelName(), configv1.ExtenderTLSConfig{}.OpenAPIModelName()}, } } @@ -68470,14 +68767,14 @@ func schema_k8sio_kube_scheduler_config_v1_KubeSchedulerConfiguration(ref common SchemaProps: spec.SchemaProps{ Description: "LeaderElection defines the configuration of leader election client.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration"), + Ref: ref(componentbaseconfigv1alpha1.LeaderElectionConfiguration{}.OpenAPIModelName()), }, }, "clientConnection": { SchemaProps: spec.SchemaProps{ Description: "ClientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), + Ref: ref(componentbaseconfigv1alpha1.ClientConnectionConfiguration{}.OpenAPIModelName()), }, }, "enableProfiling": { @@ -68531,7 +68828,7 @@ func schema_k8sio_kube_scheduler_config_v1_KubeSchedulerConfiguration(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.KubeSchedulerProfile"), + Ref: ref(configv1.KubeSchedulerProfile{}.OpenAPIModelName()), }, }, }, @@ -68550,7 +68847,7 @@ func schema_k8sio_kube_scheduler_config_v1_KubeSchedulerConfiguration(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.Extender"), + Ref: ref(configv1.Extender{}.OpenAPIModelName()), }, }, }, @@ -68568,7 +68865,7 @@ func schema_k8sio_kube_scheduler_config_v1_KubeSchedulerConfiguration(ref common }, }, Dependencies: []string{ - "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration", "k8s.io/kube-scheduler/config/v1.Extender", "k8s.io/kube-scheduler/config/v1.KubeSchedulerProfile"}, + componentbaseconfigv1alpha1.ClientConnectionConfiguration{}.OpenAPIModelName(), componentbaseconfigv1alpha1.LeaderElectionConfiguration{}.OpenAPIModelName(), configv1.Extender{}.OpenAPIModelName(), configv1.KubeSchedulerProfile{}.OpenAPIModelName()}, } } @@ -68596,7 +68893,7 @@ func schema_k8sio_kube_scheduler_config_v1_KubeSchedulerProfile(ref common.Refer "plugins": { SchemaProps: spec.SchemaProps{ Description: "Plugins specify the set of plugins that should be enabled or disabled. Enabled plugins are the ones that should be enabled in addition to the default plugins. Disabled plugins are any of the default plugins that should be disabled. When no enabled or disabled plugin is specified for an extension point, default plugins for that extension point will be used if there is any. If a QueueSort plugin is specified, the same QueueSort Plugin and PluginConfig must be specified for all profiles.", - Ref: ref("k8s.io/kube-scheduler/config/v1.Plugins"), + Ref: ref(configv1.Plugins{}.OpenAPIModelName()), }, }, "pluginConfig": { @@ -68615,7 +68912,7 @@ func schema_k8sio_kube_scheduler_config_v1_KubeSchedulerProfile(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PluginConfig"), + Ref: ref(configv1.PluginConfig{}.OpenAPIModelName()), }, }, }, @@ -68625,7 +68922,7 @@ func schema_k8sio_kube_scheduler_config_v1_KubeSchedulerProfile(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.PluginConfig", "k8s.io/kube-scheduler/config/v1.Plugins"}, + configv1.PluginConfig{}.OpenAPIModelName(), configv1.Plugins{}.OpenAPIModelName()}, } } @@ -68653,14 +68950,14 @@ func schema_k8sio_kube_scheduler_config_v1_NodeAffinityArgs(ref common.Reference "addedAffinity": { SchemaProps: spec.SchemaProps{ Description: "AddedAffinity is applied to all Pods additionally to the NodeAffinity specified in the PodSpec. That is, Nodes need to satisfy AddedAffinity AND .spec.NodeAffinity. AddedAffinity is empty by default (all Nodes match). When AddedAffinity is used, some Pods with affinity requirements that match a specific Node (such as Daemonset Pods) might remain unschedulable.", - Ref: ref("k8s.io/api/core/v1.NodeAffinity"), + Ref: ref(corev1.NodeAffinity{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeAffinity"}, + corev1.NodeAffinity{}.OpenAPIModelName()}, } } @@ -68701,7 +68998,7 @@ func schema_k8sio_kube_scheduler_config_v1_NodeResourcesBalancedAllocationArgs(r Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.ResourceSpec"), + Ref: ref(configv1.ResourceSpec{}.OpenAPIModelName()), }, }, }, @@ -68711,7 +69008,7 @@ func schema_k8sio_kube_scheduler_config_v1_NodeResourcesBalancedAllocationArgs(r }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.ResourceSpec"}, + configv1.ResourceSpec{}.OpenAPIModelName()}, } } @@ -68779,14 +69076,14 @@ func schema_k8sio_kube_scheduler_config_v1_NodeResourcesFitArgs(ref common.Refer "scoringStrategy": { SchemaProps: spec.SchemaProps{ Description: "ScoringStrategy selects the node resource scoring strategy. The default strategy is LeastAllocated with an equal \"cpu\" and \"memory\" weight.", - Ref: ref("k8s.io/kube-scheduler/config/v1.ScoringStrategy"), + Ref: ref(configv1.ScoringStrategy{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.ScoringStrategy"}, + configv1.ScoringStrategy{}.OpenAPIModelName()}, } } @@ -68837,7 +69134,7 @@ func schema_k8sio_kube_scheduler_config_v1_PluginConfig(ref common.ReferenceCall "args": { SchemaProps: spec.SchemaProps{ Description: "Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -68845,7 +69142,7 @@ func schema_k8sio_kube_scheduler_config_v1_PluginConfig(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -68869,7 +69166,7 @@ func schema_k8sio_kube_scheduler_config_v1_PluginSet(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.Plugin"), + Ref: ref(configv1.Plugin{}.OpenAPIModelName()), }, }, }, @@ -68891,7 +69188,7 @@ func schema_k8sio_kube_scheduler_config_v1_PluginSet(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.Plugin"), + Ref: ref(configv1.Plugin{}.OpenAPIModelName()), }, }, }, @@ -68901,7 +69198,7 @@ func schema_k8sio_kube_scheduler_config_v1_PluginSet(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.Plugin"}, + configv1.Plugin{}.OpenAPIModelName()}, } } @@ -68916,98 +69213,98 @@ func schema_k8sio_kube_scheduler_config_v1_Plugins(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "PreEnqueue is a list of plugins that should be invoked before adding pods to the scheduling queue.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PluginSet"), + Ref: ref(configv1.PluginSet{}.OpenAPIModelName()), }, }, "queueSort": { SchemaProps: spec.SchemaProps{ Description: "QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PluginSet"), + Ref: ref(configv1.PluginSet{}.OpenAPIModelName()), }, }, "preFilter": { SchemaProps: spec.SchemaProps{ Description: "PreFilter is a list of plugins that should be invoked at \"PreFilter\" extension point of the scheduling framework.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PluginSet"), + Ref: ref(configv1.PluginSet{}.OpenAPIModelName()), }, }, "filter": { SchemaProps: spec.SchemaProps{ Description: "Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PluginSet"), + Ref: ref(configv1.PluginSet{}.OpenAPIModelName()), }, }, "postFilter": { SchemaProps: spec.SchemaProps{ Description: "PostFilter is a list of plugins that are invoked after filtering phase, but only when no feasible nodes were found for the pod.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PluginSet"), + Ref: ref(configv1.PluginSet{}.OpenAPIModelName()), }, }, "preScore": { SchemaProps: spec.SchemaProps{ Description: "PreScore is a list of plugins that are invoked before scoring.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PluginSet"), + Ref: ref(configv1.PluginSet{}.OpenAPIModelName()), }, }, "score": { SchemaProps: spec.SchemaProps{ Description: "Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PluginSet"), + Ref: ref(configv1.PluginSet{}.OpenAPIModelName()), }, }, "reserve": { SchemaProps: spec.SchemaProps{ Description: "Reserve is a list of plugins invoked when reserving/unreserving resources after a node is assigned to run the pod.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PluginSet"), + Ref: ref(configv1.PluginSet{}.OpenAPIModelName()), }, }, "permit": { SchemaProps: spec.SchemaProps{ Description: "Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PluginSet"), + Ref: ref(configv1.PluginSet{}.OpenAPIModelName()), }, }, "preBind": { SchemaProps: spec.SchemaProps{ Description: "PreBind is a list of plugins that should be invoked before a pod is bound.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PluginSet"), + Ref: ref(configv1.PluginSet{}.OpenAPIModelName()), }, }, "bind": { SchemaProps: spec.SchemaProps{ Description: "Bind is a list of plugins that should be invoked at \"Bind\" extension point of the scheduling framework. The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PluginSet"), + Ref: ref(configv1.PluginSet{}.OpenAPIModelName()), }, }, "postBind": { SchemaProps: spec.SchemaProps{ Description: "PostBind is a list of plugins that should be invoked after a pod is successfully bound.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PluginSet"), + Ref: ref(configv1.PluginSet{}.OpenAPIModelName()), }, }, "multiPoint": { SchemaProps: spec.SchemaProps{ Description: "MultiPoint is a simplified config section to enable plugins for all valid extension points. Plugins enabled through MultiPoint will automatically register for every individual extension point the plugin has implemented. Disabling a plugin through MultiPoint disables that behavior. The same is true for disabling \"*\" through MultiPoint (no default plugins will be automatically registered). Plugins can still be disabled through their individual extension points.\n\nIn terms of precedence, plugin config follows this basic hierarchy\n 1. Specific extension points\n 2. Explicitly configured MultiPoint plugins\n 3. The set of default plugins, as MultiPoint plugins\nThis implies that a higher precedence plugin will run first and overwrite any settings within MultiPoint. Explicitly user-configured plugins also take a higher precedence over default plugins. Within this hierarchy, an Enabled setting takes precedence over Disabled. For example, if a plugin is set in both `multiPoint.Enabled` and `multiPoint.Disabled`, the plugin will be enabled. Similarly, including `multiPoint.Disabled = '*'` and `multiPoint.Enabled = pluginA` will still register that specific plugin through MultiPoint. This follows the same behavior as all other extension point configurations.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PluginSet"), + Ref: ref(configv1.PluginSet{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.PluginSet"}, + configv1.PluginSet{}.OpenAPIModelName()}, } } @@ -69045,7 +69342,7 @@ func schema_k8sio_kube_scheduler_config_v1_PodTopologySpreadArgs(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.TopologySpreadConstraint"), + Ref: ref(corev1.TopologySpreadConstraint{}.OpenAPIModelName()), }, }, }, @@ -69062,7 +69359,7 @@ func schema_k8sio_kube_scheduler_config_v1_PodTopologySpreadArgs(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/core/v1.TopologySpreadConstraint"}, + corev1.TopologySpreadConstraint{}.OpenAPIModelName()}, } } @@ -69086,7 +69383,7 @@ func schema_k8sio_kube_scheduler_config_v1_RequestedToCapacityRatioParam(ref com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.UtilizationShapePoint"), + Ref: ref(configv1.UtilizationShapePoint{}.OpenAPIModelName()), }, }, }, @@ -69096,7 +69393,7 @@ func schema_k8sio_kube_scheduler_config_v1_RequestedToCapacityRatioParam(ref com }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.UtilizationShapePoint"}, + configv1.UtilizationShapePoint{}.OpenAPIModelName()}, } } @@ -69159,7 +69456,7 @@ func schema_k8sio_kube_scheduler_config_v1_ScoringStrategy(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.ResourceSpec"), + Ref: ref(configv1.ResourceSpec{}.OpenAPIModelName()), }, }, }, @@ -69168,14 +69465,14 @@ func schema_k8sio_kube_scheduler_config_v1_ScoringStrategy(ref common.ReferenceC "requestedToCapacityRatio": { SchemaProps: spec.SchemaProps{ Description: "Arguments specific to RequestedToCapacityRatio strategy.", - Ref: ref("k8s.io/kube-scheduler/config/v1.RequestedToCapacityRatioParam"), + Ref: ref(configv1.RequestedToCapacityRatioParam{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.RequestedToCapacityRatioParam", "k8s.io/kube-scheduler/config/v1.ResourceSpec"}, + configv1.RequestedToCapacityRatioParam{}.OpenAPIModelName(), configv1.ResourceSpec{}.OpenAPIModelName()}, } } @@ -69250,7 +69547,7 @@ func schema_k8sio_kube_scheduler_config_v1_VolumeBindingArgs(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.UtilizationShapePoint"), + Ref: ref(configv1.UtilizationShapePoint{}.OpenAPIModelName()), }, }, }, @@ -69260,7 +69557,7 @@ func schema_k8sio_kube_scheduler_config_v1_VolumeBindingArgs(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.UtilizationShapePoint"}, + configv1.UtilizationShapePoint{}.OpenAPIModelName()}, } } @@ -69340,7 +69637,7 @@ func schema_kubectl_pkg_config_v1alpha1_AliasOverride(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubectl/pkg/config/v1alpha1.CommandOptionDefault"), + Ref: ref(pkgconfigv1alpha1.CommandOptionDefault{}.OpenAPIModelName()), }, }, }, @@ -69351,7 +69648,7 @@ func schema_kubectl_pkg_config_v1alpha1_AliasOverride(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/kubectl/pkg/config/v1alpha1.CommandOptionDefault"}, + pkgconfigv1alpha1.CommandOptionDefault{}.OpenAPIModelName()}, } } @@ -69383,7 +69680,7 @@ func schema_kubectl_pkg_config_v1alpha1_CommandDefaults(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubectl/pkg/config/v1alpha1.CommandOptionDefault"), + Ref: ref(pkgconfigv1alpha1.CommandOptionDefault{}.OpenAPIModelName()), }, }, }, @@ -69394,7 +69691,7 @@ func schema_kubectl_pkg_config_v1alpha1_CommandDefaults(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/kubectl/pkg/config/v1alpha1.CommandOptionDefault"}, + pkgconfigv1alpha1.CommandOptionDefault{}.OpenAPIModelName()}, } } @@ -69462,7 +69759,7 @@ func schema_kubectl_pkg_config_v1alpha1_Preference(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubectl/pkg/config/v1alpha1.CommandDefaults"), + Ref: ref(pkgconfigv1alpha1.CommandDefaults{}.OpenAPIModelName()), }, }, }, @@ -69481,7 +69778,7 @@ func schema_kubectl_pkg_config_v1alpha1_Preference(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubectl/pkg/config/v1alpha1.AliasOverride"), + Ref: ref(pkgconfigv1alpha1.AliasOverride{}.OpenAPIModelName()), }, }, }, @@ -69492,7 +69789,7 @@ func schema_kubectl_pkg_config_v1alpha1_Preference(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/kubectl/pkg/config/v1alpha1.AliasOverride", "k8s.io/kubectl/pkg/config/v1alpha1.CommandDefaults"}, + pkgconfigv1alpha1.AliasOverride{}.OpenAPIModelName(), pkgconfigv1alpha1.CommandDefaults{}.OpenAPIModelName()}, } } @@ -69572,7 +69869,7 @@ func schema_kubectl_pkg_config_v1beta1_AliasOverride(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubectl/pkg/config/v1beta1.CommandOptionDefault"), + Ref: ref(pkgconfigv1beta1.CommandOptionDefault{}.OpenAPIModelName()), }, }, }, @@ -69583,7 +69880,7 @@ func schema_kubectl_pkg_config_v1beta1_AliasOverride(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/kubectl/pkg/config/v1beta1.CommandOptionDefault"}, + pkgconfigv1beta1.CommandOptionDefault{}.OpenAPIModelName()}, } } @@ -69615,7 +69912,7 @@ func schema_kubectl_pkg_config_v1beta1_CommandDefaults(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubectl/pkg/config/v1beta1.CommandOptionDefault"), + Ref: ref(pkgconfigv1beta1.CommandOptionDefault{}.OpenAPIModelName()), }, }, }, @@ -69626,7 +69923,7 @@ func schema_kubectl_pkg_config_v1beta1_CommandDefaults(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/kubectl/pkg/config/v1beta1.CommandOptionDefault"}, + pkgconfigv1beta1.CommandOptionDefault{}.OpenAPIModelName()}, } } @@ -69694,7 +69991,7 @@ func schema_kubectl_pkg_config_v1beta1_Preference(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubectl/pkg/config/v1beta1.CommandDefaults"), + Ref: ref(pkgconfigv1beta1.CommandDefaults{}.OpenAPIModelName()), }, }, }, @@ -69713,7 +70010,7 @@ func schema_kubectl_pkg_config_v1beta1_Preference(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubectl/pkg/config/v1beta1.AliasOverride"), + Ref: ref(pkgconfigv1beta1.AliasOverride{}.OpenAPIModelName()), }, }, }, @@ -69724,7 +70021,7 @@ func schema_kubectl_pkg_config_v1beta1_Preference(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/kubectl/pkg/config/v1beta1.AliasOverride", "k8s.io/kubectl/pkg/config/v1beta1.CommandDefaults"}, + pkgconfigv1beta1.AliasOverride{}.OpenAPIModelName(), pkgconfigv1beta1.CommandDefaults{}.OpenAPIModelName()}, } } @@ -69761,7 +70058,7 @@ func schema_k8sio_kubelet_config_v1_CredentialProvider(ref common.ReferenceCallb "defaultCacheDuration": { SchemaProps: spec.SchemaProps{ Description: "defaultCacheDuration is the default duration the plugin will cache credentials in-memory if a cache duration is not provided in the plugin response. This field is required.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "apiVersion": { @@ -69795,7 +70092,7 @@ func schema_k8sio_kubelet_config_v1_CredentialProvider(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1.ExecEnvVar"), + Ref: ref(kubeletconfigv1.ExecEnvVar{}.OpenAPIModelName()), }, }, }, @@ -69804,7 +70101,7 @@ func schema_k8sio_kubelet_config_v1_CredentialProvider(ref common.ReferenceCallb "tokenAttributes": { SchemaProps: spec.SchemaProps{ Description: "tokenAttributes is the configuration for the service account token that will be passed to the plugin. The credential provider opts in to using service account tokens for image pull by setting this field. When this field is set, kubelet will generate a service account token bound to the pod for which the image is being pulled and pass to the plugin as part of CredentialProviderRequest along with other attributes required by the plugin.\n\nThe service account metadata and token attributes will be used as a dimension to cache the credentials in kubelet. The cache key is generated by combining the service account metadata (namespace, name, UID, and annotations key+value for the keys defined in serviceAccountTokenAttribute.requiredServiceAccountAnnotationKeys and serviceAccountTokenAttribute.optionalServiceAccountAnnotationKeys). The pod metadata (namespace, name, UID) that are in the service account token are not used as a dimension to cache the credentials in kubelet. This means workloads that are using the same service account could end up using the same credentials for image pull. For plugins that don't want this behavior, or plugins that operate in pass-through mode; i.e., they return the service account token as-is, they can set the credentialProviderResponse.cacheDuration to 0. This will disable the caching of credentials in kubelet and the plugin will be invoked for every image pull. This does result in token generation overhead for every image pull, but it is the only way to ensure that the credentials are not shared across pods (even if they are using the same service account).", - Ref: ref("k8s.io/kubelet/config/v1.ServiceAccountTokenAttributes"), + Ref: ref(kubeletconfigv1.ServiceAccountTokenAttributes{}.OpenAPIModelName()), }, }, }, @@ -69812,7 +70109,7 @@ func schema_k8sio_kubelet_config_v1_CredentialProvider(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kubelet/config/v1.ExecEnvVar", "k8s.io/kubelet/config/v1.ServiceAccountTokenAttributes"}, + metav1.Duration{}.OpenAPIModelName(), kubeletconfigv1.ExecEnvVar{}.OpenAPIModelName(), kubeletconfigv1.ServiceAccountTokenAttributes{}.OpenAPIModelName()}, } } @@ -69845,7 +70142,7 @@ func schema_k8sio_kubelet_config_v1_CredentialProviderConfig(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1.CredentialProvider"), + Ref: ref(kubeletconfigv1.CredentialProvider{}.OpenAPIModelName()), }, }, }, @@ -69856,7 +70153,7 @@ func schema_k8sio_kubelet_config_v1_CredentialProviderConfig(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/kubelet/config/v1.CredentialProvider"}, + kubeletconfigv1.CredentialProvider{}.OpenAPIModelName()}, } } @@ -69998,7 +70295,7 @@ func schema_k8sio_kubelet_config_v1alpha1_CredentialProvider(ref common.Referenc "defaultCacheDuration": { SchemaProps: spec.SchemaProps{ Description: "defaultCacheDuration is the default duration the plugin will cache credentials in-memory if a cache duration is not provided in the plugin response. This field is required.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "apiVersion": { @@ -70032,7 +70329,7 @@ func schema_k8sio_kubelet_config_v1alpha1_CredentialProvider(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1alpha1.ExecEnvVar"), + Ref: ref(kubeletconfigv1alpha1.ExecEnvVar{}.OpenAPIModelName()), }, }, }, @@ -70043,7 +70340,7 @@ func schema_k8sio_kubelet_config_v1alpha1_CredentialProvider(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kubelet/config/v1alpha1.ExecEnvVar"}, + metav1.Duration{}.OpenAPIModelName(), kubeletconfigv1alpha1.ExecEnvVar{}.OpenAPIModelName()}, } } @@ -70076,7 +70373,7 @@ func schema_k8sio_kubelet_config_v1alpha1_CredentialProviderConfig(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1alpha1.CredentialProvider"), + Ref: ref(kubeletconfigv1alpha1.CredentialProvider{}.OpenAPIModelName()), }, }, }, @@ -70087,7 +70384,7 @@ func schema_k8sio_kubelet_config_v1alpha1_CredentialProviderConfig(ref common.Re }, }, Dependencies: []string{ - "k8s.io/kubelet/config/v1alpha1.CredentialProvider"}, + kubeletconfigv1alpha1.CredentialProvider{}.OpenAPIModelName()}, } } @@ -70139,7 +70436,7 @@ func schema_k8sio_kubelet_config_v1alpha1_ImagePullCredentials(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1alpha1.ImagePullSecret"), + Ref: ref(kubeletconfigv1alpha1.ImagePullSecret{}.OpenAPIModelName()), }, }, }, @@ -70158,7 +70455,7 @@ func schema_k8sio_kubelet_config_v1alpha1_ImagePullCredentials(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1alpha1.ImagePullServiceAccount"), + Ref: ref(kubeletconfigv1alpha1.ImagePullServiceAccount{}.OpenAPIModelName()), }, }, }, @@ -70175,7 +70472,7 @@ func schema_k8sio_kubelet_config_v1alpha1_ImagePullCredentials(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/kubelet/config/v1alpha1.ImagePullSecret", "k8s.io/kubelet/config/v1alpha1.ImagePullServiceAccount"}, + kubeletconfigv1alpha1.ImagePullSecret{}.OpenAPIModelName(), kubeletconfigv1alpha1.ImagePullServiceAccount{}.OpenAPIModelName()}, } } @@ -70317,7 +70614,7 @@ func schema_k8sio_kubelet_config_v1alpha1_ImagePulledRecord(ref common.Reference "lastUpdatedTime": { SchemaProps: spec.SchemaProps{ Description: "LastUpdatedTime is the time of the last update to this record", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "imageRef": { @@ -70337,7 +70634,7 @@ func schema_k8sio_kubelet_config_v1alpha1_ImagePulledRecord(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1alpha1.ImagePullCredentials"), + Ref: ref(kubeletconfigv1alpha1.ImagePullCredentials{}.OpenAPIModelName()), }, }, }, @@ -70348,7 +70645,7 @@ func schema_k8sio_kubelet_config_v1alpha1_ImagePulledRecord(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/kubelet/config/v1alpha1.ImagePullCredentials"}, + metav1.Time{}.OpenAPIModelName(), kubeletconfigv1alpha1.ImagePullCredentials{}.OpenAPIModelName()}, } } @@ -70361,14 +70658,14 @@ func schema_k8sio_kubelet_config_v1beta1_CrashLoopBackOffConfig(ref common.Refer "maxContainerRestartPeriod": { SchemaProps: spec.SchemaProps{ Description: "maxContainerRestartPeriod is the maximum duration the backoff delay can accrue to for container restarts, minimum 1 second, maximum 300 seconds. If not set, defaults to the internal crashloopbackoff maximum (300s).", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -70405,7 +70702,7 @@ func schema_k8sio_kubelet_config_v1beta1_CredentialProvider(ref common.Reference "defaultCacheDuration": { SchemaProps: spec.SchemaProps{ Description: "defaultCacheDuration is the default duration the plugin will cache credentials in-memory if a cache duration is not provided in the plugin response. This field is required.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "apiVersion": { @@ -70439,7 +70736,7 @@ func schema_k8sio_kubelet_config_v1beta1_CredentialProvider(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1beta1.ExecEnvVar"), + Ref: ref(kubeletconfigv1beta1.ExecEnvVar{}.OpenAPIModelName()), }, }, }, @@ -70450,7 +70747,7 @@ func schema_k8sio_kubelet_config_v1beta1_CredentialProvider(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kubelet/config/v1beta1.ExecEnvVar"}, + metav1.Duration{}.OpenAPIModelName(), kubeletconfigv1beta1.ExecEnvVar{}.OpenAPIModelName()}, } } @@ -70483,7 +70780,7 @@ func schema_k8sio_kubelet_config_v1beta1_CredentialProviderConfig(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1beta1.CredentialProvider"), + Ref: ref(kubeletconfigv1beta1.CredentialProvider{}.OpenAPIModelName()), }, }, }, @@ -70494,7 +70791,7 @@ func schema_k8sio_kubelet_config_v1beta1_CredentialProviderConfig(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/kubelet/config/v1beta1.CredentialProvider"}, + kubeletconfigv1beta1.CredentialProvider{}.OpenAPIModelName()}, } } @@ -70555,28 +70852,28 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletAuthentication(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "x509 contains settings related to x509 client certificate authentication.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletX509Authentication"), + Ref: ref(kubeletconfigv1beta1.KubeletX509Authentication{}.OpenAPIModelName()), }, }, "webhook": { SchemaProps: spec.SchemaProps{ Description: "webhook contains settings related to webhook bearer token authentication.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthentication"), + Ref: ref(kubeletconfigv1beta1.KubeletWebhookAuthentication{}.OpenAPIModelName()), }, }, "anonymous": { SchemaProps: spec.SchemaProps{ Description: "anonymous contains settings related to anonymous authentication.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletAnonymousAuthentication"), + Ref: ref(kubeletconfigv1beta1.KubeletAnonymousAuthentication{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/kubelet/config/v1beta1.KubeletAnonymousAuthentication", "k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthentication", "k8s.io/kubelet/config/v1beta1.KubeletX509Authentication"}, + kubeletconfigv1beta1.KubeletAnonymousAuthentication{}.OpenAPIModelName(), kubeletconfigv1beta1.KubeletWebhookAuthentication{}.OpenAPIModelName(), kubeletconfigv1beta1.KubeletX509Authentication{}.OpenAPIModelName()}, } } @@ -70597,14 +70894,14 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletAuthorization(ref common.Referen SchemaProps: spec.SchemaProps{ Description: "webhook contains settings related to Webhook authorization.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthorization"), + Ref: ref(kubeletconfigv1beta1.KubeletWebhookAuthorization{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthorization"}, + kubeletconfigv1beta1.KubeletWebhookAuthorization{}.OpenAPIModelName()}, } } @@ -70653,19 +70950,19 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "syncFrequency": { SchemaProps: spec.SchemaProps{ Description: "syncFrequency is the max period between synchronizing running containers and config. Default: \"1m\"", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "fileCheckFrequency": { SchemaProps: spec.SchemaProps{ Description: "fileCheckFrequency is the duration between checking config files for new data. Default: \"20s\"", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "httpCheckFrequency": { SchemaProps: spec.SchemaProps{ Description: "httpCheckFrequency is the duration between checking http for new data. Default: \"20s\"", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "staticPodURL": { @@ -70773,14 +71070,14 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen SchemaProps: spec.SchemaProps{ Description: "authentication specifies how requests to the Kubelet's server are authenticated. Defaults:\n anonymous:\n enabled: false\n webhook:\n enabled: true\n cacheTTL: \"2m\"", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletAuthentication"), + Ref: ref(kubeletconfigv1beta1.KubeletAuthentication{}.OpenAPIModelName()), }, }, "authorization": { SchemaProps: spec.SchemaProps{ Description: "authorization specifies how requests to the Kubelet's server are authorized. Defaults:\n mode: Webhook\n webhook:\n cacheAuthorizedTTL: \"5m\"\n cacheUnauthorizedTTL: \"30s\"", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletAuthorization"), + Ref: ref(kubeletconfigv1beta1.KubeletAuthorization{}.OpenAPIModelName()), }, }, "registryPullQPS": { @@ -70898,19 +71195,19 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "streamingConnectionIdleTimeout": { SchemaProps: spec.SchemaProps{ Description: "streamingConnectionIdleTimeout is the maximum time a streaming connection can be idle before the connection is automatically closed. Deprecated: no longer has any effect. Default: \"4h\"", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeStatusUpdateFrequency": { SchemaProps: spec.SchemaProps{ Description: "nodeStatusUpdateFrequency is the frequency that kubelet computes node status. If node lease feature is not enabled, it is also the frequency that kubelet posts node status to master. Note: When node lease feature is not enabled, be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. Default: \"10s\"", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeStatusReportFrequency": { SchemaProps: spec.SchemaProps{ Description: "nodeStatusReportFrequency is the frequency that kubelet posts node status to master if node status does not change. Kubelet will ignore this frequency and post node status immediately if any change is detected. It is only used when node lease feature is enabled. nodeStatusReportFrequency's default value is 5m. But if nodeStatusUpdateFrequency is set explicitly, nodeStatusReportFrequency's default value will be set to nodeStatusUpdateFrequency for backward compatibility. Default: \"5m\"", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeLeaseDurationSeconds": { @@ -70923,13 +71220,13 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "imageMinimumGCAge": { SchemaProps: spec.SchemaProps{ Description: "imageMinimumGCAge is the minimum age for an unused image before it is garbage collected. Default: \"2m\"", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "imageMaximumGCAge": { SchemaProps: spec.SchemaProps{ Description: "imageMaximumGCAge is the maximum age an image can be unused before it is garbage collected. The default of this field is \"0s\", which disables this field--meaning images won't be garbage collected based on being unused for too long. Default: \"0s\" (disabled)", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "imageGCHighThresholdPercent": { @@ -70949,7 +71246,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "volumeStatsAggPeriod": { SchemaProps: spec.SchemaProps{ Description: "volumeStatsAggPeriod is the frequency for calculating and caching volume disk usage for all pods. Default: \"1m\"", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "kubeletCgroups": { @@ -71020,7 +71317,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "cpuManagerReconcilePeriod": { SchemaProps: spec.SchemaProps{ Description: "cpuManagerReconcilePeriod is the reconciliation period for the CPU Manager. Default: \"10s\"", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "memoryManagerPolicy": { @@ -71079,7 +71376,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "runtimeRequestTimeout": { SchemaProps: spec.SchemaProps{ Description: "runtimeRequestTimeout is the timeout for all runtime requests except long running requests - pull, logs, exec and attach. Default: \"2m\"", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "hairpinMode": { @@ -71134,7 +71431,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "cpuCFSQuotaPeriod": { SchemaProps: spec.SchemaProps{ Description: "cpuCFSQuotaPeriod is the CPU CFS quota period value, `cpu.cfs_period_us`. The value must be between 1 ms and 1 second, inclusive. Requires the CustomCPUCFSQuotaPeriod feature gate to be enabled. Default: \"100ms\"", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeStatusMaxImages": { @@ -71237,7 +71534,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "evictionPressureTransitionPeriod": { SchemaProps: spec.SchemaProps{ Description: "evictionPressureTransitionPeriod is the duration for which the kubelet has to wait before transitioning out of an eviction pressure condition. A duration of 0s will be converted to the default value of 5m Default: \"5m\"", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "evictionMaxPodGracePeriod": { @@ -71339,7 +71636,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen SchemaProps: spec.SchemaProps{ Description: "memorySwap configures swap memory available to container workloads.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1beta1.MemorySwapConfiguration"), + Ref: ref(kubeletconfigv1beta1.MemorySwapConfiguration{}.OpenAPIModelName()), }, }, "containerLogMaxSize": { @@ -71366,7 +71663,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "containerLogMonitorInterval": { SchemaProps: spec.SchemaProps{ Description: "ContainerLogMonitorInterval specifies the duration at which the container logs are monitored for performing the log rotate operation. This defaults to 10 * time.Seconds. But can be customized to a smaller value based on the log generation rate and the size required to be rotated against Default: 10s", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "configMapAndSecretChangeDetectionStrategy": { @@ -71491,7 +71788,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen SchemaProps: spec.SchemaProps{ Description: "logging specifies the options of logging. Refer to [Logs Options](https://github.com/kubernetes/component-base/blob/master/logs/options.go) for more information. Default:\n Format: text", Default: map[string]interface{}{}, - Ref: ref("k8s.io/component-base/logs/api/v1.LoggingConfiguration"), + Ref: ref(logsapiv1.LoggingConfiguration{}.OpenAPIModelName()), }, }, "enableSystemLogHandler": { @@ -71511,13 +71808,13 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "shutdownGracePeriod": { SchemaProps: spec.SchemaProps{ Description: "shutdownGracePeriod specifies the total duration that the node should delay the shutdown and total grace period for pod termination during a node shutdown. Default: \"0s\"", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "shutdownGracePeriodCriticalPods": { SchemaProps: spec.SchemaProps{ Description: "shutdownGracePeriodCriticalPods specifies the duration used to terminate critical pods during a node shutdown. This should be less than shutdownGracePeriod. For example, if shutdownGracePeriod=30s, and shutdownGracePeriodCriticalPods=10s, during a node shutdown the first 20 seconds would be reserved for gracefully terminating normal pods, and the last 10 seconds would be reserved for terminating critical pods. Default: \"0s\"", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "shutdownGracePeriodByPodPriority": { @@ -71528,7 +71825,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1beta1.ShutdownGracePeriodByPodPriority"), + Ref: ref(kubeletconfigv1beta1.ShutdownGracePeriodByPodPriority{}.OpenAPIModelName()), }, }, }, @@ -71538,7 +71835,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen SchemaProps: spec.SchemaProps{ Description: "CrashLoopBackOff contains config to modify node-level parameters for container restart behavior", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1beta1.CrashLoopBackOffConfig"), + Ref: ref(kubeletconfigv1beta1.CrashLoopBackOffConfig{}.OpenAPIModelName()), }, }, "reservedMemory": { @@ -71549,7 +71846,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubelet/config/v1beta1.MemoryReservation"), + Ref: ref(kubeletconfigv1beta1.MemoryReservation{}.OpenAPIModelName()), }, }, }, @@ -71591,7 +71888,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Taint"), + Ref: ref(corev1.Taint{}.OpenAPIModelName()), }, }, }, @@ -71607,7 +71904,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "tracing": { SchemaProps: spec.SchemaProps{ Description: "Tracing specifies the versioned configuration for OpenTelemetry tracing clients. See https://kep.k8s.io/2832 for more details. Default: nil", - Ref: ref("k8s.io/component-base/tracing/api/v1.TracingConfiguration"), + Ref: ref(apiv1.TracingConfiguration{}.OpenAPIModelName()), }, }, "localStorageCapacityIsolation": { @@ -71642,7 +71939,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "userNamespaces": { SchemaProps: spec.SchemaProps{ Description: "UserNamespaces contains User Namespace configurations.", - Ref: ref("k8s.io/kubelet/config/v1beta1.UserNamespaces"), + Ref: ref(kubeletconfigv1beta1.UserNamespaces{}.OpenAPIModelName()), }, }, }, @@ -71650,7 +71947,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Taint", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/logs/api/v1.LoggingConfiguration", "k8s.io/component-base/tracing/api/v1.TracingConfiguration", "k8s.io/kubelet/config/v1beta1.CrashLoopBackOffConfig", "k8s.io/kubelet/config/v1beta1.KubeletAuthentication", "k8s.io/kubelet/config/v1beta1.KubeletAuthorization", "k8s.io/kubelet/config/v1beta1.MemoryReservation", "k8s.io/kubelet/config/v1beta1.MemorySwapConfiguration", "k8s.io/kubelet/config/v1beta1.ShutdownGracePeriodByPodPriority", "k8s.io/kubelet/config/v1beta1.UserNamespaces"}, + corev1.Taint{}.OpenAPIModelName(), metav1.Duration{}.OpenAPIModelName(), logsapiv1.LoggingConfiguration{}.OpenAPIModelName(), apiv1.TracingConfiguration{}.OpenAPIModelName(), kubeletconfigv1beta1.CrashLoopBackOffConfig{}.OpenAPIModelName(), kubeletconfigv1beta1.KubeletAuthentication{}.OpenAPIModelName(), kubeletconfigv1beta1.KubeletAuthorization{}.OpenAPIModelName(), kubeletconfigv1beta1.MemoryReservation{}.OpenAPIModelName(), kubeletconfigv1beta1.MemorySwapConfiguration{}.OpenAPIModelName(), kubeletconfigv1beta1.ShutdownGracePeriodByPodPriority{}.OpenAPIModelName(), kubeletconfigv1beta1.UserNamespaces{}.OpenAPIModelName()}, } } @@ -71670,14 +71967,14 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthentication(ref common "cacheTTL": { SchemaProps: spec.SchemaProps{ Description: "cacheTTL enables caching of authentication results", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -71690,20 +71987,20 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthorization(ref common. "cacheAuthorizedTTL": { SchemaProps: spec.SchemaProps{ Description: "cacheAuthorizedTTL is the duration to cache 'authorized' responses from the webhook authorizer.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "cacheUnauthorizedTTL": { SchemaProps: spec.SchemaProps{ Description: "cacheUnauthorizedTTL is the duration to cache 'unauthorized' responses from the webhook authorizer.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -71747,7 +72044,7 @@ func schema_k8sio_kubelet_config_v1beta1_MemoryReservation(ref common.ReferenceC Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -71758,7 +72055,7 @@ func schema_k8sio_kubelet_config_v1beta1_MemoryReservation(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -71806,14 +72103,14 @@ func schema_k8sio_kubelet_config_v1beta1_SerializedNodeConfigSource(ref common.R SchemaProps: spec.SchemaProps{ Description: "source is the source that we are serializing.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + Ref: ref(corev1.NodeConfigSource{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeConfigSource"}, + corev1.NodeConfigSource{}.OpenAPIModelName()}, } } @@ -71892,7 +72189,7 @@ func schema_pkg_apis_abac_v1beta1_Policy(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "Spec describes the policy rule", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kubernetes/pkg/apis/abac/v1beta1.PolicySpec"), + Ref: ref(abacv1beta1.PolicySpec{}.OpenAPIModelName()), }, }, }, @@ -71900,7 +72197,7 @@ func schema_pkg_apis_abac_v1beta1_Policy(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/kubernetes/pkg/apis/abac/v1beta1.PolicySpec"}, + abacv1beta1.PolicySpec{}.OpenAPIModelName()}, } } @@ -72032,7 +72329,7 @@ func schema_pkg_apis_custom_metrics_v1beta1_MetricValue(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "a reference to the described object", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, "metricName": { @@ -72046,7 +72343,7 @@ func schema_pkg_apis_custom_metrics_v1beta1_MetricValue(ref common.ReferenceCall "timestamp": { SchemaProps: spec.SchemaProps{ Description: "indicates the time at which the metrics were produced", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "window": { @@ -72059,13 +72356,13 @@ func schema_pkg_apis_custom_metrics_v1beta1_MetricValue(ref common.ReferenceCall "value": { SchemaProps: spec.SchemaProps{ Description: "the value of the metric for this", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "selector": { SchemaProps: spec.SchemaProps{ Description: "selector represents the label selector that could be used to select this metric, and will generally just be the selector passed in to the query used to fetch this metric. When left blank, only the metric's Name will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, @@ -72073,7 +72370,7 @@ func schema_pkg_apis_custom_metrics_v1beta1_MetricValue(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + corev1.ObjectReference{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -72101,7 +72398,7 @@ func schema_pkg_apis_custom_metrics_v1beta1_MetricValueList(ref common.Reference "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -72112,7 +72409,7 @@ func schema_pkg_apis_custom_metrics_v1beta1_MetricValueList(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValue"), + Ref: ref(custommetricsv1beta1.MetricValue{}.OpenAPIModelName()), }, }, }, @@ -72123,7 +72420,7 @@ func schema_pkg_apis_custom_metrics_v1beta1_MetricValueList(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValue"}, + metav1.ListMeta{}.OpenAPIModelName(), custommetricsv1beta1.MetricValue{}.OpenAPIModelName()}, } } @@ -72145,7 +72442,7 @@ func schema_pkg_apis_custom_metrics_v1beta2_MetricIdentifier(ref common.Referenc "selector": { SchemaProps: spec.SchemaProps{ Description: "selector represents the label selector that could be used to select this metric, and will generally just be the selector passed in to the query used to fetch this metric. When left blank, only the metric's Name will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, @@ -72153,7 +72450,7 @@ func schema_pkg_apis_custom_metrics_v1beta2_MetricIdentifier(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -72223,19 +72520,19 @@ func schema_pkg_apis_custom_metrics_v1beta2_MetricValue(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "a reference to the described object", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(corev1.ObjectReference{}.OpenAPIModelName()), }, }, "metric": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricIdentifier"), + Ref: ref(custommetricsv1beta2.MetricIdentifier{}.OpenAPIModelName()), }, }, "timestamp": { SchemaProps: spec.SchemaProps{ Description: "indicates the time at which the metrics were produced", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "windowSeconds": { @@ -72248,7 +72545,7 @@ func schema_pkg_apis_custom_metrics_v1beta2_MetricValue(ref common.ReferenceCall "value": { SchemaProps: spec.SchemaProps{ Description: "the value of the metric for this", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -72256,7 +72553,7 @@ func schema_pkg_apis_custom_metrics_v1beta2_MetricValue(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricIdentifier"}, + corev1.ObjectReference{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName(), custommetricsv1beta2.MetricIdentifier{}.OpenAPIModelName()}, } } @@ -72284,7 +72581,7 @@ func schema_pkg_apis_custom_metrics_v1beta2_MetricValueList(ref common.Reference "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -72295,7 +72592,7 @@ func schema_pkg_apis_custom_metrics_v1beta2_MetricValueList(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValue"), + Ref: ref(custommetricsv1beta2.MetricValue{}.OpenAPIModelName()), }, }, }, @@ -72306,7 +72603,7 @@ func schema_pkg_apis_custom_metrics_v1beta2_MetricValueList(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValue"}, + metav1.ListMeta{}.OpenAPIModelName(), custommetricsv1beta2.MetricValue{}.OpenAPIModelName()}, } } @@ -72358,7 +72655,7 @@ func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValue(ref common.Ref "timestamp": { SchemaProps: spec.SchemaProps{ Description: "indicates the time at which the metrics were produced", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "window": { @@ -72371,7 +72668,7 @@ func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValue(ref common.Ref "value": { SchemaProps: spec.SchemaProps{ Description: "the value of the metric", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -72379,7 +72676,7 @@ func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValue(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + resource.Quantity{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -72407,7 +72704,7 @@ func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValueList(ref common "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -72418,7 +72715,7 @@ func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValueList(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValue"), + Ref: ref(externalmetricsv1beta1.ExternalMetricValue{}.OpenAPIModelName()), }, }, }, @@ -72429,7 +72726,7 @@ func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValueList(ref common }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValue"}, + metav1.ListMeta{}.OpenAPIModelName(), externalmetricsv1beta1.ExternalMetricValue{}.OpenAPIModelName()}, } } @@ -72456,7 +72753,7 @@ func schema_pkg_apis_metrics_v1alpha1_ContainerMetrics(ref common.ReferenceCallb Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -72467,7 +72764,7 @@ func schema_pkg_apis_metrics_v1alpha1_ContainerMetrics(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -72496,18 +72793,18 @@ func schema_pkg_apis_metrics_v1alpha1_NodeMetrics(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "timestamp": { SchemaProps: spec.SchemaProps{ Description: "The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "window": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "usage": { @@ -72518,7 +72815,7 @@ func schema_pkg_apis_metrics_v1alpha1_NodeMetrics(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -72529,7 +72826,7 @@ func schema_pkg_apis_metrics_v1alpha1_NodeMetrics(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + resource.Quantity{}.OpenAPIModelName(), metav1.Duration{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -72558,7 +72855,7 @@ func schema_pkg_apis_metrics_v1alpha1_NodeMetricsList(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -72569,7 +72866,7 @@ func schema_pkg_apis_metrics_v1alpha1_NodeMetricsList(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetrics"), + Ref: ref(metricsv1alpha1.NodeMetrics{}.OpenAPIModelName()), }, }, }, @@ -72580,7 +72877,7 @@ func schema_pkg_apis_metrics_v1alpha1_NodeMetricsList(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetrics"}, + metav1.ListMeta{}.OpenAPIModelName(), metricsv1alpha1.NodeMetrics{}.OpenAPIModelName()}, } } @@ -72609,18 +72906,18 @@ func schema_pkg_apis_metrics_v1alpha1_PodMetrics(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "timestamp": { SchemaProps: spec.SchemaProps{ Description: "The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "window": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "containers": { @@ -72636,7 +72933,7 @@ func schema_pkg_apis_metrics_v1alpha1_PodMetrics(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1alpha1.ContainerMetrics"), + Ref: ref(metricsv1alpha1.ContainerMetrics{}.OpenAPIModelName()), }, }, }, @@ -72647,7 +72944,7 @@ func schema_pkg_apis_metrics_v1alpha1_PodMetrics(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/metrics/pkg/apis/metrics/v1alpha1.ContainerMetrics"}, + metav1.Duration{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName(), metricsv1alpha1.ContainerMetrics{}.OpenAPIModelName()}, } } @@ -72676,7 +72973,7 @@ func schema_pkg_apis_metrics_v1alpha1_PodMetricsList(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -72687,7 +72984,7 @@ func schema_pkg_apis_metrics_v1alpha1_PodMetricsList(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetrics"), + Ref: ref(metricsv1alpha1.PodMetrics{}.OpenAPIModelName()), }, }, }, @@ -72698,7 +72995,7 @@ func schema_pkg_apis_metrics_v1alpha1_PodMetricsList(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetrics"}, + metav1.ListMeta{}.OpenAPIModelName(), metricsv1alpha1.PodMetrics{}.OpenAPIModelName()}, } } @@ -72725,7 +73022,7 @@ func schema_pkg_apis_metrics_v1beta1_ContainerMetrics(ref common.ReferenceCallba Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -72736,7 +73033,7 @@ func schema_pkg_apis_metrics_v1beta1_ContainerMetrics(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -72765,18 +73062,18 @@ func schema_pkg_apis_metrics_v1beta1_NodeMetrics(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "timestamp": { SchemaProps: spec.SchemaProps{ Description: "The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "window": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "usage": { @@ -72787,7 +73084,7 @@ func schema_pkg_apis_metrics_v1beta1_NodeMetrics(ref common.ReferenceCallback) c Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -72798,7 +73095,7 @@ func schema_pkg_apis_metrics_v1beta1_NodeMetrics(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + resource.Quantity{}.OpenAPIModelName(), metav1.Duration{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -72827,7 +73124,7 @@ func schema_pkg_apis_metrics_v1beta1_NodeMetricsList(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -72838,7 +73135,7 @@ func schema_pkg_apis_metrics_v1beta1_NodeMetricsList(ref common.ReferenceCallbac Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetrics"), + Ref: ref(metricsv1beta1.NodeMetrics{}.OpenAPIModelName()), }, }, }, @@ -72849,7 +73146,7 @@ func schema_pkg_apis_metrics_v1beta1_NodeMetricsList(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetrics"}, + metav1.ListMeta{}.OpenAPIModelName(), metricsv1beta1.NodeMetrics{}.OpenAPIModelName()}, } } @@ -72878,18 +73175,18 @@ func schema_pkg_apis_metrics_v1beta1_PodMetrics(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "timestamp": { SchemaProps: spec.SchemaProps{ Description: "The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "window": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "containers": { @@ -72905,7 +73202,7 @@ func schema_pkg_apis_metrics_v1beta1_PodMetrics(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1beta1.ContainerMetrics"), + Ref: ref(metricsv1beta1.ContainerMetrics{}.OpenAPIModelName()), }, }, }, @@ -72916,7 +73213,7 @@ func schema_pkg_apis_metrics_v1beta1_PodMetrics(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/metrics/pkg/apis/metrics/v1beta1.ContainerMetrics"}, + metav1.Duration{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName(), metricsv1beta1.ContainerMetrics{}.OpenAPIModelName()}, } } @@ -72945,7 +73242,7 @@ func schema_pkg_apis_metrics_v1beta1_PodMetricsList(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -72956,7 +73253,7 @@ func schema_pkg_apis_metrics_v1beta1_PodMetricsList(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetrics"), + Ref: ref(metricsv1beta1.PodMetrics{}.OpenAPIModelName()), }, }, }, @@ -72967,6 +73264,6 @@ func schema_pkg_apis_metrics_v1beta1_PodMetricsList(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetrics"}, + metav1.ListMeta{}.OpenAPIModelName(), metricsv1beta1.PodMetrics{}.OpenAPIModelName()}, } } diff --git a/pkg/kubeapiserver/default_storage_factory_builder.go b/pkg/kubeapiserver/default_storage_factory_builder.go index a3ba1c8cfaf57..7378db0319a89 100644 --- a/pkg/kubeapiserver/default_storage_factory_builder.go +++ b/pkg/kubeapiserver/default_storage_factory_builder.go @@ -81,8 +81,8 @@ func NewStorageFactoryConfigEffectiveVersion(effectiveVersion basecompatibility. // TODO (https://github.com/kubernetes/kubernetes/issues/108451): remove the override in 1.25. // apisstorage.Resource("csistoragecapacities").WithVersion("v1beta1"), coordination.Resource("leasecandidates").WithVersion("v1beta1"), - admissionregistration.Resource("mutatingadmissionpolicies").WithVersion("v1alpha1"), - admissionregistration.Resource("mutatingadmissionpolicybindings").WithVersion("v1alpha1"), + admissionregistration.Resource("mutatingadmissionpolicies").WithVersion("v1beta1"), + admissionregistration.Resource("mutatingadmissionpolicybindings").WithVersion("v1beta1"), certificates.Resource("clustertrustbundles").WithVersion("v1beta1"), certificates.Resource("podcertificaterequests").WithVersion("v1alpha1"), storage.Resource("volumeattributesclasses").WithVersion("v1beta1"), diff --git a/pkg/kubeapiserver/options/admission.go b/pkg/kubeapiserver/options/admission.go index d70df9742a6d0..de0c0b6d33ce7 100644 --- a/pkg/kubeapiserver/options/admission.go +++ b/pkg/kubeapiserver/options/admission.go @@ -21,6 +21,7 @@ import ( "strings" "github.com/spf13/pflag" + "k8s.io/client-go/dynamic" "k8s.io/client-go/kubernetes" @@ -29,6 +30,7 @@ import ( "k8s.io/apiserver/pkg/server" genericoptions "k8s.io/apiserver/pkg/server/options" "k8s.io/client-go/informers" + "k8s.io/component-base/compatibility" "k8s.io/component-base/featuregate" ) @@ -116,6 +118,7 @@ func (a *AdmissionOptions) ApplyTo( kubeClient kubernetes.Interface, dynamicClient dynamic.Interface, features featuregate.FeatureGate, + effectiveVersion compatibility.EffectiveVersion, pluginInitializers ...admission.PluginInitializer, ) error { if a == nil { @@ -127,7 +130,7 @@ func (a *AdmissionOptions) ApplyTo( a.GenericAdmission.EnablePlugins, a.GenericAdmission.DisablePlugins = computePluginNames(a.PluginNames, a.GenericAdmission.RecommendedPluginOrder) } - return a.GenericAdmission.ApplyTo(c, informers, kubeClient, dynamicClient, features, pluginInitializers...) + return a.GenericAdmission.ApplyTo(c, informers, kubeClient, dynamicClient, features, effectiveVersion, pluginInitializers...) } // explicitly disable all plugins that are not in the enabled list diff --git a/pkg/kubeapiserver/options/authentication.go b/pkg/kubeapiserver/options/authentication.go index 4f9ebeae0eb7c..f11bff75566a4 100644 --- a/pkg/kubeapiserver/options/authentication.go +++ b/pkg/kubeapiserver/options/authentication.go @@ -18,6 +18,7 @@ package options import ( "context" + "crypto/x509" "errors" "fmt" "net/url" @@ -50,6 +51,7 @@ import ( "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" v1listers "k8s.io/client-go/listers/core/v1" + certutil "k8s.io/client-go/util/cert" "k8s.io/client-go/util/keyutil" cliflag "k8s.io/component-base/cli/flag" "k8s.io/klog/v2" @@ -307,11 +309,39 @@ func (o *BuiltInAuthenticationOptions) Validate() []error { if o.RequestHeader != nil { allErrors = append(allErrors, o.RequestHeader.Validate()...) + + if o.ClientCert != nil && + len(o.ClientCert.ClientCA) > 0 && + len(o.RequestHeader.ClientCAFile) > 0 && + len(o.RequestHeader.AllowedNames) == 0 { + clientCACerts, err1 := certutil.CertsFromFile(o.ClientCert.ClientCA) + requestHeaderCACerts, err2 := certutil.CertsFromFile(o.RequestHeader.ClientCAFile) + if err1 == nil && err2 == nil { + if certificatesOverlap(clientCACerts, requestHeaderCACerts) { + allErrors = append(allErrors, + fmt.Errorf("--requestheader-client-ca-file and --client-ca-file contain overlapping certificates; --requestheader-allowed-names must be specified to ensure regular client certificates cannot set authenticating proxy headers for arbitrary users")) + } + } + } + } return allErrors } +// certificatesOverlap returns true when there's at least one identical +// certificate in the two certificate bundles +func certificatesOverlap(a, b []*x509.Certificate) bool { + for _, ca := range a { + for _, cb := range b { + if ca.Equal(cb) { + return true + } + } + } + return false +} + // AddFlags returns flags of authentication for a API Server func (o *BuiltInAuthenticationOptions) AddFlags(fs *pflag.FlagSet) { if o == nil { diff --git a/pkg/kubeapiserver/options/authentication_test.go b/pkg/kubeapiserver/options/authentication_test.go index 9e2cb74e8bdc9..4026a748cdd11 100644 --- a/pkg/kubeapiserver/options/authentication_test.go +++ b/pkg/kubeapiserver/options/authentication_test.go @@ -24,6 +24,7 @@ import ( "encoding/pem" "fmt" "os" + "path/filepath" "reflect" goruntime "runtime" "strings" @@ -58,6 +59,8 @@ import ( func TestAuthenticationValidate(t *testing.T) { testCases := []struct { name string + clientCert *apiserveroptions.ClientCertAuthenticationOptions + requestHeader *apiserveroptions.RequestHeaderAuthenticationOptions testAnonymous *AnonymousAuthenticationOptions testOIDC *OIDCAuthenticationOptions testSA *ServiceAccountAuthenticationOptions @@ -256,11 +259,43 @@ func TestAuthenticationValidate(t *testing.T) { // feature-gate, otherwise this feature-gate cannot be disabled. emulationVersion: version.MustParse("1.33"), }, + { + name: "overlapping CA without allowed-names", + clientCert: &apiserveroptions.ClientCertAuthenticationOptions{ClientCA: filepath.Join("testdata", "client-ca.pem")}, + requestHeader: &apiserveroptions.RequestHeaderAuthenticationOptions{ + ClientCAFile: filepath.Join("testdata", "client-ca.pem"), + AllowedNames: []string{}, + UsernameHeaders: []string{"X-Remote-User"}, + }, + expectErr: "--requestheader-client-ca-file and --client-ca-file contain overlapping certificates; --requestheader-allowed-names must be specified to ensure regular client certificates cannot set authenticating proxy headers for arbitrary users", + }, + { + name: "overlapping CA with allowed-names", + clientCert: &apiserveroptions.ClientCertAuthenticationOptions{ClientCA: filepath.Join("testdata", "client-ca.pem")}, + requestHeader: &apiserveroptions.RequestHeaderAuthenticationOptions{ + ClientCAFile: filepath.Join("testdata", "client-ca.pem"), + AllowedNames: []string{"Client-CA"}, + UsernameHeaders: []string{"X-Remote-User"}, + }, + expectErr: "", + }, + { + name: "different CAs without allowed-names", + clientCert: &apiserveroptions.ClientCertAuthenticationOptions{ClientCA: filepath.Join("testdata", "client-ca.pem")}, + requestHeader: &apiserveroptions.RequestHeaderAuthenticationOptions{ + ClientCAFile: filepath.Join("testdata", "server-ca.pem"), + AllowedNames: []string{}, + UsernameHeaders: []string{"X-Remote-User"}, + }, + expectErr: "", + }, } for _, testcase := range testCases { t.Run(testcase.name, func(t *testing.T) { options := NewBuiltInAuthenticationOptions() + options.ClientCert = testcase.clientCert + options.RequestHeader = testcase.requestHeader options.Anonymous = testcase.testAnonymous options.OIDC = testcase.testOIDC options.ServiceAccounts = testcase.testSA diff --git a/pkg/kubeapiserver/options/testdata/client-ca.pem b/pkg/kubeapiserver/options/testdata/client-ca.pem new file mode 100644 index 0000000000000..589af4bfdeaa8 --- /dev/null +++ b/pkg/kubeapiserver/options/testdata/client-ca.pem @@ -0,0 +1,10 @@ +-----BEGIN CERTIFICATE----- +MIIBbTCCARSgAwIBAgIUDMmq4/Gw2N1o5TWBLWsm65RiVkIwCgYIKoZIzj0EAwIw +FDESMBAGA1UEAxMJQ2xpZW50LUNBMCAXDTIxMDUyMjIzNTIwMFoYDzIxMjEwNDI4 +MjM1MjAwWjAUMRIwEAYDVQQDEwlDbGllbnQtQ0EwWTATBgcqhkjOPQIBBggqhkjO +PQMBBwNCAAQDhCqK/KktlUtqgVgBLRRbJ/I1FJdG2AxYRpu+ygc7fUJFrZlLebyC +U5DbVovKxV0Xq8A/fU71+rKy4YybRQjvo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD +VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUaDl2pG6N7NoORQjpHprKDSOL8+0wCgYI +KoZIzj0EAwIDRwAwRAIgbS1tdj6El37kUwF9yZDXKfjLUlRBBLmIYhP0mdui6/AC +IB4F/weuM/6IjCdcPJRxvdC7qjCdV0xnFqvQ+BhuUGSF +-----END CERTIFICATE----- diff --git a/pkg/kubeapiserver/options/testdata/server-ca.pem b/pkg/kubeapiserver/options/testdata/server-ca.pem new file mode 100644 index 0000000000000..4b203f3e3b961 --- /dev/null +++ b/pkg/kubeapiserver/options/testdata/server-ca.pem @@ -0,0 +1,10 @@ +-----BEGIN CERTIFICATE----- +MIIBbzCCARSgAwIBAgIUf0aG2C1P7KaDGobg9oeN3uhQlu4wCgYIKoZIzj0EAwIw +FDESMBAGA1UEAxMJU2VydmVyLUNBMCAXDTIxMDUyMjIzNTIwMFoYDzIxMjEwNDI4 +MjM1MjAwWjAUMRIwEAYDVQQDEwlTZXJ2ZXItQ0EwWTATBgcqhkjOPQIBBggqhkjO +PQMBBwNCAAQ/DG/wiOR9TkCK9wrQiK6scv0foSIaH7NnRLyv48FbQNcU9dwCNBy0 +TyBUe7d+n3TLUlVOuJrGuJT/Hwtuunxko0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD +VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUjcdIlU1vGLSUWBcSqCEJTgqlSacwCgYI +KoZIzj0EAwIDSQAwRgIhAIujFeJKprddp+9aCZZUv05jCS5JiopW2bn/FJJRQ6OK +AiEA1NS6trAbfgk6vYS2D2vamuF4XC9LggyxbcoaMf+GAn4= +-----END CERTIFICATE----- diff --git a/pkg/kubelet/allocation/allocation_manager.go b/pkg/kubelet/allocation/allocation_manager.go index c7eff6a01d094..d795d626ca74c 100644 --- a/pkg/kubelet/allocation/allocation_manager.go +++ b/pkg/kubelet/allocation/allocation_manager.go @@ -24,8 +24,6 @@ import ( "sync" "time" - "encoding/json" - v1 "k8s.io/api/core/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -45,7 +43,6 @@ import ( "k8s.io/kubernetes/pkg/kubelet/cm/memorymanager" "k8s.io/kubernetes/pkg/kubelet/config" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/kubelet/events" "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/pkg/kubelet/metrics" "k8s.io/kubernetes/pkg/kubelet/status" @@ -56,7 +53,6 @@ import ( // podStatusManagerStateFile is the file name where status manager stores its state const ( allocatedPodsStateFile = "allocated_pods_state" - actuatedPodsStateFile = "actuated_pods_state" initialRetryDelay = 30 * time.Second retryDelay = 3 * time.Minute @@ -82,13 +78,6 @@ type Manager interface { // SetAllocatedResources checkpoints the resources allocated to a pod's containers. SetAllocatedResources(allocatedPod *v1.Pod) error - // SetActuatedResources records the actuated resources of the given container (or the entire - // pod, if actuatedContainer is nil). - SetActuatedResources(allocatedPod *v1.Pod, actuatedContainer *v1.Container) error - - // GetActuatedResources returns the stored actuated resources for the container, and whether they exist. - GetActuatedResources(podUID types.UID, containerName string) (v1.ResourceRequirements, bool) - // AddPodAdmitHandlers adds the admit handlers to the allocation manager. // TODO: See if we can remove this and just add them in the allocation manager constructor. AddPodAdmitHandlers(handlers lifecycle.PodAdmitHandlers) @@ -123,21 +112,17 @@ type Manager interface { // RetryPendingResizes retries all pending resizes. RetryPendingResizes(trigger string) - - // CheckPodResizeInProgress checks whether the actuated resizable resources differ from the allocated resources - // for any running containers. - CheckPodResizeInProgress(allocatedPod *v1.Pod, podStatus *kubecontainer.PodStatus) } type manager struct { allocated state.State - actuated state.State - admitHandlers lifecycle.PodAdmitHandlers - containerManager cm.ContainerManager - containerRuntime kubecontainer.Runtime - statusManager status.Manager - sourcesReady config.SourcesReady + admitHandlers lifecycle.PodAdmitHandlers + containerRuntime kubecontainer.Runtime + statusManager status.Manager + sourcesReady config.SourcesReady + nodeConfig cm.NodeConfig + nodeAllocatableAbsolute v1.ResourceList ticker *time.Ticker triggerPodSync func(pod *v1.Pod) @@ -151,7 +136,8 @@ type manager struct { } func NewManager(checkpointDirectory string, - containerManager cm.ContainerManager, + nodeConfig cm.NodeConfig, + nodeAllocatableAbsolute v1.ResourceList, statusManager status.Manager, triggerPodSync func(pod *v1.Pod), getActivePods func() []*v1.Pod, @@ -161,12 +147,12 @@ func NewManager(checkpointDirectory string, ) Manager { return &manager{ allocated: newStateImpl(checkpointDirectory, allocatedPodsStateFile), - actuated: newStateImpl(checkpointDirectory, actuatedPodsStateFile), - containerManager: containerManager, - statusManager: statusManager, - admitHandlers: lifecycle.PodAdmitHandlers{}, - sourcesReady: sourcesReady, + statusManager: statusManager, + admitHandlers: lifecycle.PodAdmitHandlers{}, + sourcesReady: sourcesReady, + nodeConfig: nodeConfig, + nodeAllocatableAbsolute: nodeAllocatableAbsolute, ticker: time.NewTicker(initialRetryDelay), triggerPodSync: triggerPodSync, @@ -176,17 +162,6 @@ func NewManager(checkpointDirectory string, } } -type containerAllocation struct { - Name string `json:"name"` - Resources v1.ResourceRequirements `json:"resources,omitempty"` -} - -type podResourceSummary struct { - //TODO: resources v1.ResourceRequirements, add pod-level resources here once resizing pod-level resources is supported - InitContainers []containerAllocation `json:"initContainers,omitempty"` - Containers []containerAllocation `json:"containers,omitempty"` -} - func newStateImpl(checkpointDirectory, checkpointName string) state.State { if !utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScaling) { return state.NewNoopStateCheckpoint() @@ -205,7 +180,8 @@ func newStateImpl(checkpointDirectory, checkpointName string) state.State { // NewInMemoryManager returns an allocation manager that doesn't persist state. // For testing purposes only! -func NewInMemoryManager(containerManager cm.ContainerManager, +func NewInMemoryManager(nodeConfig cm.NodeConfig, + nodeAllocatableAbsolute v1.ResourceList, statusManager status.Manager, triggerPodSync func(pod *v1.Pod), getActivePods func() []*v1.Pod, @@ -214,12 +190,12 @@ func NewInMemoryManager(containerManager cm.ContainerManager, ) Manager { return &manager{ allocated: state.NewStateMemory(nil), - actuated: state.NewStateMemory(nil), - containerManager: containerManager, - statusManager: statusManager, - admitHandlers: lifecycle.PodAdmitHandlers{}, - sourcesReady: sourcesReady, + statusManager: statusManager, + admitHandlers: lifecycle.PodAdmitHandlers{}, + sourcesReady: sourcesReady, + nodeConfig: nodeConfig, + nodeAllocatableAbsolute: nodeAllocatableAbsolute, ticker: time.NewTicker(initialRetryDelay), triggerPodSync: triggerPodSync, @@ -246,33 +222,6 @@ func (m *manager) Run(ctx context.Context) { }() } -// Gernerate pod resize completed event message -func (m *manager) podResizeCompletionMsg(allocatedPod *v1.Pod) string { - podResizeSource := &podResourceSummary{} - podutil.VisitContainers(&allocatedPod.Spec, podutil.InitContainers|podutil.Containers, - func(allocatedContainer *v1.Container, containerType podutil.ContainerType) bool { - allocation := containerAllocation{ - Name: allocatedContainer.Name, - Resources: allocatedContainer.Resources, - } - switch containerType { - case podutil.InitContainers: - podResizeSource.InitContainers = append(podResizeSource.InitContainers, allocation) - case podutil.Containers: - podResizeSource.Containers = append(podResizeSource.Containers, allocation) - } - return true - }) - - podResizeMsgDetailsJSON, err := json.Marshal(podResizeSource) - if err != nil { - klog.ErrorS(err, "Failed to serialize resource summary", "pod", format.Pod(allocatedPod)) - return "Pod resize completed" - } - podResizeCompletedMsg := fmt.Sprintf("Pod resize completed: %s", string(podResizeMsgDetailsJSON)) - return podResizeCompletedMsg -} - func (m *manager) RetryPendingResizes(trigger string) { m.retryPendingResizes(trigger) } @@ -581,29 +530,10 @@ func (m *manager) RemovePod(uid types.UID) { // If the deletion fails, it will be retried by RemoveOrphanedPods, so we can safely ignore the error. klog.V(3).ErrorS(err, "Failed to delete pod allocation", "podUID", uid) } - - if err := m.actuated.RemovePod(uid); err != nil { - // If the deletion fails, it will be retried by RemoveOrphanedPods, so we can safely ignore the error. - klog.V(3).ErrorS(err, "Failed to delete pod allocation", "podUID", uid) - } } func (m *manager) RemoveOrphanedPods(remainingPods sets.Set[types.UID]) { m.allocated.RemoveOrphanedPods(remainingPods) - m.actuated.RemoveOrphanedPods(remainingPods) -} - -func (m *manager) SetActuatedResources(allocatedPod *v1.Pod, actuatedContainer *v1.Container) error { - if actuatedContainer == nil { - alloc := allocationFromPod(allocatedPod) - return m.actuated.SetPodResourceInfo(allocatedPod.UID, alloc) - } - - return m.actuated.SetContainerResources(allocatedPod.UID, actuatedContainer.Name, actuatedContainer.Resources) -} - -func (m *manager) GetActuatedResources(podUID types.UID, containerName string) (v1.ResourceRequirements, bool) { - return m.actuated.GetContainerResources(podUID, containerName) } func (m *manager) handlePodResourcesResize(pod *v1.Pod) (bool, error) { @@ -716,7 +646,7 @@ func (m *manager) canResizePod(allocatedPods []*v1.Pod, pod *v1.Pod) (bool, stri // lifecycle.PodAdmitAttributes, and combine canResizePod with canAdmitPod. if v1qos.GetPodQOS(pod) == v1.PodQOSGuaranteed { if !utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScalingExclusiveCPUs) && - m.containerManager.GetNodeConfig().CPUManagerPolicy == string(cpumanager.PolicyStatic) && + m.nodeConfig.CPUManagerPolicy == string(cpumanager.PolicyStatic) && m.guaranteedPodResourceResizeRequired(pod, v1.ResourceCPU) { msg := fmt.Sprintf("Resize is infeasible for Guaranteed Pods alongside CPU Manager policy \"%s\"", string(cpumanager.PolicyStatic)) klog.V(3).InfoS(msg, "pod", format.Pod(pod)) @@ -725,7 +655,7 @@ func (m *manager) canResizePod(allocatedPods []*v1.Pod, pod *v1.Pod) (bool, stri } if utilfeature.DefaultFeatureGate.Enabled(features.MemoryManager) && !utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScalingExclusiveMemory) && - m.containerManager.GetNodeConfig().MemoryManagerPolicy == string(memorymanager.PolicyTypeStatic) && + m.nodeConfig.MemoryManagerPolicy == string(memorymanager.PolicyTypeStatic) && m.guaranteedPodResourceResizeRequired(pod, v1.ResourceMemory) { msg := fmt.Sprintf("Resize is infeasible for Guaranteed Pods alongside Memory Manager policy \"%s\"", string(memorymanager.PolicyTypeStatic)) klog.V(3).InfoS(msg, "pod", format.Pod(pod)) @@ -734,9 +664,8 @@ func (m *manager) canResizePod(allocatedPods []*v1.Pod, pod *v1.Pod) (bool, stri } } - allocatable := m.containerManager.GetNodeAllocatableAbsolute() - cpuAvailable := allocatable.Cpu().MilliValue() - memAvailable := allocatable.Memory().Value() + cpuAvailable := m.nodeAllocatableAbsolute.Cpu().MilliValue() + memAvailable := m.nodeAllocatableAbsolute.Memory().Value() cpuRequests := resource.GetResourceRequest(pod, v1.ResourceCPU) memRequests := resource.GetResourceRequest(pod, v1.ResourceMemory) if cpuRequests > cpuAvailable || memRequests > memAvailable { @@ -761,49 +690,6 @@ func (m *manager) canResizePod(allocatedPods []*v1.Pod, pod *v1.Pod) (bool, stri return true, "", "" } -func (m *manager) CheckPodResizeInProgress(allocatedPod *v1.Pod, podStatus *kubecontainer.PodStatus) { - // If a resize is in progress, make sure the cache has the correct state in case the Kubelet restarted. - if m.isPodResizeInProgress(allocatedPod, podStatus) { - // This is a no-op if the resize in progress condition is already set. - m.statusManager.SetPodResizeInProgressCondition(allocatedPod.UID, "", "", allocatedPod.Generation) - } else if m.statusManager.ClearPodResizeInProgressCondition(allocatedPod.UID) { - // (Allocated == Actual) => clear the resize in-progress status. - // Generate Pod resize completed event - podResizeCompletedEventMsg := m.podResizeCompletionMsg(allocatedPod) - if m.recorder != nil { - m.recorder.Eventf(allocatedPod, v1.EventTypeNormal, events.ResizeCompleted, podResizeCompletedEventMsg) - } - } -} - -// isPodResizeInProgress checks whether the actuated resizable resources differ from the allocated resources -// for any running containers. Specifically, the following differences are ignored: -// - Non-resizable containers: non-restartable init containers, ephemeral containers -// - Non-resizable resources: only CPU & memory are resizable -// - Non-running containers: they will be sized correctly when (re)started -func (m *manager) isPodResizeInProgress(allocatedPod *v1.Pod, podStatus *kubecontainer.PodStatus) bool { - return !podutil.VisitContainers(&allocatedPod.Spec, podutil.InitContainers|podutil.Containers, - func(allocatedContainer *v1.Container, containerType podutil.ContainerType) (shouldContinue bool) { - if !IsResizableContainer(allocatedContainer, containerType) { - return true - } - - containerStatus := podStatus.FindContainerStatusByName(allocatedContainer.Name) - if containerStatus == nil || containerStatus.State != kubecontainer.ContainerStateRunning { - // If the container isn't running, it doesn't need to be resized. - return true - } - - actuatedResources, _ := m.GetActuatedResources(allocatedPod.UID, allocatedContainer.Name) - allocatedResources := allocatedContainer.Resources - - return allocatedResources.Requests[v1.ResourceCPU].Equal(actuatedResources.Requests[v1.ResourceCPU]) && - allocatedResources.Limits[v1.ResourceCPU].Equal(actuatedResources.Limits[v1.ResourceCPU]) && - allocatedResources.Requests[v1.ResourceMemory].Equal(actuatedResources.Requests[v1.ResourceMemory]) && - allocatedResources.Limits[v1.ResourceMemory].Equal(actuatedResources.Limits[v1.ResourceMemory]) - }) -} - func (m *manager) guaranteedPodResourceResizeRequired(pod *v1.Pod, resourceName v1.ResourceName) bool { for container, containerType := range podutil.ContainerIter(&pod.Spec, podutil.InitContainers|podutil.Containers) { if !IsResizableContainer(container, containerType) { diff --git a/pkg/kubelet/allocation/allocation_manager_test.go b/pkg/kubelet/allocation/allocation_manager_test.go index 6b5fe55b221f9..53574a7c312b5 100644 --- a/pkg/kubelet/allocation/allocation_manager_test.go +++ b/pkg/kubelet/allocation/allocation_manager_test.go @@ -32,7 +32,6 @@ import ( "k8s.io/apimachinery/pkg/util/sets" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/kubernetes/fake" - "k8s.io/client-go/tools/record" featuregatetesting "k8s.io/component-base/featuregate/testing" "k8s.io/component-base/metrics/legacyregistry" "k8s.io/component-base/metrics/testutil" @@ -192,330 +191,7 @@ func TestUpdatePodFromAllocation(t *testing.T) { } } -func getEventsFromFakeRecorder(t *testing.T, am Manager) string { - select { - case e := <-am.(*manager).recorder.(*record.FakeRecorder).Events: - return e - default: - return "" - } -} - -func TestCheckPodResizeInProgress(t *testing.T) { - type testResources struct { - cpuReq, cpuLim, memReq, memLim int64 - } - type testContainer struct { - allocated testResources - actuated *testResources - nonSidecarInit, sidecar bool - isRunning bool - unstarted bool // Whether the container is missing from the pod status - } - - tests := []struct { - name string - containers []testContainer - oldPodResizeInProgressCondition bool - expectHasResize bool - expectPodResizeCompletedMsg string - }{{ - name: "simple running container", - containers: []testContainer{{ - allocated: testResources{100, 100, 100, 100}, - actuated: &testResources{100, 100, 100, 100}, - isRunning: true, - }}, - oldPodResizeInProgressCondition: true, - expectHasResize: false, - expectPodResizeCompletedMsg: `Normal ResizeCompleted Pod resize completed: {"containers":[{"name":"c0","resources":{"limits":{"cpu":"100m","memory":"100"},"requests":{"cpu":"100m","memory":"100"}}}]}`, - }, { - name: "simple unstarted container", - containers: []testContainer{{ - allocated: testResources{100, 100, 100, 100}, - unstarted: true, - }}, - oldPodResizeInProgressCondition: false, - expectHasResize: false, - }, { - name: "simple resized container/cpu req", - containers: []testContainer{{ - allocated: testResources{100, 200, 100, 200}, - actuated: &testResources{150, 200, 100, 200}, - isRunning: true, - }}, - oldPodResizeInProgressCondition: false, - expectHasResize: true, - }, { - name: "simple resized container/cpu limit", - containers: []testContainer{{ - allocated: testResources{100, 200, 100, 200}, - actuated: &testResources{100, 300, 100, 200}, - isRunning: true, - }}, - oldPodResizeInProgressCondition: false, - expectHasResize: true, - }, { - name: "simple resized container/mem req", - containers: []testContainer{{ - allocated: testResources{100, 200, 100, 200}, - actuated: &testResources{100, 200, 150, 200}, - isRunning: true, - }}, - oldPodResizeInProgressCondition: false, - expectHasResize: true, - }, { - name: "simple resized container/cpu+mem req", - containers: []testContainer{{ - allocated: testResources{100, 200, 100, 200}, - actuated: &testResources{150, 200, 150, 200}, - isRunning: true, - }}, - oldPodResizeInProgressCondition: false, - expectHasResize: true, - }, { - name: "simple resized container/mem limit", - containers: []testContainer{{ - allocated: testResources{100, 200, 100, 200}, - actuated: &testResources{100, 200, 100, 300}, - isRunning: true, - }}, - oldPodResizeInProgressCondition: false, - expectHasResize: true, - }, { - name: "terminated resized container", - containers: []testContainer{{ - allocated: testResources{100, 200, 100, 200}, - actuated: &testResources{200, 200, 100, 200}, - isRunning: false, - }}, - oldPodResizeInProgressCondition: false, - expectHasResize: false, - }, { - name: "non-sidecar init container", - containers: []testContainer{{ - allocated: testResources{100, 200, 100, 200}, - nonSidecarInit: true, - isRunning: true, - }, { - allocated: testResources{100, 200, 100, 200}, - actuated: &testResources{100, 200, 100, 200}, - isRunning: true, - }}, - oldPodResizeInProgressCondition: false, - expectHasResize: false, - }, { - name: "non-resized sidecar", - containers: []testContainer{{ - allocated: testResources{100, 200, 100, 200}, - actuated: &testResources{100, 200, 100, 200}, - sidecar: true, - isRunning: true, - }, { - allocated: testResources{100, 200, 100, 200}, - actuated: &testResources{100, 200, 100, 200}, - isRunning: true, - }}, - oldPodResizeInProgressCondition: false, - expectHasResize: false, - }, { - name: "resized sidecar", - containers: []testContainer{{ - allocated: testResources{100, 200, 100, 200}, - actuated: &testResources{200, 200, 100, 200}, - sidecar: true, - isRunning: true, - }, { - allocated: testResources{100, 200, 100, 200}, - actuated: &testResources{100, 200, 100, 200}, - isRunning: true, - }}, - oldPodResizeInProgressCondition: false, - expectHasResize: true, - }, { - name: "several containers and a resize", - containers: []testContainer{{ - allocated: testResources{100, 200, 100, 200}, - nonSidecarInit: true, - isRunning: true, - }, { - allocated: testResources{100, 200, 100, 200}, - actuated: &testResources{100, 200, 100, 200}, - isRunning: true, - }, { - allocated: testResources{100, 200, 100, 200}, - unstarted: true, - }, { - allocated: testResources{100, 200, 100, 200}, - actuated: &testResources{200, 200, 100, 200}, // Resized - isRunning: true, - }}, - oldPodResizeInProgressCondition: false, - expectHasResize: true, - }, { - name: "several containers", - containers: []testContainer{{ - allocated: testResources{cpuReq: 100, cpuLim: 200}, - actuated: &testResources{cpuReq: 100, cpuLim: 200}, - sidecar: true, - isRunning: true, - }, { - allocated: testResources{memReq: 100, memLim: 200}, - actuated: &testResources{memReq: 100, memLim: 200}, - isRunning: true, - }, { - allocated: testResources{cpuReq: 200, memReq: 100}, - actuated: &testResources{cpuReq: 200, memReq: 100}, - isRunning: true, - }}, - oldPodResizeInProgressCondition: true, - expectHasResize: false, - expectPodResizeCompletedMsg: `Normal ResizeCompleted Pod resize completed: {"initContainers":[{"name":"c0","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}],"containers":[{"name":"c1","resources":{"limits":{"memory":"200"},"requests":{"memory":"100"}}},{"name":"c2","resources":{"requests":{"cpu":"200m","memory":"100"}}}]}`, - }, { - name: "best-effort pod", - containers: []testContainer{{ - allocated: testResources{}, - actuated: &testResources{}, - isRunning: true, - }}, - oldPodResizeInProgressCondition: true, - expectHasResize: false, - expectPodResizeCompletedMsg: `Normal ResizeCompleted Pod resize completed: {"containers":[{"name":"c0","resources":{}}]}`, - }, { - name: "burstable pod/not resizing", - containers: []testContainer{{ - allocated: testResources{cpuReq: 100}, - actuated: &testResources{cpuReq: 100}, - isRunning: true, - }}, - oldPodResizeInProgressCondition: false, - expectHasResize: false, - }, { - name: "burstable pod/resized", - containers: []testContainer{{ - allocated: testResources{cpuReq: 100}, - actuated: &testResources{cpuReq: 500}, - isRunning: true, - }}, - oldPodResizeInProgressCondition: false, - expectHasResize: true, - }} - - mkRequirements := func(r testResources) v1.ResourceRequirements { - res := v1.ResourceRequirements{ - Requests: v1.ResourceList{}, - Limits: v1.ResourceList{}, - } - if r.cpuReq != 0 { - res.Requests[v1.ResourceCPU] = *resource.NewMilliQuantity(r.cpuReq, resource.DecimalSI) - } - if r.cpuLim != 0 { - res.Limits[v1.ResourceCPU] = *resource.NewMilliQuantity(r.cpuLim, resource.DecimalSI) - } - if r.memReq != 0 { - res.Requests[v1.ResourceMemory] = *resource.NewQuantity(r.memReq, resource.DecimalSI) - } - if r.memLim != 0 { - res.Limits[v1.ResourceMemory] = *resource.NewQuantity(r.memLim, resource.DecimalSI) - } - return res - } - mkContainer := func(index int, c testContainer) v1.Container { - container := v1.Container{ - Name: fmt.Sprintf("c%d", index), - Resources: mkRequirements(c.allocated), - } - if c.sidecar { - container.RestartPolicy = ptr.To(v1.ContainerRestartPolicyAlways) - } - return container - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - pod := &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - UID: "12345", - }, - } - podStatus := &kubecontainer.PodStatus{ - ID: pod.UID, - Name: pod.Name, - } - - am := makeAllocationManager(t, &containertest.FakeRuntime{PodStatus: *podStatus}, []*v1.Pod{pod}, nil) - t.Cleanup(func() { am.RemovePod(pod.UID) }) - - for i, c := range test.containers { - // Add the container to the pod - container := mkContainer(i, c) - if c.nonSidecarInit || c.sidecar { - pod.Spec.InitContainers = append(pod.Spec.InitContainers, container) - } else { - pod.Spec.Containers = append(pod.Spec.Containers, container) - } - - // Add the container to the pod status, if it's started. - if !test.containers[i].unstarted { - cs := kubecontainer.Status{ - Name: container.Name, - } - if test.containers[i].isRunning { - cs.State = kubecontainer.ContainerStateRunning - } else { - cs.State = kubecontainer.ContainerStateExited - } - podStatus.ContainerStatuses = append(podStatus.ContainerStatuses, &cs) - } - - // Register the actuated container (if needed) - if c.actuated != nil { - actuatedContainer := container.DeepCopy() - actuatedContainer.Resources = mkRequirements(*c.actuated) - require.NoError(t, am.SetActuatedResources(pod, actuatedContainer)) - - fetched, found := am.GetActuatedResources(pod.UID, container.Name) - require.True(t, found) - assert.Equal(t, actuatedContainer.Resources, fetched) - } else { - _, found := am.GetActuatedResources(pod.UID, container.Name) - require.False(t, found) - } - } - require.NoError(t, am.SetAllocatedResources(pod)) - - am.(*manager).recorder = record.NewFakeRecorder(200) - - // Set old Pod condition as Inprogress, so that ClearPodResizeInProgressCondition is true and emit resize completed event - if test.oldPodResizeInProgressCondition { - am.(*manager).statusManager.SetPodResizeInProgressCondition(pod.UID, "", "", int64(1)) - } - - am.CheckPodResizeInProgress(pod, podStatus) - - // Verify pod resize completed event is emitted - podResizeCompletionEvent := getEventsFromFakeRecorder(t, am) - assert.Equal(t, test.expectPodResizeCompletedMsg, podResizeCompletionEvent) - - if test.expectHasResize { - // Verify the status manager has the InProgress condition set on it - gotResizeConditions := am.(*manager).statusManager.GetPodResizeConditions(pod.UID) - for _, c := range gotResizeConditions { - require.Equal(t, v1.PodResizeInProgress, c.Type, "ResizeConditions Type should be PodResizeInProgress") - require.Empty(t, c.Reason, "ResizeConditions Error") - require.Empty(t, c.Message, "ResizeConditions Message") - } - } else { - // Verify pod resize Inprogress condition is cleared - gotResizeConditions := am.(*manager).statusManager.GetPodResizeConditions(pod.UID) - require.Empty(t, gotResizeConditions, "ResizeConditions Error") - } - }) - } -} - -func TestHandlePodResourcesResize(t *testing.T) { +func TestRetryPendingResizes(t *testing.T) { if goruntime.GOOS == "windows" { t.Skip("InPlacePodVerticalScaling is not currently supported for Windows") } @@ -596,12 +272,19 @@ func TestHandlePodResourcesResize(t *testing.T) { testPod3.Name = "pod3" testPod3.Namespace = "ns2" + const ( + originalInProgressMsg = "original in-progress" + originalPendingMsg = "original pending" + ) + tests := []struct { name string originalRequests v1.ResourceList newRequests v1.ResourceList originalLimits v1.ResourceList newLimits v1.ResourceList + originalInProgress bool // Whether to prepopulate an in-progress condition. + originalPending bool // Whether to prepopulate a pending condition. newResourcesAllocated bool // Whether the new requests have already been allocated (but not actuated) expectedAllocatedReqs v1.ResourceList expectedAllocatedLims v1.ResourceList @@ -617,8 +300,9 @@ func TestHandlePodResourcesResize(t *testing.T) { expectedResize: []*v1.PodCondition{ { - Type: v1.PodResizeInProgress, - Status: "True", + Type: v1.PodResizeInProgress, + Status: "True", + Message: "", // Expect the original InProgress condition to be cleared. }, }, expectPodSyncTriggered: "true", @@ -662,7 +346,7 @@ func TestHandlePodResourcesResize(t *testing.T) { Type: v1.PodResizePending, Status: "True", Reason: "Deferred", - Message: "", + Message: "Node didn't have enough resource: cpu", }, }, expectPodSyncTriggered: "true", @@ -716,18 +400,64 @@ func TestHandlePodResourcesResize(t *testing.T) { expectPodSyncTriggered: "true", }, { - name: "CPU increase in progress - expect InProgress", + name: "CPU increase in progress, resources unchanged - expect InProgress", originalRequests: v1.ResourceList{v1.ResourceCPU: cpu1000m, v1.ResourceMemory: mem1000M}, newRequests: v1.ResourceList{v1.ResourceCPU: cpu1500m, v1.ResourceMemory: mem1000M}, newResourcesAllocated: true, expectedAllocatedReqs: v1.ResourceList{v1.ResourceCPU: cpu1500m, v1.ResourceMemory: mem1000M}, + originalInProgress: true, + originalPending: true, expectedResize: []*v1.PodCondition{ { - Type: v1.PodResizeInProgress, - Status: "True", + Type: v1.PodResizeInProgress, + Status: "True", + Message: originalInProgressMsg, // Since the allocation didn't change, the condition isn't reset. + }, + }, + // Should trigger a sync since the conditions changed (to update status), even though + // the allocated resources are unchanged. + expectPodSyncTriggered: "true", + }, + { + name: "CPU increase in progress, new allocation - expect InProgress reset", + originalRequests: v1.ResourceList{v1.ResourceCPU: cpu1000m, v1.ResourceMemory: mem1000M}, + newRequests: v1.ResourceList{v1.ResourceCPU: cpu1500m, v1.ResourceMemory: mem1000M}, + expectedAllocatedReqs: v1.ResourceList{v1.ResourceCPU: cpu1500m, v1.ResourceMemory: mem1000M}, + originalInProgress: true, + originalPending: true, + + expectedResize: []*v1.PodCondition{ + { + Type: v1.PodResizeInProgress, + Status: "True", + Message: "", + }, + }, + expectPodSyncTriggered: "true", + }, + { + name: "Deferred resize doesn't clear in-progress status", + originalRequests: v1.ResourceList{v1.ResourceCPU: cpu1000m, v1.ResourceMemory: mem1000M}, + newRequests: v1.ResourceList{v1.ResourceCPU: cpu500m, v1.ResourceMemory: mem2500M}, + expectedAllocatedReqs: v1.ResourceList{v1.ResourceCPU: cpu1000m, v1.ResourceMemory: mem1000M}, + originalInProgress: true, + originalPending: true, + + expectedResize: []*v1.PodCondition{ + { + Type: v1.PodResizePending, + Status: "True", + Reason: "Deferred", + Message: "Node didn't have enough resource: memory", // Deferred condition should be updated. + }, + { + Type: v1.PodResizeInProgress, + Status: "True", + Message: originalInProgressMsg, // InProgress condition should be unchanged. }, }, + expectPodSyncTriggered: "true", }, { name: "No resize", @@ -862,16 +592,20 @@ func TestHandlePodResourcesResize(t *testing.T) { } else { require.NoError(t, allocationManager.SetAllocatedResources(newPod)) } - require.NoError(t, allocationManager.SetActuatedResources(originalPod, nil)) t.Cleanup(func() { allocationManager.RemovePod(originalPod.UID) }) + if tt.originalInProgress { + allocationManager.(*manager).statusManager.SetPodResizeInProgressCondition(originalPod.UID, "", originalInProgressMsg, 0) + } + if tt.originalPending { + allocationManager.(*manager).statusManager.SetPodResizePendingCondition(originalPod.UID, v1.PodReasonDeferred, originalPendingMsg, 0) + } + allocationManager.(*manager).getPodByUID = func(uid types.UID) (*v1.Pod, bool) { return newPod, true } allocationManager.PushPendingResize(originalPod.UID) allocationManager.RetryPendingResizes(TriggerReasonPodUpdated) - allocatedPod, _ := allocationManager.UpdatePodFromAllocation(newPod) - allocationManager.CheckPodResizeInProgress(allocatedPod, podStatus) var updatedPod *v1.Pod if allocationManager.(*manager).statusManager.IsPodResizeInfeasible(newPod.UID) || allocationManager.(*manager).statusManager.IsPodResizeDeferred(newPod.UID) { @@ -895,16 +629,22 @@ func TestHandlePodResourcesResize(t *testing.T) { assert.Equal(t, tt.expectedAllocatedLims, alloc.Limits, "stored container limit allocation") resizeStatus := allocationManager.(*manager).statusManager.GetPodResizeConditions(newPod.UID) - for i := range resizeStatus { - // Ignore probe time and last transition time during comparison. - resizeStatus[i].LastProbeTime = metav1.Time{} - resizeStatus[i].LastTransitionTime = metav1.Time{} - - // Message is a substring assertion, since it can change slightly. - assert.Contains(t, resizeStatus[i].Message, tt.expectedResize[i].Message) - resizeStatus[i].Message = tt.expectedResize[i].Message + if assert.Len(t, resizeStatus, len(tt.expectedResize), "different number of resize conditions") { + for i := range resizeStatus { + // Ignore probe time and last transition time during comparison. + resizeStatus[i].LastProbeTime = metav1.Time{} + resizeStatus[i].LastTransitionTime = metav1.Time{} + + // Message is a substring assertion, since it can change slightly. + if tt.expectedResize[i].Message != "" { + assert.Contains(t, resizeStatus[i].Message, tt.expectedResize[i].Message) + } else { + assert.Empty(t, resizeStatus[i].Message) + } + resizeStatus[i].Message = tt.expectedResize[i].Message + } + assert.Equal(t, tt.expectedResize, resizeStatus) } - assert.Equal(t, tt.expectedResize, resizeStatus) assert.Equal(t, tt.expectPodSyncTriggered, newPod.Annotations["pod-sync-triggered"], "pod sync annotation should be set") }) } @@ -912,9 +652,9 @@ func TestHandlePodResourcesResize(t *testing.T) { expectedMetrics := ` # HELP kubelet_pod_infeasible_resizes_total [ALPHA] Number of infeasible resizes for pods. - # TYPE kubelet_pod_infeasible_resizes_total counter - kubelet_pod_infeasible_resizes_total{reason_detail="insufficient_node_allocatable"} 4 - kubelet_pod_infeasible_resizes_total{reason_detail="static_pod"} 2 + # TYPE kubelet_pod_infeasible_resizes_total counter + kubelet_pod_infeasible_resizes_total{reason_detail="insufficient_node_allocatable"} 4 + kubelet_pod_infeasible_resizes_total{reason_detail="static_pod"} 2 ` assert.NoError(t, testutil.GatherAndCompare( legacyregistry.DefaultGatherer, strings.NewReader(expectedMetrics), "kubelet_pod_infeasible_resizes_total", @@ -1122,8 +862,6 @@ func TestHandlePodResourcesResizeForGuanteedQOSPods(t *testing.T) { allocationManager := makeAllocationManager(t, &containertest.FakeRuntime{PodStatus: *podStatus}, []*v1.Pod{guaranteedQOSPod, guaranteedQOSPodWithSidecar, bestEffortPod}, &nodeConfig) require.NoError(t, allocationManager.SetAllocatedResources(originalPod)) - - require.NoError(t, allocationManager.SetActuatedResources(originalPod, nil)) t.Cleanup(func() { allocationManager.RemovePod(originalPod.UID) }) allocationManager.(*manager).getPodByUID = func(uid types.UID) (*v1.Pod, bool) { @@ -1131,8 +869,6 @@ func TestHandlePodResourcesResizeForGuanteedQOSPods(t *testing.T) { } allocationManager.PushPendingResize(originalPod.UID) allocationManager.RetryPendingResizes(TriggerReasonPodUpdated) - allocatedPod, _ := allocationManager.UpdatePodFromAllocation(newPod) - allocationManager.CheckPodResizeInProgress(allocatedPod, podStatus) var updatedPod *v1.Pod if allocationManager.(*manager).statusManager.IsPodResizeInfeasible(newPod.UID) || allocationManager.(*manager).statusManager.IsPodResizeDeferred(newPod.UID) { @@ -1303,7 +1039,6 @@ func TestHandlePodResourcesResizeWithSwap(t *testing.T) { allocationManager := makeAllocationManager(t, runtime, []*v1.Pod{testPod}, nil) require.NoError(t, allocationManager.SetAllocatedResources(originalPod)) - require.NoError(t, allocationManager.SetActuatedResources(originalPod, nil)) t.Cleanup(func() { allocationManager.RemovePod(originalPod.UID) }) allocationManager.(*manager).getPodByUID = func(uid types.UID) (*v1.Pod, bool) { @@ -1311,8 +1046,6 @@ func TestHandlePodResourcesResizeWithSwap(t *testing.T) { } allocationManager.PushPendingResize(testPod.UID) allocationManager.RetryPendingResizes(TriggerReasonPodUpdated) - allocatedPod, _ := allocationManager.UpdatePodFromAllocation(newPod) - allocationManager.CheckPodResizeInProgress(allocatedPod, podStatus) var updatedPod *v1.Pod if allocationManager.(*manager).statusManager.IsPodResizeInfeasible(newPod.UID) { @@ -1498,8 +1231,6 @@ func TestHandlePodResourcesResizeMultipleConditions(t *testing.T) { allocationManager.PushPendingResize(testPod.UID) allocationManager.RetryPendingResizes(TriggerReasonPodUpdated) - allocatedPod, _ := allocationManager.UpdatePodFromAllocation(testPod) - allocationManager.CheckPodResizeInProgress(allocatedPod, podStatus) conditions := allocationManager.(*manager).statusManager.GetPodResizeConditions(testPod.UID) require.Len(t, conditions, len(tc.expectedConditions)) @@ -2041,7 +1772,6 @@ func TestRecordPodDeferredAcceptedResizes(t *testing.T) { am := makeAllocationManager(t, &containertest.FakeRuntime{}, []*v1.Pod{original}, nil) require.NoError(t, am.SetAllocatedResources(original)) - require.NoError(t, am.SetActuatedResources(original, nil)) if tc.hasPendingCondition { am.(*manager).statusManager.SetPodResizePendingCondition(original.UID, v1.PodReasonDeferred, "message", 1) } @@ -2073,7 +1803,8 @@ func makeAllocationManager(t *testing.T, runtime *containertest.FakeRuntime, all containerManager = cm.NewFakeContainerManagerWithNodeConfig(*nodeConfig) } allocationManager := NewInMemoryManager( - containerManager, + containerManager.GetNodeConfig(), + containerManager.GetNodeAllocatableAbsolute(), statusManager, func(pod *v1.Pod) { /* For testing, just mark the pod as having a pod sync triggered in an annotation. */ @@ -2110,7 +1841,7 @@ func makeAllocationManager(t *testing.T, runtime *containertest.FakeRuntime, all }, }, nil } - handler := lifecycle.NewPredicateAdmitHandler(getNode, lifecycle.NewAdmissionFailureHandlerStub(), allocationManager.(*manager).containerManager.UpdatePluginResources) + handler := lifecycle.NewPredicateAdmitHandler(getNode, lifecycle.NewAdmissionFailureHandlerStub(), containerManager.UpdatePluginResources) allocationManager.AddPodAdmitHandlers(lifecycle.PodAdmitHandlers{handler}) return allocationManager diff --git a/pkg/kubelet/apis/config/validation/validation.go b/pkg/kubelet/apis/config/validation/validation.go index 44763f1471487..5fc256fc79520 100644 --- a/pkg/kubelet/apis/config/validation/validation.go +++ b/pkg/kubelet/apis/config/validation/validation.go @@ -59,6 +59,9 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration, featur if err := localFeatureGate.SetFromMap(kc.FeatureGates); err != nil { return err } + if errs := localFeatureGate.Validate(); len(errs) > 0 { + allErrors = append(allErrors, errs...) + } if kc.NodeLeaseDurationSeconds <= 0 { allErrors = append(allErrors, fmt.Errorf("invalid configuration: nodeLeaseDurationSeconds must be greater than 0")) @@ -350,7 +353,7 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration, featur } if kc.EnableSystemLogQuery && !localFeatureGate.Enabled(features.NodeLogQuery) { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: NodeLogQuery feature gate is required for enableSystemLogHandler")) + allErrors = append(allErrors, fmt.Errorf("invalid configuration: NodeLogQuery feature gate is required for enableSystemLogQuery")) } if kc.EnableSystemLogQuery && !kc.EnableSystemLogHandler { allErrors = append(allErrors, diff --git a/pkg/kubelet/apis/config/validation/validation_test.go b/pkg/kubelet/apis/config/validation/validation_test.go index 6787f88df5c06..67727334f4e53 100644 --- a/pkg/kubelet/apis/config/validation/validation_test.go +++ b/pkg/kubelet/apis/config/validation/validation_test.go @@ -76,7 +76,8 @@ var ( "KubeletCrashLoopBackOffMax": true, }, Logging: logsapi.LoggingConfiguration{ - Format: "text", + Format: "text", + FlushFrequency: logsapi.TimeOrMetaDuration{Duration: metav1.Duration{Duration: logsapi.LogFlushFreqDefault}}, }, ContainerRuntimeEndpoint: "unix:///run/containerd/containerd.sock", ContainerLogMaxWorkers: 1, @@ -604,7 +605,7 @@ func TestValidateKubeletConfiguration(t *testing.T) { conf.EnableSystemLogQuery = true return conf }, - errMsg: "invalid configuration: NodeLogQuery feature gate is required for enableSystemLogHandler", + errMsg: "invalid configuration: NodeLogQuery feature gate is required for enableSystemLogQuery", }, { name: "enableSystemLogQuery is enabled without enableSystemLogHandler", configure: func(conf *kubeletconfig.KubeletConfiguration) *kubeletconfig.KubeletConfiguration { diff --git a/pkg/kubelet/apis/podresources/.mockery.yaml b/pkg/kubelet/apis/podresources/.mockery.yaml index d25fc0979c7f8..bf7308edb78f1 100644 --- a/pkg/kubelet/apis/podresources/.mockery.yaml +++ b/pkg/kubelet/apis/podresources/.mockery.yaml @@ -1,16 +1,16 @@ --- dir: testing -filename: "{{.InterfaceName | snakecase}}.go" -boilerplate-file: ../../../../hack/boilerplate/boilerplate.generatego.txt -outpkg: testing -with-expecter: true +filename: mocks.go +pkgname: testing +template: testify +template-data: + boilerplate-file: ../../../../hack/boilerplate/boilerplate.generatego.txt + unroll-variadic: true packages: k8s.io/kubernetes/pkg/kubelet/apis/podresources: interfaces: - CPUsProvider: - config: - filename: cpus_provider.go - DevicesProvider: - DynamicResourcesProvider: - MemoryProvider: - PodsProvider: + CPUsProvider: {} + DevicesProvider: {} + DynamicResourcesProvider: {} + MemoryProvider: {} + PodsProvider: {} diff --git a/pkg/kubelet/apis/podresources/testing/cpus_provider.go b/pkg/kubelet/apis/podresources/testing/cpus_provider.go deleted file mode 100644 index ff193543d3e95..0000000000000 --- a/pkg/kubelet/apis/podresources/testing/cpus_provider.go +++ /dev/null @@ -1,144 +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 mockery v2.53.3. DO NOT EDIT. - -package testing - -import mock "github.com/stretchr/testify/mock" - -// MockCPUsProvider is an autogenerated mock type for the CPUsProvider type -type MockCPUsProvider struct { - mock.Mock -} - -type MockCPUsProvider_Expecter struct { - mock *mock.Mock -} - -func (_m *MockCPUsProvider) EXPECT() *MockCPUsProvider_Expecter { - return &MockCPUsProvider_Expecter{mock: &_m.Mock} -} - -// GetAllocatableCPUs provides a mock function with no fields -func (_m *MockCPUsProvider) GetAllocatableCPUs() []int64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAllocatableCPUs") - } - - var r0 []int64 - if rf, ok := ret.Get(0).(func() []int64); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]int64) - } - } - - return r0 -} - -// MockCPUsProvider_GetAllocatableCPUs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllocatableCPUs' -type MockCPUsProvider_GetAllocatableCPUs_Call struct { - *mock.Call -} - -// GetAllocatableCPUs is a helper method to define mock.On call -func (_e *MockCPUsProvider_Expecter) GetAllocatableCPUs() *MockCPUsProvider_GetAllocatableCPUs_Call { - return &MockCPUsProvider_GetAllocatableCPUs_Call{Call: _e.mock.On("GetAllocatableCPUs")} -} - -func (_c *MockCPUsProvider_GetAllocatableCPUs_Call) Run(run func()) *MockCPUsProvider_GetAllocatableCPUs_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockCPUsProvider_GetAllocatableCPUs_Call) Return(_a0 []int64) *MockCPUsProvider_GetAllocatableCPUs_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCPUsProvider_GetAllocatableCPUs_Call) RunAndReturn(run func() []int64) *MockCPUsProvider_GetAllocatableCPUs_Call { - _c.Call.Return(run) - return _c -} - -// GetCPUs provides a mock function with given fields: podUID, containerName -func (_m *MockCPUsProvider) GetCPUs(podUID string, containerName string) []int64 { - ret := _m.Called(podUID, containerName) - - if len(ret) == 0 { - panic("no return value specified for GetCPUs") - } - - var r0 []int64 - if rf, ok := ret.Get(0).(func(string, string) []int64); ok { - r0 = rf(podUID, containerName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]int64) - } - } - - return r0 -} - -// MockCPUsProvider_GetCPUs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCPUs' -type MockCPUsProvider_GetCPUs_Call struct { - *mock.Call -} - -// GetCPUs is a helper method to define mock.On call -// - podUID string -// - containerName string -func (_e *MockCPUsProvider_Expecter) GetCPUs(podUID interface{}, containerName interface{}) *MockCPUsProvider_GetCPUs_Call { - return &MockCPUsProvider_GetCPUs_Call{Call: _e.mock.On("GetCPUs", podUID, containerName)} -} - -func (_c *MockCPUsProvider_GetCPUs_Call) Run(run func(podUID string, containerName string)) *MockCPUsProvider_GetCPUs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *MockCPUsProvider_GetCPUs_Call) Return(_a0 []int64) *MockCPUsProvider_GetCPUs_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCPUsProvider_GetCPUs_Call) RunAndReturn(run func(string, string) []int64) *MockCPUsProvider_GetCPUs_Call { - _c.Call.Return(run) - return _c -} - -// NewMockCPUsProvider creates a new instance of MockCPUsProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockCPUsProvider(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCPUsProvider { - mock := &MockCPUsProvider{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/apis/podresources/testing/devices_provider.go b/pkg/kubelet/apis/podresources/testing/devices_provider.go deleted file mode 100644 index db086aa6b9c05..0000000000000 --- a/pkg/kubelet/apis/podresources/testing/devices_provider.go +++ /dev/null @@ -1,180 +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 mockery v2.53.3. DO NOT EDIT. - -package testing - -import ( - mock "github.com/stretchr/testify/mock" - - v1 "k8s.io/kubelet/pkg/apis/podresources/v1" -) - -// MockDevicesProvider is an autogenerated mock type for the DevicesProvider type -type MockDevicesProvider struct { - mock.Mock -} - -type MockDevicesProvider_Expecter struct { - mock *mock.Mock -} - -func (_m *MockDevicesProvider) EXPECT() *MockDevicesProvider_Expecter { - return &MockDevicesProvider_Expecter{mock: &_m.Mock} -} - -// GetAllocatableDevices provides a mock function with no fields -func (_m *MockDevicesProvider) GetAllocatableDevices() []*v1.ContainerDevices { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAllocatableDevices") - } - - var r0 []*v1.ContainerDevices - if rf, ok := ret.Get(0).(func() []*v1.ContainerDevices); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*v1.ContainerDevices) - } - } - - return r0 -} - -// MockDevicesProvider_GetAllocatableDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllocatableDevices' -type MockDevicesProvider_GetAllocatableDevices_Call struct { - *mock.Call -} - -// GetAllocatableDevices is a helper method to define mock.On call -func (_e *MockDevicesProvider_Expecter) GetAllocatableDevices() *MockDevicesProvider_GetAllocatableDevices_Call { - return &MockDevicesProvider_GetAllocatableDevices_Call{Call: _e.mock.On("GetAllocatableDevices")} -} - -func (_c *MockDevicesProvider_GetAllocatableDevices_Call) Run(run func()) *MockDevicesProvider_GetAllocatableDevices_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockDevicesProvider_GetAllocatableDevices_Call) Return(_a0 []*v1.ContainerDevices) *MockDevicesProvider_GetAllocatableDevices_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDevicesProvider_GetAllocatableDevices_Call) RunAndReturn(run func() []*v1.ContainerDevices) *MockDevicesProvider_GetAllocatableDevices_Call { - _c.Call.Return(run) - return _c -} - -// GetDevices provides a mock function with given fields: podUID, containerName -func (_m *MockDevicesProvider) GetDevices(podUID string, containerName string) []*v1.ContainerDevices { - ret := _m.Called(podUID, containerName) - - if len(ret) == 0 { - panic("no return value specified for GetDevices") - } - - var r0 []*v1.ContainerDevices - if rf, ok := ret.Get(0).(func(string, string) []*v1.ContainerDevices); ok { - r0 = rf(podUID, containerName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*v1.ContainerDevices) - } - } - - return r0 -} - -// MockDevicesProvider_GetDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDevices' -type MockDevicesProvider_GetDevices_Call struct { - *mock.Call -} - -// GetDevices is a helper method to define mock.On call -// - podUID string -// - containerName string -func (_e *MockDevicesProvider_Expecter) GetDevices(podUID interface{}, containerName interface{}) *MockDevicesProvider_GetDevices_Call { - return &MockDevicesProvider_GetDevices_Call{Call: _e.mock.On("GetDevices", podUID, containerName)} -} - -func (_c *MockDevicesProvider_GetDevices_Call) Run(run func(podUID string, containerName string)) *MockDevicesProvider_GetDevices_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *MockDevicesProvider_GetDevices_Call) Return(_a0 []*v1.ContainerDevices) *MockDevicesProvider_GetDevices_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDevicesProvider_GetDevices_Call) RunAndReturn(run func(string, string) []*v1.ContainerDevices) *MockDevicesProvider_GetDevices_Call { - _c.Call.Return(run) - return _c -} - -// UpdateAllocatedDevices provides a mock function with no fields -func (_m *MockDevicesProvider) UpdateAllocatedDevices() { - _m.Called() -} - -// MockDevicesProvider_UpdateAllocatedDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAllocatedDevices' -type MockDevicesProvider_UpdateAllocatedDevices_Call struct { - *mock.Call -} - -// UpdateAllocatedDevices is a helper method to define mock.On call -func (_e *MockDevicesProvider_Expecter) UpdateAllocatedDevices() *MockDevicesProvider_UpdateAllocatedDevices_Call { - return &MockDevicesProvider_UpdateAllocatedDevices_Call{Call: _e.mock.On("UpdateAllocatedDevices")} -} - -func (_c *MockDevicesProvider_UpdateAllocatedDevices_Call) Run(run func()) *MockDevicesProvider_UpdateAllocatedDevices_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockDevicesProvider_UpdateAllocatedDevices_Call) Return() *MockDevicesProvider_UpdateAllocatedDevices_Call { - _c.Call.Return() - return _c -} - -func (_c *MockDevicesProvider_UpdateAllocatedDevices_Call) RunAndReturn(run func()) *MockDevicesProvider_UpdateAllocatedDevices_Call { - _c.Run(run) - return _c -} - -// NewMockDevicesProvider creates a new instance of MockDevicesProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockDevicesProvider(t interface { - mock.TestingT - Cleanup(func()) -}) *MockDevicesProvider { - mock := &MockDevicesProvider{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/apis/podresources/testing/dynamic_resources_provider.go b/pkg/kubelet/apis/podresources/testing/dynamic_resources_provider.go deleted file mode 100644 index e68ba5f8fdaf9..0000000000000 --- a/pkg/kubelet/apis/podresources/testing/dynamic_resources_provider.go +++ /dev/null @@ -1,103 +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 mockery v2.53.3. DO NOT EDIT. - -package testing - -import ( - mock "github.com/stretchr/testify/mock" - - podresourcesv1 "k8s.io/kubelet/pkg/apis/podresources/v1" - - v1 "k8s.io/api/core/v1" -) - -// MockDynamicResourcesProvider is an autogenerated mock type for the DynamicResourcesProvider type -type MockDynamicResourcesProvider struct { - mock.Mock -} - -type MockDynamicResourcesProvider_Expecter struct { - mock *mock.Mock -} - -func (_m *MockDynamicResourcesProvider) EXPECT() *MockDynamicResourcesProvider_Expecter { - return &MockDynamicResourcesProvider_Expecter{mock: &_m.Mock} -} - -// GetDynamicResources provides a mock function with given fields: pod, container -func (_m *MockDynamicResourcesProvider) GetDynamicResources(pod *v1.Pod, container *v1.Container) []*podresourcesv1.DynamicResource { - ret := _m.Called(pod, container) - - if len(ret) == 0 { - panic("no return value specified for GetDynamicResources") - } - - var r0 []*podresourcesv1.DynamicResource - if rf, ok := ret.Get(0).(func(*v1.Pod, *v1.Container) []*podresourcesv1.DynamicResource); ok { - r0 = rf(pod, container) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*podresourcesv1.DynamicResource) - } - } - - return r0 -} - -// MockDynamicResourcesProvider_GetDynamicResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDynamicResources' -type MockDynamicResourcesProvider_GetDynamicResources_Call struct { - *mock.Call -} - -// GetDynamicResources is a helper method to define mock.On call -// - pod *v1.Pod -// - container *v1.Container -func (_e *MockDynamicResourcesProvider_Expecter) GetDynamicResources(pod interface{}, container interface{}) *MockDynamicResourcesProvider_GetDynamicResources_Call { - return &MockDynamicResourcesProvider_GetDynamicResources_Call{Call: _e.mock.On("GetDynamicResources", pod, container)} -} - -func (_c *MockDynamicResourcesProvider_GetDynamicResources_Call) Run(run func(pod *v1.Pod, container *v1.Container)) *MockDynamicResourcesProvider_GetDynamicResources_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod), args[1].(*v1.Container)) - }) - return _c -} - -func (_c *MockDynamicResourcesProvider_GetDynamicResources_Call) Return(_a0 []*podresourcesv1.DynamicResource) *MockDynamicResourcesProvider_GetDynamicResources_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDynamicResourcesProvider_GetDynamicResources_Call) RunAndReturn(run func(*v1.Pod, *v1.Container) []*podresourcesv1.DynamicResource) *MockDynamicResourcesProvider_GetDynamicResources_Call { - _c.Call.Return(run) - return _c -} - -// NewMockDynamicResourcesProvider creates a new instance of MockDynamicResourcesProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockDynamicResourcesProvider(t interface { - mock.TestingT - Cleanup(func()) -}) *MockDynamicResourcesProvider { - mock := &MockDynamicResourcesProvider{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/apis/podresources/testing/memory_provider.go b/pkg/kubelet/apis/podresources/testing/memory_provider.go deleted file mode 100644 index 506778e850831..0000000000000 --- a/pkg/kubelet/apis/podresources/testing/memory_provider.go +++ /dev/null @@ -1,148 +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 mockery v2.53.3. DO NOT EDIT. - -package testing - -import ( - mock "github.com/stretchr/testify/mock" - - v1 "k8s.io/kubelet/pkg/apis/podresources/v1" -) - -// MockMemoryProvider is an autogenerated mock type for the MemoryProvider type -type MockMemoryProvider struct { - mock.Mock -} - -type MockMemoryProvider_Expecter struct { - mock *mock.Mock -} - -func (_m *MockMemoryProvider) EXPECT() *MockMemoryProvider_Expecter { - return &MockMemoryProvider_Expecter{mock: &_m.Mock} -} - -// GetAllocatableMemory provides a mock function with no fields -func (_m *MockMemoryProvider) GetAllocatableMemory() []*v1.ContainerMemory { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAllocatableMemory") - } - - var r0 []*v1.ContainerMemory - if rf, ok := ret.Get(0).(func() []*v1.ContainerMemory); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*v1.ContainerMemory) - } - } - - return r0 -} - -// MockMemoryProvider_GetAllocatableMemory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllocatableMemory' -type MockMemoryProvider_GetAllocatableMemory_Call struct { - *mock.Call -} - -// GetAllocatableMemory is a helper method to define mock.On call -func (_e *MockMemoryProvider_Expecter) GetAllocatableMemory() *MockMemoryProvider_GetAllocatableMemory_Call { - return &MockMemoryProvider_GetAllocatableMemory_Call{Call: _e.mock.On("GetAllocatableMemory")} -} - -func (_c *MockMemoryProvider_GetAllocatableMemory_Call) Run(run func()) *MockMemoryProvider_GetAllocatableMemory_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockMemoryProvider_GetAllocatableMemory_Call) Return(_a0 []*v1.ContainerMemory) *MockMemoryProvider_GetAllocatableMemory_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMemoryProvider_GetAllocatableMemory_Call) RunAndReturn(run func() []*v1.ContainerMemory) *MockMemoryProvider_GetAllocatableMemory_Call { - _c.Call.Return(run) - return _c -} - -// GetMemory provides a mock function with given fields: podUID, containerName -func (_m *MockMemoryProvider) GetMemory(podUID string, containerName string) []*v1.ContainerMemory { - ret := _m.Called(podUID, containerName) - - if len(ret) == 0 { - panic("no return value specified for GetMemory") - } - - var r0 []*v1.ContainerMemory - if rf, ok := ret.Get(0).(func(string, string) []*v1.ContainerMemory); ok { - r0 = rf(podUID, containerName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*v1.ContainerMemory) - } - } - - return r0 -} - -// MockMemoryProvider_GetMemory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMemory' -type MockMemoryProvider_GetMemory_Call struct { - *mock.Call -} - -// GetMemory is a helper method to define mock.On call -// - podUID string -// - containerName string -func (_e *MockMemoryProvider_Expecter) GetMemory(podUID interface{}, containerName interface{}) *MockMemoryProvider_GetMemory_Call { - return &MockMemoryProvider_GetMemory_Call{Call: _e.mock.On("GetMemory", podUID, containerName)} -} - -func (_c *MockMemoryProvider_GetMemory_Call) Run(run func(podUID string, containerName string)) *MockMemoryProvider_GetMemory_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *MockMemoryProvider_GetMemory_Call) Return(_a0 []*v1.ContainerMemory) *MockMemoryProvider_GetMemory_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMemoryProvider_GetMemory_Call) RunAndReturn(run func(string, string) []*v1.ContainerMemory) *MockMemoryProvider_GetMemory_Call { - _c.Call.Return(run) - return _c -} - -// NewMockMemoryProvider creates a new instance of MockMemoryProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockMemoryProvider(t interface { - mock.TestingT - Cleanup(func()) -}) *MockMemoryProvider { - mock := &MockMemoryProvider{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/apis/podresources/testing/mocks.go b/pkg/kubelet/apis/podresources/testing/mocks.go new file mode 100644 index 0000000000000..cbda9159c9bb6 --- /dev/null +++ b/pkg/kubelet/apis/podresources/testing/mocks.go @@ -0,0 +1,729 @@ +/* +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 mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package testing + +import ( + mock "github.com/stretchr/testify/mock" + v10 "k8s.io/api/core/v1" + "k8s.io/kubelet/pkg/apis/podresources/v1" +) + +// NewMockDevicesProvider creates a new instance of MockDevicesProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockDevicesProvider(t interface { + mock.TestingT + Cleanup(func()) +}) *MockDevicesProvider { + mock := &MockDevicesProvider{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockDevicesProvider is an autogenerated mock type for the DevicesProvider type +type MockDevicesProvider struct { + mock.Mock +} + +type MockDevicesProvider_Expecter struct { + mock *mock.Mock +} + +func (_m *MockDevicesProvider) EXPECT() *MockDevicesProvider_Expecter { + return &MockDevicesProvider_Expecter{mock: &_m.Mock} +} + +// GetAllocatableDevices provides a mock function for the type MockDevicesProvider +func (_mock *MockDevicesProvider) GetAllocatableDevices() []*v1.ContainerDevices { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetAllocatableDevices") + } + + var r0 []*v1.ContainerDevices + if returnFunc, ok := ret.Get(0).(func() []*v1.ContainerDevices); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v1.ContainerDevices) + } + } + return r0 +} + +// MockDevicesProvider_GetAllocatableDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllocatableDevices' +type MockDevicesProvider_GetAllocatableDevices_Call struct { + *mock.Call +} + +// GetAllocatableDevices is a helper method to define mock.On call +func (_e *MockDevicesProvider_Expecter) GetAllocatableDevices() *MockDevicesProvider_GetAllocatableDevices_Call { + return &MockDevicesProvider_GetAllocatableDevices_Call{Call: _e.mock.On("GetAllocatableDevices")} +} + +func (_c *MockDevicesProvider_GetAllocatableDevices_Call) Run(run func()) *MockDevicesProvider_GetAllocatableDevices_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockDevicesProvider_GetAllocatableDevices_Call) Return(containerDevicess []*v1.ContainerDevices) *MockDevicesProvider_GetAllocatableDevices_Call { + _c.Call.Return(containerDevicess) + return _c +} + +func (_c *MockDevicesProvider_GetAllocatableDevices_Call) RunAndReturn(run func() []*v1.ContainerDevices) *MockDevicesProvider_GetAllocatableDevices_Call { + _c.Call.Return(run) + return _c +} + +// GetDevices provides a mock function for the type MockDevicesProvider +func (_mock *MockDevicesProvider) GetDevices(podUID string, containerName string) []*v1.ContainerDevices { + ret := _mock.Called(podUID, containerName) + + if len(ret) == 0 { + panic("no return value specified for GetDevices") + } + + var r0 []*v1.ContainerDevices + if returnFunc, ok := ret.Get(0).(func(string, string) []*v1.ContainerDevices); ok { + r0 = returnFunc(podUID, containerName) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v1.ContainerDevices) + } + } + return r0 +} + +// MockDevicesProvider_GetDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDevices' +type MockDevicesProvider_GetDevices_Call struct { + *mock.Call +} + +// GetDevices is a helper method to define mock.On call +// - podUID string +// - containerName string +func (_e *MockDevicesProvider_Expecter) GetDevices(podUID interface{}, containerName interface{}) *MockDevicesProvider_GetDevices_Call { + return &MockDevicesProvider_GetDevices_Call{Call: _e.mock.On("GetDevices", podUID, containerName)} +} + +func (_c *MockDevicesProvider_GetDevices_Call) Run(run func(podUID string, containerName string)) *MockDevicesProvider_GetDevices_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockDevicesProvider_GetDevices_Call) Return(containerDevicess []*v1.ContainerDevices) *MockDevicesProvider_GetDevices_Call { + _c.Call.Return(containerDevicess) + return _c +} + +func (_c *MockDevicesProvider_GetDevices_Call) RunAndReturn(run func(podUID string, containerName string) []*v1.ContainerDevices) *MockDevicesProvider_GetDevices_Call { + _c.Call.Return(run) + return _c +} + +// UpdateAllocatedDevices provides a mock function for the type MockDevicesProvider +func (_mock *MockDevicesProvider) UpdateAllocatedDevices() { + _mock.Called() + return +} + +// MockDevicesProvider_UpdateAllocatedDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAllocatedDevices' +type MockDevicesProvider_UpdateAllocatedDevices_Call struct { + *mock.Call +} + +// UpdateAllocatedDevices is a helper method to define mock.On call +func (_e *MockDevicesProvider_Expecter) UpdateAllocatedDevices() *MockDevicesProvider_UpdateAllocatedDevices_Call { + return &MockDevicesProvider_UpdateAllocatedDevices_Call{Call: _e.mock.On("UpdateAllocatedDevices")} +} + +func (_c *MockDevicesProvider_UpdateAllocatedDevices_Call) Run(run func()) *MockDevicesProvider_UpdateAllocatedDevices_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockDevicesProvider_UpdateAllocatedDevices_Call) Return() *MockDevicesProvider_UpdateAllocatedDevices_Call { + _c.Call.Return() + return _c +} + +func (_c *MockDevicesProvider_UpdateAllocatedDevices_Call) RunAndReturn(run func()) *MockDevicesProvider_UpdateAllocatedDevices_Call { + _c.Run(run) + return _c +} + +// NewMockPodsProvider creates a new instance of MockPodsProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockPodsProvider(t interface { + mock.TestingT + Cleanup(func()) +}) *MockPodsProvider { + mock := &MockPodsProvider{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockPodsProvider is an autogenerated mock type for the PodsProvider type +type MockPodsProvider struct { + mock.Mock +} + +type MockPodsProvider_Expecter struct { + mock *mock.Mock +} + +func (_m *MockPodsProvider) EXPECT() *MockPodsProvider_Expecter { + return &MockPodsProvider_Expecter{mock: &_m.Mock} +} + +// GetActivePods provides a mock function for the type MockPodsProvider +func (_mock *MockPodsProvider) GetActivePods() []*v10.Pod { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetActivePods") + } + + var r0 []*v10.Pod + if returnFunc, ok := ret.Get(0).(func() []*v10.Pod); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v10.Pod) + } + } + return r0 +} + +// MockPodsProvider_GetActivePods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActivePods' +type MockPodsProvider_GetActivePods_Call struct { + *mock.Call +} + +// GetActivePods is a helper method to define mock.On call +func (_e *MockPodsProvider_Expecter) GetActivePods() *MockPodsProvider_GetActivePods_Call { + return &MockPodsProvider_GetActivePods_Call{Call: _e.mock.On("GetActivePods")} +} + +func (_c *MockPodsProvider_GetActivePods_Call) Run(run func()) *MockPodsProvider_GetActivePods_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPodsProvider_GetActivePods_Call) Return(pods []*v10.Pod) *MockPodsProvider_GetActivePods_Call { + _c.Call.Return(pods) + return _c +} + +func (_c *MockPodsProvider_GetActivePods_Call) RunAndReturn(run func() []*v10.Pod) *MockPodsProvider_GetActivePods_Call { + _c.Call.Return(run) + return _c +} + +// GetPodByName provides a mock function for the type MockPodsProvider +func (_mock *MockPodsProvider) GetPodByName(namespace string, name string) (*v10.Pod, bool) { + ret := _mock.Called(namespace, name) + + if len(ret) == 0 { + panic("no return value specified for GetPodByName") + } + + var r0 *v10.Pod + var r1 bool + if returnFunc, ok := ret.Get(0).(func(string, string) (*v10.Pod, bool)); ok { + return returnFunc(namespace, name) + } + if returnFunc, ok := ret.Get(0).(func(string, string) *v10.Pod); ok { + r0 = returnFunc(namespace, name) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v10.Pod) + } + } + if returnFunc, ok := ret.Get(1).(func(string, string) bool); ok { + r1 = returnFunc(namespace, name) + } else { + r1 = ret.Get(1).(bool) + } + return r0, r1 +} + +// MockPodsProvider_GetPodByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPodByName' +type MockPodsProvider_GetPodByName_Call struct { + *mock.Call +} + +// GetPodByName is a helper method to define mock.On call +// - namespace string +// - name string +func (_e *MockPodsProvider_Expecter) GetPodByName(namespace interface{}, name interface{}) *MockPodsProvider_GetPodByName_Call { + return &MockPodsProvider_GetPodByName_Call{Call: _e.mock.On("GetPodByName", namespace, name)} +} + +func (_c *MockPodsProvider_GetPodByName_Call) Run(run func(namespace string, name string)) *MockPodsProvider_GetPodByName_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockPodsProvider_GetPodByName_Call) Return(pod *v10.Pod, b bool) *MockPodsProvider_GetPodByName_Call { + _c.Call.Return(pod, b) + return _c +} + +func (_c *MockPodsProvider_GetPodByName_Call) RunAndReturn(run func(namespace string, name string) (*v10.Pod, bool)) *MockPodsProvider_GetPodByName_Call { + _c.Call.Return(run) + return _c +} + +// GetPods provides a mock function for the type MockPodsProvider +func (_mock *MockPodsProvider) GetPods() []*v10.Pod { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetPods") + } + + var r0 []*v10.Pod + if returnFunc, ok := ret.Get(0).(func() []*v10.Pod); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v10.Pod) + } + } + return r0 +} + +// MockPodsProvider_GetPods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPods' +type MockPodsProvider_GetPods_Call struct { + *mock.Call +} + +// GetPods is a helper method to define mock.On call +func (_e *MockPodsProvider_Expecter) GetPods() *MockPodsProvider_GetPods_Call { + return &MockPodsProvider_GetPods_Call{Call: _e.mock.On("GetPods")} +} + +func (_c *MockPodsProvider_GetPods_Call) Run(run func()) *MockPodsProvider_GetPods_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPodsProvider_GetPods_Call) Return(pods []*v10.Pod) *MockPodsProvider_GetPods_Call { + _c.Call.Return(pods) + return _c +} + +func (_c *MockPodsProvider_GetPods_Call) RunAndReturn(run func() []*v10.Pod) *MockPodsProvider_GetPods_Call { + _c.Call.Return(run) + return _c +} + +// NewMockCPUsProvider creates a new instance of MockCPUsProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockCPUsProvider(t interface { + mock.TestingT + Cleanup(func()) +}) *MockCPUsProvider { + mock := &MockCPUsProvider{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockCPUsProvider is an autogenerated mock type for the CPUsProvider type +type MockCPUsProvider struct { + mock.Mock +} + +type MockCPUsProvider_Expecter struct { + mock *mock.Mock +} + +func (_m *MockCPUsProvider) EXPECT() *MockCPUsProvider_Expecter { + return &MockCPUsProvider_Expecter{mock: &_m.Mock} +} + +// GetAllocatableCPUs provides a mock function for the type MockCPUsProvider +func (_mock *MockCPUsProvider) GetAllocatableCPUs() []int64 { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetAllocatableCPUs") + } + + var r0 []int64 + if returnFunc, ok := ret.Get(0).(func() []int64); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]int64) + } + } + return r0 +} + +// MockCPUsProvider_GetAllocatableCPUs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllocatableCPUs' +type MockCPUsProvider_GetAllocatableCPUs_Call struct { + *mock.Call +} + +// GetAllocatableCPUs is a helper method to define mock.On call +func (_e *MockCPUsProvider_Expecter) GetAllocatableCPUs() *MockCPUsProvider_GetAllocatableCPUs_Call { + return &MockCPUsProvider_GetAllocatableCPUs_Call{Call: _e.mock.On("GetAllocatableCPUs")} +} + +func (_c *MockCPUsProvider_GetAllocatableCPUs_Call) Run(run func()) *MockCPUsProvider_GetAllocatableCPUs_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockCPUsProvider_GetAllocatableCPUs_Call) Return(int64s []int64) *MockCPUsProvider_GetAllocatableCPUs_Call { + _c.Call.Return(int64s) + return _c +} + +func (_c *MockCPUsProvider_GetAllocatableCPUs_Call) RunAndReturn(run func() []int64) *MockCPUsProvider_GetAllocatableCPUs_Call { + _c.Call.Return(run) + return _c +} + +// GetCPUs provides a mock function for the type MockCPUsProvider +func (_mock *MockCPUsProvider) GetCPUs(podUID string, containerName string) []int64 { + ret := _mock.Called(podUID, containerName) + + if len(ret) == 0 { + panic("no return value specified for GetCPUs") + } + + var r0 []int64 + if returnFunc, ok := ret.Get(0).(func(string, string) []int64); ok { + r0 = returnFunc(podUID, containerName) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]int64) + } + } + return r0 +} + +// MockCPUsProvider_GetCPUs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCPUs' +type MockCPUsProvider_GetCPUs_Call struct { + *mock.Call +} + +// GetCPUs is a helper method to define mock.On call +// - podUID string +// - containerName string +func (_e *MockCPUsProvider_Expecter) GetCPUs(podUID interface{}, containerName interface{}) *MockCPUsProvider_GetCPUs_Call { + return &MockCPUsProvider_GetCPUs_Call{Call: _e.mock.On("GetCPUs", podUID, containerName)} +} + +func (_c *MockCPUsProvider_GetCPUs_Call) Run(run func(podUID string, containerName string)) *MockCPUsProvider_GetCPUs_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockCPUsProvider_GetCPUs_Call) Return(int64s []int64) *MockCPUsProvider_GetCPUs_Call { + _c.Call.Return(int64s) + return _c +} + +func (_c *MockCPUsProvider_GetCPUs_Call) RunAndReturn(run func(podUID string, containerName string) []int64) *MockCPUsProvider_GetCPUs_Call { + _c.Call.Return(run) + return _c +} + +// NewMockMemoryProvider creates a new instance of MockMemoryProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockMemoryProvider(t interface { + mock.TestingT + Cleanup(func()) +}) *MockMemoryProvider { + mock := &MockMemoryProvider{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockMemoryProvider is an autogenerated mock type for the MemoryProvider type +type MockMemoryProvider struct { + mock.Mock +} + +type MockMemoryProvider_Expecter struct { + mock *mock.Mock +} + +func (_m *MockMemoryProvider) EXPECT() *MockMemoryProvider_Expecter { + return &MockMemoryProvider_Expecter{mock: &_m.Mock} +} + +// GetAllocatableMemory provides a mock function for the type MockMemoryProvider +func (_mock *MockMemoryProvider) GetAllocatableMemory() []*v1.ContainerMemory { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetAllocatableMemory") + } + + var r0 []*v1.ContainerMemory + if returnFunc, ok := ret.Get(0).(func() []*v1.ContainerMemory); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v1.ContainerMemory) + } + } + return r0 +} + +// MockMemoryProvider_GetAllocatableMemory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllocatableMemory' +type MockMemoryProvider_GetAllocatableMemory_Call struct { + *mock.Call +} + +// GetAllocatableMemory is a helper method to define mock.On call +func (_e *MockMemoryProvider_Expecter) GetAllocatableMemory() *MockMemoryProvider_GetAllocatableMemory_Call { + return &MockMemoryProvider_GetAllocatableMemory_Call{Call: _e.mock.On("GetAllocatableMemory")} +} + +func (_c *MockMemoryProvider_GetAllocatableMemory_Call) Run(run func()) *MockMemoryProvider_GetAllocatableMemory_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockMemoryProvider_GetAllocatableMemory_Call) Return(containerMemorys []*v1.ContainerMemory) *MockMemoryProvider_GetAllocatableMemory_Call { + _c.Call.Return(containerMemorys) + return _c +} + +func (_c *MockMemoryProvider_GetAllocatableMemory_Call) RunAndReturn(run func() []*v1.ContainerMemory) *MockMemoryProvider_GetAllocatableMemory_Call { + _c.Call.Return(run) + return _c +} + +// GetMemory provides a mock function for the type MockMemoryProvider +func (_mock *MockMemoryProvider) GetMemory(podUID string, containerName string) []*v1.ContainerMemory { + ret := _mock.Called(podUID, containerName) + + if len(ret) == 0 { + panic("no return value specified for GetMemory") + } + + var r0 []*v1.ContainerMemory + if returnFunc, ok := ret.Get(0).(func(string, string) []*v1.ContainerMemory); ok { + r0 = returnFunc(podUID, containerName) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v1.ContainerMemory) + } + } + return r0 +} + +// MockMemoryProvider_GetMemory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMemory' +type MockMemoryProvider_GetMemory_Call struct { + *mock.Call +} + +// GetMemory is a helper method to define mock.On call +// - podUID string +// - containerName string +func (_e *MockMemoryProvider_Expecter) GetMemory(podUID interface{}, containerName interface{}) *MockMemoryProvider_GetMemory_Call { + return &MockMemoryProvider_GetMemory_Call{Call: _e.mock.On("GetMemory", podUID, containerName)} +} + +func (_c *MockMemoryProvider_GetMemory_Call) Run(run func(podUID string, containerName string)) *MockMemoryProvider_GetMemory_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockMemoryProvider_GetMemory_Call) Return(containerMemorys []*v1.ContainerMemory) *MockMemoryProvider_GetMemory_Call { + _c.Call.Return(containerMemorys) + return _c +} + +func (_c *MockMemoryProvider_GetMemory_Call) RunAndReturn(run func(podUID string, containerName string) []*v1.ContainerMemory) *MockMemoryProvider_GetMemory_Call { + _c.Call.Return(run) + return _c +} + +// NewMockDynamicResourcesProvider creates a new instance of MockDynamicResourcesProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockDynamicResourcesProvider(t interface { + mock.TestingT + Cleanup(func()) +}) *MockDynamicResourcesProvider { + mock := &MockDynamicResourcesProvider{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockDynamicResourcesProvider is an autogenerated mock type for the DynamicResourcesProvider type +type MockDynamicResourcesProvider struct { + mock.Mock +} + +type MockDynamicResourcesProvider_Expecter struct { + mock *mock.Mock +} + +func (_m *MockDynamicResourcesProvider) EXPECT() *MockDynamicResourcesProvider_Expecter { + return &MockDynamicResourcesProvider_Expecter{mock: &_m.Mock} +} + +// GetDynamicResources provides a mock function for the type MockDynamicResourcesProvider +func (_mock *MockDynamicResourcesProvider) GetDynamicResources(pod *v10.Pod, container *v10.Container) []*v1.DynamicResource { + ret := _mock.Called(pod, container) + + if len(ret) == 0 { + panic("no return value specified for GetDynamicResources") + } + + var r0 []*v1.DynamicResource + if returnFunc, ok := ret.Get(0).(func(*v10.Pod, *v10.Container) []*v1.DynamicResource); ok { + r0 = returnFunc(pod, container) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v1.DynamicResource) + } + } + return r0 +} + +// MockDynamicResourcesProvider_GetDynamicResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDynamicResources' +type MockDynamicResourcesProvider_GetDynamicResources_Call struct { + *mock.Call +} + +// GetDynamicResources is a helper method to define mock.On call +// - pod *v10.Pod +// - container *v10.Container +func (_e *MockDynamicResourcesProvider_Expecter) GetDynamicResources(pod interface{}, container interface{}) *MockDynamicResourcesProvider_GetDynamicResources_Call { + return &MockDynamicResourcesProvider_GetDynamicResources_Call{Call: _e.mock.On("GetDynamicResources", pod, container)} +} + +func (_c *MockDynamicResourcesProvider_GetDynamicResources_Call) Run(run func(pod *v10.Pod, container *v10.Container)) *MockDynamicResourcesProvider_GetDynamicResources_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *v10.Pod + if args[0] != nil { + arg0 = args[0].(*v10.Pod) + } + var arg1 *v10.Container + if args[1] != nil { + arg1 = args[1].(*v10.Container) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockDynamicResourcesProvider_GetDynamicResources_Call) Return(dynamicResources []*v1.DynamicResource) *MockDynamicResourcesProvider_GetDynamicResources_Call { + _c.Call.Return(dynamicResources) + return _c +} + +func (_c *MockDynamicResourcesProvider_GetDynamicResources_Call) RunAndReturn(run func(pod *v10.Pod, container *v10.Container) []*v1.DynamicResource) *MockDynamicResourcesProvider_GetDynamicResources_Call { + _c.Call.Return(run) + return _c +} diff --git a/pkg/kubelet/apis/podresources/testing/pods_provider.go b/pkg/kubelet/apis/podresources/testing/pods_provider.go deleted file mode 100644 index d917e0c7cad1a..0000000000000 --- a/pkg/kubelet/apis/podresources/testing/pods_provider.go +++ /dev/null @@ -1,205 +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 mockery v2.53.3. DO NOT EDIT. - -package testing - -import ( - mock "github.com/stretchr/testify/mock" - - v1 "k8s.io/api/core/v1" -) - -// MockPodsProvider is an autogenerated mock type for the PodsProvider type -type MockPodsProvider struct { - mock.Mock -} - -type MockPodsProvider_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPodsProvider) EXPECT() *MockPodsProvider_Expecter { - return &MockPodsProvider_Expecter{mock: &_m.Mock} -} - -// GetActivePods provides a mock function with no fields -func (_m *MockPodsProvider) GetActivePods() []*v1.Pod { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetActivePods") - } - - var r0 []*v1.Pod - if rf, ok := ret.Get(0).(func() []*v1.Pod); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*v1.Pod) - } - } - - return r0 -} - -// MockPodsProvider_GetActivePods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActivePods' -type MockPodsProvider_GetActivePods_Call struct { - *mock.Call -} - -// GetActivePods is a helper method to define mock.On call -func (_e *MockPodsProvider_Expecter) GetActivePods() *MockPodsProvider_GetActivePods_Call { - return &MockPodsProvider_GetActivePods_Call{Call: _e.mock.On("GetActivePods")} -} - -func (_c *MockPodsProvider_GetActivePods_Call) Run(run func()) *MockPodsProvider_GetActivePods_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPodsProvider_GetActivePods_Call) Return(_a0 []*v1.Pod) *MockPodsProvider_GetActivePods_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPodsProvider_GetActivePods_Call) RunAndReturn(run func() []*v1.Pod) *MockPodsProvider_GetActivePods_Call { - _c.Call.Return(run) - return _c -} - -// GetPodByName provides a mock function with given fields: namespace, name -func (_m *MockPodsProvider) GetPodByName(namespace string, name string) (*v1.Pod, bool) { - ret := _m.Called(namespace, name) - - if len(ret) == 0 { - panic("no return value specified for GetPodByName") - } - - var r0 *v1.Pod - var r1 bool - if rf, ok := ret.Get(0).(func(string, string) (*v1.Pod, bool)); ok { - return rf(namespace, name) - } - if rf, ok := ret.Get(0).(func(string, string) *v1.Pod); ok { - r0 = rf(namespace, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1.Pod) - } - } - - if rf, ok := ret.Get(1).(func(string, string) bool); ok { - r1 = rf(namespace, name) - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// MockPodsProvider_GetPodByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPodByName' -type MockPodsProvider_GetPodByName_Call struct { - *mock.Call -} - -// GetPodByName is a helper method to define mock.On call -// - namespace string -// - name string -func (_e *MockPodsProvider_Expecter) GetPodByName(namespace interface{}, name interface{}) *MockPodsProvider_GetPodByName_Call { - return &MockPodsProvider_GetPodByName_Call{Call: _e.mock.On("GetPodByName", namespace, name)} -} - -func (_c *MockPodsProvider_GetPodByName_Call) Run(run func(namespace string, name string)) *MockPodsProvider_GetPodByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *MockPodsProvider_GetPodByName_Call) Return(_a0 *v1.Pod, _a1 bool) *MockPodsProvider_GetPodByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPodsProvider_GetPodByName_Call) RunAndReturn(run func(string, string) (*v1.Pod, bool)) *MockPodsProvider_GetPodByName_Call { - _c.Call.Return(run) - return _c -} - -// GetPods provides a mock function with no fields -func (_m *MockPodsProvider) GetPods() []*v1.Pod { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPods") - } - - var r0 []*v1.Pod - if rf, ok := ret.Get(0).(func() []*v1.Pod); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*v1.Pod) - } - } - - return r0 -} - -// MockPodsProvider_GetPods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPods' -type MockPodsProvider_GetPods_Call struct { - *mock.Call -} - -// GetPods is a helper method to define mock.On call -func (_e *MockPodsProvider_Expecter) GetPods() *MockPodsProvider_GetPods_Call { - return &MockPodsProvider_GetPods_Call{Call: _e.mock.On("GetPods")} -} - -func (_c *MockPodsProvider_GetPods_Call) Run(run func()) *MockPodsProvider_GetPods_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPodsProvider_GetPods_Call) Return(_a0 []*v1.Pod) *MockPodsProvider_GetPods_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPodsProvider_GetPods_Call) RunAndReturn(run func() []*v1.Pod) *MockPodsProvider_GetPods_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPodsProvider creates a new instance of MockPodsProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockPodsProvider(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPodsProvider { - mock := &MockPodsProvider{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/cadvisor/.mockery.yaml b/pkg/kubelet/cadvisor/.mockery.yaml index b8d6ef3efaa1a..586061a15d916 100644 --- a/pkg/kubelet/cadvisor/.mockery.yaml +++ b/pkg/kubelet/cadvisor/.mockery.yaml @@ -1,10 +1,12 @@ --- dir: testing -filename: cadvisor_mock.go -boilerplate-file: ../../../hack/boilerplate/boilerplate.generatego.txt -outpkg: testing -with-expecter: true +filename: mocks.go +pkgname: testing +template: testify +template-data: + boilerplate-file: ../../../hack/boilerplate/boilerplate.generatego.txt + unroll-variadic: true packages: k8s.io/kubernetes/pkg/kubelet/cadvisor: interfaces: - Interface: + Interface: {} diff --git a/pkg/kubelet/cadvisor/testing/cadvisor_mock.go b/pkg/kubelet/cadvisor/testing/mocks.go similarity index 57% rename from pkg/kubelet/cadvisor/testing/cadvisor_mock.go rename to pkg/kubelet/cadvisor/testing/mocks.go index 3073773ba6819..b781cad143a57 100644 --- a/pkg/kubelet/cadvisor/testing/cadvisor_mock.go +++ b/pkg/kubelet/cadvisor/testing/mocks.go @@ -14,19 +14,34 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by mockery v2.53.3. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package testing import ( - context "context" + "context" - v1 "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/info/v2" mock "github.com/stretchr/testify/mock" - - v2 "github.com/google/cadvisor/info/v2" ) +// NewMockInterface creates a new instance of MockInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockInterface(t interface { + mock.TestingT + Cleanup(func()) +}) *MockInterface { + mock := &MockInterface{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockInterface is an autogenerated mock type for the Interface type type MockInterface struct { mock.Mock @@ -40,9 +55,9 @@ func (_m *MockInterface) EXPECT() *MockInterface_Expecter { return &MockInterface_Expecter{mock: &_m.Mock} } -// ContainerFsInfo provides a mock function with given fields: _a0 -func (_m *MockInterface) ContainerFsInfo(_a0 context.Context) (v2.FsInfo, error) { - ret := _m.Called(_a0) +// ContainerFsInfo provides a mock function for the type MockInterface +func (_mock *MockInterface) ContainerFsInfo(context1 context.Context) (v2.FsInfo, error) { + ret := _mock.Called(context1) if len(ret) == 0 { panic("no return value specified for ContainerFsInfo") @@ -50,21 +65,19 @@ func (_m *MockInterface) ContainerFsInfo(_a0 context.Context) (v2.FsInfo, error) var r0 v2.FsInfo var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (v2.FsInfo, error)); ok { - return rf(_a0) + if returnFunc, ok := ret.Get(0).(func(context.Context) (v2.FsInfo, error)); ok { + return returnFunc(context1) } - if rf, ok := ret.Get(0).(func(context.Context) v2.FsInfo); ok { - r0 = rf(_a0) + if returnFunc, ok := ret.Get(0).(func(context.Context) v2.FsInfo); ok { + r0 = returnFunc(context1) } else { r0 = ret.Get(0).(v2.FsInfo) } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(context1) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -74,31 +87,37 @@ type MockInterface_ContainerFsInfo_Call struct { } // ContainerFsInfo is a helper method to define mock.On call -// - _a0 context.Context -func (_e *MockInterface_Expecter) ContainerFsInfo(_a0 interface{}) *MockInterface_ContainerFsInfo_Call { - return &MockInterface_ContainerFsInfo_Call{Call: _e.mock.On("ContainerFsInfo", _a0)} +// - context1 context.Context +func (_e *MockInterface_Expecter) ContainerFsInfo(context1 interface{}) *MockInterface_ContainerFsInfo_Call { + return &MockInterface_ContainerFsInfo_Call{Call: _e.mock.On("ContainerFsInfo", context1)} } -func (_c *MockInterface_ContainerFsInfo_Call) Run(run func(_a0 context.Context)) *MockInterface_ContainerFsInfo_Call { +func (_c *MockInterface_ContainerFsInfo_Call) Run(run func(context1 context.Context)) *MockInterface_ContainerFsInfo_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) }) return _c } -func (_c *MockInterface_ContainerFsInfo_Call) Return(_a0 v2.FsInfo, _a1 error) *MockInterface_ContainerFsInfo_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockInterface_ContainerFsInfo_Call) Return(fsInfo v2.FsInfo, err error) *MockInterface_ContainerFsInfo_Call { + _c.Call.Return(fsInfo, err) return _c } -func (_c *MockInterface_ContainerFsInfo_Call) RunAndReturn(run func(context.Context) (v2.FsInfo, error)) *MockInterface_ContainerFsInfo_Call { +func (_c *MockInterface_ContainerFsInfo_Call) RunAndReturn(run func(context1 context.Context) (v2.FsInfo, error)) *MockInterface_ContainerFsInfo_Call { _c.Call.Return(run) return _c } -// ContainerInfoV2 provides a mock function with given fields: name, options -func (_m *MockInterface) ContainerInfoV2(name string, options v2.RequestOptions) (map[string]v2.ContainerInfo, error) { - ret := _m.Called(name, options) +// ContainerInfoV2 provides a mock function for the type MockInterface +func (_mock *MockInterface) ContainerInfoV2(name string, options v2.RequestOptions) (map[string]v2.ContainerInfo, error) { + ret := _mock.Called(name, options) if len(ret) == 0 { panic("no return value specified for ContainerInfoV2") @@ -106,23 +125,21 @@ func (_m *MockInterface) ContainerInfoV2(name string, options v2.RequestOptions) var r0 map[string]v2.ContainerInfo var r1 error - if rf, ok := ret.Get(0).(func(string, v2.RequestOptions) (map[string]v2.ContainerInfo, error)); ok { - return rf(name, options) + if returnFunc, ok := ret.Get(0).(func(string, v2.RequestOptions) (map[string]v2.ContainerInfo, error)); ok { + return returnFunc(name, options) } - if rf, ok := ret.Get(0).(func(string, v2.RequestOptions) map[string]v2.ContainerInfo); ok { - r0 = rf(name, options) + if returnFunc, ok := ret.Get(0).(func(string, v2.RequestOptions) map[string]v2.ContainerInfo); ok { + r0 = returnFunc(name, options) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[string]v2.ContainerInfo) } } - - if rf, ok := ret.Get(1).(func(string, v2.RequestOptions) error); ok { - r1 = rf(name, options) + if returnFunc, ok := ret.Get(1).(func(string, v2.RequestOptions) error); ok { + r1 = returnFunc(name, options) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -140,24 +157,35 @@ func (_e *MockInterface_Expecter) ContainerInfoV2(name interface{}, options inte func (_c *MockInterface_ContainerInfoV2_Call) Run(run func(name string, options v2.RequestOptions)) *MockInterface_ContainerInfoV2_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(v2.RequestOptions)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 v2.RequestOptions + if args[1] != nil { + arg1 = args[1].(v2.RequestOptions) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockInterface_ContainerInfoV2_Call) Return(_a0 map[string]v2.ContainerInfo, _a1 error) *MockInterface_ContainerInfoV2_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockInterface_ContainerInfoV2_Call) Return(stringToContainerInfo map[string]v2.ContainerInfo, err error) *MockInterface_ContainerInfoV2_Call { + _c.Call.Return(stringToContainerInfo, err) return _c } -func (_c *MockInterface_ContainerInfoV2_Call) RunAndReturn(run func(string, v2.RequestOptions) (map[string]v2.ContainerInfo, error)) *MockInterface_ContainerInfoV2_Call { +func (_c *MockInterface_ContainerInfoV2_Call) RunAndReturn(run func(name string, options v2.RequestOptions) (map[string]v2.ContainerInfo, error)) *MockInterface_ContainerInfoV2_Call { _c.Call.Return(run) return _c } -// GetDirFsInfo provides a mock function with given fields: path -func (_m *MockInterface) GetDirFsInfo(path string) (v2.FsInfo, error) { - ret := _m.Called(path) +// GetDirFsInfo provides a mock function for the type MockInterface +func (_mock *MockInterface) GetDirFsInfo(path string) (v2.FsInfo, error) { + ret := _mock.Called(path) if len(ret) == 0 { panic("no return value specified for GetDirFsInfo") @@ -165,21 +193,19 @@ func (_m *MockInterface) GetDirFsInfo(path string) (v2.FsInfo, error) { var r0 v2.FsInfo var r1 error - if rf, ok := ret.Get(0).(func(string) (v2.FsInfo, error)); ok { - return rf(path) + if returnFunc, ok := ret.Get(0).(func(string) (v2.FsInfo, error)); ok { + return returnFunc(path) } - if rf, ok := ret.Get(0).(func(string) v2.FsInfo); ok { - r0 = rf(path) + if returnFunc, ok := ret.Get(0).(func(string) v2.FsInfo); ok { + r0 = returnFunc(path) } else { r0 = ret.Get(0).(v2.FsInfo) } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(path) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(path) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -196,24 +222,30 @@ func (_e *MockInterface_Expecter) GetDirFsInfo(path interface{}) *MockInterface_ func (_c *MockInterface_GetDirFsInfo_Call) Run(run func(path string)) *MockInterface_GetDirFsInfo_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockInterface_GetDirFsInfo_Call) Return(_a0 v2.FsInfo, _a1 error) *MockInterface_GetDirFsInfo_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockInterface_GetDirFsInfo_Call) Return(fsInfo v2.FsInfo, err error) *MockInterface_GetDirFsInfo_Call { + _c.Call.Return(fsInfo, err) return _c } -func (_c *MockInterface_GetDirFsInfo_Call) RunAndReturn(run func(string) (v2.FsInfo, error)) *MockInterface_GetDirFsInfo_Call { +func (_c *MockInterface_GetDirFsInfo_Call) RunAndReturn(run func(path string) (v2.FsInfo, error)) *MockInterface_GetDirFsInfo_Call { _c.Call.Return(run) return _c } -// GetRequestedContainersInfo provides a mock function with given fields: containerName, options -func (_m *MockInterface) GetRequestedContainersInfo(containerName string, options v2.RequestOptions) (map[string]*v1.ContainerInfo, error) { - ret := _m.Called(containerName, options) +// GetRequestedContainersInfo provides a mock function for the type MockInterface +func (_mock *MockInterface) GetRequestedContainersInfo(containerName string, options v2.RequestOptions) (map[string]*v1.ContainerInfo, error) { + ret := _mock.Called(containerName, options) if len(ret) == 0 { panic("no return value specified for GetRequestedContainersInfo") @@ -221,23 +253,21 @@ func (_m *MockInterface) GetRequestedContainersInfo(containerName string, option var r0 map[string]*v1.ContainerInfo var r1 error - if rf, ok := ret.Get(0).(func(string, v2.RequestOptions) (map[string]*v1.ContainerInfo, error)); ok { - return rf(containerName, options) + if returnFunc, ok := ret.Get(0).(func(string, v2.RequestOptions) (map[string]*v1.ContainerInfo, error)); ok { + return returnFunc(containerName, options) } - if rf, ok := ret.Get(0).(func(string, v2.RequestOptions) map[string]*v1.ContainerInfo); ok { - r0 = rf(containerName, options) + if returnFunc, ok := ret.Get(0).(func(string, v2.RequestOptions) map[string]*v1.ContainerInfo); ok { + r0 = returnFunc(containerName, options) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[string]*v1.ContainerInfo) } } - - if rf, ok := ret.Get(1).(func(string, v2.RequestOptions) error); ok { - r1 = rf(containerName, options) + if returnFunc, ok := ret.Get(1).(func(string, v2.RequestOptions) error); ok { + r1 = returnFunc(containerName, options) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -255,24 +285,35 @@ func (_e *MockInterface_Expecter) GetRequestedContainersInfo(containerName inter func (_c *MockInterface_GetRequestedContainersInfo_Call) Run(run func(containerName string, options v2.RequestOptions)) *MockInterface_GetRequestedContainersInfo_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(v2.RequestOptions)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 v2.RequestOptions + if args[1] != nil { + arg1 = args[1].(v2.RequestOptions) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockInterface_GetRequestedContainersInfo_Call) Return(_a0 map[string]*v1.ContainerInfo, _a1 error) *MockInterface_GetRequestedContainersInfo_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockInterface_GetRequestedContainersInfo_Call) Return(stringToContainerInfo map[string]*v1.ContainerInfo, err error) *MockInterface_GetRequestedContainersInfo_Call { + _c.Call.Return(stringToContainerInfo, err) return _c } -func (_c *MockInterface_GetRequestedContainersInfo_Call) RunAndReturn(run func(string, v2.RequestOptions) (map[string]*v1.ContainerInfo, error)) *MockInterface_GetRequestedContainersInfo_Call { +func (_c *MockInterface_GetRequestedContainersInfo_Call) RunAndReturn(run func(containerName string, options v2.RequestOptions) (map[string]*v1.ContainerInfo, error)) *MockInterface_GetRequestedContainersInfo_Call { _c.Call.Return(run) return _c } -// ImagesFsInfo provides a mock function with given fields: _a0 -func (_m *MockInterface) ImagesFsInfo(_a0 context.Context) (v2.FsInfo, error) { - ret := _m.Called(_a0) +// ImagesFsInfo provides a mock function for the type MockInterface +func (_mock *MockInterface) ImagesFsInfo(context1 context.Context) (v2.FsInfo, error) { + ret := _mock.Called(context1) if len(ret) == 0 { panic("no return value specified for ImagesFsInfo") @@ -280,21 +321,19 @@ func (_m *MockInterface) ImagesFsInfo(_a0 context.Context) (v2.FsInfo, error) { var r0 v2.FsInfo var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (v2.FsInfo, error)); ok { - return rf(_a0) + if returnFunc, ok := ret.Get(0).(func(context.Context) (v2.FsInfo, error)); ok { + return returnFunc(context1) } - if rf, ok := ret.Get(0).(func(context.Context) v2.FsInfo); ok { - r0 = rf(_a0) + if returnFunc, ok := ret.Get(0).(func(context.Context) v2.FsInfo); ok { + r0 = returnFunc(context1) } else { r0 = ret.Get(0).(v2.FsInfo) } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(context1) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -304,31 +343,37 @@ type MockInterface_ImagesFsInfo_Call struct { } // ImagesFsInfo is a helper method to define mock.On call -// - _a0 context.Context -func (_e *MockInterface_Expecter) ImagesFsInfo(_a0 interface{}) *MockInterface_ImagesFsInfo_Call { - return &MockInterface_ImagesFsInfo_Call{Call: _e.mock.On("ImagesFsInfo", _a0)} +// - context1 context.Context +func (_e *MockInterface_Expecter) ImagesFsInfo(context1 interface{}) *MockInterface_ImagesFsInfo_Call { + return &MockInterface_ImagesFsInfo_Call{Call: _e.mock.On("ImagesFsInfo", context1)} } -func (_c *MockInterface_ImagesFsInfo_Call) Run(run func(_a0 context.Context)) *MockInterface_ImagesFsInfo_Call { +func (_c *MockInterface_ImagesFsInfo_Call) Run(run func(context1 context.Context)) *MockInterface_ImagesFsInfo_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) }) return _c } -func (_c *MockInterface_ImagesFsInfo_Call) Return(_a0 v2.FsInfo, _a1 error) *MockInterface_ImagesFsInfo_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockInterface_ImagesFsInfo_Call) Return(fsInfo v2.FsInfo, err error) *MockInterface_ImagesFsInfo_Call { + _c.Call.Return(fsInfo, err) return _c } -func (_c *MockInterface_ImagesFsInfo_Call) RunAndReturn(run func(context.Context) (v2.FsInfo, error)) *MockInterface_ImagesFsInfo_Call { +func (_c *MockInterface_ImagesFsInfo_Call) RunAndReturn(run func(context1 context.Context) (v2.FsInfo, error)) *MockInterface_ImagesFsInfo_Call { _c.Call.Return(run) return _c } -// MachineInfo provides a mock function with no fields -func (_m *MockInterface) MachineInfo() (*v1.MachineInfo, error) { - ret := _m.Called() +// MachineInfo provides a mock function for the type MockInterface +func (_mock *MockInterface) MachineInfo() (*v1.MachineInfo, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for MachineInfo") @@ -336,23 +381,21 @@ func (_m *MockInterface) MachineInfo() (*v1.MachineInfo, error) { var r0 *v1.MachineInfo var r1 error - if rf, ok := ret.Get(0).(func() (*v1.MachineInfo, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (*v1.MachineInfo, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() *v1.MachineInfo); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() *v1.MachineInfo); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1.MachineInfo) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -373,8 +416,8 @@ func (_c *MockInterface_MachineInfo_Call) Run(run func()) *MockInterface_Machine return _c } -func (_c *MockInterface_MachineInfo_Call) Return(_a0 *v1.MachineInfo, _a1 error) *MockInterface_MachineInfo_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockInterface_MachineInfo_Call) Return(machineInfo *v1.MachineInfo, err error) *MockInterface_MachineInfo_Call { + _c.Call.Return(machineInfo, err) return _c } @@ -383,9 +426,9 @@ func (_c *MockInterface_MachineInfo_Call) RunAndReturn(run func() (*v1.MachineIn return _c } -// RootFsInfo provides a mock function with no fields -func (_m *MockInterface) RootFsInfo() (v2.FsInfo, error) { - ret := _m.Called() +// RootFsInfo provides a mock function for the type MockInterface +func (_mock *MockInterface) RootFsInfo() (v2.FsInfo, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for RootFsInfo") @@ -393,21 +436,19 @@ func (_m *MockInterface) RootFsInfo() (v2.FsInfo, error) { var r0 v2.FsInfo var r1 error - if rf, ok := ret.Get(0).(func() (v2.FsInfo, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (v2.FsInfo, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() v2.FsInfo); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() v2.FsInfo); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(v2.FsInfo) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -428,8 +469,8 @@ func (_c *MockInterface_RootFsInfo_Call) Run(run func()) *MockInterface_RootFsIn return _c } -func (_c *MockInterface_RootFsInfo_Call) Return(_a0 v2.FsInfo, _a1 error) *MockInterface_RootFsInfo_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockInterface_RootFsInfo_Call) Return(fsInfo v2.FsInfo, err error) *MockInterface_RootFsInfo_Call { + _c.Call.Return(fsInfo, err) return _c } @@ -438,21 +479,20 @@ func (_c *MockInterface_RootFsInfo_Call) RunAndReturn(run func() (v2.FsInfo, err return _c } -// Start provides a mock function with no fields -func (_m *MockInterface) Start() error { - ret := _m.Called() +// Start provides a mock function for the type MockInterface +func (_mock *MockInterface) Start() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Start") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -473,8 +513,8 @@ func (_c *MockInterface_Start_Call) Run(run func()) *MockInterface_Start_Call { return _c } -func (_c *MockInterface_Start_Call) Return(_a0 error) *MockInterface_Start_Call { - _c.Call.Return(_a0) +func (_c *MockInterface_Start_Call) Return(err error) *MockInterface_Start_Call { + _c.Call.Return(err) return _c } @@ -483,9 +523,9 @@ func (_c *MockInterface_Start_Call) RunAndReturn(run func() error) *MockInterfac return _c } -// VersionInfo provides a mock function with no fields -func (_m *MockInterface) VersionInfo() (*v1.VersionInfo, error) { - ret := _m.Called() +// VersionInfo provides a mock function for the type MockInterface +func (_mock *MockInterface) VersionInfo() (*v1.VersionInfo, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for VersionInfo") @@ -493,23 +533,21 @@ func (_m *MockInterface) VersionInfo() (*v1.VersionInfo, error) { var r0 *v1.VersionInfo var r1 error - if rf, ok := ret.Get(0).(func() (*v1.VersionInfo, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (*v1.VersionInfo, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() *v1.VersionInfo); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() *v1.VersionInfo); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1.VersionInfo) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -530,8 +568,8 @@ func (_c *MockInterface_VersionInfo_Call) Run(run func()) *MockInterface_Version return _c } -func (_c *MockInterface_VersionInfo_Call) Return(_a0 *v1.VersionInfo, _a1 error) *MockInterface_VersionInfo_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockInterface_VersionInfo_Call) Return(versionInfo *v1.VersionInfo, err error) *MockInterface_VersionInfo_Call { + _c.Call.Return(versionInfo, err) return _c } @@ -539,17 +577,3 @@ func (_c *MockInterface_VersionInfo_Call) RunAndReturn(run func() (*v1.VersionIn _c.Call.Return(run) return _c } - -// NewMockInterface creates a new instance of MockInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockInterface { - mock := &MockInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/certificate/bootstrap/bootstrap.go b/pkg/kubelet/certificate/bootstrap/bootstrap.go index 2caea4c24f38b..4377ff32aa04d 100644 --- a/pkg/kubelet/certificate/bootstrap/bootstrap.go +++ b/pkg/kubelet/certificate/bootstrap/bootstrap.go @@ -56,13 +56,13 @@ const tmpPrivateKeyFile = "kubelet-client.key.tmp" // kubeconfigPath on disk is populated based on bootstrapPath but pointing to the location of the client cert // in certDir. This preserves the historical behavior of bootstrapping where on subsequent restarts the // most recent client cert is used to request new client certs instead of the initial token. -func LoadClientConfig(kubeconfigPath, bootstrapPath, certDir string) (certConfig, userConfig *restclient.Config, err error) { +func LoadClientConfig(logger klog.Logger, kubeconfigPath, bootstrapPath, certDir string) (certConfig, userConfig *restclient.Config, err error) { if len(bootstrapPath) == 0 { clientConfig, err := loadRESTClientConfig(kubeconfigPath) if err != nil { return nil, nil, fmt.Errorf("unable to load kubeconfig: %v", err) } - klog.V(2).InfoS("No bootstrapping requested, will use kubeconfig") + logger.V(2).Info("No bootstrapping requested, will use kubeconfig") return clientConfig, restclient.CopyConfig(clientConfig), nil } @@ -82,7 +82,7 @@ func LoadClientConfig(kubeconfigPath, bootstrapPath, certDir string) (certConfig if err != nil { return nil, nil, fmt.Errorf("unable to load kubeconfig: %v", err) } - klog.V(2).InfoS("Current kubeconfig file contents are still valid, no bootstrap necessary") + logger.V(2).Info("Current kubeconfig file contents are still valid, no bootstrap necessary") return clientConfig, restclient.CopyConfig(clientConfig), nil } @@ -98,7 +98,7 @@ func LoadClientConfig(kubeconfigPath, bootstrapPath, certDir string) (certConfig if err := writeKubeconfigFromBootstrapping(clientConfig, kubeconfigPath, pemPath); err != nil { return nil, nil, err } - klog.V(2).InfoS("Use the bootstrap credentials to request a cert, and set kubeconfig to point to the certificate dir") + logger.V(2).Info("Use the bootstrap credentials to request a cert, and set kubeconfig to point to the certificate dir") return bootstrapClientConfig, clientConfig, nil } @@ -107,17 +107,18 @@ func LoadClientConfig(kubeconfigPath, bootstrapPath, certDir string) (certConfig // On success, a kubeconfig file referencing the generated key and obtained certificate is written to kubeconfigPath. // The certificate and key file are stored in certDir. func LoadClientCert(ctx context.Context, kubeconfigPath, bootstrapPath, certDir string, nodeName types.NodeName) error { + logger := klog.FromContext(ctx) // Short-circuit if the kubeconfig file exists and is valid. ok, err := isClientConfigStillValid(kubeconfigPath) if err != nil { return err } if ok { - klog.V(2).InfoS("Kubeconfig exists and is valid, skipping bootstrap", "path", kubeconfigPath) + logger.V(2).Info("Kubeconfig exists and is valid, skipping bootstrap", "path", kubeconfigPath) return nil } - klog.V(2).InfoS("Using bootstrap kubeconfig to generate TLS client cert, key and kubeconfig file") + logger.V(2).Info("Using bootstrap kubeconfig to generate TLS client cert, key and kubeconfig file") bootstrapClientConfig, err := loadRESTClientConfig(bootstrapPath) if err != nil { @@ -148,7 +149,7 @@ func LoadClientCert(ctx context.Context, kubeconfigPath, bootstrapPath, certDir // managed by the store. privKeyPath := filepath.Join(certDir, tmpPrivateKeyFile) if !verifyKeyData(keyData) { - klog.V(2).InfoS("No valid private key and/or certificate found, reusing existing private key or creating a new one") + logger.V(2).Info("No valid private key and/or certificate found, reusing existing private key or creating a new one") // Note: always call LoadOrGenerateKeyFile so that private key is // reused on next startup if CSR request fails. keyData, _, err = keyutil.LoadOrGenerateKeyFile(privKeyPath) @@ -158,7 +159,7 @@ func LoadClientCert(ctx context.Context, kubeconfigPath, bootstrapPath, certDir } if err := waitForServer(ctx, *bootstrapClientConfig, 1*time.Minute); err != nil { - klog.InfoS("Error waiting for apiserver to come up", "err", err) + logger.Info("Error waiting for apiserver to come up", "err", err) } certData, err := requestNodeCertificate(ctx, bootstrapClient, keyData, nodeName) @@ -169,7 +170,7 @@ func LoadClientCert(ctx context.Context, kubeconfigPath, bootstrapPath, certDir return err } if err := os.Remove(privKeyPath); err != nil && !os.IsNotExist(err) { - klog.V(2).InfoS("Failed cleaning up private key file", "path", privKeyPath, "err", err) + logger.V(2).Info("Failed cleaning up private key file", "path", privKeyPath, "err", err) } return writeKubeconfigFromBootstrapping(bootstrapClientConfig, kubeconfigPath, store.CurrentPath()) @@ -293,7 +294,7 @@ func waitForServer(ctx context.Context, cfg restclient.Config, deadline time.Dur var connected bool wait.JitterUntil(func() { if _, err := cli.Get().AbsPath("/healthz").Do(ctx).Raw(); err != nil { - klog.InfoS("Failed to connect to apiserver", "err", err) + klog.FromContext(ctx).Info("Failed to connect to apiserver", "err", err) return } cancel() @@ -355,7 +356,7 @@ func requestNodeCertificate(ctx context.Context, client clientset.Interface, pri ctx, cancel := context.WithTimeout(ctx, 3600*time.Second) defer cancel() - klog.V(2).InfoS("Waiting for client certificate to be issued") + klog.FromContext(ctx).V(2).Info("Waiting for client certificate to be issued") return csr.WaitForCertificate(ctx, client, reqName, reqUID) } diff --git a/pkg/kubelet/certificate/bootstrap/bootstrap_test.go b/pkg/kubelet/certificate/bootstrap/bootstrap_test.go index b393070dcfe0a..9c3ea4d06e9b6 100644 --- a/pkg/kubelet/certificate/bootstrap/bootstrap_test.go +++ b/pkg/kubelet/certificate/bootstrap/bootstrap_test.go @@ -17,7 +17,6 @@ limitations under the License. package bootstrap import ( - "context" "fmt" "io" "os" @@ -26,6 +25,7 @@ import ( "testing" utiltesting "k8s.io/client-go/util/testing" + "k8s.io/kubernetes/test/utils/ktesting" "github.com/google/go-cmp/cmp" certificatesv1 "k8s.io/api/certificates/v1" @@ -273,9 +273,10 @@ users: }, } + logger, _ := ktesting.NewTestContext(t) for _, test := range tests { t.Run(test.name, func(t *testing.T) { - certConfig, clientConfig, err := LoadClientConfig(test.kubeconfigPath, test.bootstrapPath, test.certDir) + certConfig, clientConfig, err := LoadClientConfig(logger, test.kubeconfigPath, test.bootstrapPath, test.certDir) if err != nil { t.Fatal(err) } @@ -348,7 +349,8 @@ users: } func TestRequestNodeCertificateNoKeyData(t *testing.T) { - certData, err := requestNodeCertificate(context.TODO(), newClientset(fakeClient{}), []byte{}, "fake-node-name") + tCtx := ktesting.Init(t) + certData, err := requestNodeCertificate(tCtx, newClientset(fakeClient{}), []byte{}, "fake-node-name") if err == nil { t.Errorf("Got no error, wanted error an error because there was an empty private key passed in.") } @@ -358,6 +360,7 @@ func TestRequestNodeCertificateNoKeyData(t *testing.T) { } func TestRequestNodeCertificateErrorCreatingCSR(t *testing.T) { + tCtx := ktesting.Init(t) client := newClientset(fakeClient{ failureType: createError, }) @@ -366,7 +369,7 @@ func TestRequestNodeCertificateErrorCreatingCSR(t *testing.T) { t.Fatalf("Unable to generate a new private key: %v", err) } - certData, err := requestNodeCertificate(context.TODO(), client, privateKeyData, "fake-node-name") + certData, err := requestNodeCertificate(tCtx, client, privateKeyData, "fake-node-name") if err == nil { t.Errorf("Got no error, wanted error an error because client.Create failed.") } @@ -376,12 +379,13 @@ func TestRequestNodeCertificateErrorCreatingCSR(t *testing.T) { } func TestRequestNodeCertificate(t *testing.T) { + tCtx := ktesting.Init(t) privateKeyData, err := keyutil.MakeEllipticPrivateKeyPEM() if err != nil { t.Fatalf("Unable to generate a new private key: %v", err) } - certData, err := requestNodeCertificate(context.TODO(), newClientset(fakeClient{}), privateKeyData, "fake-node-name") + certData, err := requestNodeCertificate(tCtx, newClientset(fakeClient{}), privateKeyData, "fake-node-name") if err != nil { t.Errorf("Got %v, wanted no error.", err) } diff --git a/pkg/kubelet/certificate/kubelet.go b/pkg/kubelet/certificate/kubelet.go index a2d7a03c83218..988de7cb64dd2 100644 --- a/pkg/kubelet/certificate/kubelet.go +++ b/pkg/kubelet/certificate/kubelet.go @@ -282,14 +282,17 @@ type kubeletServerCertificateDynamicFileManager struct { // Enqueue implements the functions to be notified when the serving cert content changes. func (m *kubeletServerCertificateDynamicFileManager) Enqueue() { + // Use klog.TODO() because we currently do not have a proper logger to pass in. + // Replace this with an appropriate logger when refactoring this function to accept a logger parameter. + logger := klog.TODO() certContent, keyContent := m.dynamicCertificateContent.CurrentCertKeyContent() cert, err := tls.X509KeyPair(certContent, keyContent) if err != nil { - klog.ErrorS(err, "invalid certificate and key pair from file", "certFile", m.certFile, "keyFile", m.keyFile) + logger.Error(err, "invalid certificate and key pair from file", "certFile", m.certFile, "keyFile", m.keyFile) return } m.currentTLSCertificate.Store(&cert) - klog.V(4).InfoS("loaded certificate and key pair in kubelet server certificate manager", "certFile", m.certFile, "keyFile", m.keyFile) + logger.V(4).Info("loaded certificate and key pair in kubelet server certificate manager", "certFile", m.certFile, "keyFile", m.keyFile) } // Current returns the last valid certificate key pair loaded from files. @@ -300,7 +303,9 @@ func (m *kubeletServerCertificateDynamicFileManager) Current() *tls.Certificate // Start starts watching the certificate and key files func (m *kubeletServerCertificateDynamicFileManager) Start() { var ctx context.Context - ctx, m.cancelFn = context.WithCancel(context.Background()) + // Use context.TODO() because we currently do not have a proper context to pass in. + // This should be replaced with an appropriate context when refactoring this function to accept a context parameter. + ctx, m.cancelFn = context.WithCancel(context.TODO()) go m.dynamicCertificateContent.Run(ctx, 1) } diff --git a/pkg/kubelet/certificate/transport.go b/pkg/kubelet/certificate/transport.go index 7591a4884f0a6..31b19dcd38700 100644 --- a/pkg/kubelet/certificate/transport.go +++ b/pkg/kubelet/certificate/transport.go @@ -55,13 +55,13 @@ import ( // // stopCh should be used to indicate when the transport is unused and doesn't need // to continue checking the manager. -func UpdateTransport(stopCh <-chan struct{}, clientConfig *restclient.Config, clientCertificateManager certificate.Manager, exitAfter time.Duration) (func(), error) { - return updateTransport(stopCh, 10*time.Second, clientConfig, clientCertificateManager, exitAfter) +func UpdateTransport(logger klog.Logger, stopCh <-chan struct{}, clientConfig *restclient.Config, clientCertificateManager certificate.Manager, exitAfter time.Duration) (func(), error) { + return updateTransport(logger, stopCh, 10*time.Second, clientConfig, clientCertificateManager, exitAfter) } // updateTransport is an internal method that exposes how often this method checks that the // client cert has changed. -func updateTransport(stopCh <-chan struct{}, period time.Duration, clientConfig *restclient.Config, clientCertificateManager certificate.Manager, exitAfter time.Duration) (func(), error) { +func updateTransport(logger klog.Logger, stopCh <-chan struct{}, period time.Duration, clientConfig *restclient.Config, clientCertificateManager certificate.Manager, exitAfter time.Duration) (func(), error) { if clientConfig.Transport != nil || clientConfig.Dial != nil { return nil, fmt.Errorf("there is already a transport or dialer configured") } @@ -69,7 +69,7 @@ func updateTransport(stopCh <-chan struct{}, period time.Duration, clientConfig d := connrotation.NewDialer((&net.Dialer{Timeout: 30 * time.Second, KeepAlive: 30 * time.Second}).DialContext) if clientCertificateManager != nil { - if err := addCertRotation(stopCh, period, clientConfig, clientCertificateManager, exitAfter, d); err != nil { + if err := addCertRotation(logger, stopCh, period, clientConfig, clientCertificateManager, exitAfter, d); err != nil { return nil, err } } else { @@ -79,7 +79,7 @@ func updateTransport(stopCh <-chan struct{}, period time.Duration, clientConfig return d.CloseAll, nil } -func addCertRotation(stopCh <-chan struct{}, period time.Duration, clientConfig *restclient.Config, clientCertificateManager certificate.Manager, exitAfter time.Duration, d *connrotation.Dialer) error { +func addCertRotation(logger klog.Logger, stopCh <-chan struct{}, period time.Duration, clientConfig *restclient.Config, clientCertificateManager certificate.Manager, exitAfter time.Duration, d *connrotation.Dialer) error { tlsConfig, err := restclient.TLSConfigFor(clientConfig) if err != nil { return fmt.Errorf("unable to configure TLS for the rest client: %v", err) @@ -117,20 +117,20 @@ func addCertRotation(stopCh <-chan struct{}, period time.Duration, clientConfig // the certificate has been deleted from disk or is otherwise corrupt if now.After(lastCertAvailable.Add(exitAfter)) { if clientCertificateManager.ServerHealthy() { - klog.ErrorS(nil, "No valid client certificate is found and the server is responsive, exiting.", "lastCertificateAvailabilityTime", lastCertAvailable, "shutdownThreshold", exitAfter) + logger.Error(nil, "No valid client certificate is found and the server is responsive, exiting.", "lastCertificateAvailabilityTime", lastCertAvailable, "shutdownThreshold", exitAfter) os.Exit(1) } else { - klog.ErrorS(nil, "No valid client certificate is found but the server is not responsive. A restart may be necessary to retrieve new initial credentials.", "lastCertificateAvailabilityTime", lastCertAvailable, "shutdownThreshold", exitAfter) + logger.Error(nil, "No valid client certificate is found but the server is not responsive. A restart may be necessary to retrieve new initial credentials.", "lastCertificateAvailabilityTime", lastCertAvailable, "shutdownThreshold", exitAfter) } } } else { // the certificate is expired if now.After(curr.Leaf.NotAfter) { if clientCertificateManager.ServerHealthy() { - klog.ErrorS(nil, "The currently active client certificate has expired and the server is responsive, exiting.") + logger.Error(nil, "The currently active client certificate has expired and the server is responsive, exiting.") os.Exit(1) } else { - klog.ErrorS(nil, "The currently active client certificate has expired, but the server is not responsive. A restart may be necessary to retrieve new initial credentials.") + logger.Error(nil, "The currently active client certificate has expired, but the server is not responsive. A restart may be necessary to retrieve new initial credentials.") } } lastCertAvailable = now @@ -144,7 +144,7 @@ func addCertRotation(stopCh <-chan struct{}, period time.Duration, clientConfig lastCert = curr hasCert.Store(lastCert != nil) - klog.InfoS("Certificate rotation detected, shutting down client connections to start using new credentials") + logger.Info("Certificate rotation detected, shutting down client connections to start using new credentials") // The cert has been rotated. Close all existing connections to force the client // to reperform its TLS handshake with new cert. // diff --git a/pkg/kubelet/certificate/transport_test.go b/pkg/kubelet/certificate/transport_test.go index 92381d47ed904..d5cebaf793f72 100644 --- a/pkg/kubelet/certificate/transport_test.go +++ b/pkg/kubelet/certificate/transport_test.go @@ -17,7 +17,6 @@ limitations under the License. package certificate import ( - "context" "crypto/tls" "crypto/x509" "fmt" @@ -33,6 +32,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" certificatesclient "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" "k8s.io/client-go/rest" + "k8s.io/kubernetes/test/utils/ktesting" ) var ( @@ -146,6 +146,8 @@ func TestRotateShutsDownConnections(t *testing.T) { // This test fails if you comment out the t.closeAllConns() call in // transport.go and don't close connections on a rotate. + logger, tCtx := ktesting.NewTestContext(t) + stop := make(chan struct{}) defer close(stop) @@ -191,7 +193,7 @@ func TestRotateShutsDownConnections(t *testing.T) { } // Check for a new cert every 10 milliseconds - if _, err := updateTransport(stop, 10*time.Millisecond, c, m, 0); err != nil { + if _, err := updateTransport(logger, stop, 10*time.Millisecond, c, m, 0); err != nil { t.Fatal(err) } @@ -200,7 +202,7 @@ func TestRotateShutsDownConnections(t *testing.T) { t.Fatal(err) } - if err := client.Get().Do(context.TODO()).Error(); err != nil { + if err := client.Get().Do(tCtx).Error(); err != nil { t.Fatal(err) } firstCertSerial := lastSerialNumber() @@ -210,7 +212,7 @@ func TestRotateShutsDownConnections(t *testing.T) { m.setCurrent(client2CertData.certificate) err = wait.PollImmediate(time.Millisecond*50, wait.ForeverTestTimeout, func() (done bool, err error) { - client.Get().Do(context.TODO()) + client.Get().Do(tCtx) if firstCertSerial.Cmp(lastSerialNumber()) != 0 { // The certificate changed! return true, nil diff --git a/pkg/kubelet/cm/.mockery.yaml b/pkg/kubelet/cm/.mockery.yaml index 3a8ae03084447..3236f7ce93548 100644 --- a/pkg/kubelet/cm/.mockery.yaml +++ b/pkg/kubelet/cm/.mockery.yaml @@ -1,11 +1,13 @@ --- dir: testing -filename: "mock_{{.InterfaceName | snakecase}}.go" -boilerplate-file: ../../../hack/boilerplate/boilerplate.generatego.txt -outpkg: testing -with-expecter: true +filename: mocks.go +pkgname: testing +template: testify +template-data: + boilerplate-file: ../../../hack/boilerplate/boilerplate.generatego.txt + unroll-variadic: true packages: k8s.io/kubernetes/pkg/kubelet/cm: interfaces: - ContainerManager: - PodContainerManager: + ContainerManager: {} + PodContainerManager: {} diff --git a/pkg/kubelet/cm/cgroup_manager_linux_test.go b/pkg/kubelet/cm/cgroup_manager_linux_test.go index 2974b5bc51f58..2388d4da20c09 100644 --- a/pkg/kubelet/cm/cgroup_manager_linux_test.go +++ b/pkg/kubelet/cm/cgroup_manager_linux_test.go @@ -170,49 +170,6 @@ func TestParseSystemdToCgroupName(t *testing.T) { } } -func TestCpuSharesToCPUWeight(t *testing.T) { - testCases := []struct { - cpuShares uint64 - expectedCpuWeight uint64 - }{ - { - cpuShares: 2, - expectedCpuWeight: 1, - }, - { - cpuShares: 3, - expectedCpuWeight: 1, - }, - { - cpuShares: 4, - expectedCpuWeight: 1, - }, - { - cpuShares: 28, - expectedCpuWeight: 1, - }, - { - cpuShares: 29, - expectedCpuWeight: 2, - }, - { - cpuShares: 245, - expectedCpuWeight: 10, - }, - { - cpuShares: 262144, - expectedCpuWeight: 10000, - }, - } - - for _, testCase := range testCases { - if actual := cpuSharesToCPUWeight(testCase.cpuShares); actual != testCase.expectedCpuWeight { - t.Errorf("cpuShares: %v, expectedCpuWeight: %v, actualCpuWeight: %v", - testCase.cpuShares, testCase.expectedCpuWeight, actual) - } - } -} - func TestCpuWeightToCPUShares(t *testing.T) { testCases := []struct { cpuWeight uint64 diff --git a/pkg/kubelet/cm/cgroup_v2_manager_linux.go b/pkg/kubelet/cm/cgroup_v2_manager_linux.go index 84f7b01c59189..9acf4b0dd81e8 100644 --- a/pkg/kubelet/cm/cgroup_v2_manager_linux.go +++ b/pkg/kubelet/cm/cgroup_v2_manager_linux.go @@ -168,12 +168,6 @@ func (c *cgroupV2impl) buildCgroupUnifiedPath(name CgroupName) string { return path.Join(cmutil.CgroupRoot, cgroupFsAdaptedName) } -// Convert cgroup v1 cpu.shares value to cgroup v2 cpu.weight -// https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2254-cgroup-v2#phase-1-convert-from-cgroups-v1-settings-to-v2 -func cpuSharesToCPUWeight(cpuShares uint64) uint64 { - return uint64((((cpuShares - 2) * 9999) / 262142) + 1) -} - // Convert cgroup v2 cpu.weight value to cgroup v1 cpu.shares // https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2254-cgroup-v2#phase-1-convert-from-cgroups-v1-settings-to-v2 func cpuWeightToCPUShares(cpuWeight uint64) uint64 { diff --git a/pkg/kubelet/cm/container_manager_linux.go b/pkg/kubelet/cm/container_manager_linux.go index c08aa56f24491..c65053cd678d7 100644 --- a/pkg/kubelet/cm/container_manager_linux.go +++ b/pkg/kubelet/cm/container_manager_linux.go @@ -317,7 +317,7 @@ func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.I if err != nil { return nil, err } - metrics.Register(cm.draManager.NewMetricsCollector()) + metrics.RegisterCollectors(cm.draManager.NewMetricsCollector()) } cm.kubeClient = kubeClient diff --git a/pkg/kubelet/cm/cpumanager/policy_static.go b/pkg/kubelet/cm/cpumanager/policy_static.go index 6c767882a6a12..1c843a26d84a7 100644 --- a/pkg/kubelet/cm/cpumanager/policy_static.go +++ b/pkg/kubelet/cm/cpumanager/policy_static.go @@ -474,21 +474,6 @@ func (p *staticPolicy) guaranteedCPUs(pod *v1.Pod, container *v1.Container) int return 0 } cpuQuantity := container.Resources.Requests[v1.ResourceCPU] - // In-place pod resize feature makes Container.Resources field mutable for CPU & memory. - // AllocatedResources holds the value of Container.Resources.Requests when the pod was admitted. - // We should return this value because this is what kubelet agreed to allocate for the container - // and the value configured with runtime. - if utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScaling) { - containerStatuses := pod.Status.ContainerStatuses - if podutil.IsRestartableInitContainer(container) { - if len(pod.Status.InitContainerStatuses) != 0 { - containerStatuses = append(containerStatuses, pod.Status.InitContainerStatuses...) - } - } - if cs, ok := podutil.GetContainerStatus(containerStatuses, container.Name); ok { - cpuQuantity = cs.AllocatedResources[v1.ResourceCPU] - } - } cpuValue := cpuQuantity.Value() if cpuValue*1000 != cpuQuantity.MilliValue() { klog.V(5).InfoS("Exclusive CPU allocation skipped, pod requested non-integral CPUs", "pod", klog.KObj(pod), "containerName", container.Name, "cpu", cpuValue) diff --git a/pkg/kubelet/cm/devicemanager/manager_test.go b/pkg/kubelet/cm/devicemanager/manager_test.go index febb9c834d83f..e6e0f279dbb00 100644 --- a/pkg/kubelet/cm/devicemanager/manager_test.go +++ b/pkg/kubelet/cm/devicemanager/manager_test.go @@ -17,6 +17,7 @@ limitations under the License. package devicemanager import ( + "context" "fmt" "os" "path/filepath" @@ -55,6 +56,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/pkg/kubelet/pluginmanager" schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework" + "k8s.io/kubernetes/test/utils/ktesting" ) const ( @@ -307,15 +309,16 @@ func setupPluginManager(t *testing.T, pluginSocketName string, m Manager) plugin &record.FakeRecorder{}, ) - runPluginManager(pluginManager) + tCtx := ktesting.Init(t) + runPluginManager(tCtx, pluginManager) pluginManager.AddHandler(watcherapi.DevicePlugin, m.GetWatcherHandler()) return pluginManager } -func runPluginManager(pluginManager pluginmanager.PluginManager) { +func runPluginManager(ctx context.Context, pluginManager pluginmanager.PluginManager) { // FIXME: Replace sets.Set[string] with sets.Set[string] sourcesReady := config.NewSourcesReady(func(_ sets.Set[string]) bool { return true }) - go pluginManager.Run(sourcesReady, wait.NeverStop) + go pluginManager.Run(ctx, sourcesReady, wait.NeverStop) } func setup(t *testing.T, devs []*pluginapi.Device, callback monitorCallback, socketName string, pluginSocketName string) (Manager, <-chan interface{}, *plugin.Stub) { diff --git a/pkg/kubelet/cm/devicemanager/plugin/v1beta1/client.go b/pkg/kubelet/cm/devicemanager/plugin/v1beta1/client.go index 98359ab32c08b..98cc3c2813a86 100644 --- a/pkg/kubelet/cm/devicemanager/plugin/v1beta1/client.go +++ b/pkg/kubelet/cm/devicemanager/plugin/v1beta1/client.go @@ -100,7 +100,7 @@ func (c *client) Disconnect() error { c.mutex.Lock() if c.grpc != nil { if err := c.grpc.Close(); err != nil { - klog.V(2).ErrorS(err, "Failed to close grcp connection", "resource", c.Resource()) + klog.V(2).ErrorS(err, "Failed to close grpc connection", "resource", c.Resource()) } c.grpc = nil } diff --git a/pkg/kubelet/cm/devicemanager/plugin/v1beta1/server.go b/pkg/kubelet/cm/devicemanager/plugin/v1beta1/server.go index 56a379553e144..66c6d3777e127 100644 --- a/pkg/kubelet/cm/devicemanager/plugin/v1beta1/server.go +++ b/pkg/kubelet/cm/devicemanager/plugin/v1beta1/server.go @@ -33,7 +33,7 @@ import ( "k8s.io/klog/v2" api "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" - "k8s.io/kubernetes/pkg/kubelet/config" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" "k8s.io/kubernetes/pkg/kubelet/metrics" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" ) @@ -92,7 +92,7 @@ func (s *server) Start() error { } if selinux.GetEnabled() { - if err := selinux.SetFileLabel(s.socketDir, config.KubeletPluginsDirSELinuxLabel); err != nil { + if err := selinux.SetFileLabel(s.socketDir, kubeletconfig.KubeletPluginsDirSELinuxLabel); err != nil { klog.ErrorS(err, "Unprivileged containerized plugins might not work. Could not set selinux context on socket dir", "path", s.socketDir) } } diff --git a/pkg/kubelet/cm/dra/manager.go b/pkg/kubelet/cm/dra/manager.go index 9d034a091a566..99360cdadcb1a 100644 --- a/pkg/kubelet/cm/dra/manager.go +++ b/pkg/kubelet/cm/dra/manager.go @@ -39,7 +39,6 @@ import ( drahealthv1alpha1 "k8s.io/kubelet/pkg/apis/dra-health/v1alpha1" drapb "k8s.io/kubelet/pkg/apis/dra/v1" - v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" kubefeatures "k8s.io/kubernetes/pkg/features" draplugin "k8s.io/kubernetes/pkg/kubelet/cm/dra/plugin" "k8s.io/kubernetes/pkg/kubelet/cm/dra/state" @@ -48,6 +47,7 @@ import ( kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" kubeletmetrics "k8s.io/kubernetes/pkg/kubelet/metrics" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" + schedutil "k8s.io/kubernetes/pkg/scheduler/util" ) // draManagerStateFileName is the file name where dra manager stores its state @@ -372,7 +372,7 @@ func (m *Manager) prepareResources(ctx context.Context, pod *v1.Pod) error { // Loop through all drivers and prepare for calling NodePrepareResources. claim := &drapb.Claim{ Namespace: claimInfo.Namespace, - UID: string(claimInfo.ClaimUID), + Uid: string(claimInfo.ClaimUID), Name: claimInfo.ClaimName, } for driverName := range claimInfo.DriverState { @@ -417,7 +417,7 @@ func (m *Manager) prepareResources(ctx context.Context, pod *v1.Pod) error { return fmt.Errorf("internal error: unable to get claim info for ResourceClaim %s", claim.Name) } for _, device := range result.GetDevices() { - info.addDevice(plugin.DriverName(), state.Device{PoolName: device.PoolName, DeviceName: device.DeviceName, RequestNames: device.RequestNames, CDIDeviceIDs: device.CDIDeviceIDs}) + info.addDevice(plugin.DriverName(), state.Device{PoolName: device.PoolName, DeviceName: device.DeviceName, RequestNames: device.RequestNames, CDIDeviceIDs: device.CdiDeviceIds}) } return nil }) @@ -462,7 +462,7 @@ func (m *Manager) prepareResources(ctx context.Context, pod *v1.Pod) error { func lookupClaimRequest(claims []*drapb.Claim, claimUID string) *drapb.Claim { for _, claim := range claims { - if claim.UID == claimUID { + if claim.Uid == claimUID { return claim } } @@ -526,7 +526,7 @@ func (m *Manager) GetResources(pod *v1.Pod, container *v1.Container) (*Container // We only care about the resources requested by the pod continue } - if v1helper.IsExtendedResourceName(rName) { + if schedutil.IsDRAExtendedResourceName(rName) { requestName := "" for _, rm := range pod.Status.ExtendedResourceClaimStatus.RequestMappings { if rm.ContainerName == container.Name && rm.ResourceName == rName.String() { @@ -622,7 +622,7 @@ func (m *Manager) unprepareResources(ctx context.Context, podUID types.UID, name // Loop through all drivers and prepare for calling NodeUnprepareResources. claim := &drapb.Claim{ Namespace: claimInfo.Namespace, - UID: string(claimInfo.ClaimUID), + Uid: string(claimInfo.ClaimUID), Name: claimInfo.ClaimName, } for driverName := range claimInfo.DriverState { diff --git a/pkg/kubelet/cm/dra/manager_test.go b/pkg/kubelet/cm/dra/manager_test.go index d9df565583909..2f769e4688427 100644 --- a/pkg/kubelet/cm/dra/manager_test.go +++ b/pkg/kubelet/cm/dra/manager_test.go @@ -83,17 +83,17 @@ func (s *fakeDRADriverGRPCServer) NodePrepareResources(ctx context.Context, req } if s.prepareResourcesResponse == nil { - cdiDeviceName := "claim-" + req.Claims[0].UID + cdiDeviceName := "claim-" + req.Claims[0].Uid cdiID := s.driverName + "/" + driverClassName + "=" + cdiDeviceName return &drapb.NodePrepareResourcesResponse{ Claims: map[string]*drapb.NodePrepareResourceResponse{ - req.Claims[0].UID: { + req.Claims[0].Uid: { Devices: []*drapb.Device{ { PoolName: poolName, DeviceName: deviceName, RequestNames: []string{req.Claims[0].Name}, - CDIDeviceIDs: []string{cdiID}, + CdiDeviceIds: []string{cdiID}, }, }, }, @@ -114,7 +114,7 @@ func (s *fakeDRADriverGRPCServer) NodeUnprepareResources(ctx context.Context, re if s.unprepareResourcesResponse == nil { return &drapb.NodeUnprepareResourcesResponse{ Claims: map[string]*drapb.NodeUnprepareResourceResponse{ - req.Claims[0].UID: {}, + req.Claims[0].Uid: {}, }, }, nil } @@ -699,7 +699,7 @@ func TestPrepareResources(t *testing.T) { PoolName: poolName, DeviceName: deviceName, RequestNames: []string{requestName}, - CDIDeviceIDs: []string{cdiID}, + CdiDeviceIds: []string{cdiID}, }, }, }, @@ -719,7 +719,7 @@ func TestPrepareResources(t *testing.T) { PoolName: poolName, DeviceName: deviceName, RequestNames: []string{requestName}, - CDIDeviceIDs: []string{cdiID}, + CdiDeviceIds: []string{cdiID}, }, }, }, @@ -747,7 +747,7 @@ func TestPrepareResources(t *testing.T) { PoolName: poolName, DeviceName: deviceName, RequestNames: []string{requestName}, - CDIDeviceIDs: []string{cdiID}, + CdiDeviceIds: []string{cdiID}, }, }, }, @@ -767,7 +767,7 @@ func TestPrepareResources(t *testing.T) { PoolName: poolName, DeviceName: deviceName, RequestNames: []string{"container-0-request-0"}, - CDIDeviceIDs: []string{cdiID}, + CdiDeviceIds: []string{cdiID}, }, }, }, diff --git a/pkg/kubelet/cm/dra/plugin/dra_plugin_manager.go b/pkg/kubelet/cm/dra/plugin/dra_plugin_manager.go index 2b76d3bd34816..5305546ccf969 100644 --- a/pkg/kubelet/cm/dra/plugin/dra_plugin_manager.go +++ b/pkg/kubelet/cm/dra/plugin/dra_plugin_manager.go @@ -62,6 +62,9 @@ type DRAPluginManager struct { wipingDelay time.Duration streamHandler StreamHandler + // withIdleTimeout is only for unit testing, ignore if <= 0. + withIdleTimeout time.Duration + wg sync.WaitGroup mutex sync.RWMutex @@ -115,7 +118,13 @@ func (m *monitoredPlugin) HandleConn(_ context.Context, stats grpcstats.ConnStat case *grpcstats.ConnEnd: // We have to ask for a reconnect, otherwise gRPC wouldn't try and // thus we wouldn't be notified about a restart of the plugin. - m.conn.Connect() + // + // This must be done in a goroutine because gRPC deadlocks + // when called directly from inside HandleConn when a connection + // goes idle (and only then). It looks like cc.idlenessMgr.ExitIdleMode + // in Connect tries to lock a mutex that is already locked by + // the caller of HandleConn. + go m.conn.Connect() default: return } @@ -361,12 +370,15 @@ func (pm *DRAPluginManager) add(driverName string, endpoint string, chosenServic // The gRPC connection gets created once. gRPC then connects to the gRPC server on demand. target := "unix:" + endpoint logger.V(4).Info("Creating new gRPC connection", "target", target) - conn, err := grpc.NewClient( - target, + options := []grpc.DialOption{ grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithChainUnaryInterceptor(newMetricsInterceptor(driverName)), grpc.WithStatsHandler(mp), - ) + } + if pm.withIdleTimeout > 0 { + options = append(options, grpc.WithIdleTimeout(pm.withIdleTimeout)) + } + conn, err := grpc.NewClient(target, options...) if err != nil { return fmt.Errorf("create gRPC connection to DRA driver %s plugin at endpoint %s: %w", driverName, endpoint, err) } diff --git a/pkg/kubelet/cm/dra/plugin/dra_plugin_test.go b/pkg/kubelet/cm/dra/plugin/dra_plugin_test.go index b3af8c75b32de..9a7c856bdb475 100644 --- a/pkg/kubelet/cm/dra/plugin/dra_plugin_test.go +++ b/pkg/kubelet/cm/dra/plugin/dra_plugin_test.go @@ -40,6 +40,7 @@ import ( type fakeGRPCServer struct { drapbv1beta1.UnimplementedDRAPluginServer drahealthv1alpha1.UnimplementedDRAResourceHealthServer + drapbv1.UnsafeDRAPluginServer } var _ drapbv1.DRAPluginServer = &fakeGRPCServer{} @@ -49,7 +50,7 @@ func (f *fakeGRPCServer) NodePrepareResources(ctx context.Context, in *drapbv1.N Devices: []*drapbv1.Device{ { RequestNames: []string{"test-request"}, - CDIDeviceIDs: []string{"test-cdi-id"}, + CdiDeviceIds: []string{"test-cdi-id"}, }, }, }}}, nil @@ -162,7 +163,7 @@ func TestGRPCConnIsReused(t *testing.T) { Claims: []*drapbv1.Claim{ { Namespace: "dummy-namespace", - UID: "dummy-uid", + Uid: "dummy-uid", Name: "dummy-claim", }, }, @@ -185,6 +186,44 @@ func TestGRPCConnIsReused(t *testing.T) { require.Equal(t, 2, reusedConns[conn], "expected counter to be 2 but got %d", reusedConns[conn]) } +func TestGRPCConnUsableAfterIdle(t *testing.T) { + tCtx := ktesting.Init(t) + service := drapbv1.DRAPluginService + addr := path.Join(t.TempDir(), "dra.sock") + teardown, err := setupFakeGRPCServer(service, addr) + require.NoError(t, err) + defer teardown() + + driverName := "dummy-driver" + + // ensure the plugin we are using is registered + draPlugins := NewDRAPluginManager(tCtx, nil, nil, &mockStreamHandler{}, 0) + draPlugins.withIdleTimeout = 5 * time.Second + tCtx.ExpectNoError(draPlugins.add(driverName, addr, service, defaultClientCallTimeout), "add plugin") + plugin, err := draPlugins.GetPlugin(driverName) + tCtx.ExpectNoError(err, "get plugin") + + // The connection doesn't really become idle because HandleConn + // kicks it back to ready by calling Connect. Just sleep long + // enough here, the code should be reached... + tCtx.Log("Waiting for idle timeout...") + time.Sleep(2 * draPlugins.withIdleTimeout) + + req := &drapbv1.NodePrepareResourcesRequest{ + Claims: []*drapbv1.Claim{ + { + Namespace: "dummy-namespace", + Uid: "dummy-uid", + Name: "dummy-claim", + }, + }, + } + + callCtx := ktesting.WithTimeout(tCtx, 10*time.Second, "call timed out") + _, err = plugin.NodePrepareResources(callCtx, req) + tCtx.ExpectNoError(err, "NodePrepareResources") +} + func TestGetDRAPlugin(t *testing.T) { for _, test := range []struct { description string diff --git a/pkg/kubelet/cm/memorymanager/policy_static.go b/pkg/kubelet/cm/memorymanager/policy_static.go index c744ebf3999e6..7e39009670a3e 100644 --- a/pkg/kubelet/cm/memorymanager/policy_static.go +++ b/pkg/kubelet/cm/memorymanager/policy_static.go @@ -471,23 +471,7 @@ func (p *staticPolicy) GetTopologyHints(ctx context.Context, s state.State, pod func getRequestedResources(pod *v1.Pod, container *v1.Container) (map[v1.ResourceName]uint64, error) { requestedResources := map[v1.ResourceName]uint64{} - resources := container.Resources.Requests - // In-place pod resize feature makes Container.Resources field mutable for CPU & memory. - // AllocatedResources holds the value of Container.Resources.Requests when the pod was admitted. - // We should return this value because this is what kubelet agreed to allocate for the container - // and the value configured with runtime. - if utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScaling) { - containerStatuses := pod.Status.ContainerStatuses - if podutil.IsRestartableInitContainer(container) { - if len(pod.Status.InitContainerStatuses) != 0 { - containerStatuses = append(containerStatuses, pod.Status.InitContainerStatuses...) - } - } - if cs, ok := podutil.GetContainerStatus(containerStatuses, container.Name); ok { - resources = cs.AllocatedResources - } - } - for resourceName, quantity := range resources { + for resourceName, quantity := range container.Resources.Requests { if resourceName != v1.ResourceMemory && !corehelper.IsHugePageResourceName(resourceName) { continue } diff --git a/pkg/kubelet/cm/testing/mock_container_manager.go b/pkg/kubelet/cm/testing/mock_container_manager.go deleted file mode 100644 index 0d56cec6ffd79..0000000000000 --- a/pkg/kubelet/cm/testing/mock_container_manager.go +++ /dev/null @@ -1,1729 +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 mockery v2.53.3. DO NOT EDIT. - -package testing - -import ( - cm "k8s.io/kubernetes/pkg/kubelet/cm" - cache "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" - - config "k8s.io/kubernetes/pkg/kubelet/config" - - container "k8s.io/kubernetes/pkg/kubelet/container" - - context "context" - - cri "k8s.io/cri-api/pkg/apis" - - framework "k8s.io/kubernetes/pkg/scheduler/framework" - - healthz "k8s.io/apiserver/pkg/server/healthz" - - lifecycle "k8s.io/kubernetes/pkg/kubelet/lifecycle" - - mock "github.com/stretchr/testify/mock" - - podresourcesv1 "k8s.io/kubelet/pkg/apis/podresources/v1" - - resourceupdates "k8s.io/kubernetes/pkg/kubelet/cm/resourceupdates" - - status "k8s.io/kubernetes/pkg/kubelet/status" - - types "k8s.io/apimachinery/pkg/types" - - v1 "k8s.io/api/core/v1" -) - -// MockContainerManager is an autogenerated mock type for the ContainerManager type -type MockContainerManager struct { - mock.Mock -} - -type MockContainerManager_Expecter struct { - mock *mock.Mock -} - -func (_m *MockContainerManager) EXPECT() *MockContainerManager_Expecter { - return &MockContainerManager_Expecter{mock: &_m.Mock} -} - -// ContainerHasExclusiveCPUs provides a mock function with given fields: pod, _a1 -func (_m *MockContainerManager) ContainerHasExclusiveCPUs(pod *v1.Pod, _a1 *v1.Container) bool { - ret := _m.Called(pod, _a1) - - if len(ret) == 0 { - panic("no return value specified for ContainerHasExclusiveCPUs") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(*v1.Pod, *v1.Container) bool); ok { - r0 = rf(pod, _a1) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockContainerManager_ContainerHasExclusiveCPUs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContainerHasExclusiveCPUs' -type MockContainerManager_ContainerHasExclusiveCPUs_Call struct { - *mock.Call -} - -// ContainerHasExclusiveCPUs is a helper method to define mock.On call -// - pod *v1.Pod -// - _a1 *v1.Container -func (_e *MockContainerManager_Expecter) ContainerHasExclusiveCPUs(pod interface{}, _a1 interface{}) *MockContainerManager_ContainerHasExclusiveCPUs_Call { - return &MockContainerManager_ContainerHasExclusiveCPUs_Call{Call: _e.mock.On("ContainerHasExclusiveCPUs", pod, _a1)} -} - -func (_c *MockContainerManager_ContainerHasExclusiveCPUs_Call) Run(run func(pod *v1.Pod, _a1 *v1.Container)) *MockContainerManager_ContainerHasExclusiveCPUs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod), args[1].(*v1.Container)) - }) - return _c -} - -func (_c *MockContainerManager_ContainerHasExclusiveCPUs_Call) Return(_a0 bool) *MockContainerManager_ContainerHasExclusiveCPUs_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_ContainerHasExclusiveCPUs_Call) RunAndReturn(run func(*v1.Pod, *v1.Container) bool) *MockContainerManager_ContainerHasExclusiveCPUs_Call { - _c.Call.Return(run) - return _c -} - -// GetAllocatableCPUs provides a mock function with no fields -func (_m *MockContainerManager) GetAllocatableCPUs() []int64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAllocatableCPUs") - } - - var r0 []int64 - if rf, ok := ret.Get(0).(func() []int64); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]int64) - } - } - - return r0 -} - -// MockContainerManager_GetAllocatableCPUs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllocatableCPUs' -type MockContainerManager_GetAllocatableCPUs_Call struct { - *mock.Call -} - -// GetAllocatableCPUs is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) GetAllocatableCPUs() *MockContainerManager_GetAllocatableCPUs_Call { - return &MockContainerManager_GetAllocatableCPUs_Call{Call: _e.mock.On("GetAllocatableCPUs")} -} - -func (_c *MockContainerManager_GetAllocatableCPUs_Call) Run(run func()) *MockContainerManager_GetAllocatableCPUs_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_GetAllocatableCPUs_Call) Return(_a0 []int64) *MockContainerManager_GetAllocatableCPUs_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetAllocatableCPUs_Call) RunAndReturn(run func() []int64) *MockContainerManager_GetAllocatableCPUs_Call { - _c.Call.Return(run) - return _c -} - -// GetAllocatableDevices provides a mock function with no fields -func (_m *MockContainerManager) GetAllocatableDevices() []*podresourcesv1.ContainerDevices { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAllocatableDevices") - } - - var r0 []*podresourcesv1.ContainerDevices - if rf, ok := ret.Get(0).(func() []*podresourcesv1.ContainerDevices); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*podresourcesv1.ContainerDevices) - } - } - - return r0 -} - -// MockContainerManager_GetAllocatableDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllocatableDevices' -type MockContainerManager_GetAllocatableDevices_Call struct { - *mock.Call -} - -// GetAllocatableDevices is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) GetAllocatableDevices() *MockContainerManager_GetAllocatableDevices_Call { - return &MockContainerManager_GetAllocatableDevices_Call{Call: _e.mock.On("GetAllocatableDevices")} -} - -func (_c *MockContainerManager_GetAllocatableDevices_Call) Run(run func()) *MockContainerManager_GetAllocatableDevices_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_GetAllocatableDevices_Call) Return(_a0 []*podresourcesv1.ContainerDevices) *MockContainerManager_GetAllocatableDevices_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetAllocatableDevices_Call) RunAndReturn(run func() []*podresourcesv1.ContainerDevices) *MockContainerManager_GetAllocatableDevices_Call { - _c.Call.Return(run) - return _c -} - -// GetAllocatableMemory provides a mock function with no fields -func (_m *MockContainerManager) GetAllocatableMemory() []*podresourcesv1.ContainerMemory { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAllocatableMemory") - } - - var r0 []*podresourcesv1.ContainerMemory - if rf, ok := ret.Get(0).(func() []*podresourcesv1.ContainerMemory); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*podresourcesv1.ContainerMemory) - } - } - - return r0 -} - -// MockContainerManager_GetAllocatableMemory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllocatableMemory' -type MockContainerManager_GetAllocatableMemory_Call struct { - *mock.Call -} - -// GetAllocatableMemory is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) GetAllocatableMemory() *MockContainerManager_GetAllocatableMemory_Call { - return &MockContainerManager_GetAllocatableMemory_Call{Call: _e.mock.On("GetAllocatableMemory")} -} - -func (_c *MockContainerManager_GetAllocatableMemory_Call) Run(run func()) *MockContainerManager_GetAllocatableMemory_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_GetAllocatableMemory_Call) Return(_a0 []*podresourcesv1.ContainerMemory) *MockContainerManager_GetAllocatableMemory_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetAllocatableMemory_Call) RunAndReturn(run func() []*podresourcesv1.ContainerMemory) *MockContainerManager_GetAllocatableMemory_Call { - _c.Call.Return(run) - return _c -} - -// GetAllocateResourcesPodAdmitHandler provides a mock function with no fields -func (_m *MockContainerManager) GetAllocateResourcesPodAdmitHandler() lifecycle.PodAdmitHandler { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAllocateResourcesPodAdmitHandler") - } - - var r0 lifecycle.PodAdmitHandler - if rf, ok := ret.Get(0).(func() lifecycle.PodAdmitHandler); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(lifecycle.PodAdmitHandler) - } - } - - return r0 -} - -// MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllocateResourcesPodAdmitHandler' -type MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call struct { - *mock.Call -} - -// GetAllocateResourcesPodAdmitHandler is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) GetAllocateResourcesPodAdmitHandler() *MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call { - return &MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call{Call: _e.mock.On("GetAllocateResourcesPodAdmitHandler")} -} - -func (_c *MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call) Run(run func()) *MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call) Return(_a0 lifecycle.PodAdmitHandler) *MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call) RunAndReturn(run func() lifecycle.PodAdmitHandler) *MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call { - _c.Call.Return(run) - return _c -} - -// GetCPUs provides a mock function with given fields: podUID, containerName -func (_m *MockContainerManager) GetCPUs(podUID string, containerName string) []int64 { - ret := _m.Called(podUID, containerName) - - if len(ret) == 0 { - panic("no return value specified for GetCPUs") - } - - var r0 []int64 - if rf, ok := ret.Get(0).(func(string, string) []int64); ok { - r0 = rf(podUID, containerName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]int64) - } - } - - return r0 -} - -// MockContainerManager_GetCPUs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCPUs' -type MockContainerManager_GetCPUs_Call struct { - *mock.Call -} - -// GetCPUs is a helper method to define mock.On call -// - podUID string -// - containerName string -func (_e *MockContainerManager_Expecter) GetCPUs(podUID interface{}, containerName interface{}) *MockContainerManager_GetCPUs_Call { - return &MockContainerManager_GetCPUs_Call{Call: _e.mock.On("GetCPUs", podUID, containerName)} -} - -func (_c *MockContainerManager_GetCPUs_Call) Run(run func(podUID string, containerName string)) *MockContainerManager_GetCPUs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *MockContainerManager_GetCPUs_Call) Return(_a0 []int64) *MockContainerManager_GetCPUs_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetCPUs_Call) RunAndReturn(run func(string, string) []int64) *MockContainerManager_GetCPUs_Call { - _c.Call.Return(run) - return _c -} - -// GetCapacity provides a mock function with given fields: localStorageCapacityIsolation -func (_m *MockContainerManager) GetCapacity(localStorageCapacityIsolation bool) v1.ResourceList { - ret := _m.Called(localStorageCapacityIsolation) - - if len(ret) == 0 { - panic("no return value specified for GetCapacity") - } - - var r0 v1.ResourceList - if rf, ok := ret.Get(0).(func(bool) v1.ResourceList); ok { - r0 = rf(localStorageCapacityIsolation) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(v1.ResourceList) - } - } - - return r0 -} - -// MockContainerManager_GetCapacity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCapacity' -type MockContainerManager_GetCapacity_Call struct { - *mock.Call -} - -// GetCapacity is a helper method to define mock.On call -// - localStorageCapacityIsolation bool -func (_e *MockContainerManager_Expecter) GetCapacity(localStorageCapacityIsolation interface{}) *MockContainerManager_GetCapacity_Call { - return &MockContainerManager_GetCapacity_Call{Call: _e.mock.On("GetCapacity", localStorageCapacityIsolation)} -} - -func (_c *MockContainerManager_GetCapacity_Call) Run(run func(localStorageCapacityIsolation bool)) *MockContainerManager_GetCapacity_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) - }) - return _c -} - -func (_c *MockContainerManager_GetCapacity_Call) Return(_a0 v1.ResourceList) *MockContainerManager_GetCapacity_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetCapacity_Call) RunAndReturn(run func(bool) v1.ResourceList) *MockContainerManager_GetCapacity_Call { - _c.Call.Return(run) - return _c -} - -// GetDevicePluginResourceCapacity provides a mock function with no fields -func (_m *MockContainerManager) GetDevicePluginResourceCapacity() (v1.ResourceList, v1.ResourceList, []string) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetDevicePluginResourceCapacity") - } - - var r0 v1.ResourceList - var r1 v1.ResourceList - var r2 []string - if rf, ok := ret.Get(0).(func() (v1.ResourceList, v1.ResourceList, []string)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() v1.ResourceList); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(v1.ResourceList) - } - } - - if rf, ok := ret.Get(1).(func() v1.ResourceList); ok { - r1 = rf() - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).(v1.ResourceList) - } - } - - if rf, ok := ret.Get(2).(func() []string); ok { - r2 = rf() - } else { - if ret.Get(2) != nil { - r2 = ret.Get(2).([]string) - } - } - - return r0, r1, r2 -} - -// MockContainerManager_GetDevicePluginResourceCapacity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDevicePluginResourceCapacity' -type MockContainerManager_GetDevicePluginResourceCapacity_Call struct { - *mock.Call -} - -// GetDevicePluginResourceCapacity is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) GetDevicePluginResourceCapacity() *MockContainerManager_GetDevicePluginResourceCapacity_Call { - return &MockContainerManager_GetDevicePluginResourceCapacity_Call{Call: _e.mock.On("GetDevicePluginResourceCapacity")} -} - -func (_c *MockContainerManager_GetDevicePluginResourceCapacity_Call) Run(run func()) *MockContainerManager_GetDevicePluginResourceCapacity_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_GetDevicePluginResourceCapacity_Call) Return(_a0 v1.ResourceList, _a1 v1.ResourceList, _a2 []string) *MockContainerManager_GetDevicePluginResourceCapacity_Call { - _c.Call.Return(_a0, _a1, _a2) - return _c -} - -func (_c *MockContainerManager_GetDevicePluginResourceCapacity_Call) RunAndReturn(run func() (v1.ResourceList, v1.ResourceList, []string)) *MockContainerManager_GetDevicePluginResourceCapacity_Call { - _c.Call.Return(run) - return _c -} - -// GetDevices provides a mock function with given fields: podUID, containerName -func (_m *MockContainerManager) GetDevices(podUID string, containerName string) []*podresourcesv1.ContainerDevices { - ret := _m.Called(podUID, containerName) - - if len(ret) == 0 { - panic("no return value specified for GetDevices") - } - - var r0 []*podresourcesv1.ContainerDevices - if rf, ok := ret.Get(0).(func(string, string) []*podresourcesv1.ContainerDevices); ok { - r0 = rf(podUID, containerName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*podresourcesv1.ContainerDevices) - } - } - - return r0 -} - -// MockContainerManager_GetDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDevices' -type MockContainerManager_GetDevices_Call struct { - *mock.Call -} - -// GetDevices is a helper method to define mock.On call -// - podUID string -// - containerName string -func (_e *MockContainerManager_Expecter) GetDevices(podUID interface{}, containerName interface{}) *MockContainerManager_GetDevices_Call { - return &MockContainerManager_GetDevices_Call{Call: _e.mock.On("GetDevices", podUID, containerName)} -} - -func (_c *MockContainerManager_GetDevices_Call) Run(run func(podUID string, containerName string)) *MockContainerManager_GetDevices_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *MockContainerManager_GetDevices_Call) Return(_a0 []*podresourcesv1.ContainerDevices) *MockContainerManager_GetDevices_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetDevices_Call) RunAndReturn(run func(string, string) []*podresourcesv1.ContainerDevices) *MockContainerManager_GetDevices_Call { - _c.Call.Return(run) - return _c -} - -// GetDynamicResources provides a mock function with given fields: pod, _a1 -func (_m *MockContainerManager) GetDynamicResources(pod *v1.Pod, _a1 *v1.Container) []*podresourcesv1.DynamicResource { - ret := _m.Called(pod, _a1) - - if len(ret) == 0 { - panic("no return value specified for GetDynamicResources") - } - - var r0 []*podresourcesv1.DynamicResource - if rf, ok := ret.Get(0).(func(*v1.Pod, *v1.Container) []*podresourcesv1.DynamicResource); ok { - r0 = rf(pod, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*podresourcesv1.DynamicResource) - } - } - - return r0 -} - -// MockContainerManager_GetDynamicResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDynamicResources' -type MockContainerManager_GetDynamicResources_Call struct { - *mock.Call -} - -// GetDynamicResources is a helper method to define mock.On call -// - pod *v1.Pod -// - _a1 *v1.Container -func (_e *MockContainerManager_Expecter) GetDynamicResources(pod interface{}, _a1 interface{}) *MockContainerManager_GetDynamicResources_Call { - return &MockContainerManager_GetDynamicResources_Call{Call: _e.mock.On("GetDynamicResources", pod, _a1)} -} - -func (_c *MockContainerManager_GetDynamicResources_Call) Run(run func(pod *v1.Pod, _a1 *v1.Container)) *MockContainerManager_GetDynamicResources_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod), args[1].(*v1.Container)) - }) - return _c -} - -func (_c *MockContainerManager_GetDynamicResources_Call) Return(_a0 []*podresourcesv1.DynamicResource) *MockContainerManager_GetDynamicResources_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetDynamicResources_Call) RunAndReturn(run func(*v1.Pod, *v1.Container) []*podresourcesv1.DynamicResource) *MockContainerManager_GetDynamicResources_Call { - _c.Call.Return(run) - return _c -} - -// GetHealthCheckers provides a mock function with no fields -func (_m *MockContainerManager) GetHealthCheckers() []healthz.HealthChecker { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetHealthCheckers") - } - - var r0 []healthz.HealthChecker - if rf, ok := ret.Get(0).(func() []healthz.HealthChecker); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]healthz.HealthChecker) - } - } - - return r0 -} - -// MockContainerManager_GetHealthCheckers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHealthCheckers' -type MockContainerManager_GetHealthCheckers_Call struct { - *mock.Call -} - -// GetHealthCheckers is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) GetHealthCheckers() *MockContainerManager_GetHealthCheckers_Call { - return &MockContainerManager_GetHealthCheckers_Call{Call: _e.mock.On("GetHealthCheckers")} -} - -func (_c *MockContainerManager_GetHealthCheckers_Call) Run(run func()) *MockContainerManager_GetHealthCheckers_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_GetHealthCheckers_Call) Return(_a0 []healthz.HealthChecker) *MockContainerManager_GetHealthCheckers_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetHealthCheckers_Call) RunAndReturn(run func() []healthz.HealthChecker) *MockContainerManager_GetHealthCheckers_Call { - _c.Call.Return(run) - return _c -} - -// GetMemory provides a mock function with given fields: podUID, containerName -func (_m *MockContainerManager) GetMemory(podUID string, containerName string) []*podresourcesv1.ContainerMemory { - ret := _m.Called(podUID, containerName) - - if len(ret) == 0 { - panic("no return value specified for GetMemory") - } - - var r0 []*podresourcesv1.ContainerMemory - if rf, ok := ret.Get(0).(func(string, string) []*podresourcesv1.ContainerMemory); ok { - r0 = rf(podUID, containerName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*podresourcesv1.ContainerMemory) - } - } - - return r0 -} - -// MockContainerManager_GetMemory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMemory' -type MockContainerManager_GetMemory_Call struct { - *mock.Call -} - -// GetMemory is a helper method to define mock.On call -// - podUID string -// - containerName string -func (_e *MockContainerManager_Expecter) GetMemory(podUID interface{}, containerName interface{}) *MockContainerManager_GetMemory_Call { - return &MockContainerManager_GetMemory_Call{Call: _e.mock.On("GetMemory", podUID, containerName)} -} - -func (_c *MockContainerManager_GetMemory_Call) Run(run func(podUID string, containerName string)) *MockContainerManager_GetMemory_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *MockContainerManager_GetMemory_Call) Return(_a0 []*podresourcesv1.ContainerMemory) *MockContainerManager_GetMemory_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetMemory_Call) RunAndReturn(run func(string, string) []*podresourcesv1.ContainerMemory) *MockContainerManager_GetMemory_Call { - _c.Call.Return(run) - return _c -} - -// GetMountedSubsystems provides a mock function with no fields -func (_m *MockContainerManager) GetMountedSubsystems() *cm.CgroupSubsystems { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetMountedSubsystems") - } - - var r0 *cm.CgroupSubsystems - if rf, ok := ret.Get(0).(func() *cm.CgroupSubsystems); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*cm.CgroupSubsystems) - } - } - - return r0 -} - -// MockContainerManager_GetMountedSubsystems_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMountedSubsystems' -type MockContainerManager_GetMountedSubsystems_Call struct { - *mock.Call -} - -// GetMountedSubsystems is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) GetMountedSubsystems() *MockContainerManager_GetMountedSubsystems_Call { - return &MockContainerManager_GetMountedSubsystems_Call{Call: _e.mock.On("GetMountedSubsystems")} -} - -func (_c *MockContainerManager_GetMountedSubsystems_Call) Run(run func()) *MockContainerManager_GetMountedSubsystems_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_GetMountedSubsystems_Call) Return(_a0 *cm.CgroupSubsystems) *MockContainerManager_GetMountedSubsystems_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetMountedSubsystems_Call) RunAndReturn(run func() *cm.CgroupSubsystems) *MockContainerManager_GetMountedSubsystems_Call { - _c.Call.Return(run) - return _c -} - -// GetNodeAllocatableAbsolute provides a mock function with no fields -func (_m *MockContainerManager) GetNodeAllocatableAbsolute() v1.ResourceList { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNodeAllocatableAbsolute") - } - - var r0 v1.ResourceList - if rf, ok := ret.Get(0).(func() v1.ResourceList); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(v1.ResourceList) - } - } - - return r0 -} - -// MockContainerManager_GetNodeAllocatableAbsolute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNodeAllocatableAbsolute' -type MockContainerManager_GetNodeAllocatableAbsolute_Call struct { - *mock.Call -} - -// GetNodeAllocatableAbsolute is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) GetNodeAllocatableAbsolute() *MockContainerManager_GetNodeAllocatableAbsolute_Call { - return &MockContainerManager_GetNodeAllocatableAbsolute_Call{Call: _e.mock.On("GetNodeAllocatableAbsolute")} -} - -func (_c *MockContainerManager_GetNodeAllocatableAbsolute_Call) Run(run func()) *MockContainerManager_GetNodeAllocatableAbsolute_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_GetNodeAllocatableAbsolute_Call) Return(_a0 v1.ResourceList) *MockContainerManager_GetNodeAllocatableAbsolute_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetNodeAllocatableAbsolute_Call) RunAndReturn(run func() v1.ResourceList) *MockContainerManager_GetNodeAllocatableAbsolute_Call { - _c.Call.Return(run) - return _c -} - -// GetNodeAllocatableReservation provides a mock function with no fields -func (_m *MockContainerManager) GetNodeAllocatableReservation() v1.ResourceList { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNodeAllocatableReservation") - } - - var r0 v1.ResourceList - if rf, ok := ret.Get(0).(func() v1.ResourceList); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(v1.ResourceList) - } - } - - return r0 -} - -// MockContainerManager_GetNodeAllocatableReservation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNodeAllocatableReservation' -type MockContainerManager_GetNodeAllocatableReservation_Call struct { - *mock.Call -} - -// GetNodeAllocatableReservation is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) GetNodeAllocatableReservation() *MockContainerManager_GetNodeAllocatableReservation_Call { - return &MockContainerManager_GetNodeAllocatableReservation_Call{Call: _e.mock.On("GetNodeAllocatableReservation")} -} - -func (_c *MockContainerManager_GetNodeAllocatableReservation_Call) Run(run func()) *MockContainerManager_GetNodeAllocatableReservation_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_GetNodeAllocatableReservation_Call) Return(_a0 v1.ResourceList) *MockContainerManager_GetNodeAllocatableReservation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetNodeAllocatableReservation_Call) RunAndReturn(run func() v1.ResourceList) *MockContainerManager_GetNodeAllocatableReservation_Call { - _c.Call.Return(run) - return _c -} - -// GetNodeConfig provides a mock function with no fields -func (_m *MockContainerManager) GetNodeConfig() cm.NodeConfig { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNodeConfig") - } - - var r0 cm.NodeConfig - if rf, ok := ret.Get(0).(func() cm.NodeConfig); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(cm.NodeConfig) - } - - return r0 -} - -// MockContainerManager_GetNodeConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNodeConfig' -type MockContainerManager_GetNodeConfig_Call struct { - *mock.Call -} - -// GetNodeConfig is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) GetNodeConfig() *MockContainerManager_GetNodeConfig_Call { - return &MockContainerManager_GetNodeConfig_Call{Call: _e.mock.On("GetNodeConfig")} -} - -func (_c *MockContainerManager_GetNodeConfig_Call) Run(run func()) *MockContainerManager_GetNodeConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_GetNodeConfig_Call) Return(_a0 cm.NodeConfig) *MockContainerManager_GetNodeConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetNodeConfig_Call) RunAndReturn(run func() cm.NodeConfig) *MockContainerManager_GetNodeConfig_Call { - _c.Call.Return(run) - return _c -} - -// GetPluginRegistrationHandlers provides a mock function with no fields -func (_m *MockContainerManager) GetPluginRegistrationHandlers() map[string]cache.PluginHandler { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPluginRegistrationHandlers") - } - - var r0 map[string]cache.PluginHandler - if rf, ok := ret.Get(0).(func() map[string]cache.PluginHandler); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]cache.PluginHandler) - } - } - - return r0 -} - -// MockContainerManager_GetPluginRegistrationHandlers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPluginRegistrationHandlers' -type MockContainerManager_GetPluginRegistrationHandlers_Call struct { - *mock.Call -} - -// GetPluginRegistrationHandlers is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) GetPluginRegistrationHandlers() *MockContainerManager_GetPluginRegistrationHandlers_Call { - return &MockContainerManager_GetPluginRegistrationHandlers_Call{Call: _e.mock.On("GetPluginRegistrationHandlers")} -} - -func (_c *MockContainerManager_GetPluginRegistrationHandlers_Call) Run(run func()) *MockContainerManager_GetPluginRegistrationHandlers_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_GetPluginRegistrationHandlers_Call) Return(_a0 map[string]cache.PluginHandler) *MockContainerManager_GetPluginRegistrationHandlers_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetPluginRegistrationHandlers_Call) RunAndReturn(run func() map[string]cache.PluginHandler) *MockContainerManager_GetPluginRegistrationHandlers_Call { - _c.Call.Return(run) - return _c -} - -// GetPodCgroupRoot provides a mock function with no fields -func (_m *MockContainerManager) GetPodCgroupRoot() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPodCgroupRoot") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockContainerManager_GetPodCgroupRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPodCgroupRoot' -type MockContainerManager_GetPodCgroupRoot_Call struct { - *mock.Call -} - -// GetPodCgroupRoot is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) GetPodCgroupRoot() *MockContainerManager_GetPodCgroupRoot_Call { - return &MockContainerManager_GetPodCgroupRoot_Call{Call: _e.mock.On("GetPodCgroupRoot")} -} - -func (_c *MockContainerManager_GetPodCgroupRoot_Call) Run(run func()) *MockContainerManager_GetPodCgroupRoot_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_GetPodCgroupRoot_Call) Return(_a0 string) *MockContainerManager_GetPodCgroupRoot_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetPodCgroupRoot_Call) RunAndReturn(run func() string) *MockContainerManager_GetPodCgroupRoot_Call { - _c.Call.Return(run) - return _c -} - -// GetQOSContainersInfo provides a mock function with no fields -func (_m *MockContainerManager) GetQOSContainersInfo() cm.QOSContainersInfo { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetQOSContainersInfo") - } - - var r0 cm.QOSContainersInfo - if rf, ok := ret.Get(0).(func() cm.QOSContainersInfo); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(cm.QOSContainersInfo) - } - - return r0 -} - -// MockContainerManager_GetQOSContainersInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQOSContainersInfo' -type MockContainerManager_GetQOSContainersInfo_Call struct { - *mock.Call -} - -// GetQOSContainersInfo is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) GetQOSContainersInfo() *MockContainerManager_GetQOSContainersInfo_Call { - return &MockContainerManager_GetQOSContainersInfo_Call{Call: _e.mock.On("GetQOSContainersInfo")} -} - -func (_c *MockContainerManager_GetQOSContainersInfo_Call) Run(run func()) *MockContainerManager_GetQOSContainersInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_GetQOSContainersInfo_Call) Return(_a0 cm.QOSContainersInfo) *MockContainerManager_GetQOSContainersInfo_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_GetQOSContainersInfo_Call) RunAndReturn(run func() cm.QOSContainersInfo) *MockContainerManager_GetQOSContainersInfo_Call { - _c.Call.Return(run) - return _c -} - -// GetResources provides a mock function with given fields: ctx, pod, _a2 -func (_m *MockContainerManager) GetResources(ctx context.Context, pod *v1.Pod, _a2 *v1.Container) (*container.RunContainerOptions, error) { - ret := _m.Called(ctx, pod, _a2) - - if len(ret) == 0 { - panic("no return value specified for GetResources") - } - - var r0 *container.RunContainerOptions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1.Pod, *v1.Container) (*container.RunContainerOptions, error)); ok { - return rf(ctx, pod, _a2) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1.Pod, *v1.Container) *container.RunContainerOptions); ok { - r0 = rf(ctx, pod, _a2) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*container.RunContainerOptions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1.Pod, *v1.Container) error); ok { - r1 = rf(ctx, pod, _a2) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockContainerManager_GetResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetResources' -type MockContainerManager_GetResources_Call struct { - *mock.Call -} - -// GetResources is a helper method to define mock.On call -// - ctx context.Context -// - pod *v1.Pod -// - _a2 *v1.Container -func (_e *MockContainerManager_Expecter) GetResources(ctx interface{}, pod interface{}, _a2 interface{}) *MockContainerManager_GetResources_Call { - return &MockContainerManager_GetResources_Call{Call: _e.mock.On("GetResources", ctx, pod, _a2)} -} - -func (_c *MockContainerManager_GetResources_Call) Run(run func(ctx context.Context, pod *v1.Pod, _a2 *v1.Container)) *MockContainerManager_GetResources_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*v1.Pod), args[2].(*v1.Container)) - }) - return _c -} - -func (_c *MockContainerManager_GetResources_Call) Return(_a0 *container.RunContainerOptions, _a1 error) *MockContainerManager_GetResources_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockContainerManager_GetResources_Call) RunAndReturn(run func(context.Context, *v1.Pod, *v1.Container) (*container.RunContainerOptions, error)) *MockContainerManager_GetResources_Call { - _c.Call.Return(run) - return _c -} - -// InternalContainerLifecycle provides a mock function with no fields -func (_m *MockContainerManager) InternalContainerLifecycle() cm.InternalContainerLifecycle { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for InternalContainerLifecycle") - } - - var r0 cm.InternalContainerLifecycle - if rf, ok := ret.Get(0).(func() cm.InternalContainerLifecycle); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(cm.InternalContainerLifecycle) - } - } - - return r0 -} - -// MockContainerManager_InternalContainerLifecycle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InternalContainerLifecycle' -type MockContainerManager_InternalContainerLifecycle_Call struct { - *mock.Call -} - -// InternalContainerLifecycle is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) InternalContainerLifecycle() *MockContainerManager_InternalContainerLifecycle_Call { - return &MockContainerManager_InternalContainerLifecycle_Call{Call: _e.mock.On("InternalContainerLifecycle")} -} - -func (_c *MockContainerManager_InternalContainerLifecycle_Call) Run(run func()) *MockContainerManager_InternalContainerLifecycle_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_InternalContainerLifecycle_Call) Return(_a0 cm.InternalContainerLifecycle) *MockContainerManager_InternalContainerLifecycle_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_InternalContainerLifecycle_Call) RunAndReturn(run func() cm.InternalContainerLifecycle) *MockContainerManager_InternalContainerLifecycle_Call { - _c.Call.Return(run) - return _c -} - -// NewPodContainerManager provides a mock function with no fields -func (_m *MockContainerManager) NewPodContainerManager() cm.PodContainerManager { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for NewPodContainerManager") - } - - var r0 cm.PodContainerManager - if rf, ok := ret.Get(0).(func() cm.PodContainerManager); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(cm.PodContainerManager) - } - } - - return r0 -} - -// MockContainerManager_NewPodContainerManager_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewPodContainerManager' -type MockContainerManager_NewPodContainerManager_Call struct { - *mock.Call -} - -// NewPodContainerManager is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) NewPodContainerManager() *MockContainerManager_NewPodContainerManager_Call { - return &MockContainerManager_NewPodContainerManager_Call{Call: _e.mock.On("NewPodContainerManager")} -} - -func (_c *MockContainerManager_NewPodContainerManager_Call) Run(run func()) *MockContainerManager_NewPodContainerManager_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_NewPodContainerManager_Call) Return(_a0 cm.PodContainerManager) *MockContainerManager_NewPodContainerManager_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_NewPodContainerManager_Call) RunAndReturn(run func() cm.PodContainerManager) *MockContainerManager_NewPodContainerManager_Call { - _c.Call.Return(run) - return _c -} - -// PodHasExclusiveCPUs provides a mock function with given fields: pod -func (_m *MockContainerManager) PodHasExclusiveCPUs(pod *v1.Pod) bool { - ret := _m.Called(pod) - - if len(ret) == 0 { - panic("no return value specified for PodHasExclusiveCPUs") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(*v1.Pod) bool); ok { - r0 = rf(pod) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockContainerManager_PodHasExclusiveCPUs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PodHasExclusiveCPUs' -type MockContainerManager_PodHasExclusiveCPUs_Call struct { - *mock.Call -} - -// PodHasExclusiveCPUs is a helper method to define mock.On call -// - pod *v1.Pod -func (_e *MockContainerManager_Expecter) PodHasExclusiveCPUs(pod interface{}) *MockContainerManager_PodHasExclusiveCPUs_Call { - return &MockContainerManager_PodHasExclusiveCPUs_Call{Call: _e.mock.On("PodHasExclusiveCPUs", pod)} -} - -func (_c *MockContainerManager_PodHasExclusiveCPUs_Call) Run(run func(pod *v1.Pod)) *MockContainerManager_PodHasExclusiveCPUs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod)) - }) - return _c -} - -func (_c *MockContainerManager_PodHasExclusiveCPUs_Call) Return(_a0 bool) *MockContainerManager_PodHasExclusiveCPUs_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_PodHasExclusiveCPUs_Call) RunAndReturn(run func(*v1.Pod) bool) *MockContainerManager_PodHasExclusiveCPUs_Call { - _c.Call.Return(run) - return _c -} - -// PodMightNeedToUnprepareResources provides a mock function with given fields: UID -func (_m *MockContainerManager) PodMightNeedToUnprepareResources(UID types.UID) bool { - ret := _m.Called(UID) - - if len(ret) == 0 { - panic("no return value specified for PodMightNeedToUnprepareResources") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(types.UID) bool); ok { - r0 = rf(UID) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockContainerManager_PodMightNeedToUnprepareResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PodMightNeedToUnprepareResources' -type MockContainerManager_PodMightNeedToUnprepareResources_Call struct { - *mock.Call -} - -// PodMightNeedToUnprepareResources is a helper method to define mock.On call -// - UID types.UID -func (_e *MockContainerManager_Expecter) PodMightNeedToUnprepareResources(UID interface{}) *MockContainerManager_PodMightNeedToUnprepareResources_Call { - return &MockContainerManager_PodMightNeedToUnprepareResources_Call{Call: _e.mock.On("PodMightNeedToUnprepareResources", UID)} -} - -func (_c *MockContainerManager_PodMightNeedToUnprepareResources_Call) Run(run func(UID types.UID)) *MockContainerManager_PodMightNeedToUnprepareResources_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.UID)) - }) - return _c -} - -func (_c *MockContainerManager_PodMightNeedToUnprepareResources_Call) Return(_a0 bool) *MockContainerManager_PodMightNeedToUnprepareResources_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_PodMightNeedToUnprepareResources_Call) RunAndReturn(run func(types.UID) bool) *MockContainerManager_PodMightNeedToUnprepareResources_Call { - _c.Call.Return(run) - return _c -} - -// PrepareDynamicResources provides a mock function with given fields: _a0, _a1 -func (_m *MockContainerManager) PrepareDynamicResources(_a0 context.Context, _a1 *v1.Pod) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for PrepareDynamicResources") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *v1.Pod) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockContainerManager_PrepareDynamicResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrepareDynamicResources' -type MockContainerManager_PrepareDynamicResources_Call struct { - *mock.Call -} - -// PrepareDynamicResources is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *v1.Pod -func (_e *MockContainerManager_Expecter) PrepareDynamicResources(_a0 interface{}, _a1 interface{}) *MockContainerManager_PrepareDynamicResources_Call { - return &MockContainerManager_PrepareDynamicResources_Call{Call: _e.mock.On("PrepareDynamicResources", _a0, _a1)} -} - -func (_c *MockContainerManager_PrepareDynamicResources_Call) Run(run func(_a0 context.Context, _a1 *v1.Pod)) *MockContainerManager_PrepareDynamicResources_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*v1.Pod)) - }) - return _c -} - -func (_c *MockContainerManager_PrepareDynamicResources_Call) Return(_a0 error) *MockContainerManager_PrepareDynamicResources_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_PrepareDynamicResources_Call) RunAndReturn(run func(context.Context, *v1.Pod) error) *MockContainerManager_PrepareDynamicResources_Call { - _c.Call.Return(run) - return _c -} - -// ShouldResetExtendedResourceCapacity provides a mock function with no fields -func (_m *MockContainerManager) ShouldResetExtendedResourceCapacity() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ShouldResetExtendedResourceCapacity") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockContainerManager_ShouldResetExtendedResourceCapacity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShouldResetExtendedResourceCapacity' -type MockContainerManager_ShouldResetExtendedResourceCapacity_Call struct { - *mock.Call -} - -// ShouldResetExtendedResourceCapacity is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) ShouldResetExtendedResourceCapacity() *MockContainerManager_ShouldResetExtendedResourceCapacity_Call { - return &MockContainerManager_ShouldResetExtendedResourceCapacity_Call{Call: _e.mock.On("ShouldResetExtendedResourceCapacity")} -} - -func (_c *MockContainerManager_ShouldResetExtendedResourceCapacity_Call) Run(run func()) *MockContainerManager_ShouldResetExtendedResourceCapacity_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_ShouldResetExtendedResourceCapacity_Call) Return(_a0 bool) *MockContainerManager_ShouldResetExtendedResourceCapacity_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_ShouldResetExtendedResourceCapacity_Call) RunAndReturn(run func() bool) *MockContainerManager_ShouldResetExtendedResourceCapacity_Call { - _c.Call.Return(run) - return _c -} - -// Start provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4, _a5, _a6, _a7 -func (_m *MockContainerManager) Start(_a0 context.Context, _a1 *v1.Node, _a2 cm.ActivePodsFunc, _a3 cm.GetNodeFunc, _a4 config.SourcesReady, _a5 status.PodStatusProvider, _a6 cri.RuntimeService, _a7 bool) error { - ret := _m.Called(_a0, _a1, _a2, _a3, _a4, _a5, _a6, _a7) - - if len(ret) == 0 { - panic("no return value specified for Start") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *v1.Node, cm.ActivePodsFunc, cm.GetNodeFunc, config.SourcesReady, status.PodStatusProvider, cri.RuntimeService, bool) error); ok { - r0 = rf(_a0, _a1, _a2, _a3, _a4, _a5, _a6, _a7) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockContainerManager_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' -type MockContainerManager_Start_Call struct { - *mock.Call -} - -// Start is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *v1.Node -// - _a2 cm.ActivePodsFunc -// - _a3 cm.GetNodeFunc -// - _a4 config.SourcesReady -// - _a5 status.PodStatusProvider -// - _a6 cri.RuntimeService -// - _a7 bool -func (_e *MockContainerManager_Expecter) Start(_a0 interface{}, _a1 interface{}, _a2 interface{}, _a3 interface{}, _a4 interface{}, _a5 interface{}, _a6 interface{}, _a7 interface{}) *MockContainerManager_Start_Call { - return &MockContainerManager_Start_Call{Call: _e.mock.On("Start", _a0, _a1, _a2, _a3, _a4, _a5, _a6, _a7)} -} - -func (_c *MockContainerManager_Start_Call) Run(run func(_a0 context.Context, _a1 *v1.Node, _a2 cm.ActivePodsFunc, _a3 cm.GetNodeFunc, _a4 config.SourcesReady, _a5 status.PodStatusProvider, _a6 cri.RuntimeService, _a7 bool)) *MockContainerManager_Start_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*v1.Node), args[2].(cm.ActivePodsFunc), args[3].(cm.GetNodeFunc), args[4].(config.SourcesReady), args[5].(status.PodStatusProvider), args[6].(cri.RuntimeService), args[7].(bool)) - }) - return _c -} - -func (_c *MockContainerManager_Start_Call) Return(_a0 error) *MockContainerManager_Start_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_Start_Call) RunAndReturn(run func(context.Context, *v1.Node, cm.ActivePodsFunc, cm.GetNodeFunc, config.SourcesReady, status.PodStatusProvider, cri.RuntimeService, bool) error) *MockContainerManager_Start_Call { - _c.Call.Return(run) - return _c -} - -// Status provides a mock function with no fields -func (_m *MockContainerManager) Status() cm.Status { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Status") - } - - var r0 cm.Status - if rf, ok := ret.Get(0).(func() cm.Status); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(cm.Status) - } - - return r0 -} - -// MockContainerManager_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status' -type MockContainerManager_Status_Call struct { - *mock.Call -} - -// Status is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) Status() *MockContainerManager_Status_Call { - return &MockContainerManager_Status_Call{Call: _e.mock.On("Status")} -} - -func (_c *MockContainerManager_Status_Call) Run(run func()) *MockContainerManager_Status_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_Status_Call) Return(_a0 cm.Status) *MockContainerManager_Status_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_Status_Call) RunAndReturn(run func() cm.Status) *MockContainerManager_Status_Call { - _c.Call.Return(run) - return _c -} - -// SystemCgroupsLimit provides a mock function with no fields -func (_m *MockContainerManager) SystemCgroupsLimit() v1.ResourceList { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for SystemCgroupsLimit") - } - - var r0 v1.ResourceList - if rf, ok := ret.Get(0).(func() v1.ResourceList); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(v1.ResourceList) - } - } - - return r0 -} - -// MockContainerManager_SystemCgroupsLimit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SystemCgroupsLimit' -type MockContainerManager_SystemCgroupsLimit_Call struct { - *mock.Call -} - -// SystemCgroupsLimit is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) SystemCgroupsLimit() *MockContainerManager_SystemCgroupsLimit_Call { - return &MockContainerManager_SystemCgroupsLimit_Call{Call: _e.mock.On("SystemCgroupsLimit")} -} - -func (_c *MockContainerManager_SystemCgroupsLimit_Call) Run(run func()) *MockContainerManager_SystemCgroupsLimit_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_SystemCgroupsLimit_Call) Return(_a0 v1.ResourceList) *MockContainerManager_SystemCgroupsLimit_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_SystemCgroupsLimit_Call) RunAndReturn(run func() v1.ResourceList) *MockContainerManager_SystemCgroupsLimit_Call { - _c.Call.Return(run) - return _c -} - -// UnprepareDynamicResources provides a mock function with given fields: _a0, _a1 -func (_m *MockContainerManager) UnprepareDynamicResources(_a0 context.Context, _a1 *v1.Pod) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for UnprepareDynamicResources") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *v1.Pod) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockContainerManager_UnprepareDynamicResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnprepareDynamicResources' -type MockContainerManager_UnprepareDynamicResources_Call struct { - *mock.Call -} - -// UnprepareDynamicResources is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *v1.Pod -func (_e *MockContainerManager_Expecter) UnprepareDynamicResources(_a0 interface{}, _a1 interface{}) *MockContainerManager_UnprepareDynamicResources_Call { - return &MockContainerManager_UnprepareDynamicResources_Call{Call: _e.mock.On("UnprepareDynamicResources", _a0, _a1)} -} - -func (_c *MockContainerManager_UnprepareDynamicResources_Call) Run(run func(_a0 context.Context, _a1 *v1.Pod)) *MockContainerManager_UnprepareDynamicResources_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*v1.Pod)) - }) - return _c -} - -func (_c *MockContainerManager_UnprepareDynamicResources_Call) Return(_a0 error) *MockContainerManager_UnprepareDynamicResources_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_UnprepareDynamicResources_Call) RunAndReturn(run func(context.Context, *v1.Pod) error) *MockContainerManager_UnprepareDynamicResources_Call { - _c.Call.Return(run) - return _c -} - -// UpdateAllocatedDevices provides a mock function with no fields -func (_m *MockContainerManager) UpdateAllocatedDevices() { - _m.Called() -} - -// MockContainerManager_UpdateAllocatedDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAllocatedDevices' -type MockContainerManager_UpdateAllocatedDevices_Call struct { - *mock.Call -} - -// UpdateAllocatedDevices is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) UpdateAllocatedDevices() *MockContainerManager_UpdateAllocatedDevices_Call { - return &MockContainerManager_UpdateAllocatedDevices_Call{Call: _e.mock.On("UpdateAllocatedDevices")} -} - -func (_c *MockContainerManager_UpdateAllocatedDevices_Call) Run(run func()) *MockContainerManager_UpdateAllocatedDevices_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_UpdateAllocatedDevices_Call) Return() *MockContainerManager_UpdateAllocatedDevices_Call { - _c.Call.Return() - return _c -} - -func (_c *MockContainerManager_UpdateAllocatedDevices_Call) RunAndReturn(run func()) *MockContainerManager_UpdateAllocatedDevices_Call { - _c.Run(run) - return _c -} - -// UpdateAllocatedResourcesStatus provides a mock function with given fields: pod, _a1 -func (_m *MockContainerManager) UpdateAllocatedResourcesStatus(pod *v1.Pod, _a1 *v1.PodStatus) { - _m.Called(pod, _a1) -} - -// MockContainerManager_UpdateAllocatedResourcesStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAllocatedResourcesStatus' -type MockContainerManager_UpdateAllocatedResourcesStatus_Call struct { - *mock.Call -} - -// UpdateAllocatedResourcesStatus is a helper method to define mock.On call -// - pod *v1.Pod -// - _a1 *v1.PodStatus -func (_e *MockContainerManager_Expecter) UpdateAllocatedResourcesStatus(pod interface{}, _a1 interface{}) *MockContainerManager_UpdateAllocatedResourcesStatus_Call { - return &MockContainerManager_UpdateAllocatedResourcesStatus_Call{Call: _e.mock.On("UpdateAllocatedResourcesStatus", pod, _a1)} -} - -func (_c *MockContainerManager_UpdateAllocatedResourcesStatus_Call) Run(run func(pod *v1.Pod, _a1 *v1.PodStatus)) *MockContainerManager_UpdateAllocatedResourcesStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod), args[1].(*v1.PodStatus)) - }) - return _c -} - -func (_c *MockContainerManager_UpdateAllocatedResourcesStatus_Call) Return() *MockContainerManager_UpdateAllocatedResourcesStatus_Call { - _c.Call.Return() - return _c -} - -func (_c *MockContainerManager_UpdateAllocatedResourcesStatus_Call) RunAndReturn(run func(*v1.Pod, *v1.PodStatus)) *MockContainerManager_UpdateAllocatedResourcesStatus_Call { - _c.Run(run) - return _c -} - -// UpdatePluginResources provides a mock function with given fields: _a0, _a1 -func (_m *MockContainerManager) UpdatePluginResources(_a0 *framework.NodeInfo, _a1 *lifecycle.PodAdmitAttributes) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for UpdatePluginResources") - } - - var r0 error - if rf, ok := ret.Get(0).(func(*framework.NodeInfo, *lifecycle.PodAdmitAttributes) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockContainerManager_UpdatePluginResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePluginResources' -type MockContainerManager_UpdatePluginResources_Call struct { - *mock.Call -} - -// UpdatePluginResources is a helper method to define mock.On call -// - _a0 *framework.NodeInfo -// - _a1 *lifecycle.PodAdmitAttributes -func (_e *MockContainerManager_Expecter) UpdatePluginResources(_a0 interface{}, _a1 interface{}) *MockContainerManager_UpdatePluginResources_Call { - return &MockContainerManager_UpdatePluginResources_Call{Call: _e.mock.On("UpdatePluginResources", _a0, _a1)} -} - -func (_c *MockContainerManager_UpdatePluginResources_Call) Run(run func(_a0 *framework.NodeInfo, _a1 *lifecycle.PodAdmitAttributes)) *MockContainerManager_UpdatePluginResources_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*framework.NodeInfo), args[1].(*lifecycle.PodAdmitAttributes)) - }) - return _c -} - -func (_c *MockContainerManager_UpdatePluginResources_Call) Return(_a0 error) *MockContainerManager_UpdatePluginResources_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_UpdatePluginResources_Call) RunAndReturn(run func(*framework.NodeInfo, *lifecycle.PodAdmitAttributes) error) *MockContainerManager_UpdatePluginResources_Call { - _c.Call.Return(run) - return _c -} - -// UpdateQOSCgroups provides a mock function with no fields -func (_m *MockContainerManager) UpdateQOSCgroups() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for UpdateQOSCgroups") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockContainerManager_UpdateQOSCgroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateQOSCgroups' -type MockContainerManager_UpdateQOSCgroups_Call struct { - *mock.Call -} - -// UpdateQOSCgroups is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) UpdateQOSCgroups() *MockContainerManager_UpdateQOSCgroups_Call { - return &MockContainerManager_UpdateQOSCgroups_Call{Call: _e.mock.On("UpdateQOSCgroups")} -} - -func (_c *MockContainerManager_UpdateQOSCgroups_Call) Run(run func()) *MockContainerManager_UpdateQOSCgroups_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_UpdateQOSCgroups_Call) Return(_a0 error) *MockContainerManager_UpdateQOSCgroups_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_UpdateQOSCgroups_Call) RunAndReturn(run func() error) *MockContainerManager_UpdateQOSCgroups_Call { - _c.Call.Return(run) - return _c -} - -// Updates provides a mock function with no fields -func (_m *MockContainerManager) Updates() <-chan resourceupdates.Update { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Updates") - } - - var r0 <-chan resourceupdates.Update - if rf, ok := ret.Get(0).(func() <-chan resourceupdates.Update); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan resourceupdates.Update) - } - } - - return r0 -} - -// MockContainerManager_Updates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Updates' -type MockContainerManager_Updates_Call struct { - *mock.Call -} - -// Updates is a helper method to define mock.On call -func (_e *MockContainerManager_Expecter) Updates() *MockContainerManager_Updates_Call { - return &MockContainerManager_Updates_Call{Call: _e.mock.On("Updates")} -} - -func (_c *MockContainerManager_Updates_Call) Run(run func()) *MockContainerManager_Updates_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockContainerManager_Updates_Call) Return(_a0 <-chan resourceupdates.Update) *MockContainerManager_Updates_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockContainerManager_Updates_Call) RunAndReturn(run func() <-chan resourceupdates.Update) *MockContainerManager_Updates_Call { - _c.Call.Return(run) - return _c -} - -// NewMockContainerManager creates a new instance of MockContainerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockContainerManager(t interface { - mock.TestingT - Cleanup(func()) -}) *MockContainerManager { - mock := &MockContainerManager{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/cm/testing/mock_pod_container_manager.go b/pkg/kubelet/cm/testing/mock_pod_container_manager.go deleted file mode 100644 index 97467682b06dd..0000000000000 --- a/pkg/kubelet/cm/testing/mock_pod_container_manager.go +++ /dev/null @@ -1,572 +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 mockery v2.53.3. DO NOT EDIT. - -package testing - -import ( - mock "github.com/stretchr/testify/mock" - cm "k8s.io/kubernetes/pkg/kubelet/cm" - - types "k8s.io/apimachinery/pkg/types" - - v1 "k8s.io/api/core/v1" -) - -// MockPodContainerManager is an autogenerated mock type for the PodContainerManager type -type MockPodContainerManager struct { - mock.Mock -} - -type MockPodContainerManager_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPodContainerManager) EXPECT() *MockPodContainerManager_Expecter { - return &MockPodContainerManager_Expecter{mock: &_m.Mock} -} - -// Destroy provides a mock function with given fields: name -func (_m *MockPodContainerManager) Destroy(name cm.CgroupName) error { - ret := _m.Called(name) - - if len(ret) == 0 { - panic("no return value specified for Destroy") - } - - var r0 error - if rf, ok := ret.Get(0).(func(cm.CgroupName) error); ok { - r0 = rf(name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPodContainerManager_Destroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Destroy' -type MockPodContainerManager_Destroy_Call struct { - *mock.Call -} - -// Destroy is a helper method to define mock.On call -// - name cm.CgroupName -func (_e *MockPodContainerManager_Expecter) Destroy(name interface{}) *MockPodContainerManager_Destroy_Call { - return &MockPodContainerManager_Destroy_Call{Call: _e.mock.On("Destroy", name)} -} - -func (_c *MockPodContainerManager_Destroy_Call) Run(run func(name cm.CgroupName)) *MockPodContainerManager_Destroy_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(cm.CgroupName)) - }) - return _c -} - -func (_c *MockPodContainerManager_Destroy_Call) Return(_a0 error) *MockPodContainerManager_Destroy_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPodContainerManager_Destroy_Call) RunAndReturn(run func(cm.CgroupName) error) *MockPodContainerManager_Destroy_Call { - _c.Call.Return(run) - return _c -} - -// EnsureExists provides a mock function with given fields: _a0 -func (_m *MockPodContainerManager) EnsureExists(_a0 *v1.Pod) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for EnsureExists") - } - - var r0 error - if rf, ok := ret.Get(0).(func(*v1.Pod) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPodContainerManager_EnsureExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureExists' -type MockPodContainerManager_EnsureExists_Call struct { - *mock.Call -} - -// EnsureExists is a helper method to define mock.On call -// - _a0 *v1.Pod -func (_e *MockPodContainerManager_Expecter) EnsureExists(_a0 interface{}) *MockPodContainerManager_EnsureExists_Call { - return &MockPodContainerManager_EnsureExists_Call{Call: _e.mock.On("EnsureExists", _a0)} -} - -func (_c *MockPodContainerManager_EnsureExists_Call) Run(run func(_a0 *v1.Pod)) *MockPodContainerManager_EnsureExists_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod)) - }) - return _c -} - -func (_c *MockPodContainerManager_EnsureExists_Call) Return(_a0 error) *MockPodContainerManager_EnsureExists_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPodContainerManager_EnsureExists_Call) RunAndReturn(run func(*v1.Pod) error) *MockPodContainerManager_EnsureExists_Call { - _c.Call.Return(run) - return _c -} - -// Exists provides a mock function with given fields: _a0 -func (_m *MockPodContainerManager) Exists(_a0 *v1.Pod) bool { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for Exists") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(*v1.Pod) bool); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockPodContainerManager_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists' -type MockPodContainerManager_Exists_Call struct { - *mock.Call -} - -// Exists is a helper method to define mock.On call -// - _a0 *v1.Pod -func (_e *MockPodContainerManager_Expecter) Exists(_a0 interface{}) *MockPodContainerManager_Exists_Call { - return &MockPodContainerManager_Exists_Call{Call: _e.mock.On("Exists", _a0)} -} - -func (_c *MockPodContainerManager_Exists_Call) Run(run func(_a0 *v1.Pod)) *MockPodContainerManager_Exists_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod)) - }) - return _c -} - -func (_c *MockPodContainerManager_Exists_Call) Return(_a0 bool) *MockPodContainerManager_Exists_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPodContainerManager_Exists_Call) RunAndReturn(run func(*v1.Pod) bool) *MockPodContainerManager_Exists_Call { - _c.Call.Return(run) - return _c -} - -// GetAllPodsFromCgroups provides a mock function with no fields -func (_m *MockPodContainerManager) GetAllPodsFromCgroups() (map[types.UID]cm.CgroupName, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAllPodsFromCgroups") - } - - var r0 map[types.UID]cm.CgroupName - var r1 error - if rf, ok := ret.Get(0).(func() (map[types.UID]cm.CgroupName, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() map[types.UID]cm.CgroupName); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[types.UID]cm.CgroupName) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPodContainerManager_GetAllPodsFromCgroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllPodsFromCgroups' -type MockPodContainerManager_GetAllPodsFromCgroups_Call struct { - *mock.Call -} - -// GetAllPodsFromCgroups is a helper method to define mock.On call -func (_e *MockPodContainerManager_Expecter) GetAllPodsFromCgroups() *MockPodContainerManager_GetAllPodsFromCgroups_Call { - return &MockPodContainerManager_GetAllPodsFromCgroups_Call{Call: _e.mock.On("GetAllPodsFromCgroups")} -} - -func (_c *MockPodContainerManager_GetAllPodsFromCgroups_Call) Run(run func()) *MockPodContainerManager_GetAllPodsFromCgroups_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPodContainerManager_GetAllPodsFromCgroups_Call) Return(_a0 map[types.UID]cm.CgroupName, _a1 error) *MockPodContainerManager_GetAllPodsFromCgroups_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPodContainerManager_GetAllPodsFromCgroups_Call) RunAndReturn(run func() (map[types.UID]cm.CgroupName, error)) *MockPodContainerManager_GetAllPodsFromCgroups_Call { - _c.Call.Return(run) - return _c -} - -// GetPodCgroupConfig provides a mock function with given fields: pod, resource -func (_m *MockPodContainerManager) GetPodCgroupConfig(pod *v1.Pod, resource v1.ResourceName) (*cm.ResourceConfig, error) { - ret := _m.Called(pod, resource) - - if len(ret) == 0 { - panic("no return value specified for GetPodCgroupConfig") - } - - var r0 *cm.ResourceConfig - var r1 error - if rf, ok := ret.Get(0).(func(*v1.Pod, v1.ResourceName) (*cm.ResourceConfig, error)); ok { - return rf(pod, resource) - } - if rf, ok := ret.Get(0).(func(*v1.Pod, v1.ResourceName) *cm.ResourceConfig); ok { - r0 = rf(pod, resource) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*cm.ResourceConfig) - } - } - - if rf, ok := ret.Get(1).(func(*v1.Pod, v1.ResourceName) error); ok { - r1 = rf(pod, resource) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPodContainerManager_GetPodCgroupConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPodCgroupConfig' -type MockPodContainerManager_GetPodCgroupConfig_Call struct { - *mock.Call -} - -// GetPodCgroupConfig is a helper method to define mock.On call -// - pod *v1.Pod -// - resource v1.ResourceName -func (_e *MockPodContainerManager_Expecter) GetPodCgroupConfig(pod interface{}, resource interface{}) *MockPodContainerManager_GetPodCgroupConfig_Call { - return &MockPodContainerManager_GetPodCgroupConfig_Call{Call: _e.mock.On("GetPodCgroupConfig", pod, resource)} -} - -func (_c *MockPodContainerManager_GetPodCgroupConfig_Call) Run(run func(pod *v1.Pod, resource v1.ResourceName)) *MockPodContainerManager_GetPodCgroupConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod), args[1].(v1.ResourceName)) - }) - return _c -} - -func (_c *MockPodContainerManager_GetPodCgroupConfig_Call) Return(_a0 *cm.ResourceConfig, _a1 error) *MockPodContainerManager_GetPodCgroupConfig_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPodContainerManager_GetPodCgroupConfig_Call) RunAndReturn(run func(*v1.Pod, v1.ResourceName) (*cm.ResourceConfig, error)) *MockPodContainerManager_GetPodCgroupConfig_Call { - _c.Call.Return(run) - return _c -} - -// GetPodCgroupMemoryUsage provides a mock function with given fields: pod -func (_m *MockPodContainerManager) GetPodCgroupMemoryUsage(pod *v1.Pod) (uint64, error) { - ret := _m.Called(pod) - - if len(ret) == 0 { - panic("no return value specified for GetPodCgroupMemoryUsage") - } - - var r0 uint64 - var r1 error - if rf, ok := ret.Get(0).(func(*v1.Pod) (uint64, error)); ok { - return rf(pod) - } - if rf, ok := ret.Get(0).(func(*v1.Pod) uint64); ok { - r0 = rf(pod) - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func(*v1.Pod) error); ok { - r1 = rf(pod) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPodContainerManager_GetPodCgroupMemoryUsage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPodCgroupMemoryUsage' -type MockPodContainerManager_GetPodCgroupMemoryUsage_Call struct { - *mock.Call -} - -// GetPodCgroupMemoryUsage is a helper method to define mock.On call -// - pod *v1.Pod -func (_e *MockPodContainerManager_Expecter) GetPodCgroupMemoryUsage(pod interface{}) *MockPodContainerManager_GetPodCgroupMemoryUsage_Call { - return &MockPodContainerManager_GetPodCgroupMemoryUsage_Call{Call: _e.mock.On("GetPodCgroupMemoryUsage", pod)} -} - -func (_c *MockPodContainerManager_GetPodCgroupMemoryUsage_Call) Run(run func(pod *v1.Pod)) *MockPodContainerManager_GetPodCgroupMemoryUsage_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod)) - }) - return _c -} - -func (_c *MockPodContainerManager_GetPodCgroupMemoryUsage_Call) Return(_a0 uint64, _a1 error) *MockPodContainerManager_GetPodCgroupMemoryUsage_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPodContainerManager_GetPodCgroupMemoryUsage_Call) RunAndReturn(run func(*v1.Pod) (uint64, error)) *MockPodContainerManager_GetPodCgroupMemoryUsage_Call { - _c.Call.Return(run) - return _c -} - -// GetPodContainerName provides a mock function with given fields: _a0 -func (_m *MockPodContainerManager) GetPodContainerName(_a0 *v1.Pod) (cm.CgroupName, string) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetPodContainerName") - } - - var r0 cm.CgroupName - var r1 string - if rf, ok := ret.Get(0).(func(*v1.Pod) (cm.CgroupName, string)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(*v1.Pod) cm.CgroupName); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(cm.CgroupName) - } - } - - if rf, ok := ret.Get(1).(func(*v1.Pod) string); ok { - r1 = rf(_a0) - } else { - r1 = ret.Get(1).(string) - } - - return r0, r1 -} - -// MockPodContainerManager_GetPodContainerName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPodContainerName' -type MockPodContainerManager_GetPodContainerName_Call struct { - *mock.Call -} - -// GetPodContainerName is a helper method to define mock.On call -// - _a0 *v1.Pod -func (_e *MockPodContainerManager_Expecter) GetPodContainerName(_a0 interface{}) *MockPodContainerManager_GetPodContainerName_Call { - return &MockPodContainerManager_GetPodContainerName_Call{Call: _e.mock.On("GetPodContainerName", _a0)} -} - -func (_c *MockPodContainerManager_GetPodContainerName_Call) Run(run func(_a0 *v1.Pod)) *MockPodContainerManager_GetPodContainerName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod)) - }) - return _c -} - -func (_c *MockPodContainerManager_GetPodContainerName_Call) Return(_a0 cm.CgroupName, _a1 string) *MockPodContainerManager_GetPodContainerName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPodContainerManager_GetPodContainerName_Call) RunAndReturn(run func(*v1.Pod) (cm.CgroupName, string)) *MockPodContainerManager_GetPodContainerName_Call { - _c.Call.Return(run) - return _c -} - -// IsPodCgroup provides a mock function with given fields: cgroupfs -func (_m *MockPodContainerManager) IsPodCgroup(cgroupfs string) (bool, types.UID) { - ret := _m.Called(cgroupfs) - - if len(ret) == 0 { - panic("no return value specified for IsPodCgroup") - } - - var r0 bool - var r1 types.UID - if rf, ok := ret.Get(0).(func(string) (bool, types.UID)); ok { - return rf(cgroupfs) - } - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(cgroupfs) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(string) types.UID); ok { - r1 = rf(cgroupfs) - } else { - r1 = ret.Get(1).(types.UID) - } - - return r0, r1 -} - -// MockPodContainerManager_IsPodCgroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsPodCgroup' -type MockPodContainerManager_IsPodCgroup_Call struct { - *mock.Call -} - -// IsPodCgroup is a helper method to define mock.On call -// - cgroupfs string -func (_e *MockPodContainerManager_Expecter) IsPodCgroup(cgroupfs interface{}) *MockPodContainerManager_IsPodCgroup_Call { - return &MockPodContainerManager_IsPodCgroup_Call{Call: _e.mock.On("IsPodCgroup", cgroupfs)} -} - -func (_c *MockPodContainerManager_IsPodCgroup_Call) Run(run func(cgroupfs string)) *MockPodContainerManager_IsPodCgroup_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockPodContainerManager_IsPodCgroup_Call) Return(_a0 bool, _a1 types.UID) *MockPodContainerManager_IsPodCgroup_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPodContainerManager_IsPodCgroup_Call) RunAndReturn(run func(string) (bool, types.UID)) *MockPodContainerManager_IsPodCgroup_Call { - _c.Call.Return(run) - return _c -} - -// ReduceCPULimits provides a mock function with given fields: name -func (_m *MockPodContainerManager) ReduceCPULimits(name cm.CgroupName) error { - ret := _m.Called(name) - - if len(ret) == 0 { - panic("no return value specified for ReduceCPULimits") - } - - var r0 error - if rf, ok := ret.Get(0).(func(cm.CgroupName) error); ok { - r0 = rf(name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPodContainerManager_ReduceCPULimits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReduceCPULimits' -type MockPodContainerManager_ReduceCPULimits_Call struct { - *mock.Call -} - -// ReduceCPULimits is a helper method to define mock.On call -// - name cm.CgroupName -func (_e *MockPodContainerManager_Expecter) ReduceCPULimits(name interface{}) *MockPodContainerManager_ReduceCPULimits_Call { - return &MockPodContainerManager_ReduceCPULimits_Call{Call: _e.mock.On("ReduceCPULimits", name)} -} - -func (_c *MockPodContainerManager_ReduceCPULimits_Call) Run(run func(name cm.CgroupName)) *MockPodContainerManager_ReduceCPULimits_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(cm.CgroupName)) - }) - return _c -} - -func (_c *MockPodContainerManager_ReduceCPULimits_Call) Return(_a0 error) *MockPodContainerManager_ReduceCPULimits_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPodContainerManager_ReduceCPULimits_Call) RunAndReturn(run func(cm.CgroupName) error) *MockPodContainerManager_ReduceCPULimits_Call { - _c.Call.Return(run) - return _c -} - -// SetPodCgroupConfig provides a mock function with given fields: pod, resourceConfig -func (_m *MockPodContainerManager) SetPodCgroupConfig(pod *v1.Pod, resourceConfig *cm.ResourceConfig) error { - ret := _m.Called(pod, resourceConfig) - - if len(ret) == 0 { - panic("no return value specified for SetPodCgroupConfig") - } - - var r0 error - if rf, ok := ret.Get(0).(func(*v1.Pod, *cm.ResourceConfig) error); ok { - r0 = rf(pod, resourceConfig) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPodContainerManager_SetPodCgroupConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPodCgroupConfig' -type MockPodContainerManager_SetPodCgroupConfig_Call struct { - *mock.Call -} - -// SetPodCgroupConfig is a helper method to define mock.On call -// - pod *v1.Pod -// - resourceConfig *cm.ResourceConfig -func (_e *MockPodContainerManager_Expecter) SetPodCgroupConfig(pod interface{}, resourceConfig interface{}) *MockPodContainerManager_SetPodCgroupConfig_Call { - return &MockPodContainerManager_SetPodCgroupConfig_Call{Call: _e.mock.On("SetPodCgroupConfig", pod, resourceConfig)} -} - -func (_c *MockPodContainerManager_SetPodCgroupConfig_Call) Run(run func(pod *v1.Pod, resourceConfig *cm.ResourceConfig)) *MockPodContainerManager_SetPodCgroupConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod), args[1].(*cm.ResourceConfig)) - }) - return _c -} - -func (_c *MockPodContainerManager_SetPodCgroupConfig_Call) Return(_a0 error) *MockPodContainerManager_SetPodCgroupConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPodContainerManager_SetPodCgroupConfig_Call) RunAndReturn(run func(*v1.Pod, *cm.ResourceConfig) error) *MockPodContainerManager_SetPodCgroupConfig_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPodContainerManager creates a new instance of MockPodContainerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockPodContainerManager(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPodContainerManager { - mock := &MockPodContainerManager{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/cm/testing/mocks.go b/pkg/kubelet/cm/testing/mocks.go new file mode 100644 index 0000000000000..7c8df256102b8 --- /dev/null +++ b/pkg/kubelet/cm/testing/mocks.go @@ -0,0 +1,2452 @@ +/* +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 mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package testing + +import ( + "context" + + mock "github.com/stretchr/testify/mock" + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apiserver/pkg/server/healthz" + "k8s.io/cri-api/pkg/apis" + v10 "k8s.io/kubelet/pkg/apis/podresources/v1" + "k8s.io/kubernetes/pkg/kubelet/cm" + "k8s.io/kubernetes/pkg/kubelet/cm/resourceupdates" + "k8s.io/kubernetes/pkg/kubelet/config" + "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/lifecycle" + "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" + "k8s.io/kubernetes/pkg/kubelet/status" + "k8s.io/kubernetes/pkg/scheduler/framework" +) + +// NewMockContainerManager creates a new instance of MockContainerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockContainerManager(t interface { + mock.TestingT + Cleanup(func()) +}) *MockContainerManager { + mock := &MockContainerManager{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockContainerManager is an autogenerated mock type for the ContainerManager type +type MockContainerManager struct { + mock.Mock +} + +type MockContainerManager_Expecter struct { + mock *mock.Mock +} + +func (_m *MockContainerManager) EXPECT() *MockContainerManager_Expecter { + return &MockContainerManager_Expecter{mock: &_m.Mock} +} + +// ContainerHasExclusiveCPUs provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) ContainerHasExclusiveCPUs(pod *v1.Pod, container *v1.Container) bool { + ret := _mock.Called(pod, container) + + if len(ret) == 0 { + panic("no return value specified for ContainerHasExclusiveCPUs") + } + + var r0 bool + if returnFunc, ok := ret.Get(0).(func(*v1.Pod, *v1.Container) bool); ok { + r0 = returnFunc(pod, container) + } else { + r0 = ret.Get(0).(bool) + } + return r0 +} + +// MockContainerManager_ContainerHasExclusiveCPUs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContainerHasExclusiveCPUs' +type MockContainerManager_ContainerHasExclusiveCPUs_Call struct { + *mock.Call +} + +// ContainerHasExclusiveCPUs is a helper method to define mock.On call +// - pod *v1.Pod +// - container *v1.Container +func (_e *MockContainerManager_Expecter) ContainerHasExclusiveCPUs(pod interface{}, container interface{}) *MockContainerManager_ContainerHasExclusiveCPUs_Call { + return &MockContainerManager_ContainerHasExclusiveCPUs_Call{Call: _e.mock.On("ContainerHasExclusiveCPUs", pod, container)} +} + +func (_c *MockContainerManager_ContainerHasExclusiveCPUs_Call) Run(run func(pod *v1.Pod, container *v1.Container)) *MockContainerManager_ContainerHasExclusiveCPUs_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + var arg1 *v1.Container + if args[1] != nil { + arg1 = args[1].(*v1.Container) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockContainerManager_ContainerHasExclusiveCPUs_Call) Return(b bool) *MockContainerManager_ContainerHasExclusiveCPUs_Call { + _c.Call.Return(b) + return _c +} + +func (_c *MockContainerManager_ContainerHasExclusiveCPUs_Call) RunAndReturn(run func(pod *v1.Pod, container *v1.Container) bool) *MockContainerManager_ContainerHasExclusiveCPUs_Call { + _c.Call.Return(run) + return _c +} + +// GetAllocatableCPUs provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetAllocatableCPUs() []int64 { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetAllocatableCPUs") + } + + var r0 []int64 + if returnFunc, ok := ret.Get(0).(func() []int64); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]int64) + } + } + return r0 +} + +// MockContainerManager_GetAllocatableCPUs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllocatableCPUs' +type MockContainerManager_GetAllocatableCPUs_Call struct { + *mock.Call +} + +// GetAllocatableCPUs is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) GetAllocatableCPUs() *MockContainerManager_GetAllocatableCPUs_Call { + return &MockContainerManager_GetAllocatableCPUs_Call{Call: _e.mock.On("GetAllocatableCPUs")} +} + +func (_c *MockContainerManager_GetAllocatableCPUs_Call) Run(run func()) *MockContainerManager_GetAllocatableCPUs_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_GetAllocatableCPUs_Call) Return(int64s []int64) *MockContainerManager_GetAllocatableCPUs_Call { + _c.Call.Return(int64s) + return _c +} + +func (_c *MockContainerManager_GetAllocatableCPUs_Call) RunAndReturn(run func() []int64) *MockContainerManager_GetAllocatableCPUs_Call { + _c.Call.Return(run) + return _c +} + +// GetAllocatableDevices provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetAllocatableDevices() []*v10.ContainerDevices { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetAllocatableDevices") + } + + var r0 []*v10.ContainerDevices + if returnFunc, ok := ret.Get(0).(func() []*v10.ContainerDevices); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v10.ContainerDevices) + } + } + return r0 +} + +// MockContainerManager_GetAllocatableDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllocatableDevices' +type MockContainerManager_GetAllocatableDevices_Call struct { + *mock.Call +} + +// GetAllocatableDevices is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) GetAllocatableDevices() *MockContainerManager_GetAllocatableDevices_Call { + return &MockContainerManager_GetAllocatableDevices_Call{Call: _e.mock.On("GetAllocatableDevices")} +} + +func (_c *MockContainerManager_GetAllocatableDevices_Call) Run(run func()) *MockContainerManager_GetAllocatableDevices_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_GetAllocatableDevices_Call) Return(containerDevicess []*v10.ContainerDevices) *MockContainerManager_GetAllocatableDevices_Call { + _c.Call.Return(containerDevicess) + return _c +} + +func (_c *MockContainerManager_GetAllocatableDevices_Call) RunAndReturn(run func() []*v10.ContainerDevices) *MockContainerManager_GetAllocatableDevices_Call { + _c.Call.Return(run) + return _c +} + +// GetAllocatableMemory provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetAllocatableMemory() []*v10.ContainerMemory { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetAllocatableMemory") + } + + var r0 []*v10.ContainerMemory + if returnFunc, ok := ret.Get(0).(func() []*v10.ContainerMemory); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v10.ContainerMemory) + } + } + return r0 +} + +// MockContainerManager_GetAllocatableMemory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllocatableMemory' +type MockContainerManager_GetAllocatableMemory_Call struct { + *mock.Call +} + +// GetAllocatableMemory is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) GetAllocatableMemory() *MockContainerManager_GetAllocatableMemory_Call { + return &MockContainerManager_GetAllocatableMemory_Call{Call: _e.mock.On("GetAllocatableMemory")} +} + +func (_c *MockContainerManager_GetAllocatableMemory_Call) Run(run func()) *MockContainerManager_GetAllocatableMemory_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_GetAllocatableMemory_Call) Return(containerMemorys []*v10.ContainerMemory) *MockContainerManager_GetAllocatableMemory_Call { + _c.Call.Return(containerMemorys) + return _c +} + +func (_c *MockContainerManager_GetAllocatableMemory_Call) RunAndReturn(run func() []*v10.ContainerMemory) *MockContainerManager_GetAllocatableMemory_Call { + _c.Call.Return(run) + return _c +} + +// GetAllocateResourcesPodAdmitHandler provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetAllocateResourcesPodAdmitHandler() lifecycle.PodAdmitHandler { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetAllocateResourcesPodAdmitHandler") + } + + var r0 lifecycle.PodAdmitHandler + if returnFunc, ok := ret.Get(0).(func() lifecycle.PodAdmitHandler); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(lifecycle.PodAdmitHandler) + } + } + return r0 +} + +// MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllocateResourcesPodAdmitHandler' +type MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call struct { + *mock.Call +} + +// GetAllocateResourcesPodAdmitHandler is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) GetAllocateResourcesPodAdmitHandler() *MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call { + return &MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call{Call: _e.mock.On("GetAllocateResourcesPodAdmitHandler")} +} + +func (_c *MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call) Run(run func()) *MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call) Return(podAdmitHandler lifecycle.PodAdmitHandler) *MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call { + _c.Call.Return(podAdmitHandler) + return _c +} + +func (_c *MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call) RunAndReturn(run func() lifecycle.PodAdmitHandler) *MockContainerManager_GetAllocateResourcesPodAdmitHandler_Call { + _c.Call.Return(run) + return _c +} + +// GetCPUs provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetCPUs(podUID string, containerName string) []int64 { + ret := _mock.Called(podUID, containerName) + + if len(ret) == 0 { + panic("no return value specified for GetCPUs") + } + + var r0 []int64 + if returnFunc, ok := ret.Get(0).(func(string, string) []int64); ok { + r0 = returnFunc(podUID, containerName) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]int64) + } + } + return r0 +} + +// MockContainerManager_GetCPUs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCPUs' +type MockContainerManager_GetCPUs_Call struct { + *mock.Call +} + +// GetCPUs is a helper method to define mock.On call +// - podUID string +// - containerName string +func (_e *MockContainerManager_Expecter) GetCPUs(podUID interface{}, containerName interface{}) *MockContainerManager_GetCPUs_Call { + return &MockContainerManager_GetCPUs_Call{Call: _e.mock.On("GetCPUs", podUID, containerName)} +} + +func (_c *MockContainerManager_GetCPUs_Call) Run(run func(podUID string, containerName string)) *MockContainerManager_GetCPUs_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockContainerManager_GetCPUs_Call) Return(int64s []int64) *MockContainerManager_GetCPUs_Call { + _c.Call.Return(int64s) + return _c +} + +func (_c *MockContainerManager_GetCPUs_Call) RunAndReturn(run func(podUID string, containerName string) []int64) *MockContainerManager_GetCPUs_Call { + _c.Call.Return(run) + return _c +} + +// GetCapacity provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetCapacity(localStorageCapacityIsolation bool) v1.ResourceList { + ret := _mock.Called(localStorageCapacityIsolation) + + if len(ret) == 0 { + panic("no return value specified for GetCapacity") + } + + var r0 v1.ResourceList + if returnFunc, ok := ret.Get(0).(func(bool) v1.ResourceList); ok { + r0 = returnFunc(localStorageCapacityIsolation) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.ResourceList) + } + } + return r0 +} + +// MockContainerManager_GetCapacity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCapacity' +type MockContainerManager_GetCapacity_Call struct { + *mock.Call +} + +// GetCapacity is a helper method to define mock.On call +// - localStorageCapacityIsolation bool +func (_e *MockContainerManager_Expecter) GetCapacity(localStorageCapacityIsolation interface{}) *MockContainerManager_GetCapacity_Call { + return &MockContainerManager_GetCapacity_Call{Call: _e.mock.On("GetCapacity", localStorageCapacityIsolation)} +} + +func (_c *MockContainerManager_GetCapacity_Call) Run(run func(localStorageCapacityIsolation bool)) *MockContainerManager_GetCapacity_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 bool + if args[0] != nil { + arg0 = args[0].(bool) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockContainerManager_GetCapacity_Call) Return(resourceList v1.ResourceList) *MockContainerManager_GetCapacity_Call { + _c.Call.Return(resourceList) + return _c +} + +func (_c *MockContainerManager_GetCapacity_Call) RunAndReturn(run func(localStorageCapacityIsolation bool) v1.ResourceList) *MockContainerManager_GetCapacity_Call { + _c.Call.Return(run) + return _c +} + +// GetDevicePluginResourceCapacity provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetDevicePluginResourceCapacity() (v1.ResourceList, v1.ResourceList, []string) { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetDevicePluginResourceCapacity") + } + + var r0 v1.ResourceList + var r1 v1.ResourceList + var r2 []string + if returnFunc, ok := ret.Get(0).(func() (v1.ResourceList, v1.ResourceList, []string)); ok { + return returnFunc() + } + if returnFunc, ok := ret.Get(0).(func() v1.ResourceList); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.ResourceList) + } + } + if returnFunc, ok := ret.Get(1).(func() v1.ResourceList); ok { + r1 = returnFunc() + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(v1.ResourceList) + } + } + if returnFunc, ok := ret.Get(2).(func() []string); ok { + r2 = returnFunc() + } else { + if ret.Get(2) != nil { + r2 = ret.Get(2).([]string) + } + } + return r0, r1, r2 +} + +// MockContainerManager_GetDevicePluginResourceCapacity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDevicePluginResourceCapacity' +type MockContainerManager_GetDevicePluginResourceCapacity_Call struct { + *mock.Call +} + +// GetDevicePluginResourceCapacity is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) GetDevicePluginResourceCapacity() *MockContainerManager_GetDevicePluginResourceCapacity_Call { + return &MockContainerManager_GetDevicePluginResourceCapacity_Call{Call: _e.mock.On("GetDevicePluginResourceCapacity")} +} + +func (_c *MockContainerManager_GetDevicePluginResourceCapacity_Call) Run(run func()) *MockContainerManager_GetDevicePluginResourceCapacity_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_GetDevicePluginResourceCapacity_Call) Return(resourceList v1.ResourceList, resourceList1 v1.ResourceList, strings []string) *MockContainerManager_GetDevicePluginResourceCapacity_Call { + _c.Call.Return(resourceList, resourceList1, strings) + return _c +} + +func (_c *MockContainerManager_GetDevicePluginResourceCapacity_Call) RunAndReturn(run func() (v1.ResourceList, v1.ResourceList, []string)) *MockContainerManager_GetDevicePluginResourceCapacity_Call { + _c.Call.Return(run) + return _c +} + +// GetDevices provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetDevices(podUID string, containerName string) []*v10.ContainerDevices { + ret := _mock.Called(podUID, containerName) + + if len(ret) == 0 { + panic("no return value specified for GetDevices") + } + + var r0 []*v10.ContainerDevices + if returnFunc, ok := ret.Get(0).(func(string, string) []*v10.ContainerDevices); ok { + r0 = returnFunc(podUID, containerName) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v10.ContainerDevices) + } + } + return r0 +} + +// MockContainerManager_GetDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDevices' +type MockContainerManager_GetDevices_Call struct { + *mock.Call +} + +// GetDevices is a helper method to define mock.On call +// - podUID string +// - containerName string +func (_e *MockContainerManager_Expecter) GetDevices(podUID interface{}, containerName interface{}) *MockContainerManager_GetDevices_Call { + return &MockContainerManager_GetDevices_Call{Call: _e.mock.On("GetDevices", podUID, containerName)} +} + +func (_c *MockContainerManager_GetDevices_Call) Run(run func(podUID string, containerName string)) *MockContainerManager_GetDevices_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockContainerManager_GetDevices_Call) Return(containerDevicess []*v10.ContainerDevices) *MockContainerManager_GetDevices_Call { + _c.Call.Return(containerDevicess) + return _c +} + +func (_c *MockContainerManager_GetDevices_Call) RunAndReturn(run func(podUID string, containerName string) []*v10.ContainerDevices) *MockContainerManager_GetDevices_Call { + _c.Call.Return(run) + return _c +} + +// GetDynamicResources provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetDynamicResources(pod *v1.Pod, container *v1.Container) []*v10.DynamicResource { + ret := _mock.Called(pod, container) + + if len(ret) == 0 { + panic("no return value specified for GetDynamicResources") + } + + var r0 []*v10.DynamicResource + if returnFunc, ok := ret.Get(0).(func(*v1.Pod, *v1.Container) []*v10.DynamicResource); ok { + r0 = returnFunc(pod, container) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v10.DynamicResource) + } + } + return r0 +} + +// MockContainerManager_GetDynamicResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDynamicResources' +type MockContainerManager_GetDynamicResources_Call struct { + *mock.Call +} + +// GetDynamicResources is a helper method to define mock.On call +// - pod *v1.Pod +// - container *v1.Container +func (_e *MockContainerManager_Expecter) GetDynamicResources(pod interface{}, container interface{}) *MockContainerManager_GetDynamicResources_Call { + return &MockContainerManager_GetDynamicResources_Call{Call: _e.mock.On("GetDynamicResources", pod, container)} +} + +func (_c *MockContainerManager_GetDynamicResources_Call) Run(run func(pod *v1.Pod, container *v1.Container)) *MockContainerManager_GetDynamicResources_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + var arg1 *v1.Container + if args[1] != nil { + arg1 = args[1].(*v1.Container) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockContainerManager_GetDynamicResources_Call) Return(dynamicResources []*v10.DynamicResource) *MockContainerManager_GetDynamicResources_Call { + _c.Call.Return(dynamicResources) + return _c +} + +func (_c *MockContainerManager_GetDynamicResources_Call) RunAndReturn(run func(pod *v1.Pod, container *v1.Container) []*v10.DynamicResource) *MockContainerManager_GetDynamicResources_Call { + _c.Call.Return(run) + return _c +} + +// GetHealthCheckers provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetHealthCheckers() []healthz.HealthChecker { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetHealthCheckers") + } + + var r0 []healthz.HealthChecker + if returnFunc, ok := ret.Get(0).(func() []healthz.HealthChecker); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]healthz.HealthChecker) + } + } + return r0 +} + +// MockContainerManager_GetHealthCheckers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHealthCheckers' +type MockContainerManager_GetHealthCheckers_Call struct { + *mock.Call +} + +// GetHealthCheckers is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) GetHealthCheckers() *MockContainerManager_GetHealthCheckers_Call { + return &MockContainerManager_GetHealthCheckers_Call{Call: _e.mock.On("GetHealthCheckers")} +} + +func (_c *MockContainerManager_GetHealthCheckers_Call) Run(run func()) *MockContainerManager_GetHealthCheckers_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_GetHealthCheckers_Call) Return(healthCheckers []healthz.HealthChecker) *MockContainerManager_GetHealthCheckers_Call { + _c.Call.Return(healthCheckers) + return _c +} + +func (_c *MockContainerManager_GetHealthCheckers_Call) RunAndReturn(run func() []healthz.HealthChecker) *MockContainerManager_GetHealthCheckers_Call { + _c.Call.Return(run) + return _c +} + +// GetMemory provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetMemory(podUID string, containerName string) []*v10.ContainerMemory { + ret := _mock.Called(podUID, containerName) + + if len(ret) == 0 { + panic("no return value specified for GetMemory") + } + + var r0 []*v10.ContainerMemory + if returnFunc, ok := ret.Get(0).(func(string, string) []*v10.ContainerMemory); ok { + r0 = returnFunc(podUID, containerName) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v10.ContainerMemory) + } + } + return r0 +} + +// MockContainerManager_GetMemory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMemory' +type MockContainerManager_GetMemory_Call struct { + *mock.Call +} + +// GetMemory is a helper method to define mock.On call +// - podUID string +// - containerName string +func (_e *MockContainerManager_Expecter) GetMemory(podUID interface{}, containerName interface{}) *MockContainerManager_GetMemory_Call { + return &MockContainerManager_GetMemory_Call{Call: _e.mock.On("GetMemory", podUID, containerName)} +} + +func (_c *MockContainerManager_GetMemory_Call) Run(run func(podUID string, containerName string)) *MockContainerManager_GetMemory_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockContainerManager_GetMemory_Call) Return(containerMemorys []*v10.ContainerMemory) *MockContainerManager_GetMemory_Call { + _c.Call.Return(containerMemorys) + return _c +} + +func (_c *MockContainerManager_GetMemory_Call) RunAndReturn(run func(podUID string, containerName string) []*v10.ContainerMemory) *MockContainerManager_GetMemory_Call { + _c.Call.Return(run) + return _c +} + +// GetMountedSubsystems provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetMountedSubsystems() *cm.CgroupSubsystems { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetMountedSubsystems") + } + + var r0 *cm.CgroupSubsystems + if returnFunc, ok := ret.Get(0).(func() *cm.CgroupSubsystems); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cm.CgroupSubsystems) + } + } + return r0 +} + +// MockContainerManager_GetMountedSubsystems_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMountedSubsystems' +type MockContainerManager_GetMountedSubsystems_Call struct { + *mock.Call +} + +// GetMountedSubsystems is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) GetMountedSubsystems() *MockContainerManager_GetMountedSubsystems_Call { + return &MockContainerManager_GetMountedSubsystems_Call{Call: _e.mock.On("GetMountedSubsystems")} +} + +func (_c *MockContainerManager_GetMountedSubsystems_Call) Run(run func()) *MockContainerManager_GetMountedSubsystems_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_GetMountedSubsystems_Call) Return(cgroupSubsystems *cm.CgroupSubsystems) *MockContainerManager_GetMountedSubsystems_Call { + _c.Call.Return(cgroupSubsystems) + return _c +} + +func (_c *MockContainerManager_GetMountedSubsystems_Call) RunAndReturn(run func() *cm.CgroupSubsystems) *MockContainerManager_GetMountedSubsystems_Call { + _c.Call.Return(run) + return _c +} + +// GetNodeAllocatableAbsolute provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetNodeAllocatableAbsolute() v1.ResourceList { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetNodeAllocatableAbsolute") + } + + var r0 v1.ResourceList + if returnFunc, ok := ret.Get(0).(func() v1.ResourceList); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.ResourceList) + } + } + return r0 +} + +// MockContainerManager_GetNodeAllocatableAbsolute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNodeAllocatableAbsolute' +type MockContainerManager_GetNodeAllocatableAbsolute_Call struct { + *mock.Call +} + +// GetNodeAllocatableAbsolute is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) GetNodeAllocatableAbsolute() *MockContainerManager_GetNodeAllocatableAbsolute_Call { + return &MockContainerManager_GetNodeAllocatableAbsolute_Call{Call: _e.mock.On("GetNodeAllocatableAbsolute")} +} + +func (_c *MockContainerManager_GetNodeAllocatableAbsolute_Call) Run(run func()) *MockContainerManager_GetNodeAllocatableAbsolute_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_GetNodeAllocatableAbsolute_Call) Return(resourceList v1.ResourceList) *MockContainerManager_GetNodeAllocatableAbsolute_Call { + _c.Call.Return(resourceList) + return _c +} + +func (_c *MockContainerManager_GetNodeAllocatableAbsolute_Call) RunAndReturn(run func() v1.ResourceList) *MockContainerManager_GetNodeAllocatableAbsolute_Call { + _c.Call.Return(run) + return _c +} + +// GetNodeAllocatableReservation provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetNodeAllocatableReservation() v1.ResourceList { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetNodeAllocatableReservation") + } + + var r0 v1.ResourceList + if returnFunc, ok := ret.Get(0).(func() v1.ResourceList); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.ResourceList) + } + } + return r0 +} + +// MockContainerManager_GetNodeAllocatableReservation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNodeAllocatableReservation' +type MockContainerManager_GetNodeAllocatableReservation_Call struct { + *mock.Call +} + +// GetNodeAllocatableReservation is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) GetNodeAllocatableReservation() *MockContainerManager_GetNodeAllocatableReservation_Call { + return &MockContainerManager_GetNodeAllocatableReservation_Call{Call: _e.mock.On("GetNodeAllocatableReservation")} +} + +func (_c *MockContainerManager_GetNodeAllocatableReservation_Call) Run(run func()) *MockContainerManager_GetNodeAllocatableReservation_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_GetNodeAllocatableReservation_Call) Return(resourceList v1.ResourceList) *MockContainerManager_GetNodeAllocatableReservation_Call { + _c.Call.Return(resourceList) + return _c +} + +func (_c *MockContainerManager_GetNodeAllocatableReservation_Call) RunAndReturn(run func() v1.ResourceList) *MockContainerManager_GetNodeAllocatableReservation_Call { + _c.Call.Return(run) + return _c +} + +// GetNodeConfig provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetNodeConfig() cm.NodeConfig { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetNodeConfig") + } + + var r0 cm.NodeConfig + if returnFunc, ok := ret.Get(0).(func() cm.NodeConfig); ok { + r0 = returnFunc() + } else { + r0 = ret.Get(0).(cm.NodeConfig) + } + return r0 +} + +// MockContainerManager_GetNodeConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNodeConfig' +type MockContainerManager_GetNodeConfig_Call struct { + *mock.Call +} + +// GetNodeConfig is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) GetNodeConfig() *MockContainerManager_GetNodeConfig_Call { + return &MockContainerManager_GetNodeConfig_Call{Call: _e.mock.On("GetNodeConfig")} +} + +func (_c *MockContainerManager_GetNodeConfig_Call) Run(run func()) *MockContainerManager_GetNodeConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_GetNodeConfig_Call) Return(nodeConfig cm.NodeConfig) *MockContainerManager_GetNodeConfig_Call { + _c.Call.Return(nodeConfig) + return _c +} + +func (_c *MockContainerManager_GetNodeConfig_Call) RunAndReturn(run func() cm.NodeConfig) *MockContainerManager_GetNodeConfig_Call { + _c.Call.Return(run) + return _c +} + +// GetPluginRegistrationHandlers provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetPluginRegistrationHandlers() map[string]cache.PluginHandler { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetPluginRegistrationHandlers") + } + + var r0 map[string]cache.PluginHandler + if returnFunc, ok := ret.Get(0).(func() map[string]cache.PluginHandler); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]cache.PluginHandler) + } + } + return r0 +} + +// MockContainerManager_GetPluginRegistrationHandlers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPluginRegistrationHandlers' +type MockContainerManager_GetPluginRegistrationHandlers_Call struct { + *mock.Call +} + +// GetPluginRegistrationHandlers is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) GetPluginRegistrationHandlers() *MockContainerManager_GetPluginRegistrationHandlers_Call { + return &MockContainerManager_GetPluginRegistrationHandlers_Call{Call: _e.mock.On("GetPluginRegistrationHandlers")} +} + +func (_c *MockContainerManager_GetPluginRegistrationHandlers_Call) Run(run func()) *MockContainerManager_GetPluginRegistrationHandlers_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_GetPluginRegistrationHandlers_Call) Return(stringToPluginHandler map[string]cache.PluginHandler) *MockContainerManager_GetPluginRegistrationHandlers_Call { + _c.Call.Return(stringToPluginHandler) + return _c +} + +func (_c *MockContainerManager_GetPluginRegistrationHandlers_Call) RunAndReturn(run func() map[string]cache.PluginHandler) *MockContainerManager_GetPluginRegistrationHandlers_Call { + _c.Call.Return(run) + return _c +} + +// GetPodCgroupRoot provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetPodCgroupRoot() string { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetPodCgroupRoot") + } + + var r0 string + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() + } else { + r0 = ret.Get(0).(string) + } + return r0 +} + +// MockContainerManager_GetPodCgroupRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPodCgroupRoot' +type MockContainerManager_GetPodCgroupRoot_Call struct { + *mock.Call +} + +// GetPodCgroupRoot is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) GetPodCgroupRoot() *MockContainerManager_GetPodCgroupRoot_Call { + return &MockContainerManager_GetPodCgroupRoot_Call{Call: _e.mock.On("GetPodCgroupRoot")} +} + +func (_c *MockContainerManager_GetPodCgroupRoot_Call) Run(run func()) *MockContainerManager_GetPodCgroupRoot_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_GetPodCgroupRoot_Call) Return(s string) *MockContainerManager_GetPodCgroupRoot_Call { + _c.Call.Return(s) + return _c +} + +func (_c *MockContainerManager_GetPodCgroupRoot_Call) RunAndReturn(run func() string) *MockContainerManager_GetPodCgroupRoot_Call { + _c.Call.Return(run) + return _c +} + +// GetQOSContainersInfo provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetQOSContainersInfo() cm.QOSContainersInfo { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetQOSContainersInfo") + } + + var r0 cm.QOSContainersInfo + if returnFunc, ok := ret.Get(0).(func() cm.QOSContainersInfo); ok { + r0 = returnFunc() + } else { + r0 = ret.Get(0).(cm.QOSContainersInfo) + } + return r0 +} + +// MockContainerManager_GetQOSContainersInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQOSContainersInfo' +type MockContainerManager_GetQOSContainersInfo_Call struct { + *mock.Call +} + +// GetQOSContainersInfo is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) GetQOSContainersInfo() *MockContainerManager_GetQOSContainersInfo_Call { + return &MockContainerManager_GetQOSContainersInfo_Call{Call: _e.mock.On("GetQOSContainersInfo")} +} + +func (_c *MockContainerManager_GetQOSContainersInfo_Call) Run(run func()) *MockContainerManager_GetQOSContainersInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_GetQOSContainersInfo_Call) Return(qOSContainersInfo cm.QOSContainersInfo) *MockContainerManager_GetQOSContainersInfo_Call { + _c.Call.Return(qOSContainersInfo) + return _c +} + +func (_c *MockContainerManager_GetQOSContainersInfo_Call) RunAndReturn(run func() cm.QOSContainersInfo) *MockContainerManager_GetQOSContainersInfo_Call { + _c.Call.Return(run) + return _c +} + +// GetResources provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) GetResources(ctx context.Context, pod *v1.Pod, container1 *v1.Container) (*container.RunContainerOptions, error) { + ret := _mock.Called(ctx, pod, container1) + + if len(ret) == 0 { + panic("no return value specified for GetResources") + } + + var r0 *container.RunContainerOptions + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.Pod, *v1.Container) (*container.RunContainerOptions, error)); ok { + return returnFunc(ctx, pod, container1) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.Pod, *v1.Container) *container.RunContainerOptions); ok { + r0 = returnFunc(ctx, pod, container1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*container.RunContainerOptions) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *v1.Pod, *v1.Container) error); ok { + r1 = returnFunc(ctx, pod, container1) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockContainerManager_GetResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetResources' +type MockContainerManager_GetResources_Call struct { + *mock.Call +} + +// GetResources is a helper method to define mock.On call +// - ctx context.Context +// - pod *v1.Pod +// - container1 *v1.Container +func (_e *MockContainerManager_Expecter) GetResources(ctx interface{}, pod interface{}, container1 interface{}) *MockContainerManager_GetResources_Call { + return &MockContainerManager_GetResources_Call{Call: _e.mock.On("GetResources", ctx, pod, container1)} +} + +func (_c *MockContainerManager_GetResources_Call) Run(run func(ctx context.Context, pod *v1.Pod, container1 *v1.Container)) *MockContainerManager_GetResources_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v1.Pod + if args[1] != nil { + arg1 = args[1].(*v1.Pod) + } + var arg2 *v1.Container + if args[2] != nil { + arg2 = args[2].(*v1.Container) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockContainerManager_GetResources_Call) Return(runContainerOptions *container.RunContainerOptions, err error) *MockContainerManager_GetResources_Call { + _c.Call.Return(runContainerOptions, err) + return _c +} + +func (_c *MockContainerManager_GetResources_Call) RunAndReturn(run func(ctx context.Context, pod *v1.Pod, container1 *v1.Container) (*container.RunContainerOptions, error)) *MockContainerManager_GetResources_Call { + _c.Call.Return(run) + return _c +} + +// InternalContainerLifecycle provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) InternalContainerLifecycle() cm.InternalContainerLifecycle { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for InternalContainerLifecycle") + } + + var r0 cm.InternalContainerLifecycle + if returnFunc, ok := ret.Get(0).(func() cm.InternalContainerLifecycle); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(cm.InternalContainerLifecycle) + } + } + return r0 +} + +// MockContainerManager_InternalContainerLifecycle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InternalContainerLifecycle' +type MockContainerManager_InternalContainerLifecycle_Call struct { + *mock.Call +} + +// InternalContainerLifecycle is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) InternalContainerLifecycle() *MockContainerManager_InternalContainerLifecycle_Call { + return &MockContainerManager_InternalContainerLifecycle_Call{Call: _e.mock.On("InternalContainerLifecycle")} +} + +func (_c *MockContainerManager_InternalContainerLifecycle_Call) Run(run func()) *MockContainerManager_InternalContainerLifecycle_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_InternalContainerLifecycle_Call) Return(internalContainerLifecycle cm.InternalContainerLifecycle) *MockContainerManager_InternalContainerLifecycle_Call { + _c.Call.Return(internalContainerLifecycle) + return _c +} + +func (_c *MockContainerManager_InternalContainerLifecycle_Call) RunAndReturn(run func() cm.InternalContainerLifecycle) *MockContainerManager_InternalContainerLifecycle_Call { + _c.Call.Return(run) + return _c +} + +// NewPodContainerManager provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) NewPodContainerManager() cm.PodContainerManager { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for NewPodContainerManager") + } + + var r0 cm.PodContainerManager + if returnFunc, ok := ret.Get(0).(func() cm.PodContainerManager); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(cm.PodContainerManager) + } + } + return r0 +} + +// MockContainerManager_NewPodContainerManager_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewPodContainerManager' +type MockContainerManager_NewPodContainerManager_Call struct { + *mock.Call +} + +// NewPodContainerManager is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) NewPodContainerManager() *MockContainerManager_NewPodContainerManager_Call { + return &MockContainerManager_NewPodContainerManager_Call{Call: _e.mock.On("NewPodContainerManager")} +} + +func (_c *MockContainerManager_NewPodContainerManager_Call) Run(run func()) *MockContainerManager_NewPodContainerManager_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_NewPodContainerManager_Call) Return(podContainerManager cm.PodContainerManager) *MockContainerManager_NewPodContainerManager_Call { + _c.Call.Return(podContainerManager) + return _c +} + +func (_c *MockContainerManager_NewPodContainerManager_Call) RunAndReturn(run func() cm.PodContainerManager) *MockContainerManager_NewPodContainerManager_Call { + _c.Call.Return(run) + return _c +} + +// PodHasExclusiveCPUs provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) PodHasExclusiveCPUs(pod *v1.Pod) bool { + ret := _mock.Called(pod) + + if len(ret) == 0 { + panic("no return value specified for PodHasExclusiveCPUs") + } + + var r0 bool + if returnFunc, ok := ret.Get(0).(func(*v1.Pod) bool); ok { + r0 = returnFunc(pod) + } else { + r0 = ret.Get(0).(bool) + } + return r0 +} + +// MockContainerManager_PodHasExclusiveCPUs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PodHasExclusiveCPUs' +type MockContainerManager_PodHasExclusiveCPUs_Call struct { + *mock.Call +} + +// PodHasExclusiveCPUs is a helper method to define mock.On call +// - pod *v1.Pod +func (_e *MockContainerManager_Expecter) PodHasExclusiveCPUs(pod interface{}) *MockContainerManager_PodHasExclusiveCPUs_Call { + return &MockContainerManager_PodHasExclusiveCPUs_Call{Call: _e.mock.On("PodHasExclusiveCPUs", pod)} +} + +func (_c *MockContainerManager_PodHasExclusiveCPUs_Call) Run(run func(pod *v1.Pod)) *MockContainerManager_PodHasExclusiveCPUs_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockContainerManager_PodHasExclusiveCPUs_Call) Return(b bool) *MockContainerManager_PodHasExclusiveCPUs_Call { + _c.Call.Return(b) + return _c +} + +func (_c *MockContainerManager_PodHasExclusiveCPUs_Call) RunAndReturn(run func(pod *v1.Pod) bool) *MockContainerManager_PodHasExclusiveCPUs_Call { + _c.Call.Return(run) + return _c +} + +// PodMightNeedToUnprepareResources provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) PodMightNeedToUnprepareResources(UID types.UID) bool { + ret := _mock.Called(UID) + + if len(ret) == 0 { + panic("no return value specified for PodMightNeedToUnprepareResources") + } + + var r0 bool + if returnFunc, ok := ret.Get(0).(func(types.UID) bool); ok { + r0 = returnFunc(UID) + } else { + r0 = ret.Get(0).(bool) + } + return r0 +} + +// MockContainerManager_PodMightNeedToUnprepareResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PodMightNeedToUnprepareResources' +type MockContainerManager_PodMightNeedToUnprepareResources_Call struct { + *mock.Call +} + +// PodMightNeedToUnprepareResources is a helper method to define mock.On call +// - UID types.UID +func (_e *MockContainerManager_Expecter) PodMightNeedToUnprepareResources(UID interface{}) *MockContainerManager_PodMightNeedToUnprepareResources_Call { + return &MockContainerManager_PodMightNeedToUnprepareResources_Call{Call: _e.mock.On("PodMightNeedToUnprepareResources", UID)} +} + +func (_c *MockContainerManager_PodMightNeedToUnprepareResources_Call) Run(run func(UID types.UID)) *MockContainerManager_PodMightNeedToUnprepareResources_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 types.UID + if args[0] != nil { + arg0 = args[0].(types.UID) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockContainerManager_PodMightNeedToUnprepareResources_Call) Return(b bool) *MockContainerManager_PodMightNeedToUnprepareResources_Call { + _c.Call.Return(b) + return _c +} + +func (_c *MockContainerManager_PodMightNeedToUnprepareResources_Call) RunAndReturn(run func(UID types.UID) bool) *MockContainerManager_PodMightNeedToUnprepareResources_Call { + _c.Call.Return(run) + return _c +} + +// PrepareDynamicResources provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) PrepareDynamicResources(context1 context.Context, pod *v1.Pod) error { + ret := _mock.Called(context1, pod) + + if len(ret) == 0 { + panic("no return value specified for PrepareDynamicResources") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.Pod) error); ok { + r0 = returnFunc(context1, pod) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockContainerManager_PrepareDynamicResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrepareDynamicResources' +type MockContainerManager_PrepareDynamicResources_Call struct { + *mock.Call +} + +// PrepareDynamicResources is a helper method to define mock.On call +// - context1 context.Context +// - pod *v1.Pod +func (_e *MockContainerManager_Expecter) PrepareDynamicResources(context1 interface{}, pod interface{}) *MockContainerManager_PrepareDynamicResources_Call { + return &MockContainerManager_PrepareDynamicResources_Call{Call: _e.mock.On("PrepareDynamicResources", context1, pod)} +} + +func (_c *MockContainerManager_PrepareDynamicResources_Call) Run(run func(context1 context.Context, pod *v1.Pod)) *MockContainerManager_PrepareDynamicResources_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v1.Pod + if args[1] != nil { + arg1 = args[1].(*v1.Pod) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockContainerManager_PrepareDynamicResources_Call) Return(err error) *MockContainerManager_PrepareDynamicResources_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockContainerManager_PrepareDynamicResources_Call) RunAndReturn(run func(context1 context.Context, pod *v1.Pod) error) *MockContainerManager_PrepareDynamicResources_Call { + _c.Call.Return(run) + return _c +} + +// ShouldResetExtendedResourceCapacity provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) ShouldResetExtendedResourceCapacity() bool { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for ShouldResetExtendedResourceCapacity") + } + + var r0 bool + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() + } else { + r0 = ret.Get(0).(bool) + } + return r0 +} + +// MockContainerManager_ShouldResetExtendedResourceCapacity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShouldResetExtendedResourceCapacity' +type MockContainerManager_ShouldResetExtendedResourceCapacity_Call struct { + *mock.Call +} + +// ShouldResetExtendedResourceCapacity is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) ShouldResetExtendedResourceCapacity() *MockContainerManager_ShouldResetExtendedResourceCapacity_Call { + return &MockContainerManager_ShouldResetExtendedResourceCapacity_Call{Call: _e.mock.On("ShouldResetExtendedResourceCapacity")} +} + +func (_c *MockContainerManager_ShouldResetExtendedResourceCapacity_Call) Run(run func()) *MockContainerManager_ShouldResetExtendedResourceCapacity_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_ShouldResetExtendedResourceCapacity_Call) Return(b bool) *MockContainerManager_ShouldResetExtendedResourceCapacity_Call { + _c.Call.Return(b) + return _c +} + +func (_c *MockContainerManager_ShouldResetExtendedResourceCapacity_Call) RunAndReturn(run func() bool) *MockContainerManager_ShouldResetExtendedResourceCapacity_Call { + _c.Call.Return(run) + return _c +} + +// Start provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) Start(context1 context.Context, node *v1.Node, activePodsFunc cm.ActivePodsFunc, getNodeFunc cm.GetNodeFunc, sourcesReady config.SourcesReady, podStatusProvider status.PodStatusProvider, runtimeService cri.RuntimeService, b bool) error { + ret := _mock.Called(context1, node, activePodsFunc, getNodeFunc, sourcesReady, podStatusProvider, runtimeService, b) + + if len(ret) == 0 { + panic("no return value specified for Start") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.Node, cm.ActivePodsFunc, cm.GetNodeFunc, config.SourcesReady, status.PodStatusProvider, cri.RuntimeService, bool) error); ok { + r0 = returnFunc(context1, node, activePodsFunc, getNodeFunc, sourcesReady, podStatusProvider, runtimeService, b) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockContainerManager_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type MockContainerManager_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - context1 context.Context +// - node *v1.Node +// - activePodsFunc cm.ActivePodsFunc +// - getNodeFunc cm.GetNodeFunc +// - sourcesReady config.SourcesReady +// - podStatusProvider status.PodStatusProvider +// - runtimeService cri.RuntimeService +// - b bool +func (_e *MockContainerManager_Expecter) Start(context1 interface{}, node interface{}, activePodsFunc interface{}, getNodeFunc interface{}, sourcesReady interface{}, podStatusProvider interface{}, runtimeService interface{}, b interface{}) *MockContainerManager_Start_Call { + return &MockContainerManager_Start_Call{Call: _e.mock.On("Start", context1, node, activePodsFunc, getNodeFunc, sourcesReady, podStatusProvider, runtimeService, b)} +} + +func (_c *MockContainerManager_Start_Call) Run(run func(context1 context.Context, node *v1.Node, activePodsFunc cm.ActivePodsFunc, getNodeFunc cm.GetNodeFunc, sourcesReady config.SourcesReady, podStatusProvider status.PodStatusProvider, runtimeService cri.RuntimeService, b bool)) *MockContainerManager_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v1.Node + if args[1] != nil { + arg1 = args[1].(*v1.Node) + } + var arg2 cm.ActivePodsFunc + if args[2] != nil { + arg2 = args[2].(cm.ActivePodsFunc) + } + var arg3 cm.GetNodeFunc + if args[3] != nil { + arg3 = args[3].(cm.GetNodeFunc) + } + var arg4 config.SourcesReady + if args[4] != nil { + arg4 = args[4].(config.SourcesReady) + } + var arg5 status.PodStatusProvider + if args[5] != nil { + arg5 = args[5].(status.PodStatusProvider) + } + var arg6 cri.RuntimeService + if args[6] != nil { + arg6 = args[6].(cri.RuntimeService) + } + var arg7 bool + if args[7] != nil { + arg7 = args[7].(bool) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + arg7, + ) + }) + return _c +} + +func (_c *MockContainerManager_Start_Call) Return(err error) *MockContainerManager_Start_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockContainerManager_Start_Call) RunAndReturn(run func(context1 context.Context, node *v1.Node, activePodsFunc cm.ActivePodsFunc, getNodeFunc cm.GetNodeFunc, sourcesReady config.SourcesReady, podStatusProvider status.PodStatusProvider, runtimeService cri.RuntimeService, b bool) error) *MockContainerManager_Start_Call { + _c.Call.Return(run) + return _c +} + +// Status provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) Status() cm.Status { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for Status") + } + + var r0 cm.Status + if returnFunc, ok := ret.Get(0).(func() cm.Status); ok { + r0 = returnFunc() + } else { + r0 = ret.Get(0).(cm.Status) + } + return r0 +} + +// MockContainerManager_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status' +type MockContainerManager_Status_Call struct { + *mock.Call +} + +// Status is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) Status() *MockContainerManager_Status_Call { + return &MockContainerManager_Status_Call{Call: _e.mock.On("Status")} +} + +func (_c *MockContainerManager_Status_Call) Run(run func()) *MockContainerManager_Status_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_Status_Call) Return(status1 cm.Status) *MockContainerManager_Status_Call { + _c.Call.Return(status1) + return _c +} + +func (_c *MockContainerManager_Status_Call) RunAndReturn(run func() cm.Status) *MockContainerManager_Status_Call { + _c.Call.Return(run) + return _c +} + +// SystemCgroupsLimit provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) SystemCgroupsLimit() v1.ResourceList { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for SystemCgroupsLimit") + } + + var r0 v1.ResourceList + if returnFunc, ok := ret.Get(0).(func() v1.ResourceList); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.ResourceList) + } + } + return r0 +} + +// MockContainerManager_SystemCgroupsLimit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SystemCgroupsLimit' +type MockContainerManager_SystemCgroupsLimit_Call struct { + *mock.Call +} + +// SystemCgroupsLimit is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) SystemCgroupsLimit() *MockContainerManager_SystemCgroupsLimit_Call { + return &MockContainerManager_SystemCgroupsLimit_Call{Call: _e.mock.On("SystemCgroupsLimit")} +} + +func (_c *MockContainerManager_SystemCgroupsLimit_Call) Run(run func()) *MockContainerManager_SystemCgroupsLimit_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_SystemCgroupsLimit_Call) Return(resourceList v1.ResourceList) *MockContainerManager_SystemCgroupsLimit_Call { + _c.Call.Return(resourceList) + return _c +} + +func (_c *MockContainerManager_SystemCgroupsLimit_Call) RunAndReturn(run func() v1.ResourceList) *MockContainerManager_SystemCgroupsLimit_Call { + _c.Call.Return(run) + return _c +} + +// UnprepareDynamicResources provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) UnprepareDynamicResources(context1 context.Context, pod *v1.Pod) error { + ret := _mock.Called(context1, pod) + + if len(ret) == 0 { + panic("no return value specified for UnprepareDynamicResources") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.Pod) error); ok { + r0 = returnFunc(context1, pod) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockContainerManager_UnprepareDynamicResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnprepareDynamicResources' +type MockContainerManager_UnprepareDynamicResources_Call struct { + *mock.Call +} + +// UnprepareDynamicResources is a helper method to define mock.On call +// - context1 context.Context +// - pod *v1.Pod +func (_e *MockContainerManager_Expecter) UnprepareDynamicResources(context1 interface{}, pod interface{}) *MockContainerManager_UnprepareDynamicResources_Call { + return &MockContainerManager_UnprepareDynamicResources_Call{Call: _e.mock.On("UnprepareDynamicResources", context1, pod)} +} + +func (_c *MockContainerManager_UnprepareDynamicResources_Call) Run(run func(context1 context.Context, pod *v1.Pod)) *MockContainerManager_UnprepareDynamicResources_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v1.Pod + if args[1] != nil { + arg1 = args[1].(*v1.Pod) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockContainerManager_UnprepareDynamicResources_Call) Return(err error) *MockContainerManager_UnprepareDynamicResources_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockContainerManager_UnprepareDynamicResources_Call) RunAndReturn(run func(context1 context.Context, pod *v1.Pod) error) *MockContainerManager_UnprepareDynamicResources_Call { + _c.Call.Return(run) + return _c +} + +// UpdateAllocatedDevices provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) UpdateAllocatedDevices() { + _mock.Called() + return +} + +// MockContainerManager_UpdateAllocatedDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAllocatedDevices' +type MockContainerManager_UpdateAllocatedDevices_Call struct { + *mock.Call +} + +// UpdateAllocatedDevices is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) UpdateAllocatedDevices() *MockContainerManager_UpdateAllocatedDevices_Call { + return &MockContainerManager_UpdateAllocatedDevices_Call{Call: _e.mock.On("UpdateAllocatedDevices")} +} + +func (_c *MockContainerManager_UpdateAllocatedDevices_Call) Run(run func()) *MockContainerManager_UpdateAllocatedDevices_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_UpdateAllocatedDevices_Call) Return() *MockContainerManager_UpdateAllocatedDevices_Call { + _c.Call.Return() + return _c +} + +func (_c *MockContainerManager_UpdateAllocatedDevices_Call) RunAndReturn(run func()) *MockContainerManager_UpdateAllocatedDevices_Call { + _c.Run(run) + return _c +} + +// UpdateAllocatedResourcesStatus provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) UpdateAllocatedResourcesStatus(pod *v1.Pod, status1 *v1.PodStatus) { + _mock.Called(pod, status1) + return +} + +// MockContainerManager_UpdateAllocatedResourcesStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAllocatedResourcesStatus' +type MockContainerManager_UpdateAllocatedResourcesStatus_Call struct { + *mock.Call +} + +// UpdateAllocatedResourcesStatus is a helper method to define mock.On call +// - pod *v1.Pod +// - status1 *v1.PodStatus +func (_e *MockContainerManager_Expecter) UpdateAllocatedResourcesStatus(pod interface{}, status1 interface{}) *MockContainerManager_UpdateAllocatedResourcesStatus_Call { + return &MockContainerManager_UpdateAllocatedResourcesStatus_Call{Call: _e.mock.On("UpdateAllocatedResourcesStatus", pod, status1)} +} + +func (_c *MockContainerManager_UpdateAllocatedResourcesStatus_Call) Run(run func(pod *v1.Pod, status1 *v1.PodStatus)) *MockContainerManager_UpdateAllocatedResourcesStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + var arg1 *v1.PodStatus + if args[1] != nil { + arg1 = args[1].(*v1.PodStatus) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockContainerManager_UpdateAllocatedResourcesStatus_Call) Return() *MockContainerManager_UpdateAllocatedResourcesStatus_Call { + _c.Call.Return() + return _c +} + +func (_c *MockContainerManager_UpdateAllocatedResourcesStatus_Call) RunAndReturn(run func(pod *v1.Pod, status1 *v1.PodStatus)) *MockContainerManager_UpdateAllocatedResourcesStatus_Call { + _c.Run(run) + return _c +} + +// UpdatePluginResources provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) UpdatePluginResources(nodeInfo *framework.NodeInfo, podAdmitAttributes *lifecycle.PodAdmitAttributes) error { + ret := _mock.Called(nodeInfo, podAdmitAttributes) + + if len(ret) == 0 { + panic("no return value specified for UpdatePluginResources") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(*framework.NodeInfo, *lifecycle.PodAdmitAttributes) error); ok { + r0 = returnFunc(nodeInfo, podAdmitAttributes) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockContainerManager_UpdatePluginResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePluginResources' +type MockContainerManager_UpdatePluginResources_Call struct { + *mock.Call +} + +// UpdatePluginResources is a helper method to define mock.On call +// - nodeInfo *framework.NodeInfo +// - podAdmitAttributes *lifecycle.PodAdmitAttributes +func (_e *MockContainerManager_Expecter) UpdatePluginResources(nodeInfo interface{}, podAdmitAttributes interface{}) *MockContainerManager_UpdatePluginResources_Call { + return &MockContainerManager_UpdatePluginResources_Call{Call: _e.mock.On("UpdatePluginResources", nodeInfo, podAdmitAttributes)} +} + +func (_c *MockContainerManager_UpdatePluginResources_Call) Run(run func(nodeInfo *framework.NodeInfo, podAdmitAttributes *lifecycle.PodAdmitAttributes)) *MockContainerManager_UpdatePluginResources_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *framework.NodeInfo + if args[0] != nil { + arg0 = args[0].(*framework.NodeInfo) + } + var arg1 *lifecycle.PodAdmitAttributes + if args[1] != nil { + arg1 = args[1].(*lifecycle.PodAdmitAttributes) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockContainerManager_UpdatePluginResources_Call) Return(err error) *MockContainerManager_UpdatePluginResources_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockContainerManager_UpdatePluginResources_Call) RunAndReturn(run func(nodeInfo *framework.NodeInfo, podAdmitAttributes *lifecycle.PodAdmitAttributes) error) *MockContainerManager_UpdatePluginResources_Call { + _c.Call.Return(run) + return _c +} + +// UpdateQOSCgroups provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) UpdateQOSCgroups() error { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for UpdateQOSCgroups") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockContainerManager_UpdateQOSCgroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateQOSCgroups' +type MockContainerManager_UpdateQOSCgroups_Call struct { + *mock.Call +} + +// UpdateQOSCgroups is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) UpdateQOSCgroups() *MockContainerManager_UpdateQOSCgroups_Call { + return &MockContainerManager_UpdateQOSCgroups_Call{Call: _e.mock.On("UpdateQOSCgroups")} +} + +func (_c *MockContainerManager_UpdateQOSCgroups_Call) Run(run func()) *MockContainerManager_UpdateQOSCgroups_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_UpdateQOSCgroups_Call) Return(err error) *MockContainerManager_UpdateQOSCgroups_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockContainerManager_UpdateQOSCgroups_Call) RunAndReturn(run func() error) *MockContainerManager_UpdateQOSCgroups_Call { + _c.Call.Return(run) + return _c +} + +// Updates provides a mock function for the type MockContainerManager +func (_mock *MockContainerManager) Updates() <-chan resourceupdates.Update { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for Updates") + } + + var r0 <-chan resourceupdates.Update + if returnFunc, ok := ret.Get(0).(func() <-chan resourceupdates.Update); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(<-chan resourceupdates.Update) + } + } + return r0 +} + +// MockContainerManager_Updates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Updates' +type MockContainerManager_Updates_Call struct { + *mock.Call +} + +// Updates is a helper method to define mock.On call +func (_e *MockContainerManager_Expecter) Updates() *MockContainerManager_Updates_Call { + return &MockContainerManager_Updates_Call{Call: _e.mock.On("Updates")} +} + +func (_c *MockContainerManager_Updates_Call) Run(run func()) *MockContainerManager_Updates_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockContainerManager_Updates_Call) Return(updateCh <-chan resourceupdates.Update) *MockContainerManager_Updates_Call { + _c.Call.Return(updateCh) + return _c +} + +func (_c *MockContainerManager_Updates_Call) RunAndReturn(run func() <-chan resourceupdates.Update) *MockContainerManager_Updates_Call { + _c.Call.Return(run) + return _c +} + +// NewMockPodContainerManager creates a new instance of MockPodContainerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockPodContainerManager(t interface { + mock.TestingT + Cleanup(func()) +}) *MockPodContainerManager { + mock := &MockPodContainerManager{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockPodContainerManager is an autogenerated mock type for the PodContainerManager type +type MockPodContainerManager struct { + mock.Mock +} + +type MockPodContainerManager_Expecter struct { + mock *mock.Mock +} + +func (_m *MockPodContainerManager) EXPECT() *MockPodContainerManager_Expecter { + return &MockPodContainerManager_Expecter{mock: &_m.Mock} +} + +// Destroy provides a mock function for the type MockPodContainerManager +func (_mock *MockPodContainerManager) Destroy(name cm.CgroupName) error { + ret := _mock.Called(name) + + if len(ret) == 0 { + panic("no return value specified for Destroy") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(cm.CgroupName) error); ok { + r0 = returnFunc(name) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPodContainerManager_Destroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Destroy' +type MockPodContainerManager_Destroy_Call struct { + *mock.Call +} + +// Destroy is a helper method to define mock.On call +// - name cm.CgroupName +func (_e *MockPodContainerManager_Expecter) Destroy(name interface{}) *MockPodContainerManager_Destroy_Call { + return &MockPodContainerManager_Destroy_Call{Call: _e.mock.On("Destroy", name)} +} + +func (_c *MockPodContainerManager_Destroy_Call) Run(run func(name cm.CgroupName)) *MockPodContainerManager_Destroy_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 cm.CgroupName + if args[0] != nil { + arg0 = args[0].(cm.CgroupName) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockPodContainerManager_Destroy_Call) Return(err error) *MockPodContainerManager_Destroy_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPodContainerManager_Destroy_Call) RunAndReturn(run func(name cm.CgroupName) error) *MockPodContainerManager_Destroy_Call { + _c.Call.Return(run) + return _c +} + +// EnsureExists provides a mock function for the type MockPodContainerManager +func (_mock *MockPodContainerManager) EnsureExists(pod *v1.Pod) error { + ret := _mock.Called(pod) + + if len(ret) == 0 { + panic("no return value specified for EnsureExists") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(*v1.Pod) error); ok { + r0 = returnFunc(pod) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPodContainerManager_EnsureExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureExists' +type MockPodContainerManager_EnsureExists_Call struct { + *mock.Call +} + +// EnsureExists is a helper method to define mock.On call +// - pod *v1.Pod +func (_e *MockPodContainerManager_Expecter) EnsureExists(pod interface{}) *MockPodContainerManager_EnsureExists_Call { + return &MockPodContainerManager_EnsureExists_Call{Call: _e.mock.On("EnsureExists", pod)} +} + +func (_c *MockPodContainerManager_EnsureExists_Call) Run(run func(pod *v1.Pod)) *MockPodContainerManager_EnsureExists_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockPodContainerManager_EnsureExists_Call) Return(err error) *MockPodContainerManager_EnsureExists_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPodContainerManager_EnsureExists_Call) RunAndReturn(run func(pod *v1.Pod) error) *MockPodContainerManager_EnsureExists_Call { + _c.Call.Return(run) + return _c +} + +// Exists provides a mock function for the type MockPodContainerManager +func (_mock *MockPodContainerManager) Exists(pod *v1.Pod) bool { + ret := _mock.Called(pod) + + if len(ret) == 0 { + panic("no return value specified for Exists") + } + + var r0 bool + if returnFunc, ok := ret.Get(0).(func(*v1.Pod) bool); ok { + r0 = returnFunc(pod) + } else { + r0 = ret.Get(0).(bool) + } + return r0 +} + +// MockPodContainerManager_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists' +type MockPodContainerManager_Exists_Call struct { + *mock.Call +} + +// Exists is a helper method to define mock.On call +// - pod *v1.Pod +func (_e *MockPodContainerManager_Expecter) Exists(pod interface{}) *MockPodContainerManager_Exists_Call { + return &MockPodContainerManager_Exists_Call{Call: _e.mock.On("Exists", pod)} +} + +func (_c *MockPodContainerManager_Exists_Call) Run(run func(pod *v1.Pod)) *MockPodContainerManager_Exists_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockPodContainerManager_Exists_Call) Return(b bool) *MockPodContainerManager_Exists_Call { + _c.Call.Return(b) + return _c +} + +func (_c *MockPodContainerManager_Exists_Call) RunAndReturn(run func(pod *v1.Pod) bool) *MockPodContainerManager_Exists_Call { + _c.Call.Return(run) + return _c +} + +// GetAllPodsFromCgroups provides a mock function for the type MockPodContainerManager +func (_mock *MockPodContainerManager) GetAllPodsFromCgroups() (map[types.UID]cm.CgroupName, error) { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetAllPodsFromCgroups") + } + + var r0 map[types.UID]cm.CgroupName + var r1 error + if returnFunc, ok := ret.Get(0).(func() (map[types.UID]cm.CgroupName, error)); ok { + return returnFunc() + } + if returnFunc, ok := ret.Get(0).(func() map[types.UID]cm.CgroupName); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[types.UID]cm.CgroupName) + } + } + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockPodContainerManager_GetAllPodsFromCgroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllPodsFromCgroups' +type MockPodContainerManager_GetAllPodsFromCgroups_Call struct { + *mock.Call +} + +// GetAllPodsFromCgroups is a helper method to define mock.On call +func (_e *MockPodContainerManager_Expecter) GetAllPodsFromCgroups() *MockPodContainerManager_GetAllPodsFromCgroups_Call { + return &MockPodContainerManager_GetAllPodsFromCgroups_Call{Call: _e.mock.On("GetAllPodsFromCgroups")} +} + +func (_c *MockPodContainerManager_GetAllPodsFromCgroups_Call) Run(run func()) *MockPodContainerManager_GetAllPodsFromCgroups_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPodContainerManager_GetAllPodsFromCgroups_Call) Return(uIDToCgroupName map[types.UID]cm.CgroupName, err error) *MockPodContainerManager_GetAllPodsFromCgroups_Call { + _c.Call.Return(uIDToCgroupName, err) + return _c +} + +func (_c *MockPodContainerManager_GetAllPodsFromCgroups_Call) RunAndReturn(run func() (map[types.UID]cm.CgroupName, error)) *MockPodContainerManager_GetAllPodsFromCgroups_Call { + _c.Call.Return(run) + return _c +} + +// GetPodCgroupConfig provides a mock function for the type MockPodContainerManager +func (_mock *MockPodContainerManager) GetPodCgroupConfig(pod *v1.Pod, resource v1.ResourceName) (*cm.ResourceConfig, error) { + ret := _mock.Called(pod, resource) + + if len(ret) == 0 { + panic("no return value specified for GetPodCgroupConfig") + } + + var r0 *cm.ResourceConfig + var r1 error + if returnFunc, ok := ret.Get(0).(func(*v1.Pod, v1.ResourceName) (*cm.ResourceConfig, error)); ok { + return returnFunc(pod, resource) + } + if returnFunc, ok := ret.Get(0).(func(*v1.Pod, v1.ResourceName) *cm.ResourceConfig); ok { + r0 = returnFunc(pod, resource) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cm.ResourceConfig) + } + } + if returnFunc, ok := ret.Get(1).(func(*v1.Pod, v1.ResourceName) error); ok { + r1 = returnFunc(pod, resource) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockPodContainerManager_GetPodCgroupConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPodCgroupConfig' +type MockPodContainerManager_GetPodCgroupConfig_Call struct { + *mock.Call +} + +// GetPodCgroupConfig is a helper method to define mock.On call +// - pod *v1.Pod +// - resource v1.ResourceName +func (_e *MockPodContainerManager_Expecter) GetPodCgroupConfig(pod interface{}, resource interface{}) *MockPodContainerManager_GetPodCgroupConfig_Call { + return &MockPodContainerManager_GetPodCgroupConfig_Call{Call: _e.mock.On("GetPodCgroupConfig", pod, resource)} +} + +func (_c *MockPodContainerManager_GetPodCgroupConfig_Call) Run(run func(pod *v1.Pod, resource v1.ResourceName)) *MockPodContainerManager_GetPodCgroupConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + var arg1 v1.ResourceName + if args[1] != nil { + arg1 = args[1].(v1.ResourceName) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockPodContainerManager_GetPodCgroupConfig_Call) Return(resourceConfig *cm.ResourceConfig, err error) *MockPodContainerManager_GetPodCgroupConfig_Call { + _c.Call.Return(resourceConfig, err) + return _c +} + +func (_c *MockPodContainerManager_GetPodCgroupConfig_Call) RunAndReturn(run func(pod *v1.Pod, resource v1.ResourceName) (*cm.ResourceConfig, error)) *MockPodContainerManager_GetPodCgroupConfig_Call { + _c.Call.Return(run) + return _c +} + +// GetPodCgroupMemoryUsage provides a mock function for the type MockPodContainerManager +func (_mock *MockPodContainerManager) GetPodCgroupMemoryUsage(pod *v1.Pod) (uint64, error) { + ret := _mock.Called(pod) + + if len(ret) == 0 { + panic("no return value specified for GetPodCgroupMemoryUsage") + } + + var r0 uint64 + var r1 error + if returnFunc, ok := ret.Get(0).(func(*v1.Pod) (uint64, error)); ok { + return returnFunc(pod) + } + if returnFunc, ok := ret.Get(0).(func(*v1.Pod) uint64); ok { + r0 = returnFunc(pod) + } else { + r0 = ret.Get(0).(uint64) + } + if returnFunc, ok := ret.Get(1).(func(*v1.Pod) error); ok { + r1 = returnFunc(pod) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockPodContainerManager_GetPodCgroupMemoryUsage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPodCgroupMemoryUsage' +type MockPodContainerManager_GetPodCgroupMemoryUsage_Call struct { + *mock.Call +} + +// GetPodCgroupMemoryUsage is a helper method to define mock.On call +// - pod *v1.Pod +func (_e *MockPodContainerManager_Expecter) GetPodCgroupMemoryUsage(pod interface{}) *MockPodContainerManager_GetPodCgroupMemoryUsage_Call { + return &MockPodContainerManager_GetPodCgroupMemoryUsage_Call{Call: _e.mock.On("GetPodCgroupMemoryUsage", pod)} +} + +func (_c *MockPodContainerManager_GetPodCgroupMemoryUsage_Call) Run(run func(pod *v1.Pod)) *MockPodContainerManager_GetPodCgroupMemoryUsage_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockPodContainerManager_GetPodCgroupMemoryUsage_Call) Return(v uint64, err error) *MockPodContainerManager_GetPodCgroupMemoryUsage_Call { + _c.Call.Return(v, err) + return _c +} + +func (_c *MockPodContainerManager_GetPodCgroupMemoryUsage_Call) RunAndReturn(run func(pod *v1.Pod) (uint64, error)) *MockPodContainerManager_GetPodCgroupMemoryUsage_Call { + _c.Call.Return(run) + return _c +} + +// GetPodContainerName provides a mock function for the type MockPodContainerManager +func (_mock *MockPodContainerManager) GetPodContainerName(pod *v1.Pod) (cm.CgroupName, string) { + ret := _mock.Called(pod) + + if len(ret) == 0 { + panic("no return value specified for GetPodContainerName") + } + + var r0 cm.CgroupName + var r1 string + if returnFunc, ok := ret.Get(0).(func(*v1.Pod) (cm.CgroupName, string)); ok { + return returnFunc(pod) + } + if returnFunc, ok := ret.Get(0).(func(*v1.Pod) cm.CgroupName); ok { + r0 = returnFunc(pod) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(cm.CgroupName) + } + } + if returnFunc, ok := ret.Get(1).(func(*v1.Pod) string); ok { + r1 = returnFunc(pod) + } else { + r1 = ret.Get(1).(string) + } + return r0, r1 +} + +// MockPodContainerManager_GetPodContainerName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPodContainerName' +type MockPodContainerManager_GetPodContainerName_Call struct { + *mock.Call +} + +// GetPodContainerName is a helper method to define mock.On call +// - pod *v1.Pod +func (_e *MockPodContainerManager_Expecter) GetPodContainerName(pod interface{}) *MockPodContainerManager_GetPodContainerName_Call { + return &MockPodContainerManager_GetPodContainerName_Call{Call: _e.mock.On("GetPodContainerName", pod)} +} + +func (_c *MockPodContainerManager_GetPodContainerName_Call) Run(run func(pod *v1.Pod)) *MockPodContainerManager_GetPodContainerName_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockPodContainerManager_GetPodContainerName_Call) Return(cgroupName cm.CgroupName, s string) *MockPodContainerManager_GetPodContainerName_Call { + _c.Call.Return(cgroupName, s) + return _c +} + +func (_c *MockPodContainerManager_GetPodContainerName_Call) RunAndReturn(run func(pod *v1.Pod) (cm.CgroupName, string)) *MockPodContainerManager_GetPodContainerName_Call { + _c.Call.Return(run) + return _c +} + +// IsPodCgroup provides a mock function for the type MockPodContainerManager +func (_mock *MockPodContainerManager) IsPodCgroup(cgroupfs string) (bool, types.UID) { + ret := _mock.Called(cgroupfs) + + if len(ret) == 0 { + panic("no return value specified for IsPodCgroup") + } + + var r0 bool + var r1 types.UID + if returnFunc, ok := ret.Get(0).(func(string) (bool, types.UID)); ok { + return returnFunc(cgroupfs) + } + if returnFunc, ok := ret.Get(0).(func(string) bool); ok { + r0 = returnFunc(cgroupfs) + } else { + r0 = ret.Get(0).(bool) + } + if returnFunc, ok := ret.Get(1).(func(string) types.UID); ok { + r1 = returnFunc(cgroupfs) + } else { + r1 = ret.Get(1).(types.UID) + } + return r0, r1 +} + +// MockPodContainerManager_IsPodCgroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsPodCgroup' +type MockPodContainerManager_IsPodCgroup_Call struct { + *mock.Call +} + +// IsPodCgroup is a helper method to define mock.On call +// - cgroupfs string +func (_e *MockPodContainerManager_Expecter) IsPodCgroup(cgroupfs interface{}) *MockPodContainerManager_IsPodCgroup_Call { + return &MockPodContainerManager_IsPodCgroup_Call{Call: _e.mock.On("IsPodCgroup", cgroupfs)} +} + +func (_c *MockPodContainerManager_IsPodCgroup_Call) Run(run func(cgroupfs string)) *MockPodContainerManager_IsPodCgroup_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockPodContainerManager_IsPodCgroup_Call) Return(b bool, uID types.UID) *MockPodContainerManager_IsPodCgroup_Call { + _c.Call.Return(b, uID) + return _c +} + +func (_c *MockPodContainerManager_IsPodCgroup_Call) RunAndReturn(run func(cgroupfs string) (bool, types.UID)) *MockPodContainerManager_IsPodCgroup_Call { + _c.Call.Return(run) + return _c +} + +// ReduceCPULimits provides a mock function for the type MockPodContainerManager +func (_mock *MockPodContainerManager) ReduceCPULimits(name cm.CgroupName) error { + ret := _mock.Called(name) + + if len(ret) == 0 { + panic("no return value specified for ReduceCPULimits") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(cm.CgroupName) error); ok { + r0 = returnFunc(name) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPodContainerManager_ReduceCPULimits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReduceCPULimits' +type MockPodContainerManager_ReduceCPULimits_Call struct { + *mock.Call +} + +// ReduceCPULimits is a helper method to define mock.On call +// - name cm.CgroupName +func (_e *MockPodContainerManager_Expecter) ReduceCPULimits(name interface{}) *MockPodContainerManager_ReduceCPULimits_Call { + return &MockPodContainerManager_ReduceCPULimits_Call{Call: _e.mock.On("ReduceCPULimits", name)} +} + +func (_c *MockPodContainerManager_ReduceCPULimits_Call) Run(run func(name cm.CgroupName)) *MockPodContainerManager_ReduceCPULimits_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 cm.CgroupName + if args[0] != nil { + arg0 = args[0].(cm.CgroupName) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockPodContainerManager_ReduceCPULimits_Call) Return(err error) *MockPodContainerManager_ReduceCPULimits_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPodContainerManager_ReduceCPULimits_Call) RunAndReturn(run func(name cm.CgroupName) error) *MockPodContainerManager_ReduceCPULimits_Call { + _c.Call.Return(run) + return _c +} + +// SetPodCgroupConfig provides a mock function for the type MockPodContainerManager +func (_mock *MockPodContainerManager) SetPodCgroupConfig(pod *v1.Pod, resourceConfig *cm.ResourceConfig) error { + ret := _mock.Called(pod, resourceConfig) + + if len(ret) == 0 { + panic("no return value specified for SetPodCgroupConfig") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(*v1.Pod, *cm.ResourceConfig) error); ok { + r0 = returnFunc(pod, resourceConfig) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPodContainerManager_SetPodCgroupConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPodCgroupConfig' +type MockPodContainerManager_SetPodCgroupConfig_Call struct { + *mock.Call +} + +// SetPodCgroupConfig is a helper method to define mock.On call +// - pod *v1.Pod +// - resourceConfig *cm.ResourceConfig +func (_e *MockPodContainerManager_Expecter) SetPodCgroupConfig(pod interface{}, resourceConfig interface{}) *MockPodContainerManager_SetPodCgroupConfig_Call { + return &MockPodContainerManager_SetPodCgroupConfig_Call{Call: _e.mock.On("SetPodCgroupConfig", pod, resourceConfig)} +} + +func (_c *MockPodContainerManager_SetPodCgroupConfig_Call) Run(run func(pod *v1.Pod, resourceConfig *cm.ResourceConfig)) *MockPodContainerManager_SetPodCgroupConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + var arg1 *cm.ResourceConfig + if args[1] != nil { + arg1 = args[1].(*cm.ResourceConfig) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockPodContainerManager_SetPodCgroupConfig_Call) Return(err error) *MockPodContainerManager_SetPodCgroupConfig_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPodContainerManager_SetPodCgroupConfig_Call) RunAndReturn(run func(pod *v1.Pod, resourceConfig *cm.ResourceConfig) error) *MockPodContainerManager_SetPodCgroupConfig_Call { + _c.Call.Return(run) + return _c +} diff --git a/pkg/kubelet/config/apiserver.go b/pkg/kubelet/config/apiserver.go index b67f6c34fec4b..60c040299c481 100644 --- a/pkg/kubelet/config/apiserver.go +++ b/pkg/kubelet/config/apiserver.go @@ -34,22 +34,22 @@ import ( const WaitForAPIServerSyncPeriod = 1 * time.Second // NewSourceApiserver creates a config source that watches and pulls from the apiserver. -func NewSourceApiserver(c clientset.Interface, nodeName types.NodeName, nodeHasSynced func() bool, updates chan<- interface{}) { +func NewSourceApiserver(logger klog.Logger, c clientset.Interface, nodeName types.NodeName, nodeHasSynced func() bool, updates chan<- interface{}) { lw := cache.NewListWatchFromClient(c.CoreV1().RESTClient(), "pods", metav1.NamespaceAll, fields.OneTermEqualSelector("spec.nodeName", string(nodeName))) // The Reflector responsible for watching pods at the apiserver should be run only after // the node sync with the apiserver has completed. - klog.InfoS("Waiting for node sync before watching apiserver pods") + logger.Info("Waiting for node sync before watching apiserver pods") go func() { for { if nodeHasSynced() { - klog.V(4).InfoS("node sync completed") + logger.V(4).Info("node sync completed") break } time.Sleep(WaitForAPIServerSyncPeriod) - klog.V(4).InfoS("node sync has not completed yet") + logger.V(4).Info("node sync has not completed yet") } - klog.InfoS("Watching apiserver") + logger.Info("Watching apiserver") newSourceApiserverFromLW(lw, updates) }() } diff --git a/pkg/kubelet/config/common.go b/pkg/kubelet/config/common.go index 48f6ba77ada07..3aeb35321a9bb 100644 --- a/pkg/kubelet/config/common.go +++ b/pkg/kubelet/config/common.go @@ -57,7 +57,7 @@ func generatePodName(name string, nodeName types.NodeName) string { return fmt.Sprintf("%s-%s", name, strings.ToLower(string(nodeName))) } -func applyDefaults(pod *api.Pod, source string, isFile bool, nodeName types.NodeName) error { +func applyDefaults(logger klog.Logger, pod *api.Pod, source string, isFile bool, nodeName types.NodeName) error { if len(pod.UID) == 0 { hasher := md5.New() hash.DeepHashObject(hasher, pod) @@ -70,16 +70,16 @@ func applyDefaults(pod *api.Pod, source string, isFile bool, nodeName types.Node fmt.Fprintf(hasher, "url:%s", source) } pod.UID = types.UID(hex.EncodeToString(hasher.Sum(nil)[0:])) - klog.V(5).InfoS("Generated UID", "pod", klog.KObj(pod), "podUID", pod.UID, "source", source) + logger.V(5).Info("Generated UID", "pod", klog.KObj(pod), "podUID", pod.UID, "source", source) } pod.Name = generatePodName(pod.Name, nodeName) - klog.V(5).InfoS("Generated pod name", "pod", klog.KObj(pod), "podUID", pod.UID, "source", source) + logger.V(5).Info("Generated pod name", "pod", klog.KObj(pod), "podUID", pod.UID, "source", source) if pod.Namespace == "" { pod.Namespace = metav1.NamespaceDefault } - klog.V(5).InfoS("Set namespace for pod", "pod", klog.KObj(pod), "source", source) + logger.V(5).Info("Set namespace for pod", "pod", klog.KObj(pod), "source", source) // Set the Host field to indicate this pod is scheduled on the current node. pod.Spec.NodeName = string(nodeName) @@ -104,7 +104,7 @@ func applyDefaults(pod *api.Pod, source string, isFile bool, nodeName types.Node return nil } -type defaultFunc func(pod *api.Pod) error +type defaultFunc func(logger klog.Logger, pod *api.Pod) error // A static pod tried to use a ClusterTrustBundle projected volume source. var ErrStaticPodTriedToUseClusterTrustBundle = errors.New("static pods may not use ClusterTrustBundle projected volume sources") @@ -113,7 +113,7 @@ var ErrStaticPodTriedToUseClusterTrustBundle = errors.New("static pods may not u var ErrStaticPodTriedToUseResourceClaims = errors.New("static pods may not use ResourceClaims") // tryDecodeSinglePod takes data and tries to extract valid Pod config information from it. -func tryDecodeSinglePod(data []byte, defaultFn defaultFunc) (parsed bool, pod *v1.Pod, err error) { +func tryDecodeSinglePod(logger klog.Logger, data []byte, defaultFn defaultFunc) (parsed bool, pod *v1.Pod, err error) { // JSON is valid YAML, so this should work for everything. json, err := utilyaml.ToJSON(data) if err != nil { @@ -135,7 +135,7 @@ func tryDecodeSinglePod(data []byte, defaultFn defaultFunc) (parsed bool, pod *v } // Apply default values and validate the pod. - if err = defaultFn(newPod); err != nil { + if err = defaultFn(logger, newPod); err != nil { return true, pod, err } if errs := validation.ValidatePodCreate(newPod, validation.PodValidationOptions{}); len(errs) > 0 { @@ -143,7 +143,7 @@ func tryDecodeSinglePod(data []byte, defaultFn defaultFunc) (parsed bool, pod *v } v1Pod := &v1.Pod{} if err := k8s_api_v1.Convert_core_Pod_To_v1_Pod(newPod, v1Pod, nil); err != nil { - klog.ErrorS(err, "Pod failed to convert to v1", "pod", klog.KObj(newPod)) + logger.Error(err, "Pod failed to convert to v1", "pod", klog.KObj(newPod)) return true, nil, err } @@ -177,7 +177,7 @@ func tryDecodeSinglePod(data []byte, defaultFn defaultFunc) (parsed bool, pod *v return true, v1Pod, nil } -func tryDecodePodList(data []byte, defaultFn defaultFunc) (parsed bool, pods v1.PodList, err error) { +func tryDecodePodList(logger klog.Logger, data []byte, defaultFn defaultFunc) (parsed bool, pods v1.PodList, err error) { obj, err := runtime.Decode(legacyscheme.Codecs.UniversalDecoder(), data) if err != nil { return false, pods, err @@ -196,7 +196,7 @@ func tryDecodePodList(data []byte, defaultFn defaultFunc) (parsed bool, pods v1. if newPod.Name == "" { return true, pods, fmt.Errorf("invalid pod: name is needed for the pod") } - if err = defaultFn(newPod); err != nil { + if err = defaultFn(logger, newPod); err != nil { return true, pods, err } if errs := validation.ValidatePodCreate(newPod, validation.PodValidationOptions{}); len(errs) > 0 { diff --git a/pkg/kubelet/config/common_test.go b/pkg/kubelet/config/common_test.go index 4a7c98250caec..19e26814d62be 100644 --- a/pkg/kubelet/config/common_test.go +++ b/pkg/kubelet/config/common_test.go @@ -29,6 +29,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" clientscheme "k8s.io/client-go/kubernetes/scheme" + "k8s.io/klog/v2" + "k8s.io/klog/v2/ktesting" "k8s.io/kubernetes/pkg/api/legacyscheme" podtest "k8s.io/kubernetes/pkg/api/pod/testing" "k8s.io/kubernetes/pkg/apis/core" @@ -37,9 +39,10 @@ import ( "k8s.io/utils/ptr" ) -func noDefault(*core.Pod) error { return nil } +func noDefault(klog.Logger, *core.Pod) error { return nil } func TestDecodeSinglePod(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) grace := int64(30) enableServiceLinks := v1.DefaultEnableServiceLinks pod := &v1.Pod{ @@ -80,7 +83,7 @@ func TestDecodeSinglePod(t *testing.T) { if err != nil { t.Errorf("unexpected error: %v", err) } - parsed, podOut, err := tryDecodeSinglePod(json, noDefault) + parsed, podOut, err := tryDecodeSinglePod(logger, json, noDefault) if !parsed { t.Errorf("expected to have parsed file: (%s)", string(json)) } @@ -98,7 +101,7 @@ func TestDecodeSinglePod(t *testing.T) { if err != nil { t.Errorf("unexpected error: %v", err) } - parsed, podOut, err = tryDecodeSinglePod(yaml, noDefault) + parsed, podOut, err = tryDecodeSinglePod(logger, yaml, noDefault) if !parsed { t.Errorf("expected to have parsed file: (%s)", string(yaml)) } @@ -112,6 +115,7 @@ func TestDecodeSinglePod(t *testing.T) { } func TestDecodeSinglePodRejectsClusterTrustBundleVolumes(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) grace := int64(30) enableServiceLinks := v1.DefaultEnableServiceLinks pod := &v1.Pod{ @@ -175,13 +179,14 @@ func TestDecodeSinglePodRejectsClusterTrustBundleVolumes(t *testing.T) { if err != nil { t.Errorf("unexpected error: %v", err) } - _, _, err = tryDecodeSinglePod(json, noDefault) + _, _, err = tryDecodeSinglePod(logger, json, noDefault) if !strings.Contains(err.Error(), "may not reference clustertrustbundles") { t.Errorf("Got error %q, want %q", err, fmt.Errorf("static pods may not reference clustertrustbundles API objects")) } } func TestDecodeSinglePodRejectsResourceClaims(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) grace := int64(30) enableServiceLinks := v1.DefaultEnableServiceLinks pod := &v1.Pod{ @@ -231,13 +236,14 @@ func TestDecodeSinglePodRejectsResourceClaims(t *testing.T) { if err != nil { t.Errorf("unexpected error: %v", err) } - _, _, err = tryDecodeSinglePod(json, noDefault) + _, _, err = tryDecodeSinglePod(logger, json, noDefault) if !strings.Contains(err.Error(), "may not reference resourceclaims") { t.Errorf("Got error %q, want %q", err, fmt.Errorf("static pods may not reference resourceclaims API objects")) } } func TestDecodePodList(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) grace := int64(30) enableServiceLinks := v1.DefaultEnableServiceLinks pod := &v1.Pod{ @@ -282,7 +288,7 @@ func TestDecodePodList(t *testing.T) { if err != nil { t.Errorf("unexpected error: %v", err) } - parsed, podListOut, err := tryDecodePodList(json, noDefault) + parsed, podListOut, err := tryDecodePodList(logger, json, noDefault) if !parsed { t.Errorf("expected to have parsed file: (%s)", string(json)) } @@ -301,7 +307,7 @@ func TestDecodePodList(t *testing.T) { t.Errorf("unexpected error: %v", err) } - parsed, podListOut, err = tryDecodePodList(yaml, noDefault) + parsed, podListOut, err = tryDecodePodList(logger, yaml, noDefault) if !parsed { t.Errorf("expected to have parsed file: (%s): %v", string(yaml), err) continue diff --git a/pkg/kubelet/config/config.go b/pkg/kubelet/config/config.go index 10a42c823221e..dc0728c8f3657 100644 --- a/pkg/kubelet/config/config.go +++ b/pkg/kubelet/config/config.go @@ -99,9 +99,12 @@ func (c *PodConfig) SeenAllSources(seenSources sets.Set[string]) bool { if c.pods == nil { return false } + // Use klog.TODO() because we currently do not have a proper context to pass in. + // Replace this with an appropriate logger when refactoring this function to accept a logger parameter. + logger := klog.TODO() c.sourcesLock.Lock() defer c.sourcesLock.Unlock() - klog.V(5).InfoS("Looking for sources, have seen", "sources", sets.List(c.sources), "seenSources", seenSources) + logger.V(5).Info("Looking for sources, have seen", "sources", sets.List(c.sources), "seenSources", seenSources) return seenSources.HasAll(sets.List(c.sources)...) && c.pods.seenSources(sets.List(c.sources)...) } @@ -157,12 +160,12 @@ func newPodStorage(updates chan<- kubetypes.PodUpdate, mode PodConfigNotificatio // Merge normalizes a set of incoming changes from different sources into a map of all Pods // and ensures that redundant changes are filtered out, and then pushes zero or more minimal // updates onto the update channel. Ensures that updates are delivered in order. -func (s *podStorage) Merge(source string, change interface{}) error { +func (s *podStorage) Merge(ctx context.Context, source string, change interface{}) error { s.updateLock.Lock() defer s.updateLock.Unlock() seenBefore := s.sourcesSeen.Has(source) - adds, updates, deletes, removes, reconciles := s.merge(source, change) + adds, updates, deletes, removes, reconciles := s.merge(ctx, source, change) firstSet := !seenBefore && s.sourcesSeen.Has(source) // deliver update notifications @@ -216,9 +219,10 @@ func (s *podStorage) Merge(source string, change interface{}) error { return nil } -func (s *podStorage) merge(source string, change interface{}) (adds, updates, deletes, removes, reconciles *kubetypes.PodUpdate) { +func (s *podStorage) merge(ctx context.Context, source string, change interface{}) (adds, updates, deletes, removes, reconciles *kubetypes.PodUpdate) { s.podLock.Lock() defer s.podLock.Unlock() + logger := klog.FromContext(ctx) addPods := []*v1.Pod{} updatePods := []*v1.Pod{} @@ -235,7 +239,7 @@ func (s *podStorage) merge(source string, change interface{}) (adds, updates, de // After updated, new pod will be stored in the pod cache *pods*. // Notice that *pods* and *oldPods* could be the same cache. updatePodsFunc := func(newPods []*v1.Pod, oldPods, pods map[types.UID]*v1.Pod) { - filtered := filterInvalidPods(newPods, source, s.recorder) + filtered := filterInvalidPods(logger, newPods, source, s.recorder) for _, ref := range filtered { // Annotate the pod with the source before any comparison. if ref.Annotations == nil { @@ -258,7 +262,7 @@ func (s *podStorage) merge(source string, change interface{}) (adds, updates, de } continue } - recordFirstSeenTime(ref) + recordFirstSeenTime(logger, ref) pods[ref.UID] = ref addPods = append(addPods, ref) } @@ -268,16 +272,16 @@ func (s *podStorage) merge(source string, change interface{}) (adds, updates, de switch update.Op { case kubetypes.ADD, kubetypes.UPDATE, kubetypes.DELETE: if update.Op == kubetypes.ADD { - klog.V(4).InfoS("Adding new pods from source", "source", source, "pods", klog.KObjSlice(update.Pods)) + logger.V(4).Info("Adding new pods from source", "source", source, "pods", klog.KObjSlice(update.Pods)) } else if update.Op == kubetypes.DELETE { - klog.V(4).InfoS("Gracefully deleting pods from source", "source", source, "pods", klog.KObjSlice(update.Pods)) + logger.V(4).Info("Gracefully deleting pods from source", "source", source, "pods", klog.KObjSlice(update.Pods)) } else { - klog.V(4).InfoS("Updating pods from source", "source", source, "pods", klog.KObjSlice(update.Pods)) + logger.V(4).Info("Updating pods from source", "source", source, "pods", klog.KObjSlice(update.Pods)) } updatePodsFunc(update.Pods, pods, pods) case kubetypes.REMOVE: - klog.V(4).InfoS("Removing pods from source", "source", source, "pods", klog.KObjSlice(update.Pods)) + logger.V(4).Info("Removing pods from source", "source", source, "pods", klog.KObjSlice(update.Pods)) for _, value := range update.Pods { if existing, found := pods[value.UID]; found { // this is a delete @@ -289,7 +293,7 @@ func (s *podStorage) merge(source string, change interface{}) (adds, updates, de } case kubetypes.SET: - klog.V(4).InfoS("Setting pods for source", "source", source) + logger.V(4).Info("Setting pods for source", "source", source) s.markSourceSet(source) // Clear the old map entries by just creating a new map oldPods := pods @@ -303,7 +307,7 @@ func (s *podStorage) merge(source string, change interface{}) (adds, updates, de } default: - klog.InfoS("Received invalid update type", "type", update) + logger.Info("Received invalid update type", "type", update) } @@ -330,14 +334,14 @@ func (s *podStorage) seenSources(sources ...string) bool { return s.sourcesSeen.HasAll(sources...) } -func filterInvalidPods(pods []*v1.Pod, source string, recorder record.EventRecorder) (filtered []*v1.Pod) { +func filterInvalidPods(logger klog.Logger, pods []*v1.Pod, source string, recorder record.EventRecorder) (filtered []*v1.Pod) { names := sets.Set[string]{} for i, pod := range pods { // Pods from each source are assumed to have passed validation individually. // This function only checks if there is any naming conflict. name := kubecontainer.GetPodFullName(pod) if names.Has(name) { - klog.InfoS("Pod failed validation due to duplicate pod name, ignoring", "index", i, "pod", klog.KObj(pod), "source", source) + logger.Info("Pod failed validation due to duplicate pod name, ignoring", "index", i, "pod", klog.KObj(pod), "source", source) recorder.Eventf(pod, v1.EventTypeWarning, events.FailedValidation, "Error validating pod %s from %s due to duplicate pod name %q, ignoring", format.Pod(pod), source, pod.Name) continue } else { @@ -393,8 +397,8 @@ func isAnnotationMapEqual(existingMap, candidateMap map[string]string) bool { } // recordFirstSeenTime records the first seen time of this pod. -func recordFirstSeenTime(pod *v1.Pod) { - klog.V(4).InfoS("Receiving a new pod", "pod", klog.KObj(pod)) +func recordFirstSeenTime(logger klog.Logger, pod *v1.Pod) { + logger.V(4).Info("Receiving a new pod", "pod", klog.KObj(pod)) pod.Annotations[kubetypes.ConfigFirstSeenAnnotationKey] = kubetypes.NewTimestamp().GetString() } diff --git a/pkg/kubelet/config/file.go b/pkg/kubelet/config/file.go index 79e2af6ed6216..bf48553acbc2d 100644 --- a/pkg/kubelet/config/file.go +++ b/pkg/kubelet/config/file.go @@ -60,13 +60,13 @@ type sourceFile struct { } // NewSourceFile watches a config file for changes. -func NewSourceFile(path string, nodeName types.NodeName, period time.Duration, updates chan<- interface{}) { +func NewSourceFile(logger klog.Logger, path string, nodeName types.NodeName, period time.Duration, updates chan<- interface{}) { // "github.com/sigma/go-inotify" requires a path without trailing "/" path = strings.TrimRight(path, string(os.PathSeparator)) config := newSourceFile(path, nodeName, period, updates) - klog.V(1).InfoS("Watching path", "path", path) - config.run() + logger.V(1).Info("Watching path", "path", path) + config.run(logger) } func newSourceFile(path string, nodeName types.NodeName, period time.Duration, updates chan<- interface{}) *sourceFile { @@ -89,36 +89,36 @@ func newSourceFile(path string, nodeName types.NodeName, period time.Duration, u } } -func (s *sourceFile) run() { +func (s *sourceFile) run(logger klog.Logger) { listTicker := time.NewTicker(s.period) go func() { // Read path immediately to speed up startup. - if err := s.listConfig(); err != nil { - klog.ErrorS(err, "Unable to read config path", "path", s.path) + if err := s.listConfig(logger); err != nil { + logger.Error(err, "Unable to read config path", "path", s.path) } for { select { case <-listTicker.C: - if err := s.listConfig(); err != nil { - klog.ErrorS(err, "Unable to read config path", "path", s.path) + if err := s.listConfig(logger); err != nil { + logger.Error(err, "Unable to read config path", "path", s.path) } case e := <-s.watchEvents: - if err := s.consumeWatchEvent(e); err != nil { - klog.ErrorS(err, "Unable to process watch event") + if err := s.consumeWatchEvent(logger, e); err != nil { + logger.Error(err, "Unable to process watch event") } } } }() - s.startWatch() + s.startWatch(logger) } -func (s *sourceFile) applyDefaults(pod *api.Pod, source string) error { - return applyDefaults(pod, source, true, s.nodeName) +func (s *sourceFile) applyDefaults(logger klog.Logger, pod *api.Pod, source string) error { + return applyDefaults(logger, pod, source, true, s.nodeName) } -func (s *sourceFile) listConfig() error { +func (s *sourceFile) listConfig(logger klog.Logger) error { path := s.path statInfo, err := os.Stat(path) if err != nil { @@ -132,7 +132,7 @@ func (s *sourceFile) listConfig() error { switch { case statInfo.Mode().IsDir(): - pods, err := s.extractFromDir(path) + pods, err := s.extractFromDir(logger, path) if err != nil { return err } @@ -144,7 +144,7 @@ func (s *sourceFile) listConfig() error { return s.replaceStore(pods...) case statInfo.Mode().IsRegular(): - pod, err := s.extractFromFile(path) + pod, err := s.extractFromFile(logger, path) if err != nil { return err } @@ -158,7 +158,7 @@ func (s *sourceFile) listConfig() error { // Get as many pod manifests as we can from a directory. Return an error if and only if something // prevented us from reading anything at all. Do not return an error if only some files // were problematic. -func (s *sourceFile) extractFromDir(name string) ([]*v1.Pod, error) { +func (s *sourceFile) extractFromDir(logger klog.Logger, name string) ([]*v1.Pod, error) { dirents, err := filepath.Glob(filepath.Join(name, "[^.]*")) if err != nil { return nil, fmt.Errorf("glob failed: %v", err) @@ -173,32 +173,32 @@ func (s *sourceFile) extractFromDir(name string) ([]*v1.Pod, error) { for _, path := range dirents { statInfo, err := os.Stat(path) if err != nil { - klog.ErrorS(err, "Could not get metadata", "path", path) + logger.Error(err, "Could not get metadata", "path", path) continue } switch { case statInfo.Mode().IsDir(): - klog.ErrorS(nil, "Provided manifest path is a directory, not recursing into manifest path", "path", path) + logger.Error(nil, "Provided manifest path is a directory, not recursing into manifest path", "path", path) case statInfo.Mode().IsRegular(): - pod, err := s.extractFromFile(path) + pod, err := s.extractFromFile(logger, path) if err != nil { if !os.IsNotExist(err) { - klog.ErrorS(err, "Could not process manifest file", "path", path) + logger.Error(err, "Could not process manifest file", "path", path) } } else { pods = append(pods, pod) } default: - klog.ErrorS(nil, "Manifest path is not a directory or file", "path", path, "mode", statInfo.Mode()) + logger.Error(nil, "Manifest path is not a directory or file", "path", path, "mode", statInfo.Mode()) } } return pods, nil } // extractFromFile parses a file for Pod configuration information. -func (s *sourceFile) extractFromFile(filename string) (pod *v1.Pod, err error) { - klog.V(3).InfoS("Reading config file", "path", filename) +func (s *sourceFile) extractFromFile(logger klog.Logger, filename string) (pod *v1.Pod, err error) { + logger.V(3).Info("Reading config file", "path", filename) defer func() { if err == nil && pod != nil { objKey, keyErr := cache.MetaNamespaceKeyFunc(pod) @@ -221,11 +221,11 @@ func (s *sourceFile) extractFromFile(filename string) (pod *v1.Pod, err error) { return pod, err } - defaultFn := func(pod *api.Pod) error { - return s.applyDefaults(pod, filename) + defaultFn := func(logger klog.Logger, pod *api.Pod) error { + return s.applyDefaults(logger, pod, filename) } - parsed, pod, podErr := tryDecodeSinglePod(data, defaultFn) + parsed, pod, podErr := tryDecodeSinglePod(logger, data, defaultFn) if parsed { if podErr != nil { return pod, podErr diff --git a/pkg/kubelet/config/file_linux.go b/pkg/kubelet/config/file_linux.go index 42d86f868723b..f05010f8ec0aa 100644 --- a/pkg/kubelet/config/file_linux.go +++ b/pkg/kubelet/config/file_linux.go @@ -48,7 +48,7 @@ func (e *retryableError) Error() string { return e.message } -func (s *sourceFile) startWatch() { +func (s *sourceFile) startWatch(logger klog.Logger) { backOff := flowcontrol.NewBackOff(retryPeriod, maxRetryPeriod) backOffID := "watch" @@ -57,8 +57,8 @@ func (s *sourceFile) startWatch() { return } - if err := s.doWatch(); err != nil { - klog.ErrorS(err, "Unable to read config path", "path", s.path) + if err := s.doWatch(logger); err != nil { + logger.Error(err, "Unable to read config path", "path", s.path) if _, retryable := err.(*retryableError); !retryable { backOff.Next(backOffID, time.Now()) } @@ -66,7 +66,7 @@ func (s *sourceFile) startWatch() { }, retryPeriod) } -func (s *sourceFile) doWatch() error { +func (s *sourceFile) doWatch(logger klog.Logger) error { _, err := os.Stat(s.path) if err != nil { if !os.IsNotExist(err) { @@ -91,7 +91,7 @@ func (s *sourceFile) doWatch() error { for { select { case event := <-w.Events: - if err = s.produceWatchEvent(&event); err != nil { + if err = s.produceWatchEvent(logger, &event); err != nil { return fmt.Errorf("error while processing inotify event (%+v): %v", event, err) } case err = <-w.Errors: @@ -100,10 +100,10 @@ func (s *sourceFile) doWatch() error { } } -func (s *sourceFile) produceWatchEvent(e *fsnotify.Event) error { +func (s *sourceFile) produceWatchEvent(logger klog.Logger, e *fsnotify.Event) error { // Ignore file start with dots if strings.HasPrefix(filepath.Base(e.Name), ".") { - klog.V(4).InfoS("Ignored pod manifest, because it starts with dots", "eventName", e.Name) + logger.V(4).Info("Ignored pod manifest, because it starts with dots", "eventName", e.Name) return nil } var eventType podEventType @@ -127,10 +127,10 @@ func (s *sourceFile) produceWatchEvent(e *fsnotify.Event) error { return nil } -func (s *sourceFile) consumeWatchEvent(e *watchEvent) error { +func (s *sourceFile) consumeWatchEvent(logger klog.Logger, e *watchEvent) error { switch e.eventType { case podAdd, podModify: - pod, err := s.extractFromFile(e.fileName) + pod, err := s.extractFromFile(logger, e.fileName) if err != nil { return fmt.Errorf("can't process config file %q: %v", e.fileName, err) } diff --git a/pkg/kubelet/config/file_linux_test.go b/pkg/kubelet/config/file_linux_test.go index bcc97de1754de..b7e17eb655058 100644 --- a/pkg/kubelet/config/file_linux_test.go +++ b/pkg/kubelet/config/file_linux_test.go @@ -40,20 +40,23 @@ import ( "k8s.io/kubernetes/pkg/apis/core/validation" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/securitycontext" + "k8s.io/kubernetes/test/utils/ktesting" ) func TestExtractFromNonExistentFile(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) ch := make(chan interface{}, 1) lw := newSourceFile("/some/fake/file", "localhost", time.Millisecond, ch) - err := lw.doWatch() + err := lw.doWatch(logger) if err == nil { t.Errorf("Expected error") } } func TestUpdateOnNonExistentFile(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) ch := make(chan interface{}) - NewSourceFile("random_non_existent_path", "localhost", time.Millisecond, ch) + NewSourceFile(logger, "random_non_existent_path", "localhost", time.Millisecond, ch) select { case got := <-ch: update := got.(kubetypes.PodUpdate) @@ -68,6 +71,7 @@ func TestUpdateOnNonExistentFile(t *testing.T) { } func TestReadPodsFromFileExistAlready(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) hostname := types.NodeName("random-test-hostname") var testCases = getTestCases(hostname) @@ -81,7 +85,7 @@ func TestReadPodsFromFileExistAlready(t *testing.T) { file := testCase.writeToFile(dirName, "test_pod_manifest", t) ch := make(chan interface{}) - NewSourceFile(file, hostname, time.Millisecond, ch) + NewSourceFile(logger, file, hostname, time.Millisecond, ch) select { case got := <-ch: update := got.(kubetypes.PodUpdate) @@ -228,6 +232,7 @@ func createSymbolicLink(link, target, name string, t *testing.T) string { } func watchFileAdded(watchDir bool, symlink bool, t *testing.T) { + logger, _ := ktesting.NewTestContext(t) hostname := types.NodeName("random-test-hostname") var testCases = getTestCases(hostname) @@ -253,9 +258,9 @@ func watchFileAdded(watchDir bool, symlink bool, t *testing.T) { ch := make(chan interface{}) if watchDir { - NewSourceFile(dirName, hostname, 100*time.Millisecond, ch) + NewSourceFile(logger, dirName, hostname, 100*time.Millisecond, ch) } else { - NewSourceFile(filepath.Join(dirName, fileName), hostname, 100*time.Millisecond, ch) + NewSourceFile(logger, filepath.Join(dirName, fileName), hostname, 100*time.Millisecond, ch) } expectEmptyUpdate(t, ch) @@ -281,6 +286,7 @@ func watchFileAdded(watchDir bool, symlink bool, t *testing.T) { } func watchFileChanged(watchDir bool, symlink bool, period time.Duration, t *testing.T) { + logger, _ := ktesting.NewTestContext(t) hostname := types.NodeName("random-test-hostname") var testCases = getTestCases(hostname) @@ -319,9 +325,9 @@ func watchFileChanged(watchDir bool, symlink bool, period time.Duration, t *test }() if watchDir { - NewSourceFile(dirName, hostname, period, ch) + NewSourceFile(logger, dirName, hostname, period, ch) } else { - NewSourceFile(file, hostname, period, ch) + NewSourceFile(logger, file, hostname, period, ch) } // await fsnotify to be ready diff --git a/pkg/kubelet/config/file_test.go b/pkg/kubelet/config/file_test.go index e0b7251788f5d..8aecb35af7849 100644 --- a/pkg/kubelet/config/file_test.go +++ b/pkg/kubelet/config/file_test.go @@ -24,6 +24,7 @@ import ( apiequality "k8s.io/apimachinery/pkg/api/equality" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" + "k8s.io/kubernetes/test/utils/ktesting" ) func TestExtractFromBadDataFile(t *testing.T) { @@ -33,6 +34,7 @@ func TestExtractFromBadDataFile(t *testing.T) { } defer removeAll(dirName, t) + logger, _ := ktesting.NewTestContext(t) fileName := filepath.Join(dirName, "test_pod_config") err = os.WriteFile(fileName, []byte{1, 2, 3}, 0555) if err != nil { @@ -41,7 +43,7 @@ func TestExtractFromBadDataFile(t *testing.T) { ch := make(chan interface{}, 1) lw := newSourceFile(fileName, "localhost", time.Millisecond, ch) - err = lw.listConfig() + err = lw.listConfig(logger) if err == nil { t.Fatalf("expected error, got nil") } @@ -55,9 +57,10 @@ func TestExtractFromEmptyDir(t *testing.T) { } defer removeAll(dirName, t) + logger, _ := ktesting.NewTestContext(t) ch := make(chan interface{}, 1) lw := newSourceFile(dirName, "localhost", time.Millisecond, ch) - err = lw.listConfig() + err = lw.listConfig(logger) if err != nil { t.Fatalf("unexpected error: %v", err) } diff --git a/pkg/kubelet/config/file_unsupported.go b/pkg/kubelet/config/file_unsupported.go index 7d5c77c28d796..1b2c56a6660a6 100644 --- a/pkg/kubelet/config/file_unsupported.go +++ b/pkg/kubelet/config/file_unsupported.go @@ -25,10 +25,10 @@ import ( "k8s.io/klog/v2" ) -func (s *sourceFile) startWatch() { - klog.ErrorS(nil, "Watching source file is unsupported in this build") +func (s *sourceFile) startWatch(logger klog.Logger) { + logger.Error(nil, "Watching source file is unsupported in this build") } -func (s *sourceFile) consumeWatchEvent(e *watchEvent) error { +func (s *sourceFile) consumeWatchEvent(logger klog.Logger, e *watchEvent) error { return fmt.Errorf("consuming watch event is unsupported in this build") } diff --git a/pkg/kubelet/config/http.go b/pkg/kubelet/config/http.go index b376087814334..123f5edf01e07 100644 --- a/pkg/kubelet/config/http.go +++ b/pkg/kubelet/config/http.go @@ -43,7 +43,7 @@ type sourceURL struct { } // NewSourceURL specifies the URL where to read the Pod configuration from, then watches it for changes. -func NewSourceURL(url string, header http.Header, nodeName types.NodeName, period time.Duration, updates chan<- interface{}) { +func NewSourceURL(logger klog.Logger, url string, header http.Header, nodeName types.NodeName, period time.Duration, updates chan<- interface{}) { config := &sourceURL{ url: url, header: header, @@ -54,35 +54,35 @@ func NewSourceURL(url string, header http.Header, nodeName types.NodeName, perio // read the manifest URL passed to kubelet. client: &http.Client{Timeout: 10 * time.Second}, } - klog.V(1).InfoS("Watching URL", "URL", url) - go wait.Until(config.run, period, wait.NeverStop) + logger.V(1).Info("Watching URL", "URL", url) + go wait.Until(func() { config.run(logger) }, period, wait.NeverStop) } -func (s *sourceURL) run() { - if err := s.extractFromURL(); err != nil { +func (s *sourceURL) run(logger klog.Logger) { + if err := s.extractFromURL(logger); err != nil { // Don't log this multiple times per minute. The first few entries should be // enough to get the point across. if s.failureLogs < 3 { - klog.InfoS("Failed to read pods from URL", "err", err) + logger.Info("Failed to read pods from URL", "err", err) } else if s.failureLogs == 3 { - klog.InfoS("Failed to read pods from URL. Dropping verbosity of this message to V(4)", "err", err) + logger.Info("Failed to read pods from URL. Dropping verbosity of this message to V(4)", "err", err) } else { - klog.V(4).InfoS("Failed to read pods from URL", "err", err) + logger.V(4).Info("Failed to read pods from URL", "err", err) } s.failureLogs++ } else { if s.failureLogs > 0 { - klog.InfoS("Successfully read pods from URL") + logger.Info("Successfully read pods from URL") s.failureLogs = 0 } } } -func (s *sourceURL) applyDefaults(pod *api.Pod) error { - return applyDefaults(pod, s.url, false, s.nodeName) +func (s *sourceURL) applyDefaults(logger klog.Logger, pod *api.Pod) error { + return applyDefaults(logger, pod, s.url, false, s.nodeName) } -func (s *sourceURL) extractFromURL() error { +func (s *sourceURL) extractFromURL(logger klog.Logger) error { req, err := http.NewRequest("GET", s.url, nil) if err != nil { return err @@ -112,7 +112,7 @@ func (s *sourceURL) extractFromURL() error { s.data = data // First try as it is a single pod. - parsed, pod, singlePodErr := tryDecodeSinglePod(data, s.applyDefaults) + parsed, pod, singlePodErr := tryDecodeSinglePod(logger, data, s.applyDefaults) if parsed { if singlePodErr != nil { // It parsed but could not be used. @@ -123,7 +123,7 @@ func (s *sourceURL) extractFromURL() error { } // That didn't work, so try a list of pods. - parsed, podList, multiPodErr := tryDecodePodList(data, s.applyDefaults) + parsed, podList, multiPodErr := tryDecodePodList(logger, data, s.applyDefaults) if parsed { if multiPodErr != nil { // It parsed but could not be used. diff --git a/pkg/kubelet/config/http_test.go b/pkg/kubelet/config/http_test.go index 879accb770dc2..d637451e2f2e8 100644 --- a/pkg/kubelet/config/http_test.go +++ b/pkg/kubelet/config/http_test.go @@ -34,11 +34,13 @@ import ( k8s_api_v1 "k8s.io/kubernetes/pkg/apis/core/v1" "k8s.io/kubernetes/pkg/apis/core/validation" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" + "k8s.io/kubernetes/test/utils/ktesting" ) func TestURLErrorNotExistNoUpdate(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) ch := make(chan interface{}) - NewSourceURL("http://localhost:49575/_not_found_", http.Header{}, "localhost", time.Millisecond, ch) + NewSourceURL(logger, "http://localhost:49575/_not_found_", http.Header{}, "localhost", time.Millisecond, ch) select { case got := <-ch: t.Errorf("Expected no update, Got %#v", got) @@ -47,15 +49,17 @@ func TestURLErrorNotExistNoUpdate(t *testing.T) { } func TestExtractFromHttpBadness(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) ch := make(chan interface{}, 1) c := sourceURL{"http://localhost:49575/_not_found_", http.Header{}, "other", ch, nil, 0, http.DefaultClient} - if err := c.extractFromURL(); err == nil { + if err := c.extractFromURL(logger); err == nil { t.Errorf("Expected error") } expectEmptyChannel(t, ch) } func TestExtractInvalidPods(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) var testCases = []struct { desc string pod *v1.Pod @@ -118,13 +122,14 @@ func TestExtractInvalidPods(t *testing.T) { defer testServer.Close() ch := make(chan interface{}, 1) c := sourceURL{testServer.URL, http.Header{}, "localhost", ch, nil, 0, http.DefaultClient} - if err := c.extractFromURL(); err == nil { + if err := c.extractFromURL(logger); err == nil { t.Errorf("%s: Expected error", testCase.desc) } } } func TestExtractPodsFromHTTP(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) nodeName := "different-value" grace := int64(30) @@ -301,7 +306,7 @@ func TestExtractPodsFromHTTP(t *testing.T) { defer testServer.Close() ch := make(chan interface{}, 1) c := sourceURL{testServer.URL, http.Header{}, types.NodeName(nodeName), ch, nil, 0, http.DefaultClient} - if err := c.extractFromURL(); err != nil { + if err := c.extractFromURL(logger); err != nil { t.Errorf("%s: Unexpected error: %v", testCase.desc, err) continue } @@ -349,11 +354,13 @@ func TestURLWithHeader(t *testing.T) { } testServer := httptest.NewServer(&fakeHandler) defer testServer.Close() + + logger, _ := ktesting.NewTestContext(t) ch := make(chan interface{}, 1) header := make(http.Header) header.Set("Metadata-Flavor", "Google") c := sourceURL{testServer.URL, header, "localhost", ch, nil, 0, http.DefaultClient} - if err := c.extractFromURL(); err != nil { + if err := c.extractFromURL(logger); err != nil { t.Fatalf("Unexpected error extracting from URL: %v", err) } update := (<-ch).(kubetypes.PodUpdate) diff --git a/pkg/kubelet/config/mux.go b/pkg/kubelet/config/mux.go index a2b3e1e0a5f68..091148f950fd2 100644 --- a/pkg/kubelet/config/mux.go +++ b/pkg/kubelet/config/mux.go @@ -28,7 +28,7 @@ type merger interface { // Invoked when a change from a source is received. May also function as an incremental // merger if you wish to consume changes incrementally. Must be reentrant when more than // one source is defined. - Merge(source string, update interface{}) error + Merge(ctx context.Context, source string, update interface{}) error } // mux is a class for merging configuration from multiple sources. Changes are @@ -70,14 +70,15 @@ func (m *mux) ChannelWithContext(ctx context.Context, source string) chan interf newChannel := make(chan interface{}) m.sources[source] = newChannel - go wait.Until(func() { m.listen(source, newChannel) }, 0, ctx.Done()) + go wait.Until(func() { m.listen(ctx, source, newChannel) }, 0, ctx.Done()) return newChannel } -func (m *mux) listen(source string, listenChannel <-chan interface{}) { +func (m *mux) listen(ctx context.Context, source string, listenChannel <-chan interface{}) { + logger := klog.FromContext(ctx) for update := range listenChannel { - if err := m.merger.Merge(source, update); err != nil { - klog.InfoS("failed merging update", "err", err) + if err := m.merger.Merge(ctx, source, update); err != nil { + logger.Info("failed merging update", "err", err) } } } diff --git a/pkg/kubelet/config/mux_test.go b/pkg/kubelet/config/mux_test.go index b24068505cf76..6033023c87143 100644 --- a/pkg/kubelet/config/mux_test.go +++ b/pkg/kubelet/config/mux_test.go @@ -20,11 +20,14 @@ import ( "context" "reflect" "testing" + + "k8s.io/kubernetes/test/utils/ktesting" ) func TestConfigurationChannels(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() + ctx := ktesting.Init(t) + ctx = ktesting.WithCancel(ctx) + defer ctx.Cancel("TestConfigurationChannels completed") mux := newMux(nil) channelOne := mux.ChannelWithContext(ctx, "one") @@ -43,7 +46,7 @@ type MergeMock struct { t *testing.T } -func (m MergeMock) Merge(source string, update interface{}) error { +func (m MergeMock) Merge(ctx context.Context, source string, update interface{}) error { if m.source != source { m.t.Errorf("Expected %s, Got %s", m.source, source) } @@ -54,8 +57,9 @@ func (m MergeMock) Merge(source string, update interface{}) error { } func TestMergeInvoked(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() + ctx := ktesting.Init(t) + ctx = ktesting.WithCancel(ctx) + defer ctx.Cancel("TestMergeInvoked completed") merger := MergeMock{"one", "test", t} mux := newMux(&merger) @@ -63,18 +67,19 @@ func TestMergeInvoked(t *testing.T) { } // mergeFunc implements the Merger interface -type mergeFunc func(source string, update interface{}) error +type mergeFunc func(ctx context.Context, source string, update interface{}) error -func (f mergeFunc) Merge(source string, update interface{}) error { - return f(source, update) +func (f mergeFunc) Merge(ctx context.Context, source string, update interface{}) error { + return f(ctx, source, update) } func TestSimultaneousMerge(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() + ctx := ktesting.Init(t) + ctx = ktesting.WithCancel(ctx) + defer ctx.Cancel("TestSimultaneousMerge completed") ch := make(chan bool, 2) - mux := newMux(mergeFunc(func(source string, update interface{}) error { + mux := newMux(mergeFunc(func(ctx context.Context, source string, update interface{}) error { switch source { case "one": if update.(string) != "test" { diff --git a/pkg/kubelet/container/.mockery.yaml b/pkg/kubelet/container/.mockery.yaml index 84489a0095f0e..b0209296dc4ac 100644 --- a/pkg/kubelet/container/.mockery.yaml +++ b/pkg/kubelet/container/.mockery.yaml @@ -1,18 +1,19 @@ --- dir: testing -filename: "mock_{{.InterfaceName | snakecase}}.go" -boilerplate-file: ../../../hack/boilerplate/boilerplate.generatego.txt -outpkg: testing -with-expecter: true +pkgname: testing +template: testify +template-data: + boilerplate-file: ../../../hack/boilerplate/boilerplate.generatego.txt + unroll-variadic: true packages: io/fs: + config: + filename: mockdirentry.go interfaces: - DirEntry: - config: - filename: mockdirentry.go + DirEntry: {} k8s.io/kubernetes/pkg/kubelet/container: + config: + filename: mocks.go interfaces: - Runtime: - config: - filename: runtime_mock.go - RuntimeCache: + Runtime: {} + RuntimeCache: {} diff --git a/pkg/kubelet/container/container_gc.go b/pkg/kubelet/container/container_gc.go index b0a25d50058e8..92aad2cc6121f 100644 --- a/pkg/kubelet/container/container_gc.go +++ b/pkg/kubelet/container/container_gc.go @@ -83,6 +83,6 @@ func (cgc *realContainerGC) GarbageCollect(ctx context.Context) error { } func (cgc *realContainerGC) DeleteAllUnusedContainers(ctx context.Context) error { - klog.InfoS("Attempting to delete unused containers") + klog.FromContext(ctx).Info("Attempting to delete unused containers") return cgc.runtime.GarbageCollect(ctx, cgc.policy, cgc.sourcesReadyProvider.AllReady(), true) } diff --git a/pkg/kubelet/container/helpers.go b/pkg/kubelet/container/helpers.go index 8e791d465a39d..dff64ed48b64e 100644 --- a/pkg/kubelet/container/helpers.go +++ b/pkg/kubelet/container/helpers.go @@ -79,7 +79,7 @@ type RuntimeHelper interface { // ShouldContainerBeRestarted checks whether a container needs to be restarted. // TODO(yifan): Think about how to refactor this. -func ShouldContainerBeRestarted(container *v1.Container, pod *v1.Pod, podStatus *PodStatus) bool { +func ShouldContainerBeRestarted(logger klog.Logger, container *v1.Container, pod *v1.Pod, podStatus *PodStatus) bool { // Once a pod has been marked deleted, it should not be restarted if pod.DeletionTimestamp != nil { return false @@ -104,13 +104,13 @@ func ShouldContainerBeRestarted(container *v1.Container, pod *v1.Pod, podStatus return podutil.ContainerShouldRestart(*container, pod.Spec, int32(status.ExitCode)) } if pod.Spec.RestartPolicy == v1.RestartPolicyNever { - klog.V(4).InfoS("Already ran container, do nothing", "pod", klog.KObj(pod), "containerName", container.Name) + logger.V(4).Info("Already ran container, do nothing", "pod", klog.KObj(pod), "containerName", container.Name) return false } if pod.Spec.RestartPolicy == v1.RestartPolicyOnFailure { // Check the exit code. if status.ExitCode == 0 { - klog.V(4).InfoS("Already successfully ran container, do nothing", "pod", klog.KObj(pod), "containerName", container.Name) + logger.V(4).Info("Already successfully ran container, do nothing", "pod", klog.KObj(pod), "containerName", container.Name) return false } } @@ -366,7 +366,7 @@ func AllContainersAreWindowsHostProcess(pod *v1.Pod) bool { } // MakePortMappings creates internal port mapping from api port mapping. -func MakePortMappings(container *v1.Container) (ports []PortMapping) { +func MakePortMappings(logger klog.Logger, container *v1.Container) (ports []PortMapping) { names := make(map[string]struct{}) for _, p := range container.Ports { pm := PortMapping{ @@ -395,7 +395,7 @@ func MakePortMappings(container *v1.Container) (ports []PortMapping) { // Protect against a port name being used more than once in a container. if _, ok := names[name]; ok { - klog.InfoS("Port name conflicted, it is defined more than once", "portName", name) + logger.Info("Port name conflicted, it is defined more than once", "portName", name) continue } ports = append(ports, pm) diff --git a/pkg/kubelet/container/helpers_test.go b/pkg/kubelet/container/helpers_test.go index 80abe5b992006..97477a3f0d617 100644 --- a/pkg/kubelet/container/helpers_test.go +++ b/pkg/kubelet/container/helpers_test.go @@ -29,6 +29,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "k8s.io/kubernetes/test/utils/ktesting" "k8s.io/utils/ptr" ) @@ -394,6 +395,7 @@ func TestGetContainerSpec(t *testing.T) { } func TestShouldContainerBeRestarted(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) pod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ UID: "12345678", @@ -463,7 +465,7 @@ func TestShouldContainerBeRestarted(t *testing.T) { for i, policy := range policies { pod.Spec.RestartPolicy = policy e := expected[c.Name][i] - r := ShouldContainerBeRestarted(&c, pod, podStatus) + r := ShouldContainerBeRestarted(logger, &c, pod, podStatus) if r != e { t.Errorf("Restart for container %q with restart policy %q expected %t, got %t", c.Name, policy, e, r) @@ -484,7 +486,7 @@ func TestShouldContainerBeRestarted(t *testing.T) { for i, policy := range policies { pod.Spec.RestartPolicy = policy e := expected[c.Name][i] - r := ShouldContainerBeRestarted(&c, pod, podStatus) + r := ShouldContainerBeRestarted(logger, &c, pod, podStatus) if r != e { t.Errorf("Restart for container %q with restart policy %q expected %t, got %t", c.Name, policy, e, r) @@ -546,6 +548,7 @@ func TestHasPrivilegedContainer(t *testing.T) { } func TestMakePortMappings(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) port := func(name string, protocol v1.Protocol, containerPort, hostPort int32, ip string) v1.ContainerPort { return v1.ContainerPort{ Name: name, @@ -635,7 +638,7 @@ func TestMakePortMappings(t *testing.T) { } for i, tt := range tests { - actual := MakePortMappings(tt.container) + actual := MakePortMappings(logger, tt.container) assert.Equal(t, tt.expectedPortMappings, actual, "[%d]", i) } } diff --git a/pkg/kubelet/container/runtime.go b/pkg/kubelet/container/runtime.go index a6e8fa9c880b8..654aba9f752cf 100644 --- a/pkg/kubelet/container/runtime.go +++ b/pkg/kubelet/container/runtime.go @@ -138,10 +138,13 @@ type Runtime interface { // ListPodSandboxMetrics retrieves the metrics for all pod sandboxes. ListPodSandboxMetrics(ctx context.Context) ([]*runtimeapi.PodSandboxMetrics, error) // GetContainerStatus returns the status for the container. - GetContainerStatus(ctx context.Context, id ContainerID) (*Status, error) + GetContainerStatus(ctx context.Context, podUID types.UID, id ContainerID) (*Status, error) // GetContainerSwapBehavior reports whether a container could be swappable. // This is used to decide whether to handle InPlacePodVerticalScaling for containers. GetContainerSwapBehavior(pod *v1.Pod, container *v1.Container) kubelettypes.SwapBehavior + // IsPodResizeInProgress checks whether the given pod is in the process of resizing + // (allocated resources != actuated resources). + IsPodResizeInProgress(allocatedPod *v1.Pod, podStatus *PodStatus) bool } // StreamingRuntime is the interface implemented by runtimes that handle the serving of the @@ -235,7 +238,10 @@ func BuildContainerID(typ, ID string) ContainerID { func ParseContainerID(containerID string) ContainerID { var id ContainerID if err := id.ParseString(containerID); err != nil { - klog.ErrorS(err, "Parsing containerID failed") + // Use klog.TODO() because we currently do not have a proper logger to pass in. + // This should be replaced with an appropriate logger when refactoring this function to accept a logger parameter. + logger := klog.TODO() + logger.Error(err, "Parsing containerID failed") } return id } diff --git a/pkg/kubelet/container/runtime_cache_fake.go b/pkg/kubelet/container/runtime_cache_fake.go index 4a09b3be923d3..5a313478bfb8e 100644 --- a/pkg/kubelet/container/runtime_cache_fake.go +++ b/pkg/kubelet/container/runtime_cache_fake.go @@ -27,10 +27,10 @@ type TestRuntimeCache struct { } // UpdateCacheWithLock updates the cache with the lock. -func (r *TestRuntimeCache) UpdateCacheWithLock() error { +func (r *TestRuntimeCache) UpdateCacheWithLock(ctx context.Context) error { r.Lock() defer r.Unlock() - return r.updateCache(context.Background()) + return r.updateCache(ctx) } // GetCachedPods returns the cached pods. diff --git a/pkg/kubelet/container/runtime_cache_test.go b/pkg/kubelet/container/runtime_cache_test.go index 84af1d561ef07..a7a0e3146f54b 100644 --- a/pkg/kubelet/container/runtime_cache_test.go +++ b/pkg/kubelet/container/runtime_cache_test.go @@ -17,13 +17,13 @@ limitations under the License. package container_test import ( - "context" "reflect" "testing" "time" . "k8s.io/kubernetes/pkg/kubelet/container" ctest "k8s.io/kubernetes/pkg/kubelet/container/testing" + "k8s.io/kubernetes/test/utils/ktesting" ) func comparePods(t *testing.T, expected []*ctest.FakePod, actual []*Pod) { @@ -38,12 +38,12 @@ func comparePods(t *testing.T, expected []*ctest.FakePod, actual []*Pod) { } func TestGetPods(t *testing.T) { - ctx := context.Background() + tCtx := ktesting.Init(t) runtime := &ctest.FakeRuntime{} expected := []*ctest.FakePod{{Pod: &Pod{ID: "1111"}}, {Pod: &Pod{ID: "2222"}}, {Pod: &Pod{ID: "3333"}}} runtime.PodList = expected cache := NewTestRuntimeCache(runtime) - actual, err := cache.GetPods(ctx) + actual, err := cache.GetPods(tCtx) if err != nil { t.Errorf("unexpected error %v", err) } @@ -52,26 +52,32 @@ func TestGetPods(t *testing.T) { } func TestForceUpdateIfOlder(t *testing.T) { - ctx := context.Background() + tCtx := ktesting.Init(t) runtime := &ctest.FakeRuntime{} cache := NewTestRuntimeCache(runtime) // Cache old pods. oldpods := []*ctest.FakePod{{Pod: &Pod{ID: "1111"}}} runtime.PodList = oldpods - cache.UpdateCacheWithLock() + if err := cache.UpdateCacheWithLock(tCtx); err != nil { + t.Errorf("unexpected error %v", err) + } // Update the runtime to new pods. newpods := []*ctest.FakePod{{Pod: &Pod{ID: "1111"}}, {Pod: &Pod{ID: "2222"}}, {Pod: &Pod{ID: "3333"}}} runtime.PodList = newpods // An older timestamp should not force an update. - cache.ForceUpdateIfOlder(ctx, time.Now().Add(-20*time.Minute)) + if err := cache.ForceUpdateIfOlder(tCtx, time.Now().Add(-20*time.Minute)); err != nil { + t.Errorf("unexpected error %v", err) + } actual := cache.GetCachedPods() comparePods(t, oldpods, actual) // A newer timestamp should force an update. - cache.ForceUpdateIfOlder(ctx, time.Now().Add(20*time.Second)) + if err := cache.ForceUpdateIfOlder(tCtx, time.Now().Add(20*time.Second)); err != nil { + t.Errorf("unexpected error %v", err) + } actual = cache.GetCachedPods() comparePods(t, newpods, actual) } diff --git a/pkg/kubelet/container/testing/fake_cache.go b/pkg/kubelet/container/testing/fake_cache.go index 457a941115359..ad20e7efca657 100644 --- a/pkg/kubelet/container/testing/fake_cache.go +++ b/pkg/kubelet/container/testing/fake_cache.go @@ -33,7 +33,7 @@ func NewFakeCache(runtime container.Runtime) container.Cache { } func (c *fakeCache) Get(id types.UID) (*container.PodStatus, error) { - return c.runtime.GetPodStatus(context.Background(), id, "", "") + return c.runtime.GetPodStatus(context.TODO(), id, "", "") } func (c *fakeCache) GetNewerThan(id types.UID, minTime time.Time) (*container.PodStatus, error) { diff --git a/pkg/kubelet/container/testing/fake_runtime.go b/pkg/kubelet/container/testing/fake_runtime.go index 9d7ef2191d70d..6004a44fdef86 100644 --- a/pkg/kubelet/container/testing/fake_runtime.go +++ b/pkg/kubelet/container/testing/fake_runtime.go @@ -71,8 +71,12 @@ type FakeRuntime struct { // from container runtime. BlockImagePulls bool imagePullTokenBucket chan bool - SwapBehavior map[string]kubetypes.SwapBehavior - T TB + // imagePullErrBucket sends an error to a PullImage() call + // blocked by BlockImagePulls. This is used to simulate + // a failure in some of the parallel pull image calls. + imagePullErrBucket chan error + SwapBehavior map[string]kubetypes.SwapBehavior + T TB } const FakeHost = "localhost:12345" @@ -318,6 +322,30 @@ func (f *FakeRuntime) GetContainerLogs(_ context.Context, pod *v1.Pod, container func (f *FakeRuntime) PullImage(ctx context.Context, image kubecontainer.ImageSpec, creds []credentialprovider.TrackedAuthConfig, podSandboxConfig *runtimeapi.PodSandboxConfig) (string, *credentialprovider.TrackedAuthConfig, error) { f.Lock() f.CalledFunctions = append(f.CalledFunctions, "PullImage") + + if f.imagePullTokenBucket == nil { + f.imagePullTokenBucket = make(chan bool, 1) + } + if f.imagePullErrBucket == nil { + f.imagePullErrBucket = make(chan error, 1) + } + + blockImagePulls := f.BlockImagePulls + f.Unlock() + + if blockImagePulls { + // Block the function before adding the image to f.ImageList + select { + case <-ctx.Done(): + case <-f.imagePullTokenBucket: + case pullImageErr := <-f.imagePullErrBucket: + return "", nil, pullImageErr + } + } + + f.Lock() + defer f.Unlock() + if f.Err == nil { i := kubecontainer.Image{ ID: image.Image, @@ -332,23 +360,7 @@ func (f *FakeRuntime) PullImage(ctx context.Context, image kubecontainer.ImageSp retCreds = &creds[0] } - if !f.BlockImagePulls { - f.Unlock() - return image.Image, retCreds, f.Err - } - - retErr := f.Err - if f.imagePullTokenBucket == nil { - f.imagePullTokenBucket = make(chan bool, 1) - } - // Unlock before waiting for UnblockImagePulls calls, to avoid deadlock. - f.Unlock() - select { - case <-ctx.Done(): - case <-f.imagePullTokenBucket: - } - - return image.Image, retCreds, retErr + return image.Image, retCreds, f.Err } // UnblockImagePulls unblocks a certain number of image pulls, if BlockImagePulls is true. @@ -363,6 +375,17 @@ func (f *FakeRuntime) UnblockImagePulls(count int) { } } +// SendImagePullError sends an error to a PullImage() call blocked by BlockImagePulls. +// PullImage() immediately returns after receiving the error. +func (f *FakeRuntime) SendImagePullError(err error) { + if f.imagePullErrBucket != nil { + select { + case f.imagePullErrBucket <- err: + default: + } + } +} + func (f *FakeRuntime) GetImageRef(_ context.Context, image kubecontainer.ImageSpec) (string, error) { f.Lock() defer f.Unlock() @@ -531,7 +554,7 @@ func (f *FakeContainerCommandRunner) RunInContainer(_ context.Context, container return []byte(f.Stdout), f.Err } -func (f *FakeRuntime) GetContainerStatus(_ context.Context, _ kubecontainer.ContainerID) (status *kubecontainer.Status, err error) { +func (f *FakeRuntime) GetContainerStatus(_ context.Context, _ types.UID, _ kubecontainer.ContainerID) (status *kubecontainer.Status, err error) { f.Lock() defer f.Unlock() @@ -545,3 +568,7 @@ func (f *FakeRuntime) GetContainerSwapBehavior(pod *v1.Pod, container *v1.Contai } return kubetypes.NoSwap } + +func (f *FakeRuntime) IsPodResizeInProgress(allocatedPod *v1.Pod, podStatus *kubecontainer.PodStatus) bool { + return false +} diff --git a/pkg/kubelet/container/testing/mock_runtime_cache.go b/pkg/kubelet/container/testing/mock_runtime_cache.go deleted file mode 100644 index fac6ffa311952..0000000000000 --- a/pkg/kubelet/container/testing/mock_runtime_cache.go +++ /dev/null @@ -1,161 +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 mockery v2.53.3. DO NOT EDIT. - -package testing - -import ( - context "context" - - container "k8s.io/kubernetes/pkg/kubelet/container" - - mock "github.com/stretchr/testify/mock" - - time "time" -) - -// MockRuntimeCache is an autogenerated mock type for the RuntimeCache type -type MockRuntimeCache struct { - mock.Mock -} - -type MockRuntimeCache_Expecter struct { - mock *mock.Mock -} - -func (_m *MockRuntimeCache) EXPECT() *MockRuntimeCache_Expecter { - return &MockRuntimeCache_Expecter{mock: &_m.Mock} -} - -// ForceUpdateIfOlder provides a mock function with given fields: _a0, _a1 -func (_m *MockRuntimeCache) ForceUpdateIfOlder(_a0 context.Context, _a1 time.Time) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for ForceUpdateIfOlder") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, time.Time) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRuntimeCache_ForceUpdateIfOlder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForceUpdateIfOlder' -type MockRuntimeCache_ForceUpdateIfOlder_Call struct { - *mock.Call -} - -// ForceUpdateIfOlder is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 time.Time -func (_e *MockRuntimeCache_Expecter) ForceUpdateIfOlder(_a0 interface{}, _a1 interface{}) *MockRuntimeCache_ForceUpdateIfOlder_Call { - return &MockRuntimeCache_ForceUpdateIfOlder_Call{Call: _e.mock.On("ForceUpdateIfOlder", _a0, _a1)} -} - -func (_c *MockRuntimeCache_ForceUpdateIfOlder_Call) Run(run func(_a0 context.Context, _a1 time.Time)) *MockRuntimeCache_ForceUpdateIfOlder_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(time.Time)) - }) - return _c -} - -func (_c *MockRuntimeCache_ForceUpdateIfOlder_Call) Return(_a0 error) *MockRuntimeCache_ForceUpdateIfOlder_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRuntimeCache_ForceUpdateIfOlder_Call) RunAndReturn(run func(context.Context, time.Time) error) *MockRuntimeCache_ForceUpdateIfOlder_Call { - _c.Call.Return(run) - return _c -} - -// GetPods provides a mock function with given fields: _a0 -func (_m *MockRuntimeCache) GetPods(_a0 context.Context) ([]*container.Pod, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetPods") - } - - var r0 []*container.Pod - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]*container.Pod, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) []*container.Pod); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*container.Pod) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRuntimeCache_GetPods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPods' -type MockRuntimeCache_GetPods_Call struct { - *mock.Call -} - -// GetPods is a helper method to define mock.On call -// - _a0 context.Context -func (_e *MockRuntimeCache_Expecter) GetPods(_a0 interface{}) *MockRuntimeCache_GetPods_Call { - return &MockRuntimeCache_GetPods_Call{Call: _e.mock.On("GetPods", _a0)} -} - -func (_c *MockRuntimeCache_GetPods_Call) Run(run func(_a0 context.Context)) *MockRuntimeCache_GetPods_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockRuntimeCache_GetPods_Call) Return(_a0 []*container.Pod, _a1 error) *MockRuntimeCache_GetPods_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRuntimeCache_GetPods_Call) RunAndReturn(run func(context.Context) ([]*container.Pod, error)) *MockRuntimeCache_GetPods_Call { - _c.Call.Return(run) - return _c -} - -// NewMockRuntimeCache creates a new instance of MockRuntimeCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockRuntimeCache(t interface { - mock.TestingT - Cleanup(func()) -}) *MockRuntimeCache { - mock := &MockRuntimeCache{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/container/testing/mockdirentry.go b/pkg/kubelet/container/testing/mockdirentry.go index 596f914614c26..a467ae7880ce8 100644 --- a/pkg/kubelet/container/testing/mockdirentry.go +++ b/pkg/kubelet/container/testing/mockdirentry.go @@ -14,16 +14,32 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by mockery v2.53.3. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package testing import ( - fs "io/fs" + "io/fs" mock "github.com/stretchr/testify/mock" ) +// NewMockDirEntry creates a new instance of MockDirEntry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockDirEntry(t interface { + mock.TestingT + Cleanup(func()) +}) *MockDirEntry { + mock := &MockDirEntry{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockDirEntry is an autogenerated mock type for the DirEntry type type MockDirEntry struct { mock.Mock @@ -37,9 +53,9 @@ func (_m *MockDirEntry) EXPECT() *MockDirEntry_Expecter { return &MockDirEntry_Expecter{mock: &_m.Mock} } -// Info provides a mock function with no fields -func (_m *MockDirEntry) Info() (fs.FileInfo, error) { - ret := _m.Called() +// Info provides a mock function for the type MockDirEntry +func (_mock *MockDirEntry) Info() (fs.FileInfo, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Info") @@ -47,23 +63,21 @@ func (_m *MockDirEntry) Info() (fs.FileInfo, error) { var r0 fs.FileInfo var r1 error - if rf, ok := ret.Get(0).(func() (fs.FileInfo, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (fs.FileInfo, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() fs.FileInfo); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() fs.FileInfo); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(fs.FileInfo) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -84,8 +98,8 @@ func (_c *MockDirEntry_Info_Call) Run(run func()) *MockDirEntry_Info_Call { return _c } -func (_c *MockDirEntry_Info_Call) Return(_a0 fs.FileInfo, _a1 error) *MockDirEntry_Info_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDirEntry_Info_Call) Return(fileInfo fs.FileInfo, err error) *MockDirEntry_Info_Call { + _c.Call.Return(fileInfo, err) return _c } @@ -94,21 +108,20 @@ func (_c *MockDirEntry_Info_Call) RunAndReturn(run func() (fs.FileInfo, error)) return _c } -// IsDir provides a mock function with no fields -func (_m *MockDirEntry) IsDir() bool { - ret := _m.Called() +// IsDir provides a mock function for the type MockDirEntry +func (_mock *MockDirEntry) IsDir() bool { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for IsDir") } var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - return r0 } @@ -129,8 +142,8 @@ func (_c *MockDirEntry_IsDir_Call) Run(run func()) *MockDirEntry_IsDir_Call { return _c } -func (_c *MockDirEntry_IsDir_Call) Return(_a0 bool) *MockDirEntry_IsDir_Call { - _c.Call.Return(_a0) +func (_c *MockDirEntry_IsDir_Call) Return(b bool) *MockDirEntry_IsDir_Call { + _c.Call.Return(b) return _c } @@ -139,21 +152,20 @@ func (_c *MockDirEntry_IsDir_Call) RunAndReturn(run func() bool) *MockDirEntry_I return _c } -// Name provides a mock function with no fields -func (_m *MockDirEntry) Name() string { - ret := _m.Called() +// Name provides a mock function for the type MockDirEntry +func (_mock *MockDirEntry) Name() string { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Name") } var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - return r0 } @@ -174,8 +186,8 @@ func (_c *MockDirEntry_Name_Call) Run(run func()) *MockDirEntry_Name_Call { return _c } -func (_c *MockDirEntry_Name_Call) Return(_a0 string) *MockDirEntry_Name_Call { - _c.Call.Return(_a0) +func (_c *MockDirEntry_Name_Call) Return(s string) *MockDirEntry_Name_Call { + _c.Call.Return(s) return _c } @@ -184,21 +196,20 @@ func (_c *MockDirEntry_Name_Call) RunAndReturn(run func() string) *MockDirEntry_ return _c } -// Type provides a mock function with no fields -func (_m *MockDirEntry) Type() fs.FileMode { - ret := _m.Called() +// Type provides a mock function for the type MockDirEntry +func (_mock *MockDirEntry) Type() fs.FileMode { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Type") } var r0 fs.FileMode - if rf, ok := ret.Get(0).(func() fs.FileMode); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() fs.FileMode); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(fs.FileMode) } - return r0 } @@ -219,8 +230,8 @@ func (_c *MockDirEntry_Type_Call) Run(run func()) *MockDirEntry_Type_Call { return _c } -func (_c *MockDirEntry_Type_Call) Return(_a0 fs.FileMode) *MockDirEntry_Type_Call { - _c.Call.Return(_a0) +func (_c *MockDirEntry_Type_Call) Return(fileMode fs.FileMode) *MockDirEntry_Type_Call { + _c.Call.Return(fileMode) return _c } @@ -228,17 +239,3 @@ func (_c *MockDirEntry_Type_Call) RunAndReturn(run func() fs.FileMode) *MockDirE _c.Call.Return(run) return _c } - -// NewMockDirEntry creates a new instance of MockDirEntry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockDirEntry(t interface { - mock.TestingT - Cleanup(func()) -}) *MockDirEntry { - mock := &MockDirEntry{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/container/testing/mocks.go b/pkg/kubelet/container/testing/mocks.go new file mode 100644 index 0000000000000..1627136ccc42d --- /dev/null +++ b/pkg/kubelet/container/testing/mocks.go @@ -0,0 +1,1871 @@ +/* +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 mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package testing + +import ( + "context" + "io" + "time" + + mock "github.com/stretchr/testify/mock" + v10 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/util/flowcontrol" + "k8s.io/cri-api/pkg/apis/runtime/v1" + "k8s.io/kubernetes/pkg/credentialprovider" + "k8s.io/kubernetes/pkg/kubelet/container" + types0 "k8s.io/kubernetes/pkg/kubelet/types" +) + +// NewMockRuntime creates a new instance of MockRuntime. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockRuntime(t interface { + mock.TestingT + Cleanup(func()) +}) *MockRuntime { + mock := &MockRuntime{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockRuntime is an autogenerated mock type for the Runtime type +type MockRuntime struct { + mock.Mock +} + +type MockRuntime_Expecter struct { + mock *mock.Mock +} + +func (_m *MockRuntime) EXPECT() *MockRuntime_Expecter { + return &MockRuntime_Expecter{mock: &_m.Mock} +} + +// APIVersion provides a mock function for the type MockRuntime +func (_mock *MockRuntime) APIVersion() (container.Version, error) { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for APIVersion") + } + + var r0 container.Version + var r1 error + if returnFunc, ok := ret.Get(0).(func() (container.Version, error)); ok { + return returnFunc() + } + if returnFunc, ok := ret.Get(0).(func() container.Version); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(container.Version) + } + } + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRuntime_APIVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'APIVersion' +type MockRuntime_APIVersion_Call struct { + *mock.Call +} + +// APIVersion is a helper method to define mock.On call +func (_e *MockRuntime_Expecter) APIVersion() *MockRuntime_APIVersion_Call { + return &MockRuntime_APIVersion_Call{Call: _e.mock.On("APIVersion")} +} + +func (_c *MockRuntime_APIVersion_Call) Run(run func()) *MockRuntime_APIVersion_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockRuntime_APIVersion_Call) Return(version container.Version, err error) *MockRuntime_APIVersion_Call { + _c.Call.Return(version, err) + return _c +} + +func (_c *MockRuntime_APIVersion_Call) RunAndReturn(run func() (container.Version, error)) *MockRuntime_APIVersion_Call { + _c.Call.Return(run) + return _c +} + +// CheckpointContainer provides a mock function for the type MockRuntime +func (_mock *MockRuntime) CheckpointContainer(ctx context.Context, options *v1.CheckpointContainerRequest) error { + ret := _mock.Called(ctx, options) + + if len(ret) == 0 { + panic("no return value specified for CheckpointContainer") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.CheckpointContainerRequest) error); ok { + r0 = returnFunc(ctx, options) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockRuntime_CheckpointContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckpointContainer' +type MockRuntime_CheckpointContainer_Call struct { + *mock.Call +} + +// CheckpointContainer is a helper method to define mock.On call +// - ctx context.Context +// - options *v1.CheckpointContainerRequest +func (_e *MockRuntime_Expecter) CheckpointContainer(ctx interface{}, options interface{}) *MockRuntime_CheckpointContainer_Call { + return &MockRuntime_CheckpointContainer_Call{Call: _e.mock.On("CheckpointContainer", ctx, options)} +} + +func (_c *MockRuntime_CheckpointContainer_Call) Run(run func(ctx context.Context, options *v1.CheckpointContainerRequest)) *MockRuntime_CheckpointContainer_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v1.CheckpointContainerRequest + if args[1] != nil { + arg1 = args[1].(*v1.CheckpointContainerRequest) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRuntime_CheckpointContainer_Call) Return(err error) *MockRuntime_CheckpointContainer_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockRuntime_CheckpointContainer_Call) RunAndReturn(run func(ctx context.Context, options *v1.CheckpointContainerRequest) error) *MockRuntime_CheckpointContainer_Call { + _c.Call.Return(run) + return _c +} + +// DeleteContainer provides a mock function for the type MockRuntime +func (_mock *MockRuntime) DeleteContainer(ctx context.Context, containerID container.ContainerID) error { + ret := _mock.Called(ctx, containerID) + + if len(ret) == 0 { + panic("no return value specified for DeleteContainer") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, container.ContainerID) error); ok { + r0 = returnFunc(ctx, containerID) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockRuntime_DeleteContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteContainer' +type MockRuntime_DeleteContainer_Call struct { + *mock.Call +} + +// DeleteContainer is a helper method to define mock.On call +// - ctx context.Context +// - containerID container.ContainerID +func (_e *MockRuntime_Expecter) DeleteContainer(ctx interface{}, containerID interface{}) *MockRuntime_DeleteContainer_Call { + return &MockRuntime_DeleteContainer_Call{Call: _e.mock.On("DeleteContainer", ctx, containerID)} +} + +func (_c *MockRuntime_DeleteContainer_Call) Run(run func(ctx context.Context, containerID container.ContainerID)) *MockRuntime_DeleteContainer_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 container.ContainerID + if args[1] != nil { + arg1 = args[1].(container.ContainerID) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRuntime_DeleteContainer_Call) Return(err error) *MockRuntime_DeleteContainer_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockRuntime_DeleteContainer_Call) RunAndReturn(run func(ctx context.Context, containerID container.ContainerID) error) *MockRuntime_DeleteContainer_Call { + _c.Call.Return(run) + return _c +} + +// GarbageCollect provides a mock function for the type MockRuntime +func (_mock *MockRuntime) GarbageCollect(ctx context.Context, gcPolicy container.GCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error { + ret := _mock.Called(ctx, gcPolicy, allSourcesReady, evictNonDeletedPods) + + if len(ret) == 0 { + panic("no return value specified for GarbageCollect") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, container.GCPolicy, bool, bool) error); ok { + r0 = returnFunc(ctx, gcPolicy, allSourcesReady, evictNonDeletedPods) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockRuntime_GarbageCollect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GarbageCollect' +type MockRuntime_GarbageCollect_Call struct { + *mock.Call +} + +// GarbageCollect is a helper method to define mock.On call +// - ctx context.Context +// - gcPolicy container.GCPolicy +// - allSourcesReady bool +// - evictNonDeletedPods bool +func (_e *MockRuntime_Expecter) GarbageCollect(ctx interface{}, gcPolicy interface{}, allSourcesReady interface{}, evictNonDeletedPods interface{}) *MockRuntime_GarbageCollect_Call { + return &MockRuntime_GarbageCollect_Call{Call: _e.mock.On("GarbageCollect", ctx, gcPolicy, allSourcesReady, evictNonDeletedPods)} +} + +func (_c *MockRuntime_GarbageCollect_Call) Run(run func(ctx context.Context, gcPolicy container.GCPolicy, allSourcesReady bool, evictNonDeletedPods bool)) *MockRuntime_GarbageCollect_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 container.GCPolicy + if args[1] != nil { + arg1 = args[1].(container.GCPolicy) + } + var arg2 bool + if args[2] != nil { + arg2 = args[2].(bool) + } + var arg3 bool + if args[3] != nil { + arg3 = args[3].(bool) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockRuntime_GarbageCollect_Call) Return(err error) *MockRuntime_GarbageCollect_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockRuntime_GarbageCollect_Call) RunAndReturn(run func(ctx context.Context, gcPolicy container.GCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error) *MockRuntime_GarbageCollect_Call { + _c.Call.Return(run) + return _c +} + +// GeneratePodStatus provides a mock function for the type MockRuntime +func (_mock *MockRuntime) GeneratePodStatus(event *v1.ContainerEventResponse) *container.PodStatus { + ret := _mock.Called(event) + + if len(ret) == 0 { + panic("no return value specified for GeneratePodStatus") + } + + var r0 *container.PodStatus + if returnFunc, ok := ret.Get(0).(func(*v1.ContainerEventResponse) *container.PodStatus); ok { + r0 = returnFunc(event) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*container.PodStatus) + } + } + return r0 +} + +// MockRuntime_GeneratePodStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GeneratePodStatus' +type MockRuntime_GeneratePodStatus_Call struct { + *mock.Call +} + +// GeneratePodStatus is a helper method to define mock.On call +// - event *v1.ContainerEventResponse +func (_e *MockRuntime_Expecter) GeneratePodStatus(event interface{}) *MockRuntime_GeneratePodStatus_Call { + return &MockRuntime_GeneratePodStatus_Call{Call: _e.mock.On("GeneratePodStatus", event)} +} + +func (_c *MockRuntime_GeneratePodStatus_Call) Run(run func(event *v1.ContainerEventResponse)) *MockRuntime_GeneratePodStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *v1.ContainerEventResponse + if args[0] != nil { + arg0 = args[0].(*v1.ContainerEventResponse) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockRuntime_GeneratePodStatus_Call) Return(podStatus *container.PodStatus) *MockRuntime_GeneratePodStatus_Call { + _c.Call.Return(podStatus) + return _c +} + +func (_c *MockRuntime_GeneratePodStatus_Call) RunAndReturn(run func(event *v1.ContainerEventResponse) *container.PodStatus) *MockRuntime_GeneratePodStatus_Call { + _c.Call.Return(run) + return _c +} + +// GetContainerLogs provides a mock function for the type MockRuntime +func (_mock *MockRuntime) GetContainerLogs(ctx context.Context, pod *v10.Pod, containerID container.ContainerID, logOptions *v10.PodLogOptions, stdout io.Writer, stderr io.Writer) error { + ret := _mock.Called(ctx, pod, containerID, logOptions, stdout, stderr) + + if len(ret) == 0 { + panic("no return value specified for GetContainerLogs") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.Pod, container.ContainerID, *v10.PodLogOptions, io.Writer, io.Writer) error); ok { + r0 = returnFunc(ctx, pod, containerID, logOptions, stdout, stderr) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockRuntime_GetContainerLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetContainerLogs' +type MockRuntime_GetContainerLogs_Call struct { + *mock.Call +} + +// GetContainerLogs is a helper method to define mock.On call +// - ctx context.Context +// - pod *v10.Pod +// - containerID container.ContainerID +// - logOptions *v10.PodLogOptions +// - stdout io.Writer +// - stderr io.Writer +func (_e *MockRuntime_Expecter) GetContainerLogs(ctx interface{}, pod interface{}, containerID interface{}, logOptions interface{}, stdout interface{}, stderr interface{}) *MockRuntime_GetContainerLogs_Call { + return &MockRuntime_GetContainerLogs_Call{Call: _e.mock.On("GetContainerLogs", ctx, pod, containerID, logOptions, stdout, stderr)} +} + +func (_c *MockRuntime_GetContainerLogs_Call) Run(run func(ctx context.Context, pod *v10.Pod, containerID container.ContainerID, logOptions *v10.PodLogOptions, stdout io.Writer, stderr io.Writer)) *MockRuntime_GetContainerLogs_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v10.Pod + if args[1] != nil { + arg1 = args[1].(*v10.Pod) + } + var arg2 container.ContainerID + if args[2] != nil { + arg2 = args[2].(container.ContainerID) + } + var arg3 *v10.PodLogOptions + if args[3] != nil { + arg3 = args[3].(*v10.PodLogOptions) + } + var arg4 io.Writer + if args[4] != nil { + arg4 = args[4].(io.Writer) + } + var arg5 io.Writer + if args[5] != nil { + arg5 = args[5].(io.Writer) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) + }) + return _c +} + +func (_c *MockRuntime_GetContainerLogs_Call) Return(err error) *MockRuntime_GetContainerLogs_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockRuntime_GetContainerLogs_Call) RunAndReturn(run func(ctx context.Context, pod *v10.Pod, containerID container.ContainerID, logOptions *v10.PodLogOptions, stdout io.Writer, stderr io.Writer) error) *MockRuntime_GetContainerLogs_Call { + _c.Call.Return(run) + return _c +} + +// GetContainerStatus provides a mock function for the type MockRuntime +func (_mock *MockRuntime) GetContainerStatus(ctx context.Context, podUID types.UID, id container.ContainerID) (*container.Status, error) { + ret := _mock.Called(ctx, podUID, id) + + if len(ret) == 0 { + panic("no return value specified for GetContainerStatus") + } + + var r0 *container.Status + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, types.UID, container.ContainerID) (*container.Status, error)); ok { + return returnFunc(ctx, podUID, id) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, types.UID, container.ContainerID) *container.Status); ok { + r0 = returnFunc(ctx, podUID, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*container.Status) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, types.UID, container.ContainerID) error); ok { + r1 = returnFunc(ctx, podUID, id) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRuntime_GetContainerStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetContainerStatus' +type MockRuntime_GetContainerStatus_Call struct { + *mock.Call +} + +// GetContainerStatus is a helper method to define mock.On call +// - ctx context.Context +// - podUID types.UID +// - id container.ContainerID +func (_e *MockRuntime_Expecter) GetContainerStatus(ctx interface{}, podUID interface{}, id interface{}) *MockRuntime_GetContainerStatus_Call { + return &MockRuntime_GetContainerStatus_Call{Call: _e.mock.On("GetContainerStatus", ctx, podUID, id)} +} + +func (_c *MockRuntime_GetContainerStatus_Call) Run(run func(ctx context.Context, podUID types.UID, id container.ContainerID)) *MockRuntime_GetContainerStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 types.UID + if args[1] != nil { + arg1 = args[1].(types.UID) + } + var arg2 container.ContainerID + if args[2] != nil { + arg2 = args[2].(container.ContainerID) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockRuntime_GetContainerStatus_Call) Return(status *container.Status, err error) *MockRuntime_GetContainerStatus_Call { + _c.Call.Return(status, err) + return _c +} + +func (_c *MockRuntime_GetContainerStatus_Call) RunAndReturn(run func(ctx context.Context, podUID types.UID, id container.ContainerID) (*container.Status, error)) *MockRuntime_GetContainerStatus_Call { + _c.Call.Return(run) + return _c +} + +// GetContainerSwapBehavior provides a mock function for the type MockRuntime +func (_mock *MockRuntime) GetContainerSwapBehavior(pod *v10.Pod, container1 *v10.Container) types0.SwapBehavior { + ret := _mock.Called(pod, container1) + + if len(ret) == 0 { + panic("no return value specified for GetContainerSwapBehavior") + } + + var r0 types0.SwapBehavior + if returnFunc, ok := ret.Get(0).(func(*v10.Pod, *v10.Container) types0.SwapBehavior); ok { + r0 = returnFunc(pod, container1) + } else { + r0 = ret.Get(0).(types0.SwapBehavior) + } + return r0 +} + +// MockRuntime_GetContainerSwapBehavior_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetContainerSwapBehavior' +type MockRuntime_GetContainerSwapBehavior_Call struct { + *mock.Call +} + +// GetContainerSwapBehavior is a helper method to define mock.On call +// - pod *v10.Pod +// - container1 *v10.Container +func (_e *MockRuntime_Expecter) GetContainerSwapBehavior(pod interface{}, container1 interface{}) *MockRuntime_GetContainerSwapBehavior_Call { + return &MockRuntime_GetContainerSwapBehavior_Call{Call: _e.mock.On("GetContainerSwapBehavior", pod, container1)} +} + +func (_c *MockRuntime_GetContainerSwapBehavior_Call) Run(run func(pod *v10.Pod, container1 *v10.Container)) *MockRuntime_GetContainerSwapBehavior_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *v10.Pod + if args[0] != nil { + arg0 = args[0].(*v10.Pod) + } + var arg1 *v10.Container + if args[1] != nil { + arg1 = args[1].(*v10.Container) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRuntime_GetContainerSwapBehavior_Call) Return(swapBehavior types0.SwapBehavior) *MockRuntime_GetContainerSwapBehavior_Call { + _c.Call.Return(swapBehavior) + return _c +} + +func (_c *MockRuntime_GetContainerSwapBehavior_Call) RunAndReturn(run func(pod *v10.Pod, container1 *v10.Container) types0.SwapBehavior) *MockRuntime_GetContainerSwapBehavior_Call { + _c.Call.Return(run) + return _c +} + +// GetImageRef provides a mock function for the type MockRuntime +func (_mock *MockRuntime) GetImageRef(ctx context.Context, image container.ImageSpec) (string, error) { + ret := _mock.Called(ctx, image) + + if len(ret) == 0 { + panic("no return value specified for GetImageRef") + } + + var r0 string + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, container.ImageSpec) (string, error)); ok { + return returnFunc(ctx, image) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, container.ImageSpec) string); ok { + r0 = returnFunc(ctx, image) + } else { + r0 = ret.Get(0).(string) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, container.ImageSpec) error); ok { + r1 = returnFunc(ctx, image) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRuntime_GetImageRef_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetImageRef' +type MockRuntime_GetImageRef_Call struct { + *mock.Call +} + +// GetImageRef is a helper method to define mock.On call +// - ctx context.Context +// - image container.ImageSpec +func (_e *MockRuntime_Expecter) GetImageRef(ctx interface{}, image interface{}) *MockRuntime_GetImageRef_Call { + return &MockRuntime_GetImageRef_Call{Call: _e.mock.On("GetImageRef", ctx, image)} +} + +func (_c *MockRuntime_GetImageRef_Call) Run(run func(ctx context.Context, image container.ImageSpec)) *MockRuntime_GetImageRef_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 container.ImageSpec + if args[1] != nil { + arg1 = args[1].(container.ImageSpec) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRuntime_GetImageRef_Call) Return(s string, err error) *MockRuntime_GetImageRef_Call { + _c.Call.Return(s, err) + return _c +} + +func (_c *MockRuntime_GetImageRef_Call) RunAndReturn(run func(ctx context.Context, image container.ImageSpec) (string, error)) *MockRuntime_GetImageRef_Call { + _c.Call.Return(run) + return _c +} + +// GetImageSize provides a mock function for the type MockRuntime +func (_mock *MockRuntime) GetImageSize(ctx context.Context, image container.ImageSpec) (uint64, error) { + ret := _mock.Called(ctx, image) + + if len(ret) == 0 { + panic("no return value specified for GetImageSize") + } + + var r0 uint64 + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, container.ImageSpec) (uint64, error)); ok { + return returnFunc(ctx, image) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, container.ImageSpec) uint64); ok { + r0 = returnFunc(ctx, image) + } else { + r0 = ret.Get(0).(uint64) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, container.ImageSpec) error); ok { + r1 = returnFunc(ctx, image) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRuntime_GetImageSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetImageSize' +type MockRuntime_GetImageSize_Call struct { + *mock.Call +} + +// GetImageSize is a helper method to define mock.On call +// - ctx context.Context +// - image container.ImageSpec +func (_e *MockRuntime_Expecter) GetImageSize(ctx interface{}, image interface{}) *MockRuntime_GetImageSize_Call { + return &MockRuntime_GetImageSize_Call{Call: _e.mock.On("GetImageSize", ctx, image)} +} + +func (_c *MockRuntime_GetImageSize_Call) Run(run func(ctx context.Context, image container.ImageSpec)) *MockRuntime_GetImageSize_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 container.ImageSpec + if args[1] != nil { + arg1 = args[1].(container.ImageSpec) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRuntime_GetImageSize_Call) Return(v uint64, err error) *MockRuntime_GetImageSize_Call { + _c.Call.Return(v, err) + return _c +} + +func (_c *MockRuntime_GetImageSize_Call) RunAndReturn(run func(ctx context.Context, image container.ImageSpec) (uint64, error)) *MockRuntime_GetImageSize_Call { + _c.Call.Return(run) + return _c +} + +// GetPodStatus provides a mock function for the type MockRuntime +func (_mock *MockRuntime) GetPodStatus(ctx context.Context, uid types.UID, name string, namespace string) (*container.PodStatus, error) { + ret := _mock.Called(ctx, uid, name, namespace) + + if len(ret) == 0 { + panic("no return value specified for GetPodStatus") + } + + var r0 *container.PodStatus + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, types.UID, string, string) (*container.PodStatus, error)); ok { + return returnFunc(ctx, uid, name, namespace) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, types.UID, string, string) *container.PodStatus); ok { + r0 = returnFunc(ctx, uid, name, namespace) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*container.PodStatus) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, types.UID, string, string) error); ok { + r1 = returnFunc(ctx, uid, name, namespace) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRuntime_GetPodStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPodStatus' +type MockRuntime_GetPodStatus_Call struct { + *mock.Call +} + +// GetPodStatus is a helper method to define mock.On call +// - ctx context.Context +// - uid types.UID +// - name string +// - namespace string +func (_e *MockRuntime_Expecter) GetPodStatus(ctx interface{}, uid interface{}, name interface{}, namespace interface{}) *MockRuntime_GetPodStatus_Call { + return &MockRuntime_GetPodStatus_Call{Call: _e.mock.On("GetPodStatus", ctx, uid, name, namespace)} +} + +func (_c *MockRuntime_GetPodStatus_Call) Run(run func(ctx context.Context, uid types.UID, name string, namespace string)) *MockRuntime_GetPodStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 types.UID + if args[1] != nil { + arg1 = args[1].(types.UID) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockRuntime_GetPodStatus_Call) Return(podStatus *container.PodStatus, err error) *MockRuntime_GetPodStatus_Call { + _c.Call.Return(podStatus, err) + return _c +} + +func (_c *MockRuntime_GetPodStatus_Call) RunAndReturn(run func(ctx context.Context, uid types.UID, name string, namespace string) (*container.PodStatus, error)) *MockRuntime_GetPodStatus_Call { + _c.Call.Return(run) + return _c +} + +// GetPods provides a mock function for the type MockRuntime +func (_mock *MockRuntime) GetPods(ctx context.Context, all bool) ([]*container.Pod, error) { + ret := _mock.Called(ctx, all) + + if len(ret) == 0 { + panic("no return value specified for GetPods") + } + + var r0 []*container.Pod + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, bool) ([]*container.Pod, error)); ok { + return returnFunc(ctx, all) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, bool) []*container.Pod); ok { + r0 = returnFunc(ctx, all) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*container.Pod) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, bool) error); ok { + r1 = returnFunc(ctx, all) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRuntime_GetPods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPods' +type MockRuntime_GetPods_Call struct { + *mock.Call +} + +// GetPods is a helper method to define mock.On call +// - ctx context.Context +// - all bool +func (_e *MockRuntime_Expecter) GetPods(ctx interface{}, all interface{}) *MockRuntime_GetPods_Call { + return &MockRuntime_GetPods_Call{Call: _e.mock.On("GetPods", ctx, all)} +} + +func (_c *MockRuntime_GetPods_Call) Run(run func(ctx context.Context, all bool)) *MockRuntime_GetPods_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 bool + if args[1] != nil { + arg1 = args[1].(bool) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRuntime_GetPods_Call) Return(pods []*container.Pod, err error) *MockRuntime_GetPods_Call { + _c.Call.Return(pods, err) + return _c +} + +func (_c *MockRuntime_GetPods_Call) RunAndReturn(run func(ctx context.Context, all bool) ([]*container.Pod, error)) *MockRuntime_GetPods_Call { + _c.Call.Return(run) + return _c +} + +// ImageFsInfo provides a mock function for the type MockRuntime +func (_mock *MockRuntime) ImageFsInfo(ctx context.Context) (*v1.ImageFsInfoResponse, error) { + ret := _mock.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for ImageFsInfo") + } + + var r0 *v1.ImageFsInfoResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context) (*v1.ImageFsInfoResponse, error)); ok { + return returnFunc(ctx) + } + if returnFunc, ok := ret.Get(0).(func(context.Context) *v1.ImageFsInfoResponse); ok { + r0 = returnFunc(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v1.ImageFsInfoResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRuntime_ImageFsInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ImageFsInfo' +type MockRuntime_ImageFsInfo_Call struct { + *mock.Call +} + +// ImageFsInfo is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockRuntime_Expecter) ImageFsInfo(ctx interface{}) *MockRuntime_ImageFsInfo_Call { + return &MockRuntime_ImageFsInfo_Call{Call: _e.mock.On("ImageFsInfo", ctx)} +} + +func (_c *MockRuntime_ImageFsInfo_Call) Run(run func(ctx context.Context)) *MockRuntime_ImageFsInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockRuntime_ImageFsInfo_Call) Return(imageFsInfoResponse *v1.ImageFsInfoResponse, err error) *MockRuntime_ImageFsInfo_Call { + _c.Call.Return(imageFsInfoResponse, err) + return _c +} + +func (_c *MockRuntime_ImageFsInfo_Call) RunAndReturn(run func(ctx context.Context) (*v1.ImageFsInfoResponse, error)) *MockRuntime_ImageFsInfo_Call { + _c.Call.Return(run) + return _c +} + +// ImageStats provides a mock function for the type MockRuntime +func (_mock *MockRuntime) ImageStats(ctx context.Context) (*container.ImageStats, error) { + ret := _mock.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for ImageStats") + } + + var r0 *container.ImageStats + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context) (*container.ImageStats, error)); ok { + return returnFunc(ctx) + } + if returnFunc, ok := ret.Get(0).(func(context.Context) *container.ImageStats); ok { + r0 = returnFunc(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*container.ImageStats) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRuntime_ImageStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ImageStats' +type MockRuntime_ImageStats_Call struct { + *mock.Call +} + +// ImageStats is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockRuntime_Expecter) ImageStats(ctx interface{}) *MockRuntime_ImageStats_Call { + return &MockRuntime_ImageStats_Call{Call: _e.mock.On("ImageStats", ctx)} +} + +func (_c *MockRuntime_ImageStats_Call) Run(run func(ctx context.Context)) *MockRuntime_ImageStats_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockRuntime_ImageStats_Call) Return(imageStats *container.ImageStats, err error) *MockRuntime_ImageStats_Call { + _c.Call.Return(imageStats, err) + return _c +} + +func (_c *MockRuntime_ImageStats_Call) RunAndReturn(run func(ctx context.Context) (*container.ImageStats, error)) *MockRuntime_ImageStats_Call { + _c.Call.Return(run) + return _c +} + +// IsPodResizeInProgress provides a mock function for the type MockRuntime +func (_mock *MockRuntime) IsPodResizeInProgress(allocatedPod *v10.Pod, podStatus *container.PodStatus) bool { + ret := _mock.Called(allocatedPod, podStatus) + + if len(ret) == 0 { + panic("no return value specified for IsPodResizeInProgress") + } + + var r0 bool + if returnFunc, ok := ret.Get(0).(func(*v10.Pod, *container.PodStatus) bool); ok { + r0 = returnFunc(allocatedPod, podStatus) + } else { + r0 = ret.Get(0).(bool) + } + return r0 +} + +// MockRuntime_IsPodResizeInProgress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsPodResizeInProgress' +type MockRuntime_IsPodResizeInProgress_Call struct { + *mock.Call +} + +// IsPodResizeInProgress is a helper method to define mock.On call +// - allocatedPod *v10.Pod +// - podStatus *container.PodStatus +func (_e *MockRuntime_Expecter) IsPodResizeInProgress(allocatedPod interface{}, podStatus interface{}) *MockRuntime_IsPodResizeInProgress_Call { + return &MockRuntime_IsPodResizeInProgress_Call{Call: _e.mock.On("IsPodResizeInProgress", allocatedPod, podStatus)} +} + +func (_c *MockRuntime_IsPodResizeInProgress_Call) Run(run func(allocatedPod *v10.Pod, podStatus *container.PodStatus)) *MockRuntime_IsPodResizeInProgress_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *v10.Pod + if args[0] != nil { + arg0 = args[0].(*v10.Pod) + } + var arg1 *container.PodStatus + if args[1] != nil { + arg1 = args[1].(*container.PodStatus) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRuntime_IsPodResizeInProgress_Call) Return(b bool) *MockRuntime_IsPodResizeInProgress_Call { + _c.Call.Return(b) + return _c +} + +func (_c *MockRuntime_IsPodResizeInProgress_Call) RunAndReturn(run func(allocatedPod *v10.Pod, podStatus *container.PodStatus) bool) *MockRuntime_IsPodResizeInProgress_Call { + _c.Call.Return(run) + return _c +} + +// KillPod provides a mock function for the type MockRuntime +func (_mock *MockRuntime) KillPod(ctx context.Context, pod *v10.Pod, runningPod container.Pod, gracePeriodOverride *int64) error { + ret := _mock.Called(ctx, pod, runningPod, gracePeriodOverride) + + if len(ret) == 0 { + panic("no return value specified for KillPod") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.Pod, container.Pod, *int64) error); ok { + r0 = returnFunc(ctx, pod, runningPod, gracePeriodOverride) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockRuntime_KillPod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KillPod' +type MockRuntime_KillPod_Call struct { + *mock.Call +} + +// KillPod is a helper method to define mock.On call +// - ctx context.Context +// - pod *v10.Pod +// - runningPod container.Pod +// - gracePeriodOverride *int64 +func (_e *MockRuntime_Expecter) KillPod(ctx interface{}, pod interface{}, runningPod interface{}, gracePeriodOverride interface{}) *MockRuntime_KillPod_Call { + return &MockRuntime_KillPod_Call{Call: _e.mock.On("KillPod", ctx, pod, runningPod, gracePeriodOverride)} +} + +func (_c *MockRuntime_KillPod_Call) Run(run func(ctx context.Context, pod *v10.Pod, runningPod container.Pod, gracePeriodOverride *int64)) *MockRuntime_KillPod_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v10.Pod + if args[1] != nil { + arg1 = args[1].(*v10.Pod) + } + var arg2 container.Pod + if args[2] != nil { + arg2 = args[2].(container.Pod) + } + var arg3 *int64 + if args[3] != nil { + arg3 = args[3].(*int64) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockRuntime_KillPod_Call) Return(err error) *MockRuntime_KillPod_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockRuntime_KillPod_Call) RunAndReturn(run func(ctx context.Context, pod *v10.Pod, runningPod container.Pod, gracePeriodOverride *int64) error) *MockRuntime_KillPod_Call { + _c.Call.Return(run) + return _c +} + +// ListImages provides a mock function for the type MockRuntime +func (_mock *MockRuntime) ListImages(ctx context.Context) ([]container.Image, error) { + ret := _mock.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for ListImages") + } + + var r0 []container.Image + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context) ([]container.Image, error)); ok { + return returnFunc(ctx) + } + if returnFunc, ok := ret.Get(0).(func(context.Context) []container.Image); ok { + r0 = returnFunc(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]container.Image) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRuntime_ListImages_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListImages' +type MockRuntime_ListImages_Call struct { + *mock.Call +} + +// ListImages is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockRuntime_Expecter) ListImages(ctx interface{}) *MockRuntime_ListImages_Call { + return &MockRuntime_ListImages_Call{Call: _e.mock.On("ListImages", ctx)} +} + +func (_c *MockRuntime_ListImages_Call) Run(run func(ctx context.Context)) *MockRuntime_ListImages_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockRuntime_ListImages_Call) Return(images []container.Image, err error) *MockRuntime_ListImages_Call { + _c.Call.Return(images, err) + return _c +} + +func (_c *MockRuntime_ListImages_Call) RunAndReturn(run func(ctx context.Context) ([]container.Image, error)) *MockRuntime_ListImages_Call { + _c.Call.Return(run) + return _c +} + +// ListMetricDescriptors provides a mock function for the type MockRuntime +func (_mock *MockRuntime) ListMetricDescriptors(ctx context.Context) ([]*v1.MetricDescriptor, error) { + ret := _mock.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for ListMetricDescriptors") + } + + var r0 []*v1.MetricDescriptor + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*v1.MetricDescriptor, error)); ok { + return returnFunc(ctx) + } + if returnFunc, ok := ret.Get(0).(func(context.Context) []*v1.MetricDescriptor); ok { + r0 = returnFunc(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v1.MetricDescriptor) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRuntime_ListMetricDescriptors_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListMetricDescriptors' +type MockRuntime_ListMetricDescriptors_Call struct { + *mock.Call +} + +// ListMetricDescriptors is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockRuntime_Expecter) ListMetricDescriptors(ctx interface{}) *MockRuntime_ListMetricDescriptors_Call { + return &MockRuntime_ListMetricDescriptors_Call{Call: _e.mock.On("ListMetricDescriptors", ctx)} +} + +func (_c *MockRuntime_ListMetricDescriptors_Call) Run(run func(ctx context.Context)) *MockRuntime_ListMetricDescriptors_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockRuntime_ListMetricDescriptors_Call) Return(metricDescriptors []*v1.MetricDescriptor, err error) *MockRuntime_ListMetricDescriptors_Call { + _c.Call.Return(metricDescriptors, err) + return _c +} + +func (_c *MockRuntime_ListMetricDescriptors_Call) RunAndReturn(run func(ctx context.Context) ([]*v1.MetricDescriptor, error)) *MockRuntime_ListMetricDescriptors_Call { + _c.Call.Return(run) + return _c +} + +// ListPodSandboxMetrics provides a mock function for the type MockRuntime +func (_mock *MockRuntime) ListPodSandboxMetrics(ctx context.Context) ([]*v1.PodSandboxMetrics, error) { + ret := _mock.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for ListPodSandboxMetrics") + } + + var r0 []*v1.PodSandboxMetrics + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*v1.PodSandboxMetrics, error)); ok { + return returnFunc(ctx) + } + if returnFunc, ok := ret.Get(0).(func(context.Context) []*v1.PodSandboxMetrics); ok { + r0 = returnFunc(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v1.PodSandboxMetrics) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRuntime_ListPodSandboxMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPodSandboxMetrics' +type MockRuntime_ListPodSandboxMetrics_Call struct { + *mock.Call +} + +// ListPodSandboxMetrics is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockRuntime_Expecter) ListPodSandboxMetrics(ctx interface{}) *MockRuntime_ListPodSandboxMetrics_Call { + return &MockRuntime_ListPodSandboxMetrics_Call{Call: _e.mock.On("ListPodSandboxMetrics", ctx)} +} + +func (_c *MockRuntime_ListPodSandboxMetrics_Call) Run(run func(ctx context.Context)) *MockRuntime_ListPodSandboxMetrics_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockRuntime_ListPodSandboxMetrics_Call) Return(podSandboxMetricss []*v1.PodSandboxMetrics, err error) *MockRuntime_ListPodSandboxMetrics_Call { + _c.Call.Return(podSandboxMetricss, err) + return _c +} + +func (_c *MockRuntime_ListPodSandboxMetrics_Call) RunAndReturn(run func(ctx context.Context) ([]*v1.PodSandboxMetrics, error)) *MockRuntime_ListPodSandboxMetrics_Call { + _c.Call.Return(run) + return _c +} + +// PullImage provides a mock function for the type MockRuntime +func (_mock *MockRuntime) PullImage(ctx context.Context, image container.ImageSpec, credentials []credentialprovider.TrackedAuthConfig, podSandboxConfig *v1.PodSandboxConfig) (string, *credentialprovider.TrackedAuthConfig, error) { + ret := _mock.Called(ctx, image, credentials, podSandboxConfig) + + if len(ret) == 0 { + panic("no return value specified for PullImage") + } + + var r0 string + var r1 *credentialprovider.TrackedAuthConfig + var r2 error + if returnFunc, ok := ret.Get(0).(func(context.Context, container.ImageSpec, []credentialprovider.TrackedAuthConfig, *v1.PodSandboxConfig) (string, *credentialprovider.TrackedAuthConfig, error)); ok { + return returnFunc(ctx, image, credentials, podSandboxConfig) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, container.ImageSpec, []credentialprovider.TrackedAuthConfig, *v1.PodSandboxConfig) string); ok { + r0 = returnFunc(ctx, image, credentials, podSandboxConfig) + } else { + r0 = ret.Get(0).(string) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, container.ImageSpec, []credentialprovider.TrackedAuthConfig, *v1.PodSandboxConfig) *credentialprovider.TrackedAuthConfig); ok { + r1 = returnFunc(ctx, image, credentials, podSandboxConfig) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*credentialprovider.TrackedAuthConfig) + } + } + if returnFunc, ok := ret.Get(2).(func(context.Context, container.ImageSpec, []credentialprovider.TrackedAuthConfig, *v1.PodSandboxConfig) error); ok { + r2 = returnFunc(ctx, image, credentials, podSandboxConfig) + } else { + r2 = ret.Error(2) + } + return r0, r1, r2 +} + +// MockRuntime_PullImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PullImage' +type MockRuntime_PullImage_Call struct { + *mock.Call +} + +// PullImage is a helper method to define mock.On call +// - ctx context.Context +// - image container.ImageSpec +// - credentials []credentialprovider.TrackedAuthConfig +// - podSandboxConfig *v1.PodSandboxConfig +func (_e *MockRuntime_Expecter) PullImage(ctx interface{}, image interface{}, credentials interface{}, podSandboxConfig interface{}) *MockRuntime_PullImage_Call { + return &MockRuntime_PullImage_Call{Call: _e.mock.On("PullImage", ctx, image, credentials, podSandboxConfig)} +} + +func (_c *MockRuntime_PullImage_Call) Run(run func(ctx context.Context, image container.ImageSpec, credentials []credentialprovider.TrackedAuthConfig, podSandboxConfig *v1.PodSandboxConfig)) *MockRuntime_PullImage_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 container.ImageSpec + if args[1] != nil { + arg1 = args[1].(container.ImageSpec) + } + var arg2 []credentialprovider.TrackedAuthConfig + if args[2] != nil { + arg2 = args[2].([]credentialprovider.TrackedAuthConfig) + } + var arg3 *v1.PodSandboxConfig + if args[3] != nil { + arg3 = args[3].(*v1.PodSandboxConfig) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockRuntime_PullImage_Call) Return(s string, trackedAuthConfig *credentialprovider.TrackedAuthConfig, err error) *MockRuntime_PullImage_Call { + _c.Call.Return(s, trackedAuthConfig, err) + return _c +} + +func (_c *MockRuntime_PullImage_Call) RunAndReturn(run func(ctx context.Context, image container.ImageSpec, credentials []credentialprovider.TrackedAuthConfig, podSandboxConfig *v1.PodSandboxConfig) (string, *credentialprovider.TrackedAuthConfig, error)) *MockRuntime_PullImage_Call { + _c.Call.Return(run) + return _c +} + +// RemoveImage provides a mock function for the type MockRuntime +func (_mock *MockRuntime) RemoveImage(ctx context.Context, image container.ImageSpec) error { + ret := _mock.Called(ctx, image) + + if len(ret) == 0 { + panic("no return value specified for RemoveImage") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, container.ImageSpec) error); ok { + r0 = returnFunc(ctx, image) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockRuntime_RemoveImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveImage' +type MockRuntime_RemoveImage_Call struct { + *mock.Call +} + +// RemoveImage is a helper method to define mock.On call +// - ctx context.Context +// - image container.ImageSpec +func (_e *MockRuntime_Expecter) RemoveImage(ctx interface{}, image interface{}) *MockRuntime_RemoveImage_Call { + return &MockRuntime_RemoveImage_Call{Call: _e.mock.On("RemoveImage", ctx, image)} +} + +func (_c *MockRuntime_RemoveImage_Call) Run(run func(ctx context.Context, image container.ImageSpec)) *MockRuntime_RemoveImage_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 container.ImageSpec + if args[1] != nil { + arg1 = args[1].(container.ImageSpec) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRuntime_RemoveImage_Call) Return(err error) *MockRuntime_RemoveImage_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockRuntime_RemoveImage_Call) RunAndReturn(run func(ctx context.Context, image container.ImageSpec) error) *MockRuntime_RemoveImage_Call { + _c.Call.Return(run) + return _c +} + +// Status provides a mock function for the type MockRuntime +func (_mock *MockRuntime) Status(ctx context.Context) (*container.RuntimeStatus, error) { + ret := _mock.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Status") + } + + var r0 *container.RuntimeStatus + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context) (*container.RuntimeStatus, error)); ok { + return returnFunc(ctx) + } + if returnFunc, ok := ret.Get(0).(func(context.Context) *container.RuntimeStatus); ok { + r0 = returnFunc(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*container.RuntimeStatus) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRuntime_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status' +type MockRuntime_Status_Call struct { + *mock.Call +} + +// Status is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockRuntime_Expecter) Status(ctx interface{}) *MockRuntime_Status_Call { + return &MockRuntime_Status_Call{Call: _e.mock.On("Status", ctx)} +} + +func (_c *MockRuntime_Status_Call) Run(run func(ctx context.Context)) *MockRuntime_Status_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockRuntime_Status_Call) Return(runtimeStatus *container.RuntimeStatus, err error) *MockRuntime_Status_Call { + _c.Call.Return(runtimeStatus, err) + return _c +} + +func (_c *MockRuntime_Status_Call) RunAndReturn(run func(ctx context.Context) (*container.RuntimeStatus, error)) *MockRuntime_Status_Call { + _c.Call.Return(run) + return _c +} + +// SyncPod provides a mock function for the type MockRuntime +func (_mock *MockRuntime) SyncPod(ctx context.Context, pod *v10.Pod, podStatus *container.PodStatus, pullSecrets []v10.Secret, backOff *flowcontrol.Backoff) container.PodSyncResult { + ret := _mock.Called(ctx, pod, podStatus, pullSecrets, backOff) + + if len(ret) == 0 { + panic("no return value specified for SyncPod") + } + + var r0 container.PodSyncResult + if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.Pod, *container.PodStatus, []v10.Secret, *flowcontrol.Backoff) container.PodSyncResult); ok { + r0 = returnFunc(ctx, pod, podStatus, pullSecrets, backOff) + } else { + r0 = ret.Get(0).(container.PodSyncResult) + } + return r0 +} + +// MockRuntime_SyncPod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncPod' +type MockRuntime_SyncPod_Call struct { + *mock.Call +} + +// SyncPod is a helper method to define mock.On call +// - ctx context.Context +// - pod *v10.Pod +// - podStatus *container.PodStatus +// - pullSecrets []v10.Secret +// - backOff *flowcontrol.Backoff +func (_e *MockRuntime_Expecter) SyncPod(ctx interface{}, pod interface{}, podStatus interface{}, pullSecrets interface{}, backOff interface{}) *MockRuntime_SyncPod_Call { + return &MockRuntime_SyncPod_Call{Call: _e.mock.On("SyncPod", ctx, pod, podStatus, pullSecrets, backOff)} +} + +func (_c *MockRuntime_SyncPod_Call) Run(run func(ctx context.Context, pod *v10.Pod, podStatus *container.PodStatus, pullSecrets []v10.Secret, backOff *flowcontrol.Backoff)) *MockRuntime_SyncPod_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v10.Pod + if args[1] != nil { + arg1 = args[1].(*v10.Pod) + } + var arg2 *container.PodStatus + if args[2] != nil { + arg2 = args[2].(*container.PodStatus) + } + var arg3 []v10.Secret + if args[3] != nil { + arg3 = args[3].([]v10.Secret) + } + var arg4 *flowcontrol.Backoff + if args[4] != nil { + arg4 = args[4].(*flowcontrol.Backoff) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) + }) + return _c +} + +func (_c *MockRuntime_SyncPod_Call) Return(podSyncResult container.PodSyncResult) *MockRuntime_SyncPod_Call { + _c.Call.Return(podSyncResult) + return _c +} + +func (_c *MockRuntime_SyncPod_Call) RunAndReturn(run func(ctx context.Context, pod *v10.Pod, podStatus *container.PodStatus, pullSecrets []v10.Secret, backOff *flowcontrol.Backoff) container.PodSyncResult) *MockRuntime_SyncPod_Call { + _c.Call.Return(run) + return _c +} + +// Type provides a mock function for the type MockRuntime +func (_mock *MockRuntime) Type() string { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for Type") + } + + var r0 string + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() + } else { + r0 = ret.Get(0).(string) + } + return r0 +} + +// MockRuntime_Type_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Type' +type MockRuntime_Type_Call struct { + *mock.Call +} + +// Type is a helper method to define mock.On call +func (_e *MockRuntime_Expecter) Type() *MockRuntime_Type_Call { + return &MockRuntime_Type_Call{Call: _e.mock.On("Type")} +} + +func (_c *MockRuntime_Type_Call) Run(run func()) *MockRuntime_Type_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockRuntime_Type_Call) Return(s string) *MockRuntime_Type_Call { + _c.Call.Return(s) + return _c +} + +func (_c *MockRuntime_Type_Call) RunAndReturn(run func() string) *MockRuntime_Type_Call { + _c.Call.Return(run) + return _c +} + +// UpdatePodCIDR provides a mock function for the type MockRuntime +func (_mock *MockRuntime) UpdatePodCIDR(ctx context.Context, podCIDR string) error { + ret := _mock.Called(ctx, podCIDR) + + if len(ret) == 0 { + panic("no return value specified for UpdatePodCIDR") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { + r0 = returnFunc(ctx, podCIDR) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockRuntime_UpdatePodCIDR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePodCIDR' +type MockRuntime_UpdatePodCIDR_Call struct { + *mock.Call +} + +// UpdatePodCIDR is a helper method to define mock.On call +// - ctx context.Context +// - podCIDR string +func (_e *MockRuntime_Expecter) UpdatePodCIDR(ctx interface{}, podCIDR interface{}) *MockRuntime_UpdatePodCIDR_Call { + return &MockRuntime_UpdatePodCIDR_Call{Call: _e.mock.On("UpdatePodCIDR", ctx, podCIDR)} +} + +func (_c *MockRuntime_UpdatePodCIDR_Call) Run(run func(ctx context.Context, podCIDR string)) *MockRuntime_UpdatePodCIDR_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRuntime_UpdatePodCIDR_Call) Return(err error) *MockRuntime_UpdatePodCIDR_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockRuntime_UpdatePodCIDR_Call) RunAndReturn(run func(ctx context.Context, podCIDR string) error) *MockRuntime_UpdatePodCIDR_Call { + _c.Call.Return(run) + return _c +} + +// Version provides a mock function for the type MockRuntime +func (_mock *MockRuntime) Version(ctx context.Context) (container.Version, error) { + ret := _mock.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Version") + } + + var r0 container.Version + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context) (container.Version, error)); ok { + return returnFunc(ctx) + } + if returnFunc, ok := ret.Get(0).(func(context.Context) container.Version); ok { + r0 = returnFunc(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(container.Version) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRuntime_Version_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Version' +type MockRuntime_Version_Call struct { + *mock.Call +} + +// Version is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockRuntime_Expecter) Version(ctx interface{}) *MockRuntime_Version_Call { + return &MockRuntime_Version_Call{Call: _e.mock.On("Version", ctx)} +} + +func (_c *MockRuntime_Version_Call) Run(run func(ctx context.Context)) *MockRuntime_Version_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockRuntime_Version_Call) Return(version container.Version, err error) *MockRuntime_Version_Call { + _c.Call.Return(version, err) + return _c +} + +func (_c *MockRuntime_Version_Call) RunAndReturn(run func(ctx context.Context) (container.Version, error)) *MockRuntime_Version_Call { + _c.Call.Return(run) + return _c +} + +// NewMockRuntimeCache creates a new instance of MockRuntimeCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockRuntimeCache(t interface { + mock.TestingT + Cleanup(func()) +}) *MockRuntimeCache { + mock := &MockRuntimeCache{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockRuntimeCache is an autogenerated mock type for the RuntimeCache type +type MockRuntimeCache struct { + mock.Mock +} + +type MockRuntimeCache_Expecter struct { + mock *mock.Mock +} + +func (_m *MockRuntimeCache) EXPECT() *MockRuntimeCache_Expecter { + return &MockRuntimeCache_Expecter{mock: &_m.Mock} +} + +// ForceUpdateIfOlder provides a mock function for the type MockRuntimeCache +func (_mock *MockRuntimeCache) ForceUpdateIfOlder(context1 context.Context, time1 time.Time) error { + ret := _mock.Called(context1, time1) + + if len(ret) == 0 { + panic("no return value specified for ForceUpdateIfOlder") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) error); ok { + r0 = returnFunc(context1, time1) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockRuntimeCache_ForceUpdateIfOlder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForceUpdateIfOlder' +type MockRuntimeCache_ForceUpdateIfOlder_Call struct { + *mock.Call +} + +// ForceUpdateIfOlder is a helper method to define mock.On call +// - context1 context.Context +// - time1 time.Time +func (_e *MockRuntimeCache_Expecter) ForceUpdateIfOlder(context1 interface{}, time1 interface{}) *MockRuntimeCache_ForceUpdateIfOlder_Call { + return &MockRuntimeCache_ForceUpdateIfOlder_Call{Call: _e.mock.On("ForceUpdateIfOlder", context1, time1)} +} + +func (_c *MockRuntimeCache_ForceUpdateIfOlder_Call) Run(run func(context1 context.Context, time1 time.Time)) *MockRuntimeCache_ForceUpdateIfOlder_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 time.Time + if args[1] != nil { + arg1 = args[1].(time.Time) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRuntimeCache_ForceUpdateIfOlder_Call) Return(err error) *MockRuntimeCache_ForceUpdateIfOlder_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockRuntimeCache_ForceUpdateIfOlder_Call) RunAndReturn(run func(context1 context.Context, time1 time.Time) error) *MockRuntimeCache_ForceUpdateIfOlder_Call { + _c.Call.Return(run) + return _c +} + +// GetPods provides a mock function for the type MockRuntimeCache +func (_mock *MockRuntimeCache) GetPods(context1 context.Context) ([]*container.Pod, error) { + ret := _mock.Called(context1) + + if len(ret) == 0 { + panic("no return value specified for GetPods") + } + + var r0 []*container.Pod + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*container.Pod, error)); ok { + return returnFunc(context1) + } + if returnFunc, ok := ret.Get(0).(func(context.Context) []*container.Pod); ok { + r0 = returnFunc(context1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*container.Pod) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(context1) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRuntimeCache_GetPods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPods' +type MockRuntimeCache_GetPods_Call struct { + *mock.Call +} + +// GetPods is a helper method to define mock.On call +// - context1 context.Context +func (_e *MockRuntimeCache_Expecter) GetPods(context1 interface{}) *MockRuntimeCache_GetPods_Call { + return &MockRuntimeCache_GetPods_Call{Call: _e.mock.On("GetPods", context1)} +} + +func (_c *MockRuntimeCache_GetPods_Call) Run(run func(context1 context.Context)) *MockRuntimeCache_GetPods_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockRuntimeCache_GetPods_Call) Return(pods []*container.Pod, err error) *MockRuntimeCache_GetPods_Call { + _c.Call.Return(pods, err) + return _c +} + +func (_c *MockRuntimeCache_GetPods_Call) RunAndReturn(run func(context1 context.Context) ([]*container.Pod, error)) *MockRuntimeCache_GetPods_Call { + _c.Call.Return(run) + return _c +} diff --git a/pkg/kubelet/container/testing/runtime_mock.go b/pkg/kubelet/container/testing/runtime_mock.go deleted file mode 100644 index dd5dceb6f4cdd..0000000000000 --- a/pkg/kubelet/container/testing/runtime_mock.go +++ /dev/null @@ -1,1419 +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 mockery v2.53.3. DO NOT EDIT. - -package testing - -import ( - context "context" - - container "k8s.io/kubernetes/pkg/kubelet/container" - - corev1 "k8s.io/api/core/v1" - - credentialprovider "k8s.io/kubernetes/pkg/credentialprovider" - - flowcontrol "k8s.io/client-go/util/flowcontrol" - - io "io" - - mock "github.com/stretchr/testify/mock" - - pkgtypes "k8s.io/apimachinery/pkg/types" - - types "k8s.io/kubernetes/pkg/kubelet/types" - - v1 "k8s.io/cri-api/pkg/apis/runtime/v1" -) - -// MockRuntime is an autogenerated mock type for the Runtime type -type MockRuntime struct { - mock.Mock -} - -type MockRuntime_Expecter struct { - mock *mock.Mock -} - -func (_m *MockRuntime) EXPECT() *MockRuntime_Expecter { - return &MockRuntime_Expecter{mock: &_m.Mock} -} - -// APIVersion provides a mock function with no fields -func (_m *MockRuntime) APIVersion() (container.Version, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for APIVersion") - } - - var r0 container.Version - var r1 error - if rf, ok := ret.Get(0).(func() (container.Version, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() container.Version); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(container.Version) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRuntime_APIVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'APIVersion' -type MockRuntime_APIVersion_Call struct { - *mock.Call -} - -// APIVersion is a helper method to define mock.On call -func (_e *MockRuntime_Expecter) APIVersion() *MockRuntime_APIVersion_Call { - return &MockRuntime_APIVersion_Call{Call: _e.mock.On("APIVersion")} -} - -func (_c *MockRuntime_APIVersion_Call) Run(run func()) *MockRuntime_APIVersion_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockRuntime_APIVersion_Call) Return(_a0 container.Version, _a1 error) *MockRuntime_APIVersion_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRuntime_APIVersion_Call) RunAndReturn(run func() (container.Version, error)) *MockRuntime_APIVersion_Call { - _c.Call.Return(run) - return _c -} - -// CheckpointContainer provides a mock function with given fields: ctx, options -func (_m *MockRuntime) CheckpointContainer(ctx context.Context, options *v1.CheckpointContainerRequest) error { - ret := _m.Called(ctx, options) - - if len(ret) == 0 { - panic("no return value specified for CheckpointContainer") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *v1.CheckpointContainerRequest) error); ok { - r0 = rf(ctx, options) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRuntime_CheckpointContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckpointContainer' -type MockRuntime_CheckpointContainer_Call struct { - *mock.Call -} - -// CheckpointContainer is a helper method to define mock.On call -// - ctx context.Context -// - options *v1.CheckpointContainerRequest -func (_e *MockRuntime_Expecter) CheckpointContainer(ctx interface{}, options interface{}) *MockRuntime_CheckpointContainer_Call { - return &MockRuntime_CheckpointContainer_Call{Call: _e.mock.On("CheckpointContainer", ctx, options)} -} - -func (_c *MockRuntime_CheckpointContainer_Call) Run(run func(ctx context.Context, options *v1.CheckpointContainerRequest)) *MockRuntime_CheckpointContainer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*v1.CheckpointContainerRequest)) - }) - return _c -} - -func (_c *MockRuntime_CheckpointContainer_Call) Return(_a0 error) *MockRuntime_CheckpointContainer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRuntime_CheckpointContainer_Call) RunAndReturn(run func(context.Context, *v1.CheckpointContainerRequest) error) *MockRuntime_CheckpointContainer_Call { - _c.Call.Return(run) - return _c -} - -// DeleteContainer provides a mock function with given fields: ctx, containerID -func (_m *MockRuntime) DeleteContainer(ctx context.Context, containerID container.ContainerID) error { - ret := _m.Called(ctx, containerID) - - if len(ret) == 0 { - panic("no return value specified for DeleteContainer") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, container.ContainerID) error); ok { - r0 = rf(ctx, containerID) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRuntime_DeleteContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteContainer' -type MockRuntime_DeleteContainer_Call struct { - *mock.Call -} - -// DeleteContainer is a helper method to define mock.On call -// - ctx context.Context -// - containerID container.ContainerID -func (_e *MockRuntime_Expecter) DeleteContainer(ctx interface{}, containerID interface{}) *MockRuntime_DeleteContainer_Call { - return &MockRuntime_DeleteContainer_Call{Call: _e.mock.On("DeleteContainer", ctx, containerID)} -} - -func (_c *MockRuntime_DeleteContainer_Call) Run(run func(ctx context.Context, containerID container.ContainerID)) *MockRuntime_DeleteContainer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(container.ContainerID)) - }) - return _c -} - -func (_c *MockRuntime_DeleteContainer_Call) Return(_a0 error) *MockRuntime_DeleteContainer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRuntime_DeleteContainer_Call) RunAndReturn(run func(context.Context, container.ContainerID) error) *MockRuntime_DeleteContainer_Call { - _c.Call.Return(run) - return _c -} - -// GarbageCollect provides a mock function with given fields: ctx, gcPolicy, allSourcesReady, evictNonDeletedPods -func (_m *MockRuntime) GarbageCollect(ctx context.Context, gcPolicy container.GCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error { - ret := _m.Called(ctx, gcPolicy, allSourcesReady, evictNonDeletedPods) - - if len(ret) == 0 { - panic("no return value specified for GarbageCollect") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, container.GCPolicy, bool, bool) error); ok { - r0 = rf(ctx, gcPolicy, allSourcesReady, evictNonDeletedPods) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRuntime_GarbageCollect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GarbageCollect' -type MockRuntime_GarbageCollect_Call struct { - *mock.Call -} - -// GarbageCollect is a helper method to define mock.On call -// - ctx context.Context -// - gcPolicy container.GCPolicy -// - allSourcesReady bool -// - evictNonDeletedPods bool -func (_e *MockRuntime_Expecter) GarbageCollect(ctx interface{}, gcPolicy interface{}, allSourcesReady interface{}, evictNonDeletedPods interface{}) *MockRuntime_GarbageCollect_Call { - return &MockRuntime_GarbageCollect_Call{Call: _e.mock.On("GarbageCollect", ctx, gcPolicy, allSourcesReady, evictNonDeletedPods)} -} - -func (_c *MockRuntime_GarbageCollect_Call) Run(run func(ctx context.Context, gcPolicy container.GCPolicy, allSourcesReady bool, evictNonDeletedPods bool)) *MockRuntime_GarbageCollect_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(container.GCPolicy), args[2].(bool), args[3].(bool)) - }) - return _c -} - -func (_c *MockRuntime_GarbageCollect_Call) Return(_a0 error) *MockRuntime_GarbageCollect_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRuntime_GarbageCollect_Call) RunAndReturn(run func(context.Context, container.GCPolicy, bool, bool) error) *MockRuntime_GarbageCollect_Call { - _c.Call.Return(run) - return _c -} - -// GeneratePodStatus provides a mock function with given fields: event -func (_m *MockRuntime) GeneratePodStatus(event *v1.ContainerEventResponse) *container.PodStatus { - ret := _m.Called(event) - - if len(ret) == 0 { - panic("no return value specified for GeneratePodStatus") - } - - var r0 *container.PodStatus - if rf, ok := ret.Get(0).(func(*v1.ContainerEventResponse) *container.PodStatus); ok { - r0 = rf(event) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*container.PodStatus) - } - } - - return r0 -} - -// MockRuntime_GeneratePodStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GeneratePodStatus' -type MockRuntime_GeneratePodStatus_Call struct { - *mock.Call -} - -// GeneratePodStatus is a helper method to define mock.On call -// - event *v1.ContainerEventResponse -func (_e *MockRuntime_Expecter) GeneratePodStatus(event interface{}) *MockRuntime_GeneratePodStatus_Call { - return &MockRuntime_GeneratePodStatus_Call{Call: _e.mock.On("GeneratePodStatus", event)} -} - -func (_c *MockRuntime_GeneratePodStatus_Call) Run(run func(event *v1.ContainerEventResponse)) *MockRuntime_GeneratePodStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.ContainerEventResponse)) - }) - return _c -} - -func (_c *MockRuntime_GeneratePodStatus_Call) Return(_a0 *container.PodStatus) *MockRuntime_GeneratePodStatus_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRuntime_GeneratePodStatus_Call) RunAndReturn(run func(*v1.ContainerEventResponse) *container.PodStatus) *MockRuntime_GeneratePodStatus_Call { - _c.Call.Return(run) - return _c -} - -// GetContainerLogs provides a mock function with given fields: ctx, pod, containerID, logOptions, stdout, stderr -func (_m *MockRuntime) GetContainerLogs(ctx context.Context, pod *corev1.Pod, containerID container.ContainerID, logOptions *corev1.PodLogOptions, stdout io.Writer, stderr io.Writer) error { - ret := _m.Called(ctx, pod, containerID, logOptions, stdout, stderr) - - if len(ret) == 0 { - panic("no return value specified for GetContainerLogs") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *corev1.Pod, container.ContainerID, *corev1.PodLogOptions, io.Writer, io.Writer) error); ok { - r0 = rf(ctx, pod, containerID, logOptions, stdout, stderr) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRuntime_GetContainerLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetContainerLogs' -type MockRuntime_GetContainerLogs_Call struct { - *mock.Call -} - -// GetContainerLogs is a helper method to define mock.On call -// - ctx context.Context -// - pod *corev1.Pod -// - containerID container.ContainerID -// - logOptions *corev1.PodLogOptions -// - stdout io.Writer -// - stderr io.Writer -func (_e *MockRuntime_Expecter) GetContainerLogs(ctx interface{}, pod interface{}, containerID interface{}, logOptions interface{}, stdout interface{}, stderr interface{}) *MockRuntime_GetContainerLogs_Call { - return &MockRuntime_GetContainerLogs_Call{Call: _e.mock.On("GetContainerLogs", ctx, pod, containerID, logOptions, stdout, stderr)} -} - -func (_c *MockRuntime_GetContainerLogs_Call) Run(run func(ctx context.Context, pod *corev1.Pod, containerID container.ContainerID, logOptions *corev1.PodLogOptions, stdout io.Writer, stderr io.Writer)) *MockRuntime_GetContainerLogs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*corev1.Pod), args[2].(container.ContainerID), args[3].(*corev1.PodLogOptions), args[4].(io.Writer), args[5].(io.Writer)) - }) - return _c -} - -func (_c *MockRuntime_GetContainerLogs_Call) Return(err error) *MockRuntime_GetContainerLogs_Call { - _c.Call.Return(err) - return _c -} - -func (_c *MockRuntime_GetContainerLogs_Call) RunAndReturn(run func(context.Context, *corev1.Pod, container.ContainerID, *corev1.PodLogOptions, io.Writer, io.Writer) error) *MockRuntime_GetContainerLogs_Call { - _c.Call.Return(run) - return _c -} - -// GetContainerStatus provides a mock function with given fields: ctx, id -func (_m *MockRuntime) GetContainerStatus(ctx context.Context, id container.ContainerID) (*container.Status, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetContainerStatus") - } - - var r0 *container.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, container.ContainerID) (*container.Status, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, container.ContainerID) *container.Status); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*container.Status) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, container.ContainerID) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRuntime_GetContainerStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetContainerStatus' -type MockRuntime_GetContainerStatus_Call struct { - *mock.Call -} - -// GetContainerStatus is a helper method to define mock.On call -// - ctx context.Context -// - id container.ContainerID -func (_e *MockRuntime_Expecter) GetContainerStatus(ctx interface{}, id interface{}) *MockRuntime_GetContainerStatus_Call { - return &MockRuntime_GetContainerStatus_Call{Call: _e.mock.On("GetContainerStatus", ctx, id)} -} - -func (_c *MockRuntime_GetContainerStatus_Call) Run(run func(ctx context.Context, id container.ContainerID)) *MockRuntime_GetContainerStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(container.ContainerID)) - }) - return _c -} - -func (_c *MockRuntime_GetContainerStatus_Call) Return(_a0 *container.Status, _a1 error) *MockRuntime_GetContainerStatus_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRuntime_GetContainerStatus_Call) RunAndReturn(run func(context.Context, container.ContainerID) (*container.Status, error)) *MockRuntime_GetContainerStatus_Call { - _c.Call.Return(run) - return _c -} - -// GetContainerSwapBehavior provides a mock function with given fields: pod, _a1 -func (_m *MockRuntime) GetContainerSwapBehavior(pod *corev1.Pod, _a1 *corev1.Container) types.SwapBehavior { - ret := _m.Called(pod, _a1) - - if len(ret) == 0 { - panic("no return value specified for GetContainerSwapBehavior") - } - - var r0 types.SwapBehavior - if rf, ok := ret.Get(0).(func(*corev1.Pod, *corev1.Container) types.SwapBehavior); ok { - r0 = rf(pod, _a1) - } else { - r0 = ret.Get(0).(types.SwapBehavior) - } - - return r0 -} - -// MockRuntime_GetContainerSwapBehavior_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetContainerSwapBehavior' -type MockRuntime_GetContainerSwapBehavior_Call struct { - *mock.Call -} - -// GetContainerSwapBehavior is a helper method to define mock.On call -// - pod *corev1.Pod -// - _a1 *corev1.Container -func (_e *MockRuntime_Expecter) GetContainerSwapBehavior(pod interface{}, _a1 interface{}) *MockRuntime_GetContainerSwapBehavior_Call { - return &MockRuntime_GetContainerSwapBehavior_Call{Call: _e.mock.On("GetContainerSwapBehavior", pod, _a1)} -} - -func (_c *MockRuntime_GetContainerSwapBehavior_Call) Run(run func(pod *corev1.Pod, _a1 *corev1.Container)) *MockRuntime_GetContainerSwapBehavior_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*corev1.Pod), args[1].(*corev1.Container)) - }) - return _c -} - -func (_c *MockRuntime_GetContainerSwapBehavior_Call) Return(_a0 types.SwapBehavior) *MockRuntime_GetContainerSwapBehavior_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRuntime_GetContainerSwapBehavior_Call) RunAndReturn(run func(*corev1.Pod, *corev1.Container) types.SwapBehavior) *MockRuntime_GetContainerSwapBehavior_Call { - _c.Call.Return(run) - return _c -} - -// GetImageRef provides a mock function with given fields: ctx, image -func (_m *MockRuntime) GetImageRef(ctx context.Context, image container.ImageSpec) (string, error) { - ret := _m.Called(ctx, image) - - if len(ret) == 0 { - panic("no return value specified for GetImageRef") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, container.ImageSpec) (string, error)); ok { - return rf(ctx, image) - } - if rf, ok := ret.Get(0).(func(context.Context, container.ImageSpec) string); ok { - r0 = rf(ctx, image) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, container.ImageSpec) error); ok { - r1 = rf(ctx, image) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRuntime_GetImageRef_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetImageRef' -type MockRuntime_GetImageRef_Call struct { - *mock.Call -} - -// GetImageRef is a helper method to define mock.On call -// - ctx context.Context -// - image container.ImageSpec -func (_e *MockRuntime_Expecter) GetImageRef(ctx interface{}, image interface{}) *MockRuntime_GetImageRef_Call { - return &MockRuntime_GetImageRef_Call{Call: _e.mock.On("GetImageRef", ctx, image)} -} - -func (_c *MockRuntime_GetImageRef_Call) Run(run func(ctx context.Context, image container.ImageSpec)) *MockRuntime_GetImageRef_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(container.ImageSpec)) - }) - return _c -} - -func (_c *MockRuntime_GetImageRef_Call) Return(_a0 string, _a1 error) *MockRuntime_GetImageRef_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRuntime_GetImageRef_Call) RunAndReturn(run func(context.Context, container.ImageSpec) (string, error)) *MockRuntime_GetImageRef_Call { - _c.Call.Return(run) - return _c -} - -// GetImageSize provides a mock function with given fields: ctx, image -func (_m *MockRuntime) GetImageSize(ctx context.Context, image container.ImageSpec) (uint64, error) { - ret := _m.Called(ctx, image) - - if len(ret) == 0 { - panic("no return value specified for GetImageSize") - } - - var r0 uint64 - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, container.ImageSpec) (uint64, error)); ok { - return rf(ctx, image) - } - if rf, ok := ret.Get(0).(func(context.Context, container.ImageSpec) uint64); ok { - r0 = rf(ctx, image) - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func(context.Context, container.ImageSpec) error); ok { - r1 = rf(ctx, image) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRuntime_GetImageSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetImageSize' -type MockRuntime_GetImageSize_Call struct { - *mock.Call -} - -// GetImageSize is a helper method to define mock.On call -// - ctx context.Context -// - image container.ImageSpec -func (_e *MockRuntime_Expecter) GetImageSize(ctx interface{}, image interface{}) *MockRuntime_GetImageSize_Call { - return &MockRuntime_GetImageSize_Call{Call: _e.mock.On("GetImageSize", ctx, image)} -} - -func (_c *MockRuntime_GetImageSize_Call) Run(run func(ctx context.Context, image container.ImageSpec)) *MockRuntime_GetImageSize_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(container.ImageSpec)) - }) - return _c -} - -func (_c *MockRuntime_GetImageSize_Call) Return(_a0 uint64, _a1 error) *MockRuntime_GetImageSize_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRuntime_GetImageSize_Call) RunAndReturn(run func(context.Context, container.ImageSpec) (uint64, error)) *MockRuntime_GetImageSize_Call { - _c.Call.Return(run) - return _c -} - -// GetPodStatus provides a mock function with given fields: ctx, uid, name, namespace -func (_m *MockRuntime) GetPodStatus(ctx context.Context, uid pkgtypes.UID, name string, namespace string) (*container.PodStatus, error) { - ret := _m.Called(ctx, uid, name, namespace) - - if len(ret) == 0 { - panic("no return value specified for GetPodStatus") - } - - var r0 *container.PodStatus - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pkgtypes.UID, string, string) (*container.PodStatus, error)); ok { - return rf(ctx, uid, name, namespace) - } - if rf, ok := ret.Get(0).(func(context.Context, pkgtypes.UID, string, string) *container.PodStatus); ok { - r0 = rf(ctx, uid, name, namespace) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*container.PodStatus) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, pkgtypes.UID, string, string) error); ok { - r1 = rf(ctx, uid, name, namespace) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRuntime_GetPodStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPodStatus' -type MockRuntime_GetPodStatus_Call struct { - *mock.Call -} - -// GetPodStatus is a helper method to define mock.On call -// - ctx context.Context -// - uid pkgtypes.UID -// - name string -// - namespace string -func (_e *MockRuntime_Expecter) GetPodStatus(ctx interface{}, uid interface{}, name interface{}, namespace interface{}) *MockRuntime_GetPodStatus_Call { - return &MockRuntime_GetPodStatus_Call{Call: _e.mock.On("GetPodStatus", ctx, uid, name, namespace)} -} - -func (_c *MockRuntime_GetPodStatus_Call) Run(run func(ctx context.Context, uid pkgtypes.UID, name string, namespace string)) *MockRuntime_GetPodStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pkgtypes.UID), args[2].(string), args[3].(string)) - }) - return _c -} - -func (_c *MockRuntime_GetPodStatus_Call) Return(_a0 *container.PodStatus, _a1 error) *MockRuntime_GetPodStatus_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRuntime_GetPodStatus_Call) RunAndReturn(run func(context.Context, pkgtypes.UID, string, string) (*container.PodStatus, error)) *MockRuntime_GetPodStatus_Call { - _c.Call.Return(run) - return _c -} - -// GetPods provides a mock function with given fields: ctx, all -func (_m *MockRuntime) GetPods(ctx context.Context, all bool) ([]*container.Pod, error) { - ret := _m.Called(ctx, all) - - if len(ret) == 0 { - panic("no return value specified for GetPods") - } - - var r0 []*container.Pod - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bool) ([]*container.Pod, error)); ok { - return rf(ctx, all) - } - if rf, ok := ret.Get(0).(func(context.Context, bool) []*container.Pod); ok { - r0 = rf(ctx, all) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*container.Pod) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, bool) error); ok { - r1 = rf(ctx, all) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRuntime_GetPods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPods' -type MockRuntime_GetPods_Call struct { - *mock.Call -} - -// GetPods is a helper method to define mock.On call -// - ctx context.Context -// - all bool -func (_e *MockRuntime_Expecter) GetPods(ctx interface{}, all interface{}) *MockRuntime_GetPods_Call { - return &MockRuntime_GetPods_Call{Call: _e.mock.On("GetPods", ctx, all)} -} - -func (_c *MockRuntime_GetPods_Call) Run(run func(ctx context.Context, all bool)) *MockRuntime_GetPods_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(bool)) - }) - return _c -} - -func (_c *MockRuntime_GetPods_Call) Return(_a0 []*container.Pod, _a1 error) *MockRuntime_GetPods_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRuntime_GetPods_Call) RunAndReturn(run func(context.Context, bool) ([]*container.Pod, error)) *MockRuntime_GetPods_Call { - _c.Call.Return(run) - return _c -} - -// ImageFsInfo provides a mock function with given fields: ctx -func (_m *MockRuntime) ImageFsInfo(ctx context.Context) (*v1.ImageFsInfoResponse, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ImageFsInfo") - } - - var r0 *v1.ImageFsInfoResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*v1.ImageFsInfoResponse, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *v1.ImageFsInfoResponse); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1.ImageFsInfoResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRuntime_ImageFsInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ImageFsInfo' -type MockRuntime_ImageFsInfo_Call struct { - *mock.Call -} - -// ImageFsInfo is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockRuntime_Expecter) ImageFsInfo(ctx interface{}) *MockRuntime_ImageFsInfo_Call { - return &MockRuntime_ImageFsInfo_Call{Call: _e.mock.On("ImageFsInfo", ctx)} -} - -func (_c *MockRuntime_ImageFsInfo_Call) Run(run func(ctx context.Context)) *MockRuntime_ImageFsInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockRuntime_ImageFsInfo_Call) Return(_a0 *v1.ImageFsInfoResponse, _a1 error) *MockRuntime_ImageFsInfo_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRuntime_ImageFsInfo_Call) RunAndReturn(run func(context.Context) (*v1.ImageFsInfoResponse, error)) *MockRuntime_ImageFsInfo_Call { - _c.Call.Return(run) - return _c -} - -// ImageStats provides a mock function with given fields: ctx -func (_m *MockRuntime) ImageStats(ctx context.Context) (*container.ImageStats, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ImageStats") - } - - var r0 *container.ImageStats - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*container.ImageStats, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *container.ImageStats); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*container.ImageStats) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRuntime_ImageStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ImageStats' -type MockRuntime_ImageStats_Call struct { - *mock.Call -} - -// ImageStats is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockRuntime_Expecter) ImageStats(ctx interface{}) *MockRuntime_ImageStats_Call { - return &MockRuntime_ImageStats_Call{Call: _e.mock.On("ImageStats", ctx)} -} - -func (_c *MockRuntime_ImageStats_Call) Run(run func(ctx context.Context)) *MockRuntime_ImageStats_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockRuntime_ImageStats_Call) Return(_a0 *container.ImageStats, _a1 error) *MockRuntime_ImageStats_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRuntime_ImageStats_Call) RunAndReturn(run func(context.Context) (*container.ImageStats, error)) *MockRuntime_ImageStats_Call { - _c.Call.Return(run) - return _c -} - -// KillPod provides a mock function with given fields: ctx, pod, runningPod, gracePeriodOverride -func (_m *MockRuntime) KillPod(ctx context.Context, pod *corev1.Pod, runningPod container.Pod, gracePeriodOverride *int64) error { - ret := _m.Called(ctx, pod, runningPod, gracePeriodOverride) - - if len(ret) == 0 { - panic("no return value specified for KillPod") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *corev1.Pod, container.Pod, *int64) error); ok { - r0 = rf(ctx, pod, runningPod, gracePeriodOverride) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRuntime_KillPod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KillPod' -type MockRuntime_KillPod_Call struct { - *mock.Call -} - -// KillPod is a helper method to define mock.On call -// - ctx context.Context -// - pod *corev1.Pod -// - runningPod container.Pod -// - gracePeriodOverride *int64 -func (_e *MockRuntime_Expecter) KillPod(ctx interface{}, pod interface{}, runningPod interface{}, gracePeriodOverride interface{}) *MockRuntime_KillPod_Call { - return &MockRuntime_KillPod_Call{Call: _e.mock.On("KillPod", ctx, pod, runningPod, gracePeriodOverride)} -} - -func (_c *MockRuntime_KillPod_Call) Run(run func(ctx context.Context, pod *corev1.Pod, runningPod container.Pod, gracePeriodOverride *int64)) *MockRuntime_KillPod_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*corev1.Pod), args[2].(container.Pod), args[3].(*int64)) - }) - return _c -} - -func (_c *MockRuntime_KillPod_Call) Return(_a0 error) *MockRuntime_KillPod_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRuntime_KillPod_Call) RunAndReturn(run func(context.Context, *corev1.Pod, container.Pod, *int64) error) *MockRuntime_KillPod_Call { - _c.Call.Return(run) - return _c -} - -// ListImages provides a mock function with given fields: ctx -func (_m *MockRuntime) ListImages(ctx context.Context) ([]container.Image, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListImages") - } - - var r0 []container.Image - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]container.Image, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []container.Image); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]container.Image) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRuntime_ListImages_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListImages' -type MockRuntime_ListImages_Call struct { - *mock.Call -} - -// ListImages is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockRuntime_Expecter) ListImages(ctx interface{}) *MockRuntime_ListImages_Call { - return &MockRuntime_ListImages_Call{Call: _e.mock.On("ListImages", ctx)} -} - -func (_c *MockRuntime_ListImages_Call) Run(run func(ctx context.Context)) *MockRuntime_ListImages_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockRuntime_ListImages_Call) Return(_a0 []container.Image, _a1 error) *MockRuntime_ListImages_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRuntime_ListImages_Call) RunAndReturn(run func(context.Context) ([]container.Image, error)) *MockRuntime_ListImages_Call { - _c.Call.Return(run) - return _c -} - -// ListMetricDescriptors provides a mock function with given fields: ctx -func (_m *MockRuntime) ListMetricDescriptors(ctx context.Context) ([]*v1.MetricDescriptor, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListMetricDescriptors") - } - - var r0 []*v1.MetricDescriptor - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]*v1.MetricDescriptor, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []*v1.MetricDescriptor); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*v1.MetricDescriptor) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRuntime_ListMetricDescriptors_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListMetricDescriptors' -type MockRuntime_ListMetricDescriptors_Call struct { - *mock.Call -} - -// ListMetricDescriptors is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockRuntime_Expecter) ListMetricDescriptors(ctx interface{}) *MockRuntime_ListMetricDescriptors_Call { - return &MockRuntime_ListMetricDescriptors_Call{Call: _e.mock.On("ListMetricDescriptors", ctx)} -} - -func (_c *MockRuntime_ListMetricDescriptors_Call) Run(run func(ctx context.Context)) *MockRuntime_ListMetricDescriptors_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockRuntime_ListMetricDescriptors_Call) Return(_a0 []*v1.MetricDescriptor, _a1 error) *MockRuntime_ListMetricDescriptors_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRuntime_ListMetricDescriptors_Call) RunAndReturn(run func(context.Context) ([]*v1.MetricDescriptor, error)) *MockRuntime_ListMetricDescriptors_Call { - _c.Call.Return(run) - return _c -} - -// ListPodSandboxMetrics provides a mock function with given fields: ctx -func (_m *MockRuntime) ListPodSandboxMetrics(ctx context.Context) ([]*v1.PodSandboxMetrics, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListPodSandboxMetrics") - } - - var r0 []*v1.PodSandboxMetrics - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]*v1.PodSandboxMetrics, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []*v1.PodSandboxMetrics); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*v1.PodSandboxMetrics) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRuntime_ListPodSandboxMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPodSandboxMetrics' -type MockRuntime_ListPodSandboxMetrics_Call struct { - *mock.Call -} - -// ListPodSandboxMetrics is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockRuntime_Expecter) ListPodSandboxMetrics(ctx interface{}) *MockRuntime_ListPodSandboxMetrics_Call { - return &MockRuntime_ListPodSandboxMetrics_Call{Call: _e.mock.On("ListPodSandboxMetrics", ctx)} -} - -func (_c *MockRuntime_ListPodSandboxMetrics_Call) Run(run func(ctx context.Context)) *MockRuntime_ListPodSandboxMetrics_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockRuntime_ListPodSandboxMetrics_Call) Return(_a0 []*v1.PodSandboxMetrics, _a1 error) *MockRuntime_ListPodSandboxMetrics_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRuntime_ListPodSandboxMetrics_Call) RunAndReturn(run func(context.Context) ([]*v1.PodSandboxMetrics, error)) *MockRuntime_ListPodSandboxMetrics_Call { - _c.Call.Return(run) - return _c -} - -// PullImage provides a mock function with given fields: ctx, image, credentials, podSandboxConfig -func (_m *MockRuntime) PullImage(ctx context.Context, image container.ImageSpec, credentials []credentialprovider.TrackedAuthConfig, podSandboxConfig *v1.PodSandboxConfig) (string, *credentialprovider.TrackedAuthConfig, error) { - ret := _m.Called(ctx, image, credentials, podSandboxConfig) - - if len(ret) == 0 { - panic("no return value specified for PullImage") - } - - var r0 string - var r1 *credentialprovider.TrackedAuthConfig - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, container.ImageSpec, []credentialprovider.TrackedAuthConfig, *v1.PodSandboxConfig) (string, *credentialprovider.TrackedAuthConfig, error)); ok { - return rf(ctx, image, credentials, podSandboxConfig) - } - if rf, ok := ret.Get(0).(func(context.Context, container.ImageSpec, []credentialprovider.TrackedAuthConfig, *v1.PodSandboxConfig) string); ok { - r0 = rf(ctx, image, credentials, podSandboxConfig) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, container.ImageSpec, []credentialprovider.TrackedAuthConfig, *v1.PodSandboxConfig) *credentialprovider.TrackedAuthConfig); ok { - r1 = rf(ctx, image, credentials, podSandboxConfig) - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).(*credentialprovider.TrackedAuthConfig) - } - } - - if rf, ok := ret.Get(2).(func(context.Context, container.ImageSpec, []credentialprovider.TrackedAuthConfig, *v1.PodSandboxConfig) error); ok { - r2 = rf(ctx, image, credentials, podSandboxConfig) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// MockRuntime_PullImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PullImage' -type MockRuntime_PullImage_Call struct { - *mock.Call -} - -// PullImage is a helper method to define mock.On call -// - ctx context.Context -// - image container.ImageSpec -// - credentials []credentialprovider.TrackedAuthConfig -// - podSandboxConfig *v1.PodSandboxConfig -func (_e *MockRuntime_Expecter) PullImage(ctx interface{}, image interface{}, credentials interface{}, podSandboxConfig interface{}) *MockRuntime_PullImage_Call { - return &MockRuntime_PullImage_Call{Call: _e.mock.On("PullImage", ctx, image, credentials, podSandboxConfig)} -} - -func (_c *MockRuntime_PullImage_Call) Run(run func(ctx context.Context, image container.ImageSpec, credentials []credentialprovider.TrackedAuthConfig, podSandboxConfig *v1.PodSandboxConfig)) *MockRuntime_PullImage_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(container.ImageSpec), args[2].([]credentialprovider.TrackedAuthConfig), args[3].(*v1.PodSandboxConfig)) - }) - return _c -} - -func (_c *MockRuntime_PullImage_Call) Return(_a0 string, _a1 *credentialprovider.TrackedAuthConfig, _a2 error) *MockRuntime_PullImage_Call { - _c.Call.Return(_a0, _a1, _a2) - return _c -} - -func (_c *MockRuntime_PullImage_Call) RunAndReturn(run func(context.Context, container.ImageSpec, []credentialprovider.TrackedAuthConfig, *v1.PodSandboxConfig) (string, *credentialprovider.TrackedAuthConfig, error)) *MockRuntime_PullImage_Call { - _c.Call.Return(run) - return _c -} - -// RemoveImage provides a mock function with given fields: ctx, image -func (_m *MockRuntime) RemoveImage(ctx context.Context, image container.ImageSpec) error { - ret := _m.Called(ctx, image) - - if len(ret) == 0 { - panic("no return value specified for RemoveImage") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, container.ImageSpec) error); ok { - r0 = rf(ctx, image) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRuntime_RemoveImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveImage' -type MockRuntime_RemoveImage_Call struct { - *mock.Call -} - -// RemoveImage is a helper method to define mock.On call -// - ctx context.Context -// - image container.ImageSpec -func (_e *MockRuntime_Expecter) RemoveImage(ctx interface{}, image interface{}) *MockRuntime_RemoveImage_Call { - return &MockRuntime_RemoveImage_Call{Call: _e.mock.On("RemoveImage", ctx, image)} -} - -func (_c *MockRuntime_RemoveImage_Call) Run(run func(ctx context.Context, image container.ImageSpec)) *MockRuntime_RemoveImage_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(container.ImageSpec)) - }) - return _c -} - -func (_c *MockRuntime_RemoveImage_Call) Return(_a0 error) *MockRuntime_RemoveImage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRuntime_RemoveImage_Call) RunAndReturn(run func(context.Context, container.ImageSpec) error) *MockRuntime_RemoveImage_Call { - _c.Call.Return(run) - return _c -} - -// Status provides a mock function with given fields: ctx -func (_m *MockRuntime) Status(ctx context.Context) (*container.RuntimeStatus, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Status") - } - - var r0 *container.RuntimeStatus - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*container.RuntimeStatus, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *container.RuntimeStatus); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*container.RuntimeStatus) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRuntime_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status' -type MockRuntime_Status_Call struct { - *mock.Call -} - -// Status is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockRuntime_Expecter) Status(ctx interface{}) *MockRuntime_Status_Call { - return &MockRuntime_Status_Call{Call: _e.mock.On("Status", ctx)} -} - -func (_c *MockRuntime_Status_Call) Run(run func(ctx context.Context)) *MockRuntime_Status_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockRuntime_Status_Call) Return(_a0 *container.RuntimeStatus, _a1 error) *MockRuntime_Status_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRuntime_Status_Call) RunAndReturn(run func(context.Context) (*container.RuntimeStatus, error)) *MockRuntime_Status_Call { - _c.Call.Return(run) - return _c -} - -// SyncPod provides a mock function with given fields: ctx, pod, podStatus, pullSecrets, backOff -func (_m *MockRuntime) SyncPod(ctx context.Context, pod *corev1.Pod, podStatus *container.PodStatus, pullSecrets []corev1.Secret, backOff *flowcontrol.Backoff) container.PodSyncResult { - ret := _m.Called(ctx, pod, podStatus, pullSecrets, backOff) - - if len(ret) == 0 { - panic("no return value specified for SyncPod") - } - - var r0 container.PodSyncResult - if rf, ok := ret.Get(0).(func(context.Context, *corev1.Pod, *container.PodStatus, []corev1.Secret, *flowcontrol.Backoff) container.PodSyncResult); ok { - r0 = rf(ctx, pod, podStatus, pullSecrets, backOff) - } else { - r0 = ret.Get(0).(container.PodSyncResult) - } - - return r0 -} - -// MockRuntime_SyncPod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncPod' -type MockRuntime_SyncPod_Call struct { - *mock.Call -} - -// SyncPod is a helper method to define mock.On call -// - ctx context.Context -// - pod *corev1.Pod -// - podStatus *container.PodStatus -// - pullSecrets []corev1.Secret -// - backOff *flowcontrol.Backoff -func (_e *MockRuntime_Expecter) SyncPod(ctx interface{}, pod interface{}, podStatus interface{}, pullSecrets interface{}, backOff interface{}) *MockRuntime_SyncPod_Call { - return &MockRuntime_SyncPod_Call{Call: _e.mock.On("SyncPod", ctx, pod, podStatus, pullSecrets, backOff)} -} - -func (_c *MockRuntime_SyncPod_Call) Run(run func(ctx context.Context, pod *corev1.Pod, podStatus *container.PodStatus, pullSecrets []corev1.Secret, backOff *flowcontrol.Backoff)) *MockRuntime_SyncPod_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*corev1.Pod), args[2].(*container.PodStatus), args[3].([]corev1.Secret), args[4].(*flowcontrol.Backoff)) - }) - return _c -} - -func (_c *MockRuntime_SyncPod_Call) Return(_a0 container.PodSyncResult) *MockRuntime_SyncPod_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRuntime_SyncPod_Call) RunAndReturn(run func(context.Context, *corev1.Pod, *container.PodStatus, []corev1.Secret, *flowcontrol.Backoff) container.PodSyncResult) *MockRuntime_SyncPod_Call { - _c.Call.Return(run) - return _c -} - -// Type provides a mock function with no fields -func (_m *MockRuntime) Type() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Type") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockRuntime_Type_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Type' -type MockRuntime_Type_Call struct { - *mock.Call -} - -// Type is a helper method to define mock.On call -func (_e *MockRuntime_Expecter) Type() *MockRuntime_Type_Call { - return &MockRuntime_Type_Call{Call: _e.mock.On("Type")} -} - -func (_c *MockRuntime_Type_Call) Run(run func()) *MockRuntime_Type_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockRuntime_Type_Call) Return(_a0 string) *MockRuntime_Type_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRuntime_Type_Call) RunAndReturn(run func() string) *MockRuntime_Type_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePodCIDR provides a mock function with given fields: ctx, podCIDR -func (_m *MockRuntime) UpdatePodCIDR(ctx context.Context, podCIDR string) error { - ret := _m.Called(ctx, podCIDR) - - if len(ret) == 0 { - panic("no return value specified for UpdatePodCIDR") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, podCIDR) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRuntime_UpdatePodCIDR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePodCIDR' -type MockRuntime_UpdatePodCIDR_Call struct { - *mock.Call -} - -// UpdatePodCIDR is a helper method to define mock.On call -// - ctx context.Context -// - podCIDR string -func (_e *MockRuntime_Expecter) UpdatePodCIDR(ctx interface{}, podCIDR interface{}) *MockRuntime_UpdatePodCIDR_Call { - return &MockRuntime_UpdatePodCIDR_Call{Call: _e.mock.On("UpdatePodCIDR", ctx, podCIDR)} -} - -func (_c *MockRuntime_UpdatePodCIDR_Call) Run(run func(ctx context.Context, podCIDR string)) *MockRuntime_UpdatePodCIDR_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockRuntime_UpdatePodCIDR_Call) Return(_a0 error) *MockRuntime_UpdatePodCIDR_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRuntime_UpdatePodCIDR_Call) RunAndReturn(run func(context.Context, string) error) *MockRuntime_UpdatePodCIDR_Call { - _c.Call.Return(run) - return _c -} - -// Version provides a mock function with given fields: ctx -func (_m *MockRuntime) Version(ctx context.Context) (container.Version, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Version") - } - - var r0 container.Version - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (container.Version, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) container.Version); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(container.Version) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRuntime_Version_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Version' -type MockRuntime_Version_Call struct { - *mock.Call -} - -// Version is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockRuntime_Expecter) Version(ctx interface{}) *MockRuntime_Version_Call { - return &MockRuntime_Version_Call{Call: _e.mock.On("Version", ctx)} -} - -func (_c *MockRuntime_Version_Call) Run(run func(ctx context.Context)) *MockRuntime_Version_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockRuntime_Version_Call) Return(_a0 container.Version, _a1 error) *MockRuntime_Version_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRuntime_Version_Call) RunAndReturn(run func(context.Context) (container.Version, error)) *MockRuntime_Version_Call { - _c.Call.Return(run) - return _c -} - -// NewMockRuntime creates a new instance of MockRuntime. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockRuntime(t interface { - mock.TestingT - Cleanup(func()) -}) *MockRuntime { - mock := &MockRuntime{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/events/resize.go b/pkg/kubelet/events/resize.go new file mode 100644 index 0000000000000..3db9ad5e97203 --- /dev/null +++ b/pkg/kubelet/events/resize.go @@ -0,0 +1,63 @@ +/* +Copyright 2025 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 events + +import ( + "encoding/json" + "fmt" + + v1 "k8s.io/api/core/v1" + "k8s.io/klog/v2" + podutil "k8s.io/kubernetes/pkg/api/v1/pod" + "k8s.io/kubernetes/pkg/kubelet/util/format" +) + +// PodResizeCompletedMsg gernerates the pod resize completed event message. +func PodResizeCompletedMsg(allocatedPod *v1.Pod) string { + type containerAllocation struct { + Name string `json:"name"` + Resources v1.ResourceRequirements `json:"resources,omitempty"` + } + type podResourceSummary struct { + //TODO: resources v1.ResourceRequirements, add pod-level resources here once resizing pod-level resources is supported + InitContainers []containerAllocation `json:"initContainers,omitempty"` + Containers []containerAllocation `json:"containers,omitempty"` + } + + podResizeSource := &podResourceSummary{} + + for container, containerType := range podutil.ContainerIter(&allocatedPod.Spec, podutil.InitContainers|podutil.Containers) { + allocation := containerAllocation{ + Name: container.Name, + Resources: container.Resources, + } + switch containerType { + case podutil.InitContainers: + podResizeSource.InitContainers = append(podResizeSource.InitContainers, allocation) + case podutil.Containers: + podResizeSource.Containers = append(podResizeSource.Containers, allocation) + } + } + + podResizeMsgDetailsJSON, err := json.Marshal(podResizeSource) + if err != nil { + klog.ErrorS(err, "Failed to serialize resource summary", "pod", format.Pod(allocatedPod)) + return "Pod resize completed" + } + podResizeCompletedMsg := fmt.Sprintf("Pod resize completed: %s", string(podResizeMsgDetailsJSON)) + return podResizeCompletedMsg +} diff --git a/pkg/kubelet/events/resize_test.go b/pkg/kubelet/events/resize_test.go new file mode 100644 index 0000000000000..ecfd19f6856ea --- /dev/null +++ b/pkg/kubelet/events/resize_test.go @@ -0,0 +1,128 @@ +/* +Copyright 2025 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 events + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/utils/ptr" +) + +func TestPodResizeCompletedMsg(t *testing.T) { + type testResources struct { + cpuReq, cpuLim, memReq, memLim int64 + } + type testContainer struct { + allocated testResources + nonSidecarInit, sidecar bool + isRunning bool + } + + tests := []struct { + name string + containers []testContainer + expectPodResizeCompletedMsg string + }{{ + name: "simple running container", + containers: []testContainer{{ + allocated: testResources{100, 100, 100, 100}, + isRunning: true, + }}, + expectPodResizeCompletedMsg: `Pod resize completed: {"containers":[{"name":"c0","resources":{"limits":{"cpu":"100m","memory":"100"},"requests":{"cpu":"100m","memory":"100"}}}]}`, + }, { + name: "several containers", + containers: []testContainer{{ + allocated: testResources{cpuReq: 100, cpuLim: 200}, + sidecar: true, + isRunning: true, + }, { + allocated: testResources{memReq: 100, memLim: 200}, + isRunning: true, + }, { + allocated: testResources{cpuReq: 200, memReq: 100}, + isRunning: true, + }}, + expectPodResizeCompletedMsg: `Pod resize completed: {"initContainers":[{"name":"c0","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}],"containers":[{"name":"c1","resources":{"limits":{"memory":"200"},"requests":{"memory":"100"}}},{"name":"c2","resources":{"requests":{"cpu":"200m","memory":"100"}}}]}`, + }, { + name: "best-effort pod", + containers: []testContainer{{ + allocated: testResources{}, + isRunning: true, + }}, + expectPodResizeCompletedMsg: `Pod resize completed: {"containers":[{"name":"c0","resources":{}}]}`, + }} + + mkRequirements := func(r testResources) v1.ResourceRequirements { + res := v1.ResourceRequirements{ + Requests: v1.ResourceList{}, + Limits: v1.ResourceList{}, + } + if r.cpuReq != 0 { + res.Requests[v1.ResourceCPU] = *resource.NewMilliQuantity(r.cpuReq, resource.DecimalSI) + } + if r.cpuLim != 0 { + res.Limits[v1.ResourceCPU] = *resource.NewMilliQuantity(r.cpuLim, resource.DecimalSI) + } + if r.memReq != 0 { + res.Requests[v1.ResourceMemory] = *resource.NewQuantity(r.memReq, resource.DecimalSI) + } + if r.memLim != 0 { + res.Limits[v1.ResourceMemory] = *resource.NewQuantity(r.memLim, resource.DecimalSI) + } + return res + } + mkContainer := func(index int, c testContainer) v1.Container { + container := v1.Container{ + Name: fmt.Sprintf("c%d", index), + Resources: mkRequirements(c.allocated), + } + if c.sidecar { + container.RestartPolicy = ptr.To(v1.ContainerRestartPolicyAlways) + } + return container + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-pod", + UID: "12345", + }, + } + + for i, c := range test.containers { + // Add the container to the pod + container := mkContainer(i, c) + if c.nonSidecarInit || c.sidecar { + pod.Spec.InitContainers = append(pod.Spec.InitContainers, container) + } else { + pod.Spec.Containers = append(pod.Spec.Containers, container) + } + } + + // Verify pod resize completed event is emitted + msg := PodResizeCompletedMsg(pod) + assert.Equal(t, test.expectPodResizeCompletedMsg, msg) + }) + } +} diff --git a/pkg/kubelet/eviction/.mockery.yaml b/pkg/kubelet/eviction/.mockery.yaml index e179b752c1d53..2e8830bc17d1d 100644 --- a/pkg/kubelet/eviction/.mockery.yaml +++ b/pkg/kubelet/eviction/.mockery.yaml @@ -1,12 +1,12 @@ --- dir: . -filename: "mock_{{.InterfaceName | snakecase}}_test.go" -boilerplate-file: ../../../hack/boilerplate/boilerplate.generatego.txt -inpackage: true -with-expecter: true +template: testify +template-data: + boilerplate-file: ../../../hack/boilerplate/boilerplate.generatego.txt + unroll-variadic: true packages: k8s.io/kubernetes/pkg/kubelet/eviction: interfaces: - CgroupNotifier: - NotifierFactory: - ThresholdNotifier: + CgroupNotifier: {} + NotifierFactory: {} + ThresholdNotifier: {} diff --git a/pkg/kubelet/eviction/eviction_manager.go b/pkg/kubelet/eviction/eviction_manager.go index cb981dbb7e8e3..8ec6842cd9ffc 100644 --- a/pkg/kubelet/eviction/eviction_manager.go +++ b/pkg/kubelet/eviction/eviction_manager.go @@ -418,7 +418,7 @@ func (m *managerImpl) synchronize(diskInfoProvider DiskInfoProvider, podFunc Act gracePeriodOverride := int64(immediateEvictionGracePeriodSeconds) if !isHardEvictionThreshold(thresholdToReclaim) { gracePeriodOverride = m.config.MaxPodGracePeriodSeconds - if pod.Spec.TerminationGracePeriodSeconds != nil && !utilfeature.DefaultFeatureGate.Enabled(features.AllowOverwriteTerminationGracePeriodSeconds) { + if pod.Spec.TerminationGracePeriodSeconds != nil { gracePeriodOverride = min(m.config.MaxPodGracePeriodSeconds, *pod.Spec.TerminationGracePeriodSeconds) } } diff --git a/pkg/kubelet/eviction/mock_cgroup_notifier_test.go b/pkg/kubelet/eviction/mock_cgroup_notifier_test.go deleted file mode 100644 index 618fff9951c2d..0000000000000 --- a/pkg/kubelet/eviction/mock_cgroup_notifier_test.go +++ /dev/null @@ -1,113 +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 mockery v2.53.3. DO NOT EDIT. - -package eviction - -import mock "github.com/stretchr/testify/mock" - -// MockCgroupNotifier is an autogenerated mock type for the CgroupNotifier type -type MockCgroupNotifier struct { - mock.Mock -} - -type MockCgroupNotifier_Expecter struct { - mock *mock.Mock -} - -func (_m *MockCgroupNotifier) EXPECT() *MockCgroupNotifier_Expecter { - return &MockCgroupNotifier_Expecter{mock: &_m.Mock} -} - -// Start provides a mock function with given fields: eventCh -func (_m *MockCgroupNotifier) Start(eventCh chan<- struct{}) { - _m.Called(eventCh) -} - -// MockCgroupNotifier_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' -type MockCgroupNotifier_Start_Call struct { - *mock.Call -} - -// Start is a helper method to define mock.On call -// - eventCh chan<- struct{} -func (_e *MockCgroupNotifier_Expecter) Start(eventCh interface{}) *MockCgroupNotifier_Start_Call { - return &MockCgroupNotifier_Start_Call{Call: _e.mock.On("Start", eventCh)} -} - -func (_c *MockCgroupNotifier_Start_Call) Run(run func(eventCh chan<- struct{})) *MockCgroupNotifier_Start_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(chan<- struct{})) - }) - return _c -} - -func (_c *MockCgroupNotifier_Start_Call) Return() *MockCgroupNotifier_Start_Call { - _c.Call.Return() - return _c -} - -func (_c *MockCgroupNotifier_Start_Call) RunAndReturn(run func(chan<- struct{})) *MockCgroupNotifier_Start_Call { - _c.Run(run) - return _c -} - -// Stop provides a mock function with no fields -func (_m *MockCgroupNotifier) Stop() { - _m.Called() -} - -// MockCgroupNotifier_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' -type MockCgroupNotifier_Stop_Call struct { - *mock.Call -} - -// Stop is a helper method to define mock.On call -func (_e *MockCgroupNotifier_Expecter) Stop() *MockCgroupNotifier_Stop_Call { - return &MockCgroupNotifier_Stop_Call{Call: _e.mock.On("Stop")} -} - -func (_c *MockCgroupNotifier_Stop_Call) Run(run func()) *MockCgroupNotifier_Stop_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockCgroupNotifier_Stop_Call) Return() *MockCgroupNotifier_Stop_Call { - _c.Call.Return() - return _c -} - -func (_c *MockCgroupNotifier_Stop_Call) RunAndReturn(run func()) *MockCgroupNotifier_Stop_Call { - _c.Run(run) - return _c -} - -// NewMockCgroupNotifier creates a new instance of MockCgroupNotifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockCgroupNotifier(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCgroupNotifier { - mock := &MockCgroupNotifier{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/eviction/mock_notifier_factory_test.go b/pkg/kubelet/eviction/mock_notifier_factory_test.go deleted file mode 100644 index 4e27024ba2ac7..0000000000000 --- a/pkg/kubelet/eviction/mock_notifier_factory_test.go +++ /dev/null @@ -1,108 +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 mockery v2.53.3. DO NOT EDIT. - -package eviction - -import mock "github.com/stretchr/testify/mock" - -// MockNotifierFactory is an autogenerated mock type for the NotifierFactory type -type MockNotifierFactory struct { - mock.Mock -} - -type MockNotifierFactory_Expecter struct { - mock *mock.Mock -} - -func (_m *MockNotifierFactory) EXPECT() *MockNotifierFactory_Expecter { - return &MockNotifierFactory_Expecter{mock: &_m.Mock} -} - -// NewCgroupNotifier provides a mock function with given fields: path, attribute, threshold -func (_m *MockNotifierFactory) NewCgroupNotifier(path string, attribute string, threshold int64) (CgroupNotifier, error) { - ret := _m.Called(path, attribute, threshold) - - if len(ret) == 0 { - panic("no return value specified for NewCgroupNotifier") - } - - var r0 CgroupNotifier - var r1 error - if rf, ok := ret.Get(0).(func(string, string, int64) (CgroupNotifier, error)); ok { - return rf(path, attribute, threshold) - } - if rf, ok := ret.Get(0).(func(string, string, int64) CgroupNotifier); ok { - r0 = rf(path, attribute, threshold) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(CgroupNotifier) - } - } - - if rf, ok := ret.Get(1).(func(string, string, int64) error); ok { - r1 = rf(path, attribute, threshold) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNotifierFactory_NewCgroupNotifier_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewCgroupNotifier' -type MockNotifierFactory_NewCgroupNotifier_Call struct { - *mock.Call -} - -// NewCgroupNotifier is a helper method to define mock.On call -// - path string -// - attribute string -// - threshold int64 -func (_e *MockNotifierFactory_Expecter) NewCgroupNotifier(path interface{}, attribute interface{}, threshold interface{}) *MockNotifierFactory_NewCgroupNotifier_Call { - return &MockNotifierFactory_NewCgroupNotifier_Call{Call: _e.mock.On("NewCgroupNotifier", path, attribute, threshold)} -} - -func (_c *MockNotifierFactory_NewCgroupNotifier_Call) Run(run func(path string, attribute string, threshold int64)) *MockNotifierFactory_NewCgroupNotifier_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string), args[2].(int64)) - }) - return _c -} - -func (_c *MockNotifierFactory_NewCgroupNotifier_Call) Return(_a0 CgroupNotifier, _a1 error) *MockNotifierFactory_NewCgroupNotifier_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNotifierFactory_NewCgroupNotifier_Call) RunAndReturn(run func(string, string, int64) (CgroupNotifier, error)) *MockNotifierFactory_NewCgroupNotifier_Call { - _c.Call.Return(run) - return _c -} - -// NewMockNotifierFactory creates a new instance of MockNotifierFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockNotifierFactory(t interface { - mock.TestingT - Cleanup(func()) -}) *MockNotifierFactory { - mock := &MockNotifierFactory{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/eviction/mock_threshold_notifier_test.go b/pkg/kubelet/eviction/mock_threshold_notifier_test.go deleted file mode 100644 index 0b2f13d5ed6e4..0000000000000 --- a/pkg/kubelet/eviction/mock_threshold_notifier_test.go +++ /dev/null @@ -1,174 +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 mockery v2.53.3. DO NOT EDIT. - -package eviction - -import ( - mock "github.com/stretchr/testify/mock" - v1alpha1 "k8s.io/kubelet/pkg/apis/stats/v1alpha1" -) - -// MockThresholdNotifier is an autogenerated mock type for the ThresholdNotifier type -type MockThresholdNotifier struct { - mock.Mock -} - -type MockThresholdNotifier_Expecter struct { - mock *mock.Mock -} - -func (_m *MockThresholdNotifier) EXPECT() *MockThresholdNotifier_Expecter { - return &MockThresholdNotifier_Expecter{mock: &_m.Mock} -} - -// Description provides a mock function with no fields -func (_m *MockThresholdNotifier) Description() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Description") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockThresholdNotifier_Description_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Description' -type MockThresholdNotifier_Description_Call struct { - *mock.Call -} - -// Description is a helper method to define mock.On call -func (_e *MockThresholdNotifier_Expecter) Description() *MockThresholdNotifier_Description_Call { - return &MockThresholdNotifier_Description_Call{Call: _e.mock.On("Description")} -} - -func (_c *MockThresholdNotifier_Description_Call) Run(run func()) *MockThresholdNotifier_Description_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockThresholdNotifier_Description_Call) Return(_a0 string) *MockThresholdNotifier_Description_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockThresholdNotifier_Description_Call) RunAndReturn(run func() string) *MockThresholdNotifier_Description_Call { - _c.Call.Return(run) - return _c -} - -// Start provides a mock function with no fields -func (_m *MockThresholdNotifier) Start() { - _m.Called() -} - -// MockThresholdNotifier_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' -type MockThresholdNotifier_Start_Call struct { - *mock.Call -} - -// Start is a helper method to define mock.On call -func (_e *MockThresholdNotifier_Expecter) Start() *MockThresholdNotifier_Start_Call { - return &MockThresholdNotifier_Start_Call{Call: _e.mock.On("Start")} -} - -func (_c *MockThresholdNotifier_Start_Call) Run(run func()) *MockThresholdNotifier_Start_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockThresholdNotifier_Start_Call) Return() *MockThresholdNotifier_Start_Call { - _c.Call.Return() - return _c -} - -func (_c *MockThresholdNotifier_Start_Call) RunAndReturn(run func()) *MockThresholdNotifier_Start_Call { - _c.Run(run) - return _c -} - -// UpdateThreshold provides a mock function with given fields: summary -func (_m *MockThresholdNotifier) UpdateThreshold(summary *v1alpha1.Summary) error { - ret := _m.Called(summary) - - if len(ret) == 0 { - panic("no return value specified for UpdateThreshold") - } - - var r0 error - if rf, ok := ret.Get(0).(func(*v1alpha1.Summary) error); ok { - r0 = rf(summary) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockThresholdNotifier_UpdateThreshold_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateThreshold' -type MockThresholdNotifier_UpdateThreshold_Call struct { - *mock.Call -} - -// UpdateThreshold is a helper method to define mock.On call -// - summary *v1alpha1.Summary -func (_e *MockThresholdNotifier_Expecter) UpdateThreshold(summary interface{}) *MockThresholdNotifier_UpdateThreshold_Call { - return &MockThresholdNotifier_UpdateThreshold_Call{Call: _e.mock.On("UpdateThreshold", summary)} -} - -func (_c *MockThresholdNotifier_UpdateThreshold_Call) Run(run func(summary *v1alpha1.Summary)) *MockThresholdNotifier_UpdateThreshold_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1alpha1.Summary)) - }) - return _c -} - -func (_c *MockThresholdNotifier_UpdateThreshold_Call) Return(_a0 error) *MockThresholdNotifier_UpdateThreshold_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockThresholdNotifier_UpdateThreshold_Call) RunAndReturn(run func(*v1alpha1.Summary) error) *MockThresholdNotifier_UpdateThreshold_Call { - _c.Call.Return(run) - return _c -} - -// NewMockThresholdNotifier creates a new instance of MockThresholdNotifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockThresholdNotifier(t interface { - mock.TestingT - Cleanup(func()) -}) *MockThresholdNotifier { - mock := &MockThresholdNotifier{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/eviction/mocks_test.go b/pkg/kubelet/eviction/mocks_test.go new file mode 100644 index 0000000000000..3ef5383835b81 --- /dev/null +++ b/pkg/kubelet/eviction/mocks_test.go @@ -0,0 +1,382 @@ +/* +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 mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package eviction + +import ( + mock "github.com/stretchr/testify/mock" + "k8s.io/kubelet/pkg/apis/stats/v1alpha1" +) + +// NewMockCgroupNotifier creates a new instance of MockCgroupNotifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockCgroupNotifier(t interface { + mock.TestingT + Cleanup(func()) +}) *MockCgroupNotifier { + mock := &MockCgroupNotifier{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockCgroupNotifier is an autogenerated mock type for the CgroupNotifier type +type MockCgroupNotifier struct { + mock.Mock +} + +type MockCgroupNotifier_Expecter struct { + mock *mock.Mock +} + +func (_m *MockCgroupNotifier) EXPECT() *MockCgroupNotifier_Expecter { + return &MockCgroupNotifier_Expecter{mock: &_m.Mock} +} + +// Start provides a mock function for the type MockCgroupNotifier +func (_mock *MockCgroupNotifier) Start(eventCh chan<- struct{}) { + _mock.Called(eventCh) + return +} + +// MockCgroupNotifier_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type MockCgroupNotifier_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - eventCh chan<- struct{} +func (_e *MockCgroupNotifier_Expecter) Start(eventCh interface{}) *MockCgroupNotifier_Start_Call { + return &MockCgroupNotifier_Start_Call{Call: _e.mock.On("Start", eventCh)} +} + +func (_c *MockCgroupNotifier_Start_Call) Run(run func(eventCh chan<- struct{})) *MockCgroupNotifier_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 chan<- struct{} + if args[0] != nil { + arg0 = args[0].(chan<- struct{}) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockCgroupNotifier_Start_Call) Return() *MockCgroupNotifier_Start_Call { + _c.Call.Return() + return _c +} + +func (_c *MockCgroupNotifier_Start_Call) RunAndReturn(run func(eventCh chan<- struct{})) *MockCgroupNotifier_Start_Call { + _c.Run(run) + return _c +} + +// Stop provides a mock function for the type MockCgroupNotifier +func (_mock *MockCgroupNotifier) Stop() { + _mock.Called() + return +} + +// MockCgroupNotifier_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' +type MockCgroupNotifier_Stop_Call struct { + *mock.Call +} + +// Stop is a helper method to define mock.On call +func (_e *MockCgroupNotifier_Expecter) Stop() *MockCgroupNotifier_Stop_Call { + return &MockCgroupNotifier_Stop_Call{Call: _e.mock.On("Stop")} +} + +func (_c *MockCgroupNotifier_Stop_Call) Run(run func()) *MockCgroupNotifier_Stop_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockCgroupNotifier_Stop_Call) Return() *MockCgroupNotifier_Stop_Call { + _c.Call.Return() + return _c +} + +func (_c *MockCgroupNotifier_Stop_Call) RunAndReturn(run func()) *MockCgroupNotifier_Stop_Call { + _c.Run(run) + return _c +} + +// NewMockNotifierFactory creates a new instance of MockNotifierFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockNotifierFactory(t interface { + mock.TestingT + Cleanup(func()) +}) *MockNotifierFactory { + mock := &MockNotifierFactory{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockNotifierFactory is an autogenerated mock type for the NotifierFactory type +type MockNotifierFactory struct { + mock.Mock +} + +type MockNotifierFactory_Expecter struct { + mock *mock.Mock +} + +func (_m *MockNotifierFactory) EXPECT() *MockNotifierFactory_Expecter { + return &MockNotifierFactory_Expecter{mock: &_m.Mock} +} + +// NewCgroupNotifier provides a mock function for the type MockNotifierFactory +func (_mock *MockNotifierFactory) NewCgroupNotifier(path string, attribute string, threshold int64) (CgroupNotifier, error) { + ret := _mock.Called(path, attribute, threshold) + + if len(ret) == 0 { + panic("no return value specified for NewCgroupNotifier") + } + + var r0 CgroupNotifier + var r1 error + if returnFunc, ok := ret.Get(0).(func(string, string, int64) (CgroupNotifier, error)); ok { + return returnFunc(path, attribute, threshold) + } + if returnFunc, ok := ret.Get(0).(func(string, string, int64) CgroupNotifier); ok { + r0 = returnFunc(path, attribute, threshold) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(CgroupNotifier) + } + } + if returnFunc, ok := ret.Get(1).(func(string, string, int64) error); ok { + r1 = returnFunc(path, attribute, threshold) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockNotifierFactory_NewCgroupNotifier_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewCgroupNotifier' +type MockNotifierFactory_NewCgroupNotifier_Call struct { + *mock.Call +} + +// NewCgroupNotifier is a helper method to define mock.On call +// - path string +// - attribute string +// - threshold int64 +func (_e *MockNotifierFactory_Expecter) NewCgroupNotifier(path interface{}, attribute interface{}, threshold interface{}) *MockNotifierFactory_NewCgroupNotifier_Call { + return &MockNotifierFactory_NewCgroupNotifier_Call{Call: _e.mock.On("NewCgroupNotifier", path, attribute, threshold)} +} + +func (_c *MockNotifierFactory_NewCgroupNotifier_Call) Run(run func(path string, attribute string, threshold int64)) *MockNotifierFactory_NewCgroupNotifier_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 int64 + if args[2] != nil { + arg2 = args[2].(int64) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockNotifierFactory_NewCgroupNotifier_Call) Return(cgroupNotifier CgroupNotifier, err error) *MockNotifierFactory_NewCgroupNotifier_Call { + _c.Call.Return(cgroupNotifier, err) + return _c +} + +func (_c *MockNotifierFactory_NewCgroupNotifier_Call) RunAndReturn(run func(path string, attribute string, threshold int64) (CgroupNotifier, error)) *MockNotifierFactory_NewCgroupNotifier_Call { + _c.Call.Return(run) + return _c +} + +// NewMockThresholdNotifier creates a new instance of MockThresholdNotifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockThresholdNotifier(t interface { + mock.TestingT + Cleanup(func()) +}) *MockThresholdNotifier { + mock := &MockThresholdNotifier{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockThresholdNotifier is an autogenerated mock type for the ThresholdNotifier type +type MockThresholdNotifier struct { + mock.Mock +} + +type MockThresholdNotifier_Expecter struct { + mock *mock.Mock +} + +func (_m *MockThresholdNotifier) EXPECT() *MockThresholdNotifier_Expecter { + return &MockThresholdNotifier_Expecter{mock: &_m.Mock} +} + +// Description provides a mock function for the type MockThresholdNotifier +func (_mock *MockThresholdNotifier) Description() string { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for Description") + } + + var r0 string + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() + } else { + r0 = ret.Get(0).(string) + } + return r0 +} + +// MockThresholdNotifier_Description_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Description' +type MockThresholdNotifier_Description_Call struct { + *mock.Call +} + +// Description is a helper method to define mock.On call +func (_e *MockThresholdNotifier_Expecter) Description() *MockThresholdNotifier_Description_Call { + return &MockThresholdNotifier_Description_Call{Call: _e.mock.On("Description")} +} + +func (_c *MockThresholdNotifier_Description_Call) Run(run func()) *MockThresholdNotifier_Description_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockThresholdNotifier_Description_Call) Return(s string) *MockThresholdNotifier_Description_Call { + _c.Call.Return(s) + return _c +} + +func (_c *MockThresholdNotifier_Description_Call) RunAndReturn(run func() string) *MockThresholdNotifier_Description_Call { + _c.Call.Return(run) + return _c +} + +// Start provides a mock function for the type MockThresholdNotifier +func (_mock *MockThresholdNotifier) Start() { + _mock.Called() + return +} + +// MockThresholdNotifier_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type MockThresholdNotifier_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +func (_e *MockThresholdNotifier_Expecter) Start() *MockThresholdNotifier_Start_Call { + return &MockThresholdNotifier_Start_Call{Call: _e.mock.On("Start")} +} + +func (_c *MockThresholdNotifier_Start_Call) Run(run func()) *MockThresholdNotifier_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockThresholdNotifier_Start_Call) Return() *MockThresholdNotifier_Start_Call { + _c.Call.Return() + return _c +} + +func (_c *MockThresholdNotifier_Start_Call) RunAndReturn(run func()) *MockThresholdNotifier_Start_Call { + _c.Run(run) + return _c +} + +// UpdateThreshold provides a mock function for the type MockThresholdNotifier +func (_mock *MockThresholdNotifier) UpdateThreshold(summary *v1alpha1.Summary) error { + ret := _mock.Called(summary) + + if len(ret) == 0 { + panic("no return value specified for UpdateThreshold") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Summary) error); ok { + r0 = returnFunc(summary) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockThresholdNotifier_UpdateThreshold_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateThreshold' +type MockThresholdNotifier_UpdateThreshold_Call struct { + *mock.Call +} + +// UpdateThreshold is a helper method to define mock.On call +// - summary *v1alpha1.Summary +func (_e *MockThresholdNotifier_Expecter) UpdateThreshold(summary interface{}) *MockThresholdNotifier_UpdateThreshold_Call { + return &MockThresholdNotifier_UpdateThreshold_Call{Call: _e.mock.On("UpdateThreshold", summary)} +} + +func (_c *MockThresholdNotifier_UpdateThreshold_Call) Run(run func(summary *v1alpha1.Summary)) *MockThresholdNotifier_UpdateThreshold_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *v1alpha1.Summary + if args[0] != nil { + arg0 = args[0].(*v1alpha1.Summary) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockThresholdNotifier_UpdateThreshold_Call) Return(err error) *MockThresholdNotifier_UpdateThreshold_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockThresholdNotifier_UpdateThreshold_Call) RunAndReturn(run func(summary *v1alpha1.Summary) error) *MockThresholdNotifier_UpdateThreshold_Call { + _c.Call.Return(run) + return _c +} diff --git a/pkg/kubelet/images/image_gc_manager.go b/pkg/kubelet/images/image_gc_manager.go index 03823deca290d..8075c1a4d06de 100644 --- a/pkg/kubelet/images/image_gc_manager.go +++ b/pkg/kubelet/images/image_gc_manager.go @@ -60,7 +60,7 @@ const ( // PostImageGCHook allows external sources to react to GC collect events. // `remainingImages` is a list of images that were left on the system after garbage // collection finished. -type PostImageGCHook func(remainingImages []string, gcStart time.Time) +type PostImageGCHook func(ctx context.Context, remainingImages []string, gcStart time.Time) // StatsProvider is an interface for fetching stats used during image garbage // collection. @@ -77,7 +77,7 @@ type ImageGCManager interface { GarbageCollect(ctx context.Context, beganGC time.Time) error // Start async garbage collection of images. - Start() + Start(ctx context.Context) GetImageList() ([]container.Image, error) @@ -214,12 +214,12 @@ func NewImageGCManager(runtime container.Runtime, statsProvider StatsProvider, p return im, nil } -func (im *realImageGCManager) Start() { - ctx := context.Background() +func (im *realImageGCManager) Start(ctx context.Context) { + logger := klog.FromContext(ctx) go wait.Until(func() { _, err := im.detectImages(ctx, time.Now()) if err != nil { - klog.InfoS("Failed to monitor images", "err", err) + logger.Info("Failed to monitor images", "err", err) } }, 5*time.Minute, wait.NeverStop) @@ -227,7 +227,7 @@ func (im *realImageGCManager) Start() { go wait.Until(func() { images, err := im.runtime.ListImages(ctx) if err != nil { - klog.InfoS("Failed to update image list", "err", err) + logger.Info("Failed to update image list", "err", err) } else { im.imageCache.set(images) } @@ -241,6 +241,7 @@ func (im *realImageGCManager) GetImageList() ([]container.Image, error) { } func (im *realImageGCManager) detectImages(ctx context.Context, detectTime time.Time) (sets.Set[string], error) { + logger := klog.FromContext(ctx) isRuntimeClassInImageCriAPIEnabled := utilfeature.DefaultFeatureGate.Enabled(features.RuntimeClassInImageCriAPI) imagesInUse := sets.New[string]() @@ -261,11 +262,11 @@ func (im *realImageGCManager) detectImages(ctx context.Context, detectTime time. } if !isRuntimeClassInImageCriAPIEnabled { - klog.V(5).InfoS("Container uses image", "pod", klog.KRef(pod.Namespace, pod.Name), "containerName", container.Name, "containerImage", container.Image, "imageID", container.ImageID, "imageRef", container.ImageRef) + logger.V(5).Info("Container uses image", "pod", klog.KRef(pod.Namespace, pod.Name), "containerName", container.Name, "containerImage", container.Image, "imageID", container.ImageID, "imageRef", container.ImageRef) imagesInUse.Insert(container.ImageID) } else { imageKey := getImageTuple(container.ImageID, container.ImageRuntimeHandler) - klog.V(5).InfoS("Container uses image", "pod", klog.KRef(pod.Namespace, pod.Name), "containerName", container.Name, "containerImage", container.Image, "imageID", container.ImageID, "imageRef", container.ImageRef, "imageKey", imageKey) + logger.V(5).Info("Container uses image", "pod", klog.KRef(pod.Namespace, pod.Name), "containerName", container.Name, "containerImage", container.Image, "imageID", container.ImageID, "imageRef", container.ImageRef, "imageKey", imageKey) imagesInUse.Insert(imageKey) } } @@ -279,17 +280,17 @@ func (im *realImageGCManager) detectImages(ctx context.Context, detectTime time. for _, image := range images { imageKey := image.ID if !isRuntimeClassInImageCriAPIEnabled { - klog.V(5).InfoS("Adding image ID to currentImages", "imageID", imageKey) + logger.V(5).Info("Adding image ID to currentImages", "imageID", imageKey) } else { imageKey = getImageTuple(image.ID, image.Spec.RuntimeHandler) - klog.V(5).InfoS("Adding image ID with runtime class to currentImages", "imageKey", imageKey, "runtimeHandler", image.Spec.RuntimeHandler) + logger.V(5).Info("Adding image ID with runtime class to currentImages", "imageKey", imageKey, "runtimeHandler", image.Spec.RuntimeHandler) } currentImages.Insert(imageKey) // New image, set it as detected now. if _, ok := im.imageRecords[imageKey]; !ok { - klog.V(5).InfoS("Image ID is new", "imageID", imageKey, "runtimeHandler", image.Spec.RuntimeHandler) + logger.V(5).Info("Image ID is new", "imageID", imageKey, "runtimeHandler", image.Spec.RuntimeHandler) im.imageRecords[imageKey] = &imageRecord{ firstDetected: detectTime, runtimeHandlerUsedToPullImage: image.Spec.RuntimeHandler, @@ -298,21 +299,21 @@ func (im *realImageGCManager) detectImages(ctx context.Context, detectTime time. // Set last used time to now if the image is being used. if isImageUsed(imageKey, imagesInUse) { - klog.V(5).InfoS("Setting Image ID lastUsed", "imageID", imageKey, "lastUsed", now) + logger.V(5).Info("Setting Image ID lastUsed", "imageID", imageKey, "lastUsed", now) im.imageRecords[imageKey].lastUsed = now } - klog.V(5).InfoS("Image ID has size", "imageID", imageKey, "size", image.Size) + logger.V(5).Info("Image ID has size", "imageID", imageKey, "size", image.Size) im.imageRecords[imageKey].size = image.Size - klog.V(5).InfoS("Image ID is pinned", "imageID", imageKey, "pinned", image.Pinned) + logger.V(5).Info("Image ID is pinned", "imageID", imageKey, "pinned", image.Pinned) im.imageRecords[imageKey].pinned = image.Pinned } // Remove old images from our records. for image := range im.imageRecords { if !currentImages.Has(image) { - klog.V(5).InfoS("Image ID is no longer present; removing from imageRecords", "imageID", image) + logger.V(5).Info("Image ID is no longer present; removing from imageRecords", "imageID", image) delete(im.imageRecords, image) } } @@ -322,11 +323,12 @@ func (im *realImageGCManager) detectImages(ctx context.Context, detectTime time. // handleImageVolumes ensures that image volumes are considered as images in use. func (im *realImageGCManager) handleImageVolumes(ctx context.Context, imagesInUse sets.Set[string], container *container.Container, pod *container.Pod, images []container.Image) error { + logger := klog.FromContext(ctx) if !utilfeature.DefaultFeatureGate.Enabled(features.ImageVolume) { return nil } - status, err := im.runtime.GetContainerStatus(ctx, container.ID) + status, err := im.runtime.GetContainerStatus(ctx, pod.ID, container.ID) if err != nil { return fmt.Errorf("get container status: %w", err) } @@ -334,7 +336,7 @@ func (im *realImageGCManager) handleImageVolumes(ctx context.Context, imagesInUs for _, mount := range status.Mounts { for _, image := range images { if mount.Image != nil && mount.Image.Image == image.ID { - klog.V(5).InfoS("Container uses image as mount", "pod", klog.KRef(pod.Namespace, pod.Name), "containerName", container.Name, "imageID", image.ID) + logger.V(5).Info("Container uses image as mount", "pod", klog.KRef(pod.Namespace, pod.Name), "containerName", container.Name, "imageID", image.ID) imagesInUse.Insert(image.ID) } } @@ -345,6 +347,7 @@ func (im *realImageGCManager) handleImageVolumes(ctx context.Context, imagesInUs func (im *realImageGCManager) GarbageCollect(ctx context.Context, beganGC time.Time) error { ctx, otelSpan := im.tracer.Start(ctx, "Images/GarbageCollect") + logger := klog.FromContext(ctx) defer otelSpan.End() freeTime := time.Now() @@ -373,7 +376,7 @@ func (im *realImageGCManager) GarbageCollect(ctx context.Context, beganGC time.T } if available > capacity { - klog.InfoS("Availability is larger than capacity", "available", available, "capacity", capacity) + logger.Info("Availability is larger than capacity", "available", available, "capacity", capacity) available = capacity } @@ -388,27 +391,34 @@ func (im *realImageGCManager) GarbageCollect(ctx context.Context, beganGC time.T usagePercent := 100 - int(available*100/capacity) if usagePercent >= im.policy.HighThresholdPercent { amountToFree := capacity*int64(100-im.policy.LowThresholdPercent)/100 - available - klog.InfoS("Disk usage on image filesystem is over the high threshold, trying to free bytes down to the low threshold", "usage", usagePercent, "highThreshold", im.policy.HighThresholdPercent, "amountToFree", amountToFree, "lowThreshold", im.policy.LowThresholdPercent) + logger.Info("Disk usage on image filesystem is over the high threshold, trying to free bytes down to the low threshold", "usage", usagePercent, "highThreshold", im.policy.HighThresholdPercent, "amountToFree", amountToFree, "lowThreshold", im.policy.LowThresholdPercent) remainingImages, freed, err := im.freeSpace(ctx, amountToFree, freeTime, images) if err != nil { + // Failed to delete images, eg due to a read-only filesystem. return err } - im.runPostGCHooks(remainingImages, freeTime) + im.runPostGCHooks(ctx, remainingImages, freeTime) if freed < amountToFree { - err := fmt.Errorf("Failed to garbage collect required amount of images. Attempted to free %d bytes, but only found %d bytes eligible to free.", amountToFree, freed) - im.recorder.Eventf(im.nodeRef, v1.EventTypeWarning, events.FreeDiskSpaceFailed, err.Error()) - return err + // This usually means the disk is full for reasons other than container + // images, such as logs, volumes, or other files. However, it could also + // be due to an unusually large number or size of in-use container images. + message := fmt.Sprintf("Insufficient free disk space on the node's image filesystem (%d%% of %s used). "+ + "Failed to free sufficient space by deleting unused images (freed %d bytes). "+ + "Investigate disk usage, as it could be used by active images, logs, volumes, or other data.", + usagePercent, formatSize(capacity), freed) + im.recorder.Eventf(im.nodeRef, v1.EventTypeWarning, events.FreeDiskSpaceFailed, "%s", message) + return fmt.Errorf("%s", message) } } return nil } -func (im *realImageGCManager) runPostGCHooks(remainingImages []string, gcStartTime time.Time) { +func (im *realImageGCManager) runPostGCHooks(ctx context.Context, remainingImages []string, gcStartTime time.Time) { for _, h := range im.postGCHooks { - h(remainingImages, gcStartTime) + h(ctx, remainingImages, gcStartTime) } } @@ -423,9 +433,10 @@ func (im *realImageGCManager) freeOldImages(ctx context.Context, images []evicti return images, nil } var deletionErrors []error + logger := klog.FromContext(ctx) remainingImages := make([]evictionInfo, 0) for _, image := range images { - klog.V(5).InfoS("Evaluating image ID for possible garbage collection based on image age", "imageID", image.id) + logger.V(5).Info("Evaluating image ID for possible garbage collection based on image age", "imageID", image.id) // Evaluate whether image is older than MaxAge. if freeTime.Sub(image.lastUsed) > im.policy.MaxAge { if err := im.freeImage(ctx, image, ImageGarbageCollectedTotalReasonAge); err != nil { @@ -444,7 +455,8 @@ func (im *realImageGCManager) freeOldImages(ctx context.Context, images []evicti } func (im *realImageGCManager) DeleteUnusedImages(ctx context.Context) error { - klog.InfoS("Attempting to delete unused images") + logger := klog.FromContext(ctx) + logger.Info("Attempting to delete unused images") freeTime := time.Now() images, err := im.imagesInEvictionOrder(ctx, freeTime) @@ -457,7 +469,7 @@ func (im *realImageGCManager) DeleteUnusedImages(ctx context.Context) error { return err } - im.runPostGCHooks(remainingImages, freeTime) + im.runPostGCHooks(ctx, remainingImages, freeTime) return nil } @@ -470,22 +482,23 @@ func (im *realImageGCManager) DeleteUnusedImages(ctx context.Context) error { func (im *realImageGCManager) freeSpace(ctx context.Context, bytesToFree int64, freeTime time.Time, images []evictionInfo) ([]string, int64, error) { // Delete unused images until we've freed up enough space. var deletionErrors []error + logger := klog.FromContext(ctx) spaceFreed := int64(0) var imagesLeft []string for _, image := range images { - klog.V(5).InfoS("Evaluating image ID for possible garbage collection based on disk usage", "imageID", image.id, "runtimeHandler", image.imageRecord.runtimeHandlerUsedToPullImage) + logger.V(5).Info("Evaluating image ID for possible garbage collection based on disk usage", "imageID", image.id, "runtimeHandler", image.runtimeHandlerUsedToPullImage) // Images that are currently in used were given a newer lastUsed. if image.lastUsed.Equal(freeTime) || image.lastUsed.After(freeTime) { - klog.V(5).InfoS("Image ID was used too recently, not eligible for garbage collection", "imageID", image.id, "lastUsed", image.lastUsed, "freeTime", freeTime) imagesLeft = append(imagesLeft, image.id) + logger.V(5).Info("Image ID was used too recently, not eligible for garbage collection", "imageID", image.id, "lastUsed", image.lastUsed, "freeTime", freeTime) continue } // Avoid garbage collect the image if the image is not old enough. // In such a case, the image may have just been pulled down, and will be used by a container right away. if freeTime.Sub(image.firstDetected) < im.policy.MinAge { - klog.V(5).InfoS("Image ID's age is less than the policy's minAge, not eligible for garbage collection", "imageID", image.id, "age", freeTime.Sub(image.firstDetected), "minAge", im.policy.MinAge) imagesLeft = append(imagesLeft, image.id) + logger.V(5).Info("Image ID's age is less than the policy's minAge, not eligible for garbage collection", "imageID", image.id, "age", freeTime.Sub(image.firstDetected), "minAge", im.policy.MinAge) continue } @@ -511,7 +524,8 @@ func (im *realImageGCManager) freeImage(ctx context.Context, image evictionInfo, isRuntimeClassInImageCriAPIEnabled := utilfeature.DefaultFeatureGate.Enabled(features.RuntimeClassInImageCriAPI) // Remove image. Continue despite errors. var err error - klog.InfoS("Removing image to free bytes", "imageID", image.id, "size", image.size, "runtimeHandler", image.runtimeHandlerUsedToPullImage) + logger := klog.FromContext(ctx) + logger.Info("Removing image to free bytes", "imageID", image.id, "size", image.size, "runtimeHandler", image.runtimeHandlerUsedToPullImage) err = im.runtime.RemoveImage(ctx, container.ImageSpec{Image: image.id, RuntimeHandler: image.runtimeHandlerUsedToPullImage}) if err != nil { return err @@ -540,17 +554,18 @@ func (im *realImageGCManager) imagesInEvictionOrder(ctx context.Context, freeTim im.imageRecordsLock.Lock() defer im.imageRecordsLock.Unlock() + logger := klog.FromContext(ctx) // Get all images in eviction order. images := make([]evictionInfo, 0, len(im.imageRecords)) for image, record := range im.imageRecords { if isImageUsed(image, imagesInUse) { - klog.V(5).InfoS("Image ID is being used", "imageID", image) + logger.V(5).Info("Image ID is being used", "imageID", image) continue } // Check if image is pinned, prevent garbage collection if record.pinned { - klog.V(5).InfoS("Image is pinned, skipping garbage collection", "imageID", image) + logger.V(5).Info("Image is pinned, skipping garbage collection", "imageID", image) continue } @@ -576,6 +591,31 @@ func (im *realImageGCManager) imagesInEvictionOrder(ctx context.Context, freeTim return images, nil } +// formatSize returns a human-readable string for a given size in bytes. +func formatSize(sizeBytes int64) string { + const ( + KiB = 1024 + MiB = 1024 * KiB + GiB = 1024 * MiB + TiB = 1024 * GiB + ) + + size := float64(sizeBytes) + + switch { + case size < KiB: + return fmt.Sprintf("%d B", int64(size)) + case size < MiB: + return fmt.Sprintf("%.1f KiB", size/KiB) + case size < GiB: + return fmt.Sprintf("%.1f MiB", size/MiB) + case size < TiB: + return fmt.Sprintf("%.1f GiB", size/GiB) + default: + return fmt.Sprintf("%.1f TiB", size/TiB) + } +} + // If RuntimeClassInImageCriAPI feature gate is enabled, imageRecords // are identified by a tuple of (imageId,runtimeHandler) that is passed // from ListImages() call. If no runtimehandler is specified in response diff --git a/pkg/kubelet/images/image_gc_manager_test.go b/pkg/kubelet/images/image_gc_manager_test.go index 332c12cb02670..65095ccfa04d5 100644 --- a/pkg/kubelet/images/image_gc_manager_test.go +++ b/pkg/kubelet/images/image_gc_manager_test.go @@ -37,6 +37,7 @@ import ( containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" stats "k8s.io/kubernetes/pkg/kubelet/server/stats" statstest "k8s.io/kubernetes/pkg/kubelet/server/stats/testing" + "k8s.io/kubernetes/test/utils/ktesting" testingclock "k8s.io/utils/clock/testing" "k8s.io/utils/ptr" ) @@ -125,7 +126,7 @@ func makeContainer(id int) *container.Container { } func TestDetectImagesInitialDetect(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) mockStatsProvider := statstest.NewMockProvider(t) manager, fakeRuntime := newRealImageGCManager(ImageGCPolicy{}, mockStatsProvider) @@ -173,7 +174,7 @@ func TestDetectImagesInitialDetect(t *testing.T) { func TestDetectImagesInitialDetectWithRuntimeHandlerInImageCriAPIFeatureGate(t *testing.T) { featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.RuntimeClassInImageCriAPI, true) testRuntimeHandler := "test-runtimeHandler" - ctx := context.Background() + ctx := ktesting.Init(t) mockStatsProvider := statstest.NewMockProvider(t) manager, fakeRuntime := newRealImageGCManager(ImageGCPolicy{}, mockStatsProvider) @@ -227,7 +228,7 @@ func TestDetectImagesInitialDetectWithRuntimeHandlerInImageCriAPIFeatureGate(t * } func TestDetectImagesWithNewImage(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) mockStatsProvider := statstest.NewMockProvider(t) // Just one image initially. @@ -279,7 +280,7 @@ func TestDetectImagesWithNewImage(t *testing.T) { } func TestDeleteUnusedImagesExemptSandboxImage(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) mockStatsProvider := statstest.NewMockProvider(t) manager, fakeRuntime := newRealImageGCManager(ImageGCPolicy{}, mockStatsProvider) @@ -298,7 +299,7 @@ func TestDeleteUnusedImagesExemptSandboxImage(t *testing.T) { } func TestDeletePinnedImage(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) mockStatsProvider := statstest.NewMockProvider(t) manager, fakeRuntime := newRealImageGCManager(ImageGCPolicy{}, mockStatsProvider) @@ -321,7 +322,7 @@ func TestDeletePinnedImage(t *testing.T) { } func TestDoNotDeletePinnedImage(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) mockStatsProvider := statstest.NewMockProvider(t) manager, fakeRuntime := newRealImageGCManager(ImageGCPolicy{}, mockStatsProvider) @@ -342,7 +343,7 @@ func TestDoNotDeletePinnedImage(t *testing.T) { } func TestDeleteUnPinnedImage(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) mockStatsProvider := statstest.NewMockProvider(t) manager, fakeRuntime := newRealImageGCManager(ImageGCPolicy{}, mockStatsProvider) @@ -363,7 +364,7 @@ func TestDeleteUnPinnedImage(t *testing.T) { } func TestAllPinnedImages(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) mockStatsProvider := statstest.NewMockProvider(t) manager, fakeRuntime := newRealImageGCManager(ImageGCPolicy{}, mockStatsProvider) @@ -385,7 +386,7 @@ func TestAllPinnedImages(t *testing.T) { } func TestDetectImagesContainerStopped(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) mockStatsProvider := statstest.NewMockProvider(t) manager, fakeRuntime := newRealImageGCManager(ImageGCPolicy{}, mockStatsProvider) @@ -424,7 +425,7 @@ func TestDetectImagesContainerStopped(t *testing.T) { } func TestDetectImagesWithRemovedImages(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) mockStatsProvider := statstest.NewMockProvider(t) manager, fakeRuntime := newRealImageGCManager(ImageGCPolicy{}, mockStatsProvider) @@ -453,7 +454,7 @@ func TestDetectImagesWithRemovedImages(t *testing.T) { } func TestFreeSpaceImagesInUseContainersAreIgnored(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) mockStatsProvider := statstest.NewMockProvider(t) manager, fakeRuntime := newRealImageGCManager(ImageGCPolicy{}, mockStatsProvider) @@ -474,7 +475,7 @@ func TestFreeSpaceImagesInUseContainersAreIgnored(t *testing.T) { } func TestDeleteUnusedImagesRemoveAllUnusedImages(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) mockStatsProvider := statstest.NewMockProvider(t) manager, fakeRuntime := newRealImageGCManager(ImageGCPolicy{}, mockStatsProvider) @@ -498,7 +499,7 @@ func TestDeleteUnusedImagesRemoveAllUnusedImages(t *testing.T) { } func TestDeleteUnusedImagesLimitByImageLiveTime(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) mockStatsProvider := statstest.NewMockProvider(t) manager, fakeRuntime := newRealImageGCManager(ImageGCPolicy{ @@ -517,7 +518,7 @@ func TestDeleteUnusedImagesLimitByImageLiveTime(t *testing.T) { }}, } // start to detect images - manager.Start() + manager.Start(ctx) // try to delete images, but images are not old enough,so no image will be deleted err := manager.DeleteUnusedImages(ctx) assert := assert.New(t) @@ -531,7 +532,7 @@ func TestDeleteUnusedImagesLimitByImageLiveTime(t *testing.T) { } func TestFreeSpaceRemoveByLeastRecentlyUsed(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) mockStatsProvider := statstest.NewMockProvider(t) manager, fakeRuntime := newRealImageGCManager(ImageGCPolicy{}, mockStatsProvider) @@ -583,7 +584,7 @@ func TestFreeSpaceRemoveByLeastRecentlyUsed(t *testing.T) { } func TestFreeSpaceTiesBrokenByDetectedTime(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) mockStatsProvider := statstest.NewMockProvider(t) manager, fakeRuntime := newRealImageGCManager(ImageGCPolicy{}, mockStatsProvider) @@ -617,7 +618,7 @@ func TestFreeSpaceTiesBrokenByDetectedTime(t *testing.T) { } func TestGarbageCollectBelowLowThreshold(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) policy := ImageGCPolicy{ HighThresholdPercent: 90, LowThresholdPercent: 80, @@ -636,7 +637,7 @@ func TestGarbageCollectBelowLowThreshold(t *testing.T) { } func TestGarbageCollectCadvisorFailure(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) policy := ImageGCPolicy{ HighThresholdPercent: 90, LowThresholdPercent: 80, @@ -645,11 +646,11 @@ func TestGarbageCollectCadvisorFailure(t *testing.T) { manager, _ := newRealImageGCManager(policy, mockStatsProvider) mockStatsProvider.EXPECT().ImageFsStats(mock.Anything).Return(&statsapi.FsStats{}, &statsapi.FsStats{}, fmt.Errorf("error")) - assert.Error(t, manager.GarbageCollect(ctx, time.Now())) + require.Error(t, manager.GarbageCollect(ctx, time.Now())) } func TestGarbageCollectBelowSuccess(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) policy := ImageGCPolicy{ HighThresholdPercent: 90, LowThresholdPercent: 80, @@ -672,29 +673,55 @@ func TestGarbageCollectBelowSuccess(t *testing.T) { } func TestGarbageCollectNotEnoughFreed(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) policy := ImageGCPolicy{ HighThresholdPercent: 90, LowThresholdPercent: 80, } mockStatsProvider := statstest.NewMockProvider(t) - manager, fakeRuntime := newRealImageGCManager(policy, mockStatsProvider) + fakeRuntime := &containertest.FakeRuntime{} + recorder := record.NewFakeRecorder(1) + manager := &realImageGCManager{ + runtime: fakeRuntime, + policy: policy, + imageRecords: make(map[string]*imageRecord), + statsProvider: mockStatsProvider, + recorder: recorder, + tracer: noopoteltrace.NewTracerProvider().Tracer(""), + } - // Expect 95% usage and little of it gets freed. + // Initial state: 95% usage, of which 5% is garbage images. + capacity := uint64(10 * 1024 * 1024 * 1024) + available := capacity / 20 // 5% available, 95% usage imageFs := &statsapi.FsStats{ - AvailableBytes: ptr.To(uint64(50)), - CapacityBytes: ptr.To(uint64(1000)), + AvailableBytes: ptr.To(available), + CapacityBytes: ptr.To(capacity), } mockStatsProvider.EXPECT().ImageFsStats(mock.Anything).Return(imageFs, imageFs, nil) + // This image is unused and eligible for deletion. + // Its size is less than the required amount to free. + imageSize := int64(500 * 1024 * 1024) // 500 MiB fakeRuntime.ImageList = []container.Image{ - makeImage(0, 50), + makeImage(0, imageSize), } - assert.Error(t, manager.GarbageCollect(ctx, time.Now())) + err := manager.GarbageCollect(ctx, time.Now()) + require.Error(t, err) + + // Check that a warning event was sent + expectedEvent := "Warning FreeDiskSpaceFailed Insufficient free disk space on the node's image filesystem" + + " (95% of 10.0 GiB used). Failed to free sufficient space by deleting unused images (freed 524288000 bytes)." + + " Investigate disk usage, as it could be used by active images, logs, volumes, or other data." + select { + case event := <-recorder.Events: + assert.Equal(t, expectedEvent, event) + default: + t.Errorf("expected a 'FreeDiskSpaceFailed' event") + } } func TestGarbageCollectImageNotOldEnough(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) policy := ImageGCPolicy{ HighThresholdPercent: 90, LowThresholdPercent: 80, @@ -747,7 +774,7 @@ func getImagesAndFreeSpace(ctx context.Context, t *testing.T, assert *assert.Ass } func TestGarbageCollectImageTooOld(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) policy := ImageGCPolicy{ HighThresholdPercent: 90, LowThresholdPercent: 80, @@ -802,7 +829,7 @@ func TestGarbageCollectImageTooOld(t *testing.T) { } func TestGarbageCollectImageMaxAgeDisabled(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) policy := ImageGCPolicy{ HighThresholdPercent: 90, LowThresholdPercent: 80, diff --git a/pkg/kubelet/images/image_manager.go b/pkg/kubelet/images/image_manager.go index f52297c3ec656..b318b347984e9 100644 --- a/pkg/kubelet/images/image_manager.go +++ b/pkg/kubelet/images/image_manager.go @@ -181,6 +181,11 @@ func (m *imageManager) EnsureImageExists(ctx context.Context, objRef *v1.ObjectR if imageRef != "" && !utilfeature.DefaultFeatureGate.Enabled(features.KubeletEnsureSecretPulledImages) { msg := fmt.Sprintf("Container image %q already present on machine", requestedImage) m.logIt(objRef, v1.EventTypeNormal, events.PulledImage, logPrefix, msg, klog.Info) + + // we need to stop recording if it is still in progress, as the image + // has already been pulled by another pod. + m.podPullingTimeRecorder.RecordImageFinishedPulling(pod.UID) + return imageRef, msg, nil } @@ -239,10 +244,15 @@ func (m *imageManager) EnsureImageExists(ctx context.Context, objRef *v1.ObjectR } } - pullRequired := m.imagePullManager.MustAttemptImagePull(requestedImage, imageRef, imagePullSecrets, imagePullServiceAccount) + pullRequired := m.imagePullManager.MustAttemptImagePull(ctx, requestedImage, imageRef, imagePullSecrets, imagePullServiceAccount) if !pullRequired { msg := fmt.Sprintf("Container image %q already present on machine and can be accessed by the pod", requestedImage) m.logIt(objRef, v1.EventTypeNormal, events.PulledImage, logPrefix, msg, klog.Info) + + // we need to stop recording if it is still in progress, as the image + // has already been pulled by another pod. + m.podPullingTimeRecorder.RecordImageFinishedPulling(pod.UID) + return imageRef, msg, nil } } @@ -268,9 +278,9 @@ func (m *imageManager) pullImage(ctx context.Context, logPrefix string, objRef * defer func() { if pullSucceeded { - m.imagePullManager.RecordImagePulled(image, imageRef, trackedToImagePullCreds(finalPullCredentials)) + m.imagePullManager.RecordImagePulled(ctx, image, imageRef, trackedToImagePullCreds(finalPullCredentials)) } else { - m.imagePullManager.RecordImagePullFailed(image) + m.imagePullManager.RecordImagePullFailed(ctx, image) } }() } diff --git a/pkg/kubelet/images/image_manager_test.go b/pkg/kubelet/images/image_manager_test.go index 1f98d734a72e9..ad460e097f904 100644 --- a/pkg/kubelet/images/image_manager_test.go +++ b/pkg/kubelet/images/image_manager_test.go @@ -665,27 +665,33 @@ func ensureSecretImagesTestCases() []pullerTestCase { type mockPodPullingTimeRecorder struct { sync.Mutex - startedPullingRecorded bool - finishedPullingRecorded bool + startedPullingRecorded map[types.UID]bool + finishedPullingRecorded map[types.UID]bool } func (m *mockPodPullingTimeRecorder) RecordImageStartedPulling(podUID types.UID) { m.Lock() defer m.Unlock() - m.startedPullingRecorded = true + + if !m.startedPullingRecorded[podUID] { + m.startedPullingRecorded[podUID] = true + } } func (m *mockPodPullingTimeRecorder) RecordImageFinishedPulling(podUID types.UID) { m.Lock() defer m.Unlock() - m.finishedPullingRecorded = true + + if m.startedPullingRecorded[podUID] { + m.finishedPullingRecorded[podUID] = true + } } func (m *mockPodPullingTimeRecorder) reset() { m.Lock() defer m.Unlock() - m.startedPullingRecorded = false - m.finishedPullingRecorded = false + clear(m.startedPullingRecorded) + clear(m.finishedPullingRecorded) } type mockImagePullManager struct { @@ -694,7 +700,7 @@ type mockImagePullManager struct { config *mockImagePullManagerConfig } -func (m *mockImagePullManager) MustAttemptImagePull(image, _ string, podSecrets []kubeletconfiginternal.ImagePullSecret, podServiceAccount *kubeletconfiginternal.ImagePullServiceAccount) bool { +func (m *mockImagePullManager) MustAttemptImagePull(ctx context.Context, image, _ string, podSecrets []kubeletconfiginternal.ImagePullSecret, podServiceAccount *kubeletconfiginternal.ImagePullServiceAccount) bool { if m.config == nil || m.config.allowAll { return false } @@ -736,7 +742,7 @@ type mockImagePullManagerWithTracking struct { recordedCredentials *kubeletconfiginternal.ImagePullCredentials } -func (m *mockImagePullManagerWithTracking) MustAttemptImagePull(image, imageRef string, podSecrets []kubeletconfiginternal.ImagePullSecret, podServiceAccount *kubeletconfiginternal.ImagePullServiceAccount) bool { +func (m *mockImagePullManagerWithTracking) MustAttemptImagePull(ctx context.Context, image, imageRef string, podSecrets []kubeletconfiginternal.ImagePullSecret, podServiceAccount *kubeletconfiginternal.ImagePullServiceAccount) bool { m.mustAttemptCalled = true m.lastImage = image m.lastImageRef = imageRef @@ -751,7 +757,7 @@ func (m *mockImagePullManagerWithTracking) MustAttemptImagePull(image, imageRef return m.mustAttemptReturn } -func (m *mockImagePullManagerWithTracking) RecordImagePulled(image, imageRef string, credentials *kubeletconfiginternal.ImagePullCredentials) { +func (m *mockImagePullManagerWithTracking) RecordImagePulled(ctx context.Context, image, imageRef string, credentials *kubeletconfiginternal.ImagePullCredentials) { m.recordedCredentials = credentials } @@ -799,7 +805,10 @@ func pullerTestEnv( fakeRuntime.Err = c.pullerErr fakeRuntime.InspectErr = c.inspectErr - fakePodPullingTimeRecorder = &mockPodPullingTimeRecorder{} + fakePodPullingTimeRecorder = &mockPodPullingTimeRecorder{ + startedPullingRecorded: make(map[types.UID]bool), + finishedPullingRecorded: make(map[types.UID]bool), + } pullManager := &mockImagePullManager{ config: c.allowedCredentials, @@ -834,7 +843,7 @@ func TestParallelPuller(t *testing.T) { useSerializedEnv := false for _, c := range cases { t.Run(c.testName, func(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) puller, fakeClock, fakeRuntime, container, fakePodPullingTimeRecorder, _ := pullerTestEnv(t, c, useSerializedEnv, nil) pod := &v1.Pod{ @@ -865,8 +874,8 @@ func TestParallelPuller(t *testing.T) { _, msg, err := puller.EnsureImageExists(ctx, nil, pod, container.Image, c.pullSecrets, podSandboxConfig, "", container.ImagePullPolicy) fakeRuntime.AssertCalls(expected.calls) assert.Equal(t, expected.err, err) - assert.Equal(t, expected.shouldRecordStartedPullingTime, fakePodPullingTimeRecorder.startedPullingRecorded) - assert.Equal(t, expected.shouldRecordFinishedPullingTime, fakePodPullingTimeRecorder.finishedPullingRecorded) + assert.Equal(t, expected.shouldRecordStartedPullingTime, fakePodPullingTimeRecorder.startedPullingRecorded[pod.UID]) + assert.Equal(t, expected.shouldRecordFinishedPullingTime, fakePodPullingTimeRecorder.finishedPullingRecorded[pod.UID]) assert.Contains(t, msg, expected.msg) fakePodPullingTimeRecorder.reset() } @@ -880,7 +889,7 @@ func TestSerializedPuller(t *testing.T) { useSerializedEnv := true for _, c := range cases { t.Run(c.testName, func(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) puller, fakeClock, fakeRuntime, container, fakePodPullingTimeRecorder, _ := pullerTestEnv(t, c, useSerializedEnv, nil) pod := &v1.Pod{ @@ -911,8 +920,8 @@ func TestSerializedPuller(t *testing.T) { _, msg, err := puller.EnsureImageExists(ctx, nil, pod, container.Image, c.pullSecrets, podSandboxConfig, "", container.ImagePullPolicy) fakeRuntime.AssertCalls(expected.calls) assert.Equal(t, expected.err, err) - assert.Equal(t, expected.shouldRecordStartedPullingTime, fakePodPullingTimeRecorder.startedPullingRecorded) - assert.Equal(t, expected.shouldRecordFinishedPullingTime, fakePodPullingTimeRecorder.finishedPullingRecorded) + assert.Equal(t, expected.shouldRecordStartedPullingTime, fakePodPullingTimeRecorder.startedPullingRecorded[pod.UID]) + assert.Equal(t, expected.shouldRecordFinishedPullingTime, fakePodPullingTimeRecorder.finishedPullingRecorded[pod.UID]) assert.Contains(t, msg, expected.msg) fakePodPullingTimeRecorder.reset() } @@ -975,7 +984,7 @@ func TestPullAndListImageWithPodAnnotations(t *testing.T) { useSerializedEnv := true t.Run(c.testName, func(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) puller, fakeClock, fakeRuntime, container, fakePodPullingTimeRecorder, _ := pullerTestEnv(t, c, useSerializedEnv, nil) fakeRuntime.CalledFunctions = nil fakeRuntime.ImageList = []Image{} @@ -984,8 +993,8 @@ func TestPullAndListImageWithPodAnnotations(t *testing.T) { _, _, err := puller.EnsureImageExists(ctx, nil, pod, container.Image, c.pullSecrets, podSandboxConfig, "", container.ImagePullPolicy) fakeRuntime.AssertCalls(c.expected[0].calls) assert.Equal(t, c.expected[0].err, err, "tick=%d", 0) - assert.Equal(t, c.expected[0].shouldRecordStartedPullingTime, fakePodPullingTimeRecorder.startedPullingRecorded) - assert.Equal(t, c.expected[0].shouldRecordFinishedPullingTime, fakePodPullingTimeRecorder.finishedPullingRecorded) + assert.Equal(t, c.expected[0].shouldRecordStartedPullingTime, fakePodPullingTimeRecorder.startedPullingRecorded[pod.UID]) + assert.Equal(t, c.expected[0].shouldRecordFinishedPullingTime, fakePodPullingTimeRecorder.finishedPullingRecorded[pod.UID]) images, _ := fakeRuntime.ListImages(ctx) assert.Len(t, images, 1, "ListImages() count") @@ -1039,7 +1048,7 @@ func TestPullAndListImageWithRuntimeHandlerInImageCriAPIFeatureGate(t *testing.T useSerializedEnv := true t.Run(c.testName, func(t *testing.T) { featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.RuntimeClassInImageCriAPI, true) - ctx := context.Background() + ctx := ktesting.Init(t) puller, fakeClock, fakeRuntime, container, fakePodPullingTimeRecorder, _ := pullerTestEnv(t, c, useSerializedEnv, nil) fakeRuntime.CalledFunctions = nil fakeRuntime.ImageList = []Image{} @@ -1048,8 +1057,8 @@ func TestPullAndListImageWithRuntimeHandlerInImageCriAPIFeatureGate(t *testing.T _, _, err := puller.EnsureImageExists(ctx, nil, pod, container.Image, c.pullSecrets, podSandboxConfig, runtimeHandler, container.ImagePullPolicy) fakeRuntime.AssertCalls(c.expected[0].calls) assert.Equal(t, c.expected[0].err, err, "tick=%d", 0) - assert.Equal(t, c.expected[0].shouldRecordStartedPullingTime, fakePodPullingTimeRecorder.startedPullingRecorded) - assert.Equal(t, c.expected[0].shouldRecordFinishedPullingTime, fakePodPullingTimeRecorder.finishedPullingRecorded) + assert.Equal(t, c.expected[0].shouldRecordStartedPullingTime, fakePodPullingTimeRecorder.startedPullingRecorded[pod.UID]) + assert.Equal(t, c.expected[0].shouldRecordFinishedPullingTime, fakePodPullingTimeRecorder.finishedPullingRecorded[pod.UID]) images, _ := fakeRuntime.ListImages(ctx) assert.Len(t, images, 1, "ListImages() count") @@ -1071,7 +1080,7 @@ func TestPullAndListImageWithRuntimeHandlerInImageCriAPIFeatureGate(t *testing.T } func TestMaxParallelImagePullsLimit(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) pod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", @@ -1143,6 +1152,108 @@ func TestMaxParallelImagePullsLimit(t *testing.T) { fakeRuntime.AssertCallCounts("PullImage", 7) } +func TestParallelPodPullingTimeRecorderWithErr(t *testing.T) { + ctx := context.Background() + pod1 := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test_pod1", + Namespace: "test-ns", + UID: "bar1", + ResourceVersion: "42", + }} + pod1SandboxConfig := &runtimeapi.PodSandboxConfig{ + Metadata: &runtimeapi.PodSandboxMetadata{ + Name: pod1.Name, + Namespace: pod1.Namespace, + Uid: string(pod1.UID), + }, + } + + pod2 := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test_pod2", + Namespace: "test-ns", + UID: "bar2", + ResourceVersion: "42", + }} + pod2SandboxConfig := &runtimeapi.PodSandboxConfig{ + Metadata: &runtimeapi.PodSandboxMetadata{ + Name: pod2.Name, + Namespace: pod2.Namespace, + Uid: string(pod2.UID), + }, + } + + pods := [2]*v1.Pod{pod1, pod2} + podSandboxes := [2]*runtimeapi.PodSandboxConfig{pod1SandboxConfig, pod2SandboxConfig} + + testCase := &pullerTestCase{ + containerImage: "missing_image", + testName: "missing image, pull if not present", + policy: v1.PullIfNotPresent, + inspectErr: nil, + pullerErr: nil, + qps: 0.0, + burst: 0, + } + + useSerializedEnv := false + maxParallelImagePulls := 2 + var wg sync.WaitGroup + + puller, fakeClock, fakeRuntime, container, fakePodPullingTimeRecorder, _ := pullerTestEnv(t, *testCase, useSerializedEnv, ptr.To(int32(maxParallelImagePulls))) + fakeRuntime.BlockImagePulls = true + fakeRuntime.CalledFunctions = nil + fakeRuntime.T = t + fakeClock.Step(time.Second) + + // First, each pod's puller calls EnsureImageExists + for i := 0; i < 2; i++ { + wg.Add(1) + go func(i int) { + _, _, _ = puller.EnsureImageExists(ctx, nil, pods[i], container.Image, testCase.pullSecrets, podSandboxes[i], "", container.ImagePullPolicy) + wg.Done() + }(i) + } + time.Sleep(1 * time.Second) + + // Assert the number of PullImage calls is 2 + fakeRuntime.AssertCallCounts("PullImage", 2) + + // Recording for both of the pods should be started but not finished + assert.True(t, fakePodPullingTimeRecorder.startedPullingRecorded[pods[0].UID]) + assert.True(t, fakePodPullingTimeRecorder.startedPullingRecorded[pods[1].UID]) + assert.False(t, fakePodPullingTimeRecorder.finishedPullingRecorded[pods[0].UID]) + assert.False(t, fakePodPullingTimeRecorder.finishedPullingRecorded[pods[1].UID]) + + // Unblock one of the pods to pull the image + fakeRuntime.UnblockImagePulls(1) + time.Sleep(1 * time.Second) + + // Introduce a pull error for the second pod and unblock it + fakeRuntime.SendImagePullError(errors.New("pull image error")) + + wg.Wait() + + // This time EnsureImageExists will return without pulling + for i := 0; i < 2; i++ { + wg.Add(1) + go func(i int) { + _, _, err := puller.EnsureImageExists(ctx, nil, pods[i], container.Image, testCase.pullSecrets, nil, "", container.ImagePullPolicy) + assert.NoError(t, err) + wg.Done() + }(i) + } + wg.Wait() + + // Assert the number of PullImage calls is still 2 + fakeRuntime.AssertCallCounts("PullImage", 2) + + // Both recorders should be finished + assert.True(t, fakePodPullingTimeRecorder.finishedPullingRecorded[pods[0].UID]) + assert.True(t, fakePodPullingTimeRecorder.finishedPullingRecorded[pods[1].UID]) +} + func TestEvalCRIPullErr(t *testing.T) { t.Parallel() for _, tc := range []struct { @@ -1341,7 +1452,10 @@ func TestEnsureImageExistsWithServiceAccountCoordinates(t *testing.T) { fakeClock := testingclock.NewFakeClock(time.Now()) fakeRuntime := &ctest.FakeRuntime{T: t} fakeRecorder := testutil.NewFakeRecorder() - fakePodPullingTimeRecorder := &mockPodPullingTimeRecorder{} + fakePodPullingTimeRecorder := &mockPodPullingTimeRecorder{ + startedPullingRecorded: make(map[types.UID]bool), + finishedPullingRecorded: make(map[types.UID]bool), + } fakeRuntime.ImageList = []Image{{ID: "present_image:latest"}} @@ -1429,7 +1543,10 @@ func TestEnsureImageExistsWithNodeCredentialsOnly(t *testing.T) { fakeClock := testingclock.NewFakeClock(time.Now()) fakeRuntime := &ctest.FakeRuntime{T: t} fakeRecorder := testutil.NewFakeRecorder() - fakePodPullingTimeRecorder := &mockPodPullingTimeRecorder{} + fakePodPullingTimeRecorder := &mockPodPullingTimeRecorder{ + startedPullingRecorded: make(map[types.UID]bool), + finishedPullingRecorded: make(map[types.UID]bool), + } fakeRuntime.ImageList = []Image{{ID: "present_image:latest"}} diff --git a/pkg/kubelet/images/pullmanager/benchmarks_test.go b/pkg/kubelet/images/pullmanager/benchmarks_test.go index 69c759b30a916..2a453e8a2bf68 100644 --- a/pkg/kubelet/images/pullmanager/benchmarks_test.go +++ b/pkg/kubelet/images/pullmanager/benchmarks_test.go @@ -25,6 +25,7 @@ import ( "github.com/google/uuid" "k8s.io/apimachinery/pkg/util/rand" kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" + "k8s.io/kubernetes/test/utils/ktesting" ) type namedAccessor struct { @@ -72,7 +73,8 @@ func directRecordReadFunc(expectHit bool) benchmarkedCheckFunc { func mustAttemptPullReadFunc(expectHit bool) benchmarkedCheckFunc { return func(b *testing.B, pullManager PullManager, imgRef string) { - mustPull := pullManager.MustAttemptImagePull("test.repo/org/"+imgRef, imgRef, nil, nil) + tCtx := ktesting.Init(b) + mustPull := pullManager.MustAttemptImagePull(tCtx, "test.repo/org/"+imgRef, imgRef, nil, nil) if mustPull != !expectHit { b.Fatalf("MustAttemptImagePull() expected %t, got %t", !expectHit, mustPull) } @@ -93,7 +95,9 @@ func BenchmarkPullManagerWriteImagePullIntent(b *testing.B) { func BenchmarkPullManagerWriteIfNotChanged(b *testing.B) { benchmarkAllPullAccessorsWrite(b, func(b *testing.B, pullManager PullManager, imgRef string) { + tCtx := ktesting.Init(b) if err := pullManager.writePulledRecordIfChanged( + tCtx, "test.repo/org/"+imgRef, imgRef, &kubeletconfig.ImagePullCredentials{NodePodsAccessible: true}, diff --git a/pkg/kubelet/images/pullmanager/image_pull_manager.go b/pkg/kubelet/images/pullmanager/image_pull_manager.go index 0cf489c39f0b2..750492227af8e 100644 --- a/pkg/kubelet/images/pullmanager/image_pull_manager.go +++ b/pkg/kubelet/images/pullmanager/image_pull_manager.go @@ -89,9 +89,10 @@ func (f *PullManager) RecordPullIntent(image string) error { return nil } -func (f *PullManager) RecordImagePulled(image, imageRef string, credentials *kubeletconfiginternal.ImagePullCredentials) { - if err := f.writePulledRecordIfChanged(image, imageRef, credentials); err != nil { - klog.ErrorS(err, "failed to write image pulled record", "imageRef", imageRef) +func (f *PullManager) RecordImagePulled(ctx context.Context, image, imageRef string, credentials *kubeletconfiginternal.ImagePullCredentials) { + logger := klog.FromContext(ctx) + if err := f.writePulledRecordIfChanged(ctx, image, imageRef, credentials); err != nil { + logger.Error(err, "failed to write image pulled record", "imageRef", imageRef) return } @@ -100,7 +101,7 @@ func (f *PullManager) RecordImagePulled(image, imageRef string, credentials *kub // This is done so that the successfully pulled image is still considered as pulled by the kubelet. // The kubelet will attempt to turn the imagePullIntent into a pulled record again when // it's restarted. - f.decrementImagePullIntent(image) + f.decrementImagePullIntent(ctx, image) } // writePulledRecordIfChanged writes an ImagePulledRecord into the f.pulledDir directory. @@ -113,7 +114,8 @@ func (f *PullManager) RecordImagePulled(image, imageRef string, credentials *kub // unknown circumstances. We should record the image as tracked but no credentials // should be written in order to force credential verification when the image is // accessed the next time. -func (f *PullManager) writePulledRecordIfChanged(image, imageRef string, credentials *kubeletconfiginternal.ImagePullCredentials) error { +func (f *PullManager) writePulledRecordIfChanged(ctx context.Context, image, imageRef string, credentials *kubeletconfiginternal.ImagePullCredentials) error { + logger := klog.FromContext(ctx) f.pulledAccessors.Lock(imageRef) defer f.pulledAccessors.Unlock(imageRef) @@ -124,7 +126,7 @@ func (f *PullManager) writePulledRecordIfChanged(image, imageRef string, credent pulledRecord, _, err := f.recordsAccessor.GetImagePulledRecord(imageRef) if err != nil { - klog.InfoS("failed to retrieve an ImagePulledRecord", "image", image, "err", err) + logger.Info("failed to retrieve an ImagePulledRecord", "image", image, "err", err) pulledRecord = nil } @@ -154,20 +156,21 @@ func (f *PullManager) writePulledRecordIfChanged(image, imageRef string, credent return f.recordsAccessor.WriteImagePulledRecord(pulledRecord) } -func (f *PullManager) RecordImagePullFailed(image string) { - f.decrementImagePullIntent(image) +func (f *PullManager) RecordImagePullFailed(ctx context.Context, image string) { + f.decrementImagePullIntent(ctx, image) } // decrementImagePullIntent decreses the number of how many times image pull // intent for a given `image` was requested, and removes the ImagePullIntent file // if the reference counter for the image reaches zero. -func (f *PullManager) decrementImagePullIntent(image string) { +func (f *PullManager) decrementImagePullIntent(ctx context.Context, image string) { + logger := klog.FromContext(ctx) f.intentAccessors.Lock(image) defer f.intentAccessors.Unlock(image) if f.getIntentCounterForImage(image) <= 1 { if err := f.recordsAccessor.DeleteImagePullIntent(image); err != nil { - klog.ErrorS(err, "failed to remove image pull intent", "image", image) + logger.Error(err, "failed to remove image pull intent", "image", image) return } // only delete the intent counter once the file was deleted to be consistent @@ -179,11 +182,12 @@ func (f *PullManager) decrementImagePullIntent(image string) { f.decrementIntentCounterForImage(image) } -func (f *PullManager) MustAttemptImagePull(image, imageRef string, podSecrets []kubeletconfiginternal.ImagePullSecret, podServiceAccount *kubeletconfiginternal.ImagePullServiceAccount) bool { +func (f *PullManager) MustAttemptImagePull(ctx context.Context, image, imageRef string, podSecrets []kubeletconfiginternal.ImagePullSecret, podServiceAccount *kubeletconfiginternal.ImagePullServiceAccount) bool { if len(imageRef) == 0 { return true } + logger := klog.FromContext(ctx) var imagePulledByKubelet bool var pulledRecord *kubeletconfiginternal.ImagePulledRecord @@ -224,7 +228,7 @@ func (f *PullManager) MustAttemptImagePull(image, imageRef string, podSecrets [] }() if err != nil { - klog.ErrorS(err, "Unable to access cache records about image pulls") + logger.Error(err, "Unable to access cache records about image pulls") return true } @@ -239,7 +243,7 @@ func (f *PullManager) MustAttemptImagePull(image, imageRef string, podSecrets [] sanitizedImage, err := trimImageTagDigest(image) if err != nil { - klog.ErrorS(err, "failed to parse image name, forcing image credentials reverification", "image", sanitizedImage) + logger.Error(err, "failed to parse image name, forcing image credentials reverification", "image", sanitizedImage) return true } @@ -271,8 +275,8 @@ func (f *PullManager) MustAttemptImagePull(image, imageRef string, podSecrets [] // While we're only matching at this point, we want to ensure this secret is considered valid in the future // and so we make an additional write to the cache. // writePulledRecord() is a noop in case the secret with the updated hash already appears in the cache. - if err := f.writePulledRecordIfChanged(image, imageRef, &kubeletconfiginternal.ImagePullCredentials{KubernetesSecrets: []kubeletconfiginternal.ImagePullSecret{podSecret}}); err != nil { - klog.ErrorS(err, "failed to write an image pulled record", "image", image, "imageRef", imageRef) + if err := f.writePulledRecordIfChanged(ctx, image, imageRef, &kubeletconfiginternal.ImagePullCredentials{KubernetesSecrets: []kubeletconfiginternal.ImagePullSecret{podSecret}}); err != nil { + logger.Error(err, "failed to write an image pulled record", "image", image, "imageRef", imageRef) } } return false @@ -283,8 +287,8 @@ func (f *PullManager) MustAttemptImagePull(image, imageRef string, podSecrets [] // While we're only matching at this point, we want to ensure the updated credentials are considered valid in the future // and so we make an additional write to the cache. // writePulledRecord() is a noop in case the hash got updated in the meantime. - if err := f.writePulledRecordIfChanged(image, imageRef, &kubeletconfiginternal.ImagePullCredentials{KubernetesSecrets: []kubeletconfiginternal.ImagePullSecret{podSecret}}); err != nil { - klog.ErrorS(err, "failed to write an image pulled record", "image", image, "imageRef", imageRef) + if err := f.writePulledRecordIfChanged(ctx, image, imageRef, &kubeletconfiginternal.ImagePullCredentials{KubernetesSecrets: []kubeletconfiginternal.ImagePullSecret{podSecret}}); err != nil { + logger.Error(err, "failed to write an image pulled record", "image", image, "imageRef", imageRef) } return false } @@ -300,13 +304,14 @@ func (f *PullManager) MustAttemptImagePull(image, imageRef string, podSecrets [] return true } -func (f *PullManager) PruneUnknownRecords(imageList []string, until time.Time) { +func (f *PullManager) PruneUnknownRecords(ctx context.Context, imageList []string, until time.Time) { f.pulledAccessors.GlobalLock() defer f.pulledAccessors.GlobalUnlock() + logger := klog.FromContext(ctx) pulledRecords, err := f.recordsAccessor.ListImagePulledRecords() if err != nil { - klog.ErrorS(err, "there were errors listing ImagePulledRecords, garbage collection will proceed with incomplete records list") + logger.Error(err, "there were errors listing ImagePulledRecords, garbage collection will proceed with incomplete records list") } imagesInUse := sets.New(imageList...) @@ -321,7 +326,7 @@ func (f *PullManager) PruneUnknownRecords(imageList []string, until time.Time) { } if err := f.recordsAccessor.DeleteImagePulledRecord(imageRecord.ImageRef); err != nil { - klog.ErrorS(err, "failed to remove an ImagePulledRecord", "imageRef", imageRecord.ImageRef) + logger.Error(err, "failed to remove an ImagePulledRecord", "imageRef", imageRecord.ImageRef) } } @@ -335,9 +340,10 @@ func (f *PullManager) PruneUnknownRecords(imageList []string, until time.Time) { // This method is not thread-safe and it should only be called upon the creation // of the PullManager. func (f *PullManager) initialize(ctx context.Context) { + logger := klog.FromContext(ctx) pullIntents, err := f.recordsAccessor.ListImagePullIntents() if err != nil { - klog.ErrorS(err, "there were errors listing ImagePullIntents, continuing with an incomplete records list") + logger.Error(err, "there were errors listing ImagePullIntents, continuing with an incomplete records list") } if len(pullIntents) == 0 { @@ -346,7 +352,7 @@ func (f *PullManager) initialize(ctx context.Context) { imageObjs, err := f.imageService.ListImages(ctx) if err != nil { - klog.ErrorS(err, "failed to list images") + logger.Error(err, "failed to list images") } inFlightPulls := sets.New[string]() @@ -362,13 +368,13 @@ func (f *PullManager) initialize(ctx context.Context) { for _, image := range existingRecordedImages.UnsortedList() { - if err := f.writePulledRecordIfChanged(image, imageObj.ID, nil); err != nil { - klog.ErrorS(err, "failed to write an image pull record", "imageRef", imageObj.ID) + if err := f.writePulledRecordIfChanged(ctx, image, imageObj.ID, nil); err != nil { + logger.Error(err, "failed to write an image pull record", "imageRef", imageObj.ID) continue } if err := f.recordsAccessor.DeleteImagePullIntent(image); err != nil { - klog.V(2).InfoS("failed to remove image pull intent file", "imageName", image, "error", err) + logger.V(2).Info("failed to remove image pull intent file", "imageName", image, "error", err) } } } diff --git a/pkg/kubelet/images/pullmanager/image_pull_manager_test.go b/pkg/kubelet/images/pullmanager/image_pull_manager_test.go index 8e05041857d34..3ba831f2154dc 100644 --- a/pkg/kubelet/images/pullmanager/image_pull_manager_test.go +++ b/pkg/kubelet/images/pullmanager/image_pull_manager_test.go @@ -726,6 +726,7 @@ func TestFileBasedImagePullManager_MustAttemptImagePull(t *testing.T) { t.Run(tt.name, func(t *testing.T) { encoder, decoder, err := createKubeletConfigSchemeEncoderDecoder() require.NoError(t, err) + _, tCtx := ktesting.NewTestContext(t) testDir := t.TempDir() pullingDir := filepath.Join(testDir, "pulling") @@ -750,7 +751,8 @@ func TestFileBasedImagePullManager_MustAttemptImagePull(t *testing.T) { intentCounters: &sync.Map{}, pulledAccessors: NewStripedLockSet(10), } - if got := f.MustAttemptImagePull(tt.image, tt.imageRef, tt.podSecrets, tt.podServiceAccount); got != tt.want { + + if got := f.MustAttemptImagePull(tCtx, tt.image, tt.imageRef, tt.podSecrets, tt.podServiceAccount); got != tt.want { t.Errorf("FileBasedImagePullManager.MustAttemptImagePull() = %v, want %v", got, tt.want) } @@ -1110,6 +1112,7 @@ func TestFileBasedImagePullManager_RecordImagePulled(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + _, tCtx := ktesting.NewTestContext(t) encoder, decoder, err := createKubeletConfigSchemeEncoderDecoder() require.NoError(t, err) @@ -1135,7 +1138,7 @@ func TestFileBasedImagePullManager_RecordImagePulled(t *testing.T) { } f.intentCounters.Store(tt.image, tt.pullsInFlight) origIntentCounter := f.getIntentCounterForImage(tt.image) - f.RecordImagePulled(tt.image, tt.imageRef, tt.creds) + f.RecordImagePulled(tCtx, tt.image, tt.imageRef, tt.creds) require.Equal(t, f.getIntentCounterForImage(tt.image), origIntentCounter-1, "intent counter for %s was not decremented", tt.image) for _, fname := range tt.expectPulled { @@ -1399,6 +1402,7 @@ func TestFileBasedImagePullManager_PruneUnknownRecords(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + _, tCtx := ktesting.NewTestContext(t) encoder, decoder, err := createKubeletConfigSchemeEncoderDecoder() require.NoError(t, err) @@ -1420,7 +1424,7 @@ func TestFileBasedImagePullManager_PruneUnknownRecords(t *testing.T) { recordsAccessor: fsRecordAccessor, pulledAccessors: NewStripedLockSet(10), } - f.PruneUnknownRecords(tt.imageList, tt.gcStartTime) + f.PruneUnknownRecords(tCtx, tt.imageList, tt.gcStartTime) filesLeft := sets.New[string]() err = filepath.Walk(pulledDir, func(path string, info fs.FileInfo, err error) error { diff --git a/pkg/kubelet/images/pullmanager/interfaces.go b/pkg/kubelet/images/pullmanager/interfaces.go index db386ef99d49e..b113f45c1149f 100644 --- a/pkg/kubelet/images/pullmanager/interfaces.go +++ b/pkg/kubelet/images/pullmanager/interfaces.go @@ -17,6 +17,7 @@ limitations under the License. package pullmanager import ( + "context" "time" kubeletconfiginternal "k8s.io/kubernetes/pkg/kubelet/apis/config" @@ -44,14 +45,14 @@ type ImagePullManager interface { // to `true`. // // `image` is the content of the pod's container `image` field. - RecordImagePulled(image, imageRef string, credentials *kubeletconfiginternal.ImagePullCredentials) + RecordImagePulled(ctx context.Context, image, imageRef string, credentials *kubeletconfiginternal.ImagePullCredentials) // RecordImagePullFailed should be called if an image failed to pull. // // Internally, it lowers its reference counter for the given image. If the // counter reaches zero, the pull intent record for the image is removed. // // `image` is the content of the pod's container `image` field. - RecordImagePullFailed(image string) + RecordImagePullFailed(ctx context.Context, image string) // MustAttemptImagePull evaluates the policy for the image specified in // `image` and if the policy demands verification, it checks the internal // cache to see if there's a record of pulling the image with the presented @@ -62,14 +63,14 @@ type ImagePullManager interface { // was found in the cache. // // `image` is the content of the pod's container `image` field. - MustAttemptImagePull(image, imageRef string, credentials []kubeletconfiginternal.ImagePullSecret, serviceAccount *kubeletconfiginternal.ImagePullServiceAccount) bool + MustAttemptImagePull(ctx context.Context, image, imageRef string, credentials []kubeletconfiginternal.ImagePullSecret, serviceAccount *kubeletconfiginternal.ImagePullServiceAccount) bool // PruneUnknownRecords deletes all of the cache ImagePulledRecords for each of the images // whose imageRef does not appear in the `imageList` iff such an record was last updated // _before_ the `until` timestamp. // // This method is only expected to be called by the kubelet's image garbage collector. // `until` is a timestamp created _before_ the `imageList` was requested from the CRI. - PruneUnknownRecords(imageList []string, until time.Time) + PruneUnknownRecords(ctx context.Context, imageList []string, until time.Time) } // PullRecordsAccessor allows unified access to ImagePullIntents/ImagePulledRecords diff --git a/pkg/kubelet/images/pullmanager/noop_pull_manager.go b/pkg/kubelet/images/pullmanager/noop_pull_manager.go index 9920383b69133..f10d6f39323ea 100644 --- a/pkg/kubelet/images/pullmanager/noop_pull_manager.go +++ b/pkg/kubelet/images/pullmanager/noop_pull_manager.go @@ -17,6 +17,7 @@ limitations under the License. package pullmanager import ( + "context" "time" kubeletconfiginternal "k8s.io/kubernetes/pkg/kubelet/apis/config" @@ -26,11 +27,11 @@ var _ ImagePullManager = &NoopImagePullManager{} type NoopImagePullManager struct{} -func (m *NoopImagePullManager) RecordPullIntent(_ string) error { return nil } -func (m *NoopImagePullManager) RecordImagePulled(_, _ string, _ *kubeletconfiginternal.ImagePullCredentials) { +func (m *NoopImagePullManager) RecordPullIntent(string) error { return nil } +func (m *NoopImagePullManager) RecordImagePulled(context.Context, string, string, *kubeletconfiginternal.ImagePullCredentials) { } -func (m *NoopImagePullManager) RecordImagePullFailed(image string) {} -func (m *NoopImagePullManager) MustAttemptImagePull(_, _ string, _ []kubeletconfiginternal.ImagePullSecret, _ *kubeletconfiginternal.ImagePullServiceAccount) bool { +func (m *NoopImagePullManager) RecordImagePullFailed(context.Context, string) {} +func (m *NoopImagePullManager) MustAttemptImagePull(context.Context, string, string, []kubeletconfiginternal.ImagePullSecret, *kubeletconfiginternal.ImagePullServiceAccount) bool { return false } -func (m *NoopImagePullManager) PruneUnknownRecords(_ []string, _ time.Time) {} +func (m *NoopImagePullManager) PruneUnknownRecords(context.Context, []string, time.Time) {} diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 600a006f0541e..0f1806958b89c 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -95,6 +95,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/events" "k8s.io/kubernetes/pkg/kubelet/eviction" "k8s.io/kubernetes/pkg/kubelet/images" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" "k8s.io/kubernetes/pkg/kubelet/kuberuntime" "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/pkg/kubelet/logs" @@ -290,8 +291,8 @@ type Bootstrap interface { GetConfiguration() kubeletconfiginternal.KubeletConfiguration BirthCry() StartGarbageCollection() - ListenAndServe(kubeCfg *kubeletconfiginternal.KubeletConfiguration, tlsOptions *server.TLSOptions, auth server.AuthInterface, tp trace.TracerProvider) - ListenAndServeReadOnly(address net.IP, port uint, tp trace.TracerProvider) + ListenAndServe(ctx context.Context, kubeCfg *kubeletconfiginternal.KubeletConfiguration, tlsOptions *server.TLSOptions, auth server.AuthInterface, tp trace.TracerProvider) + ListenAndServeReadOnly(ctx context.Context, address net.IP, port uint, tp trace.TracerProvider) ListenAndServePodResources(ctx context.Context) Run(<-chan kubetypes.PodUpdate) } @@ -370,22 +371,22 @@ func makePodSourceConfig(kubeCfg *kubeletconfiginternal.KubeletConfiguration, ku // TODO: it needs to be replaced by a proper context in the future ctx := context.TODO() - + logger := klog.FromContext(ctx) // define file config source if kubeCfg.StaticPodPath != "" { klog.InfoS("Adding static pod path", "path", kubeCfg.StaticPodPath) - config.NewSourceFile(kubeCfg.StaticPodPath, nodeName, kubeCfg.FileCheckFrequency.Duration, cfg.Channel(ctx, kubetypes.FileSource)) + config.NewSourceFile(logger, kubeCfg.StaticPodPath, nodeName, kubeCfg.FileCheckFrequency.Duration, cfg.Channel(ctx, kubetypes.FileSource)) } // define url config source if kubeCfg.StaticPodURL != "" { klog.InfoS("Adding pod URL with HTTP header", "URL", kubeCfg.StaticPodURL, "header", manifestURLHeader) - config.NewSourceURL(kubeCfg.StaticPodURL, manifestURLHeader, nodeName, kubeCfg.HTTPCheckFrequency.Duration, cfg.Channel(ctx, kubetypes.HTTPSource)) + config.NewSourceURL(logger, kubeCfg.StaticPodURL, manifestURLHeader, nodeName, kubeCfg.HTTPCheckFrequency.Duration, cfg.Channel(ctx, kubetypes.HTTPSource)) } if kubeDeps.KubeClient != nil { klog.InfoS("Adding apiserver pod source") - config.NewSourceApiserver(kubeDeps.KubeClient, nodeName, nodeHasSynced, cfg.Channel(ctx, kubetypes.ApiserverSource)) + config.NewSourceApiserver(logger, kubeDeps.KubeClient, nodeName, nodeHasSynced, cfg.Channel(ctx, kubetypes.ApiserverSource)) } return cfg, nil } @@ -415,7 +416,7 @@ func PreInitRuntimeService(kubeCfg *kubeletconfiginternal.KubeletConfiguration, func NewMainKubelet(ctx context.Context, kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps *Dependencies, - crOptions *config.ContainerRuntimeOptions, + crOptions *kubeletconfig.ContainerRuntimeOptions, hostname string, nodeName types.NodeName, nodeIPs []net.IP, @@ -688,7 +689,8 @@ func NewMainKubelet(ctx context.Context, klet.statusManager = status.NewManager(klet.kubeClient, klet.podManager, klet, kubeDeps.PodStartupLatencyTracker) klet.allocationManager = allocation.NewManager( klet.getRootDir(), - klet.containerManager, + klet.containerManager.GetNodeConfig(), + klet.containerManager.GetNodeAllocatableAbsolute(), klet.statusManager, func(pod *v1.Pod) { klet.HandlePodSyncs([]*v1.Pod{pod}) }, klet.GetActivePods, @@ -697,7 +699,7 @@ func NewMainKubelet(ctx context.Context, kubeDeps.Recorder, ) - klet.resourceAnalyzer = serverstats.NewResourceAnalyzer(klet, kubeCfg.VolumeStatsAggPeriod.Duration, kubeDeps.Recorder) + klet.resourceAnalyzer = serverstats.NewResourceAnalyzer(ctx, klet, kubeCfg.VolumeStatsAggPeriod.Duration, kubeDeps.Recorder) klet.runtimeService = kubeDeps.RemoteRuntimeService @@ -789,7 +791,6 @@ func NewMainKubelet(ctx context.Context, kubeDeps.ContainerManager, klet.containerLogManager, klet.runtimeClassManager, - klet.allocationManager, seccompDefault, kubeCfg.MemorySwap.SwapBehavior, kubeDeps.ContainerManager.GetNodeAllocatableAbsolute, @@ -1058,7 +1059,7 @@ func NewMainKubelet(ctx context.Context, renewInterval, string(klet.nodeName), v1.NamespaceNodeLease, - util.SetNodeOwnerFunc(klet.heartbeatClient, string(klet.nodeName))) + util.SetNodeOwnerFunc(ctx, klet.heartbeatClient, string(klet.nodeName))) // setup node shutdown manager shutdownManager := nodeshutdown.NewManager(&nodeshutdown.Config{ @@ -1075,7 +1076,7 @@ func NewMainKubelet(ctx context.Context, StateDirectory: rootDirectory, }) klet.shutdownManager = shutdownManager - klet.usernsManager, err = userns.MakeUserNsManager(klet) + klet.usernsManager, err = userns.MakeUserNsManager(logger, klet) if err != nil { return nil, fmt.Errorf("create user namespace manager: %w", err) } @@ -1562,11 +1563,11 @@ func (kl *Kubelet) setupDataDirs() error { } } if selinux.GetEnabled() { - err := selinux.SetFileLabel(pluginRegistrationDir, config.KubeletPluginsDirSELinuxLabel) + err := selinux.SetFileLabel(pluginRegistrationDir, kubeletconfig.KubeletPluginsDirSELinuxLabel) if err != nil { klog.InfoS("Unprivileged containerized plugins might not work, could not set selinux context on plugin registration dir", "path", pluginRegistrationDir, "err", err) } - err = selinux.SetFileLabel(pluginsDir, config.KubeletPluginsDirSELinuxLabel) + err = selinux.SetFileLabel(pluginsDir, kubeletconfig.KubeletPluginsDirSELinuxLabel) if err != nil { klog.InfoS("Unprivileged containerized plugins might not work, could not set selinux context on plugins dir", "path", pluginsDir, "err", err) } @@ -1610,7 +1611,7 @@ func (kl *Kubelet) StartGarbageCollection() { if prevImageGCFailed { klog.ErrorS(err, "Image garbage collection failed multiple times in a row") // Only create an event for repeated failures - kl.recorder.Eventf(kl.nodeRef, v1.EventTypeWarning, events.ImageGCFailed, err.Error()) + kl.recorder.Event(kl.nodeRef, v1.EventTypeWarning, events.ImageGCFailed, err.Error()) } else { klog.ErrorS(err, "Image garbage collection failed once. Stats initialization may not have completed yet") } @@ -1631,7 +1632,8 @@ func (kl *Kubelet) StartGarbageCollection() { // Note that the modules here must not depend on modules that are not initialized here. func (kl *Kubelet) initializeModules(ctx context.Context) error { // Prometheus metrics. - metrics.Register( + metrics.Register() + metrics.RegisterCollectors( collectors.NewVolumeStatsCollector(kl), collectors.NewLogMetricsCollector(kl.StatsProvider.ListPodStats), ) @@ -1659,7 +1661,7 @@ func (kl *Kubelet) initializeModules(ctx context.Context) error { } // Start the image manager. - kl.imageManager.Start() + kl.imageManager.Start(ctx) // Start the certificate manager if it was enabled. if kl.serverCertificateManager != nil { @@ -1674,13 +1676,17 @@ func (kl *Kubelet) initializeModules(ctx context.Context) error { } // Start resource analyzer - kl.resourceAnalyzer.Start() + kl.resourceAnalyzer.Start(ctx) return nil } // initializeRuntimeDependentModules will initialize internal modules that require the container runtime to be up. func (kl *Kubelet) initializeRuntimeDependentModules() { + // Use context.TODO() because we currently do not have a proper context to pass in. + // Replace this with an appropriate context when refactoring this function to accept a context parameter. + ctx := context.TODO() + if err := kl.cadvisor.Start(); err != nil { // Fail kubelet and rely on the babysitter to retry starting kubelet. klog.ErrorS(err, "Failed to start cAdvisor") @@ -1698,7 +1704,7 @@ func (kl *Kubelet) initializeRuntimeDependentModules() { os.Exit(1) } // containerManager must start after cAdvisor because it needs filesystem capacity information - if err := kl.containerManager.Start(context.TODO(), node, kl.GetActivePods, kl.getNodeAnyWay, kl.sourcesReady, kl.statusManager, kl.runtimeService, kl.supportLocalStorageCapacityIsolation()); err != nil { + if err := kl.containerManager.Start(ctx, node, kl.GetActivePods, kl.getNodeAnyWay, kl.sourcesReady, kl.statusManager, kl.runtimeService, kl.supportLocalStorageCapacityIsolation()); err != nil { // Fail kubelet and rely on the babysitter to retry starting kubelet. klog.ErrorS(err, "Failed to start ContainerManager") os.Exit(1) @@ -1709,7 +1715,7 @@ func (kl *Kubelet) initializeRuntimeDependentModules() { // container log manager must start after container runtime is up to retrieve information from container runtime // and inform container to reopen log file after log rotation. - kl.containerLogManager.Start() + kl.containerLogManager.Start(ctx) // Adding Registration Callback function for CSI Driver kl.pluginManager.AddHandler(pluginwatcherapi.CSIPlugin, plugincache.PluginHandler(csi.PluginHandler)) // Adding Registration Callback function for DRA Plugin and Device Plugin @@ -1719,7 +1725,7 @@ func (kl *Kubelet) initializeRuntimeDependentModules() { // Start the plugin manager klog.V(4).InfoS("Starting plugin manager") - go kl.pluginManager.Run(kl.sourcesReady, wait.NeverStop) + go kl.pluginManager.Run(ctx, kl.sourcesReady, wait.NeverStop) err = kl.shutdownManager.Start() if err != nil { @@ -1938,8 +1944,16 @@ func (kl *Kubelet) SyncPod(ctx context.Context, updateType kubetypes.SyncPodType if utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScaling) { // Check whether a resize is in progress so we can set the PodResizeInProgressCondition accordingly. - kl.allocationManager.CheckPodResizeInProgress(pod, podStatus) - // TODO(#132851): There is a race condition here, where the goroutine in the + if kl.containerRuntime.IsPodResizeInProgress(pod, podStatus) { + kl.statusManager.SetPodResizeInProgressCondition(pod.UID, "", "", pod.Generation) + } else if kl.statusManager.ClearPodResizeInProgressCondition(pod.UID) { + // (Allocated == Actual) => clear the resize in-progress status. + if kl.recorder != nil { + msg := events.PodResizeCompletedMsg(pod) + kl.recorder.Eventf(pod, v1.EventTypeNormal, events.ResizeCompleted, msg) + } + } + // TODO(natasha41575): There is a race condition here, where the goroutine in the // allocation manager may allocate a new resize and unconditionally set the // PodResizeInProgressCondition before we set the status below. } @@ -2081,7 +2095,7 @@ func (kl *Kubelet) SyncPod(ctx context.Context, updateType kubetypes.SyncPodType pullSecrets := kl.getPullSecretsForPod(pod) // Ensure the pod is being probed - kl.probeManager.AddPod(pod) + kl.probeManager.AddPod(ctx, pod) // TODO(#113606): use cancellation from the incoming context parameter, which comes from the pod worker. // Currently, using cancellation from that context causes test failures. To remove this WithoutCancel, @@ -2114,19 +2128,28 @@ func (kl *Kubelet) SyncPod(ctx context.Context, updateType kubetypes.SyncPodType // during eviction). This method is not guaranteed to be called if a pod is force deleted from the // configuration and the kubelet is restarted - SyncTerminatingRuntimePod handles those orphaned // pods. -func (kl *Kubelet) SyncTerminatingPod(_ context.Context, pod *v1.Pod, podStatus *kubecontainer.PodStatus, gracePeriod *int64, podStatusFn func(*v1.PodStatus)) error { +func (kl *Kubelet) SyncTerminatingPod(_ context.Context, pod *v1.Pod, podStatus *kubecontainer.PodStatus, gracePeriod *int64, podStatusFn func(*v1.PodStatus)) (err error) { // TODO(#113606): connect this with the incoming context parameter, which comes from the pod worker. // Currently, using that context causes test failures. - ctx, otelSpan := kl.tracer.Start(context.Background(), "syncTerminatingPod", trace.WithAttributes( + ctx := context.Background() + + logger := klog.FromContext(ctx) + klog.V(4).InfoS("SyncTerminatingPod enter", "pod", klog.KObj(pod), "podUID", pod.UID) + + ctx, otelSpan := kl.tracer.Start(ctx, "syncTerminatingPod", trace.WithAttributes( semconv.K8SPodUIDKey.String(string(pod.UID)), attribute.String("k8s.pod", klog.KObj(pod).String()), semconv.K8SPodNameKey.String(pod.Name), semconv.K8SNamespaceNameKey.String(pod.Namespace), )) - logger := klog.FromContext(ctx) - defer otelSpan.End() - klog.V(4).InfoS("SyncTerminatingPod enter", "pod", klog.KObj(pod), "podUID", pod.UID) - defer klog.V(4).InfoS("SyncTerminatingPod exit", "pod", klog.KObj(pod), "podUID", pod.UID) + defer func() { + if err != nil { + otelSpan.RecordError(err) + otelSpan.SetStatus(codes.Error, err.Error()) + } + otelSpan.End() + klog.V(4).InfoS("SyncTerminatingPod exit", "pod", klog.KObj(pod), "podUID", pod.UID) + }() apiPodStatus := kl.generateAPIPodStatus(pod, podStatus, false) if podStatusFn != nil { @@ -2322,7 +2345,7 @@ func (kl *Kubelet) SyncTerminatedPod(ctx context.Context, pod *v1.Pod, podStatus klog.V(4).InfoS("Pod termination removed cgroups", "pod", klog.KObj(pod), "podUID", pod.UID) } - kl.usernsManager.Release(pod.UID) + kl.usernsManager.Release(logger, pod.UID) // mark the final pod status kl.statusManager.TerminatePod(logger, pod) @@ -3042,14 +3065,14 @@ func (kl *Kubelet) BirthCry() { } // ListenAndServe runs the kubelet HTTP server. -func (kl *Kubelet) ListenAndServe(kubeCfg *kubeletconfiginternal.KubeletConfiguration, tlsOptions *server.TLSOptions, +func (kl *Kubelet) ListenAndServe(ctx context.Context, kubeCfg *kubeletconfiginternal.KubeletConfiguration, tlsOptions *server.TLSOptions, auth server.AuthInterface, tp trace.TracerProvider) { - server.ListenAndServeKubeletServer(kl, kl.resourceAnalyzer, kl.containerManager.GetHealthCheckers(), kl.flagz, kubeCfg, tlsOptions, auth, tp) + server.ListenAndServeKubeletServer(ctx, kl, kl.resourceAnalyzer, kl.containerManager.GetHealthCheckers(), kl.flagz, kubeCfg, tlsOptions, auth, tp) } // ListenAndServeReadOnly runs the kubelet HTTP server in read-only mode. -func (kl *Kubelet) ListenAndServeReadOnly(address net.IP, port uint, tp trace.TracerProvider) { - server.ListenAndServeKubeletReadOnlyServer(kl, kl.resourceAnalyzer, kl.containerManager.GetHealthCheckers(), kl.flagz, address, port, tp) +func (kl *Kubelet) ListenAndServeReadOnly(ctx context.Context, address net.IP, port uint, tp trace.TracerProvider) { + server.ListenAndServeKubeletReadOnlyServer(ctx, kl, kl.resourceAnalyzer, kl.containerManager.GetHealthCheckers(), kl.flagz, address, port, tp) } type kubeletPodsProvider struct { diff --git a/pkg/kubelet/kubelet_getters.go b/pkg/kubelet/kubelet_getters.go index 87b7aac502966..7858fb443d002 100644 --- a/pkg/kubelet/kubelet_getters.go +++ b/pkg/kubelet/kubelet_getters.go @@ -33,8 +33,8 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/kubelet/cm" - "k8s.io/kubernetes/pkg/kubelet/config" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" kubelettypes "k8s.io/kubernetes/pkg/kubelet/types" utilnode "k8s.io/kubernetes/pkg/util/node" "k8s.io/kubernetes/pkg/volume/csi" @@ -58,7 +58,7 @@ func (kl *Kubelet) getPodLogsDir() string { // getPodsDir returns the full path to the directory under which pod // directories are created. func (kl *Kubelet) getPodsDir() string { - return filepath.Join(kl.getRootDir(), config.DefaultKubeletPodsDirName) + return filepath.Join(kl.getRootDir(), kubeletconfig.DefaultKubeletPodsDirName) } // getPluginsDir returns the full path to the directory under which plugin @@ -66,7 +66,7 @@ func (kl *Kubelet) getPodsDir() string { // they need to persist. Plugins should create subdirectories under this named // after their own names. func (kl *Kubelet) getPluginsDir() string { - return filepath.Join(kl.getRootDir(), config.DefaultKubeletPluginsDirName) + return filepath.Join(kl.getRootDir(), kubeletconfig.DefaultKubeletPluginsDirName) } // getPluginsRegistrationDir returns the full path to the directory under which @@ -74,7 +74,7 @@ func (kl *Kubelet) getPluginsDir() string { // More information is available about plugin registration in the pluginwatcher // module func (kl *Kubelet) getPluginsRegistrationDir() string { - return filepath.Join(kl.getRootDir(), config.DefaultKubeletPluginsRegistrationDirName) + return filepath.Join(kl.getRootDir(), kubeletconfig.DefaultKubeletPluginsRegistrationDirName) } // getPluginDir returns a data directory name for a given plugin name. @@ -87,7 +87,7 @@ func (kl *Kubelet) getPluginDir(pluginName string) string { // getCheckpointsDir returns a data directory name for checkpoints. // Checkpoints can be stored in this directory for further use. func (kl *Kubelet) getCheckpointsDir() string { - return filepath.Join(kl.getRootDir(), config.DefaultKubeletCheckpointsDirName) + return filepath.Join(kl.getRootDir(), kubeletconfig.DefaultKubeletCheckpointsDirName) } // getVolumeDevicePluginsDir returns the full path to the directory under which plugin @@ -95,14 +95,14 @@ func (kl *Kubelet) getCheckpointsDir() string { // they need to persist. Plugins should create subdirectories under this named // after their own names. func (kl *Kubelet) getVolumeDevicePluginsDir() string { - return filepath.Join(kl.getRootDir(), config.DefaultKubeletPluginsDirName) + return filepath.Join(kl.getRootDir(), kubeletconfig.DefaultKubeletPluginsDirName) } // getVolumeDevicePluginDir returns a data directory name for a given plugin name. // Plugins can use these directories to store data that they need to persist. // For per-pod plugin data, see getVolumeDevicePluginsDir. func (kl *Kubelet) getVolumeDevicePluginDir(pluginName string) string { - return filepath.Join(kl.getVolumeDevicePluginsDir(), pluginName, config.DefaultKubeletVolumeDevicesDirName) + return filepath.Join(kl.getVolumeDevicePluginsDir(), pluginName, kubeletconfig.DefaultKubeletVolumeDevicesDirName) } // GetPodDir returns the full path to the per-pod data directory for the @@ -144,11 +144,11 @@ func (kl *Kubelet) GetMaxPods() int { func (kl *Kubelet) GetUserNamespacesIDsPerPod() uint32 { userNs := kl.kubeletConfiguration.UserNamespaces if userNs == nil { - return config.DefaultKubeletUserNamespacesIDsPerPod + return kubeletconfig.DefaultKubeletUserNamespacesIDsPerPod } idsPerPod := userNs.IDsPerPod if idsPerPod == nil || *idsPerPod == 0 { - return config.DefaultKubeletUserNamespacesIDsPerPod + return kubeletconfig.DefaultKubeletUserNamespacesIDsPerPod } // The value is already validated to be <= MaxUint32, // so we can safely drop the upper bits. @@ -165,14 +165,14 @@ func (kl *Kubelet) getPodDir(podUID types.UID) string { // which subpath volumes are created for the specified pod. This directory may not // exist if the pod does not exist or subpaths are not specified. func (kl *Kubelet) getPodVolumeSubpathsDir(podUID types.UID) string { - return filepath.Join(kl.getPodDir(podUID), config.DefaultKubeletVolumeSubpathsDirName) + return filepath.Join(kl.getPodDir(podUID), kubeletconfig.DefaultKubeletVolumeSubpathsDirName) } // getPodVolumesDir returns the full path to the per-pod data directory under // which volumes are created for the specified pod. This directory may not // exist if the pod does not exist. func (kl *Kubelet) getPodVolumesDir(podUID types.UID) string { - return filepath.Join(kl.getPodDir(podUID), config.DefaultKubeletVolumesDirName) + return filepath.Join(kl.getPodDir(podUID), kubeletconfig.DefaultKubeletVolumesDirName) } // getPodVolumeDir returns the full path to the directory which represents the @@ -186,7 +186,7 @@ func (kl *Kubelet) getPodVolumeDir(podUID types.UID, pluginName string, volumeNa // which volumes are created for the specified pod. This directory may not // exist if the pod does not exist. func (kl *Kubelet) getPodVolumeDevicesDir(podUID types.UID) string { - return filepath.Join(kl.getPodDir(podUID), config.DefaultKubeletVolumeDevicesDirName) + return filepath.Join(kl.getPodDir(podUID), kubeletconfig.DefaultKubeletVolumeDevicesDirName) } // getPodVolumeDeviceDir returns the full path to the directory which represents the @@ -199,7 +199,7 @@ func (kl *Kubelet) getPodVolumeDeviceDir(podUID types.UID, pluginName string) st // which plugins may store data for the specified pod. This directory may not // exist if the pod does not exist. func (kl *Kubelet) getPodPluginsDir(podUID types.UID) string { - return filepath.Join(kl.getPodDir(podUID), config.DefaultKubeletPluginsDirName) + return filepath.Join(kl.getPodDir(podUID), kubeletconfig.DefaultKubeletPluginsDirName) } // getPodPluginDir returns a data directory name for a given plugin name for a @@ -213,12 +213,12 @@ func (kl *Kubelet) getPodPluginDir(podUID types.UID, pluginName string) string { // which container data is held for the specified pod. This directory may not // exist if the pod or container does not exist. func (kl *Kubelet) getPodContainerDir(podUID types.UID, ctrName string) string { - return filepath.Join(kl.getPodDir(podUID), config.DefaultKubeletContainersDirName, ctrName) + return filepath.Join(kl.getPodDir(podUID), kubeletconfig.DefaultKubeletContainersDirName, ctrName) } // getPodResourcesSocket returns the full path to the directory containing the pod resources socket func (kl *Kubelet) getPodResourcesDir() string { - return filepath.Join(kl.getRootDir(), config.DefaultKubeletPodResourcesDirName) + return filepath.Join(kl.getRootDir(), kubeletconfig.DefaultKubeletPodResourcesDirName) } // GetPods returns all pods bound to the kubelet and their spec, and the mirror diff --git a/pkg/kubelet/kubelet_node_status_test.go b/pkg/kubelet/kubelet_node_status_test.go index 86f03304701cd..0e7a764216556 100644 --- a/pkg/kubelet/kubelet_node_status_test.go +++ b/pkg/kubelet/kubelet_node_status_test.go @@ -1131,7 +1131,7 @@ func TestUpdateNodeStatusAndVolumesInUseWithNodeLease(t *testing.T) { kubelet.setCachedMachineInfo(&cadvisorapi.MachineInfo{}) // override test volumeManager - fakeVolumeManager := kubeletvolume.NewFakeVolumeManager(tc.existingVolumes, 0, nil) + fakeVolumeManager := kubeletvolume.NewFakeVolumeManager(tc.existingVolumes, 0, nil, false) kubelet.volumeManager = fakeVolumeManager // Only test VolumesInUse setter diff --git a/pkg/kubelet/kubelet_pods.go b/pkg/kubelet/kubelet_pods.go index 86eeb0bd26dc1..e72afc183a834 100644 --- a/pkg/kubelet/kubelet_pods.go +++ b/pkg/kubelet/kubelet_pods.go @@ -565,7 +565,9 @@ func truncatePodHostnameIfNeeded(podName, hostname string) (string, error) { // GetOrCreateUserNamespaceMappings returns the configuration for the sandbox user namespace func (kl *Kubelet) GetOrCreateUserNamespaceMappings(pod *v1.Pod, runtimeHandler string) (*runtimeapi.UserNamespace, error) { - return kl.usernsManager.GetOrCreateUserNamespaceMappings(pod, runtimeHandler) + // Use context.TODO() because we currently do not have a proper logger to pass in. + // This should be replaced with an appropriate context when refactoring this function to accept a context parameter. + return kl.usernsManager.GetOrCreateUserNamespaceMappings(context.TODO(), pod, runtimeHandler) } // GeneratePodHostNameAndDomain creates a hostname and domain name for a pod, @@ -1283,7 +1285,7 @@ func (kl *Kubelet) HandlePodCleanups(ctx context.Context) error { // Remove orphaned pod user namespace allocations (if any). klog.V(3).InfoS("Clean up orphaned pod user namespace allocations") - if err = kl.usernsManager.CleanupOrphanedPodUsernsAllocations(allPods, runningRuntimePods); err != nil { + if err = kl.usernsManager.CleanupOrphanedPodUsernsAllocations(ctx, allPods, runningRuntimePods); err != nil { klog.ErrorS(err, "Failed cleaning up orphaned pod user namespaces allocations") } @@ -1921,8 +1923,10 @@ func (kl *Kubelet) generateAPIPodStatus(pod *v1.Pod, podStatus *kubecontainer.Po } } + // Use context.TODO() because we currently do not have a proper context to pass in. + // Replace this with an appropriate context when refactoring this function to accept a context parameter. // ensure the probe managers have up to date status for containers - kl.probeManager.UpdatePodStatus(pod, s) + kl.probeManager.UpdatePodStatus(context.TODO(), pod, s) // update the allocated resources status if utilfeature.DefaultFeatureGate.Enabled(features.ResourceHealthStatus) { @@ -2104,6 +2108,9 @@ func (kl *Kubelet) convertStatusToAPIStatus(pod *v1.Pod, podStatus *kubecontaine // convertToAPIContainerStatuses converts the given internal container // statuses into API container statuses. func (kl *Kubelet) convertToAPIContainerStatuses(pod *v1.Pod, podStatus *kubecontainer.PodStatus, previousStatus []v1.ContainerStatus, containers []v1.Container, hasInitContainers, isInitContainer bool) []v1.ContainerStatus { + // Use klog.TODO() because we currently do not have a proper logger to pass in. + // This should be replaced with an appropriate logger when refactoring this function to accept a logger parameter. + logger := klog.TODO() convertContainerStatus := func(cs *kubecontainer.Status, oldStatus *v1.ContainerStatus) *v1.ContainerStatus { cid := cs.ID.String() status := &v1.ContainerStatus{ @@ -2222,12 +2229,10 @@ func (kl *Kubelet) convertToAPIContainerStatuses(pod *v1.Pod, podStatus *kubecon } else { preserveOldResourcesValue(v1.ResourceCPU, oldStatus.Resources.Requests, resources.Requests) } - // TODO(tallclair,vinaykul,InPlacePodVerticalScaling): Investigate defaulting to actuated resources instead of allocated resources above - if _, exists := resources.Requests[v1.ResourceMemory]; exists { - // Get memory requests from actuated resources - if actuatedResources, found := kl.allocationManager.GetActuatedResources(pod.UID, allocatedContainer.Name); found { - resources.Requests[v1.ResourceMemory] = *actuatedResources.Requests.Memory() - } + if cStatus.Resources != nil && cStatus.Resources.MemoryRequest != nil { + resources.Requests[v1.ResourceMemory] = cStatus.Resources.MemoryRequest.DeepCopy() + } else { + preserveOldResourcesValue(v1.ResourceMemory, oldStatus.Resources.Requests, resources.Requests) } } @@ -2432,7 +2437,7 @@ func (kl *Kubelet) convertToAPIContainerStatuses(pod *v1.Pod, podStatus *kubecon } } // If a container should be restarted in next syncpod, it is *Waiting*. - if !kubecontainer.ShouldContainerBeRestarted(&container, pod, podStatus) { + if !kubecontainer.ShouldContainerBeRestarted(logger, &container, pod, podStatus) { continue } status := statuses[container.Name] diff --git a/pkg/kubelet/kubelet_pods_test.go b/pkg/kubelet/kubelet_pods_test.go index d5f71ca77c842..a9318fb462659 100644 --- a/pkg/kubelet/kubelet_pods_test.go +++ b/pkg/kubelet/kubelet_pods_test.go @@ -5346,7 +5346,7 @@ func TestConvertToAPIContainerStatusesForResources(t *testing.T) { ImageID: "img1234", State: v1.ContainerState{Running: &v1.ContainerStateRunning{StartedAt: metav1.NewTime(nowTime)}}, AllocatedResources: CPU2AndMem2GAndStorage2G, - Resources: &v1.ResourceRequirements{Limits: CPU1AndMem1GAndStorage2G, Requests: CPU1AndMem2GAndStorage2G}, + Resources: &v1.ResourceRequirements{Limits: CPU1AndMem1GAndStorage2G, Requests: CPU1AndMem1GAndStorage2G}, }, }, } { @@ -5364,9 +5364,10 @@ func TestConvertToAPIContainerStatusesForResources(t *testing.T) { resources := tc.ActualResources if resources == nil { resources = &kubecontainer.ContainerResources{ - MemoryLimit: tc.Resources.Limits.Memory(), - CPULimit: tc.Resources.Limits.Cpu(), - CPURequest: tc.Resources.Requests.Cpu(), + MemoryLimit: tc.Resources.Limits.Memory(), + CPULimit: tc.Resources.Limits.Cpu(), + MemoryRequest: tc.Resources.Requests.Memory(), + CPURequest: tc.Resources.Requests.Cpu(), } } state := kubecontainer.ContainerStateRunning @@ -5376,6 +5377,11 @@ func TestConvertToAPIContainerStatusesForResources(t *testing.T) { podStatus := testPodStatus(state, resources) cStatuses := kubelet.convertToAPIContainerStatuses(tPod, podStatus, []v1.ContainerStatus{tc.OldStatus}, tPod.Spec.Containers, false, false) + actual := cStatuses[0] + // Explicitly test AllocatedResources and Resources separately for debuggability. + assert.Equal(t, tc.Expected.AllocatedResources, actual.AllocatedResources, "AllocatedResources") + assert.Equal(t, tc.Expected.Resources, actual.Resources, "Resources") + // Catch-all for any other status changes. assert.Equal(t, tc.Expected, cStatuses[0]) }) } diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index 7746458001108..5d3e476cc7d08 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -79,6 +79,7 @@ import ( containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" "k8s.io/kubernetes/pkg/kubelet/eviction" "k8s.io/kubernetes/pkg/kubelet/images" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" "k8s.io/kubernetes/pkg/kubelet/kuberuntime" "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/pkg/kubelet/logs" @@ -206,7 +207,7 @@ func newTestKubeletWithImageList( excludeAdmitHandlers bool, enableResizing bool, ) *TestKubelet { - logger, _ := ktesting.NewTestContext(t) + logger, tCtx := ktesting.NewTestContext(t) fakeRuntime := &containertest.FakeRuntime{ ImageList: imageList, @@ -326,7 +327,8 @@ func newTestKubeletWithImageList( } kubelet.allocationManager = allocation.NewInMemoryManager( - kubelet.containerManager, + kubelet.containerManager.GetNodeConfig(), + kubelet.containerManager.GetNodeAllocatableAbsolute(), kubelet.statusManager, func(pod *v1.Pod) { kubelet.HandlePodSyncs([]*v1.Pod{pod}) }, kubelet.GetActivePods, @@ -335,7 +337,7 @@ func newTestKubeletWithImageList( ) kubelet.allocationManager.SetContainerRuntime(fakeRuntime) volumeStatsAggPeriod := time.Second * 10 - kubelet.resourceAnalyzer = serverstats.NewResourceAnalyzer(kubelet, volumeStatsAggPeriod, kubelet.recorder) + kubelet.resourceAnalyzer = serverstats.NewResourceAnalyzer(tCtx, kubelet, volumeStatsAggPeriod, kubelet.recorder) fakeHostStatsProvider := stats.NewFakeHostStatsProvider(&containertest.FakeOS{}) @@ -403,7 +405,7 @@ func newTestKubeletWithImageList( ShutdownGracePeriodCriticalPods: 0, }) kubelet.shutdownManager = shutdownManager - kubelet.usernsManager, err = userns.MakeUserNsManager(kubelet) + kubelet.usernsManager, err = userns.MakeUserNsManager(logger, kubelet) if err != nil { t.Fatalf("Failed to create UserNsManager: %v", err) } @@ -747,6 +749,105 @@ func TestHandlePodCleanups(t *testing.T) { fakeRuntime.AssertKilledPods([]string(nil)) } +func TestVolumeAttachLimitExceededCleanup(t *testing.T) { + const podCount = 500 + tk := newTestKubelet(t, true /* controller-attach-detach enabled */) + defer tk.Cleanup() + kl := tk.kubelet + + kl.nodeLister = testNodeLister{nodes: []*v1.Node{{ + ObjectMeta: metav1.ObjectMeta{Name: string(kl.nodeName)}, + Status: v1.NodeStatus{ + Allocatable: v1.ResourceList{ + v1.ResourcePods: *resource.NewQuantity(1000, resource.DecimalSI), + v1.ResourceCPU: resource.MustParse("10"), + v1.ResourceMemory: resource.MustParse("20Gi"), + }, + }, + }}} + + kl.workQueue = queue.NewBasicWorkQueue(clock.RealClock{}) + kl.podWorkers = newPodWorkers( + kl, kl.recorder, kl.workQueue, + kl.resyncInterval, backOffPeriod, + kl.podCache, kl.allocationManager, + ) + + kl.volumeManager = kubeletvolume.NewFakeVolumeManager(nil, 0, nil, true /* volumeAttachLimitExceededError */) + + pods, _ := newTestPodsWithResources(podCount) + + kl.podManager.SetPods(pods) + kl.HandlePodSyncs(pods) + + ctx := context.Background() + + // all pods must reach a terminal, Failed state due to VolumeAttachmentLimitExceeded. + if err := wait.PollUntilContextTimeout( + ctx, 200*time.Millisecond, 30*time.Second, true, + func(ctx context.Context) (bool, error) { + for _, p := range pods { + st, ok := kl.statusManager.GetPodStatus(p.UID) + if !ok || st.Phase != v1.PodFailed && st.Reason != "VolumeAttachmentLimitExceeded" { + return false, nil + } + } + return true, nil + }); err != nil { + t.Fatalf("pods did not reach a terminal, Failed state: %v", err) + } + + // validate that SyncTerminatedPod completed successfully for each pod. + if err := wait.PollUntilContextTimeout( + ctx, 200*time.Millisecond, 30*time.Second, true, + func(ctx context.Context) (bool, error) { + for _, p := range pods { + if !kl.podWorkers.ShouldPodBeFinished(p.UID) { + return false, nil + } + } + return true, nil + }); err != nil { + t.Fatalf("pod workers did not finish cleanup: %v", err) + } + + // validate container-level resource allocations are released. + for _, p := range pods { + cn := p.Spec.Containers[0].Name + if _, still := kl.allocationManager.GetContainerResourceAllocation(p.UID, cn); still { + t.Fatalf("allocation for pod %q container %q not released", p.Name, cn) + } + } +} + +func newTestPodsWithResources(count int) (pods []*v1.Pod, containerNames []string) { + pods = make([]*v1.Pod, count) + containerNames = make([]string, count) + for i := 0; i < count; i++ { + containerName := fmt.Sprintf("container%d", i) + containerNames[i] = containerName + pods[i] = &v1.Pod{ + Spec: v1.PodSpec{ + HostNetwork: true, + Containers: []v1.Container{{ + Name: containerName, + Resources: v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("1m"), + v1.ResourceMemory: resource.MustParse("1Mi"), + }, + }, + }}, + }, + ObjectMeta: metav1.ObjectMeta{ + UID: types.UID(strconv.Itoa(10000 + i)), + Name: fmt.Sprintf("pod%d", i), + }, + } + } + return pods, containerNames +} + func TestHandlePodRemovesWhenSourcesAreReady(t *testing.T) { if testing.Short() { t.Skip("skipping test in short mode.") @@ -3049,25 +3150,19 @@ func TestSyncLabels(t *testing.T) { func waitForVolumeUnmount( volumeManager kubeletvolume.VolumeManager, pod *v1.Pod) error { - var podVolumes kubecontainer.VolumeMap err := retryWithExponentialBackOff( time.Duration(50*time.Millisecond), func() (bool, error) { // Verify volumes detached - podVolumes = volumeManager.GetMountedVolumesForPod( + hasVolumes := volumeManager.HasPossiblyMountedVolumesForPod( util.GetUniquePodName(pod)) - - if len(podVolumes) != 0 { - return false, nil - } - - return true, nil + return !hasVolumes, nil }, ) if err != nil { return fmt.Errorf( - "Expected volumes to be unmounted. But some volumes are still mounted: %#v", podVolumes) + "Expected volumes to be unmounted. But some volumes are still mounted") } return nil @@ -3209,7 +3304,7 @@ func TestNewMainKubeletStandAlone(t *testing.T) { DynamicPluginProber: prober, TLSOptions: tlsOptions, } - crOptions := &config.ContainerRuntimeOptions{} + crOptions := &kubeletconfig.ContainerRuntimeOptions{} testMainKubelet, err := NewMainKubelet( tCtx, @@ -3343,7 +3438,6 @@ func TestSyncPodSpans(t *testing.T) { kubelet.containerManager, kubelet.containerLogManager, kubelet.runtimeClassManager, - kubelet.allocationManager, false, kubeCfg.MemorySwap.SwapBehavior, kubelet.containerManager.GetNodeAllocatableAbsolute, diff --git a/pkg/kubelet/kubelet_volumes.go b/pkg/kubelet/kubelet_volumes.go index 16a9daaddc719..40320dcdf55af 100644 --- a/pkg/kubelet/kubelet_volumes.go +++ b/pkg/kubelet/kubelet_volumes.go @@ -76,9 +76,7 @@ func (kl *Kubelet) ListBlockVolumesForPod(podUID types.UID) (map[string]volume.B // podVolumesExist checks with the volume manager and returns true any of the // pods for the specified volume are mounted or are uncertain. func (kl *Kubelet) podVolumesExist(podUID types.UID) bool { - if mountedVolumes := - kl.volumeManager.GetPossiblyMountedVolumesForPod( - volumetypes.UniquePodName(podUID)); len(mountedVolumes) > 0 { + if kl.volumeManager.HasPossiblyMountedVolumesForPod(volumetypes.UniquePodName(podUID)) { return true } // TODO: This checks pod volume paths and whether they are mounted. If checking returns error, podVolumesExist will return true diff --git a/pkg/kubelet/kubelet_volumes_test.go b/pkg/kubelet/kubelet_volumes_test.go index 9ba12c2f31a25..4f8bf7c45ef9e 100644 --- a/pkg/kubelet/kubelet_volumes_test.go +++ b/pkg/kubelet/kubelet_volumes_test.go @@ -470,16 +470,12 @@ func TestVolumeUnmountAndDetachControllerDisabled(t *testing.T) { kubelet.podManager.SetPods([]*v1.Pod{}) assert.NoError(t, kubelet.volumeManager.WaitForUnmount(context.Background(), pod)) - if actual := kubelet.volumeManager.GetMountedVolumesForPod(util.GetUniquePodName(pod)); len(actual) > 0 { - t.Fatalf("expected volume unmount to wait for no volumes: %v", actual) - } // Verify volumes unmounted - podVolumes = kubelet.volumeManager.GetMountedVolumesForPod( + hasMountedVolumes := kubelet.volumeManager.HasPossiblyMountedVolumesForPod( util.GetUniquePodName(pod)) - assert.Empty(t, podVolumes, - "Expected volumes to be unmounted and detached. But some volumes are still mounted: %#v", podVolumes) + assert.False(t, hasMountedVolumes, "Expected volumes to be unmounted and detached. But some volumes are still mounted") assert.NoError(t, volumetest.VerifyTearDownCallCount( 1 /* expectedTearDownCallCount */, testKubelet.volumePlugin)) @@ -557,9 +553,9 @@ func TestVolumeAttachAndMountControllerEnabled(t *testing.T) { podVolumes := kubelet.volumeManager.GetMountedVolumesForPod( util.GetUniquePodName(pod)) - allPodVolumes := kubelet.volumeManager.GetPossiblyMountedVolumesForPod( + hasVolumes := kubelet.volumeManager.HasPossiblyMountedVolumesForPod( util.GetUniquePodName(pod)) - assert.Equal(t, podVolumes, allPodVolumes, "GetMountedVolumesForPod and GetPossiblyMountedVolumesForPod should return the same volumes") + assert.True(t, hasVolumes, "HasPossiblyMountedVolumesForPod should return true") expectedPodVolumes := []string{"vol1"} assert.Len(t, podVolumes, len(expectedPodVolumes), "Volumes for pod %+v", pod) @@ -644,9 +640,9 @@ func TestVolumeUnmountAndDetachControllerEnabled(t *testing.T) { podVolumes := kubelet.volumeManager.GetMountedVolumesForPod( util.GetUniquePodName(pod)) - allPodVolumes := kubelet.volumeManager.GetPossiblyMountedVolumesForPod( + hasVolumes := kubelet.volumeManager.HasPossiblyMountedVolumesForPod( util.GetUniquePodName(pod)) - assert.Equal(t, podVolumes, allPodVolumes, "GetMountedVolumesForPod and GetPossiblyMountedVolumesForPod should return the same volumes") + assert.True(t, hasVolumes, "HasPossiblyMountedVolumesForPod should return true") expectedPodVolumes := []string{"vol1"} assert.Len(t, podVolumes, len(expectedPodVolumes), "Volumes for pod %+v", pod) @@ -672,9 +668,9 @@ func TestVolumeUnmountAndDetachControllerEnabled(t *testing.T) { // Verify volumes unmounted podVolumes = kubelet.volumeManager.GetMountedVolumesForPod( util.GetUniquePodName(pod)) - allPodVolumes = kubelet.volumeManager.GetPossiblyMountedVolumesForPod( + hasVolumes = kubelet.volumeManager.HasPossiblyMountedVolumesForPod( util.GetUniquePodName(pod)) - assert.Equal(t, podVolumes, allPodVolumes, "GetMountedVolumesForPod and GetPossiblyMountedVolumesForPod should return the same volumes") + assert.False(t, hasVolumes, "HasPossiblyMountedVolumesForPod should return false") assert.Empty(t, podVolumes, "Expected volumes to be unmounted and detached. But some volumes are still mounted") diff --git a/pkg/kubelet/config/defaults.go b/pkg/kubelet/kubeletconfig/defaults.go similarity index 98% rename from pkg/kubelet/config/defaults.go rename to pkg/kubelet/kubeletconfig/defaults.go index b8788f9e431a9..7f4577ab15dba 100644 --- a/pkg/kubelet/config/defaults.go +++ b/pkg/kubelet/kubeletconfig/defaults.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package config +package kubeletconfig // Defines sane defaults for the kubelet config. const ( diff --git a/pkg/kubelet/config/flags.go b/pkg/kubelet/kubeletconfig/types.go similarity index 57% rename from pkg/kubelet/config/flags.go rename to pkg/kubelet/kubeletconfig/types.go index 27473ba7862ac..70b3e6054bc8f 100644 --- a/pkg/kubelet/config/flags.go +++ b/pkg/kubelet/kubeletconfig/types.go @@ -14,11 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package config - -import ( - "github.com/spf13/pflag" -) +package kubeletconfig // ContainerRuntimeOptions defines options for the container runtime. type ContainerRuntimeOptions struct { @@ -41,16 +37,3 @@ type ContainerRuntimeOptions struct { // +optional ImageCredentialProviderBinDir string } - -// AddFlags adds flags to the container runtime, according to ContainerRuntimeOptions. -func (s *ContainerRuntimeOptions) AddFlags(fs *pflag.FlagSet) { - var tmp string - // General settings. - fs.StringVar(&s.RuntimeCgroups, "runtime-cgroups", s.RuntimeCgroups, "Optional absolute name of cgroups to create and run the runtime in.") - fs.StringVar(&tmp, "pod-infra-container-image", "", "Specified image will not be pruned by the image garbage collector. CRI implementations have their own configuration to set this image.") - _ = fs.MarkDeprecated("pod-infra-container-image", "will be removed in 1.35. Image garbage collector will get sandbox image information from CRI.") - - // Image credential provider settings. - fs.StringVar(&s.ImageCredentialProviderConfigPath, "image-credential-provider-config", s.ImageCredentialProviderConfigPath, "Path to a credential provider plugin config file (JSON/YAML/YML) or a directory of such files (merged in lexicographical order; non-recursive search).") - fs.StringVar(&s.ImageCredentialProviderBinDir, "image-credential-provider-bin-dir", s.ImageCredentialProviderBinDir, "The path to the directory where credential provider plugin binaries are located.") -} diff --git a/pkg/kubelet/kuberuntime/fake_kuberuntime_manager.go b/pkg/kubelet/kuberuntime/fake_kuberuntime_manager.go index c0548de4b58ab..dad8c88c4de5c 100644 --- a/pkg/kubelet/kuberuntime/fake_kuberuntime_manager.go +++ b/pkg/kubelet/kuberuntime/fake_kuberuntime_manager.go @@ -32,7 +32,7 @@ import ( "k8s.io/component-base/logs/logreduction" internalapi "k8s.io/cri-api/pkg/apis" "k8s.io/kubernetes/pkg/credentialprovider" - "k8s.io/kubernetes/pkg/kubelet/allocation" + "k8s.io/kubernetes/pkg/kubelet/allocation/state" "k8s.io/kubernetes/pkg/kubelet/cm" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/images" @@ -119,7 +119,7 @@ func newFakeKubeRuntimeManager(ctx context.Context, runtimeService internalapi.R logManager: logManager, memoryThrottlingFactor: 0.9, podLogsDirectory: fakePodLogsDirectory, - allocationManager: allocation.NewInMemoryManager(nil, nil, nil, nil, nil, nil), + actuatedState: state.NewStateMemory(nil), } // Initialize swap controller availability check (always false for tests) diff --git a/pkg/kubelet/kuberuntime/helpers.go b/pkg/kubelet/kuberuntime/helpers.go index df57bc31747f4..97eb7055953b2 100644 --- a/pkg/kubelet/kuberuntime/helpers.go +++ b/pkg/kubelet/kuberuntime/helpers.go @@ -51,9 +51,14 @@ func (b containersByID) Less(i, j int) bool { return b[i].ID.ID < b[j].ID.ID } // Newest first. type podSandboxByCreated []*runtimeapi.PodSandbox -func (p podSandboxByCreated) Len() int { return len(p) } -func (p podSandboxByCreated) Swap(i, j int) { p[i], p[j] = p[j], p[i] } -func (p podSandboxByCreated) Less(i, j int) bool { return p[i].CreatedAt > p[j].CreatedAt } +func (p podSandboxByCreated) Len() int { return len(p) } +func (p podSandboxByCreated) Swap(i, j int) { p[i], p[j] = p[j], p[i] } +func (p podSandboxByCreated) Less(i, j int) bool { + if p[i].Metadata == nil || p[j].Metadata == nil { + return p[i].CreatedAt > p[j].CreatedAt + } + return p[i].Metadata.Attempt > p[j].Metadata.Attempt +} type containerStatusByCreated []*kubecontainer.Status diff --git a/pkg/kubelet/kuberuntime/helpers_linux.go b/pkg/kubelet/kuberuntime/helpers_linux.go index 4f56d62b82ebb..a3b1ab2c30064 100644 --- a/pkg/kubelet/kuberuntime/helpers_linux.go +++ b/pkg/kubelet/kuberuntime/helpers_linux.go @@ -27,8 +27,6 @@ import ( ) // sharesToMilliCPU converts CpuShares (cpu.shares) to milli-CPU value -// TODO(vinaykul,InPlacePodVerticalScaling): Address issue that sets min req/limit to 2m/10m before beta -// See: https://github.com/kubernetes/kubernetes/pull/102884#discussion_r662552642 func sharesToMilliCPU(shares int64) int64 { milliCPU := int64(0) if shares >= int64(cm.MinShares) { diff --git a/pkg/kubelet/kuberuntime/instrumented_services.go b/pkg/kubelet/kuberuntime/instrumented_services.go index 7d2d2ba4b72aa..52896d59b1fd6 100644 --- a/pkg/kubelet/kuberuntime/instrumented_services.go +++ b/pkg/kubelet/kuberuntime/instrumented_services.go @@ -335,6 +335,15 @@ func (in instrumentedImageManagerService) ImageFsInfo(ctx context.Context) (*run return fsInfo, nil } +func (in instrumentedImageManagerService) Close() error { + const operation = "close" + defer recordOperation(operation, time.Now()) + + err := in.service.Close() + recordError(operation, err) + return err +} + func (in instrumentedRuntimeService) CheckpointContainer(ctx context.Context, options *runtimeapi.CheckpointContainerRequest) error { const operation = "checkpoint_container" defer recordOperation(operation, time.Now()) @@ -379,3 +388,12 @@ func (in instrumentedRuntimeService) RuntimeConfig(ctx context.Context) (*runtim recordError(operation, err) return out, err } + +func (in instrumentedRuntimeService) Close() error { + const operation = "close" + defer recordOperation(operation, time.Now()) + + err := in.service.Close() + recordError(operation, err) + return err +} diff --git a/pkg/kubelet/kuberuntime/kuberuntime_container.go b/pkg/kubelet/kuberuntime/kuberuntime_container.go index a1d9453f8918d..d59b3246f62be 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_container.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_container.go @@ -261,7 +261,7 @@ func (m *kubeGenericRuntimeManager) startContainer(ctx context.Context, podSandb } // When creating a container, mark the resources as actuated. - if err := m.allocationManager.SetActuatedResources(pod, container); err != nil { + if err := m.actuatedState.SetContainerResources(pod.UID, container.Name, container.Resources); err != nil { m.recordContainerEvent(ctx, pod, container, "", v1.EventTypeWarning, events.FailedToCreateContainer, "Error: %v", err) return err.Error(), ErrCreateContainerConfig } @@ -285,7 +285,7 @@ func (m *kubeGenericRuntimeManager) startContainer(ctx context.Context, podSandb m.recordContainerEvent(ctx, pod, container, containerID, v1.EventTypeWarning, events.FailedToStartContainer, "Internal PreStartContainer hook failed: %v", s.Message()) return s.Message(), ErrPreStartHook } - m.recordContainerEvent(ctx, pod, container, containerID, v1.EventTypeNormal, events.CreatedContainer, "Created container: %v", container.Name) + m.recordContainerEvent(ctx, pod, container, containerID, v1.EventTypeNormal, events.CreatedContainer, "Container created") // Step 3: start the container. err = m.runtimeService.StartContainer(ctx, containerID) @@ -294,7 +294,7 @@ func (m *kubeGenericRuntimeManager) startContainer(ctx context.Context, podSandb m.recordContainerEvent(ctx, pod, container, containerID, v1.EventTypeWarning, events.FailedToStartContainer, "Error: %v", s.Message()) return s.Message(), kubecontainer.ErrRunContainer } - m.recordContainerEvent(ctx, pod, container, containerID, v1.EventTypeNormal, events.StartedContainer, "Started container %v", container.Name) + m.recordContainerEvent(ctx, pod, container, containerID, v1.EventTypeNormal, events.StartedContainer, "Container started") // Symlink container logs to the legacy container log location for cluster logging // support. @@ -411,12 +411,9 @@ func (m *kubeGenericRuntimeManager) updateContainerResources(ctx context.Context if containerResources == nil { return fmt.Errorf("container %q updateContainerResources failed: cannot generate resources config", containerID.String()) } - logger := klog.FromContext(ctx) err := m.runtimeService.UpdateContainerResources(ctx, containerID.ID, containerResources) if err == nil { - err = m.allocationManager.SetActuatedResources(pod, container) - } else { - logger.Error(err, "UpdateContainerResources failed", "container", containerID.String()) + err = m.actuatedState.SetContainerResources(pod.UID, container.Name, container.Resources) } return err } @@ -590,8 +587,8 @@ func (m *kubeGenericRuntimeManager) readLastStringFromContainerLogs(ctx context. return buf.String() } -func (m *kubeGenericRuntimeManager) convertToKubeContainerStatus(ctx context.Context, status *runtimeapi.ContainerStatus) (cStatus *kubecontainer.Status) { - cStatus = toKubeContainerStatus(ctx, status, m.runtimeName) +func (m *kubeGenericRuntimeManager) convertToKubeContainerStatus(ctx context.Context, podUID kubetypes.UID, status *runtimeapi.ContainerStatus) (cStatus *kubecontainer.Status) { + cStatus = m.toKubeContainerStatus(ctx, podUID, status, m.runtimeName) if status.State == runtimeapi.ContainerState_CONTAINER_EXITED { // Populate the termination message if needed. annotatedInfo := getContainerInfoFromAnnotations(ctx, status.Annotations) @@ -646,7 +643,7 @@ func (m *kubeGenericRuntimeManager) getPodContainerStatuses(ctx context.Context, if status == nil { return nil, nil, remote.ErrContainerStatusNil } - cStatus := m.convertToKubeContainerStatus(ctx, status) + cStatus := m.convertToKubeContainerStatus(ctx, uid, status) statuses = append(statuses, cStatus) if c.PodSandboxId == activePodSandboxID { activeContainerStatuses = append(activeContainerStatuses, cStatus) @@ -658,13 +655,31 @@ func (m *kubeGenericRuntimeManager) getPodContainerStatuses(ctx context.Context, return statuses, activeContainerStatuses, nil } -func toKubeContainerStatus(ctx context.Context, status *runtimeapi.ContainerStatus, runtimeName string) *kubecontainer.Status { +func (m *kubeGenericRuntimeManager) toKubeContainerStatus(ctx context.Context, podUID kubetypes.UID, status *runtimeapi.ContainerStatus, runtimeName string) *kubecontainer.Status { annotatedInfo := getContainerInfoFromAnnotations(ctx, status.Annotations) labeledInfo := getContainerInfoFromLabels(ctx, status.Labels) var cStatusResources *kubecontainer.ContainerResources if utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScaling) { // If runtime reports cpu & memory resources info, add it to container status cStatusResources = toKubeContainerResources(status.Resources) + + // Fill missing resource values from the actuated resources. + if cStatusResources == nil || cStatusResources.MemoryRequest == nil { + if actuatedResources, ok := m.actuatedState.GetContainerResources(podUID, labeledInfo.ContainerName); ok { + if cStatusResources == nil { + cStatusResources = &kubecontainer.ContainerResources{ + CPURequest: actuatedResources.Requests.Cpu(), + CPULimit: actuatedResources.Limits.Cpu(), + MemoryRequest: actuatedResources.Requests.Memory(), + MemoryLimit: actuatedResources.Limits.Memory(), + } + } else if cStatusResources.MemoryRequest == nil { + if memReq := actuatedResources.Requests[v1.ResourceMemory]; !memReq.IsZero() { + cStatusResources.MemoryRequest = &memReq + } + } + } + } } // Keep backwards compatibility to older runtimes, status.ImageId has been added in v1.30 @@ -1184,7 +1199,7 @@ func (m *kubeGenericRuntimeManager) computeInitContainerActions(ctx context.Cont if isInitContainerFailed(status) { restartOnFailure := restartOnFailure if utilfeature.DefaultFeatureGate.Enabled(features.ContainerRestartRules) { - restartOnFailure = kubecontainer.ShouldContainerBeRestarted(container, pod, podStatus) + restartOnFailure = kubecontainer.ShouldContainerBeRestarted(logger, container, pod, podStatus) } if !restartOnFailure { changes.KillPod = true diff --git a/pkg/kubelet/kuberuntime/kuberuntime_container_test.go b/pkg/kubelet/kuberuntime/kuberuntime_container_test.go index 9a7de58f2f272..b9fd964724fe1 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_container_test.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_container_test.go @@ -39,7 +39,9 @@ import ( runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" "k8s.io/kubernetes/test/utils/ktesting" + kubelettypes "k8s.io/kubelet/pkg/types" "k8s.io/kubernetes/pkg/features" + "k8s.io/kubernetes/pkg/kubelet/cm" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" "k8s.io/kubernetes/pkg/kubelet/lifecycle" @@ -146,12 +148,15 @@ func TestToKubeContainerStatus(t *testing.T) { cid := &kubecontainer.ContainerID{Type: "testRuntime", ID: "dummyid"} meta := &runtimeapi.ContainerMetadata{Name: "cname", Attempt: 3} imageSpec := &runtimeapi.ImageSpec{Image: "fimage"} - var ( - createdAt int64 = 327 - startedAt int64 = 999 - finishedAt int64 = 1278 + const ( + podUID types.UID = "12345-abcd" + createdAt int64 = 327 + startedAt int64 = 999 + finishedAt int64 = 1278 ) + _, _, m, _ := createTestRuntimeManager(tCtx) + for desc, test := range map[string]struct { input *runtimeapi.ContainerStatus expected *kubecontainer.Status @@ -231,8 +236,10 @@ func TestToKubeContainerStatus(t *testing.T) { }, }, } { - actual := toKubeContainerStatus(tCtx, test.input, cid.Type) - assert.Equal(t, test.expected, actual, desc) + t.Run(desc, func(t *testing.T) { + actual := m.toKubeContainerStatus(tCtx, podUID, test.input, cid.Type) + assert.Equal(t, test.expected, actual, desc) + }) } } @@ -241,133 +248,185 @@ func TestToKubeContainerStatus(t *testing.T) { func TestToKubeContainerStatusWithResources(t *testing.T) { featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.InPlacePodVerticalScaling, true) tCtx := ktesting.Init(t) + + const ( + podUID types.UID = "12345-abcd" + createdAt int64 = 327 + startedAt int64 = 999 + cName = "cname-abcd" + ) cid := &kubecontainer.ContainerID{Type: "testRuntime", ID: "dummyid"} - meta := &runtimeapi.ContainerMetadata{Name: "cname", Attempt: 3} + meta := &runtimeapi.ContainerMetadata{Name: cName, Attempt: 3} imageSpec := &runtimeapi.ImageSpec{Image: "fimage"} - var ( - createdAt int64 = 327 - startedAt int64 = 999 - ) + labels := map[string]string{ + kubelettypes.KubernetesPodNameLabel: "pod-12345", + kubelettypes.KubernetesPodNamespaceLabel: "default", + kubelettypes.KubernetesPodUIDLabel: string(podUID), + kubelettypes.KubernetesContainerNameLabel: cName, + } + + _, _, m, _ := createTestRuntimeManager(tCtx) for desc, test := range map[string]struct { - input *runtimeapi.ContainerStatus - expected *kubecontainer.Status - skipOnWindows bool + reportedResources *runtimeapi.ContainerResources + actuatedResources *v1.ResourceRequirements + Resources *kubecontainer.ContainerResources + skipOnWindows bool }{ "container reporting cpu and memory": { - input: &runtimeapi.ContainerStatus{ - Id: cid.ID, - Metadata: meta, - Image: imageSpec, - State: runtimeapi.ContainerState_CONTAINER_RUNNING, - CreatedAt: createdAt, - StartedAt: startedAt, - Resources: func() *runtimeapi.ContainerResources { - if goruntime.GOOS == "windows" { - return &runtimeapi.ContainerResources{ - Windows: &runtimeapi.WindowsContainerResources{ - CpuMaximum: 2500, - CpuCount: 1, - MemoryLimitInBytes: 524288000, - }, - } - } + reportedResources: func() *runtimeapi.ContainerResources { + if goruntime.GOOS == "windows" { return &runtimeapi.ContainerResources{ - Linux: &runtimeapi.LinuxContainerResources{ - CpuQuota: 25000, - CpuPeriod: 100000, + Windows: &runtimeapi.WindowsContainerResources{ + CpuMaximum: 2500, + CpuCount: 1, MemoryLimitInBytes: 524288000, - OomScoreAdj: -998, }, } - }(), - }, - expected: &kubecontainer.Status{ - ID: *cid, - Image: imageSpec.Image, - State: kubecontainer.ContainerStateRunning, - CreatedAt: time.Unix(0, createdAt), - StartedAt: time.Unix(0, startedAt), - Resources: &kubecontainer.ContainerResources{ - CPULimit: resource.NewMilliQuantity(250, resource.DecimalSI), - MemoryLimit: resource.NewQuantity(524288000, resource.BinarySI), - }, + } + return &runtimeapi.ContainerResources{ + Linux: &runtimeapi.LinuxContainerResources{ + CpuQuota: 25000, + CpuPeriod: 100000, + MemoryLimitInBytes: 524288000, + OomScoreAdj: -998, + }, + } + }(), + Resources: &kubecontainer.ContainerResources{ + CPULimit: resource.NewMilliQuantity(250, resource.DecimalSI), + MemoryLimit: resource.NewQuantity(524288000, resource.BinarySI), }, skipOnWindows: true, }, "container reporting cpu only": { - input: &runtimeapi.ContainerStatus{ - Id: cid.ID, - Metadata: meta, - Image: imageSpec, - State: runtimeapi.ContainerState_CONTAINER_RUNNING, - CreatedAt: createdAt, - StartedAt: startedAt, - Resources: func() *runtimeapi.ContainerResources { - if goruntime.GOOS == "windows" { - return &runtimeapi.ContainerResources{ - Windows: &runtimeapi.WindowsContainerResources{ - CpuMaximum: 2500, - CpuCount: 2, - }, - } - } + reportedResources: func() *runtimeapi.ContainerResources { + if goruntime.GOOS == "windows" { return &runtimeapi.ContainerResources{ - Linux: &runtimeapi.LinuxContainerResources{ - CpuQuota: 50000, - CpuPeriod: 100000, + Windows: &runtimeapi.WindowsContainerResources{ + CpuMaximum: 2500, + CpuCount: 2, }, } - }(), - }, - expected: &kubecontainer.Status{ - ID: *cid, - Image: imageSpec.Image, - State: kubecontainer.ContainerStateRunning, - CreatedAt: time.Unix(0, createdAt), - StartedAt: time.Unix(0, startedAt), - Resources: &kubecontainer.ContainerResources{ - CPULimit: resource.NewMilliQuantity(500, resource.DecimalSI), + } + return &runtimeapi.ContainerResources{ + Linux: &runtimeapi.LinuxContainerResources{ + CpuShares: int64(cm.MilliCPUToShares(500)), + CpuQuota: 50000, + CpuPeriod: 100000, + }, + } + }(), + actuatedResources: &v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(500, resource.BinarySI), + v1.ResourceMemory: resource.Quantity{}, + }, + Limits: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(500, resource.BinarySI), }, }, + Resources: &kubecontainer.ContainerResources{ + CPURequest: resource.NewMilliQuantity(500, resource.DecimalSI), + CPULimit: resource.NewMilliQuantity(500, resource.DecimalSI), + }, }, "container reporting memory only": { - input: &runtimeapi.ContainerStatus{ + reportedResources: &runtimeapi.ContainerResources{ + Linux: &runtimeapi.LinuxContainerResources{ + MemoryLimitInBytes: 524288000, + OomScoreAdj: -998, + }, + Windows: &runtimeapi.WindowsContainerResources{ + MemoryLimitInBytes: 524288000, + }, + }, + Resources: &kubecontainer.ContainerResources{ + MemoryLimit: resource.NewQuantity(524288000, resource.BinarySI), + }, + }, + "container reporting memory limits, reqs from actuated": { + reportedResources: &runtimeapi.ContainerResources{ + Linux: &runtimeapi.LinuxContainerResources{ + MemoryLimitInBytes: 524288000, + OomScoreAdj: -998, + }, + Windows: &runtimeapi.WindowsContainerResources{ + MemoryLimitInBytes: 524288000, + }, + }, + actuatedResources: &v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceMemory: *resource.NewQuantity(262144000, resource.BinarySI), + }, + Limits: v1.ResourceList{ + v1.ResourceMemory: *resource.NewQuantity(524288000, resource.BinarySI), + }, + }, + Resources: &kubecontainer.ContainerResources{ + MemoryRequest: resource.NewQuantity(262144000, resource.BinarySI), + MemoryLimit: resource.NewQuantity(524288000, resource.BinarySI), + }, + }, + "reported resources take precedence to actuated resources": { + reportedResources: &runtimeapi.ContainerResources{ + Linux: &runtimeapi.LinuxContainerResources{ + CpuShares: int64(cm.MilliCPUToShares(500)), + CpuQuota: 50000, + CpuPeriod: 100000, + }, + }, + actuatedResources: &v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(400, resource.BinarySI), + v1.ResourceMemory: *resource.NewQuantity(262144000, resource.BinarySI), + }, + Limits: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(400, resource.BinarySI), + }, + }, + Resources: &kubecontainer.ContainerResources{ + CPURequest: resource.NewMilliQuantity(500, resource.DecimalSI), + CPULimit: resource.NewMilliQuantity(500, resource.DecimalSI), + MemoryRequest: resource.NewQuantity(262144000, resource.BinarySI), + }, + skipOnWindows: true, + }, + } { + t.Run(desc, func(t *testing.T) { + if test.skipOnWindows && goruntime.GOOS == "windows" { + // TODO: remove skip once the failing test has been fixed. + t.Skip("Skip failing test on Windows.") + } + + input := &runtimeapi.ContainerStatus{ Id: cid.ID, Metadata: meta, + Labels: labels, Image: imageSpec, State: runtimeapi.ContainerState_CONTAINER_RUNNING, CreatedAt: createdAt, StartedAt: startedAt, - Resources: &runtimeapi.ContainerResources{ - Linux: &runtimeapi.LinuxContainerResources{ - MemoryLimitInBytes: 524288000, - OomScoreAdj: -998, - }, - Windows: &runtimeapi.WindowsContainerResources{ - MemoryLimitInBytes: 524288000, - }, - }, - }, - expected: &kubecontainer.Status{ + Resources: test.reportedResources, + } + + expected := &kubecontainer.Status{ ID: *cid, + Name: cName, Image: imageSpec.Image, State: kubecontainer.ContainerStateRunning, CreatedAt: time.Unix(0, createdAt), StartedAt: time.Unix(0, startedAt), - Resources: &kubecontainer.ContainerResources{ - MemoryLimit: resource.NewQuantity(524288000, resource.BinarySI), - }, - }, - }, - } { - t.Run(desc, func(t *testing.T) { - if test.skipOnWindows && goruntime.GOOS == "windows" { - // TODO: remove skip once the failing test has been fixed. - t.Skip("Skip failing test on Windows.") + Resources: test.Resources, } - actual := toKubeContainerStatus(tCtx, test.input, cid.Type) - assert.Equal(t, test.expected, actual, desc) + + if test.actuatedResources != nil { + require.NoError(t, m.actuatedState.SetContainerResources(podUID, meta.Name, *test.actuatedResources)) + t.Cleanup(func() { _ = m.actuatedState.RemovePod(podUID) }) + } + + actual := m.toKubeContainerStatus(tCtx, podUID, input, cid.Type) + assert.Equal(t, expected, actual, desc) }) } } @@ -381,11 +440,14 @@ func TestToKubeContainerStatusWithUser(t *testing.T) { cid := &kubecontainer.ContainerID{Type: "testRuntime", ID: "dummyid"} meta := &runtimeapi.ContainerMetadata{Name: "cname", Attempt: 3} imageSpec := &runtimeapi.ImageSpec{Image: "fimage"} - var ( - createdAt int64 = 327 - startedAt int64 = 999 + const ( + podUID types.UID = "12345-abcd" + createdAt int64 = 327 + startedAt int64 = 999 ) + _, _, m, _ := createTestRuntimeManager(tCtx) + for desc, test := range map[string]struct { input *runtimeapi.ContainerUser expected *kubecontainer.ContainerUser @@ -451,7 +513,7 @@ func TestToKubeContainerStatusWithUser(t *testing.T) { StartedAt: startedAt, User: test.input, } - actual := toKubeContainerStatus(tCtx, cStatus, cid.Type) + actual := m.toKubeContainerStatus(tCtx, podUID, cStatus, cid.Type) assert.EqualValues(t, test.expected, actual.User, desc) }) } diff --git a/pkg/kubelet/kuberuntime/kuberuntime_manager.go b/pkg/kubelet/kuberuntime/kuberuntime_manager.go index a2a112c4bc3e8..40ab6c448b858 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_manager.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_manager.go @@ -53,6 +53,7 @@ import ( "k8s.io/kubernetes/pkg/credentialprovider/plugin" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/kubelet/allocation" + "k8s.io/kubernetes/pkg/kubelet/allocation/state" kubeletconfiginternal "k8s.io/kubernetes/pkg/kubelet/apis/config" "k8s.io/kubernetes/pkg/kubelet/cm" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" @@ -86,6 +87,8 @@ const ( identicalErrorDelay = 1 * time.Minute // OpenTelemetry instrumentation scope name instrumentationScope = "k8s.io/kubernetes/pkg/kubelet/kuberuntime" + + actuatedPodsStateFile = "actuated_pods_state" ) var ( @@ -159,8 +162,8 @@ type kubeGenericRuntimeManager struct { // Manage RuntimeClass resources. runtimeClassManager *runtimeclass.Manager - // Manager allocated & actuated resources. - allocationManager allocation.Manager + // actuatedState tracks actuated resources. + actuatedState state.State // Cache last per-container error message to reduce log spam logReduction *logreduction.LogReduction @@ -227,7 +230,6 @@ func NewKubeGenericRuntimeManager( containerManager cm.ContainerManager, logManager logs.ContainerLogManager, runtimeClassManager *runtimeclass.Manager, - allocationManager allocation.Manager, seccompDefault bool, memorySwapBehavior string, getNodeAllocatable func() v1.ResourceList, @@ -260,7 +262,6 @@ func NewKubeGenericRuntimeManager( internalLifecycle: containerManager.InternalContainerLifecycle(), logManager: logManager, runtimeClassManager: runtimeClassManager, - allocationManager: allocationManager, logReduction: logreduction.NewLogReduction(identicalErrorDelay), seccompDefault: seccompDefault, memorySwapBehavior: memorySwapBehavior, @@ -355,6 +356,11 @@ func NewKubeGenericRuntimeManager( versionCacheTTL, ) + kubeRuntimeManager.actuatedState, err = state.NewStateCheckpoint(rootDirectory, actuatedPodsStateFile) + if err != nil { + return nil, nil, fmt.Errorf("failed to initialize actuated state checkpoint: %w", err) + } + return kubeRuntimeManager, imageGCHooks, nil } @@ -634,7 +640,7 @@ func (m *kubeGenericRuntimeManager) computePodResizeAction(ctx context.Context, return true } - actuatedResources, found := m.allocationManager.GetActuatedResources(pod.UID, container.Name) + actuatedResources, found := m.actuatedState.GetContainerResources(pod.UID, container.Name) if !found { logger.Error(nil, "Missing actuated resource record", "pod", klog.KObj(pod), "container", container.Name) // Proceed with the zero-value actuated resources. For restart NotRequired, this may @@ -1114,7 +1120,7 @@ func (m *kubeGenericRuntimeManager) computePodActions(ctx context.Context, pod * // If container does not exist, or is not running, check whether we // need to restart it. if containerStatus == nil || containerStatus.State != kubecontainer.ContainerStateRunning { - if kubecontainer.ShouldContainerBeRestarted(&container, pod, podStatus) { + if kubecontainer.ShouldContainerBeRestarted(logger, &container, pod, podStatus) { logger.V(3).Info("Container of pod is not in the desired state and shall be started", "containerName", container.Name, "pod", klog.KObj(pod)) changes.ContainersToStart = append(changes.ContainersToStart, idx) if containerStatus != nil && containerStatus.State == kubecontainer.ContainerStateUnknown { @@ -1671,11 +1677,12 @@ func (m *kubeGenericRuntimeManager) killPodWithSyncResult(ctx context.Context, p func (m *kubeGenericRuntimeManager) GeneratePodStatus(event *runtimeapi.ContainerEventResponse) *kubecontainer.PodStatus { ctx := context.TODO() // This context will be passed as parameter in the future + podUID := kubetypes.UID(event.PodSandboxStatus.Metadata.Uid) podIPs := m.determinePodSandboxIPs(ctx, event.PodSandboxStatus.Metadata.Namespace, event.PodSandboxStatus.Metadata.Name, event.PodSandboxStatus) kubeContainerStatuses := []*kubecontainer.Status{} for _, status := range event.ContainersStatuses { - kubeContainerStatuses = append(kubeContainerStatuses, m.convertToKubeContainerStatus(ctx, status)) + kubeContainerStatuses = append(kubeContainerStatuses, m.convertToKubeContainerStatus(ctx, podUID, status)) } sort.Sort(containerStatusByCreated(kubeContainerStatuses)) @@ -1775,7 +1782,7 @@ func (m *kubeGenericRuntimeManager) GetPodStatus(ctx context.Context, uid kubety // timestamp from sandboxStatus. timestamp = time.Unix(0, resp.Timestamp) for _, cs := range resp.ContainersStatuses { - cStatus := m.convertToKubeContainerStatus(ctx, cs) + cStatus := m.convertToKubeContainerStatus(ctx, uid, cs) containerStatuses = append(containerStatuses, cStatus) } } @@ -1806,16 +1813,27 @@ func (m *kubeGenericRuntimeManager) GetPodStatus(ctx context.Context, uid kubety }, nil } -func (m *kubeGenericRuntimeManager) GetContainerStatus(ctx context.Context, id kubecontainer.ContainerID) (*kubecontainer.Status, error) { +func (m *kubeGenericRuntimeManager) GetContainerStatus(ctx context.Context, podUID kubetypes.UID, id kubecontainer.ContainerID) (*kubecontainer.Status, error) { resp, err := m.runtimeService.ContainerStatus(ctx, id.ID, false) if err != nil { return nil, fmt.Errorf("runtime container status: %w", err) } - return m.convertToKubeContainerStatus(ctx, resp.GetStatus()), nil + return m.convertToKubeContainerStatus(ctx, podUID, resp.GetStatus()), nil } // GarbageCollect removes dead containers using the specified container gc policy. func (m *kubeGenericRuntimeManager) GarbageCollect(ctx context.Context, gcPolicy kubecontainer.GCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error { + logger := klog.FromContext(ctx) + // Remove terminated pods from the actuated state. + for uid := range m.actuatedState.GetPodResourceInfoMap() { + if m.podStateProvider.ShouldPodContentBeRemoved(uid) { + if err := m.actuatedState.RemovePod(uid); err != nil { + // No need to act on the error beyond logging it here. + logger.Error(err, "Failed to remove pod from actuated state", "podUID", uid) + } + } + } + return m.containerGC.GarbageCollect(ctx, gcPolicy, allSourcesReady, evictNonDeletedPods) } @@ -1845,3 +1863,42 @@ func (m *kubeGenericRuntimeManager) ListMetricDescriptors(ctx context.Context) ( func (m *kubeGenericRuntimeManager) ListPodSandboxMetrics(ctx context.Context) ([]*runtimeapi.PodSandboxMetrics, error) { return m.runtimeService.ListPodSandboxMetrics(ctx) } + +// isPodResizeInProgress checks whether the actuated resizable resources differ from the allocated resources +// for any running containers. Specifically, the following differences are ignored: +// - Non-resizable containers: non-restartable init containers, ephemeral containers +// - Non-resizable resources: only CPU & memory are resizable +// - Non-running containers: they will be sized correctly when (re)started +func (m *kubeGenericRuntimeManager) IsPodResizeInProgress(allocatedPod *v1.Pod, podStatus *kubecontainer.PodStatus) bool { + return !podutil.VisitContainers(&allocatedPod.Spec, podutil.InitContainers|podutil.Containers, + func(allocatedContainer *v1.Container, containerType podutil.ContainerType) (shouldContinue bool) { + if !isResizableContainer(allocatedContainer, containerType) { + return true + } + + containerStatus := podStatus.FindContainerStatusByName(allocatedContainer.Name) + if containerStatus == nil || containerStatus.State != kubecontainer.ContainerStateRunning { + // If the container isn't running, it doesn't need to be resized. + return true + } + + actuatedResources, _ := m.actuatedState.GetContainerResources(allocatedPod.UID, allocatedContainer.Name) + allocatedResources := allocatedContainer.Resources + + return allocatedResources.Requests[v1.ResourceCPU].Equal(actuatedResources.Requests[v1.ResourceCPU]) && + allocatedResources.Limits[v1.ResourceCPU].Equal(actuatedResources.Limits[v1.ResourceCPU]) && + allocatedResources.Requests[v1.ResourceMemory].Equal(actuatedResources.Requests[v1.ResourceMemory]) && + allocatedResources.Limits[v1.ResourceMemory].Equal(actuatedResources.Limits[v1.ResourceMemory]) + }) +} + +func isResizableContainer(container *v1.Container, containerType podutil.ContainerType) bool { + switch containerType { + case podutil.InitContainers: + return podutil.IsRestartableInitContainer(container) + case podutil.Containers: + return true + default: + return false + } +} diff --git a/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go b/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go index 4dc328bb4998b..4ba6de785f4f6 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go @@ -2336,7 +2336,7 @@ func TestComputePodActionsForPodResize(t *testing.T) { setupActuatedResources := func(pod *v1.Pod, container *v1.Container, actuatedResources v1.ResourceRequirements) { actuatedContainer := container.DeepCopy() actuatedContainer.Resources = actuatedResources - require.NoError(t, m.allocationManager.SetActuatedResources(pod, actuatedContainer)) + require.NoError(t, m.actuatedState.SetContainerResources(pod.UID, actuatedContainer.Name, actuatedContainer.Resources)) } for desc, test := range map[string]struct { @@ -2754,7 +2754,7 @@ func TestComputePodActionsForPodResize(t *testing.T) { if test.setupFn != nil { test.setupFn(pod) } - t.Cleanup(func() { m.allocationManager.RemovePod(pod.UID) }) + t.Cleanup(func() { _ = m.actuatedState.RemovePod(pod.UID) }) for idx := range pod.Spec.Containers { // compute hash @@ -3287,7 +3287,7 @@ func TestDoPodResizeAction(t *testing.T) { metrics.PodResizeDurationMilliseconds.Reset() } -func TestCheckPodResize(t *testing.T) { +func TestValidatePodResizeAction(t *testing.T) { if goruntime.GOOS != "linux" { t.Skip("unsupported OS") } @@ -3664,3 +3664,272 @@ func TestIncrementImageVolumeMetrics(t *testing.T) { }) } } + +func TestIsPodResizeInProgress(t *testing.T) { + type testResources struct { + cpuReq, cpuLim, memReq, memLim int64 + } + type testContainer struct { + allocated testResources + actuated *testResources + nonSidecarInit, sidecar bool + isRunning bool + unstarted bool // Whether the container is missing from the pod status + } + + tests := []struct { + name string + containers []testContainer + expectHasResize bool + }{{ + name: "simple running container", + containers: []testContainer{{ + allocated: testResources{100, 100, 100, 100}, + actuated: &testResources{100, 100, 100, 100}, + isRunning: true, + }}, + expectHasResize: false, + }, { + name: "simple unstarted container", + containers: []testContainer{{ + allocated: testResources{100, 100, 100, 100}, + unstarted: true, + }}, + expectHasResize: false, + }, { + name: "simple resized container/cpu req", + containers: []testContainer{{ + allocated: testResources{100, 200, 100, 200}, + actuated: &testResources{150, 200, 100, 200}, + isRunning: true, + }}, + expectHasResize: true, + }, { + name: "simple resized container/cpu limit", + containers: []testContainer{{ + allocated: testResources{100, 200, 100, 200}, + actuated: &testResources{100, 300, 100, 200}, + isRunning: true, + }}, + expectHasResize: true, + }, { + name: "simple resized container/mem req", + containers: []testContainer{{ + allocated: testResources{100, 200, 100, 200}, + actuated: &testResources{100, 200, 150, 200}, + isRunning: true, + }}, + expectHasResize: true, + }, { + name: "simple resized container/cpu+mem req", + containers: []testContainer{{ + allocated: testResources{100, 200, 100, 200}, + actuated: &testResources{150, 200, 150, 200}, + isRunning: true, + }}, + expectHasResize: true, + }, { + name: "simple resized container/mem limit", + containers: []testContainer{{ + allocated: testResources{100, 200, 100, 200}, + actuated: &testResources{100, 200, 100, 300}, + isRunning: true, + }}, + expectHasResize: true, + }, { + name: "terminated resized container", + containers: []testContainer{{ + allocated: testResources{100, 200, 100, 200}, + actuated: &testResources{200, 200, 100, 200}, + isRunning: false, + }}, + expectHasResize: false, + }, { + name: "non-sidecar init container", + containers: []testContainer{{ + allocated: testResources{100, 200, 100, 200}, + nonSidecarInit: true, + isRunning: true, + }, { + allocated: testResources{100, 200, 100, 200}, + actuated: &testResources{100, 200, 100, 200}, + isRunning: true, + }}, + expectHasResize: false, + }, { + name: "non-resized sidecar", + containers: []testContainer{{ + allocated: testResources{100, 200, 100, 200}, + actuated: &testResources{100, 200, 100, 200}, + sidecar: true, + isRunning: true, + }, { + allocated: testResources{100, 200, 100, 200}, + actuated: &testResources{100, 200, 100, 200}, + isRunning: true, + }}, + expectHasResize: false, + }, { + name: "resized sidecar", + containers: []testContainer{{ + allocated: testResources{100, 200, 100, 200}, + actuated: &testResources{200, 200, 100, 200}, + sidecar: true, + isRunning: true, + }, { + allocated: testResources{100, 200, 100, 200}, + actuated: &testResources{100, 200, 100, 200}, + isRunning: true, + }}, + expectHasResize: true, + }, { + name: "several containers and a resize", + containers: []testContainer{{ + allocated: testResources{100, 200, 100, 200}, + nonSidecarInit: true, + isRunning: true, + }, { + allocated: testResources{100, 200, 100, 200}, + actuated: &testResources{100, 200, 100, 200}, + isRunning: true, + }, { + allocated: testResources{100, 200, 100, 200}, + unstarted: true, + }, { + allocated: testResources{100, 200, 100, 200}, + actuated: &testResources{200, 200, 100, 200}, // Resized + isRunning: true, + }}, + expectHasResize: true, + }, { + name: "several containers", + containers: []testContainer{{ + allocated: testResources{cpuReq: 100, cpuLim: 200}, + actuated: &testResources{cpuReq: 100, cpuLim: 200}, + sidecar: true, + isRunning: true, + }, { + allocated: testResources{memReq: 100, memLim: 200}, + actuated: &testResources{memReq: 100, memLim: 200}, + isRunning: true, + }, { + allocated: testResources{cpuReq: 200, memReq: 100}, + actuated: &testResources{cpuReq: 200, memReq: 100}, + isRunning: true, + }}, + expectHasResize: false, + }, { + name: "best-effort pod", + containers: []testContainer{{ + allocated: testResources{}, + actuated: &testResources{}, + isRunning: true, + }}, + expectHasResize: false, + }, { + name: "burstable pod/not resizing", + containers: []testContainer{{ + allocated: testResources{cpuReq: 100}, + actuated: &testResources{cpuReq: 100}, + isRunning: true, + }}, + expectHasResize: false, + }, { + name: "burstable pod/resized", + containers: []testContainer{{ + allocated: testResources{cpuReq: 100}, + actuated: &testResources{cpuReq: 500}, + isRunning: true, + }}, + expectHasResize: true, + }} + + mkRequirements := func(r testResources) v1.ResourceRequirements { + res := v1.ResourceRequirements{ + Requests: v1.ResourceList{}, + Limits: v1.ResourceList{}, + } + if r.cpuReq != 0 { + res.Requests[v1.ResourceCPU] = *resource.NewMilliQuantity(r.cpuReq, resource.DecimalSI) + } + if r.cpuLim != 0 { + res.Limits[v1.ResourceCPU] = *resource.NewMilliQuantity(r.cpuLim, resource.DecimalSI) + } + if r.memReq != 0 { + res.Requests[v1.ResourceMemory] = *resource.NewQuantity(r.memReq, resource.DecimalSI) + } + if r.memLim != 0 { + res.Limits[v1.ResourceMemory] = *resource.NewQuantity(r.memLim, resource.DecimalSI) + } + return res + } + mkContainer := func(index int, c testContainer) v1.Container { + container := v1.Container{ + Name: fmt.Sprintf("c%d", index), + Resources: mkRequirements(c.allocated), + } + if c.sidecar { + container.RestartPolicy = ptr.To(v1.ContainerRestartPolicyAlways) + } + return container + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + tCtx := ktesting.Init(t) + _, _, m, err := createTestRuntimeManager(tCtx) + require.NoError(t, err) + + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-pod", + UID: "12345", + }, + } + podStatus := &kubecontainer.PodStatus{ + ID: pod.UID, + Name: pod.Name, + } + + for i, c := range test.containers { + // Add the container to the pod + container := mkContainer(i, c) + if c.nonSidecarInit || c.sidecar { + pod.Spec.InitContainers = append(pod.Spec.InitContainers, container) + } else { + pod.Spec.Containers = append(pod.Spec.Containers, container) + } + + // Add the container to the pod status, if it's started. + if !test.containers[i].unstarted { + cs := kubecontainer.Status{ + Name: container.Name, + } + if test.containers[i].isRunning { + cs.State = kubecontainer.ContainerStateRunning + } else { + cs.State = kubecontainer.ContainerStateExited + } + podStatus.ContainerStatuses = append(podStatus.ContainerStatuses, &cs) + } + + // Register the actuated container (if needed) + if c.actuated != nil { + actuatedContainer := container.DeepCopy() + actuatedContainer.Resources = mkRequirements(*c.actuated) + require.NoError(t, m.actuatedState.SetContainerResources(pod.UID, actuatedContainer.Name, actuatedContainer.Resources)) + + fetched, found := m.actuatedState.GetContainerResources(pod.UID, container.Name) + require.True(t, found) + assert.Equal(t, actuatedContainer.Resources, fetched) + } else { + _, found := m.actuatedState.GetContainerResources(pod.UID, container.Name) + require.False(t, found) + } + } + + resizeInProgress := m.IsPodResizeInProgress(pod, podStatus) + assert.Equal(t, test.expectHasResize, resizeInProgress) + }) + } +} diff --git a/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go b/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go index d4bd23398a41e..0b9293c780d88 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go @@ -116,7 +116,7 @@ func (m *kubeGenericRuntimeManager) generatePodSandboxConfig(ctx context.Context portMappings := []*runtimeapi.PortMapping{} for _, c := range pod.Spec.Containers { - containerPortMappings := kubecontainer.MakePortMappings(&c) + containerPortMappings := kubecontainer.MakePortMappings(logger, &c) for idx := range containerPortMappings { port := containerPortMappings[idx] diff --git a/pkg/kubelet/logs/container_log_manager.go b/pkg/kubelet/logs/container_log_manager.go index a3e5f46d9c6af..9e93fb195b72e 100644 --- a/pkg/kubelet/logs/container_log_manager.go +++ b/pkg/kubelet/logs/container_log_manager.go @@ -54,7 +54,7 @@ const ( // Implementation is thread-safe. type ContainerLogManager interface { // Start container log manager. - Start() + Start(ctx context.Context) // Clean removes all logs of specified container. Clean(ctx context.Context, containerID string) error } @@ -141,9 +141,9 @@ func NewContainerLogManager(runtimeService internalapi.RuntimeService, osInterfa } // Start the container log manager. -func (c *containerLogManager) Start() { - ctx := context.Background() - klog.InfoS("Initializing container log rotate workers", "workers", c.maxWorkers, "monitorPeriod", c.monitoringPeriod) +func (c *containerLogManager) Start(ctx context.Context) { + logger := klog.FromContext(ctx) + logger.Info("Initializing container log rotate workers", "workers", c.maxWorkers, "monitorPeriod", c.monitoringPeriod) for i := 0; i < c.maxWorkers; i++ { worker := i + 1 go c.processQueueItems(ctx, worker) @@ -151,7 +151,7 @@ func (c *containerLogManager) Start() { // Start a goroutine periodically does container log rotation. go wait.Forever(func() { if err := c.rotateLogs(ctx); err != nil { - klog.ErrorS(err, "Failed to rotate container logs") + logger.Error(err, "Failed to rotate container logs") } }, c.monitoringPeriod.Duration) } @@ -183,16 +183,19 @@ func (c *containerLogManager) Clean(ctx context.Context, containerID string) err } func (c *containerLogManager) processQueueItems(ctx context.Context, worker int) { - klog.V(4).InfoS("Starting container log rotation worker", "workerID", worker) + logger := klog.FromContext(ctx) + logger.V(4).Info("Starting container log rotation worker", "workerID", worker) for c.processContainer(ctx, worker) { } - klog.V(4).InfoS("Terminating container log rotation worker", "workerID", worker) + logger.V(4).Info("Terminating container log rotation worker", "workerID", worker) } func (c *containerLogManager) rotateLogs(ctx context.Context) error { + logger := klog.FromContext(ctx) c.mutex.Lock() defer c.mutex.Unlock() - klog.V(4).InfoS("Starting container log rotation sequence") + logger.V(4).Info("Starting container log rotation sequence") + // TODO(#59998): Use kubelet pod cache. containers, err := c.runtimeService.ListContainers(ctx, &runtimeapi.ContainerFilter{}) if err != nil { return fmt.Errorf("failed to list containers: %w", err) @@ -204,8 +207,8 @@ func (c *containerLogManager) rotateLogs(ctx context.Context) error { continue } // Doing this to avoid additional overhead with logging of label like arguments that can prove costly - if v := klog.V(4); v.Enabled() { - klog.V(4).InfoS("Adding new entry to the queue for processing", "id", container.GetId(), "name", container.Metadata.GetName(), "labels", container.GetLabels()) + if v := logger.V(4); v.Enabled() { + logger.V(4).Info("Adding new entry to the queue for processing", "id", container.GetId(), "name", container.Metadata.GetName(), "labels", container.GetLabels()) } c.queue.Add(container.GetId()) } @@ -224,14 +227,14 @@ func (c *containerLogManager) processContainer(ctx context.Context, worker int) // Always default the return to true to keep the processing of Queue ongoing ok = true id := key - + logger := klog.FromContext(ctx) resp, err := c.runtimeService.ContainerStatus(ctx, id, false) if err != nil { - klog.ErrorS(err, "Failed to get container status", "worker", worker, "containerID", id) + logger.Error(err, "Failed to get container status", "worker", worker, "containerID", id) return } if resp.GetStatus() == nil { - klog.ErrorS(err, "Container status is nil", "worker", worker, "containerID", id) + logger.Error(err, "Container status is nil", "worker", worker, "containerID", id) return } path := resp.GetStatus().GetLogPath() @@ -239,28 +242,28 @@ func (c *containerLogManager) processContainer(ctx context.Context, worker int) if err != nil { if !os.IsNotExist(err) { - klog.ErrorS(err, "Failed to stat container log", "worker", worker, "containerID", id, "path", path) + logger.Error(err, "Failed to stat container log", "worker", worker, "containerID", id, "path", path) return } if err = c.runtimeService.ReopenContainerLog(ctx, id); err != nil { - klog.ErrorS(err, "Container log doesn't exist, reopen container log failed", "worker", worker, "containerID", id, "path", path) + logger.Error(err, "Container log doesn't exist, reopen container log failed", "worker", worker, "containerID", id, "path", path) return } info, err = c.osInterface.Stat(path) if err != nil { - klog.ErrorS(err, "Failed to stat container log after reopen", "worker", worker, "containerID", id, "path", path) + logger.Error(err, "Failed to stat container log after reopen", "worker", worker, "containerID", id, "path", path) return } } if info.Size() < c.policy.MaxSize { - klog.V(7).InfoS("log file doesn't need to be rotated", "worker", worker, "containerID", id, "path", path, "currentSize", info.Size(), "maxSize", c.policy.MaxSize) + logger.V(7).Info("log file doesn't need to be rotated", "worker", worker, "containerID", id, "path", path, "currentSize", info.Size(), "maxSize", c.policy.MaxSize) return } if err := c.rotateLog(ctx, id, path); err != nil { - klog.ErrorS(err, "Failed to rotate log for container", "worker", worker, "containerID", id, "path", path, "currentSize", info.Size(), "maxSize", c.policy.MaxSize) + logger.Error(err, "Failed to rotate log for container", "worker", worker, "containerID", id, "path", path, "currentSize", info.Size(), "maxSize", c.policy.MaxSize) return } return @@ -411,6 +414,7 @@ func (c *containerLogManager) compressLog(log string) error { // rotateLatestLog rotates latest log without compression, so that container can still write // and fluentd can finish reading. func (c *containerLogManager) rotateLatestLog(ctx context.Context, id, log string) error { + logger := klog.FromContext(ctx) timestamp := c.clock.Now().Format(timestampFormat) rotated := fmt.Sprintf("%s.%s", log, timestamp) if err := c.osInterface.Rename(log, rotated); err != nil { @@ -424,7 +428,7 @@ func (c *containerLogManager) rotateLatestLog(ctx context.Context, id, log strin // This shouldn't happen. // Report an error if this happens, because we will lose original // log. - klog.ErrorS(renameErr, "Failed to rename rotated log", "rotatedLog", rotated, "newLog", log, "containerID", id) + logger.Error(renameErr, "Failed to rename rotated log", "rotatedLog", rotated, "newLog", log, "containerID", id) } return fmt.Errorf("failed to reopen container log %q: %w", id, err) } diff --git a/pkg/kubelet/logs/container_log_manager_stub.go b/pkg/kubelet/logs/container_log_manager_stub.go index f0a2ef9fdf26a..80d684224bc55 100644 --- a/pkg/kubelet/logs/container_log_manager_stub.go +++ b/pkg/kubelet/logs/container_log_manager_stub.go @@ -20,7 +20,7 @@ import "context" type containerLogManagerStub struct{} -func (*containerLogManagerStub) Start() {} +func (*containerLogManagerStub) Start(ctx context.Context) {} func (*containerLogManagerStub) Clean(ctx context.Context, containerID string) error { return nil diff --git a/pkg/kubelet/logs/container_log_manager_test.go b/pkg/kubelet/logs/container_log_manager_test.go index 3760d1c727f56..dbb69b828b0dd 100644 --- a/pkg/kubelet/logs/container_log_manager_test.go +++ b/pkg/kubelet/logs/container_log_manager_test.go @@ -31,6 +31,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/util/workqueue" "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/test/utils/ktesting" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" critest "k8s.io/cri-api/pkg/apis/testing" @@ -77,7 +78,7 @@ func TestGetAllLogs(t *testing.T) { } func TestRotateLogs(t *testing.T) { - ctx := context.Background() + tCtx := ktesting.Init(t) dir, err := os.MkdirTemp("", "test-rotate-logs") require.NoError(t, err) defer os.RemoveAll(dir) @@ -160,12 +161,12 @@ func TestRotateLogs(t *testing.T) { f.SetFakeContainers(testContainers) // Push the items into the queue for before starting the worker to avoid issue with the queue being empty. - require.NoError(t, c.rotateLogs(ctx)) + require.NoError(t, c.rotateLogs(tCtx)) // Start a routine that can monitor the queue and shutdown the queue to trigger the retrun from the processQueueItems // Keeping the monitor duration smaller in order to keep the unwanted delay in the test to a minimal. go func() { - pollTimeoutCtx, cancel := context.WithTimeout(ctx, 10*time.Second) + pollTimeoutCtx, cancel := context.WithTimeout(tCtx, 10*time.Second) defer cancel() err = wait.PollUntilContextCancel(pollTimeoutCtx, 5*time.Millisecond, false, func(ctx context.Context) (done bool, err error) { return c.queue.Len() == 0, nil @@ -176,7 +177,7 @@ func TestRotateLogs(t *testing.T) { c.queue.ShutDown() }() // This is a blocking call. But the above routine takes care of ensuring that this is terminated once the queue is shutdown - c.processQueueItems(ctx, 1) + c.processQueueItems(tCtx, 1) timestamp := now.Format(timestampFormat) logs, err := os.ReadDir(dir) @@ -190,7 +191,7 @@ func TestRotateLogs(t *testing.T) { } func TestClean(t *testing.T) { - ctx := context.Background() + tCtx := ktesting.Init(t) dir, err := os.MkdirTemp("", "test-clean") require.NoError(t, err) defer os.RemoveAll(dir) @@ -256,7 +257,7 @@ func TestClean(t *testing.T) { } f.SetFakeContainers(testContainers) - err = c.Clean(ctx, "container-3") + err = c.Clean(tCtx, "container-3") require.NoError(t, err) logs, err := os.ReadDir(dir) @@ -387,7 +388,7 @@ func TestCompressLog(t *testing.T) { } func TestRotateLatestLog(t *testing.T) { - ctx := context.Background() + tCtx := ktesting.Init(t) dir, err := os.MkdirTemp("", "test-rotate-latest-log") require.NoError(t, err) defer os.RemoveAll(dir) @@ -438,7 +439,7 @@ func TestRotateLatestLog(t *testing.T) { defer testFile.Close() testLog := testFile.Name() rotatedLog := fmt.Sprintf("%s.%s", testLog, now.Format(timestampFormat)) - err = c.rotateLatestLog(ctx, "test-id", testLog) + err = c.rotateLatestLog(tCtx, "test-id", testLog) assert.Equal(t, test.expectError, err != nil) _, err = os.Stat(testLog) assert.Equal(t, test.expectOriginal, err == nil) diff --git a/pkg/kubelet/metrics/collectors/cri_metrics.go b/pkg/kubelet/metrics/collectors/cri_metrics.go index 8736eb9e3197c..9ae50db409acc 100644 --- a/pkg/kubelet/metrics/collectors/cri_metrics.go +++ b/pkg/kubelet/metrics/collectors/cri_metrics.go @@ -41,7 +41,8 @@ var _ metrics.StableCollector = &criMetricsCollector{} func NewCRIMetricsCollector(ctx context.Context, listPodSandboxMetricsFn func(context.Context) ([]*runtimeapi.PodSandboxMetrics, error), listMetricDescriptorsFn func(context.Context) ([]*runtimeapi.MetricDescriptor, error)) metrics.StableCollector { descs, err := listMetricDescriptorsFn(ctx) if err != nil { - klog.ErrorS(err, "Error reading MetricDescriptors") + logger := klog.FromContext(ctx) + logger.Error(err, "Error reading MetricDescriptors") return &criMetricsCollector{ listPodSandboxMetricsFn: listPodSandboxMetricsFn, } @@ -68,22 +69,26 @@ func (c *criMetricsCollector) DescribeWithStability(ch chan<- *metrics.Desc) { // Collect implements the metrics.CollectWithStability interface. // TODO(haircommander): would it be better if these were processed async? func (c *criMetricsCollector) CollectWithStability(ch chan<- metrics.Metric) { - podMetrics, err := c.listPodSandboxMetricsFn(context.Background()) + // Use context.TODO() because we currently do not have a proper context to pass in. + // Replace this with an appropriate context when refactoring this function to accept a context parameter. + ctx := context.TODO() + logger := klog.FromContext(ctx) + podMetrics, err := c.listPodSandboxMetricsFn(ctx) if err != nil { - klog.ErrorS(err, "Failed to get pod metrics") + logger.Error(err, "Failed to get pod metrics") return } for _, podMetric := range podMetrics { for _, metric := range podMetric.GetMetrics() { - promMetric, err := c.criMetricToProm(metric) + promMetric, err := c.criMetricToProm(logger, metric) if err == nil { ch <- promMetric } } for _, ctrMetric := range podMetric.GetContainerMetrics() { for _, metric := range ctrMetric.GetMetrics() { - promMetric, err := c.criMetricToProm(metric) + promMetric, err := c.criMetricToProm(logger, metric) if err == nil { ch <- promMetric } @@ -98,11 +103,11 @@ func criDescToProm(m *runtimeapi.MetricDescriptor) *metrics.Desc { return metrics.NewDesc(m.Name, m.Help, m.LabelKeys, nil, metrics.INTERNAL, "") } -func (c *criMetricsCollector) criMetricToProm(m *runtimeapi.Metric) (metrics.Metric, error) { +func (c *criMetricsCollector) criMetricToProm(logger klog.Logger, m *runtimeapi.Metric) (metrics.Metric, error) { desc, ok := c.descriptors[m.Name] if !ok { err := fmt.Errorf("error converting CRI Metric to prometheus format") - klog.V(5).ErrorS(err, "Descriptor not present in pre-populated list of descriptors", "name", m.Name) + logger.V(5).Error(err, "Descriptor not present in pre-populated list of descriptors", "name", m.Name) return nil, err } @@ -110,7 +115,7 @@ func (c *criMetricsCollector) criMetricToProm(m *runtimeapi.Metric) (metrics.Met pm, err := metrics.NewConstMetric(desc, typ, float64(m.GetValue().Value), m.LabelValues...) if err != nil { - klog.ErrorS(err, "Error getting CRI prometheus metric", "descriptor", desc.String()) + logger.Error(err, "Error getting CRI prometheus metric", "descriptor", desc.String()) return nil, err } // If Timestamp is 0, then the runtime did not cache the result. diff --git a/pkg/kubelet/metrics/collectors/log_metrics.go b/pkg/kubelet/metrics/collectors/log_metrics.go index 4b2237fbbadd0..1443557a1f66f 100644 --- a/pkg/kubelet/metrics/collectors/log_metrics.go +++ b/pkg/kubelet/metrics/collectors/log_metrics.go @@ -63,9 +63,13 @@ func (c *logMetricsCollector) DescribeWithStability(ch chan<- *metrics.Desc) { // CollectWithStability implements the metrics.StableCollector interface. func (c *logMetricsCollector) CollectWithStability(ch chan<- metrics.Metric) { - podStats, err := c.podStats(context.Background()) + // Use context.TODO() because we currently do not have a proper context to pass in. + // Replace this with an appropriate context when refactoring this function to accept a context parameter. + ctx := context.TODO() + logger := klog.FromContext(ctx) + podStats, err := c.podStats(ctx) if err != nil { - klog.ErrorS(err, "Failed to get pod stats") + logger.Error(err, "Failed to get pod stats") return } diff --git a/pkg/kubelet/metrics/collectors/resource_metrics.go b/pkg/kubelet/metrics/collectors/resource_metrics.go index dff6a812a04f6..39a8c940f5fe8 100644 --- a/pkg/kubelet/metrics/collectors/resource_metrics.go +++ b/pkg/kubelet/metrics/collectors/resource_metrics.go @@ -157,7 +157,9 @@ func (rc *resourceMetricsCollector) DescribeWithStability(ch chan<- *metrics.Des // leak metric collectors for containers or pods that no longer exist. Instead, implement // custom collector in a way that only collects metrics for active containers. func (rc *resourceMetricsCollector) CollectWithStability(ch chan<- metrics.Metric) { - ctx := context.Background() + // Use context.TODO() because we currently do not have a proper context to pass in. + // Replace this with an appropriate context when refactoring this function to accept a context parameter. + ctx := context.TODO() var errorCount float64 defer func() { ch <- metrics.NewLazyConstMetric(resourceScrapeResultDesc, metrics.GaugeValue, errorCount) @@ -165,8 +167,9 @@ func (rc *resourceMetricsCollector) CollectWithStability(ch chan<- metrics.Metri }() statsSummary, err := rc.provider.GetCPUAndMemoryStats(ctx) if err != nil { + logger := klog.FromContext(ctx) errorCount = 1 - klog.ErrorS(err, "Error getting summary for resourceMetric prometheus endpoint") + logger.Error(err, "Error getting summary for resourceMetric prometheus endpoint") return } @@ -210,7 +213,7 @@ func (rc *resourceMetricsCollector) collectNodeSwapMetrics(ch chan<- metrics.Met return } - ch <- metrics.NewLazyMetricWithTimestamp(s.Memory.Time.Time, + ch <- metrics.NewLazyMetricWithTimestamp(s.Swap.Time.Time, metrics.NewLazyConstMetric(nodeSwapUsageDesc, metrics.GaugeValue, float64(*s.Swap.SwapUsageBytes))) } diff --git a/pkg/kubelet/metrics/collectors/resource_metrics_test.go b/pkg/kubelet/metrics/collectors/resource_metrics_test.go index 40953dd0abf1c..212b818b69a5f 100644 --- a/pkg/kubelet/metrics/collectors/resource_metrics_test.go +++ b/pkg/kubelet/metrics/collectors/resource_metrics_test.go @@ -33,7 +33,9 @@ import ( func TestCollectResourceMetrics(t *testing.T) { // a static timestamp: 2021-06-23 05:11:18.302091597 +0800 staticTimestamp := time.Unix(0, 1624396278302091597) + swapTimestamp := staticTimestamp.Add(10 * time.Second) testTime := metav1.NewTime(staticTimestamp) + swapTestTime := metav1.NewTime(swapTimestamp) interestedMetrics := []string{ "scrape_error", "resource_scrape_error", @@ -106,6 +108,43 @@ func TestCollectResourceMetrics(t *testing.T) { resource_scrape_error 0 `, }, + { + name: "node metrics with different timestamps", + summary: &statsapi.Summary{ + Node: statsapi.NodeStats{ + CPU: &statsapi.CPUStats{ + Time: testTime, + UsageCoreNanoSeconds: ptr.To[uint64](10000000000), + }, + Memory: &statsapi.MemoryStats{ + Time: testTime, + WorkingSetBytes: ptr.To[uint64](1000), + }, + Swap: &statsapi.SwapStats{ + Time: swapTestTime, + SwapUsageBytes: ptr.To[uint64](500), + }, + }, + }, + summaryErr: nil, + expectedMetrics: ` + # HELP node_cpu_usage_seconds_total [STABLE] Cumulative cpu time consumed by the node in core-seconds + # TYPE node_cpu_usage_seconds_total counter + node_cpu_usage_seconds_total 10 1624396278302 + # HELP node_memory_working_set_bytes [STABLE] Current working set of the node in bytes + # TYPE node_memory_working_set_bytes gauge + node_memory_working_set_bytes 1000 1624396278302 + # HELP node_swap_usage_bytes [ALPHA] Current swap usage of the node in bytes. Reported only on non-windows systems + # TYPE node_swap_usage_bytes gauge + node_swap_usage_bytes 500 1624396288302 + # HELP scrape_error [ALPHA] 1 if there was an error while getting container metrics, 0 otherwise + # TYPE scrape_error gauge + scrape_error 0 + # HELP resource_scrape_error [STABLE] 1 if there was an error while getting container metrics, 0 otherwise + # TYPE resource_scrape_error gauge + resource_scrape_error 0 + `, + }, { name: "nil node metrics", summary: &statsapi.Summary{ @@ -410,7 +449,7 @@ func TestCollectResourceMetrics(t *testing.T) { for _, test := range tests { tc := test t.Run(tc.name, func(t *testing.T) { - ctx := context.Background() + ctx := context.TODO() provider := summaryprovidertest.NewMockSummaryProvider(t) provider.EXPECT().GetCPUAndMemoryStats(ctx).Return(tc.summary, tc.summaryErr).Maybe() collector := NewResourceMetricsCollector(provider) diff --git a/pkg/kubelet/metrics/collectors/volume_stats.go b/pkg/kubelet/metrics/collectors/volume_stats.go index b565bf1d376f5..6b8aaac51ec7f 100644 --- a/pkg/kubelet/metrics/collectors/volume_stats.go +++ b/pkg/kubelet/metrics/collectors/volume_stats.go @@ -98,7 +98,9 @@ func (collector *volumeStatsCollector) DescribeWithStability(ch chan<- *metrics. // CollectWithStability implements the metrics.StableCollector interface. func (collector *volumeStatsCollector) CollectWithStability(ch chan<- metrics.Metric) { - ctx := context.Background() + // Use context.TODO() because we currently do not have a proper context to pass in. + // Replace this with an appropriate context when refactoring this function to accept a context parameter. + ctx := context.TODO() podStats, err := collector.statsProvider.ListPodStats(ctx) if err != nil { return @@ -107,7 +109,7 @@ func (collector *volumeStatsCollector) CollectWithStability(ch chan<- metrics.Me lv = append([]string{pvcRef.Namespace, pvcRef.Name}, lv...) ch <- metrics.NewLazyConstMetric(desc, metrics.GaugeValue, v, lv...) } - allPVCs := sets.Set[string]{} + allPVCs := sets.Set[stats.PVCReference]{} for _, podStat := range podStats { if podStat.VolumeStats == nil { continue @@ -118,8 +120,7 @@ func (collector *volumeStatsCollector) CollectWithStability(ch chan<- metrics.Me // ignore if no PVC reference continue } - pvcUniqStr := pvcRef.Namespace + "/" + pvcRef.Name - if allPVCs.Has(pvcUniqStr) { + if allPVCs.Has(*pvcRef) { // ignore if already collected continue } @@ -132,7 +133,7 @@ func (collector *volumeStatsCollector) CollectWithStability(ch chan<- metrics.Me if volumeStat.VolumeHealthStats != nil { addGauge(volumeStatsHealthAbnormalDesc, pvcRef, convertBoolToFloat64(volumeStat.VolumeHealthStats.Abnormal)) } - allPVCs.Insert(pvcUniqStr) + allPVCs.Insert(*pvcRef) } } } diff --git a/pkg/kubelet/metrics/collectors/volume_stats_test.go b/pkg/kubelet/metrics/collectors/volume_stats_test.go index 73bc1541610e9..f0caf19672ada 100644 --- a/pkg/kubelet/metrics/collectors/volume_stats_test.go +++ b/pkg/kubelet/metrics/collectors/volume_stats_test.go @@ -29,7 +29,7 @@ import ( ) func TestVolumeStatsCollector(t *testing.T) { - ctx := context.Background() + ctx := context.TODO() // Fixed metadata on type and help text. We prepend this to every expected // output so we only have to modify a single place when doing adjustments. const metadata = ` @@ -148,7 +148,7 @@ func TestVolumeStatsCollector(t *testing.T) { } func TestVolumeStatsCollectorWithNullVolumeStatus(t *testing.T) { - ctx := context.Background() + ctx := context.TODO() // Fixed metadata on type and help text. We prepend this to every expected // output so we only have to modify a single place when doing adjustments. const metadata = ` diff --git a/pkg/kubelet/metrics/metrics.go b/pkg/kubelet/metrics/metrics.go index 03731586dc3f6..fb76a45fb1faa 100644 --- a/pkg/kubelet/metrics/metrics.go +++ b/pkg/kubelet/metrics/metrics.go @@ -136,7 +136,7 @@ const ( // Metric for tracking garbage collected images ImageGarbageCollectedTotalKey = "image_garbage_collected_total" - // Metric for tracking aligment of compute resources + // Metric for tracking alignment of compute resources ContainerAlignedComputeResourcesNameKey = "container_aligned_compute_resources_count" ContainerAlignedComputeResourcesFailureNameKey = "container_aligned_compute_resources_failure_count" ContainerAlignedComputeResourcesScopeLabelKey = "scope" @@ -924,7 +924,7 @@ var ( }, ) - // TopologyManagerAdmissionDuration is a Histogram that tracks the duration (in seconds) to serve a pod admission request. + // TopologyManagerAdmissionDuration is a Histogram that tracks the duration (in milliseconds) to serve a pod admission request. TopologyManagerAdmissionDuration = metrics.NewHistogram( &metrics.HistogramOpts{ Subsystem: KubeletSubsystem, @@ -944,7 +944,7 @@ var ( StabilityLevel: metrics.ALPHA, }, ) - // OrphanPodCleanedVolumes is number of times that removeOrphanedPodVolumeDirs failed. + // OrphanPodCleanedVolumesErrors is the number of times that removeOrphanedPodVolumeDirs failed. OrphanPodCleanedVolumesErrors = metrics.NewGauge( &metrics.GaugeOpts{ Subsystem: KubeletSubsystem, @@ -1075,7 +1075,8 @@ var ( []string{"driver_name", "method_name", "grpc_status_code"}, ) - DRAResourceClaimsInUseDesc = metrics.NewDesc(DRASubsystem+"_resource_claims_in_use", + DRAResourceClaimsInUseDesc = metrics.NewDesc( + metrics.BuildFQName("", DRASubsystem, "resource_claims_in_use"), "The number of ResourceClaims that are currently in use on the node, by driver name (driver_name label value) and across all drivers (special value for driver_name). Note that the sum of all by-driver counts is not the total number of in-use ResourceClaims because the same ResourceClaim might use devices from different drivers. Instead, use the count for the driver_name.", []string{"driver_name"}, nil, @@ -1094,7 +1095,7 @@ var ( []string{"reason"}, ) - // ImageVolumeRequestedTotal trakcs the number of requested image volumes. + // ImageVolumeRequestedTotal tracks the number of requested image volumes. ImageVolumeRequestedTotal = metrics.NewCounter( &metrics.CounterOpts{ Subsystem: KubeletSubsystem, @@ -1194,7 +1195,7 @@ var ( var registerMetrics sync.Once // Register registers all metrics. -func Register(collectors ...metrics.StableCollector) { +func Register() { // Register the metrics. registerMetrics.Do(func() { legacyregistry.MustRegister(FirstNetworkPodStartSLIDuration) @@ -1274,10 +1275,6 @@ func Register(collectors ...metrics.StableCollector) { legacyregistry.MustRegister(OrphanPodCleanedVolumes) legacyregistry.MustRegister(OrphanPodCleanedVolumesErrors) - for _, collector := range collectors { - legacyregistry.CustomMustRegister(collector) - } - if utilfeature.DefaultFeatureGate.Enabled(features.GracefulNodeShutdown) && utilfeature.DefaultFeatureGate.Enabled(features.GracefulNodeShutdownBasedOnPodPriority) { legacyregistry.MustRegister(GracefulShutdownStartTime) @@ -1314,6 +1311,10 @@ func Register(collectors ...metrics.StableCollector) { }) } +func RegisterCollectors(collectors ...metrics.StableCollector) { + legacyregistry.CustomMustRegister(collectors...) +} + // GetGather returns the gatherer. It used by test case outside current package. func GetGather() metrics.Gatherer { return legacyregistry.DefaultGatherer diff --git a/pkg/kubelet/nodeshutdown/nodeshutdown_manager_linux.go b/pkg/kubelet/nodeshutdown/nodeshutdown_manager_linux.go index 5b1f2f5aa0530..8a78f874cb94b 100644 --- a/pkg/kubelet/nodeshutdown/nodeshutdown_manager_linux.go +++ b/pkg/kubelet/nodeshutdown/nodeshutdown_manager_linux.go @@ -27,6 +27,7 @@ import ( "time" v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/wait" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/tools/record" "k8s.io/klog/v2" @@ -191,15 +192,38 @@ func (m *managerImpl) start() (chan struct{}, error) { return nil, err } - // Read the current inhibitDelay again, if the override was successful, currentInhibitDelay will be equal to shutdownGracePeriodRequested. - updatedInhibitDelay, err := m.dbusCon.CurrentInhibitDelay() + // The ReloadLogindConf call is asynchronous. Poll with exponential backoff until the configuration is updated. + backoff := wait.Backoff{ + Duration: 100 * time.Millisecond, + Factor: 2.0, + Steps: 5, + } + var updatedInhibitDelay time.Duration + attempt := 0 + err = wait.ExponentialBackoff(backoff, func() (bool, error) { + attempt += 1 + // Read the current inhibitDelay again, if the override was successful, currentInhibitDelay will be equal to shutdownGracePeriodRequested. + updatedInhibitDelay, err = m.dbusCon.CurrentInhibitDelay() + if err != nil { + return false, err + } + if periodRequested <= updatedInhibitDelay { + return true, nil + } + if attempt < backoff.Steps { + m.logger.V(3).Info("InhibitDelayMaxSec still less than requested, retrying", "attempt", attempt, "current", updatedInhibitDelay, "requested", periodRequested) + } + return false, nil + }) if err != nil { - return nil, err + if !wait.Interrupted(err) { + return nil, err + } + if periodRequested > updatedInhibitDelay { + return nil, fmt.Errorf("node shutdown manager was timed out after %d attempts waiting for logind InhibitDelayMaxSec to update to %v (ShutdownGracePeriod), current value is %v", attempt, periodRequested, updatedInhibitDelay) + } } - if periodRequested > updatedInhibitDelay { - return nil, fmt.Errorf("node shutdown manager was unable to update logind InhibitDelayMaxSec to %v (ShutdownGracePeriod), current value of InhibitDelayMaxSec (%v) is less than requested ShutdownGracePeriod", periodRequested, updatedInhibitDelay) - } } err = m.acquireInhibitLock() diff --git a/pkg/kubelet/nodeshutdown/nodeshutdown_manager_linux_test.go b/pkg/kubelet/nodeshutdown/nodeshutdown_manager_linux_test.go index 85ef3aeb9f454..9662d7f4c27c8 100644 --- a/pkg/kubelet/nodeshutdown/nodeshutdown_manager_linux_test.go +++ b/pkg/kubelet/nodeshutdown/nodeshutdown_manager_linux_test.go @@ -278,7 +278,7 @@ func TestManager(t *testing.T) { overrideSystemInhibitDelay: time.Duration(5 * time.Second), expectedDidOverrideInhibitDelay: true, expectedPodToGracePeriodOverride: map[string]int64{"normal-pod-nil-grace-period": 5, "critical-pod-nil-grace-period": 0}, - expectedError: fmt.Errorf("unable to update logind InhibitDelayMaxSec to 30s (ShutdownGracePeriod), current value of InhibitDelayMaxSec (5s) is less than requested ShutdownGracePeriod"), + expectedError: fmt.Errorf("node shutdown manager was timed out after 5 attempts waiting for logind InhibitDelayMaxSec to update to 30s (ShutdownGracePeriod), current value is 5s"), }, { desc: "override unsuccessful, zero time", @@ -287,7 +287,7 @@ func TestManager(t *testing.T) { shutdownGracePeriodCriticalPods: time.Duration(5 * time.Second), systemInhibitDelay: time.Duration(0 * time.Second), overrideSystemInhibitDelay: time.Duration(0 * time.Second), - expectedError: fmt.Errorf("unable to update logind InhibitDelayMaxSec to 5s (ShutdownGracePeriod), current value of InhibitDelayMaxSec (0s) is less than requested ShutdownGracePeriod"), + expectedError: fmt.Errorf("node shutdown manager was timed out after 5 attempts waiting for logind InhibitDelayMaxSec to update to 5s (ShutdownGracePeriod), current value is 0s"), }, { desc: "no override, all time to critical pods", @@ -335,7 +335,7 @@ func TestManager(t *testing.T) { featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.GracefulNodeShutdown, true) fakeRecorder := &record.FakeRecorder{} - fakeVolumeManager := volumemanager.NewFakeVolumeManager([]v1.UniqueVolumeName{}, 0, nil) + fakeVolumeManager := volumemanager.NewFakeVolumeManager([]v1.UniqueVolumeName{}, 0, nil, false) nodeRef := &v1.ObjectReference{Kind: "Node", Name: "test", UID: types.UID("test"), Namespace: ""} manager := NewManager(&Config{ Logger: logger, @@ -439,7 +439,7 @@ func TestFeatureEnabled(t *testing.T) { featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.GracefulNodeShutdown, tc.featureGateEnabled) fakeRecorder := &record.FakeRecorder{} - fakeVolumeManager := volumemanager.NewFakeVolumeManager([]v1.UniqueVolumeName{}, 0, nil) + fakeVolumeManager := volumemanager.NewFakeVolumeManager([]v1.UniqueVolumeName{}, 0, nil, false) nodeRef := &v1.ObjectReference{Kind: "Node", Name: "test", UID: types.UID("test"), Namespace: ""} manager := NewManager(&Config{ @@ -496,7 +496,7 @@ func TestRestart(t *testing.T) { } fakeRecorder := &record.FakeRecorder{} - fakeVolumeManager := volumemanager.NewFakeVolumeManager([]v1.UniqueVolumeName{}, 0, nil) + fakeVolumeManager := volumemanager.NewFakeVolumeManager([]v1.UniqueVolumeName{}, 0, nil, false) nodeRef := &v1.ObjectReference{Kind: "Node", Name: "test", UID: types.UID("test"), Namespace: ""} manager := NewManager(&Config{ Logger: logger, @@ -534,7 +534,7 @@ func TestRestart(t *testing.T) { func Test_managerImpl_processShutdownEvent(t *testing.T) { var ( fakeRecorder = &record.FakeRecorder{} - fakeVolumeManager = volumemanager.NewFakeVolumeManager([]v1.UniqueVolumeName{}, 0, nil) + fakeVolumeManager = volumemanager.NewFakeVolumeManager([]v1.UniqueVolumeName{}, 0, nil, false) syncNodeStatus = func() {} nodeRef = &v1.ObjectReference{Kind: "Node", Name: "test", UID: types.UID("test"), Namespace: ""} fakeclock = testingclock.NewFakeClock(time.Now()) @@ -651,7 +651,7 @@ func Test_processShutdownEvent_VolumeUnmountTimeout(t *testing.T) { []v1.UniqueVolumeName{}, 3*time.Second, // This value is intentionally longer than the shutdownGracePeriodSeconds (2s) to test the behavior // for volume unmount operations that take longer than the allowed grace period. - fmt.Errorf("unmount timeout"), + fmt.Errorf("unmount timeout"), false, ) logger := ktesting.NewLogger(t, ktesting.NewConfig(ktesting.BufferLogs(true))) m := &managerImpl{ diff --git a/pkg/kubelet/nodeshutdown/nodeshutdown_manager_windows_test.go b/pkg/kubelet/nodeshutdown/nodeshutdown_manager_windows_test.go index 02946a04c70fc..f0598a7025e4e 100644 --- a/pkg/kubelet/nodeshutdown/nodeshutdown_manager_windows_test.go +++ b/pkg/kubelet/nodeshutdown/nodeshutdown_manager_windows_test.go @@ -81,7 +81,7 @@ func TestFeatureEnabled(t *testing.T) { featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.WindowsGracefulNodeShutdown, tc.featureGateEnabled) fakeRecorder := &record.FakeRecorder{} - fakeVolumeManager := volumemanager.NewFakeVolumeManager([]v1.UniqueVolumeName{}, 0, nil) + fakeVolumeManager := volumemanager.NewFakeVolumeManager([]v1.UniqueVolumeName{}, 0, nil, false) nodeRef := &v1.ObjectReference{Kind: "Node", Name: "test", UID: types.UID("test"), Namespace: ""} manager := NewManager(&Config{ @@ -104,7 +104,7 @@ func TestFeatureEnabled(t *testing.T) { func Test_managerImpl_ProcessShutdownEvent(t *testing.T) { var ( fakeRecorder = &record.FakeRecorder{} - fakeVolumeManager = volumemanager.NewFakeVolumeManager([]v1.UniqueVolumeName{}, 0, nil) + fakeVolumeManager = volumemanager.NewFakeVolumeManager([]v1.UniqueVolumeName{}, 0, nil, false) syncNodeStatus = func() {} nodeRef = &v1.ObjectReference{Kind: "Node", Name: "test", UID: types.UID("test"), Namespace: ""} fakeclock = testingclock.NewFakeClock(time.Now()) @@ -201,7 +201,7 @@ func Test_managerImpl_ProcessShutdownEvent(t *testing.T) { []v1.UniqueVolumeName{}, 3*time.Second, // This value is intentionally longer than the shutdownGracePeriodSeconds (2s) to test the behavior // for volume unmount operations that take longer than the allowed grace period. - fmt.Errorf("unmount timeout"), + fmt.Errorf("unmount timeout"), false, ), shutdownGracePeriodByPodPriority: []kubeletconfig.ShutdownGracePeriodByPodPriority{ { diff --git a/pkg/kubelet/nodestatus/setters.go b/pkg/kubelet/nodestatus/setters.go index 24728267a302d..4a22a830febf7 100644 --- a/pkg/kubelet/nodestatus/setters.go +++ b/pkg/kubelet/nodestatus/setters.go @@ -81,17 +81,18 @@ func NodeAddress(nodeIPs []net.IP, // typically Kubelet.nodeIPs secondaryNodeIPSpecified := secondaryNodeIP != nil && !secondaryNodeIP.IsUnspecified() return func(ctx context.Context, node *v1.Node) error { + logger := klog.FromContext(ctx) if nodeIPSpecified { if err := validateNodeIPFunc(nodeIP); err != nil { return fmt.Errorf("failed to validate nodeIP: %v", err) } - klog.V(4).InfoS("Using node IP", "IP", nodeIP.String()) + logger.V(4).Info("Using node IP", "IP", nodeIP.String()) } if secondaryNodeIPSpecified { if err := validateNodeIPFunc(secondaryNodeIP); err != nil { return fmt.Errorf("failed to validate secondaryNodeIP: %v", err) } - klog.V(4).InfoS("Using secondary node IP", "IP", secondaryNodeIP.String()) + logger.V(4).Info("Using secondary node IP", "IP", secondaryNodeIP.String()) } if externalCloudProvider && nodeIPSpecified { @@ -202,6 +203,7 @@ func MachineInfo(nodeName string, localStorageCapacityIsolation bool, ) Setter { return func(ctx context.Context, node *v1.Node) error { + logger := klog.FromContext(ctx) // Note: avoid blindly overwriting the capacity in case opaque // resources are being advertised. if node.Status.Capacity == nil { @@ -221,7 +223,7 @@ func MachineInfo(nodeName string, node.Status.Capacity[v1.ResourceCPU] = *resource.NewMilliQuantity(0, resource.DecimalSI) node.Status.Capacity[v1.ResourceMemory] = resource.MustParse("0Gi") node.Status.Capacity[v1.ResourcePods] = *resource.NewQuantity(int64(maxPods), resource.DecimalSI) - klog.ErrorS(err, "Error getting machine info") + logger.Error(err, "Error getting machine info") } else { node.Status.NodeInfo.MachineID = info.MachineID node.Status.NodeInfo.SystemUUID = info.SystemUUID @@ -263,13 +265,13 @@ func MachineInfo(nodeName string, devicePluginCapacity, devicePluginAllocatable, removedDevicePlugins = devicePluginResourceCapacityFunc() for k, v := range devicePluginCapacity { if old, ok := node.Status.Capacity[k]; !ok || old.Value() != v.Value() { - klog.V(2).InfoS("Updated capacity for device plugin", "plugin", k, "capacity", v.Value()) + logger.V(2).Info("Updated capacity for device plugin", "plugin", k, "capacity", v.Value()) } node.Status.Capacity[k] = v } for _, removedResource := range removedDevicePlugins { - klog.V(2).InfoS("Set capacity for removed resource to 0 on device removal", "device", removedResource) + logger.V(2).Info("Set capacity for removed resource to 0 on device removal", "device", removedResource) // Set the capacity of the removed resource to 0 instead of // removing the resource from the node status. This is to indicate // that the resource is managed by device plugin and had been @@ -315,7 +317,7 @@ func MachineInfo(nodeName string, for k, v := range devicePluginAllocatable { if old, ok := node.Status.Allocatable[k]; !ok || old.Value() != v.Value() { - klog.V(2).InfoS("Updated allocatable", "device", k, "allocatable", v.Value()) + logger.V(2).Info("Updated allocatable", "device", k, "allocatable", v.Value()) } node.Status.Allocatable[k] = v } @@ -540,7 +542,8 @@ func ReadyCondition( recordEventFunc(v1.EventTypeNormal, events.NodeReady) } else { recordEventFunc(v1.EventTypeNormal, events.NodeNotReady) - klog.InfoS("Node became not ready", "node", klog.KObj(node), "condition", newNodeReadyCondition) + logger := klog.FromContext(ctx) + logger.Info("Node became not ready", "node", klog.KObj(node), "condition", newNodeReadyCondition) } } return nil diff --git a/pkg/kubelet/nodestatus/setters_test.go b/pkg/kubelet/nodestatus/setters_test.go index 6e5971ed9afa6..c7f441a9dc3f5 100644 --- a/pkg/kubelet/nodestatus/setters_test.go +++ b/pkg/kubelet/nodestatus/setters_test.go @@ -47,6 +47,7 @@ import ( kubecontainertest "k8s.io/kubernetes/pkg/kubelet/container/testing" "k8s.io/kubernetes/pkg/kubelet/events" "k8s.io/kubernetes/pkg/kubelet/util/sliceutils" + "k8s.io/kubernetes/test/utils/ktesting" netutils "k8s.io/utils/net" "k8s.io/utils/ptr" ) @@ -279,7 +280,7 @@ func TestNodeAddress(t *testing.T) { } for _, testCase := range cases { t.Run(testCase.name, func(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) // testCase setup existingNode := &v1.Node{ ObjectMeta: metav1.ObjectMeta{ @@ -385,7 +386,7 @@ func TestNodeAddress_NoCloudProvider(t *testing.T) { } for _, testCase := range cases { t.Run(testCase.name, func(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) // testCase setup existingNode := &v1.Node{ ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname, Annotations: make(map[string]string)}, @@ -914,7 +915,7 @@ func TestMachineInfo(t *testing.T) { } t.Run(tc.desc, func(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) machineInfoFunc := func() (*cadvisorapiv1.MachineInfo, error) { return tc.machineInfo, tc.machineInfoError } @@ -1081,7 +1082,7 @@ func TestVersionInfo(t *testing.T) { t.Run(tc.desc, func(t *testing.T) { featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DisableNodeKubeProxyVersion, !tc.kubeProxyVersion) - ctx := context.Background() + ctx := ktesting.Init(t) versionInfoFunc := func() (*cadvisorapiv1.VersionInfo, error) { return tc.versionInfo, tc.versionInfoError } @@ -1158,7 +1159,7 @@ func TestImages(t *testing.T) { for _, tc := range cases { t.Run(tc.desc, func(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) imageListFunc := func() ([]kubecontainer.Image, error) { // today, imageListFunc is expected to return a sorted list, // but we may choose to sort in the setter at some future point @@ -1324,7 +1325,7 @@ func TestReadyCondition(t *testing.T) { } for _, tc := range cases { t.Run(tc.desc, func(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) runtimeErrorsFunc := func() error { return tc.runtimeErrors } @@ -1458,7 +1459,7 @@ func TestMemoryPressureCondition(t *testing.T) { } for _, tc := range cases { t.Run(tc.desc, func(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) events := []testEvent{} recordEventFunc := func(eventType, event string) { events = append(events, testEvent{ @@ -1580,7 +1581,7 @@ func TestPIDPressureCondition(t *testing.T) { } for _, tc := range cases { t.Run(tc.desc, func(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) events := []testEvent{} recordEventFunc := func(eventType, event string) { events = append(events, testEvent{ @@ -1702,7 +1703,7 @@ func TestDiskPressureCondition(t *testing.T) { } for _, tc := range cases { t.Run(tc.desc, func(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) events := []testEvent{} recordEventFunc := func(eventType, event string) { events = append(events, testEvent{ @@ -1763,7 +1764,7 @@ func TestVolumesInUse(t *testing.T) { for _, tc := range cases { t.Run(tc.desc, func(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) syncedFunc := func() bool { return tc.synced } @@ -1801,7 +1802,7 @@ func TestDaemonEndpoints(t *testing.T) { }, } { t.Run(test.name, func(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) existingNode := &v1.Node{ ObjectMeta: metav1.ObjectMeta{ Name: testKubeletHostname, diff --git a/pkg/kubelet/pluginmanager/cache/actual_state_of_world.go b/pkg/kubelet/pluginmanager/cache/actual_state_of_world.go index cdaa42c0a3a73..c68c748bdc996 100644 --- a/pkg/kubelet/pluginmanager/cache/actual_state_of_world.go +++ b/pkg/kubelet/pluginmanager/cache/actual_state_of_world.go @@ -21,6 +21,7 @@ keep track of registered plugins. package cache import ( + "context" "fmt" "sync" "time" @@ -47,7 +48,7 @@ type ActualStateOfWorld interface { // because the plugin should have been unregistered in the reconciler and therefore // removed from the actual state of world cache first before adding it back into // the actual state of world cache again with the new timestamp - AddPlugin(pluginInfo PluginInfo) error + AddPlugin(ctx context.Context, pluginInfo PluginInfo) error // RemovePlugin deletes the plugin with the given socket path from the actual // state of world. @@ -92,15 +93,17 @@ type PluginInfo struct { Endpoint string } -func (asw *actualStateOfWorld) AddPlugin(pluginInfo PluginInfo) error { +func (asw *actualStateOfWorld) AddPlugin(ctx context.Context, pluginInfo PluginInfo) error { asw.Lock() defer asw.Unlock() + logger := klog.FromContext(ctx) + if pluginInfo.SocketPath == "" { return fmt.Errorf("socket path is empty") } if _, ok := asw.socketFileToInfo[pluginInfo.SocketPath]; ok { - klog.V(2).InfoS("Plugin exists in actual state cache", "path", pluginInfo.SocketPath) + logger.V(2).Info("Plugin exists in actual state cache", "path", pluginInfo.SocketPath) } asw.socketFileToInfo[pluginInfo.SocketPath] = pluginInfo return nil diff --git a/pkg/kubelet/pluginmanager/cache/actual_state_of_world_test.go b/pkg/kubelet/pluginmanager/cache/actual_state_of_world_test.go index fcc463c4a74b8..b72e1041a3c64 100644 --- a/pkg/kubelet/pluginmanager/cache/actual_state_of_world_test.go +++ b/pkg/kubelet/pluginmanager/cache/actual_state_of_world_test.go @@ -23,6 +23,7 @@ import ( "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/util/uuid" + "k8s.io/kubernetes/test/utils/ktesting" ) // Calls AddPlugin() to add a plugin @@ -30,6 +31,7 @@ import ( // Verifies PluginExistsWithCorrectUUID returns true for the plugin // Verifies PluginExistsWithCorrectTimestamp returns true for the plugin (excluded on Windows) func Test_ASW_AddPlugin_Positive_NewPlugin(t *testing.T) { + tCtx := ktesting.Init(t) pluginInfo := PluginInfo{ SocketPath: "/var/lib/kubelet/device-plugins/test-plugin.sock", Timestamp: time.Now(), @@ -38,7 +40,7 @@ func Test_ASW_AddPlugin_Positive_NewPlugin(t *testing.T) { Name: "test", } asw := NewActualStateOfWorld() - err := asw.AddPlugin(pluginInfo) + err := asw.AddPlugin(tCtx, pluginInfo) // Assert if err != nil { t.Fatalf("AddPlugin failed. Expected: Actual: <%v>", err) @@ -71,6 +73,7 @@ func Test_ASW_AddPlugin_Positive_NewPlugin(t *testing.T) { // Verifies PluginExistsWithCorrectUUID returns false // Verifies PluginExistsWithCorrectTimestamp returns false (excluded on Windows) func Test_ASW_AddPlugin_Negative_EmptySocketPath(t *testing.T) { + tCtx := ktesting.Init(t) asw := NewActualStateOfWorld() pluginInfo := PluginInfo{ SocketPath: "", @@ -79,7 +82,7 @@ func Test_ASW_AddPlugin_Negative_EmptySocketPath(t *testing.T) { Handler: nil, Name: "test", } - err := asw.AddPlugin(pluginInfo) + err := asw.AddPlugin(tCtx, pluginInfo) require.EqualError(t, err, "socket path is empty") // Get registered plugins and check the newly added plugin is there @@ -106,6 +109,7 @@ func Test_ASW_AddPlugin_Negative_EmptySocketPath(t *testing.T) { // Verifies PluginExistsWithCorrectUUID returns false // Verifies PluginExistsWithCorrectTimestamp returns false (excluded on Windows) func Test_ASW_RemovePlugin_Positive(t *testing.T) { + tCtx := ktesting.Init(t) // First, add a plugin asw := NewActualStateOfWorld() pluginInfo := PluginInfo{ @@ -115,7 +119,7 @@ func Test_ASW_RemovePlugin_Positive(t *testing.T) { Handler: nil, Name: "test", } - err := asw.AddPlugin(pluginInfo) + err := asw.AddPlugin(tCtx, pluginInfo) // Assert if err != nil { t.Fatalf("AddPlugin failed. Expected: Actual: <%v>", err) @@ -146,6 +150,7 @@ func Test_ASW_RemovePlugin_Positive(t *testing.T) { // Verifies PluginExistsWithCorrectUUID returns false for an existing // plugin with the wrong UUID func Test_ASW_PluginExistsWithCorrectUUID_Negative_WrongUUID(t *testing.T) { + tCtx := ktesting.Init(t) // First, add a plugin asw := NewActualStateOfWorld() pluginInfo := PluginInfo{ @@ -155,7 +160,7 @@ func Test_ASW_PluginExistsWithCorrectUUID_Negative_WrongUUID(t *testing.T) { Handler: nil, Name: "test", } - err := asw.AddPlugin(pluginInfo) + err := asw.AddPlugin(tCtx, pluginInfo) // Assert if err != nil { t.Fatalf("AddPlugin failed. Expected: Actual: <%v>", err) diff --git a/pkg/kubelet/pluginmanager/cache/desired_state_of_world.go b/pkg/kubelet/pluginmanager/cache/desired_state_of_world.go index 90e38ddd736f9..6316724a55eb5 100644 --- a/pkg/kubelet/pluginmanager/cache/desired_state_of_world.go +++ b/pkg/kubelet/pluginmanager/cache/desired_state_of_world.go @@ -21,6 +21,7 @@ keep track of registered plugins. package cache import ( + "context" "errors" "fmt" "sync" @@ -38,7 +39,7 @@ type DesiredStateOfWorld interface { // AddOrUpdatePlugin add the given plugin in the cache if it doesn't already exist. // If it does exist in the cache, then the timestamp of the PluginInfo object in the cache will be updated. // An error will be returned if socketPath is empty. - AddOrUpdatePlugin(socketPath string) error + AddOrUpdatePlugin(ctx context.Context, socketPath string) error // RemovePlugin deletes the plugin with the given socket path from the desired // state of world. @@ -122,15 +123,17 @@ func errSuffix(err error) string { return errStr } -func (dsw *desiredStateOfWorld) AddOrUpdatePlugin(socketPath string) error { +func (dsw *desiredStateOfWorld) AddOrUpdatePlugin(ctx context.Context, socketPath string) error { dsw.Lock() defer dsw.Unlock() + logger := klog.FromContext(ctx) + if socketPath == "" { return fmt.Errorf("socket path is empty") } if _, ok := dsw.socketFileToInfo[socketPath]; ok { - klog.V(2).InfoS("Plugin exists in desired state cache, timestamp will be updated", "path", socketPath) + logger.V(2).Info("Plugin exists in desired state cache, timestamp will be updated", "path", socketPath) } // Update the PluginInfo object. diff --git a/pkg/kubelet/pluginmanager/cache/desired_state_of_world_test.go b/pkg/kubelet/pluginmanager/cache/desired_state_of_world_test.go index 5b4f227c12e10..f6a302ae6dd2a 100644 --- a/pkg/kubelet/pluginmanager/cache/desired_state_of_world_test.go +++ b/pkg/kubelet/pluginmanager/cache/desired_state_of_world_test.go @@ -20,15 +20,17 @@ import ( "testing" "github.com/stretchr/testify/require" + "k8s.io/kubernetes/test/utils/ktesting" ) // Calls AddOrUpdatePlugin() to add a plugin // Verifies newly added plugin exists in GetPluginsToRegister() // Verifies newly added plugin returns true for PluginExists() func Test_DSW_AddOrUpdatePlugin_Positive_NewPlugin(t *testing.T) { + tCtx := ktesting.Init(t) dsw := NewDesiredStateOfWorld() socketPath := "/var/lib/kubelet/device-plugins/test-plugin.sock" - err := dsw.AddOrUpdatePlugin(socketPath) + err := dsw.AddOrUpdatePlugin(tCtx, socketPath) // Assert if err != nil { t.Fatalf("AddOrUpdatePlugin failed. Expected: Actual: <%v>", err) @@ -53,10 +55,11 @@ func Test_DSW_AddOrUpdatePlugin_Positive_NewPlugin(t *testing.T) { // Verifies the timestamp the existing plugin is updated // Verifies newly added plugin returns true for PluginExists() func Test_DSW_AddOrUpdatePlugin_Positive_ExistingPlugin(t *testing.T) { + tCtx := ktesting.Init(t) dsw := NewDesiredStateOfWorld() socketPath := "/var/lib/kubelet/device-plugins/test-plugin.sock" // Adding the plugin for the first time - err := dsw.AddOrUpdatePlugin(socketPath) + err := dsw.AddOrUpdatePlugin(tCtx, socketPath) if err != nil { t.Fatalf("AddOrUpdatePlugin failed. Expected: Actual: <%v>", err) } @@ -72,7 +75,7 @@ func Test_DSW_AddOrUpdatePlugin_Positive_ExistingPlugin(t *testing.T) { oldUUID := dswPlugins[0].UUID // Adding the plugin again so that the timestamp will be updated - err = dsw.AddOrUpdatePlugin(socketPath) + err = dsw.AddOrUpdatePlugin(tCtx, socketPath) if err != nil { t.Fatalf("AddOrUpdatePlugin failed. Expected: Actual: <%v>", err) } @@ -95,9 +98,10 @@ func Test_DSW_AddOrUpdatePlugin_Positive_ExistingPlugin(t *testing.T) { // Verifies the plugin does not exist in GetPluginsToRegister() after AddOrUpdatePlugin() // Verifies the plugin returns false for PluginExists() func Test_DSW_AddOrUpdatePlugin_Negative_PluginMissingInfo(t *testing.T) { + tCtx := ktesting.Init(t) dsw := NewDesiredStateOfWorld() socketPath := "" - err := dsw.AddOrUpdatePlugin(socketPath) + err := dsw.AddOrUpdatePlugin(tCtx, socketPath) require.EqualError(t, err, "socket path is empty") // Get pluginsToRegister and check the newly added plugin is there @@ -116,10 +120,11 @@ func Test_DSW_AddOrUpdatePlugin_Negative_PluginMissingInfo(t *testing.T) { // Verifies newly removed plugin no longer exists in GetPluginsToRegister() // Verifies newly removed plugin returns false for PluginExists() func Test_DSW_RemovePlugin_Positive(t *testing.T) { + tCtx := ktesting.Init(t) // First, add a plugin dsw := NewDesiredStateOfWorld() socketPath := "/var/lib/kubelet/device-plugins/test-plugin.sock" - err := dsw.AddOrUpdatePlugin(socketPath) + err := dsw.AddOrUpdatePlugin(tCtx, socketPath) // Assert if err != nil { t.Fatalf("AddOrUpdatePlugin failed. Expected: Actual: <%v>", err) diff --git a/pkg/kubelet/pluginmanager/metrics/metrics_test.go b/pkg/kubelet/pluginmanager/metrics/metrics_test.go index 700a6396636d3..751e9a81cd4cb 100644 --- a/pkg/kubelet/pluginmanager/metrics/metrics_test.go +++ b/pkg/kubelet/pluginmanager/metrics/metrics_test.go @@ -21,22 +21,24 @@ import ( "testing" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" + "k8s.io/kubernetes/test/utils/ktesting" ) func TestMetricCollection(t *testing.T) { + tCtx := ktesting.Init(t) dsw := cache.NewDesiredStateOfWorld() asw := cache.NewActualStateOfWorld() fakePlugin := cache.PluginInfo{ SocketPath: fmt.Sprintf("fake/path/plugin.sock"), } // Add one plugin to DesiredStateOfWorld - err := dsw.AddOrUpdatePlugin(fakePlugin.SocketPath) + err := dsw.AddOrUpdatePlugin(tCtx, fakePlugin.SocketPath) if err != nil { t.Fatalf("AddOrUpdatePlugin failed. Expected: Actual: <%v>", err) } // Add one plugin to ActualStateOfWorld - err = asw.AddPlugin(fakePlugin) + err = asw.AddPlugin(tCtx, fakePlugin) if err != nil { t.Fatalf("AddOrUpdatePlugin failed. Expected: Actual: <%v>", err) } diff --git a/pkg/kubelet/pluginmanager/operationexecutor/operation_executor.go b/pkg/kubelet/pluginmanager/operationexecutor/operation_executor.go index a1bb6517e81d2..2330d85f4600f 100644 --- a/pkg/kubelet/pluginmanager/operationexecutor/operation_executor.go +++ b/pkg/kubelet/pluginmanager/operationexecutor/operation_executor.go @@ -21,6 +21,8 @@ limitations under the License. package operationexecutor import ( + "context" + "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" @@ -45,11 +47,11 @@ import ( type OperationExecutor interface { // RegisterPlugin registers the given plugin using a handler in the plugin handler map. // It then updates the actual state of the world to reflect that. - RegisterPlugin(socketPath string, UUID types.UID, pluginHandlers map[string]cache.PluginHandler, actualStateOfWorld ActualStateOfWorldUpdater) error + RegisterPlugin(ctx context.Context, socketPath string, UUID types.UID, pluginHandlers map[string]cache.PluginHandler, actualStateOfWorld ActualStateOfWorldUpdater) error // UnregisterPlugin deregisters the given plugin using a handler in the given plugin handler map. // It then updates the actual state of the world to reflect that. - UnregisterPlugin(pluginInfo cache.PluginInfo, actualStateOfWorld ActualStateOfWorldUpdater) error + UnregisterPlugin(ctx context.Context, pluginInfo cache.PluginInfo, actualStateOfWorld ActualStateOfWorldUpdater) error } // NewOperationExecutor returns a new instance of OperationExecutor. @@ -68,7 +70,7 @@ type ActualStateOfWorldUpdater interface { // AddPlugin add the given plugin in the cache if no existing plugin // in the cache has the same socket path. // An error will be returned if socketPath is empty. - AddPlugin(pluginInfo cache.PluginInfo) error + AddPlugin(ctx context.Context, pluginInfo cache.PluginInfo) error // RemovePlugin deletes the plugin with the given socket path from the actual // state of world. @@ -93,22 +95,24 @@ func (oe *operationExecutor) IsOperationPending(socketPath string) bool { } func (oe *operationExecutor) RegisterPlugin( + ctx context.Context, socketPath string, pluginUUID types.UID, pluginHandlers map[string]cache.PluginHandler, actualStateOfWorld ActualStateOfWorldUpdater) error { generatedOperation := - oe.operationGenerator.GenerateRegisterPluginFunc(socketPath, pluginUUID, pluginHandlers, actualStateOfWorld) + oe.operationGenerator.GenerateRegisterPluginFunc(ctx, socketPath, pluginUUID, pluginHandlers, actualStateOfWorld) return oe.pendingOperations.Run( socketPath, generatedOperation) } func (oe *operationExecutor) UnregisterPlugin( + ctx context.Context, pluginInfo cache.PluginInfo, actualStateOfWorld ActualStateOfWorldUpdater) error { generatedOperation := - oe.operationGenerator.GenerateUnregisterPluginFunc(pluginInfo, actualStateOfWorld) + oe.operationGenerator.GenerateUnregisterPluginFunc(ctx, pluginInfo, actualStateOfWorld) return oe.pendingOperations.Run( pluginInfo.SocketPath, generatedOperation) diff --git a/pkg/kubelet/pluginmanager/operationexecutor/operation_executor_test.go b/pkg/kubelet/pluginmanager/operationexecutor/operation_executor_test.go index 573146bc7d29c..f9e62c66ddc4c 100644 --- a/pkg/kubelet/pluginmanager/operationexecutor/operation_executor_test.go +++ b/pkg/kubelet/pluginmanager/operationexecutor/operation_executor_test.go @@ -17,6 +17,7 @@ limitations under the License. package operationexecutor import ( + "context" "fmt" "os" "strconv" @@ -27,6 +28,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" + "k8s.io/kubernetes/test/utils/ktesting" ) const ( @@ -46,10 +48,10 @@ func init() { } func TestOperationExecutor_RegisterPlugin_ConcurrentRegisterPlugin(t *testing.T) { - ch, quit, oe := setup() + tCtx, ch, quit, oe := setup(t) for i := 0; i < numPluginsToRegister; i++ { socketPath := fmt.Sprintf("%s/plugin-%d.sock", socketDir, i) - err := oe.RegisterPlugin(socketPath, uuid.NewUUID(), nil /* plugin handlers */, nil /* actual state of the world updator */) + err := oe.RegisterPlugin(tCtx, socketPath, uuid.NewUUID(), nil /* plugin handlers */, nil /* actual state of the world updator */) assert.NoError(t, err) } if !isOperationRunConcurrently(ch, quit, numPluginsToRegister) { @@ -58,15 +60,15 @@ func TestOperationExecutor_RegisterPlugin_ConcurrentRegisterPlugin(t *testing.T) } func TestOperationExecutor_RegisterPlugin_SerialRegisterPlugin(t *testing.T) { - ch, quit, oe := setup() + tCtx, ch, quit, oe := setup(t) socketPath := fmt.Sprintf("%s/plugin-serial.sock", socketDir) // First registration should not fail. - err := oe.RegisterPlugin(socketPath, uuid.NewUUID(), nil /* plugin handlers */, nil /* actual state of the world updator */) + err := oe.RegisterPlugin(tCtx, socketPath, uuid.NewUUID(), nil /* plugin handlers */, nil /* actual state of the world updator */) assert.NoError(t, err) for i := 1; i < numPluginsToRegister; i++ { - err := oe.RegisterPlugin(socketPath, uuid.NewUUID(), nil /* plugin handlers */, nil /* actual state of the world updator */) + err := oe.RegisterPlugin(tCtx, socketPath, uuid.NewUUID(), nil /* plugin handlers */, nil /* actual state of the world updator */) if err == nil { t.Fatalf("RegisterPlugin did not fail. Expected: Actual: ", socketPath) } @@ -78,12 +80,11 @@ func TestOperationExecutor_RegisterPlugin_SerialRegisterPlugin(t *testing.T) { } func TestOperationExecutor_UnregisterPlugin_ConcurrentUnregisterPlugin(t *testing.T) { - ch, quit, oe := setup() + tCtx, ch, quit, oe := setup(t) for i := 0; i < numPluginsToUnregister; i++ { socketPath := "socket-path" + strconv.Itoa(i) pluginInfo := cache.PluginInfo{SocketPath: socketPath} - oe.UnregisterPlugin(pluginInfo, nil /* actual state of the world updator */) - + _ = oe.UnregisterPlugin(tCtx, pluginInfo, nil /* actual state of the world updator */) } if !isOperationRunConcurrently(ch, quit, numPluginsToUnregister) { t.Fatalf("Unable to start unregister operations in Concurrent for plugins") @@ -91,12 +92,11 @@ func TestOperationExecutor_UnregisterPlugin_ConcurrentUnregisterPlugin(t *testin } func TestOperationExecutor_UnregisterPlugin_SerialUnregisterPlugin(t *testing.T) { - ch, quit, oe := setup() + tCtx, ch, quit, oe := setup(t) socketPath := fmt.Sprintf("%s/plugin-serial.sock", socketDir) for i := 0; i < numPluginsToUnregister; i++ { pluginInfo := cache.PluginInfo{SocketPath: socketPath} - oe.UnregisterPlugin(pluginInfo, nil /* actual state of the world updator */) - + _ = oe.UnregisterPlugin(tCtx, pluginInfo, nil /* actual state of the world updator */) } if !isOperationRunSerially(ch, quit) { t.Fatalf("Unable to start unregister operations serially for plugins") @@ -116,6 +116,7 @@ func newFakeOperationGenerator(ch chan interface{}, quit chan interface{}) Opera } func (fopg *fakeOperationGenerator) GenerateRegisterPluginFunc( + ctx context.Context, socketPath string, pluginUUID types.UID, pluginHandlers map[string]cache.PluginHandler, @@ -129,6 +130,7 @@ func (fopg *fakeOperationGenerator) GenerateRegisterPluginFunc( } func (fopg *fakeOperationGenerator) GenerateUnregisterPluginFunc( + ctx context.Context, pluginInfo cache.PluginInfo, actualStateOfWorldUpdater ActualStateOfWorldUpdater) func() error { opFunc := func() error { @@ -174,9 +176,10 @@ loop: return false } -func setup() (chan interface{}, chan interface{}, OperationExecutor) { +func setup(t *testing.T) (context.Context, chan interface{}, chan interface{}, OperationExecutor) { + tCtx := ktesting.Init(t) ch, quit := make(chan interface{}), make(chan interface{}) - return ch, quit, NewOperationExecutor(newFakeOperationGenerator(ch, quit)) + return tCtx, ch, quit, NewOperationExecutor(newFakeOperationGenerator(ch, quit)) } // This function starts by writing to ch and blocks on the quit channel diff --git a/pkg/kubelet/pluginmanager/operationexecutor/operation_generator.go b/pkg/kubelet/pluginmanager/operationexecutor/operation_generator.go index 7b6fbba5b5031..745ca23154712 100644 --- a/pkg/kubelet/pluginmanager/operationexecutor/operation_generator.go +++ b/pkg/kubelet/pluginmanager/operationexecutor/operation_generator.go @@ -62,6 +62,7 @@ func NewOperationGenerator(recorder record.EventRecorder) OperationGenerator { type OperationGenerator interface { // Generates the RegisterPlugin function needed to perform the registration of a plugin GenerateRegisterPluginFunc( + ctx context.Context, socketPath string, UUID types.UID, pluginHandlers map[string]cache.PluginHandler, @@ -69,34 +70,39 @@ type OperationGenerator interface { // Generates the UnregisterPlugin function needed to perform the unregistration of a plugin GenerateUnregisterPluginFunc( + ctx context.Context, pluginInfo cache.PluginInfo, actualStateOfWorldUpdater ActualStateOfWorldUpdater) func() error } func (og *operationGenerator) GenerateRegisterPluginFunc( + ctx context.Context, socketPath string, pluginUUID types.UID, pluginHandlers map[string]cache.PluginHandler, actualStateOfWorldUpdater ActualStateOfWorldUpdater) func() error { registerPluginFunc := func() error { - client, conn, err := dial(socketPath, dialTimeoutDuration) + logger := klog.FromContext(ctx) + + client, conn, err := dial(ctx, socketPath, dialTimeoutDuration) if err != nil { return fmt.Errorf("RegisterPlugin error -- dial failed at socket %s, err: %v", socketPath, err) } defer conn.Close() - ctx, cancel := context.WithTimeout(context.Background(), time.Second) + // Create separate context from parent context + ctxWithTimeout, cancel := context.WithTimeout(ctx, time.Second) defer cancel() - infoResp, err := client.GetInfo(ctx, ®isterapi.InfoRequest{}) + infoResp, err := client.GetInfo(ctxWithTimeout, ®isterapi.InfoRequest{}) if err != nil { return fmt.Errorf("RegisterPlugin error -- failed to get plugin info using RPC GetInfo at socket %s, err: %v", socketPath, err) } handler, ok := pluginHandlers[infoResp.Type] if !ok { - if err := og.notifyPlugin(client, false, fmt.Sprintf("RegisterPlugin error -- no handler registered for plugin type: %s at socket %s", infoResp.Type, socketPath)); err != nil { + if err := og.notifyPlugin(ctx, client, false, fmt.Sprintf("RegisterPlugin error -- no handler registered for plugin type: %s at socket %s", infoResp.Type, socketPath)); err != nil { return fmt.Errorf("RegisterPlugin error -- failed to send error at socket %s, err: %v", socketPath, err) } return fmt.Errorf("RegisterPlugin error -- no handler registered for plugin type: %s at socket %s", infoResp.Type, socketPath) @@ -106,14 +112,14 @@ func (og *operationGenerator) GenerateRegisterPluginFunc( infoResp.Endpoint = socketPath } if err := handler.ValidatePlugin(infoResp.Name, infoResp.Endpoint, infoResp.SupportedVersions); err != nil { - if err = og.notifyPlugin(client, false, fmt.Sprintf("RegisterPlugin error -- plugin validation failed with err: %v", err)); err != nil { + if err = og.notifyPlugin(ctx, client, false, fmt.Sprintf("RegisterPlugin error -- plugin validation failed with err: %v", err)); err != nil { return fmt.Errorf("RegisterPlugin error -- failed to send error at socket %s, err: %v", socketPath, err) } return fmt.Errorf("RegisterPlugin error -- pluginHandler.ValidatePluginFunc failed") } // We add the plugin to the actual state of world cache before calling a plugin consumer's Register handle // so that if we receive a delete event during Register Plugin, we can process it as a DeRegister call. - err = actualStateOfWorldUpdater.AddPlugin(cache.PluginInfo{ + err = actualStateOfWorldUpdater.AddPlugin(ctx, cache.PluginInfo{ SocketPath: socketPath, UUID: pluginUUID, Handler: handler, @@ -121,14 +127,14 @@ func (og *operationGenerator) GenerateRegisterPluginFunc( Endpoint: infoResp.Endpoint, }) if err != nil { - klog.ErrorS(err, "RegisterPlugin error -- failed to add plugin", "path", socketPath) + logger.Error(err, "RegisterPlugin error -- failed to add plugin", "path", socketPath) } if err := handler.RegisterPlugin(infoResp.Name, infoResp.Endpoint, infoResp.SupportedVersions, nil); err != nil { - return og.notifyPlugin(client, false, fmt.Sprintf("RegisterPlugin error -- plugin registration failed with err: %v", err)) + return og.notifyPlugin(ctx, client, false, fmt.Sprintf("RegisterPlugin error -- plugin registration failed with err: %v", err)) } // Notify is called after register to guarantee that even if notify throws an error Register will always be called after validate - if err := og.notifyPlugin(client, true, ""); err != nil { + if err := og.notifyPlugin(ctx, client, true, ""); err != nil { return fmt.Errorf("RegisterPlugin error -- failed to send registration status at socket %s, err: %v", socketPath, err) } return nil @@ -137,10 +143,13 @@ func (og *operationGenerator) GenerateRegisterPluginFunc( } func (og *operationGenerator) GenerateUnregisterPluginFunc( + ctx context.Context, pluginInfo cache.PluginInfo, actualStateOfWorldUpdater ActualStateOfWorldUpdater) func() error { unregisterPluginFunc := func() error { + logger := klog.FromContext(ctx) + if pluginInfo.Handler == nil { return fmt.Errorf("UnregisterPlugin error -- failed to get plugin handler for %s", pluginInfo.SocketPath) } @@ -150,14 +159,14 @@ func (og *operationGenerator) GenerateUnregisterPluginFunc( pluginInfo.Handler.DeRegisterPlugin(pluginInfo.Name, pluginInfo.Endpoint) - klog.V(4).InfoS("DeRegisterPlugin called", "pluginName", pluginInfo.Name, "pluginHandler", pluginInfo.Handler) + logger.V(4).Info("DeRegisterPlugin called", "pluginName", pluginInfo.Name, "pluginHandler", pluginInfo.Handler) return nil } return unregisterPluginFunc } -func (og *operationGenerator) notifyPlugin(client registerapi.RegistrationClient, registered bool, errStr string) error { - ctx, cancel := context.WithTimeout(context.Background(), notifyTimeoutDuration) +func (og *operationGenerator) notifyPlugin(ctx context.Context, client registerapi.RegistrationClient, registered bool, errStr string) error { + ctx, cancel := context.WithTimeout(ctx, notifyTimeoutDuration) defer cancel() status := ®isterapi.RegistrationStatus{ @@ -177,8 +186,8 @@ func (og *operationGenerator) notifyPlugin(client registerapi.RegistrationClient } // Dial establishes the gRPC communication with the picked up plugin socket. https://godoc.org/google.golang.org/grpc#Dial -func dial(unixSocketPath string, timeout time.Duration) (registerapi.RegistrationClient, *grpc.ClientConn, error) { - ctx, cancel := context.WithTimeout(context.Background(), timeout) +func dial(ctx context.Context, unixSocketPath string, timeout time.Duration) (registerapi.RegistrationClient, *grpc.ClientConn, error) { + ctx, cancel := context.WithTimeout(ctx, timeout) defer cancel() c, err := grpc.DialContext(ctx, unixSocketPath, diff --git a/pkg/kubelet/pluginmanager/plugin_manager.go b/pkg/kubelet/pluginmanager/plugin_manager.go index e1491165febcf..754c30ba31599 100644 --- a/pkg/kubelet/pluginmanager/plugin_manager.go +++ b/pkg/kubelet/pluginmanager/plugin_manager.go @@ -17,6 +17,7 @@ limitations under the License. package pluginmanager import ( + "context" "time" "k8s.io/apimachinery/pkg/util/runtime" @@ -34,7 +35,7 @@ import ( // need to be registered/deregistered and makes it so. type PluginManager interface { // Starts the plugin manager and all the asynchronous loops that it controls - Run(sourcesReady config.SourcesReady, stopCh <-chan struct{}) + Run(ctx context.Context, sourcesReady config.SourcesReady, stopCh <-chan struct{}) // AddHandler adds the given plugin handler for a specific plugin type, which // will be added to the actual state of world cache so that it can be passed to @@ -105,22 +106,24 @@ type pluginManager struct { var _ PluginManager = &pluginManager{} -func (pm *pluginManager) Run(sourcesReady config.SourcesReady, stopCh <-chan struct{}) { +func (pm *pluginManager) Run(ctx context.Context, sourcesReady config.SourcesReady, stopCh <-chan struct{}) { defer runtime.HandleCrash() - if err := pm.desiredStateOfWorldPopulator.Start(stopCh); err != nil { - klog.ErrorS(err, "The desired_state_of_world populator (plugin watcher) starts failed!") + logger := klog.FromContext(ctx) + + if err := pm.desiredStateOfWorldPopulator.Start(ctx, stopCh); err != nil { + logger.Error(err, "The desired_state_of_world populator (plugin watcher) starts failed!") return } - klog.V(2).InfoS("The desired_state_of_world populator (plugin watcher) starts") + logger.V(2).Info("The desired_state_of_world populator (plugin watcher) starts") - klog.InfoS("Starting Kubelet Plugin Manager") + logger.Info("Starting Kubelet Plugin Manager") go pm.reconciler.Run(stopCh) metrics.Register(pm.actualStateOfWorld, pm.desiredStateOfWorld) <-stopCh - klog.InfoS("Shutting down Kubelet Plugin Manager") + logger.Info("Shutting down Kubelet Plugin Manager") } func (pm *pluginManager) AddHandler(pluginType string, handler cache.PluginHandler) { diff --git a/pkg/kubelet/pluginmanager/plugin_manager_test.go b/pkg/kubelet/pluginmanager/plugin_manager_test.go index 99aa22ad7ae22..9f1c737d6047b 100644 --- a/pkg/kubelet/pluginmanager/plugin_manager_test.go +++ b/pkg/kubelet/pluginmanager/plugin_manager_test.go @@ -34,6 +34,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/config" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher" + "k8s.io/kubernetes/test/utils/ktesting" ) var ( @@ -141,6 +142,7 @@ func retryWithExponentialBackOff(initialDuration time.Duration, fn wait.Conditio func TestPluginManager(t *testing.T) { defer cleanup(t) + tCtx := ktesting.Init(t) pluginManager := newTestPluginManager(socketDir) // Start the plugin manager @@ -148,7 +150,7 @@ func TestPluginManager(t *testing.T) { defer close(stopChan) go func() { sourcesReady := config.NewSourcesReady(func(_ sets.Set[string]) bool { return true }) - pluginManager.Run(sourcesReady, stopChan) + pluginManager.Run(tCtx, sourcesReady, stopChan) }() // Add handler for device plugin @@ -170,14 +172,14 @@ func TestPluginManager(t *testing.T) { // Add a new plugin pluginName := fmt.Sprintf("example-plugin-%d", i) p := pluginwatcher.NewTestExamplePlugin(pluginName, registerapi.DevicePlugin, socketPath, supportedVersions...) - require.NoError(t, p.Serve("v1beta1", "v1beta2")) + require.NoError(t, p.Serve(tCtx, "v1beta1", "v1beta2")) // Verify that the plugin is registered waitForRegistration(t, fakeHandler, pluginName, socketPath) // And unregister. fakeHandler.Reset() - require.NoError(t, p.Stop()) + require.NoError(t, p.Stop(tCtx)) waitForDeRegistration(t, fakeHandler, pluginName, socketPath) } } diff --git a/pkg/kubelet/pluginmanager/pluginwatcher/example_handler.go b/pkg/kubelet/pluginmanager/pluginwatcher/example_handler.go index 3c845a7bc24f6..3f94ad951363b 100644 --- a/pkg/kubelet/pluginmanager/pluginwatcher/example_handler.go +++ b/pkg/kubelet/pluginmanager/pluginwatcher/example_handler.go @@ -64,8 +64,8 @@ func NewExampleHandler(supportedVersions []string, permitDeprecatedDir bool) *ex } } -func (p *exampleHandler) ValidatePlugin(pluginName string, endpoint string, versions []string) error { - p.SendEvent(pluginName, exampleEventValidate) +func (p *exampleHandler) ValidatePlugin(ctx context.Context, pluginName string, endpoint string, versions []string) error { + p.SendEvent(ctx, pluginName, exampleEventValidate) n, ok := p.DecreasePluginCount(pluginName) if !ok && n > 0 { @@ -84,11 +84,11 @@ func (p *exampleHandler) ValidatePlugin(pluginName string, endpoint string, vers return nil } -func (p *exampleHandler) RegisterPlugin(pluginName, endpoint string, versions []string) error { - p.SendEvent(pluginName, exampleEventRegister) +func (p *exampleHandler) RegisterPlugin(ctx context.Context, pluginName, endpoint string, versions []string) error { + p.SendEvent(ctx, pluginName, exampleEventRegister) // Verifies the grpcServer is ready to serve services. - _, conn, err := dial(endpoint, time.Second) + _, conn, err := dial(ctx, endpoint, time.Second) if err != nil { return fmt.Errorf("failed dialing endpoint (%s): %v", endpoint, err) } @@ -99,13 +99,13 @@ func (p *exampleHandler) RegisterPlugin(pluginName, endpoint string, versions [] v1beta2Client := v1beta2.NewExampleClient(conn) // Tests v1beta1 GetExampleInfo - _, err = v1beta1Client.GetExampleInfo(context.Background(), &v1beta1.ExampleRequest{}) + _, err = v1beta1Client.GetExampleInfo(ctx, &v1beta1.ExampleRequest{}) if err != nil { return fmt.Errorf("failed GetExampleInfo for v1beta2Client(%s): %v", endpoint, err) } // Tests v1beta1 GetExampleInfo - _, err = v1beta2Client.GetExampleInfo(context.Background(), &v1beta2.ExampleRequest{}) + _, err = v1beta2Client.GetExampleInfo(ctx, &v1beta2.ExampleRequest{}) if err != nil { return fmt.Errorf("failed GetExampleInfo for v1beta2Client(%s): %v", endpoint, err) } @@ -113,12 +113,13 @@ func (p *exampleHandler) RegisterPlugin(pluginName, endpoint string, versions [] return nil } -func (p *exampleHandler) DeRegisterPlugin(pluginName string) { - p.SendEvent(pluginName, exampleEventDeRegister) +func (p *exampleHandler) DeRegisterPlugin(ctx context.Context, pluginName string) { + p.SendEvent(ctx, pluginName, exampleEventDeRegister) } -func (p *exampleHandler) SendEvent(pluginName string, event examplePluginEvent) { - klog.V(2).InfoS("Sending event for plugin", "pluginName", pluginName, "event", event, "channel", p.eventChans[pluginName]) +func (p *exampleHandler) SendEvent(ctx context.Context, pluginName string, event examplePluginEvent) { + logger := klog.FromContext(ctx) + logger.V(2).Info("Sending event for plugin", "pluginName", pluginName, "event", event, "channel", p.eventChans[pluginName]) p.eventChans[pluginName] <- event } @@ -135,8 +136,8 @@ func (p *exampleHandler) DecreasePluginCount(pluginName string) (old int, ok boo } // Dial establishes the gRPC communication with the picked up plugin socket. https://godoc.org/google.golang.org/grpc#Dial -func dial(unixSocketPath string, timeout time.Duration) (registerapi.RegistrationClient, *grpc.ClientConn, error) { - ctx, cancel := context.WithTimeout(context.Background(), timeout) +func dial(ctx context.Context, unixSocketPath string, timeout time.Duration) (registerapi.RegistrationClient, *grpc.ClientConn, error) { + ctx, cancel := context.WithTimeout(ctx, timeout) defer cancel() c, err := grpc.DialContext(ctx, unixSocketPath, diff --git a/pkg/kubelet/pluginmanager/pluginwatcher/example_plugin.go b/pkg/kubelet/pluginmanager/pluginwatcher/example_plugin.go index 85b9cc3b28952..0e43ceaf5e2ed 100644 --- a/pkg/kubelet/pluginmanager/pluginwatcher/example_plugin.go +++ b/pkg/kubelet/pluginmanager/pluginwatcher/example_plugin.go @@ -53,7 +53,8 @@ type pluginServiceV1Beta1 struct { } func (s *pluginServiceV1Beta1) GetExampleInfo(ctx context.Context, rqt *v1beta1.ExampleRequest) (*v1beta1.ExampleResponse, error) { - klog.InfoS("GetExampleInfo v1beta1field", "field", rqt.V1Beta1Field) + logger := klog.FromContext(ctx) + logger.Info("GetExampleInfo v1beta1field", "field", rqt.V1Beta1Field) return &v1beta1.ExampleResponse{}, nil } @@ -67,7 +68,8 @@ type pluginServiceV1Beta2 struct { } func (s *pluginServiceV1Beta2) GetExampleInfo(ctx context.Context, rqt *v1beta2.ExampleRequest) (*v1beta2.ExampleResponse, error) { - klog.InfoS("GetExampleInfo v1beta2_field", "field", rqt.V1Beta2Field) + logger := klog.FromContext(ctx) + logger.Info("GetExampleInfo v1beta2_field", "field", rqt.V1Beta2Field) return &v1beta2.ExampleResponse{}, nil } @@ -109,7 +111,8 @@ func (e *examplePlugin) GetInfo(ctx context.Context, req *registerapi.InfoReques } func (e *examplePlugin) NotifyRegistrationStatus(ctx context.Context, status *registerapi.RegistrationStatus) (*registerapi.RegistrationStatusResponse, error) { - klog.InfoS("Notify registration status", "status", status) + logger := klog.FromContext(ctx) + logger.Info("Notify registration status", "status", status) if e.registrationStatus != nil { e.registrationStatus <- *status @@ -119,14 +122,15 @@ func (e *examplePlugin) NotifyRegistrationStatus(ctx context.Context, status *re } // Serve starts a pluginwatcher server and one or more of the plugin services -func (e *examplePlugin) Serve(services ...string) error { - klog.InfoS("Starting example server", "endpoint", e.endpoint) +func (e *examplePlugin) Serve(ctx context.Context, services ...string) error { + logger := klog.FromContext(ctx) + logger.Info("Starting example server", "endpoint", e.endpoint) lis, err := net.Listen("unix", e.endpoint) if err != nil { return err } - klog.InfoS("Example server started", "endpoint", e.endpoint) + logger.Info("Example server started", "endpoint", e.endpoint) e.grpcServer = grpc.NewServer() // Registers kubelet plugin watcher api. @@ -151,15 +155,16 @@ func (e *examplePlugin) Serve(services ...string) error { defer e.wg.Done() // Blocking call to accept incoming connections. if err := e.grpcServer.Serve(lis); err != nil { - klog.ErrorS(err, "Example server stopped serving") + logger.Error(err, "Example server stopped serving") } }() return nil } -func (e *examplePlugin) Stop() error { - klog.InfoS("Stopping example server", "endpoint", e.endpoint) +func (e *examplePlugin) Stop(ctx context.Context) error { + logger := klog.FromContext(ctx) + logger.Info("Stopping example server", "endpoint", e.endpoint) e.grpcServer.Stop() c := make(chan struct{}) diff --git a/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go b/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go index 44a08012c0dc2..dc3e6a7d08732 100644 --- a/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go +++ b/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go @@ -17,6 +17,7 @@ limitations under the License. package pluginwatcher import ( + "context" "fmt" "os" "strings" @@ -47,12 +48,13 @@ func NewWatcher(sockDir string, desiredStateOfWorld cache.DesiredStateOfWorld) * } // Start watches for the creation and deletion of plugin sockets at the path -func (w *Watcher) Start(stopCh <-chan struct{}) error { - klog.V(2).InfoS("Plugin Watcher Start", "path", w.path) +func (w *Watcher) Start(ctx context.Context, stopCh <-chan struct{}) error { + logger := klog.FromContext(ctx) + logger.V(2).Info("Plugin Watcher Start", "path", w.path) // Creating the directory to be watched if it doesn't exist yet, // and walks through the directory to discover the existing plugins. - if err := w.init(); err != nil { + if err := w.init(ctx); err != nil { return err } @@ -63,8 +65,8 @@ func (w *Watcher) Start(stopCh <-chan struct{}) error { w.fsWatcher = fsWatcher // Traverse plugin dir and add filesystem watchers before starting the plugin processing goroutine. - if err := w.traversePluginDir(w.path); err != nil { - klog.ErrorS(err, "Failed to traverse plugin socket path", "path", w.path) + if err := w.traversePluginDir(ctx, w.path); err != nil { + logger.Error(err, "Failed to traverse plugin socket path", "path", w.path) } go func(fsWatcher *fsnotify.Watcher) { @@ -73,17 +75,17 @@ func (w *Watcher) Start(stopCh <-chan struct{}) error { case event := <-fsWatcher.Events: //TODO: Handle errors by taking corrective measures if event.Has(fsnotify.Create) { - err := w.handleCreateEvent(event) + err := w.handleCreateEvent(ctx, event) if err != nil { - klog.ErrorS(err, "Error when handling create event", "event", event) + logger.Error(err, "Error when handling create event", "event", event) } } else if event.Has(fsnotify.Remove) { - w.handleDeleteEvent(event) + w.handleDeleteEvent(ctx, event) } continue case err := <-fsWatcher.Errors: if err != nil { - klog.ErrorS(err, "FsWatcher received error") + logger.Error(err, "FsWatcher received error") } continue case <-stopCh: @@ -96,8 +98,9 @@ func (w *Watcher) Start(stopCh <-chan struct{}) error { return nil } -func (w *Watcher) init() error { - klog.V(4).InfoS("Ensuring Plugin directory", "path", w.path) +func (w *Watcher) init(ctx context.Context) error { + logger := klog.FromContext(ctx) + logger.V(4).Info("Ensuring Plugin directory", "path", w.path) if err := w.fs.MkdirAll(w.path, 0755); err != nil { return fmt.Errorf("error (re-)creating root %s: %v", w.path, err) @@ -108,7 +111,9 @@ func (w *Watcher) init() error { // Walks through the plugin directory discover any existing plugin sockets. // Ignore all errors except root dir not being walkable -func (w *Watcher) traversePluginDir(dir string) error { +func (w *Watcher) traversePluginDir(ctx context.Context, dir string) error { + logger := klog.FromContext(ctx) + // watch the new dir err := w.fsWatcher.Add(dir) if err != nil { @@ -121,7 +126,7 @@ func (w *Watcher) traversePluginDir(dir string) error { return fmt.Errorf("error accessing path: %s error: %v", path, err) } - klog.ErrorS(err, "Error accessing path", "path", path) + logger.Error(err, "Error accessing path", "path", path) return nil } @@ -141,11 +146,11 @@ func (w *Watcher) traversePluginDir(dir string) error { Op: fsnotify.Create, } //TODO: Handle errors by taking corrective measures - if err := w.handleCreateEvent(event); err != nil { - klog.ErrorS(err, "Error when handling create", "event", event) + if err := w.handleCreateEvent(ctx, event); err != nil { + logger.Error(err, "Error when handling create", "event", event) } } else { - klog.V(5).InfoS("Ignoring file", "path", path, "mode", mode) + logger.V(5).Info("Ignoring file", "path", path, "mode", mode) } return nil @@ -155,8 +160,9 @@ func (w *Watcher) traversePluginDir(dir string) error { // Handle filesystem notify event. // Files names: // - MUST NOT start with a '.' -func (w *Watcher) handleCreateEvent(event fsnotify.Event) error { - klog.V(6).InfoS("Handling create event", "event", event) +func (w *Watcher) handleCreateEvent(ctx context.Context, event fsnotify.Event) error { + logger := klog.FromContext(ctx) + logger.V(6).Info("Handling create event", "event", event) fi, err := getStat(event) if err != nil { @@ -164,7 +170,7 @@ func (w *Watcher) handleCreateEvent(event fsnotify.Event) error { } if strings.HasPrefix(fi.Name(), ".") { - klog.V(5).InfoS("Ignoring file (starts with '.')", "path", fi.Name()) + logger.V(5).Info("Ignoring file (starts with '.')", "path", fi.Name()) return nil } @@ -174,35 +180,37 @@ func (w *Watcher) handleCreateEvent(event fsnotify.Event) error { return fmt.Errorf("failed to determine if file: %s is a unix domain socket: %v", event.Name, err) } if !isSocket { - klog.V(5).InfoS("Ignoring non socket file", "path", fi.Name()) + logger.V(5).Info("Ignoring non socket file", "path", fi.Name()) return nil } - return w.handlePluginRegistration(event.Name) + return w.handlePluginRegistration(ctx, event.Name) } - return w.traversePluginDir(event.Name) + return w.traversePluginDir(ctx, event.Name) } -func (w *Watcher) handlePluginRegistration(socketPath string) error { +func (w *Watcher) handlePluginRegistration(ctx context.Context, socketPath string) error { + logger := klog.FromContext(ctx) socketPath = getSocketPath(socketPath) // Update desired state of world list of plugins // If the socket path does exist in the desired world cache, there's still // a possibility that it has been deleted and recreated again before it is // removed from the desired world cache, so we still need to call AddOrUpdatePlugin // in this case to update the timestamp - klog.V(2).InfoS("Adding socket path or updating timestamp to desired state cache", "path", socketPath) - err := w.desiredStateOfWorld.AddOrUpdatePlugin(socketPath) + logger.V(2).Info("Adding socket path or updating timestamp to desired state cache", "path", socketPath) + err := w.desiredStateOfWorld.AddOrUpdatePlugin(ctx, socketPath) if err != nil { return fmt.Errorf("error adding socket path %s or updating timestamp to desired state cache: %v", socketPath, err) } return nil } -func (w *Watcher) handleDeleteEvent(event fsnotify.Event) { - klog.V(6).InfoS("Handling delete event", "event", event) +func (w *Watcher) handleDeleteEvent(ctx context.Context, event fsnotify.Event) { + logger := klog.FromContext(ctx) + logger.V(6).Info("Handling delete event", "event", event) socketPath := event.Name - klog.V(2).InfoS("Removing socket path from desired state cache", "path", socketPath) + logger.V(2).Info("Removing socket path from desired state cache", "path", socketPath) w.desiredStateOfWorld.RemovePlugin(socketPath) } diff --git a/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher_test.go b/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher_test.go index d610d37a9cef5..072fdbfcfcaae 100644 --- a/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher_test.go +++ b/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher_test.go @@ -30,6 +30,7 @@ import ( "k8s.io/klog/v2" registerapi "k8s.io/kubelet/pkg/apis/pluginregistration/v1" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" + "k8s.io/kubernetes/test/utils/ktesting" ) var ( @@ -39,7 +40,8 @@ var ( func init() { var logLevel string - klog.InitFlags(flag.CommandLine) + flags := &flag.FlagSet{} + klog.InitFlags(flags) flag.Set("alsologtostderr", fmt.Sprintf("%t", true)) flag.StringVar(&logLevel, "logLevel", "6", "test") flag.Lookup("v").Value.Set(logLevel) @@ -107,6 +109,7 @@ func TestPluginRegistration(t *testing.T) { socketDir := initTempDir(t) defer os.RemoveAll(socketDir) + tCtx := ktesting.Init(t) dsw := cache.NewDesiredStateOfWorld() newWatcher(t, socketDir, dsw, wait.NeverStop) @@ -115,7 +118,7 @@ func TestPluginRegistration(t *testing.T) { pluginName := fmt.Sprintf("example-plugin-%d", i) p := NewTestExamplePlugin(pluginName, registerapi.DevicePlugin, socketPath, supportedVersions...) - require.NoError(t, p.Serve("v1beta1", "v1beta2")) + require.NoError(t, p.Serve(tCtx, "v1beta1", "v1beta2")) pluginInfo := GetPluginInfo(p) waitForRegistration(t, pluginInfo.SocketPath, dsw) @@ -127,7 +130,7 @@ func TestPluginRegistration(t *testing.T) { } // Stop the plugin; the plugin should be removed from the desired state of world cache - require.NoError(t, p.Stop()) + require.NoError(t, p.Stop(tCtx)) // The following doesn't work when running the unit tests locally: event.Op of plugin watcher won't pick up the delete event waitForUnregistration(t, pluginInfo.SocketPath, dsw) dswPlugins = dsw.GetPluginsToRegister() @@ -141,6 +144,7 @@ func TestPluginRegistrationSameName(t *testing.T) { socketDir := initTempDir(t) defer os.RemoveAll(socketDir) + tCtx := ktesting.Init(t) dsw := cache.NewDesiredStateOfWorld() newWatcher(t, socketDir, dsw, wait.NeverStop) @@ -150,7 +154,7 @@ func TestPluginRegistrationSameName(t *testing.T) { for i := 0; i < 10; i++ { socketPath := filepath.Join(socketDir, fmt.Sprintf("plugin-%d.sock", i)) p := NewTestExamplePlugin(pluginName, registerapi.DevicePlugin, socketPath, supportedVersions...) - require.NoError(t, p.Serve("v1beta1", "v1beta2")) + require.NoError(t, p.Serve(tCtx, "v1beta1", "v1beta2")) pluginInfo := GetPluginInfo(p) waitForRegistration(t, pluginInfo.SocketPath, dsw) @@ -167,6 +171,7 @@ func TestPluginReRegistration(t *testing.T) { socketDir := initTempDir(t) defer os.RemoveAll(socketDir) + tCtx := ktesting.Init(t) dsw := cache.NewDesiredStateOfWorld() newWatcher(t, socketDir, dsw, wait.NeverStop) @@ -175,7 +180,7 @@ func TestPluginReRegistration(t *testing.T) { socketPath := filepath.Join(socketDir, "plugin-reregistration.sock") pluginName := "reregister-plugin" p := NewTestExamplePlugin(pluginName, registerapi.DevicePlugin, socketPath, supportedVersions...) - require.NoError(t, p.Serve("v1beta1", "v1beta2")) + require.NoError(t, p.Serve(tCtx, "v1beta1", "v1beta2")) pluginInfo := GetPluginInfo(p) lastTimestamp := time.Now() waitForRegistration(t, pluginInfo.SocketPath, dsw) @@ -185,13 +190,13 @@ func TestPluginReRegistration(t *testing.T) { for i := 0; i < 10; i++ { // Stop the plugin; the plugin should be removed from the desired state of world cache // The plugin removal doesn't work when running the unit tests locally: event.Op of plugin watcher won't pick up the delete event - require.NoError(t, p.Stop()) + require.NoError(t, p.Stop(tCtx)) waitForUnregistration(t, pluginInfo.SocketPath, dsw) // Add the plugin again pluginName := fmt.Sprintf("dep-example-plugin-%d", i) p := NewTestExamplePlugin(pluginName, registerapi.DevicePlugin, socketPath, supportedVersions...) - require.NoError(t, p.Serve("v1beta1", "v1beta2")) + require.NoError(t, p.Serve(tCtx, "v1beta1", "v1beta2")) waitForRegistration(t, pluginInfo.SocketPath, dsw) // Check the dsw cache. The updated plugin should be the only plugin in it @@ -210,6 +215,7 @@ func TestPluginRegistrationAtKubeletStart(t *testing.T) { socketDir := initTempDir(t) defer os.RemoveAll(socketDir) + tCtx := ktesting.Init(t) plugins := make([]*examplePlugin, 10) for i := 0; i < len(plugins); i++ { @@ -217,9 +223,9 @@ func TestPluginRegistrationAtKubeletStart(t *testing.T) { pluginName := fmt.Sprintf("example-plugin-%d", i) p := NewTestExamplePlugin(pluginName, registerapi.DevicePlugin, socketPath, supportedVersions...) - require.NoError(t, p.Serve("v1beta1", "v1beta2")) + require.NoError(t, p.Serve(tCtx, "v1beta1", "v1beta2")) defer func(p *examplePlugin) { - require.NoError(t, p.Stop()) + require.NoError(t, p.Stop(tCtx)) }(p) plugins[i] = p @@ -255,8 +261,9 @@ func TestPluginRegistrationAtKubeletStart(t *testing.T) { } func newWatcher(t *testing.T, socketDir string, desiredStateOfWorldCache cache.DesiredStateOfWorld, stopCh <-chan struct{}) *Watcher { + tCtx := ktesting.Init(t) w := NewWatcher(socketDir, desiredStateOfWorldCache) - require.NoError(t, w.Start(stopCh)) + require.NoError(t, w.Start(tCtx, stopCh)) return w } diff --git a/pkg/kubelet/pluginmanager/reconciler/reconciler.go b/pkg/kubelet/pluginmanager/reconciler/reconciler.go index 730f9823fd964..083a81ac69bf9 100644 --- a/pkg/kubelet/pluginmanager/reconciler/reconciler.go +++ b/pkg/kubelet/pluginmanager/reconciler/reconciler.go @@ -20,6 +20,7 @@ limitations under the License. package reconciler import ( + "context" "sync" "time" @@ -83,8 +84,12 @@ type reconciler struct { var _ Reconciler = &reconciler{} func (rc *reconciler) Run(stopCh <-chan struct{}) { + // Use context.TODO() because we currently do not have a proper context to pass in. + // Replace this with an appropriate context when refactoring this function to accept a context parameter. + ctx := context.TODO() + wait.Until(func() { - rc.reconcile() + rc.reconcile(ctx) }, rc.loopSleepDuration, stopCh) @@ -108,7 +113,8 @@ func (rc *reconciler) getHandlers() map[string]cache.PluginHandler { return copyHandlers } -func (rc *reconciler) reconcile() { +func (rc *reconciler) reconcile(ctx context.Context) { + logger := klog.FromContext(ctx) // Unregisterations are triggered before registrations // Ensure plugins that should be unregistered are unregistered. @@ -123,7 +129,7 @@ func (rc *reconciler) reconcile() { // with the same socket path but different timestamp. for _, dswPlugin := range rc.desiredStateOfWorld.GetPluginsToRegister() { if dswPlugin.SocketPath == registeredPlugin.SocketPath && dswPlugin.UUID != registeredPlugin.UUID { - klog.V(5).InfoS("An updated version of plugin has been found, unregistering the plugin first before reregistering", "plugin", registeredPlugin) + logger.V(5).Info("An updated version of plugin has been found, unregistering the plugin first before reregistering", "plugin", registeredPlugin) unregisterPlugin = true break } @@ -131,17 +137,17 @@ func (rc *reconciler) reconcile() { } if unregisterPlugin { - klog.V(5).InfoS("Starting operationExecutor.UnregisterPlugin", "plugin", registeredPlugin) - err := rc.operationExecutor.UnregisterPlugin(registeredPlugin, rc.actualStateOfWorld) + logger.V(5).Info("Starting operationExecutor.UnregisterPlugin", "plugin", registeredPlugin) + err := rc.operationExecutor.UnregisterPlugin(ctx, registeredPlugin, rc.actualStateOfWorld) if err != nil && !goroutinemap.IsAlreadyExists(err) && !exponentialbackoff.IsExponentialBackoff(err) { // Ignore goroutinemap.IsAlreadyExists and exponentialbackoff.IsExponentialBackoff errors, they are expected. // Log all other errors. - klog.ErrorS(err, "OperationExecutor.UnregisterPlugin failed", "plugin", registeredPlugin) + logger.Error(err, "OperationExecutor.UnregisterPlugin failed", "plugin", registeredPlugin) } if err == nil { - klog.V(1).InfoS("OperationExecutor.UnregisterPlugin started", "plugin", registeredPlugin) + logger.V(1).Info("OperationExecutor.UnregisterPlugin started", "plugin", registeredPlugin) } } } @@ -149,16 +155,16 @@ func (rc *reconciler) reconcile() { // Ensure plugins that should be registered are registered for _, pluginToRegister := range rc.desiredStateOfWorld.GetPluginsToRegister() { if !rc.actualStateOfWorld.PluginExistsWithCorrectUUID(pluginToRegister) { - klog.V(5).InfoS("Starting operationExecutor.RegisterPlugin", "plugin", pluginToRegister) - err := rc.operationExecutor.RegisterPlugin(pluginToRegister.SocketPath, pluginToRegister.UUID, rc.getHandlers(), rc.actualStateOfWorld) + logger.V(5).Info("Starting operationExecutor.RegisterPlugin", "plugin", pluginToRegister) + err := rc.operationExecutor.RegisterPlugin(ctx, pluginToRegister.SocketPath, pluginToRegister.UUID, rc.getHandlers(), rc.actualStateOfWorld) if err != nil && !goroutinemap.IsAlreadyExists(err) && !exponentialbackoff.IsExponentialBackoff(err) { // Ignore goroutinemap.IsAlreadyExists and exponentialbackoff.IsExponentialBackoff errors, they are expected. - klog.ErrorS(err, "OperationExecutor.RegisterPlugin failed", "plugin", pluginToRegister) + logger.Error(err, "OperationExecutor.RegisterPlugin failed", "plugin", pluginToRegister) } if err == nil { - klog.V(1).InfoS("OperationExecutor.RegisterPlugin started", "plugin", pluginToRegister) + logger.V(1).Info("OperationExecutor.RegisterPlugin started", "plugin", pluginToRegister) } } } diff --git a/pkg/kubelet/pluginmanager/reconciler/reconciler_test.go b/pkg/kubelet/pluginmanager/reconciler/reconciler_test.go index 68e72ddcaae08..f7b8822dccf6e 100644 --- a/pkg/kubelet/pluginmanager/reconciler/reconciler_test.go +++ b/pkg/kubelet/pluginmanager/reconciler/reconciler_test.go @@ -31,6 +31,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/operationexecutor" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher" + "k8s.io/kubernetes/test/utils/ktesting" ) const ( @@ -170,6 +171,7 @@ func Test_Run_Positive_DoNothing(t *testing.T) { func Test_Run_Positive_Register(t *testing.T) { defer cleanup(t) + tCtx := ktesting.Init(t) dsw := cache.NewDesiredStateOfWorld() asw := cache.NewActualStateOfWorld() di := NewDummyImpl() @@ -192,11 +194,12 @@ func Test_Run_Positive_Register(t *testing.T) { socketPath := filepath.Join(socketDir, "plugin.sock") pluginName := fmt.Sprintf("example-plugin") p := pluginwatcher.NewTestExamplePlugin(pluginName, registerapi.DevicePlugin, socketPath, supportedVersions...) - require.NoError(t, p.Serve("v1beta1", "v1beta2")) + require.NoError(t, p.Serve(tCtx, "v1beta1", "v1beta2")) defer func() { - require.NoError(t, p.Stop()) + require.NoError(t, p.Stop(tCtx)) }() - dsw.AddOrUpdatePlugin(socketPath) + require.NoError(t, dsw.AddOrUpdatePlugin(tCtx, socketPath)) + plugins := dsw.GetPluginsToRegister() waitForRegistration(t, socketPath, plugins[0].UUID, asw) @@ -218,6 +221,7 @@ func Test_Run_Positive_Register(t *testing.T) { func Test_Run_Positive_RegisterThenUnregister(t *testing.T) { defer cleanup(t) + tCtx := ktesting.Init(t) dsw := cache.NewDesiredStateOfWorld() asw := cache.NewActualStateOfWorld() di := NewDummyImpl() @@ -241,8 +245,8 @@ func Test_Run_Positive_RegisterThenUnregister(t *testing.T) { socketPath := filepath.Join(socketDir, "plugin.sock") pluginName := fmt.Sprintf("example-plugin") p := pluginwatcher.NewTestExamplePlugin(pluginName, registerapi.DevicePlugin, socketPath, supportedVersions...) - require.NoError(t, p.Serve("v1beta1", "v1beta2")) - dsw.AddOrUpdatePlugin(socketPath) + require.NoError(t, p.Serve(tCtx, "v1beta1", "v1beta2")) + require.NoError(t, dsw.AddOrUpdatePlugin(tCtx, socketPath)) plugins := dsw.GetPluginsToRegister() waitForRegistration(t, socketPath, plugins[0].UUID, asw) @@ -274,6 +278,7 @@ func Test_Run_Positive_RegisterThenUnregister(t *testing.T) { func Test_Run_Positive_ReRegister(t *testing.T) { defer cleanup(t) + tCtx := ktesting.Init(t) dsw := cache.NewDesiredStateOfWorld() asw := cache.NewActualStateOfWorld() di := NewDummyImpl() @@ -297,13 +302,13 @@ func Test_Run_Positive_ReRegister(t *testing.T) { socketPath := filepath.Join(socketDir, "plugin2.sock") pluginName := fmt.Sprintf("example-plugin2") p := pluginwatcher.NewTestExamplePlugin(pluginName, registerapi.DevicePlugin, socketPath, supportedVersions...) - require.NoError(t, p.Serve("v1beta1", "v1beta2")) - dsw.AddOrUpdatePlugin(socketPath) + require.NoError(t, p.Serve(tCtx, "v1beta1", "v1beta2")) + require.NoError(t, dsw.AddOrUpdatePlugin(tCtx, socketPath)) plugins := dsw.GetPluginsToRegister() waitForRegistration(t, socketPath, plugins[0].UUID, asw) // Add the plugin again to update the timestamp - dsw.AddOrUpdatePlugin(socketPath) + require.NoError(t, dsw.AddOrUpdatePlugin(tCtx, socketPath)) // This should trigger a deregistration and a regitration // The process of unregistration and reregistration can happen so fast that // we are not able to catch it with waitForUnregistration, so here we are checking diff --git a/pkg/kubelet/pod/.mockery.yaml b/pkg/kubelet/pod/.mockery.yaml index 3a60e89a749cb..f450628a6c9c0 100644 --- a/pkg/kubelet/pod/.mockery.yaml +++ b/pkg/kubelet/pod/.mockery.yaml @@ -1,10 +1,12 @@ --- dir: testing -filename: "mock_{{.InterfaceName | snakecase}}.go" -boilerplate-file: ../../../hack/boilerplate/boilerplate.generatego.txt -outpkg: testing -with-expecter: true +filename: mocks.go +pkgname: testing +template: testify +template-data: + boilerplate-file: ../../../hack/boilerplate/boilerplate.generatego.txt + unroll-variadic: true packages: k8s.io/kubernetes/pkg/kubelet/pod: interfaces: - Manager: + Manager: {} diff --git a/pkg/kubelet/pod/testing/mock_manager.go b/pkg/kubelet/pod/testing/mocks.go similarity index 57% rename from pkg/kubelet/pod/testing/mock_manager.go rename to pkg/kubelet/pod/testing/mocks.go index a12a6eeff9ad9..b08370f5b9e5b 100644 --- a/pkg/kubelet/pod/testing/mock_manager.go +++ b/pkg/kubelet/pod/testing/mocks.go @@ -14,18 +14,32 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by mockery v2.53.3. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package testing import ( mock "github.com/stretchr/testify/mock" - kubelettypes "k8s.io/kubernetes/pkg/kubelet/types" + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + types0 "k8s.io/kubernetes/pkg/kubelet/types" +) + +// NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockManager(t interface { + mock.TestingT + Cleanup(func()) +}) *MockManager { + mock := &MockManager{} + mock.Mock.Test(t) - types "k8s.io/apimachinery/pkg/types" + t.Cleanup(func() { mock.AssertExpectations(t) }) - v1 "k8s.io/api/core/v1" -) + return mock +} // MockManager is an autogenerated mock type for the Manager type type MockManager struct { @@ -40,9 +54,10 @@ func (_m *MockManager) EXPECT() *MockManager_Expecter { return &MockManager_Expecter{mock: &_m.Mock} } -// AddPod provides a mock function with given fields: _a0 -func (_m *MockManager) AddPod(_a0 *v1.Pod) { - _m.Called(_a0) +// AddPod provides a mock function for the type MockManager +func (_mock *MockManager) AddPod(pod *v1.Pod) { + _mock.Called(pod) + return } // MockManager_AddPod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddPod' @@ -51,14 +66,20 @@ type MockManager_AddPod_Call struct { } // AddPod is a helper method to define mock.On call -// - _a0 *v1.Pod -func (_e *MockManager_Expecter) AddPod(_a0 interface{}) *MockManager_AddPod_Call { - return &MockManager_AddPod_Call{Call: _e.mock.On("AddPod", _a0)} +// - pod *v1.Pod +func (_e *MockManager_Expecter) AddPod(pod interface{}) *MockManager_AddPod_Call { + return &MockManager_AddPod_Call{Call: _e.mock.On("AddPod", pod)} } -func (_c *MockManager_AddPod_Call) Run(run func(_a0 *v1.Pod)) *MockManager_AddPod_Call { +func (_c *MockManager_AddPod_Call) Run(run func(pod *v1.Pod)) *MockManager_AddPod_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod)) + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + run( + arg0, + ) }) return _c } @@ -68,14 +89,14 @@ func (_c *MockManager_AddPod_Call) Return() *MockManager_AddPod_Call { return _c } -func (_c *MockManager_AddPod_Call) RunAndReturn(run func(*v1.Pod)) *MockManager_AddPod_Call { +func (_c *MockManager_AddPod_Call) RunAndReturn(run func(pod *v1.Pod)) *MockManager_AddPod_Call { _c.Run(run) return _c } -// GetMirrorPodByPod provides a mock function with given fields: _a0 -func (_m *MockManager) GetMirrorPodByPod(_a0 *v1.Pod) (*v1.Pod, bool) { - ret := _m.Called(_a0) +// GetMirrorPodByPod provides a mock function for the type MockManager +func (_mock *MockManager) GetMirrorPodByPod(pod *v1.Pod) (*v1.Pod, bool) { + ret := _mock.Called(pod) if len(ret) == 0 { panic("no return value specified for GetMirrorPodByPod") @@ -83,23 +104,21 @@ func (_m *MockManager) GetMirrorPodByPod(_a0 *v1.Pod) (*v1.Pod, bool) { var r0 *v1.Pod var r1 bool - if rf, ok := ret.Get(0).(func(*v1.Pod) (*v1.Pod, bool)); ok { - return rf(_a0) + if returnFunc, ok := ret.Get(0).(func(*v1.Pod) (*v1.Pod, bool)); ok { + return returnFunc(pod) } - if rf, ok := ret.Get(0).(func(*v1.Pod) *v1.Pod); ok { - r0 = rf(_a0) + if returnFunc, ok := ret.Get(0).(func(*v1.Pod) *v1.Pod); ok { + r0 = returnFunc(pod) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1.Pod) } } - - if rf, ok := ret.Get(1).(func(*v1.Pod) bool); ok { - r1 = rf(_a0) + if returnFunc, ok := ret.Get(1).(func(*v1.Pod) bool); ok { + r1 = returnFunc(pod) } else { r1 = ret.Get(1).(bool) } - return r0, r1 } @@ -109,31 +128,37 @@ type MockManager_GetMirrorPodByPod_Call struct { } // GetMirrorPodByPod is a helper method to define mock.On call -// - _a0 *v1.Pod -func (_e *MockManager_Expecter) GetMirrorPodByPod(_a0 interface{}) *MockManager_GetMirrorPodByPod_Call { - return &MockManager_GetMirrorPodByPod_Call{Call: _e.mock.On("GetMirrorPodByPod", _a0)} +// - pod *v1.Pod +func (_e *MockManager_Expecter) GetMirrorPodByPod(pod interface{}) *MockManager_GetMirrorPodByPod_Call { + return &MockManager_GetMirrorPodByPod_Call{Call: _e.mock.On("GetMirrorPodByPod", pod)} } -func (_c *MockManager_GetMirrorPodByPod_Call) Run(run func(_a0 *v1.Pod)) *MockManager_GetMirrorPodByPod_Call { +func (_c *MockManager_GetMirrorPodByPod_Call) Run(run func(pod *v1.Pod)) *MockManager_GetMirrorPodByPod_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod)) + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + run( + arg0, + ) }) return _c } -func (_c *MockManager_GetMirrorPodByPod_Call) Return(_a0 *v1.Pod, _a1 bool) *MockManager_GetMirrorPodByPod_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockManager_GetMirrorPodByPod_Call) Return(pod1 *v1.Pod, b bool) *MockManager_GetMirrorPodByPod_Call { + _c.Call.Return(pod1, b) return _c } -func (_c *MockManager_GetMirrorPodByPod_Call) RunAndReturn(run func(*v1.Pod) (*v1.Pod, bool)) *MockManager_GetMirrorPodByPod_Call { +func (_c *MockManager_GetMirrorPodByPod_Call) RunAndReturn(run func(pod *v1.Pod) (*v1.Pod, bool)) *MockManager_GetMirrorPodByPod_Call { _c.Call.Return(run) return _c } -// GetPodAndMirrorPod provides a mock function with given fields: _a0 -func (_m *MockManager) GetPodAndMirrorPod(_a0 *v1.Pod) (*v1.Pod, *v1.Pod, bool) { - ret := _m.Called(_a0) +// GetPodAndMirrorPod provides a mock function for the type MockManager +func (_mock *MockManager) GetPodAndMirrorPod(pod *v1.Pod) (*v1.Pod, *v1.Pod, bool) { + ret := _mock.Called(pod) if len(ret) == 0 { panic("no return value specified for GetPodAndMirrorPod") @@ -142,31 +167,28 @@ func (_m *MockManager) GetPodAndMirrorPod(_a0 *v1.Pod) (*v1.Pod, *v1.Pod, bool) var r0 *v1.Pod var r1 *v1.Pod var r2 bool - if rf, ok := ret.Get(0).(func(*v1.Pod) (*v1.Pod, *v1.Pod, bool)); ok { - return rf(_a0) + if returnFunc, ok := ret.Get(0).(func(*v1.Pod) (*v1.Pod, *v1.Pod, bool)); ok { + return returnFunc(pod) } - if rf, ok := ret.Get(0).(func(*v1.Pod) *v1.Pod); ok { - r0 = rf(_a0) + if returnFunc, ok := ret.Get(0).(func(*v1.Pod) *v1.Pod); ok { + r0 = returnFunc(pod) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1.Pod) } } - - if rf, ok := ret.Get(1).(func(*v1.Pod) *v1.Pod); ok { - r1 = rf(_a0) + if returnFunc, ok := ret.Get(1).(func(*v1.Pod) *v1.Pod); ok { + r1 = returnFunc(pod) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*v1.Pod) } } - - if rf, ok := ret.Get(2).(func(*v1.Pod) bool); ok { - r2 = rf(_a0) + if returnFunc, ok := ret.Get(2).(func(*v1.Pod) bool); ok { + r2 = returnFunc(pod) } else { r2 = ret.Get(2).(bool) } - return r0, r1, r2 } @@ -176,31 +198,37 @@ type MockManager_GetPodAndMirrorPod_Call struct { } // GetPodAndMirrorPod is a helper method to define mock.On call -// - _a0 *v1.Pod -func (_e *MockManager_Expecter) GetPodAndMirrorPod(_a0 interface{}) *MockManager_GetPodAndMirrorPod_Call { - return &MockManager_GetPodAndMirrorPod_Call{Call: _e.mock.On("GetPodAndMirrorPod", _a0)} +// - pod *v1.Pod +func (_e *MockManager_Expecter) GetPodAndMirrorPod(pod interface{}) *MockManager_GetPodAndMirrorPod_Call { + return &MockManager_GetPodAndMirrorPod_Call{Call: _e.mock.On("GetPodAndMirrorPod", pod)} } -func (_c *MockManager_GetPodAndMirrorPod_Call) Run(run func(_a0 *v1.Pod)) *MockManager_GetPodAndMirrorPod_Call { +func (_c *MockManager_GetPodAndMirrorPod_Call) Run(run func(pod *v1.Pod)) *MockManager_GetPodAndMirrorPod_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod)) + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + run( + arg0, + ) }) return _c } -func (_c *MockManager_GetPodAndMirrorPod_Call) Return(_a0 *v1.Pod, mirrorPod *v1.Pod, wasMirror bool) *MockManager_GetPodAndMirrorPod_Call { - _c.Call.Return(_a0, mirrorPod, wasMirror) +func (_c *MockManager_GetPodAndMirrorPod_Call) Return(pod1 *v1.Pod, mirrorPod *v1.Pod, wasMirror bool) *MockManager_GetPodAndMirrorPod_Call { + _c.Call.Return(pod1, mirrorPod, wasMirror) return _c } -func (_c *MockManager_GetPodAndMirrorPod_Call) RunAndReturn(run func(*v1.Pod) (*v1.Pod, *v1.Pod, bool)) *MockManager_GetPodAndMirrorPod_Call { +func (_c *MockManager_GetPodAndMirrorPod_Call) RunAndReturn(run func(pod *v1.Pod) (*v1.Pod, *v1.Pod, bool)) *MockManager_GetPodAndMirrorPod_Call { _c.Call.Return(run) return _c } -// GetPodByFullName provides a mock function with given fields: podFullName -func (_m *MockManager) GetPodByFullName(podFullName string) (*v1.Pod, bool) { - ret := _m.Called(podFullName) +// GetPodByFullName provides a mock function for the type MockManager +func (_mock *MockManager) GetPodByFullName(podFullName string) (*v1.Pod, bool) { + ret := _mock.Called(podFullName) if len(ret) == 0 { panic("no return value specified for GetPodByFullName") @@ -208,23 +236,21 @@ func (_m *MockManager) GetPodByFullName(podFullName string) (*v1.Pod, bool) { var r0 *v1.Pod var r1 bool - if rf, ok := ret.Get(0).(func(string) (*v1.Pod, bool)); ok { - return rf(podFullName) + if returnFunc, ok := ret.Get(0).(func(string) (*v1.Pod, bool)); ok { + return returnFunc(podFullName) } - if rf, ok := ret.Get(0).(func(string) *v1.Pod); ok { - r0 = rf(podFullName) + if returnFunc, ok := ret.Get(0).(func(string) *v1.Pod); ok { + r0 = returnFunc(podFullName) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1.Pod) } } - - if rf, ok := ret.Get(1).(func(string) bool); ok { - r1 = rf(podFullName) + if returnFunc, ok := ret.Get(1).(func(string) bool); ok { + r1 = returnFunc(podFullName) } else { r1 = ret.Get(1).(bool) } - return r0, r1 } @@ -241,24 +267,30 @@ func (_e *MockManager_Expecter) GetPodByFullName(podFullName interface{}) *MockM func (_c *MockManager_GetPodByFullName_Call) Run(run func(podFullName string)) *MockManager_GetPodByFullName_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockManager_GetPodByFullName_Call) Return(_a0 *v1.Pod, _a1 bool) *MockManager_GetPodByFullName_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockManager_GetPodByFullName_Call) Return(pod *v1.Pod, b bool) *MockManager_GetPodByFullName_Call { + _c.Call.Return(pod, b) return _c } -func (_c *MockManager_GetPodByFullName_Call) RunAndReturn(run func(string) (*v1.Pod, bool)) *MockManager_GetPodByFullName_Call { +func (_c *MockManager_GetPodByFullName_Call) RunAndReturn(run func(podFullName string) (*v1.Pod, bool)) *MockManager_GetPodByFullName_Call { _c.Call.Return(run) return _c } -// GetPodByMirrorPod provides a mock function with given fields: _a0 -func (_m *MockManager) GetPodByMirrorPod(_a0 *v1.Pod) (*v1.Pod, bool) { - ret := _m.Called(_a0) +// GetPodByMirrorPod provides a mock function for the type MockManager +func (_mock *MockManager) GetPodByMirrorPod(pod *v1.Pod) (*v1.Pod, bool) { + ret := _mock.Called(pod) if len(ret) == 0 { panic("no return value specified for GetPodByMirrorPod") @@ -266,23 +298,21 @@ func (_m *MockManager) GetPodByMirrorPod(_a0 *v1.Pod) (*v1.Pod, bool) { var r0 *v1.Pod var r1 bool - if rf, ok := ret.Get(0).(func(*v1.Pod) (*v1.Pod, bool)); ok { - return rf(_a0) + if returnFunc, ok := ret.Get(0).(func(*v1.Pod) (*v1.Pod, bool)); ok { + return returnFunc(pod) } - if rf, ok := ret.Get(0).(func(*v1.Pod) *v1.Pod); ok { - r0 = rf(_a0) + if returnFunc, ok := ret.Get(0).(func(*v1.Pod) *v1.Pod); ok { + r0 = returnFunc(pod) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1.Pod) } } - - if rf, ok := ret.Get(1).(func(*v1.Pod) bool); ok { - r1 = rf(_a0) + if returnFunc, ok := ret.Get(1).(func(*v1.Pod) bool); ok { + r1 = returnFunc(pod) } else { r1 = ret.Get(1).(bool) } - return r0, r1 } @@ -292,31 +322,37 @@ type MockManager_GetPodByMirrorPod_Call struct { } // GetPodByMirrorPod is a helper method to define mock.On call -// - _a0 *v1.Pod -func (_e *MockManager_Expecter) GetPodByMirrorPod(_a0 interface{}) *MockManager_GetPodByMirrorPod_Call { - return &MockManager_GetPodByMirrorPod_Call{Call: _e.mock.On("GetPodByMirrorPod", _a0)} +// - pod *v1.Pod +func (_e *MockManager_Expecter) GetPodByMirrorPod(pod interface{}) *MockManager_GetPodByMirrorPod_Call { + return &MockManager_GetPodByMirrorPod_Call{Call: _e.mock.On("GetPodByMirrorPod", pod)} } -func (_c *MockManager_GetPodByMirrorPod_Call) Run(run func(_a0 *v1.Pod)) *MockManager_GetPodByMirrorPod_Call { +func (_c *MockManager_GetPodByMirrorPod_Call) Run(run func(pod *v1.Pod)) *MockManager_GetPodByMirrorPod_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod)) + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + run( + arg0, + ) }) return _c } -func (_c *MockManager_GetPodByMirrorPod_Call) Return(_a0 *v1.Pod, _a1 bool) *MockManager_GetPodByMirrorPod_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockManager_GetPodByMirrorPod_Call) Return(pod1 *v1.Pod, b bool) *MockManager_GetPodByMirrorPod_Call { + _c.Call.Return(pod1, b) return _c } -func (_c *MockManager_GetPodByMirrorPod_Call) RunAndReturn(run func(*v1.Pod) (*v1.Pod, bool)) *MockManager_GetPodByMirrorPod_Call { +func (_c *MockManager_GetPodByMirrorPod_Call) RunAndReturn(run func(pod *v1.Pod) (*v1.Pod, bool)) *MockManager_GetPodByMirrorPod_Call { _c.Call.Return(run) return _c } -// GetPodByName provides a mock function with given fields: namespace, name -func (_m *MockManager) GetPodByName(namespace string, name string) (*v1.Pod, bool) { - ret := _m.Called(namespace, name) +// GetPodByName provides a mock function for the type MockManager +func (_mock *MockManager) GetPodByName(namespace string, name string) (*v1.Pod, bool) { + ret := _mock.Called(namespace, name) if len(ret) == 0 { panic("no return value specified for GetPodByName") @@ -324,23 +360,21 @@ func (_m *MockManager) GetPodByName(namespace string, name string) (*v1.Pod, boo var r0 *v1.Pod var r1 bool - if rf, ok := ret.Get(0).(func(string, string) (*v1.Pod, bool)); ok { - return rf(namespace, name) + if returnFunc, ok := ret.Get(0).(func(string, string) (*v1.Pod, bool)); ok { + return returnFunc(namespace, name) } - if rf, ok := ret.Get(0).(func(string, string) *v1.Pod); ok { - r0 = rf(namespace, name) + if returnFunc, ok := ret.Get(0).(func(string, string) *v1.Pod); ok { + r0 = returnFunc(namespace, name) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1.Pod) } } - - if rf, ok := ret.Get(1).(func(string, string) bool); ok { - r1 = rf(namespace, name) + if returnFunc, ok := ret.Get(1).(func(string, string) bool); ok { + r1 = returnFunc(namespace, name) } else { r1 = ret.Get(1).(bool) } - return r0, r1 } @@ -358,24 +392,35 @@ func (_e *MockManager_Expecter) GetPodByName(namespace interface{}, name interfa func (_c *MockManager_GetPodByName_Call) Run(run func(namespace string, name string)) *MockManager_GetPodByName_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockManager_GetPodByName_Call) Return(_a0 *v1.Pod, _a1 bool) *MockManager_GetPodByName_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockManager_GetPodByName_Call) Return(pod *v1.Pod, b bool) *MockManager_GetPodByName_Call { + _c.Call.Return(pod, b) return _c } -func (_c *MockManager_GetPodByName_Call) RunAndReturn(run func(string, string) (*v1.Pod, bool)) *MockManager_GetPodByName_Call { +func (_c *MockManager_GetPodByName_Call) RunAndReturn(run func(namespace string, name string) (*v1.Pod, bool)) *MockManager_GetPodByName_Call { _c.Call.Return(run) return _c } -// GetPodByUID provides a mock function with given fields: _a0 -func (_m *MockManager) GetPodByUID(_a0 types.UID) (*v1.Pod, bool) { - ret := _m.Called(_a0) +// GetPodByUID provides a mock function for the type MockManager +func (_mock *MockManager) GetPodByUID(uID types.UID) (*v1.Pod, bool) { + ret := _mock.Called(uID) if len(ret) == 0 { panic("no return value specified for GetPodByUID") @@ -383,23 +428,21 @@ func (_m *MockManager) GetPodByUID(_a0 types.UID) (*v1.Pod, bool) { var r0 *v1.Pod var r1 bool - if rf, ok := ret.Get(0).(func(types.UID) (*v1.Pod, bool)); ok { - return rf(_a0) + if returnFunc, ok := ret.Get(0).(func(types.UID) (*v1.Pod, bool)); ok { + return returnFunc(uID) } - if rf, ok := ret.Get(0).(func(types.UID) *v1.Pod); ok { - r0 = rf(_a0) + if returnFunc, ok := ret.Get(0).(func(types.UID) *v1.Pod); ok { + r0 = returnFunc(uID) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1.Pod) } } - - if rf, ok := ret.Get(1).(func(types.UID) bool); ok { - r1 = rf(_a0) + if returnFunc, ok := ret.Get(1).(func(types.UID) bool); ok { + r1 = returnFunc(uID) } else { r1 = ret.Get(1).(bool) } - return r0, r1 } @@ -409,45 +452,50 @@ type MockManager_GetPodByUID_Call struct { } // GetPodByUID is a helper method to define mock.On call -// - _a0 types.UID -func (_e *MockManager_Expecter) GetPodByUID(_a0 interface{}) *MockManager_GetPodByUID_Call { - return &MockManager_GetPodByUID_Call{Call: _e.mock.On("GetPodByUID", _a0)} +// - uID types.UID +func (_e *MockManager_Expecter) GetPodByUID(uID interface{}) *MockManager_GetPodByUID_Call { + return &MockManager_GetPodByUID_Call{Call: _e.mock.On("GetPodByUID", uID)} } -func (_c *MockManager_GetPodByUID_Call) Run(run func(_a0 types.UID)) *MockManager_GetPodByUID_Call { +func (_c *MockManager_GetPodByUID_Call) Run(run func(uID types.UID)) *MockManager_GetPodByUID_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.UID)) + var arg0 types.UID + if args[0] != nil { + arg0 = args[0].(types.UID) + } + run( + arg0, + ) }) return _c } -func (_c *MockManager_GetPodByUID_Call) Return(_a0 *v1.Pod, _a1 bool) *MockManager_GetPodByUID_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockManager_GetPodByUID_Call) Return(pod *v1.Pod, b bool) *MockManager_GetPodByUID_Call { + _c.Call.Return(pod, b) return _c } -func (_c *MockManager_GetPodByUID_Call) RunAndReturn(run func(types.UID) (*v1.Pod, bool)) *MockManager_GetPodByUID_Call { +func (_c *MockManager_GetPodByUID_Call) RunAndReturn(run func(uID types.UID) (*v1.Pod, bool)) *MockManager_GetPodByUID_Call { _c.Call.Return(run) return _c } -// GetPods provides a mock function with no fields -func (_m *MockManager) GetPods() []*v1.Pod { - ret := _m.Called() +// GetPods provides a mock function for the type MockManager +func (_mock *MockManager) GetPods() []*v1.Pod { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPods") } var r0 []*v1.Pod - if rf, ok := ret.Get(0).(func() []*v1.Pod); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []*v1.Pod); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*v1.Pod) } } - return r0 } @@ -468,8 +516,8 @@ func (_c *MockManager_GetPods_Call) Run(run func()) *MockManager_GetPods_Call { return _c } -func (_c *MockManager_GetPods_Call) Return(_a0 []*v1.Pod) *MockManager_GetPods_Call { - _c.Call.Return(_a0) +func (_c *MockManager_GetPods_Call) Return(pods []*v1.Pod) *MockManager_GetPods_Call { + _c.Call.Return(pods) return _c } @@ -478,9 +526,9 @@ func (_c *MockManager_GetPods_Call) RunAndReturn(run func() []*v1.Pod) *MockMana return _c } -// GetPodsAndMirrorPods provides a mock function with no fields -func (_m *MockManager) GetPodsAndMirrorPods() ([]*v1.Pod, []*v1.Pod, []string) { - ret := _m.Called() +// GetPodsAndMirrorPods provides a mock function for the type MockManager +func (_mock *MockManager) GetPodsAndMirrorPods() ([]*v1.Pod, []*v1.Pod, []string) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPodsAndMirrorPods") @@ -489,33 +537,30 @@ func (_m *MockManager) GetPodsAndMirrorPods() ([]*v1.Pod, []*v1.Pod, []string) { var r0 []*v1.Pod var r1 []*v1.Pod var r2 []string - if rf, ok := ret.Get(0).(func() ([]*v1.Pod, []*v1.Pod, []string)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]*v1.Pod, []*v1.Pod, []string)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []*v1.Pod); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []*v1.Pod); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*v1.Pod) } } - - if rf, ok := ret.Get(1).(func() []*v1.Pod); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() []*v1.Pod); ok { + r1 = returnFunc() } else { if ret.Get(1) != nil { r1 = ret.Get(1).([]*v1.Pod) } } - - if rf, ok := ret.Get(2).(func() []string); ok { - r2 = rf() + if returnFunc, ok := ret.Get(2).(func() []string); ok { + r2 = returnFunc() } else { if ret.Get(2) != nil { r2 = ret.Get(2).([]string) } } - return r0, r1, r2 } @@ -546,23 +591,22 @@ func (_c *MockManager_GetPodsAndMirrorPods_Call) RunAndReturn(run func() ([]*v1. return _c } -// GetStaticPodToMirrorPodMap provides a mock function with no fields -func (_m *MockManager) GetStaticPodToMirrorPodMap() map[*v1.Pod]*v1.Pod { - ret := _m.Called() +// GetStaticPodToMirrorPodMap provides a mock function for the type MockManager +func (_mock *MockManager) GetStaticPodToMirrorPodMap() map[*v1.Pod]*v1.Pod { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetStaticPodToMirrorPodMap") } var r0 map[*v1.Pod]*v1.Pod - if rf, ok := ret.Get(0).(func() map[*v1.Pod]*v1.Pod); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() map[*v1.Pod]*v1.Pod); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[*v1.Pod]*v1.Pod) } } - return r0 } @@ -583,8 +627,8 @@ func (_c *MockManager_GetStaticPodToMirrorPodMap_Call) Run(run func()) *MockMana return _c } -func (_c *MockManager_GetStaticPodToMirrorPodMap_Call) Return(_a0 map[*v1.Pod]*v1.Pod) *MockManager_GetStaticPodToMirrorPodMap_Call { - _c.Call.Return(_a0) +func (_c *MockManager_GetStaticPodToMirrorPodMap_Call) Return(podToPod map[*v1.Pod]*v1.Pod) *MockManager_GetStaticPodToMirrorPodMap_Call { + _c.Call.Return(podToPod) return _c } @@ -593,35 +637,33 @@ func (_c *MockManager_GetStaticPodToMirrorPodMap_Call) RunAndReturn(run func() m return _c } -// GetUIDTranslations provides a mock function with no fields -func (_m *MockManager) GetUIDTranslations() (map[kubelettypes.ResolvedPodUID]kubelettypes.MirrorPodUID, map[kubelettypes.MirrorPodUID]kubelettypes.ResolvedPodUID) { - ret := _m.Called() +// GetUIDTranslations provides a mock function for the type MockManager +func (_mock *MockManager) GetUIDTranslations() (map[types0.ResolvedPodUID]types0.MirrorPodUID, map[types0.MirrorPodUID]types0.ResolvedPodUID) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetUIDTranslations") } - var r0 map[kubelettypes.ResolvedPodUID]kubelettypes.MirrorPodUID - var r1 map[kubelettypes.MirrorPodUID]kubelettypes.ResolvedPodUID - if rf, ok := ret.Get(0).(func() (map[kubelettypes.ResolvedPodUID]kubelettypes.MirrorPodUID, map[kubelettypes.MirrorPodUID]kubelettypes.ResolvedPodUID)); ok { - return rf() + var r0 map[types0.ResolvedPodUID]types0.MirrorPodUID + var r1 map[types0.MirrorPodUID]types0.ResolvedPodUID + if returnFunc, ok := ret.Get(0).(func() (map[types0.ResolvedPodUID]types0.MirrorPodUID, map[types0.MirrorPodUID]types0.ResolvedPodUID)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() map[kubelettypes.ResolvedPodUID]kubelettypes.MirrorPodUID); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() map[types0.ResolvedPodUID]types0.MirrorPodUID); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(map[kubelettypes.ResolvedPodUID]kubelettypes.MirrorPodUID) + r0 = ret.Get(0).(map[types0.ResolvedPodUID]types0.MirrorPodUID) } } - - if rf, ok := ret.Get(1).(func() map[kubelettypes.MirrorPodUID]kubelettypes.ResolvedPodUID); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() map[types0.MirrorPodUID]types0.ResolvedPodUID); ok { + r1 = returnFunc() } else { if ret.Get(1) != nil { - r1 = ret.Get(1).(map[kubelettypes.MirrorPodUID]kubelettypes.ResolvedPodUID) + r1 = ret.Get(1).(map[types0.MirrorPodUID]types0.ResolvedPodUID) } } - return r0, r1 } @@ -642,19 +684,20 @@ func (_c *MockManager_GetUIDTranslations_Call) Run(run func()) *MockManager_GetU return _c } -func (_c *MockManager_GetUIDTranslations_Call) Return(podToMirror map[kubelettypes.ResolvedPodUID]kubelettypes.MirrorPodUID, mirrorToPod map[kubelettypes.MirrorPodUID]kubelettypes.ResolvedPodUID) *MockManager_GetUIDTranslations_Call { +func (_c *MockManager_GetUIDTranslations_Call) Return(podToMirror map[types0.ResolvedPodUID]types0.MirrorPodUID, mirrorToPod map[types0.MirrorPodUID]types0.ResolvedPodUID) *MockManager_GetUIDTranslations_Call { _c.Call.Return(podToMirror, mirrorToPod) return _c } -func (_c *MockManager_GetUIDTranslations_Call) RunAndReturn(run func() (map[kubelettypes.ResolvedPodUID]kubelettypes.MirrorPodUID, map[kubelettypes.MirrorPodUID]kubelettypes.ResolvedPodUID)) *MockManager_GetUIDTranslations_Call { +func (_c *MockManager_GetUIDTranslations_Call) RunAndReturn(run func() (map[types0.ResolvedPodUID]types0.MirrorPodUID, map[types0.MirrorPodUID]types0.ResolvedPodUID)) *MockManager_GetUIDTranslations_Call { _c.Call.Return(run) return _c } -// RemovePod provides a mock function with given fields: _a0 -func (_m *MockManager) RemovePod(_a0 *v1.Pod) { - _m.Called(_a0) +// RemovePod provides a mock function for the type MockManager +func (_mock *MockManager) RemovePod(pod *v1.Pod) { + _mock.Called(pod) + return } // MockManager_RemovePod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemovePod' @@ -663,14 +706,20 @@ type MockManager_RemovePod_Call struct { } // RemovePod is a helper method to define mock.On call -// - _a0 *v1.Pod -func (_e *MockManager_Expecter) RemovePod(_a0 interface{}) *MockManager_RemovePod_Call { - return &MockManager_RemovePod_Call{Call: _e.mock.On("RemovePod", _a0)} +// - pod *v1.Pod +func (_e *MockManager_Expecter) RemovePod(pod interface{}) *MockManager_RemovePod_Call { + return &MockManager_RemovePod_Call{Call: _e.mock.On("RemovePod", pod)} } -func (_c *MockManager_RemovePod_Call) Run(run func(_a0 *v1.Pod)) *MockManager_RemovePod_Call { +func (_c *MockManager_RemovePod_Call) Run(run func(pod *v1.Pod)) *MockManager_RemovePod_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod)) + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + run( + arg0, + ) }) return _c } @@ -680,14 +729,15 @@ func (_c *MockManager_RemovePod_Call) Return() *MockManager_RemovePod_Call { return _c } -func (_c *MockManager_RemovePod_Call) RunAndReturn(run func(*v1.Pod)) *MockManager_RemovePod_Call { +func (_c *MockManager_RemovePod_Call) RunAndReturn(run func(pod *v1.Pod)) *MockManager_RemovePod_Call { _c.Run(run) return _c } -// SetPods provides a mock function with given fields: pods -func (_m *MockManager) SetPods(pods []*v1.Pod) { - _m.Called(pods) +// SetPods provides a mock function for the type MockManager +func (_mock *MockManager) SetPods(pods []*v1.Pod) { + _mock.Called(pods) + return } // MockManager_SetPods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPods' @@ -703,7 +753,13 @@ func (_e *MockManager_Expecter) SetPods(pods interface{}) *MockManager_SetPods_C func (_c *MockManager_SetPods_Call) Run(run func(pods []*v1.Pod)) *MockManager_SetPods_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]*v1.Pod)) + var arg0 []*v1.Pod + if args[0] != nil { + arg0 = args[0].([]*v1.Pod) + } + run( + arg0, + ) }) return _c } @@ -713,26 +769,25 @@ func (_c *MockManager_SetPods_Call) Return() *MockManager_SetPods_Call { return _c } -func (_c *MockManager_SetPods_Call) RunAndReturn(run func([]*v1.Pod)) *MockManager_SetPods_Call { +func (_c *MockManager_SetPods_Call) RunAndReturn(run func(pods []*v1.Pod)) *MockManager_SetPods_Call { _c.Run(run) return _c } -// TranslatePodUID provides a mock function with given fields: uid -func (_m *MockManager) TranslatePodUID(uid types.UID) kubelettypes.ResolvedPodUID { - ret := _m.Called(uid) +// TranslatePodUID provides a mock function for the type MockManager +func (_mock *MockManager) TranslatePodUID(uid types.UID) types0.ResolvedPodUID { + ret := _mock.Called(uid) if len(ret) == 0 { panic("no return value specified for TranslatePodUID") } - var r0 kubelettypes.ResolvedPodUID - if rf, ok := ret.Get(0).(func(types.UID) kubelettypes.ResolvedPodUID); ok { - r0 = rf(uid) + var r0 types0.ResolvedPodUID + if returnFunc, ok := ret.Get(0).(func(types.UID) types0.ResolvedPodUID); ok { + r0 = returnFunc(uid) } else { - r0 = ret.Get(0).(kubelettypes.ResolvedPodUID) + r0 = ret.Get(0).(types0.ResolvedPodUID) } - return r0 } @@ -749,24 +804,31 @@ func (_e *MockManager_Expecter) TranslatePodUID(uid interface{}) *MockManager_Tr func (_c *MockManager_TranslatePodUID_Call) Run(run func(uid types.UID)) *MockManager_TranslatePodUID_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.UID)) + var arg0 types.UID + if args[0] != nil { + arg0 = args[0].(types.UID) + } + run( + arg0, + ) }) return _c } -func (_c *MockManager_TranslatePodUID_Call) Return(_a0 kubelettypes.ResolvedPodUID) *MockManager_TranslatePodUID_Call { - _c.Call.Return(_a0) +func (_c *MockManager_TranslatePodUID_Call) Return(resolvedPodUID types0.ResolvedPodUID) *MockManager_TranslatePodUID_Call { + _c.Call.Return(resolvedPodUID) return _c } -func (_c *MockManager_TranslatePodUID_Call) RunAndReturn(run func(types.UID) kubelettypes.ResolvedPodUID) *MockManager_TranslatePodUID_Call { +func (_c *MockManager_TranslatePodUID_Call) RunAndReturn(run func(uid types.UID) types0.ResolvedPodUID) *MockManager_TranslatePodUID_Call { _c.Call.Return(run) return _c } -// UpdatePod provides a mock function with given fields: _a0 -func (_m *MockManager) UpdatePod(_a0 *v1.Pod) { - _m.Called(_a0) +// UpdatePod provides a mock function for the type MockManager +func (_mock *MockManager) UpdatePod(pod *v1.Pod) { + _mock.Called(pod) + return } // MockManager_UpdatePod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePod' @@ -775,14 +837,20 @@ type MockManager_UpdatePod_Call struct { } // UpdatePod is a helper method to define mock.On call -// - _a0 *v1.Pod -func (_e *MockManager_Expecter) UpdatePod(_a0 interface{}) *MockManager_UpdatePod_Call { - return &MockManager_UpdatePod_Call{Call: _e.mock.On("UpdatePod", _a0)} +// - pod *v1.Pod +func (_e *MockManager_Expecter) UpdatePod(pod interface{}) *MockManager_UpdatePod_Call { + return &MockManager_UpdatePod_Call{Call: _e.mock.On("UpdatePod", pod)} } -func (_c *MockManager_UpdatePod_Call) Run(run func(_a0 *v1.Pod)) *MockManager_UpdatePod_Call { +func (_c *MockManager_UpdatePod_Call) Run(run func(pod *v1.Pod)) *MockManager_UpdatePod_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1.Pod)) + var arg0 *v1.Pod + if args[0] != nil { + arg0 = args[0].(*v1.Pod) + } + run( + arg0, + ) }) return _c } @@ -792,21 +860,7 @@ func (_c *MockManager_UpdatePod_Call) Return() *MockManager_UpdatePod_Call { return _c } -func (_c *MockManager_UpdatePod_Call) RunAndReturn(run func(*v1.Pod)) *MockManager_UpdatePod_Call { +func (_c *MockManager_UpdatePod_Call) RunAndReturn(run func(pod *v1.Pod)) *MockManager_UpdatePod_Call { _c.Run(run) return _c } - -// NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockManager(t interface { - mock.TestingT - Cleanup(func()) -}) *MockManager { - mock := &MockManager{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/pod_workers_test.go b/pkg/kubelet/pod_workers_test.go index b318ed630f032..eb9baaca6b84e 100644 --- a/pkg/kubelet/pod_workers_test.go +++ b/pkg/kubelet/pod_workers_test.go @@ -33,6 +33,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/tools/record" "k8s.io/kubernetes/pkg/kubelet/allocation" + "k8s.io/kubernetes/pkg/kubelet/cm" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" @@ -452,7 +453,7 @@ func createPodWorkers() (*podWorkers, *containertest.FakeRuntime, map[types.UID] time.Second, time.Millisecond, fakeCache, - allocation.NewInMemoryManager(nil, nil, nil, nil, nil, nil), + allocation.NewInMemoryManager(cm.NodeConfig{}, nil, nil, nil, nil, nil, nil), ) workers := w.(*podWorkers) workers.clock = clock @@ -1947,7 +1948,7 @@ func TestFakePodWorkers(t *testing.T) { time.Second, time.Second, fakeCache, - allocation.NewInMemoryManager(nil, nil, nil, nil, nil, nil), + allocation.NewInMemoryManager(cm.NodeConfig{}, nil, nil, nil, nil, nil, nil), ) fakePodWorkers := &fakePodWorkers{ syncPodFn: kubeletForFakeWorkers.SyncPod, diff --git a/pkg/kubelet/podcertificate/podcertificatemanager.go b/pkg/kubelet/podcertificate/podcertificatemanager.go index 77078c33fdf97..b30128f65ba95 100644 --- a/pkg/kubelet/podcertificate/podcertificatemanager.go +++ b/pkg/kubelet/podcertificate/podcertificatemanager.go @@ -317,14 +317,7 @@ func (m *IssuingManager) handleProjection(ctx context.Context, key projectionKey // If we can't find the pod anymore, it's been deleted. Clear all our // internal state associated with the pod and return a nil error so it // is forgotten from the queue. - - m.lock.Lock() - defer m.lock.Unlock() - for k := range m.credStore { - if k.Namespace == key.Namespace && k.PodName == key.PodName && k.PodUID == key.PodUID { - delete(m.credStore, k) - } - } + m.cleanupCredStoreForPod(key.Namespace, key.PodName, key.PodUID) return nil } @@ -608,12 +601,25 @@ func (m *IssuingManager) TrackPod(ctx context.Context, pod *corev1.Pod) { m.queueAllProjectionsForPod(pod.ObjectMeta.UID) } -// ForgetPod queues the pod's podCertificate projected volume sources for processing. +// cleanupCredStoreForPod removes all credStore entries for the specified pod. +func (m *IssuingManager) cleanupCredStoreForPod(namespace, podName, podUID string) { + m.lock.Lock() + defer m.lock.Unlock() + + for k := range m.credStore { + if k.Namespace == namespace && k.PodName == podName && k.PodUID == podUID { + delete(m.credStore, k) + } + } +} + +// ForgetPod cleans up all pod certificate credentials for the specified pod. // // The pod worker will notice that the pod no longer exists and clear any // pending and live credentials associated with it. func (m *IssuingManager) ForgetPod(ctx context.Context, pod *corev1.Pod) { - m.queueAllProjectionsForPod(pod.ObjectMeta.UID) + // Immediately clean up credStore entries for this pod to prevent race conditions + m.cleanupCredStoreForPod(pod.Namespace, pod.Name, string(pod.UID)) } // createPodCertificateRequest creates a PodCertificateRequest. diff --git a/pkg/kubelet/podcertificate/podcertificatemanager_test.go b/pkg/kubelet/podcertificate/podcertificatemanager_test.go index 76adf7c1959b5..65117ffd27f37 100644 --- a/pkg/kubelet/podcertificate/podcertificatemanager_test.go +++ b/pkg/kubelet/podcertificate/podcertificatemanager_test.go @@ -294,12 +294,12 @@ func TestFullFlow(t *testing.T) { // Because our fake podManager is based on an informer, we need to poll // until workloadPod is reflected in the informer. - err = wait.PollUntilContextTimeout(ctx, 1*time.Second, 15*time.Second, true, func(ctx context.Context) (bool, error) { + err = wait.PollUntilContextTimeout(ctx, 1*time.Second, 30*time.Second, true, func(ctx context.Context) (bool, error) { _, ok := node1PodManager.GetPodByUID(workloadPod.ObjectMeta.UID) return ok, nil }) if err != nil { - t.Fatalf("Error while waiting node1 podManager to know about workloadPod: %v", err) + t.Fatalf("Error while waiting for node1 podManager to know about workloadPod: %v", err) } node1PodCertificateManager.TrackPod(ctx, workloadPod) @@ -307,7 +307,7 @@ func TestFullFlow(t *testing.T) { // Within a few seconds, we should see a PodCertificateRequest created for // this pod. var gotPCR *certsv1alpha1.PodCertificateRequest - err = wait.PollUntilContextTimeout(ctx, 1*time.Second, 15*time.Second, true, func(ctx context.Context) (bool, error) { + err = wait.PollUntilContextTimeout(ctx, 1*time.Second, 30*time.Second, true, func(ctx context.Context) (bool, error) { pcrs, err := kc.CertificatesV1alpha1().PodCertificateRequests(workloadNS.ObjectMeta.Name).List(ctx, metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("while listing PodCertificateRequests: %w", err) @@ -353,7 +353,7 @@ func TestFullFlow(t *testing.T) { } // Wait some more time for the PCR to be issued. - err = wait.PollUntilContextTimeout(ctx, 1*time.Second, 15*time.Second, true, func(ctx context.Context) (bool, error) { + err = wait.PollUntilContextTimeout(ctx, 1*time.Second, 30*time.Second, true, func(ctx context.Context) (bool, error) { pcrs, err := kc.CertificatesV1alpha1().PodCertificateRequests(workloadNS.ObjectMeta.Name).List(ctx, metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("while listing PodCertificateRequests: %w", err) @@ -388,7 +388,7 @@ func TestFullFlow(t *testing.T) { // Now we know that the PCR was issued, so we can wait for the // podcertificate manager to return some valid credentials. - err = wait.PollUntilContextTimeout(ctx, 1*time.Second, 15*time.Second, true, func(ctx context.Context) (bool, error) { + err = wait.PollUntilContextTimeout(ctx, 1*time.Second, 30*time.Second, true, func(ctx context.Context) (bool, error) { _, _, err := node1PodCertificateManager.GetPodCertificateCredentialBundle(ctx, workloadPod.ObjectMeta.Namespace, workloadPod.ObjectMeta.Name, string(workloadPod.ObjectMeta.UID), "certificate", 0) if err != nil { return false, err @@ -413,7 +413,7 @@ func TestFullFlow(t *testing.T) { // Within a few seconds, we should see a new PodCertificateRequest created for // this pod. - err = wait.PollUntilContextTimeout(ctx, 1*time.Second, 15*time.Second, true, func(ctx context.Context) (bool, error) { + err = wait.PollUntilContextTimeout(ctx, 1*time.Second, 30*time.Second, true, func(ctx context.Context) (bool, error) { pcrs, err := kc.CertificatesV1alpha1().PodCertificateRequests(workloadNS.ObjectMeta.Name).List(ctx, metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("while listing PodCertificateRequests: %w", err) @@ -433,7 +433,7 @@ func TestFullFlow(t *testing.T) { // We will assume that the created PCR matches our expectations. // Wait some more time for the new PCR to be issued. - err = wait.PollUntilContextTimeout(ctx, 1*time.Second, 15*time.Second, true, func(ctx context.Context) (bool, error) { + err = wait.PollUntilContextTimeout(ctx, 1*time.Second, 30*time.Second, true, func(ctx context.Context) (bool, error) { pcrs, err := kc.CertificatesV1alpha1().PodCertificateRequests(workloadNS.ObjectMeta.Name).List(ctx, metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("while listing PodCertificateRequests: %w", err) @@ -461,7 +461,7 @@ func TestFullFlow(t *testing.T) { // Now we know that the PCR was issued, so we can wait for the // podcertificate manager to start returning the new certificate - err = wait.PollUntilContextTimeout(ctx, 1*time.Second, 15*time.Second, true, func(ctx context.Context) (bool, error) { + err = wait.PollUntilContextTimeout(ctx, 1*time.Second, 30*time.Second, true, func(ctx context.Context) (bool, error) { _, certChain, err := node1PodCertificateManager.GetPodCertificateCredentialBundle(ctx, workloadPod.ObjectMeta.Namespace, workloadPod.ObjectMeta.Name, string(workloadPod.ObjectMeta.UID), "certificate", 0) if err != nil { return false, err diff --git a/pkg/kubelet/preemption/preemption_test.go b/pkg/kubelet/preemption/preemption_test.go index 74591a59c63eb..886a8bc2d838a 100644 --- a/pkg/kubelet/preemption/preemption_test.go +++ b/pkg/kubelet/preemption/preemption_test.go @@ -26,6 +26,7 @@ import ( "k8s.io/client-go/tools/record" kubeapi "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/apis/scheduling" + "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/test/utils/ktesting" ) @@ -91,71 +92,120 @@ func getTestCriticalPodAdmissionHandler(podProvider *fakePodProvider, podKiller } } -func TestEvictPodsToFreeRequests(t *testing.T) { +func TestHandleAdmissionFailure(t *testing.T) { tCtx := ktesting.Init(t) type testRun struct { - testName string - isPodKillerWithError bool - inputPods []*v1.Pod - insufficientResources admissionRequirementList - expectErr bool - expectedOutput []*v1.Pod + testName string + isPodKillerWithError bool + inputPods []*v1.Pod + admitPodType string + failReasons []lifecycle.PredicateFailureReason + expectErr bool + expectedOutput []*v1.Pod + expectReasons []lifecycle.PredicateFailureReason } allPods := getTestPods() runs := []testRun{ { - testName: "critical pods cannot be preempted", - isPodKillerWithError: false, - inputPods: []*v1.Pod{allPods[clusterCritical]}, - insufficientResources: getAdmissionRequirementList(0, 0, 1), - expectErr: true, - expectedOutput: nil, + testName: "critical pods cannot be preempted - no other failure reason", + isPodKillerWithError: false, + inputPods: []*v1.Pod{allPods[clusterCritical]}, + admitPodType: clusterCritical, + failReasons: getPredicateFailureReasons(0, 0, 1, false), + expectErr: true, + expectedOutput: nil, + expectReasons: getPredicateFailureReasons(0, 0, 0, false), }, { - testName: "best effort pods are not preempted when attempting to free resources", - isPodKillerWithError: false, - inputPods: []*v1.Pod{allPods[bestEffort]}, - insufficientResources: getAdmissionRequirementList(0, 1, 0), - expectErr: true, - expectedOutput: nil, + testName: "non-critical pod should not trigger eviction - no other failure reason", + isPodKillerWithError: false, + inputPods: []*v1.Pod{allPods[burstable]}, + admitPodType: guaranteed, + failReasons: getPredicateFailureReasons(0, 1, 0, false), + expectErr: false, + expectedOutput: nil, + expectReasons: getPredicateFailureReasons(0, 1, 0, false), }, { - testName: "multiple pods evicted", + testName: "best effort pods are not preempted when attempting to free resources - no other failure reason", + isPodKillerWithError: false, + inputPods: []*v1.Pod{allPods[bestEffort]}, + admitPodType: clusterCritical, + failReasons: getPredicateFailureReasons(0, 1, 0, false), + expectErr: true, + expectedOutput: nil, + expectReasons: getPredicateFailureReasons(0, 0, 0, false), + }, + { + testName: "multiple pods evicted - no other failure reason", isPodKillerWithError: false, inputPods: []*v1.Pod{ allPods[clusterCritical], allPods[bestEffort], allPods[burstable], allPods[highRequestBurstable], allPods[guaranteed], allPods[highRequestGuaranteed]}, - insufficientResources: getAdmissionRequirementList(0, 550, 0), - expectErr: false, - expectedOutput: []*v1.Pod{allPods[highRequestBurstable], allPods[highRequestGuaranteed]}, + admitPodType: clusterCritical, + failReasons: getPredicateFailureReasons(0, 550, 0, false), + expectErr: false, + expectedOutput: []*v1.Pod{allPods[highRequestBurstable], allPods[highRequestGuaranteed]}, + expectReasons: getPredicateFailureReasons(0, 0, 0, false), }, { - testName: "multiple pods with eviction error", + testName: "multiple pods with eviction error - no other failure reason", isPodKillerWithError: true, inputPods: []*v1.Pod{ allPods[clusterCritical], allPods[bestEffort], allPods[burstable], allPods[highRequestBurstable], allPods[guaranteed], allPods[highRequestGuaranteed]}, - insufficientResources: getAdmissionRequirementList(0, 550, 0), - expectErr: false, - expectedOutput: nil, + admitPodType: clusterCritical, + failReasons: getPredicateFailureReasons(0, 550, 0, false), + expectErr: false, + expectedOutput: nil, + expectReasons: getPredicateFailureReasons(0, 0, 0, false), + }, + { + testName: "non-critical pod should not trigger eviction - with other failure reason", + isPodKillerWithError: false, + inputPods: []*v1.Pod{allPods[burstable]}, + admitPodType: guaranteed, + failReasons: getPredicateFailureReasons(0, 1, 0, true), + expectErr: false, + expectedOutput: nil, + expectReasons: getPredicateFailureReasons(0, 1, 0, true), + }, + { + testName: "critical pods cannot be preempted - with other failure reason", + isPodKillerWithError: false, + inputPods: []*v1.Pod{allPods[clusterCritical]}, + admitPodType: clusterCritical, + failReasons: getPredicateFailureReasons(0, 0, 1, true), + expectErr: false, + expectedOutput: nil, + expectReasons: getPredicateFailureReasons(0, 0, 0, true), }, } for _, r := range runs { t.Run(r.testName, func(t *testing.T) { podProvider := newFakePodProvider() podKiller := newFakePodKiller(r.isPodKillerWithError) + defer podKiller.clear() criticalPodAdmissionHandler := getTestCriticalPodAdmissionHandler(podProvider, podKiller) podProvider.setPods(r.inputPods) - outErr := criticalPodAdmissionHandler.evictPodsToFreeRequests(tCtx, allPods[clusterCritical], r.insufficientResources) + admitPodRef := allPods[r.admitPodType] + filteredReason, outErr := criticalPodAdmissionHandler.HandleAdmissionFailure(tCtx, admitPodRef, r.failReasons) outputPods := podKiller.getKilledPods() if !r.expectErr && outErr != nil { - t.Errorf("evictPodsToFreeRequests returned an unexpected error during the %s test. Err: %v", r.testName, outErr) + t.Errorf("HandleAdmissionFailure returned an unexpected error during the %s test. Err: %v", r.testName, outErr) } else if r.expectErr && outErr == nil { - t.Errorf("evictPodsToFreeRequests expected an error but returned a successful output=%v during the %s test.", outputPods, r.testName) + t.Errorf("HandleAdmissionFailure expected an error but returned a successful output=%v during the %s test.", outputPods, r.testName) } else if !podListEqual(r.expectedOutput, outputPods) { - t.Errorf("evictPodsToFreeRequests expected %v but got %v during the %s test.", r.expectedOutput, outputPods, r.testName) + t.Errorf("HandleAdmissionFailure expected %v but got %v during the %s test.", r.expectedOutput, outputPods, r.testName) + } + if len(filteredReason) != len(r.expectReasons) { + t.Fatalf("expect reasons %v, got reasons %v", r.expectReasons, filteredReason) + } + for i, reason := range filteredReason { + if reason.GetReason() != r.expectReasons[i].GetReason() { + t.Fatalf("expect reasons %v, got reasons %v", r.expectReasons, filteredReason) + } } - podKiller.clear() }) } } @@ -392,6 +442,84 @@ func TestAdmissionRequirementsSubtract(t *testing.T) { } } +func TestSmallerResourceRequest(t *testing.T) { + type testRun struct { + testName string + pod1 *v1.Pod + pod2 *v1.Pod + expectedResult bool + } + + podWithNoRequests := getPodWithResources("no-requests", v1.ResourceRequirements{}) + podWithLowMemory := getPodWithResources("low-memory", v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceMemory: resource.MustParse("50Mi"), + v1.ResourceCPU: resource.MustParse("100m"), + }, + }) + podWithHighMemory := getPodWithResources("high-memory", v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceMemory: resource.MustParse("200Mi"), + v1.ResourceCPU: resource.MustParse("100m"), + }, + }) + podWithHighCPU := getPodWithResources("high-cpu", v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceMemory: resource.MustParse("50Mi"), + v1.ResourceCPU: resource.MustParse("200m"), + }, + }) + runs := []testRun{ + { + testName: "some requests vs no requests should return false", + pod1: podWithLowMemory, + pod2: podWithNoRequests, + expectedResult: false, + }, + { + testName: "lower memory should return true", + pod1: podWithLowMemory, + pod2: podWithHighMemory, + expectedResult: true, + }, + { + testName: "memory priority over CPU", + pod1: podWithHighMemory, + pod2: podWithHighCPU, + expectedResult: false, + }, + { + testName: "equal resource request should return true", + pod1: podWithLowMemory, + pod2: podWithLowMemory, + expectedResult: true, + }, + { + testName: "resource type other than CPU and memory are ignored", + pod1: getPodWithResources("high-storage", v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceStorage: resource.MustParse("300Mi"), + }, + }), + pod2: getPodWithResources("low-storage", v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceStorage: resource.MustParse("200Mi"), + }, + }), + expectedResult: true, + }, + } + for _, run := range runs { + t.Run(run.testName, func(t *testing.T) { + result := smallerResourceRequest(run.pod1, run.pod2) + if result != run.expectedResult { + t.Fatalf("smallerResourceRequest(%s, %s) = %v, expected %v", + run.pod1.Name, run.pod2.Name, result, run.expectedResult) + } + }) + } +} + func getTestPods() map[string]*v1.Pod { allPods := map[string]*v1.Pod{ tinyBurstable: getPodWithResources(tinyBurstable, v1.ResourceRequirements{ @@ -509,6 +637,43 @@ func getAdmissionRequirementList(cpu, memory, pods int) admissionRequirementList return admissionRequirementList(reqs) } +func getPredicateFailureReasons(insufficientCPU, insufficientMemory, insufficientPods int, otherReasonExist bool) (reasonByPredicate []lifecycle.PredicateFailureReason) { + if insufficientCPU > 0 { + parsedN := parseCPUToInt64(fmt.Sprintf("%dm", insufficientCPU)) + reasonByPredicate = append(reasonByPredicate, &lifecycle.InsufficientResourceError{ + ResourceName: v1.ResourceCPU, + Requested: parsedN, + Capacity: parsedN * 5 / 4, + Used: parsedN * 5 / 4, + }) + } + if insufficientMemory > 0 { + parsedN := parseNonCPUResourceToInt64(fmt.Sprintf("%dMi", insufficientMemory)) + reasonByPredicate = append(reasonByPredicate, &lifecycle.InsufficientResourceError{ + ResourceName: v1.ResourceMemory, + Requested: parsedN, + Capacity: parsedN * 5 / 4, + Used: parsedN * 5 / 4, + }) + } + if insufficientPods > 0 { + parsedN := int64(insufficientPods) + reasonByPredicate = append(reasonByPredicate, &lifecycle.InsufficientResourceError{ + ResourceName: v1.ResourcePods, + Requested: parsedN, + Capacity: parsedN + 1, + Used: parsedN + 1, + }) + } + if otherReasonExist { + reasonByPredicate = append(reasonByPredicate, &lifecycle.PredicateFailureError{ + PredicateName: "mock predicate error name", + PredicateDesc: "mock predicate error reason", + }) + } + return +} + // this checks if the lists contents contain all of the same elements. // this is not correct if there are duplicate pods in the list. // for example: podListEqual([a, a, b], [a, b, b]) will return true diff --git a/pkg/kubelet/prober/prober.go b/pkg/kubelet/prober/prober.go index da1c336862279..0441a11c8ec7d 100644 --- a/pkg/kubelet/prober/prober.go +++ b/pkg/kubelet/prober/prober.go @@ -69,10 +69,11 @@ func newProber( } // recordContainerEvent should be used by the prober for all container related events. -func (pb *prober) recordContainerEvent(pod *v1.Pod, container *v1.Container, eventType, reason, message string, args ...interface{}) { +func (pb *prober) recordContainerEvent(ctx context.Context, pod *v1.Pod, container *v1.Container, eventType, reason, message string, args ...interface{}) { + logger := klog.FromContext(ctx) ref, err := kubecontainer.GenerateContainerRef(pod, container) if err != nil { - klog.ErrorS(err, "Can't make a ref to pod and container", "pod", klog.KObj(pod), "containerName", container.Name) + logger.Error(err, "Can't make a ref to pod and container", "pod", klog.KObj(pod), "containerName", container.Name) return } pb.recorder.Eventf(ref, eventType, reason, message, args...) @@ -92,8 +93,9 @@ func (pb *prober) probe(ctx context.Context, probeType probeType, pod *v1.Pod, s return results.Failure, fmt.Errorf("unknown probe type: %q", probeType) } + logger := klog.FromContext(ctx) if probeSpec == nil { - klog.InfoS("Probe is nil", "probeType", probeType, "pod", klog.KObj(pod), "podUID", pod.UID, "containerName", container.Name) + logger.Info("Probe is nil", "probeType", probeType, "pod", klog.KObj(pod), "podUID", pod.UID, "containerName", container.Name) return results.Success, nil } @@ -101,32 +103,32 @@ func (pb *prober) probe(ctx context.Context, probeType probeType, pod *v1.Pod, s if err != nil { // Handle probe error - klog.V(1).ErrorS(err, "Probe errored", "probeType", probeType, "pod", klog.KObj(pod), "podUID", pod.UID, "containerName", container.Name, "probeResult", result) - pb.recordContainerEvent(pod, &container, v1.EventTypeWarning, events.ContainerUnhealthy, "%s probe errored and resulted in %s state: %s", probeType, result, err) + logger.V(1).Error(err, "Probe errored", "probeType", probeType, "pod", klog.KObj(pod), "podUID", pod.UID, "containerName", container.Name, "probeResult", result) + pb.recordContainerEvent(ctx, pod, &container, v1.EventTypeWarning, events.ContainerUnhealthy, "%s probe errored and resulted in %s state: %s", probeType, result, err) return results.Failure, err } switch result { case probe.Success: - klog.V(3).InfoS("Probe succeeded", "probeType", probeType, "pod", klog.KObj(pod), "podUID", pod.UID, "containerName", container.Name) + logger.V(3).Info("Probe succeeded", "probeType", probeType, "pod", klog.KObj(pod), "podUID", pod.UID, "containerName", container.Name) return results.Success, nil case probe.Warning: - pb.recordContainerEvent(pod, &container, v1.EventTypeWarning, events.ContainerProbeWarning, "%s probe warning: %s", probeType, output) - klog.V(3).InfoS("Probe succeeded with a warning", "probeType", probeType, "pod", klog.KObj(pod), "podUID", pod.UID, "containerName", container.Name, "output", output) + pb.recordContainerEvent(ctx, pod, &container, v1.EventTypeWarning, events.ContainerProbeWarning, "%s probe warning: %s", probeType, output) + logger.V(3).Info("Probe succeeded with a warning", "probeType", probeType, "pod", klog.KObj(pod), "podUID", pod.UID, "containerName", container.Name, "output", output) return results.Success, nil case probe.Failure: - klog.V(1).InfoS("Probe failed", "probeType", probeType, "pod", klog.KObj(pod), "podUID", pod.UID, "containerName", container.Name, "probeResult", result, "output", output) - pb.recordContainerEvent(pod, &container, v1.EventTypeWarning, events.ContainerUnhealthy, "%s probe failed: %s", probeType, output) + logger.V(1).Info("Probe failed", "probeType", probeType, "pod", klog.KObj(pod), "podUID", pod.UID, "containerName", container.Name, "probeResult", result, "output", output) + pb.recordContainerEvent(ctx, pod, &container, v1.EventTypeWarning, events.ContainerUnhealthy, "%s probe failed: %s", probeType, output) return results.Failure, nil case probe.Unknown: - klog.V(1).InfoS("Probe unknown without error", "probeType", probeType, "pod", klog.KObj(pod), "podUID", pod.UID, "containerName", container.Name, "probeResult", result) + logger.V(1).Info("Probe unknown without error", "probeType", probeType, "pod", klog.KObj(pod), "podUID", pod.UID, "containerName", container.Name, "probeResult", result) return results.Failure, nil default: - klog.V(1).InfoS("Unsupported probe result", "probeType", probeType, "pod", klog.KObj(pod), "podUID", pod.UID, "containerName", container.Name, "probeResult", result) + logger.V(1).Info("Unsupported probe result", "probeType", probeType, "pod", klog.KObj(pod), "podUID", pod.UID, "containerName", container.Name, "probeResult", result) return results.Failure, nil } } @@ -147,10 +149,11 @@ func (pb *prober) runProbeWithRetries(ctx context.Context, probeType probeType, } func (pb *prober) runProbe(ctx context.Context, probeType probeType, p *v1.Probe, pod *v1.Pod, status v1.PodStatus, container v1.Container, containerID kubecontainer.ContainerID) (probe.Result, string, error) { + logger := klog.FromContext(ctx) timeout := time.Duration(p.TimeoutSeconds) * time.Second switch { case p.Exec != nil: - klog.V(4).InfoS("Exec-Probe runProbe", "pod", klog.KObj(pod), "containerName", container.Name, "execCommand", p.Exec.Command) + logger.V(4).Info("Exec-Probe runProbe", "pod", klog.KObj(pod), "containerName", container.Name, "execCommand", p.Exec.Command) command := kubecontainer.ExpandContainerCommandOnlyStatic(p.Exec.Command, container.Env) return pb.exec.Probe(pb.newExecInContainer(ctx, pod, container, containerID, command, timeout)) @@ -158,30 +161,30 @@ func (pb *prober) runProbe(ctx context.Context, probeType probeType, p *v1.Probe req, err := httpprobe.NewRequestForHTTPGetAction(p.HTTPGet, &container, status.PodIP, "probe") if err != nil { // Log and record event for Unknown result - klog.V(4).InfoS("HTTP-Probe failed to create request", "error", err) + logger.V(4).Info("HTTP-Probe failed to create request", "error", err) return probe.Unknown, "", err } - if klogV4 := klog.V(4); klogV4.Enabled() { + if loggerV4 := logger.V(4); logger.Enabled() { port := req.URL.Port() host := req.URL.Hostname() path := req.URL.Path scheme := req.URL.Scheme headers := p.HTTPGet.HTTPHeaders - klogV4.InfoS("HTTP-Probe", "scheme", scheme, "host", host, "port", port, "path", path, "timeout", timeout, "headers", headers, "probeType", probeType) + loggerV4.Info("HTTP-Probe", "scheme", scheme, "host", host, "port", port, "path", path, "timeout", timeout, "headers", headers, "probeType", probeType) } return pb.http.Probe(req, timeout) case p.TCPSocket != nil: port, err := probe.ResolveContainerPort(p.TCPSocket.Port, &container) if err != nil { - klog.V(4).InfoS("TCP-Probe failed to resolve port", "error", err) + logger.V(4).Info("TCP-Probe failed to resolve port", "error", err) return probe.Unknown, "", err } host := p.TCPSocket.Host if host == "" { host = status.PodIP } - klog.V(4).InfoS("TCP-Probe", "host", host, "port", port, "timeout", timeout) + logger.V(4).Info("TCP-Probe", "host", host, "port", port, "timeout", timeout) return pb.tcp.Probe(host, port, timeout) case p.GRPC != nil: @@ -190,11 +193,11 @@ func (pb *prober) runProbe(ctx context.Context, probeType probeType, p *v1.Probe if p.GRPC.Service != nil { service = *p.GRPC.Service } - klog.V(4).InfoS("GRPC-Probe", "host", host, "service", service, "port", p.GRPC.Port, "timeout", timeout) + logger.V(4).Info("GRPC-Probe", "host", host, "service", service, "port", p.GRPC.Port, "timeout", timeout) return pb.grpc.Probe(host, service, int(p.GRPC.Port), timeout) default: - klog.V(4).InfoS("Failed to find probe builder for container", "containerName", container.Name) + logger.V(4).Info("Failed to find probe builder for container", "containerName", container.Name) return probe.Unknown, "", fmt.Errorf("missing probe handler for %s:%s", format.Pod(pod), container.Name) } } @@ -257,7 +260,9 @@ func (eic *execInContainer) Start() error { if eic.writer != nil { // only record the write error, do not cover the command run error if p, err := eic.writer.Write(data); err != nil { - klog.ErrorS(err, "Unable to write all bytes from execInContainer", "expectedBytes", len(data), "actualBytes", p, "pod", klog.KObj(eic.pod), "containerName", eic.container.Name) + // Use klog.TODO() because we currently do not have a proper context/logger to pass in. + // Replace this with an appropriate context/logger when refactoring this function to accept a context parameter. + klog.TODO().Error(err, "Unable to write all bytes from execInContainer", "expectedBytes", len(data), "actualBytes", p, "pod", klog.KObj(eic.pod), "containerName", eic.container.Name) } } return err diff --git a/pkg/kubelet/prober/prober_manager.go b/pkg/kubelet/prober/prober_manager.go index 3d107d3050a72..b390d5f482e04 100644 --- a/pkg/kubelet/prober/prober_manager.go +++ b/pkg/kubelet/prober/prober_manager.go @@ -17,6 +17,7 @@ limitations under the License. package prober import ( + "context" "sync" "time" @@ -71,7 +72,7 @@ var ProberDuration = metrics.NewHistogramVec( type Manager interface { // AddPod creates new probe workers for every container probe. This should be called for every // pod created. - AddPod(pod *v1.Pod) + AddPod(ctx context.Context, pod *v1.Pod) // StopLivenessAndStartup handles stopping liveness and startup probes during termination. StopLivenessAndStartup(pod *v1.Pod) @@ -86,7 +87,7 @@ type Manager interface { // UpdatePodStatus modifies the given PodStatus with the appropriate Ready state for each // container based on container running status, cached probe results and worker states. - UpdatePodStatus(*v1.Pod, *v1.PodStatus) + UpdatePodStatus(context.Context, *v1.Pod, *v1.PodStatus) } type manager struct { @@ -178,10 +179,11 @@ func getRestartableInitContainers(pod *v1.Pod) []v1.Container { return restartableInitContainers } -func (m *manager) AddPod(pod *v1.Pod) { +func (m *manager) AddPod(ctx context.Context, pod *v1.Pod) { m.workerLock.Lock() defer m.workerLock.Unlock() + logger := klog.FromContext(ctx) key := probeKey{podUID: pod.UID} for _, c := range append(pod.Spec.Containers, getRestartableInitContainers(pod)...) { key.containerName = c.Name @@ -189,37 +191,37 @@ func (m *manager) AddPod(pod *v1.Pod) { if c.StartupProbe != nil { key.probeType = startup if _, ok := m.workers[key]; ok { - klog.V(8).ErrorS(nil, "Startup probe already exists for container", + logger.V(8).Error(nil, "Startup probe already exists for container", "pod", klog.KObj(pod), "containerName", c.Name) return } w := newWorker(m, startup, pod, c) m.workers[key] = w - go w.run() + go w.run(ctx) } if c.ReadinessProbe != nil { key.probeType = readiness if _, ok := m.workers[key]; ok { - klog.V(8).ErrorS(nil, "Readiness probe already exists for container", + logger.V(8).Error(nil, "Readiness probe already exists for container", "pod", klog.KObj(pod), "containerName", c.Name) return } w := newWorker(m, readiness, pod, c) m.workers[key] = w - go w.run() + go w.run(ctx) } if c.LivenessProbe != nil { key.probeType = liveness if _, ok := m.workers[key]; ok { - klog.V(8).ErrorS(nil, "Liveness probe already exists for container", + logger.V(8).Error(nil, "Liveness probe already exists for container", "pod", klog.KObj(pod), "containerName", c.Name) return } w := newWorker(m, liveness, pod, c) m.workers[key] = w - go w.run() + go w.run(ctx) } } } @@ -286,7 +288,8 @@ func (m *manager) isContainerStarted(pod *v1.Pod, containerStatus *v1.ContainerS return true } -func (m *manager) UpdatePodStatus(pod *v1.Pod, podStatus *v1.PodStatus) { +func (m *manager) UpdatePodStatus(ctx context.Context, pod *v1.Pod, podStatus *v1.PodStatus) { + logger := klog.FromContext(ctx) for i, c := range podStatus.ContainerStatuses { started := m.isContainerStarted(pod, &podStatus.ContainerStatuses[i]) podStatus.ContainerStatuses[i].Started = &started @@ -309,7 +312,7 @@ func (m *manager) UpdatePodStatus(pod *v1.Pod, podStatus *v1.PodStatus) { select { case w.manualTriggerCh <- struct{}{}: default: // Non-blocking. - klog.InfoS("Failed to trigger a manual run", "probe", w.probeType.String()) + logger.Info("Failed to trigger a manual run", "probe", w.probeType.String()) } } } @@ -322,7 +325,7 @@ func (m *manager) UpdatePodStatus(pod *v1.Pod, podStatus *v1.PodStatus) { initContainer, ok := kubeutil.GetContainerByIndex(pod.Spec.InitContainers, podStatus.InitContainerStatuses, i) if !ok { - klog.V(4).InfoS("Mismatch between pod spec and status, likely programmer error", "pod", klog.KObj(pod), "containerName", c.Name) + logger.V(4).Info("Mismatch between pod spec and status, likely programmer error", "pod", klog.KObj(pod), "containerName", c.Name) continue } if !podutil.IsRestartableInitContainer(&initContainer) { @@ -350,7 +353,7 @@ func (m *manager) UpdatePodStatus(pod *v1.Pod, podStatus *v1.PodStatus) { select { case w.manualTriggerCh <- struct{}{}: default: // Non-blocking. - klog.InfoS("Failed to trigger a manual run", "probe", w.probeType.String()) + logger.Info("Failed to trigger a manual run", "probe", w.probeType.String()) } } } diff --git a/pkg/kubelet/prober/prober_manager_test.go b/pkg/kubelet/prober/prober_manager_test.go index b66d3460f457d..2bb0c7faf6f3d 100644 --- a/pkg/kubelet/prober/prober_manager_test.go +++ b/pkg/kubelet/prober/prober_manager_test.go @@ -48,6 +48,7 @@ var defaultProbe = &v1.Probe{ } func TestAddRemovePods(t *testing.T) { + ctx := ktesting.Init(t) noProbePod := v1.Pod{ ObjectMeta: metav1.ObjectMeta{ UID: "no_probe_pod", @@ -94,13 +95,13 @@ func TestAddRemovePods(t *testing.T) { } // Adding a pod with no probes should be a no-op. - m.AddPod(&noProbePod) + m.AddPod(ctx, &noProbePod) if err := expectProbes(m, nil); err != nil { t.Error(err) } // Adding a pod with probes. - m.AddPod(&probePod) + m.AddPod(ctx, &probePod) probePaths := []probeKey{ {"probe_pod", "readiness", readiness}, {"probe_pod", "liveness", liveness}, @@ -170,6 +171,7 @@ func TestAddRemovePodsWithRestartableInitContainer(t *testing.T) { for _, tc := range testCases { t.Run(tc.desc, func(t *testing.T) { + ctx := ktesting.Init(t) probePod := v1.Pod{ ObjectMeta: metav1.ObjectMeta{ UID: "restartable_init_container_pod", @@ -191,7 +193,7 @@ func TestAddRemovePodsWithRestartableInitContainer(t *testing.T) { } // Adding a pod with probes. - m.AddPod(&probePod) + m.AddPod(ctx, &probePod) if err := expectProbes(m, tc.probePaths); err != nil { t.Error(err) } @@ -215,6 +217,7 @@ func TestAddRemovePodsWithRestartableInitContainer(t *testing.T) { } func TestCleanupPods(t *testing.T) { + ctx := ktesting.Init(t) m := newTestManager() defer cleanup(t, m) podToCleanup := v1.Pod{ @@ -251,8 +254,8 @@ func TestCleanupPods(t *testing.T) { }}, }, } - m.AddPod(&podToCleanup) - m.AddPod(&podToKeep) + m.AddPod(ctx, &podToCleanup) + m.AddPod(ctx, &podToKeep) desiredPods := map[types.UID]sets.Empty{} desiredPods[podToKeep.UID] = sets.Empty{} @@ -277,6 +280,7 @@ func TestCleanupPods(t *testing.T) { } func TestCleanupRepeated(t *testing.T) { + ctx := ktesting.Init(t) m := newTestManager() defer cleanup(t, m) podTemplate := v1.Pod{ @@ -294,7 +298,7 @@ func TestCleanupRepeated(t *testing.T) { for i := 0; i < numTestPods; i++ { pod := podTemplate pod.UID = types.UID(strconv.Itoa(i)) - m.AddPod(&pod) + m.AddPod(ctx, &pod) } for i := 0; i < 10; i++ { @@ -303,6 +307,7 @@ func TestCleanupRepeated(t *testing.T) { } func TestUpdatePodStatus(t *testing.T) { + ctx := ktesting.Init(t) unprobed := v1.ContainerStatus{ Name: "unprobed_container", ContainerID: "test://unprobed_container_id", @@ -377,7 +382,7 @@ func TestUpdatePodStatus(t *testing.T) { m.startupManager.Set(kubecontainer.ParseContainerID(startedNoReadiness.ContainerID), results.Success, &v1.Pod{}) m.readinessManager.Set(kubecontainer.ParseContainerID(terminated.ContainerID), results.Success, &v1.Pod{}) - m.UpdatePodStatus(&v1.Pod{ + m.UpdatePodStatus(ctx, &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ UID: testPodUID, }, @@ -494,6 +499,7 @@ func TestUpdatePodStatusWithInitContainers(t *testing.T) { for _, tc := range testCases { t.Run(tc.desc, func(t *testing.T) { + ctx := ktesting.Init(t) podStatus := v1.PodStatus{ Phase: v1.PodRunning, InitContainerStatuses: []v1.ContainerStatus{ @@ -501,7 +507,7 @@ func TestUpdatePodStatusWithInitContainers(t *testing.T) { }, } - m.UpdatePodStatus(&v1.Pod{ + m.UpdatePodStatus(ctx, &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ UID: testPodUID, }, @@ -557,7 +563,7 @@ func (m *manager) extractedReadinessHandling(logger klog.Logger) { } func TestUpdateReadiness(t *testing.T) { - logger, _ := ktesting.NewTestContext(t) + logger, ctx := ktesting.NewTestContext(t) testPod := getTestPod() setTestProbe(testPod, readiness, v1.Probe{}) m := newTestManager() @@ -578,7 +584,7 @@ func TestUpdateReadiness(t *testing.T) { m.statusManager.SetPodStatus(logger, testPod, getTestRunningStatus()) - m.AddPod(testPod) + m.AddPod(ctx, testPod) probePaths := []probeKey{{testPodUID, testContainerName, readiness}} if err := expectProbes(m, probePaths); err != nil { t.Error(err) diff --git a/pkg/kubelet/prober/prober_test.go b/pkg/kubelet/prober/prober_test.go index d06091c5d8ab9..3f17e3bc3fd5b 100644 --- a/pkg/kubelet/prober/prober_test.go +++ b/pkg/kubelet/prober/prober_test.go @@ -18,7 +18,6 @@ package prober import ( "bytes" - "context" "errors" "fmt" "reflect" @@ -138,7 +137,7 @@ func TestGetTCPAddrParts(t *testing.T) { } func TestProbe(t *testing.T) { - ctx := context.Background() + ctx := ktesting.Init(t) containerID := kubecontainer.ContainerID{Type: "test", ID: "foobar"} execProbe := &v1.Probe{ @@ -423,6 +422,7 @@ func TestRecordContainerEventUnknownStatus(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { + tCtx := ktesting.Init(t) bufferSize := len(tc.expected) + 1 fakeRecorder := record.NewFakeRecorder(bufferSize) @@ -430,8 +430,8 @@ func TestRecordContainerEventUnknownStatus(t *testing.T) { recorder: fakeRecorder, } - pb.recordContainerEvent(pod, &container, v1.EventTypeWarning, "ContainerProbeWarning", "%s probe warning: %s", tc.probeType, output) - pb.recordContainerEvent(pod, &container, v1.EventTypeWarning, "ContainerProbeWarning", "Unknown %s probe status: %s", tc.probeType, tc.result) + pb.recordContainerEvent(tCtx, pod, &container, v1.EventTypeWarning, "ContainerProbeWarning", "%s probe warning: %s", tc.probeType, output) + pb.recordContainerEvent(tCtx, pod, &container, v1.EventTypeWarning, "ContainerProbeWarning", "Unknown %s probe status: %s", tc.probeType, tc.result) assert.Equal(t, len(tc.expected), len(fakeRecorder.Events), "unexpected number of events") for _, expected := range tc.expected { diff --git a/pkg/kubelet/prober/scale_test.go b/pkg/kubelet/prober/scale_test.go index 6cef4cc59585b..47997a201e731 100644 --- a/pkg/kubelet/prober/scale_test.go +++ b/pkg/kubelet/prober/scale_test.go @@ -17,7 +17,6 @@ limitations under the License. package prober import ( - "context" "fmt" "net" "net/http" @@ -81,7 +80,7 @@ func TestTCPPortExhaustion(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - logger, _ := ktesting.NewTestContext(t) + logger, tCtx := ktesting.NewTestContext(t) podManager := kubepod.NewBasicPodManager() podStartupLatencyTracker := kubeletutil.NewPodStartupLatencyTracker() m := NewManager( @@ -136,12 +135,12 @@ func TestTCPPortExhaustion(t *testing.T) { } podManager.AddPod(&pod) m.statusManager.SetPodStatus(logger, &pod, pod.Status) - m.AddPod(&pod) + m.AddPod(tCtx, &pod) } t.Logf("Adding %d pods with %d containers each in %v", numTestPods, numContainers, time.Since(now)) - ctx, cancel := context.WithTimeout(context.Background(), 59*time.Second) - defer cancel() + ctx := ktesting.WithTimeout(tCtx, 59*time.Second, "timeout 59 Second") + defer ctx.Cancel("TestTCPPortExhaustion completed") var wg sync.WaitGroup wg.Add(1) diff --git a/pkg/kubelet/prober/testing/fake_manager.go b/pkg/kubelet/prober/testing/fake_manager.go index d3b31c9e79303..c8ff03b0a0a2f 100644 --- a/pkg/kubelet/prober/testing/fake_manager.go +++ b/pkg/kubelet/prober/testing/fake_manager.go @@ -17,6 +17,8 @@ limitations under the License. package testing import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" @@ -28,7 +30,7 @@ type FakeManager struct{} // Unused methods below. // AddPod simulates adding a Pod. -func (FakeManager) AddPod(_ *v1.Pod) {} +func (FakeManager) AddPod(_ context.Context, _ *v1.Pod) {} // RemovePod simulates removing a Pod. func (FakeManager) RemovePod(_ *v1.Pod) {} @@ -43,7 +45,7 @@ func (FakeManager) CleanupPods(_ map[types.UID]sets.Empty) {} func (FakeManager) Start() {} // UpdatePodStatus simulates updating the Pod Status. -func (FakeManager) UpdatePodStatus(_ *v1.Pod, podStatus *v1.PodStatus) { +func (FakeManager) UpdatePodStatus(_ context.Context, _ *v1.Pod, podStatus *v1.PodStatus) { for i := range podStatus.ContainerStatuses { podStatus.ContainerStatuses[i].Ready = true } diff --git a/pkg/kubelet/prober/worker.go b/pkg/kubelet/prober/worker.go index 8578c415d4483..9f2711b45ea80 100644 --- a/pkg/kubelet/prober/worker.go +++ b/pkg/kubelet/prober/worker.go @@ -145,8 +145,8 @@ func newWorker( } // run periodically probes the container. -func (w *worker) run() { - ctx := context.Background() +func (w *worker) run(ctx context.Context) { + logger := klog.FromContext(ctx) probeTickerPeriod := time.Duration(w.spec.PeriodSeconds) * time.Second // If kubelet restarted the probes could be started in rapid succession. @@ -185,7 +185,7 @@ probeLoop: // Updating the periodic timer to run the probe again at intervals of probeTickerPeriod // starting from the moment a manual run occurs. probeTicker.Reset(probeTickerPeriod) - klog.V(4).InfoS("Triggered Probe by manual run", "probeType", w.probeType, "pod", klog.KObj(w.pod), "podUID", w.pod.UID, "containerName", w.container.Name) + logger.V(4).Info("Triggered Probe by manual run", "probeType", w.probeType, "pod", klog.KObj(w.pod), "podUID", w.pod.UID, "containerName", w.container.Name) // continue } } @@ -206,17 +206,18 @@ func (w *worker) doProbe(ctx context.Context) (keepGoing bool) { defer func() { recover() }() // Actually eat panics (HandleCrash takes care of logging) defer runtime.HandleCrash(func(_ interface{}) { keepGoing = true }) + logger := klog.FromContext(ctx) startTime := time.Now() status, ok := w.probeManager.statusManager.GetPodStatus(w.pod.UID) if !ok { // Either the pod has not been created yet, or it was already deleted. - klog.V(3).InfoS("No status for pod", "pod", klog.KObj(w.pod)) + logger.V(3).Info("No status for pod", "pod", klog.KObj(w.pod)) return true } // Worker should terminate if pod is terminated. if status.Phase == v1.PodFailed || status.Phase == v1.PodSucceeded { - klog.V(3).InfoS("Pod is terminated, exiting probe worker", + logger.V(3).Info("Pod is terminated, exiting probe worker", "pod", klog.KObj(w.pod), "phase", status.Phase) return false } @@ -226,7 +227,7 @@ func (w *worker) doProbe(ctx context.Context) (keepGoing bool) { c, ok = podutil.GetContainerStatus(status.InitContainerStatuses, w.container.Name) if !ok || len(c.ContainerID) == 0 { // Either the container has not been created yet, or it was deleted. - klog.V(3).InfoS("Probe target container not found", + logger.V(3).Info("Probe target container not found", "pod", klog.KObj(w.pod), "containerName", w.container.Name) return true // Wait for more information. } @@ -248,7 +249,7 @@ func (w *worker) doProbe(ctx context.Context) (keepGoing bool) { } if c.State.Running == nil { - klog.V(3).InfoS("Non-running container probed", + logger.V(3).Info("Non-running container probed", "pod", klog.KObj(w.pod), "containerName", w.container.Name) if !w.containerID.IsEmpty() { w.resultsManager.Set(w.containerID, results.Failure, w.pod) @@ -263,10 +264,10 @@ func (w *worker) doProbe(ctx context.Context) (keepGoing bool) { // Graceful shutdown of the pod. if w.pod.ObjectMeta.DeletionTimestamp != nil && (w.probeType == liveness || w.probeType == startup) { - klog.V(3).InfoS("Pod deletion requested, setting probe result to success", + logger.V(3).Info("Pod deletion requested, setting probe result to success", "probeType", w.probeType, "pod", klog.KObj(w.pod), "containerName", w.container.Name) if w.probeType == startup { - klog.InfoS("Pod deletion requested before container has fully started", + logger.Info("Pod deletion requested before container has fully started", "pod", klog.KObj(w.pod), "containerName", w.container.Name) } // Set a last result to ensure quiet shutdown. diff --git a/pkg/kubelet/prober/worker_test.go b/pkg/kubelet/prober/worker_test.go index ec8f8673ec5f5..2e12cbf30018d 100644 --- a/pkg/kubelet/prober/worker_test.go +++ b/pkg/kubelet/prober/worker_test.go @@ -346,14 +346,14 @@ func TestStartupProbeFailureThreshold(t *testing.T) { } func TestCleanUp(t *testing.T) { - logger, _ := ktesting.NewTestContext(t) + logger, ctx := ktesting.NewTestContext(t) m := newTestManager() for _, probeType := range [...]probeType{liveness, readiness, startup} { key := probeKey{testPodUID, testContainerName, probeType} w := newTestWorker(m, probeType, v1.Probe{}) m.statusManager.SetPodStatus(logger, w.pod, getTestRunningStatusWithStarted(probeType != startup)) - go w.run() + go w.run(ctx) m.workers[key] = w // Wait for worker to run. @@ -496,6 +496,7 @@ func TestResultRunOnLivenessCheckFailure(t *testing.T) { func TestResultRunOnStartupCheckFailure(t *testing.T) { logger, ctx := ktesting.NewTestContext(t) + m := newTestManager() w := newTestWorker(m, startup, v1.Probe{SuccessThreshold: 1, FailureThreshold: 3}) m.statusManager.SetPodStatus(logger, w.pod, getTestRunningStatusWithStarted(false)) @@ -551,6 +552,7 @@ func TestLivenessProbeDisabledByStarted(t *testing.T) { func TestStartupProbeDisabledByStarted(t *testing.T) { logger, ctx := ktesting.NewTestContext(t) + m := newTestManager() w := newTestWorker(m, startup, v1.Probe{SuccessThreshold: 1, FailureThreshold: 2}) m.statusManager.SetPodStatus(logger, w.pod, getTestRunningStatusWithStarted(false)) diff --git a/pkg/kubelet/server/auth.go b/pkg/kubelet/server/auth.go index 176f6a95379d4..43a6ad0fe512a 100644 --- a/pkg/kubelet/server/auth.go +++ b/pkg/kubelet/server/auth.go @@ -17,6 +17,7 @@ limitations under the License. package server import ( + "context" "net/http" "strings" @@ -76,8 +77,8 @@ func isSubpath(subpath, path string) bool { // /healthz/* => verb=, resource=nodes, name=, subresource(s)=healthz,proxy // /configz => verb=, resource=nodes, name=, subresource(s)=configz,proxy // /flagz => verb=, resource=nodes, name=, subresource(s)=configz,proxy -func (n nodeAuthorizerAttributesGetter) GetRequestAttributes(u user.Info, r *http.Request) []authorizer.Attributes { - +func (n nodeAuthorizerAttributesGetter) GetRequestAttributes(ctx context.Context, u user.Info, r *http.Request) []authorizer.Attributes { + logger := klog.FromContext(ctx) apiVerb := "" switch r.Method { case "POST": @@ -145,7 +146,7 @@ func (n nodeAuthorizerAttributesGetter) GetRequestAttributes(u user.Info, r *htt attrs = append(attrs, attr) } - klog.V(5).InfoS("Node request attributes", "user", attrs[0].GetUser().GetName(), "verb", attrs[0].GetVerb(), "resource", attrs[0].GetResource(), "subresource(s)", subresources) + logger.V(5).Info("Node request attributes", "user", attrs[0].GetUser().GetName(), "verb", attrs[0].GetVerb(), "resource", attrs[0].GetResource(), "subresource(s)", subresources) return attrs } diff --git a/pkg/kubelet/server/auth_test.go b/pkg/kubelet/server/auth_test.go index 05874015bc978..27f001f99fa7f 100644 --- a/pkg/kubelet/server/auth_test.go +++ b/pkg/kubelet/server/auth_test.go @@ -27,6 +27,7 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" featuregatetesting "k8s.io/component-base/featuregate/testing" "k8s.io/kubernetes/pkg/features" + "k8s.io/kubernetes/test/utils/ktesting" ) func TestIsSubPath(t *testing.T) { @@ -64,6 +65,7 @@ func TestIsSubPath(t *testing.T) { } func TestGetRequestAttributes(t *testing.T) { + tCtx := ktesting.Init(t) for _, fineGrained := range []bool{false, true} { featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.KubeletFineGrainedAuthz, fineGrained) for _, test := range AuthzTestCases(fineGrained) { @@ -72,7 +74,7 @@ func TestGetRequestAttributes(t *testing.T) { req, err := http.NewRequest(test.Method, "https://localhost:1234"+test.Path, nil) require.NoError(t, err) - attrs := getter.GetRequestAttributes(AuthzTestUser(), req) + attrs := getter.GetRequestAttributes(tCtx, AuthzTestUser(), req) test.AssertAttributes(t, attrs) }) diff --git a/pkg/kubelet/server/server.go b/pkg/kubelet/server/server.go index 4496a5a937d8c..b0d8d7fa3ae0c 100644 --- a/pkg/kubelet/server/server.go +++ b/pkg/kubelet/server/server.go @@ -166,6 +166,7 @@ func (a *filteringContainer) RegisteredHandlePaths() []string { // ListenAndServeKubeletServer initializes a server to respond to HTTP network requests on the Kubelet. func ListenAndServeKubeletServer( + ctx context.Context, host HostInterface, resourceAnalyzer stats.ResourceAnalyzer, checkers []healthz.HealthChecker, @@ -177,8 +178,9 @@ func ListenAndServeKubeletServer( address := netutils.ParseIPSloppy(kubeCfg.Address) port := uint(kubeCfg.Port) - klog.InfoS("Starting to listen", "address", address, "port", port) - handler := NewServer(host, resourceAnalyzer, checkers, flagz, auth, kubeCfg) + logger := klog.FromContext(ctx) + logger.Info("Starting to listen", "address", address, "port", port) + handler := NewServer(ctx, host, resourceAnalyzer, checkers, flagz, auth, kubeCfg) handler.InstallTracingFilter(tp) s := &http.Server{ @@ -196,17 +198,18 @@ func ListenAndServeKubeletServer( // cert/keys are specified and GetCertificate in the TLSConfig // should be called instead. if err := s.ListenAndServeTLS(tlsOptions.CertFile, tlsOptions.KeyFile); err != nil { - klog.ErrorS(err, "Failed to listen and serve") + logger.Error(err, "Failed to listen and serve") os.Exit(1) } } else if err := s.ListenAndServe(); err != nil { - klog.ErrorS(err, "Failed to listen and serve") + logger.Error(err, "Failed to listen and serve") os.Exit(1) } } // ListenAndServeKubeletReadOnlyServer initializes a server to respond to HTTP network requests on the Kubelet. func ListenAndServeKubeletReadOnlyServer( + ctx context.Context, host HostInterface, resourceAnalyzer stats.ResourceAnalyzer, checkers []healthz.HealthChecker, @@ -214,8 +217,9 @@ func ListenAndServeKubeletReadOnlyServer( address net.IP, port uint, tp oteltrace.TracerProvider) { - klog.InfoS("Starting to listen read-only", "address", address, "port", port) - s := NewServer(host, resourceAnalyzer, checkers, nil, nil, nil) + logger := klog.FromContext(ctx) + logger.Info("Starting to listen read-only", "address", address, "port", port) + s := NewServer(ctx, host, resourceAnalyzer, checkers, nil, nil, nil) s.InstallTracingFilter(tp, otelrestful.WithPublicEndpoint()) server := &http.Server{ @@ -228,13 +232,14 @@ func ListenAndServeKubeletReadOnlyServer( } if err := server.ListenAndServe(); err != nil { - klog.ErrorS(err, "Failed to listen and serve") + logger.Error(err, "Failed to listen and serve") os.Exit(1) } } // ListenAndServePodResources initializes a gRPC server to serve the PodResources service func ListenAndServePodResources(ctx context.Context, endpoint string, providers podresources.PodResourcesProviders) { + logger := klog.FromContext(ctx) server := grpc.NewServer(apisgrpc.WithRateLimiter(ctx, "podresources", podresources.DefaultQPS, podresources.DefaultBurstTokens)) podresourcesapiv1alpha1.RegisterPodResourcesListerServer(server, podresources.NewV1alpha1PodResourcesServer(providers)) @@ -242,19 +247,19 @@ func ListenAndServePodResources(ctx context.Context, endpoint string, providers l, err := util.CreateListener(endpoint) if err != nil { - klog.ErrorS(err, "Failed to create listener for podResources endpoint") + logger.Error(err, "Failed to create listener for podResources endpoint") os.Exit(1) } - klog.InfoS("Starting to serve the podresources API", "endpoint", endpoint) + logger.Info("Starting to serve the podresources API", "endpoint", endpoint) if err := server.Serve(l); err != nil { - klog.ErrorS(err, "Failed to serve") + logger.Error(err, "Failed to serve") os.Exit(1) } } type NodeRequestAttributesGetter interface { - GetRequestAttributes(u user.Info, r *http.Request) []authorizer.Attributes + GetRequestAttributes(ctx context.Context, u user.Info, r *http.Request) []authorizer.Attributes } // AuthInterface contains all methods required by the auth filters @@ -285,6 +290,7 @@ type HostInterface interface { // NewServer initializes and configures a kubelet.Server object to handle HTTP requests. func NewServer( + ctx context.Context, host HostInterface, resourceAnalyzer stats.ResourceAnalyzer, checkers []healthz.HealthChecker, @@ -292,6 +298,7 @@ func NewServer( auth AuthInterface, kubeCfg *kubeletconfiginternal.KubeletConfiguration) Server { + logger := klog.FromContext(ctx) server := Server{ flagz: flagz, host: host, @@ -303,12 +310,12 @@ func NewServer( extendedCheckers: checkers, } if auth != nil { - server.InstallAuthFilter() + server.InstallAuthFilter(ctx) } - server.InstallAuthNotRequiredHandlers() + server.InstallAuthNotRequiredHandlers(ctx) if kubeCfg != nil && kubeCfg.EnableDebuggingHandlers { - klog.InfoS("Adding debug handlers to kubelet server") - server.InstallAuthRequiredHandlers() + logger.Info("Adding debug handlers to kubelet server") + server.InstallAuthRequiredHandlers(ctx) // To maintain backward compatibility serve logs and pprof only when enableDebuggingHandlers is also enabled // see https://github.com/kubernetes/kubernetes/pull/87273 server.InstallSystemLogHandler(kubeCfg.EnableSystemLogHandler, kubeCfg.EnableSystemLogQuery) @@ -317,16 +324,20 @@ func NewServer( } else { server.InstallDebuggingDisabledHandlers() } + + server.installStatusZ() + return server } // InstallAuthFilter installs authentication filters with the restful Container. -func (s *Server) InstallAuthFilter() { +func (s *Server) InstallAuthFilter(ctx context.Context) { + logger := klog.FromContext(ctx) s.restfulCont.Filter(func(req *restful.Request, resp *restful.Response, chain *restful.FilterChain) { // Authenticate info, ok, err := s.auth.AuthenticateRequest(req.Request) if err != nil { - klog.ErrorS(err, "Unable to authenticate the request due to an error") + logger.Error(err, "Unable to authenticate the request due to an error") resp.WriteErrorString(http.StatusUnauthorized, "Unauthorized") return } @@ -336,7 +347,7 @@ func (s *Server) InstallAuthFilter() { } // Get authorization attributes - attrs := s.auth.GetRequestAttributes(info.User, req.Request) + attrs := s.auth.GetRequestAttributes(ctx, info.User, req.Request) var allowed bool var msg string var subresources []string @@ -344,7 +355,7 @@ func (s *Server) InstallAuthFilter() { subresources = append(subresources, attr.GetSubresource()) decision, _, err := s.auth.Authorize(req.Request.Context(), attr) if err != nil { - klog.ErrorS(err, "Authorization error", "user", attr.GetUser().GetName(), "verb", attr.GetVerb(), "resource", attr.GetResource(), "subresource", attr.GetSubresource()) + logger.Error(err, "Authorization error", "user", attr.GetUser().GetName(), "verb", attr.GetVerb(), "resource", attr.GetResource(), "subresource", attr.GetSubresource()) msg = fmt.Sprintf("Authorization error (user=%s, verb=%s, resource=%s, subresource=%s)", attr.GetUser().GetName(), attr.GetVerb(), attr.GetResource(), attr.GetSubresource()) resp.WriteErrorString(http.StatusInternalServerError, msg) return @@ -359,12 +370,12 @@ func (s *Server) InstallAuthFilter() { if !allowed { if len(attrs) == 0 { - klog.ErrorS(fmt.Errorf("could not determine attributes for request"), "Authorization error") + logger.Error(fmt.Errorf("could not determine attributes for request"), "Authorization error") resp.WriteErrorString(http.StatusForbidden, "Authorization error: could not determine attributes for request") return } // The attributes only differ by subresource so we just use the first one. - klog.V(2).InfoS("Forbidden", "user", attrs[0].GetUser().GetName(), "verb", attrs[0].GetVerb(), "resource", attrs[0].GetResource(), "subresource(s)", subresources) + logger.V(2).Info("Forbidden", "user", attrs[0].GetUser().GetName(), "verb", attrs[0].GetVerb(), "resource", attrs[0].GetResource(), "subresource(s)", subresources) resp.WriteErrorString(http.StatusForbidden, fmt.Sprintf("Forbidden (user=%s, verb=%s, resource=%s, subresource(s)=%v)\n", attrs[0].GetUser().GetName(), attrs[0].GetVerb(), attrs[0].GetResource(), subresources)) return } @@ -379,6 +390,13 @@ func (s *Server) InstallTracingFilter(tp oteltrace.TracerProvider, opts ...otelr s.restfulCont.Filter(otelrestful.OTelFilter("kubelet", append(opts, otelrestful.WithTracerProvider(tp))...)) } +func (s *Server) installStatusZ() { + if utilfeature.DefaultFeatureGate.Enabled(zpagesfeatures.ComponentStatusz) { + s.addMetricsBucketMatcher("statusz") + statusz.Install(s.restfulCont, ComponentKubelet, statusz.NewRegistry(compatibility.DefaultBuildEffectiveVersion(), statusz.WithListedPaths(s.restfulCont.RegisteredHandlePaths()))) + } +} + // addMetricsBucketMatcher adds a regexp matcher and the relevant bucket to use when // it matches. Please be aware this is not thread safe and should not be used dynamically func (s *Server) addMetricsBucketMatcher(bucket string) { @@ -406,7 +424,8 @@ func (s *Server) getMetricMethodBucket(method string) string { // installed on both the unsecured and secured (TLS) servers. // NOTE: This method is maintained for backwards compatibility, but no new endpoints should be added // to this set. New handlers should be added under InstallAuthorizedHandlers. -func (s *Server) InstallAuthNotRequiredHandlers() { +func (s *Server) InstallAuthNotRequiredHandlers(ctx context.Context) { + logger := klog.FromContext(ctx) s.addMetricsBucketMatcher("healthz") checkers := []healthz.HealthChecker{ healthz.PingHealthz, @@ -424,7 +443,9 @@ func (s *Server) InstallAuthNotRequiredHandlers() { Path(podsPath). Produces(restful.MIME_JSON) ws.Route(ws.GET(""). - To(s.getPods). + To(func(r1 *restful.Request, r2 *restful.Response) { + s.getPods(logger, r1, r2) + }). Operation("getPods")) s.restfulCont.Add(ws) @@ -495,16 +516,20 @@ func (s *Server) InstallAuthNotRequiredHandlers() { // InstallAuthRequiredHandlers registers the HTTP handlers that should only be installed on servers // with authorization enabled. // NOTE: New endpoints must require authorization. -func (s *Server) InstallAuthRequiredHandlers() { +func (s *Server) InstallAuthRequiredHandlers(ctx context.Context) { + logger := klog.FromContext(ctx) s.addMetricsBucketMatcher("run") ws := new(restful.WebService) + getRun := func(request *restful.Request, response *restful.Response) { + s.getRun(logger, request, response) + } ws. Path("/run") ws.Route(ws.POST("/{podNamespace}/{podID}/{containerName}"). - To(s.getRun). + To(getRun). Operation("getRun")) ws.Route(ws.POST("/{podNamespace}/{podID}/{uid}/{containerName}"). - To(s.getRun). + To(getRun). Operation("getRun")) s.restfulCont.Add(ws) @@ -574,11 +599,6 @@ func (s *Server) InstallAuthRequiredHandlers() { s.addMetricsBucketMatcher("configz") configz.InstallHandler(s.restfulCont) - if utilfeature.DefaultFeatureGate.Enabled(zpagesfeatures.ComponentStatusz) { - s.addMetricsBucketMatcher("statusz") - statusz.Install(s.restfulCont, ComponentKubelet, statusz.NewRegistry(compatibility.DefaultBuildEffectiveVersion())) - } - if utilfeature.DefaultFeatureGate.Enabled(zpagesfeatures.ComponentFlagz) { if s.flagz != nil { s.addMetricsBucketMatcher("flagz") @@ -836,14 +856,14 @@ func encodePods(pods []*v1.Pod) (data []byte, err error) { } // getPods returns a list of pods bound to the Kubelet and their spec. -func (s *Server) getPods(request *restful.Request, response *restful.Response) { +func (s *Server) getPods(logger klog.Logger, request *restful.Request, response *restful.Response) { pods := s.host.GetPods() data, err := encodePods(pods) if err != nil { response.WriteError(http.StatusInternalServerError, err) return } - writeJSONResponse(response, data) + writeJSONResponse(logger, response, data) } // getRunningPods returns a list of pods running on Kubelet. The list is @@ -851,6 +871,7 @@ func (s *Server) getPods(request *restful.Request, response *restful.Response) { // by getPods, which is a set of desired pods to run. func (s *Server) getRunningPods(request *restful.Request, response *restful.Response) { ctx := request.Request.Context() + logger := klog.FromContext(ctx) pods, err := s.host.GetRunningPods(ctx) if err != nil { response.WriteError(http.StatusInternalServerError, err) @@ -861,7 +882,7 @@ func (s *Server) getRunningPods(request *restful.Request, response *restful.Resp response.WriteError(http.StatusInternalServerError, err) return } - writeJSONResponse(response, data) + writeJSONResponse(logger, response, data) } // getLogs handles logs requests against the Kubelet. @@ -904,7 +925,10 @@ func getPortForwardRequestParams(req *restful.Request) portForwardRequestParams type responder struct{} func (r *responder) Error(w http.ResponseWriter, req *http.Request, err error) { - klog.ErrorS(err, "Error while proxying request") + // Use context.TODO() because we currently do not have a proper context to pass in. + // Replace this with an appropriate context when refactoring this function to accept a context parameter. + logger := klog.FromContext(context.TODO()) + logger.Error(err, "Error while proxying request") http.Error(w, err.Error(), http.StatusInternalServerError) } @@ -965,7 +989,7 @@ func (s *Server) getExec(request *restful.Request, response *restful.Response) { } // getRun handles requests to run a command inside a container. -func (s *Server) getRun(request *restful.Request, response *restful.Response) { +func (s *Server) getRun(logger klog.Logger, request *restful.Request, response *restful.Response) { params := getExecRequestParams(request) pod, ok := s.host.GetPodByName(params.podNamespace, params.podName) if !ok { @@ -980,11 +1004,11 @@ func (s *Server) getRun(request *restful.Request, response *restful.Response) { response.WriteError(http.StatusInternalServerError, err) return } - writeJSONResponse(response, data) + writeJSONResponse(logger, response, data) } // Derived from go-restful writeJSON. -func writeJSONResponse(response *restful.Response, data []byte) { +func writeJSONResponse(logger klog.Logger, response *restful.Response, data []byte) { if data == nil { response.WriteHeader(http.StatusOK) // do not write a nil representation @@ -993,7 +1017,7 @@ func writeJSONResponse(response *restful.Response, data []byte) { response.Header().Set(restful.HEADER_ContentType, restful.MIME_JSON) response.WriteHeader(http.StatusOK) if _, err := response.Write(data); err != nil { - klog.ErrorS(err, "Error writing response") + logger.Error(err, "Error writing response") } } @@ -1031,6 +1055,7 @@ func (s *Server) getPortForward(request *restful.Request, response *restful.Resp // to the runtime to actually checkpoint the container. func (s *Server) checkpoint(request *restful.Request, response *restful.Response) { ctx := request.Request.Context() + logger := klog.FromContext(ctx) pod, ok := s.host.GetPodByName(request.PathParameter("podNamespace"), request.PathParameter("podID")) if !ok { response.WriteError(http.StatusNotFound, fmt.Errorf("pod does not exist")) @@ -1102,6 +1127,7 @@ func (s *Server) checkpoint(request *restful.Request, response *restful.Response return } writeJSONResponse( + logger, response, []byte(fmt.Sprintf("{\"items\":[\"%s\"]}", options.Location)), ) diff --git a/pkg/kubelet/server/server_test.go b/pkg/kubelet/server/server_test.go index 89c55f0e97b83..273f27bbbc774 100644 --- a/pkg/kubelet/server/server_test.go +++ b/pkg/kubelet/server/server_test.go @@ -28,6 +28,7 @@ import ( "net/http/httputil" "net/url" "reflect" + "regexp" "strconv" "strings" "testing" @@ -53,6 +54,7 @@ import ( runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" statsapi "k8s.io/kubelet/pkg/apis/stats/v1alpha1" api "k8s.io/kubernetes/pkg/apis/core" + "k8s.io/kubernetes/test/utils/ktesting" // Do some initialization to decode the query parameters correctly. "k8s.io/apiserver/pkg/server/healthz" @@ -279,15 +281,15 @@ func (fk *fakeKubelet) ListVolumesForPod(podUID types.UID) (map[string]volume.Vo func (*fakeKubelet) ListBlockVolumesForPod(podUID types.UID) (map[string]volume.BlockVolume, bool) { return map[string]volume.BlockVolume{}, true } -func (*fakeKubelet) RootFsStats() (*statsapi.FsStats, error) { return nil, nil } -func (*fakeKubelet) ListPodStats(_ context.Context) ([]statsapi.PodStats, error) { return nil, nil } -func (*fakeKubelet) ListPodStatsAndUpdateCPUNanoCoreUsage(_ context.Context) ([]statsapi.PodStats, error) { +func (*fakeKubelet) RootFsStats() (*statsapi.FsStats, error) { return nil, nil } +func (*fakeKubelet) ListPodStats(context.Context) ([]statsapi.PodStats, error) { return nil, nil } +func (*fakeKubelet) ListPodStatsAndUpdateCPUNanoCoreUsage(context.Context) ([]statsapi.PodStats, error) { return nil, nil } -func (*fakeKubelet) ListPodCPUAndMemoryStats(_ context.Context) ([]statsapi.PodStats, error) { +func (*fakeKubelet) ListPodCPUAndMemoryStats(context.Context) ([]statsapi.PodStats, error) { return nil, nil } -func (*fakeKubelet) ImageFsStats(_ context.Context) (*statsapi.FsStats, *statsapi.FsStats, error) { +func (*fakeKubelet) ImageFsStats(context.Context) (*statsapi.FsStats, *statsapi.FsStats, error) { return nil, nil, nil } func (*fakeKubelet) RlimitStats() (*statsapi.RlimitStats, error) { return nil, nil } @@ -307,7 +309,7 @@ type fakeAuth struct { func (f *fakeAuth) AuthenticateRequest(req *http.Request) (*authenticator.Response, bool, error) { return f.authenticateFunc(req) } -func (f *fakeAuth) GetRequestAttributes(u user.Info, req *http.Request) []authorizer.Attributes { +func (f *fakeAuth) GetRequestAttributes(ctx context.Context, u user.Info, req *http.Request) []authorizer.Attributes { return f.attributesFunc(u, req) } func (f *fakeAuth) Authorize(ctx context.Context, a authorizer.Attributes) (authorized authorizer.Decision, reason string, err error) { @@ -321,21 +323,21 @@ type serverTestFramework struct { testHTTPServer *httptest.Server } -func newServerTest() *serverTestFramework { - return newServerTestWithDebug(true, nil) +func newServerTest(ctx context.Context) *serverTestFramework { + return newServerTestWithDebug(ctx, true, nil) } -func newServerTestWithDebug(enableDebugging bool, streamingServer streaming.Server) *serverTestFramework { +func newServerTestWithDebug(ctx context.Context, enableDebugging bool, streamingServer streaming.Server) *serverTestFramework { kubeCfg := &kubeletconfiginternal.KubeletConfiguration{ EnableDebuggingHandlers: enableDebugging, EnableSystemLogHandler: enableDebugging, EnableProfilingHandler: enableDebugging, EnableDebugFlagsHandler: enableDebugging, } - return newServerTestWithDebuggingHandlers(kubeCfg, streamingServer) + return newServerTestWithDebuggingHandlers(ctx, kubeCfg, streamingServer) } -func newServerTestWithDebuggingHandlers(kubeCfg *kubeletconfiginternal.KubeletConfiguration, streamingServer streaming.Server) *serverTestFramework { +func newServerTestWithDebuggingHandlers(ctx context.Context, kubeCfg *kubeletconfiginternal.KubeletConfiguration, streamingServer streaming.Server) *serverTestFramework { fw := &serverTestFramework{} fw.fakeKubelet = &fakeKubelet{ @@ -363,8 +365,9 @@ func newServerTestWithDebuggingHandlers(kubeCfg *kubeletconfiginternal.KubeletCo }, } server := NewServer( + ctx, fw.fakeKubelet, - stats.NewResourceAnalyzer(fw.fakeKubelet, time.Minute, &record.FakeRecorder{}), + stats.NewResourceAnalyzer(ctx, fw.fakeKubelet, time.Minute, &record.FakeRecorder{}), []healthz.HealthChecker{}, flagz.NamedFlagSetsReader{}, fw.fakeAuth, @@ -384,7 +387,8 @@ func getPodName(name, namespace string) string { } func TestServeLogs(t *testing.T) { - fw := newServerTest() + tCtx := ktesting.Init(t) + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() content := string(`
kubelet.loggoogle.log
`) @@ -413,7 +417,8 @@ func TestServeLogs(t *testing.T) { } func TestServeRunInContainer(t *testing.T) { - fw := newServerTest() + tCtx := ktesting.Init(t) + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() output := "foo bar" podNamespace := "other" @@ -454,7 +459,8 @@ func TestServeRunInContainer(t *testing.T) { } func TestServeRunInContainerWithUID(t *testing.T) { - fw := newServerTest() + tCtx := ktesting.Init(t) + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() output := "foo bar" podNamespace := "other" @@ -497,7 +503,8 @@ func TestServeRunInContainerWithUID(t *testing.T) { } func TestHealthCheck(t *testing.T) { - fw := newServerTest() + tCtx := ktesting.Init(t) + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() assertHealthIsOk(t, fw.testHTTPServer.URL+"/healthz") @@ -514,9 +521,46 @@ func assertHealthFails(t *testing.T, httpURL string, expectedErrorCode int) { } } +func TestStatusz(t *testing.T) { + tCtx := ktesting.Init(t) + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, zpagesfeatures.ComponentStatusz, true) + + fw := newServerTest(tCtx) + defer fw.testHTTPServer.Close() + + req, err := http.NewRequest(http.MethodGet, fw.testHTTPServer.URL+"/statusz", nil) + if err != nil { + t.Fatalf("Got error creating request: %v", err) + } + req.Header.Set("Accept", "text/plain") + resp, err := http.DefaultClient.Do(req) + if err != nil { + t.Fatalf("Got error GETing: %v", err) + } + defer func(resp *http.Response) { + closeErr := resp.Body.Close() + if closeErr != nil { + t.Errorf("Got error closing response body: %v", err) + } + }(resp) + if resp.StatusCode != http.StatusOK { + t.Errorf("expected status code %d, got %d", http.StatusOK, resp.StatusCode) + } + resBody, err := io.ReadAll(resp.Body) + if err != nil { + t.Fatalf("Got error reading response body: %v", err) + } + + reg := regexp.MustCompile(`Paths([:=\s]+)/configz /debug /healthz /metrics\n$`) + if reg.FindStringSubmatch(string(resBody)) == nil { + t.Errorf("statusz paths missing: %s\n\nExpected: %q", string(resBody), "Paths /configz /debug /healthz /metrics") + } +} + // Ensure all registered handlers & services have an associated testcase. func TestAuthzCoverage(t *testing.T) { - fw := newServerTest() + tCtx := ktesting.Init(t) + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() for _, fineGrained := range []bool{false, true} { @@ -561,7 +605,8 @@ func TestAuthzCoverage(t *testing.T) { } func TestInstallAuthNotRequiredHandlers(t *testing.T) { - fw := newServerTestWithDebug(false, nil) + tCtx := ktesting.Init(t) + fw := newServerTestWithDebug(tCtx, false, nil) defer fw.testHTTPServer.Close() // No new handlers should be added to this list. @@ -627,12 +672,13 @@ func TestInstallAuthNotRequiredHandlers(t *testing.T) { } func TestAuthFilters(t *testing.T) { + tCtx := ktesting.Init(t) // Enable features.ContainerCheckpoint during test featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.ContainerCheckpoint, true) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, zpagesfeatures.ComponentStatusz, true) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, zpagesfeatures.ComponentFlagz, true) - fw := newServerTest() + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() attributesGetter := NewNodeAuthorizerAttributesGetter(authzTestNodeName) @@ -656,7 +702,7 @@ func TestAuthFilters(t *testing.T) { fw.fakeAuth.attributesFunc = func(u user.Info, req *http.Request) []authorizer.Attributes { calledAttributes = true require.Equal(t, expectedUser, u) - attrs := attributesGetter.GetRequestAttributes(u, req) + attrs := attributesGetter.GetRequestAttributes(tCtx, u, req) tc.AssertAttributes(t, attrs) return attrs } @@ -682,6 +728,7 @@ func TestAuthFilters(t *testing.T) { } func TestAuthenticationError(t *testing.T) { + tCtx := ktesting.Init(t) var ( expectedUser = &user.DefaultInfo{Name: "test"} expectedAttributes = []authorizer.Attributes{&authorizer.AttributesRecord{User: expectedUser}} @@ -691,7 +738,7 @@ func TestAuthenticationError(t *testing.T) { calledAttributes = false ) - fw := newServerTest() + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() fw.fakeAuth.authenticateFunc = func(req *http.Request) (*authenticator.Response, bool, error) { calledAuthenticate = true @@ -720,6 +767,7 @@ func TestAuthenticationError(t *testing.T) { } func TestAuthenticationFailure(t *testing.T) { + tCtx := ktesting.Init(t) var ( expectedUser = &user.DefaultInfo{Name: "test"} expectedAttributes = []authorizer.Attributes{&authorizer.AttributesRecord{User: expectedUser}} @@ -729,7 +777,7 @@ func TestAuthenticationFailure(t *testing.T) { calledAttributes = false ) - fw := newServerTest() + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() fw.fakeAuth.authenticateFunc = func(req *http.Request) (*authenticator.Response, bool, error) { calledAuthenticate = true @@ -758,6 +806,7 @@ func TestAuthenticationFailure(t *testing.T) { } func TestAuthorizationSuccess(t *testing.T) { + tCtx := ktesting.Init(t) var ( expectedUser = &user.DefaultInfo{Name: "test"} expectedAttributes = []authorizer.Attributes{&authorizer.AttributesRecord{User: expectedUser}} @@ -767,7 +816,7 @@ func TestAuthorizationSuccess(t *testing.T) { calledAttributes = false ) - fw := newServerTest() + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() fw.fakeAuth.authenticateFunc = func(req *http.Request) (*authenticator.Response, bool, error) { calledAuthenticate = true @@ -796,7 +845,8 @@ func TestAuthorizationSuccess(t *testing.T) { } func TestSyncLoopCheck(t *testing.T) { - fw := newServerTest() + tCtx := ktesting.Init(t) + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() fw.fakeKubelet.resyncInterval = time.Minute @@ -866,7 +916,8 @@ func setGetContainerLogsFunc(fw *serverTestFramework, t *testing.T, expectedPodN } func TestContainerLogs(t *testing.T) { - fw := newServerTest() + tCtx := ktesting.Init(t) + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() tests := map[string]struct { @@ -920,7 +971,8 @@ func TestContainerLogs(t *testing.T) { } func TestContainerLogsWithInvalidTail(t *testing.T) { - fw := newServerTest() + tCtx := ktesting.Init(t) + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() output := "foo bar" podNamespace := "other" @@ -940,6 +992,7 @@ func TestContainerLogsWithInvalidTail(t *testing.T) { } func TestContainerLogsWithSeparateStream(t *testing.T) { + tCtx := ktesting.Init(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.PodLogsQuerySplitStreams, true) type logEntry struct { @@ -947,7 +1000,7 @@ func TestContainerLogsWithSeparateStream(t *testing.T) { msg string } - fw := newServerTest() + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() var ( @@ -1154,6 +1207,7 @@ func TestContainerLogsWithSeparateStream(t *testing.T) { } func TestCheckpointContainer(t *testing.T) { + tCtx := ktesting.Init(t) podNamespace := "other" podName := "foo" expectedContainerName := "baz" @@ -1162,7 +1216,7 @@ func TestCheckpointContainer(t *testing.T) { // Enable features.ContainerCheckpoint during test featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.ContainerCheckpoint, featureGate) - fw := newServerTest() + fw := newServerTest(tCtx) // GetPodByName() should always fail fw.fakeKubelet.podByNameFunc = func(namespace, name string) (*v1.Pod, bool) { return nil, false @@ -1255,10 +1309,11 @@ func makeReq(t *testing.T, method, url, clientProtocol string) *http.Request { } func TestServeExecInContainerIdleTimeout(t *testing.T) { + tCtx := ktesting.Init(t) ss, err := newTestStreamingServer(100 * time.Millisecond) require.NoError(t, err) defer ss.testHTTPServer.Close() - fw := newServerTestWithDebug(true, ss) + fw := newServerTestWithDebug(tCtx, true, ss) defer fw.testHTTPServer.Close() podNamespace := "other" @@ -1295,6 +1350,7 @@ func TestServeExecInContainerIdleTimeout(t *testing.T) { } func testExecAttach(t *testing.T, verb string) { + tCtx := ktesting.Init(t) tests := map[string]struct { stdin bool stdout bool @@ -1318,7 +1374,7 @@ func testExecAttach(t *testing.T, verb string) { ss, err := newTestStreamingServer(0) require.NoError(t, err) defer ss.testHTTPServer.Close() - fw := newServerTestWithDebug(true, ss) + fw := newServerTestWithDebug(tCtx, true, ss) defer fw.testHTTPServer.Close() fmt.Println(desc) @@ -1514,10 +1570,11 @@ func TestServeAttachContainer(t *testing.T) { } func TestServePortForwardIdleTimeout(t *testing.T) { + tCtx := ktesting.Init(t) ss, err := newTestStreamingServer(100 * time.Millisecond) require.NoError(t, err) defer ss.testHTTPServer.Close() - fw := newServerTestWithDebug(true, ss) + fw := newServerTestWithDebug(tCtx, true, ss) defer fw.testHTTPServer.Close() podNamespace := "other" @@ -1551,6 +1608,7 @@ func TestServePortForwardIdleTimeout(t *testing.T) { } func TestServePortForward(t *testing.T) { + tCtx := ktesting.Init(t) tests := map[string]struct { port string uid bool @@ -1579,7 +1637,7 @@ func TestServePortForward(t *testing.T) { ss, err := newTestStreamingServer(0) require.NoError(t, err) defer ss.testHTTPServer.Close() - fw := newServerTestWithDebug(true, ss) + fw := newServerTestWithDebug(tCtx, true, ss) defer fw.testHTTPServer.Close() portForwardFuncDone := make(chan struct{}) @@ -1677,6 +1735,7 @@ func TestServePortForward(t *testing.T) { } func TestMetricBuckets(t *testing.T) { + tCtx := ktesting.Init(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, zpagesfeatures.ComponentStatusz, true) tests := map[string]struct { @@ -1716,7 +1775,7 @@ func TestMetricBuckets(t *testing.T) { "invalid path starting with good": {url: "/healthzjunk", bucket: "other"}, } featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, zpagesfeatures.ComponentFlagz, true) - fw := newServerTest() + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() for _, test := range tests { @@ -1727,6 +1786,7 @@ func TestMetricBuckets(t *testing.T) { } func TestMetricMethodBuckets(t *testing.T) { + tCtx := ktesting.Init(t) tests := map[string]struct { method string bucket string @@ -1736,7 +1796,7 @@ func TestMetricMethodBuckets(t *testing.T) { "invalid method": {method: "WEIRD", bucket: "other"}, } - fw := newServerTest() + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() for _, test := range tests { @@ -1747,6 +1807,7 @@ func TestMetricMethodBuckets(t *testing.T) { } func TestDebuggingDisabledHandlers(t *testing.T) { + tCtx := ktesting.Init(t) // for backward compatibility even if enablesystemLogHandler or enableProfilingHandler is set but not // enableDebuggingHandler then /logs, /pprof and /flags shouldn't be served. kubeCfg := &kubeletconfiginternal.KubeletConfiguration{ @@ -1755,7 +1816,7 @@ func TestDebuggingDisabledHandlers(t *testing.T) { EnableDebugFlagsHandler: true, EnableProfilingHandler: true, } - fw := newServerTestWithDebuggingHandlers(kubeCfg, nil) + fw := newServerTestWithDebuggingHandlers(tCtx, kubeCfg, nil) defer fw.testHTTPServer.Close() paths := []string{ @@ -1770,10 +1831,11 @@ func TestDebuggingDisabledHandlers(t *testing.T) { } func TestDisablingLogAndProfilingHandler(t *testing.T) { + tCtx := ktesting.Init(t) kubeCfg := &kubeletconfiginternal.KubeletConfiguration{ EnableDebuggingHandlers: true, } - fw := newServerTestWithDebuggingHandlers(kubeCfg, nil) + fw := newServerTestWithDebuggingHandlers(tCtx, kubeCfg, nil) defer fw.testHTTPServer.Close() // verify debug endpoints are disabled @@ -1783,7 +1845,8 @@ func TestDisablingLogAndProfilingHandler(t *testing.T) { } func TestFailedParseParamsSummaryHandler(t *testing.T) { - fw := newServerTest() + tCtx := ktesting.Init(t) + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() resp, err := http.Post(fw.testHTTPServer.URL+"/stats/summary", "invalid/content/type", nil) @@ -1833,10 +1896,11 @@ func TestTrimURLPath(t *testing.T) { } func TestFineGrainedAuthz(t *testing.T) { + tCtx := ktesting.Init(t) // Enable features.ContainerCheckpoint during test featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.KubeletFineGrainedAuthz, true) - fw := newServerTest() + fw := newServerTest(tCtx) defer fw.testHTTPServer.Close() attributesGetter := NewNodeAuthorizerAttributesGetter(authzTestNodeName) @@ -1908,7 +1972,7 @@ func TestFineGrainedAuthz(t *testing.T) { } fw.fakeAuth.attributesFunc = func(u user.Info, req *http.Request) []authorizer.Attributes { calledAttributes = true - attrs := attributesGetter.GetRequestAttributes(u, req) + attrs := attributesGetter.GetRequestAttributes(tCtx, u, req) var gotSubresources []string for _, attr := range attrs { gotSubresources = append(gotSubresources, attr.GetSubresource()) @@ -1937,11 +2001,12 @@ func TestFineGrainedAuthz(t *testing.T) { } func TestNewServerRegistersMetricsSLIsEndpointTwice(t *testing.T) { + tCtx := ktesting.Init(t) host := &fakeKubelet{} - resourceAnalyzer := stats.NewResourceAnalyzer(nil, time.Minute, &record.FakeRecorder{}) + resourceAnalyzer := stats.NewResourceAnalyzer(tCtx, nil, time.Minute, &record.FakeRecorder{}) - server1 := NewServer(host, resourceAnalyzer, []healthz.HealthChecker{}, flagz.NamedFlagSetsReader{}, nil, nil) - server2 := NewServer(host, resourceAnalyzer, []healthz.HealthChecker{}, flagz.NamedFlagSetsReader{}, nil, nil) + server1 := NewServer(tCtx, host, resourceAnalyzer, []healthz.HealthChecker{}, flagz.NamedFlagSetsReader{}, nil, nil) + server2 := NewServer(tCtx, host, resourceAnalyzer, []healthz.HealthChecker{}, flagz.NamedFlagSetsReader{}, nil, nil) // Check if both servers registered the /metrics/slis endpoint assert.Contains(t, server1.restfulCont.RegisteredHandlePaths(), "/metrics/slis", "First server should register /metrics/slis") diff --git a/pkg/kubelet/server/server_websocket_test.go b/pkg/kubelet/server/server_websocket_test.go index 75b6712a5403f..3a32091299f0c 100644 --- a/pkg/kubelet/server/server_websocket_test.go +++ b/pkg/kubelet/server/server_websocket_test.go @@ -30,6 +30,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/kubelet/pkg/cri/streaming/portforward" + "k8s.io/kubernetes/test/utils/ktesting" ) const ( @@ -38,6 +39,7 @@ const ( ) func TestServeWSPortForward(t *testing.T) { + tCtx := ktesting.Init(t) tests := map[string]struct { port string uid bool @@ -66,7 +68,7 @@ func TestServeWSPortForward(t *testing.T) { ss, err := newTestStreamingServer(0) require.NoError(t, err) defer ss.testHTTPServer.Close() - fw := newServerTestWithDebug(true, ss) + fw := newServerTestWithDebug(tCtx, true, ss) defer fw.testHTTPServer.Close() portForwardFuncDone := make(chan struct{}) @@ -150,6 +152,7 @@ func TestServeWSPortForward(t *testing.T) { } func TestServeWSMultiplePortForward(t *testing.T) { + tCtx := ktesting.Init(t) portsText := []string{"7000,8000", "9000"} ports := []uint16{7000, 8000, 9000} podNamespace := "other" @@ -158,7 +161,7 @@ func TestServeWSMultiplePortForward(t *testing.T) { ss, err := newTestStreamingServer(0) require.NoError(t, err) defer ss.testHTTPServer.Close() - fw := newServerTestWithDebug(true, ss) + fw := newServerTestWithDebug(tCtx, true, ss) defer fw.testHTTPServer.Close() portForwardWG := sync.WaitGroup{} diff --git a/pkg/kubelet/server/stats/.mockery.yaml b/pkg/kubelet/server/stats/.mockery.yaml index f419d6d8c5c75..48e361a7d4793 100644 --- a/pkg/kubelet/server/stats/.mockery.yaml +++ b/pkg/kubelet/server/stats/.mockery.yaml @@ -1,13 +1,13 @@ --- dir: testing -filename: "mock_{{.InterfaceName | snakecase}}.go" -boilerplate-file: ../../../../hack/boilerplate/boilerplate.generatego.txt -outpkg: testing -with-expecter: true +filename: mocks.go +pkgname: testing +template: testify +template-data: + boilerplate-file: ../../../../hack/boilerplate/boilerplate.generatego.txt + unroll-variadic: true packages: k8s.io/kubernetes/pkg/kubelet/server/stats: interfaces: - Provider: - config: - filename: mock_stats_provider.go - SummaryProvider: + Provider: {} + SummaryProvider: {} diff --git a/pkg/kubelet/server/stats/fs_resource_analyzer.go b/pkg/kubelet/server/stats/fs_resource_analyzer.go index 01ad396422ac4..5c837635b5b56 100644 --- a/pkg/kubelet/server/stats/fs_resource_analyzer.go +++ b/pkg/kubelet/server/stats/fs_resource_analyzer.go @@ -17,6 +17,7 @@ limitations under the License. package stats import ( + "context" "sync" "sync/atomic" "time" @@ -58,26 +59,27 @@ func newFsResourceAnalyzer(statsProvider Provider, calcVolumePeriod time.Duratio } // Start eager background caching of volume stats. -func (s *fsResourceAnalyzer) Start() { +func (s *fsResourceAnalyzer) Start(ctx context.Context) { + logger := klog.FromContext(ctx) s.startOnce.Do(func() { if s.calcPeriod <= 0 { - klog.InfoS("Volume stats collection disabled") + logger.Info("Volume stats collection disabled") return } - klog.InfoS("Starting FS ResourceAnalyzer") - go wait.Forever(func() { s.updateCachedPodVolumeStats() }, s.calcPeriod) + logger.Info("Starting FS ResourceAnalyzer") + go wait.Forever(func() { s.updateCachedPodVolumeStats(logger) }, s.calcPeriod) }) } // updateCachedPodVolumeStats calculates and caches the PodVolumeStats for every Pod known to the kubelet. -func (s *fsResourceAnalyzer) updateCachedPodVolumeStats() { +func (s *fsResourceAnalyzer) updateCachedPodVolumeStats(logger klog.Logger) { oldCache := s.cachedVolumeStats.Load().(statCache) newCache := make(statCache) // Copy existing entries to new map, creating/starting new entries for pods missing from the cache for _, pod := range s.statsProvider.GetPods() { if value, found := oldCache[pod.GetUID()]; !found { - newCache[pod.GetUID()] = newVolumeStatCalculator(s.statsProvider, s.calcPeriod, pod, s.eventRecorder).StartOnce() + newCache[pod.GetUID()] = newVolumeStatCalculator(s.statsProvider, s.calcPeriod, pod, s.eventRecorder).StartOnce(logger) } else { newCache[pod.GetUID()] = value } diff --git a/pkg/kubelet/server/stats/handler.go b/pkg/kubelet/server/stats/handler.go index 09c8cfbc21292..61b7576c9f828 100644 --- a/pkg/kubelet/server/stats/handler.go +++ b/pkg/kubelet/server/stats/handler.go @@ -138,10 +138,11 @@ func CreateHandlers(rootPath string, provider Provider, summaryProvider SummaryP // If "only_cpu_and_memory" GET param is true then only cpu and memory is returned in response. func (h *handler) handleSummary(request *restful.Request, response *restful.Response) { ctx := request.Request.Context() + logger := klog.FromContext(ctx) onlyCPUAndMemory := false err := request.Request.ParseForm() if err != nil { - handleError(response, "/stats/summary", fmt.Errorf("parse form failed: %w", err)) + handleError(logger, response, "/stats/summary", fmt.Errorf("parse form failed: %w", err)) return } if onlyCluAndMemoryParam, found := request.Request.Form["only_cpu_and_memory"]; found && @@ -157,27 +158,27 @@ func (h *handler) handleSummary(request *restful.Request, response *restful.Resp summary, err = h.summaryProvider.Get(ctx, forceStatsUpdate) } if err != nil { - handleError(response, "/stats/summary", err) + handleError(logger, response, "/stats/summary", err) } else { - writeResponse(response, summary) + writeResponse(logger, response, summary) } } -func writeResponse(response *restful.Response, stats interface{}) { +func writeResponse(logger klog.Logger, response *restful.Response, stats interface{}) { if err := response.WriteAsJson(stats); err != nil { - klog.ErrorS(err, "Error writing response") + logger.Error(err, "Error writing response") } } // handleError serializes an error object into an HTTP response. // request is provided for logging. -func handleError(response *restful.Response, request string, err error) { +func handleError(logger klog.Logger, response *restful.Response, request string, err error) { switch err { case kubecontainer.ErrContainerNotFound: response.WriteError(http.StatusNotFound, err) default: msg := fmt.Sprintf("Internal Error: %v", err) - klog.ErrorS(err, "HTTP InternalServerError serving", "request", request) + logger.Error(err, "HTTP InternalServerError serving", "request", request) response.WriteErrorString(http.StatusInternalServerError, msg) } } diff --git a/pkg/kubelet/server/stats/resource_analyzer.go b/pkg/kubelet/server/stats/resource_analyzer.go index 853eeb67b0f47..0da817afb62c9 100644 --- a/pkg/kubelet/server/stats/resource_analyzer.go +++ b/pkg/kubelet/server/stats/resource_analyzer.go @@ -17,13 +17,15 @@ limitations under the License. package stats import ( - "k8s.io/client-go/tools/record" + "context" "time" + + "k8s.io/client-go/tools/record" ) // ResourceAnalyzer provides statistics on node resource consumption type ResourceAnalyzer interface { - Start() + Start(context.Context) fsResourceAnalyzerInterface SummaryProvider @@ -38,13 +40,13 @@ type resourceAnalyzer struct { var _ ResourceAnalyzer = &resourceAnalyzer{} // NewResourceAnalyzer returns a new ResourceAnalyzer -func NewResourceAnalyzer(statsProvider Provider, calVolumeFrequency time.Duration, eventRecorder record.EventRecorder) ResourceAnalyzer { +func NewResourceAnalyzer(ctx context.Context, statsProvider Provider, calVolumeFrequency time.Duration, eventRecorder record.EventRecorder) ResourceAnalyzer { fsAnalyzer := newFsResourceAnalyzer(statsProvider, calVolumeFrequency, eventRecorder) - summaryProvider := NewSummaryProvider(statsProvider) + summaryProvider := NewSummaryProvider(ctx, statsProvider) return &resourceAnalyzer{fsAnalyzer, summaryProvider} } // Start starts background functions necessary for the ResourceAnalyzer to function -func (ra *resourceAnalyzer) Start() { - ra.fsResourceAnalyzer.Start() +func (ra *resourceAnalyzer) Start(ctx context.Context) { + ra.fsResourceAnalyzer.Start(ctx) } diff --git a/pkg/kubelet/server/stats/summary.go b/pkg/kubelet/server/stats/summary.go index 0e21717ddd0d2..d371b7042c314 100644 --- a/pkg/kubelet/server/stats/summary.go +++ b/pkg/kubelet/server/stats/summary.go @@ -53,12 +53,13 @@ var _ SummaryProvider = &summaryProviderImpl{} // NewSummaryProvider returns a SummaryProvider using the stats provided by the // specified statsProvider. -func NewSummaryProvider(statsProvider Provider) SummaryProvider { +func NewSummaryProvider(ctx context.Context, statsProvider Provider) SummaryProvider { + logger := klog.FromContext(ctx) kubeletCreationTime := metav1.Now() bootTime, err := util.GetBootTime() if err != nil { // bootTime will be zero if we encounter an error getting the boot time. - klog.InfoS("Error getting system boot time. Node metrics will have an incorrect start time", "err", err) + logger.Info("Error getting system boot time. Node metrics will have an incorrect start time", "err", err) } return &summaryProviderImpl{ @@ -113,7 +114,7 @@ func (sp *summaryProviderImpl) Get(ctx context.Context, updateStats bool) (*stat Fs: rootFsStats, Runtime: &statsapi.RuntimeStats{ContainerFs: containerFsStats, ImageFs: imageFsStats}, Rlimit: rlimit, - SystemContainers: sp.GetSystemContainersStats(nodeConfig, podStats, updateStats), + SystemContainers: sp.GetSystemContainersStats(ctx, nodeConfig, podStats, updateStats), } if utilfeature.DefaultFeatureGate.Enabled(features.KubeletPSI) { nodeStats.IO = rootStats.IO @@ -149,7 +150,7 @@ func (sp *summaryProviderImpl) GetCPUAndMemoryStats(ctx context.Context) (*stats Memory: rootStats.Memory, Swap: rootStats.Swap, StartTime: rootStats.StartTime, - SystemContainers: sp.GetSystemContainersCPUAndMemoryStats(nodeConfig, podStats, false), + SystemContainers: sp.GetSystemContainersCPUAndMemoryStats(ctx, nodeConfig, podStats, false), } summary := statsapi.Summary{ Node: nodeStats, diff --git a/pkg/kubelet/server/stats/summary_sys_containers.go b/pkg/kubelet/server/stats/summary_sys_containers.go index 35d1135c630a0..8ec6ca1f30b2a 100644 --- a/pkg/kubelet/server/stats/summary_sys_containers.go +++ b/pkg/kubelet/server/stats/summary_sys_containers.go @@ -20,6 +20,7 @@ limitations under the License. package stats import ( + "context" "errors" "k8s.io/klog/v2" @@ -30,7 +31,8 @@ import ( "k8s.io/kubernetes/pkg/kubelet/cm" ) -func (sp *summaryProviderImpl) GetSystemContainersStats(nodeConfig cm.NodeConfig, podStats []statsapi.PodStats, updateStats bool) (stats []statsapi.ContainerStats) { +func (sp *summaryProviderImpl) GetSystemContainersStats(ctx context.Context, nodeConfig cm.NodeConfig, podStats []statsapi.PodStats, updateStats bool) (stats []statsapi.ContainerStats) { + logger := klog.FromContext(ctx) systemContainers := map[string]struct { name string forceStatsUpdate bool @@ -48,7 +50,7 @@ func (sp *summaryProviderImpl) GetSystemContainersStats(nodeConfig cm.NodeConfig } s, _, err := sp.provider.GetCgroupStats(cont.name, cont.forceStatsUpdate) if err != nil { - klog.ErrorS(err, "Failed to get system container stats", "containerName", cont.name) + logger.Error(err, "Failed to get system container stats", "containerName", cont.name) continue } // System containers don't have a filesystem associated with them. @@ -65,7 +67,8 @@ func (sp *summaryProviderImpl) GetSystemContainersStats(nodeConfig cm.NodeConfig return stats } -func (sp *summaryProviderImpl) GetSystemContainersCPUAndMemoryStats(nodeConfig cm.NodeConfig, podStats []statsapi.PodStats, updateStats bool) (stats []statsapi.ContainerStats) { +func (sp *summaryProviderImpl) GetSystemContainersCPUAndMemoryStats(ctx context.Context, nodeConfig cm.NodeConfig, podStats []statsapi.PodStats, updateStats bool) (stats []statsapi.ContainerStats) { + logger := klog.FromContext(ctx) systemContainers := map[string]struct { name string forceStatsUpdate bool @@ -84,9 +87,9 @@ func (sp *summaryProviderImpl) GetSystemContainersCPUAndMemoryStats(nodeConfig c s, err := sp.provider.GetCgroupCPUAndMemoryStats(cont.name, cont.forceStatsUpdate) if err != nil { if errors.Is(err, cadvisormemory.ErrDataNotFound) { - klog.V(4).InfoS("cgroup stats not found in memory cache", "containerName", cont.name) + logger.V(4).Info("cgroup stats not found in memory cache", "containerName", cont.name) } else { - klog.ErrorS(err, "Failed to get system container stats", "containerName", cont.name) + logger.Error(err, "Failed to get system container stats", "containerName", cont.name) } continue } diff --git a/pkg/kubelet/server/stats/summary_sys_containers_windows.go b/pkg/kubelet/server/stats/summary_sys_containers_windows.go index b651c943a1c1b..ac6fae1f42c89 100644 --- a/pkg/kubelet/server/stats/summary_sys_containers_windows.go +++ b/pkg/kubelet/server/stats/summary_sys_containers_windows.go @@ -20,6 +20,7 @@ limitations under the License. package stats import ( + "context" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -29,13 +30,13 @@ import ( "k8s.io/kubernetes/pkg/kubelet/winstats" ) -func (sp *summaryProviderImpl) GetSystemContainersStats(nodeConfig cm.NodeConfig, podStats []statsapi.PodStats, updateStats bool) (stats []statsapi.ContainerStats) { +func (sp *summaryProviderImpl) GetSystemContainersStats(_ context.Context, nodeConfig cm.NodeConfig, podStats []statsapi.PodStats, updateStats bool) (stats []statsapi.ContainerStats) { stats = append(stats, sp.getSystemPodsCPUAndMemoryStats(nodeConfig, podStats, updateStats)) stats = append(stats, sp.getSystemWindowsGlobalmemoryStats()) return stats } -func (sp *summaryProviderImpl) GetSystemContainersCPUAndMemoryStats(nodeConfig cm.NodeConfig, podStats []statsapi.PodStats, updateStats bool) (stats []statsapi.ContainerStats) { +func (sp *summaryProviderImpl) GetSystemContainersCPUAndMemoryStats(_ context.Context, nodeConfig cm.NodeConfig, podStats []statsapi.PodStats, updateStats bool) (stats []statsapi.ContainerStats) { stats = append(stats, sp.getSystemPodsCPUAndMemoryStats(nodeConfig, podStats, updateStats)) stats = append(stats, sp.getSystemWindowsGlobalmemoryStats()) return stats diff --git a/pkg/kubelet/server/stats/summary_test.go b/pkg/kubelet/server/stats/summary_test.go index 0fbdd30e888b7..bbca2fa501f08 100644 --- a/pkg/kubelet/server/stats/summary_test.go +++ b/pkg/kubelet/server/stats/summary_test.go @@ -288,7 +288,7 @@ func TestSummaryProviderGetCPUAndMemoryStats(t *testing.T) { mockStatsProvider.EXPECT().GetCgroupCPUAndMemoryStats("/kubelet", false).Return(cgroupStatsMap["/kubelet"].cs, nil) mockStatsProvider.EXPECT().GetCgroupCPUAndMemoryStats("/kubepods", false).Return(cgroupStatsMap["/pods"].cs, nil) - provider := NewSummaryProvider(mockStatsProvider) + provider := NewSummaryProvider(ctx, mockStatsProvider) summary, err := provider.GetCPUAndMemoryStats(ctx) assert.NoError(err) diff --git a/pkg/kubelet/server/stats/testing/mock_summary_provider.go b/pkg/kubelet/server/stats/testing/mock_summary_provider.go deleted file mode 100644 index 3a39a51e9eec9..0000000000000 --- a/pkg/kubelet/server/stats/testing/mock_summary_provider.go +++ /dev/null @@ -1,171 +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 mockery v2.53.3. DO NOT EDIT. - -package testing - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - v1alpha1 "k8s.io/kubelet/pkg/apis/stats/v1alpha1" -) - -// MockSummaryProvider is an autogenerated mock type for the SummaryProvider type -type MockSummaryProvider struct { - mock.Mock -} - -type MockSummaryProvider_Expecter struct { - mock *mock.Mock -} - -func (_m *MockSummaryProvider) EXPECT() *MockSummaryProvider_Expecter { - return &MockSummaryProvider_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: ctx, updateStats -func (_m *MockSummaryProvider) Get(ctx context.Context, updateStats bool) (*v1alpha1.Summary, error) { - ret := _m.Called(ctx, updateStats) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *v1alpha1.Summary - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bool) (*v1alpha1.Summary, error)); ok { - return rf(ctx, updateStats) - } - if rf, ok := ret.Get(0).(func(context.Context, bool) *v1alpha1.Summary); ok { - r0 = rf(ctx, updateStats) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1alpha1.Summary) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, bool) error); ok { - r1 = rf(ctx, updateStats) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSummaryProvider_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockSummaryProvider_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - updateStats bool -func (_e *MockSummaryProvider_Expecter) Get(ctx interface{}, updateStats interface{}) *MockSummaryProvider_Get_Call { - return &MockSummaryProvider_Get_Call{Call: _e.mock.On("Get", ctx, updateStats)} -} - -func (_c *MockSummaryProvider_Get_Call) Run(run func(ctx context.Context, updateStats bool)) *MockSummaryProvider_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(bool)) - }) - return _c -} - -func (_c *MockSummaryProvider_Get_Call) Return(_a0 *v1alpha1.Summary, _a1 error) *MockSummaryProvider_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSummaryProvider_Get_Call) RunAndReturn(run func(context.Context, bool) (*v1alpha1.Summary, error)) *MockSummaryProvider_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetCPUAndMemoryStats provides a mock function with given fields: ctx -func (_m *MockSummaryProvider) GetCPUAndMemoryStats(ctx context.Context) (*v1alpha1.Summary, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetCPUAndMemoryStats") - } - - var r0 *v1alpha1.Summary - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*v1alpha1.Summary, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *v1alpha1.Summary); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1alpha1.Summary) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSummaryProvider_GetCPUAndMemoryStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCPUAndMemoryStats' -type MockSummaryProvider_GetCPUAndMemoryStats_Call struct { - *mock.Call -} - -// GetCPUAndMemoryStats is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockSummaryProvider_Expecter) GetCPUAndMemoryStats(ctx interface{}) *MockSummaryProvider_GetCPUAndMemoryStats_Call { - return &MockSummaryProvider_GetCPUAndMemoryStats_Call{Call: _e.mock.On("GetCPUAndMemoryStats", ctx)} -} - -func (_c *MockSummaryProvider_GetCPUAndMemoryStats_Call) Run(run func(ctx context.Context)) *MockSummaryProvider_GetCPUAndMemoryStats_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockSummaryProvider_GetCPUAndMemoryStats_Call) Return(_a0 *v1alpha1.Summary, _a1 error) *MockSummaryProvider_GetCPUAndMemoryStats_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSummaryProvider_GetCPUAndMemoryStats_Call) RunAndReturn(run func(context.Context) (*v1alpha1.Summary, error)) *MockSummaryProvider_GetCPUAndMemoryStats_Call { - _c.Call.Return(run) - return _c -} - -// NewMockSummaryProvider creates a new instance of MockSummaryProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockSummaryProvider(t interface { - mock.TestingT - Cleanup(func()) -}) *MockSummaryProvider { - mock := &MockSummaryProvider{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/server/stats/testing/mock_stats_provider.go b/pkg/kubelet/server/stats/testing/mocks.go similarity index 51% rename from pkg/kubelet/server/stats/testing/mock_stats_provider.go rename to pkg/kubelet/server/stats/testing/mocks.go index b3c94442f6714..f1742d3ca6d9a 100644 --- a/pkg/kubelet/server/stats/testing/mock_stats_provider.go +++ b/pkg/kubelet/server/stats/testing/mocks.go @@ -14,29 +14,38 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by mockery v2.53.3. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package testing import ( - context "context" - - cm "k8s.io/kubernetes/pkg/kubelet/cm" - - infov1 "github.com/google/cadvisor/info/v1" + "context" + v10 "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/info/v2" mock "github.com/stretchr/testify/mock" + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/kubelet/pkg/apis/stats/v1alpha1" + "k8s.io/kubernetes/pkg/kubelet/cm" + "k8s.io/kubernetes/pkg/volume" +) - types "k8s.io/apimachinery/pkg/types" - - v1 "k8s.io/api/core/v1" - - v1alpha1 "k8s.io/kubelet/pkg/apis/stats/v1alpha1" +// NewMockProvider creates a new instance of MockProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockProvider(t interface { + mock.TestingT + Cleanup(func()) +}) *MockProvider { + mock := &MockProvider{} + mock.Mock.Test(t) - v2 "github.com/google/cadvisor/info/v2" + t.Cleanup(func() { mock.AssertExpectations(t) }) - volume "k8s.io/kubernetes/pkg/volume" -) + return mock +} // MockProvider is an autogenerated mock type for the Provider type type MockProvider struct { @@ -51,9 +60,9 @@ func (_m *MockProvider) EXPECT() *MockProvider_Expecter { return &MockProvider_Expecter{mock: &_m.Mock} } -// GetCgroupCPUAndMemoryStats provides a mock function with given fields: cgroupName, updateStats -func (_m *MockProvider) GetCgroupCPUAndMemoryStats(cgroupName string, updateStats bool) (*v1alpha1.ContainerStats, error) { - ret := _m.Called(cgroupName, updateStats) +// GetCgroupCPUAndMemoryStats provides a mock function for the type MockProvider +func (_mock *MockProvider) GetCgroupCPUAndMemoryStats(cgroupName string, updateStats bool) (*v1alpha1.ContainerStats, error) { + ret := _mock.Called(cgroupName, updateStats) if len(ret) == 0 { panic("no return value specified for GetCgroupCPUAndMemoryStats") @@ -61,23 +70,21 @@ func (_m *MockProvider) GetCgroupCPUAndMemoryStats(cgroupName string, updateStat var r0 *v1alpha1.ContainerStats var r1 error - if rf, ok := ret.Get(0).(func(string, bool) (*v1alpha1.ContainerStats, error)); ok { - return rf(cgroupName, updateStats) + if returnFunc, ok := ret.Get(0).(func(string, bool) (*v1alpha1.ContainerStats, error)); ok { + return returnFunc(cgroupName, updateStats) } - if rf, ok := ret.Get(0).(func(string, bool) *v1alpha1.ContainerStats); ok { - r0 = rf(cgroupName, updateStats) + if returnFunc, ok := ret.Get(0).(func(string, bool) *v1alpha1.ContainerStats); ok { + r0 = returnFunc(cgroupName, updateStats) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.ContainerStats) } } - - if rf, ok := ret.Get(1).(func(string, bool) error); ok { - r1 = rf(cgroupName, updateStats) + if returnFunc, ok := ret.Get(1).(func(string, bool) error); ok { + r1 = returnFunc(cgroupName, updateStats) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -95,24 +102,35 @@ func (_e *MockProvider_Expecter) GetCgroupCPUAndMemoryStats(cgroupName interface func (_c *MockProvider_GetCgroupCPUAndMemoryStats_Call) Run(run func(cgroupName string, updateStats bool)) *MockProvider_GetCgroupCPUAndMemoryStats_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(bool)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 bool + if args[1] != nil { + arg1 = args[1].(bool) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockProvider_GetCgroupCPUAndMemoryStats_Call) Return(_a0 *v1alpha1.ContainerStats, _a1 error) *MockProvider_GetCgroupCPUAndMemoryStats_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockProvider_GetCgroupCPUAndMemoryStats_Call) Return(containerStats *v1alpha1.ContainerStats, err error) *MockProvider_GetCgroupCPUAndMemoryStats_Call { + _c.Call.Return(containerStats, err) return _c } -func (_c *MockProvider_GetCgroupCPUAndMemoryStats_Call) RunAndReturn(run func(string, bool) (*v1alpha1.ContainerStats, error)) *MockProvider_GetCgroupCPUAndMemoryStats_Call { +func (_c *MockProvider_GetCgroupCPUAndMemoryStats_Call) RunAndReturn(run func(cgroupName string, updateStats bool) (*v1alpha1.ContainerStats, error)) *MockProvider_GetCgroupCPUAndMemoryStats_Call { _c.Call.Return(run) return _c } -// GetCgroupStats provides a mock function with given fields: cgroupName, updateStats -func (_m *MockProvider) GetCgroupStats(cgroupName string, updateStats bool) (*v1alpha1.ContainerStats, *v1alpha1.NetworkStats, error) { - ret := _m.Called(cgroupName, updateStats) +// GetCgroupStats provides a mock function for the type MockProvider +func (_mock *MockProvider) GetCgroupStats(cgroupName string, updateStats bool) (*v1alpha1.ContainerStats, *v1alpha1.NetworkStats, error) { + ret := _mock.Called(cgroupName, updateStats) if len(ret) == 0 { panic("no return value specified for GetCgroupStats") @@ -121,31 +139,28 @@ func (_m *MockProvider) GetCgroupStats(cgroupName string, updateStats bool) (*v1 var r0 *v1alpha1.ContainerStats var r1 *v1alpha1.NetworkStats var r2 error - if rf, ok := ret.Get(0).(func(string, bool) (*v1alpha1.ContainerStats, *v1alpha1.NetworkStats, error)); ok { - return rf(cgroupName, updateStats) + if returnFunc, ok := ret.Get(0).(func(string, bool) (*v1alpha1.ContainerStats, *v1alpha1.NetworkStats, error)); ok { + return returnFunc(cgroupName, updateStats) } - if rf, ok := ret.Get(0).(func(string, bool) *v1alpha1.ContainerStats); ok { - r0 = rf(cgroupName, updateStats) + if returnFunc, ok := ret.Get(0).(func(string, bool) *v1alpha1.ContainerStats); ok { + r0 = returnFunc(cgroupName, updateStats) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.ContainerStats) } } - - if rf, ok := ret.Get(1).(func(string, bool) *v1alpha1.NetworkStats); ok { - r1 = rf(cgroupName, updateStats) + if returnFunc, ok := ret.Get(1).(func(string, bool) *v1alpha1.NetworkStats); ok { + r1 = returnFunc(cgroupName, updateStats) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*v1alpha1.NetworkStats) } } - - if rf, ok := ret.Get(2).(func(string, bool) error); ok { - r2 = rf(cgroupName, updateStats) + if returnFunc, ok := ret.Get(2).(func(string, bool) error); ok { + r2 = returnFunc(cgroupName, updateStats) } else { r2 = ret.Error(2) } - return r0, r1, r2 } @@ -163,24 +178,35 @@ func (_e *MockProvider_Expecter) GetCgroupStats(cgroupName interface{}, updateSt func (_c *MockProvider_GetCgroupStats_Call) Run(run func(cgroupName string, updateStats bool)) *MockProvider_GetCgroupStats_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(bool)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 bool + if args[1] != nil { + arg1 = args[1].(bool) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockProvider_GetCgroupStats_Call) Return(_a0 *v1alpha1.ContainerStats, _a1 *v1alpha1.NetworkStats, _a2 error) *MockProvider_GetCgroupStats_Call { - _c.Call.Return(_a0, _a1, _a2) +func (_c *MockProvider_GetCgroupStats_Call) Return(containerStats *v1alpha1.ContainerStats, networkStats *v1alpha1.NetworkStats, err error) *MockProvider_GetCgroupStats_Call { + _c.Call.Return(containerStats, networkStats, err) return _c } -func (_c *MockProvider_GetCgroupStats_Call) RunAndReturn(run func(string, bool) (*v1alpha1.ContainerStats, *v1alpha1.NetworkStats, error)) *MockProvider_GetCgroupStats_Call { +func (_c *MockProvider_GetCgroupStats_Call) RunAndReturn(run func(cgroupName string, updateStats bool) (*v1alpha1.ContainerStats, *v1alpha1.NetworkStats, error)) *MockProvider_GetCgroupStats_Call { _c.Call.Return(run) return _c } -// GetNode provides a mock function with no fields -func (_m *MockProvider) GetNode() (*v1.Node, error) { - ret := _m.Called() +// GetNode provides a mock function for the type MockProvider +func (_mock *MockProvider) GetNode() (*v1.Node, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetNode") @@ -188,23 +214,21 @@ func (_m *MockProvider) GetNode() (*v1.Node, error) { var r0 *v1.Node var r1 error - if rf, ok := ret.Get(0).(func() (*v1.Node, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (*v1.Node, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() *v1.Node); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() *v1.Node); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1.Node) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -225,8 +249,8 @@ func (_c *MockProvider_GetNode_Call) Run(run func()) *MockProvider_GetNode_Call return _c } -func (_c *MockProvider_GetNode_Call) Return(_a0 *v1.Node, _a1 error) *MockProvider_GetNode_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockProvider_GetNode_Call) Return(node *v1.Node, err error) *MockProvider_GetNode_Call { + _c.Call.Return(node, err) return _c } @@ -235,21 +259,20 @@ func (_c *MockProvider_GetNode_Call) RunAndReturn(run func() (*v1.Node, error)) return _c } -// GetNodeConfig provides a mock function with no fields -func (_m *MockProvider) GetNodeConfig() cm.NodeConfig { - ret := _m.Called() +// GetNodeConfig provides a mock function for the type MockProvider +func (_mock *MockProvider) GetNodeConfig() cm.NodeConfig { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetNodeConfig") } var r0 cm.NodeConfig - if rf, ok := ret.Get(0).(func() cm.NodeConfig); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() cm.NodeConfig); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(cm.NodeConfig) } - return r0 } @@ -270,8 +293,8 @@ func (_c *MockProvider_GetNodeConfig_Call) Run(run func()) *MockProvider_GetNode return _c } -func (_c *MockProvider_GetNodeConfig_Call) Return(_a0 cm.NodeConfig) *MockProvider_GetNodeConfig_Call { - _c.Call.Return(_a0) +func (_c *MockProvider_GetNodeConfig_Call) Return(nodeConfig cm.NodeConfig) *MockProvider_GetNodeConfig_Call { + _c.Call.Return(nodeConfig) return _c } @@ -280,9 +303,9 @@ func (_c *MockProvider_GetNodeConfig_Call) RunAndReturn(run func() cm.NodeConfig return _c } -// GetPodByCgroupfs provides a mock function with given fields: cgroupfs -func (_m *MockProvider) GetPodByCgroupfs(cgroupfs string) (*v1.Pod, bool) { - ret := _m.Called(cgroupfs) +// GetPodByCgroupfs provides a mock function for the type MockProvider +func (_mock *MockProvider) GetPodByCgroupfs(cgroupfs string) (*v1.Pod, bool) { + ret := _mock.Called(cgroupfs) if len(ret) == 0 { panic("no return value specified for GetPodByCgroupfs") @@ -290,23 +313,21 @@ func (_m *MockProvider) GetPodByCgroupfs(cgroupfs string) (*v1.Pod, bool) { var r0 *v1.Pod var r1 bool - if rf, ok := ret.Get(0).(func(string) (*v1.Pod, bool)); ok { - return rf(cgroupfs) + if returnFunc, ok := ret.Get(0).(func(string) (*v1.Pod, bool)); ok { + return returnFunc(cgroupfs) } - if rf, ok := ret.Get(0).(func(string) *v1.Pod); ok { - r0 = rf(cgroupfs) + if returnFunc, ok := ret.Get(0).(func(string) *v1.Pod); ok { + r0 = returnFunc(cgroupfs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1.Pod) } } - - if rf, ok := ret.Get(1).(func(string) bool); ok { - r1 = rf(cgroupfs) + if returnFunc, ok := ret.Get(1).(func(string) bool); ok { + r1 = returnFunc(cgroupfs) } else { r1 = ret.Get(1).(bool) } - return r0, r1 } @@ -323,24 +344,30 @@ func (_e *MockProvider_Expecter) GetPodByCgroupfs(cgroupfs interface{}) *MockPro func (_c *MockProvider_GetPodByCgroupfs_Call) Run(run func(cgroupfs string)) *MockProvider_GetPodByCgroupfs_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockProvider_GetPodByCgroupfs_Call) Return(_a0 *v1.Pod, _a1 bool) *MockProvider_GetPodByCgroupfs_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockProvider_GetPodByCgroupfs_Call) Return(pod *v1.Pod, b bool) *MockProvider_GetPodByCgroupfs_Call { + _c.Call.Return(pod, b) return _c } -func (_c *MockProvider_GetPodByCgroupfs_Call) RunAndReturn(run func(string) (*v1.Pod, bool)) *MockProvider_GetPodByCgroupfs_Call { +func (_c *MockProvider_GetPodByCgroupfs_Call) RunAndReturn(run func(cgroupfs string) (*v1.Pod, bool)) *MockProvider_GetPodByCgroupfs_Call { _c.Call.Return(run) return _c } -// GetPodByName provides a mock function with given fields: namespace, name -func (_m *MockProvider) GetPodByName(namespace string, name string) (*v1.Pod, bool) { - ret := _m.Called(namespace, name) +// GetPodByName provides a mock function for the type MockProvider +func (_mock *MockProvider) GetPodByName(namespace string, name string) (*v1.Pod, bool) { + ret := _mock.Called(namespace, name) if len(ret) == 0 { panic("no return value specified for GetPodByName") @@ -348,23 +375,21 @@ func (_m *MockProvider) GetPodByName(namespace string, name string) (*v1.Pod, bo var r0 *v1.Pod var r1 bool - if rf, ok := ret.Get(0).(func(string, string) (*v1.Pod, bool)); ok { - return rf(namespace, name) + if returnFunc, ok := ret.Get(0).(func(string, string) (*v1.Pod, bool)); ok { + return returnFunc(namespace, name) } - if rf, ok := ret.Get(0).(func(string, string) *v1.Pod); ok { - r0 = rf(namespace, name) + if returnFunc, ok := ret.Get(0).(func(string, string) *v1.Pod); ok { + r0 = returnFunc(namespace, name) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1.Pod) } } - - if rf, ok := ret.Get(1).(func(string, string) bool); ok { - r1 = rf(namespace, name) + if returnFunc, ok := ret.Get(1).(func(string, string) bool); ok { + r1 = returnFunc(namespace, name) } else { r1 = ret.Get(1).(bool) } - return r0, r1 } @@ -382,36 +407,46 @@ func (_e *MockProvider_Expecter) GetPodByName(namespace interface{}, name interf func (_c *MockProvider_GetPodByName_Call) Run(run func(namespace string, name string)) *MockProvider_GetPodByName_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockProvider_GetPodByName_Call) Return(_a0 *v1.Pod, _a1 bool) *MockProvider_GetPodByName_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockProvider_GetPodByName_Call) Return(pod *v1.Pod, b bool) *MockProvider_GetPodByName_Call { + _c.Call.Return(pod, b) return _c } -func (_c *MockProvider_GetPodByName_Call) RunAndReturn(run func(string, string) (*v1.Pod, bool)) *MockProvider_GetPodByName_Call { +func (_c *MockProvider_GetPodByName_Call) RunAndReturn(run func(namespace string, name string) (*v1.Pod, bool)) *MockProvider_GetPodByName_Call { _c.Call.Return(run) return _c } -// GetPodCgroupRoot provides a mock function with no fields -func (_m *MockProvider) GetPodCgroupRoot() string { - ret := _m.Called() +// GetPodCgroupRoot provides a mock function for the type MockProvider +func (_mock *MockProvider) GetPodCgroupRoot() string { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPodCgroupRoot") } var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - return r0 } @@ -432,8 +467,8 @@ func (_c *MockProvider_GetPodCgroupRoot_Call) Run(run func()) *MockProvider_GetP return _c } -func (_c *MockProvider_GetPodCgroupRoot_Call) Return(_a0 string) *MockProvider_GetPodCgroupRoot_Call { - _c.Call.Return(_a0) +func (_c *MockProvider_GetPodCgroupRoot_Call) Return(s string) *MockProvider_GetPodCgroupRoot_Call { + _c.Call.Return(s) return _c } @@ -442,23 +477,22 @@ func (_c *MockProvider_GetPodCgroupRoot_Call) RunAndReturn(run func() string) *M return _c } -// GetPods provides a mock function with no fields -func (_m *MockProvider) GetPods() []*v1.Pod { - ret := _m.Called() +// GetPods provides a mock function for the type MockProvider +func (_mock *MockProvider) GetPods() []*v1.Pod { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPods") } var r0 []*v1.Pod - if rf, ok := ret.Get(0).(func() []*v1.Pod); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []*v1.Pod); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*v1.Pod) } } - return r0 } @@ -479,8 +513,8 @@ func (_c *MockProvider_GetPods_Call) Run(run func()) *MockProvider_GetPods_Call return _c } -func (_c *MockProvider_GetPods_Call) Return(_a0 []*v1.Pod) *MockProvider_GetPods_Call { - _c.Call.Return(_a0) +func (_c *MockProvider_GetPods_Call) Return(pods []*v1.Pod) *MockProvider_GetPods_Call { + _c.Call.Return(pods) return _c } @@ -489,33 +523,31 @@ func (_c *MockProvider_GetPods_Call) RunAndReturn(run func() []*v1.Pod) *MockPro return _c } -// GetRequestedContainersInfo provides a mock function with given fields: containerName, options -func (_m *MockProvider) GetRequestedContainersInfo(containerName string, options v2.RequestOptions) (map[string]*infov1.ContainerInfo, error) { - ret := _m.Called(containerName, options) +// GetRequestedContainersInfo provides a mock function for the type MockProvider +func (_mock *MockProvider) GetRequestedContainersInfo(containerName string, options v2.RequestOptions) (map[string]*v10.ContainerInfo, error) { + ret := _mock.Called(containerName, options) if len(ret) == 0 { panic("no return value specified for GetRequestedContainersInfo") } - var r0 map[string]*infov1.ContainerInfo + var r0 map[string]*v10.ContainerInfo var r1 error - if rf, ok := ret.Get(0).(func(string, v2.RequestOptions) (map[string]*infov1.ContainerInfo, error)); ok { - return rf(containerName, options) + if returnFunc, ok := ret.Get(0).(func(string, v2.RequestOptions) (map[string]*v10.ContainerInfo, error)); ok { + return returnFunc(containerName, options) } - if rf, ok := ret.Get(0).(func(string, v2.RequestOptions) map[string]*infov1.ContainerInfo); ok { - r0 = rf(containerName, options) + if returnFunc, ok := ret.Get(0).(func(string, v2.RequestOptions) map[string]*v10.ContainerInfo); ok { + r0 = returnFunc(containerName, options) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]*infov1.ContainerInfo) + r0 = ret.Get(0).(map[string]*v10.ContainerInfo) } } - - if rf, ok := ret.Get(1).(func(string, v2.RequestOptions) error); ok { - r1 = rf(containerName, options) + if returnFunc, ok := ret.Get(1).(func(string, v2.RequestOptions) error); ok { + r1 = returnFunc(containerName, options) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -533,24 +565,35 @@ func (_e *MockProvider_Expecter) GetRequestedContainersInfo(containerName interf func (_c *MockProvider_GetRequestedContainersInfo_Call) Run(run func(containerName string, options v2.RequestOptions)) *MockProvider_GetRequestedContainersInfo_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(v2.RequestOptions)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 v2.RequestOptions + if args[1] != nil { + arg1 = args[1].(v2.RequestOptions) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockProvider_GetRequestedContainersInfo_Call) Return(_a0 map[string]*infov1.ContainerInfo, _a1 error) *MockProvider_GetRequestedContainersInfo_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockProvider_GetRequestedContainersInfo_Call) Return(stringToContainerInfo map[string]*v10.ContainerInfo, err error) *MockProvider_GetRequestedContainersInfo_Call { + _c.Call.Return(stringToContainerInfo, err) return _c } -func (_c *MockProvider_GetRequestedContainersInfo_Call) RunAndReturn(run func(string, v2.RequestOptions) (map[string]*infov1.ContainerInfo, error)) *MockProvider_GetRequestedContainersInfo_Call { +func (_c *MockProvider_GetRequestedContainersInfo_Call) RunAndReturn(run func(containerName string, options v2.RequestOptions) (map[string]*v10.ContainerInfo, error)) *MockProvider_GetRequestedContainersInfo_Call { _c.Call.Return(run) return _c } -// ImageFsStats provides a mock function with given fields: ctx -func (_m *MockProvider) ImageFsStats(ctx context.Context) (*v1alpha1.FsStats, *v1alpha1.FsStats, error) { - ret := _m.Called(ctx) +// ImageFsStats provides a mock function for the type MockProvider +func (_mock *MockProvider) ImageFsStats(ctx context.Context) (*v1alpha1.FsStats, *v1alpha1.FsStats, error) { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ImageFsStats") @@ -559,31 +602,28 @@ func (_m *MockProvider) ImageFsStats(ctx context.Context) (*v1alpha1.FsStats, *v var r0 *v1alpha1.FsStats var r1 *v1alpha1.FsStats var r2 error - if rf, ok := ret.Get(0).(func(context.Context) (*v1alpha1.FsStats, *v1alpha1.FsStats, error)); ok { - return rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) (*v1alpha1.FsStats, *v1alpha1.FsStats, error)); ok { + return returnFunc(ctx) } - if rf, ok := ret.Get(0).(func(context.Context) *v1alpha1.FsStats); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) *v1alpha1.FsStats); ok { + r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.FsStats) } } - - if rf, ok := ret.Get(1).(func(context.Context) *v1alpha1.FsStats); ok { - r1 = rf(ctx) + if returnFunc, ok := ret.Get(1).(func(context.Context) *v1alpha1.FsStats); ok { + r1 = returnFunc(ctx) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*v1alpha1.FsStats) } } - - if rf, ok := ret.Get(2).(func(context.Context) error); ok { - r2 = rf(ctx) + if returnFunc, ok := ret.Get(2).(func(context.Context) error); ok { + r2 = returnFunc(ctx) } else { r2 = ret.Error(2) } - return r0, r1, r2 } @@ -600,7 +640,13 @@ func (_e *MockProvider_Expecter) ImageFsStats(ctx interface{}) *MockProvider_Ima func (_c *MockProvider_ImageFsStats_Call) Run(run func(ctx context.Context)) *MockProvider_ImageFsStats_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) }) return _c } @@ -610,14 +656,14 @@ func (_c *MockProvider_ImageFsStats_Call) Return(imageFs *v1alpha1.FsStats, cont return _c } -func (_c *MockProvider_ImageFsStats_Call) RunAndReturn(run func(context.Context) (*v1alpha1.FsStats, *v1alpha1.FsStats, error)) *MockProvider_ImageFsStats_Call { +func (_c *MockProvider_ImageFsStats_Call) RunAndReturn(run func(ctx context.Context) (*v1alpha1.FsStats, *v1alpha1.FsStats, error)) *MockProvider_ImageFsStats_Call { _c.Call.Return(run) return _c } -// ListBlockVolumesForPod provides a mock function with given fields: podUID -func (_m *MockProvider) ListBlockVolumesForPod(podUID types.UID) (map[string]volume.BlockVolume, bool) { - ret := _m.Called(podUID) +// ListBlockVolumesForPod provides a mock function for the type MockProvider +func (_mock *MockProvider) ListBlockVolumesForPod(podUID types.UID) (map[string]volume.BlockVolume, bool) { + ret := _mock.Called(podUID) if len(ret) == 0 { panic("no return value specified for ListBlockVolumesForPod") @@ -625,23 +671,21 @@ func (_m *MockProvider) ListBlockVolumesForPod(podUID types.UID) (map[string]vol var r0 map[string]volume.BlockVolume var r1 bool - if rf, ok := ret.Get(0).(func(types.UID) (map[string]volume.BlockVolume, bool)); ok { - return rf(podUID) + if returnFunc, ok := ret.Get(0).(func(types.UID) (map[string]volume.BlockVolume, bool)); ok { + return returnFunc(podUID) } - if rf, ok := ret.Get(0).(func(types.UID) map[string]volume.BlockVolume); ok { - r0 = rf(podUID) + if returnFunc, ok := ret.Get(0).(func(types.UID) map[string]volume.BlockVolume); ok { + r0 = returnFunc(podUID) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[string]volume.BlockVolume) } } - - if rf, ok := ret.Get(1).(func(types.UID) bool); ok { - r1 = rf(podUID) + if returnFunc, ok := ret.Get(1).(func(types.UID) bool); ok { + r1 = returnFunc(podUID) } else { r1 = ret.Get(1).(bool) } - return r0, r1 } @@ -658,24 +702,30 @@ func (_e *MockProvider_Expecter) ListBlockVolumesForPod(podUID interface{}) *Moc func (_c *MockProvider_ListBlockVolumesForPod_Call) Run(run func(podUID types.UID)) *MockProvider_ListBlockVolumesForPod_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.UID)) + var arg0 types.UID + if args[0] != nil { + arg0 = args[0].(types.UID) + } + run( + arg0, + ) }) return _c } -func (_c *MockProvider_ListBlockVolumesForPod_Call) Return(_a0 map[string]volume.BlockVolume, _a1 bool) *MockProvider_ListBlockVolumesForPod_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockProvider_ListBlockVolumesForPod_Call) Return(stringToBlockVolume map[string]volume.BlockVolume, b bool) *MockProvider_ListBlockVolumesForPod_Call { + _c.Call.Return(stringToBlockVolume, b) return _c } -func (_c *MockProvider_ListBlockVolumesForPod_Call) RunAndReturn(run func(types.UID) (map[string]volume.BlockVolume, bool)) *MockProvider_ListBlockVolumesForPod_Call { +func (_c *MockProvider_ListBlockVolumesForPod_Call) RunAndReturn(run func(podUID types.UID) (map[string]volume.BlockVolume, bool)) *MockProvider_ListBlockVolumesForPod_Call { _c.Call.Return(run) return _c } -// ListPodCPUAndMemoryStats provides a mock function with given fields: ctx -func (_m *MockProvider) ListPodCPUAndMemoryStats(ctx context.Context) ([]v1alpha1.PodStats, error) { - ret := _m.Called(ctx) +// ListPodCPUAndMemoryStats provides a mock function for the type MockProvider +func (_mock *MockProvider) ListPodCPUAndMemoryStats(ctx context.Context) ([]v1alpha1.PodStats, error) { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListPodCPUAndMemoryStats") @@ -683,23 +733,21 @@ func (_m *MockProvider) ListPodCPUAndMemoryStats(ctx context.Context) ([]v1alpha var r0 []v1alpha1.PodStats var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]v1alpha1.PodStats, error)); ok { - return rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) ([]v1alpha1.PodStats, error)); ok { + return returnFunc(ctx) } - if rf, ok := ret.Get(0).(func(context.Context) []v1alpha1.PodStats); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) []v1alpha1.PodStats); ok { + r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]v1alpha1.PodStats) } } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -716,24 +764,30 @@ func (_e *MockProvider_Expecter) ListPodCPUAndMemoryStats(ctx interface{}) *Mock func (_c *MockProvider_ListPodCPUAndMemoryStats_Call) Run(run func(ctx context.Context)) *MockProvider_ListPodCPUAndMemoryStats_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) }) return _c } -func (_c *MockProvider_ListPodCPUAndMemoryStats_Call) Return(_a0 []v1alpha1.PodStats, _a1 error) *MockProvider_ListPodCPUAndMemoryStats_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockProvider_ListPodCPUAndMemoryStats_Call) Return(podStatss []v1alpha1.PodStats, err error) *MockProvider_ListPodCPUAndMemoryStats_Call { + _c.Call.Return(podStatss, err) return _c } -func (_c *MockProvider_ListPodCPUAndMemoryStats_Call) RunAndReturn(run func(context.Context) ([]v1alpha1.PodStats, error)) *MockProvider_ListPodCPUAndMemoryStats_Call { +func (_c *MockProvider_ListPodCPUAndMemoryStats_Call) RunAndReturn(run func(ctx context.Context) ([]v1alpha1.PodStats, error)) *MockProvider_ListPodCPUAndMemoryStats_Call { _c.Call.Return(run) return _c } -// ListPodStats provides a mock function with given fields: ctx -func (_m *MockProvider) ListPodStats(ctx context.Context) ([]v1alpha1.PodStats, error) { - ret := _m.Called(ctx) +// ListPodStats provides a mock function for the type MockProvider +func (_mock *MockProvider) ListPodStats(ctx context.Context) ([]v1alpha1.PodStats, error) { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListPodStats") @@ -741,23 +795,21 @@ func (_m *MockProvider) ListPodStats(ctx context.Context) ([]v1alpha1.PodStats, var r0 []v1alpha1.PodStats var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]v1alpha1.PodStats, error)); ok { - return rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) ([]v1alpha1.PodStats, error)); ok { + return returnFunc(ctx) } - if rf, ok := ret.Get(0).(func(context.Context) []v1alpha1.PodStats); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) []v1alpha1.PodStats); ok { + r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]v1alpha1.PodStats) } } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -774,24 +826,30 @@ func (_e *MockProvider_Expecter) ListPodStats(ctx interface{}) *MockProvider_Lis func (_c *MockProvider_ListPodStats_Call) Run(run func(ctx context.Context)) *MockProvider_ListPodStats_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) }) return _c } -func (_c *MockProvider_ListPodStats_Call) Return(_a0 []v1alpha1.PodStats, _a1 error) *MockProvider_ListPodStats_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockProvider_ListPodStats_Call) Return(podStatss []v1alpha1.PodStats, err error) *MockProvider_ListPodStats_Call { + _c.Call.Return(podStatss, err) return _c } -func (_c *MockProvider_ListPodStats_Call) RunAndReturn(run func(context.Context) ([]v1alpha1.PodStats, error)) *MockProvider_ListPodStats_Call { +func (_c *MockProvider_ListPodStats_Call) RunAndReturn(run func(ctx context.Context) ([]v1alpha1.PodStats, error)) *MockProvider_ListPodStats_Call { _c.Call.Return(run) return _c } -// ListPodStatsAndUpdateCPUNanoCoreUsage provides a mock function with given fields: ctx -func (_m *MockProvider) ListPodStatsAndUpdateCPUNanoCoreUsage(ctx context.Context) ([]v1alpha1.PodStats, error) { - ret := _m.Called(ctx) +// ListPodStatsAndUpdateCPUNanoCoreUsage provides a mock function for the type MockProvider +func (_mock *MockProvider) ListPodStatsAndUpdateCPUNanoCoreUsage(ctx context.Context) ([]v1alpha1.PodStats, error) { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListPodStatsAndUpdateCPUNanoCoreUsage") @@ -799,23 +857,21 @@ func (_m *MockProvider) ListPodStatsAndUpdateCPUNanoCoreUsage(ctx context.Contex var r0 []v1alpha1.PodStats var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]v1alpha1.PodStats, error)); ok { - return rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) ([]v1alpha1.PodStats, error)); ok { + return returnFunc(ctx) } - if rf, ok := ret.Get(0).(func(context.Context) []v1alpha1.PodStats); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) []v1alpha1.PodStats); ok { + r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]v1alpha1.PodStats) } } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -832,24 +888,30 @@ func (_e *MockProvider_Expecter) ListPodStatsAndUpdateCPUNanoCoreUsage(ctx inter func (_c *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call) Run(run func(ctx context.Context)) *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) }) return _c } -func (_c *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call) Return(_a0 []v1alpha1.PodStats, _a1 error) *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call) Return(podStatss []v1alpha1.PodStats, err error) *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call { + _c.Call.Return(podStatss, err) return _c } -func (_c *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call) RunAndReturn(run func(context.Context) ([]v1alpha1.PodStats, error)) *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call { +func (_c *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call) RunAndReturn(run func(ctx context.Context) ([]v1alpha1.PodStats, error)) *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call { _c.Call.Return(run) return _c } -// ListVolumesForPod provides a mock function with given fields: podUID -func (_m *MockProvider) ListVolumesForPod(podUID types.UID) (map[string]volume.Volume, bool) { - ret := _m.Called(podUID) +// ListVolumesForPod provides a mock function for the type MockProvider +func (_mock *MockProvider) ListVolumesForPod(podUID types.UID) (map[string]volume.Volume, bool) { + ret := _mock.Called(podUID) if len(ret) == 0 { panic("no return value specified for ListVolumesForPod") @@ -857,23 +919,21 @@ func (_m *MockProvider) ListVolumesForPod(podUID types.UID) (map[string]volume.V var r0 map[string]volume.Volume var r1 bool - if rf, ok := ret.Get(0).(func(types.UID) (map[string]volume.Volume, bool)); ok { - return rf(podUID) + if returnFunc, ok := ret.Get(0).(func(types.UID) (map[string]volume.Volume, bool)); ok { + return returnFunc(podUID) } - if rf, ok := ret.Get(0).(func(types.UID) map[string]volume.Volume); ok { - r0 = rf(podUID) + if returnFunc, ok := ret.Get(0).(func(types.UID) map[string]volume.Volume); ok { + r0 = returnFunc(podUID) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[string]volume.Volume) } } - - if rf, ok := ret.Get(1).(func(types.UID) bool); ok { - r1 = rf(podUID) + if returnFunc, ok := ret.Get(1).(func(types.UID) bool); ok { + r1 = returnFunc(podUID) } else { r1 = ret.Get(1).(bool) } - return r0, r1 } @@ -890,24 +950,30 @@ func (_e *MockProvider_Expecter) ListVolumesForPod(podUID interface{}) *MockProv func (_c *MockProvider_ListVolumesForPod_Call) Run(run func(podUID types.UID)) *MockProvider_ListVolumesForPod_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.UID)) + var arg0 types.UID + if args[0] != nil { + arg0 = args[0].(types.UID) + } + run( + arg0, + ) }) return _c } -func (_c *MockProvider_ListVolumesForPod_Call) Return(_a0 map[string]volume.Volume, _a1 bool) *MockProvider_ListVolumesForPod_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockProvider_ListVolumesForPod_Call) Return(stringToVolume map[string]volume.Volume, b bool) *MockProvider_ListVolumesForPod_Call { + _c.Call.Return(stringToVolume, b) return _c } -func (_c *MockProvider_ListVolumesForPod_Call) RunAndReturn(run func(types.UID) (map[string]volume.Volume, bool)) *MockProvider_ListVolumesForPod_Call { +func (_c *MockProvider_ListVolumesForPod_Call) RunAndReturn(run func(podUID types.UID) (map[string]volume.Volume, bool)) *MockProvider_ListVolumesForPod_Call { _c.Call.Return(run) return _c } -// RlimitStats provides a mock function with no fields -func (_m *MockProvider) RlimitStats() (*v1alpha1.RlimitStats, error) { - ret := _m.Called() +// RlimitStats provides a mock function for the type MockProvider +func (_mock *MockProvider) RlimitStats() (*v1alpha1.RlimitStats, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for RlimitStats") @@ -915,23 +981,21 @@ func (_m *MockProvider) RlimitStats() (*v1alpha1.RlimitStats, error) { var r0 *v1alpha1.RlimitStats var r1 error - if rf, ok := ret.Get(0).(func() (*v1alpha1.RlimitStats, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (*v1alpha1.RlimitStats, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() *v1alpha1.RlimitStats); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() *v1alpha1.RlimitStats); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.RlimitStats) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -952,8 +1016,8 @@ func (_c *MockProvider_RlimitStats_Call) Run(run func()) *MockProvider_RlimitSta return _c } -func (_c *MockProvider_RlimitStats_Call) Return(_a0 *v1alpha1.RlimitStats, _a1 error) *MockProvider_RlimitStats_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockProvider_RlimitStats_Call) Return(rlimitStats *v1alpha1.RlimitStats, err error) *MockProvider_RlimitStats_Call { + _c.Call.Return(rlimitStats, err) return _c } @@ -962,9 +1026,9 @@ func (_c *MockProvider_RlimitStats_Call) RunAndReturn(run func() (*v1alpha1.Rlim return _c } -// RootFsStats provides a mock function with no fields -func (_m *MockProvider) RootFsStats() (*v1alpha1.FsStats, error) { - ret := _m.Called() +// RootFsStats provides a mock function for the type MockProvider +func (_mock *MockProvider) RootFsStats() (*v1alpha1.FsStats, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for RootFsStats") @@ -972,23 +1036,21 @@ func (_m *MockProvider) RootFsStats() (*v1alpha1.FsStats, error) { var r0 *v1alpha1.FsStats var r1 error - if rf, ok := ret.Get(0).(func() (*v1alpha1.FsStats, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (*v1alpha1.FsStats, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() *v1alpha1.FsStats); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() *v1alpha1.FsStats); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.FsStats) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1009,8 +1071,8 @@ func (_c *MockProvider_RootFsStats_Call) Run(run func()) *MockProvider_RootFsSta return _c } -func (_c *MockProvider_RootFsStats_Call) Return(_a0 *v1alpha1.FsStats, _a1 error) *MockProvider_RootFsStats_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockProvider_RootFsStats_Call) Return(fsStats *v1alpha1.FsStats, err error) *MockProvider_RootFsStats_Call { + _c.Call.Return(fsStats, err) return _c } @@ -1019,16 +1081,159 @@ func (_c *MockProvider_RootFsStats_Call) RunAndReturn(run func() (*v1alpha1.FsSt return _c } -// NewMockProvider creates a new instance of MockProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// NewMockSummaryProvider creates a new instance of MockSummaryProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. -func NewMockProvider(t interface { +func NewMockSummaryProvider(t interface { mock.TestingT Cleanup(func()) -}) *MockProvider { - mock := &MockProvider{} +}) *MockSummaryProvider { + mock := &MockSummaryProvider{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } + +// MockSummaryProvider is an autogenerated mock type for the SummaryProvider type +type MockSummaryProvider struct { + mock.Mock +} + +type MockSummaryProvider_Expecter struct { + mock *mock.Mock +} + +func (_m *MockSummaryProvider) EXPECT() *MockSummaryProvider_Expecter { + return &MockSummaryProvider_Expecter{mock: &_m.Mock} +} + +// Get provides a mock function for the type MockSummaryProvider +func (_mock *MockSummaryProvider) Get(ctx context.Context, updateStats bool) (*v1alpha1.Summary, error) { + ret := _mock.Called(ctx, updateStats) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 *v1alpha1.Summary + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, bool) (*v1alpha1.Summary, error)); ok { + return returnFunc(ctx, updateStats) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, bool) *v1alpha1.Summary); ok { + r0 = returnFunc(ctx, updateStats) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v1alpha1.Summary) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, bool) error); ok { + r1 = returnFunc(ctx, updateStats) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSummaryProvider_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type MockSummaryProvider_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - updateStats bool +func (_e *MockSummaryProvider_Expecter) Get(ctx interface{}, updateStats interface{}) *MockSummaryProvider_Get_Call { + return &MockSummaryProvider_Get_Call{Call: _e.mock.On("Get", ctx, updateStats)} +} + +func (_c *MockSummaryProvider_Get_Call) Run(run func(ctx context.Context, updateStats bool)) *MockSummaryProvider_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 bool + if args[1] != nil { + arg1 = args[1].(bool) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSummaryProvider_Get_Call) Return(summary *v1alpha1.Summary, err error) *MockSummaryProvider_Get_Call { + _c.Call.Return(summary, err) + return _c +} + +func (_c *MockSummaryProvider_Get_Call) RunAndReturn(run func(ctx context.Context, updateStats bool) (*v1alpha1.Summary, error)) *MockSummaryProvider_Get_Call { + _c.Call.Return(run) + return _c +} + +// GetCPUAndMemoryStats provides a mock function for the type MockSummaryProvider +func (_mock *MockSummaryProvider) GetCPUAndMemoryStats(ctx context.Context) (*v1alpha1.Summary, error) { + ret := _mock.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for GetCPUAndMemoryStats") + } + + var r0 *v1alpha1.Summary + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context) (*v1alpha1.Summary, error)); ok { + return returnFunc(ctx) + } + if returnFunc, ok := ret.Get(0).(func(context.Context) *v1alpha1.Summary); ok { + r0 = returnFunc(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v1alpha1.Summary) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSummaryProvider_GetCPUAndMemoryStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCPUAndMemoryStats' +type MockSummaryProvider_GetCPUAndMemoryStats_Call struct { + *mock.Call +} + +// GetCPUAndMemoryStats is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockSummaryProvider_Expecter) GetCPUAndMemoryStats(ctx interface{}) *MockSummaryProvider_GetCPUAndMemoryStats_Call { + return &MockSummaryProvider_GetCPUAndMemoryStats_Call{Call: _e.mock.On("GetCPUAndMemoryStats", ctx)} +} + +func (_c *MockSummaryProvider_GetCPUAndMemoryStats_Call) Run(run func(ctx context.Context)) *MockSummaryProvider_GetCPUAndMemoryStats_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockSummaryProvider_GetCPUAndMemoryStats_Call) Return(summary *v1alpha1.Summary, err error) *MockSummaryProvider_GetCPUAndMemoryStats_Call { + _c.Call.Return(summary, err) + return _c +} + +func (_c *MockSummaryProvider_GetCPUAndMemoryStats_Call) RunAndReturn(run func(ctx context.Context) (*v1alpha1.Summary, error)) *MockSummaryProvider_GetCPUAndMemoryStats_Call { + _c.Call.Return(run) + return _c +} diff --git a/pkg/kubelet/server/stats/volume_stat_calculator.go b/pkg/kubelet/server/stats/volume_stat_calculator.go index 671c72ca4b51d..5d7f15ccfadcf 100644 --- a/pkg/kubelet/server/stats/volume_stat_calculator.go +++ b/pkg/kubelet/server/stats/volume_stat_calculator.go @@ -66,10 +66,10 @@ func newVolumeStatCalculator(statsProvider Provider, jitterPeriod time.Duration, } // StartOnce starts pod volume calc that will occur periodically in the background until s.StopOnce is called -func (s *volumeStatCalculator) StartOnce() *volumeStatCalculator { +func (s *volumeStatCalculator) StartOnce(logger klog.Logger) *volumeStatCalculator { s.startO.Do(func() { go wait.JitterUntil(func() { - s.calcAndStoreStats() + s.calcAndStoreStats(logger) }, s.jitterPeriod, 1.0, true, s.stopChannel) }) return s @@ -95,7 +95,7 @@ func (s *volumeStatCalculator) GetLatest() (PodVolumeStats, bool) { // calcAndStoreStats calculates PodVolumeStats for a given pod and writes the result to the s.latest cache. // If the pod references PVCs, the prometheus metrics for those are updated with the result. -func (s *volumeStatCalculator) calcAndStoreStats() { +func (s *volumeStatCalculator) calcAndStoreStats(logger klog.Logger) { // Find all Volumes for the Pod volumes, found := s.statsProvider.ListVolumesForPod(s.pod.UID) blockVolumes, bvFound := s.statsProvider.ListBlockVolumesForPod(s.pod.UID) @@ -125,7 +125,7 @@ func (s *volumeStatCalculator) calcAndStoreStats() { } // Get volume specs for the pod - key'd by volume name - volumesSpec := make(map[string]v1.Volume) + volumesSpec := make(map[string]v1.Volume, len(s.pod.Spec.Volumes)) for _, v := range s.pod.Spec.Volumes { volumesSpec[v.Name] = v } @@ -142,7 +142,7 @@ func (s *volumeStatCalculator) calcAndStoreStats() { if err != nil { // Expected for Volumes that don't support Metrics if !volume.IsNotSupported(err) { - klog.V(4).InfoS("Failed to calculate volume metrics", "pod", klog.KObj(s.pod), "podUID", s.pod.UID, "volumeName", name, "err", err) + logger.V(4).Info("Failed to calculate volume metrics", "pod", klog.KObj(s.pod), "podUID", s.pod.UID, "volumeName", name, "err", err) } continue } diff --git a/pkg/kubelet/server/stats/volume_stat_calculator_test.go b/pkg/kubelet/server/stats/volume_stat_calculator_test.go index fe8cc68331f01..2c35bfdf5d152 100644 --- a/pkg/kubelet/server/stats/volume_stat_calculator_test.go +++ b/pkg/kubelet/server/stats/volume_stat_calculator_test.go @@ -35,6 +35,7 @@ import ( "k8s.io/kubernetes/pkg/features" statstest "k8s.io/kubernetes/pkg/kubelet/server/stats/testing" "k8s.io/kubernetes/pkg/volume" + "k8s.io/kubernetes/test/utils/ktesting" ) const ( @@ -104,6 +105,7 @@ var ( ) func TestPVCRef(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) // Setup mock stats provider mockStats := statstest.NewMockProvider(t) volumes := map[string]volume.Volume{vol0: &fakeVolume{}, vol1: &fakeVolume{}, vol3: &fakeVolume{}} @@ -118,7 +120,7 @@ func TestPVCRef(t *testing.T) { // Calculate stats for pod statsCalculator := newVolumeStatCalculator(mockStats, time.Minute, fakePod, &fakeEventRecorder) - statsCalculator.calcAndStoreStats() + statsCalculator.calcAndStoreStats(logger) vs, _ := statsCalculator.GetLatest() assert.Len(t, append(vs.EphemeralVolumes, vs.PersistentVolumes...), 4) @@ -161,6 +163,7 @@ func TestPVCRef(t *testing.T) { } func TestNormalVolumeEvent(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) mockStats := statstest.NewMockProvider(t) volumes := map[string]volume.Volume{vol0: &fakeVolume{}, vol1: &fakeVolume{}} @@ -175,7 +178,7 @@ func TestNormalVolumeEvent(t *testing.T) { // Calculate stats for pod statsCalculator := newVolumeStatCalculator(mockStats, time.Minute, fakePod, &fakeEventRecorder) - statsCalculator.calcAndStoreStats() + statsCalculator.calcAndStoreStats(logger) event, err := WatchEvent(eventStore) assert.Error(t, err) @@ -183,6 +186,7 @@ func TestNormalVolumeEvent(t *testing.T) { } func TestAbnormalVolumeEvent(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.CSIVolumeHealth, true) // Setup mock stats provider @@ -203,7 +207,7 @@ func TestAbnormalVolumeEvent(t *testing.T) { volumeCondition.Abnormal = true } statsCalculator := newVolumeStatCalculator(mockStats, time.Minute, fakePod, &fakeEventRecorder) - statsCalculator.calcAndStoreStats() + statsCalculator.calcAndStoreStats(logger) event, err := WatchEvent(eventStore) assert.NoError(t, err) diff --git a/pkg/kubelet/stats/cadvisor_stats_provider.go b/pkg/kubelet/stats/cadvisor_stats_provider.go index d0a2a3228abb4..028230f4b388c 100644 --- a/pkg/kubelet/stats/cadvisor_stats_provider.go +++ b/pkg/kubelet/stats/cadvisor_stats_provider.go @@ -94,12 +94,12 @@ func (p *cadvisorStatsProvider) ListPodStats(ctx context.Context) ([]statsapi.Po if err != nil { return nil, fmt.Errorf("failed to get imageFs info: %v", err) } - infos, err := getCadvisorContainerInfo(p.cadvisor) + logger := klog.FromContext(ctx) + infos, err := getCadvisorContainerInfo(logger, p.cadvisor) if err != nil { return nil, fmt.Errorf("failed to get container info from cadvisor: %v", err) } - - filteredInfos, allInfos := filterTerminatedContainerInfoAndAssembleByPodCgroupKey(infos) + filteredInfos, allInfos := filterTerminatedContainerInfoAndAssembleByPodCgroupKey(logger, infos) // Map each container to a pod and update the PodStats with container data. podToStats := map[statsapi.PodReference]*statsapi.PodStats{} for key, cinfo := range filteredInfos { @@ -111,7 +111,7 @@ func (p *cadvisorStatsProvider) ListPodStats(ctx context.Context) ([]statsapi.Po continue } // Build the Pod key if this container is managed by a Pod - if !isPodManagedContainer(&cinfo) { + if !isPodManagedContainer(logger, &cinfo) { continue } ref := buildPodRef(cinfo.Spec.Labels) @@ -132,13 +132,13 @@ func (p *cadvisorStatsProvider) ListPodStats(ctx context.Context) ([]statsapi.Po // the user and has network stats. podStats.Network = cadvisorInfoToNetworkStats(&cinfo) } else { - containerStat := cadvisorInfoToContainerStats(containerName, &cinfo, &rootFsInfo, &imageFsInfo) + containerStat := cadvisorInfoToContainerStats(logger, containerName, &cinfo, &rootFsInfo, &imageFsInfo) // NOTE: This doesn't support the old pod log path, `/var/log/pods/UID`. For containers // using old log path, they will be populated by cadvisorInfoToContainerStats. podUID := types.UID(podStats.PodRef.UID) logs, err := p.hostStatsProvider.getPodContainerLogStats(podStats.PodRef.Namespace, podStats.PodRef.Name, podUID, containerName, &rootFsInfo) if err != nil { - klog.ErrorS(err, "Unable to fetch container log stats", "containerName", containerName) + logger.Error(err, "Unable to fetch container log stats", "containerName", containerName) } else { containerStat.Logs = logs } @@ -151,7 +151,7 @@ func (p *cadvisorStatsProvider) ListPodStats(ctx context.Context) ([]statsapi.Po // Add each PodStats to the result. result := make([]statsapi.PodStats, 0, len(podToStats)) for _, podStats := range podToStats { - makePodStorageStats(podStats, &rootFsInfo, p.resourceAnalyzer, p.hostStatsProvider, false) + makePodStorageStats(logger, podStats, &rootFsInfo, p.resourceAnalyzer, p.hostStatsProvider, false) podUID := types.UID(podStats.PodRef.UID) // Lookup the pod-level cgroup's CPU and memory stats @@ -224,12 +224,13 @@ func (p *cadvisorStatsProvider) PodCPUAndMemoryStats(ctx context.Context, pod *v } // ListPodCPUAndMemoryStats returns the cpu and memory stats of all the pod-managed containers. -func (p *cadvisorStatsProvider) ListPodCPUAndMemoryStats(_ context.Context) ([]statsapi.PodStats, error) { - infos, err := getCadvisorContainerInfo(p.cadvisor) +func (p *cadvisorStatsProvider) ListPodCPUAndMemoryStats(ctx context.Context) ([]statsapi.PodStats, error) { + logger := klog.FromContext(ctx) + infos, err := getCadvisorContainerInfo(logger, p.cadvisor) if err != nil { return nil, fmt.Errorf("failed to get container info from cadvisor: %v", err) } - filteredInfos, allInfos := filterTerminatedContainerInfoAndAssembleByPodCgroupKey(infos) + filteredInfos, allInfos := filterTerminatedContainerInfoAndAssembleByPodCgroupKey(logger, infos) // Map each container to a pod and update the PodStats with container data. podToStats := map[statsapi.PodReference]*statsapi.PodStats{} for key, cinfo := range filteredInfos { @@ -241,7 +242,7 @@ func (p *cadvisorStatsProvider) ListPodCPUAndMemoryStats(_ context.Context) ([]s continue } // Build the Pod key if this container is managed by a Pod - if !isPodManagedContainer(&cinfo) { + if !isPodManagedContainer(logger, &cinfo) { continue } ref := buildPodRef(cinfo.Spec.Labels) @@ -362,7 +363,8 @@ func (p *cadvisorStatsProvider) ImageFsStats(ctx context.Context) (imageFsRet *s return fsStats, fsStats, nil } - klog.InfoS("Detect Split Filesystem", "ImageFilesystems", imageStats.ImageFilesystems[0], "ContainerFilesystems", imageStats.ContainerFilesystems[0]) + logger := klog.FromContext(ctx) + logger.Info("Detect Split Filesystem", "ImageFilesystems", imageStats.ImageFilesystems[0], "ContainerFilesystems", imageStats.ContainerFilesystems[0]) var containerFsInodesUsed *uint64 if containerFsInfo.Inodes != nil && containerFsInfo.InodesFree != nil { @@ -406,12 +408,12 @@ func buildPodRef(containerLabels map[string]string) statsapi.PodReference { } // isPodManagedContainer returns true if the cinfo container is managed by a Pod -func isPodManagedContainer(cinfo *cadvisorapiv2.ContainerInfo) bool { +func isPodManagedContainer(logger klog.Logger, cinfo *cadvisorapiv2.ContainerInfo) bool { podName := kubetypes.GetPodName(cinfo.Spec.Labels) podNamespace := kubetypes.GetPodNamespace(cinfo.Spec.Labels) managed := podName != "" && podNamespace != "" if !managed && podName != podNamespace { - klog.InfoS( + logger.Info( "Expect container to have either both podName and podNamespace labels, or neither", "podNameLabel", podName, "podNamespaceLabel", podNamespace) } @@ -432,7 +434,7 @@ func getCadvisorPodInfoFromPodUID(podUID types.UID, infos map[string]cadvisorapi // the second return map is pod cgroup key <-> ContainerInfo. // A ContainerInfo is considered to be of a terminated container if it has an // older CreationTime and zero CPU instantaneous and memory RSS usage. -func filterTerminatedContainerInfoAndAssembleByPodCgroupKey(containerInfo map[string]cadvisorapiv2.ContainerInfo) (map[string]cadvisorapiv2.ContainerInfo, map[string]cadvisorapiv2.ContainerInfo) { +func filterTerminatedContainerInfoAndAssembleByPodCgroupKey(logger klog.Logger, containerInfo map[string]cadvisorapiv2.ContainerInfo) (map[string]cadvisorapiv2.ContainerInfo, map[string]cadvisorapiv2.ContainerInfo) { cinfoMap := make(map[containerID][]containerInfoWithCgroup) cinfosByPodCgroupKey := make(map[string]cadvisorapiv2.ContainerInfo) for key, cinfo := range containerInfo { @@ -446,7 +448,7 @@ func filterTerminatedContainerInfoAndAssembleByPodCgroupKey(containerInfo map[st podCgroupKey = filepath.Base(key) } cinfosByPodCgroupKey[podCgroupKey] = cinfo - if !isPodManagedContainer(&cinfo) { + if !isPodManagedContainer(logger, &cinfo) { continue } cinfoID := containerID{ @@ -554,7 +556,7 @@ func isContainerTerminated(info *cadvisorapiv2.ContainerInfo) bool { return cstat.CpuInst.Usage.Total == 0 && cstat.Memory.RSS == 0 } -func getCadvisorContainerInfo(ca cadvisor.Interface) (map[string]cadvisorapiv2.ContainerInfo, error) { +func getCadvisorContainerInfo(logger klog.Logger, ca cadvisor.Interface) (map[string]cadvisorapiv2.ContainerInfo, error) { infos, err := ca.ContainerInfoV2("/", cadvisorapiv2.RequestOptions{ IdType: cadvisorapiv2.TypeName, Count: 2, // 2 samples are needed to compute "instantaneous" CPU @@ -564,7 +566,7 @@ func getCadvisorContainerInfo(ca cadvisor.Interface) (map[string]cadvisorapiv2.C if _, ok := infos["/"]; ok { // If the failure is partial, log it and return a best-effort // response. - klog.ErrorS(err, "Partial failure issuing cadvisor.ContainerInfoV2") + logger.Error(err, "Partial failure issuing cadvisor.ContainerInfoV2") } else { return nil, fmt.Errorf("failed to get root cgroup stats: %w", err) } diff --git a/pkg/kubelet/stats/cadvisor_stats_provider_test.go b/pkg/kubelet/stats/cadvisor_stats_provider_test.go index 2461e4815591a..a5b1498c1f95d 100644 --- a/pkg/kubelet/stats/cadvisor_stats_provider_test.go +++ b/pkg/kubelet/stats/cadvisor_stats_provider_test.go @@ -43,6 +43,7 @@ import ( serverstats "k8s.io/kubernetes/pkg/kubelet/server/stats" statustest "k8s.io/kubernetes/pkg/kubelet/status/testing" "k8s.io/kubernetes/pkg/volume" + "k8s.io/kubernetes/test/utils/ktesting" ) func TestFilterTerminatedContainerInfoAndAssembleByPodCgroupKey(t *testing.T) { @@ -91,7 +92,8 @@ func TestFilterTerminatedContainerInfoAndAssembleByPodCgroupKey(t *testing.T) { //ContainerInfo with no CPU/memory usage but has network usage for uncleaned cgroups, should not be filtered out "/pod2-c222-zerocpumem-1": getContainerInfoWithZeroCpuMem(seedPastPod0Container0, pName2, namespace, cName222), } - filteredInfos, allInfos := filterTerminatedContainerInfoAndAssembleByPodCgroupKey(infos) + logger, _ := ktesting.NewTestContext(t) + filteredInfos, allInfos := filterTerminatedContainerInfoAndAssembleByPodCgroupKey(logger, infos) assert.Len(t, filteredInfos, 5) assert.Len(t, allInfos, 11) for _, c := range []string{"/pod0-i", "/pod0-c0"} { @@ -370,7 +372,7 @@ func TestCadvisorListPodStats(t *testing.T) { } func TestCadvisorPodCPUAndMemoryStats(t *testing.T) { - ctx := context.Background() + tCtx := ktesting.Init(t) const ( namespace = "test0" podName = "pod0" @@ -420,7 +422,7 @@ func TestCadvisorPodCPUAndMemoryStats(t *testing.T) { p := NewCadvisorStatsProvider(mockCadvisor, &fakeResourceAnalyzer{}, nil, nil, nil, NewFakeHostStatsProvider(&containertest.FakeOS{}), mockCM) - ps, err := p.PodCPUAndMemoryStats(ctx, pod, nil) + ps, err := p.PodCPUAndMemoryStats(tCtx, pod, nil) require.NoError(t, err) assert.Equal(t, podName, ps.PodRef.Name) assert.Equal(t, namespace, ps.PodRef.Namespace) @@ -463,8 +465,8 @@ func TestCadvisorPodCPUAndMemoryStats(t *testing.T) { } func TestCadvisorListPodCPUAndMemoryStats(t *testing.T) { + ctx := ktesting.Init(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.KubeletPSI, true) - ctx := context.Background() const ( namespace0 = "test0" namespace2 = "test2" diff --git a/pkg/kubelet/stats/cri_stats_provider.go b/pkg/kubelet/stats/cri_stats_provider.go index edfe92d17be21..b5b2eb6d45005 100644 --- a/pkg/kubelet/stats/cri_stats_provider.go +++ b/pkg/kubelet/stats/cri_stats_provider.go @@ -152,6 +152,7 @@ func (p *criStatsProvider) listPodStats(ctx context.Context, updateCPUNanoCoreUs return nil, fmt.Errorf("failed to get pod or container map: %v", err) } + logger := klog.FromContext(ctx) if p.podAndContainerStatsFromCRI { result, err := p.listPodStatsStrictlyFromCRI(ctx, updateCPUNanoCoreUsage, containerMap, podSandboxMap, &rootFsInfo) if err == nil { @@ -164,7 +165,7 @@ func (p *criStatsProvider) listPodStats(ctx context.Context, updateCPUNanoCoreUs return nil, err } // CRI implementation doesn't support ListPodSandboxStats, warn and fallback. - klog.V(5).ErrorS(err, + logger.V(5).Error(err, "CRI implementation must be updated to support ListPodSandboxStats if PodAndContainerStatsFromCRI feature gate is enabled. Falling back to populating with cAdvisor; this call will fail in the future.", ) } @@ -184,19 +185,20 @@ func (p *criStatsProvider) listPodStatsPartiallyFromCRI(ctx context.Context, upd if err != nil { return nil, fmt.Errorf("failed to list all container stats: %v", err) } - allInfos, err := getCadvisorContainerInfo(p.cadvisor) + + logger := klog.FromContext(ctx) + allInfos, err := getCadvisorContainerInfo(logger, p.cadvisor) if err != nil { return nil, fmt.Errorf("failed to fetch cadvisor stats: %v", err) } - caInfos, allInfos := getCRICadvisorStats(allInfos) + caInfos, allInfos := getCRICadvisorStats(logger, allInfos) // get network stats for containers. // This is only used on Windows. For other platforms, (nil, nil) should be returned. - containerNetworkStats, err := p.listContainerNetworkStats() + containerNetworkStats, err := p.listContainerNetworkStats(logger) if err != nil { return nil, fmt.Errorf("failed to list container network stats: %v", err) } - for _, stats := range resp { containerID := stats.Attributes.Id container, found := containerMap[containerID] @@ -219,11 +221,11 @@ func (p *criStatsProvider) listPodStatsPartiallyFromCRI(ctx context.Context, upd } // Fill available stats for full set of required pod stats - cs, err := p.makeContainerStats(stats, container, rootFsInfo, fsIDtoInfo, podSandbox.GetMetadata(), updateCPUNanoCoreUsage) + cs, err := p.makeContainerStats(logger, stats, container, rootFsInfo, fsIDtoInfo, podSandbox.GetMetadata(), updateCPUNanoCoreUsage) if err != nil { return nil, fmt.Errorf("make container stats: %w", err) } - p.addPodNetworkStats(ps, podSandboxID, caInfos, cs, containerNetworkStats[podSandboxID]) + p.addPodNetworkStats(logger, ps, podSandboxID, caInfos, cs, containerNetworkStats[podSandboxID]) p.addPodCPUMemoryStats(ps, types.UID(podSandbox.Metadata.Uid), allInfos, cs) p.addSwapStats(ps, types.UID(podSandbox.Metadata.Uid), allInfos, cs) p.addIOStats(ps, types.UID(podSandbox.Metadata.Uid), allInfos, cs) @@ -232,9 +234,9 @@ func (p *criStatsProvider) listPodStatsPartiallyFromCRI(ctx context.Context, upd // container stats caStats, caFound := caInfos[containerID] if !caFound { - klog.V(5).InfoS("Unable to find cadvisor stats for container", "containerID", containerID) + logger.V(5).Info("Unable to find cadvisor stats for container", "containerID", containerID) } else { - p.addCadvisorContainerStats(cs, &caStats) + p.addCadvisorContainerStats(logger, cs, &caStats) p.addProcessStats(ps, &caStats) } @@ -245,7 +247,7 @@ func (p *criStatsProvider) listPodStatsPartiallyFromCRI(ctx context.Context, upd result := make([]statsapi.PodStats, 0, len(sandboxIDToPodStats)) for _, s := range sandboxIDToPodStats { - makePodStorageStats(s, rootFsInfo, p.resourceAnalyzer, p.hostStatsProvider, true) + makePodStorageStats(logger, s, rootFsInfo, p.resourceAnalyzer, p.hostStatsProvider, true) result = append(result, *s) } return result, nil @@ -256,12 +258,13 @@ func (p *criStatsProvider) listPodStatsStrictlyFromCRI(ctx context.Context, upda if err != nil { return nil, err } + logger := klog.FromContext(ctx) fsIDtoInfo := make(map[string]*cadvisorapiv2.FsInfo) summarySandboxStats := make([]statsapi.PodStats, 0, len(podSandboxMap)) for _, criSandboxStat := range criSandboxStats { if criSandboxStat == nil || criSandboxStat.Attributes == nil { - klog.V(5).InfoS("Unable to find CRI stats for sandbox") + logger.V(5).Info("Unable to find CRI stats for sandbox") continue } podSandbox, found := podSandboxMap[criSandboxStat.Attributes.Id] @@ -269,7 +272,7 @@ func (p *criStatsProvider) listPodStatsStrictlyFromCRI(ctx context.Context, upda continue } ps := buildPodStats(podSandbox) - if err := p.addCRIPodContainerStats(criSandboxStat, ps, fsIDtoInfo, containerMap, podSandbox, rootFsInfo, updateCPUNanoCoreUsage); err != nil { + if err := p.addCRIPodContainerStats(logger, criSandboxStat, ps, fsIDtoInfo, containerMap, podSandbox, rootFsInfo, updateCPUNanoCoreUsage); err != nil { return nil, fmt.Errorf("add CRI pod container stats: %w", err) } addCRIPodNetworkStats(ps, criSandboxStat) @@ -277,7 +280,7 @@ func (p *criStatsProvider) listPodStatsStrictlyFromCRI(ctx context.Context, upda addCRIPodMemoryStats(ps, criSandboxStat) addCRIPodProcessStats(ps, criSandboxStat) addCRIPodIOStats(ps, criSandboxStat) - makePodStorageStats(ps, rootFsInfo, p.resourceAnalyzer, p.hostStatsProvider, true) + makePodStorageStats(logger, ps, rootFsInfo, p.resourceAnalyzer, p.hostStatsProvider, true) summarySandboxStats = append(summarySandboxStats, *ps) } return summarySandboxStats, nil @@ -382,6 +385,7 @@ func (p *criStatsProvider) ListPodCPUAndMemoryStats(ctx context.Context) ([]stat if err != nil { return nil, fmt.Errorf("failed to get pod or container map: %v", err) } + logger := klog.FromContext(ctx) result := make([]statsapi.PodStats, 0, len(podSandboxMap)) if p.podAndContainerStatsFromCRI { @@ -407,7 +411,7 @@ func (p *criStatsProvider) ListPodCPUAndMemoryStats(ctx context.Context) ([]stat return nil, err } // CRI implementation doesn't support ListPodSandboxStats, warn and fallback. - klog.ErrorS(err, + logger.Error(err, "CRI implementation must be updated to support ListPodSandboxStats if PodAndContainerStatsFromCRI feature gate is enabled. Falling back to populating with cAdvisor; this call will fail in the future.", ) } @@ -417,11 +421,11 @@ func (p *criStatsProvider) ListPodCPUAndMemoryStats(ctx context.Context) ([]stat return nil, fmt.Errorf("failed to list all container stats: %v", err) } - allInfos, err := getCadvisorContainerInfo(p.cadvisor) + allInfos, err := getCadvisorContainerInfo(logger, p.cadvisor) if err != nil { return nil, fmt.Errorf("failed to fetch cadvisor stats: %v", err) } - caInfos, allInfos := getCRICadvisorStats(allInfos) + caInfos, allInfos := getCRICadvisorStats(logger, allInfos) for _, stats := range resp { containerID := stats.Attributes.Id @@ -453,9 +457,9 @@ func (p *criStatsProvider) ListPodCPUAndMemoryStats(ctx context.Context) ([]stat // container stats caStats, caFound := caInfos[containerID] if !caFound { - klog.V(4).InfoS("Unable to find cadvisor stats for container", "containerID", containerID) + logger.V(4).Info("Unable to find cadvisor stats for container", "containerID", containerID) } else { - p.addCadvisorContainerCPUAndMemoryStats(cs, &caStats) + p.addCadvisorContainerCPUAndMemoryStats(logger, cs, &caStats) } ps.Containers = append(ps.Containers, *cs) } @@ -516,7 +520,7 @@ func (p *criStatsProvider) ImageFsStats(ctx context.Context) (imageFsRet *statsa if fs.InodesUsed != nil { imageFsRet.InodesUsed = &fs.InodesUsed.Value } - imageFsInfo, err := p.getFsInfo(fs.GetFsId()) + imageFsInfo, err := p.getFsInfo(klog.FromContext(ctx), fs.GetFsId()) if err != nil { return nil, nil, fmt.Errorf("get filesystem info: %w", err) } @@ -542,7 +546,7 @@ func (p *criStatsProvider) ImageFsDevice(ctx context.Context) (string, error) { return "", err } for _, fs := range resp.GetImageFilesystems() { - fsInfo, err := p.getFsInfo(fs.GetFsId()) + fsInfo, err := p.getFsInfo(klog.FromContext(ctx), fs.GetFsId()) if err != nil { return "", fmt.Errorf("get filesystem info: %w", err) } @@ -556,9 +560,9 @@ func (p *criStatsProvider) ImageFsDevice(ctx context.Context) (string, error) { // getFsInfo returns the information of the filesystem with the specified // fsID. If any error occurs, this function logs the error and returns // nil. -func (p *criStatsProvider) getFsInfo(fsID *runtimeapi.FilesystemIdentifier) (*cadvisorapiv2.FsInfo, error) { +func (p *criStatsProvider) getFsInfo(logger klog.Logger, fsID *runtimeapi.FilesystemIdentifier) (*cadvisorapiv2.FsInfo, error) { if fsID == nil { - klog.V(2).InfoS("Failed to get filesystem info: fsID is nil") + logger.V(2).Info("Failed to get filesystem info: fsID is nil") return nil, nil } mountpoint := fsID.GetMountpoint() @@ -568,9 +572,9 @@ func (p *criStatsProvider) getFsInfo(fsID *runtimeapi.FilesystemIdentifier) (*ca if errors.Is(err, cadvisorfs.ErrNoSuchDevice) || errors.Is(err, cadvisorfs.ErrDeviceNotInPartitionsMap) || errors.Is(err, cadvisormemory.ErrDataNotFound) { - klog.V(2).InfoS(msg, "mountpoint", mountpoint, "err", err) + logger.V(2).Info(msg, "mountpoint", mountpoint, "err", err) } else { - klog.ErrorS(err, msg, "mountpoint", mountpoint) + logger.Error(err, msg, "mountpoint", mountpoint) return nil, fmt.Errorf("%s: %w", msg, err) } return nil, nil @@ -592,6 +596,7 @@ func buildPodStats(podSandbox *runtimeapi.PodSandbox) *statsapi.PodStats { } func (p *criStatsProvider) addPodNetworkStats( + logger klog.Logger, ps *statsapi.PodStats, podSandboxID string, caInfos map[string]cadvisorapiv2.ContainerInfo, @@ -615,7 +620,7 @@ func (p *criStatsProvider) addPodNetworkStats( } // TODO: sum Pod network stats from container stats. - klog.V(4).InfoS("Unable to find network stats for sandbox", "sandboxID", podSandboxID) + logger.V(4).Info("Unable to find network stats for sandbox", "sandboxID", podSandboxID) } func (p *criStatsProvider) addPodCPUMemoryStats( @@ -640,8 +645,8 @@ func (p *criStatsProvider) addPodCPUMemoryStats( } ps.CPU.Time = cs.CPU.Time - usageCoreNanoSeconds := getUint64Value(cs.CPU.UsageCoreNanoSeconds) + getUint64Value(ps.CPU.UsageCoreNanoSeconds) - usageNanoCores := getUint64Value(cs.CPU.UsageNanoCores) + getUint64Value(ps.CPU.UsageNanoCores) + usageCoreNanoSeconds := ptr.Deref(cs.CPU.UsageCoreNanoSeconds, 0) + ptr.Deref(ps.CPU.UsageCoreNanoSeconds, 0) + usageNanoCores := ptr.Deref(cs.CPU.UsageNanoCores, 0) + ptr.Deref(ps.CPU.UsageNanoCores, 0) ps.CPU.UsageCoreNanoSeconds = &usageCoreNanoSeconds ps.CPU.UsageNanoCores = &usageNanoCores // Pod level PSI stats cannot be calculated from container level @@ -653,12 +658,12 @@ func (p *criStatsProvider) addPodCPUMemoryStats( } ps.Memory.Time = cs.Memory.Time - availableBytes := getUint64Value(cs.Memory.AvailableBytes) + getUint64Value(ps.Memory.AvailableBytes) - usageBytes := getUint64Value(cs.Memory.UsageBytes) + getUint64Value(ps.Memory.UsageBytes) - workingSetBytes := getUint64Value(cs.Memory.WorkingSetBytes) + getUint64Value(ps.Memory.WorkingSetBytes) - rSSBytes := getUint64Value(cs.Memory.RSSBytes) + getUint64Value(ps.Memory.RSSBytes) - pageFaults := getUint64Value(cs.Memory.PageFaults) + getUint64Value(ps.Memory.PageFaults) - majorPageFaults := getUint64Value(cs.Memory.MajorPageFaults) + getUint64Value(ps.Memory.MajorPageFaults) + availableBytes := ptr.Deref(cs.Memory.AvailableBytes, 0) + ptr.Deref(ps.Memory.AvailableBytes, 0) + usageBytes := ptr.Deref(cs.Memory.UsageBytes, 0) + ptr.Deref(ps.Memory.UsageBytes, 0) + workingSetBytes := ptr.Deref(cs.Memory.WorkingSetBytes, 0) + ptr.Deref(ps.Memory.WorkingSetBytes, 0) + rSSBytes := ptr.Deref(cs.Memory.RSSBytes, 0) + ptr.Deref(ps.Memory.RSSBytes, 0) + pageFaults := ptr.Deref(cs.Memory.PageFaults, 0) + ptr.Deref(ps.Memory.PageFaults, 0) + majorPageFaults := ptr.Deref(cs.Memory.MajorPageFaults, 0) + ptr.Deref(ps.Memory.MajorPageFaults, 0) ps.Memory.AvailableBytes = &availableBytes ps.Memory.UsageBytes = &usageBytes ps.Memory.WorkingSetBytes = &workingSetBytes @@ -687,8 +692,8 @@ func (p *criStatsProvider) addSwapStats( if ps.Swap == nil { ps.Swap = &statsapi.SwapStats{Time: cs.Swap.Time} } - swapAvailableBytes := getUint64Value(cs.Swap.SwapAvailableBytes) + getUint64Value(ps.Swap.SwapAvailableBytes) - swapUsageBytes := getUint64Value(cs.Swap.SwapUsageBytes) + getUint64Value(ps.Swap.SwapUsageBytes) + swapAvailableBytes := ptr.Deref(cs.Swap.SwapAvailableBytes, 0) + ptr.Deref(ps.Swap.SwapAvailableBytes, 0) + swapUsageBytes := ptr.Deref(cs.Swap.SwapUsageBytes, 0) + ptr.Deref(ps.Swap.SwapUsageBytes, 0) ps.Swap.SwapAvailableBytes = &swapAvailableBytes ps.Swap.SwapUsageBytes = &swapUsageBytes } @@ -728,6 +733,7 @@ func (p *criStatsProvider) addProcessStats( } func (p *criStatsProvider) makeContainerStats( + logger klog.Logger, stats *runtimeapi.ContainerStats, container *runtimeapi.Container, rootFsInfo *cadvisorapiv2.FsInfo, @@ -752,7 +758,7 @@ func (p *criStatsProvider) makeContainerStats( } var usageNanoCores *uint64 if updateCPUNanoCoreUsage { - usageNanoCores = p.getAndUpdateContainerUsageNanoCores(stats) + usageNanoCores = p.getAndUpdateContainerUsageNanoCores(logger, stats) } else { usageNanoCores = p.getContainerUsageNanoCores(stats) } @@ -819,7 +825,7 @@ func (p *criStatsProvider) makeContainerStats( if fsID != nil { imageFsInfo, found := fsIDtoInfo[fsID.Mountpoint] if !found { - imageFsInfo, err = p.getFsInfo(fsID) + imageFsInfo, err = p.getFsInfo(logger, fsID) if err != nil { return nil, fmt.Errorf("get filesystem info: %w", err) } @@ -841,7 +847,7 @@ func (p *criStatsProvider) makeContainerStats( // officially support in-place upgrade anyway. result.Logs, err = p.hostStatsProvider.getPodContainerLogStats(meta.GetNamespace(), meta.GetName(), types.UID(meta.GetUid()), container.GetMetadata().GetName(), rootFsInfo) if err != nil { - klog.ErrorS(err, "Unable to fetch container log stats", "containerName", container.GetMetadata().GetName()) + logger.Error(err, "Unable to fetch container log stats", "containerName", container.GetMetadata().GetName()) } return result, nil } @@ -973,7 +979,7 @@ func (p *criStatsProvider) getContainerUsageNanoCores(stats *runtimeapi.Containe // getAndUpdateContainerUsageNanoCores first attempts to get the usage nano cores from the stats reported // by the CRI. If it is unable to, it computes usageNanoCores based on the given and the cached usageCoreNanoSeconds, // updates the cache with the computed usageNanoCores, and returns the usageNanoCores. -func (p *criStatsProvider) getAndUpdateContainerUsageNanoCores(stats *runtimeapi.ContainerStats) *uint64 { +func (p *criStatsProvider) getAndUpdateContainerUsageNanoCores(logger klog.Logger, stats *runtimeapi.ContainerStats) *uint64 { if stats == nil || stats.Attributes == nil || stats.Cpu == nil { return nil } @@ -1015,7 +1021,7 @@ func (p *criStatsProvider) getAndUpdateContainerUsageNanoCores(stats *runtimeapi if err != nil { // This should not happen. Log now to raise visibility - klog.ErrorS(err, "Failed updating cpu usage nano core") + logger.Error(err, "Failed updating cpu usage nano core") } return usage } @@ -1105,11 +1111,12 @@ func removeTerminatedContainers(containers []*runtimeapi.Container) []*runtimeap } func (p *criStatsProvider) addCadvisorContainerStats( + logger klog.Logger, cs *statsapi.ContainerStats, caPodStats *cadvisorapiv2.ContainerInfo, ) { if caPodStats.Spec.HasCustomMetrics { - cs.UserDefinedMetrics = cadvisorInfoToUserDefinedMetrics(caPodStats) + cs.UserDefinedMetrics = cadvisorInfoToUserDefinedMetrics(logger, caPodStats) } cpu, memory := cadvisorInfoToCPUandMemoryStats(caPodStats) @@ -1134,11 +1141,12 @@ func (p *criStatsProvider) addCadvisorContainerStats( } func (p *criStatsProvider) addCadvisorContainerCPUAndMemoryStats( + logger klog.Logger, cs *statsapi.ContainerStats, caPodStats *cadvisorapiv2.ContainerInfo, ) { if caPodStats.Spec.HasCustomMetrics { - cs.UserDefinedMetrics = cadvisorInfoToUserDefinedMetrics(caPodStats) + cs.UserDefinedMetrics = cadvisorInfoToUserDefinedMetrics(logger, caPodStats) } cpu, memory := cadvisorInfoToCPUandMemoryStats(caPodStats) @@ -1150,9 +1158,9 @@ func (p *criStatsProvider) addCadvisorContainerCPUAndMemoryStats( } } -func getCRICadvisorStats(infos map[string]cadvisorapiv2.ContainerInfo) (map[string]cadvisorapiv2.ContainerInfo, map[string]cadvisorapiv2.ContainerInfo) { +func getCRICadvisorStats(logger klog.Logger, infos map[string]cadvisorapiv2.ContainerInfo) (map[string]cadvisorapiv2.ContainerInfo, map[string]cadvisorapiv2.ContainerInfo) { stats := make(map[string]cadvisorapiv2.ContainerInfo) - filteredInfos, cinfosByPodCgroupKey := filterTerminatedContainerInfoAndAssembleByPodCgroupKey(infos) + filteredInfos, cinfosByPodCgroupKey := filterTerminatedContainerInfoAndAssembleByPodCgroupKey(logger, infos) for key, info := range filteredInfos { // On systemd using devicemapper each mount into the container has an // associated cgroup. We ignore them to ensure we do not get duplicate @@ -1162,7 +1170,7 @@ func getCRICadvisorStats(infos map[string]cadvisorapiv2.ContainerInfo) (map[stri continue } // Build the Pod key if this container is managed by a Pod - if !isPodManagedContainer(&info) { + if !isPodManagedContainer(logger, &info) { continue } stats[extractIDFromCgroupPath(key)] = info diff --git a/pkg/kubelet/stats/cri_stats_provider_linux.go b/pkg/kubelet/stats/cri_stats_provider_linux.go index b3bb466288fbf..576df556de56e 100644 --- a/pkg/kubelet/stats/cri_stats_provider_linux.go +++ b/pkg/kubelet/stats/cri_stats_provider_linux.go @@ -28,12 +28,16 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilfeature "k8s.io/apiserver/pkg/util/feature" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "k8s.io/klog/v2" statsapi "k8s.io/kubelet/pkg/apis/stats/v1alpha1" "k8s.io/kubernetes/pkg/features" ) -func (p *criStatsProvider) addCRIPodContainerStats(criSandboxStat *runtimeapi.PodSandboxStats, - ps *statsapi.PodStats, fsIDtoInfo map[string]*cadvisorapiv2.FsInfo, +func (p *criStatsProvider) addCRIPodContainerStats( + logger klog.Logger, + criSandboxStat *runtimeapi.PodSandboxStats, + ps *statsapi.PodStats, + fsIDtoInfo map[string]*cadvisorapiv2.FsInfo, containerMap map[string]*runtimeapi.Container, podSandbox *runtimeapi.PodSandbox, rootFsInfo *cadvisorapiv2.FsInfo, updateCPUNanoCoreUsage bool) error { @@ -43,7 +47,7 @@ func (p *criStatsProvider) addCRIPodContainerStats(criSandboxStat *runtimeapi.Po continue } // Fill available stats for full set of required pod stats - cs, err := p.makeContainerStats(criContainerStat, container, rootFsInfo, fsIDtoInfo, podSandbox.GetMetadata(), + cs, err := p.makeContainerStats(logger, criContainerStat, container, rootFsInfo, fsIDtoInfo, podSandbox.GetMetadata(), updateCPUNanoCoreUsage) if err != nil { return fmt.Errorf("make container stats: %w", err) @@ -124,6 +128,6 @@ func addCRIPodProcessStats(ps *statsapi.PodStats, criPodStat *runtimeapi.PodSand // listContainerNetworkStats returns the network stats of all the running containers. // It should return (nil, nil) for platforms other than Windows. -func (p *criStatsProvider) listContainerNetworkStats() (map[string]*statsapi.NetworkStats, error) { +func (p *criStatsProvider) listContainerNetworkStats(klog.Logger) (map[string]*statsapi.NetworkStats, error) { return nil, nil } diff --git a/pkg/kubelet/stats/cri_stats_provider_others.go b/pkg/kubelet/stats/cri_stats_provider_others.go index 589419b16a2a9..f8188fb48329b 100644 --- a/pkg/kubelet/stats/cri_stats_provider_others.go +++ b/pkg/kubelet/stats/cri_stats_provider_others.go @@ -23,20 +23,25 @@ import ( cadvisorapiv2 "github.com/google/cadvisor/info/v2" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "k8s.io/klog/v2" statsapi "k8s.io/kubelet/pkg/apis/stats/v1alpha1" ) // listContainerNetworkStats returns the network stats of all the running containers. // It should return (nil, nil) for platforms other than Windows. -func (p *criStatsProvider) listContainerNetworkStats() (map[string]*statsapi.NetworkStats, error) { +func (p *criStatsProvider) listContainerNetworkStats(klog.Logger) (map[string]*statsapi.NetworkStats, error) { return nil, nil } -func (p *criStatsProvider) addCRIPodContainerStats(criSandboxStat *runtimeapi.PodSandboxStats, - ps *statsapi.PodStats, fsIDtoInfo map[string]*cadvisorapiv2.FsInfo, - containerMap map[string]*runtimeapi.Container, - podSandbox *runtimeapi.PodSandbox, - rootFsInfo *cadvisorapiv2.FsInfo, updateCPUNanoCoreUsage bool) error { +func (p *criStatsProvider) addCRIPodContainerStats( + klog.Logger, + *runtimeapi.PodSandboxStats, + *statsapi.PodStats, + map[string]*cadvisorapiv2.FsInfo, + map[string]*runtimeapi.Container, + *runtimeapi.PodSandbox, + *cadvisorapiv2.FsInfo, + bool) error { return nil } diff --git a/pkg/kubelet/stats/cri_stats_provider_test.go b/pkg/kubelet/stats/cri_stats_provider_test.go index 8dce61a9631dd..b1deca169c154 100644 --- a/pkg/kubelet/stats/cri_stats_provider_test.go +++ b/pkg/kubelet/stats/cri_stats_provider_test.go @@ -17,7 +17,6 @@ limitations under the License. package stats import ( - "context" "math/rand" "os" "path/filepath" @@ -51,6 +50,7 @@ import ( kubepodtest "k8s.io/kubernetes/pkg/kubelet/pod/testing" serverstats "k8s.io/kubernetes/pkg/kubelet/server/stats" "k8s.io/kubernetes/pkg/volume" + "k8s.io/kubernetes/test/utils/ktesting" "k8s.io/utils/ptr" ) @@ -100,7 +100,7 @@ const testPodLogDirectory = "/var/log/kube/pods/" // Use non-default path to ens func TestCRIListPodStats(t *testing.T) { featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.KubeletPSI, true) - ctx := context.Background() + tCtx := ktesting.Init(t) var ( imageFsMountpoint = "/test/mount/point" unknownMountpoint = "/unknown/mount/point" @@ -248,7 +248,7 @@ func TestCRIListPodStats(t *testing.T) { fakeContainerStatsProvider{}, ) - stats, err := provider.ListPodStats(ctx) + stats, err := provider.ListPodStats(tCtx) assert := assert.New(t) assert.NoError(err) assert.Len(stats, 4) @@ -351,12 +351,12 @@ func TestCRIListPodStats(t *testing.T) { } func TestListPodStatsStrictlyFromCRI(t *testing.T) { + logger, tCtx := ktesting.NewTestContext(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.KubeletPSI, true) if runtime.GOOS == "windows" { // TODO: remove skip once the failing test has been fixed. t.Skip("Skip failing test on Windows.") } - ctx := context.Background() var ( imageFsMountpoint = "/test/mount/point" unknownMountpoint = "/unknown/mount/point" @@ -483,11 +483,11 @@ func TestListPodStatsStrictlyFromCRI(t *testing.T) { fakeContainerStatsProvider{}, ) - cadvisorInfos, err := getCadvisorContainerInfo(mockCadvisor) + cadvisorInfos, err := getCadvisorContainerInfo(logger, mockCadvisor) if err != nil { t.Errorf("failed to get container info from cadvisor: %v", err) } - stats, err := provider.ListPodStats(ctx) + stats, err := provider.ListPodStats(tCtx) assert := assert.New(t) assert.NoError(err) assert.Len(stats, 2) @@ -552,7 +552,7 @@ func TestListPodStatsStrictlyFromCRI(t *testing.T) { } func TestCRIListPodCPUAndMemoryStats(t *testing.T) { featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.KubeletPSI, true) - ctx := context.Background() + tCtx := ktesting.Init(t) var ( imageFsMountpoint = "/test/mount/point" @@ -661,7 +661,7 @@ func TestCRIListPodCPUAndMemoryStats(t *testing.T) { fakeContainerStatsProvider{}, ) - stats, err := provider.ListPodCPUAndMemoryStats(ctx) + stats, err := provider.ListPodCPUAndMemoryStats(tCtx) assert := assert.New(t) assert.NoError(err) assert.Len(stats, 5) @@ -765,7 +765,7 @@ func TestCRIListPodCPUAndMemoryStats(t *testing.T) { } func TestCRIPodCPUAndMemoryStats(t *testing.T) { - ctx := context.Background() + tCtx := ktesting.Init(t) const ( podName = "test-pod" @@ -830,7 +830,7 @@ func TestCRIPodCPUAndMemoryStats(t *testing.T) { }, } - stats, err := provider.PodCPUAndMemoryStats(ctx, pod, podStatus) + stats, err := provider.PodCPUAndMemoryStats(tCtx, pod, podStatus) assert := assert.New(t) require.NoError(t, err) @@ -866,7 +866,7 @@ func TestCRIPodCPUAndMemoryStats(t *testing.T) { } func TestCRIImagesFsStats(t *testing.T) { - ctx := context.Background() + tCtx := ktesting.Init(t) var ( imageFsMountpoint = "/test/mount/point" imageFsInfo = getTestFsInfo(2000) @@ -896,7 +896,7 @@ func TestCRIImagesFsStats(t *testing.T) { fakeContainerStatsProvider{}, ) - stats, containerStats, err := provider.ImageFsStats(ctx) + stats, containerStats, err := provider.ImageFsStats(tCtx) assert := assert.New(t) assert.NoError(err) @@ -1513,6 +1513,7 @@ func TestGetContainerUsageNanoCores(t *testing.T) { expected: nil, }, } + logger, _ := ktesting.NewTestContext(t) for _, test := range tests { provider := &criStatsProvider{cpuUsageCache: test.cpuUsageCache} // Before the update, the cached value should be nil @@ -1520,7 +1521,7 @@ func TestGetContainerUsageNanoCores(t *testing.T) { assert.Nil(t, cached) // Update the cache and get the latest value. - real := provider.getAndUpdateContainerUsageNanoCores(test.stats) + real := provider.getAndUpdateContainerUsageNanoCores(logger, test.stats) assert.Equal(t, test.expected, real, test.desc) // After the update, the cached value should be up-to-date diff --git a/pkg/kubelet/stats/cri_stats_provider_windows.go b/pkg/kubelet/stats/cri_stats_provider_windows.go index dc7ff2d7da168..367a46516b827 100644 --- a/pkg/kubelet/stats/cri_stats_provider_windows.go +++ b/pkg/kubelet/stats/cri_stats_provider_windows.go @@ -52,12 +52,11 @@ func (s networkStats) GetHNSEndpointStats(endpointName string) (*hnslib.HNSEndpo } // listContainerNetworkStats returns the network stats of all the running containers. -func (p *criStatsProvider) listContainerNetworkStats() (map[string]*statsapi.NetworkStats, error) { +func (p *criStatsProvider) listContainerNetworkStats(logger klog.Logger) (map[string]*statsapi.NetworkStats, error) { networkStatsProvider := newNetworkStatsProvider(p) - endpoints, err := networkStatsProvider.HNSListEndpointRequest() if err != nil { - klog.ErrorS(err, "Failed to fetch current HNS endpoints") + logger.Error(err, "Failed to fetch current HNS endpoints") return nil, err } @@ -65,7 +64,7 @@ func (p *criStatsProvider) listContainerNetworkStats() (map[string]*statsapi.Net for _, endpoint := range endpoints { endpointStats, err := networkStatsProvider.GetHNSEndpointStats(endpoint.Id) if err != nil { - klog.V(2).InfoS("Failed to fetch statistics for endpoint, continue to get stats for other endpoints", "endpointId", endpoint.Id, "containers", endpoint.SharedContainers) + logger.V(2).Info("Failed to fetch statistics for endpoint, continue to get stats for other endpoints", "endpointId", endpoint.Id, "containers", endpoint.SharedContainers) continue } @@ -84,7 +83,7 @@ func (p *criStatsProvider) listContainerNetworkStats() (map[string]*statsapi.Net return networkStats, nil } -func (p *criStatsProvider) addCRIPodContainerStats(criSandboxStat *runtimeapi.PodSandboxStats, +func (p *criStatsProvider) addCRIPodContainerStats(logger klog.Logger, criSandboxStat *runtimeapi.PodSandboxStats, ps *statsapi.PodStats, fsIDtoInfo map[string]*cadvisorapiv2.FsInfo, containerMap map[string]*runtimeapi.Container, podSandbox *runtimeapi.PodSandbox, @@ -96,7 +95,7 @@ func (p *criStatsProvider) addCRIPodContainerStats(criSandboxStat *runtimeapi.Po continue } // Fill available stats for full set of required pod stats - cs, err := p.makeWinContainerStats(criContainerStat, container, rootFsInfo, fsIDtoInfo, podSandbox.GetMetadata()) + cs, err := p.makeWinContainerStats(logger, criContainerStat, container, rootFsInfo, fsIDtoInfo, podSandbox.GetMetadata()) if err != nil { return fmt.Errorf("make container stats: %w", err) @@ -108,6 +107,7 @@ func (p *criStatsProvider) addCRIPodContainerStats(criSandboxStat *runtimeapi.Po } func (p *criStatsProvider) makeWinContainerStats( + logger klog.Logger, stats *runtimeapi.WindowsContainerStats, container *runtimeapi.Container, rootFsInfo *cadvisorapiv2.FsInfo, @@ -163,7 +163,7 @@ func (p *criStatsProvider) makeWinContainerStats( if fsID != nil { imageFsInfo, found := fsIDtoInfo[fsID.Mountpoint] if !found { - imageFsInfo, err = p.getFsInfo(fsID) + imageFsInfo, err = p.getFsInfo(logger, fsID) if err != nil { return nil, fmt.Errorf("get filesystem info: %w", err) } @@ -183,7 +183,7 @@ func (p *criStatsProvider) makeWinContainerStats( // officially support in-place upgrade anyway. result.Logs, err = p.hostStatsProvider.getPodContainerLogStats(meta.GetNamespace(), meta.GetName(), types.UID(meta.GetUid()), container.GetMetadata().GetName(), rootFsInfo) if err != nil { - klog.ErrorS(err, "Unable to fetch container log stats", "containerName", container.GetMetadata().GetName()) + logger.Error(err, "Unable to fetch container log stats", "containerName", container.GetMetadata().GetName()) } return result, nil } diff --git a/pkg/kubelet/stats/cri_stats_provider_windows_test.go b/pkg/kubelet/stats/cri_stats_provider_windows_test.go index b8a8fbb015d2b..d7c77522c669b 100644 --- a/pkg/kubelet/stats/cri_stats_provider_windows_test.go +++ b/pkg/kubelet/stats/cri_stats_provider_windows_test.go @@ -32,6 +32,7 @@ import ( kubecontainertest "k8s.io/kubernetes/pkg/kubelet/container/testing" "k8s.io/kubernetes/pkg/kubelet/kuberuntime" "k8s.io/kubernetes/pkg/volume" + "k8s.io/kubernetes/test/utils/ktesting" testingclock "k8s.io/utils/clock/testing" "k8s.io/utils/ptr" ) @@ -423,6 +424,7 @@ func Test_criStatsProvider_listContainerNetworkStats(t *testing.T) { skipped: true, }, } + logger, _ := ktesting.NewTestContext(t) for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { // TODO: Remove skip once https://github.com/kubernetes/kubernetes/issues/116692 is fixed. @@ -435,7 +437,7 @@ func Test_criStatsProvider_listContainerNetworkStats(t *testing.T) { }, clock: fakeClock, } - got, err := p.listContainerNetworkStats() + got, err := p.listContainerNetworkStats(logger) if (err != nil) != tt.wantErr { t.Errorf("listContainerNetworkStats() error = %v, wantErr %v", err, tt.wantErr) return @@ -522,7 +524,8 @@ func Test_criStatsProvider_makeWinContainerStats(t *testing.T) { Uid: "sb0-uid", } - got, err := p.makeWinContainerStats(inputStats, inputContainer, inputRootFsInfo, make(map[string]*cadvisorapiv2.FsInfo), inputPodSandboxMetadata) + logger, _ := ktesting.NewTestContext(t) + got, err := p.makeWinContainerStats(logger, inputStats, inputContainer, inputRootFsInfo, make(map[string]*cadvisorapiv2.FsInfo), inputPodSandboxMetadata) expected := &statsapi.ContainerStats{ Name: "c0", diff --git a/pkg/kubelet/stats/helper.go b/pkg/kubelet/stats/helper.go index cb7460a41662c..8825ad7fef0c2 100644 --- a/pkg/kubelet/stats/helper.go +++ b/pkg/kubelet/stats/helper.go @@ -91,7 +91,7 @@ func cadvisorInfoToCPUandMemoryStats(info *cadvisorapiv2.ContainerInfo) (*statsa // cadvisorInfoToContainerStats returns the statsapi.ContainerStats converted // from the container and filesystem info. -func cadvisorInfoToContainerStats(name string, info *cadvisorapiv2.ContainerInfo, rootFs, imageFs *cadvisorapiv2.FsInfo) *statsapi.ContainerStats { +func cadvisorInfoToContainerStats(logger klog.Logger, name string, info *cadvisorapiv2.ContainerInfo, rootFs, imageFs *cadvisorapiv2.FsInfo) *statsapi.ContainerStats { result := &statsapi.ContainerStats{ StartTime: metav1.NewTime(info.Spec.CreationTime), Name: name, @@ -151,7 +151,7 @@ func cadvisorInfoToContainerStats(name string, info *cadvisorapiv2.ContainerInfo }) } - result.UserDefinedMetrics = cadvisorInfoToUserDefinedMetrics(info) + result.UserDefinedMetrics = cadvisorInfoToUserDefinedMetrics(logger, info) return result } @@ -247,7 +247,7 @@ func cadvisorInfoToNetworkStats(info *cadvisorapiv2.ContainerInfo) *statsapi.Net // cadvisorInfoToUserDefinedMetrics returns the statsapi.UserDefinedMetric // converted from the container info from cadvisor. -func cadvisorInfoToUserDefinedMetrics(info *cadvisorapiv2.ContainerInfo) []statsapi.UserDefinedMetric { +func cadvisorInfoToUserDefinedMetrics(logger klog.Logger, info *cadvisorapiv2.ContainerInfo) []statsapi.UserDefinedMetric { type specVal struct { ref statsapi.UserDefinedMetricDescriptor valType cadvisorapiv1.DataType @@ -269,7 +269,7 @@ func cadvisorInfoToUserDefinedMetrics(info *cadvisorapiv2.ContainerInfo) []stats for name, values := range stat.CustomMetrics { specVal, ok := udmMap[name] if !ok { - klog.InfoS("Spec for custom metric is missing from cAdvisor output", "metric", name, "spec", info.Spec, "metrics", stat.CustomMetrics) + logger.Info("Spec for custom metric is missing from cAdvisor output", "metric", name, "spec", info.Spec, "metrics", stat.CustomMetrics) continue } for _, value := range values { @@ -423,14 +423,6 @@ func buildRootfsStats(cstat *cadvisorapiv2.ContainerStats, imageFs *cadvisorapiv } } -func getUint64Value(value *uint64) uint64 { - if value == nil { - return 0 - } - - return *value -} - func calcEphemeralStorage(containers []statsapi.ContainerStats, volumes []statsapi.VolumeStats, rootFsInfo *cadvisorapiv2.FsInfo, podLogStats *statsapi.FsStats, etcHostsStats *statsapi.FsStats, isCRIStatsProvider bool) *statsapi.FsStats { result := &statsapi.FsStats{ @@ -494,7 +486,7 @@ func addUsage(first, second *uint64) *uint64 { return &total } -func makePodStorageStats(s *statsapi.PodStats, rootFsInfo *cadvisorapiv2.FsInfo, resourceAnalyzer stats.ResourceAnalyzer, hostStatsProvider HostStatsProvider, isCRIStatsProvider bool) { +func makePodStorageStats(logger klog.Logger, s *statsapi.PodStats, rootFsInfo *cadvisorapiv2.FsInfo, resourceAnalyzer stats.ResourceAnalyzer, hostStatsProvider HostStatsProvider, isCRIStatsProvider bool) { podNs := s.PodRef.Namespace podName := s.PodRef.Name podUID := types.UID(s.PodRef.UID) @@ -503,11 +495,11 @@ func makePodStorageStats(s *statsapi.PodStats, rootFsInfo *cadvisorapiv2.FsInfo, ephemeralStats = make([]statsapi.VolumeStats, len(vstats.EphemeralVolumes)) copy(ephemeralStats, vstats.EphemeralVolumes) s.VolumeStats = append(append([]statsapi.VolumeStats{}, vstats.EphemeralVolumes...), vstats.PersistentVolumes...) - } + logStats, err := hostStatsProvider.getPodLogStats(podNs, podName, podUID, rootFsInfo) if err != nil { - klog.V(6).ErrorS(err, "Unable to fetch pod log stats", "pod", klog.KRef(podNs, podName)) + logger.V(6).Error(err, "Unable to fetch pod log stats", "pod", klog.KRef(podNs, podName)) // If people do in-place upgrade, there might be pods still using // the old log path. For those pods, no pod log stats is returned. // We should continue generating other stats in that case. @@ -515,7 +507,7 @@ func makePodStorageStats(s *statsapi.PodStats, rootFsInfo *cadvisorapiv2.FsInfo, } etcHostsStats, err := hostStatsProvider.getPodEtcHostsStats(podUID, rootFsInfo) if err != nil { - klog.V(6).ErrorS(err, "Unable to fetch pod etc hosts stats", "pod", klog.KRef(podNs, podName)) + logger.V(6).Error(err, "Unable to fetch pod etc hosts stats", "pod", klog.KRef(podNs, podName)) } s.EphemeralStorage = calcEphemeralStorage(s.Containers, ephemeralStats, rootFsInfo, logStats, etcHostsStats, isCRIStatsProvider) } diff --git a/pkg/kubelet/stats/helper_test.go b/pkg/kubelet/stats/helper_test.go index 3c111363bc1e3..4cf4d60bc1a4e 100644 --- a/pkg/kubelet/stats/helper_test.go +++ b/pkg/kubelet/stats/helper_test.go @@ -29,6 +29,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" statsapi "k8s.io/kubelet/pkg/apis/stats/v1alpha1" + "k8s.io/kubernetes/test/utils/ktesting" "k8s.io/utils/ptr" ) @@ -81,7 +82,8 @@ func TestCustomMetrics(t *testing.T) { }, }, } - assert.Contains(t, cadvisorInfoToUserDefinedMetrics(&cInfo), + logger, _ := ktesting.NewTestContext(t) + assert.Contains(t, cadvisorInfoToUserDefinedMetrics(logger, &cInfo), statsapi.UserDefinedMetric{ UserDefinedMetricDescriptor: statsapi.UserDefinedMetricDescriptor{ Name: "qos", diff --git a/pkg/kubelet/stats/provider.go b/pkg/kubelet/stats/provider.go index 71fa3115f0b4e..924cc28eb67b6 100644 --- a/pkg/kubelet/stats/provider.go +++ b/pkg/kubelet/stats/provider.go @@ -26,6 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" internalapi "k8s.io/cri-api/pkg/apis" + "k8s.io/klog/v2" statsapi "k8s.io/kubelet/pkg/apis/stats/v1alpha1" "k8s.io/kubernetes/pkg/kubelet/cadvisor" "k8s.io/kubernetes/pkg/kubelet/cm" @@ -121,8 +122,11 @@ func (p *Provider) GetCgroupStats(cgroupName string, updateStats bool) (*statsap } return nil, nil, fmt.Errorf("failed to get cgroup stats for %q: %v", cgroupName, err) } + // Use klog.TODO() because we currently do not have a proper logger to pass in. + // Replace this with an appropriate logger when refactoring this function to accept a context parameter. + logger := klog.TODO() // Rootfs and imagefs doesn't make sense for raw cgroup. - s := cadvisorInfoToContainerStats(cgroupName, info, nil, nil) + s := cadvisorInfoToContainerStats(logger, cgroupName, info, nil, nil) n := cadvisorInfoToNetworkStats(info) return s, n, nil } diff --git a/pkg/kubelet/stats/provider_test.go b/pkg/kubelet/stats/provider_test.go index b1372f32eaadf..c4bb2d79e9d58 100644 --- a/pkg/kubelet/stats/provider_test.go +++ b/pkg/kubelet/stats/provider_test.go @@ -41,6 +41,7 @@ import ( kubepodtest "k8s.io/kubernetes/pkg/kubelet/pod/testing" serverstats "k8s.io/kubernetes/pkg/kubelet/server/stats" "k8s.io/kubernetes/pkg/volume" + "k8s.io/kubernetes/test/utils/ktesting" "k8s.io/utils/ptr" ) @@ -172,7 +173,7 @@ func TestRootFsStats(t *testing.T) { } func TestHasDedicatedImageFs(t *testing.T) { - ctx := context.Background() + tCtx := ktesting.Init(t) imageStatsExpected := &statsapi.FsStats{AvailableBytes: ptr.To[uint64](1)} for desc, test := range map[string]struct { @@ -215,7 +216,7 @@ func TestHasDedicatedImageFs(t *testing.T) { containerFs: test.containerFsStats, }) - dedicated, err := provider.HasDedicatedImageFs(ctx) + dedicated, err := provider.HasDedicatedImageFs(tCtx) assert.NoError(t, err) assert.Equal(t, test.dedicated, dedicated) } @@ -616,7 +617,7 @@ type fakeResourceAnalyzer struct { podVolumeStats serverstats.PodVolumeStats } -func (o *fakeResourceAnalyzer) Start() {} +func (o *fakeResourceAnalyzer) Start(context.Context) {} func (o *fakeResourceAnalyzer) Get(context.Context, bool) (*statsapi.Summary, error) { return nil, nil } func (o *fakeResourceAnalyzer) GetCPUAndMemoryStats(context.Context) (*statsapi.Summary, error) { return nil, nil diff --git a/pkg/kubelet/status/.mockery.yaml b/pkg/kubelet/status/.mockery.yaml index e57d22e2ee21b..ead47cb8501c0 100644 --- a/pkg/kubelet/status/.mockery.yaml +++ b/pkg/kubelet/status/.mockery.yaml @@ -1,10 +1,12 @@ --- dir: testing -filename: "mock_{{.InterfaceName | snakecase}}.go" -boilerplate-file: ../../../hack/boilerplate/boilerplate.generatego.txt -outpkg: testing -with-expecter: true +filename: mocks.go +pkgname: testing +template: testify +template-data: + boilerplate-file: ../../../hack/boilerplate/boilerplate.generatego.txt + unroll-variadic: true packages: k8s.io/kubernetes/pkg/kubelet/status: interfaces: - PodStatusProvider: + PodStatusProvider: {} diff --git a/pkg/kubelet/status/testing/mock_pod_status_provider.go b/pkg/kubelet/status/testing/mocks.go similarity index 71% rename from pkg/kubelet/status/testing/mock_pod_status_provider.go rename to pkg/kubelet/status/testing/mocks.go index dcfe31b4dc1ca..f0415c9c788a1 100644 --- a/pkg/kubelet/status/testing/mock_pod_status_provider.go +++ b/pkg/kubelet/status/testing/mocks.go @@ -14,17 +14,31 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by mockery v2.53.3. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package testing import ( mock "github.com/stretchr/testify/mock" + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" +) - types "k8s.io/apimachinery/pkg/types" +// NewMockPodStatusProvider creates a new instance of MockPodStatusProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockPodStatusProvider(t interface { + mock.TestingT + Cleanup(func()) +}) *MockPodStatusProvider { + mock := &MockPodStatusProvider{} + mock.Mock.Test(t) - v1 "k8s.io/api/core/v1" -) + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} // MockPodStatusProvider is an autogenerated mock type for the PodStatusProvider type type MockPodStatusProvider struct { @@ -39,9 +53,9 @@ func (_m *MockPodStatusProvider) EXPECT() *MockPodStatusProvider_Expecter { return &MockPodStatusProvider_Expecter{mock: &_m.Mock} } -// GetPodStatus provides a mock function with given fields: uid -func (_m *MockPodStatusProvider) GetPodStatus(uid types.UID) (v1.PodStatus, bool) { - ret := _m.Called(uid) +// GetPodStatus provides a mock function for the type MockPodStatusProvider +func (_mock *MockPodStatusProvider) GetPodStatus(uid types.UID) (v1.PodStatus, bool) { + ret := _mock.Called(uid) if len(ret) == 0 { panic("no return value specified for GetPodStatus") @@ -49,21 +63,19 @@ func (_m *MockPodStatusProvider) GetPodStatus(uid types.UID) (v1.PodStatus, bool var r0 v1.PodStatus var r1 bool - if rf, ok := ret.Get(0).(func(types.UID) (v1.PodStatus, bool)); ok { - return rf(uid) + if returnFunc, ok := ret.Get(0).(func(types.UID) (v1.PodStatus, bool)); ok { + return returnFunc(uid) } - if rf, ok := ret.Get(0).(func(types.UID) v1.PodStatus); ok { - r0 = rf(uid) + if returnFunc, ok := ret.Get(0).(func(types.UID) v1.PodStatus); ok { + r0 = returnFunc(uid) } else { r0 = ret.Get(0).(v1.PodStatus) } - - if rf, ok := ret.Get(1).(func(types.UID) bool); ok { - r1 = rf(uid) + if returnFunc, ok := ret.Get(1).(func(types.UID) bool); ok { + r1 = returnFunc(uid) } else { r1 = ret.Get(1).(bool) } - return r0, r1 } @@ -80,31 +92,23 @@ func (_e *MockPodStatusProvider_Expecter) GetPodStatus(uid interface{}) *MockPod func (_c *MockPodStatusProvider_GetPodStatus_Call) Run(run func(uid types.UID)) *MockPodStatusProvider_GetPodStatus_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.UID)) + var arg0 types.UID + if args[0] != nil { + arg0 = args[0].(types.UID) + } + run( + arg0, + ) }) return _c } -func (_c *MockPodStatusProvider_GetPodStatus_Call) Return(_a0 v1.PodStatus, _a1 bool) *MockPodStatusProvider_GetPodStatus_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockPodStatusProvider_GetPodStatus_Call) Return(podStatus v1.PodStatus, b bool) *MockPodStatusProvider_GetPodStatus_Call { + _c.Call.Return(podStatus, b) return _c } -func (_c *MockPodStatusProvider_GetPodStatus_Call) RunAndReturn(run func(types.UID) (v1.PodStatus, bool)) *MockPodStatusProvider_GetPodStatus_Call { +func (_c *MockPodStatusProvider_GetPodStatus_Call) RunAndReturn(run func(uid types.UID) (v1.PodStatus, bool)) *MockPodStatusProvider_GetPodStatus_Call { _c.Call.Return(run) return _c } - -// NewMockPodStatusProvider creates a new instance of MockPodStatusProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockPodStatusProvider(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPodStatusProvider { - mock := &MockPodStatusProvider{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/kubelet/userns/userns_manager.go b/pkg/kubelet/userns/userns_manager.go index 728757b4f1920..472ebea034cf6 100644 --- a/pkg/kubelet/userns/userns_manager.go +++ b/pkg/kubelet/userns/userns_manager.go @@ -20,6 +20,7 @@ limitations under the License. package userns import ( + "context" "encoding/json" "fmt" "os" @@ -128,7 +129,7 @@ func (m *UsernsManager) readMappingsFromFile(pod types.UID) ([]byte, error) { return fstore.Read(mappingsFile) } -func MakeUserNsManager(kl userNsPodsManager) (*UsernsManager, error) { +func MakeUserNsManager(logger klog.Logger, kl userNsPodsManager) (*UsernsManager, error) { kubeletMappingID, kubeletMappingLen, err := kl.GetKubeletMappings() if err != nil { return nil, fmt.Errorf("kubelet mappings: %w", err) @@ -154,7 +155,7 @@ func MakeUserNsManager(kl userNsPodsManager) (*UsernsManager, error) { } off := int(kubeletMappingID / userNsLength) len := int(kubeletMappingLen / userNsLength) - klog.V(5).InfoS("User namespace manager mapping", "offset", off, "length", len, "idsPerPod", userNsLength) + logger.V(5).Info("User namespace manager mapping", "offset", off, "length", len, "idsPerPod", userNsLength) m := UsernsManager{ used: allocator.NewAllocationMap(len, "user namespaces"), @@ -179,8 +180,8 @@ func MakeUserNsManager(kl userNsPodsManager) (*UsernsManager, error) { } for _, podUID := range found { - klog.V(5).InfoS("reading pod from disk for user namespace", "podUID", podUID) - if err := m.recordPodMappings(podUID); err != nil { + logger.V(5).Info("reading pod from disk for user namespace", "podUID", podUID) + if err := m.recordPodMappings(logger, podUID); err != nil { return nil, fmt.Errorf("record pod mappings: %w", err) } } @@ -190,7 +191,7 @@ func MakeUserNsManager(kl userNsPodsManager) (*UsernsManager, error) { // recordPodMappings registers the range used for the user namespace if the // usernsConfFile exists in the pod directory. -func (m *UsernsManager) recordPodMappings(pod types.UID) error { +func (m *UsernsManager) recordPodMappings(logger klog.Logger, pod types.UID) error { content, err := m.readMappingsFromFile(pod) if err != nil && err != utilstore.ErrKeyNotFound { return err @@ -201,7 +202,7 @@ func (m *UsernsManager) recordPodMappings(pod types.UID) error { return nil } - _, err = m.parseUserNsFileAndRecord(pod, content) + _, err = m.parseUserNsFileAndRecord(logger, pod, content) return err } @@ -217,7 +218,7 @@ func (m *UsernsManager) isSet(v uint32) bool { // allocateOne finds a free user namespace and allocate it to the specified pod. // The first return value is the first ID in the user namespace, the second returns // the length for the user namespace range. -func (m *UsernsManager) allocateOne(pod types.UID) (firstID uint32, length uint32, err error) { +func (m *UsernsManager) allocateOne(logger klog.Logger, pod types.UID) (firstID uint32, length uint32, err error) { firstZero, found, err := m.used.AllocateNext() if err != nil { return 0, 0, err @@ -226,7 +227,7 @@ func (m *UsernsManager) allocateOne(pod types.UID) (firstID uint32, length uint3 return 0, 0, fmt.Errorf("could not find an empty slot to allocate a user namespace") } - klog.V(5).InfoS("new pod user namespace allocation", "podUID", pod) + logger.V(5).Info("new pod user namespace allocation", "podUID", pod) firstID = uint32((firstZero + m.off)) * m.userNsLength m.usedBy[pod] = firstID @@ -234,7 +235,7 @@ func (m *UsernsManager) allocateOne(pod types.UID) (firstID uint32, length uint3 } // record stores the user namespace [from; from+length] to the specified pod. -func (m *UsernsManager) record(pod types.UID, from, length uint32) (err error) { +func (m *UsernsManager) record(logger klog.Logger, pod types.UID, from, length uint32) (err error) { if length != m.userNsLength { return fmt.Errorf("wrong user namespace length %v", length) } @@ -258,7 +259,7 @@ func (m *UsernsManager) record(pod types.UID, from, length uint32) (err error) { return nil } - klog.V(5).InfoS("new pod user namespace allocation", "podUID", pod) + logger.V(5).Info("new pod user namespace allocation", "podUID", pod) // "from" is a ID (UID/GID), set the corresponding userns of size // userNsLength in the bit-array. @@ -268,7 +269,7 @@ func (m *UsernsManager) record(pod types.UID, from, length uint32) (err error) { } // Release releases the user namespace allocated to the specified pod. -func (m *UsernsManager) Release(podUID types.UID) { +func (m *UsernsManager) Release(logger klog.Logger, podUID types.UID) { if !utilfeature.DefaultFeatureGate.Enabled(features.UserNamespacesSupport) { return } @@ -276,7 +277,7 @@ func (m *UsernsManager) Release(podUID types.UID) { m.lock.Lock() defer m.lock.Unlock() - m.releaseWithLock(podUID) + m.releaseWithLock(logger, podUID) } // podAllocated returns true if the pod is allocated, false otherwise. @@ -292,15 +293,15 @@ func (m *UsernsManager) podAllocated(podUID types.UID) bool { return ok } -func (m *UsernsManager) releaseWithLock(pod types.UID) { +func (m *UsernsManager) releaseWithLock(logger klog.Logger, pod types.UID) { v, ok := m.usedBy[pod] if !ok { - klog.V(5).InfoS("pod user namespace allocation not present", "podUID", pod) + logger.V(5).Info("pod user namespace allocation not present", "podUID", pod) return } delete(m.usedBy, pod) - klog.V(5).InfoS("releasing pod user namespace allocation", "podUID", pod) + logger.V(5).Info("releasing pod user namespace allocation", "podUID", pod) m.removed++ _ = os.Remove(filepath.Join(m.kl.GetPodDir(pod), mappingsFile)) @@ -316,7 +317,7 @@ func (m *UsernsManager) releaseWithLock(pod types.UID) { _ = m.used.Release(int(v/m.userNsLength) - m.off) } -func (m *UsernsManager) parseUserNsFileAndRecord(pod types.UID, content []byte) (userNs userNamespace, err error) { +func (m *UsernsManager) parseUserNsFileAndRecord(logger klog.Logger, pod types.UID, content []byte) (userNs userNamespace, err error) { if err = json.Unmarshal([]byte(content), &userNs); err != nil { err = fmt.Errorf("invalid user namespace mappings file: %w", err) return @@ -352,19 +353,19 @@ func (m *UsernsManager) parseUserNsFileAndRecord(pod types.UID, content []byte) hostId := userNs.UIDMappings[0].HostId length := userNs.UIDMappings[0].Length - err = m.record(pod, hostId, length) + err = m.record(logger, pod, hostId, length) return } -func (m *UsernsManager) createUserNs(pod *v1.Pod) (userNs userNamespace, err error) { - firstID, length, err := m.allocateOne(pod.UID) +func (m *UsernsManager) createUserNs(logger klog.Logger, pod *v1.Pod) (userNs userNamespace, err error) { + firstID, length, err := m.allocateOne(logger, pod.UID) if err != nil { return } defer func() { if err != nil { - m.releaseWithLock(pod.UID) + m.releaseWithLock(logger, pod.UID) } }() @@ -389,7 +390,8 @@ func (m *UsernsManager) createUserNs(pod *v1.Pod) (userNs userNamespace, err err } // GetOrCreateUserNamespaceMappings returns the configuration for the sandbox user namespace -func (m *UsernsManager) GetOrCreateUserNamespaceMappings(pod *v1.Pod, runtimeHandler string) (*runtimeapi.UserNamespace, error) { +func (m *UsernsManager) GetOrCreateUserNamespaceMappings(ctx context.Context, pod *v1.Pod, runtimeHandler string) (*runtimeapi.UserNamespace, error) { + logger := klog.FromContext(ctx) featureEnabled := utilfeature.DefaultFeatureGate.Enabled(features.UserNamespacesSupport) // TODO: If the default value for hostUsers ever changes, change the default value of @@ -438,12 +440,12 @@ func (m *UsernsManager) GetOrCreateUserNamespaceMappings(pod *v1.Pod, runtimeHan var userNs userNamespace if string(content) != "" { - userNs, err = m.parseUserNsFileAndRecord(pod.UID, content) + userNs, err = m.parseUserNsFileAndRecord(logger, pod.UID, content) if err != nil { return nil, fmt.Errorf("user namespace: %w", err) } } else { - userNs, err = m.createUserNs(pod) + userNs, err = m.createUserNs(logger, pod) if err != nil { return nil, fmt.Errorf("create user namespace: %w", err) } @@ -477,10 +479,11 @@ func (m *UsernsManager) GetOrCreateUserNamespaceMappings(pod *v1.Pod, runtimeHan // CleanupOrphanedPodUsernsAllocations reconciliates the state of user namespace // allocations with the pods actually running. It frees any user namespace // allocation for orphaned pods. -func (m *UsernsManager) CleanupOrphanedPodUsernsAllocations(pods []*v1.Pod, runningPods []*kubecontainer.Pod) error { +func (m *UsernsManager) CleanupOrphanedPodUsernsAllocations(ctx context.Context, pods []*v1.Pod, runningPods []*kubecontainer.Pod) error { if !utilfeature.DefaultFeatureGate.Enabled(features.UserNamespacesSupport) { return nil } + logger := klog.FromContext(ctx) m.lock.Lock() defer m.lock.Unlock() @@ -509,8 +512,8 @@ func (m *UsernsManager) CleanupOrphanedPodUsernsAllocations(pods []*v1.Pod, runn continue } - klog.V(5).InfoS("Clean up orphaned pod user namespace possible allocation", "podUID", podUID) - m.releaseWithLock(podUID) + logger.V(5).Info("Clean up orphaned pod user namespace possible allocation", "podUID", podUID) + m.releaseWithLock(logger, podUID) } // Lets remove any existing allocation for a pod that is not "found". @@ -519,8 +522,8 @@ func (m *UsernsManager) CleanupOrphanedPodUsernsAllocations(pods []*v1.Pod, runn continue } - klog.V(5).InfoS("Clean up orphaned pod user namespace possible allocation", "podUID", podUID) - m.releaseWithLock(podUID) + logger.V(5).Info("Clean up orphaned pod user namespace possible allocation", "podUID", podUID) + m.releaseWithLock(logger, podUID) } return nil diff --git a/pkg/kubelet/userns/userns_manager_disabled_test.go b/pkg/kubelet/userns/userns_manager_disabled_test.go index a4099d0a79dc4..b5e66737bf086 100644 --- a/pkg/kubelet/userns/userns_manager_disabled_test.go +++ b/pkg/kubelet/userns/userns_manager_disabled_test.go @@ -28,26 +28,29 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" featuregatetesting "k8s.io/component-base/featuregate/testing" pkgfeatures "k8s.io/kubernetes/pkg/features" + "k8s.io/kubernetes/test/utils/ktesting" ) // Test all public methods behave ok when the feature gate is disabled. func TestMakeUserNsManagerDisabled(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.UserNamespacesSupport, false) testUserNsPodsManager := &testUserNsPodsManager{} - _, err := MakeUserNsManager(testUserNsPodsManager) + _, err := MakeUserNsManager(logger, testUserNsPodsManager) assert.NoError(t, err) } func TestReleaseDisabled(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.UserNamespacesSupport, false) testUserNsPodsManager := &testUserNsPodsManager{} - m, err := MakeUserNsManager(testUserNsPodsManager) + m, err := MakeUserNsManager(logger, testUserNsPodsManager) require.NoError(t, err) - m.Release("some-pod") + m.Release(logger, "some-pod") } func TestGetOrCreateUserNamespaceMappingsDisabled(t *testing.T) { @@ -95,11 +98,12 @@ func TestGetOrCreateUserNamespaceMappingsDisabled(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { + logger, ctx := ktesting.NewTestContext(t) testUserNsPodsManager := &testUserNsPodsManager{} - m, err := MakeUserNsManager(testUserNsPodsManager) + m, err := MakeUserNsManager(logger, testUserNsPodsManager) require.NoError(t, err) - userns, err := m.GetOrCreateUserNamespaceMappings(test.pod, "") + userns, err := m.GetOrCreateUserNamespaceMappings(ctx, test.pod, "") assert.Nil(t, userns) if test.success { assert.NoError(t, err) @@ -111,12 +115,13 @@ func TestGetOrCreateUserNamespaceMappingsDisabled(t *testing.T) { } func TestCleanupOrphanedPodUsernsAllocationsDisabled(t *testing.T) { + logger, ctx := ktesting.NewTestContext(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.UserNamespacesSupport, false) testUserNsPodsManager := &testUserNsPodsManager{} - m, err := MakeUserNsManager(testUserNsPodsManager) + m, err := MakeUserNsManager(logger, testUserNsPodsManager) require.NoError(t, err) - err = m.CleanupOrphanedPodUsernsAllocations(nil, nil) + err = m.CleanupOrphanedPodUsernsAllocations(ctx, nil, nil) assert.NoError(t, err) } diff --git a/pkg/kubelet/userns/userns_manager_switch_test.go b/pkg/kubelet/userns/userns_manager_switch_test.go index 233b5c7fab32d..0cd8090276e52 100644 --- a/pkg/kubelet/userns/userns_manager_switch_test.go +++ b/pkg/kubelet/userns/userns_manager_switch_test.go @@ -30,9 +30,11 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" featuregatetesting "k8s.io/component-base/featuregate/testing" pkgfeatures "k8s.io/kubernetes/pkg/features" + "k8s.io/kubernetes/test/utils/ktesting" ) func TestMakeUserNsManagerSwitch(t *testing.T) { + logger, ctx := ktesting.NewTestContext(t) // Create the manager with the feature gate enabled, to record some pods on disk. featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.UserNamespacesSupport, true) @@ -44,20 +46,20 @@ func TestMakeUserNsManagerSwitch(t *testing.T) { // manager, it will find these pods on disk with userns data. podList: pods, } - m, err := MakeUserNsManager(testUserNsPodsManager) + m, err := MakeUserNsManager(logger, testUserNsPodsManager) require.NoError(t, err) // Record the pods on disk. for _, podUID := range pods { pod := v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}} - _, err := m.GetOrCreateUserNamespaceMappings(&pod, "") + _, err := m.GetOrCreateUserNamespaceMappings(ctx, &pod, "") require.NoError(t, err, "failed to record userns range for pod %v", podUID) } // Test re-init works when the feature gate is disabled and there were some // pods written on disk. featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.UserNamespacesSupport, false) - m2, err := MakeUserNsManager(testUserNsPodsManager) + m2, err := MakeUserNsManager(logger, testUserNsPodsManager) require.NoError(t, err) // The feature gate is off, no pods should be allocated. @@ -68,6 +70,7 @@ func TestMakeUserNsManagerSwitch(t *testing.T) { } func TestGetOrCreateUserNamespaceMappingsSwitch(t *testing.T) { + logger, ctx := ktesting.NewTestContext(t) // Enable the feature gate to create some pods on disk. featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.UserNamespacesSupport, true) @@ -79,13 +82,13 @@ func TestGetOrCreateUserNamespaceMappingsSwitch(t *testing.T) { // manager, it will find these pods on disk with userns data. podList: pods, } - m, err := MakeUserNsManager(testUserNsPodsManager) + m, err := MakeUserNsManager(logger, testUserNsPodsManager) require.NoError(t, err) // Record the pods on disk. for _, podUID := range pods { pod := v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}} - _, err := m.GetOrCreateUserNamespaceMappings(&pod, "") + _, err := m.GetOrCreateUserNamespaceMappings(ctx, &pod, "") require.NoError(t, err, "failed to record userns range for pod %v", podUID) } @@ -93,12 +96,12 @@ func TestGetOrCreateUserNamespaceMappingsSwitch(t *testing.T) { // pods registered on disk. featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.UserNamespacesSupport, false) // Create a new manager with the feature gate off and verify the userns range is nil. - m2, err := MakeUserNsManager(testUserNsPodsManager) + m2, err := MakeUserNsManager(logger, testUserNsPodsManager) require.NoError(t, err) for _, podUID := range pods { pod := v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}} - userns, err := m2.GetOrCreateUserNamespaceMappings(&pod, "") + userns, err := m2.GetOrCreateUserNamespaceMappings(ctx, &pod, "") assert.NoError(t, err, "failed to record userns range for pod %v", podUID) assert.Nil(t, userns, "userns range should be nil for pod %v", podUID) @@ -106,6 +109,7 @@ func TestGetOrCreateUserNamespaceMappingsSwitch(t *testing.T) { } func TestCleanupOrphanedPodUsernsAllocationsSwitch(t *testing.T) { + logger, ctx := ktesting.NewTestContext(t) // Enable the feature gate to create some pods on disk. featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.UserNamespacesSupport, true) @@ -116,20 +120,20 @@ func TestCleanupOrphanedPodUsernsAllocationsSwitch(t *testing.T) { podList: listPods, } - m, err := MakeUserNsManager(testUserNsPodsManager) + m, err := MakeUserNsManager(logger, testUserNsPodsManager) require.NoError(t, err) // Record the pods on disk. for _, podUID := range pods { pod := v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}} - _, err := m.GetOrCreateUserNamespaceMappings(&pod, "") + _, err := m.GetOrCreateUserNamespaceMappings(ctx, &pod, "") require.NoError(t, err, "failed to record userns range for pod %v", podUID) } // Test cleanup works when the feature gate is disabled and there were some // pods registered. featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.UserNamespacesSupport, false) - err = m.CleanupOrphanedPodUsernsAllocations(nil, nil) + err = m.CleanupOrphanedPodUsernsAllocations(ctx, nil, nil) require.NoError(t, err) // The feature gate is off, no pods should be allocated. diff --git a/pkg/kubelet/userns/userns_manager_test.go b/pkg/kubelet/userns/userns_manager_test.go index 206c8f4f1fec5..1df4c7979fde1 100644 --- a/pkg/kubelet/userns/userns_manager_test.go +++ b/pkg/kubelet/userns/userns_manager_test.go @@ -35,6 +35,7 @@ import ( runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" pkgfeatures "k8s.io/kubernetes/pkg/features" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/test/utils/ktesting" ) const ( @@ -100,6 +101,7 @@ func (m *testUserNsPodsManager) GetUserNamespacesIDsPerPod() uint32 { } func TestUserNsManagerAllocate(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.UserNamespacesSupport, true) customUserNsLength := uint32(1048576) @@ -131,34 +133,34 @@ func TestUserNsManagerAllocate(t *testing.T) { mappingFirstID: tc.mappingFirstID, mappingLen: tc.mappingLen, } - m, err := MakeUserNsManager(testUserNsPodsManager) + m, err := MakeUserNsManager(logger, testUserNsPodsManager) require.NoError(t, err) - allocated, length, err := m.allocateOne("one") + allocated, length, err := m.allocateOne(logger, "one") require.NoError(t, err) assert.Equal(t, tc.userNsLength, length, "m.isSet(%d).length=%v", allocated, length) assert.True(t, m.isSet(allocated), "m.isSet(%d)", allocated) - allocated2, length2, err := m.allocateOne("two") + allocated2, length2, err := m.allocateOne(logger, "two") require.NoError(t, err) assert.NotEqual(t, allocated, allocated2, "allocated != allocated2") assert.Equal(t, length, length2, "length == length2") // verify that re-adding the same pod with the same settings won't fail - err = m.record("two", allocated2, length2) + err = m.record(logger, "two", allocated2, length2) require.NoError(t, err) // but it fails if anyting is different - err = m.record("two", allocated2+1, length2) + err = m.record(logger, "two", allocated2+1, length2) require.Error(t, err) - m.Release("one") - m.Release("two") + m.Release(logger, "one") + m.Release(logger, "two") assert.False(t, m.isSet(allocated), "m.isSet(%d)", allocated) assert.False(t, m.isSet(allocated2), "m.nsSet(%d)", allocated2) var allocs []uint32 for i := 0; i < 1000; i++ { - allocated, length, err = m.allocateOne(types.UID(fmt.Sprintf("%d", i))) + allocated, length, err = m.allocateOne(logger, types.UID(fmt.Sprintf("%d", i))) assert.Equal(t, tc.userNsLength, length, "length is not the expected. iter: %v", i) require.NoError(t, err) assert.GreaterOrEqual(t, allocated, tc.mappingFirstID) @@ -168,12 +170,12 @@ func TestUserNsManagerAllocate(t *testing.T) { } for i, v := range allocs { assert.True(t, m.isSet(v), "m.isSet(%d) should be true", v) - m.Release(types.UID(fmt.Sprintf("%d", i))) + m.Release(logger, types.UID(fmt.Sprintf("%d", i))) assert.False(t, m.isSet(v), "m.isSet(%d) should be false", v) - err = m.record(types.UID(fmt.Sprintf("%d", i)), v, tc.userNsLength) + err = m.record(logger, types.UID(fmt.Sprintf("%d", i)), v, tc.userNsLength) require.NoError(t, err) - m.Release(types.UID(fmt.Sprintf("%d", i))) + m.Release(logger, types.UID(fmt.Sprintf("%d", i))) assert.False(t, m.isSet(v), "m.isSet(%d) should be false", v) } }) @@ -181,6 +183,7 @@ func TestUserNsManagerAllocate(t *testing.T) { } func TestMakeUserNsManager(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.UserNamespacesSupport, true) cases := []struct { @@ -223,7 +226,7 @@ func TestMakeUserNsManager(t *testing.T) { mappingLen: tc.mappingLen, maxPods: tc.maxPods, } - _, err := MakeUserNsManager(testUserNsPodsManager) + _, err := MakeUserNsManager(logger, testUserNsPodsManager) if tc.success { assert.NoError(t, err) @@ -235,6 +238,7 @@ func TestMakeUserNsManager(t *testing.T) { } func TestUserNsManagerParseUserNsFile(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.UserNamespacesSupport, true) cases := []struct { @@ -301,13 +305,13 @@ func TestUserNsManagerParseUserNsFile(t *testing.T) { } testUserNsPodsManager := &testUserNsPodsManager{} - m, err := MakeUserNsManager(testUserNsPodsManager) + m, err := MakeUserNsManager(logger, testUserNsPodsManager) assert.NoError(t, err) for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { // We don't validate the result. It was parsed with the json parser, we trust that. - _, err = m.parseUserNsFileAndRecord(types.UID(tc.name), []byte(tc.file)) + _, err = m.parseUserNsFileAndRecord(logger, types.UID(tc.name), []byte(tc.file)) if (tc.success && err == nil) || (!tc.success && err != nil) { return } @@ -392,10 +396,11 @@ func TestGetOrCreateUserNamespaceMappings(t *testing.T) { podDir: t.TempDir(), userns: tc.runtimeUserns, } - m, err := MakeUserNsManager(testUserNsPodsManager) + logger, ctx := ktesting.NewTestContext(t) + m, err := MakeUserNsManager(logger, testUserNsPodsManager) assert.NoError(t, err) - userns, err := m.GetOrCreateUserNamespaceMappings(tc.pod, tc.runtimeHandler) + userns, err := m.GetOrCreateUserNamespaceMappings(ctx, tc.pod, tc.runtimeHandler) if (tc.success && err != nil) || (!tc.success && err == nil) { t.Errorf("expected success: %v but got error: %v", tc.success, err) } @@ -408,6 +413,7 @@ func TestGetOrCreateUserNamespaceMappings(t *testing.T) { } func TestCleanupOrphanedPodUsernsAllocations(t *testing.T) { + logger, ctx := ktesting.NewTestContext(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.UserNamespacesSupport, true) cases := []struct { @@ -464,16 +470,16 @@ func TestCleanupOrphanedPodUsernsAllocations(t *testing.T) { podDir: t.TempDir(), podList: tc.listPods, } - m, err := MakeUserNsManager(testUserNsPodsManager) + m, err := MakeUserNsManager(logger, testUserNsPodsManager) require.NoError(t, err) // Record the userns range as used for i, pod := range tc.podSetBeforeCleanup { - err := m.record(pod, uint32((i+1)*65536), 65536) + err := m.record(logger, pod, uint32((i+1)*65536), 65536) require.NoError(t, err) } - err = m.CleanupOrphanedPodUsernsAllocations(tc.pods, tc.runningPods) + err = m.CleanupOrphanedPodUsernsAllocations(ctx, tc.pods, tc.runningPods) require.NoError(t, err) for _, pod := range tc.podSetAfterCleanup { @@ -498,15 +504,17 @@ func (m *failingUserNsPodsManager) ListPodsFromDisk() ([]types.UID, error) { } func TestMakeUserNsManagerFailsListPod(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.UserNamespacesSupport, true) testUserNsPodsManager := &failingUserNsPodsManager{} - _, err := MakeUserNsManager(testUserNsPodsManager) + _, err := MakeUserNsManager(logger, testUserNsPodsManager) assert.Error(t, err) assert.ErrorContains(t, err, "read pods from disk") } func TestRecordBounds(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.UserNamespacesSupport, true) // Allow exactly for 1 pod @@ -515,15 +523,15 @@ func TestRecordBounds(t *testing.T) { mappingLen: 65536, maxPods: 1, } - m, err := MakeUserNsManager(testUserNsPodsManager) + m, err := MakeUserNsManager(logger, testUserNsPodsManager) require.NoError(t, err) // The first pod allocation should succeed. - err = m.record(types.UID(fmt.Sprintf("%d", 0)), 65536, 65536) + err = m.record(logger, types.UID(fmt.Sprintf("%d", 0)), 65536, 65536) require.NoError(t, err) // The next allocation should fail, as there is no space left. - err = m.record(types.UID(fmt.Sprintf("%d", 2)), uint32(2*65536), 65536) + err = m.record(logger, types.UID(fmt.Sprintf("%d", 2)), uint32(2*65536), 65536) assert.Error(t, err) assert.ErrorContains(t, err, "out of range") } diff --git a/pkg/kubelet/userns/userns_manager_windows.go b/pkg/kubelet/userns/userns_manager_windows.go index bc40b7187987f..4620842c1569e 100644 --- a/pkg/kubelet/userns/userns_manager_windows.go +++ b/pkg/kubelet/userns/userns_manager_windows.go @@ -17,31 +17,34 @@ limitations under the License. package userns import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "k8s.io/klog/v2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) type UsernsManager struct{} -func MakeUserNsManager(kl userNsPodsManager) (*UsernsManager, error) { +func MakeUserNsManager(klog.Logger, userNsPodsManager) (*UsernsManager, error) { return nil, nil } // Release releases the user namespace allocated to the specified pod. -func (m *UsernsManager) Release(podUID types.UID) { +func (m *UsernsManager) Release(klog.Logger, types.UID) { return } -func (m *UsernsManager) GetOrCreateUserNamespaceMappings(pod *v1.Pod, runtimeHandler string) (*runtimeapi.UserNamespace, error) { +func (m *UsernsManager) GetOrCreateUserNamespaceMappings(context.Context, *v1.Pod, string) (*runtimeapi.UserNamespace, error) { return nil, nil } // CleanupOrphanedPodUsernsAllocations reconciliates the state of user namespace // allocations with the pods actually running. It frees any user namespace // allocation for orphaned pods. -func (m *UsernsManager) CleanupOrphanedPodUsernsAllocations(pods []*v1.Pod, runningPods []*kubecontainer.Pod) error { +func (m *UsernsManager) CleanupOrphanedPodUsernsAllocations(context.Context, []*v1.Pod, []*kubecontainer.Pod) error { return nil } diff --git a/pkg/kubelet/util/boottime_util_linux.go b/pkg/kubelet/util/boottime_util_linux.go index 935b3d80341b6..67c9b191cfe7d 100644 --- a/pkg/kubelet/util/boottime_util_linux.go +++ b/pkg/kubelet/util/boottime_util_linux.go @@ -20,6 +20,7 @@ limitations under the License. package util import ( + "context" "fmt" "os" "strconv" @@ -36,7 +37,10 @@ import ( func GetBootTime() (time.Time, error) { bootTime, err := getBootTimeWithProcStat() if err != nil { - klog.InfoS("Failed to get boot time from /proc/uptime. Will retry with unix.Sysinfo.", "error", err) + // TODO: it needs to be replaced by a proper context in the future + ctx := context.TODO() + logger := klog.FromContext(ctx) + logger.Info("Failed to get boot time from /proc/uptime. Will retry with unix.Sysinfo.", "error", err) return getBootTimeWithSysinfo() } return bootTime, nil diff --git a/pkg/kubelet/util/manager/cache_based_manager_test.go b/pkg/kubelet/util/manager/cache_based_manager_test.go index 6f27712bc1dd7..38e174651a65d 100644 --- a/pkg/kubelet/util/manager/cache_based_manager_test.go +++ b/pkg/kubelet/util/manager/cache_based_manager_test.go @@ -37,6 +37,7 @@ import ( "k8s.io/client-go/kubernetes/fake" core "k8s.io/client-go/testing" podutil "k8s.io/kubernetes/pkg/api/v1/pod" + "k8s.io/kubernetes/test/utils/ktesting" "k8s.io/utils/clock" testingclock "k8s.io/utils/clock/testing" @@ -57,15 +58,15 @@ func noObjectTTL() (time.Duration, bool) { return time.Duration(0), false } -func getSecret(fakeClient clientset.Interface) GetObjectFunc { +func getSecret(ctx context.Context, fakeClient clientset.Interface) GetObjectFunc { return func(namespace, name string, opts metav1.GetOptions) (runtime.Object, error) { - return fakeClient.CoreV1().Secrets(namespace).Get(context.TODO(), name, opts) + return fakeClient.CoreV1().Secrets(namespace).Get(ctx, name, opts) } } -func newSecretStore(fakeClient clientset.Interface, clock clock.Clock, getTTL GetObjectTTLFunc, ttl time.Duration) *objectStore { +func newSecretStore(ctx context.Context, fakeClient clientset.Interface, clock clock.Clock, getTTL GetObjectTTLFunc, ttl time.Duration) *objectStore { return &objectStore{ - getObject: getSecret(fakeClient), + getObject: getSecret(ctx, fakeClient), clock: clock, items: make(map[objectKey]*objectStoreItem), defaultTTL: ttl, @@ -87,8 +88,9 @@ func newCacheBasedSecretManager(store Store) Manager { } func TestSecretStore(t *testing.T) { + tCtx := ktesting.Init(t) fakeClient := &fake.Clientset{} - store := newSecretStore(fakeClient, clock.RealClock{}, noObjectTTL, 0) + store := newSecretStore(tCtx, fakeClient, clock.RealClock{}, noObjectTTL, 0) store.AddReference("ns1", "name1", "pod1") store.AddReference("ns2", "name2", "pod2") store.AddReference("ns1", "name1", "pod3") @@ -121,8 +123,9 @@ func TestSecretStore(t *testing.T) { } func TestSecretStoreDeletingSecret(t *testing.T) { + tCtx := ktesting.Init(t) fakeClient := &fake.Clientset{} - store := newSecretStore(fakeClient, clock.RealClock{}, noObjectTTL, 0) + store := newSecretStore(tCtx, fakeClient, clock.RealClock{}, noObjectTTL, 0) store.AddReference("ns", "name", "pod") result := &v1.Secret{ObjectMeta: metav1.ObjectMeta{Namespace: "ns", Name: "name", ResourceVersion: "10"}} @@ -150,9 +153,10 @@ func TestSecretStoreDeletingSecret(t *testing.T) { } func TestSecretStoreGetAlwaysRefresh(t *testing.T) { + tCtx := ktesting.Init(t) fakeClient := &fake.Clientset{} fakeClock := testingclock.NewFakeClock(time.Now()) - store := newSecretStore(fakeClient, fakeClock, noObjectTTL, 0) + store := newSecretStore(tCtx, fakeClient, fakeClock, noObjectTTL, 0) for i := 0; i < 10; i++ { store.AddReference(fmt.Sprintf("ns-%d", i), fmt.Sprintf("name-%d", i), types.UID(fmt.Sprintf("pod-%d", i))) @@ -177,9 +181,10 @@ func TestSecretStoreGetAlwaysRefresh(t *testing.T) { } func TestSecretStoreGetNeverRefresh(t *testing.T) { + tCtx := ktesting.Init(t) fakeClient := &fake.Clientset{} fakeClock := testingclock.NewFakeClock(time.Now()) - store := newSecretStore(fakeClient, fakeClock, noObjectTTL, time.Minute) + store := newSecretStore(tCtx, fakeClient, fakeClock, noObjectTTL, time.Minute) for i := 0; i < 10; i++ { store.AddReference(fmt.Sprintf("ns-%d", i), fmt.Sprintf("name-%d", i), types.UID(fmt.Sprintf("pod-%d", i))) @@ -207,9 +212,10 @@ func TestCustomTTL(t *testing.T) { return ttl, ttlExists } + tCtx := ktesting.Init(t) fakeClient := &fake.Clientset{} fakeClock := testingclock.NewFakeClock(time.Time{}) - store := newSecretStore(fakeClient, fakeClock, customTTL, time.Minute) + store := newSecretStore(tCtx, fakeClient, fakeClock, customTTL, time.Minute) store.AddReference("ns", "name", "pod") store.Get("ns", "name") @@ -383,9 +389,10 @@ func podWithSecretsAndUID(ns, podName, podUID string, toAttach secretsToAttach) } func TestCacheInvalidation(t *testing.T) { + tCtx := ktesting.Init(t) fakeClient := &fake.Clientset{} fakeClock := testingclock.NewFakeClock(time.Now()) - store := newSecretStore(fakeClient, fakeClock, noObjectTTL, time.Minute) + store := newSecretStore(tCtx, fakeClient, fakeClock, noObjectTTL, time.Minute) manager := newCacheBasedSecretManager(store) // Create a pod with some secrets. @@ -438,9 +445,10 @@ func TestCacheInvalidation(t *testing.T) { } func TestResourceContentExpired(t *testing.T) { + tCtx := ktesting.Init(t) fakeClient := &fake.Clientset{} fakeClock := testingclock.NewFakeClock(time.Now()) - store := newSecretStore(fakeClient, fakeClock, noObjectTTL, time.Minute) + store := newSecretStore(tCtx, fakeClient, fakeClock, noObjectTTL, time.Minute) manager := newCacheBasedSecretManager(store) // Create a pod with some secrets. @@ -463,9 +471,10 @@ func TestResourceContentExpired(t *testing.T) { } func TestRegisterIdempotence(t *testing.T) { + tCtx := ktesting.Init(t) fakeClient := &fake.Clientset{} fakeClock := testingclock.NewFakeClock(time.Now()) - store := newSecretStore(fakeClient, fakeClock, noObjectTTL, time.Minute) + store := newSecretStore(tCtx, fakeClient, fakeClock, noObjectTTL, time.Minute) manager := newCacheBasedSecretManager(store) s1 := secretsToAttach{ @@ -498,9 +507,10 @@ func TestRegisterIdempotence(t *testing.T) { } func TestCacheRefcounts(t *testing.T) { + tCtx := ktesting.Init(t) fakeClient := &fake.Clientset{} fakeClock := testingclock.NewFakeClock(time.Now()) - store := newSecretStore(fakeClient, fakeClock, noObjectTTL, time.Minute) + store := newSecretStore(tCtx, fakeClient, fakeClock, noObjectTTL, time.Minute) manager := newCacheBasedSecretManager(store) s1 := secretsToAttach{ @@ -619,8 +629,9 @@ func TestCacheRefcounts(t *testing.T) { } func TestCacheBasedSecretManager(t *testing.T) { + tCtx := ktesting.Init(t) fakeClient := &fake.Clientset{} - store := newSecretStore(fakeClient, clock.RealClock{}, noObjectTTL, 0) + store := newSecretStore(tCtx, fakeClient, clock.RealClock{}, noObjectTTL, 0) manager := newCacheBasedSecretManager(store) // Create a pod with some secrets. diff --git a/pkg/kubelet/util/manager/watch_based_manager.go b/pkg/kubelet/util/manager/watch_based_manager.go index cbc42fa6bf1dc..5def888fbfe79 100644 --- a/pkg/kubelet/util/manager/watch_based_manager.go +++ b/pkg/kubelet/util/manager/watch_based_manager.go @@ -17,6 +17,7 @@ limitations under the License. package manager import ( + "context" "fmt" "sync" "time" @@ -343,7 +344,10 @@ func (c *objectCache) Get(namespace, name string) (runtime.Object, error) { if c.isImmutable(object) { item.setImmutable() if item.stop() { - klog.V(4).InfoS("Stopped watching for changes - object is immutable", "obj", klog.KRef(namespace, name)) + // TODO: it needs to be replaced by a proper context in the future + ctx := context.TODO() + logger := klog.FromContext(ctx) + logger.V(4).Info("Stopped watching for changes - object is immutable", "obj", klog.KRef(namespace, name)) } } return object, nil @@ -352,12 +356,15 @@ func (c *objectCache) Get(namespace, name string) (runtime.Object, error) { } func (c *objectCache) startRecycleIdleWatch() { + // TODO: it needs to be replaced by a proper context in the future + ctx := context.TODO() + logger := klog.FromContext(ctx) c.lock.Lock() defer c.lock.Unlock() for key, item := range c.items { if item.stopIfIdle(c.clock.Now(), c.maxIdleTime) { - klog.V(4).InfoS("Not acquired for long time, Stopped watching for changes", "objectKey", key, "maxIdleTime", c.maxIdleTime) + logger.V(4).Info("Not acquired for long time, Stopped watching for changes", "objectKey", key, "maxIdleTime", c.maxIdleTime) } } } diff --git a/pkg/kubelet/util/manager/watch_based_manager_test.go b/pkg/kubelet/util/manager/watch_based_manager_test.go index bebac3b04b22b..552cfb2b16074 100644 --- a/pkg/kubelet/util/manager/watch_based_manager_test.go +++ b/pkg/kubelet/util/manager/watch_based_manager_test.go @@ -45,15 +45,15 @@ import ( "github.com/stretchr/testify/assert" ) -func listSecret(fakeClient clientset.Interface) listObjectFunc { +func listSecret(ctx context.Context, fakeClient clientset.Interface) listObjectFunc { return func(namespace string, opts metav1.ListOptions) (runtime.Object, error) { - return fakeClient.CoreV1().Secrets(namespace).List(context.TODO(), opts) + return fakeClient.CoreV1().Secrets(namespace).List(ctx, opts) } } -func watchSecret(fakeClient clientset.Interface) watchObjectFunc { +func watchSecret(ctx context.Context, fakeClient clientset.Interface) watchObjectFunc { return func(namespace string, opts metav1.ListOptions) (watch.Interface, error) { - return fakeClient.CoreV1().Secrets(namespace).Watch(context.TODO(), opts) + return fakeClient.CoreV1().Secrets(namespace).Watch(ctx, opts) } } @@ -64,10 +64,10 @@ func isSecretImmutable(object runtime.Object) bool { return false } -func newSecretCache(fakeClient clientset.Interface, fakeClock clock.Clock, maxIdleTime time.Duration) *objectCache { +func newSecretCache(ctx context.Context, fakeClient clientset.Interface, fakeClock clock.Clock, maxIdleTime time.Duration) *objectCache { return &objectCache{ - listObject: listSecret(fakeClient), - watchObject: watchSecret(fakeClient), + listObject: listSecret(ctx, fakeClient), + watchObject: watchSecret(ctx, fakeClient), newObject: func() runtime.Object { return &v1.Secret{} }, isImmutable: isSecretImmutable, groupResource: corev1.Resource("secret"), @@ -78,6 +78,7 @@ func newSecretCache(fakeClient clientset.Interface, fakeClock clock.Clock, maxId } func TestSecretCache(t *testing.T) { + tCtx := ktesting.Init(t) fakeClient := &fake.Clientset{} listReactor := func(a core.Action) (bool, runtime.Object, error) { @@ -93,7 +94,7 @@ func TestSecretCache(t *testing.T) { fakeClient.AddWatchReactor("secrets", core.DefaultWatchReactor(fakeWatch, nil)) fakeClock := testingclock.NewFakeClock(time.Now()) - store := newSecretCache(fakeClient, fakeClock, time.Minute) + store := newSecretCache(tCtx, fakeClient, fakeClock, time.Minute) store.AddReference("ns", "name", "pod") _, err := store.Get("ns", "name") @@ -121,7 +122,6 @@ func TestSecretCache(t *testing.T) { return true, nil } - tCtx := ktesting.Init(t) if err := wait.PollUntilContextCancel(tCtx, 10*time.Millisecond, true, getFn); err != nil { t.Errorf("unexpected error: %v", err) } @@ -152,6 +152,7 @@ func TestSecretCache(t *testing.T) { } func TestSecretCacheMultipleRegistrations(t *testing.T) { + tCtx := ktesting.Init(t) fakeClient := &fake.Clientset{} listReactor := func(a core.Action) (bool, runtime.Object, error) { @@ -167,7 +168,7 @@ func TestSecretCacheMultipleRegistrations(t *testing.T) { fakeClient.AddWatchReactor("secrets", core.DefaultWatchReactor(fakeWatch, nil)) fakeClock := testingclock.NewFakeClock(time.Now()) - store := newSecretCache(fakeClient, fakeClock, time.Minute) + store := newSecretCache(tCtx, fakeClient, fakeClock, time.Minute) store.AddReference("ns", "name", "pod") // This should trigger List and Watch actions eventually. @@ -184,7 +185,6 @@ func TestSecretCacheMultipleRegistrations(t *testing.T) { } return true, nil } - tCtx := ktesting.Init(t) if err := wait.PollUntilContextCancel(tCtx, 10*time.Millisecond, true, actionsFn); err != nil { t.Errorf("unexpected error: %v", err) } @@ -257,6 +257,7 @@ func TestImmutableSecretStopsTheReflector(t *testing.T) { for _, tc := range tests { t.Run(tc.desc, func(t *testing.T) { + tCtx := ktesting.Init(t) fakeClient := &fake.Clientset{} listReactor := func(a core.Action) (bool, runtime.Object, error) { result := &v1.SecretList{ @@ -274,7 +275,7 @@ func TestImmutableSecretStopsTheReflector(t *testing.T) { fakeClient.AddWatchReactor("secrets", core.DefaultWatchReactor(fakeWatch, nil)) fakeClock := testingclock.NewFakeClock(time.Now()) - store := newSecretCache(fakeClient, fakeClock, time.Minute) + store := newSecretCache(tCtx, fakeClient, fakeClock, time.Minute) key := objectKey{namespace: "ns", name: "name"} itemExists := func(_ context.Context) (bool, error) { @@ -295,7 +296,6 @@ func TestImmutableSecretStopsTheReflector(t *testing.T) { // AddReference should start reflector. store.AddReference("ns", "name", "pod") - tCtx := ktesting.Init(t) if err := wait.PollUntilContextCancel(tCtx, 10*time.Millisecond, false, itemExists); err != nil { t.Errorf("item wasn't added to cache") } @@ -340,6 +340,7 @@ func TestImmutableSecretStopsTheReflector(t *testing.T) { } func TestMaxIdleTimeStopsTheReflector(t *testing.T) { + tCtx := ktesting.Init(t) secret := &v1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: "name", @@ -364,7 +365,7 @@ func TestMaxIdleTimeStopsTheReflector(t *testing.T) { fakeWatch := watch.NewFake() fakeClient.AddWatchReactor("secrets", core.DefaultWatchReactor(fakeWatch, nil)) fakeClock := testingclock.NewFakeClock(time.Now()) - store := newSecretCache(fakeClient, fakeClock, time.Minute) + store := newSecretCache(tCtx, fakeClient, fakeClock, time.Minute) key := objectKey{namespace: "ns", name: "name"} itemExists := func(_ context.Context) (bool, error) { @@ -386,7 +387,6 @@ func TestMaxIdleTimeStopsTheReflector(t *testing.T) { // AddReference should start reflector. store.AddReference("ns", "name", "pod") - tCtx := ktesting.Init(t) if err := wait.PollUntilContextCancel(tCtx, 10*time.Millisecond, false, itemExists); err != nil { t.Errorf("item wasn't added to cache") } @@ -420,6 +420,7 @@ func TestMaxIdleTimeStopsTheReflector(t *testing.T) { } func TestReflectorNotStoppedOnSlowInitialization(t *testing.T) { + tCtx := ktesting.Init(t) secret := &v1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: "name", @@ -447,7 +448,7 @@ func TestReflectorNotStoppedOnSlowInitialization(t *testing.T) { fakeClient.AddReactor("list", "secrets", listReactor) fakeWatch := watch.NewFake() fakeClient.AddWatchReactor("secrets", core.DefaultWatchReactor(fakeWatch, nil)) - store := newSecretCache(fakeClient, fakeClock, time.Minute) + store := newSecretCache(tCtx, fakeClient, fakeClock, time.Minute) key := objectKey{namespace: "ns", name: "name"} itemExists := func(_ context.Context) (bool, error) { @@ -479,7 +480,6 @@ func TestReflectorNotStoppedOnSlowInitialization(t *testing.T) { // AddReference should start reflector. store.AddReference("ns", "name", "pod") - tCtx := ktesting.Init(t) if err := wait.PollUntilContextCancel(tCtx, 10*time.Millisecond, false, itemExists); err != nil { t.Errorf("item wasn't added to cache") } @@ -592,6 +592,7 @@ func TestRefMapHandlesReferencesCorrectly(t *testing.T) { } for _, tc := range tests { t.Run(tc.desc, func(t *testing.T) { + tCtx := ktesting.Init(t) fakeClient := &fake.Clientset{} listReactor := func(a core.Action) (bool, runtime.Object, error) { result := &v1.SecretList{ @@ -606,7 +607,7 @@ func TestRefMapHandlesReferencesCorrectly(t *testing.T) { fakeWatch := watch.NewFake() fakeClient.AddWatchReactor("secrets", core.DefaultWatchReactor(fakeWatch, nil)) fakeClock := testingclock.NewFakeClock(time.Now()) - store := newSecretCache(fakeClient, fakeClock, time.Minute) + store := newSecretCache(tCtx, fakeClient, fakeClock, time.Minute) for i, step := range tc.steps { expect := tc.expects[i] diff --git a/pkg/kubelet/util/nodelease.go b/pkg/kubelet/util/nodelease.go index 9e1b00b76242e..dc1fa6fc3e670 100644 --- a/pkg/kubelet/util/nodelease.go +++ b/pkg/kubelet/util/nodelease.go @@ -29,14 +29,14 @@ import ( // SetNodeOwnerFunc helps construct a newLeasePostProcessFunc which sets // a node OwnerReference to the given lease object -func SetNodeOwnerFunc(c clientset.Interface, nodeName string) func(lease *coordinationv1.Lease) error { +func SetNodeOwnerFunc(ctx context.Context, c clientset.Interface, nodeName string) func(lease *coordinationv1.Lease) error { return func(lease *coordinationv1.Lease) error { // Setting owner reference needs node's UID. Note that it is different from // kubelet.nodeRef.UID. When lease is initially created, it is possible that // the connection between master and node is not ready yet. So try to set // owner reference every time when renewing the lease, until successful. if len(lease.OwnerReferences) == 0 { - if node, err := c.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{}); err == nil { + if node, err := c.CoreV1().Nodes().Get(ctx, nodeName, metav1.GetOptions{}); err == nil { lease.OwnerReferences = []metav1.OwnerReference{ { APIVersion: corev1.SchemeGroupVersion.WithKind("Node").Version, @@ -46,7 +46,8 @@ func SetNodeOwnerFunc(c clientset.Interface, nodeName string) func(lease *coordi }, } } else { - klog.ErrorS(err, "Failed to get node when trying to set owner ref to the node lease", "node", klog.KRef("", nodeName)) + logger := klog.FromContext(ctx) + logger.Error(err, "Failed to get node when trying to set owner ref to the node lease", "node", klog.KRef("", nodeName)) return err } } diff --git a/pkg/kubelet/util/pod_startup_latency_tracker.go b/pkg/kubelet/util/pod_startup_latency_tracker.go index 3ab3d2aaae537..d972815a7817d 100644 --- a/pkg/kubelet/util/pod_startup_latency_tracker.go +++ b/pkg/kubelet/util/pod_startup_latency_tracker.go @@ -17,6 +17,7 @@ limitations under the License. package util import ( + "context" "sync" "time" @@ -97,11 +98,14 @@ func (p *basicPodStartupLatencyTracker) ObservedPodOnWatch(pod *v1.Pod, when tim } if hasPodStartedSLO(pod) { + // TODO: it needs to be replaced by a proper context in the future + ctx := context.TODO() + logger := klog.FromContext(ctx) podStartingDuration := when.Sub(pod.CreationTimestamp.Time) imagePullingDuration := state.lastFinishedPulling.Sub(state.firstStartedPulling) podStartSLOduration := (podStartingDuration - imagePullingDuration).Seconds() - klog.InfoS("Observed pod startup duration", + logger.Info("Observed pod startup duration", "pod", klog.KObj(pod), "podStartSLOduration", podStartSLOduration, "podStartE2EDuration", podStartingDuration, @@ -146,7 +150,9 @@ func (p *basicPodStartupLatencyTracker) RecordImageFinishedPulling(podUID types. return } - state.lastFinishedPulling = p.clock.Now() // Now is always grater than values from the past. + if !state.firstStartedPulling.IsZero() { + state.lastFinishedPulling = p.clock.Now() // Now is always grater than values from the past. + } } func (p *basicPodStartupLatencyTracker) RecordStatusUpdated(pod *v1.Pod) { @@ -168,8 +174,11 @@ func (p *basicPodStartupLatencyTracker) RecordStatusUpdated(pod *v1.Pod) { return } + // TODO: it needs to be replaced by a proper context in the future + ctx := context.TODO() + logger := klog.FromContext(ctx) if hasPodStartedSLO(pod) { - klog.V(3).InfoS("Mark when the pod was running for the first time", "pod", klog.KObj(pod), "rv", pod.ResourceVersion) + logger.V(3).Info("Mark when the pod was running for the first time", "pod", klog.KObj(pod), "rv", pod.ResourceVersion) state.observedRunningTime = p.clock.Now() } } diff --git a/pkg/kubelet/util/swap/swap_util.go b/pkg/kubelet/util/swap/swap_util.go index 20f0e45ef5ff4..f64232ad26fbb 100644 --- a/pkg/kubelet/util/swap/swap_util.go +++ b/pkg/kubelet/util/swap/swap_util.go @@ -18,6 +18,7 @@ package swap import ( "bytes" + "context" "errors" "os" sysruntime "runtime" @@ -42,6 +43,9 @@ var ( const TmpfsNoswapOption = "noswap" func IsTmpfsNoswapOptionSupported(mounter mount.Interface, mountPath string) bool { + // TODO: it needs to be replaced by a proper context in the future + ctx := context.TODO() + logger := klog.FromContext(ctx) isTmpfsNoswapOptionSupportedHelper := func() bool { if sysruntime.GOOS == "windows" { return false @@ -51,13 +55,13 @@ func IsTmpfsNoswapOptionSupported(mounter mount.Interface, mountPath string) boo // Turning off swap in unprivileged tmpfs mounts unsupported // https://github.com/torvalds/linux/blob/v6.8/mm/shmem.c#L4004-L4011 // https://github.com/kubernetes/kubernetes/issues/125137 - klog.InfoS("Running under a user namespace - tmpfs noswap is not supported") + logger.Info("Running under a user namespace - tmpfs noswap is not supported") return false } kernelVersion, err := utilkernel.GetVersion() if err != nil { - klog.ErrorS(err, "cannot determine kernel version, unable to determine is tmpfs noswap is supported") + logger.Error(err, "cannot determine kernel version, unable to determine is tmpfs noswap is supported") return false } @@ -66,31 +70,31 @@ func IsTmpfsNoswapOptionSupported(mounter mount.Interface, mountPath string) boo } if mountPath == "" { - klog.ErrorS(errors.New("mount path is empty, falling back to /tmp"), "") + logger.Error(errors.New("mount path is empty, falling back to /tmp"), "") } mountPath, err = os.MkdirTemp(mountPath, "tmpfs-noswap-test-") if err != nil { - klog.InfoS("error creating dir to test if tmpfs noswap is enabled. Assuming not supported", "mount path", mountPath, "error", err) + logger.Info("error creating dir to test if tmpfs noswap is enabled. Assuming not supported", "mount path", mountPath, "error", err) return false } defer func() { err = os.RemoveAll(mountPath) if err != nil { - klog.ErrorS(err, "error removing test tmpfs dir", "mount path", mountPath) + logger.Error(err, "error removing test tmpfs dir", "mount path", mountPath) } }() err = mounter.MountSensitiveWithoutSystemd("tmpfs", mountPath, "tmpfs", []string{TmpfsNoswapOption}, nil) if err != nil { - klog.InfoS("error mounting tmpfs with the noswap option. Assuming not supported", "error", err) + logger.Info("error mounting tmpfs with the noswap option. Assuming not supported", "error", err) return false } err = mounter.Unmount(mountPath) if err != nil { - klog.ErrorS(err, "error unmounting test tmpfs dir", "mount path", mountPath) + logger.Error(err, "error unmounting test tmpfs dir", "mount path", mountPath) } return true @@ -104,7 +108,7 @@ func IsTmpfsNoswapOptionSupported(mounter mount.Interface, mountPath string) boo } // gets /proc/swaps's content as an input, returns true if swap is enabled. -func isSwapOnAccordingToProcSwaps(procSwapsContent []byte) bool { +func isSwapOnAccordingToProcSwaps(logger klog.Logger, procSwapsContent []byte) bool { procSwapsContent = bytes.TrimSpace(procSwapsContent) // extra trailing \n procSwapsStr := string(procSwapsContent) procSwapsLines := strings.Split(procSwapsStr, "\n") @@ -112,7 +116,7 @@ func isSwapOnAccordingToProcSwaps(procSwapsContent []byte) bool { // If there is more than one line (table headers) in /proc/swaps then swap is enabled isSwapOn := len(procSwapsLines) > 1 if isSwapOn { - klog.InfoS("Swap is on", "/proc/swaps contents", procSwapsStr) + logger.Info("Swap is on", "/proc/swaps contents", procSwapsStr) } return isSwapOn @@ -127,18 +131,22 @@ func IsSwapOn() (bool, error) { return false, nil } + // TODO: it needs to be replaced by a proper context in the future + ctx := context.TODO() + logger := klog.FromContext(ctx) + const swapFilePath = "/proc/swaps" procSwapsContent, err := os.ReadFile(swapFilePath) if err != nil { if os.IsNotExist(err) { - klog.InfoS("File does not exist, assuming that swap is disabled", "path", swapFilePath) + logger.Info("File does not exist, assuming that swap is disabled", "path", swapFilePath) return false, nil } return false, err } - return isSwapOnAccordingToProcSwaps(procSwapsContent), nil + return isSwapOnAccordingToProcSwaps(logger, procSwapsContent), nil } swapOnOnce.Do(func() { diff --git a/pkg/kubelet/util/swap/swap_util_test.go b/pkg/kubelet/util/swap/swap_util_test.go index 611c464b70fdd..1fe5cbb210e5a 100644 --- a/pkg/kubelet/util/swap/swap_util_test.go +++ b/pkg/kubelet/util/swap/swap_util_test.go @@ -16,7 +16,12 @@ limitations under the License. package swap -import "testing" +import ( + "testing" + + "k8s.io/klog/v2" + "k8s.io/kubernetes/test/utils/ktesting" +) func TestIsSwapEnabled(t *testing.T) { testCases := []struct { @@ -54,10 +59,12 @@ Filename Type Size Used Priority expectedEnabled: false, }, } + tCtx := ktesting.Init(t) + logger := klog.FromContext(tCtx) for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - isEnabled := isSwapOnAccordingToProcSwaps([]byte(tc.procSwapsContent)) + isEnabled := isSwapOnAccordingToProcSwaps(logger, []byte(tc.procSwapsContent)) if isEnabled != tc.expectedEnabled { t.Errorf("expected %v, got %v", tc.expectedEnabled, isEnabled) } diff --git a/pkg/kubelet/volumemanager/cache/actual_state_of_world.go b/pkg/kubelet/volumemanager/cache/actual_state_of_world.go index ea5cf573da388..899d87da6ef1b 100644 --- a/pkg/kubelet/volumemanager/cache/actual_state_of_world.go +++ b/pkg/kubelet/volumemanager/cache/actual_state_of_world.go @@ -149,9 +149,9 @@ type ActualStateOfWorld interface { // current actual state of the world. GetMountedVolumesForPod(podName volumetypes.UniquePodName) []MountedVolume - // GetMountedVolumeForPodByOuterVolumeSpecName returns the volume and true if - // the given outerVolumeSpecName is mounted on the given pod. - GetMountedVolumeForPodByOuterVolumeSpecName(podName volumetypes.UniquePodName, outerVolumeSpecName string) (MountedVolume, bool) + // GetMountedVolumeForPod returns the volume and true if + // the given name is mounted on the given pod. + GetMountedVolumeForPod(podName volumetypes.UniquePodName, volumeName v1.UniqueVolumeName) (MountedVolume, bool) // GetPossiblyMountedVolumesForPod generates and returns a list of volumes for // the specified pod that either are attached and mounted or are "uncertain", @@ -356,12 +356,6 @@ type mountedPod struct { // /var/lib/kubelet/pods/{podUID}/volumes/{escapeQualifiedPluginName}/{volumeSpecName}/ volumeSpec *volume.Spec - // outerVolumeSpecName is the volume.Spec.Name() of the volume as referenced - // directly in the pod. If the volume was referenced through a persistent - // volume claim, this contains the volume.Spec.Name() of the persistent - // volume claim - outerVolumeSpecName string - // remountRequired indicates the underlying volume has been successfully // mounted to this pod but it should be remounted to reflect changes in the // referencing pod. @@ -484,7 +478,6 @@ func (asw *actualStateOfWorld) CheckAndMarkVolumeAsUncertainViaReconstruction(op volumeName := opts.VolumeName mounter := opts.Mounter blockVolumeMapper := opts.BlockVolumeMapper - outerVolumeSpecName := opts.OuterVolumeSpecName volumeGIDValue := opts.VolumeGIDVolume volumeSpec := opts.VolumeSpec @@ -493,7 +486,6 @@ func (asw *actualStateOfWorld) CheckAndMarkVolumeAsUncertainViaReconstruction(op podUID: podUID, mounter: mounter, blockVolumeMapper: blockVolumeMapper, - outerVolumeSpecName: outerVolumeSpecName, volumeGIDValue: volumeGIDValue, volumeSpec: volumeSpec, remountRequired: false, @@ -731,7 +723,6 @@ func (asw *actualStateOfWorld) AddPodToVolume(markVolumeOpts operationexecutor.M volumeName := markVolumeOpts.VolumeName mounter := markVolumeOpts.Mounter blockVolumeMapper := markVolumeOpts.BlockVolumeMapper - outerVolumeSpecName := markVolumeOpts.OuterVolumeSpecName volumeGIDValue := markVolumeOpts.VolumeGIDVolume volumeSpec := markVolumeOpts.VolumeSpec asw.Lock() @@ -760,7 +751,6 @@ func (asw *actualStateOfWorld) AddPodToVolume(markVolumeOpts operationexecutor.M podUID: podUID, mounter: mounter, blockVolumeMapper: blockVolumeMapper, - outerVolumeSpecName: outerVolumeSpecName, volumeGIDValue: volumeGIDValue, volumeSpec: volumeSpec, volumeMountStateForPod: markVolumeOpts.VolumeMountState, @@ -1102,15 +1092,14 @@ func (asw *actualStateOfWorld) GetMountedVolumesForPod( return mountedVolume } -func (asw *actualStateOfWorld) GetMountedVolumeForPodByOuterVolumeSpecName( - podName volumetypes.UniquePodName, outerVolumeSpecName string) (MountedVolume, bool) { +func (asw *actualStateOfWorld) GetMountedVolumeForPod( + podName volumetypes.UniquePodName, volumeName v1.UniqueVolumeName) (MountedVolume, bool) { asw.RLock() defer asw.RUnlock() - for _, volumeObj := range asw.attachedVolumes { - if podObj, hasPod := volumeObj.mountedPods[podName]; hasPod { - if podObj.volumeMountStateForPod == operationexecutor.VolumeMounted && podObj.outerVolumeSpecName == outerVolumeSpecName { - return getMountedVolume(&podObj, &volumeObj), true - } + volumeObj := asw.attachedVolumes[volumeName] + if podObj, hasPod := volumeObj.mountedPods[podName]; hasPod { + if podObj.volumeMountStateForPod == operationexecutor.VolumeMounted { + return getMountedVolume(&podObj, &volumeObj), true } } @@ -1308,7 +1297,6 @@ func getMountedVolume( PodName: mountedPod.podName, VolumeName: attachedVolume.volumeName, InnerVolumeSpecName: mountedPod.volumeSpec.Name(), - OuterVolumeSpecName: mountedPod.outerVolumeSpecName, PluginName: attachedVolume.pluginName, PodUID: mountedPod.podUID, Mounter: mountedPod.mounter, diff --git a/pkg/kubelet/volumemanager/cache/actual_state_of_world_test.go b/pkg/kubelet/volumemanager/cache/actual_state_of_world_test.go index f7ccaded3ce8c..1b4f7fb7e0c8d 100644 --- a/pkg/kubelet/volumemanager/cache/actual_state_of_world_test.go +++ b/pkg/kubelet/volumemanager/cache/actual_state_of_world_test.go @@ -232,13 +232,12 @@ func Test_AddPodToVolume_Positive_ExistingVolumeNewNode(t *testing.T) { // Act markVolumeOpts := operationexecutor.MarkVolumeOpts{ - PodName: podName, - PodUID: pod.UID, - VolumeName: generatedVolumeName, - Mounter: mounter, - BlockVolumeMapper: mapper, - OuterVolumeSpecName: volumeSpec.Name(), - VolumeSpec: volumeSpec, + PodName: podName, + PodUID: pod.UID, + VolumeName: generatedVolumeName, + Mounter: mounter, + BlockVolumeMapper: mapper, + VolumeSpec: volumeSpec, } err = asw.AddPodToVolume(markVolumeOpts) // Assert @@ -307,13 +306,12 @@ func Test_AddPodToVolume_Positive_ExistingVolumeExistingNode(t *testing.T) { } markVolumeOpts := operationexecutor.MarkVolumeOpts{ - PodName: podName, - PodUID: pod.UID, - VolumeName: generatedVolumeName, - Mounter: mounter, - BlockVolumeMapper: mapper, - OuterVolumeSpecName: volumeSpec.Name(), - VolumeSpec: volumeSpec, + PodName: podName, + PodUID: pod.UID, + VolumeName: generatedVolumeName, + Mounter: mounter, + BlockVolumeMapper: mapper, + VolumeSpec: volumeSpec, } err = asw.AddPodToVolume(markVolumeOpts) if err != nil { @@ -415,13 +413,12 @@ func Test_AddTwoPodsToVolume_Positive(t *testing.T) { } markVolumeOpts1 := operationexecutor.MarkVolumeOpts{ - PodName: podName1, - PodUID: pod1.UID, - VolumeName: generatedVolumeName1, - Mounter: mounter1, - BlockVolumeMapper: mapper1, - OuterVolumeSpecName: volumeSpec1.Name(), - VolumeSpec: volumeSpec1, + PodName: podName1, + PodUID: pod1.UID, + VolumeName: generatedVolumeName1, + Mounter: mounter1, + BlockVolumeMapper: mapper1, + VolumeSpec: volumeSpec1, } err = asw.AddPodToVolume(markVolumeOpts1) if err != nil { @@ -441,13 +438,12 @@ func Test_AddTwoPodsToVolume_Positive(t *testing.T) { } markVolumeOpts2 := operationexecutor.MarkVolumeOpts{ - PodName: podName2, - PodUID: pod2.UID, - VolumeName: generatedVolumeName1, - Mounter: mounter2, - BlockVolumeMapper: mapper2, - OuterVolumeSpecName: volumeSpec2.Name(), - VolumeSpec: volumeSpec2, + PodName: podName2, + PodUID: pod2.UID, + VolumeName: generatedVolumeName1, + Mounter: mounter2, + BlockVolumeMapper: mapper2, + VolumeSpec: volumeSpec2, } err = asw.AddPodToVolume(markVolumeOpts2) if err != nil { @@ -603,14 +599,13 @@ func TestActualStateOfWorld_FoundDuringReconstruction(t *testing.T) { } markVolumeOpts1 := operationexecutor.MarkVolumeOpts{ - PodName: podName1, - PodUID: pod1.UID, - VolumeName: generatedVolumeName1, - Mounter: mounter1, - BlockVolumeMapper: mapper1, - OuterVolumeSpecName: volumeSpec1.Name(), - VolumeSpec: volumeSpec1, - VolumeMountState: operationexecutor.VolumeMountUncertain, + PodName: podName1, + PodUID: pod1.UID, + VolumeName: generatedVolumeName1, + Mounter: mounter1, + BlockVolumeMapper: mapper1, + VolumeSpec: volumeSpec1, + VolumeMountState: operationexecutor.VolumeMountUncertain, } _, err = asw.CheckAndMarkVolumeAsUncertainViaReconstruction(markVolumeOpts1) if err != nil { @@ -687,13 +682,12 @@ func Test_MarkVolumeAsDetached_Negative_PodInVolume(t *testing.T) { } markVolumeOpts := operationexecutor.MarkVolumeOpts{ - PodName: podName, - PodUID: pod.UID, - VolumeName: generatedVolumeName, - Mounter: mounter, - BlockVolumeMapper: mapper, - OuterVolumeSpecName: volumeSpec.Name(), - VolumeSpec: volumeSpec, + PodName: podName, + PodUID: pod.UID, + VolumeName: generatedVolumeName, + Mounter: mounter, + BlockVolumeMapper: mapper, + VolumeSpec: volumeSpec, } err = asw.AddPodToVolume(markVolumeOpts) if err != nil { @@ -794,13 +788,12 @@ func Test_AddPodToVolume_Negative_VolumeDoesntExist(t *testing.T) { // Act markVolumeOpts := operationexecutor.MarkVolumeOpts{ - PodName: podName, - PodUID: pod.UID, - VolumeName: volumeName, - Mounter: mounter, - BlockVolumeMapper: mapper, - OuterVolumeSpecName: volumeSpec.Name(), - VolumeSpec: volumeSpec, + PodName: podName, + PodUID: pod.UID, + VolumeName: volumeName, + Mounter: mounter, + BlockVolumeMapper: mapper, + VolumeSpec: volumeSpec, } err = asw.AddPodToVolume(markVolumeOpts) // Assert @@ -930,7 +923,6 @@ func Test_AddPodToVolume_Positive_SELinux(t *testing.T) { VolumeName: generatedVolumeName, Mounter: mounter, BlockVolumeMapper: mapper, - OuterVolumeSpecName: volumeSpec.Name(), VolumeSpec: volumeSpec, SELinuxMountContext: "system_u:object_r:container_file_t:s0:c0,c1", VolumeMountState: operationexecutor.VolumeMounted, @@ -1044,13 +1036,12 @@ func TestUncertainVolumeMounts(t *testing.T) { } markVolumeOpts1 := operationexecutor.MarkVolumeOpts{ - PodName: podName1, - PodUID: pod1.UID, - VolumeName: generatedVolumeName1, - Mounter: mounter1, - OuterVolumeSpecName: volumeSpec1.Name(), - VolumeSpec: volumeSpec1, - VolumeMountState: operationexecutor.VolumeMountUncertain, + PodName: podName1, + PodUID: pod1.UID, + VolumeName: generatedVolumeName1, + Mounter: mounter1, + VolumeSpec: volumeSpec1, + VolumeMountState: operationexecutor.VolumeMountUncertain, } err = asw.AddPodToVolume(markVolumeOpts1) if err != nil { diff --git a/pkg/kubelet/volumemanager/cache/desired_state_of_world.go b/pkg/kubelet/volumemanager/cache/desired_state_of_world.go index f09c4bec21b2e..0dfc390070e73 100644 --- a/pkg/kubelet/volumemanager/cache/desired_state_of_world.go +++ b/pkg/kubelet/volumemanager/cache/desired_state_of_world.go @@ -22,6 +22,7 @@ package cache import ( "fmt" + "slices" "sync" "time" @@ -99,6 +100,9 @@ type DesiredStateOfWorld interface { // attached volumes, false is returned. PodExistsInVolume(podName types.UniquePodName, volumeName v1.UniqueVolumeName, seLinuxMountContext string) bool + // GetVolumeName returns the UniqueVolumeName for the given pod, indexed by outerVolumeSpecName. + GetVolumeNamesForPod(podName types.UniquePodName) map[string]v1.UniqueVolumeName + // GetVolumesToMount generates and returns a list of volumes that should be // attached to this node and the pods they should be mounted to based on the // current desired state of the world. @@ -242,11 +246,8 @@ type podToMount struct { // PVC volumes it is from the dereferenced PV object. volumeSpec *volume.Spec - // outerVolumeSpecName is the volume.Spec.Name() of the volume as referenced - // directly in the pod. If the volume was referenced through a persistent - // volume claim, this contains the volume.Spec.Name() of the persistent - // volume claim - outerVolumeSpecName string + // outerVolumeSpecNames are the podSpec.Volume[x].Name of the volume. + outerVolumeSpecNames []string // mountRequestTime stores time at which mount was requested mountRequestTime time.Time } @@ -356,8 +357,15 @@ func (dsw *desiredStateOfWorld) AddPodToVolume( oldPodMount, ok := dsw.volumesToMount[volumeName].podsToMount[podName] mountRequestTime := time.Now() - if ok && !volumePlugin.RequiresRemount(volumeSpec) { - mountRequestTime = oldPodMount.mountRequestTime + var outerVolumeSpecNames []string + if ok { + if !volumePlugin.RequiresRemount(volumeSpec) { + mountRequestTime = oldPodMount.mountRequestTime + } + outerVolumeSpecNames = oldPodMount.outerVolumeSpecNames + } + if !slices.Contains(outerVolumeSpecNames, outerVolumeSpecName) { + outerVolumeSpecNames = append(outerVolumeSpecNames, outerVolumeSpecName) } if !ok { @@ -385,11 +393,11 @@ func (dsw *desiredStateOfWorld) AddPodToVolume( // updated values (this is required for volumes that require remounting on // pod update, like Downward API volumes). dsw.volumesToMount[volumeName].podsToMount[podName] = podToMount{ - podName: podName, - pod: pod, - volumeSpec: volumeSpec, - outerVolumeSpecName: outerVolumeSpecName, - mountRequestTime: mountRequestTime, + podName: podName, + pod: pod, + volumeSpec: volumeSpec, + outerVolumeSpecNames: outerVolumeSpecNames, + mountRequestTime: mountRequestTime, } return volumeName, nil } @@ -562,6 +570,19 @@ func (dsw *desiredStateOfWorld) GetPods() map[types.UniquePodName]bool { return podList } +func (dsw *desiredStateOfWorld) GetVolumeNamesForPod(podName types.UniquePodName) map[string]v1.UniqueVolumeName { + dsw.RLock() + defer dsw.RUnlock() + + volumeNames := make(map[string]v1.UniqueVolumeName) + for volumeName, volumeObj := range dsw.volumesToMount { + for _, outerVolumeSpecName := range volumeObj.podsToMount[podName].outerVolumeSpecNames { + volumeNames[outerVolumeSpecName] = volumeName + } + } + return volumeNames +} + func (dsw *desiredStateOfWorld) GetVolumesToMount() []VolumeToMount { dsw.RLock() defer dsw.RUnlock() @@ -577,7 +598,7 @@ func (dsw *desiredStateOfWorld) GetVolumesToMount() []VolumeToMount { VolumeSpec: podObj.volumeSpec, PluginIsAttachable: volumeObj.pluginIsAttachable, PluginIsDeviceMountable: volumeObj.pluginIsDeviceMountable, - OuterVolumeSpecName: podObj.outerVolumeSpecName, + OuterVolumeSpecNames: podObj.outerVolumeSpecNames, VolumeGIDValue: volumeObj.volumeGIDValue, ReportedInUse: volumeObj.reportedInUse, MountRequestTime: podObj.mountRequestTime, diff --git a/pkg/kubelet/volumemanager/cache/desired_state_of_world_test.go b/pkg/kubelet/volumemanager/cache/desired_state_of_world_test.go index 33b21e7a50343..b8269c8b7e651 100644 --- a/pkg/kubelet/volumemanager/cache/desired_state_of_world_test.go +++ b/pkg/kubelet/volumemanager/cache/desired_state_of_world_test.go @@ -17,6 +17,8 @@ limitations under the License. package cache import ( + "maps" + "slices" "testing" v1 "k8s.io/api/core/v1" @@ -76,7 +78,7 @@ func Test_AddPodToVolume_Positive_NewPodNewVolume(t *testing.T) { verifyVolumeExistsDsw(t, generatedVolumeName, "" /* SELinuxContext */, dsw) verifyVolumeExistsInVolumesToMount( - t, generatedVolumeName, false /* expectReportedInUse */, dsw) + t, generatedVolumeName, []string{"volume-name"}, false /* expectReportedInUse */, dsw) verifyPodExistsInVolumeDsw(t, podName, generatedVolumeName, "" /* SELinuxContext */, dsw) verifyVolumeExistsWithSpecNameInVolumeDsw(t, podName, volumeSpec.Name(), dsw) } @@ -130,14 +132,14 @@ func Test_AddPodToVolume_Positive_ExistingPodExistingVolume(t *testing.T) { } verifyVolumeExistsDsw(t, generatedVolumeName, "" /* SELinuxContext */, dsw) verifyVolumeExistsInVolumesToMount( - t, generatedVolumeName, false /* expectReportedInUse */, dsw) + t, generatedVolumeName, []string{"volume-name"}, false /* expectReportedInUse */, dsw) verifyPodExistsInVolumeDsw(t, podName, generatedVolumeName, "" /* SELinuxContext */, dsw) verifyVolumeExistsWithSpecNameInVolumeDsw(t, podName, volumeSpec.Name(), dsw) } // Call AddPodToVolume() on different pods for different kinds of volumes -// Verities generated names are same for different pods if volume is device mountable or attachable -// Verities generated names are different for different pods if volume is not device mountble and attachable +// Verifies generated names are same for different pods if volume is device mountable or attachable +// Verifies generated names are different for different pods if volume is not device mountble and attachable func Test_AddPodToVolume_Positive_NamesForDifferentPodsAndDifferentVolumes(t *testing.T) { logger, _ := ktesting.NewTestContext(t) // Arrange @@ -299,6 +301,59 @@ func Test_AddPodToVolume_Positive_NamesForDifferentPodsAndDifferentVolumes(t *te } +func Test_AddPodToVolume_Positive_MultiOuterNames(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) + // Arrange + volumePluginMgr, _ := volumetesting.GetTestKubeletVolumePluginMgr(t) + seLinuxTranslator := util.NewFakeSELinuxLabelTranslator() + dsw := NewDesiredStateOfWorld(volumePluginMgr, seLinuxTranslator) + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod5", + UID: "pod5uid", + }, + Spec: v1.PodSpec{ + Volumes: []v1.Volume{ + { + Name: "volume-name-1", + VolumeSource: v1.VolumeSource{ + GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ + PDName: "fake-device1", + }, + }, + }, { + Name: "volume-name-2", + VolumeSource: v1.VolumeSource{ + GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ + PDName: "fake-device1", + }, + }, + }, + }, + }, + } + + volumeSpec1 := &volume.Spec{Volume: &pod.Spec.Volumes[0]} + volumeSpec2 := &volume.Spec{Volume: &pod.Spec.Volumes[1]} + podName := util.GetUniquePodName(pod) + + // Act + _, err := dsw.AddPodToVolume( + logger, podName, pod, volumeSpec1, volumeSpec1.Name(), "" /* volumeGIDValue */, nil /* seLinuxContainerContexts */) + if err != nil { + t.Fatalf("AddPodToVolume failed. Expected: Actual: <%v>", err) + } + generatedVolumeName, err := dsw.AddPodToVolume( + logger, podName, pod, volumeSpec2, volumeSpec2.Name(), "" /* volumeGIDValue */, nil /* seLinuxContainerContexts */) + if err != nil { + t.Fatalf("AddPodToVolume failed. Expected: Actual: <%v>", err) + } + + // Assert + verifyVolumeExistsInVolumesToMount( + t, generatedVolumeName, []string{"volume-name-1", "volume-name-2"}, false /* expectReportedInUse */, dsw) +} + // Populates data struct with a new volume/pod // Calls DeletePodFromVolume() to removes the pod // Verifies newly added pod/volume are deleted @@ -336,7 +391,7 @@ func Test_DeletePodFromVolume_Positive_PodExistsVolumeExists(t *testing.T) { } verifyVolumeExistsDsw(t, generatedVolumeName, "" /* SELinuxContext */, dsw) verifyVolumeExistsInVolumesToMount( - t, generatedVolumeName, false /* expectReportedInUse */, dsw) + t, generatedVolumeName, []string{"volume-name"}, false /* expectReportedInUse */, dsw) verifyPodExistsInVolumeDsw(t, podName, generatedVolumeName, "" /* SELinuxContext */, dsw) // Act @@ -454,15 +509,15 @@ func Test_MarkVolumesReportedInUse_Positive_NewPodNewVolume(t *testing.T) { // Assert verifyVolumeExistsDsw(t, generatedVolume1Name, "" /* SELinuxContext */, dsw) verifyVolumeExistsInVolumesToMount( - t, generatedVolume1Name, false /* expectReportedInUse */, dsw) + t, generatedVolume1Name, []string{"volume1-name"}, false /* expectReportedInUse */, dsw) verifyPodExistsInVolumeDsw(t, pod1Name, generatedVolume1Name, "" /* SELinuxContext */, dsw) verifyVolumeExistsDsw(t, generatedVolume2Name, "" /* SELinuxContext */, dsw) verifyVolumeExistsInVolumesToMount( - t, generatedVolume2Name, true /* expectReportedInUse */, dsw) + t, generatedVolume2Name, []string{"volume2-name"}, true /* expectReportedInUse */, dsw) verifyPodExistsInVolumeDsw(t, pod2Name, generatedVolume2Name, "" /* SELinuxContext */, dsw) verifyVolumeExistsDsw(t, generatedVolume3Name, "" /* SELinuxContext */, dsw) verifyVolumeExistsInVolumesToMount( - t, generatedVolume3Name, false /* expectReportedInUse */, dsw) + t, generatedVolume3Name, []string{"volume3-name"}, false /* expectReportedInUse */, dsw) verifyPodExistsInVolumeDsw(t, pod3Name, generatedVolume3Name, "" /* SELinuxContext */, dsw) // Act @@ -472,15 +527,15 @@ func Test_MarkVolumesReportedInUse_Positive_NewPodNewVolume(t *testing.T) { // Assert verifyVolumeExistsDsw(t, generatedVolume1Name, "" /* SELinuxContext */, dsw) verifyVolumeExistsInVolumesToMount( - t, generatedVolume1Name, false /* expectReportedInUse */, dsw) + t, generatedVolume1Name, []string{"volume1-name"}, false /* expectReportedInUse */, dsw) verifyPodExistsInVolumeDsw(t, pod1Name, generatedVolume1Name, "" /* SELinuxContext */, dsw) verifyVolumeExistsDsw(t, generatedVolume2Name, "" /* SELinuxContext */, dsw) verifyVolumeExistsInVolumesToMount( - t, generatedVolume2Name, false /* expectReportedInUse */, dsw) + t, generatedVolume2Name, []string{"volume2-name"}, false /* expectReportedInUse */, dsw) verifyPodExistsInVolumeDsw(t, pod2Name, generatedVolume2Name, "" /* SELinuxContext */, dsw) verifyVolumeExistsDsw(t, generatedVolume3Name, "" /* SELinuxContext */, dsw) verifyVolumeExistsInVolumesToMount( - t, generatedVolume3Name, true /* expectReportedInUse */, dsw) + t, generatedVolume3Name, []string{"volume3-name"}, true /* expectReportedInUse */, dsw) verifyPodExistsInVolumeDsw(t, pod3Name, generatedVolume3Name, "" /* SELinuxContext */, dsw) } @@ -880,7 +935,7 @@ func Test_AddPodToVolume_SELinuxSinglePod(t *testing.T) { // Act generatedVolumeName, err := dsw.AddPodToVolume( - logger, podName, pod, volumeSpec, volumeSpec.Name(), "" /* volumeGIDValue */, seLinuxContainerContexts) + logger, podName, pod, volumeSpec, pod.Spec.Volumes[0].Name, "" /* volumeGIDValue */, seLinuxContainerContexts) // Assert if tc.expectError { @@ -895,7 +950,7 @@ func Test_AddPodToVolume_SELinuxSinglePod(t *testing.T) { verifyVolumeExistsDsw(t, generatedVolumeName, tc.expectedSELinuxLabel, dsw) verifyVolumeExistsInVolumesToMount( - t, generatedVolumeName, false /* expectReportedInUse */, dsw) + t, generatedVolumeName, []string{"volume-name"}, false /* expectReportedInUse */, dsw) verifyPodExistsInVolumeDsw(t, podName, generatedVolumeName, tc.expectedSELinuxLabel, dsw) verifyVolumeExistsWithSpecNameInVolumeDsw(t, podName, volumeSpec.Name(), dsw) }) @@ -1230,7 +1285,7 @@ func Test_AddPodToVolume_SELinux_MultiplePods(t *testing.T) { // Act generatedVolumeName, err := dsw.AddPodToVolume( - logger, podName, pod, volumeSpec, volumeSpec.Name(), "" /* volumeGIDValue */, seLinuxContainerContexts) + logger, podName, pod, volumeSpec, pod.Spec.Volumes[0].Name, "" /* volumeGIDValue */, seLinuxContainerContexts) // Assert if err != nil { @@ -1239,7 +1294,7 @@ func Test_AddPodToVolume_SELinux_MultiplePods(t *testing.T) { verifyVolumeExistsDsw(t, generatedVolumeName, tc.expectedSELinuxLabel, dsw) verifyVolumeExistsInVolumesToMount( - t, generatedVolumeName, false /* expectReportedInUse */, dsw) + t, generatedVolumeName, []string{"volume-name"}, false /* expectReportedInUse */, dsw) verifyPodExistsInVolumeDsw(t, podName, generatedVolumeName, tc.expectedSELinuxLabel, dsw) verifyVolumeExistsWithSpecNameInVolumeDsw(t, podName, volumeSpec.Name(), dsw) @@ -1254,7 +1309,7 @@ func Test_AddPodToVolume_SELinux_MultiplePods(t *testing.T) { // Act generatedVolumeName2, err := dsw.AddPodToVolume( - logger, pod2Name, pod2, volumeSpec, volumeSpec.Name(), "" /* volumeGIDValue */, seLinuxContainerContexts) + logger, pod2Name, pod2, volumeSpec, pod2.Spec.Volumes[0].Name, "" /* volumeGIDValue */, seLinuxContainerContexts) // Assert if tc.expectError { if err == nil { @@ -1275,6 +1330,102 @@ func Test_AddPodToVolume_SELinux_MultiplePods(t *testing.T) { } } +func TestGetVolumeNamesForPod(t *testing.T) { + logger, _ := ktesting.NewTestContext(t) + volumePluginMgr, _ := volumetesting.GetTestKubeletVolumePluginMgr(t) + seLinuxTranslator := util.NewFakeSELinuxLabelTranslator() + dsw := NewDesiredStateOfWorld(volumePluginMgr, seLinuxTranslator) + + pod1 := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod1", + UID: "pod1-uid", + }, + Spec: v1.PodSpec{ + Volumes: []v1.Volume{ + { + Name: "volume1-name", + VolumeSource: v1.VolumeSource{ + GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ + PDName: "fake-device1", + }, + }, + }, + { + Name: "volume1-dup", + VolumeSource: v1.VolumeSource{ + GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ + PDName: "fake-device1", + }, + }, + }, + { + Name: "volume3-name", + VolumeSource: v1.VolumeSource{ + GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ + PDName: "fake-device3", + }, + }, + }, + }, + }, + } + pod2 := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod2", + UID: "pod2-uid", + }, + Spec: v1.PodSpec{ + Volumes: []v1.Volume{ + { + Name: "volume2-name", + VolumeSource: v1.VolumeSource{ + GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ + PDName: "fake-device2", + }, + }, + }, + }, + }, + } + + addVolume := func(pod *v1.Pod, index int) { + volumeSpec := &volume.Spec{ + Volume: &pod.Spec.Volumes[index], + } + podName := util.GetUniquePodName(pod) + _, err := dsw.AddPodToVolume( + logger, podName, pod, volumeSpec, volumeSpec.Name(), "" /* volumeGIDValue */, nil /* seLinuxContainerContexts */) + if err != nil { + t.Fatalf("AddPodToVolume failed. Expected: Actual: <%v>", err) + } + } + + addVolume(pod1, 0) + addVolume(pod1, 1) + addVolume(pod1, 2) + addVolume(pod2, 0) + + verifyVolumeNames := func(pod *v1.Pod, expectedVolumeNames map[string]v1.UniqueVolumeName) { + t.Run(pod.Name, func(t *testing.T) { + podName := util.GetUniquePodName(pod) + actualVolumeNames := dsw.GetVolumeNamesForPod(podName) + if !maps.Equal(expectedVolumeNames, actualVolumeNames) { + t.Errorf("GetVolumeNamesForPod returned incorrect value. Expected: <%v> Actual: <%v>", + expectedVolumeNames, actualVolumeNames) + } + }) + } + verifyVolumeNames(pod1, map[string]v1.UniqueVolumeName{ + "volume1-name": "fake-plugin/fake-device1", + "volume1-dup": "fake-plugin/fake-device1", + "volume3-name": "fake-plugin/fake-device3", + }) + verifyVolumeNames(pod2, map[string]v1.UniqueVolumeName{ + "volume2-name": "fake-plugin/fake-device2", + }) +} + func verifyVolumeExistsDsw( t *testing.T, expectedVolumeName v1.UniqueVolumeName, expectedSELinuxContext string, dsw DesiredStateOfWorld) { volumeExists := dsw.VolumeExists(expectedVolumeName, expectedSELinuxContext) @@ -1300,6 +1451,7 @@ func verifyVolumeDoesntExist( func verifyVolumeExistsInVolumesToMount( t *testing.T, expectedVolumeName v1.UniqueVolumeName, + expectedOuterNames []string, expectReportedInUse bool, dsw DesiredStateOfWorld) { volumesToMount := dsw.GetVolumesToMount() @@ -1313,6 +1465,12 @@ func verifyVolumeExistsInVolumesToMount( volume.ReportedInUse) } + names := volume.OuterVolumeSpecNames + slices.Sort(names) + if !slices.Equal(names, expectedOuterNames) { + t.Fatalf("Expected outer volume spec names to be %v, got %v", expectedOuterNames, names) + } + return } } diff --git a/pkg/kubelet/volumemanager/metrics/metrics_test.go b/pkg/kubelet/volumemanager/metrics/metrics_test.go index d2df2e3a66e63..d819b1ea8a2b6 100644 --- a/pkg/kubelet/volumemanager/metrics/metrics_test.go +++ b/pkg/kubelet/volumemanager/metrics/metrics_test.go @@ -83,14 +83,13 @@ func TestMetricCollection(t *testing.T) { } markVolumeOpts := operationexecutor.MarkVolumeOpts{ - PodName: podName, - PodUID: pod.UID, - VolumeName: generatedVolumeName, - Mounter: mounter, - BlockVolumeMapper: mapper, - OuterVolumeSpecName: volumeSpec.Name(), - VolumeSpec: volumeSpec, - VolumeMountState: operationexecutor.VolumeMounted, + PodName: podName, + PodUID: pod.UID, + VolumeName: generatedVolumeName, + Mounter: mounter, + BlockVolumeMapper: mapper, + VolumeSpec: volumeSpec, + VolumeMountState: operationexecutor.VolumeMounted, } err = asw.AddPodToVolume(markVolumeOpts) if err != nil { diff --git a/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator_test.go b/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator_test.go index f3404b0c43fff..005c3bf71c1b9 100644 --- a/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator_test.go +++ b/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator_test.go @@ -406,13 +406,12 @@ func TestFindAndRemoveDeletedPodsWithUncertain(t *testing.T) { // Mark the volume as uncertain opts := operationexecutor.MarkVolumeOpts{ - PodName: util.GetUniquePodName(pod), - PodUID: pod.UID, - VolumeName: expectedVolumeName, - OuterVolumeSpecName: "dswp-test-volume-name", - VolumeGIDVolume: "", - VolumeSpec: volume.NewSpecFromPersistentVolume(pv, false), - VolumeMountState: operationexecutor.VolumeMountUncertain, + PodName: util.GetUniquePodName(pod), + PodUID: pod.UID, + VolumeName: expectedVolumeName, + VolumeGIDVolume: "", + VolumeSpec: volume.NewSpecFromPersistentVolume(pv, false), + VolumeMountState: operationexecutor.VolumeMountUncertain, } err := dswp.actualStateOfWorld.MarkVolumeMountAsUncertain(opts) if err != nil { @@ -1394,13 +1393,12 @@ func reconcileASW(asw cache.ActualStateOfWorld, dsw cache.DesiredStateOfWorld, t t.Fatalf("Unexpected error when MarkVolumeAsAttached: %v", err) } markVolumeOpts := operationexecutor.MarkVolumeOpts{ - PodName: volumeToMount.PodName, - PodUID: volumeToMount.Pod.UID, - VolumeName: volumeToMount.VolumeName, - OuterVolumeSpecName: volumeToMount.OuterVolumeSpecName, - VolumeGIDVolume: volumeToMount.VolumeGIDValue, - VolumeSpec: volumeToMount.VolumeSpec, - VolumeMountState: operationexecutor.VolumeMounted, + PodName: volumeToMount.PodName, + PodUID: volumeToMount.Pod.UID, + VolumeName: volumeToMount.VolumeName, + VolumeGIDVolume: volumeToMount.VolumeGIDValue, + VolumeSpec: volumeToMount.VolumeSpec, + VolumeMountState: operationexecutor.VolumeMounted, } err = asw.MarkVolumeAsMounted(markVolumeOpts) if err != nil { diff --git a/pkg/kubelet/volumemanager/reconciler/reconstruct.go b/pkg/kubelet/volumemanager/reconciler/reconstruct.go index 44bbf6cd517e5..8ac331328f1dc 100644 --- a/pkg/kubelet/volumemanager/reconciler/reconstruct.go +++ b/pkg/kubelet/volumemanager/reconciler/reconstruct.go @@ -114,7 +114,6 @@ func (rc *reconciler) updateStates(logger klog.Logger, reconstructedVolumes map[ VolumeName: volume.volumeName, Mounter: volume.mounter, BlockVolumeMapper: volume.blockVolumeMapper, - OuterVolumeSpecName: volume.outerVolumeSpecName, VolumeGIDVolume: volume.volumeGIDValue, VolumeSpec: volume.volumeSpec, VolumeMountState: operationexecutor.VolumeMountUncertain, diff --git a/pkg/kubelet/volumemanager/reconciler/reconstruct_common.go b/pkg/kubelet/volumemanager/reconciler/reconstruct_common.go index d685a3de00439..ef8716abcc9fa 100644 --- a/pkg/kubelet/volumemanager/reconciler/reconstruct_common.go +++ b/pkg/kubelet/volumemanager/reconciler/reconstruct_common.go @@ -28,7 +28,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/klog/v2" - "k8s.io/kubernetes/pkg/kubelet/config" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" "k8s.io/kubernetes/pkg/kubelet/volumemanager/metrics" volumepkg "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util" @@ -72,7 +72,6 @@ type reconstructedVolume struct { volumeName v1.UniqueVolumeName podName volumetypes.UniquePodName volumeSpec *volumepkg.Spec - outerVolumeSpecName string pod *v1.Pod volumeGIDValue string devicePath string @@ -87,7 +86,6 @@ func (rv reconstructedVolume) MarshalLog() interface{} { VolumeName string `json:"volumeName"` PodName string `json:"podName"` VolumeSpecName string `json:"volumeSpecName"` - OuterVolumeSpecName string `json:"outerVolumeSpecName"` PodUID string `json:"podUID"` VolumeGIDValue string `json:"volumeGIDValue"` DevicePath string `json:"devicePath"` @@ -96,7 +94,6 @@ func (rv reconstructedVolume) MarshalLog() interface{} { VolumeName: string(rv.volumeName), PodName: string(rv.podName), VolumeSpecName: rv.volumeSpec.Name(), - OuterVolumeSpecName: rv.outerVolumeSpecName, PodUID: string(rv.pod.UID), VolumeGIDValue: rv.volumeGIDValue, DevicePath: rv.devicePath, @@ -210,11 +207,11 @@ func getVolumesFromPodDir(logger klog.Logger, podDir string) ([]podVolume, error // Find filesystem volume information // ex. filesystem volume: /pods/{podUid}/volumes/{escapeQualifiedPluginName}/{volumeName} volumesDirs := map[v1.PersistentVolumeMode]string{ - v1.PersistentVolumeFilesystem: filepath.Join(podDir, config.DefaultKubeletVolumesDirName), + v1.PersistentVolumeFilesystem: filepath.Join(podDir, kubeletconfig.DefaultKubeletVolumesDirName), } // Find block volume information // ex. block volume: /pods/{podUid}/volumeDevices/{escapeQualifiedPluginName}/{volumeName} - volumesDirs[v1.PersistentVolumeBlock] = filepath.Join(podDir, config.DefaultKubeletVolumeDevicesDirName) + volumesDirs[v1.PersistentVolumeBlock] = filepath.Join(podDir, kubeletconfig.DefaultKubeletVolumeDevicesDirName) for volumeMode, volumesDir := range volumesDirs { var volumesDirInfo []fs.DirEntry @@ -376,17 +373,12 @@ func (rc *reconciler) reconstructVolume(volume podVolume) (rvolume *reconstructe } reconstructedVolume := &reconstructedVolume{ - volumeName: uniqueVolumeName, - podName: volume.podName, - volumeSpec: volumeSpec, - // volume.volumeSpecName is actually InnerVolumeSpecName. It will not be used - // for volume cleanup. - // in case reconciler calls mountOrAttachVolumes, outerVolumeSpecName will - // be updated from dsw information in ASW.MarkVolumeAsMounted(). - outerVolumeSpecName: volume.volumeSpecName, - pod: pod, - deviceMounter: deviceMounter, - volumeGIDValue: "", + volumeName: uniqueVolumeName, + podName: volume.podName, + volumeSpec: volumeSpec, + pod: pod, + deviceMounter: deviceMounter, + volumeGIDValue: "", // devicePath is updated during updateStates() by checking node status's VolumesAttached data. // TODO: get device path directly from the volume mount path. devicePath: "", diff --git a/pkg/kubelet/volumemanager/volume_manager.go b/pkg/kubelet/volumemanager/volume_manager.go index b23a840ae2d77..f0c58f3bad1d2 100644 --- a/pkg/kubelet/volumemanager/volume_manager.go +++ b/pkg/kubelet/volumemanager/volume_manager.go @@ -120,19 +120,17 @@ type VolumeManager interface { WaitForAllPodsUnmount(ctx context.Context, pods []*v1.Pod) error // GetMountedVolumesForPod returns a VolumeMap containing the volumes - // referenced by the specified pod that are successfully attached and + // referenced by the specified pod that are desired and actually attached and // mounted. The key in the map is the OuterVolumeSpecName (i.e. // pod.Spec.Volumes[x].Name). It returns an empty VolumeMap if pod has no // volumes. GetMountedVolumesForPod(podName types.UniquePodName) container.VolumeMap - // GetPossiblyMountedVolumesForPod returns a VolumeMap containing the volumes - // referenced by the specified pod that are either successfully attached + // HasPossiblyMountedVolumesForPod returns whether the pod has + // any volumes that are either successfully attached // and mounted or are "uncertain", i.e. a volume plugin may be mounting - // them right now. The key in the map is the OuterVolumeSpecName (i.e. - // pod.Spec.Volumes[x].Name). It returns an empty VolumeMap if pod has no - // volumes. - GetPossiblyMountedVolumesForPod(podName types.UniquePodName) container.VolumeMap + // them right now. + HasPossiblyMountedVolumesForPod(podName types.UniquePodName) bool // GetExtraSupplementalGroupsForPod returns a list of the extra // supplemental groups for the Pod. These extra supplemental groups come @@ -321,8 +319,8 @@ func (vm *volumeManager) Run(ctx context.Context, sourcesReady config.SourcesRea func (vm *volumeManager) GetMountedVolumesForPod(podName types.UniquePodName) container.VolumeMap { podVolumes := make(container.VolumeMap) - for _, mountedVolume := range vm.actualStateOfWorld.GetMountedVolumesForPod(podName) { - podVolumes[mountedVolume.OuterVolumeSpecName] = container.VolumeInfo{ + for name, mountedVolume := range vm.getMountedVolumes(podName) { + podVolumes[name] = container.VolumeInfo{ Mounter: mountedVolume.Mounter, BlockVolumeMapper: mountedVolume.BlockVolumeMapper, ReadOnly: mountedVolume.VolumeSpec.ReadOnly, @@ -332,17 +330,8 @@ func (vm *volumeManager) GetMountedVolumesForPod(podName types.UniquePodName) co return podVolumes } -func (vm *volumeManager) GetPossiblyMountedVolumesForPod(podName types.UniquePodName) container.VolumeMap { - podVolumes := make(container.VolumeMap) - for _, mountedVolume := range vm.actualStateOfWorld.GetPossiblyMountedVolumesForPod(podName) { - podVolumes[mountedVolume.OuterVolumeSpecName] = container.VolumeInfo{ - Mounter: mountedVolume.Mounter, - BlockVolumeMapper: mountedVolume.BlockVolumeMapper, - ReadOnly: mountedVolume.VolumeSpec.ReadOnly, - InnerVolumeSpecName: mountedVolume.InnerVolumeSpecName, - } - } - return podVolumes +func (vm *volumeManager) HasPossiblyMountedVolumesForPod(podName types.UniquePodName) bool { + return len(vm.actualStateOfWorld.GetPossiblyMountedVolumesForPod(podName)) > 0 } func (vm *volumeManager) GetExtraSupplementalGroupsForPod(pod *v1.Pod) []int64 { @@ -448,7 +437,7 @@ func (vm *volumeManager) WaitForAttachAndMount(ctx context.Context, pod *v1.Pod) unattachedVolumes := []string{} for _, volumeToMount := range unattachedVolumeMounts { - unattachedVolumes = append(unattachedVolumes, volumeToMount.OuterVolumeSpecName) + unattachedVolumes = append(unattachedVolumes, volumeToMount.OuterVolumeSpecNames...) } slices.Sort(unattachedVolumes) @@ -502,9 +491,9 @@ func (vm *volumeManager) WaitForUnmount(ctx context.Context, pod *v1.Pod) error vm.verifyVolumesUnmountedFunc(uniquePodName)) if err != nil { - var mountedVolumes []string + var mountedVolumes []v1.UniqueVolumeName for _, v := range vm.actualStateOfWorld.GetMountedVolumesForPod(uniquePodName) { - mountedVolumes = append(mountedVolumes, v.OuterVolumeSpecName) + mountedVolumes = append(mountedVolumes, v.VolumeName) } if len(mountedVolumes) == 0 { return nil @@ -544,7 +533,7 @@ func (vm *volumeManager) getVolumesNotInDSW(uniquePodName types.UniquePodName, e for _, volumeToMount := range vm.desiredStateOfWorld.GetVolumesToMount() { if volumeToMount.PodName == uniquePodName { - volumesNotInDSW.Delete(volumeToMount.OuterVolumeSpecName) + volumesNotInDSW.Delete(volumeToMount.OuterVolumeSpecNames...) } } @@ -572,13 +561,7 @@ func (vm *volumeManager) verifyVolumesMountedFunc(podName types.UniquePodName, e if errs := vm.desiredStateOfWorld.PopPodErrors(podName); len(errs) > 0 { return true, errors.New(strings.Join(errs, "; ")) } - for _, expectedVolume := range expectedVolumes { - _, found := vm.actualStateOfWorld.GetMountedVolumeForPodByOuterVolumeSpecName(podName, expectedVolume) - if !found { - return false, nil - } - } - return true, nil + return len(vm.getUnmountedVolumes(podName, expectedVolumes)) == 0, nil } } @@ -593,25 +576,42 @@ func (vm *volumeManager) verifyVolumesUnmountedFunc(podName types.UniquePodName) } } -// getUnmountedVolumes fetches the current list of mounted volumes from -// the actual state of the world, and uses it to process the list of -// expectedVolumes. It returns a list of unmounted volumes. -// The list also includes volume that may be mounted in uncertain state. -func (vm *volumeManager) getUnmountedVolumes(podName types.UniquePodName, expectedVolumes []string) []string { - mountedVolumes := sets.New[string]() - for _, mountedVolume := range vm.actualStateOfWorld.GetMountedVolumesForPod(podName) { - mountedVolumes.Insert(mountedVolume.OuterVolumeSpecName) +// getMountedVolumes returns volumes that are desired and actually mounted, +// indexed by the outer volume spec name. +func (vm *volumeManager) getMountedVolumes(podName types.UniquePodName) map[string]*cache.MountedVolume { + volumes := vm.actualStateOfWorld.GetMountedVolumesForPod(podName) + volumesByName := make(map[v1.UniqueVolumeName]*cache.MountedVolume, len(volumes)) + for i, mountedVolume := range volumes { + volumesByName[mountedVolume.VolumeName] = &volumes[i] + } + + volumeNames := vm.desiredStateOfWorld.GetVolumeNamesForPod(podName) + volumesByOuterName := make(map[string]*cache.MountedVolume, len(volumeNames)) + for outerName, volumeName := range volumeNames { + mountedVolume, ok := volumesByName[volumeName] + if ok { + volumesByOuterName[outerName] = mountedVolume + } } - return filterUnmountedVolumes(mountedVolumes, expectedVolumes) + + return volumesByOuterName } -// filterUnmountedVolumes adds each element of expectedVolumes that is not in -// mountedVolumes to a list of unmountedVolumes and returns it. -func filterUnmountedVolumes(mountedVolumes sets.Set[string], expectedVolumes []string) []string { +// getUnmountedVolumes returns a list of unmounted volumes. +// This includes the volumes in expectedVolumes, but not in one of DSW/ASW. +// The list also includes volume that may be mounted in uncertain state. +func (vm *volumeManager) getUnmountedVolumes(podName types.UniquePodName, expectedVolumes []string) []string { unmountedVolumes := []string{} - for _, expectedVolume := range expectedVolumes { - if !mountedVolumes.Has(expectedVolume) { - unmountedVolumes = append(unmountedVolumes, expectedVolume) + volumeNames := vm.desiredStateOfWorld.GetVolumeNamesForPod(podName) + for _, outerName := range expectedVolumes { + volumeName, ok := volumeNames[outerName] + if !ok { + unmountedVolumes = append(unmountedVolumes, outerName) + continue + } + _, ok = vm.actualStateOfWorld.GetMountedVolumeForPod(podName, volumeName) + if !ok { + unmountedVolumes = append(unmountedVolumes, outerName) } } slices.Sort(unmountedVolumes) diff --git a/pkg/kubelet/volumemanager/volume_manager_fake.go b/pkg/kubelet/volumemanager/volume_manager_fake.go index 02c424c380154..ebfdc2037d728 100644 --- a/pkg/kubelet/volumemanager/volume_manager_fake.go +++ b/pkg/kubelet/volumemanager/volume_manager_fake.go @@ -28,25 +28,27 @@ import ( // FakeVolumeManager is a test implementation that just tracks calls type FakeVolumeManager struct { - volumes map[v1.UniqueVolumeName]bool - reportedInUse map[v1.UniqueVolumeName]bool - unmountDelay time.Duration - unmountError error + volumes map[v1.UniqueVolumeName]bool + reportedInUse map[v1.UniqueVolumeName]bool + unmountDelay time.Duration + unmountError error + volumeAttachLimitExceeded bool } var _ VolumeManager = &FakeVolumeManager{} // NewFakeVolumeManager creates a new VolumeManager test instance -func NewFakeVolumeManager(initialVolumes []v1.UniqueVolumeName, unmountDelay time.Duration, unmountError error) *FakeVolumeManager { +func NewFakeVolumeManager(initialVolumes []v1.UniqueVolumeName, unmountDelay time.Duration, unmountError error, volumeAttachLimitExceeded bool) *FakeVolumeManager { volumes := map[v1.UniqueVolumeName]bool{} for _, v := range initialVolumes { volumes[v] = true } return &FakeVolumeManager{ - volumes: volumes, - reportedInUse: map[v1.UniqueVolumeName]bool{}, - unmountDelay: unmountDelay, - unmountError: unmountError, + volumes: volumes, + reportedInUse: map[v1.UniqueVolumeName]bool{}, + unmountDelay: unmountDelay, + unmountError: unmountError, + volumeAttachLimitExceeded: volumeAttachLimitExceeded, } } @@ -56,6 +58,9 @@ func (f *FakeVolumeManager) Run(ctx context.Context, sourcesReady config.Sources // WaitForAttachAndMount is not implemented func (f *FakeVolumeManager) WaitForAttachAndMount(ctx context.Context, pod *v1.Pod) error { + if f.volumeAttachLimitExceeded { + return &VolumeAttachLimitExceededError{} + } return nil } @@ -78,9 +83,9 @@ func (f *FakeVolumeManager) GetMountedVolumesForPod(podName types.UniquePodName) return nil } -// GetPossiblyMountedVolumesForPod is not implemented -func (f *FakeVolumeManager) GetPossiblyMountedVolumesForPod(podName types.UniquePodName) container.VolumeMap { - return nil +// HasPossiblyMountedVolumesForPod is not implemented +func (f *FakeVolumeManager) HasPossiblyMountedVolumesForPod(podName types.UniquePodName) bool { + return false } // GetExtraSupplementalGroupsForPod is not implemented diff --git a/pkg/kubelet/volumemanager/volume_manager_test.go b/pkg/kubelet/volumemanager/volume_manager_test.go index 08492d8891acd..c9946e7b95caf 100644 --- a/pkg/kubelet/volumemanager/volume_manager_test.go +++ b/pkg/kubelet/volumemanager/volume_manager_test.go @@ -656,7 +656,6 @@ func delayClaimBecomesBound( } func TestWaitForAllPodsUnmount(t *testing.T) { - tCtx := ktesting.Init(t) tmpDir, err := utiltesting.MkTmpdir("volumeManagerTest") require.NoError(t, err, "Failed to create temp directory") defer func() { @@ -684,6 +683,7 @@ func TestWaitForAllPodsUnmount(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { + var ctx context.Context = ktesting.Init(t) podManager := kubepod.NewBasicPodManager() node, pod, pv, claim := createObjects(test.podMode, test.podMode) @@ -691,8 +691,6 @@ func TestWaitForAllPodsUnmount(t *testing.T) { manager := newTestVolumeManager(t, tmpDir, podManager, kubeClient, node) - ctx, cancel := context.WithTimeout(tCtx, 1*time.Second) - defer cancel() sourcesReady := config.NewSourcesReady(func(_ sets.Set[string]) bool { return true }) go manager.Run(ctx, sourcesReady) @@ -706,11 +704,12 @@ func TestWaitForAllPodsUnmount(t *testing.T) { err := manager.WaitForAttachAndMount(ctx, pod) require.NoError(t, err, "Failed to wait for attach and mount") + ctx, cancel := context.WithTimeout(ctx, 1*time.Second) + defer cancel() err = manager.WaitForAllPodsUnmount(ctx, []*v1.Pod{pod}) if test.expectedError { - require.Error(t, err, "Expected error due to timeout") - require.Contains(t, err.Error(), "context deadline exceeded", "Expected deadline exceeded error") + require.ErrorIs(t, err, context.DeadlineExceeded, "Expected error due to timeout") } else { require.NoError(t, err, "Expected no error") } diff --git a/pkg/kubelet/watchdog/watchdog_linux.go b/pkg/kubelet/watchdog/watchdog_linux.go index 6a6d04a32615e..912e7e5ebcc01 100644 --- a/pkg/kubelet/watchdog/watchdog_linux.go +++ b/pkg/kubelet/watchdog/watchdog_linux.go @@ -75,7 +75,7 @@ const minimalNotifyInterval = time.Second // NewHealthChecker creates a new HealthChecker instance. // This function initializes the health checker and configures its behavior based on the status of the systemd watchdog. // If the watchdog is not enabled, the function returns an error. -func NewHealthChecker(opts ...Option) (HealthChecker, error) { +func NewHealthChecker(logger klog.Logger, opts ...Option) (HealthChecker, error) { hc := &healthChecker{ watchdog: &DefaultWatchdogClient{}, } @@ -92,7 +92,7 @@ func NewHealthChecker(opts ...Option) (HealthChecker, error) { return nil, fmt.Errorf("configure watchdog: %w", err) } if watchdogVal == 0 { - klog.InfoS("Systemd watchdog is not enabled") + logger.Info("Systemd watchdog is not enabled") return &healthChecker{}, nil } if watchdogVal <= minimalNotifyInterval { @@ -133,33 +133,34 @@ func (hc *healthChecker) getHealthCheckers() []healthz.HealthChecker { } func (hc *healthChecker) Start(ctx context.Context) { + logger := klog.FromContext(ctx) if hc.interval <= 0 { - klog.InfoS("Systemd watchdog is not enabled or the interval is invalid, so health checking will not be started.") + logger.Info("Systemd watchdog is not enabled or the interval is invalid, so health checking will not be started.") return } - klog.InfoS("Starting systemd watchdog with interval", "interval", hc.interval) + logger.Info("Starting systemd watchdog with interval", "interval", hc.interval) go wait.UntilWithContext(ctx, func(ctx context.Context) { if err := hc.doCheck(); err != nil { - klog.ErrorS(err, "Do not notify watchdog this iteration as the kubelet is reportedly not healthy") + logger.Error(err, "Do not notify watchdog this iteration as the kubelet is reportedly not healthy") return } err := wait.ExponentialBackoffWithContext(ctx, hc.retryBackoff, func(_ context.Context) (bool, error) { ack, err := hc.watchdog.SdNotify(false) if err != nil { - klog.V(5).InfoS("Failed to notify systemd watchdog, retrying", "error", err) + logger.V(5).Info("Failed to notify systemd watchdog, retrying", "error", err) return false, nil } if !ack { return false, fmt.Errorf("failed to notify systemd watchdog, notification not supported - (i.e. NOTIFY_SOCKET is unset)") } - klog.V(5).InfoS("Watchdog plugin notified", "acknowledgment", ack, "state", daemon.SdNotifyWatchdog) + logger.V(5).Info("Watchdog plugin notified", "acknowledgment", ack, "state", daemon.SdNotifyWatchdog) return true, nil }) if err != nil { - klog.ErrorS(err, "Failed to notify watchdog") + logger.Error(err, "Failed to notify watchdog") } }, hc.interval) } diff --git a/pkg/kubelet/watchdog/watchdog_linux_test.go b/pkg/kubelet/watchdog/watchdog_linux_test.go index 67cfda4520eb9..36f273a9d61f0 100644 --- a/pkg/kubelet/watchdog/watchdog_linux_test.go +++ b/pkg/kubelet/watchdog/watchdog_linux_test.go @@ -20,17 +20,14 @@ limitations under the License. package watchdog import ( - "bytes" "errors" - "flag" - "io" "net/http" "strings" "testing" "time" - "k8s.io/klog/v2" "k8s.io/kubernetes/test/utils/ktesting" + "k8s.io/kubernetes/test/utils/ktesting/initoption" ) // Mock syncLoopHealthChecker @@ -84,8 +81,8 @@ func TestNewHealthChecker(t *testing.T) { enabledVal: tt.mockEnabled, enabledErr: tt.mockErr, } - - _, err := NewHealthChecker(WithWatchdogClient(mockClient)) + logger, _ := ktesting.NewTestContext(t) + _, err := NewHealthChecker(logger, WithWatchdogClient(mockClient)) if (err != nil) != tt.wantErr { t.Errorf("NewHealthChecker() error = %v, wantErr %v", err, tt.wantErr) } @@ -150,19 +147,11 @@ func TestHealthCheckerStart(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - tCtx := ktesting.Init(t) + tCtx := ktesting.Init(t, initoption.BufferLogs(true)) + logger := tCtx.Logger() defer func() { tCtx.Cancel("test has completed") }() - // Capture logs - var logBuffer bytes.Buffer - flags := &flag.FlagSet{} - klog.InitFlags(flags) - if err := flags.Set("v", "5"); err != nil { - t.Fatal(err) - } - klog.LogToStderr(false) - klog.SetOutput(&logBuffer) // Mock SdWatchdogEnabled to return a valid value mockClient := &mockWatchdogClient{ @@ -172,7 +161,7 @@ func TestHealthCheckerStart(t *testing.T) { } // Create a healthChecker - hc, err := NewHealthChecker(WithWatchdogClient(mockClient)) + hc, err := NewHealthChecker(logger, WithWatchdogClient(mockClient)) if err != nil { t.Fatalf("NewHealthChecker() failed: %v", err) } @@ -187,10 +176,11 @@ func TestHealthCheckerStart(t *testing.T) { time.Sleep(2 * interval) // Check logs to verify the health check ran - klog.Flush() - // prevent further writes into buf - klog.SetOutput(io.Discard) - logs := logBuffer.String() + underlier, ok := logger.GetSink().(ktesting.Underlier) + if !ok { + t.Fatalf("Should have had a ktesting LogSink, got %T", logger.GetSink()) + } + logs := underlier.GetBuffer().String() for _, expectedLog := range tt.expectedLogs { if !strings.Contains(logs, expectedLog) { t.Errorf("Expected log '%s' not found in logs: %s", expectedLog, logs) diff --git a/pkg/kubelet/watchdog/watchdog_unsupported.go b/pkg/kubelet/watchdog/watchdog_unsupported.go index 1030b20123b30..2595549e6ec77 100644 --- a/pkg/kubelet/watchdog/watchdog_unsupported.go +++ b/pkg/kubelet/watchdog/watchdog_unsupported.go @@ -23,6 +23,7 @@ import ( "context" "k8s.io/apiserver/pkg/server/healthz" + "k8s.io/klog/v2" ) type healthCheckerUnsupported struct{} @@ -36,7 +37,7 @@ func WithExtendedCheckers([]healthz.HealthChecker) Option { } // NewHealthChecker creates a fake one here -func NewHealthChecker(...Option) (HealthChecker, error) { +func NewHealthChecker(klog.Logger, ...Option) (HealthChecker, error) { return &healthCheckerUnsupported{}, nil } diff --git a/pkg/printers/internalversion/printers.go b/pkg/printers/internalversion/printers.go index d3e7e7cb55392..2207c1a18a9db 100644 --- a/pkg/printers/internalversion/printers.go +++ b/pkg/printers/internalversion/printers.go @@ -299,7 +299,6 @@ func AddHandlers(h printers.PrintHandler) { serviceAccountColumnDefinitions := []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, - {Name: "Secrets", Type: "string", Description: apiv1.ServiceAccount{}.SwaggerDoc()["secrets"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, } _ = h.TableHandler(serviceAccountColumnDefinitions, printServiceAccount) @@ -983,6 +982,7 @@ func printPod(pod *api.Pod, options printers.GenerateOptions) ([]metav1.TableRow restarts = restartableInitContainerRestarts lastRestartDate = lastRestartableInitContainerRestartDate hasRunning := false + errorReason := "" for i := len(pod.Status.ContainerStatuses) - 1; i >= 0; i-- { container := pod.Status.ContainerStatuses[i] @@ -993,27 +993,33 @@ func printPod(pod *api.Pod, options printers.GenerateOptions) ([]metav1.TableRow lastRestartDate = terminatedDate } } - if container.State.Waiting != nil && container.State.Waiting.Reason != "" { + switch { + case container.State.Waiting != nil && container.State.Waiting.Reason != "": reason = container.State.Waiting.Reason - } else if container.State.Terminated != nil && container.State.Terminated.Reason != "" { - reason = container.State.Terminated.Reason - } else if container.State.Terminated != nil && container.State.Terminated.Reason == "" { - if container.State.Terminated.Signal != 0 { + case container.State.Terminated != nil: + if len(container.State.Terminated.Reason) > 0 { + reason = container.State.Terminated.Reason + } else if container.State.Terminated.Signal != 0 { reason = fmt.Sprintf("Signal:%d", container.State.Terminated.Signal) } else { reason = fmt.Sprintf("ExitCode:%d", container.State.Terminated.ExitCode) } - } else if container.Ready && container.State.Running != nil { + if container.State.Terminated.ExitCode != 0 { + errorReason = reason + } + case container.Ready && container.State.Running != nil: hasRunning = true readyContainers++ } } // change pod status back to "Running" if there is at least one container still reporting as "Running" status - if reason == "Completed" && hasRunning { - if hasPodReadyCondition(pod.Status.Conditions) { + if reason == "Completed" { + if hasRunning && hasPodReadyCondition(pod.Status.Conditions) { reason = "Running" - } else { + } else if errorReason != "" { + reason = errorReason + } else if hasRunning { reason = "NotReady" } } @@ -1915,7 +1921,7 @@ func printServiceAccount(obj *api.ServiceAccount, options printers.GenerateOptio row := metav1.TableRow{ Object: runtime.RawExtension{Object: obj}, } - row.Cells = append(row.Cells, obj.Name, int64(len(obj.Secrets)), translateTimestampSince(obj.CreationTimestamp)) + row.Cells = append(row.Cells, obj.Name, translateTimestampSince(obj.CreationTimestamp)) return []metav1.TableRow{row}, nil } diff --git a/pkg/printers/internalversion/printers_test.go b/pkg/printers/internalversion/printers_test.go index 7aec7b01ff1ce..cc0700be31f6a 100644 --- a/pkg/printers/internalversion/printers_test.go +++ b/pkg/printers/internalversion/printers_test.go @@ -468,7 +468,7 @@ func TestPrintServiceAccount(t *testing.T) { Secrets: []api.ObjectReference{}, }, // Columns: Name, (Num) Secrets, Age - expected: []metav1.TableRow{{Cells: []interface{}{"sa1", int64(0), "0s"}}}, + expected: []metav1.TableRow{{Cells: []interface{}{"sa1", "0s"}}}, }, // Basic service account with two secrets. { @@ -483,7 +483,7 @@ func TestPrintServiceAccount(t *testing.T) { }, }, // Columns: Name, (Num) Secrets, Age - expected: []metav1.TableRow{{Cells: []interface{}{"sa1", int64(2), "0s"}}}, + expected: []metav1.TableRow{{Cells: []interface{}{"sa1", "0s"}}}, }, } @@ -1536,9 +1536,8 @@ func TestPrintPod(t *testing.T) { Phase: api.PodSucceeded, ContainerStatuses: []api.ContainerStatus{ { - Ready: false, - RestartCount: 0, - State: api.ContainerState{Terminated: &api.ContainerStateTerminated{Reason: "Completed", ExitCode: 0}}, + Ready: false, + State: api.ContainerState{Terminated: &api.ContainerStateTerminated{Reason: "Completed", ExitCode: 0}}, }, }, }, @@ -1554,9 +1553,8 @@ func TestPrintPod(t *testing.T) { Phase: api.PodFailed, ContainerStatuses: []api.ContainerStatus{ { - Ready: false, - RestartCount: 0, - State: api.ContainerState{Terminated: &api.ContainerStateTerminated{Reason: "Error", ExitCode: 1}}, + Ready: false, + State: api.ContainerState{Terminated: &api.ContainerStateTerminated{Reason: "Error", ExitCode: 1}}, }, }, }, @@ -1572,9 +1570,8 @@ func TestPrintPod(t *testing.T) { Phase: api.PodSucceeded, ContainerStatuses: []api.ContainerStatus{ { - Ready: false, - RestartCount: 0, - State: api.ContainerState{Terminated: &api.ContainerStateTerminated{Reason: "Completed", ExitCode: 0}}, + Ready: false, + State: api.ContainerState{Terminated: &api.ContainerStateTerminated{Reason: "Completed", ExitCode: 0}}, }, }, }, @@ -1587,12 +1584,11 @@ func TestPrintPod(t *testing.T) { ObjectMeta: metav1.ObjectMeta{Name: "test19", DeletionTimestamp: &deleteTime}, Spec: api.PodSpec{Containers: make([]api.Container, 1)}, Status: api.PodStatus{ - Phase: "Running", + Phase: api.PodRunning, ContainerStatuses: []api.ContainerStatus{ { - Ready: false, - RestartCount: 0, - State: api.ContainerState{Running: &api.ContainerStateRunning{}}, + Ready: false, + State: api.ContainerState{Running: &api.ContainerStateRunning{}}, }, }, }, @@ -1604,11 +1600,165 @@ func TestPrintPod(t *testing.T) { ObjectMeta: metav1.ObjectMeta{Name: "test20", DeletionTimestamp: &deleteTime}, Spec: api.PodSpec{Containers: make([]api.Container, 1)}, Status: api.PodStatus{ - Phase: "Pending", + Phase: api.PodPending, }, }, []metav1.TableRow{{Cells: []interface{}{"test20", "0/1", "Terminating", "0", ""}}}, }, + // Test the two containers. They are ready and State are Error/Running + // reference: https://github.com/kubernetes/kubernetes/issues/107713 + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "test21"}, + Spec: api.PodSpec{Containers: make([]api.Container, 2)}, + Status: api.PodStatus{ + Phase: api.PodFailed, + ContainerStatuses: []api.ContainerStatus{ + { + Ready: false, + State: api.ContainerState{Terminated: &api.ContainerStateTerminated{ + FinishedAt: metav1.NewTime(time.Now()), + ExitCode: 1, + Reason: "podCrash"}, + }, + LastTerminationState: api.ContainerState{}, + }, + { + Ready: true, + State: api.ContainerState{Running: &api.ContainerStateRunning{ + StartedAt: metav1.NewTime(time.Now())}, + }, + LastTerminationState: api.ContainerState{}, + }, + }, + }, + }, + []metav1.TableRow{ + { + Cells: []interface{}{"test21", "1/2", "podCrash", "0", ""}, + Conditions: podFailedConditions, + }, + }, + }, + // Test the two containers. They are ready and State are Running/Error + // reference: https://github.com/kubernetes/kubernetes/issues/107713 + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "test22"}, + Spec: api.PodSpec{Containers: make([]api.Container, 2)}, + Status: api.PodStatus{ + Phase: api.PodFailed, + ContainerStatuses: []api.ContainerStatus{ + { + Ready: true, + State: api.ContainerState{Running: &api.ContainerStateRunning{ + StartedAt: metav1.NewTime(time.Now())}, + }, + LastTerminationState: api.ContainerState{}, + }, + { + Ready: false, + State: api.ContainerState{Terminated: &api.ContainerStateTerminated{ + FinishedAt: metav1.NewTime(time.Now()), + ExitCode: 1, + Reason: "podCrash"}, + }, + LastTerminationState: api.ContainerState{}, + }, + }, + }, + }, + []metav1.TableRow{ + { + Cells: []interface{}{"test22", "1/2", "podCrash", "0", ""}, + Conditions: podFailedConditions, + }, + }, + }, + { + // Test the three containers. They are ready and State are Running/Error/Completed + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "test23"}, + Spec: api.PodSpec{Containers: make([]api.Container, 3)}, + Status: api.PodStatus{ + Phase: "Failed", + ContainerStatuses: []api.ContainerStatus{ + { + Ready: true, + State: api.ContainerState{Running: &api.ContainerStateRunning{ + StartedAt: metav1.NewTime(time.Now())}, + }, + LastTerminationState: api.ContainerState{}, + }, + { + Ready: true, + State: api.ContainerState{Terminated: &api.ContainerStateTerminated{ + FinishedAt: metav1.NewTime(time.Now()), + ExitCode: 1, + Reason: "podCrash"}, + }, + LastTerminationState: api.ContainerState{}, + }, + { + Ready: true, + State: api.ContainerState{Terminated: &api.ContainerStateTerminated{ + FinishedAt: metav1.NewTime(time.Now()), + ExitCode: 0}, + }, + LastTerminationState: api.ContainerState{}, + }, + }, + }, + }, + []metav1.TableRow{ + { + Cells: []interface{}{"test23", "1/3", "podCrash", "0", ""}, + Conditions: podFailedConditions, + }, + }, + }, + { + // Test the three containers. They are notReady and State are Running/Error/Completed + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "test24"}, + Spec: api.PodSpec{Containers: make([]api.Container, 3)}, + Status: api.PodStatus{ + Phase: "Failed", + ContainerStatuses: []api.ContainerStatus{ + { + Ready: false, + State: api.ContainerState{Running: &api.ContainerStateRunning{ + StartedAt: metav1.NewTime(time.Now())}, + }, + LastTerminationState: api.ContainerState{}, + }, + { + Ready: false, + State: api.ContainerState{Terminated: &api.ContainerStateTerminated{ + FinishedAt: metav1.NewTime(time.Now()), + ExitCode: 1, + Reason: "podCrash"}, + }, + LastTerminationState: api.ContainerState{}, + }, + { + Ready: false, + State: api.ContainerState{Terminated: &api.ContainerStateTerminated{ + FinishedAt: metav1.NewTime(time.Now()), + ExitCode: 0}, + }, + LastTerminationState: api.ContainerState{}, + }, + }, + }, + }, + []metav1.TableRow{ + { + Cells: []interface{}{"test24", "0/3", "podCrash", "0", ""}, + Conditions: podFailedConditions, + }, + }, + }, } for i, test := range tests { diff --git a/pkg/proxy/apis/config/validation/validation_test.go b/pkg/proxy/apis/config/validation/validation_test.go index b80ab4354e448..6275d4ee399ac 100644 --- a/pkg/proxy/apis/config/validation/validation_test.go +++ b/pkg/proxy/apis/config/validation/validation_test.go @@ -56,7 +56,8 @@ func TestValidateKubeProxyConfiguration(t *testing.T) { MasqueradeAll: true, }, Logging: logsapi.LoggingConfiguration{ - Format: "text", + Format: "text", + FlushFrequency: logsapi.TimeOrMetaDuration{Duration: metav1.Duration{Duration: logsapi.LogFlushFreqDefault}}, }, } newPath := field.NewPath("KubeProxyConfiguration") @@ -174,7 +175,8 @@ func TestValidateKubeProxyConfiguration(t *testing.T) { "invalid logging format": { mutateConfigFunc: func(config *kubeproxyconfig.KubeProxyConfiguration) { config.Logging = logsapi.LoggingConfiguration{ - Format: "unsupported format", + Format: "unsupported format", + FlushFrequency: logsapi.TimeOrMetaDuration{Duration: metav1.Duration{Duration: logsapi.LogFlushFreqDefault}}, } }, expectedErrs: field.ErrorList{field.Invalid(newPath.Child("logging.format"), "unsupported format", "Unsupported log format")}, diff --git a/pkg/proxy/iptables/proxier.go b/pkg/proxy/iptables/proxier.go index c599c2b001509..d4f8cf13dba2a 100644 --- a/pkg/proxy/iptables/proxier.go +++ b/pkg/proxy/iptables/proxier.go @@ -404,7 +404,7 @@ var iptablesCleanupOnlyChains = []iptablesJumpChain{} // CleanupLeftovers removes all iptables rules and chains created by the Proxier // It returns true if an error was encountered. Errors are logged. func CleanupLeftovers(ctx context.Context) (encounteredError bool) { - ipts, _ := utiliptables.NewDualStack() + ipts := utiliptables.NewBestEffort() for _, ipt := range ipts { encounteredError = cleanupLeftoversForFamily(ctx, ipt) || encounteredError } diff --git a/pkg/proxy/ipvs/proxier.go b/pkg/proxy/ipvs/proxier.go index 8fc01b2979841..aa4b4dd2c6c5a 100644 --- a/pkg/proxy/ipvs/proxier.go +++ b/pkg/proxy/ipvs/proxier.go @@ -706,7 +706,7 @@ func CleanupLeftovers(ctx context.Context) (encounteredError bool) { return false } - ipts, _ := utiliptables.NewDualStack() + ipts := utiliptables.NewBestEffort() ipsetInterface := utilipset.New() ipvsInterface := utilipvs.New() diff --git a/pkg/proxy/node.go b/pkg/proxy/node.go index d8c3afd0e9a9e..556ca5905f0b4 100644 --- a/pkg/proxy/node.go +++ b/pkg/proxy/node.go @@ -81,7 +81,7 @@ func newNodeManager(ctx context.Context, client clientset.Interface, resyncInter // initialize the informer and wait for cache sync thisNodeInformerFactory.Start(wait.NeverStop) - if !cache.WaitForNamedCacheSync("node informer cache", ctx.Done(), nodeInformer.Informer().HasSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, nodeInformer.Informer().HasSynced) { return nil, fmt.Errorf("can not sync node informer") } diff --git a/pkg/proxy/util/localdetector.go b/pkg/proxy/util/localdetector.go index 6e296b0c71b80..9e579e8876123 100644 --- a/pkg/proxy/util/localdetector.go +++ b/pkg/proxy/util/localdetector.go @@ -98,8 +98,8 @@ func NewDetectLocalByBridgeInterface(interfaceName string) LocalTrafficDetector return &detectLocal{ ifLocal: []string{"-i", interfaceName}, ifNotLocal: []string{"!", "-i", interfaceName}, - ifLocalNFT: []string{"iif", interfaceName}, - ifNotLocalNFT: []string{"iif", "!=", interfaceName}, + ifLocalNFT: []string{"iifname", interfaceName}, + ifNotLocalNFT: []string{"iifname", "!=", interfaceName}, } } @@ -110,7 +110,7 @@ func NewDetectLocalByInterfaceNamePrefix(interfacePrefix string) LocalTrafficDet return &detectLocal{ ifLocal: []string{"-i", interfacePrefix + "+"}, ifNotLocal: []string{"!", "-i", interfacePrefix + "+"}, - ifLocalNFT: []string{"iif", interfacePrefix + "*"}, - ifNotLocalNFT: []string{"iif", "!=", interfacePrefix + "*"}, + ifLocalNFT: []string{"iifname", interfacePrefix + "*"}, + ifNotLocalNFT: []string{"iifname", "!=", interfacePrefix + "*"}, } } diff --git a/pkg/proxy/util/localdetector_test.go b/pkg/proxy/util/localdetector_test.go index 473aaeb8ce45e..0fb36934262a5 100644 --- a/pkg/proxy/util/localdetector_test.go +++ b/pkg/proxy/util/localdetector_test.go @@ -105,6 +105,37 @@ func TestDetectLocalByBridgeInterface(t *testing.T) { } } +func TestDetectLocalNFTByBridgeInterface(t *testing.T) { + cases := []struct { + ifaceName string + expectedJumpIfOutput []string + expectedJumpIfNotOutput []string + }{ + { + ifaceName: "eth0", + expectedJumpIfOutput: []string{"iifname", "eth0"}, + expectedJumpIfNotOutput: []string{"iifname", "!=", "eth0"}, + }, + } + for _, c := range cases { + localDetector := NewDetectLocalByBridgeInterface(c.ifaceName) + if !localDetector.IsImplemented() { + t.Error("DetectLocalByBridgeInterface returns false for IsImplemented") + } + + ifLocal := localDetector.IfLocalNFT() + ifNotLocal := localDetector.IfNotLocalNFT() + + if !reflect.DeepEqual(ifLocal, c.expectedJumpIfOutput) { + t.Errorf("IfLocalNFT, expected: '%v', but got: '%v'", c.expectedJumpIfOutput, ifLocal) + } + + if !reflect.DeepEqual(ifNotLocal, c.expectedJumpIfNotOutput) { + t.Errorf("IfNotLocalNFT, expected: '%v', but got: '%v'", c.expectedJumpIfNotOutput, ifNotLocal) + } + } +} + func TestDetectLocalByInterfaceNamePrefix(t *testing.T) { cases := []struct { ifacePrefix string @@ -137,3 +168,36 @@ func TestDetectLocalByInterfaceNamePrefix(t *testing.T) { } } } + +func TestDetectLocalNFTByInterfaceNamePrefix(t *testing.T) { + cases := []struct { + ifacePrefix string + chain string + args []string + expectedJumpIfOutput []string + expectedJumpIfNotOutput []string + }{ + { + ifacePrefix: "eth", + expectedJumpIfOutput: []string{"iifname", "eth*"}, + expectedJumpIfNotOutput: []string{"iifname", "!=", "eth*"}, + }, + } + for _, c := range cases { + localDetector := NewDetectLocalByInterfaceNamePrefix(c.ifacePrefix) + if !localDetector.IsImplemented() { + t.Error("DetectLocalByInterfaceNamePrefix returns false for IsImplemented") + } + + ifLocal := localDetector.IfLocalNFT() + ifNotLocal := localDetector.IfNotLocalNFT() + + if !reflect.DeepEqual(ifLocal, c.expectedJumpIfOutput) { + t.Errorf("IfLocalNFT, expected: '%v', but got: '%v'", c.expectedJumpIfOutput, ifLocal) + } + + if !reflect.DeepEqual(ifNotLocal, c.expectedJumpIfNotOutput) { + t.Errorf("IfNotLocalNFT, expected: '%v', but got: '%v'", c.expectedJumpIfNotOutput, ifNotLocal) + } + } +} diff --git a/pkg/proxy/util/nfacct/nfacct_linux_test.go b/pkg/proxy/util/nfacct/nfacct_linux_test.go index 175aa180a1d9d..54185098dc500 100644 --- a/pkg/proxy/util/nfacct/nfacct_linux_test.go +++ b/pkg/proxy/util/nfacct/nfacct_linux_test.go @@ -1,5 +1,5 @@ -//go:build linux -// +build linux +//go:build linux && !s390x +// +build linux,!s390x /* Copyright 2024 The Kubernetes Authors. @@ -17,6 +17,9 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Skip s390x: This test is disabled on s390x due to failures caused by little-endian specific input data. +// See issue: https://github.com/kubernetes/kubernetes/issues/130343 + package nfacct import ( diff --git a/pkg/proxy/winkernel/hns.go b/pkg/proxy/winkernel/hns.go index d6e425f8b77b8..80bb208adff10 100644 --- a/pkg/proxy/winkernel/hns.go +++ b/pkg/proxy/winkernel/hns.go @@ -349,17 +349,21 @@ func (hns hns) getAllLoadBalancers() (map[loadBalancerIdentifier]*loadBalancerIn func (hns hns) getLoadBalancer(endpoints []endpointInfo, flags loadBalancerFlags, sourceVip string, vip string, protocol uint16, internalPort uint16, externalPort uint16, previousLoadBalancers map[loadBalancerIdentifier]*loadBalancerInfo) (*loadBalancerInfo, error) { var id loadBalancerIdentifier vips := []string{} - // Compute hash from backends (endpoint IDs) - hash, err := hashEndpoints(endpoints) - if err != nil { - klog.V(2).ErrorS(err, "Error hashing endpoints", "endpoints", endpoints) - return nil, err + id, lbIdErr := findLoadBalancerID( + endpoints, + vip, + protocol, + internalPort, + externalPort, + ) + + if lbIdErr != nil { + klog.V(2).ErrorS(lbIdErr, "Error hashing endpoints", "endpoints", endpoints) + return nil, lbIdErr } + if len(vip) > 0 { - id = loadBalancerIdentifier{protocol: protocol, internalPort: internalPort, externalPort: externalPort, vip: vip, endpointsHash: hash} vips = append(vips, vip) - } else { - id = loadBalancerIdentifier{protocol: protocol, internalPort: internalPort, externalPort: externalPort, endpointsHash: hash} } if lb, found := previousLoadBalancers[id]; found { diff --git a/pkg/proxy/winkernel/hns_test.go b/pkg/proxy/winkernel/hns_test.go index ca436394b01a1..b859ad639efb6 100644 --- a/pkg/proxy/winkernel/hns_test.go +++ b/pkg/proxy/winkernel/hns_test.go @@ -39,6 +39,8 @@ const ( epIpv6Address = "192::3" epIpAddressB = "192.168.1.4" epIpAddressRemote = "192.168.2.3" + epIpAddressLocal1 = "192.168.4.4" + epIpAddressLocal2 = "192.168.4.5" epPaAddress = "10.0.0.3" protocol = 6 internalPort = 80 diff --git a/pkg/proxy/winkernel/proxier.go b/pkg/proxy/winkernel/proxier.go index f32a5cb4fc6b4..141741c266bf8 100644 --- a/pkg/proxy/winkernel/proxier.go +++ b/pkg/proxy/winkernel/proxier.go @@ -1526,7 +1526,7 @@ func (proxier *Proxier) syncProxyRules() (retryError error) { } if !proxier.requiresUpdateLoadbalancer(svcInfo.hnsID, len(clusterIPEndpoints)) { - proxier.deleteExistingLoadBalancer(hns, svcInfo.winProxyOptimization, &svcInfo.hnsID, svcInfo.ClusterIP().String(), Enum(svcInfo.Protocol()), uint16(svcInfo.targetPort), uint16(svcInfo.Port()), hnsEndpoints, queriedLoadBalancers) + proxier.deleteExistingLoadBalancer(hns, svcInfo.winProxyOptimization, &svcInfo.hnsID, svcInfo.ClusterIP().String(), Enum(svcInfo.Protocol()), uint16(svcInfo.targetPort), uint16(svcInfo.Port()), clusterIPEndpoints, queriedLoadBalancers) if len(clusterIPEndpoints) > 0 { // If all endpoints are terminating, then no need to create Cluster IP LoadBalancer diff --git a/pkg/proxy/winkernel/proxier_test.go b/pkg/proxy/winkernel/proxier_test.go index d6a2a31e2c34a..aaa39ded01caa 100644 --- a/pkg/proxy/winkernel/proxier_test.go +++ b/pkg/proxy/winkernel/proxier_test.go @@ -48,15 +48,19 @@ import ( const ( testNodeName = "test-node" testNetwork = "TestNetwork" - ipAddress = "10.0.0.1" prefixLen = 24 macAddress = "00-11-22-33-44-55" + macAddressLocal1 = "00-11-22-33-44-56" + macAddressLocal2 = "00-11-22-33-44-57" destinationPrefix = "192.168.2.0/24" providerAddress = "10.0.0.3" guid = "123ABC" + networkId = "123ABC" endpointGuid1 = "EPID-1" loadbalancerGuid1 = "LBID-1" - endpointLocal = "EP-LOCAL" + loadbalancerGuid2 = "LBID-2" + endpointLocal1 = "EP-LOCAL-1" + endpointLocal2 = "EP-LOCAL-2" endpointGw = "EP-GW" epIpAddressGw = "192.168.2.1" epMacAddressGw = "00-11-22-33-44-66" @@ -413,6 +417,193 @@ func TestDsrNotAppliedToClusterTrafficPolicy(t *testing.T) { } } +// TestClusterIPSvcWithITPLocal tests the following scenarios for a ClusterIP service with InternalTrafficPolicy=Local: +// 1. When a local endpoint is added to the service, the service should continue to use the local endpoints and existing loadbalancer. +// If no existing loadbalancer is present, a new loadbalancer should be created. +// 2. When one more local endpoint is added to the service, the service should delete existing loadbalancer and create a new loadbalancer. +// 3. When a remote endpoint is added to the service, the service should continue to use the local endpoints and existing loadbalancer, +// since it's a InternalTrafficPolicy=Local service. +func TestClusterIPSvcWithITPLocal(t *testing.T) { + proxier := NewFakeProxier(t, "testhost", netutils.ParseIPSloppy("10.0.0.1"), "L2Bridge", true) + if proxier == nil { + t.Fatal("Failed to create proxier") + } + + svcIP := "10.20.30.41" + svcPort := 80 + svcPortName := proxy.ServicePortName{ + NamespacedName: makeNSN("ns1", "svc1"), + Port: "p80", + Protocol: v1.ProtocolTCP, + } + + itpLocal := v1.ServiceInternalTrafficPolicyLocal + + makeServiceMap(proxier, + makeTestService(svcPortName.Namespace, svcPortName.Name, func(svc *v1.Service) { + svc.Spec.Type = v1.ServiceTypeClusterIP + svc.Spec.ClusterIP = svcIP + svc.Spec.InternalTrafficPolicy = &itpLocal // Setting the InternalTrafficPolicy to Local + svc.Spec.Ports = []v1.ServicePort{{ + Name: svcPortName.Port, + Port: int32(svcPort), + Protocol: v1.ProtocolTCP, + }} + }), + ) + + populateEndpointSlices(proxier, + makeTestEndpointSlice(svcPortName.Namespace, svcPortName.Name, 1, func(eps *discovery.EndpointSlice) { + eps.AddressType = discovery.AddressTypeIPv4 + eps.Endpoints = []discovery.Endpoint{ + { + Addresses: []string{epIpAddressLocal1}, // Local Endpoint 1 + }, + } + eps.Ports = []discovery.EndpointPort{{ + Name: ptr.To(svcPortName.Port), + Port: ptr.To(int32(svcPort)), + Protocol: ptr.To(v1.ProtocolTCP), + }} + }), + ) + + hcn := (proxier.hcn).(*fakehcn.HcnMock) + // Populating the endpoint to the cache, since it's a local endpoint and local endpoints are managed by CNI and not KubeProxy + // Populating here marks the endpoint to local + hcn.PopulateQueriedEndpoints(endpointLocal1, networkId, epIpAddressLocal1, macAddressLocal1, prefixLen) + + proxier.setInitialized(true) + + // Test 1: When a local endpoint is added to the service, the service should continue to use the local endpoints and existing loadbalancer. + // If no existing loadbalancer is present, a new loadbalancer should be created. + proxier.syncProxyRules() + + ep := proxier.endpointsMap[svcPortName][0] + epInfo, ok := ep.(*endpointInfo) + assert.True(t, ok, fmt.Sprintf("Failed to cast endpointInfo %q", svcPortName.String())) + assert.NotEmpty(t, epInfo.hnsID, fmt.Sprintf("Expected HNS ID to be set for endpoint %s, but got empty value", epIpAddressRemote)) + + svc := proxier.svcPortMap[svcPortName] + svcInfo, ok := svc.(*serviceInfo) + assert.True(t, ok, "Failed to cast serviceInfo %q", svcPortName.String()) + assert.Equal(t, svcInfo.hnsID, loadbalancerGuid1, fmt.Sprintf("%v does not match %v", svcInfo.hnsID, loadbalancerGuid1)) + lb, err := proxier.hcn.GetLoadBalancerByID(loadbalancerGuid1) + assert.Equal(t, nil, err, fmt.Sprintf("Failed to fetch loadbalancer: %s. Error: %v", loadbalancerGuid1, err)) + assert.NotNil(t, lb, "Loadbalancer object should not be nil") + + // Test 2: When one more local endpoint is added to the service, the service should delete existing loadbalancer and create a new loadbalancer. + + proxier.setInitialized(false) + + proxier.OnEndpointSliceUpdate( + makeTestEndpointSlice(svcPortName.Namespace, svcPortName.Name, 1, func(eps *discovery.EndpointSlice) { + eps.AddressType = discovery.AddressTypeIPv4 + eps.Endpoints = []discovery.Endpoint{{ + Addresses: []string{epIpAddressLocal1}, + }} + eps.Ports = []discovery.EndpointPort{{ + Name: ptr.To(svcPortName.Port), + Port: ptr.To(int32(svcPort)), + Protocol: ptr.To(v1.ProtocolTCP), + }} + }), + makeTestEndpointSlice(svcPortName.Namespace, svcPortName.Name, 1, func(eps *discovery.EndpointSlice) { + eps.AddressType = discovery.AddressTypeIPv4 + eps.Endpoints = []discovery.Endpoint{ + { + Addresses: []string{epIpAddressLocal1}, + }, + { + Addresses: []string{epIpAddressLocal2}, // Adding one more local endpoint + }, + } + eps.Ports = []discovery.EndpointPort{{ + Name: ptr.To(svcPortName.Port), + Port: ptr.To(int32(svcPort)), + Protocol: ptr.To(v1.ProtocolTCP), + }} + })) + + proxier.mu.Lock() + proxier.endpointSlicesSynced = true + proxier.mu.Unlock() + + proxier.setInitialized(true) + + // Creating the second local endpoint + hcn.PopulateQueriedEndpoints(endpointLocal2, networkId, epIpAddressLocal2, macAddressLocal2, prefixLen) + // Reinitiating the syncProxyRules to create new loadbalancer with the new local endpoint + proxier.syncProxyRules() + svc = proxier.svcPortMap[svcPortName] + svcInfo, ok = svc.(*serviceInfo) + assert.True(t, ok, "Failed to cast serviceInfo %q", svcPortName.String()) + assert.Equal(t, svcInfo.hnsID, loadbalancerGuid2, fmt.Sprintf("%v does not match %v", svcInfo.hnsID, loadbalancerGuid2)) + lb, err = proxier.hcn.GetLoadBalancerByID(loadbalancerGuid2) + assert.Equal(t, nil, err, fmt.Sprintf("Failed to fetch loadbalancer: %s. Error: %v", loadbalancerGuid2, err)) + assert.NotNil(t, lb, "Loadbalancer object should not be nil") + + lb, _ = proxier.hcn.GetLoadBalancerByID(loadbalancerGuid1) + assert.Nil(t, lb, fmt.Sprintf("Loadbalancer object should be nil: %s", loadbalancerGuid1)) + + // Test 3: When a remote endpoint is added to the service, the service should continue to use the local endpoints and existing loadbalancer, + // since it's a InternalTrafficPolicy=Local service. + + proxier.setInitialized(false) + + proxier.OnEndpointSliceUpdate( + makeTestEndpointSlice(svcPortName.Namespace, svcPortName.Name, 1, func(eps *discovery.EndpointSlice) { + eps.AddressType = discovery.AddressTypeIPv4 + eps.Endpoints = []discovery.Endpoint{ + { + Addresses: []string{epIpAddressLocal1}, + }, + { + Addresses: []string{epIpAddressLocal2}, + }, + } + eps.Ports = []discovery.EndpointPort{{ + Name: ptr.To(svcPortName.Port), + Port: ptr.To(int32(svcPort)), + Protocol: ptr.To(v1.ProtocolTCP), + }} + }), + makeTestEndpointSlice(svcPortName.Namespace, svcPortName.Name, 1, func(eps *discovery.EndpointSlice) { + eps.AddressType = discovery.AddressTypeIPv4 + eps.Endpoints = []discovery.Endpoint{ + { + Addresses: []string{epIpAddressLocal1}, + }, + { + Addresses: []string{epIpAddressLocal2}, // Adding one more local endpoint + }, + { + Addresses: []string{epIpAddressRemote}, // Adding one more remote endpoint to the slice + }, + } + eps.Ports = []discovery.EndpointPort{{ + Name: ptr.To(svcPortName.Port), + Port: ptr.To(int32(svcPort)), + Protocol: ptr.To(v1.ProtocolTCP), + }} + })) + + proxier.mu.Lock() + proxier.endpointSlicesSynced = true + proxier.mu.Unlock() + + proxier.setInitialized(true) + + proxier.syncProxyRules() + svc = proxier.svcPortMap[svcPortName] + svcInfo, ok = svc.(*serviceInfo) + assert.True(t, ok, "Failed to cast serviceInfo %q", svcPortName.String()) + assert.Equal(t, svcInfo.hnsID, loadbalancerGuid2, fmt.Sprintf("%v does not match %v", svcInfo.hnsID, loadbalancerGuid2)) + lb, err = proxier.hcn.GetLoadBalancerByID(loadbalancerGuid2) + assert.Equal(t, nil, err, fmt.Sprintf("Failed to fetch loadbalancer: %s. Error: %v", loadbalancerGuid2, err)) + assert.NotNil(t, lb, "Loadbalancer object should not be nil") +} + func TestSharedRemoteEndpointDelete(t *testing.T) { proxier := NewFakeProxier(t, testNodeName, netutils.ParseIPSloppy("10.0.0.1"), "L2Bridge", true) if proxier == nil { @@ -1198,7 +1389,7 @@ func TestCreateDsrLoadBalancer(t *testing.T) { hcn := (proxier.hcn).(*fakehcn.HcnMock) proxier.rootHnsEndpointName = endpointGw - hcn.PopulateQueriedEndpoints(endpointLocal, guid, epIpAddressRemote, macAddress, prefixLen) + hcn.PopulateQueriedEndpoints(endpointLocal1, guid, epIpAddressRemote, macAddress, prefixLen) hcn.PopulateQueriedEndpoints(endpointGw, guid, epIpAddressGw, epMacAddressGw, prefixLen) proxier.setInitialized(true) proxier.syncProxyRules() diff --git a/pkg/registry/apps/statefulset/strategy.go b/pkg/registry/apps/statefulset/strategy.go index bd81741e114cc..ed33e5eeadbc7 100644 --- a/pkg/registry/apps/statefulset/strategy.go +++ b/pkg/registry/apps/statefulset/strategy.go @@ -118,11 +118,6 @@ func (statefulSetStrategy) PrepareForUpdate(ctx context.Context, obj, old runtim // newSvc.Spec.MyFeature = nil // } func dropStatefulSetDisabledFields(newSS *apps.StatefulSet, oldSS *apps.StatefulSet) { - if !utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) { - if oldSS == nil || oldSS.Spec.PersistentVolumeClaimRetentionPolicy == nil { - newSS.Spec.PersistentVolumeClaimRetentionPolicy = nil - } - } if !utilfeature.DefaultFeatureGate.Enabled(features.MaxUnavailableStatefulSet) && !maxUnavailableInUse(oldSS) { if newSS.Spec.UpdateStrategy.RollingUpdate != nil { newSS.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable = nil diff --git a/pkg/registry/apps/statefulset/strategy_test.go b/pkg/registry/apps/statefulset/strategy_test.go index 672a25e34376a..25a49812dfea9 100644 --- a/pkg/registry/apps/statefulset/strategy_test.go +++ b/pkg/registry/apps/statefulset/strategy_test.go @@ -187,8 +187,7 @@ func TestStatefulSetStrategy(t *testing.T) { Status: apps.StatefulSetStatus{Replicas: 4}, } - t.Run("when StatefulSetAutoDeletePVC feature gate is enabled, PersistentVolumeClaimRetentionPolicy should be updated", func(t *testing.T) { - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.StatefulSetAutoDeletePVC, true) + t.Run("PersistentVolumeClaimRetentionPolicy should be updated", func(t *testing.T) { // Test creation ps := &apps.StatefulSet{ ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, @@ -227,8 +226,7 @@ func TestStatefulSetStrategy(t *testing.T) { t.Errorf("expected PersistentVolumeClaimRetentionPolicy to be updated: %v", errs) } }) - t.Run("when StatefulSetAutoDeletePVC feature gate is disabled, PersistentVolumeClaimRetentionPolicy should not be updated", func(t *testing.T) { - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.StatefulSetAutoDeletePVC, true) + t.Run("PersistentVolumeClaimRetentionPolicy should not be updated", func(t *testing.T) { // Test creation ps := &apps.StatefulSet{ ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, @@ -261,7 +259,7 @@ func TestStatefulSetStrategy(t *testing.T) { Strategy.PrepareForUpdate(ctx, validPs, invalidPs) errs = Strategy.ValidateUpdate(ctx, validPs, ps) if len(errs) != 0 { - t.Errorf("should ignore updates to PersistentVolumeClaimRetentionPolicyType") + t.Errorf("unexpected failure with PersistentVolumeClaimRetentionPolicy: %v", errs) } }) @@ -331,15 +329,6 @@ func TestStatefulSetStatusStrategy(t *testing.T) { } } -// generateStatefulSetWithMinReadySeconds generates a StatefulSet with min values -func generateStatefulSetWithMinReadySeconds(minReadySeconds int32) *apps.StatefulSet { - return &apps.StatefulSet{ - Spec: apps.StatefulSetSpec{ - MinReadySeconds: minReadySeconds, - }, - } -} - func makeStatefulSetWithMaxUnavailable(maxUnavailable *int) *apps.StatefulSet { rollingUpdate := apps.RollingUpdateStatefulSetStrategy{} if maxUnavailable != nil { @@ -359,38 +348,6 @@ func makeStatefulSetWithMaxUnavailable(maxUnavailable *int) *apps.StatefulSet { } } -func createOrdinalsWithStart(start int) *apps.StatefulSetOrdinals { - return &apps.StatefulSetOrdinals{ - Start: int32(start), - } -} - -func makeStatefulSetWithStatefulSetOrdinals(ordinals *apps.StatefulSetOrdinals) *apps.StatefulSet { - validSelector := map[string]string{"a": "b"} - validPodTemplate := api.PodTemplate{ - Template: api.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: validSelector, - }, - Spec: api.PodSpec{ - RestartPolicy: api.RestartPolicyAlways, - DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, - }, - }, - } - return &apps.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: "ss", Namespace: metav1.NamespaceDefault}, - Spec: apps.StatefulSetSpec{ - Ordinals: ordinals, - Selector: &metav1.LabelSelector{MatchLabels: validSelector}, - Template: validPodTemplate.Template, - UpdateStrategy: apps.StatefulSetUpdateStrategy{Type: apps.RollingUpdateStatefulSetStrategyType}, - PodManagementPolicy: apps.OrderedReadyPodManagement, - }, - } -} - // TestDropStatefulSetDisabledFields tests if the drop functionality is working fine or not func TestDropStatefulSetDisabledFields(t *testing.T) { testCases := []struct { @@ -400,24 +357,6 @@ func TestDropStatefulSetDisabledFields(t *testing.T) { oldSS *apps.StatefulSet expectedSS *apps.StatefulSet }{ - { - name: "set minReadySeconds, no update", - ss: generateStatefulSetWithMinReadySeconds(10), - oldSS: generateStatefulSetWithMinReadySeconds(20), - expectedSS: generateStatefulSetWithMinReadySeconds(10), - }, - { - name: "set minReadySeconds, oldSS field set to nil", - ss: generateStatefulSetWithMinReadySeconds(10), - oldSS: nil, - expectedSS: generateStatefulSetWithMinReadySeconds(10), - }, - { - name: "set minReadySeconds, oldSS field is set to 0", - ss: generateStatefulSetWithMinReadySeconds(10), - oldSS: generateStatefulSetWithMinReadySeconds(0), - expectedSS: generateStatefulSetWithMinReadySeconds(10), - }, { name: "MaxUnavailable not enabled, field not used", ss: makeStatefulSetWithMaxUnavailable(nil), @@ -452,18 +391,6 @@ func TestDropStatefulSetDisabledFields(t *testing.T) { oldSS: makeStatefulSetWithMaxUnavailable(ptr.To(3)), expectedSS: makeStatefulSetWithMaxUnavailable(ptr.To(1)), }, - { - name: "set ordinals, ordinals in use in new only", - ss: makeStatefulSetWithStatefulSetOrdinals(createOrdinalsWithStart(2)), - oldSS: nil, - expectedSS: makeStatefulSetWithStatefulSetOrdinals(createOrdinalsWithStart(2)), - }, - { - name: "set ordinals, ordinals in use in both old and new", - ss: makeStatefulSetWithStatefulSetOrdinals(createOrdinalsWithStart(2)), - oldSS: makeStatefulSetWithStatefulSetOrdinals(createOrdinalsWithStart(1)), - expectedSS: makeStatefulSetWithStatefulSetOrdinals(createOrdinalsWithStart(2)), - }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { diff --git a/pkg/registry/certificates/certificates/declarative_validation_test.go b/pkg/registry/certificates/certificates/declarative_validation_test.go index 7e8fd4c59bc84..4039bc682c5ab 100644 --- a/pkg/registry/certificates/certificates/declarative_validation_test.go +++ b/pkg/registry/certificates/certificates/declarative_validation_test.go @@ -29,12 +29,9 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - utilfeature "k8s.io/apiserver/pkg/util/feature" - featuregatetesting "k8s.io/component-base/featuregate/testing" apitesting "k8s.io/kubernetes/pkg/api/testing" api "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/features" "k8s.io/utils/ptr" ) @@ -60,31 +57,31 @@ func testDeclarativeValidateForDeclarative(t *testing.T, apiVersion string) { input api.CertificateSigningRequest expectedErrs field.ErrorList }{ - "no conditions - valid": { + "status.conditions: none = valid": { input: makeValidCSR(), }, - "approved condition - valid": { + "status.conditions: Approved = valid": { input: makeValidCSR(withApprovedCondition()), }, - "denied condition - valid": { + "status.conditions: Denied = valid": { input: makeValidCSR(withDeniedCondition()), }, - "failed condition - valid": { + "status.conditions: Failed = valid": { input: makeValidCSR(withFailedCondition()), }, - "approved+failed conditions - valid": { + "status.conditions: Approved+Failed = valid": { input: makeValidCSR(withApprovedCondition(), withFailedCondition()), }, - "denied+failed conditions - valid": { + "status.conditions: Denied+Failed = valid": { input: makeValidCSR(withDeniedCondition(), withFailedCondition()), }, - "approved+denied conditions - invalid": { + "status.conditions: Approved+Denied = invalid": { input: makeValidCSR(withApprovedCondition(), withDeniedCondition()), expectedErrs: field.ErrorList{ field.Invalid(field.NewPath("status", "conditions"), nil, "").WithOrigin("zeroOrOneOf"), }, }, - "denied+approved conditions - invalid": { + "status.conditions: Denied+Approved = invalid": { input: makeValidCSR(withDeniedCondition(), withApprovedCondition()), expectedErrs: field.ErrorList{ field.Invalid(field.NewPath("status", "conditions"), nil, "").WithOrigin("zeroOrOneOf"), @@ -93,35 +90,7 @@ func testDeclarativeValidateForDeclarative(t *testing.T, apiVersion string) { } for k, tc := range testCases { t.Run(k, func(t *testing.T) { - var declarativeTakeoverErrs field.ErrorList - var imperativeErrs field.ErrorList - for _, gateVal := range []bool{true, false} { - // We only need to test both gate enabled and disabled together, because - // 1) the DeclarativeValidationTakeover won't take effect if DeclarativeValidation is disabled. - // 2) the validation output, when only DeclarativeValidation is enabled, is the same as when both gates are disabled. - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeclarativeValidation, gateVal) - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeclarativeValidationTakeover, gateVal) - - errs := Strategy.Validate(ctx, &tc.input) - if gateVal { - declarativeTakeoverErrs = errs - } else { - imperativeErrs = errs - } - // The errOutputMatcher is used to verify the output matches the expected errors in test cases. - errOutputMatcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin() - if len(tc.expectedErrs) > 0 { - errOutputMatcher.Test(t, tc.expectedErrs, errs) - } else if len(errs) != 0 { - t.Errorf("expected no errors, but got: %v", errs) - } - } - // The equivalenceMatcher is used to verify the output errors from hand-written imperative validation - // are equivalent to the output errors when DeclarativeValidationTakeover is enabled. - equivalenceMatcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin() - equivalenceMatcher.Test(t, imperativeErrs, declarativeTakeoverErrs) - - apitesting.VerifyVersionedValidationEquivalence(t, &tc.input, nil) + apitesting.VerifyValidationEquivalence(t, ctx, &tc.input, Strategy.Validate, tc.expectedErrs) }) } } @@ -208,6 +177,11 @@ func testValidateUpdateForDeclarative(t *testing.T, apiVersion string) { ), subresources: []string{"/approval"}, // Can only modify Approved and Denied conditions on /approval subresource }, + "ratcheting: allow existing duplicate types - valid": { + old: makeValidCSR(withApprovedCondition(), withApprovedCondition(), withDeniedCondition(), withDeniedCondition()), + update: makeValidCSR(withDeniedCondition(), withDeniedCondition(), withApprovedCondition(), withApprovedCondition()), + subresources: []string{"/status"}, + }, } for k, tc := range testCases { @@ -226,49 +200,7 @@ func testValidateUpdateForDeclarative(t *testing.T, apiVersion string) { tc.old.ResourceVersion = "1" tc.update.ResourceVersion = "1" - var declarativeTakeoverErrs field.ErrorList - var imperativeErrs field.ErrorList - for _, gateVal := range []bool{true, false} { - // We only need to test both gate enabled and disabled together, because - // 1) the DeclarativeValidationTakeover won't take effect if DeclarativeValidation is disabled. - // 2) the validation output, when only DeclarativeValidation is enabled, is the same as when both gates are disabled. - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeclarativeValidation, gateVal) - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeclarativeValidationTakeover, gateVal) - errs := strategy.ValidateUpdate(ctx, &tc.update, &tc.old) - if gateVal { - declarativeTakeoverErrs = errs - } else { - imperativeErrs = errs - } - // The errOutputMatcher is used to verify the output matches the expected errors in test cases. - errOutputMatcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin() - - if len(tc.expectedErrs) > 0 { - errOutputMatcher.Test(t, tc.expectedErrs, errs) - } else if len(errs) != 0 { - t.Errorf("expected no errors, but got: %v", errs) - } - } - // The equivalenceMatcher is used to verify the output errors from hand-written imperative validation - // are equivalent to the output errors when DeclarativeValidationTakeover is enabled. - equivalenceMatcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin() - // TODO: remove this once ErrorMatcher has been extended to handle this form of deduplication. - dedupedImperativeErrs := field.ErrorList{} - for _, err := range imperativeErrs { - found := false - for _, existingErr := range dedupedImperativeErrs { - if equivalenceMatcher.Matches(existingErr, err) { - found = true - break - } - } - if !found { - dedupedImperativeErrs = append(dedupedImperativeErrs, err) - } - } - equivalenceMatcher.Test(t, dedupedImperativeErrs, declarativeTakeoverErrs) - - apitesting.VerifyVersionedValidationEquivalence(t, &tc.update, &tc.old) + apitesting.VerifyUpdateValidationEquivalence(t, ctx, &tc.update, &tc.old, strategy.ValidateUpdate, tc.expectedErrs) }) } } diff --git a/pkg/registry/certificates/certificates/strategy.go b/pkg/registry/certificates/certificates/strategy.go index fde7fa70fe33e..6954100415bc9 100644 --- a/pkg/registry/certificates/certificates/strategy.go +++ b/pkg/registry/certificates/certificates/strategy.go @@ -20,6 +20,7 @@ import ( "context" "fmt" + "k8s.io/apimachinery/pkg/api/operation" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" @@ -29,11 +30,9 @@ import ( "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/storage/names" - utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/apis/certificates/validation" - "k8s.io/kubernetes/pkg/features" "sigs.k8s.io/structured-merge-diff/v6/fieldpath" ) @@ -116,24 +115,7 @@ func (csrStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object func (csrStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { csr := obj.(*certificates.CertificateSigningRequest) allErrs := validation.ValidateCertificateSigningRequestCreate(csr) - - // If DeclarativeValidation feature gate is enabled, also run declarative validation - if utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidation) { - // Determine if takeover is enabled - takeover := utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidationTakeover) - - // Run declarative validation with panic recovery - declarativeErrs := rest.ValidateDeclaratively(ctx, legacyscheme.Scheme, csr, rest.WithTakeover(takeover)) - - // Compare imperative and declarative errors and log + emit metric if there's a mismatch - rest.CompareDeclarativeErrorsAndEmitMismatches(ctx, allErrs, declarativeErrs, takeover) - - // Only apply declarative errors if takeover is enabled - if takeover { - allErrs = append(allErrs.RemoveCoveredByDeclarative(), declarativeErrs...) - } - } - return allErrs + return rest.ValidateDeclarativelyWithMigrationChecks(ctx, legacyscheme.Scheme, csr, nil, allErrs, operation.Create) } // WarningsOnCreate returns warnings for the creation of the given object. @@ -147,24 +129,7 @@ func (csrStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) oldCSR := old.(*certificates.CertificateSigningRequest) newCSR := obj.(*certificates.CertificateSigningRequest) errs := validation.ValidateCertificateSigningRequestUpdate(newCSR, oldCSR) - // If DeclarativeValidation feature gate is enabled, also run declarative validation - if utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidation) { - // Determine if takeover is enabled - takeover := utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidationTakeover) - - // Run declarative update validation with panic recovery - declarativeErrs := rest.ValidateUpdateDeclaratively(ctx, legacyscheme.Scheme, newCSR, oldCSR, rest.WithTakeover(takeover)) - - // Compare imperative and declarative errors and emit metric if there's a mismatch - rest.CompareDeclarativeErrorsAndEmitMismatches(ctx, errs, declarativeErrs, takeover) - - // Only apply declarative errors if takeover is enabled - if takeover { - errs = append(errs.RemoveCoveredByDeclarative(), declarativeErrs...) - } - } - - return errs + return rest.ValidateDeclarativelyWithMigrationChecks(ctx, legacyscheme.Scheme, newCSR, oldCSR, errs, operation.Update) } // WarningsOnUpdate returns warnings for the given update. @@ -280,22 +245,7 @@ func (csrStatusStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Ob newCSR := obj.(*certificates.CertificateSigningRequest) oldCSR := old.(*certificates.CertificateSigningRequest) errs := validation.ValidateCertificateSigningRequestStatusUpdate(newCSR, oldCSR) - if utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidation) { - // Determine if takeover is enabled - takeover := utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidationTakeover) - - // Run declarative update validation with panic recovery - declarativeErrs := rest.ValidateUpdateDeclaratively(ctx, legacyscheme.Scheme, newCSR, oldCSR, rest.WithTakeover(takeover)) - - // Compare imperative and declarative errors and emit metric if there's a mismatch - rest.CompareDeclarativeErrorsAndEmitMismatches(ctx, errs, declarativeErrs, takeover) - - // Only apply declarative errors if takeover is enabled - if takeover { - errs = append(errs.RemoveCoveredByDeclarative(), declarativeErrs...) - } - } - return errs + return rest.ValidateDeclarativelyWithMigrationChecks(ctx, legacyscheme.Scheme, newCSR, oldCSR, errs, operation.Update) } // WarningsOnUpdate returns warnings for the given update. @@ -350,22 +300,7 @@ func (csrApprovalStrategy) ValidateUpdate(ctx context.Context, obj, old runtime. newCSR := obj.(*certificates.CertificateSigningRequest) oldCSR := old.(*certificates.CertificateSigningRequest) errs := validation.ValidateCertificateSigningRequestApprovalUpdate(newCSR, oldCSR) - if utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidation) { - // Determine if takeover is enabled - takeover := utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidationTakeover) - - // Run declarative update validation with panic recovery - declarativeErrs := rest.ValidateUpdateDeclaratively(ctx, legacyscheme.Scheme, newCSR, oldCSR, rest.WithTakeover(takeover)) - - // Compare imperative and declarative errors and emit metric if there's a mismatch - rest.CompareDeclarativeErrorsAndEmitMismatches(ctx, errs, declarativeErrs, takeover) - - // Only apply declarative errors if takeover is enabled - if takeover { - errs = append(errs.RemoveCoveredByDeclarative(), declarativeErrs...) - } - } - return errs + return rest.ValidateDeclarativelyWithMigrationChecks(ctx, legacyscheme.Scheme, newCSR, oldCSR, errs, operation.Update) } // WarningsOnUpdate returns warnings for the given update. diff --git a/pkg/registry/core/namespace/storage/storage_test.go b/pkg/registry/core/namespace/storage/storage_test.go index a1bfd9e9af828..f9d3a5b34b946 100644 --- a/pkg/registry/core/namespace/storage/storage_test.go +++ b/pkg/registry/core/namespace/storage/storage_test.go @@ -151,7 +151,7 @@ func TestDeleteNamespaceWithIncompleteFinalizers(t *testing.T) { storage, server := newStorage(t) defer server.Terminate(t) defer storage.store.DestroyFunc() - key := "namespaces/foo" + key := "/namespaces/foo" ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceNone) now := metav1.Now() namespace := &api.Namespace{ @@ -188,7 +188,7 @@ func TestUpdateDeletingNamespaceWithIncompleteMetadataFinalizers(t *testing.T) { storage, server := newStorage(t) defer server.Terminate(t) defer storage.store.DestroyFunc() - key := "namespaces/foo" + key := "/namespaces/foo" ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceNone) now := metav1.Now() namespace := &api.Namespace{ @@ -224,7 +224,7 @@ func TestUpdateDeletingNamespaceWithIncompleteSpecFinalizers(t *testing.T) { storage, server := newStorage(t) defer server.Terminate(t) defer storage.store.DestroyFunc() - key := "namespaces/foo" + key := "/namespaces/foo" ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceNone) now := metav1.Now() namespace := &api.Namespace{ @@ -259,7 +259,7 @@ func TestUpdateDeletingNamespaceWithCompleteFinalizers(t *testing.T) { storage, server := newStorage(t) defer server.Terminate(t) defer storage.store.DestroyFunc() - key := "namespaces/foo" + key := "/namespaces/foo" ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceNone) now := metav1.Now() namespace := &api.Namespace{ @@ -301,7 +301,7 @@ func TestFinalizeDeletingNamespaceWithCompleteFinalizers(t *testing.T) { defer server.Terminate(t) defer storage.store.DestroyFunc() defer finalizeStorage.store.DestroyFunc() - key := "namespaces/foo" + key := "/namespaces/foo" ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceNone) now := metav1.Now() namespace := &api.Namespace{ @@ -345,7 +345,7 @@ func TestFinalizeDeletingNamespaceWithIncompleteMetadataFinalizers(t *testing.T) defer server.Terminate(t) defer storage.store.DestroyFunc() defer finalizeStorage.store.DestroyFunc() - key := "namespaces/foo" + key := "/namespaces/foo" ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceNone) now := metav1.Now() namespace := &api.Namespace{ @@ -382,7 +382,7 @@ func TestDeleteNamespaceWithCompleteFinalizers(t *testing.T) { storage, server := newStorage(t) defer server.Terminate(t) defer storage.store.DestroyFunc() - key := "namespaces/foo" + key := "/namespaces/foo" ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceNone) now := metav1.Now() namespace := &api.Namespace{ @@ -585,7 +585,7 @@ func TestDeleteWithGCFinalizers(t *testing.T) { } for _, test := range tests { - key := "namespaces/" + test.name + key := "/namespaces/" + test.name ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceNone) namespace := &api.Namespace{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/registry/core/persistentvolumeclaim/strategy.go b/pkg/registry/core/persistentvolumeclaim/strategy.go index 2500ed1b52a03..a35cee7d9a8c8 100644 --- a/pkg/registry/core/persistentvolumeclaim/strategy.go +++ b/pkg/registry/core/persistentvolumeclaim/strategy.go @@ -122,8 +122,7 @@ func (persistentvolumeclaimStrategy) ValidateUpdate(ctx context.Context, obj, ol newPvc := obj.(*api.PersistentVolumeClaim) oldPvc := old.(*api.PersistentVolumeClaim) opts := validation.ValidationOptionsForPersistentVolumeClaim(newPvc, oldPvc) - errorList := validation.ValidatePersistentVolumeClaim(newPvc, opts) - return append(errorList, validation.ValidatePersistentVolumeClaimUpdate(newPvc, oldPvc, opts)...) + return validation.ValidatePersistentVolumeClaimUpdate(newPvc, oldPvc, opts) } // WarningsOnUpdate returns warnings for the given update. diff --git a/pkg/registry/core/pod/rest/log_test.go b/pkg/registry/core/pod/rest/log_test.go index 77c0b66c137fc..159f952b19fef 100644 --- a/pkg/registry/core/pod/rest/log_test.go +++ b/pkg/registry/core/pod/rest/log_test.go @@ -36,7 +36,7 @@ import ( func TestPodLogValidates(t *testing.T) { config, server := registrytest.NewEtcdStorage(t, "") defer server.Terminate(t) - s, destroyFunc, err := generic.NewRawStorage(config, nil, nil, "") + s, destroyFunc, err := generic.NewRawStorage(config, nil, nil, "/pods") if err != nil { t.Fatalf("Unexpected error: %v", err) } diff --git a/pkg/registry/core/pod/storage/eviction.go b/pkg/registry/core/pod/storage/eviction.go index f088cf37de365..2a6561530a736 100644 --- a/pkg/registry/core/pod/storage/eviction.go +++ b/pkg/registry/core/pod/storage/eviction.go @@ -273,7 +273,7 @@ func (r *EvictionREST) Create(ctx context.Context, name string, obj runtime.Obje }) return err }() - if err == wait.ErrWaitTimeout { + if wait.Interrupted(err) { err = errors.NewTimeoutError(fmt.Sprintf("couldn't update PodDisruptionBudget %q due to conflicts", pdbName), 10) } if err != nil { @@ -434,7 +434,26 @@ func (r *EvictionREST) checkAndDecrement(namespace string, podName string, pdb p } if pdb.Status.DisruptionsAllowed == 0 { err := errors.NewTooManyRequests("Cannot evict pod as it would violate the pod's disruption budget.", 0) - err.ErrStatus.Details.Causes = append(err.ErrStatus.Details.Causes, metav1.StatusCause{Type: policyv1.DisruptionBudgetCause, Message: fmt.Sprintf("The disruption budget %s needs %d healthy pods and has %d currently", pdb.Name, pdb.Status.DesiredHealthy, pdb.Status.CurrentHealthy)}) + condition := meta.FindStatusCondition(pdb.Status.Conditions, policyv1.DisruptionAllowedCondition) + var msg string + switch { + // check whether sync is failed first because DesiredHealthy and CurrentHealthy are not trustworthy when the sync is failed + case condition != nil && condition.Status == metav1.ConditionFalse && len(condition.Message) > 0 && condition.Reason == policyv1.SyncFailedReason: + msg = fmt.Sprintf("The disruption budget %s does not allow evicting pods currently because it failed sync: %s", pdb.Name, condition.Message) + case pdb.Status.CurrentHealthy <= pdb.Status.DesiredHealthy: + msg = fmt.Sprintf("The disruption budget %s needs %d healthy pods and has %d currently", pdb.Name, pdb.Status.DesiredHealthy, pdb.Status.CurrentHealthy) + case condition != nil && condition.Status == metav1.ConditionFalse && len(condition.Message) > 0: + msg = fmt.Sprintf("The disruption budget %s does not allow evicting pods currently (%s): %s", pdb.Name, condition.Reason, condition.Message) + default: + msg = fmt.Sprintf("The disruption budget %s does not allow evicting pods currently", pdb.Name) + } + err.ErrStatus.Details.Causes = append( + err.ErrStatus.Details.Causes, + metav1.StatusCause{ + Type: policyv1.DisruptionBudgetCause, + Message: msg, + }, + ) return err } diff --git a/pkg/registry/core/pod/storage/eviction_test.go b/pkg/registry/core/pod/storage/eviction_test.go index a9d398ff7cd22..4cbdcfede7905 100644 --- a/pkg/registry/core/pod/storage/eviction_test.go +++ b/pkg/registry/core/pod/storage/eviction_test.go @@ -45,7 +45,7 @@ import ( "k8s.io/utils/ptr" ) -func TestEviction(t *testing.T) { +func TestEvictionWithETCD(t *testing.T) { testcases := []struct { name string pdbs []runtime.Object @@ -248,7 +248,7 @@ func TestEviction(t *testing.T) { } } -func TestEvictionIgnorePDB(t *testing.T) { +func TestEviction(t *testing.T) { testcases := []struct { name string pdbs []runtime.Object @@ -521,6 +521,64 @@ func TestEvictionIgnorePDB(t *testing.T) { Status: api.ConditionTrue, }, }, + { + name: "the error is about sync failure when the condition reason is SyncFailedReason", + pdbs: []runtime.Object{&policyv1.PodDisruptionBudget{ + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "default"}, + Spec: policyv1.PodDisruptionBudgetSpec{Selector: &metav1.LabelSelector{}}, + Status: policyv1.PodDisruptionBudgetStatus{ + DisruptionsAllowed: 0, + Conditions: []metav1.Condition{ + { + Type: policyv1.DisruptionAllowedCondition, + Status: metav1.ConditionFalse, + Reason: policyv1.SyncFailedReason, + Message: "hoge", + }, + }, + }, + }}, + eviction: &policy.Eviction{ObjectMeta: metav1.ObjectMeta{Name: "t12", Namespace: "default"}, DeleteOptions: metav1.NewDeleteOptions(0)}, + expectError: "Cannot evict pod as it would violate the pod's disruption budget.: TooManyRequests: The disruption budget foo does not allow evicting pods currently because it failed sync: hoge", + podName: "t12", + expectedDeleteCount: 0, + podTerminating: false, + podPhase: api.PodRunning, + prc: &api.PodCondition{ + Type: api.PodReady, + Status: api.ConditionTrue, + }, + }, + { + name: "the error includes the reason when the condition.Status is False", + pdbs: []runtime.Object{&policyv1.PodDisruptionBudget{ + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "default"}, + Spec: policyv1.PodDisruptionBudgetSpec{Selector: &metav1.LabelSelector{}}, + Status: policyv1.PodDisruptionBudgetStatus{ + DisruptionsAllowed: 0, + CurrentHealthy: 4, + DesiredHealthy: 3, + Conditions: []metav1.Condition{ + { + Type: policyv1.DisruptionAllowedCondition, + Status: metav1.ConditionFalse, + Reason: "bar-reason", + Message: "hoge", + }, + }, + }, + }}, + eviction: &policy.Eviction{ObjectMeta: metav1.ObjectMeta{Name: "t12", Namespace: "default"}, DeleteOptions: metav1.NewDeleteOptions(0)}, + expectError: "Cannot evict pod as it would violate the pod's disruption budget.: TooManyRequests: The disruption budget foo does not allow evicting pods currently (bar-reason): hoge", + podName: "t12", + expectedDeleteCount: 0, + podTerminating: false, + podPhase: api.PodRunning, + prc: &api.PodCondition{ + Type: api.PodReady, + Status: api.ConditionTrue, + }, + }, } for _, unhealthyPodEvictionPolicy := range []*policyv1.UnhealthyPodEvictionPolicyType{unhealthyPolicyPtr(policyv1.AlwaysAllow), nil, unhealthyPolicyPtr(policyv1.IfHealthyBudget)} { diff --git a/pkg/registry/core/replicationcontroller/declarative_validation_test.go b/pkg/registry/core/replicationcontroller/declarative_validation_test.go index 099b0402f42cf..e3ad7f6efaff1 100644 --- a/pkg/registry/core/replicationcontroller/declarative_validation_test.go +++ b/pkg/registry/core/replicationcontroller/declarative_validation_test.go @@ -17,17 +17,16 @@ limitations under the License. package replicationcontroller import ( + "fmt" + "strings" "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/validation/field" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - utilfeature "k8s.io/apiserver/pkg/util/feature" - featuregatetesting "k8s.io/component-base/featuregate/testing" podtest "k8s.io/kubernetes/pkg/api/pod/testing" apitesting "k8s.io/kubernetes/pkg/api/testing" api "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/features" "k8s.io/utils/ptr" ) @@ -44,8 +43,117 @@ func TestDeclarativeValidateForDeclarative(t *testing.T) { "empty resource": { input: mkValidReplicationController(), }, + // metadata.name + "name: empty": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.Name = "" + }), + expectedErrs: field.ErrorList{ + field.Required(field.NewPath("metadata.name"), ""), + }, + }, + "name: label format": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.Name = "this-is-a-label" + }), + }, + "name: subdomain format": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.Name = "this.is.a.subdomain" + }), + }, + "name: invalid label format": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.Name = "-this-is-not-a-label" + }), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("metadata.name"), nil, "").WithOrigin("format=k8s-long-name"), + }, + }, + "name: invalid subdomain format": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.Name = ".this.is.not.a.subdomain" + }), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("metadata.name"), nil, "").WithOrigin("format=k8s-long-name"), + }, + }, + "name: label format with trailing dash": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.Name = "this-is-a-label-" + }), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("metadata.name"), nil, "").WithOrigin("format=k8s-long-name"), + }, + }, + "name: subdomain format with trailing dash": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.Name = "this.is.a.subdomain-" + }), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("metadata.name"), nil, "").WithOrigin("format=k8s-long-name"), + }, + }, + "name: long label format": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.Name = strings.Repeat("x", 253) + }), + }, + "name: long subdomain format": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.Name = strings.Repeat("x.", 126) + "x" + }), + }, + "name: too long label format": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.Name = strings.Repeat("x", 254) + }), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("metadata.name"), nil, "").WithOrigin("format=k8s-long-name"), + }, + }, + "name: too long subdomain format": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.Name = strings.Repeat("x.", 126) + "xx" + }), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("metadata.name"), nil, "").WithOrigin("format=k8s-long-name"), + }, + }, + // metadata.generateName (note: it's is not really validated) + "generateName: valid with empty name": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.Name = "" + rc.GenerateName = "name" + }), + expectedErrs: field.ErrorList{ + field.Required(field.NewPath("metadata.name"), ""), + field.InternalError(field.NewPath("metadata.name"), fmt.Errorf("")), + }, + }, + + "generateName: label format": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.GenerateName = "this-is-a-label" + }), + }, + "generateName: subdomain format": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.GenerateName = "this.is.a.subdomain" + }), + }, + "generateName: invalid format": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.GenerateName = "Obviously not a valid generateName!!" + }), + }, + "generateName: too long": { + input: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.GenerateName = strings.Repeat("x", 4096) + }), + }, // spec.replicas - "nil replicas": { + "replicas: nil": { input: mkValidReplicationController(func(rc *api.ReplicationController) { rc.Spec.Replicas = nil }), @@ -53,32 +161,26 @@ func TestDeclarativeValidateForDeclarative(t *testing.T) { field.Required(field.NewPath("spec.replicas"), ""), }, }, - "0 replicas": { + "replicas: 0": { input: mkValidReplicationController(setSpecReplicas(0)), }, - "1 replicas": { - input: mkValidReplicationController(setSpecReplicas(1)), - }, - "positive replicas": { + "replicas: positive": { input: mkValidReplicationController(setSpecReplicas(100)), }, - "negative replicas": { + "replicas: negative": { input: mkValidReplicationController(setSpecReplicas(-1)), expectedErrs: field.ErrorList{ field.Invalid(field.NewPath("spec.replicas"), nil, "").WithOrigin("minimum"), }, }, // spec.minReadySeconds - "0 minReadySeconds": { + "minReadySeconds: 0": { input: mkValidReplicationController(setSpecMinReadySeconds(0)), }, - "1 minReadySeconds": { - input: mkValidReplicationController(setSpecMinReadySeconds(1)), - }, - "positive minReadySeconds": { + "minReadySeconds: positive": { input: mkValidReplicationController(setSpecMinReadySeconds(100)), }, - "negative minReadySeconds": { + "minReadySeconds: negative": { input: mkValidReplicationController(setSpecMinReadySeconds(-1)), expectedErrs: field.ErrorList{ field.Invalid(field.NewPath("spec.minReadySeconds"), nil, "").WithOrigin("minimum"), @@ -87,35 +189,7 @@ func TestDeclarativeValidateForDeclarative(t *testing.T) { } for k, tc := range testCases { t.Run(k, func(t *testing.T) { - var declarativeTakeoverErrs field.ErrorList - var imperativeErrs field.ErrorList - for _, gateVal := range []bool{true, false} { - // We only need to test both gate enabled and disabled together, because - // 1) the DeclarativeValidationTakeover won't take effect if DeclarativeValidation is disabled. - // 2) the validation output, when only DeclarativeValidation is enabled, is the same as when both gates are disabled. - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeclarativeValidation, gateVal) - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeclarativeValidationTakeover, gateVal) - - errs := Strategy.Validate(ctx, &tc.input) - if gateVal { - declarativeTakeoverErrs = errs - } else { - imperativeErrs = errs - } - // The errOutputMatcher is used to verify the output matches the expected errors in test cases. - errOutputMatcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin() - if len(tc.expectedErrs) > 0 { - errOutputMatcher.Test(t, tc.expectedErrs, errs) - } else if len(errs) != 0 { - t.Errorf("expected no errors, but got: %v", errs) - } - } - // The equivalenceMatcher is used to verify the output errors from hand-written imperative validation - // are equivalent to the output errors when DeclarativeValidationTakeover is enabled. - equivalenceMatcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin() - equivalenceMatcher.Test(t, imperativeErrs, declarativeTakeoverErrs) - - apitesting.VerifyVersionedValidationEquivalence(t, &tc.input, nil) + apitesting.VerifyValidationEquivalence(t, ctx, &tc.input, Strategy.Validate, tc.expectedErrs) }) } } @@ -131,12 +205,31 @@ func TestValidateUpdateForDeclarative(t *testing.T) { expectedErrs field.ErrorList }{ // baseline - "baseline": { + "no change": { old: mkValidReplicationController(), update: mkValidReplicationController(), }, + // metadata.name + "name: changed": { + old: mkValidReplicationController(), + update: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.Name += "x" + }), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("metadata.name"), nil, ""), + }, + }, + // metadata.generateName + "generateName: changed": { + old: mkValidReplicationController(), + update: mkValidReplicationController(func(rc *api.ReplicationController) { + rc.GenerateName += "x" + }), + // This is, oddly, mutable. We should probably ratchet this off + // and make it immutable. + }, // spec.replicas - "nil replicas": { + "replicas: nil": { old: mkValidReplicationController(), update: mkValidReplicationController(func(rc *api.ReplicationController) { rc.Spec.Replicas = nil @@ -145,19 +238,15 @@ func TestValidateUpdateForDeclarative(t *testing.T) { field.Required(field.NewPath("spec.replicas"), ""), }, }, - "0 replicas": { + "replicas: 0": { old: mkValidReplicationController(), update: mkValidReplicationController(setSpecReplicas(0)), }, - "1 replicas": { - old: mkValidReplicationController(), - update: mkValidReplicationController(setSpecReplicas(1)), - }, - "positive replicas": { + "replicas: positive": { old: mkValidReplicationController(), update: mkValidReplicationController(setSpecReplicas(100)), }, - "negative replicas": { + "replicas: negative": { old: mkValidReplicationController(), update: mkValidReplicationController(setSpecReplicas(-1)), expectedErrs: field.ErrorList{ @@ -165,19 +254,15 @@ func TestValidateUpdateForDeclarative(t *testing.T) { }, }, // spec.minReadySeconds - "0 minReadySeconds": { + "minReadySeconds: 0": { old: mkValidReplicationController(), update: mkValidReplicationController(setSpecMinReadySeconds(0)), }, - "1 minReadySeconds": { - old: mkValidReplicationController(), - update: mkValidReplicationController(setSpecMinReadySeconds(1)), - }, - "positive minReadySeconds": { + "minReadySeconds: positive": { old: mkValidReplicationController(), update: mkValidReplicationController(setSpecMinReadySeconds(3)), }, - "negative minReadySeconds": { + "minReadySeconds: negative": { old: mkValidReplicationController(), update: mkValidReplicationController(setSpecMinReadySeconds(-1)), expectedErrs: field.ErrorList{ @@ -189,49 +274,7 @@ func TestValidateUpdateForDeclarative(t *testing.T) { t.Run(k, func(t *testing.T) { tc.old.ObjectMeta.ResourceVersion = "1" tc.update.ObjectMeta.ResourceVersion = "1" - var declarativeTakeoverErrs field.ErrorList - var imperativeErrs field.ErrorList - for _, gateVal := range []bool{true, false} { - // We only need to test both gate enabled and disabled together, because - // 1) the DeclarativeValidationTakeover won't take effect if DeclarativeValidation is disabled. - // 2) the validation output, when only DeclarativeValidation is enabled, is the same as when both gates are disabled. - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeclarativeValidation, gateVal) - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeclarativeValidationTakeover, gateVal) - errs := Strategy.ValidateUpdate(ctx, &tc.update, &tc.old) - if gateVal { - declarativeTakeoverErrs = errs - } else { - imperativeErrs = errs - } - // The errOutputMatcher is used to verify the output matches the expected errors in test cases. - errOutputMatcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin() - - if len(tc.expectedErrs) > 0 { - errOutputMatcher.Test(t, tc.expectedErrs, errs) - } else if len(errs) != 0 { - t.Errorf("expected no errors, but got: %v", errs) - } - } - // The equivalenceMatcher is used to verify the output errors from hand-written imperative validation - // are equivalent to the output errors when DeclarativeValidationTakeover is enabled. - equivalenceMatcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin() - // TODO: remove this once RC's validation is fixed to not return duplicate errors. - dedupedImperativeErrs := field.ErrorList{} - for _, err := range imperativeErrs { - found := false - for _, existingErr := range dedupedImperativeErrs { - if equivalenceMatcher.Matches(existingErr, err) { - found = true - break - } - } - if !found { - dedupedImperativeErrs = append(dedupedImperativeErrs, err) - } - } - equivalenceMatcher.Test(t, dedupedImperativeErrs, declarativeTakeoverErrs) - - apitesting.VerifyVersionedValidationEquivalence(t, &tc.update, &tc.old) + apitesting.VerifyUpdateValidationEquivalence(t, ctx, &tc.update, &tc.old, Strategy.ValidateUpdate, tc.expectedErrs) }) } } diff --git a/pkg/registry/core/replicationcontroller/storage/scale_declarative_validation_test.go b/pkg/registry/core/replicationcontroller/storage/scale_declarative_validation_test.go index 6c7eeacb77e3d..0b4596fad7a33 100644 --- a/pkg/registry/core/replicationcontroller/storage/scale_declarative_validation_test.go +++ b/pkg/registry/core/replicationcontroller/storage/scale_declarative_validation_test.go @@ -25,12 +25,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/validation/field" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/registry/rest" utilfeature "k8s.io/apiserver/pkg/util/feature" featuregatetesting "k8s.io/component-base/featuregate/testing" apitesting "k8s.io/kubernetes/pkg/api/testing" "k8s.io/kubernetes/pkg/apis/autoscaling" - "k8s.io/kubernetes/pkg/features" ) func TestValidateScaleForDeclarative(t *testing.T) { diff --git a/pkg/registry/core/replicationcontroller/storage/storage.go b/pkg/registry/core/replicationcontroller/storage/storage.go index a43c700c4c1a6..bee5ffb8c2890 100644 --- a/pkg/registry/core/replicationcontroller/storage/storage.go +++ b/pkg/registry/core/replicationcontroller/storage/storage.go @@ -23,6 +23,7 @@ import ( "fmt" "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/operation" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" @@ -32,7 +33,6 @@ import ( "k8s.io/apiserver/pkg/registry/generic" genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" "k8s.io/apiserver/pkg/registry/rest" - utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/autoscaling" @@ -40,7 +40,6 @@ import ( "k8s.io/kubernetes/pkg/apis/autoscaling/validation" api "k8s.io/kubernetes/pkg/apis/core" extensionsv1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/printers" printersinternal "k8s.io/kubernetes/pkg/printers/internalversion" printerstorage "k8s.io/kubernetes/pkg/printers/storage" @@ -315,24 +314,7 @@ func (i *scaleUpdatedObjectInfo) UpdatedObject(ctx context.Context, oldObj runti } errs := validation.ValidateScale(scale) - - // If DeclarativeValidation feature gate is enabled, also run declarative validation - if utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidation) { - // Determine if takeover is enabled - takeover := utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidationTakeover) - - // Run declarative validation with panic recovery - declarativeErrs := rest.ValidateUpdateDeclaratively( - ctx, legacyscheme.Scheme, scale, oldScale, rest.WithTakeover(takeover), rest.WithSubresourceMapper(i.scaleGVKMapper)) - - // Compare imperative and declarative errors and log + emit metric if there's a mismatch - rest.CompareDeclarativeErrorsAndEmitMismatches(ctx, errs, declarativeErrs, takeover) - - // Only apply declarative errors if takeover is enabled - if takeover { - errs = append(errs.RemoveCoveredByDeclarative(), declarativeErrs...) - } - } + errs = rest.ValidateDeclarativelyWithMigrationChecks(ctx, legacyscheme.Scheme, scale, oldScale, errs, operation.Update, rest.WithSubresourceMapper(i.scaleGVKMapper)) if len(errs) > 0 { return nil, errors.NewInvalid(autoscaling.Kind("Scale"), replicationcontroller.Name, errs) diff --git a/pkg/registry/core/replicationcontroller/strategy.go b/pkg/registry/core/replicationcontroller/strategy.go index b2a5c85f36edf..9fed503ca6309 100644 --- a/pkg/registry/core/replicationcontroller/strategy.go +++ b/pkg/registry/core/replicationcontroller/strategy.go @@ -28,6 +28,7 @@ import ( corev1 "k8s.io/api/core/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/api/operation" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" @@ -39,13 +40,11 @@ import ( "k8s.io/apiserver/pkg/registry/rest" apistorage "k8s.io/apiserver/pkg/storage" "k8s.io/apiserver/pkg/storage/names" - utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/api/pod" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/apis/core/helper" corevalidation "k8s.io/kubernetes/pkg/apis/core/validation" - "k8s.io/kubernetes/pkg/features" ) // rcStrategy implements verification logic for Replication Controllers. @@ -129,24 +128,7 @@ func (rcStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorL // Run imperative validation allErrs := corevalidation.ValidateReplicationController(controller, opts) - - // If DeclarativeValidation feature gate is enabled, also run declarative validation - if utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidation) { - // Determine if takeover is enabled - takeover := utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidationTakeover) - - // Run declarative validation with panic recovery - declarativeErrs := rest.ValidateDeclaratively(ctx, legacyscheme.Scheme, controller, rest.WithTakeover(takeover)) - - // Compare imperative and declarative errors and log + emit metric if there's a mismatch - rest.CompareDeclarativeErrorsAndEmitMismatches(ctx, allErrs, declarativeErrs, takeover) - - // Only apply declarative errors if takeover is enabled - if takeover { - allErrs = append(allErrs.RemoveCoveredByDeclarative(), declarativeErrs...) - } - } - return allErrs + return rest.ValidateDeclarativelyWithMigrationChecks(ctx, legacyscheme.Scheme, controller, nil, allErrs, operation.Create) } // WarningsOnCreate returns warnings for the creation of the given object. @@ -176,10 +158,7 @@ func (rcStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) f newRc := obj.(*api.ReplicationController) opts := pod.GetValidationOptionsFromPodTemplate(newRc.Spec.Template, oldRc.Spec.Template) - // This should be fixed to avoid the redundant calls, but carefully. - validationErrorList := corevalidation.ValidateReplicationController(newRc, opts) - updateErrorList := corevalidation.ValidateReplicationControllerUpdate(newRc, oldRc, opts) - errs := append(validationErrorList, updateErrorList...) + errs := corevalidation.ValidateReplicationControllerUpdate(newRc, oldRc, opts) for key, value := range helper.NonConvertibleFields(oldRc.Annotations) { parts := strings.Split(key, "/") @@ -198,24 +177,7 @@ func (rcStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) f } } - // If DeclarativeValidation feature gate is enabled, also run declarative validation - if utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidation) { - // Determine if takeover is enabled - takeover := utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidationTakeover) - - // Run declarative update validation with panic recovery - declarativeErrs := rest.ValidateUpdateDeclaratively(ctx, legacyscheme.Scheme, newRc, oldRc, rest.WithTakeover(takeover)) - - // Compare imperative and declarative errors and emit metric if there's a mismatch - rest.CompareDeclarativeErrorsAndEmitMismatches(ctx, errs, declarativeErrs, takeover) - - // Only apply declarative errors if takeover is enabled - if takeover { - errs = append(errs.RemoveCoveredByDeclarative(), declarativeErrs...) - } - } - - return errs + return rest.ValidateDeclarativelyWithMigrationChecks(ctx, legacyscheme.Scheme, newRc, oldRc, errs, operation.Update) } // WarningsOnUpdate returns warnings for the given update. diff --git a/pkg/registry/core/resourcequota/strategy.go b/pkg/registry/core/resourcequota/strategy.go index a57416d3fd001..5a6dda4820fb8 100644 --- a/pkg/registry/core/resourcequota/strategy.go +++ b/pkg/registry/core/resourcequota/strategy.go @@ -18,6 +18,7 @@ package resourcequota import ( "context" + "fmt" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" @@ -74,9 +75,36 @@ func (resourcequotaStrategy) Validate(ctx context.Context, obj runtime.Object) f return validation.ValidateResourceQuota(resourcequota) } +// all known resource names that we want to check for request <= limit +var knownResourceNames = []api.ResourceName{ + api.ResourceCPU, + api.ResourceMemory, + api.ResourceStorage, + api.ResourceEphemeralStorage, +} + // WarningsOnCreate returns warnings for the creation of the given object. func (resourcequotaStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { - return nil + resourcequota := obj.(*api.ResourceQuota) + var allWarnings []string + for _, resourceName := range knownResourceNames { + requestResourceName := api.ResourceName(fmt.Sprintf("requests.%s", resourceName)) + request, requestOK := resourcequota.Spec.Hard[requestResourceName] + if !requestOK && (resourceName == api.ResourceCPU || resourceName == api.ResourceMemory) { + // try the bare name for cpu and memory + request, requestOK = resourcequota.Spec.Hard[resourceName] + if requestOK { + requestResourceName = resourceName + } + } + limitResourceName := api.ResourceName(fmt.Sprintf("limits.%s", resourceName)) + limit, limitOK := resourcequota.Spec.Hard[limitResourceName] + if requestOK && limitOK && request.Cmp(limit) > 0 { + allWarnings = append(allWarnings, fmt.Sprintf("ResourceQuota %s (%s) should be less than %s (%s)", + requestResourceName, request.String(), limitResourceName, limit.String())) + } + } + return allWarnings } // Canonicalize normalizes the object after validation. diff --git a/pkg/registry/core/resourcequota/strategy_test.go b/pkg/registry/core/resourcequota/strategy_test.go index c571c2a336dc3..4066ec9407a48 100644 --- a/pkg/registry/core/resourcequota/strategy_test.go +++ b/pkg/registry/core/resourcequota/strategy_test.go @@ -17,6 +17,8 @@ limitations under the License. package resourcequota import ( + "context" + "reflect" "testing" "k8s.io/apimachinery/pkg/api/resource" @@ -58,3 +60,84 @@ func TestResourceQuotaStrategy(t *testing.T) { t.Errorf("ResourceQuota does not allow setting status on create") } } + +func Test_WarningsOnCreate(t *testing.T) { + tests := []struct { + name string + args *api.ResourceQuota + wantWarnings []string + }{ + { + name: "Empty Hard Spec", + args: &api.ResourceQuota{}, + wantWarnings: []string{}, + }, + { + name: "Request less than limit", + args: &api.ResourceQuota{ + Spec: api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourceName("requests.cpu"): resource.MustParse("500m"), + api.ResourceName("limits.cpu"): resource.MustParse("1"), + api.ResourceName("requests.memory"): resource.MustParse("1Gi"), + api.ResourceName("limits.memory"): resource.MustParse("2Gi"), + api.ResourceName("requests.storage"): resource.MustParse("1Gi"), + api.ResourceName("limits.storage"): resource.MustParse("2Gi"), + api.ResourceName("requests.ephemeral-storage"): resource.MustParse("1Gi"), + api.ResourceName("limits.ephemeral-storage"): resource.MustParse("2Gi"), + }, + }, + }, + wantWarnings: []string{}, + }, + { + name: "Request greater than limit", + args: &api.ResourceQuota{ + Spec: api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourceName("requests.cpu"): resource.MustParse("2"), + api.ResourceName("limits.cpu"): resource.MustParse("1"), + api.ResourceName("requests.memory"): resource.MustParse("3Gi"), + api.ResourceName("limits.memory"): resource.MustParse("2Gi"), + api.ResourceName("requests.storage"): resource.MustParse("3Gi"), + api.ResourceName("limits.storage"): resource.MustParse("2Gi"), + api.ResourceName("requests.ephemeral-storage"): resource.MustParse("3Gi"), + api.ResourceName("limits.ephemeral-storage"): resource.MustParse("2Gi"), + }, + }, + }, + wantWarnings: []string{ + "ResourceQuota requests.cpu (2) should be less than limits.cpu (1)", + "ResourceQuota requests.memory (3Gi) should be less than limits.memory (2Gi)", + "ResourceQuota requests.storage (3Gi) should be less than limits.storage (2Gi)", + "ResourceQuota requests.ephemeral-storage (3Gi) should be less than limits.ephemeral-storage (2Gi)", + }, + }, + { + name: "Request greater than limit, bare names", + args: &api.ResourceQuota{ + Spec: api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourceName("cpu"): resource.MustParse("2"), + api.ResourceName("limits.cpu"): resource.MustParse("1"), + api.ResourceName("memory"): resource.MustParse("3Gi"), + api.ResourceName("limits.memory"): resource.MustParse("2Gi"), + }, + }, + }, + wantWarnings: []string{ + "ResourceQuota cpu (2) should be less than limits.cpu (1)", + "ResourceQuota memory (3Gi) should be less than limits.memory (2Gi)", + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + warnings := Strategy.WarningsOnCreate(context.Background(), tt.args) + if len(warnings)+len(tt.wantWarnings) > 0 && !reflect.DeepEqual(warnings, tt.wantWarnings) { + t.Errorf("WarningsOnCreate()\n got: %q\n want: %q", warnings, tt.wantWarnings) + } + }) + } +} diff --git a/pkg/registry/core/service/allocator/storage/storage.go b/pkg/registry/core/service/allocator/storage/storage.go index 66599b2fa3e0f..11601537b33c5 100644 --- a/pkg/registry/core/service/allocator/storage/storage.go +++ b/pkg/registry/core/service/allocator/storage/storage.go @@ -63,9 +63,9 @@ var _ rangeallocation.RangeRegistry = &Etcd{} // NewEtcd returns an allocator that is backed by Etcd and can manage // persisting the snapshot state of allocation after each allocation is made. func NewEtcd(alloc allocator.Snapshottable, baseKey string, config *storagebackend.ConfigForResource) (*Etcd, error) { - // note that newFunc, newListFunc and resourcePrefix + // note that newFunc, newListFunc // can be left blank unless the storage.Watch method is used - storage, d, err := generic.NewRawStorage(config, nil, nil, "") + storage, d, err := generic.NewRawStorage(config, nil, nil, baseKey) if err != nil { return nil, err } diff --git a/pkg/registry/core/service/ipallocator/ipallocator.go b/pkg/registry/core/service/ipallocator/ipallocator.go index 6613523f4df93..1b47f6247e82a 100644 --- a/pkg/registry/core/service/ipallocator/ipallocator.go +++ b/pkg/registry/core/service/ipallocator/ipallocator.go @@ -73,7 +73,7 @@ type Allocator struct { var _ Interface = &Allocator{} // NewIPAllocator returns an IP allocator associated to a network range -// that use the IPAddress objectto track the assigned IP addresses, +// that use the IPAddress object to track the assigned IP addresses, // using an informer cache as storage. func NewIPAllocator( cidr *net.IPNet, @@ -253,7 +253,11 @@ func (a *Allocator) allocateNextService(svc *api.Service, dryRun bool) (net.IP, var offset uint64 switch { case rangeSize >= math.MaxInt64: - offset = rand.Uint64() + offset = a.rand.Uint64() + // a.offsetAddress + offset should not overflow a 64 bit CIDR. + if math.MaxUint64-offset < uint64(a.rangeOffset) { + offset -= uint64(a.rangeOffset) + } case rangeSize == 0: return net.IP{}, ErrFull default: @@ -493,7 +497,7 @@ func (dry dryRunAllocator) EnableMetrics() { func addOffsetAddress(address netip.Addr, offset uint64) (netip.Addr, error) { addressBytes := address.AsSlice() addressBig := big.NewInt(0).SetBytes(addressBytes) - r := big.NewInt(0).Add(addressBig, big.NewInt(int64(offset))).Bytes() + r := big.NewInt(0).Add(addressBig, big.NewInt(0).SetUint64(offset)).Bytes() // r must be 4 or 16 bytes depending of the ip family // bigInt conversion to bytes will not take this into consideration // and drop the leading zeros, so we have to take this into account. diff --git a/pkg/registry/core/service/ipallocator/ipallocator_test.go b/pkg/registry/core/service/ipallocator/ipallocator_test.go index 62e5409b54f18..9a3d5bfd7bfc2 100644 --- a/pkg/registry/core/service/ipallocator/ipallocator_test.go +++ b/pkg/registry/core/service/ipallocator/ipallocator_test.go @@ -198,6 +198,58 @@ func TestAllocateIPAllocator(t *testing.T) { } } +func TestAddOffsetAddress(t *testing.T) { + baseAddr := netip.MustParseAddr("fd54:ceea:51ad:2f00::0") + for _, tc := range []struct { + offset uint64 + wantAddr netip.Addr + }{ + { + offset: 0, + wantAddr: netip.MustParseAddr("fd54:ceea:51ad:2f00::0"), + }, + { + offset: 1, + wantAddr: netip.MustParseAddr("fd54:ceea:51ad:2f00::1"), + }, + { + offset: math.MaxInt64, + wantAddr: netip.MustParseAddr("fd54:ceea:51ad:2f00:7fff:ffff:ffff:ffff"), + }, + { + offset: math.MaxInt64 + 1, + wantAddr: netip.MustParseAddr("fd54:ceea:51ad:2f00:8000::"), + }, + { + offset: math.MaxUint64, + wantAddr: netip.MustParseAddr("fd54:ceea:51ad:2f00:ffff:ffff:ffff:ffff"), + }, + { + offset: math.MaxUint64 - 1, + wantAddr: netip.MustParseAddr("fd54:ceea:51ad:2f00:ffff:ffff:ffff:fffe"), + }, + { + offset: math.MaxUint64>>13 - 1, + wantAddr: netip.MustParseAddr("fd54:ceea:51ad:2f00:7:ffff:ffff:fffe"), + }, + { + offset: math.MaxUint64 >> 59, + wantAddr: netip.MustParseAddr("fd54:ceea:51ad:2f00::1f"), + }, + } { + t.Run(fmt.Sprintf("base:%s,offset:%x,want:%s", baseAddr, tc.offset, tc.wantAddr), func(t *testing.T) { + gotAddr, err := addOffsetAddress(baseAddr, tc.offset) + if err != nil { + t.Fatalf("err: %v", err) + } + + if gotAddr.Compare(tc.wantAddr) != 0 { + t.Fatalf("compareAddr: got %s, want %s", gotAddr, tc.wantAddr) + } + }) + } +} + func TestAllocateTinyIPAllocator(t *testing.T) { _, cidr, err := netutils.ParseCIDRSloppy("192.168.1.0/32") if err != nil { diff --git a/pkg/registry/core/service/ipallocator/storage/storage_test.go b/pkg/registry/core/service/ipallocator/storage/storage_test.go index 9d5b368288cdf..fb7aa138a4329 100644 --- a/pkg/registry/core/service/ipallocator/storage/storage_test.go +++ b/pkg/registry/core/service/ipallocator/storage/storage_test.go @@ -56,7 +56,7 @@ func newStorage(t *testing.T) (*etcd3testing.EtcdTestServer, ipallocator.Interfa if err != nil { t.Fatalf("unexpected error creating etcd: %v", err) } - s, d, err := generic.NewRawStorage(configForAllocations, nil, nil, "") + s, d, err := generic.NewRawStorage(configForAllocations, nil, nil, "/ranges/serviceips") if err != nil { t.Fatalf("Couldn't create storage: %v", err) } diff --git a/pkg/registry/core/service/portallocator/storage/storage_test.go b/pkg/registry/core/service/portallocator/storage/storage_test.go index d2925fc7bda5d..4629bed0002f8 100644 --- a/pkg/registry/core/service/portallocator/storage/storage_test.go +++ b/pkg/registry/core/service/portallocator/storage/storage_test.go @@ -58,7 +58,7 @@ func newStorage(t *testing.T) (*etcd3testing.EtcdTestServer, portallocator.Inter if err != nil { t.Fatalf("unexpected error creating etcd: %v", err) } - s, d, err := generic.NewRawStorage(configForAllocations, nil, nil, "") + s, d, err := generic.NewRawStorage(configForAllocations, nil, nil, "/ranges/servicenodeports") if err != nil { t.Fatalf("Couldn't create storage: %v", err) } diff --git a/pkg/registry/flowcontrol/rest/storage_flowcontrol.go b/pkg/registry/flowcontrol/rest/storage_flowcontrol.go index ca00bb71fcebc..055f858e15d58 100644 --- a/pkg/registry/flowcontrol/rest/storage_flowcontrol.go +++ b/pkg/registry/flowcontrol/rest/storage_flowcontrol.go @@ -37,7 +37,6 @@ import ( "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/flowcontrol" flowcontrolapisv1 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1" - flowcontrolapisv1beta3 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta3" "k8s.io/kubernetes/pkg/registry/flowcontrol/ensurer" flowschemastore "k8s.io/kubernetes/pkg/registry/flowcontrol/flowschema/storage" prioritylevelconfigurationstore "k8s.io/kubernetes/pkg/registry/flowcontrol/prioritylevelconfiguration/storage" @@ -57,12 +56,6 @@ const PostStartHookName = "priority-and-fairness-config-producer" func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (genericapiserver.APIGroupInfo, error) { apiGroupInfo := genericapiserver.NewDefaultAPIGroupInfo(flowcontrol.GroupName, legacyscheme.Scheme, legacyscheme.ParameterCodec, legacyscheme.Codecs) - if storageMap, err := p.storage(apiResourceConfigSource, restOptionsGetter, flowcontrolapisv1beta3.SchemeGroupVersion); err != nil { - return genericapiserver.APIGroupInfo{}, err - } else if len(storageMap) > 0 { - apiGroupInfo.VersionedResourcesStorageMap[flowcontrolapisv1beta3.SchemeGroupVersion.Version] = storageMap - } - if storageMap, err := p.storage(apiResourceConfigSource, restOptionsGetter, flowcontrolapisv1.SchemeGroupVersion); err != nil { return genericapiserver.APIGroupInfo{}, err } else if len(storageMap) > 0 { diff --git a/pkg/registry/rbac/clusterrole/strategy.go b/pkg/registry/rbac/clusterrole/strategy.go index ab5d6fcda0618..4b7a27a357943 100644 --- a/pkg/registry/rbac/clusterrole/strategy.go +++ b/pkg/registry/rbac/clusterrole/strategy.go @@ -93,8 +93,7 @@ func (strategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) fie opts := validation.ClusterRoleValidationOptions{ AllowInvalidLabelValueInSelector: hasInvalidLabelValueInLabelSelector(oldObj), } - errorList := validation.ValidateClusterRole(newObj, opts) - return append(errorList, validation.ValidateClusterRoleUpdate(newObj, old.(*rbac.ClusterRole), opts)...) + return validation.ValidateClusterRoleUpdate(newObj, old.(*rbac.ClusterRole), opts) } // WarningsOnUpdate returns warnings for the given update. diff --git a/pkg/registry/rbac/clusterrolebinding/strategy.go b/pkg/registry/rbac/clusterrolebinding/strategy.go index 83f0a54fadcef..7bfd68c17e1c3 100644 --- a/pkg/registry/rbac/clusterrolebinding/strategy.go +++ b/pkg/registry/rbac/clusterrolebinding/strategy.go @@ -84,9 +84,7 @@ func (strategy) Canonicalize(obj runtime.Object) { // ValidateUpdate is the default update validation for an end user. func (strategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - newObj := obj.(*rbac.ClusterRoleBinding) - errorList := validation.ValidateClusterRoleBinding(newObj) - return append(errorList, validation.ValidateClusterRoleBindingUpdate(newObj, old.(*rbac.ClusterRoleBinding))...) + return validation.ValidateClusterRoleBindingUpdate(obj.(*rbac.ClusterRoleBinding), old.(*rbac.ClusterRoleBinding)) } // WarningsOnUpdate returns warnings for the given update. diff --git a/pkg/registry/rbac/role/strategy.go b/pkg/registry/rbac/role/strategy.go index a7c0b04284bd6..d3688a73e4f77 100644 --- a/pkg/registry/rbac/role/strategy.go +++ b/pkg/registry/rbac/role/strategy.go @@ -84,9 +84,7 @@ func (strategy) Canonicalize(obj runtime.Object) { // ValidateUpdate is the default update validation for an end user. func (strategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - newObj := obj.(*rbac.Role) - errorList := validation.ValidateRole(newObj) - return append(errorList, validation.ValidateRoleUpdate(newObj, old.(*rbac.Role))...) + return validation.ValidateRoleUpdate(obj.(*rbac.Role), old.(*rbac.Role)) } // WarningsOnUpdate returns warnings for the given update. diff --git a/pkg/registry/rbac/rolebinding/strategy.go b/pkg/registry/rbac/rolebinding/strategy.go index aa003ae1ca83f..55618c7132b0f 100644 --- a/pkg/registry/rbac/rolebinding/strategy.go +++ b/pkg/registry/rbac/rolebinding/strategy.go @@ -84,9 +84,7 @@ func (strategy) Canonicalize(obj runtime.Object) { // ValidateUpdate is the default update validation for an end user. func (strategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - newObj := obj.(*rbac.RoleBinding) - errorList := validation.ValidateRoleBinding(newObj) - return append(errorList, validation.ValidateRoleBindingUpdate(newObj, old.(*rbac.RoleBinding))...) + return validation.ValidateRoleBindingUpdate(obj.(*rbac.RoleBinding), old.(*rbac.RoleBinding)) } // WarningsOnUpdate returns warnings for the given update. diff --git a/pkg/registry/resource/deviceclass/declarative_validation_test.go b/pkg/registry/resource/deviceclass/declarative_validation_test.go new file mode 100644 index 0000000000000..0676e875c8139 --- /dev/null +++ b/pkg/registry/resource/deviceclass/declarative_validation_test.go @@ -0,0 +1,204 @@ +/* +Copyright 2025 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 deviceclass + +import ( + "fmt" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/validation/field" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + apitesting "k8s.io/kubernetes/pkg/api/testing" + "k8s.io/kubernetes/pkg/apis/resource" + _ "k8s.io/kubernetes/pkg/apis/resource/install" +) + +var apiVersions = []string{"v1", "v1beta1", "v1beta2"} + +func TestDeclarativeValidate(t *testing.T) { + for _, apiVersion := range apiVersions { + t.Run(apiVersion, func(t *testing.T) { + ctx := genericapirequest.WithRequestInfo(genericapirequest.NewDefaultContext(), &genericapirequest.RequestInfo{ + APIGroup: "resource.k8s.io", + APIVersion: apiVersion, + Resource: "deviceclasses", + }) + + strategy := Strategy + + testCases := map[string]struct { + input resource.DeviceClass + expectedErrs field.ErrorList + }{ + "valid": { + input: mkDeviceClass(), + }, + // spec.selectors. + "valid: at limit selectors": { + input: mkDeviceClass(tweakSelectors(32)), + }, + "too many selectors": { + input: mkDeviceClass(tweakSelectors(33)), + expectedErrs: field.ErrorList{ + field.TooMany(field.NewPath("spec", "selectors"), 33, 32).WithOrigin("maxItems"), + }, + }, + // spec.config + "too many configs": { + input: mkDeviceClass(tweakConfig(33)), + expectedErrs: field.ErrorList{ + field.TooMany(field.NewPath("spec", "config"), 33, 32).WithOrigin("maxItems"), + }, + }, + "valid: at limit configs": { + input: mkDeviceClass(tweakConfig(32)), + }, + // TODO: Add more test cases + } + + for k, tc := range testCases { + t.Run(k, func(t *testing.T) { + apitesting.VerifyValidationEquivalence(t, ctx, &tc.input, strategy.Validate, tc.expectedErrs) + }) + } + }) + } +} + +func TestDeclarativeValidateUpdate(t *testing.T) { + for _, apiVersion := range apiVersions { + t.Run(apiVersion, func(t *testing.T) { + ctx := genericapirequest.WithRequestInfo(genericapirequest.NewDefaultContext(), &genericapirequest.RequestInfo{ + APIGroup: "resource.k8s.io", + APIVersion: apiVersion, + Resource: "deviceclasses", + }) + + strategy := Strategy + + testCases := map[string]struct { + old resource.DeviceClass + update resource.DeviceClass + expectedErrs field.ErrorList + }{ + "valid no changes": { + old: mkDeviceClass(), + update: mkDeviceClass(), + }, + "valid update: at limit selectors": { + old: mkDeviceClass(), + update: mkDeviceClass(tweakSelectors(32)), + }, + "update with too many selectors": { + old: mkDeviceClass(), + update: mkDeviceClass(tweakSelectors(33)), + expectedErrs: field.ErrorList{ + field.TooMany(field.NewPath("spec", "selectors"), 33, 32).WithOrigin("maxItems"), + }, + }, + "valid update: at limit configs": { + old: mkDeviceClass(), + update: mkDeviceClass(tweakConfig(32)), + }, + "update with too many configs": { + old: mkDeviceClass(), + update: mkDeviceClass(tweakConfig(33)), + expectedErrs: field.ErrorList{ + field.TooMany(field.NewPath("spec", "config"), 33, 32).WithOrigin("maxItems"), + }, + }, + // TODO: Add more test cases + } + + for k, tc := range testCases { + t.Run(k, func(t *testing.T) { + tc.old.ResourceVersion = "1" + tc.update.ResourceVersion = "1" + apitesting.VerifyUpdateValidationEquivalence(t, ctx, &tc.update, &tc.old, strategy.ValidateUpdate, tc.expectedErrs) + }) + } + }) + } +} + +// Helper function to create a DeviceClass with default values and optional mutators +func mkDeviceClass(mutators ...func(*resource.DeviceClass)) resource.DeviceClass { + dc := resource.DeviceClass{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-class", + }, + Spec: resource.DeviceClassSpec{ + Selectors: []resource.DeviceSelector{ + { + CEL: &resource.CELDeviceSelector{ + Expression: "device.driver == \"test.driver.io\"", + }, + }, + }, + Config: []resource.DeviceClassConfiguration{ + { + DeviceConfiguration: resource.DeviceConfiguration{ + Opaque: &resource.OpaqueDeviceConfiguration{ + Driver: "test.driver.io", + Parameters: runtime.RawExtension{ + Raw: []byte(`{"key":"value"}`), + }, + }, + }, + }, + }, + }, + } + for _, mutate := range mutators { + mutate(&dc) + } + return dc +} + +func tweakSelectors(count int) func(*resource.DeviceClass) { + return func(dc *resource.DeviceClass) { + dc.Spec.Selectors = []resource.DeviceSelector{} + + for i := 0; i < count; i++ { + dc.Spec.Selectors = append(dc.Spec.Selectors, resource.DeviceSelector{ + CEL: &resource.CELDeviceSelector{ + Expression: fmt.Sprintf("device.driver == \"test.driver.io%d\"", i), + }, + }) + } + } +} + +func tweakConfig(count int) func(*resource.DeviceClass) { + return func(dc *resource.DeviceClass) { + dc.Spec.Config = []resource.DeviceClassConfiguration{} + for i := 0; i < count; i++ { + dc.Spec.Config = append(dc.Spec.Config, resource.DeviceClassConfiguration{ + DeviceConfiguration: resource.DeviceConfiguration{ + Opaque: &resource.OpaqueDeviceConfiguration{ + Driver: "test.driver.io", + Parameters: runtime.RawExtension{ + Raw: []byte(fmt.Sprintf(`{"key":"value%d"}`, i)), + }, + }, + }, + }) + } + } +} diff --git a/pkg/registry/resource/deviceclass/strategy.go b/pkg/registry/resource/deviceclass/strategy.go index d682ef28ebb13..3854b37d08105 100644 --- a/pkg/registry/resource/deviceclass/strategy.go +++ b/pkg/registry/resource/deviceclass/strategy.go @@ -20,8 +20,10 @@ import ( "context" apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/api/operation" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/storage/names" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/kubernetes/pkg/api/legacyscheme" @@ -50,7 +52,9 @@ func (deviceClassStrategy) PrepareForCreate(ctx context.Context, obj runtime.Obj func (deviceClassStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { deviceClass := obj.(*resource.DeviceClass) - return validation.ValidateDeviceClass(deviceClass) + errorList := validation.ValidateDeviceClass(deviceClass) + + return rest.ValidateDeclarativelyWithMigrationChecks(ctx, legacyscheme.Scheme, deviceClass, nil, errorList, operation.Create) } func (deviceClassStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { @@ -77,8 +81,12 @@ func (deviceClassStrategy) PrepareForUpdate(ctx context.Context, obj, old runtim } func (deviceClassStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - errorList := validation.ValidateDeviceClass(obj.(*resource.DeviceClass)) - return append(errorList, validation.ValidateDeviceClassUpdate(obj.(*resource.DeviceClass), old.(*resource.DeviceClass))...) + newClass := obj.(*resource.DeviceClass) + oldClass := old.(*resource.DeviceClass) + + errorList := validation.ValidateDeviceClassUpdate(newClass, oldClass) + + return rest.ValidateDeclarativelyWithMigrationChecks(ctx, legacyscheme.Scheme, newClass, oldClass, errorList, operation.Update) } func (deviceClassStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string { diff --git a/pkg/registry/resource/resourceclaim/declarative_validation_test.go b/pkg/registry/resource/resourceclaim/declarative_validation_test.go new file mode 100644 index 0000000000000..83be68c25c083 --- /dev/null +++ b/pkg/registry/resource/resourceclaim/declarative_validation_test.go @@ -0,0 +1,824 @@ +/* +Copyright 2025 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 resourceclaim + +import ( + "fmt" + "strings" + "testing" + + "github.com/google/uuid" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/validation/field" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/client-go/kubernetes/fake" + apitesting "k8s.io/kubernetes/pkg/api/testing" + "k8s.io/kubernetes/pkg/apis/resource" + pointer "k8s.io/utils/ptr" +) + +var apiVersions = []string{"v1beta1", "v1beta2", "v1"} // "v1alpha3" is excluded because it doesn't have ResourceClaim + +const ( + validUUID = "550e8400-e29b-41d4-a716-446655440000" + validUUID1 = "550e8400-e29b-41d4-a716-446655440001" +) + +func TestDeclarativeValidate(t *testing.T) { + for _, apiVersion := range apiVersions { + t.Run(apiVersion, func(t *testing.T) { + testDeclarativeValidate(t, apiVersion) + }) + } +} + +func testDeclarativeValidate(t *testing.T, apiVersion string) { + ctx := genericapirequest.WithRequestInfo(genericapirequest.NewDefaultContext(), &genericapirequest.RequestInfo{ + APIGroup: "resource.k8s.io", + APIVersion: apiVersion, + Resource: "resourceclaims", + }) + fakeClient := fake.NewClientset() + mockNSClient := fakeClient.CoreV1().Namespaces() + Strategy := NewStrategy(mockNSClient) + + opaqueDriverPath := field.NewPath("spec", "devices", "config").Index(0).Child("opaque", "driver") + + testCases := map[string]struct { + input resource.ResourceClaim + expectedErrs field.ErrorList + }{ + "valid": { + input: mkValidResourceClaim(), + }, + "valid requests, max allowed": { + input: mkValidResourceClaim(tweakDevicesConfigs(32)), + }, + "valid constraints, max allowed": { + input: mkValidResourceClaim(tweakDevicesConstraints(32)), + }, + "valid config, max allowed": { + input: mkValidResourceClaim(tweakDevicesConfigs(32)), + }, + "invalid requests, too many": { + input: mkValidResourceClaim(tweakDevicesRequests(33)), + expectedErrs: field.ErrorList{ + field.TooMany(field.NewPath("spec", "devices", "requests"), 33, 32).WithOrigin("maxItems"), + }, + }, + "invalid constraints, too many": { + input: mkValidResourceClaim(tweakDevicesConstraints(33)), + expectedErrs: field.ErrorList{ + field.TooMany(field.NewPath("spec", "devices", "constraints"), 33, 32).WithOrigin("maxItems"), + }, + }, + "invalid config, too many": { + input: mkValidResourceClaim(tweakDevicesConfigs(33)), + expectedErrs: field.ErrorList{ + field.TooMany(field.NewPath("spec", "devices", "config"), 33, 32).WithOrigin("maxItems"), + }, + }, + "invalid firstAvailable, too many": { + input: mkValidResourceClaim(tweakFirstAvailable(9)), + expectedErrs: field.ErrorList{ + field.TooMany(field.NewPath("spec", "devices", "requests").Index(0).Child("firstAvailable"), 9, 8).WithOrigin("maxItems"), + }, + }, + "invalid selectors, too many": { + input: mkValidResourceClaim(tweakExactlySelectors(33)), + expectedErrs: field.ErrorList{ + field.TooMany(field.NewPath("spec", "devices", "requests").Index(0).Child("exactly", "selectors"), 33, 32).WithOrigin("maxItems").MarkCoveredByDeclarative(), + }, + }, + "invalid subrequest selectors, too many": { + input: mkValidResourceClaim(tweakSubRequestSelectors(33)), + expectedErrs: field.ErrorList{ + field.TooMany(field.NewPath("spec", "devices", "requests").Index(0).Child("firstAvailable").Index(0).Child("selectors"), 33, 32).WithOrigin("maxItems"), + }, + }, + "invalid constraint requests, too many": { + input: mkValidResourceClaim(tweakConstraintRequests(33)), + expectedErrs: field.ErrorList{ + field.TooMany(field.NewPath("spec", "devices", "requests"), 33, 32).WithOrigin("maxItems"), + field.TooMany(field.NewPath("spec", "devices", "constraints").Index(0).Child("requests"), 33, 32).WithOrigin("maxItems"), + }, + }, + "invalid config requests, too many": { + input: mkValidResourceClaim(tweakConfigRequests(33)), + expectedErrs: field.ErrorList{ + field.TooMany(field.NewPath("spec", "devices", "requests"), 33, 32).WithOrigin("maxItems"), + field.TooMany(field.NewPath("spec", "devices", "config").Index(0).Child("requests"), 33, 32).WithOrigin("maxItems"), + }, + }, + "valid firstAvailable, max allowed": { + input: mkValidResourceClaim(tweakFirstAvailable(8)), + }, + "valid selectors, max allowed": { + input: mkValidResourceClaim(tweakExactlySelectors(32)), + }, + "valid subrequest selectors, max allowed": { + input: mkValidResourceClaim(tweakSubRequestSelectors(32)), + }, + "valid constraint requests, max allowed": { + input: mkValidResourceClaim(tweakConstraintRequests(32)), + }, + "valid config requests, max allowed": { + input: mkValidResourceClaim(tweakConfigRequests(32)), + }, + "valid opaque driver, lowercase": { + input: mkValidResourceClaim(tweakDeviceConfigWithDriver("dra.example.com")), + }, + "valid opaque driver, mixed case": { + input: mkValidResourceClaim(tweakDeviceConfigWithDriver("DRA.Example.COM")), + }, + "valid opaque driver, max length": { + input: mkValidResourceClaim(tweakDeviceConfigWithDriver(strings.Repeat("a", 63))), + }, + "invalid opaque driver, empty": { + input: mkValidResourceClaim(tweakDeviceConfigWithDriver("")), + expectedErrs: field.ErrorList{ + field.Required(opaqueDriverPath, ""), + }, + }, + "invalid opaque driver, too long": { + input: mkValidResourceClaim(tweakDeviceConfigWithDriver(strings.Repeat("a", 64))), + expectedErrs: field.ErrorList{ + field.TooLong(opaqueDriverPath, "", 63), + }, + }, + "invalid opaque driver, invalid character": { + input: mkValidResourceClaim(tweakDeviceConfigWithDriver("dra_example.com")), + expectedErrs: field.ErrorList{ + field.Invalid(opaqueDriverPath, "dra_example.com", "").WithOrigin("format=k8s-long-name-caseless"), + }, + }, + "invalid opaque driver, invalid DNS name (leading dot)": { + input: mkValidResourceClaim(tweakDeviceConfigWithDriver(".example.com")), + expectedErrs: field.ErrorList{ + field.Invalid(opaqueDriverPath, ".example.com", "").WithOrigin("format=k8s-long-name-caseless"), + }, + }, + // spec.Devices.Requests[%d].Exactly.Tolerations.Key + "valid Exactly.Tolerations.Key": { + input: mkValidResourceClaim(tweakExactlyTolerations([]resource.DeviceToleration{ + {Key: "valid-key", Operator: resource.DeviceTolerationOpExists}, + })), + }, + "valid Exactly.Tolerations.Key empty": { + input: mkValidResourceClaim(tweakExactlyTolerations([]resource.DeviceToleration{ + {Key: "", Operator: resource.DeviceTolerationOpExists}, + })), + }, + "invalid Exactly.Tolerations.Key": { + input: mkValidResourceClaim(tweakExactlyTolerations([]resource.DeviceToleration{ + {Key: "invalid_key!", Operator: resource.DeviceTolerationOpExists}, + })), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("spec", "devices", "requests").Index(0).Child("exactly", "tolerations").Index(0).Child("key"), "invalid_key!", "").WithOrigin("format=k8s-label-key"), + }, + }, + "invalid Exactly.Tolerations.Key - multiple slashes": { + input: mkValidResourceClaim(tweakExactlyTolerations([]resource.DeviceToleration{ + {Key: "a/b/c", Operator: resource.DeviceTolerationOpExists}, + })), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("spec", "devices", "requests").Index(0).Child("exactly", "tolerations").Index(0).Child("key"), "a/b/c", "").WithOrigin("format=k8s-label-key"), + }, + }, + // spec.Devices.Requests[%d].FirsAvailable[%d].Tolerations.Key + "valid FirstAvailable.Tolerations.Key": { + input: mkValidResourceClaim(tweakFirstAvailable(1), tweakFirstAvailableTolerations([]resource.DeviceToleration{ + {Key: "valid-key", Operator: resource.DeviceTolerationOpExists}, + })), + }, + "valid FirstAvailable.Tolerations.Key empty": { + input: mkValidResourceClaim(tweakFirstAvailable(1), tweakFirstAvailableTolerations([]resource.DeviceToleration{ + {Key: "", Operator: resource.DeviceTolerationOpExists}, + })), + }, + "invalid FirstAvailable.Tolerations.Key": { + input: mkValidResourceClaim(tweakFirstAvailable(1), tweakFirstAvailableTolerations([]resource.DeviceToleration{ + {Key: "invalid_key!", Operator: resource.DeviceTolerationOpExists}, + })), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("spec", "devices", "requests").Index(0).Child("firstAvailable").Index(0).Child("tolerations").Index(0).Child("key"), "invalid_key!", "").WithOrigin("format=k8s-label-key"), + }, + }, + "invalid FirstAvailable.Tolerations.Key - multiple slashes": { + input: mkValidResourceClaim(tweakFirstAvailable(1), tweakFirstAvailableTolerations([]resource.DeviceToleration{ + {Key: "a/b/c", Operator: resource.DeviceTolerationOpExists}, + })), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("spec", "devices", "requests").Index(0).Child("firstAvailable").Index(0).Child("tolerations").Index(0).Child("key"), "a/b/c", "").WithOrigin("format=k8s-label-key"), + }, + }, + // TODO: Add more test cases + } + for k, tc := range testCases { + t.Run(k, func(t *testing.T) { + apitesting.VerifyValidationEquivalence(t, ctx, &tc.input, Strategy.Validate, tc.expectedErrs, apitesting.WithNormalizationRules(resourceClaimNormalizationRules...)) + }) + } +} + +func tweakDevicesConfigs(items int) func(*resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + for i := 0; i < items; i++ { + rc.Spec.Devices.Config = append(rc.Spec.Devices.Config, mkDeviceClaimConfiguration()) + } + } +} + +func tweakDevicesConstraints(items int) func(*resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + for i := 0; i < items; i++ { + rc.Spec.Devices.Constraints = append(rc.Spec.Devices.Constraints, mkDeviceConstraint()) + } + } +} + +func tweakDevicesRequests(items int) func(*resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + // The first request already exists in the valid template + for i := 1; i < items; i++ { + rc.Spec.Devices.Requests = append(rc.Spec.Devices.Requests, mkDeviceRequest(fmt.Sprintf("req-%d", i))) + } + } +} + +func tweakExactlySelectors(items int) func(*resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + for i := 0; i < items; i++ { + rc.Spec.Devices.Requests[0].Exactly.Selectors = append(rc.Spec.Devices.Requests[0].Exactly.Selectors, + resource.DeviceSelector{ + CEL: &resource.CELDeviceSelector{ + Expression: fmt.Sprintf("device.driver == \"test.driver.io%d\"", i), + }, + }, + ) + } + } +} + +func tweakSubRequestSelectors(items int) func(*resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + rc.Spec.Devices.Requests[0].Exactly = nil + rc.Spec.Devices.Requests[0].FirstAvailable = []resource.DeviceSubRequest{ + { + Name: "sub-0", + DeviceClassName: "class", + AllocationMode: resource.DeviceAllocationModeAll, + }, + } + for i := 0; i < items; i++ { + rc.Spec.Devices.Requests[0].FirstAvailable[0].Selectors = append(rc.Spec.Devices.Requests[0].FirstAvailable[0].Selectors, + resource.DeviceSelector{ + CEL: &resource.CELDeviceSelector{ + Expression: fmt.Sprintf("device.driver == \"test.driver.io%d\"", i), + }, + }, + ) + } + } +} + +func tweakConstraintRequests(count int) func(*resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + tweakDevicesRequests(count)(rc) + if len(rc.Spec.Devices.Constraints) == 0 { + rc.Spec.Devices.Constraints = append(rc.Spec.Devices.Constraints, mkDeviceConstraint()) + } + rc.Spec.Devices.Constraints[0].Requests = []string{} + for i := 0; i < count; i++ { + rc.Spec.Devices.Constraints[0].Requests = append(rc.Spec.Devices.Constraints[0].Requests, fmt.Sprintf("req-%d", i)) + } + } +} + +func tweakConfigRequests(count int) func(*resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + tweakDevicesRequests(count)(rc) + if len(rc.Spec.Devices.Config) == 0 { + rc.Spec.Devices.Config = append(rc.Spec.Devices.Config, mkDeviceClaimConfiguration()) + } + rc.Spec.Devices.Config[0].Requests = []string{} + for i := 0; i < count; i++ { + rc.Spec.Devices.Config[0].Requests = append(rc.Spec.Devices.Config[0].Requests, fmt.Sprintf("req-%d", i)) + } + } +} + +func tweakFirstAvailable(items int) func(*resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + rc.Spec.Devices.Requests[0].Exactly = nil + for i := 0; i < items; i++ { + rc.Spec.Devices.Requests[0].FirstAvailable = append(rc.Spec.Devices.Requests[0].FirstAvailable, + resource.DeviceSubRequest{ + Name: fmt.Sprintf("sub-%d", i), + DeviceClassName: "class", + AllocationMode: resource.DeviceAllocationModeAll, + }, + ) + } + } +} + +func mkDeviceClaimConfiguration() resource.DeviceClaimConfiguration { + return resource.DeviceClaimConfiguration{ + Requests: []string{"req-0"}, + DeviceConfiguration: resource.DeviceConfiguration{ + Opaque: &resource.OpaqueDeviceConfiguration{ + Driver: "dra.example.com", + Parameters: runtime.RawExtension{ + Raw: []byte(`{"kind": "foo", "apiVersion": "dra.example.com/v1"}`), + }}, + }, + } +} + +func mkDeviceConstraint() resource.DeviceConstraint { + return resource.DeviceConstraint{ + Requests: []string{"req-0"}, + MatchAttribute: pointer.To(resource.FullyQualifiedName("foo/bar")), + } +} + +func mkDeviceRequest(name string) resource.DeviceRequest { + return resource.DeviceRequest{ + Name: name, + Exactly: &resource.ExactDeviceRequest{ + DeviceClassName: "class", + AllocationMode: resource.DeviceAllocationModeAll, + }, + } +} + +func TestDeclarativeValidateUpdate(t *testing.T) { + for _, apiVersion := range apiVersions { + t.Run(apiVersion, func(t *testing.T) { + testDeclarativeValidateUpdate(t, apiVersion) + }) + } +} + +func testDeclarativeValidateUpdate(t *testing.T, apiVersion string) { + ctx := genericapirequest.WithRequestInfo(genericapirequest.NewDefaultContext(), &genericapirequest.RequestInfo{ + APIGroup: "resource.k8s.io", + APIVersion: apiVersion, + Resource: "resourceclaims", + }) + fakeClient := fake.NewClientset() + mockNSClient := fakeClient.CoreV1().Namespaces() + Strategy := NewStrategy(mockNSClient) + validClaim := mkValidResourceClaim() + testCases := map[string]struct { + update resource.ResourceClaim + old resource.ResourceClaim + expectedErrs field.ErrorList + }{ + "valid": { + update: validClaim, + old: validClaim, + }, + "spec immutable: modify request class name": { + update: mkValidResourceClaim(tweakSpecChangeClassName("another-class")), + old: validClaim, + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("spec"), "field is immutable", "").WithOrigin("immutable"), + }, + }, + "spec immutable: add request": { + update: mkValidResourceClaim(tweakSpecAddRequest(mkDeviceRequest("req-1"))), + old: validClaim, + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("spec"), "field is immutable", "").WithOrigin("immutable"), + }, + }, + "spec immutable: remove request": { + update: mkValidResourceClaim(tweakSpecRemoveRequest(0)), + old: validClaim, + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("spec"), "field is immutable", "").WithOrigin("immutable"), + }, + }, + "spec immutable: add constraint": { + update: mkValidResourceClaim(tweakSpecAddConstraint(mkDeviceConstraint())), + old: validClaim, + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("spec"), "field is immutable", "").WithOrigin("immutable"), + }, + }, + "spec immutable: short-circuits other errors (e.g. TooMany)": { + update: mkValidResourceClaim(tweakDevicesRequests(33)), + old: mkValidResourceClaim(), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("spec"), "field is immutable", "").WithOrigin("immutable"), + }, + }, + "spec immutable: add Exactly.Tolerations": { + update: mkValidResourceClaim(tweakExactlyTolerations([]resource.DeviceToleration{ + {Key: "valid-key", Operator: resource.DeviceTolerationOpExists}, + })), + old: validClaim, + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("spec"), "field is immutable", "").WithOrigin("immutable"), + }, + }, + "spec immutable: change Exactly.Tolerations.Key": { + update: mkValidResourceClaim(tweakExactlyTolerations([]resource.DeviceToleration{ + {Key: "another-valid-key", Operator: resource.DeviceTolerationOpExists}, + })), + old: mkValidResourceClaim(tweakExactlyTolerations([]resource.DeviceToleration{ + {Key: "valid-key", Operator: resource.DeviceTolerationOpExists}, + })), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("spec"), "field is immutable", "").WithOrigin("immutable"), + }, + }, + // spec.Devices.Requests[%d].FirsAvailable[%d].Tolerations.Key + "spec immutable: add FirstAvailable.Tolerations": { + update: mkValidResourceClaim(tweakFirstAvailable(1), tweakFirstAvailableTolerations([]resource.DeviceToleration{ + {Key: "valid-key", Operator: resource.DeviceTolerationOpExists}, + })), + old: mkValidResourceClaim(tweakFirstAvailable(1)), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("spec"), "field is immutable", "").WithOrigin("immutable"), + }, + }, + "spec immutable: change FirstAvailable.Tolerations.Key": { + update: mkValidResourceClaim(tweakFirstAvailable(1), tweakFirstAvailableTolerations([]resource.DeviceToleration{ + {Key: "another-valid-key", Operator: resource.DeviceTolerationOpExists}, + })), + old: mkValidResourceClaim(tweakFirstAvailable(1), tweakFirstAvailableTolerations([]resource.DeviceToleration{ + {Key: "valid-key", Operator: resource.DeviceTolerationOpExists}, + })), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("spec"), "field is immutable", "").WithOrigin("immutable"), + }, + }, + // TODO: Add more test cases + } + for k, tc := range testCases { + t.Run(k, func(t *testing.T) { + tc.old.ResourceVersion = "1" + tc.update.ResourceVersion = "2" + apitesting.VerifyUpdateValidationEquivalence(t, ctx, &tc.update, &tc.old, Strategy.ValidateUpdate, tc.expectedErrs, apitesting.WithNormalizationRules(resourceClaimNormalizationRules...)) + }) + } +} + +func TestValidateStatusUpdateForDeclarative(t *testing.T) { + fakeClient := fake.NewClientset() + mockNSClient := fakeClient.CoreV1().Namespaces() + Strategy := NewStrategy(mockNSClient) + strategy := NewStatusStrategy(Strategy) + + ctx := genericapirequest.WithRequestInfo(genericapirequest.NewDefaultContext(), &genericapirequest.RequestInfo{ + APIGroup: "resource.k8s.io", + APIVersion: "v1", + Resource: "resourceclaims", + Subresource: "status", + }) + poolPath := field.NewPath("status", "allocation", "devices", "results").Index(0).Child("pool") + testCases := map[string]struct { + old resource.ResourceClaim + update resource.ResourceClaim + expectedErrs field.ErrorList + }{ + // .Status.Allocation.Devices.Results[%d].Pool + "valid pool name": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus(tweakStatusDeviceRequestAllocationResultPool("dra.example.com/pool-a")), + }, + "valid pool name, max length": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus(tweakStatusDeviceRequestAllocationResultPool(strings.Repeat("a", 63) + "." + strings.Repeat("b", 63) + "." + strings.Repeat("c", 63) + "." + strings.Repeat("d", 55))), + }, + "invalid pool name, required": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus(tweakStatusDeviceRequestAllocationResultPool("")), + expectedErrs: field.ErrorList{ + field.Required(poolPath, ""), + }, + }, + "invalid pool name, too long": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus(tweakStatusDeviceRequestAllocationResultPool(strings.Repeat("a", 253) + "/" + strings.Repeat("a", 253))), + expectedErrs: field.ErrorList{ + field.TooLong(poolPath, "", 253).WithOrigin("format=k8s-resource-pool-name"), + }, + }, + "invalid pool name, format": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus(tweakStatusDeviceRequestAllocationResultPool("a/Not_Valid")), + expectedErrs: field.ErrorList{ + field.Invalid(poolPath, "Not_Valid", "").WithOrigin("format=k8s-resource-pool-name"), + }, + }, + "invalid pool name, leading slash": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus(tweakStatusDeviceRequestAllocationResultPool("/a")), + expectedErrs: field.ErrorList{ + field.Invalid(poolPath, "", "").WithOrigin("format=k8s-resource-pool-name"), + }, + }, + "invalid pool name, trailing slash": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus(tweakStatusDeviceRequestAllocationResultPool("a/")), + expectedErrs: field.ErrorList{ + field.Invalid(poolPath, "", "").WithOrigin("format=k8s-resource-pool-name"), + }, + }, + "invalid pool name, double slash": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus(tweakStatusDeviceRequestAllocationResultPool("a//b")), + expectedErrs: field.ErrorList{ + field.Invalid(poolPath, "", "").WithOrigin("format=k8s-resource-pool-name"), + }, + }, + // .Status.Allocation.Devices.Results[%d].ShareID + "valid status.Allocation.Devices.Results[].ShareID": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus(tweakStatusDeviceRequestAllocationResultShareID(validUUID)), + }, + "invalid status.Allocation.Devices.Results[].ShareID": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus(tweakStatusDeviceRequestAllocationResultShareID("invalid-uid")), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("status", "allocation", "devices", "results").Index(0).Child("shareID"), "invalid-uid", "").WithOrigin("format=k8s-uuid"), + }, + }, + "invalid uppercase status.Allocation.Devices.Results[].ShareID ": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus(tweakStatusDeviceRequestAllocationResultShareID("123e4567-E89b-12d3-A456-426614174000")), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("status", "allocation", "devices", "results").Index(0).Child("shareID"), "invalid-uid", "").WithOrigin("format=k8s-uuid"), + }, + }, + // .Status.Devices[%d].ShareID + "valid status.Devices[].ShareID": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus( + tweakStatusDevices(standardAllocatedDeviceStatus()), + tweakStatusDeviceRequestAllocationResultShareID(validUUID), + tweakStatusAllocatedDeviceStatusShareID(validUUID), + ), + }, + "invalid status.Devices[].ShareID": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus( + tweakStatusDevices(standardAllocatedDeviceStatus()), + tweakStatusDeviceRequestAllocationResultShareID("invalid-uid"), + tweakStatusAllocatedDeviceStatusShareID("invalid-uid"), + ), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("status", "allocation", "devices", "results").Index(0).Child("shareID"), "invalid-uid", "must be a lowercase UUID in 8-4-4-4-12 format").WithOrigin("format=k8s-uuid"), + field.Invalid(field.NewPath("status", "devices").Index(0).Child("shareID"), "invalid-uid", "must be a lowercase UUID in 8-4-4-4-12 format").WithOrigin("format=k8s-uuid"), + }, + }, + "invalid upper case status.Devices[].ShareID": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus( + tweakStatusDevices(standardAllocatedDeviceStatus()), + tweakStatusDeviceRequestAllocationResultShareID("123e4567-E89b-12d3-A456-426614174000"), + tweakStatusAllocatedDeviceStatusShareID("123e4567-E89b-12d3-A456-426614174000"), + ), + expectedErrs: field.ErrorList{ + field.Invalid(field.NewPath("status", "allocation", "devices", "results").Index(0).Child("shareID"), "invalid-uid", "must be a lowercase UUID in 8-4-4-4-12 format").WithOrigin("format=k8s-uuid"), + field.Invalid(field.NewPath("status", "devices").Index(0).Child("shareID"), "invalid-uid", "must be a lowercase UUID in 8-4-4-4-12 format").WithOrigin("format=k8s-uuid"), + }, + }, + // UID in status.ReservedFor + "duplicate uid in status.ReservedFor": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus( + tweakStatusReservedFor( + resourceClaimReference(validUUID), + resourceClaimReference(uuid.New().String()), + resourceClaimReference(validUUID), + )), + expectedErrs: field.ErrorList{ + field.Duplicate(field.NewPath("status", "reservedFor").Index(2), ""), + }, + }, + "multiple- duplicate uid in status.ReservedFor": { + old: mkValidResourceClaim(), + update: mkResourceClaimWithStatus(tweakStatusReservedFor( + resourceClaimReference(validUUID), + resourceClaimReference(uuid.New().String()), + resourceClaimReference(validUUID), + resourceClaimReference(validUUID1), + resourceClaimReference(validUUID1), + resourceClaimReference(uuid.New().String()), + )), + expectedErrs: field.ErrorList{ + field.Duplicate(field.NewPath("status", "reservedFor").Index(2), ""), + field.Duplicate(field.NewPath("status", "reservedFor").Index(4), ""), + }, + }, + } + for k, tc := range testCases { + t.Run(k, func(t *testing.T) { + tc.old.ObjectMeta.ResourceVersion = "1" + tc.update.ObjectMeta.ResourceVersion = "1" + apitesting.VerifyUpdateValidationEquivalence(t, ctx, &tc.update, &tc.old, strategy.ValidateUpdate, tc.expectedErrs, apitesting.WithSubResources("status")) + }) + } +} + +func mkValidResourceClaim(tweaks ...func(rc *resource.ResourceClaim)) resource.ResourceClaim { + rc := resource.ResourceClaim{ + ObjectMeta: v1.ObjectMeta{ + Name: "valid-claim", + Namespace: "default", + }, + Spec: resource.ResourceClaimSpec{ + Devices: resource.DeviceClaim{ + Requests: []resource.DeviceRequest{ + { + Name: "req-0", + Exactly: &resource.ExactDeviceRequest{ + DeviceClassName: "class", + AllocationMode: resource.DeviceAllocationModeAll, + }, + }, + }, + }, + }, + } + + for _, tweak := range tweaks { + tweak(&rc) + } + return rc +} + +func mkResourceClaimWithStatus(tweaks ...func(rc *resource.ResourceClaim)) resource.ResourceClaim { + rc := resource.ResourceClaim{ + ObjectMeta: v1.ObjectMeta{ + Name: "valid-claim", + Namespace: "default", + }, + Spec: resource.ResourceClaimSpec{ + Devices: resource.DeviceClaim{ + Requests: []resource.DeviceRequest{ + { + Name: "req-0", + Exactly: &resource.ExactDeviceRequest{ + DeviceClassName: "class", + AllocationMode: resource.DeviceAllocationModeAll, + }, + }, + }, + }, + }, + Status: resource.ResourceClaimStatus{ + Allocation: &resource.AllocationResult{ + Devices: resource.DeviceAllocationResult{ + Results: []resource.DeviceRequestAllocationResult{ + { + Request: "req-0", + Driver: "dra.example.com", + Pool: "pool-0", + Device: "device-0", + }, + }, + }, + }, + }, + } + for _, tweak := range tweaks { + tweak(&rc) + } + return rc +} + +func tweakStatusDevices(devices ...resource.AllocatedDeviceStatus) func(rc *resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + rc.Status.Devices = devices + } +} + +func tweakStatusDeviceRequestAllocationResultPool(pool string) func(rc *resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + for i := range rc.Status.Allocation.Devices.Results { + rc.Status.Allocation.Devices.Results[i].Pool = pool + } + } +} + +func tweakStatusDeviceRequestAllocationResultShareID(shareID types.UID) func(rc *resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + for i := range rc.Status.Allocation.Devices.Results { + rc.Status.Allocation.Devices.Results[i].ShareID = &shareID + } + } +} + +func tweakSpecChangeClassName(deviceClassName string) func(rc *resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + if len(rc.Spec.Devices.Requests) > 0 && rc.Spec.Devices.Requests[0].Exactly != nil { + rc.Spec.Devices.Requests[0].Exactly.DeviceClassName = deviceClassName + } + } +} + +func tweakStatusAllocatedDeviceStatusShareID(shareID string) func(rc *resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + for i := range rc.Status.Devices { + rc.Status.Devices[i].ShareID = &shareID + } + } +} + +func tweakSpecAddRequest(req resource.DeviceRequest) func(rc *resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + rc.Spec.Devices.Requests = append(rc.Spec.Devices.Requests, req) + } +} + +func tweakSpecRemoveRequest(index int) func(rc *resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + if index >= 0 && index < len(rc.Spec.Devices.Requests) { + rc.Spec.Devices.Requests = append(rc.Spec.Devices.Requests[:index], rc.Spec.Devices.Requests[index+1:]...) + } + } +} + +func standardAllocatedDeviceStatus() resource.AllocatedDeviceStatus { + return resource.AllocatedDeviceStatus{ + Driver: "dra.example.com", + Pool: "pool-0", + Device: "device-0", + } +} + +func resourceClaimReference(uid string) resource.ResourceClaimConsumerReference { + return resource.ResourceClaimConsumerReference{ + UID: types.UID(uid), + Resource: "Pod", + Name: "pod-name", + } +} + +func tweakStatusReservedFor(refs ...resource.ResourceClaimConsumerReference) func(rc *resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + rc.Status.ReservedFor = refs + } +} + +func tweakSpecAddConstraint(c resource.DeviceConstraint) func(rc *resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + rc.Spec.Devices.Constraints = append(rc.Spec.Devices.Constraints, c) + } +} + +func tweakDeviceConfigWithDriver(driverName string) func(rc *resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + rc.Spec.Devices.Config = []resource.DeviceClaimConfiguration{ + { + Requests: []string{"req-0"}, + DeviceConfiguration: resource.DeviceConfiguration{ + Opaque: &resource.OpaqueDeviceConfiguration{ + Driver: driverName, + Parameters: runtime.RawExtension{Raw: []byte(`{"key":"value"}`)}, + }, + }, + }, + } + } +} + +func tweakExactlyTolerations(tolerations []resource.DeviceToleration) func(rc *resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + for i := range rc.Spec.Devices.Requests { + rc.Spec.Devices.Requests[i].Exactly.Tolerations = tolerations + } + } +} + +func tweakFirstAvailableTolerations(tolerations []resource.DeviceToleration) func(rc *resource.ResourceClaim) { + return func(rc *resource.ResourceClaim) { + for i := range rc.Spec.Devices.Requests { + for j := range rc.Spec.Devices.Requests[i].FirstAvailable { + rc.Spec.Devices.Requests[i].FirstAvailable[j].Tolerations = tolerations + } + } + } +} diff --git a/pkg/registry/resource/resourceclaim/strategy.go b/pkg/registry/resource/resourceclaim/strategy.go index 5b57d4c842a20..ee9bfb149339e 100644 --- a/pkg/registry/resource/resourceclaim/strategy.go +++ b/pkg/registry/resource/resourceclaim/strategy.go @@ -19,7 +19,11 @@ package resourceclaim import ( "context" "errors" + "regexp" + "sigs.k8s.io/structured-merge-diff/v6/fieldpath" + + "k8s.io/apimachinery/pkg/api/operation" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" @@ -28,6 +32,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apiserver/pkg/registry/generic" + "k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/storage" "k8s.io/apiserver/pkg/storage/names" utilfeature "k8s.io/apiserver/pkg/util/feature" @@ -39,7 +44,6 @@ import ( "k8s.io/kubernetes/pkg/features" resourceutils "k8s.io/kubernetes/pkg/registry/resource" "k8s.io/utils/ptr" - "sigs.k8s.io/structured-merge-diff/v6/fieldpath" ) // resourceclaimStrategy implements behavior for ResourceClaim objects @@ -49,6 +53,19 @@ type resourceclaimStrategy struct { nsClient v1.NamespaceInterface } +var resourceClaimNormalizationRules = []field.NormalizationRule{ + { + // The "exactly" struct was added in v1beta2. In earlier API + // versions, its fields were directly part of the DeviceRequest. + Regexp: regexp.MustCompile(`spec\.devices\.requests\[(\d+)\]\.selectors`), + Replacement: "spec.devices.requests[$1].exactly.selectors", + }, + { + Regexp: regexp.MustCompile(`spec\.devices\.requests\[(\d+)\]\.tolerations`), + Replacement: "spec.devices.requests[$1].exactly.tolerations", + }, +} + // NewStrategy is the default logic that applies when creating and updating ResourceClaim objects. func NewStrategy(nsClient v1.NamespaceInterface) *resourceclaimStrategy { return &resourceclaimStrategy{ @@ -96,7 +113,8 @@ func (s *resourceclaimStrategy) Validate(ctx context.Context, obj runtime.Object claim := obj.(*resource.ResourceClaim) allErrs := resourceutils.AuthorizedForAdmin(ctx, claim.Spec.Devices.Requests, claim.Namespace, s.nsClient) - return append(allErrs, validation.ValidateResourceClaim(claim)...) + allErrs = append(allErrs, validation.ValidateResourceClaim(claim)...) + return rest.ValidateDeclarativelyWithMigrationChecks(ctx, legacyscheme.Scheme, claim, nil, allErrs, operation.Create, rest.WithNormalizationRules(resourceClaimNormalizationRules)) } func (*resourceclaimStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { @@ -122,8 +140,8 @@ func (s *resourceclaimStrategy) ValidateUpdate(ctx context.Context, obj, old run newClaim := obj.(*resource.ResourceClaim) oldClaim := old.(*resource.ResourceClaim) // AuthorizedForAdmin isn't needed here because the spec is immutable. - errorList := validation.ValidateResourceClaim(newClaim) - return append(errorList, validation.ValidateResourceClaimUpdate(newClaim, oldClaim)...) + errorList := validation.ValidateResourceClaimUpdate(newClaim, oldClaim) + return rest.ValidateDeclarativelyWithMigrationChecks(ctx, legacyscheme.Scheme, newClaim, oldClaim, errorList, operation.Update, rest.WithNormalizationRules(resourceClaimNormalizationRules)) } func (*resourceclaimStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string { @@ -184,8 +202,9 @@ func (r *resourceclaimStatusStrategy) ValidateUpdate(ctx context.Context, obj, o if oldClaim.Status.Allocation != nil { oldAllocationResult = oldClaim.Status.Allocation.Devices.Results } - allErrs := resourceutils.AuthorizedForAdminStatus(ctx, newAllocationResult, oldAllocationResult, newClaim.Namespace, r.nsClient) - return append(allErrs, validation.ValidateResourceClaimStatusUpdate(newClaim, oldClaim)...) + errs := resourceutils.AuthorizedForAdminStatus(ctx, newAllocationResult, oldAllocationResult, newClaim.Namespace, r.nsClient) + errs = append(errs, validation.ValidateResourceClaimStatusUpdate(newClaim, oldClaim)...) + return rest.ValidateDeclarativelyWithMigrationChecks(ctx, legacyscheme.Scheme, newClaim, oldClaim, errs, operation.Update) } // WarningsOnUpdate returns warnings for the given update. diff --git a/pkg/registry/resource/resourceclaim/strategy_test.go b/pkg/registry/resource/resourceclaim/strategy_test.go index c4e77313b014a..40c50e2a15ca8 100644 --- a/pkg/registry/resource/resourceclaim/strategy_test.go +++ b/pkg/registry/resource/resourceclaim/strategy_test.go @@ -649,7 +649,7 @@ func TestStrategyUpdate(t *testing.T) { oldObj: obj, newObj: objWithPrioritizedList, prioritizedList: false, - expectValidationError: deviceRequestError, + expectValidationError: fieldImmutableError, verify: func(t *testing.T, as []testclient.Action) { if len(as) != 0 { t.Errorf("expected no action to be taken") diff --git a/pkg/registry/resource/resourceslice/strategy.go b/pkg/registry/resource/resourceslice/strategy.go index 5df06d3e08e35..0f5747a422931 100644 --- a/pkg/registry/resource/resourceslice/strategy.go +++ b/pkg/registry/resource/resourceslice/strategy.go @@ -19,6 +19,7 @@ package resourceslice import ( "context" "fmt" + "strings" apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/fields" @@ -60,8 +61,17 @@ func (resourceSliceStrategy) Validate(ctx context.Context, obj runtime.Object) f return validation.ValidateResourceSlice(slice) } +// WarningsOnCreate returns warnings for the creation of the given object. func (resourceSliceStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { - return nil + newResourceSlice := obj.(*resource.ResourceSlice) + var warnings []string + + if newResourceSlice.Spec.Driver != strings.ToLower(newResourceSlice.Spec.Driver) { + warnings = append(warnings, + fmt.Sprintf("spec.driver: driver names should be lowercase; %q contains uppercase characters", newResourceSlice.Spec.Driver)) + } + + return warnings } func (resourceSliceStrategy) Canonicalize(obj runtime.Object) { @@ -87,8 +97,17 @@ func (resourceSliceStrategy) ValidateUpdate(ctx context.Context, obj, old runtim return validation.ValidateResourceSliceUpdate(obj.(*resource.ResourceSlice), old.(*resource.ResourceSlice)) } +// WarningsOnUpdate returns warnings for the given update. func (resourceSliceStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string { - return nil + newResourceSlice := obj.(*resource.ResourceSlice) + var warnings []string + + if newResourceSlice.Spec.Driver != strings.ToLower(newResourceSlice.Spec.Driver) { + warnings = append(warnings, + fmt.Sprintf("spec.driver: driver names should be lowercase; %q contains uppercase characters", newResourceSlice.Spec.Driver)) + } + + return warnings } func (resourceSliceStrategy) AllowUnconditionalUpdate() bool { diff --git a/pkg/registry/resource/resourceslice/strategy_test.go b/pkg/registry/resource/resourceslice/strategy_test.go index 9632624107ba4..9280cbf0cd5e5 100644 --- a/pkg/registry/resource/resourceslice/strategy_test.go +++ b/pkg/registry/resource/resourceslice/strategy_test.go @@ -20,6 +20,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" k8sresource "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -669,3 +670,74 @@ func TestResourceSliceStrategyUpdate(t *testing.T) { }) } } + +func TestWarningsOnCreate(t *testing.T) { + ctx := genericapirequest.NewDefaultContext() + + testCases := map[string]struct { + obj *resource.ResourceSlice + wantWarningMessages []string + }{ + "valid driver": { + obj: slice, + wantWarningMessages: []string{}, + }, + "uppercase driver warning": { + obj: func() *resource.ResourceSlice { + obj := slice.DeepCopy() + obj.Spec.Driver = "Foo.COM" + return obj + }(), + wantWarningMessages: []string{ + `spec.driver: driver names should be lowercase; "Foo.COM" contains uppercase characters`, + }, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + warnings := Strategy.WarningsOnCreate(ctx, tc.obj) + if warnings == nil { + warnings = []string{} + } + require.Equal(t, tc.wantWarningMessages, warnings) + }) + } +} + +func TestWarningsOnUpdate(t *testing.T) { + ctx := genericapirequest.NewDefaultContext() + + testCases := map[string]struct { + newObj *resource.ResourceSlice + oldObj *resource.ResourceSlice + wantWarningMessages []string + }{ + "valid driver update": { + newObj: slice.DeepCopy(), + oldObj: slice.DeepCopy(), + wantWarningMessages: []string{}, + }, + "uppercase driver warning on update": { + newObj: func() *resource.ResourceSlice { + obj := slice.DeepCopy() + obj.Spec.Driver = "Foo.COM" + return obj + }(), + oldObj: slice.DeepCopy(), + wantWarningMessages: []string{ + `spec.driver: driver names should be lowercase; "Foo.COM" contains uppercase characters`, + }, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + warnings := Strategy.WarningsOnUpdate(ctx, tc.newObj, tc.oldObj) + if warnings == nil { + warnings = []string{} + } + require.Equal(t, tc.wantWarningMessages, warnings) + }) + } +} diff --git a/pkg/registry/scheduling/priorityclass/storage/storage.go b/pkg/registry/scheduling/priorityclass/storage/storage.go index 428ed730131c2..e1822af7b08ad 100644 --- a/pkg/registry/scheduling/priorityclass/storage/storage.go +++ b/pkg/registry/scheduling/priorityclass/storage/storage.go @@ -19,6 +19,7 @@ package storage import ( "context" "errors" + apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -70,9 +71,9 @@ func (r *REST) ShortNames() []string { // Delete ensures that system priority classes are not deleted. func (r *REST) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions) (runtime.Object, bool, error) { - for _, spc := range schedulingapiv1.SystemPriorityClasses() { - if name == spc.Name { - return nil, false, apierrors.NewForbidden(scheduling.Resource("priorityclasses"), spc.Name, errors.New("this is a system priority class and cannot be deleted")) + for _, spcName := range schedulingapiv1.SystemPriorityClassNames() { + if name == spcName { + return nil, false, apierrors.NewForbidden(scheduling.Resource("priorityclasses"), spcName, errors.New("this is a system priority class and cannot be deleted")) } } diff --git a/pkg/registry/scheduling/priorityclass/storage/storage_test.go b/pkg/registry/scheduling/priorityclass/storage/storage_test.go index de6eba809991a..a74f685baa8e5 100644 --- a/pkg/registry/scheduling/priorityclass/storage/storage_test.go +++ b/pkg/registry/scheduling/priorityclass/storage/storage_test.go @@ -117,7 +117,7 @@ func TestDeleteSystemPriorityClass(t *testing.T) { storage, server := newStorage(t) defer server.Terminate(t) defer storage.Store.DestroyFunc() - key := "test/system-node-critical" + key := "/priorityclasses/test/system-node-critical" ctx := genericapirequest.NewContext() pc := schedulingapiv1.SystemPriorityClasses()[0] internalPc := &scheduling.PriorityClass{} diff --git a/pkg/registry/storage/volumeattachment/strategy.go b/pkg/registry/storage/volumeattachment/strategy.go index 51a064c9edccb..a79d7406e2e45 100644 --- a/pkg/registry/storage/volumeattachment/strategy.go +++ b/pkg/registry/storage/volumeattachment/strategy.go @@ -99,8 +99,7 @@ func (volumeAttachmentStrategy) PrepareForUpdate(ctx context.Context, obj, old r func (volumeAttachmentStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { newVolumeAttachmentObj := obj.(*storage.VolumeAttachment) oldVolumeAttachmentObj := old.(*storage.VolumeAttachment) - errorList := validation.ValidateVolumeAttachment(newVolumeAttachmentObj) - return append(errorList, validation.ValidateVolumeAttachmentUpdate(newVolumeAttachmentObj, oldVolumeAttachmentObj)...) + return validation.ValidateVolumeAttachmentUpdate(newVolumeAttachmentObj, oldVolumeAttachmentObj) } // WarningsOnUpdate returns warnings for the given update. diff --git a/pkg/registry/storage/volumeattributesclass/strategy.go b/pkg/registry/storage/volumeattributesclass/strategy.go index d816c2599e1e2..f7652bc46a455 100644 --- a/pkg/registry/storage/volumeattributesclass/strategy.go +++ b/pkg/registry/storage/volumeattributesclass/strategy.go @@ -68,8 +68,7 @@ func (volumeAttributesClassStrategy) PrepareForUpdate(ctx context.Context, obj, } func (volumeAttributesClassStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - errorList := validation.ValidateVolumeAttributesClass(obj.(*storage.VolumeAttributesClass)) - return append(errorList, validation.ValidateVolumeAttributesClassUpdate(obj.(*storage.VolumeAttributesClass), old.(*storage.VolumeAttributesClass))...) + return validation.ValidateVolumeAttributesClassUpdate(obj.(*storage.VolumeAttributesClass), old.(*storage.VolumeAttributesClass)) } // WarningsOnUpdate returns warnings for the given update. diff --git a/pkg/scheduler/apis/config/testing/defaults/defaults.go b/pkg/scheduler/apis/config/testing/defaults/defaults.go index 3037d66435a37..d1afa07696108 100644 --- a/pkg/scheduler/apis/config/testing/defaults/defaults.go +++ b/pkg/scheduler/apis/config/testing/defaults/defaults.go @@ -124,10 +124,6 @@ var ExpandedPluginsV1 = &config.Plugins{ // - This is a score coming from user preference. {Name: names.NodeAffinity, Weight: 2}, {Name: names.NodeResourcesFit, Weight: 1}, - // Weight is tripled because: - // - This is a score coming from user preference. - // - Usage of node tainting to group nodes in the cluster is increasing becoming a use-case - // for many user workloads {Name: names.VolumeBinding, Weight: 1}, // Weight is doubled because: // - This is a score coming from user preference. diff --git a/pkg/scheduler/apis/config/validation/validation_pluginargs_test.go b/pkg/scheduler/apis/config/validation/validation_pluginargs_test.go index 121e134a0b585..f9ff3ea9b87aa 100644 --- a/pkg/scheduler/apis/config/validation/validation_pluginargs_test.go +++ b/pkg/scheduler/apis/config/validation/validation_pluginargs_test.go @@ -686,7 +686,7 @@ func TestValidateFitArgs(t *testing.T) { IgnoredResources: []string{fmt.Sprintf("longvalue%s", strings.Repeat("a", 64))}, ScoringStrategy: defaultScoringStrategy, }, - expect: "name part must be no more than 63 characters", + expect: "name part must be no more than 63 bytes", }, { name: "IgnoredResources: name is empty", @@ -702,7 +702,7 @@ func TestValidateFitArgs(t *testing.T) { IgnoredResources: []string{"example.com/aaa/bbb"}, ScoringStrategy: defaultScoringStrategy, }, - expect: "a qualified name must consist of alphanumeric characters", + expect: "a valid label key must consist of", }, { name: "IgnoredResources: valid args", @@ -732,7 +732,7 @@ func TestValidateFitArgs(t *testing.T) { IgnoredResourceGroups: []string{strings.Repeat("a", 64)}, ScoringStrategy: defaultScoringStrategy, }, - expect: "name part must be no more than 63 characters", + expect: "name part must be no more than 63 bytes", }, { name: "IgnoredResourceGroups: name cannot be contain slash", diff --git a/pkg/scheduler/backend/api_cache/api_cache.go b/pkg/scheduler/backend/api_cache/api_cache.go index 7a021042da0b3..872c8fe8dda15 100644 --- a/pkg/scheduler/backend/api_cache/api_cache.go +++ b/pkg/scheduler/backend/api_cache/api_cache.go @@ -23,7 +23,6 @@ import ( fwk "k8s.io/kube-scheduler/framework" internalcache "k8s.io/kubernetes/pkg/scheduler/backend/cache" internalqueue "k8s.io/kubernetes/pkg/scheduler/backend/queue" - "k8s.io/kubernetes/pkg/scheduler/framework" ) // APICache is responsible for sending API calls' requests through scheduling queue or cache. @@ -42,7 +41,7 @@ func New(schedulingQueue internalqueue.SchedulingQueue, cache internalcache.Cach // PatchPodStatus sends a patch request for a Pod's status through a scheduling queue. // The patch could be first applied to the cached Pod object and then the API call is executed asynchronously. // It returns a channel that can be used to wait for the call's completion. -func (c *APICache) PatchPodStatus(pod *v1.Pod, condition *v1.PodCondition, nominatingInfo *framework.NominatingInfo) (<-chan error, error) { +func (c *APICache) PatchPodStatus(pod *v1.Pod, condition *v1.PodCondition, nominatingInfo *fwk.NominatingInfo) (<-chan error, error) { return c.schedulingQueue.PatchPodStatus(pod, condition, nominatingInfo) } diff --git a/pkg/scheduler/backend/api_dispatcher/api_dispatcher.go b/pkg/scheduler/backend/api_dispatcher/api_dispatcher.go index 4f003b174268c..f0451ec9f4bcd 100644 --- a/pkg/scheduler/backend/api_dispatcher/api_dispatcher.go +++ b/pkg/scheduler/backend/api_dispatcher/api_dispatcher.go @@ -32,17 +32,15 @@ import ( type APIDispatcher struct { cancel func() - client clientset.Interface - callQueue *callQueue - goroutinesLimiter *goroutinesLimiter + client clientset.Interface + callQueue *callQueue } // New returns a new APIDispatcher object. func New(client clientset.Interface, parallelization int, apiCallRelevances fwk.APICallRelevances) *APIDispatcher { d := APIDispatcher{ - client: client, - callQueue: newCallQueue(apiCallRelevances), - goroutinesLimiter: newGoroutinesLimiter(parallelization), + client: client, + callQueue: newCallQueue(apiCallRelevances), } return &d @@ -80,28 +78,17 @@ func (ad *APIDispatcher) Run(logger klog.Logger) { default: } - // Acquire a goroutine before popping a call. This ordering prevents a popped - // call from waiting (being in in-flight) for a long time. - acquired := ad.goroutinesLimiter.acquire() - if !acquired { - // goroutinesLimiter is closed. - return - } apiCall, err := ad.callQueue.pop() if err != nil { utilruntime.HandleErrorWithLogger(logger, err, "popping API call from call controller failed") - ad.goroutinesLimiter.release() continue } if apiCall == nil { // callController is closed. - ad.goroutinesLimiter.release() return } go func() { - defer ad.goroutinesLimiter.release() - startTime := time.Now() err := apiCall.Execute(ctx, ad.client) @@ -124,7 +111,6 @@ func (ad *APIDispatcher) Run(logger klog.Logger) { // Close shuts down the APIDispatcher. func (ad *APIDispatcher) Close() { ad.callQueue.close() - ad.goroutinesLimiter.close() if ad.cancel != nil { ad.cancel() } diff --git a/pkg/scheduler/backend/api_dispatcher/api_dispatcher_test.go b/pkg/scheduler/backend/api_dispatcher/api_dispatcher_test.go index 0134ec4c4eecd..d04544f1a74db 100644 --- a/pkg/scheduler/backend/api_dispatcher/api_dispatcher_test.go +++ b/pkg/scheduler/backend/api_dispatcher/api_dispatcher_test.go @@ -22,19 +22,21 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utilfeature "k8s.io/apiserver/pkg/util/feature" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/fake" + featuregatetesting "k8s.io/component-base/featuregate/testing" "k8s.io/component-base/metrics/testutil" "k8s.io/klog/v2/ktesting" fwk "k8s.io/kube-scheduler/framework" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/scheduler/metrics" ) -func init() { +func registerAndResetMetrics(t *testing.T) { + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.SchedulerAsyncAPICalls, true) metrics.Register() -} -func resetMetrics() { metrics.AsyncAPICallsTotal.Reset() metrics.AsyncAPICallDuration.Reset() metrics.AsyncAPIPendingCalls.Reset() @@ -100,7 +102,7 @@ func (mac *mockAPICall) IsNoOp() bool { func TestAPIDispatcherLifecycle(t *testing.T) { // Reset all async API metrics - resetMetrics() + registerAndResetMetrics(t) logger, _ := ktesting.NewTestContext(t) diff --git a/pkg/scheduler/backend/api_dispatcher/call_queue_test.go b/pkg/scheduler/backend/api_dispatcher/call_queue_test.go index 926f3cff7558a..915ee7970826f 100644 --- a/pkg/scheduler/backend/api_dispatcher/call_queue_test.go +++ b/pkg/scheduler/backend/api_dispatcher/call_queue_test.go @@ -106,7 +106,7 @@ func TestCallQueueAdd(t *testing.T) { uid2 := types.UID("uid2") t.Run("First call is added without collision", func(t *testing.T) { - resetMetrics() + registerAndResetMetrics(t) cq := newCallQueue(mockRelevances) call := &queuedAPICall{ @@ -124,7 +124,7 @@ func TestCallQueueAdd(t *testing.T) { }) t.Run("No-op call is skipped", func(t *testing.T) { - resetMetrics() + registerAndResetMetrics(t) cq := newCallQueue(mockRelevances) onFinishCh := make(chan error, 1) @@ -149,7 +149,7 @@ func TestCallQueueAdd(t *testing.T) { }) t.Run("Two calls for different objects don't collide", func(t *testing.T) { - resetMetrics() + registerAndResetMetrics(t) cq := newCallQueue(mockRelevances) call1 := &queuedAPICall{ @@ -176,7 +176,7 @@ func TestCallQueueAdd(t *testing.T) { }) t.Run("New call overwrites less relevant call", func(t *testing.T) { - resetMetrics() + registerAndResetMetrics(t) cq := newCallQueue(mockRelevances) onFinishCh := make(chan error, 1) @@ -206,7 +206,7 @@ func TestCallQueueAdd(t *testing.T) { }) t.Run("New call is skipped if less relevant", func(t *testing.T) { - resetMetrics() + registerAndResetMetrics(t) cq := newCallQueue(mockRelevances) onFinishCh := make(chan error, 1) @@ -237,7 +237,7 @@ func TestCallQueueAdd(t *testing.T) { }) t.Run("New call merges with old call and skips if no-op", func(t *testing.T) { - resetMetrics() + registerAndResetMetrics(t) cq := newCallQueue(mockRelevances) onFinishCh1 := make(chan error, 1) @@ -308,7 +308,7 @@ func TestCallQueuePop(t *testing.T) { uid2 := types.UID("uid2") t.Run("Calls are popped from the queue in FIFO order", func(t *testing.T) { - resetMetrics() + registerAndResetMetrics(t) cq := newCallQueue(mockRelevances) call1 := &queuedAPICall{ @@ -395,7 +395,7 @@ func TestCallQueueFinalize(t *testing.T) { uid := types.UID("uid") t.Run("Call details are cleared if there is no waiting call", func(t *testing.T) { - resetMetrics() + registerAndResetMetrics(t) cq := newCallQueue(mockRelevances) call := &queuedAPICall{ @@ -420,7 +420,7 @@ func TestCallQueueFinalize(t *testing.T) { }) t.Run("UID is re-queued if a new call arrived while one was in-flight", func(t *testing.T) { - resetMetrics() + registerAndResetMetrics(t) cq := newCallQueue(mockRelevances) call1 := &queuedAPICall{ @@ -462,7 +462,7 @@ func TestCallQueueSyncObject(t *testing.T) { uid2 := types.UID("uid2") t.Run("Object is synced with pending call details", func(t *testing.T) { - resetMetrics() + registerAndResetMetrics(t) cq := newCallQueue(mockRelevances) obj := &metav1.ObjectMeta{ @@ -497,7 +497,7 @@ func TestCallQueueSyncObject(t *testing.T) { }) t.Run("Pending call is canceled if sync results in no-op", func(t *testing.T) { - resetMetrics() + registerAndResetMetrics(t) cq := newCallQueue(mockRelevances) obj := &metav1.ObjectMeta{UID: uid1} diff --git a/pkg/scheduler/backend/cache/snapshot.go b/pkg/scheduler/backend/cache/snapshot.go index 06aca1a0bafb1..b8d34da321f12 100644 --- a/pkg/scheduler/backend/cache/snapshot.go +++ b/pkg/scheduler/backend/cache/snapshot.go @@ -43,7 +43,7 @@ type Snapshot struct { generation int64 } -var _ framework.SharedLister = &Snapshot{} +var _ fwk.SharedLister = &Snapshot{} // NewEmptySnapshot initializes a Snapshot struct and returns it. func NewEmptySnapshot() *Snapshot { @@ -156,12 +156,12 @@ func createImageExistenceMap(nodes []*v1.Node) map[string]sets.Set[string] { } // NodeInfos returns a NodeInfoLister. -func (s *Snapshot) NodeInfos() framework.NodeInfoLister { +func (s *Snapshot) NodeInfos() fwk.NodeInfoLister { return s } // StorageInfos returns a StorageInfoLister. -func (s *Snapshot) StorageInfos() framework.StorageInfoLister { +func (s *Snapshot) StorageInfos() fwk.StorageInfoLister { return s } diff --git a/pkg/scheduler/backend/queue/active_queue.go b/pkg/scheduler/backend/queue/active_queue.go index 620579d7adcaa..de722833d4446 100644 --- a/pkg/scheduler/backend/queue/active_queue.go +++ b/pkg/scheduler/backend/queue/active_queue.go @@ -32,15 +32,11 @@ import ( ) // activeQueuer is a wrapper for activeQ related operations. -// Its methods, except "unlocked" ones, take the lock inside. -// Note: be careful when using unlocked() methods. -// getLock() methods should be used only for unlocked() methods -// and it is forbidden to call any other activeQueuer's method under this lock. +// Its methods take the lock inside. type activeQueuer interface { underLock(func(unlockedActiveQ unlockedActiveQueuer)) underRLock(func(unlockedActiveQ unlockedActiveQueueReader)) - update(newPod *v1.Pod, oldPodInfo *framework.QueuedPodInfo) *framework.QueuedPodInfo delete(pInfo *framework.QueuedPodInfo) error pop(logger klog.Logger) (*framework.QueuedPodInfo, error) list() []*v1.Pod @@ -66,7 +62,13 @@ type unlockedActiveQueuer interface { // add adds a new pod to the activeQ. // The event should show which event triggered this addition and is used for the metric recording. // This method should be called in activeQueue.underLock(). - add(pInfo *framework.QueuedPodInfo, event string) + add(logger klog.Logger, pInfo *framework.QueuedPodInfo, event string) + // update updates the pod in activeQ if oldPodInfo is already in the queue. + // It returns new pod info if updated, nil otherwise. + update(newPod *v1.Pod, oldPodInfo *framework.QueuedPodInfo) *framework.QueuedPodInfo + // addEventsIfPodInFlight adds events to inFlightEvents if the newPod is in inFlightPods. + // It returns true if pushed the event to the inFlightEvents. + addEventsIfPodInFlight(oldPod, newPod *v1.Pod, events []fwk.ClusterEvent) bool } // unlockedActiveQueueReader defines activeQ read-only methods that are not protected by the lock itself. @@ -84,21 +86,56 @@ type unlockedActiveQueueReader interface { // unlockedActiveQueue defines activeQ methods that are not protected by the lock itself. // activeQueue.underLock() or activeQueue.underRLock() method should be used to protect these methods. type unlockedActiveQueue struct { - queue *heap.Heap[*framework.QueuedPodInfo] + queue *heap.Heap[*framework.QueuedPodInfo] + inFlightPods map[types.UID]*list.Element + inFlightEvents *list.List + metricsRecorder *metrics.MetricAsyncRecorder } -func newUnlockedActiveQueue(queue *heap.Heap[*framework.QueuedPodInfo]) *unlockedActiveQueue { +func newUnlockedActiveQueue(queue *heap.Heap[*framework.QueuedPodInfo], inFlightPods map[types.UID]*list.Element, inFlightEvents *list.List, metricsRecorder *metrics.MetricAsyncRecorder) *unlockedActiveQueue { return &unlockedActiveQueue{ - queue: queue, + queue: queue, + inFlightPods: inFlightPods, + inFlightEvents: inFlightEvents, + metricsRecorder: metricsRecorder, } } // add adds a new pod to the activeQ. // The event should show which event triggered this addition and is used for the metric recording. // This method should be called in activeQueue.underLock(). -func (uaq *unlockedActiveQueue) add(pInfo *framework.QueuedPodInfo, event string) { +func (uaq *unlockedActiveQueue) add(logger klog.Logger, pInfo *framework.QueuedPodInfo, event string) { uaq.queue.AddOrUpdate(pInfo) metrics.SchedulerQueueIncomingPods.WithLabelValues("active", event).Inc() + logger.V(5).Info("Pod moved to an internal scheduling queue", "pod", klog.KObj(pInfo.Pod), "event", event, "queue", activeQ) +} + +// update updates the pod in activeQ if oldPodInfo is already in the queue. +// It returns new pod info if updated, nil otherwise. +func (uaq *unlockedActiveQueue) update(newPod *v1.Pod, oldPodInfo *framework.QueuedPodInfo) *framework.QueuedPodInfo { + if pInfo, exists := uaq.queue.Get(oldPodInfo); exists { + _ = pInfo.Update(newPod) + uaq.queue.AddOrUpdate(pInfo) + return pInfo + } + return nil +} + +// addEventsIfPodInFlight adds events to inFlightEvents if the newPod is in inFlightPods. +// It returns true if pushed the event to the inFlightEvents. +func (uaq *unlockedActiveQueue) addEventsIfPodInFlight(oldPod, newPod *v1.Pod, events []fwk.ClusterEvent) bool { + _, ok := uaq.inFlightPods[newPod.UID] + if ok { + for _, event := range events { + uaq.metricsRecorder.ObserveInFlightEventsAsync(event.Label(), 1, false) + uaq.inFlightEvents.PushBack(&clusterEvent{ + event: event, + oldObj: oldPod, + newObj: newPod, + }) + } + } + return ok } // get returns the pod matching pInfo inside the activeQ. @@ -181,24 +218,24 @@ type activeQueue struct { // isSchedulingQueueHintEnabled indicates whether the feature gate for the scheduling queue is enabled. isSchedulingQueueHintEnabled bool - metricsRecorder metrics.MetricAsyncRecorder + metricsRecorder *metrics.MetricAsyncRecorder // backoffQPopper is used to pop from backoffQ when activeQ is empty. // It is non-nil only when SchedulerPopFromBackoffQ feature is enabled. backoffQPopper backoffQPopper } -func newActiveQueue(queue *heap.Heap[*framework.QueuedPodInfo], isSchedulingQueueHintEnabled bool, metricRecorder metrics.MetricAsyncRecorder, backoffQPopper backoffQPopper) *activeQueue { +func newActiveQueue(queue *heap.Heap[*framework.QueuedPodInfo], isSchedulingQueueHintEnabled bool, metricRecorder *metrics.MetricAsyncRecorder, backoffQPopper backoffQPopper) *activeQueue { aq := &activeQueue{ queue: queue, inFlightPods: make(map[types.UID]*list.Element), inFlightEvents: list.New(), isSchedulingQueueHintEnabled: isSchedulingQueueHintEnabled, metricsRecorder: metricRecorder, - unlockedQueue: newUnlockedActiveQueue(queue), backoffQPopper: backoffQPopper, } aq.cond.L = &aq.lock + aq.unlockedQueue = newUnlockedActiveQueue(queue, aq.inFlightPods, aq.inFlightEvents, metricRecorder) return aq } @@ -221,20 +258,6 @@ func (aq *activeQueue) underRLock(fn func(unlockedActiveQ unlockedActiveQueueRea fn(aq.unlockedQueue) } -// update updates the pod in activeQ if oldPodInfo is already in the queue. -// It returns new pod info if updated, nil otherwise. -func (aq *activeQueue) update(newPod *v1.Pod, oldPodInfo *framework.QueuedPodInfo) *framework.QueuedPodInfo { - aq.lock.Lock() - defer aq.lock.Unlock() - - if pInfo, exists := aq.queue.Get(oldPodInfo); exists { - _ = pInfo.Update(newPod) - aq.queue.AddOrUpdate(pInfo) - return pInfo - } - return nil -} - // delete deletes the pod info from activeQ. func (aq *activeQueue) delete(pInfo *framework.QueuedPodInfo) error { aq.lock.Lock() @@ -383,24 +406,13 @@ func (aq *activeQueue) clusterEventsForPod(logger klog.Logger, pInfo *framework. return events, nil } -// addEventsIfPodInFlight adds clusterEvent to inFlightEvents if the newPod is in inFlightPods. +// addEventsIfPodInFlight adds events to inFlightEvents if the newPod is in inFlightPods. // It returns true if pushed the event to the inFlightEvents. func (aq *activeQueue) addEventsIfPodInFlight(oldPod, newPod *v1.Pod, events []fwk.ClusterEvent) bool { aq.lock.Lock() defer aq.lock.Unlock() - _, ok := aq.inFlightPods[newPod.UID] - if ok { - for _, event := range events { - aq.metricsRecorder.ObserveInFlightEventsAsync(event.Label(), 1, false) - aq.inFlightEvents.PushBack(&clusterEvent{ - event: event, - oldObj: oldPod, - newObj: newPod, - }) - } - } - return ok + return aq.unlockedQueue.addEventsIfPodInFlight(oldPod, newPod, events) } // addEventIfAnyInFlight adds clusterEvent to inFlightEvents if any pod is in inFlightPods. diff --git a/pkg/scheduler/backend/queue/active_queue_test.go b/pkg/scheduler/backend/queue/active_queue_test.go index fe242defde6ca..a17642ea2f88a 100644 --- a/pkg/scheduler/backend/queue/active_queue_test.go +++ b/pkg/scheduler/backend/queue/active_queue_test.go @@ -30,11 +30,11 @@ import ( func TestClose(t *testing.T) { logger, ctx := ktesting.NewTestContext(t) rr := metrics.NewMetricsAsyncRecorder(10, time.Second, ctx.Done()) - aq := newActiveQueue(heap.NewWithRecorder(podInfoKeyFunc, heap.LessFunc[*framework.QueuedPodInfo](convertLessFn(newDefaultQueueSort())), metrics.NewActivePodsRecorder()), true, *rr, nil) + aq := newActiveQueue(heap.NewWithRecorder(podInfoKeyFunc, heap.LessFunc[*framework.QueuedPodInfo](convertLessFn(newDefaultQueueSort())), metrics.NewActivePodsRecorder()), true, rr, nil) aq.underLock(func(unlockedActiveQ unlockedActiveQueuer) { - unlockedActiveQ.add(&framework.QueuedPodInfo{PodInfo: &framework.PodInfo{Pod: st.MakePod().Namespace("foo").Name("p1").UID("p1").Obj()}}, framework.EventUnscheduledPodAdd.Label()) - unlockedActiveQ.add(&framework.QueuedPodInfo{PodInfo: &framework.PodInfo{Pod: st.MakePod().Namespace("bar").Name("p2").UID("p2").Obj()}}, framework.EventUnscheduledPodAdd.Label()) + unlockedActiveQ.add(logger, &framework.QueuedPodInfo{PodInfo: &framework.PodInfo{Pod: st.MakePod().Namespace("foo").Name("p1").UID("p1").Obj()}}, framework.EventUnscheduledPodAdd.Label()) + unlockedActiveQ.add(logger, &framework.QueuedPodInfo{PodInfo: &framework.PodInfo{Pod: st.MakePod().Namespace("bar").Name("p2").UID("p2").Obj()}}, framework.EventUnscheduledPodAdd.Label()) }) _, err := aq.pop(logger) diff --git a/pkg/scheduler/backend/queue/backoff_queue.go b/pkg/scheduler/backend/queue/backoff_queue.go index 5d20f2593ce9f..925e8b34dec2a 100644 --- a/pkg/scheduler/backend/queue/backoff_queue.go +++ b/pkg/scheduler/backend/queue/backoff_queue.go @@ -23,6 +23,7 @@ import ( v1 "k8s.io/api/core/v1" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/klog/v2" + fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/backend/heap" "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/metrics" @@ -100,13 +101,13 @@ type backoffQueue struct { podMaxBackoff time.Duration // activeQLessFn is used as an eventual less function if two backoff times are equal, // when the SchedulerPopFromBackoffQ feature is enabled. - activeQLessFn framework.LessFunc + activeQLessFn fwk.LessFunc // isPopFromBackoffQEnabled indicates whether the feature gate SchedulerPopFromBackoffQ is enabled. isPopFromBackoffQEnabled bool } -func newBackoffQueue(clock clock.WithTicker, podInitialBackoffDuration time.Duration, podMaxBackoffDuration time.Duration, activeQLessFn framework.LessFunc, popFromBackoffQEnabled bool) *backoffQueue { +func newBackoffQueue(clock clock.WithTicker, podInitialBackoffDuration time.Duration, podMaxBackoffDuration time.Duration, activeQLessFn fwk.LessFunc, popFromBackoffQEnabled bool) *backoffQueue { bq := &backoffQueue{ clock: clock, podInitialBackoff: podInitialBackoffDuration, @@ -306,6 +307,7 @@ func (bq *backoffQueue) add(logger klog.Logger, pInfo *framework.QueuedPodInfo, return } metrics.SchedulerQueueIncomingPods.WithLabelValues("backoff", event).Inc() + logger.V(5).Info("Pod moved to an internal scheduling queue", "pod", klog.KObj(pInfo.Pod), "event", event, "queue", backoffQ) return } bq.podBackoffQ.AddOrUpdate(pInfo) @@ -316,6 +318,7 @@ func (bq *backoffQueue) add(logger klog.Logger, pInfo *framework.QueuedPodInfo, return } metrics.SchedulerQueueIncomingPods.WithLabelValues("backoff", event).Inc() + logger.V(5).Info("Pod moved to an internal scheduling queue", "pod", klog.KObj(pInfo.Pod), "event", event, "queue", backoffQ) } // update updates the pod in backoffQueue if oldPodInfo is already in the queue. diff --git a/pkg/scheduler/backend/queue/nominator.go b/pkg/scheduler/backend/queue/nominator.go index c11e7c97373ab..e871b940dfd2b 100644 --- a/pkg/scheduler/backend/queue/nominator.go +++ b/pkg/scheduler/backend/queue/nominator.go @@ -26,7 +26,6 @@ import ( listersv1 "k8s.io/client-go/listers/core/v1" "k8s.io/klog/v2" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" ) // nominator is a structure that stores pods nominated to run on nodes. @@ -61,25 +60,25 @@ func newPodNominator(podLister listersv1.PodLister) *nominator { } } -// AddNominatedPod adds a pod to the nominated pods of the given node. -// This is called during the preemption process after a node is nominated to run -// the pod. We update the structure before sending a request to update the pod -// object to avoid races with the following scheduling cycles. -func (npm *nominator) AddNominatedPod(logger klog.Logger, pi fwk.PodInfo, nominatingInfo *framework.NominatingInfo) { +// addNominatedPod adds a pod to the nominated pods of the given node. +// This is called during the preemption process when a node is nominated to run +// the pod. We update the nominator's structure before sending an API request to update the pod +// object, to avoid races with the following scheduling cycles. +func (npm *nominator) addNominatedPod(logger klog.Logger, pi fwk.PodInfo, nominatingInfo *fwk.NominatingInfo) { npm.nLock.Lock() npm.addNominatedPodUnlocked(logger, pi, nominatingInfo) npm.nLock.Unlock() } -func (npm *nominator) addNominatedPodUnlocked(logger klog.Logger, pi fwk.PodInfo, nominatingInfo *framework.NominatingInfo) { +func (npm *nominator) addNominatedPodUnlocked(logger klog.Logger, pi fwk.PodInfo, nominatingInfo *fwk.NominatingInfo) { // Always delete the pod if it already exists, to ensure we never store more than // one instance of the pod. npm.deleteUnlocked(pi.GetPod()) var nodeName string - if nominatingInfo.Mode() == framework.ModeOverride { + if nominatingInfo.Mode() == fwk.ModeOverride { nodeName = nominatingInfo.NominatedNodeName - } else if nominatingInfo.Mode() == framework.ModeNoop { + } else if nominatingInfo.Mode() == fwk.ModeNoop { if pi.GetPod().Status.NominatedNodeName == "" { return } @@ -116,7 +115,7 @@ func (npm *nominator) UpdateNominatedPod(logger klog.Logger, oldPod *v1.Pod, new // In some cases, an Update event with no "NominatedNode" present is received right // after a node("NominatedNode") is reserved for this pod in memory. // In this case, we need to keep reserving the NominatedNode when updating the pod pointer. - var nominatingInfo *framework.NominatingInfo + var nominatingInfo *fwk.NominatingInfo // We won't fall into below `if` block if the Update event represents: // (1) NominatedNode info is added // (2) NominatedNode info is updated @@ -124,8 +123,8 @@ func (npm *nominator) UpdateNominatedPod(logger klog.Logger, oldPod *v1.Pod, new if nominatedNodeName(oldPod) == "" && nominatedNodeName(newPodInfo.GetPod()) == "" { if nnn, ok := npm.nominatedPodToNode[oldPod.UID]; ok { // This is the only case we should continue reserving the NominatedNode - nominatingInfo = &framework.NominatingInfo{ - NominatingMode: framework.ModeOverride, + nominatingInfo = &fwk.NominatingInfo{ + NominatingMode: fwk.ModeOverride, NominatedNodeName: nnn, } } diff --git a/pkg/scheduler/backend/queue/scheduling_queue.go b/pkg/scheduler/backend/queue/scheduling_queue.go index 798794c371835..717b55656f142 100644 --- a/pkg/scheduler/backend/queue/scheduling_queue.go +++ b/pkg/scheduler/backend/queue/scheduling_queue.go @@ -49,7 +49,7 @@ import ( "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/scheduler/backend/heap" "k8s.io/kubernetes/pkg/scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework/api_calls" + apicalls "k8s.io/kubernetes/pkg/scheduler/framework/api_calls" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread" "k8s.io/kubernetes/pkg/scheduler/metrics" @@ -92,7 +92,7 @@ type PreEnqueueCheck func(pod *v1.Pod) bool // The interface follows a pattern similar to cache.FIFO and cache.Heap and // makes it easy to use those data structures as a SchedulingQueue. type SchedulingQueue interface { - framework.PodNominator + fwk.PodNominator Add(logger klog.Logger, pod *v1.Pod) // Activate moves the given pods to activeQ. // If a pod isn't found in unschedulablePods or backoffQ and it's in-flight, @@ -131,7 +131,7 @@ type SchedulingQueue interface { // PatchPodStatus handles the pod status update by sending an update API call through API dispatcher. // This method should be used only if the SchedulerAsyncAPICalls feature gate is enabled. - PatchPodStatus(pod *v1.Pod, condition *v1.PodCondition, nominatingInfo *framework.NominatingInfo) (<-chan error, error) + PatchPodStatus(pod *v1.Pod, condition *v1.PodCondition, nominatingInfo *fwk.NominatingInfo) (<-chan error, error) // The following functions are supposed to be used only for testing or debugging. GetPod(name, namespace string) (*framework.QueuedPodInfo, bool) @@ -145,7 +145,7 @@ type SchedulingQueue interface { // NewSchedulingQueue initializes a priority queue as a new scheduling queue. func NewSchedulingQueue( - lessFn framework.LessFunc, + lessFn fwk.LessFunc, informerFactory informers.SharedInformerFactory, opts ...Option) SchedulingQueue { return NewPriorityQueue(lessFn, informerFactory, opts...) @@ -186,7 +186,7 @@ type PriorityQueue struct { moveRequestCycle int64 // preEnqueuePluginMap is keyed with profile and plugin name, valued with registered preEnqueue plugins. - preEnqueuePluginMap map[string]map[string]framework.PreEnqueuePlugin + preEnqueuePluginMap map[string]map[string]fwk.PreEnqueuePlugin // queueingHintMap is keyed with profile name, valued with registered queueing hint functions. queueingHintMap QueueingHintMapPerProfile // pluginToEventsMap shows which plugin is interested in which events. @@ -194,7 +194,7 @@ type PriorityQueue struct { nsLister listersv1.NamespaceLister - metricsRecorder metrics.MetricAsyncRecorder + metricsRecorder *metrics.MetricAsyncRecorder // pluginMetricsSamplePercent is the percentage of plugin metrics to be sampled. pluginMetricsSamplePercent int @@ -229,9 +229,9 @@ type priorityQueueOptions struct { podMaxBackoffDuration time.Duration podMaxInUnschedulablePodsDuration time.Duration podLister listersv1.PodLister - metricsRecorder metrics.MetricAsyncRecorder + metricsRecorder *metrics.MetricAsyncRecorder pluginMetricsSamplePercent int - preEnqueuePluginMap map[string]map[string]framework.PreEnqueuePlugin + preEnqueuePluginMap map[string]map[string]fwk.PreEnqueuePlugin queueingHintMap QueueingHintMapPerProfile apiDispatcher fwk.APIDispatcher } @@ -288,14 +288,14 @@ func WithQueueingHintMapPerProfile(m QueueingHintMapPerProfile) Option { } // WithPreEnqueuePluginMap sets preEnqueuePluginMap for PriorityQueue. -func WithPreEnqueuePluginMap(m map[string]map[string]framework.PreEnqueuePlugin) Option { +func WithPreEnqueuePluginMap(m map[string]map[string]fwk.PreEnqueuePlugin) Option { return func(o *priorityQueueOptions) { o.preEnqueuePluginMap = m } } // WithMetricsRecorder sets metrics recorder. -func WithMetricsRecorder(recorder metrics.MetricAsyncRecorder) Option { +func WithMetricsRecorder(recorder *metrics.MetricAsyncRecorder) Option { return func(o *priorityQueueOptions) { o.metricsRecorder = recorder } @@ -337,7 +337,7 @@ func newQueuedPodInfoForLookup(pod *v1.Pod, plugins ...string) *framework.Queued // NewPriorityQueue creates a PriorityQueue object. func NewPriorityQueue( - lessFn framework.LessFunc, + lessFn fwk.LessFunc, informerFactory informers.SharedInformerFactory, opts ...Option, ) *PriorityQueue { @@ -381,8 +381,8 @@ func NewPriorityQueue( return pq } -// Helper function that wraps framework.LessFunc and converts it to take *framework.QueuedPodInfo as arguments. -func convertLessFn(lessFn framework.LessFunc) func(podInfo1, podInfo2 *framework.QueuedPodInfo) bool { +// Helper function that wraps fwk.LessFunc and converts it to take *framework.QueuedPodInfo as arguments. +func convertLessFn(lessFn fwk.LessFunc) func(podInfo1, podInfo2 *framework.QueuedPodInfo) bool { return func(podInfo1, podInfo2 *framework.QueuedPodInfo) bool { return lessFn(podInfo1, podInfo2) } @@ -599,7 +599,7 @@ func (p *PriorityQueue) runPreEnqueuePlugins(ctx context.Context, pInfo *framewo } // runPreEnqueuePlugin runs the PreEnqueue plugin and update pInfo's fields accordingly if needed. -func (p *PriorityQueue) runPreEnqueuePlugin(ctx context.Context, logger klog.Logger, pl framework.PreEnqueuePlugin, pInfo *framework.QueuedPodInfo, shouldRecordMetric bool) *fwk.Status { +func (p *PriorityQueue) runPreEnqueuePlugin(ctx context.Context, logger klog.Logger, pl fwk.PreEnqueuePlugin, pInfo *framework.QueuedPodInfo, shouldRecordMetric bool) *fwk.Status { pod := pInfo.Pod startTime := p.clock.Now() s := pl.PreEnqueue(ctx, pod) @@ -623,15 +623,25 @@ func (p *PriorityQueue) runPreEnqueuePlugin(ctx context.Context, logger klog.Log return s } +// AddNominatedPod adds the given pod to the nominator. +// It locks the PriorityQueue to make sure it won't race with any other method. +func (p *PriorityQueue) AddNominatedPod(logger klog.Logger, pi fwk.PodInfo, nominatingInfo *fwk.NominatingInfo) { + p.lock.Lock() + p.nominator.addNominatedPod(logger, pi, nominatingInfo) + p.lock.Unlock() +} + // moveToActiveQ tries to add the pod to the active queue. // If the pod doesn't pass PreEnqueue plugins, it gets added to unschedulablePods instead. +// movesFromBackoffQ should be set to true, if the pod directly moves from the backoffQ, so the PreEnqueue call can be skipped. // It returns a boolean flag to indicate whether the pod is added successfully. -func (p *PriorityQueue) moveToActiveQ(logger klog.Logger, pInfo *framework.QueuedPodInfo, event string) bool { +func (p *PriorityQueue) moveToActiveQ(logger klog.Logger, pInfo *framework.QueuedPodInfo, event string, movesFromBackoffQ bool) bool { gatedBefore := pInfo.Gated() // If SchedulerPopFromBackoffQ feature gate is enabled, // PreEnqueue plugins were called when the pod was added to the backoffQ. // Don't need to repeat it here when the pod is directly moved from the backoffQ. - if !p.isPopFromBackoffQEnabled || event != framework.BackoffComplete { + skipPreEnqueue := p.isPopFromBackoffQEnabled && movesFromBackoffQ + if !skipPreEnqueue { p.runPreEnqueuePlugins(context.Background(), pInfo) } @@ -656,15 +666,13 @@ func (p *PriorityQueue) moveToActiveQ(logger klog.Logger, pInfo *framework.Queue now := p.clock.Now() pInfo.InitialAttemptTimestamp = &now } - - unlockedActiveQ.add(pInfo, event) - added = true - p.unschedulablePods.delete(pInfo.Pod, gatedBefore) p.backoffQ.delete(pInfo) - logger.V(5).Info("Pod moved to an internal scheduling queue", "pod", klog.KObj(pInfo.Pod), "event", event, "queue", activeQ) + + unlockedActiveQ.add(logger, pInfo, event) + added = true if event == framework.EventUnscheduledPodAdd.Label() || event == framework.EventUnscheduledPodUpdate.Label() { - p.AddNominatedPod(logger, pInfo.PodInfo, nil) + p.nominator.addNominatedPod(logger, pInfo.PodInfo, nil) } }) return added @@ -674,6 +682,7 @@ func (p *PriorityQueue) moveToActiveQ(logger klog.Logger, pInfo *framework.Queue // If SchedulerPopFromBackoffQ feature gate is enabled and the pod doesn't pass PreEnqueue plugins, it gets added to unschedulablePods instead. // It returns a boolean flag to indicate whether the pod is added successfully. func (p *PriorityQueue) moveToBackoffQ(logger klog.Logger, pInfo *framework.QueuedPodInfo, event string) bool { + gatedBefore := pInfo.Gated() // If SchedulerPopFromBackoffQ feature gate is enabled, // PreEnqueue plugins are called on inserting pods to the backoffQ, // not to call them again on popping out. @@ -687,8 +696,9 @@ func (p *PriorityQueue) moveToBackoffQ(logger klog.Logger, pInfo *framework.Queu return false } } + p.unschedulablePods.delete(pInfo.Pod, gatedBefore) + p.backoffQ.add(logger, pInfo, event) - logger.V(5).Info("Pod moved to an internal scheduling queue", "pod", klog.KObj(pInfo.Pod), "event", event, "queue", backoffQ) return true } @@ -699,7 +709,7 @@ func (p *PriorityQueue) Add(logger klog.Logger, pod *v1.Pod) { defer p.lock.Unlock() pInfo := p.newQueuedPodInfo(pod) - if added := p.moveToActiveQ(logger, pInfo, framework.EventUnscheduledPodAdd.Label()); added { + if added := p.moveToActiveQ(logger, pInfo, framework.EventUnscheduledPodAdd.Label(), false); added { p.activeQ.broadcast() } } @@ -735,6 +745,7 @@ func (p *PriorityQueue) Activate(logger klog.Logger, pods map[string]*v1.Pod) { func (p *PriorityQueue) activate(logger klog.Logger, pod *v1.Pod) bool { var pInfo *framework.QueuedPodInfo + var movesFromBackoffQ bool // Verify if the pod is present in unschedulablePods or backoffQ. if pInfo = p.unschedulablePods.get(pod); pInfo == nil { // If the pod doesn't belong to unschedulablePods or backoffQ, don't activate it. @@ -750,6 +761,7 @@ func (p *PriorityQueue) activate(logger klog.Logger, pod *v1.Pod) bool { // Pod was popped from the backoffQ in the meantime. Don't activate it. return false } + movesFromBackoffQ = true } if pInfo == nil { @@ -758,7 +770,7 @@ func (p *PriorityQueue) activate(logger klog.Logger, pod *v1.Pod) bool { return false } - return p.moveToActiveQ(logger, pInfo, framework.ForceActivate) + return p.moveToActiveQ(logger, pInfo, framework.ForceActivate, movesFromBackoffQ) } // SchedulingCycle returns current scheduling cycle. @@ -916,7 +928,7 @@ func (p *PriorityQueue) flushBackoffQCompleted(logger klog.Logger) { activated := false podsCompletedBackoff := p.backoffQ.popAllBackoffCompleted(logger) for _, pInfo := range podsCompletedBackoff { - if added := p.moveToActiveQ(logger, pInfo, framework.BackoffComplete); added { + if added := p.moveToActiveQ(logger, pInfo, framework.BackoffComplete, true); added { activated = true } } @@ -1006,37 +1018,51 @@ func (p *PriorityQueue) Update(logger klog.Logger, oldPod, newPod *v1.Pod) { var events []fwk.ClusterEvent if p.isSchedulingQueueHintEnabled { events = framework.PodSchedulingPropertiesChange(newPod, oldPod) - // The inflight pod will be requeued using the latest version from the informer cache, which matches what the event delivers. - // Record this Pod update because - // this update may make the Pod schedulable in case it gets rejected and comes back to the queue. - // We can clean it up once we change updatePodInSchedulingQueue to call MoveAllToActiveOrBackoffQueue. - // See https://github.com/kubernetes/kubernetes/pull/125578#discussion_r1648338033 for more context. - if exists := p.activeQ.addEventsIfPodInFlight(oldPod, newPod, events); exists { - logger.V(6).Info("The pod doesn't be queued for now because it's being scheduled and will be queued back if necessary", "pod", klog.KObj(newPod)) - return - } } - if oldPod != nil { - oldPodInfo := newQueuedPodInfoForLookup(oldPod) - // If the pod is already in the active queue, just update it there. - if pInfo := p.activeQ.update(newPod, oldPodInfo); pInfo != nil { - p.UpdateNominatedPod(logger, oldPod, pInfo.PodInfo) - return + updated := false + // Run the following code under the activeQ lock to make sure that in the meantime pod is not popped from either activeQ or backoffQ. + // This way, the event will be registered or the pod will be updated consistently. + // Locking only the part of Update method is sufficient, because in the other part the pod is in the unscheduledPods + // which is protected by p.lock anyway. + p.activeQ.underLock(func(unlockedActiveQ unlockedActiveQueuer) { + if p.isSchedulingQueueHintEnabled { + // The inflight pod will be requeued using the latest version from the informer cache, which matches what the event delivers. + // Record this Pod update because + // this update may make the Pod schedulable in case it gets rejected and comes back to the queue. + // We can clean it up once we change updatePodInSchedulingQueue to call MoveAllToActiveOrBackoffQueue. + // See https://github.com/kubernetes/kubernetes/pull/125578#discussion_r1648338033 for more context. + if exists := unlockedActiveQ.addEventsIfPodInFlight(oldPod, newPod, events); exists { + logger.V(6).Info("The pod doesn't need to be queued for now because it's being scheduled and will be queued back if necessary", "pod", klog.KObj(newPod)) + updated = true + return + } } + if oldPod != nil { + oldPodInfo := newQueuedPodInfoForLookup(oldPod) + // If the pod is already in the active queue, just update it there. + if pInfo := unlockedActiveQ.update(newPod, oldPodInfo); pInfo != nil { + p.UpdateNominatedPod(logger, oldPod, pInfo.PodInfo) + updated = true + return + } - // If the pod is in the backoff queue, update it there. - if pInfo := p.backoffQ.update(newPod, oldPodInfo); pInfo != nil { - p.UpdateNominatedPod(logger, oldPod, pInfo.PodInfo) - return + // If the pod is in the backoff queue, update it there. + if pInfo := p.backoffQ.update(newPod, oldPodInfo); pInfo != nil { + p.UpdateNominatedPod(logger, oldPod, pInfo.PodInfo) + updated = true + return + } } + }) + if updated { + return } // If the pod is in the unschedulable queue, updating it may make it schedulable. if pInfo := p.unschedulablePods.get(newPod); pInfo != nil { _ = pInfo.Update(newPod) p.UpdateNominatedPod(logger, oldPod, pInfo.PodInfo) - gated := pInfo.Gated() if p.isSchedulingQueueHintEnabled { // When unscheduled Pods are updated, we check with QueueingHint // whether the update may make the pods schedulable. @@ -1047,7 +1073,6 @@ func (p *PriorityQueue) Update(logger klog.Logger, oldPod, newPod *v1.Pod) { queue := p.requeuePodWithQueueingStrategy(logger, pInfo, hint, evt.Label()) if queue != unschedulableQ { logger.V(5).Info("Pod moved to an internal scheduling queue because the Pod is updated", "pod", klog.KObj(newPod), "event", evt.Label(), "queue", queue) - p.unschedulablePods.delete(pInfo.Pod, gated) } if queue == activeQ || (p.isPopFromBackoffQEnabled && queue == backoffQ) { p.activeQ.broadcast() @@ -1061,7 +1086,6 @@ func (p *PriorityQueue) Update(logger klog.Logger, oldPod, newPod *v1.Pod) { // so we should check isPodBackingoff before moving the pod to backoffQ. if p.backoffQ.isPodBackingoff(pInfo) { if added := p.moveToBackoffQ(logger, pInfo, framework.EventUnscheduledPodUpdate.Label()); added { - p.unschedulablePods.delete(pInfo.Pod, gated) if p.isPopFromBackoffQEnabled { p.activeQ.broadcast() } @@ -1069,7 +1093,7 @@ func (p *PriorityQueue) Update(logger klog.Logger, oldPod, newPod *v1.Pod) { return } - if added := p.moveToActiveQ(logger, pInfo, framework.EventUnscheduledPodUpdate.Label()); added { + if added := p.moveToActiveQ(logger, pInfo, framework.EventUnscheduledPodUpdate.Label(), false); added { p.activeQ.broadcast() } return @@ -1081,7 +1105,7 @@ func (p *PriorityQueue) Update(logger klog.Logger, oldPod, newPod *v1.Pod) { } // If pod is not in any of the queues, we put it in the active queue. pInfo := p.newQueuedPodInfo(newPod) - if added := p.moveToActiveQ(logger, pInfo, framework.EventUnscheduledPodUpdate.Label()); added { + if added := p.moveToActiveQ(logger, pInfo, framework.EventUnscheduledPodUpdate.Label(), false); added { p.activeQ.broadcast() } } @@ -1182,7 +1206,7 @@ func (p *PriorityQueue) requeuePodWithQueueingStrategy(logger klog.Logger, pInfo } // Reach here if schedulingHint is QueueImmediately, or schedulingHint is Queue but the pod is not backing off. - if added := p.moveToActiveQ(logger, pInfo, event); added { + if added := p.moveToActiveQ(logger, pInfo, event, false); added { return activeQ } // Pod is gated. We don't have to push it back to unschedulable queue, because moveToActiveQ should already have done that. @@ -1213,7 +1237,6 @@ func (p *PriorityQueue) movePodsToActiveOrBackoffQueue(logger klog.Logger, podIn p.unschedulablePods.delete(pInfo.Pod, pInfo.Gated()) queue := p.requeuePodWithQueueingStrategy(logger, pInfo, schedulingHint, event.Label()) - logger.V(4).Info("Pod moved to an internal scheduling queue", "pod", klog.KObj(pInfo.Pod), "event", event.Label(), "queue", queue, "hint", schedulingHint) if queue == activeQ || (p.isPopFromBackoffQEnabled && queue == backoffQ) { activated = true } @@ -1329,7 +1352,7 @@ func (p *PriorityQueue) PendingPods() ([]*v1.Pod, string) { // PatchPodStatus handles the pod status update by sending an update API call through API dispatcher. // This method should be used only if the SchedulerAsyncAPICalls feature gate is enabled. -func (p *PriorityQueue) PatchPodStatus(pod *v1.Pod, condition *v1.PodCondition, nominatingInfo *framework.NominatingInfo) (<-chan error, error) { +func (p *PriorityQueue) PatchPodStatus(pod *v1.Pod, condition *v1.PodCondition, nominatingInfo *fwk.NominatingInfo) (<-chan error, error) { // Don't store anything in the cache. This might be extended in the next releases. onFinish := make(chan error, 1) err := p.apiDispatcher.Add(apicalls.Implementations.PodStatusPatch(pod, condition, nominatingInfo), fwk.APICallOptions{ diff --git a/pkg/scheduler/backend/queue/scheduling_queue_test.go b/pkg/scheduler/backend/queue/scheduling_queue_test.go index 905d6bd25c2cb..505d2bbe8b99a 100644 --- a/pkg/scheduler/backend/queue/scheduling_queue_test.go +++ b/pkg/scheduler/backend/queue/scheduling_queue_test.go @@ -166,7 +166,7 @@ func TestPriorityQueue_Add(t *testing.T) { } } -func newDefaultQueueSort() framework.LessFunc { +func newDefaultQueueSort() fwk.LessFunc { sort := &queuesort.PrioritySort{} return sort.Less } @@ -706,7 +706,7 @@ func Test_InFlightPods(t *testing.T) { // Simulate a bug, putting pod into activeQ, while pod is being scheduled. {callback: func(t *testing.T, q *PriorityQueue) { q.activeQ.underLock(func(unlocked unlockedActiveQueuer) { - unlocked.add(newQueuedPodInfoForLookup(pod1), framework.EventUnscheduledPodAdd.Label()) + unlocked.add(logger, newQueuedPodInfoForLookup(pod1), framework.EventUnscheduledPodAdd.Label()) }) }}, // At this point, in the activeQ, we have pod1 and pod3 in this order. @@ -1458,7 +1458,7 @@ func TestPriorityQueue_Activate(t *testing.T) { if tt.qPodInInFlightPod != nil { // Put -> Pop the Pod to make it registered in inFlightPods. q.activeQ.underLock(func(unlockedActiveQ unlockedActiveQueuer) { - unlockedActiveQ.add(newQueuedPodInfoForLookup(tt.qPodInInFlightPod), framework.EventUnscheduledPodAdd.Label()) + unlockedActiveQ.add(logger, newQueuedPodInfoForLookup(tt.qPodInInFlightPod), framework.EventUnscheduledPodAdd.Label()) }) p, err := q.activeQ.pop(logger) if err != nil { @@ -1547,9 +1547,10 @@ func (pl *preEnqueuePlugin) PreEnqueue(ctx context.Context, p *v1.Pod) *fwk.Stat func TestPriorityQueue_moveToActiveQ(t *testing.T) { tests := []struct { name string - plugins []framework.PreEnqueuePlugin + plugins []fwk.PreEnqueuePlugin pod *v1.Pod event string + movesFromBackoffQ bool popFromBackoffQEnabled []bool wantUnschedulablePods int wantSuccess bool @@ -1563,7 +1564,7 @@ func TestPriorityQueue_moveToActiveQ(t *testing.T) { }, { name: "preEnqueue plugin registered, pod name not in allowlists", - plugins: []framework.PreEnqueuePlugin{&preEnqueuePlugin{}, &preEnqueuePlugin{}}, + plugins: []fwk.PreEnqueuePlugin{&preEnqueuePlugin{}, &preEnqueuePlugin{}}, pod: st.MakePod().Name("p").Label("p", "").Obj(), event: framework.EventUnscheduledPodAdd.Label(), wantUnschedulablePods: 1, @@ -1571,7 +1572,7 @@ func TestPriorityQueue_moveToActiveQ(t *testing.T) { }, { name: "preEnqueue plugin registered, pod failed one preEnqueue plugin", - plugins: []framework.PreEnqueuePlugin{ + plugins: []fwk.PreEnqueuePlugin{ &preEnqueuePlugin{allowlists: []string{"foo", "bar"}}, &preEnqueuePlugin{allowlists: []string{"foo"}}, }, @@ -1581,10 +1582,8 @@ func TestPriorityQueue_moveToActiveQ(t *testing.T) { wantSuccess: false, }, { - // With SchedulerPopFromBackoffQ enabled, the queue assumes the pod has already passed PreEnqueue, - // and it doesn't run PreEnqueue again, always puts the pod to activeQ. - name: "preEnqueue plugin registered, preEnqueue plugin would reject the pod, but isn't run", - plugins: []framework.PreEnqueuePlugin{ + name: "preEnqueue plugin registered, preEnqueue rejects the pod, even if it is after backoff", + plugins: []fwk.PreEnqueuePlugin{ &preEnqueuePlugin{allowlists: []string{"foo", "bar"}}, &preEnqueuePlugin{allowlists: []string{"foo"}}, }, @@ -1595,20 +1594,49 @@ func TestPriorityQueue_moveToActiveQ(t *testing.T) { wantSuccess: false, }, { - name: "preEnqueue plugin registered, pod would fail one preEnqueue plugin, but is after backoff", - plugins: []framework.PreEnqueuePlugin{ + // With SchedulerPopFromBackoffQ enabled, the queue assumes the pod has already passed PreEnqueue, + // and it doesn't run PreEnqueue again, always puts the pod to activeQ. + name: "preEnqueue plugin registered, pod would fail one preEnqueue plugin, but it is moved from backoffQ after completing backoff, so preEnqueue is not executed", + plugins: []fwk.PreEnqueuePlugin{ &preEnqueuePlugin{allowlists: []string{"foo", "bar"}}, &preEnqueuePlugin{allowlists: []string{"foo"}}, }, pod: st.MakePod().Name("bar").Label("bar", "").Obj(), event: framework.BackoffComplete, + movesFromBackoffQ: true, + popFromBackoffQEnabled: []bool{true}, + wantUnschedulablePods: 0, + wantSuccess: true, + }, + { + name: "preEnqueue plugin registered, pod failed one preEnqueue plugin when activated from unschedulablePods", + plugins: []fwk.PreEnqueuePlugin{ + &preEnqueuePlugin{allowlists: []string{"foo", "bar"}}, + &preEnqueuePlugin{allowlists: []string{"foo"}}, + }, + pod: st.MakePod().Name("bar").Label("bar", "").Obj(), + event: framework.ForceActivate, + movesFromBackoffQ: false, + popFromBackoffQEnabled: []bool{true}, + wantUnschedulablePods: 1, + wantSuccess: false, + }, + { + name: "preEnqueue plugin registered, pod would fail one preEnqueue plugin, but was activated from backoffQ, so preEnqueue is not executed", + plugins: []fwk.PreEnqueuePlugin{ + &preEnqueuePlugin{allowlists: []string{"foo", "bar"}}, + &preEnqueuePlugin{allowlists: []string{"foo"}}, + }, + pod: st.MakePod().Name("bar").Label("bar", "").Obj(), + event: framework.ForceActivate, + movesFromBackoffQ: true, popFromBackoffQEnabled: []bool{true}, wantUnschedulablePods: 0, wantSuccess: true, }, { name: "preEnqueue plugin registered, pod passed all preEnqueue plugins", - plugins: []framework.PreEnqueuePlugin{ + plugins: []fwk.PreEnqueuePlugin{ &preEnqueuePlugin{allowlists: []string{"foo", "bar"}}, &preEnqueuePlugin{allowlists: []string{"bar"}}, }, @@ -1630,13 +1658,13 @@ func TestPriorityQueue_moveToActiveQ(t *testing.T) { ctx, cancel := context.WithCancel(ctx) defer cancel() - m := map[string]map[string]framework.PreEnqueuePlugin{"": make(map[string]framework.PreEnqueuePlugin, len(tt.plugins))} + m := map[string]map[string]fwk.PreEnqueuePlugin{"": make(map[string]fwk.PreEnqueuePlugin, len(tt.plugins))} for _, plugin := range tt.plugins { m[""][plugin.Name()] = plugin } q := NewTestQueueWithObjects(ctx, newDefaultQueueSort(), []runtime.Object{tt.pod}, WithPreEnqueuePluginMap(m), WithPodInitialBackoffDuration(time.Second*30), WithPodMaxBackoffDuration(time.Second*60)) - got := q.moveToActiveQ(logger, q.newQueuedPodInfo(tt.pod), tt.event) + got := q.moveToActiveQ(logger, q.newQueuedPodInfo(tt.pod), tt.event, tt.movesFromBackoffQ) if got != tt.wantSuccess { t.Errorf("Unexpected result: want %v, but got %v", tt.wantSuccess, got) } @@ -1660,7 +1688,7 @@ func TestPriorityQueue_moveToActiveQ(t *testing.T) { func TestPriorityQueue_moveToBackoffQ(t *testing.T) { tests := []struct { name string - plugins []framework.PreEnqueuePlugin + plugins []fwk.PreEnqueuePlugin pod *v1.Pod popFromBackoffQEnabled []bool wantSuccess bool @@ -1672,21 +1700,21 @@ func TestPriorityQueue_moveToBackoffQ(t *testing.T) { }, { name: "preEnqueue plugin registered, pod name would not be in allowlists", - plugins: []framework.PreEnqueuePlugin{&preEnqueuePlugin{}, &preEnqueuePlugin{}}, + plugins: []fwk.PreEnqueuePlugin{&preEnqueuePlugin{}, &preEnqueuePlugin{}}, pod: st.MakePod().Name("p").Label("p", "").Obj(), popFromBackoffQEnabled: []bool{false}, wantSuccess: true, }, { name: "preEnqueue plugin registered, pod name not in allowlists", - plugins: []framework.PreEnqueuePlugin{&preEnqueuePlugin{}, &preEnqueuePlugin{}}, + plugins: []fwk.PreEnqueuePlugin{&preEnqueuePlugin{}, &preEnqueuePlugin{}}, pod: st.MakePod().Name("p").Label("p", "").Obj(), popFromBackoffQEnabled: []bool{true}, wantSuccess: false, }, { name: "preEnqueue plugin registered, preEnqueue plugin would reject the pod, but isn't run", - plugins: []framework.PreEnqueuePlugin{ + plugins: []fwk.PreEnqueuePlugin{ &preEnqueuePlugin{allowlists: []string{"foo", "bar"}}, &preEnqueuePlugin{allowlists: []string{"foo"}}, }, @@ -1696,7 +1724,7 @@ func TestPriorityQueue_moveToBackoffQ(t *testing.T) { }, { name: "preEnqueue plugin registered, pod failed one preEnqueue plugin", - plugins: []framework.PreEnqueuePlugin{ + plugins: []fwk.PreEnqueuePlugin{ &preEnqueuePlugin{allowlists: []string{"foo", "bar"}}, &preEnqueuePlugin{allowlists: []string{"foo"}}, }, @@ -1706,7 +1734,7 @@ func TestPriorityQueue_moveToBackoffQ(t *testing.T) { }, { name: "preEnqueue plugin registered, pod passed all preEnqueue plugins", - plugins: []framework.PreEnqueuePlugin{ + plugins: []fwk.PreEnqueuePlugin{ &preEnqueuePlugin{allowlists: []string{"foo", "bar"}}, &preEnqueuePlugin{allowlists: []string{"bar"}}, }, @@ -1726,7 +1754,7 @@ func TestPriorityQueue_moveToBackoffQ(t *testing.T) { ctx, cancel := context.WithCancel(ctx) defer cancel() - m := map[string]map[string]framework.PreEnqueuePlugin{"": make(map[string]framework.PreEnqueuePlugin, len(tt.plugins))} + m := map[string]map[string]fwk.PreEnqueuePlugin{"": make(map[string]fwk.PreEnqueuePlugin, len(tt.plugins))} for _, plugin := range tt.plugins { m[""][plugin.Name()] = plugin } @@ -1960,8 +1988,8 @@ func TestPriorityQueue_MoveAllToActiveOrBackoffQueueWithQueueingHint(t *testing. } cl := testingclock.NewFakeClock(now) plugin, _ := schedulinggates.New(ctx, nil, nil, plfeature.Features{}) - preEnqM := map[string]map[string]framework.PreEnqueuePlugin{"": { - names.SchedulingGates: plugin.(framework.PreEnqueuePlugin), + preEnqM := map[string]map[string]fwk.PreEnqueuePlugin{"": { + names.SchedulingGates: plugin.(fwk.PreEnqueuePlugin), "foo": &preEnqueuePlugin{allowlists: []string{"foo"}}, }} q := NewTestQueue(ctx, newDefaultQueueSort(), WithQueueingHintMapPerProfile(m), WithClock(cl), WithPreEnqueuePluginMap(preEnqM)) @@ -2633,11 +2661,11 @@ func TestPriorityQueue_UpdateNominatedPodForNode(t *testing.T) { q.Add(logger, medPriorityPodInfo.Pod) // Update unschedulablePodInfo on a different node than specified in the pod. q.AddNominatedPod(logger, mustNewTestPodInfo(t, unschedulablePodInfo.Pod), - &framework.NominatingInfo{NominatingMode: framework.ModeOverride, NominatedNodeName: "node5"}) + &fwk.NominatingInfo{NominatingMode: fwk.ModeOverride, NominatedNodeName: "node5"}) // Update nominated node name of a pod on a node that is not specified in the pod object. q.AddNominatedPod(logger, mustNewTestPodInfo(t, highPriorityPodInfo.Pod), - &framework.NominatingInfo{NominatingMode: framework.ModeOverride, NominatedNodeName: "node2"}) + &fwk.NominatingInfo{NominatingMode: fwk.ModeOverride, NominatedNodeName: "node2"}) expectedNominatedPods := &nominator{ nominatedPodToNode: map[types.UID]string{ medPriorityPodInfo.Pod.UID: "node1", @@ -2662,7 +2690,7 @@ func TestPriorityQueue_UpdateNominatedPodForNode(t *testing.T) { } // Update one of the nominated pods that doesn't have nominatedNodeName in the // pod object. It should be updated correctly. - q.AddNominatedPod(logger, highPriorityPodInfo, &framework.NominatingInfo{NominatingMode: framework.ModeOverride, NominatedNodeName: "node4"}) + q.AddNominatedPod(logger, highPriorityPodInfo, &fwk.NominatingInfo{NominatingMode: fwk.ModeOverride, NominatedNodeName: "node4"}) expectedNominatedPods = &nominator{ nominatedPodToNode: map[types.UID]string{ medPriorityPodInfo.Pod.UID: "node1", @@ -2681,7 +2709,7 @@ func TestPriorityQueue_UpdateNominatedPodForNode(t *testing.T) { // Attempt to nominate a pod that was deleted from the informer cache. // Nothing should change. - q.AddNominatedPod(logger, nonExistentPodInfo, &framework.NominatingInfo{NominatingMode: framework.ModeOverride, NominatedNodeName: "node1"}) + q.AddNominatedPod(logger, nonExistentPodInfo, &fwk.NominatingInfo{NominatingMode: fwk.ModeOverride, NominatedNodeName: "node1"}) if diff := cmp.Diff(q.nominator, expectedNominatedPods, nominatorCmpOpts...); diff != "" { t.Errorf("Unexpected diff after nominating a deleted pod (-want, +got):\n%s", diff) } @@ -2689,7 +2717,7 @@ func TestPriorityQueue_UpdateNominatedPodForNode(t *testing.T) { // Nothing should change. scheduledPodCopy := scheduledPodInfo.Pod.DeepCopy() scheduledPodInfo.Pod.Spec.NodeName = "" - q.AddNominatedPod(logger, mustNewTestPodInfo(t, scheduledPodCopy), &framework.NominatingInfo{NominatingMode: framework.ModeOverride, NominatedNodeName: "node1"}) + q.AddNominatedPod(logger, mustNewTestPodInfo(t, scheduledPodCopy), &fwk.NominatingInfo{NominatingMode: fwk.ModeOverride, NominatedNodeName: "node1"}) if diff := cmp.Diff(q.nominator, expectedNominatedPods, nominatorCmpOpts...); diff != "" { t.Errorf("Unexpected diff after nominating a scheduled pod (-want, +got):\n%s", diff) } @@ -3128,7 +3156,7 @@ var ( } addPodActiveQDirectly = func(t *testing.T, logger klog.Logger, queue *PriorityQueue, pInfo *framework.QueuedPodInfo) { queue.activeQ.underLock(func(unlockedActiveQ unlockedActiveQueuer) { - unlockedActiveQ.add(pInfo, framework.EventUnscheduledPodAdd.Label()) + unlockedActiveQ.add(logger, pInfo, framework.EventUnscheduledPodAdd.Label()) }) } addPodUnschedulablePods = func(t *testing.T, logger klog.Logger, queue *PriorityQueue, pInfo *framework.QueuedPodInfo) { @@ -3540,9 +3568,9 @@ scheduler_plugin_execution_duration_seconds_count{extension_point="PreEnqueue",p QueueingHintFn: queueHintReturnQueue, }, } - preenq := map[string]map[string]framework.PreEnqueuePlugin{"": {(&preEnqueuePlugin{}).Name(): &preEnqueuePlugin{allowlists: []string{queueable}}}} + preenq := map[string]map[string]fwk.PreEnqueuePlugin{"": {(&preEnqueuePlugin{}).Name(): &preEnqueuePlugin{allowlists: []string{queueable}}}} recorder := metrics.NewMetricsAsyncRecorder(3, 20*time.Microsecond, ctx.Done()) - queue := NewTestQueue(ctx, newDefaultQueueSort(), WithClock(testingclock.NewFakeClock(timestamp)), WithPreEnqueuePluginMap(preenq), WithPluginMetricsSamplePercent(test.pluginMetricsSamplePercent), WithMetricsRecorder(*recorder), WithQueueingHintMapPerProfile(m)) + queue := NewTestQueue(ctx, newDefaultQueueSort(), WithClock(testingclock.NewFakeClock(timestamp)), WithPreEnqueuePluginMap(preenq), WithPluginMetricsSamplePercent(test.pluginMetricsSamplePercent), WithMetricsRecorder(recorder), WithQueueingHintMapPerProfile(m)) for i, op := range test.operations { for _, pInfo := range test.operands[i] { op(t, logger, queue, pInfo) @@ -3631,7 +3659,7 @@ func TestPerPodSchedulingMetrics(t *testing.T) { name: "A gated pod is created and scheduled after lifting gate", perPodSchedulingMetricsScenario: func(c *testingclock.FakeClock, queue *PriorityQueue, pod *v1.Pod) { // Create a queue with PreEnqueuePlugin - queue.preEnqueuePluginMap = map[string]map[string]framework.PreEnqueuePlugin{"": {(&preEnqueuePlugin{}).Name(): &preEnqueuePlugin{allowlists: []string{"foo"}}}} + queue.preEnqueuePluginMap = map[string]map[string]fwk.PreEnqueuePlugin{"": {(&preEnqueuePlugin{}).Name(): &preEnqueuePlugin{allowlists: []string{"foo"}}}} queue.pluginMetricsSamplePercent = 0 queue.Add(logger, pod) // Check pod is added to the unschedulablePods queue. @@ -4281,7 +4309,7 @@ func Test_isPodWorthRequeuing(t *testing.T) { func Test_queuedPodInfo_gatedSetUponCreationAndUnsetUponUpdate(t *testing.T) { logger, ctx := ktesting.NewTestContext(t) plugin, _ := schedulinggates.New(ctx, nil, nil, plfeature.Features{}) - m := map[string]map[string]framework.PreEnqueuePlugin{"": {names.SchedulingGates: plugin.(framework.PreEnqueuePlugin)}} + m := map[string]map[string]fwk.PreEnqueuePlugin{"": {names.SchedulingGates: plugin.(fwk.PreEnqueuePlugin)}} q := NewTestQueue(ctx, newDefaultQueueSort(), WithPreEnqueuePluginMap(m)) gatedPod := st.MakePod().SchedulingGates([]string{"hello world"}).Obj() @@ -4324,7 +4352,7 @@ func TestPriorityQueue_GetPod(t *testing.T) { logger, ctx := ktesting.NewTestContext(t) q := NewTestQueue(ctx, newDefaultQueueSort()) q.activeQ.underLock(func(unlockedActiveQ unlockedActiveQueuer) { - unlockedActiveQ.add(newQueuedPodInfoForLookup(activeQPod), framework.EventUnscheduledPodAdd.Label()) + unlockedActiveQ.add(logger, newQueuedPodInfoForLookup(activeQPod), framework.EventUnscheduledPodAdd.Label()) }) q.backoffQ.add(logger, newQueuedPodInfoForLookup(backoffQPod), framework.EventUnscheduledPodAdd.Label()) q.unschedulablePods.addOrUpdate(newQueuedPodInfoForLookup(unschedPod), framework.EventUnscheduledPodAdd.Label()) diff --git a/pkg/scheduler/backend/queue/testing.go b/pkg/scheduler/backend/queue/testing.go index f619bac849595..40b59832be638 100644 --- a/pkg/scheduler/backend/queue/testing.go +++ b/pkg/scheduler/backend/queue/testing.go @@ -23,12 +23,12 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes/fake" - "k8s.io/kubernetes/pkg/scheduler/framework" + fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/metrics" ) // NewTestQueue creates a priority queue with an empty informer factory. -func NewTestQueue(ctx context.Context, lessFn framework.LessFunc, opts ...Option) *PriorityQueue { +func NewTestQueue(ctx context.Context, lessFn fwk.LessFunc, opts ...Option) *PriorityQueue { return NewTestQueueWithObjects(ctx, lessFn, nil, opts...) } @@ -36,7 +36,7 @@ func NewTestQueue(ctx context.Context, lessFn framework.LessFunc, opts ...Option // populated with the provided objects. func NewTestQueueWithObjects( ctx context.Context, - lessFn framework.LessFunc, + lessFn fwk.LessFunc, objs []runtime.Object, opts ...Option, ) *PriorityQueue { @@ -46,13 +46,13 @@ func NewTestQueueWithObjects( // we always set a metric recorder here. recorder := metrics.NewMetricsAsyncRecorder(10, 20*time.Microsecond, ctx.Done()) // We set it before the options that users provide, so that users can override it. - opts = append([]Option{WithMetricsRecorder(*recorder)}, opts...) + opts = append([]Option{WithMetricsRecorder(recorder)}, opts...) return NewTestQueueWithInformerFactory(ctx, lessFn, informerFactory, opts...) } func NewTestQueueWithInformerFactory( ctx context.Context, - lessFn framework.LessFunc, + lessFn fwk.LessFunc, informerFactory informers.SharedInformerFactory, opts ...Option, ) *PriorityQueue { diff --git a/pkg/scheduler/eventhandlers_test.go b/pkg/scheduler/eventhandlers_test.go index d8f6a6707a88d..47fd3243a177f 100644 --- a/pkg/scheduler/eventhandlers_test.go +++ b/pkg/scheduler/eventhandlers_test.go @@ -47,11 +47,11 @@ import ( "k8s.io/klog/v2/ktesting" fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/features" - "k8s.io/kubernetes/pkg/scheduler/backend/api_dispatcher" + apidispatcher "k8s.io/kubernetes/pkg/scheduler/backend/api_dispatcher" internalcache "k8s.io/kubernetes/pkg/scheduler/backend/cache" internalqueue "k8s.io/kubernetes/pkg/scheduler/backend/queue" "k8s.io/kubernetes/pkg/scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework/api_calls" + apicalls "k8s.io/kubernetes/pkg/scheduler/framework/api_calls" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports" @@ -171,7 +171,7 @@ func TestEventHandlers_MoveToActiveOnNominatedNodeUpdate(t *testing.T) { queue := internalqueue.NewPriorityQueue( newDefaultQueueSort(), informerFactory, - internalqueue.WithMetricsRecorder(*recorder), + internalqueue.WithMetricsRecorder(recorder), internalqueue.WithQueueingHintMapPerProfile(queueingHintMap), internalqueue.WithAPIDispatcher(apiDispatcher), // disable backoff queue @@ -217,7 +217,7 @@ func TestEventHandlers_MoveToActiveOnNominatedNodeUpdate(t *testing.T) { } } -func newDefaultQueueSort() framework.LessFunc { +func newDefaultQueueSort() fwk.LessFunc { sort := &queuesort.PrioritySort{} return sort.Less } diff --git a/pkg/scheduler/extender.go b/pkg/scheduler/extender.go index 518574b7e6692..5c8be28da45f5 100644 --- a/pkg/scheduler/extender.go +++ b/pkg/scheduler/extender.go @@ -85,7 +85,7 @@ func makeTransport(config *schedulerapi.Extender) (http.RoundTripper, error) { } // NewHTTPExtender creates an HTTPExtender object. -func NewHTTPExtender(config *schedulerapi.Extender) (framework.Extender, error) { +func NewHTTPExtender(config *schedulerapi.Extender) (fwk.Extender, error) { if config.HTTPTimeout.Duration.Nanoseconds() == 0 { config.HTTPTimeout.Duration = time.Duration(DefaultExtenderTimeout) } @@ -137,7 +137,7 @@ func (h *HTTPExtender) SupportsPreemption() bool { func (h *HTTPExtender) ProcessPreemption( pod *v1.Pod, nodeNameToVictims map[string]*extenderv1.Victims, - nodeInfos framework.NodeInfoLister, + nodeInfos fwk.NodeInfoLister, ) (map[string]*extenderv1.Victims, error) { var ( result extenderv1.ExtenderPreemptionResult @@ -180,7 +180,7 @@ func (h *HTTPExtender) ProcessPreemption( // such as UIDs and names, to object pointers. func (h *HTTPExtender) convertToVictims( nodeNameToMetaVictims map[string]*extenderv1.MetaVictims, - nodeInfos framework.NodeInfoLister, + nodeInfos fwk.NodeInfoLister, ) (map[string]*extenderv1.Victims, error) { nodeNameToVictims := map[string]*extenderv1.Victims{} for nodeName, metaVictims := range nodeNameToMetaVictims { diff --git a/pkg/scheduler/extender_test.go b/pkg/scheduler/extender_test.go index 78412ed8eff76..c701ba84a511c 100644 --- a/pkg/scheduler/extender_test.go +++ b/pkg/scheduler/extender_test.go @@ -325,7 +325,7 @@ func TestSchedulerWithExtenders(t *testing.T) { client := clientsetfake.NewClientset() informerFactory := informers.NewSharedInformerFactory(client, 0) - var extenders []framework.Extender + var extenders []fwk.Extender for ii := range test.extenders { extenders = append(extenders, &test.extenders[ii]) } @@ -501,7 +501,7 @@ func TestConvertToVictims(t *testing.T) { nodeNameToMetaVictims map[string]*extenderv1.MetaVictims nodeNames []string podsInNodeList []*v1.Pod - nodeInfos framework.NodeInfoLister + nodeInfos fwk.NodeInfoLister want map[string]*extenderv1.Victims wantErr bool }{ diff --git a/pkg/scheduler/framework/api_calls/api_calls.go b/pkg/scheduler/framework/api_calls/api_calls.go index 6a37e4ac73b43..352ad1e709aeb 100644 --- a/pkg/scheduler/framework/api_calls/api_calls.go +++ b/pkg/scheduler/framework/api_calls/api_calls.go @@ -18,7 +18,6 @@ package apicalls import ( fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" ) const ( @@ -39,7 +38,7 @@ var Relevances = fwk.APICallRelevances{ // Implementation is a built-in mapping types to calls' constructors. // It's used to construct calls' objects in the scheduler framework and for easier replacement of those. // This mapping can be replaced by the out-of-tree plugin in its init() function, if needed. -var Implementations = framework.APICallImplementations[*PodStatusPatchCall, *PodBindingCall]{ +var Implementations = fwk.APICallImplementations[*PodStatusPatchCall, *PodBindingCall]{ PodStatusPatch: NewPodStatusPatchCall, PodBinding: NewPodBindingCall, } diff --git a/pkg/scheduler/framework/api_calls/pod_status_patch.go b/pkg/scheduler/framework/api_calls/pod_status_patch.go index e0619a617530d..8229745cbdb2f 100644 --- a/pkg/scheduler/framework/api_calls/pod_status_patch.go +++ b/pkg/scheduler/framework/api_calls/pod_status_patch.go @@ -28,7 +28,6 @@ import ( "k8s.io/klog/v2" fwk "k8s.io/kube-scheduler/framework" podutil "k8s.io/kubernetes/pkg/api/v1/pod" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/util" ) @@ -48,10 +47,10 @@ type PodStatusPatchCall struct { // newCondition is a condition to update. newCondition *v1.PodCondition // nominatingInfo is a nominating info to update. - nominatingInfo *framework.NominatingInfo + nominatingInfo *fwk.NominatingInfo } -func NewPodStatusPatchCall(pod *v1.Pod, condition *v1.PodCondition, nominatingInfo *framework.NominatingInfo) *PodStatusPatchCall { +func NewPodStatusPatchCall(pod *v1.Pod, condition *v1.PodCondition, nominatingInfo *fwk.NominatingInfo) *PodStatusPatchCall { return &PodStatusPatchCall{ podUID: pod.UID, podRef: klog.KObj(pod), @@ -70,8 +69,8 @@ func (psuc *PodStatusPatchCall) UID() types.UID { } // syncStatus syncs the given status with condition and nominatingInfo. It returns true if anything was actually updated. -func syncStatus(status *v1.PodStatus, condition *v1.PodCondition, nominatingInfo *framework.NominatingInfo) bool { - nnnNeedsUpdate := nominatingInfo.Mode() == framework.ModeOverride && status.NominatedNodeName != nominatingInfo.NominatedNodeName +func syncStatus(status *v1.PodStatus, condition *v1.PodCondition, nominatingInfo *fwk.NominatingInfo) bool { + nnnNeedsUpdate := nominatingInfo.Mode() == fwk.ModeOverride && status.NominatedNodeName != nominatingInfo.NominatedNodeName if condition != nil { if !podutil.UpdatePodCondition(status, condition) && !nnnNeedsUpdate { return false @@ -144,7 +143,7 @@ func (psuc *PodStatusPatchCall) Merge(oldCall fwk.APICall) error { if !ok { return fmt.Errorf("unexpected error: call of type %T is not of type *PodStatusPatchCall", oldCall) } - if psuc.nominatingInfo.Mode() == framework.ModeNoop && oldPsuc.nominatingInfo.Mode() == framework.ModeOverride { + if psuc.nominatingInfo.Mode() == fwk.ModeNoop && oldPsuc.nominatingInfo.Mode() == fwk.ModeOverride { // Set a nominatingInfo from an old call if the new one is no-op. psuc.nominatingInfo = oldPsuc.nominatingInfo } @@ -173,7 +172,7 @@ func conditionNeedsUpdate(status *v1.PodStatus, condition *v1.PodCondition) bool } func (psuc *PodStatusPatchCall) IsNoOp() bool { - nnnNeedsUpdate := psuc.nominatingInfo.Mode() == framework.ModeOverride && psuc.podStatus.NominatedNodeName != psuc.nominatingInfo.NominatedNodeName + nnnNeedsUpdate := psuc.nominatingInfo.Mode() == fwk.ModeOverride && psuc.podStatus.NominatedNodeName != psuc.nominatingInfo.NominatedNodeName if nnnNeedsUpdate { return false } diff --git a/pkg/scheduler/framework/api_calls/pod_status_patch_test.go b/pkg/scheduler/framework/api_calls/pod_status_patch_test.go index 4b38c334bcf59..29318fc31261d 100644 --- a/pkg/scheduler/framework/api_calls/pod_status_patch_test.go +++ b/pkg/scheduler/framework/api_calls/pod_status_patch_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/client-go/kubernetes/fake" clienttesting "k8s.io/client-go/testing" "k8s.io/klog/v2/ktesting" - "k8s.io/kubernetes/pkg/scheduler/framework" + fwk "k8s.io/kube-scheduler/framework" ) func TestPodStatusPatchCall_IsNoOp(t *testing.T) { @@ -48,42 +48,42 @@ func TestPodStatusPatchCall_IsNoOp(t *testing.T) { name string pod *v1.Pod condition *v1.PodCondition - nominatingInfo *framework.NominatingInfo + nominatingInfo *fwk.NominatingInfo want bool }{ { name: "No-op when condition and node name match", pod: podWithNode, condition: &v1.PodCondition{Type: v1.PodScheduled, Status: v1.ConditionFalse}, - nominatingInfo: &framework.NominatingInfo{NominatedNodeName: "node-a", NominatingMode: framework.ModeOverride}, + nominatingInfo: &fwk.NominatingInfo{NominatedNodeName: "node-a", NominatingMode: fwk.ModeOverride}, want: true, }, { name: "Not no-op when condition is different", pod: podWithNode, condition: &v1.PodCondition{Type: v1.PodScheduled, Status: v1.ConditionTrue}, - nominatingInfo: &framework.NominatingInfo{NominatedNodeName: "node-a", NominatingMode: framework.ModeOverride}, + nominatingInfo: &fwk.NominatingInfo{NominatedNodeName: "node-a", NominatingMode: fwk.ModeOverride}, want: false, }, { name: "Not no-op when nominated node name is different", pod: podWithNode, condition: &v1.PodCondition{Type: v1.PodScheduled, Status: v1.ConditionFalse}, - nominatingInfo: &framework.NominatingInfo{NominatedNodeName: "node-b", NominatingMode: framework.ModeOverride}, + nominatingInfo: &fwk.NominatingInfo{NominatedNodeName: "node-b", NominatingMode: fwk.ModeOverride}, want: false, }, { name: "No-op when condition is nil and node name matches", pod: podWithNode, condition: nil, - nominatingInfo: &framework.NominatingInfo{NominatedNodeName: "node-a", NominatingMode: framework.ModeOverride}, + nominatingInfo: &fwk.NominatingInfo{NominatedNodeName: "node-a", NominatingMode: fwk.ModeOverride}, want: true, }, { name: "Not no-op when condition is nil but node name differs", pod: podWithNode, condition: nil, - nominatingInfo: &framework.NominatingInfo{NominatedNodeName: "node-b", NominatingMode: framework.ModeOverride}, + nominatingInfo: &fwk.NominatingInfo{NominatedNodeName: "node-b", NominatingMode: fwk.ModeOverride}, want: false, }, } @@ -106,9 +106,9 @@ func TestPodStatusPatchCall_Merge(t *testing.T) { t.Run("Merges nominating info and condition from the old call", func(t *testing.T) { oldCall := NewPodStatusPatchCall(pod, &v1.PodCondition{Type: v1.PodScheduled, Status: v1.ConditionFalse}, - &framework.NominatingInfo{NominatedNodeName: "node-a", NominatingMode: framework.ModeOverride}, + &fwk.NominatingInfo{NominatedNodeName: "node-a", NominatingMode: fwk.ModeOverride}, ) - newCall := NewPodStatusPatchCall(pod, nil, &framework.NominatingInfo{NominatingMode: framework.ModeNoop}) + newCall := NewPodStatusPatchCall(pod, nil, &fwk.NominatingInfo{NominatingMode: fwk.ModeNoop}) if err := newCall.Merge(oldCall); err != nil { t.Fatalf("Unexpected error returned by Merge(): %v", err) @@ -122,9 +122,9 @@ func TestPodStatusPatchCall_Merge(t *testing.T) { }) t.Run("Doesn't overwrite nominating info and condition of a new call", func(t *testing.T) { - oldCall := NewPodStatusPatchCall(pod, nil, &framework.NominatingInfo{NominatingMode: framework.ModeNoop}) + oldCall := NewPodStatusPatchCall(pod, nil, &fwk.NominatingInfo{NominatingMode: fwk.ModeNoop}) newCall := NewPodStatusPatchCall(pod, &v1.PodCondition{Type: v1.PodScheduled, Status: v1.ConditionFalse}, - &framework.NominatingInfo{NominatedNodeName: "node-b", NominatingMode: framework.ModeOverride}) + &fwk.NominatingInfo{NominatedNodeName: "node-b", NominatingMode: fwk.ModeOverride}) if err := newCall.Merge(oldCall); err != nil { t.Fatalf("Unexpected error returned by Merge(): %v", err) @@ -156,7 +156,7 @@ func TestPodStatusPatchCall_Sync(t *testing.T) { t.Run("Syncs the status before execution and updates the pod", func(t *testing.T) { call := NewPodStatusPatchCall(pod, nil, - &framework.NominatingInfo{NominatedNodeName: "node-c", NominatingMode: framework.ModeOverride}) + &fwk.NominatingInfo{NominatedNodeName: "node-c", NominatingMode: fwk.ModeOverride}) updatedPod := pod.DeepCopy() updatedPod.Status.NominatedNodeName = "node-b" @@ -176,7 +176,7 @@ func TestPodStatusPatchCall_Sync(t *testing.T) { t.Run("Doesn't sync internal status during or after execution, but updates the pod", func(t *testing.T) { call := NewPodStatusPatchCall(pod, nil, - &framework.NominatingInfo{NominatedNodeName: "node-c", NominatingMode: framework.ModeOverride}) + &fwk.NominatingInfo{NominatedNodeName: "node-c", NominatingMode: fwk.ModeOverride}) call.executed = true updatedPod := pod.DeepCopy() @@ -218,7 +218,7 @@ func TestPodStatusPatchCall_Execute(t *testing.T) { }) call := NewPodStatusPatchCall(pod, &v1.PodCondition{Type: v1.PodScheduled, Status: v1.ConditionFalse}, - &framework.NominatingInfo{NominatingMode: framework.ModeNoop}) + &fwk.NominatingInfo{NominatingMode: fwk.ModeNoop}) if err := call.Execute(ctx, client); err != nil { t.Fatalf("Unexpected error returned by Execute(): %v", err) } @@ -239,7 +239,7 @@ func TestPodStatusPatchCall_Execute(t *testing.T) { }) noOpCall := NewPodStatusPatchCall(pod, nil, - &framework.NominatingInfo{NominatedNodeName: "node-a", NominatingMode: framework.ModeOverride}) + &fwk.NominatingInfo{NominatedNodeName: "node-a", NominatingMode: fwk.ModeOverride}) if err := noOpCall.Execute(ctx, client); err != nil { t.Fatalf("Unexpected error returned by Execute(): %v", err) } diff --git a/pkg/scheduler/framework/autoscaler_contract/framework_contract_test.go b/pkg/scheduler/framework/autoscaler_contract/framework_contract_test.go index d210a2cac3b4b..17ba61b0fc0e5 100644 --- a/pkg/scheduler/framework/autoscaler_contract/framework_contract_test.go +++ b/pkg/scheduler/framework/autoscaler_contract/framework_contract_test.go @@ -35,7 +35,7 @@ import ( ) type frameworkContract interface { - RunPreFilterPlugins(ctx context.Context, state fwk.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *fwk.Status, sets.Set[string]) + RunPreFilterPlugins(ctx context.Context, state fwk.CycleState, pod *v1.Pod) (*fwk.PreFilterResult, *fwk.Status, sets.Set[string]) RunFilterPlugins(context.Context, fwk.CycleState, *v1.Pod, fwk.NodeInfo) *fwk.Status RunReservePluginsReserve(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodeName string) *fwk.Status } diff --git a/pkg/scheduler/framework/autoscaler_contract/lister_contract_test.go b/pkg/scheduler/framework/autoscaler_contract/lister_contract_test.go index 02f38f00bcd78..e997c00b09179 100644 --- a/pkg/scheduler/framework/autoscaler_contract/lister_contract_test.go +++ b/pkg/scheduler/framework/autoscaler_contract/lister_contract_test.go @@ -26,16 +26,15 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/dynamic-resource-allocation/structured" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" ) -var _ framework.NodeInfoLister = &nodeInfoListerContract{} -var _ framework.StorageInfoLister = &storageInfoListerContract{} -var _ framework.SharedLister = &shareListerContract{} -var _ framework.ResourceSliceLister = &resourceSliceListerContract{} -var _ framework.DeviceClassLister = &deviceClassListerContract{} -var _ framework.ResourceClaimTracker = &resourceClaimTrackerContract{} -var _ framework.SharedDRAManager = &sharedDRAManagerContract{} +var _ fwk.NodeInfoLister = &nodeInfoListerContract{} +var _ fwk.StorageInfoLister = &storageInfoListerContract{} +var _ fwk.SharedLister = &shareListerContract{} +var _ fwk.ResourceSliceLister = &resourceSliceListerContract{} +var _ fwk.DeviceClassLister = &deviceClassListerContract{} +var _ fwk.ResourceClaimTracker = &resourceClaimTrackerContract{} +var _ fwk.SharedDRAManager = &sharedDRAManagerContract{} type nodeInfoListerContract struct{} @@ -63,11 +62,11 @@ func (c *storageInfoListerContract) IsPVCUsedByPods(_ string) bool { type shareListerContract struct{} -func (c *shareListerContract) NodeInfos() framework.NodeInfoLister { +func (c *shareListerContract) NodeInfos() fwk.NodeInfoLister { return nil } -func (c *shareListerContract) StorageInfos() framework.StorageInfoLister { +func (c *shareListerContract) StorageInfos() fwk.StorageInfoLister { return nil } @@ -126,14 +125,14 @@ func (r *resourceClaimTrackerContract) AssumedClaimRestore(_, _ string) { type sharedDRAManagerContract struct{} -func (s *sharedDRAManagerContract) ResourceClaims() framework.ResourceClaimTracker { +func (s *sharedDRAManagerContract) ResourceClaims() fwk.ResourceClaimTracker { return nil } -func (s *sharedDRAManagerContract) ResourceSlices() framework.ResourceSliceLister { +func (s *sharedDRAManagerContract) ResourceSlices() fwk.ResourceSliceLister { return nil } -func (s *sharedDRAManagerContract) DeviceClasses() framework.DeviceClassLister { +func (s *sharedDRAManagerContract) DeviceClasses() fwk.DeviceClassLister { return nil } diff --git a/pkg/scheduler/framework/interface.go b/pkg/scheduler/framework/interface.go index e167789d7e355..6f57513b43113 100644 --- a/pkg/scheduler/framework/interface.go +++ b/pkg/scheduler/framework/interface.go @@ -20,46 +20,14 @@ package framework import ( "context" - "math" "sync" - "time" v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/informers" - clientset "k8s.io/client-go/kubernetes" - restclient "k8s.io/client-go/rest" - "k8s.io/client-go/tools/events" - "k8s.io/klog/v2" fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/apis/config" - "k8s.io/kubernetes/pkg/scheduler/framework/parallelize" ) -// NodeScoreList declares a list of nodes and their scores. -type NodeScoreList []NodeScore - -// NodeScore is a struct with node name and score. -type NodeScore struct { - Name string - Score int64 -} - -// NodeToStatusReader is a read-only interface of NodeToStatus passed to each PostFilter plugin. -type NodeToStatusReader interface { - // Get returns the status for given nodeName. - // If the node is not in the map, the AbsentNodesStatus is returned. - Get(nodeName string) *fwk.Status - // NodesForStatusCode returns a list of NodeInfos for the nodes that have a given status code. - // It returns the NodeInfos for all matching nodes denoted by AbsentNodesStatus as well. - NodesForStatusCode(nodeLister NodeInfoLister, code fwk.Code) ([]fwk.NodeInfo, error) -} - -// NodeToStatusMap is an alias for NodeToStatusReader to keep partial backwards compatibility. -// NodeToStatusReader should be used if possible. -type NodeToStatusMap = NodeToStatusReader - // NodeToStatus contains the statuses of the Nodes where the incoming Pod was not schedulable. type NodeToStatus struct { // nodeToStatus contains specific statuses of the nodes. @@ -128,7 +96,7 @@ func (m *NodeToStatus) ForEachExplicitNode(fn func(nodeName string, status *fwk. // and filtered using NodeToStatus.Get. // If the absentNodesStatus doesn't match the code, nodeToStatus map is used to create a list of nodes // and nodeLister.Get is used to obtain NodeInfo for each. -func (m *NodeToStatus) NodesForStatusCode(nodeLister NodeInfoLister, code fwk.Code) ([]fwk.NodeInfo, error) { +func (m *NodeToStatus) NodesForStatusCode(nodeLister fwk.NodeInfoLister, code fwk.Code) ([]fwk.NodeInfo, error) { var resultNodes []fwk.NodeInfo if m.AbsentNodesStatus().Code() == code { @@ -161,34 +129,6 @@ func (m *NodeToStatus) NodesForStatusCode(nodeLister NodeInfoLister, code fwk.Co return resultNodes, nil } -// NodePluginScores is a struct with node name and scores for that node. -type NodePluginScores struct { - // Name is node name. - Name string - // Scores is scores from plugins and extenders. - Scores []PluginScore - // TotalScore is the total score in Scores. - TotalScore int64 -} - -// PluginScore is a struct with plugin/extender name and score. -type PluginScore struct { - // Name is the name of plugin or extender. - Name string - Score int64 -} - -const ( - // MaxNodeScore is the maximum score a Score plugin is expected to return. - MaxNodeScore int64 = 100 - - // MinNodeScore is the minimum score a Score plugin is expected to return. - MinNodeScore int64 = 0 - - // MaxTotalScore is the maximum total score. - MaxTotalScore int64 = math.MaxInt64 -) - // PodsToActivateKey is a reserved state key for stashing pods. // If the stashed pods are present in unschedulablePods or backoffQ,they will be // activated (i.e., moved to activeQ) in two phases: @@ -213,294 +153,19 @@ func NewPodsToActivate() *PodsToActivate { return &PodsToActivate{Map: make(map[string]*v1.Pod)} } -// WaitingPod represents a pod currently waiting in the permit phase. -type WaitingPod interface { - // GetPod returns a reference to the waiting pod. - GetPod() *v1.Pod - // GetPendingPlugins returns a list of pending Permit plugin's name. - GetPendingPlugins() []string - // Allow declares the waiting pod is allowed to be scheduled by the plugin named as "pluginName". - // If this is the last remaining plugin to allow, then a success signal is delivered - // to unblock the pod. - Allow(pluginName string) - // Reject declares the waiting pod unschedulable. - Reject(pluginName, msg string) -} - -// Plugin is the parent type for all the scheduling framework plugins. -type Plugin interface { - Name() string -} - -// PreEnqueuePlugin is an interface that must be implemented by "PreEnqueue" plugins. -// These plugins are called prior to adding Pods to activeQ. -// Note: an preEnqueue plugin is expected to be lightweight and efficient, so it's not expected to -// involve expensive calls like accessing external endpoints; otherwise it'd block other -// Pods' enqueuing in event handlers. -type PreEnqueuePlugin interface { - Plugin - // PreEnqueue is called prior to adding Pods to activeQ. - PreEnqueue(ctx context.Context, p *v1.Pod) *fwk.Status -} - -// LessFunc is the function to sort pod info -type LessFunc func(podInfo1, podInfo2 fwk.QueuedPodInfo) bool - -// QueueSortPlugin is an interface that must be implemented by "QueueSort" plugins. -// These plugins are used to sort pods in the scheduling queue. Only one queue sort -// plugin may be enabled at a time. -type QueueSortPlugin interface { - Plugin - // Less are used to sort pods in the scheduling queue. - Less(fwk.QueuedPodInfo, fwk.QueuedPodInfo) bool -} - -// EnqueueExtensions is an optional interface that plugins can implement to efficiently -// move unschedulable Pods in internal scheduling queues. -// In the scheduler, Pods can be unschedulable by PreEnqueue, PreFilter, Filter, Reserve, and Permit plugins, -// and Pods rejected by these plugins are requeued based on this extension point. -// Failures from other extension points are regarded as temporal errors (e.g., network failure), -// and the scheduler requeue Pods without this extension point - always requeue Pods to activeQ after backoff. -// This is because such temporal errors cannot be resolved by specific cluster events, -// and we have no choose but keep retrying scheduling until the failure is resolved. -// -// Plugins that make pod unschedulable (PreEnqueue, PreFilter, Filter, Reserve, and Permit plugins) must implement this interface, -// otherwise the default implementation will be used, which is less efficient in requeueing Pods rejected by the plugin. -// -// Also, if EventsToRegister returns an empty list, that means the Pods failed by the plugin are not requeued by any events, -// which doesn't make sense in most cases (very likely misuse) -// since the pods rejected by the plugin could be stuck in the unschedulable pod pool forever. -// -// If plugins other than above extension points support this interface, they are just ignored. -type EnqueueExtensions interface { - Plugin - // EventsToRegister returns a series of possible events that may cause a Pod - // failed by this plugin schedulable. Each event has a callback function that - // filters out events to reduce useless retry of Pod's scheduling. - // The events will be registered when instantiating the internal scheduling queue, - // and leveraged to build event handlers dynamically. - // When it returns an error, the scheduler fails to start. - // Note: the returned list needs to be determined at a startup, - // and the scheduler only evaluates it once during start up. - // Do not change the result during runtime, for example, based on the cluster's state etc. - // - // Appropriate implementation of this function will make Pod's re-scheduling accurate and performant. - EventsToRegister(context.Context) ([]fwk.ClusterEventWithHint, error) -} - -// PreFilterExtensions is an interface that is included in plugins that allow specifying -// callbacks to make incremental updates to its supposedly pre-calculated -// state. -type PreFilterExtensions interface { - // AddPod is called by the framework while trying to evaluate the impact - // of adding podToAdd to the node while scheduling podToSchedule. - AddPod(ctx context.Context, state fwk.CycleState, podToSchedule *v1.Pod, podInfoToAdd fwk.PodInfo, nodeInfo fwk.NodeInfo) *fwk.Status - // RemovePod is called by the framework while trying to evaluate the impact - // of removing podToRemove from the node while scheduling podToSchedule. - RemovePod(ctx context.Context, state fwk.CycleState, podToSchedule *v1.Pod, podInfoToRemove fwk.PodInfo, nodeInfo fwk.NodeInfo) *fwk.Status -} - -// PreFilterPlugin is an interface that must be implemented by "PreFilter" plugins. -// These plugins are called at the beginning of the scheduling cycle. -type PreFilterPlugin interface { - Plugin - // PreFilter is called at the beginning of the scheduling cycle. All PreFilter - // plugins must return success or the pod will be rejected. PreFilter could optionally - // return a PreFilterResult to influence which nodes to evaluate downstream. This is useful - // for cases where it is possible to determine the subset of nodes to process in O(1) time. - // When PreFilterResult filters out some Nodes, the framework considers Nodes that are filtered out as getting "UnschedulableAndUnresolvable". - // i.e., those Nodes will be out of the candidates of the preemption. - // - // When it returns Skip status, returned PreFilterResult and other fields in status are just ignored, - // and coupled Filter plugin/PreFilterExtensions() will be skipped in this scheduling cycle. - PreFilter(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodes []fwk.NodeInfo) (*PreFilterResult, *fwk.Status) - // PreFilterExtensions returns a PreFilterExtensions interface if the plugin implements one, - // or nil if it does not. A Pre-filter plugin can provide extensions to incrementally - // modify its pre-processed info. The framework guarantees that the extensions - // AddPod/RemovePod will only be called after PreFilter, possibly on a cloned - // CycleState, and may call those functions more than once before calling - // Filter again on a specific node. - PreFilterExtensions() PreFilterExtensions -} - -// FilterPlugin is an interface for Filter plugins. These plugins are called at the -// filter extension point for filtering out hosts that cannot run a pod. -// This concept used to be called 'predicate' in the original scheduler. -// These plugins should return "Success", "Unschedulable" or "Error" in Status.code. -// However, the scheduler accepts other valid codes as well. -// Anything other than "Success" will lead to exclusion of the given host from -// running the pod. -type FilterPlugin interface { - Plugin - // Filter is called by the scheduling framework. - // All FilterPlugins should return "Success" to declare that - // the given node fits the pod. If Filter doesn't return "Success", - // it will return "Unschedulable", "UnschedulableAndUnresolvable" or "Error". - // - // "Error" aborts pod scheduling and puts the pod into the backoff queue. - // - // For the node being evaluated, Filter plugins should look at the passed - // nodeInfo reference for this particular node's information (e.g., pods - // considered to be running on the node) instead of looking it up in the - // NodeInfoSnapshot because we don't guarantee that they will be the same. - // For example, during preemption, we may pass a copy of the original - // nodeInfo object that has some pods removed from it to evaluate the - // possibility of preempting them to schedule the target pod. - // - // Plugins are encouraged to check the context for cancellation. - // Once canceled, they should return as soon as possible with - // an UnschedulableAndUnresolvable status that includes the - // `context.Cause(ctx)` error explanation. For example, the - // context gets canceled when a sufficient number of suitable - // nodes have been found and searching for more isn't necessary - // anymore. - Filter(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodeInfo fwk.NodeInfo) *fwk.Status -} - -// PostFilterPlugin is an interface for "PostFilter" plugins. These plugins are called -// after a pod cannot be scheduled. -type PostFilterPlugin interface { - Plugin - // PostFilter is called by the scheduling framework - // when the scheduling cycle failed at PreFilter or Filter by Unschedulable or UnschedulableAndUnresolvable. - // NodeToStatusReader has statuses that each Node got in PreFilter or Filter phase. - // - // If you're implementing a custom preemption with PostFilter, ignoring Nodes with UnschedulableAndUnresolvable is the responsibility of your plugin, - // meaning NodeToStatusReader could have Nodes with UnschedulableAndUnresolvable - // and the scheduling framework does call PostFilter plugins even when all Nodes in NodeToStatusReader are UnschedulableAndUnresolvable. - // - // A PostFilter plugin should return one of the following statuses: - // - Unschedulable: the plugin gets executed successfully but the pod cannot be made schedulable. - // - Success: the plugin gets executed successfully and the pod can be made schedulable. - // - Error: the plugin aborts due to some internal error. - // - // Informational plugins should be configured ahead of other ones, and always return Unschedulable status. - // Optionally, a non-nil PostFilterResult may be returned along with a Success status. For example, - // a preemption plugin may choose to return nominatedNodeName, so that framework can reuse that to update the - // preemptor pod's .spec.status.nominatedNodeName field. - PostFilter(ctx context.Context, state fwk.CycleState, pod *v1.Pod, filteredNodeStatusMap NodeToStatusReader) (*PostFilterResult, *fwk.Status) -} - -// PreScorePlugin is an interface for "PreScore" plugin. PreScore is an -// informational extension point. Plugins will be called with a list of nodes -// that passed the filtering phase. A plugin may use this data to update internal -// state or to generate logs/metrics. -type PreScorePlugin interface { - Plugin - // PreScore is called by the scheduling framework after a list of nodes - // passed the filtering phase. All prescore plugins must return success or - // the pod will be rejected - // When it returns Skip status, other fields in status are just ignored, - // and coupled Score plugin will be skipped in this scheduling cycle. - PreScore(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) *fwk.Status -} - -// ScoreExtensions is an interface for Score extended functionality. -type ScoreExtensions interface { - // NormalizeScore is called for all node scores produced by the same plugin's "Score" - // method. A successful run of NormalizeScore will update the scores list and return - // a success status. - NormalizeScore(ctx context.Context, state fwk.CycleState, p *v1.Pod, scores NodeScoreList) *fwk.Status -} - -// ScorePlugin is an interface that must be implemented by "Score" plugins to rank -// nodes that passed the filtering phase. -type ScorePlugin interface { - Plugin - // Score is called on each filtered node. It must return success and an integer - // indicating the rank of the node. All scoring plugins must return success or - // the pod will be rejected. - Score(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodeInfo fwk.NodeInfo) (int64, *fwk.Status) - - // ScoreExtensions returns a ScoreExtensions interface if it implements one, or nil if does not. - ScoreExtensions() ScoreExtensions -} - -// ReservePlugin is an interface for plugins with Reserve and Unreserve -// methods. These are meant to update the state of the plugin. This concept -// used to be called 'assume' in the original scheduler. These plugins should -// return only Success or Error in Status.code. However, the scheduler accepts -// other valid codes as well. Anything other than Success will lead to -// rejection of the pod. -type ReservePlugin interface { - Plugin - // Reserve is called by the scheduling framework when the scheduler cache is - // updated. If this method returns a failed Status, the scheduler will call - // the Unreserve method for all enabled ReservePlugins. - Reserve(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodeName string) *fwk.Status - // Unreserve is called by the scheduling framework when a reserved pod was - // rejected, an error occurred during reservation of subsequent plugins, or - // in a later phase. The Unreserve method implementation must be idempotent - // and may be called by the scheduler even if the corresponding Reserve - // method for the same plugin was not called. - Unreserve(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodeName string) -} - -// PreBindPlugin is an interface that must be implemented by "PreBind" plugins. -// These plugins are called before a pod being scheduled. -type PreBindPlugin interface { - Plugin - // PreBindPreFlight is called before PreBind, and the plugin is supposed to return Success, Skip, or Error status - // to tell the scheduler whether the plugin will do something in PreBind or not. - // If it returns Success, it means this PreBind plugin will handle this pod. - // If it returns Skip, it means this PreBind plugin has nothing to do with the pod, and PreBind will be skipped. - // This function should be lightweight, and shouldn't do any actual operation, e.g., creating a volume etc. - PreBindPreFlight(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodeName string) *fwk.Status - // PreBind is called before binding a pod. All prebind plugins must return - // success or the pod will be rejected and won't be sent for binding. - PreBind(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodeName string) *fwk.Status -} - -// PostBindPlugin is an interface that must be implemented by "PostBind" plugins. -// These plugins are called after a pod is successfully bound to a node. -type PostBindPlugin interface { - Plugin - // PostBind is called after a pod is successfully bound. These plugins are - // informational. A common application of this extension point is for cleaning - // up. If a plugin needs to clean-up its state after a pod is scheduled and - // bound, PostBind is the extension point that it should register. - PostBind(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodeName string) -} - -// PermitPlugin is an interface that must be implemented by "Permit" plugins. -// These plugins are called before a pod is bound to a node. -type PermitPlugin interface { - Plugin - // Permit is called before binding a pod (and before prebind plugins). Permit - // plugins are used to prevent or delay the binding of a Pod. A permit plugin - // must return success or wait with timeout duration, or the pod will be rejected. - // The pod will also be rejected if the wait timeout or the pod is rejected while - // waiting. Note that if the plugin returns "wait", the framework will wait only - // after running the remaining plugins given that no other plugin rejects the pod. - Permit(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodeName string) (*fwk.Status, time.Duration) -} - -// BindPlugin is an interface that must be implemented by "Bind" plugins. Bind -// plugins are used to bind a pod to a Node. -type BindPlugin interface { - Plugin - // Bind plugins will not be called until all pre-bind plugins have completed. Each - // bind plugin is called in the configured order. A bind plugin may choose whether - // or not to handle the given Pod. If a bind plugin chooses to handle a Pod, the - // remaining bind plugins are skipped. When a bind plugin does not handle a pod, - // it must return Skip in its Status code. If a bind plugin returns an Error, the - // pod is rejected and will not be bound. - Bind(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodeName string) *fwk.Status -} - // Framework manages the set of plugins in use by the scheduling framework. // Configured plugins are called at specified points in a scheduling context. type Framework interface { - Handle + fwk.Handle // PreEnqueuePlugins returns the registered preEnqueue plugins. - PreEnqueuePlugins() []PreEnqueuePlugin + PreEnqueuePlugins() []fwk.PreEnqueuePlugin // EnqueueExtensions returns the registered Enqueue extensions. - EnqueueExtensions() []EnqueueExtensions + EnqueueExtensions() []fwk.EnqueueExtensions // QueueSortFunc returns the function to sort pods in scheduling queue - QueueSortFunc() LessFunc + QueueSortFunc() fwk.LessFunc // RunPreFilterPlugins runs the set of configured PreFilter plugins. It returns // *fwk.Status and its code is set to non-success if any of the plugins returns @@ -511,13 +176,13 @@ type Framework interface { // The third returns value contains PreFilter plugin that rejected some or all Nodes with PreFilterResult. // But, note that it doesn't contain any plugin when a plugin rejects this Pod with non-success status, // not with PreFilterResult. - RunPreFilterPlugins(ctx context.Context, state fwk.CycleState, pod *v1.Pod) (*PreFilterResult, *fwk.Status, sets.Set[string]) + RunPreFilterPlugins(ctx context.Context, state fwk.CycleState, pod *v1.Pod) (*fwk.PreFilterResult, *fwk.Status, sets.Set[string]) // RunPostFilterPlugins runs the set of configured PostFilter plugins. // PostFilter plugins can either be informational, in which case should be configured // to execute first and return Unschedulable status, or ones that try to change the // cluster state to make the pod potentially schedulable in a future scheduling cycle. - RunPostFilterPlugins(ctx context.Context, state fwk.CycleState, pod *v1.Pod, filteredNodeStatusMap NodeToStatusReader) (*PostFilterResult, *fwk.Status) + RunPostFilterPlugins(ctx context.Context, state fwk.CycleState, pod *v1.Pod, filteredNodeStatusMap fwk.NodeToStatusReader) (*fwk.PostFilterResult, *fwk.Status) // RunPreBindPlugins runs the set of configured PreBind plugins. It returns // *fwk.Status and its code is set to non-success if any of the plugins returns @@ -583,231 +248,21 @@ type Framework interface { PercentageOfNodesToScore() *int32 // SetPodNominator sets the PodNominator - SetPodNominator(nominator PodNominator) + SetPodNominator(nominator fwk.PodNominator) // SetPodActivator sets the PodActivator - SetPodActivator(activator PodActivator) + SetPodActivator(activator fwk.PodActivator) // SetAPICacher sets the APICacher - SetAPICacher(apiCacher APICacher) + SetAPICacher(apiCacher fwk.APICacher) // Close calls Close method of each plugin. Close() error } -// Handle provides data and some tools that plugins can use. It is -// passed to the plugin factories at the time of plugin initialization. Plugins -// must store and use this handle to call framework functions. -type Handle interface { - // PodNominator abstracts operations to maintain nominated Pods. - PodNominator - // PluginsRunner abstracts operations to run some plugins. - PluginsRunner - // PodActivator abstracts operations in the scheduling queue. - PodActivator - // SnapshotSharedLister returns listers from the latest NodeInfo Snapshot. The snapshot - // is taken at the beginning of a scheduling cycle and remains unchanged until - // a pod finishes "Permit" point. - // - // It should be used only during scheduling cycle: - // - There is no guarantee that the information remains unchanged in the binding phase of scheduling. - // So, plugins shouldn't use it in the binding cycle (pre-bind/bind/post-bind/un-reserve plugin) - // otherwise, a concurrent read/write error might occur. - // - There is no guarantee that the information is always up-to-date. - // So, plugins shouldn't use it in QueueingHint and PreEnqueue - // otherwise, they might make a decision based on stale information. - // - // Instead, they should use the resources getting from Informer created from SharedInformerFactory(). - SnapshotSharedLister() SharedLister - - // IterateOverWaitingPods acquires a read lock and iterates over the WaitingPods map. - IterateOverWaitingPods(callback func(WaitingPod)) - - // GetWaitingPod returns a waiting pod given its UID. - GetWaitingPod(uid types.UID) WaitingPod - - // RejectWaitingPod rejects a waiting pod given its UID. - // The return value indicates if the pod is waiting or not. - RejectWaitingPod(uid types.UID) bool - - // ClientSet returns a kubernetes clientSet. - ClientSet() clientset.Interface - - // KubeConfig returns the raw kube config. - KubeConfig() *restclient.Config - - // EventRecorder returns an event recorder. - EventRecorder() events.EventRecorder - - SharedInformerFactory() informers.SharedInformerFactory - - // SharedDRAManager can be used to obtain DRA objects, and track modifications to them in-memory - mainly by the DRA plugin. - // A non-default implementation can be plugged into the framework to simulate the state of DRA objects. - SharedDRAManager() SharedDRAManager - - // RunFilterPluginsWithNominatedPods runs the set of configured filter plugins for nominated pod on the given node. - RunFilterPluginsWithNominatedPods(ctx context.Context, state fwk.CycleState, pod *v1.Pod, info fwk.NodeInfo) *fwk.Status - - // Extenders returns registered scheduler extenders. - Extenders() []Extender - - // Parallelizer returns a parallelizer holding parallelism for scheduler. - Parallelizer() parallelize.Parallelizer - - // APIDispatcher returns a fwk.APIDispatcher that can be used to dispatch API calls directly. - // This is non-nil if the SchedulerAsyncAPICalls feature gate is enabled. - APIDispatcher() fwk.APIDispatcher - - // APICacher returns an APICacher that coordinates API calls with the scheduler's internal cache. - // Use this to ensure the scheduler's view of the cluster remains consistent. - // This is non-nil if the SchedulerAsyncAPICalls feature gate is enabled. - APICacher() APICacher -} - -// APICacher defines methods that send API calls through the scheduler's cache -// before they are executed asynchronously by the APIDispatcher. -// This ensures the scheduler's internal state is updated optimistically, -// reflecting the intended outcome of the call. -// This methods should be used only if the SchedulerAsyncAPICalls feature gate is enabled. -type APICacher interface { - // PatchPodStatus sends a patch request for a Pod's status. - // The patch could be first applied to the cached Pod object and then the API call is executed asynchronously. - // It returns a channel that can be used to wait for the call's completion. - PatchPodStatus(pod *v1.Pod, condition *v1.PodCondition, nominatingInfo *NominatingInfo) (<-chan error, error) - - // BindPod sends a binding request. The binding could be first applied to the cached Pod object - // and then the API call is executed asynchronously. - // It returns a channel that can be used to wait for the call's completion. - BindPod(binding *v1.Binding) (<-chan error, error) - - // WaitOnFinish blocks until the result of an API call is sent to the given onFinish channel - // (returned by methods BindPod or PreemptPod). - // - // It returns the error received from the channel. - // It also returns nil if the call was skipped or overwritten, - // as these are considered successful lifecycle outcomes. - // Direct onFinish channel read can be used to access these results. - WaitOnFinish(ctx context.Context, onFinish <-chan error) error -} - -// APICallImplementations define constructors for each fwk.APICall that is used by the scheduler internally. -type APICallImplementations[T, K fwk.APICall] struct { - // PodStatusPatch is a constructor used to create fwk.APICall object for pod status patch. - PodStatusPatch func(pod *v1.Pod, condition *v1.PodCondition, nominatingInfo *NominatingInfo) T - // PodBinding is a constructor used to create fwk.APICall object for pod binding. - PodBinding func(binding *v1.Binding) K -} - -// PreFilterResult wraps needed info for scheduler framework to act upon PreFilter phase. -type PreFilterResult struct { - // The set of nodes that should be considered downstream; if nil then - // all nodes are eligible. - NodeNames sets.Set[string] -} - -func (p *PreFilterResult) AllNodes() bool { - return p == nil || p.NodeNames == nil -} - -func (p *PreFilterResult) Merge(in *PreFilterResult) *PreFilterResult { - if p.AllNodes() && in.AllNodes() { - return nil - } - - r := PreFilterResult{} - if p.AllNodes() { - r.NodeNames = in.NodeNames.Clone() - return &r - } - if in.AllNodes() { - r.NodeNames = p.NodeNames.Clone() - return &r - } - - r.NodeNames = p.NodeNames.Intersection(in.NodeNames) - return &r -} - -type NominatingMode int - -const ( - ModeNoop NominatingMode = iota - ModeOverride -) - -type NominatingInfo struct { - NominatedNodeName string - NominatingMode NominatingMode -} - -// PostFilterResult wraps needed info for scheduler framework to act upon PostFilter phase. -type PostFilterResult struct { - *NominatingInfo -} - -func NewPostFilterResultWithNominatedNode(name string) *PostFilterResult { - return &PostFilterResult{ - NominatingInfo: &NominatingInfo{ +func NewPostFilterResultWithNominatedNode(name string) *fwk.PostFilterResult { + return &fwk.PostFilterResult{ + NominatingInfo: &fwk.NominatingInfo{ NominatedNodeName: name, - NominatingMode: ModeOverride, + NominatingMode: fwk.ModeOverride, }, } } - -func (ni *NominatingInfo) Mode() NominatingMode { - if ni == nil { - return ModeNoop - } - return ni.NominatingMode -} - -// PodActivator abstracts operations in the scheduling queue. -type PodActivator interface { - // Activate moves the given pods to activeQ. - // If a pod isn't found in unschedulablePods or backoffQ and it's in-flight, - // the wildcard event is registered so that the pod will be requeued when it comes back. - // But, if a pod isn't found in unschedulablePods or backoffQ and it's not in-flight (i.e., completely unknown pod), - // Activate would ignore the pod. - Activate(logger klog.Logger, pods map[string]*v1.Pod) -} - -// PodNominator abstracts operations to maintain nominated Pods. -type PodNominator interface { - // AddNominatedPod adds the given pod to the nominator or - // updates it if it already exists. - AddNominatedPod(logger klog.Logger, pod fwk.PodInfo, nominatingInfo *NominatingInfo) - // DeleteNominatedPodIfExists deletes nominatedPod from internal cache. It's a no-op if it doesn't exist. - DeleteNominatedPodIfExists(pod *v1.Pod) - // UpdateNominatedPod updates the with . - UpdateNominatedPod(logger klog.Logger, oldPod *v1.Pod, newPodInfo fwk.PodInfo) - // NominatedPodsForNode returns nominatedPods on the given node. - NominatedPodsForNode(nodeName string) []fwk.PodInfo -} - -// PluginsRunner abstracts operations to run some plugins. -// This is used by preemption PostFilter plugins when evaluating the feasibility of -// scheduling the pod on nodes when certain running pods get evicted. -type PluginsRunner interface { - // RunPreScorePlugins runs the set of configured PreScore plugins. If any - // of these plugins returns any status other than "Success", the given pod is rejected. - RunPreScorePlugins(context.Context, fwk.CycleState, *v1.Pod, []fwk.NodeInfo) *fwk.Status - // RunScorePlugins runs the set of configured scoring plugins. - // It returns a list that stores scores from each plugin and total score for each Node. - // It also returns *fwk.Status, which is set to non-success if any of the plugins returns - // a non-success status. - RunScorePlugins(context.Context, fwk.CycleState, *v1.Pod, []fwk.NodeInfo) ([]NodePluginScores, *fwk.Status) - // RunFilterPlugins runs the set of configured Filter plugins for pod on - // the given node. Note that for the node being evaluated, the passed nodeInfo - // reference could be different from the one in NodeInfoSnapshot map (e.g., pods - // considered to be running on the node could be different). For example, during - // preemption, we may pass a copy of the original nodeInfo object that has some pods - // removed from it to evaluate the possibility of preempting them to - // schedule the target pod. - RunFilterPlugins(context.Context, fwk.CycleState, *v1.Pod, fwk.NodeInfo) *fwk.Status - // RunPreFilterExtensionAddPod calls the AddPod interface for the set of configured - // PreFilter plugins. It returns directly if any of the plugins return any - // status other than Success. - RunPreFilterExtensionAddPod(ctx context.Context, state fwk.CycleState, podToSchedule *v1.Pod, podInfoToAdd fwk.PodInfo, nodeInfo fwk.NodeInfo) *fwk.Status - // RunPreFilterExtensionRemovePod calls the RemovePod interface for the set of configured - // PreFilter plugins. It returns directly if any of the plugins return any - // status other than Success. - RunPreFilterExtensionRemovePod(ctx context.Context, state fwk.CycleState, podToSchedule *v1.Pod, podInfoToRemove fwk.PodInfo, nodeInfo fwk.NodeInfo) *fwk.Status -} diff --git a/pkg/scheduler/framework/interface_test.go b/pkg/scheduler/framework/interface_test.go index 7777a89e5b4aa..46a8e2279bb49 100644 --- a/pkg/scheduler/framework/interface_test.go +++ b/pkg/scheduler/framework/interface_test.go @@ -17,252 +17,14 @@ limitations under the License. package framework import ( - "errors" "fmt" "testing" - "github.com/google/go-cmp/cmp" - "k8s.io/apimachinery/pkg/util/sets" fwk "k8s.io/kube-scheduler/framework" st "k8s.io/kubernetes/pkg/scheduler/testing" ) -var errorStatus = fwk.NewStatus(fwk.Error, "internal error") -var statusWithErr = fwk.AsStatus(errors.New("internal error")) - -func TestStatus(t *testing.T) { - tests := []struct { - name string - status *fwk.Status - expectedCode fwk.Code - expectedMessage string - expectedIsSuccess bool - expectedIsWait bool - expectedIsSkip bool - expectedAsError error - }{ - { - name: "success status", - status: fwk.NewStatus(fwk.Success, ""), - expectedCode: fwk.Success, - expectedMessage: "", - expectedIsSuccess: true, - expectedIsWait: false, - expectedIsSkip: false, - expectedAsError: nil, - }, - { - name: "wait status", - status: fwk.NewStatus(fwk.Wait, ""), - expectedCode: fwk.Wait, - expectedMessage: "", - expectedIsSuccess: false, - expectedIsWait: true, - expectedIsSkip: false, - expectedAsError: nil, - }, - { - name: "error status", - status: fwk.NewStatus(fwk.Error, "unknown error"), - expectedCode: fwk.Error, - expectedMessage: "unknown error", - expectedIsSuccess: false, - expectedIsWait: false, - expectedIsSkip: false, - expectedAsError: errors.New("unknown error"), - }, - { - name: "skip status", - status: fwk.NewStatus(fwk.Skip, ""), - expectedCode: fwk.Skip, - expectedMessage: "", - expectedIsSuccess: false, - expectedIsWait: false, - expectedIsSkip: true, - expectedAsError: nil, - }, - { - name: "nil status", - status: nil, - expectedCode: fwk.Success, - expectedMessage: "", - expectedIsSuccess: true, - expectedIsSkip: false, - expectedAsError: nil, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - if test.status.Code() != test.expectedCode { - t.Errorf("expect status.Code() returns %v, but %v", test.expectedCode, test.status.Code()) - } - - if test.status.Message() != test.expectedMessage { - t.Errorf("expect status.Message() returns %v, but %v", test.expectedMessage, test.status.Message()) - } - - if test.status.IsSuccess() != test.expectedIsSuccess { - t.Errorf("expect status.IsSuccess() returns %v, but %v", test.expectedIsSuccess, test.status.IsSuccess()) - } - - if test.status.IsWait() != test.expectedIsWait { - t.Errorf("status.IsWait() returns %v, but want %v", test.status.IsWait(), test.expectedIsWait) - } - - if test.status.IsSkip() != test.expectedIsSkip { - t.Errorf("status.IsSkip() returns %v, but want %v", test.status.IsSkip(), test.expectedIsSkip) - } - - if test.status.AsError() == test.expectedAsError { - return - } - - if test.status.AsError().Error() != test.expectedAsError.Error() { - t.Errorf("expect status.AsError() returns %v, but %v", test.expectedAsError, test.status.AsError()) - } - }) - } -} - -func TestPreFilterResultMerge(t *testing.T) { - tests := map[string]struct { - receiver *PreFilterResult - in *PreFilterResult - want *PreFilterResult - }{ - "all nil": {}, - "nil receiver empty input": { - in: &PreFilterResult{NodeNames: sets.New[string]()}, - want: &PreFilterResult{NodeNames: sets.New[string]()}, - }, - "empty receiver nil input": { - receiver: &PreFilterResult{NodeNames: sets.New[string]()}, - want: &PreFilterResult{NodeNames: sets.New[string]()}, - }, - "empty receiver empty input": { - receiver: &PreFilterResult{NodeNames: sets.New[string]()}, - in: &PreFilterResult{NodeNames: sets.New[string]()}, - want: &PreFilterResult{NodeNames: sets.New[string]()}, - }, - "nil receiver populated input": { - in: &PreFilterResult{NodeNames: sets.New("node1")}, - want: &PreFilterResult{NodeNames: sets.New("node1")}, - }, - "empty receiver populated input": { - receiver: &PreFilterResult{NodeNames: sets.New[string]()}, - in: &PreFilterResult{NodeNames: sets.New("node1")}, - want: &PreFilterResult{NodeNames: sets.New[string]()}, - }, - - "populated receiver nil input": { - receiver: &PreFilterResult{NodeNames: sets.New("node1")}, - want: &PreFilterResult{NodeNames: sets.New("node1")}, - }, - "populated receiver empty input": { - receiver: &PreFilterResult{NodeNames: sets.New("node1")}, - in: &PreFilterResult{NodeNames: sets.New[string]()}, - want: &PreFilterResult{NodeNames: sets.New[string]()}, - }, - "populated receiver and input": { - receiver: &PreFilterResult{NodeNames: sets.New("node1", "node2")}, - in: &PreFilterResult{NodeNames: sets.New("node2", "node3")}, - want: &PreFilterResult{NodeNames: sets.New("node2")}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - got := test.receiver.Merge(test.in) - if diff := cmp.Diff(test.want, got); diff != "" { - t.Errorf("unexpected diff (-want, +got):\n%s", diff) - } - }) - } -} - -func TestIsStatusEqual(t *testing.T) { - tests := []struct { - name string - x, y *fwk.Status - want bool - }{ - { - name: "two nil should be equal", - x: nil, - y: nil, - want: true, - }, - { - name: "nil should be equal to success status", - x: nil, - y: fwk.NewStatus(fwk.Success), - want: true, - }, - { - name: "nil should not be equal with status except success", - x: nil, - y: fwk.NewStatus(fwk.Error, "internal error"), - want: false, - }, - { - name: "one status should be equal to itself", - x: errorStatus, - y: errorStatus, - want: true, - }, - { - name: "same type statuses without reasons should be equal", - x: fwk.NewStatus(fwk.Success), - y: fwk.NewStatus(fwk.Success), - want: true, - }, - { - name: "statuses with same message should be equal", - x: fwk.NewStatus(fwk.Unschedulable, "unschedulable"), - y: fwk.NewStatus(fwk.Unschedulable, "unschedulable"), - want: true, - }, - { - name: "error statuses with same message should be equal", - x: fwk.NewStatus(fwk.Error, "error"), - y: fwk.NewStatus(fwk.Error, "error"), - want: true, - }, - { - name: "statuses with different reasons should not be equal", - x: fwk.NewStatus(fwk.Unschedulable, "unschedulable"), - y: fwk.NewStatus(fwk.Unschedulable, "unschedulable", "injected filter status"), - want: false, - }, - { - name: "statuses with different codes should not be equal", - x: fwk.NewStatus(fwk.Error, "internal error"), - y: fwk.NewStatus(fwk.Unschedulable, "internal error"), - want: false, - }, - { - name: "wrap error status should be equal with original one", - x: statusWithErr, - y: fwk.AsStatus(fmt.Errorf("error: %w", statusWithErr.AsError())), - want: true, - }, - { - name: "statues with different errors that have the same message shouldn't be equal", - x: fwk.AsStatus(errors.New("error")), - y: fwk.AsStatus(errors.New("error")), - want: false, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := tt.x.Equal(tt.y); got != tt.want { - t.Errorf("cmp.Equal() = %v, want %v", got, tt.want) - } - }) - } -} - type nodeInfoLister []fwk.NodeInfo func (nodes nodeInfoLister) Get(nodeName string) (fwk.NodeInfo, error) { diff --git a/pkg/scheduler/framework/parallelize/parallelism.go b/pkg/scheduler/framework/parallelize/parallelism.go index 2ac14289a0c9d..8cd801ff3433a 100644 --- a/pkg/scheduler/framework/parallelize/parallelism.go +++ b/pkg/scheduler/framework/parallelize/parallelism.go @@ -27,12 +27,13 @@ import ( // DefaultParallelism is the default parallelism used in scheduler. const DefaultParallelism int = 16 -// Parallelizer holds the parallelism for scheduler. +// Parallelizer implements k8s.io/kube-scheduler/framework.Parallelizer helps run scheduling operations in parallel chunks where possible, to improve performance and CPU utilization. +// It wraps logic of k8s.io/client-go/util/workqueue to run operations on multiple workers. type Parallelizer struct { parallelism int } -// NewParallelizer returns an object holding the parallelism. +// NewParallelizer returns an object holding the parallelism (number of workers). func NewParallelizer(p int) Parallelizer { return Parallelizer{parallelism: p} } diff --git a/pkg/scheduler/framework/plugins/defaultbinder/default_binder.go b/pkg/scheduler/framework/plugins/defaultbinder/default_binder.go index eb9207fa4b3d4..5e11c5d8755e3 100644 --- a/pkg/scheduler/framework/plugins/defaultbinder/default_binder.go +++ b/pkg/scheduler/framework/plugins/defaultbinder/default_binder.go @@ -24,7 +24,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/klog/v2" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" ) @@ -33,13 +32,13 @@ const Name = names.DefaultBinder // DefaultBinder binds pods to nodes using a k8s client. type DefaultBinder struct { - handle framework.Handle + handle fwk.Handle } -var _ framework.BindPlugin = &DefaultBinder{} +var _ fwk.BindPlugin = &DefaultBinder{} // New creates a DefaultBinder. -func New(_ context.Context, _ runtime.Object, handle framework.Handle) (framework.Plugin, error) { +func New(_ context.Context, _ runtime.Object, handle fwk.Handle) (fwk.Plugin, error) { return &DefaultBinder{handle: handle}, nil } diff --git a/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go b/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go index 9858b950eba31..bc3d55b49e6e2 100644 --- a/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go +++ b/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go @@ -27,16 +27,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/informers" - corelisters "k8s.io/client-go/listers/core/v1" - policylisters "k8s.io/client-go/listers/policy/v1" corev1helpers "k8s.io/component-helpers/scheduling/corev1" "k8s.io/klog/v2" extenderv1 "k8s.io/kube-scheduler/extender/v1" fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" "k8s.io/kubernetes/pkg/scheduler/framework/preemption" @@ -66,11 +62,9 @@ type MoreImportantPodFunc func(pod1, pod2 *v1.Pod) bool // DefaultPreemption is a PostFilter plugin implements the preemption logic. type DefaultPreemption struct { - fh framework.Handle + fh fwk.Handle fts feature.Features args config.DefaultPreemptionArgs - podLister corelisters.PodLister - pdbLister policylisters.PodDisruptionBudgetLister Evaluator *preemption.Evaluator // IsEligiblePod returns whether a victim pod is allowed to be preempted by a preemptor pod. @@ -86,8 +80,8 @@ type DefaultPreemption struct { MoreImportantPod MoreImportantPodFunc } -var _ framework.PostFilterPlugin = &DefaultPreemption{} -var _ framework.PreEnqueuePlugin = &DefaultPreemption{} +var _ fwk.PostFilterPlugin = &DefaultPreemption{} +var _ fwk.PreEnqueuePlugin = &DefaultPreemption{} // Name returns name of the plugin. It is used in logs, etc. func (pl *DefaultPreemption) Name() string { @@ -95,7 +89,7 @@ func (pl *DefaultPreemption) Name() string { } // New initializes a new plugin and returns it. The plugin type is retained to allow modification. -func New(_ context.Context, dpArgs runtime.Object, fh framework.Handle, fts feature.Features) (*DefaultPreemption, error) { +func New(_ context.Context, dpArgs runtime.Object, fh fwk.Handle, fts feature.Features) (*DefaultPreemption, error) { args, ok := dpArgs.(*config.DefaultPreemptionArgs) if !ok { return nil, fmt.Errorf("got args of type %T, want *DefaultPreemptionArgs", dpArgs) @@ -104,15 +98,10 @@ func New(_ context.Context, dpArgs runtime.Object, fh framework.Handle, fts feat return nil, err } - podLister := fh.SharedInformerFactory().Core().V1().Pods().Lister() - pdbLister := getPDBLister(fh.SharedInformerFactory()) - pl := DefaultPreemption{ - fh: fh, - fts: fts, - args: *args, - podLister: podLister, - pdbLister: pdbLister, + fh: fh, + fts: fts, + args: *args, } pl.Evaluator = preemption.NewEvaluator(Name, fh, &pl, fts.EnableAsyncPreemption) @@ -129,7 +118,7 @@ func New(_ context.Context, dpArgs runtime.Object, fh framework.Handle, fts feat } // PostFilter invoked at the postFilter extension point. -func (pl *DefaultPreemption) PostFilter(ctx context.Context, state fwk.CycleState, pod *v1.Pod, m framework.NodeToStatusReader) (*framework.PostFilterResult, *fwk.Status) { +func (pl *DefaultPreemption) PostFilter(ctx context.Context, state fwk.CycleState, pod *v1.Pod, m fwk.NodeToStatusReader) (*fwk.PostFilterResult, *fwk.Status) { defer func() { metrics.PreemptionAttempts.Inc() }() @@ -428,7 +417,3 @@ func filterPodsWithPDBViolation(podInfos []fwk.PodInfo, pdbs []*policy.PodDisrup } return violatingPodInfos, nonViolatingPodInfos } - -func getPDBLister(informerFactory informers.SharedInformerFactory) policylisters.PodDisruptionBudgetLister { - return informerFactory.Policy().V1().PodDisruptionBudgets().Lister() -} diff --git a/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption_test.go b/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption_test.go index ae7cdc40c3326..83204427db492 100644 --- a/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption_test.go +++ b/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption_test.go @@ -123,7 +123,7 @@ type TestPlugin struct { name string } -func newTestPlugin(_ context.Context, injArgs runtime.Object, f framework.Handle) (framework.Plugin, error) { +func newTestPlugin(_ context.Context, injArgs runtime.Object, f fwk.Handle) (fwk.Plugin, error) { return &TestPlugin{name: "test-plugin"}, nil } @@ -145,11 +145,11 @@ func (pl *TestPlugin) Name() string { return pl.name } -func (pl *TestPlugin) PreFilterExtensions() framework.PreFilterExtensions { +func (pl *TestPlugin) PreFilterExtensions() fwk.PreFilterExtensions { return pl } -func (pl *TestPlugin) PreFilter(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (pl *TestPlugin) PreFilter(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { return nil, nil } @@ -173,8 +173,8 @@ func TestPostFilter(t *testing.T) { pdbs []*policy.PodDisruptionBudget nodes []*v1.Node filteredNodesStatuses *framework.NodeToStatus - extender framework.Extender - wantResult *framework.PostFilterResult + extender fwk.Extender + wantResult *fwk.PostFilterResult wantStatus *fwk.Status }{ { @@ -223,7 +223,7 @@ func TestPostFilter(t *testing.T) { wantStatus: fwk.NewStatus(fwk.Unschedulable, "preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling."), }, { - name: "preemption should respect absent NodeToStatusMap entry meaning UnschedulableAndUnresolvable", + name: "preemption should respect absent NodeToStatusReader entry meaning UnschedulableAndUnresolvable", pod: st.MakePod().Name("p").UID("p").Namespace(v1.NamespaceDefault).Priority(highPriority).Obj(), pods: []*v1.Pod{ st.MakePod().Name("p1").UID("p1").Namespace(v1.NamespaceDefault).Node("node1").Obj(), @@ -426,7 +426,7 @@ func TestPostFilter(t *testing.T) { tf.RegisterPluginAsExtensions("test-plugin", newTestPlugin, "PreFilter"), tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New), } - var extenders []framework.Extender + var extenders []fwk.Extender if tt.extender != nil { extenders = append(extenders, tt.extender) } @@ -1156,7 +1156,7 @@ func TestDryRunPreemption(t *testing.T) { registeredPlugins := append([]tf.RegisterPluginFunc{ tf.RegisterFilterPlugin( "FakeFilter", - func(_ context.Context, _ runtime.Object, fh framework.Handle) (framework.Plugin, error) { + func(_ context.Context, _ runtime.Object, fh fwk.Handle) (fwk.Plugin, error) { return &fakePlugin, nil }, )}, @@ -1843,7 +1843,6 @@ func TestCustomOrdering(t *testing.T) { func TestPodEligibleToPreemptOthers(t *testing.T) { tests := []struct { name string - fts feature.Features pod *v1.Pod pods []*v1.Pod nodes []string @@ -1939,7 +1938,7 @@ func TestPreempt(t *testing.T) { extenders []*tf.FakeExtender nodeNames []string registerPlugin tf.RegisterPluginFunc - want *framework.PostFilterResult + want *fwk.PostFilterResult expectedPods []string // list of preempted pods }{ { @@ -2196,7 +2195,7 @@ func TestPreempt(t *testing.T) { cachedNodeInfo.SetNode(node) cachedNodeInfoMap[node.Name] = cachedNodeInfo } - var extenders []framework.Extender + var extenders []fwk.Extender for _, extender := range test.extenders { // Set nodeInfoMap as extenders cached node information. extender.CachedNodeNameToInfo = cachedNodeInfoMap diff --git a/pkg/scheduler/framework/plugins/dynamicresources/dra_manager.go b/pkg/scheduler/framework/plugins/dynamicresources/dra_manager.go index eadada3520e57..cb3d145569466 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/dra_manager.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/dra_manager.go @@ -31,12 +31,12 @@ import ( resourceslicetracker "k8s.io/dynamic-resource-allocation/resourceslice/tracker" "k8s.io/dynamic-resource-allocation/structured" "k8s.io/klog/v2" + fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/features" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/util/assumecache" ) -var _ framework.SharedDRAManager = &DefaultDRAManager{} +var _ fwk.SharedDRAManager = &DefaultDRAManager{} // DefaultDRAManager is the default implementation of SharedDRAManager. It obtains the DRA objects // from API informers, and uses an AssumeCache and a map of in-flight allocations in order @@ -68,19 +68,19 @@ func NewDRAManager(ctx context.Context, claimsCache *assumecache.AssumeCache, re return manager } -func (s *DefaultDRAManager) ResourceClaims() framework.ResourceClaimTracker { +func (s *DefaultDRAManager) ResourceClaims() fwk.ResourceClaimTracker { return s.resourceClaimTracker } -func (s *DefaultDRAManager) ResourceSlices() framework.ResourceSliceLister { +func (s *DefaultDRAManager) ResourceSlices() fwk.ResourceSliceLister { return s.resourceSliceLister } -func (s *DefaultDRAManager) DeviceClasses() framework.DeviceClassLister { +func (s *DefaultDRAManager) DeviceClasses() fwk.DeviceClassLister { return s.deviceClassLister } -var _ framework.ResourceSliceLister = &resourceSliceLister{} +var _ fwk.ResourceSliceLister = &resourceSliceLister{} type resourceSliceLister struct { tracker *resourceslicetracker.Tracker @@ -90,7 +90,7 @@ func (l *resourceSliceLister) ListWithDeviceTaintRules() ([]*resourceapi.Resourc return l.tracker.ListPatchedResourceSlices() } -var _ framework.DeviceClassLister = &deviceClassLister{} +var _ fwk.DeviceClassLister = &deviceClassLister{} type deviceClassLister struct { classLister resourcelisters.DeviceClassLister @@ -104,7 +104,7 @@ func (l *deviceClassLister) List() ([]*resourceapi.DeviceClass, error) { return l.classLister.List(labels.Everything()) } -var _ framework.ResourceClaimTracker = &claimTracker{} +var _ fwk.ResourceClaimTracker = &claimTracker{} type claimTracker struct { // cache enables temporarily storing a newer claim object diff --git a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go index 7f6c4ddca9f1f..90de7543c0871 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go @@ -21,6 +21,7 @@ import ( "errors" "fmt" "slices" + "sort" "strings" "sync" "time" @@ -47,7 +48,6 @@ import ( "k8s.io/dynamic-resource-allocation/structured" "k8s.io/klog/v2" fwk "k8s.io/kube-scheduler/framework" - v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" "k8s.io/kubernetes/pkg/scheduler/framework" @@ -152,7 +152,7 @@ type informationForClaim struct { allocation *resourceapi.AllocationResult } -// nodeAllocation holds the the allocation results and extended resource claim per node. +// nodeAllocation holds the allocation results and extended resource claim per node. type nodeAllocation struct { // allocationResults has the allocation results, matching the order of // claims which had to be allocated. @@ -164,27 +164,17 @@ type nodeAllocation struct { // DynamicResources is a plugin that ensures that ResourceClaims are allocated. type DynamicResources struct { - enabled bool - enableAdminAccess bool - enablePrioritizedList bool - enableSchedulingQueueHint bool - enablePartitionableDevices bool - enableDeviceTaints bool - enableDeviceBindingConditions bool - enableDeviceStatus bool - enableExtendedResource bool - enableFilterTimeout bool - filterTimeout time.Duration - enableConsumableCapacity bool - - fh framework.Handle - clientset kubernetes.Interface - celCache *cel.Cache - draManager framework.SharedDRAManager + enabled bool + fts feature.Features + filterTimeout time.Duration + fh fwk.Handle + clientset kubernetes.Interface + celCache *cel.Cache + draManager fwk.SharedDRAManager } // New initializes a new plugin and returns it. -func New(ctx context.Context, plArgs runtime.Object, fh framework.Handle, fts feature.Features) (framework.Plugin, error) { +func New(ctx context.Context, plArgs runtime.Object, fh fwk.Handle, fts feature.Features) (fwk.Plugin, error) { if !fts.EnableDynamicResourceAllocation { // Disabled, won't do anything. return &DynamicResources{}, nil @@ -199,38 +189,29 @@ func New(ctx context.Context, plArgs runtime.Object, fh framework.Handle, fts fe } pl := &DynamicResources{ - enabled: true, - enableAdminAccess: fts.EnableDRAAdminAccess, - enableDeviceTaints: fts.EnableDRADeviceTaints, - enablePrioritizedList: fts.EnableDRAPrioritizedList, - enableFilterTimeout: fts.EnableDRASchedulerFilterTimeout, - enableSchedulingQueueHint: fts.EnableSchedulingQueueHint, - enablePartitionableDevices: fts.EnablePartitionableDevices, - enableExtendedResource: fts.EnableDRAExtendedResource, - enableConsumableCapacity: fts.EnableConsumableCapacity, - filterTimeout: ptr.Deref(args.FilterTimeout, metav1.Duration{}).Duration, - enableDeviceBindingConditions: fts.EnableDRADeviceBindingConditions, - enableDeviceStatus: fts.EnableDRAResourceClaimDeviceStatus, + enabled: true, + fts: fts, + filterTimeout: ptr.Deref(args.FilterTimeout, metav1.Duration{}).Duration, fh: fh, clientset: fh.ClientSet(), // This is a LRU cache for compiled CEL expressions. The most // recent 10 of them get reused across different scheduling // cycles. - celCache: cel.NewCache(10, cel.Features{EnableConsumableCapacity: fts.EnableConsumableCapacity}), + celCache: cel.NewCache(10, cel.Features{EnableConsumableCapacity: fts.EnableDRAConsumableCapacity}), draManager: fh.SharedDRAManager(), } return pl, nil } -var _ framework.PreEnqueuePlugin = &DynamicResources{} -var _ framework.PreFilterPlugin = &DynamicResources{} -var _ framework.FilterPlugin = &DynamicResources{} -var _ framework.PostFilterPlugin = &DynamicResources{} -var _ framework.ReservePlugin = &DynamicResources{} -var _ framework.EnqueueExtensions = &DynamicResources{} -var _ framework.PreBindPlugin = &DynamicResources{} +var _ fwk.PreEnqueuePlugin = &DynamicResources{} +var _ fwk.PreFilterPlugin = &DynamicResources{} +var _ fwk.FilterPlugin = &DynamicResources{} +var _ fwk.PostFilterPlugin = &DynamicResources{} +var _ fwk.ReservePlugin = &DynamicResources{} +var _ fwk.EnqueueExtensions = &DynamicResources{} +var _ fwk.PreBindPlugin = &DynamicResources{} // Name returns name of the plugin. It is used in logs, etc. func (pl *DynamicResources) Name() string { @@ -251,7 +232,7 @@ func (pl *DynamicResources) EventsToRegister(_ context.Context) ([]fwk.ClusterEv // But, we may miss Node/Add event due to preCheck, and we decided to register UpdateNodeTaint | UpdateNodeLabel for all plugins registering Node/Add. // See: https://github.com/kubernetes/kubernetes/issues/109437 nodeActionType := fwk.Add | fwk.UpdateNodeLabel | fwk.UpdateNodeTaint | fwk.UpdateNodeAllocatable - if pl.enableSchedulingQueueHint { + if pl.fts.EnableSchedulingQueueHint { // When QHint is enabled, the problematic preCheck is already removed, and we can remove UpdateNodeTaint. nodeActionType = fwk.Add | fwk.UpdateNodeLabel | fwk.UpdateNodeAllocatable } @@ -435,7 +416,7 @@ func hasDeviceClassMappedExtendedResource(reqs v1.ResourceList, deviceClassMappi // We only care about the resources requested by the pod we are trying to schedule. continue } - if v1helper.IsExtendedResourceName(rName) { + if schedutil.IsDRAExtendedResourceName(rName) { _, ok := deviceClassMapping[rName] if ok { return true @@ -476,7 +457,7 @@ func findExtendedResourceClaim(pod *v1.Pod, resourceClaims []*resourceapi.Resour // It returns the special ResourceClaim and an error status. It returns nil for both // if the feature is disabled or not required for the Pod. func (pl *DynamicResources) preFilterExtendedResources(pod *v1.Pod, logger klog.Logger, s *stateData) (*resourceapi.ResourceClaim, *fwk.Status) { - if !pl.enableExtendedResource { + if !pl.fts.EnableDRAExtendedResource { return nil, nil } @@ -546,7 +527,7 @@ func (pl *DynamicResources) preFilterExtendedResources(pod *v1.Pod, logger klog. // PreFilter invoked at the prefilter extension point to check if pod has all // immediate claims bound. UnschedulableAndUnresolvable is returned if // the pod cannot be scheduled at the moment on any node. -func (pl *DynamicResources) PreFilter(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (pl *DynamicResources) PreFilter(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { if !pl.enabled { return nil, fwk.NewStatus(fwk.Skip) } @@ -628,7 +609,7 @@ func (pl *DynamicResources) PreFilter(ctx context.Context, state fwk.CycleState, return nil, status } case len(request.FirstAvailable) > 0: - if !pl.enablePrioritizedList { + if !pl.fts.EnableDRAPrioritizedList { return nil, statusUnschedulable(logger, fmt.Sprintf("resource claim %s, request %s: has subrequests, but the DRAPrioritizedList feature is disabled", klog.KObj(claim), request.Name)) } for _, subRequest := range request.FirstAvailable { @@ -666,7 +647,7 @@ func (pl *DynamicResources) PreFilter(ctx context.Context, state fwk.CycleState, // or currently their allocation is in-flight. This does not change // during filtering, so we can determine that once. var allocatedState *structured.AllocatedState - if pl.enableConsumableCapacity { + if pl.fts.EnableDRAConsumableCapacity { allocatedState, err = pl.draManager.ResourceClaims().GatherAllocatedState() if err != nil { return nil, statusError(logger, err) @@ -689,15 +670,7 @@ func (pl *DynamicResources) PreFilter(ctx context.Context, state fwk.CycleState, if err != nil { return nil, statusError(logger, err) } - features := structured.Features{ - AdminAccess: pl.enableAdminAccess, - PrioritizedList: pl.enablePrioritizedList, - PartitionableDevices: pl.enablePartitionableDevices, - DeviceTaints: pl.enableDeviceTaints, - DeviceBinding: pl.enableDeviceBindingConditions, - DeviceStatus: pl.enableDeviceStatus, - ConsumableCapacity: pl.enableConsumableCapacity, - } + features := allocatorFeatures(pl.fts) allocator, err := structured.NewAllocator(ctx, features, *allocatedState, pl.draManager.DeviceClasses(), slices, pl.celCache) if err != nil { return nil, statusError(logger, err) @@ -709,6 +682,17 @@ func (pl *DynamicResources) PreFilter(ctx context.Context, state fwk.CycleState, return nil, nil } +func allocatorFeatures(fts feature.Features) structured.Features { + return structured.Features{ + AdminAccess: fts.EnableDRAAdminAccess, + PrioritizedList: fts.EnableDRAPrioritizedList, + PartitionableDevices: fts.EnableDRAPartitionableDevices, + DeviceTaints: fts.EnableDRADeviceTaints, + DeviceBindingAndStatus: fts.EnableDRADeviceBindingConditions && fts.EnableDRAResourceClaimDeviceStatus, + ConsumableCapacity: fts.EnableDRAConsumableCapacity, + } +} + func (pl *DynamicResources) validateDeviceClass(logger klog.Logger, deviceClassName, requestName string) *fwk.Status { if deviceClassName == "" { return statusError(logger, fmt.Errorf("request %s: unsupported request type", requestName)) @@ -727,7 +711,7 @@ func (pl *DynamicResources) validateDeviceClass(logger klog.Logger, deviceClassN } // PreFilterExtensions returns prefilter extensions, pod add and remove. -func (pl *DynamicResources) PreFilterExtensions() framework.PreFilterExtensions { +func (pl *DynamicResources) PreFilterExtensions() fwk.PreFilterExtensions { return nil } @@ -766,7 +750,7 @@ func (pl *DynamicResources) filterExtendedResources(state *stateData, pod *v1.Po extendedResources := make(map[v1.ResourceName]int64) hasExtendedResource := false for rName, rQuant := range state.draExtendedResource.podScalarResources { - if !v1helper.IsExtendedResourceName(rName) { + if !schedutil.IsDRAExtendedResourceName(rName) { continue } // Skip in case request quantity is zero @@ -883,6 +867,9 @@ func createDeviceRequests(pod *v1.Pod, extendedResources map[v1.ResourceName]int }) } } + sort.Slice(deviceRequests, func(i, j int) bool { + return deviceRequests[i].Name < deviceRequests[j].Name + }) return deviceRequests } @@ -937,7 +924,7 @@ func (pl *DynamicResources) Filter(ctx context.Context, cs fwk.CycleState, pod * } // The claim is allocated, check whether it is ready for binding. - if pl.enableDeviceBindingConditions && pl.enableDeviceStatus { + if pl.fts.EnableDRADeviceBindingConditions && pl.fts.EnableDRAResourceClaimDeviceStatus { ready, err := pl.isClaimReadyForBinding(claim) // If the claim is not ready yet (ready false, no error) and binding has timed out // or binding has failed (err non-nil), then the scheduler should consider deallocating this @@ -957,7 +944,7 @@ func (pl *DynamicResources) Filter(ctx context.Context, cs fwk.CycleState, pod * } // Apply timeout to the operation? - if pl.enableFilterTimeout && pl.filterTimeout > 0 { + if pl.fts.EnableDRASchedulerFilterTimeout && pl.filterTimeout > 0 { c, cancel := context.WithTimeout(allocCtx, pl.filterTimeout) defer cancel() allocCtx = c @@ -1041,7 +1028,7 @@ func isSpecialClaimName(name string) bool { // deallocated to help get the Pod schedulable. If yes, it picks one and // requests its deallocation. This only gets called when filtering found no // suitable node. -func (pl *DynamicResources) PostFilter(ctx context.Context, cs fwk.CycleState, pod *v1.Pod, filteredNodeStatusMap framework.NodeToStatusReader) (*framework.PostFilterResult, *fwk.Status) { +func (pl *DynamicResources) PostFilter(ctx context.Context, cs fwk.CycleState, pod *v1.Pod, filteredNodeStatusMap fwk.NodeToStatusReader) (*fwk.PostFilterResult, *fwk.Status) { if !pl.enabled { return nil, fwk.NewStatus(fwk.Unschedulable, "plugin disabled") } @@ -1326,7 +1313,7 @@ func (pl *DynamicResources) PreBind(ctx context.Context, cs fwk.CycleState, pod } } - if !pl.enableDeviceBindingConditions || !pl.enableDeviceStatus { + if !pl.fts.EnableDRADeviceBindingConditions || !pl.fts.EnableDRAResourceClaimDeviceStatus { // If we don't have binding conditions, we can return early. // The claim is now reserved for the pod and the scheduler can proceed with binding. return nil @@ -1431,7 +1418,7 @@ func createRequestMappings(claim *resourceapi.ResourceClaim, pod *v1.Pod) []v1.C // bindClaim gets called by PreBind for claim which is not reserved for the pod yet. // It might not even be allocated. bindClaim then ensures that the allocation // and reservation are recorded. This finishes the work started in Reserve. -func (pl *DynamicResources) bindClaim(ctx context.Context, state *stateData, index int, pod *v1.Pod, nodeName string) (patchedClaim *resourceapi.ResourceClaim, finalErr error) { +func (pl *DynamicResources) bindClaim(ctx context.Context, state *stateData, index int, pod *v1.Pod, nodeName string) (*resourceapi.ResourceClaim, error) { logger := klog.FromContext(ctx) claim := state.claims.get(index) allocation := state.informationsForClaim[index].allocation @@ -1444,38 +1431,38 @@ func (pl *DynamicResources) bindClaim(ctx context.Context, state *stateData, ind isExtendedResourceClaim = true } claimUIDs := []types.UID{claim.UID} + resourceClaimModified := false defer func() { - if allocation != nil { - // The scheduler was handling allocation. Now that has - // completed, either successfully or with a failure. - if finalErr == nil { + // The scheduler was handling allocation. Now that has + // completed, either successfully or with a failure. + if resourceClaimModified { + if isExtendedResourceClaim { + // Unlike other claims, extended resource claim is created in API server below. + // AssumeClaimAfterAPICall returns ErrNotFound when the informer update has not reached assumed cache yet. + // Hence we must poll and wait for it. + pollErr := wait.PollUntilContextTimeout(ctx, 1*time.Second, time.Duration(AssumeExtendedResourceTimeoutDefaultSeconds)*time.Second, true, + func(ctx context.Context) (bool, error) { + if err := pl.draManager.ResourceClaims().AssumeClaimAfterAPICall(claim); err != nil { + if errors.Is(err, assumecache.ErrNotFound) { + return false, nil + } + logger.V(5).Info("Claim not stored in assume cache", "claim", klog.KObj(claim), "err", err) + return false, err + } + return true, nil + }) + if pollErr != nil { + logger.V(5).Info("Claim not stored in assume cache after retries", "claim", klog.KObj(claim), "err", pollErr) + } + } else { // This can fail, but only for reasons that are okay (concurrent delete or update). // Shouldn't happen in this case. - if isExtendedResourceClaim { - // Unlike other claims, extended resource claim is created in API server below. - // AssumeClaimAfterAPICall returns ErrNotFound when the informer update has not reached assumed cache yet. - // Hence we must poll and wait for it. - pollErr := wait.PollUntilContextTimeout(ctx, 1*time.Second, time.Duration(AssumeExtendedResourceTimeoutDefaultSeconds)*time.Second, true, - func(ctx context.Context) (bool, error) { - if err := pl.draManager.ResourceClaims().AssumeClaimAfterAPICall(claim); err != nil { - if errors.Is(err, assumecache.ErrNotFound) { - return false, nil - } - logger.V(5).Info("Claim not stored in assume cache", "claim", klog.KObj(claim), "err", err) - return false, err - } - return true, nil - }) - if pollErr != nil { - logger.V(5).Info("Claim not stored in assume cache after retries", "claim", klog.KObj(claim), "err", pollErr) - } - } else { - if err := pl.draManager.ResourceClaims().AssumeClaimAfterAPICall(claim); err != nil { - logger.V(5).Info("Claim not stored in assume cache", "err", err) - } + if err := pl.draManager.ResourceClaims().AssumeClaimAfterAPICall(claim); err != nil { + logger.V(5).Info("Claim not stored in assume cache", "err", err) } } - + } + if allocation != nil { for _, claimUID := range claimUIDs { pl.draManager.ResourceClaims().RemoveClaimPendingAllocation(claimUID) } @@ -1501,6 +1488,7 @@ func (pl *DynamicResources) bindClaim(ctx context.Context, state *stateData, ind if err != nil { return nil, fmt.Errorf("create claim for extended resources %v: %w", klog.KObj(claim), err) } + resourceClaimModified = true logger.V(5).Info("created claim for extended resources", "pod", klog.KObj(pod), "node", nodeName, "resourceclaim", klog.Format(claim)) // Track the actual extended ResourceClaim from now. @@ -1557,7 +1545,7 @@ func (pl *DynamicResources) bindClaim(ctx context.Context, state *stateData, ind // preconditions. The apiserver will tell us with a // non-conflict error if this isn't possible. claim.Status.ReservedFor = append(claim.Status.ReservedFor, resourceapi.ResourceClaimConsumerReference{Resource: "pods", Name: pod.Name, UID: pod.UID}) - if pl.enableDeviceBindingConditions && pl.enableDeviceStatus && claim.Status.Allocation.AllocationTimestamp == nil { + if pl.fts.EnableDRADeviceBindingConditions && pl.fts.EnableDRAResourceClaimDeviceStatus && claim.Status.Allocation.AllocationTimestamp == nil { claim.Status.Allocation.AllocationTimestamp = &metav1.Time{Time: time.Now()} } updatedClaim, err := pl.clientset.ResourceV1().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) @@ -1568,6 +1556,7 @@ func (pl *DynamicResources) bindClaim(ctx context.Context, state *stateData, ind return fmt.Errorf("add reservation to claim %s: %w", klog.KObj(claim), err) } claim = updatedClaim + resourceClaimModified = true return nil }) @@ -1636,7 +1625,7 @@ func (pl *DynamicResources) isClaimReadyForBinding(claim *resourceapi.ResourceCl // It returns true if the binding timeout is reached. // It returns false if the binding timeout is not reached. func (pl *DynamicResources) isClaimTimeout(claim *resourceapi.ResourceClaim) bool { - if !pl.enableDeviceBindingConditions || !pl.enableDeviceStatus { + if !pl.fts.EnableDRADeviceBindingConditions || !pl.fts.EnableDRAResourceClaimDeviceStatus { return false } if claim.Status.Allocation == nil || claim.Status.Allocation.AllocationTimestamp == nil { diff --git a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go index 16016b1b0a8c7..8646d45b77d2e 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go @@ -21,6 +21,7 @@ import ( "errors" "fmt" "sort" + "strings" "sync" "testing" "time" @@ -38,12 +39,14 @@ import ( apiruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" + utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes/fake" cgotesting "k8s.io/client-go/testing" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/events" resourceslicetracker "k8s.io/dynamic-resource-allocation/resourceslice/tracker" + "k8s.io/dynamic-resource-allocation/structured" kubeschedulerconfigv1 "k8s.io/kube-scheduler/config/v1" fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/apis/config" @@ -60,21 +63,22 @@ import ( var ( podKind = v1.SchemeGroupVersion.WithKind("Pod") - nodeName = "worker" - node2Name = "worker-2" - node3Name = "worker-3" - driver = "some-driver" - driver2 = "some-driver-2" - podName = "my-pod" - podUID = "1234" - resourceName = "my-resource" - resourceName2 = resourceName + "-2" - claimName = podName + "-" + resourceName - claimName2 = podName + "-" + resourceName2 - className = "my-resource-class" - namespace = "default" - attrName = resourceapi.QualifiedName("healthy") // device attribute only available on non-default node - extendedResourceName = "example.com/gpu" + nodeName = "worker" + node2Name = "worker-2" + node3Name = "worker-3" + driver = "some-driver" + driver2 = "some-driver-2" + podName = "my-pod" + podUID = "1234" + resourceName = "my-resource" + resourceName2 = resourceName + "-2" + claimName = podName + "-" + resourceName + claimName2 = podName + "-" + resourceName2 + className = "my-resource-class" + namespace = "default" + attrName = resourceapi.QualifiedName("healthy") // device attribute only available on non-default node + extendedResourceName = "example.com/gpu" + implicitExtendedResourceName = "deviceclass.resource.kubernetes.io/my-resource-class" deviceClass = &resourceapi.DeviceClass{ ObjectMeta: metav1.ObjectMeta{ @@ -124,6 +128,22 @@ var ( v1.ResourceName(extendedResourceName): "1", }). Obj() + podWithImplicitExtendedResourceName = st.MakePod().Name(podName).Namespace(namespace). + UID(podUID). + Req(map[v1.ResourceName]string{ + v1.ResourceName(implicitExtendedResourceName): "1", + v1.ResourceName(extendedResourceName): "2", + }). + Obj() + podWithImplicitExtendedResourceNameTwoContainers = st.MakePod().Name(podName).Namespace(namespace). + UID(podUID). + Req(map[v1.ResourceName]string{ + v1.ResourceName(implicitExtendedResourceName): "1", + }). + Req(map[v1.ResourceName]string{ + v1.ResourceName(extendedResourceName): "2", + }). + Obj() // Node with "instance-1" device and no device attributes. workerNode = &st.MakeNode().Name(nodeName).Label("kubernetes.io/hostname", nodeName).Node @@ -218,6 +238,60 @@ var ( return st.MakeNodeSelector().In("metadata.name", []string{nodeName}, st.NodeSelectorTypeMatchFields).Obj() }(), } + implicitExtendedResourceAllocationResult = &resourceapi.AllocationResult{ + Devices: resourceapi.DeviceAllocationResult{ + Results: []resourceapi.DeviceRequestAllocationResult{ + { + Driver: driver, + Pool: nodeName, + Device: "instance-1", + Request: "container-0-request-0", + }, + { + Driver: driver, + Pool: nodeName, + Device: "instance-2", + Request: "container-0-request-1", + }, + { + Driver: driver, + Pool: nodeName, + Device: "instance-3", + Request: "container-0-request-1", + }, + }, + }, + NodeSelector: func() *v1.NodeSelector { + return st.MakeNodeSelector().In("metadata.name", []string{nodeName}, st.NodeSelectorTypeMatchFields).Obj() + }(), + } + implicitExtendedResourceAllocationResultTwoContainers = &resourceapi.AllocationResult{ + Devices: resourceapi.DeviceAllocationResult{ + Results: []resourceapi.DeviceRequestAllocationResult{ + { + Driver: driver, + Pool: nodeName, + Device: "instance-1", + Request: "container-0-request-0", + }, + { + Driver: driver, + Pool: nodeName, + Device: "instance-2", + Request: "container-1-request-0", + }, + { + Driver: driver, + Pool: nodeName, + Device: "instance-3", + Request: "container-1-request-0", + }, + }, + }, + NodeSelector: func() *v1.NodeSelector { + return st.MakeNodeSelector().In("metadata.name", []string{nodeName}, st.NodeSelectorTypeMatchFields).Obj() + }(), + } extendedResourceAllocationResultNode2 = &resourceapi.AllocationResult{ Devices: resourceapi.DeviceAllocationResult{ Results: []resourceapi.DeviceRequestAllocationResult{{ @@ -311,7 +385,78 @@ var ( RequestWithName("container-0-request-0", className). Allocation(extendedResourceAllocationResult). Obj() - + implicitExtendedResourceClaim = st.MakeResourceClaim(). + Name("my-pod-extended-resources-0"). + GenerateName("my-pod-extended-resources-"). + Namespace(namespace). + Annotations(map[string]string{"resource.kubernetes.io/extended-resource-claim": "true"}). + OwnerRef( + metav1.OwnerReference{ + APIVersion: "v1", + Kind: "Pod", + Name: podName, + UID: types.UID(podUID), + Controller: ptr.To(true), + BlockOwnerDeletion: ptr.To(true), + }). + RequestWithName("container-0-request-0", className). + RequestWithNameCount("container-0-request-1", className, 2). + Allocation(implicitExtendedResourceAllocationResult). + Obj() + implicitExtendedResourceClaimNoName = st.MakeResourceClaim(). + Name(specialClaimInMemName). + GenerateName("my-pod-extended-resources-"). + Namespace(namespace). + Annotations(map[string]string{"resource.kubernetes.io/extended-resource-claim": "true"}). + OwnerRef( + metav1.OwnerReference{ + APIVersion: "v1", + Kind: "Pod", + Name: podName, + UID: types.UID(podUID), + Controller: ptr.To(true), + BlockOwnerDeletion: ptr.To(true), + }). + RequestWithName("container-0-request-0", className). + RequestWithNameCount("container-0-request-1", className, 2). + Allocation(implicitExtendedResourceAllocationResult). + Obj() + implicitExtendedResourceClaimTwoContainers = st.MakeResourceClaim(). + Name("my-pod-extended-resources-0"). + GenerateName("my-pod-extended-resources-"). + Namespace(namespace). + Annotations(map[string]string{"resource.kubernetes.io/extended-resource-claim": "true"}). + OwnerRef( + metav1.OwnerReference{ + APIVersion: "v1", + Kind: "Pod", + Name: podName, + UID: types.UID(podUID), + Controller: ptr.To(true), + BlockOwnerDeletion: ptr.To(true), + }). + RequestWithName("container-0-request-0", className). + RequestWithNameCount("container-1-request-0", className, 2). + Allocation(implicitExtendedResourceAllocationResultTwoContainers). + Obj() + implicitExtendedResourceClaimNoNameTwoContainers = st.MakeResourceClaim(). + Name(specialClaimInMemName). + GenerateName("my-pod-extended-resources-"). + Namespace(namespace). + Annotations(map[string]string{"resource.kubernetes.io/extended-resource-claim": "true"}). + OwnerRef( + metav1.OwnerReference{ + APIVersion: "v1", + Kind: "Pod", + Name: podName, + UID: types.UID(podUID), + Controller: ptr.To(true), + BlockOwnerDeletion: ptr.To(true), + }). + RequestWithName("container-0-request-0", className). + RequestWithNameCount("container-1-request-0", className, 2). + Allocation(implicitExtendedResourceAllocationResultTwoContainers). + Obj() extendedResourceClaimNode2 = st.MakeResourceClaim(). Name("my-pod-extended-resources-0"). GenerateName("my-pod-extended-resources-"). @@ -566,7 +711,7 @@ func (p perNodeResult) forNode(nodeName string) result { type want struct { preenqueue result - preFilterResult *framework.PreFilterResult + preFilterResult *fwk.PreFilterResult prefilter result filter perNodeResult prescore result @@ -575,7 +720,7 @@ type want struct { prebindPreFlight *fwk.Status prebind result postbind result - postFilterResult *framework.PostFilterResult + postFilterResult *fwk.PostFilterResult postfilter result // unreserveAfterBindFailure, if set, triggers a call to Unreserve @@ -634,6 +779,7 @@ func TestPlugin(t *testing.T) { enableDRADeviceTaints bool disableDRASchedulerFilterTimeout bool skipOnWindows string + failPatch bool }{ "empty": { pod: st.MakePod().Name("foo").Namespace("default").Obj(), @@ -665,6 +811,7 @@ func TestPlugin(t *testing.T) { claims: []*resourceapi.ResourceClaim{allocatedClaim, otherClaim}, want: want{ prebind: result{ + assumedClaim: reserve(allocatedClaim, podWithClaimName), changes: change{ claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { @@ -682,6 +829,7 @@ func TestPlugin(t *testing.T) { claims: []*resourceapi.ResourceClaim{allocatedClaim, otherClaim}, want: want{ prebind: result{ + assumedClaim: reserve(allocatedClaim, podWithClaimTemplateInStatus), changes: change{ claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { @@ -1147,6 +1295,7 @@ func TestPlugin(t *testing.T) { claims: []*resourceapi.ResourceClaim{allocatedClaimWithGoodTopology}, want: want{ prebind: result{ + assumedClaim: reserve(allocatedClaimWithGoodTopology, podWithClaimName), changes: change{ claim: func(in *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { return st.FromResourceClaim(in). @@ -1162,6 +1311,7 @@ func TestPlugin(t *testing.T) { claims: []*resourceapi.ResourceClaim{allocatedClaimWithGoodTopology}, want: want{ prebind: result{ + assumedClaim: reserve(allocatedClaimWithGoodTopology, podWithClaimName), changes: change{ claim: func(in *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { return st.FromResourceClaim(in). @@ -1171,6 +1321,7 @@ func TestPlugin(t *testing.T) { }, }, unreserveAfterBindFailure: &result{ + assumedClaim: reserve(allocatedClaimWithGoodTopology, podWithClaimName), changes: change{ claim: func(in *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { out := in.DeepCopy() @@ -1305,6 +1456,62 @@ func TestPlugin(t *testing.T) { }, }, }, + "implicit-extended-resource-name-with-resources": { + enableDRAExtendedResource: true, + pod: podWithImplicitExtendedResourceName, + classes: []*resourceapi.DeviceClass{deviceClassWithExtendResourceName}, + objs: []apiruntime.Object{largeWorkerNodeSlice, podWithImplicitExtendedResourceName}, + want: want{ + reserve: result{ + inFlightClaim: implicitExtendedResourceClaimNoName, + }, + prebind: result{ + assumedClaim: reserve(implicitExtendedResourceClaim, podWithImplicitExtendedResourceName), + added: []metav1.Object{reserve(implicitExtendedResourceClaim, podWithImplicitExtendedResourceName)}, + }, + postbind: result{ + assumedClaim: reserve(implicitExtendedResourceClaim, podWithImplicitExtendedResourceName), + }, + }, + }, + "implicit-extended-resource-name-two-containers-with-resources": { + enableDRAExtendedResource: true, + pod: podWithImplicitExtendedResourceNameTwoContainers, + classes: []*resourceapi.DeviceClass{deviceClassWithExtendResourceName}, + objs: []apiruntime.Object{largeWorkerNodeSlice, podWithImplicitExtendedResourceNameTwoContainers}, + want: want{ + reserve: result{ + inFlightClaim: implicitExtendedResourceClaimNoNameTwoContainers, + }, + prebind: result{ + assumedClaim: reserve(implicitExtendedResourceClaimTwoContainers, podWithImplicitExtendedResourceNameTwoContainers), + added: []metav1.Object{reserve(implicitExtendedResourceClaimTwoContainers, podWithImplicitExtendedResourceNameTwoContainers)}, + }, + postbind: result{ + assumedClaim: reserve(implicitExtendedResourceClaimTwoContainers, podWithImplicitExtendedResourceNameTwoContainers), + }, + }, + }, + "extended-resource-name-with-resources-fail-patch": { + enableDRAExtendedResource: true, + failPatch: true, + pod: podWithExtendedResourceName, + classes: []*resourceapi.DeviceClass{deviceClassWithExtendResourceName}, + objs: []apiruntime.Object{workerNodeSlice, podWithExtendedResourceName}, + want: want{ + reserve: result{ + inFlightClaim: extendedResourceClaimNoName, + }, + prebind: result{ + assumedClaim: reserve(extendedResourceClaim, podWithExtendedResourceName), + added: []metav1.Object{reserve(extendedResourceClaim, podWithExtendedResourceName)}, + status: fwk.NewStatus(fwk.Unschedulable, `patch error`), + }, + postbind: result{ + assumedClaim: reserve(extendedResourceClaim, podWithExtendedResourceName), + }, + }, + }, "extended-resource-name-with-resources-has-claim": { enableDRAExtendedResource: true, pod: podWithExtendedResourceName, @@ -1484,6 +1691,7 @@ func TestPlugin(t *testing.T) { claims: []*resourceapi.ResourceClaim{boundClaim}, want: want{ prebind: result{ + assumedClaim: reserve(boundClaim, podWithClaimName), changes: change{ claim: func(in *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { return st.FromResourceClaim(in). @@ -1577,6 +1785,20 @@ func TestPlugin(t *testing.T) { }(), want: want{ prebind: result{ + assumedClaim: reserve(func() *resourceapi.ResourceClaim { + claim := allocatedClaim.DeepCopy() + claim.Status.Allocation = allocationResultWithBindingConditions.DeepCopy() + // This claim has binding conditions but is not timed out. + claim.Status.Allocation.AllocationTimestamp = ptr.To(metav1.NewTime(time.Now().Add(-9*time.Minute - 50*time.Second))) + claim.Status.Devices = []resourceapi.AllocatedDeviceStatus{ + { + Driver: driver, + Pool: nodeName, + Device: "instance-1", + }, + } + return claim + }(), podWithClaimName), changes: change{ claim: func(in *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { return st.FromResourceClaim(in). @@ -1639,6 +1861,7 @@ func TestPlugin(t *testing.T) { claims: []*resourceapi.ResourceClaim{allocatedClaim, otherClaim}, want: want{ prebind: result{ + assumedClaim: reserve(allocatedClaim, podWithClaimTemplateInStatus), changes: change{ claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { @@ -1662,6 +1885,7 @@ func TestPlugin(t *testing.T) { objs: []apiruntime.Object{fabricSlice, fabricSlice2}, want: want{ prebind: result{ + assumedClaim: reserve(boundClaim, podWithTwoClaimNames), changes: change{ claim: func(in *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { return st.FromResourceClaim(in). @@ -1728,7 +1952,7 @@ func TestPlugin(t *testing.T) { EnableDRAPrioritizedList: tc.enableDRAPrioritizedList, EnableDRAExtendedResource: tc.enableDRAExtendedResource, } - testCtx := setup(t, tc.args, nodes, tc.claims, tc.classes, tc.objs, features) + testCtx := setup(t, tc.args, nodes, tc.claims, tc.classes, tc.objs, features, tc.failPatch) initialObjects := testCtx.listAll(t) status := testCtx.p.PreEnqueue(testCtx.ctx, tc.pod) @@ -1895,6 +2119,8 @@ func (tc *testContext) verify(t *testing.T, expected result, initialObjects []me ignoreFieldsInResourceClaims := []cmp.Option{ cmpopts.IgnoreFields(metav1.ObjectMeta{}, "UID", "ResourceVersion"), cmpopts.IgnoreFields(resourceapi.AllocationResult{}, "AllocationTimestamp"), + // It does not matter which specific device is allocated for the testing purpose. + cmpopts.IgnoreFields(resourceapi.DeviceRequestAllocationResult{}, "Device"), } if diff := cmp.Diff(wantObjects, objects, ignoreFieldsInResourceClaims...); diff != "" { t.Errorf("Stored objects are different (- expected, + actual):\n%s", diff) @@ -2042,7 +2268,7 @@ func update(t *testing.T, objects []metav1.Object, updates change) []metav1.Obje return updated } -func setup(t *testing.T, args *config.DynamicResourcesArgs, nodes []*v1.Node, claims []*resourceapi.ResourceClaim, classes []*resourceapi.DeviceClass, objs []apiruntime.Object, features feature.Features) (result *testContext) { +func setup(t *testing.T, args *config.DynamicResourcesArgs, nodes []*v1.Node, claims []*resourceapi.ResourceClaim, classes []*resourceapi.DeviceClass, objs []apiruntime.Object, features feature.Features, failPatch bool) (result *testContext) { t.Helper() tc := &testContext{} @@ -2050,7 +2276,7 @@ func setup(t *testing.T, args *config.DynamicResourcesArgs, nodes []*v1.Node, cl tc.ctx = tCtx tc.client = fake.NewSimpleClientset(objs...) - reactor := createReactor(tc.client.Tracker()) + reactor := createReactor(tc.client.Tracker(), failPatch) tc.client.PrependReactor("*", "*", reactor) tc.informerFactory = informers.NewSharedInformerFactory(tc.client, 0) @@ -2138,13 +2364,19 @@ func setup(t *testing.T, args *config.DynamicResourcesArgs, nodes []*v1.Node, cl // fields to work when using the fake client. Add it with client.PrependReactor // to your fake client. ResourceVersion handling is required for conflict // detection during updates, which is covered by some scenarios. -func createReactor(tracker cgotesting.ObjectTracker) func(action cgotesting.Action) (handled bool, ret apiruntime.Object, err error) { +func createReactor(tracker cgotesting.ObjectTracker, failPatch bool) func(action cgotesting.Action) (handled bool, ret apiruntime.Object, err error) { var nameCounter int var uidCounter int var resourceVersionCounter int var mutex sync.Mutex return func(action cgotesting.Action) (handled bool, ret apiruntime.Object, err error) { + if failPatch { + if _, ok := action.(cgotesting.PatchAction); ok { + return true, nil, errors.New("patch error") + } + } + createAction, ok := action.(cgotesting.CreateAction) if !ok { return false, nil, nil @@ -2294,7 +2526,7 @@ func Test_isSchedulableAfterClaimChange(t *testing.T) { EnableDRASchedulerFilterTimeout: true, EnableDynamicResourceAllocation: true, } - testCtx := setup(t, nil, nil, tc.claims, nil, nil, features) + testCtx := setup(t, nil, nil, tc.claims, nil, nil, features, false) oldObj := tc.oldObj newObj := tc.newObj if claim, ok := tc.newObj.(*resourceapi.ResourceClaim); ok { @@ -2418,7 +2650,7 @@ func Test_isSchedulableAfterPodChange(t *testing.T) { EnableDRASchedulerFilterTimeout: true, EnableDynamicResourceAllocation: true, } - testCtx := setup(t, nil, nil, tc.claims, nil, tc.objs, features) + testCtx := setup(t, nil, nil, tc.claims, nil, tc.objs, features, false) gotHint, err := testCtx.p.isSchedulableAfterPodChange(logger, tc.pod, nil, tc.obj) if tc.wantErr { if err == nil { @@ -2709,3 +2941,51 @@ func Test_createRequestMappings(t *testing.T) { }) } } + +// TestAllocatorSelection covers the selection of a structured allocation implementation +// based on actual Kubernetes feature gates. This test lives here instead of +// k8s.io/dynamic-resource-allocation/structured because that code has no access +// to feature gate definitions. +func TestAllocatorSelection(t *testing.T) { + for name, tc := range map[string]struct { + features string + expectImplementation string + }{ + // The most conservative implementation: only used when explicitly asking + // for the most stable Kubernetes (no alpha or beta features). + "only-GA": { + features: "AllAlpha=false,AllBeta=false", + expectImplementation: "stable", + }, + + // By default, some beta features are on and the incubating implementation + // is used. + "default": { + features: "", + expectImplementation: "incubating", + }, + + // Alpha features need the experimental implementation. + "alpha": { + features: "AllAlpha=true,AllBeta=true", + expectImplementation: "experimental", + }, + } { + t.Run(name, func(t *testing.T) { + tCtx := ktesting.Init(t) + featureGate := utilfeature.DefaultFeatureGate.DeepCopy() + tCtx.ExpectNoError(featureGate.Set(tc.features), "set features") + fts := feature.NewSchedulerFeaturesFromGates(featureGate) + features := allocatorFeatures(fts) + + // Slightly hacky: most arguments are not valid and the constructor + // is expected to not use them yet. + allocator, err := structured.NewAllocator(tCtx, features, structured.AllocatedState{}, nil, nil, nil) + tCtx.ExpectNoError(err, "create allocator") + allocatorType := fmt.Sprintf("%T", allocator) + if !strings.Contains(allocatorType, tc.expectImplementation) { + tCtx.Fatalf("Expected allocator implementation %q, got %s", tc.expectImplementation, allocatorType) + } + }) + } +} diff --git a/pkg/scheduler/framework/plugins/dynamicresources/extended/util.go b/pkg/scheduler/framework/plugins/dynamicresources/extended/util.go index 7c3acf137a4b3..9921626602d20 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/extended/util.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/extended/util.go @@ -18,22 +18,21 @@ package extended import ( v1 "k8s.io/api/core/v1" - "k8s.io/api/resource/v1beta1" - "k8s.io/kubernetes/pkg/scheduler/framework" + resourceapi "k8s.io/api/resource/v1" + fwk "k8s.io/kube-scheduler/framework" ) -func DeviceClassMapping(draManager framework.SharedDRAManager) (map[v1.ResourceName]string, error) { +func DeviceClassMapping(draManager fwk.SharedDRAManager) (map[v1.ResourceName]string, error) { classes, err := draManager.DeviceClasses().List() extendedResources := make(map[v1.ResourceName]string, len(classes)) if err != nil { return nil, err } for _, c := range classes { - if c.Spec.ExtendedResourceName == nil { - extendedResources[v1.ResourceName(v1beta1.ResourceDeviceClassPrefix+c.Name)] = c.Name - } else { + if c.Spec.ExtendedResourceName != nil { extendedResources[v1.ResourceName(*c.Spec.ExtendedResourceName)] = c.Name } + extendedResources[v1.ResourceName(resourceapi.ResourceDeviceClassPrefix+c.Name)] = c.Name } return extendedResources, nil } diff --git a/pkg/scheduler/framework/plugins/dynamicresources/extended/util_test.go b/pkg/scheduler/framework/plugins/dynamicresources/extended/util_test.go index 2968f551acebf..e10a99f61c7b8 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/extended/util_test.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/extended/util_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes/fake" resourcelisters "k8s.io/client-go/listers/resource/v1" - "k8s.io/kubernetes/pkg/scheduler/framework" + fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/test/utils/ktesting" ) @@ -34,17 +34,17 @@ type fakeDRAManager struct { deviceClassLister *deviceClassLister } -var _ framework.DeviceClassLister = &deviceClassLister{} +var _ fwk.DeviceClassLister = &deviceClassLister{} -func (f *fakeDRAManager) ResourceClaims() framework.ResourceClaimTracker { +func (f *fakeDRAManager) ResourceClaims() fwk.ResourceClaimTracker { return nil } -func (f *fakeDRAManager) ResourceSlices() framework.ResourceSliceLister { +func (f *fakeDRAManager) ResourceSlices() fwk.ResourceSliceLister { return nil } -func (f *fakeDRAManager) DeviceClasses() framework.DeviceClassLister { +func (f *fakeDRAManager) DeviceClasses() fwk.DeviceClassLister { return f.deviceClassLister } @@ -122,6 +122,15 @@ func TestDeviceClassMapping(t *testing.T) { if c != "class2" { t.Errorf("result does not match device class name %s", "class2") } + for _, c := range []string{"class1", "class2", "class3"} { + n, ok := rm[v1.ResourceName("deviceclass.resource.kubernetes.io/"+c)] + if !ok { + t.Errorf("result does not contain implicit extended resource for device class %s", c) + } + if n != c { + t.Errorf("result %s does not match device class name %s", n, c) + } + } } func TestNoDeviceClassMapping(t *testing.T) { diff --git a/pkg/scheduler/framework/plugins/feature/feature.go b/pkg/scheduler/framework/plugins/feature/feature.go index 41b29c0f859d6..89bd2c77fab2a 100644 --- a/pkg/scheduler/framework/plugins/feature/feature.go +++ b/pkg/scheduler/framework/plugins/feature/feature.go @@ -28,8 +28,10 @@ type Features struct { EnableDRAExtendedResource bool EnableDRAPrioritizedList bool EnableDRAAdminAccess bool + EnableDRAConsumableCapacity bool EnableDRADeviceTaints bool EnableDRADeviceBindingConditions bool + EnableDRAPartitionableDevices bool EnableDRAResourceClaimDeviceStatus bool EnableDRASchedulerFilterTimeout bool EnableDynamicResourceAllocation bool @@ -42,9 +44,7 @@ type Features struct { EnableSchedulingQueueHint bool EnableAsyncPreemption bool EnablePodLevelResources bool - EnablePartitionableDevices bool EnableStorageCapacityScoring bool - EnableConsumableCapacity bool } // NewSchedulerFeaturesFromGates copies the current state of the feature gates into the struct. @@ -53,7 +53,7 @@ func NewSchedulerFeaturesFromGates(featureGate featuregate.FeatureGate) Features EnableDRAExtendedResource: featureGate.Enabled(features.DRAExtendedResource), EnableDRAPrioritizedList: featureGate.Enabled(features.DRAPrioritizedList), EnableDRAAdminAccess: featureGate.Enabled(features.DRAAdminAccess), - EnableConsumableCapacity: featureGate.Enabled(features.DRAConsumableCapacity), + EnableDRAConsumableCapacity: featureGate.Enabled(features.DRAConsumableCapacity), EnableDRADeviceTaints: featureGate.Enabled(features.DRADeviceTaints), EnableDRASchedulerFilterTimeout: featureGate.Enabled(features.DRASchedulerFilterTimeout), EnableDRAResourceClaimDeviceStatus: featureGate.Enabled(features.DRAResourceClaimDeviceStatus), @@ -68,7 +68,7 @@ func NewSchedulerFeaturesFromGates(featureGate featuregate.FeatureGate) Features EnableSchedulingQueueHint: featureGate.Enabled(features.SchedulerQueueingHints), EnableAsyncPreemption: featureGate.Enabled(features.SchedulerAsyncPreemption), EnablePodLevelResources: featureGate.Enabled(features.PodLevelResources), - EnablePartitionableDevices: featureGate.Enabled(features.DRAPartitionableDevices), + EnableDRAPartitionableDevices: featureGate.Enabled(features.DRAPartitionableDevices), EnableStorageCapacityScoring: featureGate.Enabled(features.StorageCapacityScoring), } } diff --git a/pkg/scheduler/framework/plugins/helper/normalize_score.go b/pkg/scheduler/framework/plugins/helper/normalize_score.go index c6d9e3ce4eb65..29a44c4688563 100644 --- a/pkg/scheduler/framework/plugins/helper/normalize_score.go +++ b/pkg/scheduler/framework/plugins/helper/normalize_score.go @@ -18,14 +18,13 @@ package helper import ( fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" ) // DefaultNormalizeScore generates a Normalize Score function that can normalize the // scores from [0, max(scores)] to [0, maxPriority]. If reverse is set to true, it // reverses the scores by subtracting it from maxPriority. // Note: The input scores are always assumed to be non-negative integers. -func DefaultNormalizeScore(maxPriority int64, reverse bool, scores framework.NodeScoreList) *fwk.Status { +func DefaultNormalizeScore(maxPriority int64, reverse bool, scores fwk.NodeScoreList) *fwk.Status { var maxCount int64 for i := range scores { if scores[i].Score > maxCount { diff --git a/pkg/scheduler/framework/plugins/helper/normalize_score_test.go b/pkg/scheduler/framework/plugins/helper/normalize_score_test.go index a72cbf9950b14..b51246d5e8a97 100644 --- a/pkg/scheduler/framework/plugins/helper/normalize_score_test.go +++ b/pkg/scheduler/framework/plugins/helper/normalize_score_test.go @@ -21,8 +21,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - - "k8s.io/kubernetes/pkg/scheduler/framework" + fwk "k8s.io/kube-scheduler/framework" ) func TestDefaultNormalizeScore(t *testing.T) { @@ -75,17 +74,17 @@ func TestDefaultNormalizeScore(t *testing.T) { for i, test := range tests { t.Run(fmt.Sprintf("case_%d", i), func(t *testing.T) { - scores := framework.NodeScoreList{} + scores := fwk.NodeScoreList{} for _, score := range test.scores { - scores = append(scores, framework.NodeScore{Score: score}) + scores = append(scores, fwk.NodeScore{Score: score}) } - expectedScores := framework.NodeScoreList{} + expectedScores := fwk.NodeScoreList{} for _, score := range test.expectedScores { - expectedScores = append(expectedScores, framework.NodeScore{Score: score}) + expectedScores = append(expectedScores, fwk.NodeScore{Score: score}) } - DefaultNormalizeScore(framework.MaxNodeScore, test.reverse, scores) + DefaultNormalizeScore(fwk.MaxNodeScore, test.reverse, scores) if diff := cmp.Diff(expectedScores, scores); diff != "" { t.Errorf("Unexpected scores (-want, +got):\n%s", diff) } diff --git a/pkg/scheduler/framework/plugins/imagelocality/image_locality.go b/pkg/scheduler/framework/plugins/imagelocality/image_locality.go index 3aa678856d925..c8d8d56a98ec8 100644 --- a/pkg/scheduler/framework/plugins/imagelocality/image_locality.go +++ b/pkg/scheduler/framework/plugins/imagelocality/image_locality.go @@ -23,7 +23,6 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" ) @@ -37,10 +36,10 @@ const ( // ImageLocality is a score plugin that favors nodes that already have requested pod container's images. type ImageLocality struct { - handle framework.Handle + handle fwk.Handle } -var _ framework.ScorePlugin = &ImageLocality{} +var _ fwk.ScorePlugin = &ImageLocality{} // Name is the name of the plugin used in the plugin registry and configurations. const Name = names.ImageLocality @@ -65,12 +64,12 @@ func (pl *ImageLocality) Score(ctx context.Context, state fwk.CycleState, pod *v } // ScoreExtensions of the Score plugin. -func (pl *ImageLocality) ScoreExtensions() framework.ScoreExtensions { +func (pl *ImageLocality) ScoreExtensions() fwk.ScoreExtensions { return nil } // New initializes a new plugin and returns it. -func New(_ context.Context, _ runtime.Object, h framework.Handle) (framework.Plugin, error) { +func New(_ context.Context, _ runtime.Object, h fwk.Handle) (fwk.Plugin, error) { return &ImageLocality{handle: h}, nil } @@ -84,7 +83,7 @@ func calculatePriority(sumScores int64, numContainers int) int64 { sumScores = maxThreshold } - return framework.MaxNodeScore * (sumScores - minThreshold) / (maxThreshold - minThreshold) + return fwk.MaxNodeScore * (sumScores - minThreshold) / (maxThreshold - minThreshold) } // sumImageScores returns the sum of image scores of all the containers that are already on the node. diff --git a/pkg/scheduler/framework/plugins/imagelocality/image_locality_test.go b/pkg/scheduler/framework/plugins/imagelocality/image_locality_test.go index 8813c20c8feaf..bf9c00ac792cc 100644 --- a/pkg/scheduler/framework/plugins/imagelocality/image_locality_test.go +++ b/pkg/scheduler/framework/plugins/imagelocality/image_locality_test.go @@ -27,6 +27,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/klog/v2/ktesting" + fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/backend/cache" "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/runtime" @@ -239,7 +240,7 @@ func TestImageLocalityPriority(t *testing.T) { pod *v1.Pod pods []*v1.Pod nodes []*v1.Node - expectedList framework.NodeScoreList + expectedList fwk.NodeScoreList name string }{ { @@ -254,7 +255,7 @@ func TestImageLocalityPriority(t *testing.T) { // Score: 100 * (250M/2 - 23M)/(1000M * 2 - 23M) = 5 pod: &v1.Pod{Spec: test40250}, nodes: []*v1.Node{makeImageNode("node1", node403002000), makeImageNode("node2", node25010)}, - expectedList: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: 5}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: 5}}, name: "two images spread on two nodes, prefer the larger image one", }, { @@ -269,7 +270,7 @@ func TestImageLocalityPriority(t *testing.T) { // Score: 0 pod: &v1.Pod{Spec: test40300}, nodes: []*v1.Node{makeImageNode("node1", node403002000), makeImageNode("node2", node25010)}, - expectedList: []framework.NodeScore{{Name: "node1", Score: 7}, {Name: "node2", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 7}, {Name: "node2", Score: 0}}, name: "two images on one node, prefer this node", }, { @@ -284,7 +285,7 @@ func TestImageLocalityPriority(t *testing.T) { // Score: 0 (10M/2 < 23M, min-threshold) pod: &v1.Pod{Spec: testMinMax}, nodes: []*v1.Node{makeImageNode("node1", node400030), makeImageNode("node2", node25010)}, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: 0}}, name: "if exceed limit, use limit", }, { @@ -303,7 +304,7 @@ func TestImageLocalityPriority(t *testing.T) { // Score: 0 pod: &v1.Pod{Spec: testMinMax}, nodes: []*v1.Node{makeImageNode("node1", node400030), makeImageNode("node2", node25010), makeImageNode("node3", nodeWithNoImages)}, - expectedList: []framework.NodeScore{{Name: "node1", Score: 66}, {Name: "node2", Score: 0}, {Name: "node3", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 66}, {Name: "node2", Score: 0}, {Name: "node3", Score: 0}}, name: "if exceed limit, use limit (with node which has no images present)", }, { @@ -322,7 +323,7 @@ func TestImageLocalityPriority(t *testing.T) { // Score: 0 pod: &v1.Pod{Spec: test300600900}, nodes: []*v1.Node{makeImageNode("node1", node60040900), makeImageNode("node2", node300600900), makeImageNode("node3", nodeWithNoImages)}, - expectedList: []framework.NodeScore{{Name: "node1", Score: 32}, {Name: "node2", Score: 36}, {Name: "node3", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 32}, {Name: "node2", Score: 36}, {Name: "node3", Score: 0}}, name: "pod with multiple large images, node2 is preferred", }, { @@ -337,7 +338,7 @@ func TestImageLocalityPriority(t *testing.T) { // Score: 0 pod: &v1.Pod{Spec: test3040}, nodes: []*v1.Node{makeImageNode("node1", node203040), makeImageNode("node2", node400030)}, - expectedList: []framework.NodeScore{{Name: "node1", Score: 1}, {Name: "node2", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 1}, {Name: "node2", Score: 0}}, name: "pod with multiple small images", }, { @@ -352,7 +353,7 @@ func TestImageLocalityPriority(t *testing.T) { // Score: 100 * (30M * 1/2 - 23M) / (1000M * 2 - 23M) = 0 pod: &v1.Pod{Spec: test30Init300}, nodes: []*v1.Node{makeImageNode("node1", node403002000), makeImageNode("node2", node203040)}, - expectedList: []framework.NodeScore{{Name: "node1", Score: 6}, {Name: "node2", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 6}, {Name: "node2", Score: 0}}, name: "include InitContainers: two images spread on two nodes, prefer the larger image one", }, } @@ -371,7 +372,7 @@ func TestImageLocalityPriority(t *testing.T) { if err != nil { t.Fatalf("creating plugin: %v", err) } - var gotList framework.NodeScoreList + var gotList fwk.NodeScoreList for _, n := range test.nodes { nodeName := n.ObjectMeta.Name // Currently, we use the snapshot instead of the tf.BuildNodeInfos to build the nodeInfo since some @@ -381,11 +382,11 @@ func TestImageLocalityPriority(t *testing.T) { if err != nil { t.Errorf("failed to get node %q from snapshot: %v", nodeName, err) } - score, status := p.(framework.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) + score, status := p.(fwk.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) if !status.IsSuccess() { t.Errorf("unexpected error: %v", status) } - gotList = append(gotList, framework.NodeScore{Name: nodeName, Score: score}) + gotList = append(gotList, fwk.NodeScore{Name: nodeName, Score: score}) } if diff := cmp.Diff(test.expectedList, gotList); diff != "" { diff --git a/pkg/scheduler/framework/plugins/interpodaffinity/filtering.go b/pkg/scheduler/framework/plugins/interpodaffinity/filtering.go index 375f7954709f5..2b07766b38005 100644 --- a/pkg/scheduler/framework/plugins/interpodaffinity/filtering.go +++ b/pkg/scheduler/framework/plugins/interpodaffinity/filtering.go @@ -271,7 +271,7 @@ func (pl *InterPodAffinity) getIncomingAffinityAntiAffinityCounts(ctx context.Co } // PreFilter invoked at the prefilter extension point. -func (pl *InterPodAffinity) PreFilter(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, allNodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (pl *InterPodAffinity) PreFilter(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, allNodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { var nodesWithRequiredAntiAffinityPods []fwk.NodeInfo var err error if nodesWithRequiredAntiAffinityPods, err = pl.sharedLister.NodeInfos().HavePodsWithRequiredAntiAffinityList(); err != nil { @@ -309,7 +309,7 @@ func (pl *InterPodAffinity) PreFilter(ctx context.Context, cycleState fwk.CycleS } // PreFilterExtensions returns prefilter extensions, pod add and remove. -func (pl *InterPodAffinity) PreFilterExtensions() framework.PreFilterExtensions { +func (pl *InterPodAffinity) PreFilterExtensions() fwk.PreFilterExtensions { return pl } diff --git a/pkg/scheduler/framework/plugins/interpodaffinity/filtering_test.go b/pkg/scheduler/framework/plugins/interpodaffinity/filtering_test.go index 83f557d0c632f..5a68a447f75d6 100644 --- a/pkg/scheduler/framework/plugins/interpodaffinity/filtering_test.go +++ b/pkg/scheduler/framework/plugins/interpodaffinity/filtering_test.go @@ -558,7 +558,7 @@ func TestRequiredAffinitySingleNode(t *testing.T) { } p := plugintesting.SetupPluginWithInformers(ctx, t, schedruntime.FactoryAdapter(feature.Features{}, New), &config.InterPodAffinityArgs{}, snapshot, namespaces) state := framework.NewCycleState() - _, preFilterStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, state, test.pod, nodeInfos) + _, preFilterStatus := p.(fwk.PreFilterPlugin).PreFilter(ctx, state, test.pod, nodeInfos) if diff := cmp.Diff(test.wantPreFilterStatus, preFilterStatus); diff != "" { t.Errorf("PreFilter: status does not match (-want,+got):\n%s", diff) } @@ -567,7 +567,7 @@ func TestRequiredAffinitySingleNode(t *testing.T) { } nodeInfo := mustGetNodeInfo(t, snapshot, test.node.Name) - gotStatus := p.(framework.FilterPlugin).Filter(ctx, state, test.pod, nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, state, test.pod, nodeInfo) if diff := cmp.Diff(test.wantFilterStatus, gotStatus); diff != "" { t.Errorf("Filter: status does not match (-want,+got):\n%s", diff) } @@ -977,7 +977,7 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) { &v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "NS1"}}, }) state := framework.NewCycleState() - _, preFilterStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, state, test.pod, nodeInfos) + _, preFilterStatus := p.(fwk.PreFilterPlugin).PreFilter(ctx, state, test.pod, nodeInfos) if diff := cmp.Diff(test.wantPreFilterStatus, preFilterStatus); diff != "" { t.Errorf("PreFilter: status does not match (-want,+got):\n%s", diff) } @@ -986,7 +986,7 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) { } for indexNode, node := range test.nodes { nodeInfo := mustGetNodeInfo(t, snapshot, node.Name) - gotStatus := p.(framework.FilterPlugin).Filter(ctx, state, test.pod, nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, state, test.pod, nodeInfo) if diff := cmp.Diff(test.wantFilterStatuses[indexNode], gotStatus); diff != "" { t.Errorf("index: %d: Filter: status does not match (-want,+got):\n%s", indexTest, diff) } @@ -1005,7 +1005,7 @@ func TestPreFilterDisabled(t *testing.T) { defer cancel() p := plugintesting.SetupPluginWithInformers(ctx, t, schedruntime.FactoryAdapter(feature.Features{}, New), &config.InterPodAffinityArgs{}, cache.NewEmptySnapshot(), nil) cycleState := framework.NewCycleState() - gotStatus := p.(framework.FilterPlugin).Filter(ctx, cycleState, pod, nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, cycleState, pod, nodeInfo) wantStatus := fwk.AsStatus(fwk.ErrNotFound) if diff := cmp.Diff(gotStatus, wantStatus); diff != "" { t.Errorf("Status does not match (-want,+got):\n%s", diff) @@ -1254,7 +1254,7 @@ func TestPreFilterStateAddRemovePod(t *testing.T) { } p := plugintesting.SetupPluginWithInformers(ctx, t, schedruntime.FactoryAdapter(feature.Features{}, New), &config.InterPodAffinityArgs{}, snapshot, nil) cycleState := framework.NewCycleState() - _, preFilterStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pendingPod, nodeInfos) + _, preFilterStatus := p.(fwk.PreFilterPlugin).PreFilter(ctx, cycleState, test.pendingPod, nodeInfos) if !preFilterStatus.IsSuccess() { t.Errorf("prefilter failed with status: %v", preFilterStatus) } diff --git a/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go b/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go index f3f6c89e3d5b6..a0f833b0ca0f8 100644 --- a/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go +++ b/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go @@ -28,8 +28,6 @@ import ( fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" - "k8s.io/kubernetes/pkg/scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework/parallelize" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" "k8s.io/kubernetes/pkg/scheduler/util" @@ -38,17 +36,17 @@ import ( // Name is the name of the plugin used in the plugin registry and configurations. const Name = names.InterPodAffinity -var _ framework.PreFilterPlugin = &InterPodAffinity{} -var _ framework.FilterPlugin = &InterPodAffinity{} -var _ framework.PreScorePlugin = &InterPodAffinity{} -var _ framework.ScorePlugin = &InterPodAffinity{} -var _ framework.EnqueueExtensions = &InterPodAffinity{} +var _ fwk.PreFilterPlugin = &InterPodAffinity{} +var _ fwk.FilterPlugin = &InterPodAffinity{} +var _ fwk.PreScorePlugin = &InterPodAffinity{} +var _ fwk.ScorePlugin = &InterPodAffinity{} +var _ fwk.EnqueueExtensions = &InterPodAffinity{} // InterPodAffinity is a plugin that checks inter pod affinity type InterPodAffinity struct { - parallelizer parallelize.Parallelizer + parallelizer fwk.Parallelizer args config.InterPodAffinityArgs - sharedLister framework.SharedLister + sharedLister fwk.SharedLister nsLister listersv1.NamespaceLister enableSchedulingQueueHint bool } @@ -84,7 +82,7 @@ func (pl *InterPodAffinity) EventsToRegister(_ context.Context) ([]fwk.ClusterEv } // New initializes a new plugin and returns it. -func New(_ context.Context, plArgs runtime.Object, h framework.Handle, fts feature.Features) (framework.Plugin, error) { +func New(_ context.Context, plArgs runtime.Object, h fwk.Handle, fts feature.Features) (fwk.Plugin, error) { if h.SnapshotSharedLister() == nil { return nil, fmt.Errorf("SnapshotSharedlister is nil") } @@ -159,12 +157,12 @@ func (pl *InterPodAffinity) isSchedulableAfterPodChange(logger klog.Logger, pod return fwk.QueueSkip, nil } - terms, err := framework.GetAffinityTerms(pod, framework.GetPodAffinityTerms(pod.Spec.Affinity)) + terms, err := fwk.GetAffinityTerms(pod, fwk.GetPodAffinityTerms(pod.Spec.Affinity)) if err != nil { return fwk.Queue, err } - antiTerms, err := framework.GetAffinityTerms(pod, framework.GetPodAntiAffinityTerms(pod.Spec.Affinity)) + antiTerms, err := fwk.GetAffinityTerms(pod, fwk.GetPodAntiAffinityTerms(pod.Spec.Affinity)) if err != nil { return fwk.Queue, err } @@ -217,7 +215,7 @@ func (pl *InterPodAffinity) isSchedulableAfterNodeChange(logger klog.Logger, pod return fwk.Queue, err } - terms, err := framework.GetAffinityTerms(pod, framework.GetPodAffinityTerms(pod.Spec.Affinity)) + terms, err := fwk.GetAffinityTerms(pod, fwk.GetPodAffinityTerms(pod.Spec.Affinity)) if err != nil { return fwk.Queue, err } @@ -254,7 +252,7 @@ func (pl *InterPodAffinity) isSchedulableAfterNodeChange(logger klog.Logger, pod } } - antiTerms, err := framework.GetAffinityTerms(pod, framework.GetPodAntiAffinityTerms(pod.Spec.Affinity)) + antiTerms, err := fwk.GetAffinityTerms(pod, fwk.GetPodAntiAffinityTerms(pod.Spec.Affinity)) if err != nil { return fwk.Queue, err } diff --git a/pkg/scheduler/framework/plugins/interpodaffinity/scoring.go b/pkg/scheduler/framework/plugins/interpodaffinity/scoring.go index 3cfc118d84f82..642089e581ad5 100644 --- a/pkg/scheduler/framework/plugins/interpodaffinity/scoring.go +++ b/pkg/scheduler/framework/plugins/interpodaffinity/scoring.go @@ -255,7 +255,7 @@ func (pl *InterPodAffinity) Score(ctx context.Context, cycleState fwk.CycleState } // NormalizeScore normalizes the score for each filteredNode. -func (pl *InterPodAffinity) NormalizeScore(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *fwk.Status { +func (pl *InterPodAffinity) NormalizeScore(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, scores fwk.NodeScoreList) *fwk.Status { s, err := getPreScoreState(cycleState) if err != nil { return fwk.AsStatus(err) @@ -280,7 +280,7 @@ func (pl *InterPodAffinity) NormalizeScore(ctx context.Context, cycleState fwk.C for i := range scores { fScore := float64(0) if maxMinDiff > 0 { - fScore = float64(framework.MaxNodeScore) * (float64(scores[i].Score-minCount) / float64(maxMinDiff)) + fScore = float64(fwk.MaxNodeScore) * (float64(scores[i].Score-minCount) / float64(maxMinDiff)) } scores[i].Score = int64(fScore) @@ -290,6 +290,6 @@ func (pl *InterPodAffinity) NormalizeScore(ctx context.Context, cycleState fwk.C } // ScoreExtensions of the Score plugin. -func (pl *InterPodAffinity) ScoreExtensions() framework.ScoreExtensions { +func (pl *InterPodAffinity) ScoreExtensions() fwk.ScoreExtensions { return pl } diff --git a/pkg/scheduler/framework/plugins/interpodaffinity/scoring_test.go b/pkg/scheduler/framework/plugins/interpodaffinity/scoring_test.go index 39cfdb1dadd7a..9135077730dc1 100644 --- a/pkg/scheduler/framework/plugins/interpodaffinity/scoring_test.go +++ b/pkg/scheduler/framework/plugins/interpodaffinity/scoring_test.go @@ -378,7 +378,7 @@ func TestPreferredAffinity(t *testing.T) { pod *v1.Pod pods []*v1.Pod nodes []*v1.Node - expectedList framework.NodeScoreList + expectedList fwk.NodeScoreList name string ignorePreferredTermsOfExistingPods bool wantStatus *fwk.Status @@ -410,7 +410,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgIndia}}, {ObjectMeta: metav1.ObjectMeta{Name: "node3", Labels: labelAzAz1}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: 0}, {Name: "node3", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: 0}, {Name: "node3", Score: 0}}, }, // the node1(node1) that have the label {"region": "China"} (match the topology key) and that have existing pods that match the labelSelector get high score // the node2(node2) that have the label {"region": "China"}, match the topology key and have the same label value with node1, get the same high score with node1 @@ -427,7 +427,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgChinaAzAz1}}, {ObjectMeta: metav1.ObjectMeta{Name: "node3", Labels: labelRgIndia}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: framework.MaxNodeScore}, {Name: "node3", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: fwk.MaxNodeScore}, {Name: "node3", Score: 0}}, }, // there are 2 regions, say regionChina(node1,node3,node4) and regionIndia(node2,node5), both regions have nodes that match the preference. // But there are more nodes(actually more existing pods) in regionChina that match the preference than regionIndia. @@ -451,7 +451,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node4", Labels: labelRgChina}}, {ObjectMeta: metav1.ObjectMeta{Name: "node5", Labels: labelRgIndia}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: 0}, {Name: "node3", Score: framework.MaxNodeScore}, {Name: "node4", Score: framework.MaxNodeScore}, {Name: "node5", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: 0}, {Name: "node3", Score: fwk.MaxNodeScore}, {Name: "node4", Score: fwk.MaxNodeScore}, {Name: "node5", Score: 0}}, }, // Test with the different operators and values for pod affinity scheduling preference, including some match failures. { @@ -467,7 +467,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgIndia}}, {ObjectMeta: metav1.ObjectMeta{Name: "node3", Labels: labelAzAz1}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 20}, {Name: "node2", Score: framework.MaxNodeScore}, {Name: "node3", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 20}, {Name: "node2", Score: fwk.MaxNodeScore}, {Name: "node3", Score: 0}}, }, // Test the symmetry cases for affinity, the difference between affinity and symmetry is not the pod wants to run together with some existing pods, // but the existing pods have the inter pod affinity preference while the pod to schedule satisfy the preference. @@ -483,7 +483,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgIndia}}, {ObjectMeta: metav1.ObjectMeta{Name: "node3", Labels: labelAzAz1}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: framework.MaxNodeScore}, {Name: "node3", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: fwk.MaxNodeScore}, {Name: "node3", Score: 0}}, }, { name: "Affinity symmetry with namespace selector", @@ -497,7 +497,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgIndia}}, {ObjectMeta: metav1.ObjectMeta{Name: "node3", Labels: labelAzAz1}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: 0}, {Name: "node3", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: 0}, {Name: "node3", Score: 0}}, }, { name: "AntiAffinity symmetry with namespace selector", @@ -511,7 +511,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgIndia}}, {ObjectMeta: metav1.ObjectMeta{Name: "node3", Labels: labelAzAz1}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: framework.MaxNodeScore}, {Name: "node3", Score: framework.MaxNodeScore}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: fwk.MaxNodeScore}, {Name: "node3", Score: fwk.MaxNodeScore}}, }, { name: "Affinity symmetry: considered RequiredDuringSchedulingIgnoredDuringExecution in pod affinity symmetry", @@ -525,7 +525,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgIndia}}, {ObjectMeta: metav1.ObjectMeta{Name: "node3", Labels: labelAzAz1}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: framework.MaxNodeScore}, {Name: "node3", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: fwk.MaxNodeScore}, {Name: "node3", Score: 0}}, }, // The pod to schedule prefer to stay away from some existing pods at node level using the pod anti affinity. @@ -545,7 +545,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node1", Labels: labelAzAz1}}, {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgChina}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: framework.MaxNodeScore}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: fwk.MaxNodeScore}}, }, { name: "Anti Affinity: pod that does not match topology key & match the pods in nodes will get higher score comparing to others ", @@ -558,7 +558,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node1", Labels: labelAzAz1}}, {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgChina}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: framework.MaxNodeScore}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: fwk.MaxNodeScore}}, }, { name: "Anti Affinity: one node has more matching pods comparing to other node, so the node which has more unmatches will get high score", @@ -572,7 +572,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node1", Labels: labelAzAz1}}, {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgIndia}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: framework.MaxNodeScore}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: fwk.MaxNodeScore}}, }, // Test the symmetry cases for anti affinity { @@ -586,7 +586,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node1", Labels: labelAzAz1}}, {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelAzAz2}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: framework.MaxNodeScore}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: fwk.MaxNodeScore}}, }, // Test both affinity and anti-affinity { @@ -600,7 +600,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node1", Labels: labelRgChina}}, {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelAzAz1}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: 0}}, }, // Combined cases considering both affinity and anti-affinity, the pod to schedule and existing pods have the same labels (they are in the same RC/service), // the pod prefer to run together with its brother pods in the same region, but wants to stay away from them at node level, @@ -625,7 +625,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node4", Labels: labelRgChina}}, {ObjectMeta: metav1.ObjectMeta{Name: "node5", Labels: labelRgIndia}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: 0}, {Name: "node3", Score: framework.MaxNodeScore}, {Name: "node4", Score: framework.MaxNodeScore}, {Name: "node5", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: 0}, {Name: "node3", Score: fwk.MaxNodeScore}, {Name: "node4", Score: fwk.MaxNodeScore}, {Name: "node5", Score: 0}}, }, // Consider Affinity, Anti Affinity and symmetry together. // for Affinity, the weights are: 8, 0, 0, 0 @@ -647,7 +647,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node3", Labels: labelRgIndia}}, {ObjectMeta: metav1.ObjectMeta{Name: "node4", Labels: labelAzAz2}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: 0}, {Name: "node3", Score: framework.MaxNodeScore}, {Name: "node4", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: 0}, {Name: "node3", Score: fwk.MaxNodeScore}, {Name: "node4", Score: 0}}, }, // Cover https://github.com/kubernetes/kubernetes/issues/82796 which panics upon: // 1. Some nodes in a topology don't have pods with affinity, but other nodes in the same topology have. @@ -663,7 +663,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node1", Labels: labelRgChina}}, {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgChina}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: 0}}, }, { name: "invalid Affinity fails PreScore", @@ -696,7 +696,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node1", Labels: labelRgChina}}, {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgIndia}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: 0}}, }, { name: "Affinity with pods matching both NamespaceSelector and Namespaces fields", @@ -711,7 +711,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node1", Labels: labelRgChina}}, {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgIndia}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: 0}}, }, { name: "Affinity with pods matching NamespaceSelector", @@ -726,7 +726,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node1", Labels: labelRgChina}}, {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgIndia}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: framework.MaxNodeScore}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: fwk.MaxNodeScore}}, }, { name: "Affinity with pods matching both NamespaceSelector and Namespaces fields", @@ -741,7 +741,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node1", Labels: labelRgChina}}, {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgIndia}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: framework.MaxNodeScore}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: fwk.MaxNodeScore}}, }, { name: "Ignore preferred terms of existing pods", @@ -754,7 +754,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node1", Labels: labelRgChina}}, {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgIndia}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: 0}}, wantStatus: fwk.NewStatus(fwk.Skip), ignorePreferredTermsOfExistingPods: true, }, @@ -769,7 +769,7 @@ func TestPreferredAffinity(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node1", Labels: labelRgChina}}, {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: labelRgIndia}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: framework.MaxNodeScore}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: fwk.MaxNodeScore}}, ignorePreferredTermsOfExistingPods: false, }, { @@ -788,7 +788,7 @@ func TestPreferredAffinity(t *testing.T) { state := framework.NewCycleState() p := plugintesting.SetupPluginWithInformers(ctx, t, schedruntime.FactoryAdapter(feature.Features{}, New), &config.InterPodAffinityArgs{HardPodAffinityWeight: 1, IgnorePreferredTermsOfExistingPods: test.ignorePreferredTermsOfExistingPods}, cache.NewSnapshot(test.pods, test.nodes), namespaces) nodeInfos := tf.BuildNodeInfos(test.nodes) - status := p.(framework.PreScorePlugin).PreScore(ctx, state, test.pod, nodeInfos) + status := p.(fwk.PreScorePlugin).PreScore(ctx, state, test.pod, nodeInfos) if !status.IsSuccess() { if status.Code() != test.wantStatus.Code() { @@ -801,17 +801,17 @@ func TestPreferredAffinity(t *testing.T) { return } - var gotList framework.NodeScoreList + var gotList fwk.NodeScoreList for _, nodeInfo := range nodeInfos { nodeName := nodeInfo.Node().Name - score, status := p.(framework.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) + score, status := p.(fwk.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) if !status.IsSuccess() { t.Errorf("unexpected error from Score: %v", status) } - gotList = append(gotList, framework.NodeScore{Name: nodeName, Score: score}) + gotList = append(gotList, fwk.NodeScore{Name: nodeName, Score: score}) } - status = p.(framework.ScorePlugin).ScoreExtensions().NormalizeScore(ctx, state, test.pod, gotList) + status = p.(fwk.ScorePlugin).ScoreExtensions().NormalizeScore(ctx, state, test.pod, gotList) if !status.IsSuccess() { t.Errorf("unexpected error from NormalizeScore: %v", status) } @@ -869,7 +869,7 @@ func TestPreferredAffinityWithHardPodAffinitySymmetricWeight(t *testing.T) { pods []*v1.Pod nodes []*v1.Node hardPodAffinityWeight int32 - expectedList framework.NodeScoreList + expectedList fwk.NodeScoreList name string wantStatus *fwk.Status }{ @@ -886,7 +886,7 @@ func TestPreferredAffinityWithHardPodAffinitySymmetricWeight(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node3", Labels: labelAzAz1}}, }, hardPodAffinityWeight: v1.DefaultHardPodAffinitySymmetricWeight, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: framework.MaxNodeScore}, {Name: "node3", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: fwk.MaxNodeScore}, {Name: "node3", Score: 0}}, }, { name: "with zero weight", @@ -931,7 +931,7 @@ func TestPreferredAffinityWithHardPodAffinitySymmetricWeight(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node3", Labels: labelAzAz1}}, }, hardPodAffinityWeight: v1.DefaultHardPodAffinitySymmetricWeight, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: framework.MaxNodeScore}, {Name: "node3", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: fwk.MaxNodeScore}, {Name: "node3", Score: 0}}, }, { name: "with matching Namespaces", @@ -946,7 +946,7 @@ func TestPreferredAffinityWithHardPodAffinitySymmetricWeight(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node3", Labels: labelAzAz1}}, }, hardPodAffinityWeight: v1.DefaultHardPodAffinitySymmetricWeight, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: framework.MaxNodeScore}, {Name: "node3", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: fwk.MaxNodeScore}, {Name: "node3", Score: 0}}, }, } for _, test := range tests { @@ -957,7 +957,7 @@ func TestPreferredAffinityWithHardPodAffinitySymmetricWeight(t *testing.T) { state := framework.NewCycleState() p := plugintesting.SetupPluginWithInformers(ctx, t, schedruntime.FactoryAdapter(feature.Features{}, New), &config.InterPodAffinityArgs{HardPodAffinityWeight: test.hardPodAffinityWeight}, cache.NewSnapshot(test.pods, test.nodes), namespaces) nodeInfos := tf.BuildNodeInfos(test.nodes) - status := p.(framework.PreScorePlugin).PreScore(ctx, state, test.pod, nodeInfos) + status := p.(fwk.PreScorePlugin).PreScore(ctx, state, test.pod, nodeInfos) if !test.wantStatus.Equal(status) { t.Errorf("InterPodAffinity#PreScore() returned unexpected status.Code got: %v, want: %v", status.Code(), test.wantStatus.Code()) } @@ -965,21 +965,21 @@ func TestPreferredAffinityWithHardPodAffinitySymmetricWeight(t *testing.T) { return } - var gotList framework.NodeScoreList + var gotList fwk.NodeScoreList for _, nodeInfo := range nodeInfos { nodeName := nodeInfo.Node().Name nodeInfo, err := p.(*InterPodAffinity).sharedLister.NodeInfos().Get(nodeName) if err != nil { t.Errorf("failed to get node %q from snapshot: %v", nodeName, err) } - score, status := p.(framework.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) + score, status := p.(fwk.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) if !status.IsSuccess() { t.Errorf("unexpected error: %v", status) } - gotList = append(gotList, framework.NodeScore{Name: nodeName, Score: score}) + gotList = append(gotList, fwk.NodeScore{Name: nodeName, Score: score}) } - status = p.(framework.ScorePlugin).ScoreExtensions().NormalizeScore(ctx, state, test.pod, gotList) + status = p.(fwk.ScorePlugin).ScoreExtensions().NormalizeScore(ctx, state, test.pod, gotList) if !status.IsSuccess() { t.Errorf("unexpected error: %v", status) } diff --git a/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity.go b/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity.go index 8b1f7afb00522..72dfb2cbcbd9c 100644 --- a/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity.go +++ b/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity.go @@ -29,7 +29,6 @@ import ( fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" @@ -38,17 +37,17 @@ import ( // NodeAffinity is a plugin that checks if a pod node selector matches the node label. type NodeAffinity struct { - handle framework.Handle + handle fwk.Handle addedNodeSelector *nodeaffinity.NodeSelector addedPrefSchedTerms *nodeaffinity.PreferredSchedulingTerms enableSchedulingQueueHint bool } -var _ framework.PreFilterPlugin = &NodeAffinity{} -var _ framework.FilterPlugin = &NodeAffinity{} -var _ framework.PreScorePlugin = &NodeAffinity{} -var _ framework.ScorePlugin = &NodeAffinity{} -var _ framework.EnqueueExtensions = &NodeAffinity{} +var _ fwk.PreFilterPlugin = &NodeAffinity{} +var _ fwk.FilterPlugin = &NodeAffinity{} +var _ fwk.PreScorePlugin = &NodeAffinity{} +var _ fwk.ScorePlugin = &NodeAffinity{} +var _ fwk.EnqueueExtensions = &NodeAffinity{} const ( // Name is the name of the plugin used in the plugin registry and configurations. @@ -144,7 +143,7 @@ func (pl *NodeAffinity) isSchedulableAfterNodeChange(logger klog.Logger, pod *v1 } // PreFilter builds and writes cycle state used by Filter. -func (pl *NodeAffinity) PreFilter(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (pl *NodeAffinity) PreFilter(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { affinity := pod.Spec.Affinity noNodeAffinity := (affinity == nil || affinity.NodeAffinity == nil || @@ -190,14 +189,14 @@ func (pl *NodeAffinity) PreFilter(ctx context.Context, cycleState fwk.CycleState if nodeNames != nil && len(nodeNames) == 0 { return nil, fwk.NewStatus(fwk.UnschedulableAndUnresolvable, errReasonConflict) } else if len(nodeNames) > 0 { - return &framework.PreFilterResult{NodeNames: nodeNames}, nil + return &fwk.PreFilterResult{NodeNames: nodeNames}, nil } return nil, nil } // PreFilterExtensions not necessary for this plugin as state doesn't depend on pod additions or deletions. -func (pl *NodeAffinity) PreFilterExtensions() framework.PreFilterExtensions { +func (pl *NodeAffinity) PreFilterExtensions() fwk.PreFilterExtensions { return nil } @@ -285,17 +284,17 @@ func (pl *NodeAffinity) Score(ctx context.Context, state fwk.CycleState, pod *v1 } // NormalizeScore invoked after scoring all nodes. -func (pl *NodeAffinity) NormalizeScore(ctx context.Context, state fwk.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *fwk.Status { - return helper.DefaultNormalizeScore(framework.MaxNodeScore, false, scores) +func (pl *NodeAffinity) NormalizeScore(ctx context.Context, state fwk.CycleState, pod *v1.Pod, scores fwk.NodeScoreList) *fwk.Status { + return helper.DefaultNormalizeScore(fwk.MaxNodeScore, false, scores) } // ScoreExtensions of the Score plugin. -func (pl *NodeAffinity) ScoreExtensions() framework.ScoreExtensions { +func (pl *NodeAffinity) ScoreExtensions() fwk.ScoreExtensions { return pl } // New initializes a new plugin and returns it. -func New(_ context.Context, plArgs runtime.Object, h framework.Handle, fts feature.Features) (framework.Plugin, error) { +func New(_ context.Context, plArgs runtime.Object, h fwk.Handle, fts feature.Features) (fwk.Plugin, error) { args, err := getArgs(plArgs) if err != nil { return nil, err diff --git a/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity_test.go b/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity_test.go index 7802614561e79..d1314e35791a2 100644 --- a/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity_test.go +++ b/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity_test.go @@ -46,7 +46,7 @@ func TestNodeAffinity(t *testing.T) { nodeName string wantStatus *fwk.Status wantPreFilterStatus *fwk.Status - wantPreFilterResult *framework.PreFilterResult + wantPreFilterResult *fwk.PreFilterResult args config.NodeAffinityArgs runPreFilter bool }{ @@ -497,7 +497,7 @@ func TestNodeAffinity(t *testing.T) { }, }, nodeName: "node1", - wantPreFilterResult: &framework.PreFilterResult{NodeNames: sets.New("node1")}, + wantPreFilterResult: &fwk.PreFilterResult{NodeNames: sets.New("node1")}, runPreFilter: true, }, { @@ -525,7 +525,7 @@ func TestNodeAffinity(t *testing.T) { }, nodeName: "node2", wantStatus: fwk.NewStatus(fwk.UnschedulableAndUnresolvable, ErrReasonPod), - wantPreFilterResult: &framework.PreFilterResult{NodeNames: sets.New("node1")}, + wantPreFilterResult: &fwk.PreFilterResult{NodeNames: sets.New("node1")}, runPreFilter: true, }, { @@ -601,7 +601,7 @@ func TestNodeAffinity(t *testing.T) { }, nodeName: "node2", labels: map[string]string{"foo": "bar"}, - wantPreFilterResult: &framework.PreFilterResult{NodeNames: sets.New("node1")}, + wantPreFilterResult: &fwk.PreFilterResult{NodeNames: sets.New("node1")}, wantStatus: fwk.NewStatus(fwk.UnschedulableAndUnresolvable, ErrReasonPod), runPreFilter: true, }, @@ -637,7 +637,7 @@ func TestNodeAffinity(t *testing.T) { }, nodeName: "node1", labels: map[string]string{"foo": "bar"}, - wantPreFilterResult: &framework.PreFilterResult{NodeNames: sets.New("node1")}, + wantPreFilterResult: &fwk.PreFilterResult{NodeNames: sets.New("node1")}, runPreFilter: true, }, { @@ -710,7 +710,7 @@ func TestNodeAffinity(t *testing.T) { }, }, nodeName: "node2", - wantPreFilterResult: &framework.PreFilterResult{NodeNames: sets.New("node1", "node2")}, + wantPreFilterResult: &fwk.PreFilterResult{NodeNames: sets.New("node1", "node2")}, runPreFilter: true, }, { @@ -917,7 +917,7 @@ func TestNodeAffinity(t *testing.T) { state := framework.NewCycleState() var gotStatus *fwk.Status if test.runPreFilter { - gotPreFilterResult, gotStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, state, test.pod, nil) + gotPreFilterResult, gotStatus := p.(fwk.PreFilterPlugin).PreFilter(ctx, state, test.pod, nil) if diff := cmp.Diff(test.wantPreFilterStatus, gotStatus); diff != "" { t.Errorf("unexpected PreFilter Status (-want,+got):\n%s", diff) } @@ -925,7 +925,7 @@ func TestNodeAffinity(t *testing.T) { t.Errorf("unexpected PreFilterResult (-want,+got):\n%s", diff) } } - gotStatus = p.(framework.FilterPlugin).Filter(ctx, state, test.pod, nodeInfo) + gotStatus = p.(fwk.FilterPlugin).Filter(ctx, state, test.pod, nodeInfo) if diff := cmp.Diff(test.wantStatus, gotStatus); diff != "" { t.Errorf("unexpected Filter Status (-want,+got):\n%s", diff) } @@ -1012,7 +1012,7 @@ func TestNodeAffinityPriority(t *testing.T) { name string pod *v1.Pod nodes []*v1.Node - expectedList framework.NodeScoreList + expectedList fwk.NodeScoreList args config.NodeAffinityArgs runPreScore bool wantPreScoreStatus *fwk.Status @@ -1029,7 +1029,7 @@ func TestNodeAffinityPriority(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: label2}}, {ObjectMeta: metav1.ObjectMeta{Name: "node3", Labels: label3}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: 0}, {Name: "node3", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: 0}, {Name: "node3", Score: 0}}, }, { // PreScore returns Skip. @@ -1090,7 +1090,7 @@ func TestNodeAffinityPriority(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: label2}}, {ObjectMeta: metav1.ObjectMeta{Name: "node3", Labels: label3}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: 0}, {Name: "node3", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: 0}, {Name: "node3", Score: 0}}, runPreScore: true, }, { @@ -1105,7 +1105,7 @@ func TestNodeAffinityPriority(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: label2}}, {ObjectMeta: metav1.ObjectMeta{Name: "node3", Labels: label3}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: 0}, {Name: "node3", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: 0}, {Name: "node3", Score: 0}}, runPreScore: true, }, { @@ -1120,7 +1120,7 @@ func TestNodeAffinityPriority(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node5", Labels: label5}}, {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: label2}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 18}, {Name: "node5", Score: framework.MaxNodeScore}, {Name: "node2", Score: 36}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 18}, {Name: "node5", Score: fwk.MaxNodeScore}, {Name: "node2", Score: 36}}, runPreScore: true, }, { @@ -1130,7 +1130,7 @@ func TestNodeAffinityPriority(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node1", Labels: label1}}, {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: label2}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: 0}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: 0}}, args: config.NodeAffinityArgs{ AddedAffinity: affinity1.NodeAffinity, }, @@ -1148,7 +1148,7 @@ func TestNodeAffinityPriority(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: label2}}, {ObjectMeta: metav1.ObjectMeta{Name: "node3", Labels: label5}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 40}, {Name: "node2", Score: 60}, {Name: "node3", Score: framework.MaxNodeScore}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 40}, {Name: "node2", Score: 60}, {Name: "node3", Score: fwk.MaxNodeScore}}, args: config.NodeAffinityArgs{ AddedAffinity: &v1.NodeAffinity{ PreferredDuringSchedulingIgnoredDuringExecution: []v1.PreferredSchedulingTerm{ @@ -1181,7 +1181,7 @@ func TestNodeAffinityPriority(t *testing.T) { {ObjectMeta: metav1.ObjectMeta{Name: "node5", Labels: label5}}, {ObjectMeta: metav1.ObjectMeta{Name: "node2", Labels: label2}}, }, - expectedList: []framework.NodeScore{{Name: "node1", Score: 18}, {Name: "node5", Score: framework.MaxNodeScore}, {Name: "node2", Score: 36}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 18}, {Name: "node5", Score: fwk.MaxNodeScore}, {Name: "node2", Score: 36}}, }, } @@ -1199,7 +1199,7 @@ func TestNodeAffinityPriority(t *testing.T) { } var status *fwk.Status if test.runPreScore { - status = p.(framework.PreScorePlugin).PreScore(ctx, state, test.pod, tf.BuildNodeInfos(test.nodes)) + status = p.(fwk.PreScorePlugin).PreScore(ctx, state, test.pod, tf.BuildNodeInfos(test.nodes)) if status.Code() != test.wantPreScoreStatus.Code() { t.Errorf("unexpected status code from PreScore: want: %v got: %v", test.wantPreScoreStatus.Code().String(), status.Code().String()) } @@ -1211,18 +1211,18 @@ func TestNodeAffinityPriority(t *testing.T) { return } } - var gotList framework.NodeScoreList + var gotList fwk.NodeScoreList nodeInfos := tf.BuildNodeInfos(test.nodes) for _, nodeInfo := range nodeInfos { nodeName := nodeInfo.Node().Name - score, status := p.(framework.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) + score, status := p.(fwk.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) if !status.IsSuccess() { t.Errorf("unexpected error: %v", status) } - gotList = append(gotList, framework.NodeScore{Name: nodeName, Score: score}) + gotList = append(gotList, fwk.NodeScore{Name: nodeName, Score: score}) } - status = p.(framework.ScorePlugin).ScoreExtensions().NormalizeScore(ctx, state, test.pod, gotList) + status = p.(fwk.ScorePlugin).ScoreExtensions().NormalizeScore(ctx, state, test.pod, gotList) if !status.IsSuccess() { t.Errorf("unexpected error: %v", status) } diff --git a/pkg/scheduler/framework/plugins/nodename/node_name.go b/pkg/scheduler/framework/plugins/nodename/node_name.go index 4ae46e36bb94a..7edb1094669cc 100644 --- a/pkg/scheduler/framework/plugins/nodename/node_name.go +++ b/pkg/scheduler/framework/plugins/nodename/node_name.go @@ -22,7 +22,6 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" ) @@ -32,8 +31,8 @@ type NodeName struct { enableSchedulingQueueHint bool } -var _ framework.FilterPlugin = &NodeName{} -var _ framework.EnqueueExtensions = &NodeName{} +var _ fwk.FilterPlugin = &NodeName{} +var _ fwk.EnqueueExtensions = &NodeName{} const ( // Name is the name of the plugin used in the plugin registry and configurations. @@ -83,7 +82,7 @@ func Fits(pod *v1.Pod, nodeInfo fwk.NodeInfo) bool { } // New initializes a new plugin and returns it. -func New(_ context.Context, _ runtime.Object, _ framework.Handle, fts feature.Features) (framework.Plugin, error) { +func New(_ context.Context, _ runtime.Object, _ fwk.Handle, fts feature.Features) (fwk.Plugin, error) { return &NodeName{ enableSchedulingQueueHint: fts.EnableSchedulingQueueHint, }, nil diff --git a/pkg/scheduler/framework/plugins/nodename/node_name_test.go b/pkg/scheduler/framework/plugins/nodename/node_name_test.go index c3dafd7ac7981..989a19171c175 100644 --- a/pkg/scheduler/framework/plugins/nodename/node_name_test.go +++ b/pkg/scheduler/framework/plugins/nodename/node_name_test.go @@ -63,7 +63,7 @@ func TestNodeName(t *testing.T) { if err != nil { t.Fatalf("creating plugin: %v", err) } - gotStatus := p.(framework.FilterPlugin).Filter(ctx, nil, test.pod, nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, nil, test.pod, nodeInfo) if diff := cmp.Diff(test.wantStatus, gotStatus); diff != "" { t.Errorf("status does not match (-want,+got):\n%s", diff) } diff --git a/pkg/scheduler/framework/plugins/nodeports/node_ports.go b/pkg/scheduler/framework/plugins/nodeports/node_ports.go index 3566bfab0c9c7..40bdaf7d613e6 100644 --- a/pkg/scheduler/framework/plugins/nodeports/node_ports.go +++ b/pkg/scheduler/framework/plugins/nodeports/node_ports.go @@ -24,7 +24,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/klog/v2" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" "k8s.io/kubernetes/pkg/scheduler/util" @@ -35,9 +34,9 @@ type NodePorts struct { enableSchedulingQueueHint bool } -var _ framework.PreFilterPlugin = &NodePorts{} -var _ framework.FilterPlugin = &NodePorts{} -var _ framework.EnqueueExtensions = &NodePorts{} +var _ fwk.PreFilterPlugin = &NodePorts{} +var _ fwk.FilterPlugin = &NodePorts{} +var _ fwk.EnqueueExtensions = &NodePorts{} const ( // Name is the name of the plugin used in the plugin registry and configurations. @@ -65,7 +64,7 @@ func (pl *NodePorts) Name() string { } // PreFilter invoked at the prefilter extension point. -func (pl *NodePorts) PreFilter(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (pl *NodePorts) PreFilter(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { s := util.GetHostPorts(pod) // Skip if a pod has no ports. if len(s) == 0 { @@ -76,7 +75,7 @@ func (pl *NodePorts) PreFilter(ctx context.Context, cycleState fwk.CycleState, p } // PreFilterExtensions do not exist for this plugin. -func (pl *NodePorts) PreFilterExtensions() framework.PreFilterExtensions { +func (pl *NodePorts) PreFilterExtensions() fwk.PreFilterExtensions { return nil } @@ -136,15 +135,13 @@ func (pl *NodePorts) isSchedulableAfterPodDeleted(logger klog.Logger, pod *v1.Po return fwk.QueueSkip, nil } - // Construct a fake NodeInfo that only has the deleted Pod. - // If we can schedule `pod` to this fake node, it means that `pod` and the deleted pod don't have any common port(s). + // Verify that `pod` and the deleted pod don't have any common port(s). // So, deleting that pod couldn't make `pod` schedulable. - usedPorts := make(fwk.HostPortInfo, len(ports)) + portsInUse := make(fwk.HostPortInfo, len(ports)) for _, p := range ports { - usedPorts.Add(p.HostIP, string(p.Protocol), p.HostPort) + portsInUse.Add(p.HostIP, string(p.Protocol), p.HostPort) } - nodeInfo := framework.NodeInfo{UsedPorts: usedPorts} - if Fits(pod, &nodeInfo) { + if fitsPorts(util.GetHostPorts(pod), portsInUse) { logger.V(4).Info("the deleted pod and the target pod don't have any common port(s), returning QueueSkip as deleting this Pod won't make the Pod schedulable", "pod", klog.KObj(pod), "deletedPod", klog.KObj(deletedPod)) return fwk.QueueSkip, nil } @@ -160,7 +157,7 @@ func (pl *NodePorts) Filter(ctx context.Context, cycleState fwk.CycleState, pod return fwk.AsStatus(err) } - fits := fitsPorts(wantPorts, nodeInfo) + fits := fitsPorts(wantPorts, nodeInfo.GetUsedPorts()) if !fits { return fwk.NewStatus(fwk.Unschedulable, ErrReason) } @@ -168,16 +165,16 @@ func (pl *NodePorts) Filter(ctx context.Context, cycleState fwk.CycleState, pod return nil } -// Fits checks if the pod fits the node. +// Fits checks if the pod has any ports conflicting with nodeInfo's ports. +// It returns true if there are no conflicts (which means that pod fits the node), otherwise false. func Fits(pod *v1.Pod, nodeInfo fwk.NodeInfo) bool { - return fitsPorts(util.GetHostPorts(pod), nodeInfo) + return fitsPorts(util.GetHostPorts(pod), nodeInfo.GetUsedPorts()) } -func fitsPorts(wantPorts []v1.ContainerPort, nodeInfo fwk.NodeInfo) bool { - // try to see whether existingPorts and wantPorts will conflict or not - existingPorts := nodeInfo.GetUsedPorts() +func fitsPorts(wantPorts []v1.ContainerPort, portsInUse fwk.HostPortInfo) bool { + // try to see whether portsInUse and wantPorts will conflict or not for _, cp := range wantPorts { - if existingPorts.CheckConflict(cp.HostIP, string(cp.Protocol), cp.HostPort) { + if portsInUse.CheckConflict(cp.HostIP, string(cp.Protocol), cp.HostPort) { return false } } @@ -185,7 +182,7 @@ func fitsPorts(wantPorts []v1.ContainerPort, nodeInfo fwk.NodeInfo) bool { } // New initializes a new plugin and returns it. -func New(_ context.Context, _ runtime.Object, _ framework.Handle, fts feature.Features) (framework.Plugin, error) { +func New(_ context.Context, _ runtime.Object, _ fwk.Handle, fts feature.Features) (fwk.Plugin, error) { return &NodePorts{ enableSchedulingQueueHint: fts.EnableSchedulingQueueHint, }, nil diff --git a/pkg/scheduler/framework/plugins/nodeports/node_ports_test.go b/pkg/scheduler/framework/plugins/nodeports/node_ports_test.go index e31a365eb0122..639647b4adeee 100644 --- a/pkg/scheduler/framework/plugins/nodeports/node_ports_test.go +++ b/pkg/scheduler/framework/plugins/nodeports/node_ports_test.go @@ -48,6 +48,10 @@ func newPod(host string, hostPortInfos ...string) *v1.Pod { return st.MakePod().Node(host).ContainerPort(networkPorts).Obj() } +func newNodeInfo(hostPortInfos ...string) fwk.NodeInfo { + return framework.NewNodeInfo(newPod("p1", hostPortInfos...)) +} + func TestNodePorts(t *testing.T) { tests := []struct { pod *v1.Pod @@ -180,7 +184,7 @@ func TestNodePorts(t *testing.T) { t.Fatalf("creating plugin: %v", err) } cycleState := framework.NewCycleState() - _, preFilterStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) + _, preFilterStatus := p.(fwk.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) if diff := cmp.Diff(test.wantPreFilterStatus, preFilterStatus); diff != "" { t.Errorf("preFilter status does not match (-want,+got): %s", diff) } @@ -190,7 +194,7 @@ func TestNodePorts(t *testing.T) { if !preFilterStatus.IsSuccess() { t.Errorf("prefilter failed with status: %v", preFilterStatus) } - gotStatus := p.(framework.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) if diff := cmp.Diff(test.wantFilterStatus, gotStatus); diff != "" { t.Errorf("filter status does not match (-want, +got): %s", diff) } @@ -209,7 +213,7 @@ func TestPreFilterDisabled(t *testing.T) { t.Fatalf("creating plugin: %v", err) } cycleState := framework.NewCycleState() - gotStatus := p.(framework.FilterPlugin).Filter(ctx, cycleState, pod, nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, cycleState, pod, nodeInfo) wantStatus := fwk.AsStatus(fwk.ErrNotFound) if diff := cmp.Diff(wantStatus, gotStatus); diff != "" { t.Errorf("status does not match (-want,+got):\n%s", diff) @@ -270,3 +274,67 @@ func Test_isSchedulableAfterPodDeleted(t *testing.T) { }) } } + +// This test is similar to TestHostPortInfo_Check in k8s.io/kube-scheduler/framework/types_test.go, +// but it tests a smaller set of cases. We could consider using a fake HostPortInfo to verify the logic +// of Fits, instead of the logic of CheckConflict. +func TestFits(t *testing.T) { + tests := []struct { + desc string + pod *v1.Pod + existing fwk.NodeInfo + expect bool + }{ + { + desc: "non-conflicting ports", + pod: newPod("p", "TCP/127.0.0.1/80"), + existing: newNodeInfo("TCP/127.0.0.1/9090"), + expect: true, + }, + { + desc: "multiple non-conflicting ports", + pod: newPod("p", + "TCP/127.0.0.1/80", + "TCP/127.0.1.1/80", + "TCP/127.0.1.1/90", + "TCP/127.0.1.1/100"), + existing: newNodeInfo( + "TCP/127.0.0.1/9090", + "TCP/127.0.0.1/9191", + "TCP/127.0.1.1/8080"), + expect: true, + }, + { + desc: "same ports on different protocols", + pod: newPod("m1", "TCP/127.0.0.1/80"), + existing: newNodeInfo("UDP/127.0.0.1/80"), + expect: true, + }, + { + desc: "conflicting ports", + pod: newPod("m1", "TCP/127.0.0.1/80"), + existing: newNodeInfo("TCP/127.0.0.1/80"), + expect: false, + }, + { + desc: "multiple ports, some conflicting", + pod: newPod("p", + "TCP/127.0.0.1/80", + "TCP/127.0.1.1/80", + "TCP/127.0.1.1/90", + "TCP/127.0.1.1/100"), + existing: newNodeInfo( + "TCP/127.0.0.1/9090", + "TCP/127.0.1.1/90", + "TCP/127.0.1.1/8080"), + expect: false, + }, + } + for _, test := range tests { + t.Run(test.desc, func(t *testing.T) { + if Fits(test.pod, test.existing) != test.expect { + t.Errorf("expected %t; got %t", test.expect, !test.expect) + } + }) + } +} diff --git a/pkg/scheduler/framework/plugins/noderesources/balanced_allocation.go b/pkg/scheduler/framework/plugins/noderesources/balanced_allocation.go index bcde0f655f9de..8371a0a36f271 100644 --- a/pkg/scheduler/framework/plugins/noderesources/balanced_allocation.go +++ b/pkg/scheduler/framework/plugins/noderesources/balanced_allocation.go @@ -26,7 +26,6 @@ import ( fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" ) @@ -34,12 +33,12 @@ import ( // BalancedAllocation is a score plugin that calculates the difference between the cpu and memory fraction // of capacity, and prioritizes the host based on how close the two metrics are to each other. type BalancedAllocation struct { - handle framework.Handle + handle fwk.Handle resourceAllocationScorer } -var _ framework.PreScorePlugin = &BalancedAllocation{} -var _ framework.ScorePlugin = &BalancedAllocation{} +var _ fwk.PreScorePlugin = &BalancedAllocation{} +var _ fwk.ScorePlugin = &BalancedAllocation{} // BalancedAllocationName is the name of the plugin used in the plugin registry and configurations. const ( @@ -115,12 +114,12 @@ func (ba *BalancedAllocation) Score(ctx context.Context, state fwk.CycleState, p } // ScoreExtensions of the Score plugin. -func (ba *BalancedAllocation) ScoreExtensions() framework.ScoreExtensions { +func (ba *BalancedAllocation) ScoreExtensions() fwk.ScoreExtensions { return nil } // NewBalancedAllocation initializes a new plugin and returns it. -func NewBalancedAllocation(_ context.Context, baArgs runtime.Object, h framework.Handle, fts feature.Features) (framework.Plugin, error) { +func NewBalancedAllocation(_ context.Context, baArgs runtime.Object, h fwk.Handle, fts feature.Features) (fwk.Plugin, error) { args, ok := baArgs.(*config.NodeResourcesBalancedAllocationArgs) if !ok { return nil, fmt.Errorf("want args to be of type NodeResourcesBalancedAllocationArgs, got %T", baArgs) @@ -176,5 +175,5 @@ func balancedResourceScorer(requested, allocable []int64) int64 { // STD (standard deviation) is always a positive value. 1-deviation lets the score to be higher for node which has least deviation and // multiplying it with `MaxNodeScore` provides the scaling factor needed. - return int64((1 - std) * float64(framework.MaxNodeScore)) + return int64((1 - std) * float64(fwk.MaxNodeScore)) } diff --git a/pkg/scheduler/framework/plugins/noderesources/balanced_allocation_test.go b/pkg/scheduler/framework/plugins/noderesources/balanced_allocation_test.go index 2155685cb3dc7..998c68f711765 100644 --- a/pkg/scheduler/framework/plugins/noderesources/balanced_allocation_test.go +++ b/pkg/scheduler/framework/plugins/noderesources/balanced_allocation_test.go @@ -114,7 +114,7 @@ func TestNodeResourcesBalancedAllocation(t *testing.T) { pod *v1.Pod pods []*v1.Pod nodes []*v1.Node - expectedList framework.NodeScoreList + expectedList fwk.NodeScoreList name string args config.NodeResourcesBalancedAllocationArgs runPreScore bool @@ -142,7 +142,7 @@ func TestNodeResourcesBalancedAllocation(t *testing.T) { // Node2 Score: (1-0) * MaxNodeScore = MaxNodeScore pod: &v1.Pod{Spec: cpuAndMemory}, nodes: []*v1.Node{makeNode("node1", 4000, 10000, nil), makeNode("node2", 6000, 10000, nil)}, - expectedList: []framework.NodeScore{{Name: "node1", Score: 87}, {Name: "node2", Score: framework.MaxNodeScore}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 87}, {Name: "node2", Score: fwk.MaxNodeScore}}, name: "nothing scheduled, resources requested, differently sized nodes", args: config.NodeResourcesBalancedAllocationArgs{Resources: defaultResourceBalancedAllocationSet}, runPreScore: true, @@ -160,7 +160,7 @@ func TestNodeResourcesBalancedAllocation(t *testing.T) { // Node2 Score: (1 - 0.05)*MaxNodeScore = 95 pod: &v1.Pod{Spec: cpuAndMemory}, nodes: []*v1.Node{makeNode("node1", 10000, 20000, nil), makeNode("node2", 10000, 20000, nil)}, - expectedList: []framework.NodeScore{{Name: "node1", Score: 82}, {Name: "node2", Score: 95}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 82}, {Name: "node2", Score: 95}}, name: "resources requested, pods scheduled with resources", pods: []*v1.Pod{ {Spec: cpuOnly}, @@ -182,7 +182,7 @@ func TestNodeResourcesBalancedAllocation(t *testing.T) { // Node2 Score: (1 - 0.2)*MaxNodeScore = 80 pod: &v1.Pod{Spec: cpuAndMemory}, nodes: []*v1.Node{makeNode("node1", 10000, 20000, nil), makeNode("node2", 10000, 50000, nil)}, - expectedList: []framework.NodeScore{{Name: "node1", Score: 82}, {Name: "node2", Score: 80}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 82}, {Name: "node2", Score: 80}}, name: "resources requested, pods scheduled with resources, differently sized nodes", pods: []*v1.Pod{ {Spec: cpuOnly}, @@ -205,7 +205,7 @@ func TestNodeResourcesBalancedAllocation(t *testing.T) { // Node2 Score: (1 - 0.25)*MaxNodeScore = 75 pod: &v1.Pod{Spec: cpuOnly}, nodes: []*v1.Node{makeNode("node1", 6000, 10000, nil), makeNode("node2", 6000, 10000, nil)}, - expectedList: []framework.NodeScore{{Name: "node1", Score: 50}, {Name: "node2", Score: 75}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 50}, {Name: "node2", Score: 75}}, name: "requested resources at node capacity", pods: []*v1.Pod{ {Spec: cpuOnly}, @@ -232,7 +232,7 @@ func TestNodeResourcesBalancedAllocation(t *testing.T) { "nvidia.com/gpu": "1", }).Obj(), nodes: []*v1.Node{makeNode("node1", 3500, 40000, scalarResource), makeNode("node2", 3500, 40000, scalarResource)}, - expectedList: []framework.NodeScore{{Name: "node1", Score: 70}, {Name: "node2", Score: 65}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 70}, {Name: "node2", Score: 65}}, name: "include scalar resource on a node for balanced resource allocation", pods: []*v1.Pod{ {Spec: cpuAndMemory}, @@ -259,7 +259,7 @@ func TestNodeResourcesBalancedAllocation(t *testing.T) { { pod: &v1.Pod{Spec: cpuAndMemory}, nodes: []*v1.Node{makeNode("node1", 3500, 40000, scalarResource), makeNode("node2", 3500, 40000, nil)}, - expectedList: []framework.NodeScore{{Name: "node1", Score: 63}, {Name: "node2", Score: 63}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 63}, {Name: "node2", Score: 63}}, name: "node without the scalar resource should skip the scalar resource", pods: []*v1.Pod{}, args: config.NodeResourcesBalancedAllocationArgs{Resources: []config.ResourceSpec{ @@ -282,7 +282,7 @@ func TestNodeResourcesBalancedAllocation(t *testing.T) { // Node2 Score: (1 - 0.05)*MaxNodeScore = 95 pod: &v1.Pod{Spec: cpuAndMemory}, nodes: []*v1.Node{makeNode("node1", 10000, 20000, nil), makeNode("node2", 10000, 20000, nil)}, - expectedList: []framework.NodeScore{{Name: "node1", Score: 82}, {Name: "node2", Score: 95}}, + expectedList: []fwk.NodeScore{{Name: "node1", Score: 82}, {Name: "node2", Score: 95}}, name: "resources requested, pods scheduled with resources if PreScore not called", pods: []*v1.Pod{ {Spec: cpuOnly}, @@ -303,7 +303,7 @@ func TestNodeResourcesBalancedAllocation(t *testing.T) { p, _ := NewBalancedAllocation(ctx, &test.args, fh, feature.Features{}) state := framework.NewCycleState() if test.runPreScore { - status := p.(framework.PreScorePlugin).PreScore(ctx, state, test.pod, tf.BuildNodeInfos(test.nodes)) + status := p.(fwk.PreScorePlugin).PreScore(ctx, state, test.pod, tf.BuildNodeInfos(test.nodes)) if status.Code() != test.wantPreScoreStatusCode { t.Errorf("unexpected status code, want: %v, got: %v", test.wantPreScoreStatusCode, status.Code()) } @@ -317,7 +317,7 @@ func TestNodeResourcesBalancedAllocation(t *testing.T) { if err != nil { t.Errorf("failed to get node %q from snapshot: %v", test.nodes[i].Name, err) } - hostResult, status := p.(framework.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) + hostResult, status := p.(fwk.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) if !status.IsSuccess() { t.Errorf("Score is expected to return success, but didn't. Got status: %v", status) } diff --git a/pkg/scheduler/framework/plugins/noderesources/fit.go b/pkg/scheduler/framework/plugins/noderesources/fit.go index 1159a8d8b2ccc..2abaac92232fd 100644 --- a/pkg/scheduler/framework/plugins/noderesources/fit.go +++ b/pkg/scheduler/framework/plugins/noderesources/fit.go @@ -38,11 +38,11 @@ import ( schedutil "k8s.io/kubernetes/pkg/scheduler/util" ) -var _ framework.PreFilterPlugin = &Fit{} -var _ framework.FilterPlugin = &Fit{} -var _ framework.EnqueueExtensions = &Fit{} -var _ framework.PreScorePlugin = &Fit{} -var _ framework.ScorePlugin = &Fit{} +var _ fwk.PreFilterPlugin = &Fit{} +var _ fwk.FilterPlugin = &Fit{} +var _ fwk.EnqueueExtensions = &Fit{} +var _ fwk.PreScorePlugin = &Fit{} +var _ fwk.ScorePlugin = &Fit{} const ( // Name is the name of the plugin used in the plugin registry and configurations. @@ -93,12 +93,12 @@ type Fit struct { enableSchedulingQueueHint bool enablePodLevelResources bool enableDRAExtendedResource bool - handle framework.Handle + handle fwk.Handle resourceAllocationScorer } // ScoreExtensions of the Score plugin. -func (f *Fit) ScoreExtensions() framework.ScoreExtensions { +func (f *Fit) ScoreExtensions() fwk.ScoreExtensions { return nil } @@ -155,7 +155,7 @@ func (f *Fit) Name() string { } // NewFit initializes a new plugin and returns it. -func NewFit(_ context.Context, plArgs runtime.Object, h framework.Handle, fts feature.Features) (framework.Plugin, error) { +func NewFit(_ context.Context, plArgs runtime.Object, h fwk.Handle, fts feature.Features) (fwk.Plugin, error) { args, ok := plArgs.(*config.NodeResourcesFitArgs) if !ok { return nil, fmt.Errorf("want args to be of type NodeResourcesFitArgs, got %T", plArgs) @@ -233,7 +233,7 @@ func computePodResourceRequest(pod *v1.Pod, opts ResourceRequestsOptions) *preFi } // withDeviceClass adds resource to device class mapping to preFilterState. -func withDeviceClass(result *preFilterState, draManager framework.SharedDRAManager) *fwk.Status { +func withDeviceClass(result *preFilterState, draManager fwk.SharedDRAManager) *fwk.Status { hasExtendedResource := false for rName, rQuant := range result.ScalarResources { // Skip in case request quantity is zero @@ -241,7 +241,7 @@ func withDeviceClass(result *preFilterState, draManager framework.SharedDRAManag continue } - if v1helper.IsExtendedResourceName(rName) { + if schedutil.IsDRAExtendedResourceName(rName) { hasExtendedResource = true break } @@ -261,7 +261,7 @@ func withDeviceClass(result *preFilterState, draManager framework.SharedDRAManag } // PreFilter invoked at the prefilter extension point. -func (f *Fit) PreFilter(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (f *Fit) PreFilter(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { if !f.enableSidecarContainers && hasRestartableInitContainer(pod) { // Scheduler will calculate resources usage for a Pod containing // restartable init containers that will be equal or more than kubelet will @@ -282,7 +282,7 @@ func (f *Fit) PreFilter(ctx context.Context, cycleState fwk.CycleState, pod *v1. } // PreFilterExtensions returns prefilter extensions, pod add and remove. -func (f *Fit) PreFilterExtensions() framework.PreFilterExtensions { +func (f *Fit) PreFilterExtensions() fwk.PreFilterExtensions { return nil } diff --git a/pkg/scheduler/framework/plugins/noderesources/fit_test.go b/pkg/scheduler/framework/plugins/noderesources/fit_test.go index cc5583d0e72a0..9c819f52fb23d 100644 --- a/pkg/scheduler/framework/plugins/noderesources/fit_test.go +++ b/pkg/scheduler/framework/plugins/noderesources/fit_test.go @@ -711,12 +711,12 @@ func TestEnoughRequests(t *testing.T) { t.Fatal(err) } cycleState := framework.NewCycleState() - _, preFilterStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) + _, preFilterStatus := p.(fwk.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) if !preFilterStatus.IsSuccess() { t.Errorf("prefilter failed with status: %v", preFilterStatus) } - gotStatus := p.(framework.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) if diff := cmp.Diff(test.wantStatus, gotStatus); diff != "" { t.Errorf("status does not match (-want,+got):\n%s", diff) } @@ -747,7 +747,7 @@ func TestPreFilterDisabled(t *testing.T) { t.Fatal(err) } cycleState := framework.NewCycleState() - gotStatus := p.(framework.FilterPlugin).Filter(ctx, cycleState, pod, nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, cycleState, pod, nodeInfo) wantStatus := fwk.AsStatus(fwk.ErrNotFound) if diff := cmp.Diff(wantStatus, gotStatus); diff != "" { t.Errorf("status does not match (-want,+got):\n%s", diff) @@ -800,12 +800,12 @@ func TestNotEnoughRequests(t *testing.T) { t.Fatal(err) } cycleState := framework.NewCycleState() - _, preFilterStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) + _, preFilterStatus := p.(fwk.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) if !preFilterStatus.IsSuccess() { t.Errorf("prefilter failed with status: %v", preFilterStatus) } - gotStatus := p.(framework.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) if diff := cmp.Diff(test.wantStatus, gotStatus); diff != "" { t.Errorf("status does not match (-want,+got):\n%s", diff) } @@ -861,12 +861,12 @@ func TestStorageRequests(t *testing.T) { t.Fatal(err) } cycleState := framework.NewCycleState() - _, preFilterStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) + _, preFilterStatus := p.(fwk.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) if !preFilterStatus.IsSuccess() { t.Errorf("prefilter failed with status: %v", preFilterStatus) } - gotStatus := p.(framework.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) if diff := cmp.Diff(test.wantStatus, gotStatus); diff != "" { t.Errorf("status does not match (-want,+got):\n%s", diff) } @@ -971,7 +971,7 @@ func TestRestartableInitContainers(t *testing.T) { t.Fatal(err) } cycleState := framework.NewCycleState() - _, preFilterStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) + _, preFilterStatus := p.(fwk.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) if diff := cmp.Diff(test.wantPreFilterStatus, preFilterStatus); diff != "" { t.Error("prefilter status does not match (-expected +actual):\n", diff) } @@ -979,7 +979,7 @@ func TestRestartableInitContainers(t *testing.T) { return } - filterStatus := p.(framework.FilterPlugin).Filter(ctx, cycleState, test.pod, nodeInfo) + filterStatus := p.(fwk.FilterPlugin).Filter(ctx, cycleState, test.pod, nodeInfo) if diff := cmp.Diff(test.wantFilterStatus, filterStatus); diff != "" { t.Error("filter status does not match (-expected +actual):\n", diff) } @@ -994,7 +994,7 @@ func TestFitScore(t *testing.T) { requestedPod *v1.Pod nodes []*v1.Node existingPods []*v1.Pod - expectedPriorities framework.NodeScoreList + expectedPriorities fwk.NodeScoreList nodeResourcesFitArgs config.NodeResourcesFitArgs runPreScore bool }{ @@ -1011,7 +1011,7 @@ func TestFitScore(t *testing.T) { st.MakePod().Node("node1").Req(map[v1.ResourceName]string{"cpu": "2000", "memory": "4000"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "1000", "memory": "2000"}).Obj(), }, - expectedPriorities: []framework.NodeScore{{Name: "node1", Score: 10}, {Name: "node2", Score: 32}}, + expectedPriorities: []fwk.NodeScore{{Name: "node1", Score: 10}, {Name: "node2", Score: 32}}, nodeResourcesFitArgs: config.NodeResourcesFitArgs{ ScoringStrategy: &config.ScoringStrategy{ Type: config.RequestedToCapacityRatio, @@ -1039,7 +1039,7 @@ func TestFitScore(t *testing.T) { st.MakePod().Node("node1").Req(map[v1.ResourceName]string{"cpu": "2000", "memory": "4000"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "1000", "memory": "2000"}).Obj(), }, - expectedPriorities: []framework.NodeScore{{Name: "node1", Score: 95}, {Name: "node2", Score: 68}}, + expectedPriorities: []fwk.NodeScore{{Name: "node1", Score: 95}, {Name: "node2", Score: 68}}, nodeResourcesFitArgs: config.NodeResourcesFitArgs{ ScoringStrategy: &config.ScoringStrategy{ Type: config.RequestedToCapacityRatio, @@ -1067,7 +1067,7 @@ func TestFitScore(t *testing.T) { st.MakePod().Node("node1").Req(map[v1.ResourceName]string{"cpu": "2000", "memory": "4000"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "1000", "memory": "2000"}).Obj(), }, - expectedPriorities: []framework.NodeScore{{Name: "node1", Score: 67}, {Name: "node2", Score: 36}}, + expectedPriorities: []fwk.NodeScore{{Name: "node1", Score: 67}, {Name: "node2", Score: 36}}, nodeResourcesFitArgs: config.NodeResourcesFitArgs{ ScoringStrategy: &config.ScoringStrategy{ Type: config.MostAllocated, @@ -1089,7 +1089,7 @@ func TestFitScore(t *testing.T) { st.MakePod().Node("node1").Req(map[v1.ResourceName]string{"cpu": "2000", "memory": "4000"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "1000", "memory": "2000"}).Obj(), }, - expectedPriorities: []framework.NodeScore{{Name: "node1", Score: 32}, {Name: "node2", Score: 63}}, + expectedPriorities: []fwk.NodeScore{{Name: "node1", Score: 32}, {Name: "node2", Score: 63}}, nodeResourcesFitArgs: config.NodeResourcesFitArgs{ ScoringStrategy: &config.ScoringStrategy{ Type: config.LeastAllocated, @@ -1111,7 +1111,7 @@ func TestFitScore(t *testing.T) { st.MakePod().Node("node1").Req(map[v1.ResourceName]string{"cpu": "2000", "memory": "4000"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "1000", "memory": "2000"}).Obj(), }, - expectedPriorities: []framework.NodeScore{{Name: "node1", Score: 10}, {Name: "node2", Score: 32}}, + expectedPriorities: []fwk.NodeScore{{Name: "node1", Score: 10}, {Name: "node2", Score: 32}}, nodeResourcesFitArgs: config.NodeResourcesFitArgs{ ScoringStrategy: &config.ScoringStrategy{ Type: config.RequestedToCapacityRatio, @@ -1139,7 +1139,7 @@ func TestFitScore(t *testing.T) { st.MakePod().Node("node1").Req(map[v1.ResourceName]string{"cpu": "2000", "memory": "4000"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "1000", "memory": "2000"}).Obj(), }, - expectedPriorities: []framework.NodeScore{{Name: "node1", Score: 67}, {Name: "node2", Score: 36}}, + expectedPriorities: []fwk.NodeScore{{Name: "node1", Score: 67}, {Name: "node2", Score: 36}}, nodeResourcesFitArgs: config.NodeResourcesFitArgs{ ScoringStrategy: &config.ScoringStrategy{ Type: config.MostAllocated, @@ -1161,7 +1161,7 @@ func TestFitScore(t *testing.T) { st.MakePod().Node("node1").Req(map[v1.ResourceName]string{"cpu": "2000", "memory": "4000"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "1000", "memory": "2000"}).Obj(), }, - expectedPriorities: []framework.NodeScore{{Name: "node1", Score: 32}, {Name: "node2", Score: 63}}, + expectedPriorities: []fwk.NodeScore{{Name: "node1", Score: 32}, {Name: "node2", Score: 63}}, nodeResourcesFitArgs: config.NodeResourcesFitArgs{ ScoringStrategy: &config.ScoringStrategy{ Type: config.LeastAllocated, @@ -1184,7 +1184,7 @@ func TestFitScore(t *testing.T) { SidecarReq(map[v1.ResourceName]string{"cpu": "1000", "memory": "2000"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "1000", "memory": "2000"}).Obj(), }, - expectedPriorities: []framework.NodeScore{{Name: "node1", Score: 67}, {Name: "node2", Score: 45}}, + expectedPriorities: []fwk.NodeScore{{Name: "node1", Score: 67}, {Name: "node2", Score: 45}}, nodeResourcesFitArgs: config.NodeResourcesFitArgs{ ScoringStrategy: &config.ScoringStrategy{ Type: config.MostAllocated, @@ -1207,7 +1207,7 @@ func TestFitScore(t *testing.T) { SidecarReq(map[v1.ResourceName]string{"cpu": "1000", "memory": "2000"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "1000", "memory": "2000"}).Obj(), }, - expectedPriorities: []framework.NodeScore{{Name: "node1", Score: 32}, {Name: "node2", Score: 55}}, + expectedPriorities: []fwk.NodeScore{{Name: "node1", Score: 32}, {Name: "node2", Score: 55}}, nodeResourcesFitArgs: config.NodeResourcesFitArgs{ ScoringStrategy: &config.ScoringStrategy{ Type: config.LeastAllocated, @@ -1233,10 +1233,10 @@ func TestFitScore(t *testing.T) { t.Fatalf("unexpected error: %v", err) } - var gotPriorities framework.NodeScoreList + var gotPriorities fwk.NodeScoreList for _, n := range test.nodes { if test.runPreScore { - status := p.(framework.PreScorePlugin).PreScore(ctx, state, test.requestedPod, tf.BuildNodeInfos(test.nodes)) + status := p.(fwk.PreScorePlugin).PreScore(ctx, state, test.requestedPod, tf.BuildNodeInfos(test.nodes)) if !status.IsSuccess() { t.Errorf("PreScore is expected to return success, but didn't. Got status: %v", status) } @@ -1245,11 +1245,11 @@ func TestFitScore(t *testing.T) { if err != nil { t.Errorf("failed to get node %q from snapshot: %v", n.Name, err) } - score, status := p.(framework.ScorePlugin).Score(ctx, state, test.requestedPod, nodeInfo) + score, status := p.(fwk.ScorePlugin).Score(ctx, state, test.requestedPod, nodeInfo) if !status.IsSuccess() { t.Errorf("Score is expected to return success, but didn't. Got status: %v", status) } - gotPriorities = append(gotPriorities, framework.NodeScore{Name: n.Name, Score: score}) + gotPriorities = append(gotPriorities, fwk.NodeScore{Name: n.Name, Score: score}) } if diff := cmp.Diff(test.expectedPriorities, gotPriorities); diff != "" { @@ -1908,3 +1908,63 @@ func TestHaveAnyRequestedResourcesIncreased(t *testing.T) { }) } } +func TestWithDeviceClass(t *testing.T) { + logger, ctx := ktesting.NewTestContext(t) + ctx, cancel := context.WithCancel(ctx) + defer cancel() + + client := fake.NewClientset(deviceClassWithExtendResourceName) + informerFactory := informers.NewSharedInformerFactory(client, 0) + draManager := dynamicresources.NewDRAManager(ctx, assumecache.NewAssumeCache(logger, informerFactory.Resource().V1().ResourceClaims().Informer(), "resource claim", "", nil), nil, informerFactory) + informerFactory.Start(ctx.Done()) + t.Cleanup(func() { + // Now we can wait for all goroutines to stop. + informerFactory.Shutdown() + }) + informerFactory.WaitForCacheSync(ctx.Done()) + + testCases := map[string]struct { + state *preFilterState + expectedResourceToDeviceClass map[v1.ResourceName]string + }{ + + "regular extended resource name": { + state: &preFilterState{ + Resource: framework.Resource{ + ScalarResources: map[v1.ResourceName]int64{extendedResourceA: 1}, + }, + }, + expectedResourceToDeviceClass: map[v1.ResourceName]string{ + v1.ResourceName("deviceclass.resource.kubernetes.io/device-class-name"): deviceClassName, + v1.ResourceName("extended.resource.dra.io/something"): deviceClassName, + }, + }, + "implicit extended resource name": { + state: &preFilterState{ + Resource: framework.Resource{ + ScalarResources: map[v1.ResourceName]int64{v1.ResourceName("deviceclass.resource.kubernetes.io/" + deviceClassName): 1}, + }, + }, + expectedResourceToDeviceClass: map[v1.ResourceName]string{ + v1.ResourceName("deviceclass.resource.kubernetes.io/device-class-name"): deviceClassName, + v1.ResourceName("extended.resource.dra.io/something"): deviceClassName, + }, + }, + "no extended resource name": { + state: &preFilterState{ + Resource: framework.Resource{ + MilliCPU: 1000, + }, + }, + expectedResourceToDeviceClass: nil, + }, + } + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + withDeviceClass(tc.state, draManager) + if diff := cmp.Diff(tc.state.resourceToDeviceClass, tc.expectedResourceToDeviceClass); diff != "" { + t.Error("resourceToDeviceClass doesn't match (-expected +actual):\n", diff) + } + }) + } +} diff --git a/pkg/scheduler/framework/plugins/noderesources/least_allocated.go b/pkg/scheduler/framework/plugins/noderesources/least_allocated.go index a19969e90de0e..20a456d9636d5 100644 --- a/pkg/scheduler/framework/plugins/noderesources/least_allocated.go +++ b/pkg/scheduler/framework/plugins/noderesources/least_allocated.go @@ -17,8 +17,8 @@ limitations under the License. package noderesources import ( + fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/apis/config" - "k8s.io/kubernetes/pkg/scheduler/framework" ) // leastResourceScorer favors nodes with fewer requested resources. @@ -57,5 +57,5 @@ func leastRequestedScore(requested, capacity int64) int64 { return 0 } - return ((capacity - requested) * framework.MaxNodeScore) / capacity + return ((capacity - requested) * fwk.MaxNodeScore) / capacity } diff --git a/pkg/scheduler/framework/plugins/noderesources/least_allocated_test.go b/pkg/scheduler/framework/plugins/noderesources/least_allocated_test.go index feced9a002fab..aa04ac4b7fa8e 100644 --- a/pkg/scheduler/framework/plugins/noderesources/least_allocated_test.go +++ b/pkg/scheduler/framework/plugins/noderesources/least_allocated_test.go @@ -41,7 +41,7 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { requestedPod *v1.Pod nodes []*v1.Node existingPods []*v1.Pod - expectedScores framework.NodeScoreList + expectedScores fwk.NodeScoreList resources []config.ResourceSpec wantErrs field.ErrorList wantStatusCode fwk.Code @@ -62,7 +62,7 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { st.MakeNode().Name("node2").Capacity(map[v1.ResourceName]string{"cpu": "4000", "memory": "10000"}).Obj(), }, existingPods: nil, - expectedScores: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: framework.MaxNodeScore}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: fwk.MaxNodeScore}}, resources: defaultResources, }, { @@ -84,7 +84,7 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { st.MakeNode().Name("node2").Capacity(map[v1.ResourceName]string{"cpu": "6000", "memory": "10000"}).Obj(), }, existingPods: nil, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 37}, {Name: "node2", Score: 50}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 37}, {Name: "node2", Score: 50}}, resources: defaultResources, }, { @@ -98,7 +98,7 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { st.MakeNode().Name("node2").Capacity(map[v1.ResourceName]string{"cpu": "6000", "memory": "10000"}).Obj(), }, existingPods: nil, - expectedScores: []framework.NodeScore{{Name: "node1", Score: framework.MinNodeScore}, {Name: "node2", Score: framework.MinNodeScore}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: fwk.MinNodeScore}, {Name: "node2", Score: fwk.MinNodeScore}}, resources: nil, wantStatusCode: fwk.Error, }, @@ -123,7 +123,7 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { st.MakePod().Node("node2").Obj(), st.MakePod().Node("node2").Obj(), }, - expectedScores: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: framework.MaxNodeScore}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: fwk.MaxNodeScore}}, resources: defaultResources, }, { @@ -147,7 +147,7 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "0"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "5000"}).Obj(), }, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 70}, {Name: "node2", Score: 57}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 70}, {Name: "node2", Score: 57}}, resources: defaultResources, }, { @@ -172,7 +172,7 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { st.MakePod().Node("node1").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "0"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "5000"}).Obj(), }, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 57}, {Name: "node2", Score: 45}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 57}, {Name: "node2", Score: 45}}, resources: defaultResources, }, { @@ -197,7 +197,7 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { st.MakePod().Node("node1").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "0"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "5000"}).Obj(), }, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 57}, {Name: "node2", Score: 60}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 57}, {Name: "node2", Score: 60}}, resources: defaultResources, }, { @@ -219,7 +219,7 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { st.MakePod().Node("node1").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "0"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "5000"}).Obj(), }, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 50}, {Name: "node2", Score: 25}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 50}, {Name: "node2", Score: 25}}, resources: defaultResources, }, { @@ -233,7 +233,7 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { st.MakePod().Node("node1").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "0"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "5000"}).Obj(), }, - expectedScores: []framework.NodeScore{{Name: "node1", Score: framework.MinNodeScore}, {Name: "node2", Score: framework.MinNodeScore}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: fwk.MinNodeScore}, {Name: "node2", Score: fwk.MinNodeScore}}, resources: defaultResources, }, { @@ -253,7 +253,7 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { st.MakeNode().Name("node2").Capacity(map[v1.ResourceName]string{"cpu": "6000", "memory": "10000"}).Obj(), }, existingPods: nil, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 41}, {Name: "node2", Score: 50}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 41}, {Name: "node2", Score: 50}}, resources: []config.ResourceSpec{ {Name: "memory", Weight: 2}, {Name: "cpu", Weight: 1}, @@ -291,7 +291,7 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { st.MakeNode().Name("node1").Capacity(map[v1.ResourceName]string{"cpu": "4000", "memory": "10000"}).Obj(), }, existingPods: nil, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 41}, {Name: "node2", Score: 50}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 41}, {Name: "node2", Score: 50}}, resources: []config.ResourceSpec{ {Name: "memory", Weight: 1}, {Name: "cpu", Weight: 0}, @@ -340,7 +340,7 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { st.MakeNode().Name("node1").Capacity(map[v1.ResourceName]string{"cpu": "6000", "memory": "10000"}).Obj(), st.MakeNode().Name("node2").Capacity(map[v1.ResourceName]string{"cpu": "6000", "memory": "10000", v1.ResourceName(extendedRes): "4"}).Obj(), }, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 50}, {Name: "node2", Score: 50}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 50}, {Name: "node2", Score: 50}}, resources: extendedResourceSet, }, { @@ -361,7 +361,7 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { st.MakeNode().Name("node2").Capacity(map[v1.ResourceName]string{"cpu": "6000", "memory": "10000", v1.ResourceName(extendedRes): "10"}).Obj(), }, existingPods: nil, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 50}, {Name: "node2", Score: 60}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 50}, {Name: "node2", Score: 60}}, resources: extendedResourceSet, }, { @@ -378,7 +378,7 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { st.MakeNode().Name("node1").Capacity(map[v1.ResourceName]string{"cpu": "6000", "memory": "10000"}).Obj(), st.MakeNode().Name("node2").Capacity(map[v1.ResourceName]string{"cpu": "6000", "memory": "10000", v1.ResourceName(extendedRes): "4"}).Obj(), }, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 55}, {Name: "node2", Score: 55}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 55}, {Name: "node2", Score: 55}}, resources: []config.ResourceSpec{ {Name: extendedRes, Weight: 2}, {Name: string(v1.ResourceCPU), Weight: 1}, @@ -413,22 +413,22 @@ func TestLeastAllocatedScoringStrategy(t *testing.T) { return } - status := p.(framework.PreScorePlugin).PreScore(ctx, state, test.requestedPod, tf.BuildNodeInfos(test.nodes)) + status := p.(fwk.PreScorePlugin).PreScore(ctx, state, test.requestedPod, tf.BuildNodeInfos(test.nodes)) if !status.IsSuccess() { t.Errorf("PreScore is expected to return success, but didn't. Got status: %v", status) } - var gotScores framework.NodeScoreList + var gotScores fwk.NodeScoreList for _, n := range test.nodes { nodeInfo, err := snapshot.Get(n.Name) if err != nil { t.Errorf("failed to get node %q from snapshot: %v", n.Name, err) } - score, status := p.(framework.ScorePlugin).Score(ctx, state, test.requestedPod, nodeInfo) + score, status := p.(fwk.ScorePlugin).Score(ctx, state, test.requestedPod, nodeInfo) if status.Code() != test.wantStatusCode { t.Errorf("unexpected status code, want: %v, got: %v", test.wantStatusCode, status.Code()) } - gotScores = append(gotScores, framework.NodeScore{Name: n.Name, Score: score}) + gotScores = append(gotScores, fwk.NodeScore{Name: n.Name, Score: score}) } if diff := cmp.Diff(test.expectedScores, gotScores); diff != "" { diff --git a/pkg/scheduler/framework/plugins/noderesources/most_allocated.go b/pkg/scheduler/framework/plugins/noderesources/most_allocated.go index 41425698835f2..3e694d1b22f2c 100644 --- a/pkg/scheduler/framework/plugins/noderesources/most_allocated.go +++ b/pkg/scheduler/framework/plugins/noderesources/most_allocated.go @@ -17,8 +17,8 @@ limitations under the License. package noderesources import ( + fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/apis/config" - "k8s.io/kubernetes/pkg/scheduler/framework" ) // mostResourceScorer favors nodes with most requested resources. @@ -61,5 +61,5 @@ func mostRequestedScore(requested, capacity int64) int64 { requested = capacity } - return (requested * framework.MaxNodeScore) / capacity + return (requested * fwk.MaxNodeScore) / capacity } diff --git a/pkg/scheduler/framework/plugins/noderesources/most_allocated_test.go b/pkg/scheduler/framework/plugins/noderesources/most_allocated_test.go index c5cb89918ec65..6e3e0a0c9e636 100644 --- a/pkg/scheduler/framework/plugins/noderesources/most_allocated_test.go +++ b/pkg/scheduler/framework/plugins/noderesources/most_allocated_test.go @@ -41,7 +41,7 @@ func TestMostAllocatedScoringStrategy(t *testing.T) { requestedPod *v1.Pod nodes []*v1.Node existingPods []*v1.Pod - expectedScores framework.NodeScoreList + expectedScores fwk.NodeScoreList resources []config.ResourceSpec wantErrs field.ErrorList wantStatusCode fwk.Code @@ -62,7 +62,7 @@ func TestMostAllocatedScoringStrategy(t *testing.T) { st.MakeNode().Name("node2").Capacity(map[v1.ResourceName]string{"cpu": "4000", "memory": "10000"}).Obj(), }, existingPods: nil, - expectedScores: []framework.NodeScore{{Name: "node1", Score: framework.MinNodeScore}, {Name: "node2", Score: framework.MinNodeScore}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: fwk.MinNodeScore}, {Name: "node2", Score: fwk.MinNodeScore}}, resources: defaultResources, }, { @@ -84,7 +84,7 @@ func TestMostAllocatedScoringStrategy(t *testing.T) { st.MakeNode().Name("node2").Capacity(map[v1.ResourceName]string{"cpu": "6000", "memory": "10000"}).Obj(), }, existingPods: nil, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 62}, {Name: "node2", Score: 50}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 62}, {Name: "node2", Score: 50}}, resources: defaultResources, }, { @@ -98,7 +98,7 @@ func TestMostAllocatedScoringStrategy(t *testing.T) { st.MakeNode().Name("node2").Capacity(map[v1.ResourceName]string{"cpu": "6000", "memory": "10000"}).Obj(), }, existingPods: nil, - expectedScores: []framework.NodeScore{{Name: "node1", Score: framework.MinNodeScore}, {Name: "node2", Score: framework.MinNodeScore}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: fwk.MinNodeScore}, {Name: "node2", Score: fwk.MinNodeScore}}, resources: nil, wantStatusCode: fwk.Error, }, @@ -123,7 +123,7 @@ func TestMostAllocatedScoringStrategy(t *testing.T) { st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "0"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "5000"}).Obj(), }, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 30}, {Name: "node2", Score: 42}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 30}, {Name: "node2", Score: 42}}, resources: defaultResources, }, { @@ -148,7 +148,7 @@ func TestMostAllocatedScoringStrategy(t *testing.T) { st.MakePod().Node("node1").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "0"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "5000"}).Obj(), }, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 42}, {Name: "node2", Score: 55}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 42}, {Name: "node2", Score: 55}}, resources: defaultResources, }, { @@ -170,7 +170,7 @@ func TestMostAllocatedScoringStrategy(t *testing.T) { st.MakeNode().Name("node2").Capacity(map[v1.ResourceName]string{"cpu": "10000", "memory": "9000"}).Obj(), }, existingPods: nil, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 95}, {Name: "node2", Score: 75}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 95}, {Name: "node2", Score: 75}}, resources: defaultResources, }, { @@ -190,7 +190,7 @@ func TestMostAllocatedScoringStrategy(t *testing.T) { st.MakeNode().Name("node2").Capacity(map[v1.ResourceName]string{"cpu": "6000", "memory": "10000"}).Obj(), }, existingPods: nil, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 58}, {Name: "node2", Score: 50}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 58}, {Name: "node2", Score: 50}}, resources: []config.ResourceSpec{ {Name: "memory", Weight: 2}, {Name: "cpu", Weight: 1}, @@ -215,7 +215,7 @@ func TestMostAllocatedScoringStrategy(t *testing.T) { st.MakePod().Node("node1").Container("container").Obj(), st.MakePod().Node("node1").Container("container").Obj(), }, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 80}, {Name: "node2", Score: 30}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 80}, {Name: "node2", Score: 30}}, resources: defaultResources, }, { @@ -298,7 +298,7 @@ func TestMostAllocatedScoringStrategy(t *testing.T) { }, resources: extendedResourceSet, existingPods: nil, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 50}, {Name: "node2", Score: 50}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 50}, {Name: "node2", Score: 50}}, }, { // Honor extended resource if the pod requests. @@ -319,7 +319,7 @@ func TestMostAllocatedScoringStrategy(t *testing.T) { }, resources: extendedResourceSet, existingPods: nil, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 50}, {Name: "node2", Score: 40}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 50}, {Name: "node2", Score: 40}}, }, { // If the node doesn't have a resource @@ -335,7 +335,7 @@ func TestMostAllocatedScoringStrategy(t *testing.T) { st.MakeNode().Name("node1").Capacity(map[v1.ResourceName]string{"cpu": "6000", "memory": "10000"}).Obj(), st.MakeNode().Name("node2").Capacity(map[v1.ResourceName]string{"cpu": "6000", "memory": "10000", v1.ResourceName(extendedRes): "4"}).Obj(), }, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 45}, {Name: "node2", Score: 45}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 45}, {Name: "node2", Score: 45}}, resources: []config.ResourceSpec{ {Name: extendedRes, Weight: 2}, {Name: string(v1.ResourceCPU), Weight: 1}, @@ -369,22 +369,22 @@ func TestMostAllocatedScoringStrategy(t *testing.T) { return } - status := p.(framework.PreScorePlugin).PreScore(ctx, state, test.requestedPod, tf.BuildNodeInfos(test.nodes)) + status := p.(fwk.PreScorePlugin).PreScore(ctx, state, test.requestedPod, tf.BuildNodeInfos(test.nodes)) if !status.IsSuccess() { t.Errorf("PreScore is expected to return success, but didn't. Got status: %v", status) } - var gotScores framework.NodeScoreList + var gotScores fwk.NodeScoreList for _, n := range test.nodes { nodeInfo, err := snapshot.Get(n.Name) if err != nil { t.Errorf("failed to get node %q from snapshot: %v", n.Name, err) } - score, status := p.(framework.ScorePlugin).Score(ctx, state, test.requestedPod, nodeInfo) + score, status := p.(fwk.ScorePlugin).Score(ctx, state, test.requestedPod, nodeInfo) if status.Code() != test.wantStatusCode { t.Errorf("unexpected status code, want: %v, got: %v", test.wantStatusCode, status.Code()) } - gotScores = append(gotScores, framework.NodeScore{Name: n.Name, Score: score}) + gotScores = append(gotScores, fwk.NodeScore{Name: n.Name, Score: score}) } if diff := cmp.Diff(test.expectedScores, gotScores); diff != "" { diff --git a/pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio.go b/pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio.go index df5e2ff4733e9..f6c7838be3e66 100644 --- a/pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio.go +++ b/pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio.go @@ -19,8 +19,8 @@ package noderesources import ( "math" + fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/apis/config" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" ) @@ -65,7 +65,7 @@ func requestedToCapacityRatioScorer(resources []config.ResourceSpec, shape []con // MaxCustomPriorityScore may diverge from the max score used in the scheduler and defined by MaxNodeScore, // therefore we need to scale the score returned by requested to capacity ratio to the score range // used by the scheduler. - Score: int64(point.Score) * (framework.MaxNodeScore / config.MaxCustomPriorityScore), + Score: int64(point.Score) * (fwk.MaxNodeScore / config.MaxCustomPriorityScore), }) } diff --git a/pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio_test.go b/pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio_test.go index b168811db1fce..20f3821e617c7 100644 --- a/pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio_test.go +++ b/pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio_test.go @@ -27,6 +27,7 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/klog/v2/ktesting" + fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/backend/cache" "k8s.io/kubernetes/pkg/scheduler/framework" @@ -48,7 +49,7 @@ func TestRequestedToCapacityRatioScoringStrategy(t *testing.T) { requestedPod *v1.Pod nodes []*v1.Node existingPods []*v1.Pod - expectedScores framework.NodeScoreList + expectedScores fwk.NodeScoreList resources []config.ResourceSpec shape []config.UtilizationShapePoint wantErrs field.ErrorList @@ -64,7 +65,7 @@ func TestRequestedToCapacityRatioScoringStrategy(t *testing.T) { st.MakePod().Node("node1").Obj(), st.MakePod().Node("node1").Obj(), }, - expectedScores: []framework.NodeScore{{Name: "node1", Score: framework.MaxNodeScore}, {Name: "node2", Score: framework.MaxNodeScore}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: fwk.MaxNodeScore}, {Name: "node2", Score: fwk.MaxNodeScore}}, resources: defaultResources, shape: shape, }, @@ -82,7 +83,7 @@ func TestRequestedToCapacityRatioScoringStrategy(t *testing.T) { st.MakePod().Node("node1").Obj(), st.MakePod().Node("node1").Obj(), }, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 38}, {Name: "node2", Score: 50}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 38}, {Name: "node2", Score: 50}}, resources: defaultResources, shape: shape, }, @@ -97,7 +98,7 @@ func TestRequestedToCapacityRatioScoringStrategy(t *testing.T) { st.MakePod().Node("node1").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "5000"}).Obj(), st.MakePod().Node("node2").Req(map[v1.ResourceName]string{"cpu": "3000", "memory": "5000"}).Obj(), }, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 38}, {Name: "node2", Score: 50}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 38}, {Name: "node2", Score: 50}}, resources: defaultResources, shape: shape, }, @@ -130,9 +131,9 @@ func TestRequestedToCapacityRatioScoringStrategy(t *testing.T) { return } - var gotScores framework.NodeScoreList + var gotScores fwk.NodeScoreList for _, n := range test.nodes { - status := p.(framework.PreScorePlugin).PreScore(ctx, state, test.requestedPod, tf.BuildNodeInfos(test.nodes)) + status := p.(fwk.PreScorePlugin).PreScore(ctx, state, test.requestedPod, tf.BuildNodeInfos(test.nodes)) if !status.IsSuccess() { t.Errorf("PreScore is expected to return success, but didn't. Got status: %v", status) } @@ -140,11 +141,11 @@ func TestRequestedToCapacityRatioScoringStrategy(t *testing.T) { if err != nil { t.Errorf("failed to get node %q from snapshot: %v", n.Name, err) } - score, status := p.(framework.ScorePlugin).Score(ctx, state, test.requestedPod, nodeInfo) + score, status := p.(fwk.ScorePlugin).Score(ctx, state, test.requestedPod, nodeInfo) if !status.IsSuccess() { t.Errorf("Score is expected to return success, but didn't. Got status: %v", status) } - gotScores = append(gotScores, framework.NodeScore{Name: n.Name, Score: score}) + gotScores = append(gotScores, fwk.NodeScore{Name: n.Name, Score: score}) } if diff := cmp.Diff(test.expectedScores, gotScores); diff != "" { @@ -238,14 +239,14 @@ func TestResourceBinPackingSingleExtended(t *testing.T) { pod *v1.Pod pods []*v1.Pod nodes []*v1.Node - expectedScores framework.NodeScoreList + expectedScores fwk.NodeScoreList name string }{ { // Node1 Score = Node2 Score = 0 as the incoming Pod doesn't request extended resource. pod: st.MakePod().Obj(), nodes: []*v1.Node{makeNode("node1", 4000, 10000*1024*1024, extendedResource2), makeNode("node2", 4000, 10000*1024*1024, extendedResource1)}, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: 0}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: 0}}, name: "nothing scheduled, nothing requested", }, { @@ -262,7 +263,7 @@ func TestResourceBinPackingSingleExtended(t *testing.T) { // Node2 Score: 5 pod: st.MakePod().Req(extendedResource3).Obj(), nodes: []*v1.Node{makeNode("node1", 4000, 10000*1024*1024, extendedResource2), makeNode("node2", 4000, 10000*1024*1024, extendedResource1)}, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 2}, {Name: "node2", Score: 5}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 2}, {Name: "node2", Score: 5}}, name: "resources requested, pods scheduled with less resources", pods: []*v1.Pod{st.MakePod().Obj()}, }, @@ -280,7 +281,7 @@ func TestResourceBinPackingSingleExtended(t *testing.T) { // Node2 Score: 10 pod: st.MakePod().Req(extendedResource3).Obj(), nodes: []*v1.Node{makeNode("node1", 4000, 10000*1024*1024, extendedResource2), makeNode("node2", 4000, 10000*1024*1024, extendedResource1)}, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 2}, {Name: "node2", Score: 10}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 2}, {Name: "node2", Score: 10}}, name: "resources requested, pods scheduled with resources, on node with existing pod running ", pods: []*v1.Pod{st.MakePod().Req(extendedResource3).Node("node2").Obj()}, }, @@ -298,7 +299,7 @@ func TestResourceBinPackingSingleExtended(t *testing.T) { // Node2 Score: 10 pod: st.MakePod().Req(extendedResource4).Obj(), nodes: []*v1.Node{makeNode("node1", 4000, 10000*1024*1024, extendedResource2), makeNode("node2", 4000, 10000*1024*1024, extendedResource1)}, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 5}, {Name: "node2", Score: 10}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 5}, {Name: "node2", Score: 10}}, name: "resources requested, pods scheduled with more resources", pods: []*v1.Pod{ st.MakePod().Obj(), @@ -331,9 +332,9 @@ func TestResourceBinPackingSingleExtended(t *testing.T) { t.Fatalf("unexpected error: %v", err) } - var gotList framework.NodeScoreList + var gotList fwk.NodeScoreList for _, n := range test.nodes { - status := p.(framework.PreScorePlugin).PreScore(ctx, state, test.pod, tf.BuildNodeInfos(test.nodes)) + status := p.(fwk.PreScorePlugin).PreScore(ctx, state, test.pod, tf.BuildNodeInfos(test.nodes)) if !status.IsSuccess() { t.Errorf("PreScore is expected to return success, but didn't. Got status: %v", status) } @@ -341,11 +342,11 @@ func TestResourceBinPackingSingleExtended(t *testing.T) { if err != nil { t.Errorf("failed to get node %q from snapshot: %v", n.Name, err) } - score, status := p.(framework.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) + score, status := p.(fwk.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) if !status.IsSuccess() { t.Errorf("Score is expected to return success, but didn't. Got status: %v", status) } - gotList = append(gotList, framework.NodeScore{Name: n.Name, Score: score}) + gotList = append(gotList, fwk.NodeScore{Name: n.Name, Score: score}) } if diff := cmp.Diff(test.expectedScores, gotList); diff != "" { @@ -378,7 +379,7 @@ func TestResourceBinPackingMultipleExtended(t *testing.T) { pod *v1.Pod pods []*v1.Pod nodes []*v1.Node - expectedScores framework.NodeScoreList + expectedScores fwk.NodeScoreList name string }{ { @@ -411,7 +412,7 @@ func TestResourceBinPackingMultipleExtended(t *testing.T) { pod: st.MakePod().Obj(), nodes: []*v1.Node{makeNode("node1", 4000, 10000*1024*1024, extendedResources2), makeNode("node2", 4000, 10000*1024*1024, extendedResources1)}, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: 0}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 0}, {Name: "node2", Score: 0}}, name: "nothing scheduled, nothing requested", }, { @@ -444,7 +445,7 @@ func TestResourceBinPackingMultipleExtended(t *testing.T) { pod: st.MakePod().Req(extendedResourcePod1).Obj(), nodes: []*v1.Node{makeNode("node1", 4000, 10000*1024*1024, extendedResources2), makeNode("node2", 4000, 10000*1024*1024, extendedResources1)}, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 4}, {Name: "node2", Score: 3}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 4}, {Name: "node2", Score: 3}}, name: "resources requested, pods scheduled with less resources", pods: []*v1.Pod{ st.MakePod().Obj(), @@ -479,7 +480,7 @@ func TestResourceBinPackingMultipleExtended(t *testing.T) { pod: st.MakePod().Req(extendedResourcePod1).Obj(), nodes: []*v1.Node{makeNode("node1", 4000, 10000*1024*1024, extendedResources2), makeNode("node2", 4000, 10000*1024*1024, extendedResources1)}, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 4}, {Name: "node2", Score: 7}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 4}, {Name: "node2", Score: 7}}, name: "resources requested, pods scheduled with resources, on node with existing pod running ", pods: []*v1.Pod{st.MakePod().Req(extendedResourcePod2).Node("node2").Obj()}, }, @@ -527,7 +528,7 @@ func TestResourceBinPackingMultipleExtended(t *testing.T) { pod: st.MakePod().Req(extendedResourcePod2).Obj(), nodes: []*v1.Node{makeNode("node1", 4000, 10000*1024*1024, extendedResources2), makeNode("node2", 4000, 10000*1024*1024, extendedResources1)}, - expectedScores: []framework.NodeScore{{Name: "node1", Score: 5}, {Name: "node2", Score: 5}}, + expectedScores: []fwk.NodeScore{{Name: "node1", Score: 5}, {Name: "node2", Score: 5}}, name: "resources requested, pods scheduled with more resources", pods: []*v1.Pod{ st.MakePod().Obj(), @@ -563,22 +564,22 @@ func TestResourceBinPackingMultipleExtended(t *testing.T) { t.Fatalf("unexpected error: %v", err) } - status := p.(framework.PreScorePlugin).PreScore(ctx, state, test.pod, tf.BuildNodeInfos(test.nodes)) + status := p.(fwk.PreScorePlugin).PreScore(ctx, state, test.pod, tf.BuildNodeInfos(test.nodes)) if !status.IsSuccess() { t.Errorf("PreScore is expected to return success, but didn't. Got status: %v", status) } - var gotScores framework.NodeScoreList + var gotScores fwk.NodeScoreList for _, n := range test.nodes { nodeInfo, err := snapshot.Get(n.Name) if err != nil { t.Errorf("failed to get node %q from snapshot: %v", n.Name, err) } - score, status := p.(framework.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) + score, status := p.(fwk.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) if !status.IsSuccess() { t.Errorf("Score is expected to return success, but didn't. Got status: %v", status) } - gotScores = append(gotScores, framework.NodeScore{Name: n.Name, Score: score}) + gotScores = append(gotScores, fwk.NodeScore{Name: n.Name, Score: score}) } if diff := cmp.Diff(test.expectedScores, gotScores); diff != "" { diff --git a/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable.go b/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable.go index f5f328cfe4648..faa6c01c4978a 100644 --- a/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable.go +++ b/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable.go @@ -24,7 +24,6 @@ import ( v1helper "k8s.io/component-helpers/scheduling/corev1" "k8s.io/klog/v2" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" "k8s.io/kubernetes/pkg/scheduler/util" @@ -36,8 +35,8 @@ type NodeUnschedulable struct { enableSchedulingQueueHint bool } -var _ framework.FilterPlugin = &NodeUnschedulable{} -var _ framework.EnqueueExtensions = &NodeUnschedulable{} +var _ fwk.FilterPlugin = &NodeUnschedulable{} +var _ fwk.EnqueueExtensions = &NodeUnschedulable{} // Name is the name of the plugin used in the plugin registry and configurations. const Name = names.NodeUnschedulable @@ -150,6 +149,6 @@ func (pl *NodeUnschedulable) Filter(ctx context.Context, _ fwk.CycleState, pod * } // New initializes a new plugin and returns it. -func New(_ context.Context, _ runtime.Object, _ framework.Handle, fts feature.Features) (framework.Plugin, error) { +func New(_ context.Context, _ runtime.Object, _ fwk.Handle, fts feature.Features) (fwk.Plugin, error) { return &NodeUnschedulable{enableSchedulingQueueHint: fts.EnableSchedulingQueueHint}, nil } diff --git a/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable_test.go b/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable_test.go index 03b9222b3e1ed..4b39623fe9d20 100644 --- a/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable_test.go +++ b/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable_test.go @@ -83,7 +83,7 @@ func TestNodeUnschedulable(t *testing.T) { if err != nil { t.Fatalf("creating plugin: %v", err) } - gotStatus := p.(framework.FilterPlugin).Filter(ctx, nil, test.pod, nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, nil, test.pod, nodeInfo) if diff := cmp.Diff(test.wantStatus, gotStatus); diff != "" { t.Errorf("status does not match (-want,+got):\n%s", diff) } diff --git a/pkg/scheduler/framework/plugins/nodevolumelimits/csi.go b/pkg/scheduler/framework/plugins/nodevolumelimits/csi.go index 6874b2c522450..687c24f9995a3 100644 --- a/pkg/scheduler/framework/plugins/nodevolumelimits/csi.go +++ b/pkg/scheduler/framework/plugins/nodevolumelimits/csi.go @@ -33,7 +33,6 @@ import ( csitrans "k8s.io/csi-translation-lib" "k8s.io/klog/v2" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" "k8s.io/kubernetes/pkg/scheduler/util" @@ -70,9 +69,9 @@ type CSILimits struct { translator InTreeToCSITranslator } -var _ framework.PreFilterPlugin = &CSILimits{} -var _ framework.FilterPlugin = &CSILimits{} -var _ framework.EnqueueExtensions = &CSILimits{} +var _ fwk.PreFilterPlugin = &CSILimits{} +var _ fwk.FilterPlugin = &CSILimits{} +var _ fwk.EnqueueExtensions = &CSILimits{} // CSIName is the name of the plugin used in the plugin registry and configurations. const CSIName = names.NodeVolumeLimits @@ -116,7 +115,7 @@ func (pl *CSILimits) isSchedulableAfterPodDeleted(logger klog.Logger, pod *v1.Po } } - logger.V(5).Info("The deleted pod does not impact the scheduling of the unscheduled pod", "deletedPod", klog.KObj(pod), "pod", klog.KObj(deletedPod)) + logger.V(5).Info("The deleted pod does not impact the scheduling of the unscheduled pod", "pod", klog.KObj(pod), "deletedPod", klog.KObj(deletedPod)) return fwk.QueueSkip, nil } @@ -234,7 +233,7 @@ func (pl *CSILimits) isSchedulableAfterCSINodeUpdated(logger klog.Logger, pod *v // PreFilter invoked at the prefilter extension point // // If the pod haven't those types of volumes, we'll skip the Filter phase -func (pl *CSILimits) PreFilter(ctx context.Context, _ fwk.CycleState, pod *v1.Pod, _ []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (pl *CSILimits) PreFilter(ctx context.Context, _ fwk.CycleState, pod *v1.Pod, _ []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { volumes := pod.Spec.Volumes for i := range volumes { vol := &volumes[i] @@ -247,7 +246,7 @@ func (pl *CSILimits) PreFilter(ctx context.Context, _ fwk.CycleState, pod *v1.Po } // PreFilterExtensions returns prefilter extensions, pod add and remove. -func (pl *CSILimits) PreFilterExtensions() framework.PreFilterExtensions { +func (pl *CSILimits) PreFilterExtensions() fwk.PreFilterExtensions { return nil } @@ -547,7 +546,7 @@ func (pl *CSILimits) getCSIDriverInfoFromSC(logger klog.Logger, csiNode *storage } // NewCSI initializes a new plugin and returns it. -func NewCSI(_ context.Context, _ runtime.Object, handle framework.Handle, fts feature.Features) (framework.Plugin, error) { +func NewCSI(_ context.Context, _ runtime.Object, handle fwk.Handle, fts feature.Features) (fwk.Plugin, error) { informerFactory := handle.SharedInformerFactory() pvLister := informerFactory.Core().V1().PersistentVolumes().Lister() pvcLister := informerFactory.Core().V1().PersistentVolumeClaims().Lister() diff --git a/pkg/scheduler/framework/plugins/podtopologyspread/filtering.go b/pkg/scheduler/framework/plugins/podtopologyspread/filtering.go index 060617df16465..d27211b617dba 100644 --- a/pkg/scheduler/framework/plugins/podtopologyspread/filtering.go +++ b/pkg/scheduler/framework/plugins/podtopologyspread/filtering.go @@ -27,7 +27,6 @@ import ( "k8s.io/component-helpers/scheduling/corev1/nodeaffinity" "k8s.io/klog/v2" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" ) const preFilterStateKey = "PreFilter" + Name @@ -137,7 +136,7 @@ func (p *criticalPaths) update(tpVal string, num int) { } // PreFilter invoked at the prefilter extension point. -func (pl *PodTopologySpread) PreFilter(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (pl *PodTopologySpread) PreFilter(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { s, err := pl.calPreFilterState(ctx, pod, nodes) if err != nil { return nil, fwk.AsStatus(err) @@ -150,7 +149,7 @@ func (pl *PodTopologySpread) PreFilter(ctx context.Context, cycleState fwk.Cycle } // PreFilterExtensions returns prefilter extensions, pod add and remove. -func (pl *PodTopologySpread) PreFilterExtensions() framework.PreFilterExtensions { +func (pl *PodTopologySpread) PreFilterExtensions() fwk.PreFilterExtensions { return pl } diff --git a/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go b/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go index 583a46da147f3..b20f017530cab 100644 --- a/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go +++ b/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go @@ -31,8 +31,6 @@ import ( fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" - "k8s.io/kubernetes/pkg/scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework/parallelize" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" "k8s.io/kubernetes/pkg/scheduler/util" @@ -61,9 +59,9 @@ var systemDefaultConstraints = []v1.TopologySpreadConstraint{ // PodTopologySpread is a plugin that ensures pod's topologySpreadConstraints is satisfied. type PodTopologySpread struct { systemDefaulted bool - parallelizer parallelize.Parallelizer + parallelizer fwk.Parallelizer defaultConstraints []v1.TopologySpreadConstraint - sharedLister framework.SharedLister + sharedLister fwk.SharedLister services corelisters.ServiceLister replicationCtrls corelisters.ReplicationControllerLister replicaSets appslisters.ReplicaSetLister @@ -73,11 +71,11 @@ type PodTopologySpread struct { enableSchedulingQueueHint bool } -var _ framework.PreFilterPlugin = &PodTopologySpread{} -var _ framework.FilterPlugin = &PodTopologySpread{} -var _ framework.PreScorePlugin = &PodTopologySpread{} -var _ framework.ScorePlugin = &PodTopologySpread{} -var _ framework.EnqueueExtensions = &PodTopologySpread{} +var _ fwk.PreFilterPlugin = &PodTopologySpread{} +var _ fwk.FilterPlugin = &PodTopologySpread{} +var _ fwk.PreScorePlugin = &PodTopologySpread{} +var _ fwk.ScorePlugin = &PodTopologySpread{} +var _ fwk.EnqueueExtensions = &PodTopologySpread{} // Name is the name of the plugin used in the plugin registry and configurations. const Name = names.PodTopologySpread @@ -88,7 +86,7 @@ func (pl *PodTopologySpread) Name() string { } // New initializes a new plugin and returns it. -func New(_ context.Context, plArgs runtime.Object, h framework.Handle, fts feature.Features) (framework.Plugin, error) { +func New(_ context.Context, plArgs runtime.Object, h fwk.Handle, fts feature.Features) (fwk.Plugin, error) { if h.SnapshotSharedLister() == nil { return nil, fmt.Errorf("SnapshotSharedlister is nil") } diff --git a/pkg/scheduler/framework/plugins/podtopologyspread/scoring.go b/pkg/scheduler/framework/plugins/podtopologyspread/scoring.go index 3fa357d11adff..020e94ee12aa3 100644 --- a/pkg/scheduler/framework/plugins/podtopologyspread/scoring.go +++ b/pkg/scheduler/framework/plugins/podtopologyspread/scoring.go @@ -26,7 +26,6 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/component-helpers/scheduling/corev1/nodeaffinity" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" ) const preScoreStateKey = "PreScore" + Name @@ -223,7 +222,7 @@ func (pl *PodTopologySpread) Score(ctx context.Context, cycleState fwk.CycleStat } // NormalizeScore invoked after scoring all nodes. -func (pl *PodTopologySpread) NormalizeScore(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *fwk.Status { +func (pl *PodTopologySpread) NormalizeScore(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, scores fwk.NodeScoreList) *fwk.Status { s, err := getPreScoreState(cycleState) if err != nil { return fwk.AsStatus(err) @@ -255,17 +254,17 @@ func (pl *PodTopologySpread) NormalizeScore(ctx context.Context, cycleState fwk. continue } if maxScore == 0 { - scores[i].Score = framework.MaxNodeScore + scores[i].Score = fwk.MaxNodeScore continue } s := scores[i].Score - scores[i].Score = framework.MaxNodeScore * (maxScore + minScore - s) / maxScore + scores[i].Score = fwk.MaxNodeScore * (maxScore + minScore - s) / maxScore } return nil } // ScoreExtensions of the Score plugin. -func (pl *PodTopologySpread) ScoreExtensions() framework.ScoreExtensions { +func (pl *PodTopologySpread) ScoreExtensions() fwk.ScoreExtensions { return pl } diff --git a/pkg/scheduler/framework/plugins/podtopologyspread/scoring_test.go b/pkg/scheduler/framework/plugins/podtopologyspread/scoring_test.go index 8c1193bad4e3c..9e74f96def37f 100644 --- a/pkg/scheduler/framework/plugins/podtopologyspread/scoring_test.go +++ b/pkg/scheduler/framework/plugins/podtopologyspread/scoring_test.go @@ -628,7 +628,7 @@ func TestPodTopologySpreadScore(t *testing.T) { nodes []*v1.Node failedNodes []*v1.Node // nodes + failedNodes = all nodes objs []runtime.Object - want framework.NodeScoreList + want fwk.NodeScoreList enableNodeInclusionPolicy bool enableMatchLabelKeys bool }{ @@ -647,7 +647,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakeNode().Name("node-a").Label(v1.LabelHostname, "node-a").Obj(), st.MakeNode().Name("node-b").Label(v1.LabelHostname, "node-b").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 100}, {Name: "node-b", Score: 100}, }, @@ -669,7 +669,7 @@ func TestPodTopologySpreadScore(t *testing.T) { failedNodes: []*v1.Node{ st.MakeNode().Name("node-b").Label(v1.LabelHostname, "node-b").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 100}, }, }, @@ -686,7 +686,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakeNode().Name("node-a").Label(v1.LabelHostname, "node-a").Obj(), st.MakeNode().Name("node-b").Label(v1.LabelHostname, "node-b").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 100}, {Name: "node-b", Score: 100}, }, @@ -712,7 +712,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakeNode().Name("node-d").Label(v1.LabelHostname, "node-d").Obj(), }, failedNodes: []*v1.Node{}, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 20}, {Name: "node-b", Score: 60}, {Name: "node-c", Score: 100}, @@ -738,7 +738,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakeNode().Name("node-c").Label(v1.LabelHostname, "node-c").Obj(), st.MakeNode().Name("node-d").Label(v1.LabelHostname, "node-d").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 100}, {Name: "node-b", Score: 100}, {Name: "node-c", Score: 100}, @@ -766,7 +766,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakeNode().Name("node-d").Label(v1.LabelHostname, "node-d").Obj(), }, failedNodes: []*v1.Node{}, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 33}, // +13, compared to maxSkew=1 {Name: "node-b", Score: 66}, // +6, compared to maxSkew=1 {Name: "node-c", Score: 100}, @@ -798,7 +798,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakeNode().Name("node-d").Label(v1.LabelHostname, "node-d").Obj(), }, failedNodes: []*v1.Node{}, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 44}, // +16 compared to maxSkew=1 {Name: "node-b", Score: 66}, // +9 compared to maxSkew=1 {Name: "node-c", Score: 77}, // +6 compared to maxSkew=1 @@ -831,7 +831,7 @@ func TestPodTopologySpreadScore(t *testing.T) { objs: []runtime.Object{ &v1.Service{Spec: v1.ServiceSpec{Selector: map[string]string{"foo": ""}}}, }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ // Same scores as if we were using one spreading constraint. {Name: "node-a", Score: 44}, {Name: "node-b", Score: 66}, @@ -865,7 +865,7 @@ func TestPodTopologySpreadScore(t *testing.T) { failedNodes: []*v1.Node{ st.MakeNode().Name("node-y").Label(v1.LabelHostname, "node-y").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 33}, {Name: "node-b", Score: 83}, {Name: "node-x", Score: 100}, @@ -897,7 +897,7 @@ func TestPodTopologySpreadScore(t *testing.T) { failedNodes: []*v1.Node{ st.MakeNode().Name("node-y").Label(v1.LabelHostname, "node-y").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 16}, {Name: "node-b", Score: 0}, {Name: "node-x", Score: 100}, @@ -929,7 +929,7 @@ func TestPodTopologySpreadScore(t *testing.T) { failedNodes: []*v1.Node{ st.MakeNode().Name("node-y").Label("zone", "zone2").Label(v1.LabelHostname, "node-y").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 75}, {Name: "node-b", Score: 75}, {Name: "node-x", Score: 100}, @@ -961,7 +961,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakeNode().Name("node-b").Label("zone", "zone1").Label(v1.LabelHostname, "node-b").Obj(), st.MakeNode().Name("node-y").Label("zone", "zone2").Label(v1.LabelHostname, "node-y").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 100}, {Name: "node-x", Score: 63}, }, @@ -988,7 +988,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakeNode().Name("node-b").Label("zone", "zone1").Obj(), st.MakeNode().Name("node-y").Label("zone", "zone2").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 85}, {Name: "node-x", Score: 100}, }, @@ -1022,7 +1022,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakeNode().Name("node-y").Label("zone", "zone2").Label(v1.LabelHostname, "node-y").Obj(), }, failedNodes: []*v1.Node{}, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 60}, {Name: "node-b", Score: 20}, {Name: "node-x", Score: 100}, @@ -1049,7 +1049,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakeNode().Name("node-y").Label("zone", "zone2").Label(v1.LabelHostname, "node-y").Obj(), }, failedNodes: []*v1.Node{}, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 100}, {Name: "node-b", Score: 60}, {Name: "node-x", Score: 40}, @@ -1078,7 +1078,7 @@ func TestPodTopologySpreadScore(t *testing.T) { failedNodes: []*v1.Node{ st.MakeNode().Name("node-y").Label("zone", "zone2").Label(v1.LabelHostname, "node-y").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 50}, {Name: "node-b", Score: 25}, {Name: "node-x", Score: 100}, @@ -1099,7 +1099,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakeNode().Name("node-a").Label(v1.LabelHostname, "node-a").Obj(), st.MakeNode().Name("node-b").Label(v1.LabelHostname, "node-b").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 100}, {Name: "node-b", Score: 33}, }, @@ -1117,7 +1117,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakePod().Name("p-a").Node("node-a").Label("foo", "").Terminating().Obj(), st.MakePod().Name("p-b").Node("node-b").Label("foo", "").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 100}, {Name: "node-b", Score: 0}, }, @@ -1148,7 +1148,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakePod().Name("p-b2").Node("node-b").Label("foo", "").Obj(), st.MakePod().Name("p-c1").Node("node-c").Label("foo", "").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 75}, {Name: "node-b", Score: 75}, {Name: "node-c", Score: 100}, @@ -1171,7 +1171,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakePod().Name("p-b1").Node("node-b").Label("foo", "").Obj(), st.MakePod().Name("p-c1").Node("node-c").Label("foo", "").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 0}, {Name: "node-b", Score: 33}, {Name: "node-c", Score: 100}, @@ -1195,7 +1195,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakePod().Name("p-b1").Node("node-b").Label("foo", "").Obj(), st.MakePod().Name("p-c1").Node("node-c").Label("foo", "").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 66}, {Name: "node-b", Score: 100}, {Name: "node-c", Score: 100}, @@ -1219,7 +1219,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakePod().Name("p-b1").Node("node-b").Label("foo", "").Obj(), st.MakePod().Name("p-c1").Node("node-c").Label("foo", "").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 0}, {Name: "node-b", Score: 33}, {Name: "node-c", Score: 100}, @@ -1243,7 +1243,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakePod().Name("p-b1").Node("node-b").Label("foo", "").Obj(), st.MakePod().Name("p-c1").Node("node-c").Label("foo", "").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 66}, {Name: "node-b", Score: 100}, {Name: "node-c", Score: 100}, @@ -1266,7 +1266,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakePod().Name("p-b1").Node("node-b").Label("foo", "").Obj(), st.MakePod().Name("p-c1").Node("node-c").Label("foo", "").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 0}, {Name: "node-b", Score: 33}, {Name: "node-c", Score: 100}, @@ -1289,7 +1289,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakePod().Name("p-b1").Node("node-b").Label("foo", "").Obj(), st.MakePod().Name("p-c1").Node("node-c").Label("foo", "").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 66}, {Name: "node-b", Score: 100}, {Name: "node-c", Score: 100}, @@ -1314,7 +1314,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakeNode().Name("node-c").Label("zone", "zone2").Label(v1.LabelHostname, "node-c").Obj(), st.MakeNode().Name("node-d").Label("zone", "zone2").Label(v1.LabelHostname, "node-d").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 60}, {Name: "node-b", Score: 20}, {Name: "node-c", Score: 60}, @@ -1340,7 +1340,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakeNode().Name("node-c").Label("zone", "zone2").Label(v1.LabelHostname, "node-c").Obj(), st.MakeNode().Name("node-d").Label("zone", "zone2").Label(v1.LabelHostname, "node-d").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 60}, {Name: "node-b", Score: 20}, {Name: "node-c", Score: 60}, @@ -1367,7 +1367,7 @@ func TestPodTopologySpreadScore(t *testing.T) { st.MakeNode().Name("node-c").Label("zone", "zone2").Label(v1.LabelHostname, "node-c").Obj(), st.MakeNode().Name("node-d").Label("zone", "zone2").Label(v1.LabelHostname, "node-d").Obj(), }, - want: []framework.NodeScore{ + want: []fwk.NodeScore{ {Name: "node-a", Score: 60}, {Name: "node-b", Score: 20}, {Name: "node-c", Score: 60}, @@ -1394,7 +1394,7 @@ func TestPodTopologySpreadScore(t *testing.T) { t.Errorf("unexpected error: %v", status) } - var gotList framework.NodeScoreList + var gotList fwk.NodeScoreList for _, n := range tt.nodes { nodeName := n.Name nodeInfo, err := p.sharedLister.NodeInfos().Get(n.Name) @@ -1405,7 +1405,7 @@ func TestPodTopologySpreadScore(t *testing.T) { if !status.IsSuccess() { t.Errorf("unexpected error: %v", status) } - gotList = append(gotList, framework.NodeScore{Name: nodeName, Score: score}) + gotList = append(gotList, fwk.NodeScore{Name: nodeName, Score: score}) } status = p.NormalizeScore(ctx, state, tt.pod, gotList) @@ -1479,14 +1479,14 @@ func BenchmarkTestPodTopologySpreadScore(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { - var gotList framework.NodeScoreList + var gotList fwk.NodeScoreList for _, nodeInfo := range nodeInfos { nodeName := nodeInfo.Node().Name score, status := p.Score(ctx, state, tt.pod, nodeInfo) if !status.IsSuccess() { b.Fatalf("unexpected error: %v", status) } - gotList = append(gotList, framework.NodeScore{Name: nodeName, Score: score}) + gotList = append(gotList, fwk.NodeScore{Name: nodeName, Score: score}) } status = p.NormalizeScore(ctx, state, tt.pod, gotList) diff --git a/pkg/scheduler/framework/plugins/queuesort/priority_sort.go b/pkg/scheduler/framework/plugins/queuesort/priority_sort.go index eeffc45ca1bbd..d1a1179243b9d 100644 --- a/pkg/scheduler/framework/plugins/queuesort/priority_sort.go +++ b/pkg/scheduler/framework/plugins/queuesort/priority_sort.go @@ -22,7 +22,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" corev1helpers "k8s.io/component-helpers/scheduling/corev1" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" ) @@ -32,7 +31,7 @@ const Name = names.PrioritySort // PrioritySort is a plugin that implements Priority based sorting. type PrioritySort struct{} -var _ framework.QueueSortPlugin = &PrioritySort{} +var _ fwk.QueueSortPlugin = &PrioritySort{} // Name returns name of the plugin. func (pl *PrioritySort) Name() string { @@ -49,6 +48,6 @@ func (pl *PrioritySort) Less(pInfo1, pInfo2 fwk.QueuedPodInfo) bool { } // New initializes a new plugin and returns it. -func New(_ context.Context, _ runtime.Object, handle framework.Handle) (framework.Plugin, error) { +func New(_ context.Context, _ runtime.Object, handle fwk.Handle) (fwk.Plugin, error) { return &PrioritySort{}, nil } diff --git a/pkg/scheduler/framework/plugins/schedulinggates/scheduling_gates.go b/pkg/scheduler/framework/plugins/schedulinggates/scheduling_gates.go index 5e228e3d41d02..b8d4ed8303b27 100644 --- a/pkg/scheduler/framework/plugins/schedulinggates/scheduling_gates.go +++ b/pkg/scheduler/framework/plugins/schedulinggates/scheduling_gates.go @@ -25,7 +25,6 @@ import ( "k8s.io/klog/v2" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" "k8s.io/kubernetes/pkg/scheduler/util" @@ -39,8 +38,8 @@ type SchedulingGates struct { enableSchedulingQueueHint bool } -var _ framework.PreEnqueuePlugin = &SchedulingGates{} -var _ framework.EnqueueExtensions = &SchedulingGates{} +var _ fwk.PreEnqueuePlugin = &SchedulingGates{} +var _ fwk.EnqueueExtensions = &SchedulingGates{} func (pl *SchedulingGates) Name() string { return Name @@ -74,7 +73,7 @@ func (pl *SchedulingGates) EventsToRegister(_ context.Context) ([]fwk.ClusterEve } // New initializes a new plugin and returns it. -func New(_ context.Context, _ runtime.Object, _ framework.Handle, fts feature.Features) (framework.Plugin, error) { +func New(_ context.Context, _ runtime.Object, _ fwk.Handle, fts feature.Features) (fwk.Plugin, error) { return &SchedulingGates{ enableSchedulingQueueHint: fts.EnableSchedulingQueueHint, }, nil diff --git a/pkg/scheduler/framework/plugins/schedulinggates/scheduling_gates_test.go b/pkg/scheduler/framework/plugins/schedulinggates/scheduling_gates_test.go index d5caa50016697..d2818cbdc8ba9 100644 --- a/pkg/scheduler/framework/plugins/schedulinggates/scheduling_gates_test.go +++ b/pkg/scheduler/framework/plugins/schedulinggates/scheduling_gates_test.go @@ -24,7 +24,6 @@ import ( v1 "k8s.io/api/core/v1" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" st "k8s.io/kubernetes/pkg/scheduler/testing" "k8s.io/kubernetes/test/utils/ktesting" @@ -56,7 +55,7 @@ func TestPreEnqueue(t *testing.T) { t.Fatalf("Creating plugin: %v", err) } - got := p.(framework.PreEnqueuePlugin).PreEnqueue(ctx, tt.pod) + got := p.(fwk.PreEnqueuePlugin).PreEnqueue(ctx, tt.pod) if diff := cmp.Diff(tt.want, got); diff != "" { t.Errorf("unexpected status (-want, +got):\n%s", diff) } diff --git a/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go b/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go index 9e75df58db2a2..38dd3b7df3dab 100644 --- a/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go +++ b/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go @@ -25,7 +25,6 @@ import ( v1helper "k8s.io/component-helpers/scheduling/corev1" "k8s.io/klog/v2" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" @@ -34,14 +33,14 @@ import ( // TaintToleration is a plugin that checks if a pod tolerates a node's taints. type TaintToleration struct { - handle framework.Handle + handle fwk.Handle enableSchedulingQueueHint bool } -var _ framework.FilterPlugin = &TaintToleration{} -var _ framework.PreScorePlugin = &TaintToleration{} -var _ framework.ScorePlugin = &TaintToleration{} -var _ framework.EnqueueExtensions = &TaintToleration{} +var _ fwk.FilterPlugin = &TaintToleration{} +var _ fwk.PreScorePlugin = &TaintToleration{} +var _ fwk.ScorePlugin = &TaintToleration{} +var _ fwk.EnqueueExtensions = &TaintToleration{} const ( // Name is the name of the plugin used in the plugin registry and configurations. @@ -194,17 +193,17 @@ func (pl *TaintToleration) Score(ctx context.Context, state fwk.CycleState, pod } // NormalizeScore invoked after scoring all nodes. -func (pl *TaintToleration) NormalizeScore(ctx context.Context, _ fwk.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *fwk.Status { - return helper.DefaultNormalizeScore(framework.MaxNodeScore, true, scores) +func (pl *TaintToleration) NormalizeScore(ctx context.Context, _ fwk.CycleState, pod *v1.Pod, scores fwk.NodeScoreList) *fwk.Status { + return helper.DefaultNormalizeScore(fwk.MaxNodeScore, true, scores) } // ScoreExtensions of the Score plugin. -func (pl *TaintToleration) ScoreExtensions() framework.ScoreExtensions { +func (pl *TaintToleration) ScoreExtensions() fwk.ScoreExtensions { return pl } // New initializes a new plugin and returns it. -func New(_ context.Context, _ runtime.Object, h framework.Handle, fts feature.Features) (framework.Plugin, error) { +func New(_ context.Context, _ runtime.Object, h fwk.Handle, fts feature.Features) (fwk.Plugin, error) { return &TaintToleration{ handle: h, enableSchedulingQueueHint: fts.EnableSchedulingQueueHint, diff --git a/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration_test.go b/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration_test.go index 058a0ef17b822..306bbe9807330 100644 --- a/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration_test.go +++ b/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration_test.go @@ -59,7 +59,7 @@ func TestTaintTolerationScore(t *testing.T) { name string pod *v1.Pod nodes []*v1.Node - expectedList framework.NodeScoreList + expectedList fwk.NodeScoreList }{ // basic test case { @@ -82,8 +82,8 @@ func TestTaintTolerationScore(t *testing.T) { Effect: v1.TaintEffectPreferNoSchedule, }}), }, - expectedList: []framework.NodeScore{ - {Name: "nodeA", Score: framework.MaxNodeScore}, + expectedList: []fwk.NodeScore{ + {Name: "nodeA", Score: fwk.MaxNodeScore}, {Name: "nodeB", Score: 0}, }, }, @@ -124,10 +124,10 @@ func TestTaintTolerationScore(t *testing.T) { }, }), }, - expectedList: []framework.NodeScore{ - {Name: "nodeA", Score: framework.MaxNodeScore}, - {Name: "nodeB", Score: framework.MaxNodeScore}, - {Name: "nodeC", Score: framework.MaxNodeScore}, + expectedList: []fwk.NodeScore{ + {Name: "nodeA", Score: fwk.MaxNodeScore}, + {Name: "nodeB", Score: fwk.MaxNodeScore}, + {Name: "nodeC", Score: fwk.MaxNodeScore}, }, }, // the count of taints on a node that are not tolerated by pod, matters. @@ -160,8 +160,8 @@ func TestTaintTolerationScore(t *testing.T) { }, }), }, - expectedList: []framework.NodeScore{ - {Name: "nodeA", Score: framework.MaxNodeScore}, + expectedList: []fwk.NodeScore{ + {Name: "nodeA", Score: fwk.MaxNodeScore}, {Name: "nodeB", Score: 50}, {Name: "nodeC", Score: 0}, }, @@ -203,9 +203,9 @@ func TestTaintTolerationScore(t *testing.T) { }, }), }, - expectedList: []framework.NodeScore{ - {Name: "nodeA", Score: framework.MaxNodeScore}, - {Name: "nodeB", Score: framework.MaxNodeScore}, + expectedList: []fwk.NodeScore{ + {Name: "nodeA", Score: fwk.MaxNodeScore}, + {Name: "nodeB", Score: fwk.MaxNodeScore}, {Name: "nodeC", Score: 0}, }, }, @@ -224,8 +224,8 @@ func TestTaintTolerationScore(t *testing.T) { }, }), }, - expectedList: []framework.NodeScore{ - {Name: "nodeA", Score: framework.MaxNodeScore}, + expectedList: []fwk.NodeScore{ + {Name: "nodeA", Score: fwk.MaxNodeScore}, {Name: "nodeB", Score: 0}, }, }, @@ -245,21 +245,21 @@ func TestTaintTolerationScore(t *testing.T) { t.Fatalf("creating plugin: %v", err) } nodeInfos := tf.BuildNodeInfos(test.nodes) - status := p.(framework.PreScorePlugin).PreScore(ctx, state, test.pod, nodeInfos) + status := p.(fwk.PreScorePlugin).PreScore(ctx, state, test.pod, nodeInfos) if !status.IsSuccess() { t.Errorf("unexpected error: %v", status) } - var gotList framework.NodeScoreList + var gotList fwk.NodeScoreList for _, nodeInfo := range nodeInfos { nodeName := nodeInfo.Node().Name - score, status := p.(framework.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) + score, status := p.(fwk.ScorePlugin).Score(ctx, state, test.pod, nodeInfo) if !status.IsSuccess() { t.Errorf("unexpected error: %v", status) } - gotList = append(gotList, framework.NodeScore{Name: nodeName, Score: score}) + gotList = append(gotList, fwk.NodeScore{Name: nodeName, Score: score}) } - status = p.(framework.ScorePlugin).ScoreExtensions().NormalizeScore(ctx, state, test.pod, gotList) + status = p.(fwk.ScorePlugin).ScoreExtensions().NormalizeScore(ctx, state, test.pod, gotList) if !status.IsSuccess() { t.Errorf("unexpected error: %v", status) } @@ -349,7 +349,7 @@ func TestTaintTolerationFilter(t *testing.T) { if err != nil { t.Fatalf("creating plugin: %v", err) } - gotStatus := p.(framework.FilterPlugin).Filter(ctx, nil, test.pod, nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, nil, test.pod, nodeInfo) if diff := cmp.Diff(test.wantStatus, gotStatus); diff != "" { t.Errorf("Unexpected status (-want,+got):\n%s", diff) } diff --git a/pkg/scheduler/framework/plugins/testing/testing.go b/pkg/scheduler/framework/plugins/testing/testing.go index 772da99547c6f..7ea9744265a35 100644 --- a/pkg/scheduler/framework/plugins/testing/testing.go +++ b/pkg/scheduler/framework/plugins/testing/testing.go @@ -20,12 +20,12 @@ import ( "context" "testing" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes/fake" - "k8s.io/kubernetes/pkg/scheduler/framework" + fwk "k8s.io/kube-scheduler/framework" frameworkruntime "k8s.io/kubernetes/pkg/scheduler/framework/runtime" ) @@ -38,9 +38,9 @@ func SetupPluginWithInformers( tb testing.TB, pf frameworkruntime.PluginFactory, config runtime.Object, - sharedLister framework.SharedLister, + sharedLister fwk.SharedLister, objs []runtime.Object, -) framework.Plugin { +) fwk.Plugin { objs = append([]runtime.Object{&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ""}}}, objs...) informerFactory := informers.NewSharedInformerFactory(fake.NewClientset(objs...), 0) fh, err := frameworkruntime.NewFramework(ctx, nil, nil, @@ -65,8 +65,8 @@ func SetupPlugin( tb testing.TB, pf frameworkruntime.PluginFactory, config runtime.Object, - sharedLister framework.SharedLister, -) framework.Plugin { + sharedLister fwk.SharedLister, +) fwk.Plugin { fh, err := frameworkruntime.NewFramework(ctx, nil, nil, frameworkruntime.WithSnapshotSharedLister(sharedLister)) if err != nil { diff --git a/pkg/scheduler/framework/plugins/volumebinding/assume_cache.go b/pkg/scheduler/framework/plugins/volumebinding/assume_cache.go index e12fb08a0d488..d62ca6e5543c3 100644 --- a/pkg/scheduler/framework/plugins/volumebinding/assume_cache.go +++ b/pkg/scheduler/framework/plugins/volumebinding/assume_cache.go @@ -20,112 +20,57 @@ import ( "fmt" v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/tools/cache" storagehelpers "k8s.io/component-helpers/storage/volume" "k8s.io/klog/v2" - "k8s.io/kubernetes/pkg/scheduler/util/assumecache" ) // PVAssumeCache is a AssumeCache for PersistentVolume objects type PVAssumeCache struct { - *assumecache.AssumeCache - logger klog.Logger + *passiveAssumeCache[*v1.PersistentVolume] } func pvStorageClassIndexFunc(obj interface{}) ([]string, error) { if pv, ok := obj.(*v1.PersistentVolume); ok { return []string{storagehelpers.GetPersistentVolumeClass(pv)}, nil } - return []string{""}, fmt.Errorf("object is not a v1.PersistentVolume: %v", obj) + return nil, fmt.Errorf("object is not a v1.PersistentVolume: %v", obj) } -// NewPVAssumeCache creates a PV assume cache. -func NewPVAssumeCache(logger klog.Logger, informer assumecache.Informer) *PVAssumeCache { - logger = klog.LoggerWithName(logger, "PV Cache") - return &PVAssumeCache{ - AssumeCache: assumecache.NewAssumeCache(logger, informer, "v1.PersistentVolume", "storageclass", pvStorageClassIndexFunc), - logger: logger, - } -} - -func (c *PVAssumeCache) GetPV(pvName string) (*v1.PersistentVolume, error) { - obj, err := c.Get(pvName) - if err != nil { - return nil, err - } - - pv, ok := obj.(*v1.PersistentVolume) - if !ok { - return nil, &assumecache.WrongTypeError{TypeName: "v1.PersistentVolume", Object: obj} - } - return pv, nil -} +const storageClassIndex = "storageclass" -func (c *PVAssumeCache) GetAPIPV(pvName string) (*v1.PersistentVolume, error) { - obj, err := c.GetAPIObj(pvName) +// NewPVAssumeCache creates a PV assume cache. +func NewPVAssumeCache(logger klog.Logger, informer informer) (PVAssumeCache, error) { + logger = klog.LoggerWithName(logger, "pv-cache") + err := informer.GetIndexer().AddIndexers(map[string]cache.IndexFunc{ + storageClassIndex: pvStorageClassIndexFunc, + }) if err != nil { - return nil, err - } - pv, ok := obj.(*v1.PersistentVolume) - if !ok { - return nil, &assumecache.WrongTypeError{TypeName: "v1.PersistentVolume", Object: obj} + // Ignore the error if the index already exists. This can happen if + // the same informer is shared among multiple PVAssumeCache, maybe created from multiple profiles. + if informer.GetIndexer().GetIndexers()[storageClassIndex] == nil { + return PVAssumeCache{}, err + } } - return pv, nil + cache, err := newAssumeCache[*v1.PersistentVolume](logger, informer, schema.GroupResource{Resource: "persistentvolumes"}) + return PVAssumeCache{cache}, err } -func (c *PVAssumeCache) ListPVs(storageClassName string) []*v1.PersistentVolume { - objs := c.List(&v1.PersistentVolume{ - Spec: v1.PersistentVolumeSpec{ - StorageClassName: storageClassName, - }, - }) - pvs := []*v1.PersistentVolume{} - for _, obj := range objs { - pv, ok := obj.(*v1.PersistentVolume) - if !ok { - c.logger.Error(&assumecache.WrongTypeError{TypeName: "v1.PersistentVolume", Object: obj}, "ListPVs") - continue - } - pvs = append(pvs, pv) - } - return pvs +func (c PVAssumeCache) ListPVs(storageClassName string) ([]*v1.PersistentVolume, error) { + // This works because we will never change the storage class in scheduler + // Assumed PVs needs to be included here to ensure the same PVC will not be bound to another PV in the next scheduling cycle. + return c.ByIndex(storageClassIndex, storageClassName) } // PVCAssumeCache is a AssumeCache for PersistentVolumeClaim objects type PVCAssumeCache struct { - *assumecache.AssumeCache - logger klog.Logger + *passiveAssumeCache[*v1.PersistentVolumeClaim] } // NewPVCAssumeCache creates a PVC assume cache. -func NewPVCAssumeCache(logger klog.Logger, informer assumecache.Informer) *PVCAssumeCache { - logger = klog.LoggerWithName(logger, "PVC Cache") - return &PVCAssumeCache{ - AssumeCache: assumecache.NewAssumeCache(logger, informer, "v1.PersistentVolumeClaim", "", nil), - logger: logger, - } -} - -func (c *PVCAssumeCache) GetPVC(pvcKey string) (*v1.PersistentVolumeClaim, error) { - obj, err := c.Get(pvcKey) - if err != nil { - return nil, err - } - - pvc, ok := obj.(*v1.PersistentVolumeClaim) - if !ok { - return nil, &assumecache.WrongTypeError{TypeName: "v1.PersistentVolumeClaim", Object: obj} - } - return pvc, nil -} - -func (c *PVCAssumeCache) GetAPIPVC(pvcKey string) (*v1.PersistentVolumeClaim, error) { - obj, err := c.GetAPIObj(pvcKey) - if err != nil { - return nil, err - } - pvc, ok := obj.(*v1.PersistentVolumeClaim) - if !ok { - return nil, &assumecache.WrongTypeError{TypeName: "v1.PersistentVolumeClaim", Object: obj} - } - return pvc, nil +func NewPVCAssumeCache(logger klog.Logger, informer informer) (PVCAssumeCache, error) { + logger = klog.LoggerWithName(logger, "pvc-cache") + cache, err := newAssumeCache[*v1.PersistentVolumeClaim](logger, informer, schema.GroupResource{Resource: "persistentvolumeclaims"}) + return PVCAssumeCache{cache}, err } diff --git a/pkg/scheduler/framework/plugins/volumebinding/assume_cache_test.go b/pkg/scheduler/framework/plugins/volumebinding/assume_cache_test.go index 4256789a2f047..d5801f0eb20ef 100644 --- a/pkg/scheduler/framework/plugins/volumebinding/assume_cache_test.go +++ b/pkg/scheduler/framework/plugins/volumebinding/assume_cache_test.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright 2025 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. @@ -17,423 +17,39 @@ limitations under the License. package volumebinding import ( - "fmt" "testing" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/component-helpers/storage/volume" - "k8s.io/klog/v2/ktesting" - "k8s.io/kubernetes/pkg/scheduler/util/assumecache" + "k8s.io/client-go/tools/cache" + "k8s.io/kubernetes/test/utils/ktesting" ) -func verifyListPVs(t *testing.T, cache *PVAssumeCache, expectedPVs map[string]*v1.PersistentVolume, storageClassName string) { - pvList := cache.ListPVs(storageClassName) - if len(pvList) != len(expectedPVs) { - t.Errorf("ListPVs() returned %v PVs, expected %v", len(pvList), len(expectedPVs)) - } - for _, pv := range pvList { - expectedPV, ok := expectedPVs[pv.Name] - if !ok { - t.Errorf("ListPVs() returned unexpected PV %q", pv.Name) - } - if expectedPV != pv { - t.Errorf("ListPVs() returned PV %p, expected %p", pv, expectedPV) - } - } -} - -func verifyPV(cache *PVAssumeCache, name string, expectedPV *v1.PersistentVolume) error { - pv, err := cache.GetPV(name) - if err != nil { - return err - } - if pv != expectedPV { - return fmt.Errorf("GetPV() returned %p, expected %p", pv, expectedPV) - } - return nil -} - -func TestAssumePV(t *testing.T) { - logger, _ := ktesting.NewTestContext(t) - scenarios := map[string]struct { - oldPV *v1.PersistentVolume - newPV *v1.PersistentVolume - shouldSucceed bool - }{ - "success-same-version": { - oldPV: makePV("pv1", "").withVersion("5").PersistentVolume, - newPV: makePV("pv1", "").withVersion("5").PersistentVolume, - shouldSucceed: true, - }, - "success-storageclass-same-version": { - oldPV: makePV("pv1", "class1").withVersion("5").PersistentVolume, - newPV: makePV("pv1", "class1").withVersion("5").PersistentVolume, - shouldSucceed: true, - }, - "success-new-higher-version": { - oldPV: makePV("pv1", "").withVersion("5").PersistentVolume, - newPV: makePV("pv1", "").withVersion("6").PersistentVolume, - shouldSucceed: true, - }, - "fail-old-not-found": { - oldPV: makePV("pv2", "").withVersion("5").PersistentVolume, - newPV: makePV("pv1", "").withVersion("5").PersistentVolume, - shouldSucceed: false, - }, - "fail-new-lower-version": { - oldPV: makePV("pv1", "").withVersion("5").PersistentVolume, - newPV: makePV("pv1", "").withVersion("4").PersistentVolume, - shouldSucceed: false, - }, - "fail-new-bad-version": { - oldPV: makePV("pv1", "").withVersion("5").PersistentVolume, - newPV: makePV("pv1", "").withVersion("a").PersistentVolume, - shouldSucceed: false, - }, - "fail-old-bad-version": { - oldPV: makePV("pv1", "").withVersion("a").PersistentVolume, - newPV: makePV("pv1", "").withVersion("5").PersistentVolume, - shouldSucceed: false, - }, - } - - for name, scenario := range scenarios { - cache := NewPVAssumeCache(logger, nil) - - // Add oldPV to cache - assumecache.AddTestObject(cache.AssumeCache, scenario.oldPV) - if err := verifyPV(cache, scenario.oldPV.Name, scenario.oldPV); err != nil { - t.Errorf("Failed to GetPV() after initial update: %v", err) - continue - } - - // Assume newPV - err := cache.Assume(scenario.newPV) - if scenario.shouldSucceed && err != nil { - t.Errorf("Test %q failed: Assume() returned error %v", name, err) - } - if !scenario.shouldSucceed && err == nil { - t.Errorf("Test %q failed: Assume() returned success but expected error", name) - } - - // Check that GetPV returns correct PV - expectedPV := scenario.newPV - if !scenario.shouldSucceed { - expectedPV = scenario.oldPV - } - if err := verifyPV(cache, scenario.oldPV.Name, expectedPV); err != nil { - t.Errorf("Failed to GetPV() after initial update: %v", err) - } - } -} - -func TestRestorePV(t *testing.T) { - logger, _ := ktesting.NewTestContext(t) - cache := NewPVAssumeCache(logger, nil) - - oldPV := makePV("pv1", "").withVersion("5").PersistentVolume - newPV := makePV("pv1", "").withVersion("5").PersistentVolume - - // Restore PV that doesn't exist - cache.Restore("nothing") - - // Add oldPV to cache - assumecache.AddTestObject(cache.AssumeCache, oldPV) - if err := verifyPV(cache, oldPV.Name, oldPV); err != nil { - t.Fatalf("Failed to GetPV() after initial update: %v", err) - } - - // Restore PV - cache.Restore(oldPV.Name) - if err := verifyPV(cache, oldPV.Name, oldPV); err != nil { - t.Fatalf("Failed to GetPV() after initial restore: %v", err) - } - - // Assume newPV - if err := cache.Assume(newPV); err != nil { - t.Fatalf("Assume() returned error %v", err) - } - if err := verifyPV(cache, oldPV.Name, newPV); err != nil { - t.Fatalf("Failed to GetPV() after Assume: %v", err) - } - - // Restore PV - cache.Restore(oldPV.Name) - if err := verifyPV(cache, oldPV.Name, oldPV); err != nil { - t.Fatalf("Failed to GetPV() after restore: %v", err) - } -} - -func TestBasicPVCache(t *testing.T) { - logger, _ := ktesting.NewTestContext(t) - cache := NewPVAssumeCache(logger, nil) - - // Get object that doesn't exist - pv, err := cache.GetPV("nothere") - if err == nil { - t.Errorf("GetPV() returned unexpected success") - } - if pv != nil { - t.Errorf("GetPV() returned unexpected PV %q", pv.Name) - } - - // Add a bunch of PVs - pvs := map[string]*v1.PersistentVolume{} - for i := 0; i < 10; i++ { - pv := makePV(fmt.Sprintf("test-pv%v", i), "").withVersion("1").PersistentVolume - pvs[pv.Name] = pv - assumecache.AddTestObject(cache.AssumeCache, pv) - } - - // List them - verifyListPVs(t, cache, pvs, "") - - // Update a PV - updatedPV := makePV("test-pv3", "").withVersion("2").PersistentVolume - pvs[updatedPV.Name] = updatedPV - assumecache.UpdateTestObject(cache.AssumeCache, updatedPV) - - // List them - verifyListPVs(t, cache, pvs, "") - - // Delete a PV - deletedPV := pvs["test-pv7"] - delete(pvs, deletedPV.Name) - assumecache.DeleteTestObject(cache.AssumeCache, deletedPV) - - // List them - verifyListPVs(t, cache, pvs, "") -} - -func TestPVCacheWithStorageClasses(t *testing.T) { +func TestPVAssumeCache(t *testing.T) { logger, _ := ktesting.NewTestContext(t) - cache := NewPVAssumeCache(logger, nil) - - // Add a bunch of PVs - pvs1 := map[string]*v1.PersistentVolume{} - for i := 0; i < 10; i++ { - pv := makePV(fmt.Sprintf("test-pv%v", i), "class1").withVersion("1").PersistentVolume - pvs1[pv.Name] = pv - assumecache.AddTestObject(cache.AssumeCache, pv) + informer := &testInformer{ + indexer: cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}), + t: t, } - - // Add a bunch of PVs - pvs2 := map[string]*v1.PersistentVolume{} - for i := 0; i < 10; i++ { - pv := makePV(fmt.Sprintf("test2-pv%v", i), "class2").withVersion("1").PersistentVolume - pvs2[pv.Name] = pv - assumecache.AddTestObject(cache.AssumeCache, pv) - } - - // List them - verifyListPVs(t, cache, pvs1, "class1") - verifyListPVs(t, cache, pvs2, "class2") - - // Update a PV - updatedPV := makePV("test-pv3", "class1").withVersion("2").PersistentVolume - pvs1[updatedPV.Name] = updatedPV - assumecache.UpdateTestObject(cache.AssumeCache, updatedPV) - - // List them - verifyListPVs(t, cache, pvs1, "class1") - verifyListPVs(t, cache, pvs2, "class2") - - // Delete a PV - deletedPV := pvs1["test-pv7"] - delete(pvs1, deletedPV.Name) - assumecache.DeleteTestObject(cache.AssumeCache, deletedPV) - - // List them - verifyListPVs(t, cache, pvs1, "class1") - verifyListPVs(t, cache, pvs2, "class2") -} - -func TestAssumeUpdatePVCache(t *testing.T) { - logger, _ := ktesting.NewTestContext(t) - cache := NewPVAssumeCache(logger, nil) - - pvName := "test-pv0" - - // Add a PV - pv := makePV(pvName, "").withVersion("1").PersistentVolume - assumecache.AddTestObject(cache.AssumeCache, pv) - if err := verifyPV(cache, pvName, pv); err != nil { - t.Fatalf("failed to get PV: %v", err) - } - - // Assume PV - newPV := pv.DeepCopy() - newPV.Spec.ClaimRef = &v1.ObjectReference{Name: "test-claim"} - if err := cache.Assume(newPV); err != nil { - t.Fatalf("failed to assume PV: %v", err) - } - if err := verifyPV(cache, pvName, newPV); err != nil { - t.Fatalf("failed to get PV after assume: %v", err) - } - - // Add old PV - assumecache.AddTestObject(cache.AssumeCache, pv) - if err := verifyPV(cache, pvName, newPV); err != nil { - t.Fatalf("failed to get PV after old PV added: %v", err) - } -} - -func makeClaim(name, version, namespace string) *v1.PersistentVolumeClaim { - return &v1.PersistentVolumeClaim{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: namespace, - ResourceVersion: version, - Annotations: map[string]string{}, - }, - } -} - -func verifyPVC(cache *PVCAssumeCache, pvcKey string, expectedPVC *v1.PersistentVolumeClaim) error { - pvc, err := cache.GetPVC(pvcKey) + cache, err := NewPVAssumeCache(logger, informer) if err != nil { - return err - } - if pvc != expectedPVC { - return fmt.Errorf("GetPVC() returned %p, expected %p", pvc, expectedPVC) + t.Fatalf("Failed to create PV cache: %v", err) } - return nil -} - -func TestAssumePVC(t *testing.T) { - logger, _ := ktesting.NewTestContext(t) - scenarios := map[string]struct { - oldPVC *v1.PersistentVolumeClaim - newPVC *v1.PersistentVolumeClaim - shouldSucceed bool - }{ - "success-same-version": { - oldPVC: makeClaim("pvc1", "5", "ns1"), - newPVC: makeClaim("pvc1", "5", "ns1"), - shouldSucceed: true, - }, - "success-new-higher-version": { - oldPVC: makeClaim("pvc1", "5", "ns1"), - newPVC: makeClaim("pvc1", "6", "ns1"), - shouldSucceed: true, - }, - "fail-old-not-found": { - oldPVC: makeClaim("pvc2", "5", "ns1"), - newPVC: makeClaim("pvc1", "5", "ns1"), - shouldSucceed: false, - }, - "fail-new-lower-version": { - oldPVC: makeClaim("pvc1", "5", "ns1"), - newPVC: makeClaim("pvc1", "4", "ns1"), - shouldSucceed: false, - }, - "fail-new-bad-version": { - oldPVC: makeClaim("pvc1", "5", "ns1"), - newPVC: makeClaim("pvc1", "a", "ns1"), - shouldSucceed: false, - }, - "fail-old-bad-version": { - oldPVC: makeClaim("pvc1", "a", "ns1"), - newPVC: makeClaim("pvc1", "5", "ns1"), - shouldSucceed: false, - }, - } - - for name, scenario := range scenarios { - cache := NewPVCAssumeCache(logger, nil) - - // Add oldPVC to cache - assumecache.AddTestObject(cache.AssumeCache, scenario.oldPVC) - if err := verifyPVC(cache, getPVCName(scenario.oldPVC), scenario.oldPVC); err != nil { - t.Errorf("Failed to GetPVC() after initial update: %v", err) - continue - } + informer.add(makePV("pv1", "sc1").withVersion("1").PersistentVolume) - // Assume newPVC - err := cache.Assume(scenario.newPVC) - if scenario.shouldSucceed && err != nil { - t.Errorf("Test %q failed: Assume() returned error %v", name, err) + verifyPVs := func(cache PVAssumeCache) { + pvs, err := cache.ListPVs("sc1") + if err != nil { + t.Fatalf("Failed to list PVs: %v", err) } - if !scenario.shouldSucceed && err == nil { - t.Errorf("Test %q failed: Assume() returned success but expected error", name) + if len(pvs) != 1 || pvs[0].Name != "pv1" { + t.Errorf("Unexpected PVs: %v", pvs) } - - // Check that GetPVC returns correct PVC - expectedPV := scenario.newPVC - if !scenario.shouldSucceed { - expectedPV = scenario.oldPVC - } - if err := verifyPVC(cache, getPVCName(scenario.oldPVC), expectedPV); err != nil { - t.Errorf("Failed to GetPVC() after initial update: %v", err) - } - } -} - -func TestRestorePVC(t *testing.T) { - logger, _ := ktesting.NewTestContext(t) - cache := NewPVCAssumeCache(logger, nil) - - oldPVC := makeClaim("pvc1", "5", "ns1") - newPVC := makeClaim("pvc1", "5", "ns1") - - // Restore PVC that doesn't exist - cache.Restore("nothing") - - // Add oldPVC to cache - assumecache.AddTestObject(cache.AssumeCache, oldPVC) - if err := verifyPVC(cache, getPVCName(oldPVC), oldPVC); err != nil { - t.Fatalf("Failed to GetPVC() after initial update: %v", err) } + verifyPVs(cache) - // Restore PVC - cache.Restore(getPVCName(oldPVC)) - if err := verifyPVC(cache, getPVCName(oldPVC), oldPVC); err != nil { - t.Fatalf("Failed to GetPVC() after initial restore: %v", err) - } - - // Assume newPVC - if err := cache.Assume(newPVC); err != nil { - t.Fatalf("Assume() returned error %v", err) - } - if err := verifyPVC(cache, getPVCName(oldPVC), newPVC); err != nil { - t.Fatalf("Failed to GetPVC() after Assume: %v", err) - } - - // Restore PVC - cache.Restore(getPVCName(oldPVC)) - if err := verifyPVC(cache, getPVCName(oldPVC), oldPVC); err != nil { - t.Fatalf("Failed to GetPVC() after restore: %v", err) - } -} - -func TestAssumeUpdatePVCCache(t *testing.T) { - logger, _ := ktesting.NewTestContext(t) - cache := NewPVCAssumeCache(logger, nil) - - pvcName := "test-pvc0" - pvcNamespace := "test-ns" - - // Add a PVC - pvc := makeClaim(pvcName, "1", pvcNamespace) - assumecache.AddTestObject(cache.AssumeCache, pvc) - if err := verifyPVC(cache, getPVCName(pvc), pvc); err != nil { - t.Fatalf("failed to get PVC: %v", err) - } - - // Assume PVC - newPVC := pvc.DeepCopy() - newPVC.Annotations[volume.AnnSelectedNode] = "test-node" - if err := cache.Assume(newPVC); err != nil { - t.Fatalf("failed to assume PVC: %v", err) - } - if err := verifyPVC(cache, getPVCName(pvc), newPVC); err != nil { - t.Fatalf("failed to get PVC after assume: %v", err) - } - - // Add old PVC - assumecache.AddTestObject(cache.AssumeCache, pvc) - if err := verifyPVC(cache, getPVCName(pvc), newPVC); err != nil { - t.Fatalf("failed to get PVC after old PVC added: %v", err) + // Shared informer + cache2, err := NewPVAssumeCache(logger, informer) + if err != nil { + t.Fatalf("Failed to create PV cache2: %v", err) } + verifyPVs(cache2) } diff --git a/pkg/scheduler/framework/plugins/volumebinding/binder.go b/pkg/scheduler/framework/plugins/volumebinding/binder.go index 9d376b644e024..f4c9a22fc1f0d 100644 --- a/pkg/scheduler/framework/plugins/volumebinding/binder.go +++ b/pkg/scheduler/framework/plugins/volumebinding/binder.go @@ -46,7 +46,6 @@ import ( v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/metrics" - "k8s.io/kubernetes/pkg/scheduler/util/assumecache" ) // ConflictReason is used for the special strings which explain why @@ -217,8 +216,8 @@ type volumeBinder struct { nodeLister corelisters.NodeLister csiNodeLister storagelisters.CSINodeLister - pvcCache *PVCAssumeCache - pvCache *PVAssumeCache + pvcCache PVCAssumeCache + pvCache PVAssumeCache // Amount of time to wait for the bind operation to succeed bindTimeout time.Duration @@ -253,7 +252,13 @@ func NewVolumeBinder( pvInformer coreinformers.PersistentVolumeInformer, storageClassInformer storageinformers.StorageClassInformer, capacityCheck CapacityCheck, - bindTimeout time.Duration) SchedulerVolumeBinder { + bindTimeout time.Duration) (SchedulerVolumeBinder, error) { + + pvcCache, err1 := NewPVCAssumeCache(logger, pvcInformer.Informer()) + pvCache, err2 := NewPVAssumeCache(logger, pvInformer.Informer()) + if err := errors.Join(err1, err2); err != nil { + return nil, err + } b := &volumeBinder{ kubeClient: kubeClient, enableVolumeAttributesClass: fts.EnableVolumeAttributesClass, @@ -262,8 +267,8 @@ func NewVolumeBinder( classLister: storageClassInformer.Lister(), nodeLister: nodeInformer.Lister(), csiNodeLister: csiNodeInformer.Lister(), - pvcCache: NewPVCAssumeCache(logger, pvcInformer.Informer()), - pvCache: NewPVAssumeCache(logger, pvInformer.Informer()), + pvcCache: pvcCache, + pvCache: pvCache, bindTimeout: bindTimeout, translator: csitrans.New(), } @@ -271,7 +276,7 @@ func NewVolumeBinder( b.csiDriverLister = capacityCheck.CSIDriverInformer.Lister() b.csiStorageCapacityLister = capacityCheck.CSIStorageCapacityInformer.Lister() - return b + return b, nil } // FindPodVolumes finds the matching PVs for PVCs and nodes to provision PVs @@ -620,12 +625,12 @@ func (b *volumeBinder) checkBindings(logger klog.Logger, pod *v1.Pod, bindings [ } for _, binding := range bindings { - pv, err := b.pvCache.GetAPIPV(binding.pv.Name) + pv, err := b.pvCache.GetAPIObj(binding.pv.Name) if err != nil { return false, fmt.Errorf("failed to check binding: %w", err) } - pvc, err := b.pvcCache.GetAPIPVC(getPVCName(binding.pvc)) + pvc, err := b.pvcCache.GetAPIObj(getPVCName(binding.pvc)) if err != nil { return false, fmt.Errorf("failed to check binding: %w", err) } @@ -658,7 +663,7 @@ func (b *volumeBinder) checkBindings(logger klog.Logger, pod *v1.Pod, bindings [ } for _, claim := range claimsToProvision { - pvc, err := b.pvcCache.GetAPIPVC(getPVCName(claim)) + pvc, err := b.pvcCache.GetAPIObj(getPVCName(claim)) if err != nil { return false, fmt.Errorf("failed to check provisioning pvc: %w", err) } @@ -683,9 +688,9 @@ func (b *volumeBinder) checkBindings(logger klog.Logger, pod *v1.Pod, bindings [ // If the PVC is bound to a PV, check its node affinity if pvc.Spec.VolumeName != "" { - pv, err := b.pvCache.GetAPIPV(pvc.Spec.VolumeName) + pv, err := b.pvCache.GetAPIObj(pvc.Spec.VolumeName) if err != nil { - if errors.Is(err, assumecache.ErrNotFound) { + if apierrors.IsNotFound(err) { // We tolerate NotFound error here, because PV is possibly // not found because of API delay, we can check next time. // And if PV does not exist because it's deleted, PVC will @@ -749,7 +754,7 @@ func (b *volumeBinder) isPVCBound(logger klog.Logger, namespace, pvcName string) }, } pvcKey := getPVCName(claim) - pvc, err := b.pvcCache.GetPVC(pvcKey) + pvc, err := b.pvcCache.Get(pvcKey) if err != nil || pvc == nil { return false, nil, fmt.Errorf("error getting PVC %q: %v", pvcKey, err) } @@ -822,7 +827,11 @@ func (b *volumeBinder) GetPodVolumeClaims(logger klog.Logger, pod *v1.Pod) (podV for _, pvc := range podVolumeClaims.unboundClaimsDelayBinding { // Get storage class name from each PVC storageClassName := volume.GetPersistentVolumeClaimClass(pvc) - podVolumeClaims.unboundVolumesDelayBinding[storageClassName] = b.pvCache.ListPVs(storageClassName) + pvs, err := b.pvCache.ListPVs(storageClassName) + if err != nil { + return nil, err + } + podVolumeClaims.unboundVolumesDelayBinding[storageClassName] = pvs } return podVolumeClaims, nil } @@ -836,9 +845,9 @@ func (b *volumeBinder) checkBoundClaims(logger klog.Logger, claims []*v1.Persist for _, pvc := range claims { pvName := pvc.Spec.VolumeName - pv, err := b.pvCache.GetPV(pvName) + pv, err := b.pvCache.Get(pvName) if err != nil { - if errors.Is(err, assumecache.ErrNotFound) { + if apierrors.IsNotFound(err) { err = nil } return true, false, err @@ -954,13 +963,13 @@ func (b *volumeBinder) checkVolumeProvisions(logger klog.Logger, pod *v1.Pod, cl func (b *volumeBinder) revertAssumedPVs(bindings []*BindingInfo) { for _, BindingInfo := range bindings { - b.pvCache.Restore(BindingInfo.pv.Name) + b.pvCache.Restore(BindingInfo.pv) } } func (b *volumeBinder) revertAssumedPVCs(claims []*v1.PersistentVolumeClaim) { for _, claim := range claims { - b.pvcCache.Restore(getPVCName(claim)) + b.pvcCache.Restore(claim) } } diff --git a/pkg/scheduler/framework/plugins/volumebinding/binder_test.go b/pkg/scheduler/framework/plugins/volumebinding/binder_test.go index 638e820c7d052..1273c10a6f7e4 100644 --- a/pkg/scheduler/framework/plugins/volumebinding/binder_test.go +++ b/pkg/scheduler/framework/plugins/volumebinding/binder_test.go @@ -46,7 +46,6 @@ import ( "k8s.io/kubernetes/pkg/controller" pvtesting "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/testing" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" - "k8s.io/kubernetes/pkg/scheduler/util/assumecache" ) var ( @@ -170,7 +169,7 @@ func newTestBinder(t *testing.T, ctx context.Context) *testEnv { CSIDriverInformer: csiDriverInformer, CSIStorageCapacityInformer: csiStorageCapacityInformer, } - binder := NewVolumeBinder( + binder, err := NewVolumeBinder( logger, client, feature.Features{}, @@ -182,6 +181,9 @@ func newTestBinder(t *testing.T, ctx context.Context) *testEnv { classInformer, capacityCheck, 10*time.Second) + if err != nil { + t.Fatalf("Failed to create VolumeBinder: %v", err) + } // Wait for informers cache sync informerFactory.Start(ctx.Done()) @@ -296,9 +298,11 @@ func (env *testEnv) addCSIStorageCapacities(capacities []*storagev1.CSIStorageCa } } -func (env *testEnv) initClaims(cachedPVCs []*v1.PersistentVolumeClaim, apiPVCs []*v1.PersistentVolumeClaim) { +func (env *testEnv) initClaims(t *testing.T, cachedPVCs []*v1.PersistentVolumeClaim, apiPVCs []*v1.PersistentVolumeClaim) { for _, pvc := range cachedPVCs { - assumecache.AddTestObject(env.internalBinder.pvcCache.AssumeCache, pvc) + if err := env.internalBinder.pvcCache.store.Add(pvc); err != nil { + t.Fatalf("error adding PVC %s/%s to cache: %v", pvc.Namespace, pvc.Name, err) + } if apiPVCs == nil { env.reactor.AddClaim(pvc) } @@ -308,9 +312,11 @@ func (env *testEnv) initClaims(cachedPVCs []*v1.PersistentVolumeClaim, apiPVCs [ } } -func (env *testEnv) initVolumes(cachedPVs []*v1.PersistentVolume, apiPVs []*v1.PersistentVolume) { +func (env *testEnv) initVolumes(t *testing.T, cachedPVs []*v1.PersistentVolume, apiPVs []*v1.PersistentVolume) { for _, pv := range cachedPVs { - assumecache.AddTestObject(env.internalBinder.pvCache.AssumeCache, pv) + if err := env.internalBinder.pvCache.store.Add(pv); err != nil { + t.Fatalf("error adding PV %s to cache: %v", pv.Name, err) + } if apiPVs == nil { env.reactor.AddVolume(pv) } @@ -318,7 +324,6 @@ func (env *testEnv) initVolumes(cachedPVs []*v1.PersistentVolume, apiPVs []*v1.P for _, pv := range apiPVs { env.reactor.AddVolume(pv) } - } func (env *testEnv) updateVolumes(ctx context.Context, pvs []*v1.PersistentVolume) error { @@ -331,14 +336,10 @@ func (env *testEnv) updateVolumes(ctx context.Context, pvs []*v1.PersistentVolum } return wait.PollUntilContextTimeout(ctx, 100*time.Millisecond, 3*time.Second, false, func(ctx context.Context) (bool, error) { for _, pv := range pvs { - obj, err := env.internalBinder.pvCache.GetAPIObj(pv.Name) - if obj == nil || err != nil { + pvInCache, err := env.internalBinder.pvCache.GetAPIObj(pv.Name) + if pvInCache == nil || err != nil { return false, nil } - pvInCache, ok := obj.(*v1.PersistentVolume) - if !ok { - return false, fmt.Errorf("PV %s invalid object", pvInCache.Name) - } if versioner.CompareResourceVersion(pvInCache, pv) != 0 { return false, nil } @@ -357,14 +358,10 @@ func (env *testEnv) updateClaims(ctx context.Context, pvcs []*v1.PersistentVolum } return wait.PollUntilContextTimeout(ctx, 100*time.Millisecond, 3*time.Second, false, func(ctx context.Context) (bool, error) { for _, pvc := range pvcs { - obj, err := env.internalBinder.pvcCache.GetAPIObj(getPVCName(pvc)) - if obj == nil || err != nil { + pvcInCache, err := env.internalBinder.pvcCache.GetAPIObj(getPVCName(pvc)) + if pvcInCache == nil || err != nil { return false, nil } - pvcInCache, ok := obj.(*v1.PersistentVolumeClaim) - if !ok { - return false, fmt.Errorf("PVC %s invalid object", pvcInCache.Name) - } if versioner.CompareResourceVersion(pvcInCache, pvc) != 0 { return false, nil } @@ -373,15 +370,19 @@ func (env *testEnv) updateClaims(ctx context.Context, pvcs []*v1.PersistentVolum }) } -func (env *testEnv) deleteVolumes(pvs []*v1.PersistentVolume) { +func (env *testEnv) deleteVolumes(t *testing.T, pvs []*v1.PersistentVolume) { for _, pv := range pvs { - assumecache.DeleteTestObject(env.internalBinder.pvCache.AssumeCache, pv) + if err := env.internalBinder.pvCache.store.Delete(pv); err != nil { + t.Fatalf("Error deleting PV %s: %v", pv.Name, err) + } } } -func (env *testEnv) deleteClaims(pvcs []*v1.PersistentVolumeClaim) { +func (env *testEnv) deleteClaims(t *testing.T, pvcs []*v1.PersistentVolumeClaim) { for _, pvc := range pvcs { - assumecache.DeleteTestObject(env.internalBinder.pvcCache.AssumeCache, pvc) + if err := env.internalBinder.pvcCache.store.Delete(pvc); err != nil { + t.Fatalf("Error deleting PVC %s/%s: %v", pvc.Namespace, pvc.Name, err) + } } } @@ -453,9 +454,9 @@ func (env *testEnv) validateAssume(t *testing.T, pod *v1.Pod, bindings []*Bindin // Check pv cache pvCache := env.internalBinder.pvCache for _, b := range bindings { - pv, err := pvCache.GetPV(b.pv.Name) + pv, err := pvCache.Get(b.pv.Name) if err != nil { - t.Errorf("GetPV %q returned error: %v", b.pv.Name, err) + t.Errorf("Get PV %q returned error: %v", b.pv.Name, err) continue } if pv.Spec.ClaimRef == nil { @@ -474,9 +475,9 @@ func (env *testEnv) validateAssume(t *testing.T, pod *v1.Pod, bindings []*Bindin pvcCache := env.internalBinder.pvcCache for _, p := range provisionings { pvcKey := getPVCName(p) - pvc, err := pvcCache.GetPVC(pvcKey) + pvc, err := pvcCache.Get(pvcKey) if err != nil { - t.Errorf("GetPVC %q returned error: %v", pvcKey, err) + t.Errorf("Get PVC %q returned error: %v", pvcKey, err) continue } if pvc.Annotations[volume.AnnSelectedNode] != nodeLabelValue { @@ -489,8 +490,8 @@ func (env *testEnv) validateCacheRestored(t *testing.T, pod *v1.Pod, bindings [] // All PVs have been unmodified in cache pvCache := env.internalBinder.pvCache for _, b := range bindings { - pv, _ := pvCache.GetPV(b.pv.Name) - apiPV, _ := pvCache.GetAPIPV(b.pv.Name) + pv, _ := pvCache.Get(b.pv.Name) + apiPV, _ := pvCache.GetAPIObj(b.pv.Name) // PV could be nil if it's missing from cache if pv != nil && pv != apiPV { t.Errorf("PV %q was modified in cache", b.pv.Name) @@ -501,9 +502,9 @@ func (env *testEnv) validateCacheRestored(t *testing.T, pod *v1.Pod, bindings [] pvcCache := env.internalBinder.pvcCache for _, p := range provisionings { pvcKey := getPVCName(p) - pvc, err := pvcCache.GetPVC(pvcKey) + pvc, err := pvcCache.Get(pvcKey) if err != nil { - t.Errorf("GetPVC %q returned error: %v", pvcKey, err) + t.Errorf("Get PVC %q returned error: %v", pvcKey, err) continue } if pvc.Annotations[volume.AnnSelectedNode] != "" { @@ -521,9 +522,9 @@ func (env *testEnv) validateBind( // Check pv cache pvCache := env.internalBinder.pvCache for _, pv := range expectedPVs { - cachedPV, err := pvCache.GetPV(pv.Name) + cachedPV, err := pvCache.Get(pv.Name) if err != nil { - t.Errorf("GetPV %q returned error: %v", pv.Name, err) + t.Errorf("Get PV %q returned error: %v", pv.Name, err) } // Cache may be overridden by API object with higher version, compare but ignore resource version. newCachedPV := cachedPV.DeepCopy() @@ -548,9 +549,9 @@ func (env *testEnv) validateProvision( // Check pvc cache pvcCache := env.internalBinder.pvcCache for _, pvc := range expectedPVCs { - cachedPVC, err := pvcCache.GetPVC(getPVCName(pvc)) + cachedPVC, err := pvcCache.Get(getPVCName(pvc)) if err != nil { - t.Errorf("GetPVC %q returned error: %v", getPVCName(pvc), err) + t.Errorf("Get PVC %q returned error: %v", getPVCName(pvc), err) } // Cache may be overridden by API object with higher version, compare but ignore resource version. newCachedPVC := cachedPVC.DeepCopy() @@ -986,7 +987,7 @@ func TestFindPodVolumesWithoutProvisioning(t *testing.T) { // Setup testEnv := newTestBinder(t, ctx) - testEnv.initVolumes(scenario.pvs, scenario.pvs) + testEnv.initVolumes(t, scenario.pvs, scenario.pvs) if csiDriver != nil { testEnv.addCSIDriver(csiDriver) } @@ -995,7 +996,7 @@ func TestFindPodVolumesWithoutProvisioning(t *testing.T) { if scenario.cachePVCs == nil { scenario.cachePVCs = scenario.podPVCs } - testEnv.initClaims(scenario.cachePVCs, scenario.cachePVCs) + testEnv.initClaims(t, scenario.cachePVCs, scenario.cachePVCs) // b. Generate pod with given claims if scenario.pod == nil { @@ -1114,7 +1115,7 @@ func TestFindPodVolumesWithProvisioning(t *testing.T) { // Setup testEnv := newTestBinder(t, ctx) - testEnv.initVolumes(scenario.pvs, scenario.pvs) + testEnv.initVolumes(t, scenario.pvs, scenario.pvs) if csiDriver != nil { testEnv.addCSIDriver(csiDriver) } @@ -1123,7 +1124,7 @@ func TestFindPodVolumesWithProvisioning(t *testing.T) { if scenario.cachePVCs == nil { scenario.cachePVCs = scenario.podPVCs } - testEnv.initClaims(scenario.cachePVCs, scenario.cachePVCs) + testEnv.initClaims(t, scenario.cachePVCs, scenario.cachePVCs) // b. Generate pod with given claims if scenario.pod == nil { @@ -1222,7 +1223,7 @@ func TestFindPodVolumesWithCSIMigration(t *testing.T) { // Setup testEnv := newTestBinder(t, ctx) - testEnv.initVolumes(scenario.pvs, scenario.pvs) + testEnv.initVolumes(t, scenario.pvs, scenario.pvs) var node *v1.Node if len(scenario.initNodes) > 0 { @@ -1240,7 +1241,7 @@ func TestFindPodVolumesWithCSIMigration(t *testing.T) { if scenario.cachePVCs == nil { scenario.cachePVCs = scenario.podPVCs } - testEnv.initClaims(scenario.cachePVCs, scenario.cachePVCs) + testEnv.initClaims(t, scenario.cachePVCs, scenario.cachePVCs) // b. Generate pod with given claims if scenario.pod == nil { @@ -1340,7 +1341,7 @@ func TestAssumePodVolumes(t *testing.T) { // Setup testEnv := newTestBinder(t, ctx) - testEnv.initClaims(scenario.podPVCs, scenario.podPVCs) + testEnv.initClaims(t, scenario.podPVCs, scenario.podPVCs) pod := makePod("test-pod"). withNamespace("testns"). withNodeName("node1"). @@ -1349,7 +1350,7 @@ func TestAssumePodVolumes(t *testing.T) { StaticBindings: scenario.bindings, DynamicProvisions: scenario.dynamicProvisions, } - testEnv.initVolumes(scenario.pvs, scenario.pvs) + testEnv.initVolumes(t, scenario.pvs, scenario.pvs) // Execute allBound, err := testEnv.binder.AssumePodVolumes(logger, pod, "node1", podVolumes) @@ -1399,7 +1400,7 @@ func TestRevertAssumedPodVolumes(t *testing.T) { // Setup testEnv := newTestBinder(t, ctx) - testEnv.initClaims(podPVCs, podPVCs) + testEnv.initClaims(t, podPVCs, podPVCs) pod := makePod("test-pod"). withNamespace("testns"). withNodeName("node1"). @@ -1408,7 +1409,7 @@ func TestRevertAssumedPodVolumes(t *testing.T) { StaticBindings: bindings, DynamicProvisions: dynamicProvisions, } - testEnv.initVolumes(pvs, pvs) + testEnv.initVolumes(t, pvs, pvs) allbound, err := testEnv.binder.AssumePodVolumes(logger, pod, "node1", podVolumes) if allbound || err != nil { @@ -1531,8 +1532,8 @@ func TestBindAPIUpdate(t *testing.T) { if scenario.apiPVCs == nil { scenario.apiPVCs = scenario.cachedPVCs } - testEnv.initVolumes(scenario.cachedPVs, scenario.apiPVs) - testEnv.initClaims(scenario.cachedPVCs, scenario.apiPVCs) + testEnv.initVolumes(t, scenario.cachedPVs, scenario.apiPVs) + testEnv.initClaims(t, scenario.cachedPVCs, scenario.apiPVCs) testEnv.assumeVolumes(t, "node1", pod, scenario.bindings, scenario.provisionedPVCs) // Execute @@ -1725,20 +1726,20 @@ func TestCheckBindings(t *testing.T) { testEnv := newTestBinder(t, ctx) testEnv.internalPodInformer.Informer().GetIndexer().Add(pod) testEnv.initNodes([]*v1.Node{node1}) - testEnv.initVolumes(scenario.initPVs, nil) - testEnv.initClaims(scenario.initPVCs, nil) + testEnv.initVolumes(t, scenario.initPVs, nil) + testEnv.initClaims(t, scenario.initPVCs, nil) testEnv.assumeVolumes(t, "node1", pod, scenario.bindings, scenario.provisionedPVCs) // Before execute if scenario.deletePVs { - testEnv.deleteVolumes(scenario.initPVs) + testEnv.deleteVolumes(t, scenario.initPVs) } else { if err := testEnv.updateVolumes(ctx, scenario.apiPVs); err != nil { t.Errorf("Failed to update PVs: %v", err) } } if scenario.deletePVCs { - testEnv.deleteClaims(scenario.initPVCs) + testEnv.deleteClaims(t, scenario.initPVCs) } else { if err := testEnv.updateClaims(ctx, scenario.apiPVCs); err != nil { t.Errorf("Failed to update PVCs: %v", err) @@ -1853,8 +1854,8 @@ func TestCheckBindingsWithCSIMigration(t *testing.T) { testEnv.internalPodInformer.Informer().GetIndexer().Add(pod) testEnv.initNodes(scenario.initNodes) testEnv.initCSINodes(scenario.initCSINodes) - testEnv.initVolumes(scenario.initPVs, nil) - testEnv.initClaims(scenario.initPVCs, nil) + testEnv.initVolumes(t, scenario.initPVs, nil) + testEnv.initClaims(t, scenario.initPVCs, nil) testEnv.assumeVolumes(t, "node1", pod, scenario.bindings, scenario.provisionedPVCs) // Before execute @@ -2054,8 +2055,8 @@ func TestBindPodVolumes(t *testing.T) { claimsToProvision = []*v1.PersistentVolumeClaim{scenario.claimToProvision} } testEnv.initNodes(scenario.nodes) - testEnv.initVolumes(scenario.initPVs, scenario.initPVs) - testEnv.initClaims(scenario.initPVCs, scenario.initPVCs) + testEnv.initVolumes(t, scenario.initPVs, scenario.initPVs) + testEnv.initClaims(t, scenario.initPVCs, scenario.initPVCs) testEnv.assumeVolumes(t, "node1", pod, bindings, claimsToProvision) } @@ -2121,8 +2122,8 @@ func TestFindAssumeVolumes(t *testing.T) { ctx, cancel := context.WithCancel(ctx) defer cancel() testEnv := newTestBinder(t, ctx) - testEnv.initVolumes(pvs, pvs) - testEnv.initClaims(podPVCs, podPVCs) + testEnv.initVolumes(t, pvs, pvs) + testEnv.initClaims(t, podPVCs, podPVCs) pod := makePod("test-pod"). withNamespace("testns"). withNodeName("node1"). @@ -2141,20 +2142,20 @@ func TestFindAssumeVolumes(t *testing.T) { // 1. Find matching PVs podVolumes, reasons, err := findPodVolumes(logger, testEnv.binder, pod, testNode) if err != nil { - t.Errorf("Test failed: FindPodVolumes returned error: %v", err) + t.Fatalf("Test failed: FindPodVolumes returned error: %v", err) } if len(reasons) > 0 { - t.Errorf("Test failed: couldn't find PVs for all PVCs: %v", reasons) + t.Fatalf("Test failed: couldn't find PVs for all PVCs: %v", reasons) } expectedBindings := podVolumes.StaticBindings // 2. Assume matches allBound, err := testEnv.binder.AssumePodVolumes(logger, pod, testNode.Name, podVolumes) if err != nil { - t.Errorf("Test failed: AssumePodVolumes returned error: %v", err) + t.Fatalf("Test failed: AssumePodVolumes returned error: %v", err) } if allBound { - t.Errorf("Test failed: detected unbound volumes as bound") + t.Fatalf("Test failed: detected unbound volumes as bound") } testEnv.validateAssume(t, pod, expectedBindings, nil) @@ -2167,10 +2168,10 @@ func TestFindAssumeVolumes(t *testing.T) { for i := 0; i < 50; i++ { podVolumes, reasons, err := findPodVolumes(logger, testEnv.binder, pod, testNode) if err != nil { - t.Errorf("Test failed: FindPodVolumes returned error: %v", err) + t.Fatalf("Test failed: FindPodVolumes returned error: %v", err) } if len(reasons) > 0 { - t.Errorf("Test failed: couldn't find PVs for all PVCs: %v", reasons) + t.Fatalf("Test failed: couldn't find PVs for all PVCs: %v", reasons) } testEnv.validatePodCache(t, testNode.Name, pod, podVolumes, expectedBindings, nil) } @@ -2297,7 +2298,7 @@ func TestCapacity(t *testing.T) { testEnv.addCSIStorageCapacities(scenario.capacities) // a. Init pvc cache - testEnv.initClaims(scenario.pvcs, scenario.pvcs) + testEnv.initClaims(t, scenario.pvcs, scenario.pvcs) // b. Generate pod with given claims pod := makePod("test-pod"). diff --git a/pkg/scheduler/framework/plugins/volumebinding/passive_assume_cache.go b/pkg/scheduler/framework/plugins/volumebinding/passive_assume_cache.go new file mode 100644 index 0000000000000..e27d74b40c881 --- /dev/null +++ b/pkg/scheduler/framework/plugins/volumebinding/passive_assume_cache.go @@ -0,0 +1,256 @@ +/* +Copyright 2025 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 volumebinding + +import ( + "fmt" + "sync" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/tools/cache" + "k8s.io/klog/v2" +) + +// informer is the subset of [cache.SharedInformer] that newAssumeCache depends upon. +type informer interface { + AddEventHandler(handler cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error) + GetIndexer() cache.Indexer +} + +// passiveAssumeCache is a cache on top of the informer that allows for updating +// objects outside of informer events and also restoring the informer +// cache's version of the object. +// +// An informer update always overrides the assumed object. +// +// This is different from pkg/scheduler/util/assumecache in: +// - this does not dispatch events +// - this is always up-to-date with the informer +// - this only allow assuming objects yet to be sent to the apiserver, +// not the ones returned from the apiserver +type passiveAssumeCache[T v1.Object] struct { + // The logger that was chosen when setting up the cache. + // Will be used for all operations. + logger klog.Logger + gr schema.GroupResource + + // Synchronizes updates to all fields below. + // Although [store] have its own lock, we still need to hold our lock + // before reading from either [store] or [assumed] if we compare + // ResourceVersion between them. + rwMutex sync.RWMutex + + // Objects from informer + store cache.Indexer + assumed map[string]T +} + +// newAssumeCache creates an assume cache for objects of type T. +func newAssumeCache[T v1.Object](logger klog.Logger, informer informer, gr schema.GroupResource) (*passiveAssumeCache[T], error) { + c := &passiveAssumeCache[T]{ + logger: logger, + gr: gr, + store: informer.GetIndexer(), + assumed: make(map[string]T), + } + + _, err := informer.AddEventHandler( + cache.ResourceEventHandlerFuncs{ + AddFunc: c.add, + UpdateFunc: c.update, + DeleteFunc: c.delete, + }, + ) + return c, err +} + +// Receives events from informer. May expire the assumed object if it is older. +func (c *passiveAssumeCache[T]) mayExpire(key string) { + c.rwMutex.Lock() + defer c.rwMutex.Unlock() + + assumed, ok := c.assumed[key] + if !ok { + return + } + + // Get the latest version to avoid overwriting newer object from [Assume] + obj, exists, err := c.store.GetByKey(key) + if err != nil { + utilruntime.HandleErrorWithLogger(c.logger, err, "mayExpire get", "key", key) + return + } + + expire := true + if exists { + newMeta, err := meta.Accessor(obj) + if err != nil { + utilruntime.HandleErrorWithLogger(c.logger, err, "mayExpire meta", "key", key) + return + } + + // Only overwrite assumed object if version is newer (not resync). + if assumed.GetResourceVersion() == newMeta.GetResourceVersion() { + c.logger.V(10).Info("ignoring resync of assumed object", "key", key, "version", assumed.GetResourceVersion()) + expire = false + } else { + c.logger.V(4).Info("assumed object expired", "newVersion", newMeta.GetResourceVersion(), + "key", key, "version", assumed.GetResourceVersion()) + } + } else { + c.logger.V(4).Info("assumed object expired", "key", key, "version", assumed.GetResourceVersion()) + } + if expire { + delete(c.assumed, key) + } +} + +func (c *passiveAssumeCache[T]) add(obj any) { + key, err := cache.MetaNamespaceKeyFunc(obj) + if err != nil { + utilruntime.HandleErrorWithLogger(c.logger, err, "Add object get key") + return + } + c.mayExpire(key) +} + +func (c *passiveAssumeCache[T]) update(_, obj any) { + c.add(obj) +} + +func (c *passiveAssumeCache[T]) delete(obj any) { + key, err := cache.DeletionHandlingMetaNamespaceKeyFunc(obj) + if err != nil { + utilruntime.HandleErrorWithLogger(c.logger, err, "Delete object get key") + return + } + c.mayExpire(key) +} + +// ByIndex returns the stored objects whose set of indexed values for the named index includes the given indexed value +// +// The index is evaluated on the object from store. Objects from [Assume] will present in the result but will not affect the index. +func (c *passiveAssumeCache[T]) ByIndex(indexName, indexedValue string) ([]T, error) { + c.rwMutex.RLock() + defer c.rwMutex.RUnlock() + + objs, err := c.store.ByIndex(indexName, indexedValue) + if err != nil { + return nil, err + } + return c.replaceAssumed(objs), nil +} + +// Get the object by its key. +func (c *passiveAssumeCache[T]) Get(key string) (T, error) { + c.rwMutex.RLock() + defer c.rwMutex.RUnlock() + + obj, err := c.GetAPIObj(key) + if err != nil { + return obj, err + } + + assumed, ok := c.assumed[key] + if !ok || assumed.GetResourceVersion() != obj.GetResourceVersion() { // not assumed or Informer object is newer + return obj, nil + } + return assumed, nil +} + +// GetAPIObj gets the informer cache's version by its key. +func (c *passiveAssumeCache[T]) GetAPIObj(key string) (T, error) { + obj, ok, err := c.store.GetByKey(key) + var zero T + if err != nil { + return zero, err + } + if !ok { + return zero, apierrors.NewNotFound(c.gr, key) + } + v, ok := obj.(T) + if !ok { + return zero, fmt.Errorf("object is not of type %T", zero) + } + return v, nil +} + +func keyOf[T v1.Object](obj T) string { + return cache.MetaObjectToName(obj).String() +} + +func (c *passiveAssumeCache[T]) replaceAssumed(objs []any) []T { + allObjs := make([]T, 0, len(objs)) + for _, obj := range objs { + v, ok := obj.(T) + if !ok { + utilruntime.HandleErrorWithLogger(c.logger, nil, "listed object has wrong type", "type", fmt.Sprintf("%T", obj)) + continue + } + assumed, ok := c.assumed[keyOf(v)] + if ok && assumed.GetResourceVersion() == v.GetResourceVersion() { + // assumed object is not in informer yet + v = assumed + } + allObjs = append(allObjs, v) + } + return allObjs +} + +// Assume updates the object in-memory only. +// +// The version of the object must be equal to +// the current object, otherwise an error is returned. +// If an update is received via the informer while such an +// object is assumed, it gets dropped in favor of the +// newer object from the apiserver. +func (c *passiveAssumeCache[T]) Assume(obj T) error { + key := keyOf(obj) + + c.rwMutex.Lock() + defer c.rwMutex.Unlock() + + stored, err := c.GetAPIObj(key) + if err != nil { + return err + } + + if stored.GetResourceVersion() != obj.GetResourceVersion() { + return fmt.Errorf("%q is out of sync (stored: %s, assume: %s)", key, stored.GetResourceVersion(), obj.GetResourceVersion()) + } + c.assumed[key] = obj + c.logger.V(4).Info("Assumed object", "key", key, "version", obj.GetResourceVersion()) + return nil +} + +// Restore the informer cache's version of the object. +func (c *passiveAssumeCache[T]) Restore(obj T) { + key := keyOf(obj) + + c.rwMutex.Lock() + defer c.rwMutex.Unlock() + + assumed, ok := c.assumed[key] + if ok && assumed.GetResourceVersion() == obj.GetResourceVersion() { + delete(c.assumed, key) + c.logger.V(4).Info("Restored object", "key", key, "version", obj.GetResourceVersion()) + } +} diff --git a/pkg/scheduler/framework/plugins/volumebinding/passive_assume_cache_test.go b/pkg/scheduler/framework/plugins/volumebinding/passive_assume_cache_test.go new file mode 100644 index 0000000000000..ab6e2608e79a5 --- /dev/null +++ b/pkg/scheduler/framework/plugins/volumebinding/passive_assume_cache_test.go @@ -0,0 +1,404 @@ +/* +Copyright 2017 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 volumebinding + +import ( + "fmt" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/tools/cache" + "k8s.io/component-helpers/storage/volume" + "k8s.io/klog/v2/ktesting" +) + +// sufficient for one assume cache. +type testInformer struct { + handler cache.ResourceEventHandler + indexer cache.Indexer + t *testing.T +} + +func (i *testInformer) AddEventHandler(handler cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error) { + i.handler = handler + return nil, nil +} + +func (i *testInformer) GetIndexer() cache.Indexer { + return i.indexer +} + +func (i *testInformer) add(obj interface{}) { + if err := i.indexer.Add(obj); err != nil { + i.t.Fatalf("failed to add object into indexer: %v", err) + } + i.handler.OnAdd(obj, false) +} + +func (i *testInformer) update(oldObj, obj interface{}) { + if err := i.indexer.Update(obj); err != nil { + i.t.Fatalf("failed to update object to indexer: %v", err) + } + i.handler.OnUpdate(oldObj, obj) +} + +func (i *testInformer) delete(obj interface{}) { + if err := i.indexer.Delete(obj); err != nil { + i.t.Fatalf("failed to delete object from indexer: %v", err) + } + i.handler.OnDelete(obj) +} + +func verifyList(t *testing.T, cache testCache, expected map[string]*testObj, indexedValue string) { + t.Helper() + got, err := cache.ByIndex(testIndex, indexedValue) + if err != nil { + t.Fatalf("failed to get indexed objects: %v", err) + } + if len(got) != len(expected) { + t.Errorf("ByIndex() returned %v objects, expected %v", len(got), len(expected)) + } + for _, obj := range got { + expected, ok := expected[obj.Name] + if !ok { + t.Errorf("ByIndex() returned unexpected object %q", obj.Name) + } + if expected != obj { + t.Errorf("ByIndex() returned object %p, expected %p", obj, expected) + } + } +} + +func TestBasicCache(t *testing.T) { + informer, cache := newTestCache(t) + + // Get object that doesn't exist + obj, err := cache.Get("nothere") + if err == nil { + t.Errorf("Get() returned unexpected success") + } + if obj != nil { + t.Errorf("Get() returned unexpected PV %q", obj.Name) + } + + // Add a bunch of objects + objects := map[string]*testObj{} + for i := range 10 { + obj := makeObj(fmt.Sprintf("test-%v", i), "1", "") + objects[obj.Name] = obj + informer.add(obj) + } + + // List them + verifyList(t, cache, objects, "") + + // Update an object + updated := makeObj("test-3", "1", "") + informer.update(objects["test-3"], updated) + objects[updated.Name] = updated + + // List them + verifyList(t, cache, objects, "") + + // Delete an object + deleted := objects["test-7"] + delete(objects, deleted.Name) + informer.delete(deleted) + + // List them + verifyList(t, cache, objects, "") +} + +func TestPVCacheWithIndex(t *testing.T) { + informer, cache := newTestCache(t) + + // Add a bunch of objects + objects1 := map[string]*testObj{} + for i := range 10 { + obj := makeObj(fmt.Sprintf("test-%v", i), "1", "") + obj.Annotations["test"] = "test1" + objects1[obj.Name] = obj + informer.add(obj) + } + + // Add a bunch of objects + objects2 := map[string]*testObj{} + for i := range 10 { + obj := makeObj(fmt.Sprintf("test2-%v", i), "1", "") + obj.Annotations["test"] = "test2" + objects2[obj.Name] = obj + informer.add(obj) + } + + // List them + verifyList(t, cache, objects1, "test1") + verifyList(t, cache, objects2, "test2") + + // Update an object + updated := makeObj("test-3", "2", "") + updated.Annotations["test"] = "test1" + informer.update(objects1[updated.Name], updated) + objects1[updated.Name] = updated + + // List them + verifyList(t, cache, objects1, "test1") + verifyList(t, cache, objects2, "test2") + + // Delete an object + deletedPV := objects1["test-7"] + delete(objects1, deletedPV.Name) + informer.delete(deletedPV) + + // List them + verifyList(t, cache, objects1, "test1") + verifyList(t, cache, objects2, "test2") +} + +type testObj = metav1.ObjectMeta + +func makeObj(name, version, namespace string) *testObj { + return &testObj{ + Name: name, + Namespace: namespace, + ResourceVersion: version, + Annotations: map[string]string{}, + } +} + +type testCache = *passiveAssumeCache[*testObj] + +func verifyObj(cache testCache, key string, expected *testObj) error { + obj, err := cache.Get(key) + if err != nil { + return err + } + if obj != expected { + return fmt.Errorf("Get() returned %p, expected %p", obj, expected) + } + return nil +} + +const testIndex = "testIndex" + +func newTestCache(t *testing.T) (*testInformer, testCache) { + logger, _ := ktesting.NewTestContext(t) + informer := &testInformer{ + indexer: cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{ + testIndex: func(obj interface{}) ([]string, error) { + return []string{obj.(*testObj).Annotations["test"]}, nil + }, + }), + t: t, + } + cache, err := newAssumeCache[*testObj](logger, informer, schema.GroupResource{Resource: "tests"}) + if err != nil { + t.Fatalf("newAssumeCache() failed: %v", err) + } + return informer, cache +} + +func TestAssume(t *testing.T) { + scenarios := map[string]struct { + old *testObj + new *testObj + shouldSucceed bool + }{ + "success-same-version": { + old: makeObj("pvc1", "5", "ns1"), + new: makeObj("pvc1", "5", "ns1"), + shouldSucceed: true, + }, + "fail-new-higher-version": { + old: makeObj("pvc1", "5", "ns1"), + new: makeObj("pvc1", "6", "ns1"), + shouldSucceed: false, + }, + "fail-old-not-found": { + old: makeObj("pvc2", "5", "ns1"), + new: makeObj("pvc1", "5", "ns1"), + shouldSucceed: false, + }, + "fail-new-lower-version": { + old: makeObj("pvc1", "5", "ns1"), + new: makeObj("pvc1", "4", "ns1"), + shouldSucceed: false, + }, + "fail-new-bad-version": { + old: makeObj("pvc1", "5", "ns1"), + new: makeObj("pvc1", "a", "ns1"), + shouldSucceed: false, + }, + "fail-old-bad-version": { + old: makeObj("pvc1", "a", "ns1"), + new: makeObj("pvc1", "5", "ns1"), + shouldSucceed: false, + }, + } + + for name, scenario := range scenarios { + t.Run(name, func(t *testing.T) { + informer, cache := newTestCache(t) + + // Add old to cache + informer.add(scenario.old) + if err := verifyObj(cache, keyOf(scenario.old), scenario.old); err != nil { + t.Fatalf("Failed to Get() after initial update: %v", err) + } + + // Assume new + err := cache.Assume(scenario.new) + if scenario.shouldSucceed && err != nil { + t.Errorf("Test %q failed: Assume() returned error %v", name, err) + } + if !scenario.shouldSucceed && err == nil { + t.Errorf("Test %q failed: Assume() returned success but expected error", name) + } + + // Check that Get returns correct version + expectedPV := scenario.new + if !scenario.shouldSucceed { + expectedPV = scenario.old + } + if err := verifyObj(cache, keyOf(scenario.old), expectedPV); err != nil { + t.Errorf("Failed to Get() after initial update: %v", err) + } + }) + } +} + +func TestRestore(t *testing.T) { + informer, cache := newTestCache(t) + + old := makeObj("pvc1", "5", "ns1") + new := makeObj("pvc1", "5", "ns1") + + // Restore object that doesn't exist + cache.Restore(&testObj{}) + + // Add old to cache + informer.add(old) + if err := verifyObj(cache, keyOf(old), old); err != nil { + t.Fatalf("Failed to Get() after initial update: %v", err) + } + + // Restore + cache.Restore(old) + if err := verifyObj(cache, keyOf(old), old); err != nil { + t.Fatalf("Failed to Get() after initial restore: %v", err) + } + + // Assume new + if err := cache.Assume(new); err != nil { + t.Fatalf("Assume() returned error %v", err) + } + if err := verifyObj(cache, keyOf(old), new); err != nil { + t.Fatalf("Failed to Get() after Assume: %v", err) + } + + // Restore + cache.Restore(new) + if err := verifyObj(cache, keyOf(old), old); err != nil { + t.Fatalf("Failed to Get() after restore: %v", err) + } +} + +func TestConcurrentAssume(t *testing.T) { + informer, cache := newTestCache(t) + + obj1 := makeObj("pvc1", "5", "ns1") + obj1Update := makeObj("pvc1", "5", "ns1") + // Add object to cache + informer.add(obj1) + + // Update obj 1 + if err := cache.Assume(obj1Update); err != nil { + t.Fatalf("Assume() returned error %v", err) + } + if err := verifyObj(cache, keyOf(obj1Update), obj1Update); err != nil { + t.Fatalf("Failed to Get() after Assume: %v", err) + } + + obj2 := makeObj("pvc1", "7", "ns1") + obj2Update := makeObj("pvc1", "7", "ns1") + // obj updated externally + informer.add(obj2) + + // Update obj 2 + if err := cache.Assume(obj2Update); err != nil { + t.Fatalf("Assume() returned error %v", err) + } + // obj 1 failed with conflict + cache.Restore(obj1Update) + // Should still have obj 2 in cache + if err := verifyObj(cache, keyOf(obj2Update), obj2Update); err != nil { + t.Fatalf("Failed to Get() after restore: %v", err) + } +} + +func TestAssumeUpdateCache(t *testing.T) { + informer, cache := newTestCache(t) + + // Add a object + obj := makeObj("test-pvc0", "1", "test-ns") + informer.add(obj) + if err := verifyObj(cache, keyOf(obj), obj); err != nil { + t.Fatalf("failed to get: %v", err) + } + + // Assume + newObj := obj.DeepCopy() + newObj.Annotations[volume.AnnSelectedNode] = "test-node" + if err := cache.Assume(newObj); err != nil { + t.Fatalf("failed to assume: %v", err) + } + if err := verifyObj(cache, keyOf(obj), newObj); err != nil { + t.Fatalf("failed to get after assume: %v", err) + } + + // Add old + informer.add(obj) + if err := verifyObj(cache, keyOf(obj), newObj); err != nil { + t.Fatalf("failed to get after old added: %v", err) + } +} + +func TestDelayedInformerEvent(t *testing.T) { + informer, cache := newTestCache(t) + + obj1 := makeObj("test-pvc0", "1", "test-ns") + obj2 := makeObj("test-pvc0", "2", "test-ns") + // Only add indexer, simulating delayed informer event + if err := informer.indexer.Add(obj2); err != nil { + t.Fatalf("failed to add: %v", err) + } + + newObj := obj2.DeepCopy() + newObj.Annotations[volume.AnnSelectedNode] = "test-node" + if err := cache.Assume(newObj); err != nil { + t.Fatalf("failed to assume: %v", err) + } + + // Send the delayed event + informer.handler.OnAdd(obj1, false) + informer.handler.OnDelete(obj1) + informer.handler.OnAdd(obj2, false) + // Expect assumed version not overwritten + if err := verifyObj(cache, keyOf(newObj), newObj); err != nil { + t.Fatalf("failed to get after assume: %v", err) + } +} diff --git a/pkg/scheduler/framework/plugins/volumebinding/scorer_test.go b/pkg/scheduler/framework/plugins/volumebinding/scorer_test.go index e54b948966fb9..c1e5bcf14d69d 100644 --- a/pkg/scheduler/framework/plugins/volumebinding/scorer_test.go +++ b/pkg/scheduler/framework/plugins/volumebinding/scorer_test.go @@ -19,8 +19,8 @@ package volumebinding import ( "testing" + fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/apis/config" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" ) @@ -34,7 +34,7 @@ func TestScore(t *testing.T) { for _, point := range defaultShapePoint { defaultShape = append(defaultShape, helper.FunctionShapePoint{ Utilization: int64(point.Utilization), - Score: int64(point.Score) * (framework.MaxNodeScore / config.MaxCustomPriorityScore), + Score: int64(point.Score) * (fwk.MaxNodeScore / config.MaxCustomPriorityScore), }) } type scoreCase struct { diff --git a/pkg/scheduler/framework/plugins/volumebinding/volume_binding.go b/pkg/scheduler/framework/plugins/volumebinding/volume_binding.go index a3cb861ed2487..7031590aa476c 100644 --- a/pkg/scheduler/framework/plugins/volumebinding/volume_binding.go +++ b/pkg/scheduler/framework/plugins/volumebinding/volume_binding.go @@ -35,7 +35,6 @@ import ( fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" @@ -79,13 +78,13 @@ type VolumeBinding struct { fts feature.Features } -var _ framework.PreFilterPlugin = &VolumeBinding{} -var _ framework.FilterPlugin = &VolumeBinding{} -var _ framework.ReservePlugin = &VolumeBinding{} -var _ framework.PreBindPlugin = &VolumeBinding{} -var _ framework.PreScorePlugin = &VolumeBinding{} -var _ framework.ScorePlugin = &VolumeBinding{} -var _ framework.EnqueueExtensions = &VolumeBinding{} +var _ fwk.PreFilterPlugin = &VolumeBinding{} +var _ fwk.FilterPlugin = &VolumeBinding{} +var _ fwk.ReservePlugin = &VolumeBinding{} +var _ fwk.PreBindPlugin = &VolumeBinding{} +var _ fwk.PreScorePlugin = &VolumeBinding{} +var _ fwk.ScorePlugin = &VolumeBinding{} +var _ fwk.EnqueueExtensions = &VolumeBinding{} // Name is the name of the plugin used in Registry and configurations. const Name = names.VolumeBinding @@ -350,7 +349,7 @@ func (pl *VolumeBinding) podHasPVCs(pod *v1.Pod) (bool, error) { // PreFilter invoked at the prefilter extension point to check if pod has all // immediate PVCs bound. If not all immediate PVCs are bound, an // UnschedulableAndUnresolvable is returned. -func (pl *VolumeBinding) PreFilter(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (pl *VolumeBinding) PreFilter(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { logger := klog.FromContext(ctx) // If pod does not reference any PVC, we don't need to do anything. if hasPVC, err := pl.podHasPVCs(pod); err != nil { @@ -383,7 +382,7 @@ func (pl *VolumeBinding) PreFilter(ctx context.Context, state fwk.CycleState, po } // PreFilterExtensions returns prefilter extensions, pod add and remove. -func (pl *VolumeBinding) PreFilterExtensions() framework.PreFilterExtensions { +func (pl *VolumeBinding) PreFilterExtensions() fwk.PreFilterExtensions { return nil } @@ -516,7 +515,7 @@ func (pl *VolumeBinding) Score(ctx context.Context, cs fwk.CycleState, pod *v1.P } // ScoreExtensions of the Score plugin. -func (pl *VolumeBinding) ScoreExtensions() framework.ScoreExtensions { +func (pl *VolumeBinding) ScoreExtensions() fwk.ScoreExtensions { return nil } @@ -607,7 +606,7 @@ func (pl *VolumeBinding) Unreserve(ctx context.Context, cs fwk.CycleState, pod * } // New initializes a new plugin and returns it. -func New(ctx context.Context, plArgs runtime.Object, fh framework.Handle, fts feature.Features) (framework.Plugin, error) { +func New(ctx context.Context, plArgs runtime.Object, fh fwk.Handle, fts feature.Features) (fwk.Plugin, error) { args, ok := plArgs.(*config.VolumeBindingArgs) if !ok { return nil, fmt.Errorf("want args to be of type VolumeBindingArgs, got %T", plArgs) @@ -627,7 +626,10 @@ func New(ctx context.Context, plArgs runtime.Object, fh framework.Handle, fts fe CSIDriverInformer: fh.SharedInformerFactory().Storage().V1().CSIDrivers(), CSIStorageCapacityInformer: fh.SharedInformerFactory().Storage().V1().CSIStorageCapacities(), } - binder := NewVolumeBinder(klog.FromContext(ctx), fh.ClientSet(), fts, podInformer, nodeInformer, csiNodeInformer, pvcInformer, pvInformer, storageClassInformer, capacityCheck, time.Duration(args.BindTimeoutSeconds)*time.Second) + binder, err := NewVolumeBinder(klog.FromContext(ctx), fh.ClientSet(), fts, podInformer, nodeInformer, csiNodeInformer, pvcInformer, pvInformer, storageClassInformer, capacityCheck, time.Duration(args.BindTimeoutSeconds)*time.Second) + if err != nil { + return nil, fmt.Errorf("failed to build volume binder: %w", err) + } // build score function var scorer volumeCapacityScorer @@ -636,7 +638,7 @@ func New(ctx context.Context, plArgs runtime.Object, fh framework.Handle, fts fe for _, point := range args.Shape { shape = append(shape, helper.FunctionShapePoint{ Utilization: int64(point.Utilization), - Score: int64(point.Score) * (framework.MaxNodeScore / config.MaxCustomPriorityScore), + Score: int64(point.Score) * (fwk.MaxNodeScore / config.MaxCustomPriorityScore), }) } scorer = buildScorerFunction(shape) diff --git a/pkg/scheduler/framework/plugins/volumebinding/volume_binding_test.go b/pkg/scheduler/framework/plugins/volumebinding/volume_binding_test.go index 454bdb3fbbead..3f0ad1530fb28 100644 --- a/pkg/scheduler/framework/plugins/volumebinding/volume_binding_test.go +++ b/pkg/scheduler/framework/plugins/volumebinding/volume_binding_test.go @@ -99,7 +99,7 @@ func TestVolumeBinding(t *testing.T) { capacities []*storagev1.CSIStorageCapacity fts feature.Features args *config.VolumeBindingArgs - wantPreFilterResult *framework.PreFilterResult + wantPreFilterResult *fwk.PreFilterResult wantPreFilterStatus *fwk.Status wantStateAfterPreFilter *stateData wantFilterStatus []*fwk.Status diff --git a/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go b/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go index 8257a35808f27..44f2bd5e0485e 100644 --- a/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go +++ b/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go @@ -37,13 +37,13 @@ import ( // VolumeRestrictions is a plugin that checks volume restrictions. type VolumeRestrictions struct { pvcLister corelisters.PersistentVolumeClaimLister - sharedLister framework.SharedLister + sharedLister fwk.SharedLister enableSchedulingQueueHint bool } -var _ framework.PreFilterPlugin = &VolumeRestrictions{} -var _ framework.FilterPlugin = &VolumeRestrictions{} -var _ framework.EnqueueExtensions = &VolumeRestrictions{} +var _ fwk.PreFilterPlugin = &VolumeRestrictions{} +var _ fwk.FilterPlugin = &VolumeRestrictions{} +var _ fwk.EnqueueExtensions = &VolumeRestrictions{} var _ fwk.StateData = &preFilterState{} const ( @@ -163,7 +163,7 @@ func needsRestrictionsCheck(v v1.Volume) bool { } // PreFilter computes and stores cycleState containing details for enforcing ReadWriteOncePod. -func (pl *VolumeRestrictions) PreFilter(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (pl *VolumeRestrictions) PreFilter(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { needsCheck := false for i := range pod.Spec.Volumes { if needsRestrictionsCheck(pod.Spec.Volumes[i]) { @@ -292,7 +292,7 @@ func satisfyReadWriteOncePod(ctx context.Context, state *preFilterState) *fwk.St } // PreFilterExtensions returns prefilter extensions, pod add and remove. -func (pl *VolumeRestrictions) PreFilterExtensions() framework.PreFilterExtensions { +func (pl *VolumeRestrictions) PreFilterExtensions() fwk.PreFilterExtensions { return pl } @@ -414,7 +414,7 @@ func (pl *VolumeRestrictions) isSchedulableAfterPodDeleted(logger klog.Logger, p } // New initializes a new plugin and returns it. -func New(_ context.Context, _ runtime.Object, handle framework.Handle, fts feature.Features) (framework.Plugin, error) { +func New(_ context.Context, _ runtime.Object, handle fwk.Handle, fts feature.Features) (fwk.Plugin, error) { informerFactory := handle.SharedInformerFactory() pvcLister := informerFactory.Core().V1().PersistentVolumeClaims().Lister() sharedLister := handle.SnapshotSharedLister() diff --git a/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions_test.go b/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions_test.go index 4ced831261065..c8e8010b62ba6 100644 --- a/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions_test.go +++ b/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions_test.go @@ -106,13 +106,13 @@ func TestGCEDiskConflicts(t *testing.T) { defer cancel() p := newPlugin(ctx, t) cycleState := framework.NewCycleState() - _, preFilterGotStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) + _, preFilterGotStatus := p.(fwk.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) if diff := cmp.Diff(test.preFilterWantStatus, preFilterGotStatus); diff != "" { t.Errorf("Unexpected PreFilter status (-want, +got): %s", diff) } // If PreFilter fails, then Filter will not run. if test.preFilterWantStatus.IsSuccess() { - gotStatus := p.(framework.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) if diff := cmp.Diff(test.wantStatus, gotStatus); diff != "" { t.Errorf("Unexpected Filter status (-want, +got): %s", diff) } @@ -181,13 +181,13 @@ func TestAWSDiskConflicts(t *testing.T) { defer cancel() p := newPlugin(ctx, t) cycleState := framework.NewCycleState() - _, preFilterGotStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) + _, preFilterGotStatus := p.(fwk.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) if diff := cmp.Diff(test.preFilterWantStatus, preFilterGotStatus); diff != "" { t.Errorf("Unexpected PreFilter status (-want, +got): %s", diff) } // If PreFilter fails, then Filter will not run. if test.preFilterWantStatus.IsSuccess() { - gotStatus := p.(framework.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) if diff := cmp.Diff(test.wantStatus, gotStatus); diff != "" { t.Errorf("Unexpected Filter status (-want, +got): %s", diff) } @@ -262,13 +262,13 @@ func TestRBDDiskConflicts(t *testing.T) { defer cancel() p := newPlugin(ctx, t) cycleState := framework.NewCycleState() - _, preFilterGotStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) + _, preFilterGotStatus := p.(fwk.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) if diff := cmp.Diff(test.preFilterWantStatus, preFilterGotStatus); diff != "" { t.Errorf("Unexpected PreFilter status (-want, +got): %s", diff) } // If PreFilter fails, then Filter will not run. if test.preFilterWantStatus.IsSuccess() { - gotStatus := p.(framework.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) if diff := cmp.Diff(test.wantStatus, gotStatus); diff != "" { t.Errorf("Unexpected Filter status (-want, +got): %s", diff) } @@ -343,13 +343,13 @@ func TestISCSIDiskConflicts(t *testing.T) { defer cancel() p := newPlugin(ctx, t) cycleState := framework.NewCycleState() - _, preFilterGotStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) + _, preFilterGotStatus := p.(fwk.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) if diff := cmp.Diff(test.preFilterWantStatus, preFilterGotStatus); diff != "" { t.Errorf("Unexpected PreFilter status (-want, +got): %s", diff) } // If PreFilter fails, then Filter will not run. if test.preFilterWantStatus.IsSuccess() { - gotStatus := p.(framework.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) if diff := cmp.Diff(test.wantStatus, gotStatus); diff != "" { t.Errorf("Unexpected Filter status (-want, +got): %s", diff) } @@ -471,13 +471,13 @@ func TestAccessModeConflicts(t *testing.T) { defer cancel() p := newPluginWithListers(ctx, t, test.existingPods, test.existingNodes, test.existingPVCs) cycleState := framework.NewCycleState() - _, preFilterGotStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) + _, preFilterGotStatus := p.(fwk.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod, nil) if diff := cmp.Diff(test.preFilterWantStatus, preFilterGotStatus); diff != "" { t.Errorf("Unexpected PreFilter status (-want, +got): %s", diff) } // If PreFilter fails, then Filter will not run. if test.preFilterWantStatus.IsSuccess() { - gotStatus := p.(framework.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) + gotStatus := p.(fwk.FilterPlugin).Filter(ctx, cycleState, test.pod, test.nodeInfo) if diff := cmp.Diff(test.wantStatus, gotStatus); diff != "" { t.Errorf("Unexpected Filter status (-want, +got): %s", diff) } @@ -784,12 +784,12 @@ func Test_isSchedulableAfterPersistentVolumeClaimChange(t *testing.T) { } } -func newPlugin(ctx context.Context, t *testing.T) framework.Plugin { +func newPlugin(ctx context.Context, t *testing.T) fwk.Plugin { return newPluginWithListers(ctx, t, nil, nil, nil) } -func newPluginWithListers(ctx context.Context, t *testing.T, pods []*v1.Pod, nodes []*v1.Node, pvcs []*v1.PersistentVolumeClaim) framework.Plugin { - pluginFactory := func(ctx context.Context, plArgs runtime.Object, fh framework.Handle) (framework.Plugin, error) { +func newPluginWithListers(ctx context.Context, t *testing.T, pods []*v1.Pod, nodes []*v1.Node, pvcs []*v1.PersistentVolumeClaim) fwk.Plugin { + pluginFactory := func(ctx context.Context, plArgs runtime.Object, fh fwk.Handle) (fwk.Plugin, error) { return New(ctx, plArgs, fh, feature.Features{}) } snapshot := cache.NewSnapshot(pods, nodes) diff --git a/pkg/scheduler/framework/plugins/volumezone/volume_zone.go b/pkg/scheduler/framework/plugins/volumezone/volume_zone.go index 4fc9d9aaa90a0..e78d2411fff65 100644 --- a/pkg/scheduler/framework/plugins/volumezone/volume_zone.go +++ b/pkg/scheduler/framework/plugins/volumezone/volume_zone.go @@ -33,7 +33,6 @@ import ( storagehelpers "k8s.io/component-helpers/storage/volume" "k8s.io/klog/v2" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" "k8s.io/kubernetes/pkg/scheduler/util" @@ -47,9 +46,9 @@ type VolumeZone struct { enableSchedulingQueueHint bool } -var _ framework.FilterPlugin = &VolumeZone{} -var _ framework.PreFilterPlugin = &VolumeZone{} -var _ framework.EnqueueExtensions = &VolumeZone{} +var _ fwk.FilterPlugin = &VolumeZone{} +var _ fwk.PreFilterPlugin = &VolumeZone{} +var _ fwk.EnqueueExtensions = &VolumeZone{} const ( // Name is the name of the plugin used in the plugin registry and configurations. @@ -109,7 +108,7 @@ func (pl *VolumeZone) Name() string { // // Currently, this is only supported with PersistentVolumeClaims, // and only looks for the bound PersistentVolume. -func (pl *VolumeZone) PreFilter(ctx context.Context, cs fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (pl *VolumeZone) PreFilter(ctx context.Context, cs fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { logger := klog.FromContext(ctx) podPVTopologies, status := pl.getPVbyPod(logger, pod) if !status.IsSuccess() { @@ -168,7 +167,7 @@ func (pl *VolumeZone) getPVbyPod(logger klog.Logger, pod *v1.Pod) ([]pvTopology, } // PreFilterExtensions returns prefilter extensions, pod add and remove. -func (pl *VolumeZone) PreFilterExtensions() framework.PreFilterExtensions { +func (pl *VolumeZone) PreFilterExtensions() fwk.PreFilterExtensions { return nil } @@ -397,7 +396,7 @@ func (pl *VolumeZone) getPVTopologies(logger klog.Logger, pv *v1.PersistentVolum } // New initializes a new plugin and returns it. -func New(_ context.Context, _ runtime.Object, handle framework.Handle, fts feature.Features) (framework.Plugin, error) { +func New(_ context.Context, _ runtime.Object, handle fwk.Handle, fts feature.Features) (fwk.Plugin, error) { informerFactory := handle.SharedInformerFactory() pvLister := informerFactory.Core().V1().PersistentVolumes().Lister() pvcLister := informerFactory.Core().V1().PersistentVolumeClaims().Lister() diff --git a/pkg/scheduler/framework/plugins/volumezone/volume_zone_test.go b/pkg/scheduler/framework/plugins/volumezone/volume_zone_test.go index 1e393924e8fbe..595f0705f7f91 100644 --- a/pkg/scheduler/framework/plugins/volumezone/volume_zone_test.go +++ b/pkg/scheduler/framework/plugins/volumezone/volume_zone_test.go @@ -837,7 +837,7 @@ func BenchmarkVolumeZone(b *testing.B) { } } -func newPluginWithListers(ctx context.Context, tb testing.TB, pods []*v1.Pod, nodes []*v1.Node, pvcs []*v1.PersistentVolumeClaim, pvs []*v1.PersistentVolume) framework.Plugin { +func newPluginWithListers(ctx context.Context, tb testing.TB, pods []*v1.Pod, nodes []*v1.Node, pvcs []*v1.PersistentVolumeClaim, pvs []*v1.PersistentVolume) fwk.Plugin { snapshot := cache.NewSnapshot(pods, nodes) objects := make([]runtime.Object, 0, len(pvcs)) diff --git a/pkg/scheduler/framework/preemption/preemption.go b/pkg/scheduler/framework/preemption/preemption.go index 9bcd91592fec1..9adf41d4829e7 100644 --- a/pkg/scheduler/framework/preemption/preemption.go +++ b/pkg/scheduler/framework/preemption/preemption.go @@ -129,7 +129,7 @@ type Interface interface { type Evaluator struct { PluginName string - Handler framework.Handle + Handler fwk.Handle PodLister corelisters.PodLister PdbLister policylisters.PodDisruptionBudgetLister @@ -146,7 +146,7 @@ type Evaluator struct { Interface } -func NewEvaluator(pluginName string, fh framework.Handle, i Interface, enableAsyncPreemption bool) *Evaluator { +func NewEvaluator(pluginName string, fh fwk.Handle, i Interface, enableAsyncPreemption bool) *Evaluator { podLister := fh.SharedInformerFactory().Core().V1().Pods().Lister() pdbLister := fh.SharedInformerFactory().Policy().V1().PodDisruptionBudgets().Lister() @@ -184,17 +184,21 @@ func NewEvaluator(pluginName string, fh framework.Handle, i Interface, enableAsy updated := apipod.UpdatePodCondition(newStatus, condition) if updated { if err := util.PatchPodStatus(ctx, ev.Handler.ClientSet(), victim.Name, victim.Namespace, &victim.Status, newStatus); err != nil { - logger.Error(err, "Could not add DisruptionTarget condition due to preemption", "pod", klog.KObj(victim), "preemptor", klog.KObj(preemptor)) - return err + if !apierrors.IsNotFound(err) { + logger.Error(err, "Could not add DisruptionTarget condition due to preemption", "preemptor", klog.KObj(preemptor), "victim", klog.KObj(victim)) + return err + } + logger.V(2).Info("Victim Pod is already deleted", "preemptor", klog.KObj(preemptor), "victim", klog.KObj(victim), "node", c.Name()) + return nil } } if err := util.DeletePod(ctx, ev.Handler.ClientSet(), victim); err != nil { - if apierrors.IsNotFound(err) { - logger.V(2).Info("Victim Pod is already deleted", "preemptor", klog.KObj(preemptor), "victim", klog.KObj(victim), "node", c.Name()) - } else { + if !apierrors.IsNotFound(err) { logger.Error(err, "Tried to preempted pod", "pod", klog.KObj(victim), "preemptor", klog.KObj(preemptor)) + return err } - return err + logger.V(2).Info("Victim Pod is already deleted", "preemptor", klog.KObj(preemptor), "victim", klog.KObj(victim), "node", c.Name()) + return nil } logger.V(2).Info("Preemptor Pod preempted victim Pod", "preemptor", klog.KObj(preemptor), "victim", klog.KObj(victim), "node", c.Name()) } @@ -231,7 +235,7 @@ func (ev *Evaluator) IsPodRunningPreemption(podUID types.UID) bool { // // - . It's the regular happy path // and the non-empty nominatedNodeName will be applied to the preemptor pod. -func (ev *Evaluator) Preempt(ctx context.Context, state fwk.CycleState, pod *v1.Pod, m framework.NodeToStatusReader) (*framework.PostFilterResult, *fwk.Status) { +func (ev *Evaluator) Preempt(ctx context.Context, state fwk.CycleState, pod *v1.Pod, m fwk.NodeToStatusReader) (*fwk.PostFilterResult, *fwk.Status) { logger := klog.FromContext(ctx) // 0) Fetch the latest version of . @@ -306,7 +310,7 @@ func (ev *Evaluator) Preempt(ctx context.Context, state fwk.CycleState, pod *v1. // FindCandidates calculates a slice of preemption candidates. // Each candidate is executable to make the given schedulable. -func (ev *Evaluator) findCandidates(ctx context.Context, state fwk.CycleState, allNodes []fwk.NodeInfo, pod *v1.Pod, m framework.NodeToStatusReader) ([]Candidate, *framework.NodeToStatus, error) { +func (ev *Evaluator) findCandidates(ctx context.Context, state fwk.CycleState, allNodes []fwk.NodeInfo, pod *v1.Pod, m fwk.NodeToStatusReader) ([]Candidate, *framework.NodeToStatus, error) { if len(allNodes) == 0 { return nil, nil, errors.New("no nodes available") } @@ -436,14 +440,7 @@ func (ev *Evaluator) prepareCandidate(ctx context.Context, c Candidate, pod *v1. logger := klog.FromContext(ctx) errCh := parallelize.NewErrorChannel() fh.Parallelizer().Until(ctx, len(c.Victims().Pods), func(index int) { - victimPod := c.Victims().Pods[index] - if victimPod.DeletionTimestamp != nil { - // If the victim Pod is already being deleted, we don't have to make another deletion api call. - logger.V(2).Info("Victim Pod is already deleted, skipping the API call for it", "preemptor", klog.KObj(pod), "node", c.Name(), "victim", klog.KObj(victimPod)) - return - } - - if err := ev.PreemptPod(ctx, c, pod, victimPod, pluginName); err != nil && !apierrors.IsNotFound(err) { + if err := ev.PreemptPod(ctx, c, pod, c.Victims().Pods[index], pluginName); err != nil { errCh.SendErrorWithCancel(err, cancel) } }, ev.PluginName) @@ -468,12 +465,12 @@ func (ev *Evaluator) prepareCandidate(ctx context.Context, c Candidate, pod *v1. // clearNominatedNodeName internally submit a patch request to API server // to set each pods[*].Status.NominatedNodeName> to "". -func clearNominatedNodeName(ctx context.Context, cs clientset.Interface, apiCacher framework.APICacher, pods ...*v1.Pod) utilerrors.Aggregate { +func clearNominatedNodeName(ctx context.Context, cs clientset.Interface, apiCacher fwk.APICacher, pods ...*v1.Pod) utilerrors.Aggregate { var errs []error for _, p := range pods { if apiCacher != nil { // When API cacher is available, use it to clear the NominatedNodeName. - _, err := apiCacher.PatchPodStatus(p, nil, &framework.NominatingInfo{NominatedNodeName: "", NominatingMode: framework.ModeOverride}) + _, err := apiCacher.PatchPodStatus(p, nil, &fwk.NominatingInfo{NominatedNodeName: "", NominatingMode: fwk.ModeOverride}) if err != nil { errs = append(errs, err) } @@ -504,34 +501,11 @@ func (ev *Evaluator) prepareCandidateAsync(c Candidate, pod *v1.Pod, pluginName // Intentionally create a new context, not using a ctx from the scheduling cycle, to create ctx, // because this process could continue even after this scheduling cycle finishes. ctx, cancel := context.WithCancel(context.Background()) - logger := klog.FromContext(ctx) - victimPods := make([]*v1.Pod, 0, len(c.Victims().Pods)) - for _, victim := range c.Victims().Pods { - if victim.DeletionTimestamp != nil { - // If the victim Pod is already being deleted, we don't have to make another deletion api call. - logger.V(2).Info("Victim Pod is already deleted, skipping the API call for it", "preemptor", klog.KObj(pod), "node", c.Name(), "victim", klog.KObj(victim)) - continue - } - victimPods = append(victimPods, victim) - } - if len(victimPods) == 0 { - cancel() - return - } - errCh := parallelize.NewErrorChannel() - // Whether all victim pods are already deleted before making API call. - var allPodsAlreadyDeleted atomic.Bool - allPodsAlreadyDeleted.Store(true) preemptPod := func(index int) { - victim := victimPods[index] - err := ev.PreemptPod(ctx, c, pod, victim, pluginName) - switch { - case err != nil && !apierrors.IsNotFound(err): - // We don't have to handle NotFound error here, because it means the victim Pod is already deleted, and the preemption didn't have to remove it. + victim := c.Victims().Pods[index] + if err := ev.PreemptPod(ctx, c, pod, victim, pluginName); err != nil { errCh.SendErrorWithCancel(err, cancel) - case err == nil: - allPodsAlreadyDeleted.Store(false) } } @@ -539,24 +513,21 @@ func (ev *Evaluator) prepareCandidateAsync(c Candidate, pod *v1.Pod, pluginName ev.preempting.Insert(pod.UID) ev.mu.Unlock() + logger := klog.FromContext(ctx) go func() { startTime := time.Now() result := metrics.GoroutineResultSuccess - defer metrics.PreemptionGoroutinesDuration.WithLabelValues(result).Observe(metrics.SinceInSeconds(startTime)) defer metrics.PreemptionGoroutinesExecutionTotal.WithLabelValues(result).Inc() defer func() { - // When API call isn't successful, the Pod may get stuck in the unschedulable pod pool in the worst case. - // So, we should move the Pod to the activeQ. - if result == metrics.GoroutineResultError || - // When all pods are already deleted (which is very rare, but could happen in theory), - // it's safe to activate the preemptor Pod because it might miss Pod/delete event that requeues the pod. - allPodsAlreadyDeleted.Load() { + if result == metrics.GoroutineResultError { + // When API call isn't successful, the Pod may get stuck in the unschedulable pod pool in the worst case. + // So, we should move the Pod to the activeQ. ev.Handler.Activate(logger, map[string]*v1.Pod{pod.Name: pod}) } }() defer cancel() - logger.V(2).Info("Start the preemption asynchronously", "preemptor", klog.KObj(pod), "node", c.Name(), "numVictims", len(c.Victims().Pods), "numVictimsToDelete", len(victimPods)) + logger.V(2).Info("Start the preemption asynchronously", "preemptor", klog.KObj(pod), "node", c.Name(), "numVictims", len(c.Victims().Pods)) // Lower priority pods nominated to run on this node, may no longer fit on // this node. So, we should remove their nomination. Removing their @@ -569,32 +540,33 @@ func (ev *Evaluator) prepareCandidateAsync(c Candidate, pod *v1.Pod, pluginName // We do not return as this error is not critical. } - if len(victimPods) > 1 { - // We can evict all victims in parallel, but the last one. - // We have to remove the pod from the preempting map before the last one is evicted - // because, otherwise, the pod removal might be notified to the scheduling queue before - // we remove this pod from the preempting map, - // and the pod could end up stucking at the unschedulable pod pool - // by all the pod removal events being ignored. - ev.Handler.Parallelizer().Until(ctx, len(victimPods)-1, preemptPod, ev.PluginName) - if err := errCh.ReceiveError(); err != nil { - utilruntime.HandleErrorWithContext(ctx, err, "Error occurred during async preemption") - result = metrics.GoroutineResultError - } + if len(c.Victims().Pods) == 0 { + ev.mu.Lock() + delete(ev.preempting, pod.UID) + ev.mu.Unlock() + + return + } + + // We can evict all victims in parallel, but the last one. + // We have to remove the pod from the preempting map before the last one is evicted + // because, otherwise, the pod removal might be notified to the scheduling queue before + // we remove this pod from the preempting map, + // and the pod could end up stucking at the unschedulable pod pool + // by all the pod removal events being ignored. + ev.Handler.Parallelizer().Until(ctx, len(c.Victims().Pods)-1, preemptPod, ev.PluginName) + if err := errCh.ReceiveError(); err != nil { + utilruntime.HandleErrorWithContext(ctx, err, "Error occurred during async preemption") + result = metrics.GoroutineResultError } ev.mu.Lock() delete(ev.preempting, pod.UID) ev.mu.Unlock() - err := ev.PreemptPod(ctx, c, pod, victimPods[len(victimPods)-1], pluginName) - switch { - case err != nil && !apierrors.IsNotFound(err): - // We don't have to handle NotFound error here, because it means the victim Pod is already deleted, and the preemption didn't have to remove it. + if err := ev.PreemptPod(ctx, c, pod, c.Victims().Pods[len(c.Victims().Pods)-1], pluginName); err != nil { utilruntime.HandleErrorWithContext(ctx, err, "Error occurred during async preemption") result = metrics.GoroutineResultError - case err == nil: - allPodsAlreadyDeleted.Store(false) } logger.V(2).Info("Async Preemption finished completely", "preemptor", klog.KObj(pod), "node", c.Name(), "result", result) @@ -716,7 +688,7 @@ func pickOneNodeForPreemption(logger klog.Logger, nodesToVictims map[string]*ext // manipulation of NodeInfo and PreFilter state per nominated pod. It may not be // worth the complexity, especially because we generally expect to have a very // small number of nominated pods per node. -func getLowerPriorityNominatedPods(logger klog.Logger, pn framework.PodNominator, pod *v1.Pod, nodeName string) []*v1.Pod { +func getLowerPriorityNominatedPods(logger klog.Logger, pn fwk.PodNominator, pod *v1.Pod, nodeName string) []*v1.Pod { podInfos := pn.NominatedPodsForNode(nodeName) if len(podInfos) == 0 { diff --git a/pkg/scheduler/framework/preemption/preemption_test.go b/pkg/scheduler/framework/preemption/preemption_test.go index 5a37f0df4f348..2e4e49f47d78f 100644 --- a/pkg/scheduler/framework/preemption/preemption_test.go +++ b/pkg/scheduler/framework/preemption/preemption_test.go @@ -30,7 +30,6 @@ import ( v1 "k8s.io/api/core/v1" policy "k8s.io/api/policy/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -45,12 +44,12 @@ import ( "k8s.io/klog/v2/ktesting" extenderv1 "k8s.io/kube-scheduler/extender/v1" fwk "k8s.io/kube-scheduler/framework" - apicache "k8s.io/kubernetes/pkg/scheduler/backend/api_cache" - apidispatcher "k8s.io/kubernetes/pkg/scheduler/backend/api_dispatcher" + "k8s.io/kubernetes/pkg/scheduler/backend/api_cache" + "k8s.io/kubernetes/pkg/scheduler/backend/api_dispatcher" internalcache "k8s.io/kubernetes/pkg/scheduler/backend/cache" internalqueue "k8s.io/kubernetes/pkg/scheduler/backend/queue" "k8s.io/kubernetes/pkg/scheduler/framework" - apicalls "k8s.io/kubernetes/pkg/scheduler/framework/api_calls" + "k8s.io/kubernetes/pkg/scheduler/framework/api_calls" "k8s.io/kubernetes/pkg/scheduler/framework/parallelize" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/queuesort" @@ -421,10 +420,6 @@ func TestPrepareCandidate(t *testing.T) { Containers([]v1.Container{st.MakeContainer().Name("container1").Obj()}). Obj() - notFoundVictim1 = st.MakePod().Name("not-found-victim").UID("victim1"). - Node(node1Name).SchedulerName(defaultSchedulerName).Priority(midPriority). - Containers([]v1.Container{st.MakeContainer().Name("container1").Obj()}). - Obj() failVictim = st.MakePod().Name("fail-victim").UID("victim1"). Node(node1Name).SchedulerName(defaultSchedulerName).Priority(midPriority). Containers([]v1.Container{st.MakeContainer().Name("container1").Obj()}). @@ -456,12 +451,6 @@ func TestPrepareCandidate(t *testing.T) { errPatchStatusFailed = errors.New("patch pod status failed") ) - victimWithDeletionTimestamp := victim1.DeepCopy() - victimWithDeletionTimestamp.Name = "victim1-with-deletion-timestamp" - victimWithDeletionTimestamp.UID = "victim1-with-deletion-timestamp" - victimWithDeletionTimestamp.DeletionTimestamp = &metav1.Time{Time: time.Now().Add(-100 * time.Second)} - victimWithDeletionTimestamp.Finalizers = []string{"test"} - tests := []struct { name string nodeNames []string @@ -490,8 +479,9 @@ func TestPrepareCandidate(t *testing.T) { testPods: []*v1.Pod{ victim1, }, - nodeNames: []string{node1Name}, - expectedStatus: nil, + nodeNames: []string{node1Name}, + expectedStatus: nil, + expectedPreemptingMap: sets.New(types.UID("preemptor")), }, { name: "one victim without condition", @@ -513,42 +503,6 @@ func TestPrepareCandidate(t *testing.T) { expectedStatus: nil, expectedPreemptingMap: sets.New(types.UID("preemptor")), }, - { - name: "one victim, but victim is already being deleted", - - candidate: &fakeCandidate{ - name: node1Name, - victims: &extenderv1.Victims{ - Pods: []*v1.Pod{ - victimWithDeletionTimestamp, - }, - }, - }, - preemptor: preemptor, - testPods: []*v1.Pod{ - victimWithDeletionTimestamp, - }, - nodeNames: []string{node1Name}, - expectedStatus: nil, - }, - { - name: "one victim, but victim is already deleted", - - candidate: &fakeCandidate{ - name: node1Name, - victims: &extenderv1.Victims{ - Pods: []*v1.Pod{ - notFoundVictim1, - }, - }, - }, - preemptor: preemptor, - testPods: []*v1.Pod{}, - nodeNames: []string{node1Name}, - expectedStatus: nil, - expectedActivatedPods: map[string]*v1.Pod{preemptor.Name: preemptor}, - expectedPreemptingMap: sets.New(types.UID("preemptor")), - }, { name: "one victim with same condition", @@ -709,11 +663,6 @@ func TestPrepareCandidate(t *testing.T) { deletionFailure = true return true, nil, errDeletePodFailed } - // fake clientset does not return an error for not-found pods, so we simulate it here. - if name == "not-found-victim" { - // Simulate a not-found error. - return true, nil, apierrors.NewNotFound(v1.Resource("pods"), name) - } deletedPods.Insert(name) return true, nil, nil @@ -726,10 +675,6 @@ func TestPrepareCandidate(t *testing.T) { patchFailure = true return true, nil, errPatchStatusFailed } - // fake clientset does not return an error for not-found pods, so we simulate it here. - if action.(clienttesting.PatchAction).GetName() == "not-found-victim" { - return true, nil, apierrors.NewNotFound(v1.Resource("pods"), "not-found-victim") - } return true, nil, nil }) @@ -932,7 +877,7 @@ func (f *fakeExtender) IsIgnorable() bool { func (f *fakeExtender) ProcessPreemption( _ *v1.Pod, victims map[string]*extenderv1.Victims, - _ framework.NodeInfoLister, + _ fwk.NodeInfoLister, ) (map[string]*extenderv1.Victims, error) { if f.supportsPreemption { if f.errProcessPreemption { @@ -1006,21 +951,21 @@ func TestCallExtenders(t *testing.T) { ) tests := []struct { name string - extenders []framework.Extender + extenders []fwk.Extender candidates []Candidate wantStatus *fwk.Status wantCandidates []Candidate }{ { name: "no extenders", - extenders: []framework.Extender{}, + extenders: []fwk.Extender{}, candidates: makeCandidates(node1Name, victim), wantStatus: nil, wantCandidates: makeCandidates(node1Name, victim), }, { name: "one extender supports preemption", - extenders: []framework.Extender{ + extenders: []fwk.Extender{ newFakeExtender().WithSupportsPreemption(true), }, candidates: makeCandidates(node1Name, victim), @@ -1029,7 +974,7 @@ func TestCallExtenders(t *testing.T) { }, { name: "one extender with return no victims", - extenders: []framework.Extender{ + extenders: []fwk.Extender{ newFakeExtender().WithSupportsPreemption(true).WithReturnNoVictims(true), }, candidates: makeCandidates(node1Name, victim), @@ -1038,7 +983,7 @@ func TestCallExtenders(t *testing.T) { }, { name: "one extender does not support preemption", - extenders: []framework.Extender{ + extenders: []fwk.Extender{ newFakeExtender().WithSupportsPreemption(false), }, candidates: makeCandidates(node1Name, victim), @@ -1047,7 +992,7 @@ func TestCallExtenders(t *testing.T) { }, { name: "one extender with no return victims and is ignorable", - extenders: []framework.Extender{ + extenders: []fwk.Extender{ newFakeExtender().WithSupportsPreemption(true). WithReturnNoVictims(true).WithIgnorable(true), }, @@ -1057,7 +1002,7 @@ func TestCallExtenders(t *testing.T) { }, { name: "one extender returns error and is ignorable", - extenders: []framework.Extender{ + extenders: []fwk.Extender{ newFakeExtender().WithIgnorable(true). WithSupportsPreemption(true).WithErrProcessPreemption(true), }, @@ -1067,7 +1012,7 @@ func TestCallExtenders(t *testing.T) { }, { name: "one extender returns error and is not ignorable", - extenders: []framework.Extender{ + extenders: []fwk.Extender{ newFakeExtender().WithErrProcessPreemption(true). WithSupportsPreemption(true), }, @@ -1077,7 +1022,7 @@ func TestCallExtenders(t *testing.T) { }, { name: "one extender with empty victims input", - extenders: []framework.Extender{ + extenders: []fwk.Extender{ newFakeExtender().WithSupportsPreemption(true), }, candidates: []Candidate{}, @@ -1202,7 +1147,7 @@ func TestRemoveNominatedNodeName(t *testing.T) { ctx, cancel := context.WithCancel(ctx) defer cancel() - var apiCacher framework.APICacher + var apiCacher fwk.APICacher if asyncAPICallsEnabled { apiDispatcher := apidispatcher.New(cs, 16, apicalls.Relevances) apiDispatcher.Run(logger) diff --git a/pkg/scheduler/framework/runtime/framework.go b/pkg/scheduler/framework/runtime/framework.go index dad07a12abe3b..10d379c7a96bd 100644 --- a/pkg/scheduler/framework/runtime/framework.go +++ b/pkg/scheduler/framework/runtime/framework.go @@ -53,44 +53,44 @@ const ( // plugins. type frameworkImpl struct { registry Registry - snapshotSharedLister framework.SharedLister + snapshotSharedLister fwk.SharedLister waitingPods *waitingPodsMap scorePluginWeight map[string]int - preEnqueuePlugins []framework.PreEnqueuePlugin - enqueueExtensions []framework.EnqueueExtensions - queueSortPlugins []framework.QueueSortPlugin - preFilterPlugins []framework.PreFilterPlugin - filterPlugins []framework.FilterPlugin - postFilterPlugins []framework.PostFilterPlugin - preScorePlugins []framework.PreScorePlugin - scorePlugins []framework.ScorePlugin - reservePlugins []framework.ReservePlugin - preBindPlugins []framework.PreBindPlugin - bindPlugins []framework.BindPlugin - postBindPlugins []framework.PostBindPlugin - permitPlugins []framework.PermitPlugin + preEnqueuePlugins []fwk.PreEnqueuePlugin + enqueueExtensions []fwk.EnqueueExtensions + queueSortPlugins []fwk.QueueSortPlugin + preFilterPlugins []fwk.PreFilterPlugin + filterPlugins []fwk.FilterPlugin + postFilterPlugins []fwk.PostFilterPlugin + preScorePlugins []fwk.PreScorePlugin + scorePlugins []fwk.ScorePlugin + reservePlugins []fwk.ReservePlugin + preBindPlugins []fwk.PreBindPlugin + bindPlugins []fwk.BindPlugin + postBindPlugins []fwk.PostBindPlugin + permitPlugins []fwk.PermitPlugin // pluginsMap contains all plugins, by name. - pluginsMap map[string]framework.Plugin + pluginsMap map[string]fwk.Plugin clientSet clientset.Interface kubeConfig *restclient.Config eventRecorder events.EventRecorder informerFactory informers.SharedInformerFactory - sharedDRAManager framework.SharedDRAManager + sharedDRAManager fwk.SharedDRAManager logger klog.Logger metricsRecorder *metrics.MetricAsyncRecorder profileName string percentageOfNodesToScore *int32 - extenders []framework.Extender - framework.PodNominator - framework.PodActivator + extenders []fwk.Extender + fwk.PodNominator + fwk.PodActivator apiDispatcher *apidispatcher.APIDispatcher - apiCacher framework.APICacher + apiCacher fwk.APICacher - parallelizer parallelize.Parallelizer + parallelizer fwk.Parallelizer } // extensionPoint encapsulates desired and applied set of plugins at a specific extension @@ -122,7 +122,7 @@ func (f *frameworkImpl) getExtensionPoints(plugins *config.Plugins) []extensionP } // Extenders returns the registered extenders. -func (f *frameworkImpl) Extenders() []framework.Extender { +func (f *frameworkImpl) Extenders() []fwk.Extender { return f.extenders } @@ -132,12 +132,12 @@ type frameworkOptions struct { kubeConfig *restclient.Config eventRecorder events.EventRecorder informerFactory informers.SharedInformerFactory - sharedDRAManager framework.SharedDRAManager - snapshotSharedLister framework.SharedLister + sharedDRAManager fwk.SharedDRAManager + snapshotSharedLister fwk.SharedLister metricsRecorder *metrics.MetricAsyncRecorder - podNominator framework.PodNominator - podActivator framework.PodActivator - extenders []framework.Extender + podNominator fwk.PodNominator + podActivator fwk.PodActivator + extenders []fwk.Extender captureProfile CaptureProfile parallelizer parallelize.Parallelizer waitingPods *waitingPodsMap @@ -187,34 +187,34 @@ func WithInformerFactory(informerFactory informers.SharedInformerFactory) Option } // WithSharedDRAManager sets SharedDRAManager for the framework. -func WithSharedDRAManager(sharedDRAManager framework.SharedDRAManager) Option { +func WithSharedDRAManager(sharedDRAManager fwk.SharedDRAManager) Option { return func(o *frameworkOptions) { o.sharedDRAManager = sharedDRAManager } } // WithSnapshotSharedLister sets the SharedLister of the snapshot. -func WithSnapshotSharedLister(snapshotSharedLister framework.SharedLister) Option { +func WithSnapshotSharedLister(snapshotSharedLister fwk.SharedLister) Option { return func(o *frameworkOptions) { o.snapshotSharedLister = snapshotSharedLister } } // WithPodNominator sets podNominator for the scheduling frameworkImpl. -func WithPodNominator(nominator framework.PodNominator) Option { +func WithPodNominator(nominator fwk.PodNominator) Option { return func(o *frameworkOptions) { o.podNominator = nominator } } -func WithPodActivator(activator framework.PodActivator) Option { +func WithPodActivator(activator fwk.PodActivator) Option { return func(o *frameworkOptions) { o.podActivator = activator } } // WithExtenders sets extenders for the scheduling frameworkImpl. -func WithExtenders(extenders []framework.Extender) Option { +func WithExtenders(extenders []fwk.Extender) Option { return func(o *frameworkOptions) { o.extenders = extenders } @@ -307,10 +307,10 @@ func NewFramework(ctx context.Context, r Registry, profile *config.KubeScheduler if len(f.extenders) > 0 { // Extender doesn't support any kind of requeueing feature like EnqueueExtensions in the scheduling framework. - // We register a defaultEnqueueExtension to framework.ExtenderName here. + // We register a defaultEnqueueExtension to fwk.ExtenderName here. // And, in the scheduling cycle, when Extenders reject some Nodes and the pod ends up being unschedulable, - // we put framework.ExtenderName to pInfo.UnschedulablePlugins. - f.enqueueExtensions = []framework.EnqueueExtensions{&defaultEnqueueExtension{pluginName: framework.ExtenderName}} + // we put fwk.ExtenderName to pInfo.UnschedulablePlugins. + f.enqueueExtensions = []fwk.EnqueueExtensions{&defaultEnqueueExtension{pluginName: framework.ExtenderName}} } if profile == nil { @@ -341,7 +341,7 @@ func NewFramework(ctx context.Context, r Registry, profile *config.KubeScheduler PluginConfig: make([]config.PluginConfig, 0, len(pg)), } - f.pluginsMap = make(map[string]framework.Plugin) + f.pluginsMap = make(map[string]fwk.Plugin) for name, factory := range r { // initialize only needed plugins. if !pg.Has(name) { @@ -445,15 +445,15 @@ func (f *frameworkImpl) setInstrumentedPlugins() { } } -func (f *frameworkImpl) SetPodNominator(n framework.PodNominator) { +func (f *frameworkImpl) SetPodNominator(n fwk.PodNominator) { f.PodNominator = n } -func (f *frameworkImpl) SetPodActivator(a framework.PodActivator) { +func (f *frameworkImpl) SetPodActivator(a fwk.PodActivator) { f.PodActivator = a } -func (f *frameworkImpl) SetAPICacher(c framework.APICacher) { +func (f *frameworkImpl) SetAPICacher(c fwk.APICacher) { f.apiCacher = c } @@ -497,10 +497,10 @@ func getScoreWeights(f *frameworkImpl, plugins []config.Plugin) error { } // Checks totalPriority against MaxTotalScore to avoid overflow - if int64(f.scorePluginWeight[e.Name])*framework.MaxNodeScore > framework.MaxTotalScore-totalPriority { + if int64(f.scorePluginWeight[e.Name])*fwk.MaxNodeScore > fwk.MaxTotalScore-totalPriority { return fmt.Errorf("total score of Score plugins could overflow") } - totalPriority += int64(f.scorePluginWeight[e.Name]) * framework.MaxNodeScore + totalPriority += int64(f.scorePluginWeight[e.Name]) * fwk.MaxNodeScore } return nil } @@ -623,23 +623,23 @@ func (f *frameworkImpl) expandMultiPointPlugins(logger klog.Logger, profile *con return nil } -func shouldHaveEnqueueExtensions(p framework.Plugin) bool { +func shouldHaveEnqueueExtensions(p fwk.Plugin) bool { switch p.(type) { // Only PreEnqueue, PreFilter, Filter, Reserve, and Permit plugins can (should) have EnqueueExtensions. // See the comment of EnqueueExtensions for more detailed reason here. - case framework.PreEnqueuePlugin, framework.PreFilterPlugin, framework.FilterPlugin, framework.ReservePlugin, framework.PermitPlugin: + case fwk.PreEnqueuePlugin, fwk.PreFilterPlugin, fwk.FilterPlugin, fwk.ReservePlugin, fwk.PermitPlugin: return true } return false } -func (f *frameworkImpl) fillEnqueueExtensions(p framework.Plugin) { +func (f *frameworkImpl) fillEnqueueExtensions(p fwk.Plugin) { if !shouldHaveEnqueueExtensions(p) { // Ignore EnqueueExtensions from plugin which isn't PreEnqueue, PreFilter, Filter, Reserve, and Permit. return } - ext, ok := p.(framework.EnqueueExtensions) + ext, ok := p.(fwk.EnqueueExtensions) if !ok { // If interface EnqueueExtensions is not implemented, register the default enqueue extensions // to the plugin because we don't know which events the plugin is interested in. @@ -665,7 +665,7 @@ func (p *defaultEnqueueExtension) EventsToRegister(_ context.Context) ([]fwk.Clu return framework.UnrollWildCardResource(), nil } -func updatePluginList(pluginList interface{}, pluginSet config.PluginSet, pluginsMap map[string]framework.Plugin) error { +func updatePluginList(pluginList interface{}, pluginSet config.PluginSet, pluginsMap map[string]fwk.Plugin) error { plugins := reflect.ValueOf(pluginList).Elem() pluginType := plugins.Type().Elem() set := sets.New[string]() @@ -692,17 +692,17 @@ func updatePluginList(pluginList interface{}, pluginSet config.PluginSet, plugin } // PreEnqueuePlugins returns the registered preEnqueue plugins. -func (f *frameworkImpl) PreEnqueuePlugins() []framework.PreEnqueuePlugin { +func (f *frameworkImpl) PreEnqueuePlugins() []fwk.PreEnqueuePlugin { return f.preEnqueuePlugins } // EnqueueExtensions returns the registered reenqueue plugins. -func (f *frameworkImpl) EnqueueExtensions() []framework.EnqueueExtensions { +func (f *frameworkImpl) EnqueueExtensions() []fwk.EnqueueExtensions { return f.enqueueExtensions } // QueueSortFunc returns the function to sort pods in scheduling queue -func (f *frameworkImpl) QueueSortFunc() framework.LessFunc { +func (f *frameworkImpl) QueueSortFunc() fwk.LessFunc { if f == nil { // If frameworkImpl is nil, simply keep their order unchanged. // NOTE: this is primarily for tests. @@ -723,7 +723,7 @@ func (f *frameworkImpl) QueueSortFunc() framework.LessFunc { // When it returns Skip status, returned PreFilterResult and other fields in status are just ignored, // and coupled Filter plugin/PreFilterExtensions() will be skipped in this scheduling cycle. // If a non-success status is returned, then the scheduling cycle is aborted. -func (f *frameworkImpl) RunPreFilterPlugins(ctx context.Context, state fwk.CycleState, pod *v1.Pod) (_ *framework.PreFilterResult, status *fwk.Status, _ sets.Set[string]) { +func (f *frameworkImpl) RunPreFilterPlugins(ctx context.Context, state fwk.CycleState, pod *v1.Pod) (_ *fwk.PreFilterResult, status *fwk.Status, _ sets.Set[string]) { startTime := time.Now() skipPlugins := sets.New[string]() defer func() { @@ -734,7 +734,7 @@ func (f *frameworkImpl) RunPreFilterPlugins(ctx context.Context, state fwk.Cycle if err != nil { return nil, fwk.AsStatus(fmt.Errorf("getting all nodes: %w", err)), nil } - var result *framework.PreFilterResult + var result *fwk.PreFilterResult pluginsWithNodes := sets.New[string]() logger := klog.FromContext(ctx) verboseLogs := logger.V(4).Enabled() @@ -786,7 +786,7 @@ func (f *frameworkImpl) RunPreFilterPlugins(ctx context.Context, state fwk.Cycle return result, returnStatus, pluginsWithNodes } -func (f *frameworkImpl) runPreFilterPlugin(ctx context.Context, pl framework.PreFilterPlugin, state fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (f *frameworkImpl) runPreFilterPlugin(ctx context.Context, pl fwk.PreFilterPlugin, state fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { if !state.ShouldRecordPluginMetrics() { return pl.PreFilter(ctx, state, pod, nodes) } @@ -831,7 +831,7 @@ func (f *frameworkImpl) RunPreFilterExtensionAddPod( return nil } -func (f *frameworkImpl) runPreFilterExtensionAddPod(ctx context.Context, pl framework.PreFilterPlugin, state fwk.CycleState, podToSchedule *v1.Pod, podInfoToAdd fwk.PodInfo, nodeInfo fwk.NodeInfo) *fwk.Status { +func (f *frameworkImpl) runPreFilterExtensionAddPod(ctx context.Context, pl fwk.PreFilterPlugin, state fwk.CycleState, podToSchedule *v1.Pod, podInfoToAdd fwk.PodInfo, nodeInfo fwk.NodeInfo) *fwk.Status { if !state.ShouldRecordPluginMetrics() { return pl.PreFilterExtensions().AddPod(ctx, state, podToSchedule, podInfoToAdd, nodeInfo) } @@ -880,7 +880,7 @@ func (f *frameworkImpl) RunPreFilterExtensionRemovePod( return nil } -func (f *frameworkImpl) runPreFilterExtensionRemovePod(ctx context.Context, pl framework.PreFilterPlugin, state fwk.CycleState, podToSchedule *v1.Pod, podInfoToRemove fwk.PodInfo, nodeInfo fwk.NodeInfo) *fwk.Status { +func (f *frameworkImpl) runPreFilterExtensionRemovePod(ctx context.Context, pl fwk.PreFilterPlugin, state fwk.CycleState, podToSchedule *v1.Pod, podInfoToRemove fwk.PodInfo, nodeInfo fwk.NodeInfo) *fwk.Status { if !state.ShouldRecordPluginMetrics() { return pl.PreFilterExtensions().RemovePod(ctx, state, podToSchedule, podInfoToRemove, nodeInfo) } @@ -929,7 +929,7 @@ func (f *frameworkImpl) RunFilterPlugins( return nil } -func (f *frameworkImpl) runFilterPlugin(ctx context.Context, pl framework.FilterPlugin, state fwk.CycleState, pod *v1.Pod, nodeInfo fwk.NodeInfo) *fwk.Status { +func (f *frameworkImpl) runFilterPlugin(ctx context.Context, pl fwk.FilterPlugin, state fwk.CycleState, pod *v1.Pod, nodeInfo fwk.NodeInfo) *fwk.Status { if !state.ShouldRecordPluginMetrics() { return pl.Filter(ctx, state, pod, nodeInfo) } @@ -941,7 +941,7 @@ func (f *frameworkImpl) runFilterPlugin(ctx context.Context, pl framework.Filter // RunPostFilterPlugins runs the set of configured PostFilter plugins until the first // Success, Error or UnschedulableAndUnresolvable is met; otherwise continues to execute all plugins. -func (f *frameworkImpl) RunPostFilterPlugins(ctx context.Context, state fwk.CycleState, pod *v1.Pod, filteredNodeStatusMap framework.NodeToStatusReader) (_ *framework.PostFilterResult, status *fwk.Status) { +func (f *frameworkImpl) RunPostFilterPlugins(ctx context.Context, state fwk.CycleState, pod *v1.Pod, filteredNodeStatusMap fwk.NodeToStatusReader) (_ *fwk.PostFilterResult, status *fwk.Status) { startTime := time.Now() defer func() { metrics.FrameworkExtensionPointDuration.WithLabelValues(metrics.PostFilter, status.Code().String(), f.profileName).Observe(metrics.SinceInSeconds(startTime)) @@ -954,7 +954,7 @@ func (f *frameworkImpl) RunPostFilterPlugins(ctx context.Context, state fwk.Cycl } // `result` records the last meaningful(non-noop) PostFilterResult. - var result *framework.PostFilterResult + var result *fwk.PostFilterResult var reasons []string var rejectorPlugin string for _, pl := range f.postFilterPlugins { @@ -971,7 +971,7 @@ func (f *frameworkImpl) RunPostFilterPlugins(ctx context.Context, state fwk.Cycl } else if !s.IsRejected() { // Any status other than Success, Unschedulable or UnschedulableAndUnresolvable is Error. return nil, fwk.AsStatus(s.AsError()).WithPlugin(pl.Name()) - } else if r != nil && r.Mode() != framework.ModeNoop { + } else if r != nil && r.Mode() != fwk.ModeNoop { result = r } @@ -986,7 +986,7 @@ func (f *frameworkImpl) RunPostFilterPlugins(ctx context.Context, state fwk.Cycl return result, fwk.NewStatus(fwk.Unschedulable, reasons...).WithPlugin(rejectorPlugin) } -func (f *frameworkImpl) runPostFilterPlugin(ctx context.Context, pl framework.PostFilterPlugin, state fwk.CycleState, pod *v1.Pod, filteredNodeStatusMap framework.NodeToStatusReader) (*framework.PostFilterResult, *fwk.Status) { +func (f *frameworkImpl) runPostFilterPlugin(ctx context.Context, pl fwk.PostFilterPlugin, state fwk.CycleState, pod *v1.Pod, filteredNodeStatusMap fwk.NodeToStatusReader) (*fwk.PostFilterResult, *fwk.Status) { if !state.ShouldRecordPluginMetrics() { return pl.PostFilter(ctx, state, pod, filteredNodeStatusMap) } @@ -1056,7 +1056,7 @@ func (f *frameworkImpl) RunFilterPluginsWithNominatedPods(ctx context.Context, s // addGENominatedPods adds pods with equal or greater priority which are nominated // to run on the node. It returns 1) whether any pod was added, 2) augmented cycleState, // 3) augmented nodeInfo. -func addGENominatedPods(ctx context.Context, fh framework.Handle, pod *v1.Pod, state fwk.CycleState, nodeInfo fwk.NodeInfo) (bool, fwk.CycleState, fwk.NodeInfo, error) { +func addGENominatedPods(ctx context.Context, fh fwk.Handle, pod *v1.Pod, state fwk.CycleState, nodeInfo fwk.NodeInfo) (bool, fwk.CycleState, fwk.NodeInfo, error) { if fh == nil { // This may happen only in tests. return false, state, nodeInfo, nil @@ -1120,7 +1120,7 @@ func (f *frameworkImpl) RunPreScorePlugins( return nil } -func (f *frameworkImpl) runPreScorePlugin(ctx context.Context, pl framework.PreScorePlugin, state fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) *fwk.Status { +func (f *frameworkImpl) runPreScorePlugin(ctx context.Context, pl fwk.PreScorePlugin, state fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) *fwk.Status { if !state.ShouldRecordPluginMetrics() { return pl.PreScore(ctx, state, pod, nodes) } @@ -1134,21 +1134,21 @@ func (f *frameworkImpl) runPreScorePlugin(ctx context.Context, pl framework.PreS // It returns a list that stores scores from each plugin and total score for each Node. // It also returns *Status, which is set to non-success if any of the plugins returns // a non-success status. -func (f *frameworkImpl) RunScorePlugins(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (ns []framework.NodePluginScores, status *fwk.Status) { +func (f *frameworkImpl) RunScorePlugins(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (ns []fwk.NodePluginScores, status *fwk.Status) { startTime := time.Now() defer func() { metrics.FrameworkExtensionPointDuration.WithLabelValues(metrics.Score, status.Code().String(), f.profileName).Observe(metrics.SinceInSeconds(startTime)) }() - allNodePluginScores := make([]framework.NodePluginScores, len(nodes)) + allNodePluginScores := make([]fwk.NodePluginScores, len(nodes)) numPlugins := len(f.scorePlugins) - plugins := make([]framework.ScorePlugin, 0, numPlugins) - pluginToNodeScores := make(map[string]framework.NodeScoreList, numPlugins) + plugins := make([]fwk.ScorePlugin, 0, numPlugins) + pluginToNodeScores := make(map[string]fwk.NodeScoreList, numPlugins) for _, pl := range f.scorePlugins { if state.GetSkipScorePlugins().Has(pl.Name()) { continue } plugins = append(plugins, pl) - pluginToNodeScores[pl.Name()] = make(framework.NodeScoreList, len(nodes)) + pluginToNodeScores[pl.Name()] = make(fwk.NodeScoreList, len(nodes)) } ctx, cancel := context.WithCancel(ctx) defer cancel() @@ -1180,7 +1180,7 @@ func (f *frameworkImpl) RunScorePlugins(ctx context.Context, state fwk.CycleStat errCh.SendErrorWithCancel(err, cancel) return } - pluginToNodeScores[pl.Name()][index] = framework.NodeScore{ + pluginToNodeScores[pl.Name()][index] = fwk.NodeScore{ Name: nodeName, Score: s, } @@ -1212,9 +1212,9 @@ func (f *frameworkImpl) RunScorePlugins(ctx context.Context, state fwk.CycleStat // Apply score weight for each ScorePlugin in parallel, // and then, build allNodePluginScores. f.Parallelizer().Until(ctx, len(nodes), func(index int) { - nodePluginScores := framework.NodePluginScores{ + nodePluginScores := fwk.NodePluginScores{ Name: nodes[index].Node().Name, - Scores: make([]framework.PluginScore, len(plugins)), + Scores: make([]fwk.PluginScore, len(plugins)), } for i, pl := range plugins { @@ -1222,13 +1222,13 @@ func (f *frameworkImpl) RunScorePlugins(ctx context.Context, state fwk.CycleStat nodeScoreList := pluginToNodeScores[pl.Name()] score := nodeScoreList[index].Score - if score > framework.MaxNodeScore || score < framework.MinNodeScore { - err := fmt.Errorf("plugin %q returns an invalid score %v, it should in the range of [%v, %v] after normalizing", pl.Name(), score, framework.MinNodeScore, framework.MaxNodeScore) + if score > fwk.MaxNodeScore || score < fwk.MinNodeScore { + err := fmt.Errorf("plugin %q returns an invalid score %v, it should in the range of [%v, %v] after normalizing", pl.Name(), score, fwk.MinNodeScore, fwk.MaxNodeScore) errCh.SendErrorWithCancel(err, cancel) return } weightedScore := score * int64(weight) - nodePluginScores.Scores[i] = framework.PluginScore{ + nodePluginScores.Scores[i] = fwk.PluginScore{ Name: pl.Name(), Score: weightedScore, } @@ -1243,7 +1243,7 @@ func (f *frameworkImpl) RunScorePlugins(ctx context.Context, state fwk.CycleStat return allNodePluginScores, nil } -func (f *frameworkImpl) runScorePlugin(ctx context.Context, pl framework.ScorePlugin, state fwk.CycleState, pod *v1.Pod, nodeInfo fwk.NodeInfo) (int64, *fwk.Status) { +func (f *frameworkImpl) runScorePlugin(ctx context.Context, pl fwk.ScorePlugin, state fwk.CycleState, pod *v1.Pod, nodeInfo fwk.NodeInfo) (int64, *fwk.Status) { if !state.ShouldRecordPluginMetrics() { return pl.Score(ctx, state, pod, nodeInfo) } @@ -1253,7 +1253,7 @@ func (f *frameworkImpl) runScorePlugin(ctx context.Context, pl framework.ScorePl return s, status } -func (f *frameworkImpl) runScoreExtension(ctx context.Context, pl framework.ScorePlugin, state fwk.CycleState, pod *v1.Pod, nodeScoreList framework.NodeScoreList) *fwk.Status { +func (f *frameworkImpl) runScoreExtension(ctx context.Context, pl fwk.ScorePlugin, state fwk.CycleState, pod *v1.Pod, nodeScoreList fwk.NodeScoreList) *fwk.Status { if !state.ShouldRecordPluginMetrics() { return pl.ScoreExtensions().NormalizeScore(ctx, state, pod, nodeScoreList) } @@ -1302,7 +1302,7 @@ func (f *frameworkImpl) RunPreBindPlugins(ctx context.Context, state fwk.CycleSt return nil } -func (f *frameworkImpl) runPreBindPlugin(ctx context.Context, pl framework.PreBindPlugin, state fwk.CycleState, pod *v1.Pod, nodeName string) *fwk.Status { +func (f *frameworkImpl) runPreBindPlugin(ctx context.Context, pl fwk.PreBindPlugin, state fwk.CycleState, pod *v1.Pod, nodeName string) *fwk.Status { if !state.ShouldRecordPluginMetrics() { return pl.PreBind(ctx, state, pod, nodeName) } @@ -1356,7 +1356,7 @@ func (f *frameworkImpl) RunPreBindPreFlights(ctx context.Context, state fwk.Cycl return returningStatus } -func (f *frameworkImpl) runPreBindPreFlight(ctx context.Context, pl framework.PreBindPlugin, state fwk.CycleState, pod *v1.Pod, nodeName string) *fwk.Status { +func (f *frameworkImpl) runPreBindPreFlight(ctx context.Context, pl fwk.PreBindPlugin, state fwk.CycleState, pod *v1.Pod, nodeName string) *fwk.Status { if !state.ShouldRecordPluginMetrics() { return pl.PreBindPreFlight(ctx, state, pod, nodeName) } @@ -1405,7 +1405,7 @@ func (f *frameworkImpl) RunBindPlugins(ctx context.Context, state fwk.CycleState return status } -func (f *frameworkImpl) runBindPlugin(ctx context.Context, bp framework.BindPlugin, state fwk.CycleState, pod *v1.Pod, nodeName string) *fwk.Status { +func (f *frameworkImpl) runBindPlugin(ctx context.Context, bp fwk.BindPlugin, state fwk.CycleState, pod *v1.Pod, nodeName string) *fwk.Status { if !state.ShouldRecordPluginMetrics() { return bp.Bind(ctx, state, pod, nodeName) } @@ -1436,7 +1436,7 @@ func (f *frameworkImpl) RunPostBindPlugins(ctx context.Context, state fwk.CycleS } } -func (f *frameworkImpl) runPostBindPlugin(ctx context.Context, pl framework.PostBindPlugin, state fwk.CycleState, pod *v1.Pod, nodeName string) { +func (f *frameworkImpl) runPostBindPlugin(ctx context.Context, pl fwk.PostBindPlugin, state fwk.CycleState, pod *v1.Pod, nodeName string) { if !state.ShouldRecordPluginMetrics() { pl.PostBind(ctx, state, pod, nodeName) return @@ -1483,7 +1483,7 @@ func (f *frameworkImpl) RunReservePluginsReserve(ctx context.Context, state fwk. return nil } -func (f *frameworkImpl) runReservePluginReserve(ctx context.Context, pl framework.ReservePlugin, state fwk.CycleState, pod *v1.Pod, nodeName string) *fwk.Status { +func (f *frameworkImpl) runReservePluginReserve(ctx context.Context, pl fwk.ReservePlugin, state fwk.CycleState, pod *v1.Pod, nodeName string) *fwk.Status { if !state.ShouldRecordPluginMetrics() { return pl.Reserve(ctx, state, pod, nodeName) } @@ -1519,7 +1519,7 @@ func (f *frameworkImpl) RunReservePluginsUnreserve(ctx context.Context, state fw } } -func (f *frameworkImpl) runReservePluginUnreserve(ctx context.Context, pl framework.ReservePlugin, state fwk.CycleState, pod *v1.Pod, nodeName string) { +func (f *frameworkImpl) runReservePluginUnreserve(ctx context.Context, pl fwk.ReservePlugin, state fwk.CycleState, pod *v1.Pod, nodeName string) { if !state.ShouldRecordPluginMetrics() { pl.Unreserve(ctx, state, pod, nodeName) return @@ -1584,7 +1584,7 @@ func (f *frameworkImpl) RunPermitPlugins(ctx context.Context, state fwk.CycleSta return nil } -func (f *frameworkImpl) runPermitPlugin(ctx context.Context, pl framework.PermitPlugin, state fwk.CycleState, pod *v1.Pod, nodeName string) (*fwk.Status, time.Duration) { +func (f *frameworkImpl) runPermitPlugin(ctx context.Context, pl fwk.PermitPlugin, state fwk.CycleState, pod *v1.Pod, nodeName string) (*fwk.Status, time.Duration) { if !state.ShouldRecordPluginMetrics() { return pl.Permit(ctx, state, pod, nodeName) } @@ -1629,17 +1629,17 @@ func (f *frameworkImpl) WaitOnPermit(ctx context.Context, pod *v1.Pod) *fwk.Stat // snapshot. The snapshot is taken at the beginning of a scheduling cycle and remains // unchanged until a pod finishes "Reserve". There is no guarantee that the information // remains unchanged after "Reserve". -func (f *frameworkImpl) SnapshotSharedLister() framework.SharedLister { +func (f *frameworkImpl) SnapshotSharedLister() fwk.SharedLister { return f.snapshotSharedLister } // IterateOverWaitingPods acquires a read lock and iterates over the WaitingPods map. -func (f *frameworkImpl) IterateOverWaitingPods(callback func(framework.WaitingPod)) { +func (f *frameworkImpl) IterateOverWaitingPods(callback func(fwk.WaitingPod)) { f.waitingPods.iterate(callback) } // GetWaitingPod returns a reference to a WaitingPod given its UID. -func (f *frameworkImpl) GetWaitingPod(uid types.UID) framework.WaitingPod { +func (f *frameworkImpl) GetWaitingPod(uid types.UID) fwk.WaitingPod { if wp := f.waitingPods.get(uid); wp != nil { return wp } @@ -1681,7 +1681,7 @@ func (f *frameworkImpl) ListPlugins() *config.Plugins { extName := plugins.Type().Elem().Name() var cfgs []config.Plugin for i := 0; i < plugins.Len(); i++ { - name := plugins.Index(i).Interface().(framework.Plugin).Name() + name := plugins.Index(i).Interface().(fwk.Plugin).Name() p := config.Plugin{Name: name} if extName == "ScorePlugin" { // Weights apply only to score plugins. @@ -1717,7 +1717,7 @@ func (f *frameworkImpl) SharedInformerFactory() informers.SharedInformerFactory } // SharedDRAManager returns the SharedDRAManager of the framework. -func (f *frameworkImpl) SharedDRAManager() framework.SharedDRAManager { +func (f *frameworkImpl) SharedDRAManager() fwk.SharedDRAManager { return f.sharedDRAManager } @@ -1754,7 +1754,7 @@ func (f *frameworkImpl) PercentageOfNodesToScore() *int32 { } // Parallelizer returns a parallelizer holding parallelism for scheduler. -func (f *frameworkImpl) Parallelizer() parallelize.Parallelizer { +func (f *frameworkImpl) Parallelizer() fwk.Parallelizer { return f.parallelizer } @@ -1770,7 +1770,7 @@ func (f *frameworkImpl) APIDispatcher() fwk.APIDispatcher { // APICacher returns an apiCacher that can be used to dispatch API calls through scheduler's cache // instead of directly using APIDispatcher(). // This requires SchedulerAsyncAPICalls feature gate to be enabled. -func (f *frameworkImpl) APICacher() framework.APICacher { +func (f *frameworkImpl) APICacher() fwk.APICacher { if f.apiCacher == nil { return nil } diff --git a/pkg/scheduler/framework/runtime/framework_test.go b/pkg/scheduler/framework/runtime/framework_test.go index ecef4453bc29b..5bdf95e52f66f 100644 --- a/pkg/scheduler/framework/runtime/framework_test.go +++ b/pkg/scheduler/framework/runtime/framework_test.go @@ -74,8 +74,8 @@ func init() { // TestScoreWithNormalizePlugin implements ScoreWithNormalizePlugin interface. // TestScorePlugin only implements ScorePlugin interface. -var _ framework.ScorePlugin = &TestScoreWithNormalizePlugin{} -var _ framework.ScorePlugin = &TestScorePlugin{} +var _ fwk.ScorePlugin = &TestScoreWithNormalizePlugin{} +var _ fwk.ScorePlugin = &TestScorePlugin{} var statusCmpOpts = []cmp.Option{ cmp.Comparer(func(s1 *fwk.Status, s2 *fwk.Status) bool { @@ -89,7 +89,7 @@ var statusCmpOpts = []cmp.Option{ }), } -func newScoreWithNormalizePlugin1(_ context.Context, injArgs runtime.Object, f framework.Handle) (framework.Plugin, error) { +func newScoreWithNormalizePlugin1(_ context.Context, injArgs runtime.Object, f fwk.Handle) (fwk.Plugin, error) { var inj injectedResult if err := DecodeInto(injArgs, &inj); err != nil { return nil, err @@ -97,7 +97,7 @@ func newScoreWithNormalizePlugin1(_ context.Context, injArgs runtime.Object, f f return &TestScoreWithNormalizePlugin{scoreWithNormalizePlugin1, inj}, nil } -func newScoreWithNormalizePlugin2(_ context.Context, injArgs runtime.Object, f framework.Handle) (framework.Plugin, error) { +func newScoreWithNormalizePlugin2(_ context.Context, injArgs runtime.Object, f fwk.Handle) (fwk.Plugin, error) { var inj injectedResult if err := DecodeInto(injArgs, &inj); err != nil { return nil, err @@ -105,7 +105,7 @@ func newScoreWithNormalizePlugin2(_ context.Context, injArgs runtime.Object, f f return &TestScoreWithNormalizePlugin{scoreWithNormalizePlugin2, inj}, nil } -func newScorePlugin1(_ context.Context, injArgs runtime.Object, f framework.Handle) (framework.Plugin, error) { +func newScorePlugin1(_ context.Context, injArgs runtime.Object, f fwk.Handle) (fwk.Plugin, error) { var inj injectedResult if err := DecodeInto(injArgs, &inj); err != nil { return nil, err @@ -113,7 +113,7 @@ func newScorePlugin1(_ context.Context, injArgs runtime.Object, f framework.Hand return &TestScorePlugin{scorePlugin1, inj}, nil } -func newScorePlugin2(_ context.Context, injArgs runtime.Object, f framework.Handle) (framework.Plugin, error) { +func newScorePlugin2(_ context.Context, injArgs runtime.Object, f fwk.Handle) (fwk.Plugin, error) { var inj injectedResult if err := DecodeInto(injArgs, &inj); err != nil { return nil, err @@ -121,7 +121,7 @@ func newScorePlugin2(_ context.Context, injArgs runtime.Object, f framework.Hand return &TestScorePlugin{scorePlugin2, inj}, nil } -func newPluginNotImplementingScore(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { +func newPluginNotImplementingScore(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &PluginNotImplementingScore{}, nil } @@ -134,7 +134,7 @@ func (pl *TestScoreWithNormalizePlugin) Name() string { return pl.name } -func (pl *TestScoreWithNormalizePlugin) NormalizeScore(ctx context.Context, state fwk.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *fwk.Status { +func (pl *TestScoreWithNormalizePlugin) NormalizeScore(ctx context.Context, state fwk.CycleState, pod *v1.Pod, scores fwk.NodeScoreList) *fwk.Status { return injectNormalizeRes(pl.inj, scores) } @@ -142,7 +142,7 @@ func (pl *TestScoreWithNormalizePlugin) Score(ctx context.Context, state fwk.Cyc return setScoreRes(pl.inj) } -func (pl *TestScoreWithNormalizePlugin) ScoreExtensions() framework.ScoreExtensions { +func (pl *TestScoreWithNormalizePlugin) ScoreExtensions() fwk.ScoreExtensions { return pl } @@ -164,7 +164,7 @@ func (pl *TestScorePlugin) Score(ctx context.Context, state fwk.CycleState, p *v return setScoreRes(pl.inj) } -func (pl *TestScorePlugin) ScoreExtensions() framework.ScoreExtensions { +func (pl *TestScorePlugin) ScoreExtensions() fwk.ScoreExtensions { return nil } @@ -175,7 +175,7 @@ func (pl *PluginNotImplementingScore) Name() string { return pluginNotImplementingScore } -func newTestPlugin(_ context.Context, injArgs runtime.Object, f framework.Handle) (framework.Plugin, error) { +func newTestPlugin(_ context.Context, injArgs runtime.Object, f fwk.Handle) (fwk.Plugin, error) { return &TestPlugin{name: testPlugin}, nil } @@ -204,15 +204,15 @@ func (pl *TestPlugin) Score(ctx context.Context, state fwk.CycleState, p *v1.Pod return 0, fwk.NewStatus(fwk.Code(pl.inj.ScoreStatus), injectReason) } -func (pl *TestPlugin) ScoreExtensions() framework.ScoreExtensions { +func (pl *TestPlugin) ScoreExtensions() fwk.ScoreExtensions { return nil } -func (pl *TestPlugin) PreFilter(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (pl *TestPlugin) PreFilter(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { return pl.inj.PreFilterResult, fwk.NewStatus(fwk.Code(pl.inj.PreFilterStatus), injectReason) } -func (pl *TestPlugin) PreFilterExtensions() framework.PreFilterExtensions { +func (pl *TestPlugin) PreFilterExtensions() fwk.PreFilterExtensions { return pl } @@ -220,7 +220,7 @@ func (pl *TestPlugin) Filter(ctx context.Context, state fwk.CycleState, pod *v1. return fwk.NewStatus(fwk.Code(pl.inj.FilterStatus), injectFilterReason) } -func (pl *TestPlugin) PostFilter(_ context.Context, _ fwk.CycleState, _ *v1.Pod, _ framework.NodeToStatusReader) (*framework.PostFilterResult, *fwk.Status) { +func (pl *TestPlugin) PostFilter(_ context.Context, _ fwk.CycleState, _ *v1.Pod, _ fwk.NodeToStatusReader) (*fwk.PostFilterResult, *fwk.Status) { return nil, fwk.NewStatus(fwk.Code(pl.inj.PostFilterStatus), injectReason) } @@ -254,7 +254,7 @@ func (pl *TestPlugin) Bind(ctx context.Context, state fwk.CycleState, p *v1.Pod, return fwk.NewStatus(fwk.Code(pl.inj.BindStatus), injectReason) } -func newTestCloseErrorPlugin(_ context.Context, injArgs runtime.Object, f framework.Handle) (framework.Plugin, error) { +func newTestCloseErrorPlugin(_ context.Context, injArgs runtime.Object, f fwk.Handle) (fwk.Plugin, error) { return &TestCloseErrorPlugin{name: testCloseErrorPlugin}, nil } @@ -282,12 +282,12 @@ func (pl *TestPreFilterPlugin) Name() string { return preFilterPluginName } -func (pl *TestPreFilterPlugin) PreFilter(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (pl *TestPreFilterPlugin) PreFilter(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { pl.PreFilterCalled++ return nil, nil } -func (pl *TestPreFilterPlugin) PreFilterExtensions() framework.PreFilterExtensions { +func (pl *TestPreFilterPlugin) PreFilterExtensions() fwk.PreFilterExtensions { return nil } @@ -302,7 +302,7 @@ func (pl *TestPreFilterWithExtensionsPlugin) Name() string { return preFilterWithExtensionsPluginName } -func (pl *TestPreFilterWithExtensionsPlugin) PreFilter(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (pl *TestPreFilterWithExtensionsPlugin) PreFilter(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { pl.PreFilterCalled++ return nil, nil } @@ -319,7 +319,7 @@ func (pl *TestPreFilterWithExtensionsPlugin) RemovePod(ctx context.Context, stat return nil } -func (pl *TestPreFilterWithExtensionsPlugin) PreFilterExtensions() framework.PreFilterExtensions { +func (pl *TestPreFilterWithExtensionsPlugin) PreFilterExtensions() fwk.PreFilterExtensions { return pl } @@ -330,17 +330,17 @@ func (dp *TestDuplicatePlugin) Name() string { return duplicatePluginName } -func (dp *TestDuplicatePlugin) PreFilter(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (dp *TestDuplicatePlugin) PreFilter(ctx context.Context, state fwk.CycleState, p *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { return nil, nil } -func (dp *TestDuplicatePlugin) PreFilterExtensions() framework.PreFilterExtensions { +func (dp *TestDuplicatePlugin) PreFilterExtensions() fwk.PreFilterExtensions { return nil } -var _ framework.PreFilterPlugin = &TestDuplicatePlugin{} +var _ fwk.PreFilterPlugin = &TestDuplicatePlugin{} -func newDuplicatePlugin(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { +func newDuplicatePlugin(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &TestDuplicatePlugin{}, nil } @@ -356,7 +356,7 @@ func (pp *TestPermitPlugin) Permit(ctx context.Context, state fwk.CycleState, p return fwk.NewStatus(fwk.Wait), 10 * time.Second } -var _ framework.PreEnqueuePlugin = &TestPreEnqueuePlugin{} +var _ fwk.PreEnqueuePlugin = &TestPreEnqueuePlugin{} type TestPreEnqueuePlugin struct{} @@ -368,9 +368,9 @@ func (pl *TestPreEnqueuePlugin) PreEnqueue(ctx context.Context, p *v1.Pod) *fwk. return nil } -var _ framework.QueueSortPlugin = &TestQueueSortPlugin{} +var _ fwk.QueueSortPlugin = &TestQueueSortPlugin{} -func newQueueSortPlugin(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { +func newQueueSortPlugin(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &TestQueueSortPlugin{}, nil } @@ -385,9 +385,9 @@ func (pl *TestQueueSortPlugin) Less(_, _ fwk.QueuedPodInfo) bool { return false } -var _ framework.BindPlugin = &TestBindPlugin{} +var _ fwk.BindPlugin = &TestBindPlugin{} -func newBindPlugin(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { +func newBindPlugin(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &TestBindPlugin{}, nil } @@ -945,18 +945,18 @@ func TestNewFrameworkMultiPointExpansion(t *testing.T) { func TestPreEnqueuePlugins(t *testing.T) { tests := []struct { name string - plugins []framework.Plugin - want []framework.PreEnqueuePlugin + plugins []fwk.Plugin + want []fwk.PreEnqueuePlugin }{ { name: "no PreEnqueuePlugin registered", }, { name: "one PreEnqueuePlugin registered", - plugins: []framework.Plugin{ + plugins: []fwk.Plugin{ &TestPreEnqueuePlugin{}, }, - want: []framework.PreEnqueuePlugin{ + want: []fwk.PreEnqueuePlugin{ &TestPreEnqueuePlugin{}, }, }, @@ -971,7 +971,7 @@ func TestPreEnqueuePlugins(t *testing.T) { // register all plugins tmpPl := pl if err := registry.Register(pl.Name(), - func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return tmpPl, nil }); err != nil { t.Fatalf("fail to register preEnqueue plugin (%s)", pl.Name()) @@ -1096,7 +1096,7 @@ func TestRunPreScorePlugins(t *testing.T) { for i, p := range tt.plugins { p := p enabled[i].Name = p.name - if err := r.Register(p.name, func(_ context.Context, _ runtime.Object, fh framework.Handle) (framework.Plugin, error) { + if err := r.Register(p.name, func(_ context.Context, _ runtime.Object, fh fwk.Handle) (fwk.Plugin, error) { return p, nil }); err != nil { t.Fatalf("fail to register PreScorePlugins plugin (%s)", p.Name()) @@ -1137,7 +1137,7 @@ func TestRunScorePlugins(t *testing.T) { registry Registry plugins *config.Plugins pluginConfigs []config.PluginConfig - want []framework.NodePluginScores + want []fwk.NodePluginScores skippedPlugins sets.Set[string] // If err is true, we expect RunScorePlugin to fail. err bool @@ -1145,14 +1145,14 @@ func TestRunScorePlugins(t *testing.T) { { name: "no Score plugins", plugins: buildScoreConfigDefaultWeights(), - want: []framework.NodePluginScores{ + want: []fwk.NodePluginScores{ { Name: "node1", - Scores: []framework.PluginScore{}, + Scores: []fwk.PluginScore{}, }, { Name: "node2", - Scores: []framework.PluginScore{}, + Scores: []fwk.PluginScore{}, }, }, }, @@ -1168,10 +1168,10 @@ func TestRunScorePlugins(t *testing.T) { }, }, // scorePlugin1 Score returns 1, weight=1, so want=1. - want: []framework.NodePluginScores{ + want: []fwk.NodePluginScores{ { Name: "node1", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: scorePlugin1, Score: 1, @@ -1181,7 +1181,7 @@ func TestRunScorePlugins(t *testing.T) { }, { Name: "node2", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: scorePlugin1, Score: 1, @@ -1204,10 +1204,10 @@ func TestRunScorePlugins(t *testing.T) { }, }, // scoreWithNormalizePlugin1 Score returns 10, but NormalizeScore overrides to 5, weight=1, so want=5 - want: []framework.NodePluginScores{ + want: []fwk.NodePluginScores{ { Name: "node1", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: scoreWithNormalizePlugin1, Score: 5, @@ -1217,7 +1217,7 @@ func TestRunScorePlugins(t *testing.T) { }, { Name: "node2", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: scoreWithNormalizePlugin1, Score: 5, @@ -1253,10 +1253,10 @@ func TestRunScorePlugins(t *testing.T) { // scorePlugin1 Score returns 1, weight =1, so want=1. // scoreWithNormalizePlugin1 Score returns 3, but NormalizeScore overrides to 4, weight=1, so want=4. // scoreWithNormalizePlugin2 Score returns 4, but NormalizeScore overrides to 5, weight=2, so want=10. - want: []framework.NodePluginScores{ + want: []fwk.NodePluginScores{ { Name: "node1", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: scorePlugin1, Score: 1, @@ -1274,7 +1274,7 @@ func TestRunScorePlugins(t *testing.T) { }, { Name: "node2", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: scorePlugin1, Score: 1, @@ -1325,7 +1325,7 @@ func TestRunScorePlugins(t *testing.T) { { Name: scorePlugin1, Args: &runtime.Unknown{ - Raw: []byte(fmt.Sprintf(`{ "scoreRes": %d }`, framework.MaxNodeScore+1)), + Raw: []byte(fmt.Sprintf(`{ "scoreRes": %d }`, fwk.MaxNodeScore+1)), }, }, }, @@ -1338,7 +1338,7 @@ func TestRunScorePlugins(t *testing.T) { { Name: scorePlugin1, Args: &runtime.Unknown{ - Raw: []byte(fmt.Sprintf(`{ "scoreRes": %d }`, framework.MinNodeScore-1)), + Raw: []byte(fmt.Sprintf(`{ "scoreRes": %d }`, fwk.MinNodeScore-1)), }, }, }, @@ -1351,7 +1351,7 @@ func TestRunScorePlugins(t *testing.T) { { Name: scoreWithNormalizePlugin1, Args: &runtime.Unknown{ - Raw: []byte(fmt.Sprintf(`{ "normalizeRes": %d }`, framework.MaxNodeScore+1)), + Raw: []byte(fmt.Sprintf(`{ "normalizeRes": %d }`, fwk.MaxNodeScore+1)), }, }, }, @@ -1364,7 +1364,7 @@ func TestRunScorePlugins(t *testing.T) { { Name: scoreWithNormalizePlugin1, Args: &runtime.Unknown{ - Raw: []byte(fmt.Sprintf(`{ "normalizeRes": %d }`, framework.MinNodeScore-1)), + Raw: []byte(fmt.Sprintf(`{ "normalizeRes": %d }`, fwk.MinNodeScore-1)), }, }, }, @@ -1393,10 +1393,10 @@ func TestRunScorePlugins(t *testing.T) { }, }, // scorePlugin1 Score returns 1, weight=3, so want=3. - want: []framework.NodePluginScores{ + want: []fwk.NodePluginScores{ { Name: "node1", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: scorePlugin1, Score: 3, @@ -1406,7 +1406,7 @@ func TestRunScorePlugins(t *testing.T) { }, { Name: "node2", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: scorePlugin1, Score: 3, @@ -1434,10 +1434,10 @@ func TestRunScorePlugins(t *testing.T) { }, }, skippedPlugins: sets.New(scoreWithNormalizePlugin1), - want: []framework.NodePluginScores{ + want: []fwk.NodePluginScores{ { Name: "node1", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: scorePlugin1, Score: 1, @@ -1447,7 +1447,7 @@ func TestRunScorePlugins(t *testing.T) { }, { Name: "node2", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: scorePlugin1, Score: 1, @@ -1469,14 +1469,14 @@ func TestRunScorePlugins(t *testing.T) { }, }, skippedPlugins: sets.New(scorePlugin1), - want: []framework.NodePluginScores{ + want: []fwk.NodePluginScores{ { Name: "node1", - Scores: []framework.PluginScore{}, + Scores: []fwk.PluginScore{}, }, { Name: "node2", - Scores: []framework.PluginScore{}, + Scores: []fwk.PluginScore{}, }, }, }, @@ -1485,14 +1485,14 @@ func TestRunScorePlugins(t *testing.T) { plugins: buildScoreConfigDefaultWeights(scorePlugin1), pluginConfigs: nil, skippedPlugins: sets.New(scorePlugin1, "score-plugin-unknown"), - want: []framework.NodePluginScores{ + want: []fwk.NodePluginScores{ { Name: "node1", - Scores: []framework.PluginScore{}, + Scores: []fwk.PluginScore{}, }, { Name: "node2", - Scores: []framework.PluginScore{}, + Scores: []fwk.PluginScore{}, }, }, }, @@ -1542,11 +1542,11 @@ func TestPreFilterPlugins(t *testing.T) { preFilter2 := &TestPreFilterWithExtensionsPlugin{} r := make(Registry) r.Register(preFilterPluginName, - func(_ context.Context, _ runtime.Object, fh framework.Handle) (framework.Plugin, error) { + func(_ context.Context, _ runtime.Object, fh fwk.Handle) (fwk.Plugin, error) { return preFilter1, nil }) r.Register(preFilterWithExtensionsPluginName, - func(_ context.Context, _ runtime.Object, fh framework.Handle) (framework.Plugin, error) { + func(_ context.Context, _ runtime.Object, fh fwk.Handle) (fwk.Plugin, error) { return preFilter2, nil }) plugins := &config.Plugins{PreFilter: config.PluginSet{Enabled: []config.Plugin{{Name: preFilterWithExtensionsPluginName}, {Name: preFilterPluginName}}}} @@ -1587,7 +1587,7 @@ func TestRunPreFilterPlugins(t *testing.T) { tests := []struct { name string plugins []*TestPlugin - wantPreFilterResult *framework.PreFilterResult + wantPreFilterResult *fwk.PreFilterResult wantSkippedPlugins sets.Set[string] wantStatusCode fwk.Code }{ @@ -1713,7 +1713,7 @@ func TestRunPreFilterPlugins(t *testing.T) { plugins: []*TestPlugin{ { name: "reject-all-nodes", - inj: injectedResult{PreFilterResult: &framework.PreFilterResult{NodeNames: sets.New[string]()}}, + inj: injectedResult{PreFilterResult: &fwk.PreFilterResult{NodeNames: sets.New[string]()}}, }, { // to make sure this plugin is not executed, this plugin return Skip and we confirm it via wantSkippedPlugins. @@ -1721,7 +1721,7 @@ func TestRunPreFilterPlugins(t *testing.T) { inj: injectedResult{PreFilterStatus: int(fwk.Skip)}, }, }, - wantPreFilterResult: &framework.PreFilterResult{NodeNames: sets.New[string]()}, + wantPreFilterResult: &fwk.PreFilterResult{NodeNames: sets.New[string]()}, wantSkippedPlugins: sets.New[string](), // "skip" plugin isn't executed. wantStatusCode: fwk.UnschedulableAndUnresolvable, }, @@ -1733,7 +1733,7 @@ func TestRunPreFilterPlugins(t *testing.T) { for i, p := range tt.plugins { p := p enabled[i].Name = p.name - if err := r.Register(p.name, func(_ context.Context, _ runtime.Object, fh framework.Handle) (framework.Plugin, error) { + if err := r.Register(p.name, func(_ context.Context, _ runtime.Object, fh fwk.Handle) (fwk.Plugin, error) { return p, nil }); err != nil { t.Fatalf("fail to register PreFilter plugin (%s)", p.Name()) @@ -1828,7 +1828,7 @@ func TestRunPreFilterExtensionRemovePod(t *testing.T) { for i, p := range tt.plugins { p := p enabled[i].Name = p.name - if err := r.Register(p.name, func(_ context.Context, _ runtime.Object, fh framework.Handle) (framework.Plugin, error) { + if err := r.Register(p.name, func(_ context.Context, _ runtime.Object, fh fwk.Handle) (fwk.Plugin, error) { return p, nil }); err != nil { t.Fatalf("fail to register PreFilterExtension plugin (%s)", p.Name()) @@ -1916,7 +1916,7 @@ func TestRunPreFilterExtensionAddPod(t *testing.T) { for i, p := range tt.plugins { p := p enabled[i].Name = p.name - if err := r.Register(p.name, func(_ context.Context, _ runtime.Object, fh framework.Handle) (framework.Plugin, error) { + if err := r.Register(p.name, func(_ context.Context, _ runtime.Object, fh fwk.Handle) (fwk.Plugin, error) { return p, nil }); err != nil { t.Fatalf("fail to register PreFilterExtension plugin (%s)", p.Name()) @@ -2125,7 +2125,7 @@ func TestFilterPlugins(t *testing.T) { // register all plugins tmpPl := pl if err := registry.Register(pl.name, - func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return tmpPl, nil }); err != nil { t.Fatalf("fail to register filter plugin (%s)", pl.name) @@ -2253,7 +2253,7 @@ func TestPostFilterPlugins(t *testing.T) { // register all plugins tmpPl := pl if err := registry.Register(pl.name, - func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return tmpPl, nil }); err != nil { t.Fatalf("fail to register postFilter plugin (%s)", pl.name) @@ -2389,7 +2389,7 @@ func TestFilterPluginsWithNominatedPods(t *testing.T) { if tt.preFilterPlugin != nil { if err := registry.Register(tt.preFilterPlugin.name, - func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return tt.preFilterPlugin, nil }); err != nil { t.Fatalf("fail to register preFilter plugin (%s)", tt.preFilterPlugin.name) @@ -2401,7 +2401,7 @@ func TestFilterPluginsWithNominatedPods(t *testing.T) { } if tt.filterPlugin != nil { if err := registry.Register(tt.filterPlugin.name, - func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return tt.filterPlugin, nil }); err != nil { t.Fatalf("fail to register filter plugin (%s)", tt.filterPlugin.name) @@ -2430,7 +2430,7 @@ func TestFilterPluginsWithNominatedPods(t *testing.T) { podNominator.AddNominatedPod( logger, mustNewPodInfo(t, tt.nominatedPod), - &framework.NominatingInfo{NominatingMode: framework.ModeOverride, NominatedNodeName: nodeName}) + &fwk.NominatingInfo{NominatingMode: fwk.ModeOverride, NominatedNodeName: nodeName}) } profile := config.KubeSchedulerProfile{Plugins: cfgPls} ctx, cancel := context.WithCancel(ctx) @@ -2582,7 +2582,7 @@ func TestPreBindPlugins(t *testing.T) { for _, pl := range tt.plugins { tmpPl := pl - if err := registry.Register(pl.name, func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + if err := registry.Register(pl.name, func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return tmpPl, nil }); err != nil { t.Fatalf("Unable to register pre bind plugins: %s", pl.name) @@ -2686,7 +2686,7 @@ func TestPreBindPreFlightPlugins(t *testing.T) { for _, pl := range tt.plugins { tmpPl := pl - if err := registry.Register(pl.name, func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + if err := registry.Register(pl.name, func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return tmpPl, nil }); err != nil { t.Fatalf("Unable to register pre bind plugins: %s", pl.name) @@ -2848,7 +2848,7 @@ func TestReservePlugins(t *testing.T) { for _, pl := range tt.plugins { tmpPl := pl - if err := registry.Register(pl.name, func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + if err := registry.Register(pl.name, func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return tmpPl, nil }); err != nil { t.Fatalf("Unable to register pre bind plugins: %s", pl.name) @@ -2978,7 +2978,7 @@ func TestPermitPlugins(t *testing.T) { for _, pl := range tt.plugins { tmpPl := pl - if err := registry.Register(pl.name, func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + if err := registry.Register(pl.name, func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return tmpPl, nil }); err != nil { t.Fatalf("Unable to register Permit plugin: %s", pl.name) @@ -3153,7 +3153,7 @@ func TestRecordingMetrics(t *testing.T) { plugin := &TestPlugin{name: testPlugin, inj: tt.inject} r := make(Registry) r.Register(testPlugin, - func(_ context.Context, _ runtime.Object, fh framework.Handle) (framework.Plugin, error) { + func(_ context.Context, _ runtime.Object, fh fwk.Handle) (fwk.Plugin, error) { return plugin, nil }) pluginSet := config.PluginSet{Enabled: []config.Plugin{{Name: testPlugin, Weight: 1}}} @@ -3280,7 +3280,7 @@ func TestRunBindPlugins(t *testing.T) { name := fmt.Sprintf("bind-%d", i) plugin := &TestPlugin{name: name, inj: injectedResult{BindStatus: int(inj)}} r.Register(name, - func(_ context.Context, _ runtime.Object, fh framework.Handle) (framework.Plugin, error) { + func(_ context.Context, _ runtime.Object, fh fwk.Handle) (fwk.Plugin, error) { return plugin, nil }) pluginSet.Enabled = append(pluginSet.Enabled, config.Plugin{Name: name}) @@ -3342,7 +3342,7 @@ func TestPermitWaitDurationMetric(t *testing.T) { plugin := &TestPlugin{name: testPlugin, inj: tt.inject} r := make(Registry) err := r.Register(testPlugin, - func(_ context.Context, _ runtime.Object, fh framework.Handle) (framework.Plugin, error) { + func(_ context.Context, _ runtime.Object, fh fwk.Handle) (fwk.Plugin, error) { return plugin, nil }) if err != nil { @@ -3407,7 +3407,7 @@ func TestWaitOnPermit(t *testing.T) { testPermitPlugin := &TestPermitPlugin{} r := make(Registry) r.Register(permitPlugin, - func(_ context.Context, _ runtime.Object, fh framework.Handle) (framework.Plugin, error) { + func(_ context.Context, _ runtime.Object, fh fwk.Handle) (fwk.Plugin, error) { return testPermitPlugin, nil }) plugins := &config.Plugins{ @@ -3550,22 +3550,22 @@ func buildScoreConfigWithWeights(weights map[string]int32, ps ...string) *config } type injectedResult struct { - ScoreRes int64 `json:"scoreRes,omitempty"` - NormalizeRes int64 `json:"normalizeRes,omitempty"` - ScoreStatus int `json:"scoreStatus,omitempty"` - NormalizeStatus int `json:"normalizeStatus,omitempty"` - PreFilterResult *framework.PreFilterResult `json:"preFilterResult,omitempty"` - PreFilterStatus int `json:"preFilterStatus,omitempty"` - PreFilterAddPodStatus int `json:"preFilterAddPodStatus,omitempty"` - PreFilterRemovePodStatus int `json:"preFilterRemovePodStatus,omitempty"` - FilterStatus int `json:"filterStatus,omitempty"` - PostFilterStatus int `json:"postFilterStatus,omitempty"` - PreScoreStatus int `json:"preScoreStatus,omitempty"` - ReserveStatus int `json:"reserveStatus,omitempty"` - PreBindPreFlightStatus int `json:"preBindPreFlightStatus,omitempty"` - PreBindStatus int `json:"preBindStatus,omitempty"` - BindStatus int `json:"bindStatus,omitempty"` - PermitStatus int `json:"permitStatus,omitempty"` + ScoreRes int64 `json:"scoreRes,omitempty"` + NormalizeRes int64 `json:"normalizeRes,omitempty"` + ScoreStatus int `json:"scoreStatus,omitempty"` + NormalizeStatus int `json:"normalizeStatus,omitempty"` + PreFilterResult *fwk.PreFilterResult `json:"preFilterResult,omitempty"` + PreFilterStatus int `json:"preFilterStatus,omitempty"` + PreFilterAddPodStatus int `json:"preFilterAddPodStatus,omitempty"` + PreFilterRemovePodStatus int `json:"preFilterRemovePodStatus,omitempty"` + FilterStatus int `json:"filterStatus,omitempty"` + PostFilterStatus int `json:"postFilterStatus,omitempty"` + PreScoreStatus int `json:"preScoreStatus,omitempty"` + ReserveStatus int `json:"reserveStatus,omitempty"` + PreBindPreFlightStatus int `json:"preBindPreFlightStatus,omitempty"` + PreBindStatus int `json:"preBindStatus,omitempty"` + BindStatus int `json:"bindStatus,omitempty"` + PermitStatus int `json:"permitStatus,omitempty"` } func setScoreRes(inj injectedResult) (int64, *fwk.Status) { @@ -3575,7 +3575,7 @@ func setScoreRes(inj injectedResult) (int64, *fwk.Status) { return inj.ScoreRes, nil } -func injectNormalizeRes(inj injectedResult, scores framework.NodeScoreList) *fwk.Status { +func injectNormalizeRes(inj injectedResult, scores fwk.NodeScoreList) *fwk.Status { if fwk.Code(inj.NormalizeStatus) != fwk.Success { return fwk.NewStatus(fwk.Code(inj.NormalizeStatus), "injecting failure.") } diff --git a/pkg/scheduler/framework/runtime/instrumented_plugins.go b/pkg/scheduler/framework/runtime/instrumented_plugins.go index 02d4dc04a2d8d..6e9e86650e778 100644 --- a/pkg/scheduler/framework/runtime/instrumented_plugins.go +++ b/pkg/scheduler/framework/runtime/instrumented_plugins.go @@ -22,16 +22,15 @@ import ( v1 "k8s.io/api/core/v1" compbasemetrics "k8s.io/component-base/metrics" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" ) type instrumentedFilterPlugin struct { - framework.FilterPlugin + fwk.FilterPlugin metric compbasemetrics.CounterMetric } -var _ framework.FilterPlugin = &instrumentedFilterPlugin{} +var _ fwk.FilterPlugin = &instrumentedFilterPlugin{} func (p *instrumentedFilterPlugin) Filter(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodeInfo fwk.NodeInfo) *fwk.Status { p.metric.Inc() @@ -39,14 +38,14 @@ func (p *instrumentedFilterPlugin) Filter(ctx context.Context, state fwk.CycleSt } type instrumentedPreFilterPlugin struct { - framework.PreFilterPlugin + fwk.PreFilterPlugin metric compbasemetrics.CounterMetric } -var _ framework.PreFilterPlugin = &instrumentedPreFilterPlugin{} +var _ fwk.PreFilterPlugin = &instrumentedPreFilterPlugin{} -func (p *instrumentedPreFilterPlugin) PreFilter(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (p *instrumentedPreFilterPlugin) PreFilter(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { result, status := p.PreFilterPlugin.PreFilter(ctx, state, pod, nodes) if !status.IsSkip() { p.metric.Inc() @@ -55,12 +54,12 @@ func (p *instrumentedPreFilterPlugin) PreFilter(ctx context.Context, state fwk.C } type instrumentedPreScorePlugin struct { - framework.PreScorePlugin + fwk.PreScorePlugin metric compbasemetrics.CounterMetric } -var _ framework.PreScorePlugin = &instrumentedPreScorePlugin{} +var _ fwk.PreScorePlugin = &instrumentedPreScorePlugin{} func (p *instrumentedPreScorePlugin) PreScore(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) *fwk.Status { status := p.PreScorePlugin.PreScore(ctx, state, pod, nodes) @@ -71,12 +70,12 @@ func (p *instrumentedPreScorePlugin) PreScore(ctx context.Context, state fwk.Cyc } type instrumentedScorePlugin struct { - framework.ScorePlugin + fwk.ScorePlugin metric compbasemetrics.CounterMetric } -var _ framework.ScorePlugin = &instrumentedScorePlugin{} +var _ fwk.ScorePlugin = &instrumentedScorePlugin{} func (p *instrumentedScorePlugin) Score(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodeInfo fwk.NodeInfo) (int64, *fwk.Status) { p.metric.Inc() diff --git a/pkg/scheduler/framework/runtime/registry.go b/pkg/scheduler/framework/runtime/registry.go index 8c5901ae52a75..dfff0bdc46b18 100644 --- a/pkg/scheduler/framework/runtime/registry.go +++ b/pkg/scheduler/framework/runtime/registry.go @@ -22,21 +22,21 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/json" - "k8s.io/kubernetes/pkg/scheduler/framework" + fwk "k8s.io/kube-scheduler/framework" plfeature "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "sigs.k8s.io/yaml" ) // PluginFactory is a function that builds a plugin. -type PluginFactory = func(ctx context.Context, configuration runtime.Object, f framework.Handle) (framework.Plugin, error) +type PluginFactory = func(ctx context.Context, configuration runtime.Object, f fwk.Handle) (fwk.Plugin, error) // PluginFactoryWithFts is a function that builds a plugin with certain feature gates. -type PluginFactoryWithFts[T framework.Plugin] func(context.Context, runtime.Object, framework.Handle, plfeature.Features) (T, error) +type PluginFactoryWithFts[T fwk.Plugin] func(context.Context, runtime.Object, fwk.Handle, plfeature.Features) (T, error) // FactoryAdapter can be used to inject feature gates for a plugin that needs // them when the caller expects the older PluginFactory method. -func FactoryAdapter[T framework.Plugin](fts plfeature.Features, withFts PluginFactoryWithFts[T]) PluginFactory { - return func(ctx context.Context, plArgs runtime.Object, fh framework.Handle) (framework.Plugin, error) { +func FactoryAdapter[T fwk.Plugin](fts plfeature.Features, withFts PluginFactoryWithFts[T]) PluginFactory { + return func(ctx context.Context, plArgs runtime.Object, fh fwk.Handle) (fwk.Plugin, error) { return withFts(ctx, plArgs, fh, fts) } } diff --git a/pkg/scheduler/framework/runtime/registry_test.go b/pkg/scheduler/framework/runtime/registry_test.go index 7f0d85c623158..5beb0de1f8e5e 100644 --- a/pkg/scheduler/framework/runtime/registry_test.go +++ b/pkg/scheduler/framework/runtime/registry_test.go @@ -24,7 +24,7 @@ import ( "github.com/google/uuid" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/scheduler/framework" + fwk "k8s.io/kube-scheduler/framework" ) func TestDecodeInto(t *testing.T) { @@ -110,7 +110,7 @@ func (p *mockNoopPlugin) Name() string { func NewMockNoopPluginFactory() PluginFactory { uuid := uuid.New().String() - return func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + return func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &mockNoopPlugin{uuid}, nil } } diff --git a/pkg/scheduler/framework/runtime/waiting_pods_map.go b/pkg/scheduler/framework/runtime/waiting_pods_map.go index 9616ed20afed4..dc054ee7f5ded 100644 --- a/pkg/scheduler/framework/runtime/waiting_pods_map.go +++ b/pkg/scheduler/framework/runtime/waiting_pods_map.go @@ -24,7 +24,6 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" ) // waitingPodsMap a thread-safe map used to maintain pods waiting in the permit phase. @@ -62,7 +61,7 @@ func (m *waitingPodsMap) get(uid types.UID) *waitingPod { } // iterate acquires a read lock and iterates over the WaitingPods map. -func (m *waitingPodsMap) iterate(callback func(framework.WaitingPod)) { +func (m *waitingPodsMap) iterate(callback func(fwk.WaitingPod)) { m.mu.RLock() defer m.mu.RUnlock() for _, v := range m.pods { @@ -78,7 +77,7 @@ type waitingPod struct { mu sync.RWMutex } -var _ framework.WaitingPod = &waitingPod{} +var _ fwk.WaitingPod = &waitingPod{} // newWaitingPod returns a new waitingPod instance. func newWaitingPod(pod *v1.Pod, pluginsMaxWaitTime map[string]time.Duration) *waitingPod { diff --git a/pkg/scheduler/framework/types.go b/pkg/scheduler/framework/types.go index 969b3898f836f..320c122124130 100644 --- a/pkg/scheduler/framework/types.go +++ b/pkg/scheduler/framework/types.go @@ -26,7 +26,6 @@ import ( "time" v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" @@ -670,20 +669,20 @@ func (pi *PodInfo) Update(pod *v1.Pod) error { // Attempt to parse the affinity terms var parseErrs []error - requiredAffinityTerms, err := GetAffinityTerms(pod, GetPodAffinityTerms(pod.Spec.Affinity)) + requiredAffinityTerms, err := fwk.GetAffinityTerms(pod, fwk.GetPodAffinityTerms(pod.Spec.Affinity)) if err != nil { parseErrs = append(parseErrs, fmt.Errorf("requiredAffinityTerms: %w", err)) } - requiredAntiAffinityTerms, err := GetAffinityTerms(pod, - GetPodAntiAffinityTerms(pod.Spec.Affinity)) + requiredAntiAffinityTerms, err := fwk.GetAffinityTerms(pod, + fwk.GetPodAntiAffinityTerms(pod.Spec.Affinity)) if err != nil { parseErrs = append(parseErrs, fmt.Errorf("requiredAntiAffinityTerms: %w", err)) } - weightedAffinityTerms, err := getWeightedAffinityTerms(pod, preferredAffinityTerms) + weightedAffinityTerms, err := fwk.GetWeightedAffinityTerms(pod, preferredAffinityTerms) if err != nil { parseErrs = append(parseErrs, fmt.Errorf("preferredAffinityTerms: %w", err)) } - weightedAntiAffinityTerms, err := getWeightedAffinityTerms(pod, preferredAntiAffinityTerms) + weightedAntiAffinityTerms, err := fwk.GetWeightedAffinityTerms(pod, preferredAntiAffinityTerms) if err != nil { parseErrs = append(parseErrs, fmt.Errorf("preferredAntiAffinityTerms: %w", err)) } @@ -797,8 +796,8 @@ func (f *FitError) Error() string { // the scheduling cycle went through PreFilter extension point successfully. // // When the prefilter plugin returns unschedulable, - // the scheduling framework inserts the same unschedulable status to all nodes in NodeToStatusMap. - // So, we shouldn't add the message from NodeToStatusMap when the PreFilter failed. + // the scheduling framework inserts the same unschedulable status to all nodes in NodeToStatusReader. + // So, we shouldn't add the message from NodeToStatusReader when the PreFilter failed. // Otherwise, we will have duplicated reasons in the error message. reasons := make(map[string]int) f.Diagnosis.NodeToStatus.ForEachExplicitNode(func(_ string, status *fwk.Status) { @@ -807,7 +806,7 @@ func (f *FitError) Error() string { } }) if f.Diagnosis.NodeToStatus.Len() < f.NumAllNodes { - // Adding predefined reasons for nodes that are absent in NodeToStatusMap + // Adding predefined reasons for nodes that are absent in NodeToStatusReader for _, reason := range f.Diagnosis.NodeToStatus.AbsentNodesStatus().Reasons() { reasons[reason] += f.NumAllNodes - f.Diagnosis.NodeToStatus.Len() } @@ -837,58 +836,6 @@ func (f *FitError) Error() string { return reasonMsg } -func newAffinityTerm(pod *v1.Pod, term *v1.PodAffinityTerm) (*fwk.AffinityTerm, error) { - selector, err := metav1.LabelSelectorAsSelector(term.LabelSelector) - if err != nil { - return nil, err - } - - namespaces := getNamespacesFromPodAffinityTerm(pod, term) - nsSelector, err := metav1.LabelSelectorAsSelector(term.NamespaceSelector) - if err != nil { - return nil, err - } - - return &fwk.AffinityTerm{Namespaces: namespaces, Selector: selector, TopologyKey: term.TopologyKey, NamespaceSelector: nsSelector}, nil -} - -// GetAffinityTerms receives a Pod and affinity terms and returns the namespaces and -// selectors of the terms. -func GetAffinityTerms(pod *v1.Pod, v1Terms []v1.PodAffinityTerm) ([]fwk.AffinityTerm, error) { - if v1Terms == nil { - return nil, nil - } - - var terms []fwk.AffinityTerm - for i := range v1Terms { - t, err := newAffinityTerm(pod, &v1Terms[i]) - if err != nil { - // We get here if the label selector failed to process - return nil, err - } - terms = append(terms, *t) - } - return terms, nil -} - -// getWeightedAffinityTerms returns the list of processed affinity terms. -func getWeightedAffinityTerms(pod *v1.Pod, v1Terms []v1.WeightedPodAffinityTerm) ([]fwk.WeightedAffinityTerm, error) { - if v1Terms == nil { - return nil, nil - } - - var terms []fwk.WeightedAffinityTerm - for i := range v1Terms { - t, err := newAffinityTerm(pod, &v1Terms[i].PodAffinityTerm) - if err != nil { - // We get here if the label selector failed to process - return nil, err - } - terms = append(terms, fwk.WeightedAffinityTerm{AffinityTerm: *t, Weight: v1Terms[i].Weight}) - } - return terms, nil -} - // NewPodInfo returns a new PodInfo. func NewPodInfo(pod *v1.Pod) (*PodInfo, error) { pInfo := &PodInfo{} @@ -896,44 +843,6 @@ func NewPodInfo(pod *v1.Pod) (*PodInfo, error) { return pInfo, err } -func GetPodAffinityTerms(affinity *v1.Affinity) (terms []v1.PodAffinityTerm) { - if affinity != nil && affinity.PodAffinity != nil { - if len(affinity.PodAffinity.RequiredDuringSchedulingIgnoredDuringExecution) != 0 { - terms = affinity.PodAffinity.RequiredDuringSchedulingIgnoredDuringExecution - } - // TODO: Uncomment this block when implement RequiredDuringSchedulingRequiredDuringExecution. - // if len(affinity.PodAffinity.RequiredDuringSchedulingRequiredDuringExecution) != 0 { - // terms = append(terms, affinity.PodAffinity.RequiredDuringSchedulingRequiredDuringExecution...) - // } - } - return terms -} - -func GetPodAntiAffinityTerms(affinity *v1.Affinity) (terms []v1.PodAffinityTerm) { - if affinity != nil && affinity.PodAntiAffinity != nil { - if len(affinity.PodAntiAffinity.RequiredDuringSchedulingIgnoredDuringExecution) != 0 { - terms = affinity.PodAntiAffinity.RequiredDuringSchedulingIgnoredDuringExecution - } - // TODO: Uncomment this block when implement RequiredDuringSchedulingRequiredDuringExecution. - // if len(affinity.PodAntiAffinity.RequiredDuringSchedulingRequiredDuringExecution) != 0 { - // terms = append(terms, affinity.PodAntiAffinity.RequiredDuringSchedulingRequiredDuringExecution...) - // } - } - return terms -} - -// returns a set of names according to the namespaces indicated in podAffinityTerm. -// If namespaces is empty it considers the given pod's namespace. -func getNamespacesFromPodAffinityTerm(pod *v1.Pod, podAffinityTerm *v1.PodAffinityTerm) sets.Set[string] { - names := sets.Set[string]{} - if len(podAffinityTerm.Namespaces) == 0 && podAffinityTerm.NamespaceSelector == nil { - names.Insert(pod.Namespace) - } else { - names.Insert(podAffinityTerm.Namespaces...) - } - return names -} - // Resource is a collection of compute resource. // Implementation is separate from interface fwk.Resource, because implementation of functions Add and SetMaxResource // depends on internal scheduler util functions. diff --git a/pkg/scheduler/framework/types_test.go b/pkg/scheduler/framework/types_test.go index 5b6bc19ecb99e..15b09d575268e 100644 --- a/pkg/scheduler/framework/types_test.go +++ b/pkg/scheduler/framework/types_test.go @@ -27,7 +27,6 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/sets" utilfeature "k8s.io/apiserver/pkg/util/feature" featuregatetesting "k8s.io/component-base/featuregate/testing" "k8s.io/klog/v2" @@ -1227,48 +1226,6 @@ func fakeNodeInfo(pods ...*v1.Pod) *NodeInfo { return ni } -func TestGetNamespacesFromPodAffinityTerm(t *testing.T) { - tests := []struct { - name string - term *v1.PodAffinityTerm - want sets.Set[string] - }{ - { - name: "podAffinityTerm_namespace_empty", - term: &v1.PodAffinityTerm{}, - want: sets.Set[string]{metav1.NamespaceDefault: sets.Empty{}}, - }, - { - name: "podAffinityTerm_namespace_not_empty", - term: &v1.PodAffinityTerm{ - Namespaces: []string{metav1.NamespacePublic, metav1.NamespaceSystem}, - }, - want: sets.New(metav1.NamespacePublic, metav1.NamespaceSystem), - }, - { - name: "podAffinityTerm_namespace_selector_not_nil", - term: &v1.PodAffinityTerm{ - NamespaceSelector: &metav1.LabelSelector{}, - }, - want: sets.Set[string]{}, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - got := getNamespacesFromPodAffinityTerm(&v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "topologies_pod", - Namespace: metav1.NamespaceDefault, - }, - }, test.term) - if diff := cmp.Diff(test.want, got); diff != "" { - t.Errorf("Unexpected namespaces (-want, +got):\n%s", diff) - } - }) - } -} - func TestFitError_Error(t *testing.T) { tests := []struct { name string diff --git a/pkg/scheduler/metrics/metrics.go b/pkg/scheduler/metrics/metrics.go index 9ff706cfc6d4e..0b14b31e75f73 100644 --- a/pkg/scheduler/metrics/metrics.go +++ b/pkg/scheduler/metrics/metrics.go @@ -45,8 +45,8 @@ const ( GoroutineResultError = "error" ) -// ExtentionPoints is a list of possible values for the extension_point label. -var ExtentionPoints = []string{ +// ExtensionPoints is a list of possible values for the extension_point label. +var ExtensionPoints = []string{ PreFilter, Filter, PreFilterExtensionAddPod, @@ -56,6 +56,7 @@ var ExtentionPoints = []string{ Score, ScoreExtensionNormalize, PreBind, + PreBindPreFlight, Bind, PostBind, Reserve, diff --git a/pkg/scheduler/profile/profile_test.go b/pkg/scheduler/profile/profile_test.go index f535a1e25c473..32dd6117205d6 100644 --- a/pkg/scheduler/profile/profile_test.go +++ b/pkg/scheduler/profile/profile_test.go @@ -28,7 +28,6 @@ import ( "k8s.io/klog/v2/ktesting" fwk "k8s.io/kube-scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/apis/config" - "k8s.io/kubernetes/pkg/scheduler/framework" frameworkruntime "k8s.io/kubernetes/pkg/scheduler/framework/runtime" ) @@ -291,8 +290,8 @@ func (p *fakePlugin) Bind(context.Context, fwk.CycleState, *v1.Pod, string) *fwk return nil } -func newFakePlugin(name string) func(ctx context.Context, object runtime.Object, handle framework.Handle) (framework.Plugin, error) { - return func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { +func newFakePlugin(name string) func(ctx context.Context, object runtime.Object, handle fwk.Handle) (fwk.Plugin, error) { + return func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &fakePlugin{name: name}, nil } } diff --git a/pkg/scheduler/schedule_one.go b/pkg/scheduler/schedule_one.go index fc12fcd1fe125..c39ce0b1fd3b5 100644 --- a/pkg/scheduler/schedule_one.go +++ b/pkg/scheduler/schedule_one.go @@ -139,11 +139,11 @@ func (sched *Scheduler) ScheduleOne(ctx context.Context) { // newFailureNominatingInfo returns the appropriate NominatingInfo for scheduling failures. // When NominatedNodeNameForExpectation feature is enabled, it returns nil (no clearing). // Otherwise, it returns NominatingInfo to clear the pod's nominated node. -func (sched *Scheduler) newFailureNominatingInfo() *framework.NominatingInfo { +func (sched *Scheduler) newFailureNominatingInfo() *fwk.NominatingInfo { if sched.nominatedNodeNameForExpectationEnabled { return nil } - return &framework.NominatingInfo{NominatingMode: framework.ModeOverride, NominatedNodeName: ""} + return &fwk.NominatingInfo{NominatingMode: fwk.ModeOverride, NominatedNodeName: ""} } // schedulingCycle tries to schedule a single Pod. @@ -193,7 +193,7 @@ func (sched *Scheduler) schedulingCycle( logger.V(5).Info("Status after running PostFilter plugins for pod", "pod", klog.KObj(pod), "status", msg) } - var nominatingInfo *framework.NominatingInfo + var nominatingInfo *fwk.NominatingInfo if result != nil { nominatingInfo = result.NominatingInfo } @@ -297,9 +297,9 @@ func (sched *Scheduler) bindingCycle( if preFlightStatus.IsSuccess() || schedFramework.WillWaitOnPermit(ctx, assumedPod) { // Add NominatedNodeName to tell the external components (e.g., the cluster autoscaler) that the pod is about to be bound to the node. // We only do this when any of WaitOnPermit or PreBind will work because otherwise the pod will be soon bound anyway. - if err := updatePod(ctx, sched.client, schedFramework.APICacher(), assumedPod, nil, &framework.NominatingInfo{ + if err := updatePod(ctx, sched.client, schedFramework.APICacher(), assumedPod, nil, &fwk.NominatingInfo{ NominatedNodeName: scheduleResult.SuggestedHost, - NominatingMode: framework.ModeOverride, + NominatingMode: fwk.ModeOverride, }); err != nil { logger.Error(err, "Failed to update the nominated node name in the binding cycle", "pod", klog.KObj(assumedPod), "nominatedNodeName", scheduleResult.SuggestedHost) // We continue the processing because it's not critical enough to stop binding cycles here. @@ -550,7 +550,7 @@ func (sched *Scheduler) findNodesThatFitPod(ctx context.Context, schedFramework // // Extender doesn't support any kind of requeueing feature like EnqueueExtensions in the scheduling framework. // When Extenders reject some Nodes and the pod ends up being unschedulable, - // we put framework.ExtenderName to pInfo.UnschedulablePlugins. + // we put fwk.ExtenderName to pInfo.UnschedulablePlugins. // This Pod will be requeued from unschedulable pod pool to activeQ/backoffQ // by any kind of cluster events. // https://github.com/kubernetes/kubernetes/issues/122019 @@ -722,7 +722,7 @@ func (sched *Scheduler) numFeasibleNodesToFind(percentageOfNodesToScore *int32, return numNodes } -func findNodesThatPassExtenders(ctx context.Context, extenders []framework.Extender, pod *v1.Pod, feasibleNodes []fwk.NodeInfo, statuses *framework.NodeToStatus) ([]fwk.NodeInfo, error) { +func findNodesThatPassExtenders(ctx context.Context, extenders []fwk.Extender, pod *v1.Pod, feasibleNodes []fwk.NodeInfo, statuses *framework.NodeToStatus) ([]fwk.NodeInfo, error) { logger := klog.FromContext(ctx) // Extenders are called sequentially. @@ -775,19 +775,19 @@ func findNodesThatPassExtenders(ctx context.Context, extenders []framework.Exten // All scores are finally combined (added) to get the total weighted scores of all nodes func prioritizeNodes( ctx context.Context, - extenders []framework.Extender, + extenders []fwk.Extender, schedFramework framework.Framework, state fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo, -) ([]framework.NodePluginScores, error) { +) ([]fwk.NodePluginScores, error) { logger := klog.FromContext(ctx) // If no priority configs are provided, then all nodes will have a score of one. // This is required to generate the priority list in the required format if len(extenders) == 0 && !schedFramework.HasScorePlugins() { - result := make([]framework.NodePluginScores, 0, len(nodes)) + result := make([]fwk.NodePluginScores, 0, len(nodes)) for i := range nodes { - result = append(result, framework.NodePluginScores{ + result = append(result, fwk.NodePluginScores{ Name: nodes[i].Node().Name, TotalScore: 1, }) @@ -820,7 +820,7 @@ func prioritizeNodes( if len(extenders) != 0 && nodes != nil { // allNodeExtendersScores has all extenders scores for all nodes. // It is keyed with node name. - allNodeExtendersScores := make(map[string]*framework.NodePluginScores, len(nodes)) + allNodeExtendersScores := make(map[string]*fwk.NodePluginScores, len(nodes)) var mu sync.Mutex var wg sync.WaitGroup for i := range extenders { @@ -851,15 +851,15 @@ func prioritizeNodes( // MaxExtenderPriority may diverge from the max priority used in the scheduler and defined by MaxNodeScore, // therefore we need to scale the score returned by extenders to the score range used by the scheduler. - finalscore := score * weight * (framework.MaxNodeScore / extenderv1.MaxExtenderPriority) + finalscore := score * weight * (fwk.MaxNodeScore / extenderv1.MaxExtenderPriority) if allNodeExtendersScores[nodename] == nil { - allNodeExtendersScores[nodename] = &framework.NodePluginScores{ + allNodeExtendersScores[nodename] = &fwk.NodePluginScores{ Name: nodename, - Scores: make([]framework.PluginScore, 0, len(extenders)), + Scores: make([]fwk.PluginScore, 0, len(extenders)), } } - allNodeExtendersScores[nodename].Scores = append(allNodeExtendersScores[nodename].Scores, framework.PluginScore{ + allNodeExtendersScores[nodename].Scores = append(allNodeExtendersScores[nodename].Scores, fwk.PluginScore{ Name: extenders[extIndex].Name(), Score: finalscore, }) @@ -891,7 +891,7 @@ var errEmptyPriorityList = errors.New("empty priorityList") // in a reservoir sampling manner from the nodes that had the highest score. // It also returns the top {count} Nodes, // and the top of the list will be always the selected host. -func selectHost(nodeScoreList []framework.NodePluginScores, count int) (string, []framework.NodePluginScores, error) { +func selectHost(nodeScoreList []fwk.NodePluginScores, count int) (string, []fwk.NodePluginScores, error) { if len(nodeScoreList) == 0 { return "", nil, errEmptyPriorityList } @@ -901,12 +901,12 @@ func selectHost(nodeScoreList []framework.NodePluginScores, count int) (string, cntOfMaxScore := 1 selectedIndex := 0 // The top of the heap is the NodeScoreResult with the highest score. - sortedNodeScoreList := make([]framework.NodePluginScores, 0, count) - sortedNodeScoreList = append(sortedNodeScoreList, heap.Pop(&h).(framework.NodePluginScores)) + sortedNodeScoreList := make([]fwk.NodePluginScores, 0, count) + sortedNodeScoreList = append(sortedNodeScoreList, heap.Pop(&h).(fwk.NodePluginScores)) // This for-loop will continue until all Nodes with the highest scores get checked for a reservoir sampling, // and sortedNodeScoreList gets (count - 1) elements. - for ns := heap.Pop(&h).(framework.NodePluginScores); ; ns = heap.Pop(&h).(framework.NodePluginScores) { + for ns := heap.Pop(&h).(fwk.NodePluginScores); ; ns = heap.Pop(&h).(fwk.NodePluginScores) { if ns.TotalScore != sortedNodeScoreList[0].TotalScore && len(sortedNodeScoreList) == count { break } @@ -940,8 +940,8 @@ func selectHost(nodeScoreList []framework.NodePluginScores, count int) (string, return sortedNodeScoreList[0].Name, sortedNodeScoreList, nil } -// nodeScoreHeap is a heap of framework.NodePluginScores. -type nodeScoreHeap []framework.NodePluginScores +// nodeScoreHeap is a heap of fwk.NodePluginScores. +type nodeScoreHeap []fwk.NodePluginScores // nodeScoreHeap implements heap.Interface. var _ heap.Interface = &nodeScoreHeap{} @@ -951,7 +951,7 @@ func (h nodeScoreHeap) Less(i, j int) bool { return h[i].TotalScore > h[j].Total func (h nodeScoreHeap) Swap(i, j int) { h[i], h[j] = h[j], h[i] } func (h *nodeScoreHeap) Push(x interface{}) { - *h = append(*h, x.(framework.NodePluginScores)) + *h = append(*h, x.(fwk.NodePluginScores)) } func (h *nodeScoreHeap) Pop() interface{} { @@ -1041,7 +1041,7 @@ func getAttemptsLabel(p *framework.QueuedPodInfo) string { // handleSchedulingFailure records an event for the pod that indicates the // pod has failed to schedule. Also, update the pod condition and nominated node name if set. -func (sched *Scheduler) handleSchedulingFailure(ctx context.Context, fwk framework.Framework, podInfo *framework.QueuedPodInfo, status *fwk.Status, nominatingInfo *framework.NominatingInfo, start time.Time) { +func (sched *Scheduler) handleSchedulingFailure(ctx context.Context, fwk framework.Framework, podInfo *framework.QueuedPodInfo, status *fwk.Status, nominatingInfo *fwk.NominatingInfo, start time.Time) { calledDone := false defer func() { if !calledDone { @@ -1139,7 +1139,7 @@ func truncateMessage(message string) string { return message[:max-len(suffix)] + suffix } -func updatePod(ctx context.Context, client clientset.Interface, apiCacher framework.APICacher, pod *v1.Pod, condition *v1.PodCondition, nominatingInfo *framework.NominatingInfo) error { +func updatePod(ctx context.Context, client clientset.Interface, apiCacher fwk.APICacher, pod *v1.Pod, condition *v1.PodCondition, nominatingInfo *fwk.NominatingInfo) error { if apiCacher != nil { // When API cacher is available, use it to patch the status. _, err := apiCacher.PatchPodStatus(pod, condition, nominatingInfo) @@ -1158,7 +1158,7 @@ func updatePod(ctx context.Context, client clientset.Interface, apiCacher framew podStatusCopy := pod.Status.DeepCopy() // NominatedNodeName is updated only if we are trying to set it, and the value is // different from the existing one. - nnnNeedsUpdate := nominatingInfo.Mode() == framework.ModeOverride && pod.Status.NominatedNodeName != nominatingInfo.NominatedNodeName + nnnNeedsUpdate := nominatingInfo.Mode() == fwk.ModeOverride && pod.Status.NominatedNodeName != nominatingInfo.NominatedNodeName podConditionNeedsUpdate := condition != nil && podutil.UpdatePodCondition(podStatusCopy, condition) if !podConditionNeedsUpdate && !nnnNeedsUpdate { return nil diff --git a/pkg/scheduler/schedule_one_test.go b/pkg/scheduler/schedule_one_test.go index 887e6d2abcd22..a039aaa51b3e9 100644 --- a/pkg/scheduler/schedule_one_test.go +++ b/pkg/scheduler/schedule_one_test.go @@ -27,6 +27,7 @@ import ( goruntime "runtime" "sort" "strconv" + "strings" "sync" "testing" "time" @@ -40,7 +41,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/apimachinery/pkg/util/version" "k8s.io/apimachinery/pkg/util/wait" utilfeature "k8s.io/apiserver/pkg/util/feature" @@ -118,7 +118,7 @@ func (f *fakeExtender) IsIgnorable() bool { func (f *fakeExtender) ProcessPreemption( _ *v1.Pod, _ map[string]*extenderv1.Victims, - _ framework.NodeInfoLister, + _ fwk.NodeInfoLister, ) (map[string]*extenderv1.Victims, error) { return nil, nil } @@ -168,7 +168,7 @@ func (f *fakeExtender) IsFilter() bool { type falseMapPlugin struct{} func newFalseMapPlugin() frameworkruntime.PluginFactory { - return func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + return func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &falseMapPlugin{}, nil } } @@ -181,14 +181,14 @@ func (pl *falseMapPlugin) Score(_ context.Context, _ fwk.CycleState, _ *v1.Pod, return 0, fwk.AsStatus(errPrioritize) } -func (pl *falseMapPlugin) ScoreExtensions() framework.ScoreExtensions { +func (pl *falseMapPlugin) ScoreExtensions() fwk.ScoreExtensions { return nil } type numericMapPlugin struct{} func newNumericMapPlugin() frameworkruntime.PluginFactory { - return func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + return func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &numericMapPlugin{}, nil } } @@ -206,12 +206,12 @@ func (pl *numericMapPlugin) Score(_ context.Context, _ fwk.CycleState, _ *v1.Pod return int64(score), nil } -func (pl *numericMapPlugin) ScoreExtensions() framework.ScoreExtensions { +func (pl *numericMapPlugin) ScoreExtensions() fwk.ScoreExtensions { return nil } // NewNoPodsFilterPlugin initializes a noPodsFilterPlugin and returns it. -func NewNoPodsFilterPlugin(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { +func NewNoPodsFilterPlugin(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &noPodsFilterPlugin{}, nil } @@ -230,11 +230,11 @@ func (pl *reverseNumericMapPlugin) Score(_ context.Context, _ fwk.CycleState, _ return int64(score), nil } -func (pl *reverseNumericMapPlugin) ScoreExtensions() framework.ScoreExtensions { +func (pl *reverseNumericMapPlugin) ScoreExtensions() fwk.ScoreExtensions { return pl } -func (pl *reverseNumericMapPlugin) NormalizeScore(_ context.Context, _ fwk.CycleState, _ *v1.Pod, nodeScores framework.NodeScoreList) *fwk.Status { +func (pl *reverseNumericMapPlugin) NormalizeScore(_ context.Context, _ fwk.CycleState, _ *v1.Pod, nodeScores fwk.NodeScoreList) *fwk.Status { var maxScore float64 minScore := math.MaxFloat64 @@ -243,7 +243,7 @@ func (pl *reverseNumericMapPlugin) NormalizeScore(_ context.Context, _ fwk.Cycle minScore = math.Min(minScore, float64(hostPriority.Score)) } for i, hostPriority := range nodeScores { - nodeScores[i] = framework.NodeScore{ + nodeScores[i] = fwk.NodeScore{ Name: hostPriority.Name, Score: int64(maxScore + minScore - float64(hostPriority.Score)), } @@ -252,7 +252,7 @@ func (pl *reverseNumericMapPlugin) NormalizeScore(_ context.Context, _ fwk.Cycle } func newReverseNumericMapPlugin() frameworkruntime.PluginFactory { - return func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + return func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &reverseNumericMapPlugin{}, nil } } @@ -267,11 +267,11 @@ func (pl *trueMapPlugin) Score(_ context.Context, _ fwk.CycleState, _ *v1.Pod, _ return 1, nil } -func (pl *trueMapPlugin) ScoreExtensions() framework.ScoreExtensions { +func (pl *trueMapPlugin) ScoreExtensions() fwk.ScoreExtensions { return pl } -func (pl *trueMapPlugin) NormalizeScore(_ context.Context, _ fwk.CycleState, _ *v1.Pod, nodeScores framework.NodeScoreList) *fwk.Status { +func (pl *trueMapPlugin) NormalizeScore(_ context.Context, _ fwk.CycleState, _ *v1.Pod, nodeScores fwk.NodeScoreList) *fwk.Status { for _, host := range nodeScores { if host.Name == "" { return fwk.NewStatus(fwk.Error, "unexpected empty host name") @@ -281,7 +281,7 @@ func (pl *trueMapPlugin) NormalizeScore(_ context.Context, _ fwk.CycleState, _ * } func newTrueMapPlugin() frameworkruntime.PluginFactory { - return func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + return func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &trueMapPlugin{}, nil } } @@ -320,7 +320,7 @@ func (s *fakeNodeSelector) Filter(_ context.Context, _ fwk.CycleState, _ *v1.Pod return nil } -func newFakeNodeSelector(_ context.Context, args runtime.Object, _ framework.Handle) (framework.Plugin, error) { +func newFakeNodeSelector(_ context.Context, args runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { pl := &fakeNodeSelector{} if err := frameworkruntime.DecodeInto(args, &pl.fakeNodeSelectorArgs); err != nil { return nil, err @@ -362,7 +362,7 @@ func (f *fakeNodeSelectorDependOnPodAnnotation) Filter(_ context.Context, _ fwk. return nil } -func newFakeNodeSelectorDependOnPodAnnotation(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { +func newFakeNodeSelectorDependOnPodAnnotation(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &fakeNodeSelectorDependOnPodAnnotation{}, nil } @@ -370,8 +370,8 @@ type TestPlugin struct { name string } -var _ framework.ScorePlugin = &TestPlugin{} -var _ framework.FilterPlugin = &TestPlugin{} +var _ fwk.ScorePlugin = &TestPlugin{} +var _ fwk.FilterPlugin = &TestPlugin{} func (t *TestPlugin) Name() string { return t.name @@ -381,7 +381,7 @@ func (t *TestPlugin) Score(ctx context.Context, state fwk.CycleState, p *v1.Pod, return 1, nil } -func (t *TestPlugin) ScoreExtensions() framework.ScoreExtensions { +func (t *TestPlugin) ScoreExtensions() fwk.ScoreExtensions { return nil } @@ -1000,7 +1000,7 @@ func TestSchedulerScheduleOne(t *testing.T) { var gotForgetPod *v1.Pod var gotAssumedPod *v1.Pod var gotBinding *v1.Binding - var gotNominatingInfo *framework.NominatingInfo + var gotNominatingInfo *fwk.NominatingInfo client := clientsetfake.NewClientset(item.sendPod) informerFactory := informers.NewSharedInformerFactory(client, 0) @@ -1036,33 +1036,31 @@ func TestSchedulerScheduleOne(t *testing.T) { }, } mu := &sync.Mutex{} - updatedNominatedNodeName := "" + updatedNominatedNodeName := item.sendPod.Status.NominatedNodeName client.PrependReactor("patch", "pods", func(action clienttesting.Action) (bool, runtime.Object, error) { if action.GetSubresource() != "status" { return false, nil, nil } patchAction := action.(clienttesting.PatchAction) - podName := patchAction.GetName() - namespace := patchAction.GetNamespace() patch := patchAction.GetPatch() - pod, err := informerFactory.Core().V1().Pods().Lister().Pods(namespace).Get(podName) - if err != nil { - t.Fatalf("Failed to get the original pod %s/%s before patching: %v\n", namespace, podName, err) + patchMap := map[string]map[string]json.RawMessage{} + if err := json.Unmarshal(patch, &patchMap); err != nil { + t.Fatalf("Failed to unmarshal patch %q: %v", patch, err) } - marshalledPod, err := json.Marshal(pod) - if err != nil { - t.Fatalf("Failed to marshal the original pod %s/%s: %v", namespace, podName, err) + statusMap, ok := patchMap["status"] + if !ok { + t.Fatalf("patch doesn't include status: %q", patch) } - updated, err := strategicpatch.StrategicMergePatch(marshalledPod, patch, v1.Pod{}) - if err != nil { - t.Fatalf("Failed to apply strategic merge patch %q on pod %#v: %v", patch, marshalledPod, err) - } - updatedPod := &v1.Pod{} - if err := json.Unmarshal(updated, updatedPod); err != nil { - t.Fatalf("Failed to unmarshal updated pod %q: %v", updated, err) + nnn, ok := statusMap["nominatedNodeName"] + if !ok { + return false, nil, nil } mu.Lock() - updatedNominatedNodeName = updatedPod.Status.NominatedNodeName + updatedNominatedNodeName = strings.Trim(string(nnn), "\"") + if updatedNominatedNodeName == "null" { + // NNN has to be cleared with this patch. + updatedNominatedNodeName = "" + } mu.Unlock() return false, nil, nil }) @@ -1084,7 +1082,7 @@ func TestSchedulerScheduleOne(t *testing.T) { } ar := metrics.NewMetricsAsyncRecorder(10, 1*time.Second, ctx.Done()) - queue := internalqueue.NewSchedulingQueue(nil, informerFactory, internalqueue.WithMetricsRecorder(*ar), internalqueue.WithAPIDispatcher(apiDispatcher)) + queue := internalqueue.NewSchedulingQueue(nil, informerFactory, internalqueue.WithMetricsRecorder(ar), internalqueue.WithAPIDispatcher(apiDispatcher)) if asyncAPICallsEnabled { schedFramework.SetAPICacher(apicache.New(queue, cache)) } @@ -1103,7 +1101,7 @@ func TestSchedulerScheduleOne(t *testing.T) { sched.SchedulePod = func(ctx context.Context, fwk framework.Framework, state fwk.CycleState, pod *v1.Pod) (ScheduleResult, error) { return item.mockScheduleResult, item.injectSchedulingError } - sched.FailureHandler = func(ctx context.Context, fwk framework.Framework, p *framework.QueuedPodInfo, status *fwk.Status, ni *framework.NominatingInfo, start time.Time) { + sched.FailureHandler = func(ctx context.Context, fwk framework.Framework, p *framework.QueuedPodInfo, status *fwk.Status, ni *fwk.NominatingInfo, start time.Time) { gotPod = p.Pod gotError = status.AsError() gotNominatingInfo = ni @@ -1159,10 +1157,10 @@ func TestSchedulerScheduleOne(t *testing.T) { t.Errorf("Unexpected error. Wanted %v, got %v", item.expectError.Error(), gotError.Error()) } if item.expectError != nil { - var expectedNominatingInfo *framework.NominatingInfo + var expectedNominatingInfo *fwk.NominatingInfo // Check nominatingInfo expectation based on feature gate if !nominatedNodeNameForExpectationEnabled { - expectedNominatingInfo = &framework.NominatingInfo{NominatingMode: framework.ModeOverride, NominatedNodeName: ""} + expectedNominatingInfo = &fwk.NominatingInfo{NominatingMode: fwk.ModeOverride, NominatedNodeName: ""} } if diff := cmp.Diff(expectedNominatingInfo, gotNominatingInfo); diff != "" { t.Errorf("Unexpected nominatingInfo (-want,+got):\n%s", diff) @@ -1413,7 +1411,7 @@ func TestScheduleOneMarksPodAsProcessedBeforePreBind(t *testing.T) { informerFactory := informers.NewSharedInformerFactory(client, 0) ar := metrics.NewMetricsAsyncRecorder(10, 1*time.Second, ctx.Done()) - queue := internalqueue.NewSchedulingQueue(nil, informerFactory, internalqueue.WithMetricsRecorder(*ar), internalqueue.WithAPIDispatcher(apiDispatcher)) + queue := internalqueue.NewSchedulingQueue(nil, informerFactory, internalqueue.WithMetricsRecorder(ar), internalqueue.WithAPIDispatcher(apiDispatcher)) schedFramework, err := NewFakeFramework( ctx, @@ -1457,7 +1455,7 @@ func TestScheduleOneMarksPodAsProcessedBeforePreBind(t *testing.T) { sched.SchedulePod = func(ctx context.Context, fwk framework.Framework, state fwk.CycleState, pod *v1.Pod) (ScheduleResult, error) { return item.mockScheduleResult, item.injectSchedulingError } - sched.FailureHandler = func(_ context.Context, fwk framework.Framework, p *framework.QueuedPodInfo, status *fwk.Status, _ *framework.NominatingInfo, _ time.Time) { + sched.FailureHandler = func(_ context.Context, fwk framework.Framework, p *framework.QueuedPodInfo, status *fwk.Status, _ *fwk.NominatingInfo, _ time.Time) { gotCallsToFailureHandler++ gotPodIsInFlightAtFailureHandler = podListContainsPod(queue.InFlightPods(), p.Pod) @@ -1989,14 +1987,14 @@ func TestSchedulerWithVolumeBinding(t *testing.T) { func TestSchedulerBinding(t *testing.T) { table := []struct { podName string - extenders []framework.Extender + extenders []fwk.Extender wantBinderID int name string }{ { name: "the extender is not a binder", podName: "pod0", - extenders: []framework.Extender{ + extenders: []fwk.Extender{ &fakeExtender{isBinder: false, interestedPodName: "pod0"}, }, wantBinderID: -1, // default binding. @@ -2004,7 +2002,7 @@ func TestSchedulerBinding(t *testing.T) { { name: "one of the extenders is a binder and interested in pod", podName: "pod0", - extenders: []framework.Extender{ + extenders: []fwk.Extender{ &fakeExtender{isBinder: false, interestedPodName: "pod0"}, &fakeExtender{isBinder: true, interestedPodName: "pod0"}, }, @@ -2013,7 +2011,7 @@ func TestSchedulerBinding(t *testing.T) { { name: "one of the extenders is a binder, but not interested in pod", podName: "pod1", - extenders: []framework.Extender{ + extenders: []fwk.Extender{ &fakeExtender{isBinder: false, interestedPodName: "pod1"}, &fakeExtender{isBinder: true, interestedPodName: "pod0"}, }, @@ -2022,7 +2020,7 @@ func TestSchedulerBinding(t *testing.T) { { name: "ignore when extender bind failed", podName: "pod1", - extenders: []framework.Extender{ + extenders: []fwk.Extender{ &fakeExtender{isBinder: true, errBind: true, interestedPodName: "pod1", ignorable: true}, }, wantBinderID: -1, // default binding. @@ -2065,7 +2063,7 @@ func TestSchedulerBinding(t *testing.T) { if asyncAPICallsEnabled { informerFactory := informers.NewSharedInformerFactory(client, 0) ar := metrics.NewMetricsAsyncRecorder(10, 1*time.Second, ctx.Done()) - queue := internalqueue.NewSchedulingQueue(nil, informerFactory, internalqueue.WithMetricsRecorder(*ar), internalqueue.WithAPIDispatcher(apiDispatcher)) + queue := internalqueue.NewSchedulingQueue(nil, informerFactory, internalqueue.WithMetricsRecorder(ar), internalqueue.WithAPIDispatcher(apiDispatcher)) fwk.SetAPICacher(apicache.New(queue, cache)) } @@ -2105,7 +2103,7 @@ func TestUpdatePod(t *testing.T) { currentPodConditions []v1.PodCondition newPodCondition *v1.PodCondition currentNominatedNodeName string - newNominatingInfo *framework.NominatingInfo + newNominatingInfo *fwk.NominatingInfo expectPatchRequest bool expectedPatchDataPattern string }{ @@ -2235,7 +2233,7 @@ func TestUpdatePod(t *testing.T) { Reason: "currentReason", Message: "currentMessage", }, - newNominatingInfo: &framework.NominatingInfo{NominatingMode: framework.ModeOverride, NominatedNodeName: "node1"}, + newNominatingInfo: &fwk.NominatingInfo{NominatingMode: fwk.ModeOverride, NominatedNodeName: "node1"}, expectPatchRequest: true, expectedPatchDataPattern: `{"status":{"nominatedNodeName":"node1"}}`, }, @@ -2312,7 +2310,7 @@ func TestUpdatePod(t *testing.T) { ctx, cancel := context.WithCancel(ctx) defer cancel() - var apiCacher framework.APICacher + var apiCacher fwk.APICacher if asyncAPICallsEnabled { apiDispatcher := apidispatcher.New(cs, 16, apicalls.Relevances) apiDispatcher.Run(logger) @@ -2320,7 +2318,7 @@ func TestUpdatePod(t *testing.T) { informerFactory := informers.NewSharedInformerFactory(cs, 0) ar := metrics.NewMetricsAsyncRecorder(10, 1*time.Second, ctx.Done()) - queue := internalqueue.NewSchedulingQueue(nil, informerFactory, internalqueue.WithMetricsRecorder(*ar), internalqueue.WithAPIDispatcher(apiDispatcher)) + queue := internalqueue.NewSchedulingQueue(nil, informerFactory, internalqueue.WithMetricsRecorder(ar), internalqueue.WithAPIDispatcher(apiDispatcher)) apiCacher = apicache.New(queue, nil) } @@ -2356,21 +2354,21 @@ func TestUpdatePod(t *testing.T) { func Test_SelectHost(t *testing.T) { tests := []struct { name string - list []framework.NodePluginScores + list []fwk.NodePluginScores topNodesCnt int possibleNodes sets.Set[string] - possibleNodeLists [][]framework.NodePluginScores + possibleNodeLists [][]fwk.NodePluginScores wantError error }{ { name: "unique properly ordered scores", - list: []framework.NodePluginScores{ + list: []fwk.NodePluginScores{ {Name: "node1", TotalScore: 1}, {Name: "node2", TotalScore: 2}, }, topNodesCnt: 2, possibleNodes: sets.New("node2"), - possibleNodeLists: [][]framework.NodePluginScores{ + possibleNodeLists: [][]fwk.NodePluginScores{ { {Name: "node2", TotalScore: 2}, {Name: "node1", TotalScore: 1}, @@ -2379,13 +2377,13 @@ func Test_SelectHost(t *testing.T) { }, { name: "numberOfNodeScoresToReturn > len(list)", - list: []framework.NodePluginScores{ + list: []fwk.NodePluginScores{ {Name: "node1", TotalScore: 1}, {Name: "node2", TotalScore: 2}, }, topNodesCnt: 100, possibleNodes: sets.New("node2"), - possibleNodeLists: [][]framework.NodePluginScores{ + possibleNodeLists: [][]fwk.NodePluginScores{ { {Name: "node2", TotalScore: 2}, {Name: "node1", TotalScore: 1}, @@ -2394,14 +2392,14 @@ func Test_SelectHost(t *testing.T) { }, { name: "equal scores", - list: []framework.NodePluginScores{ + list: []fwk.NodePluginScores{ {Name: "node2.1", TotalScore: 2}, {Name: "node2.2", TotalScore: 2}, {Name: "node2.3", TotalScore: 2}, }, topNodesCnt: 2, possibleNodes: sets.New("node2.1", "node2.2", "node2.3"), - possibleNodeLists: [][]framework.NodePluginScores{ + possibleNodeLists: [][]fwk.NodePluginScores{ { {Name: "node2.1", TotalScore: 2}, {Name: "node2.2", TotalScore: 2}, @@ -2430,7 +2428,7 @@ func Test_SelectHost(t *testing.T) { }, { name: "out of order scores", - list: []framework.NodePluginScores{ + list: []fwk.NodePluginScores{ {Name: "node3.1", TotalScore: 3}, {Name: "node2.1", TotalScore: 2}, {Name: "node1.1", TotalScore: 1}, @@ -2438,7 +2436,7 @@ func Test_SelectHost(t *testing.T) { }, topNodesCnt: 3, possibleNodes: sets.New("node3.1", "node3.2"), - possibleNodeLists: [][]framework.NodePluginScores{ + possibleNodeLists: [][]fwk.NodePluginScores{ { {Name: "node3.1", TotalScore: 3}, {Name: "node3.2", TotalScore: 3}, @@ -2453,7 +2451,7 @@ func Test_SelectHost(t *testing.T) { }, { name: "empty priority list", - list: []framework.NodePluginScores{}, + list: []fwk.NodePluginScores{}, possibleNodes: sets.Set[string]{}, wantError: errEmptyPriorityList, }, @@ -2640,7 +2638,7 @@ func TestFindNodesThatPassExtenders(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { _, ctx := ktesting.NewTestContext(t) - var extenders []framework.Extender + var extenders []fwk.Extender for ii := range tt.extenders { extenders = append(extenders, &tt.extenders[ii]) } @@ -3170,11 +3168,11 @@ func TestSchedulerSchedulePod(t *testing.T) { ), tf.RegisterPreFilterPlugin( "FakePreFilter2", - tf.NewFakePreFilterPlugin("FakePreFilter2", &framework.PreFilterResult{NodeNames: sets.New("node2")}, nil), + tf.NewFakePreFilterPlugin("FakePreFilter2", &fwk.PreFilterResult{NodeNames: sets.New("node2")}, nil), ), tf.RegisterPreFilterPlugin( "FakePreFilter3", - tf.NewFakePreFilterPlugin("FakePreFilter3", &framework.PreFilterResult{NodeNames: sets.New("node1", "node2")}, nil), + tf.NewFakePreFilterPlugin("FakePreFilter3", &fwk.PreFilterResult{NodeNames: sets.New("node1", "node2")}, nil), ), tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New), }, @@ -3198,11 +3196,11 @@ func TestSchedulerSchedulePod(t *testing.T) { ), tf.RegisterPreFilterPlugin( "FakePreFilter2", - tf.NewFakePreFilterPlugin("FakePreFilter2", &framework.PreFilterResult{NodeNames: sets.New("node2")}, nil), + tf.NewFakePreFilterPlugin("FakePreFilter2", &fwk.PreFilterResult{NodeNames: sets.New("node2")}, nil), ), tf.RegisterPreFilterPlugin( "FakePreFilter3", - tf.NewFakePreFilterPlugin("FakePreFilter3", &framework.PreFilterResult{NodeNames: sets.New("node1")}, nil), + tf.NewFakePreFilterPlugin("FakePreFilter3", &fwk.PreFilterResult{NodeNames: sets.New("node1")}, nil), ), tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New), }, @@ -3232,7 +3230,7 @@ func TestSchedulerSchedulePod(t *testing.T) { ), tf.RegisterPreFilterPlugin( "FakePreFilter2", - tf.NewFakePreFilterPlugin("FakePreFilter2", &framework.PreFilterResult{NodeNames: sets.New[string]()}, nil), + tf.NewFakePreFilterPlugin("FakePreFilter2", &fwk.PreFilterResult{NodeNames: sets.New[string]()}, nil), ), tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New), }, @@ -3256,7 +3254,7 @@ func TestSchedulerSchedulePod(t *testing.T) { tf.RegisterQueueSortPlugin(queuesort.Name, queuesort.New), tf.RegisterPreFilterPlugin( "FakePreFilter", - tf.NewFakePreFilterPlugin("FakePreFilter", &framework.PreFilterResult{NodeNames: sets.New[string]("node2")}, nil), + tf.NewFakePreFilterPlugin("FakePreFilter", &fwk.PreFilterResult{NodeNames: sets.New[string]("node2")}, nil), ), tf.RegisterFilterPlugin( "FakeFilter", @@ -3295,7 +3293,7 @@ func TestSchedulerSchedulePod(t *testing.T) { "node1": fwk.Unschedulable, }), ), - tf.RegisterPluginAsExtensions("FakeFilter2", func(_ context.Context, configuration runtime.Object, f framework.Handle) (framework.Plugin, error) { + tf.RegisterPluginAsExtensions("FakeFilter2", func(_ context.Context, configuration runtime.Object, f fwk.Handle) (fwk.Plugin, error) { return tf.FakePreFilterAndFilterPlugin{ FakePreFilterPlugin: &tf.FakePreFilterPlugin{ Result: nil, @@ -3362,7 +3360,7 @@ func TestSchedulerSchedulePod(t *testing.T) { tf.RegisterQueueSortPlugin(queuesort.Name, queuesort.New), tf.RegisterPreFilterPlugin( "FakePreFilter", - tf.NewFakePreFilterPlugin("FakePreFilter", &framework.PreFilterResult{NodeNames: sets.New("node1", "node2")}, nil), + tf.NewFakePreFilterPlugin("FakePreFilter", &fwk.PreFilterResult{NodeNames: sets.New("node1", "node2")}, nil), ), tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New), }, @@ -3382,7 +3380,7 @@ func TestSchedulerSchedulePod(t *testing.T) { tf.RegisterQueueSortPlugin(queuesort.Name, queuesort.New), tf.RegisterPreFilterPlugin( "FakePreFilter", - tf.NewFakePreFilterPlugin("FakePreFilter", &framework.PreFilterResult{ + tf.NewFakePreFilterPlugin("FakePreFilter", &fwk.PreFilterResult{ NodeNames: sets.New("invalid-node"), }, nil), ), @@ -3474,7 +3472,7 @@ func TestSchedulerSchedulePod(t *testing.T) { _, _ = cs.CoreV1().PersistentVolumes().Create(ctx, &pv, metav1.CreateOptions{}) } snapshot := internalcache.NewSnapshot(test.pods, nodes) - fwk, err := tf.NewFramework( + schedFramework, err := tf.NewFramework( ctx, test.registerPlugins, "", frameworkruntime.WithSnapshotSharedLister(snapshot), @@ -3485,7 +3483,7 @@ func TestSchedulerSchedulePod(t *testing.T) { t.Fatal(err) } - var extenders []framework.Extender + var extenders []fwk.Extender for ii := range test.extenders { extenders = append(extenders, &test.extenders[ii]) } @@ -3500,7 +3498,7 @@ func TestSchedulerSchedulePod(t *testing.T) { informerFactory.Start(ctx.Done()) informerFactory.WaitForCacheSync(ctx.Done()) - result, err := sched.SchedulePod(ctx, fwk, framework.NewCycleState(), test.pod) + result, err := sched.SchedulePod(ctx, schedFramework, framework.NewCycleState(), test.pod) if err != test.wErr { gotFitErr, gotOK := err.(*framework.FitError) wantFitErr, wantOK := test.wErr.(*framework.FitError) @@ -3651,7 +3649,7 @@ func TestFindFitPredicateCallCounts(t *testing.T) { plugin := tf.FakeFilterPlugin{} registerFakeFilterFunc := tf.RegisterFilterPlugin( "FakeFilter", - func(_ context.Context, _ runtime.Object, fh framework.Handle) (framework.Plugin, error) { + func(_ context.Context, _ runtime.Object, fh fwk.Handle) (fwk.Plugin, error) { return &plugin, nil }, ) @@ -3674,7 +3672,7 @@ func TestFindFitPredicateCallCounts(t *testing.T) { if err := scheduler.Cache.UpdateSnapshot(logger, scheduler.nodeInfoSnapshot); err != nil { t.Fatal(err) } - fwk, err := tf.NewFramework( + schedFramework, err := tf.NewFramework( ctx, registerPlugins, "", frameworkruntime.WithPodNominator(internalqueue.NewSchedulingQueue(nil, informerFactory)), @@ -3692,9 +3690,9 @@ func TestFindFitPredicateCallCounts(t *testing.T) { if err != nil { t.Fatalf("Error adding nominated pod to podInformer: %s", err) } - fwk.AddNominatedPod(logger, podinfo, &framework.NominatingInfo{NominatingMode: framework.ModeOverride, NominatedNodeName: "1"}) + schedFramework.AddNominatedPod(logger, podinfo, &fwk.NominatingInfo{NominatingMode: fwk.ModeOverride, NominatedNodeName: "1"}) - _, _, err = scheduler.findNodesThatFitPod(ctx, fwk, framework.NewCycleState(), test.pod) + _, _, err = scheduler.findNodesThatFitPod(ctx, schedFramework, framework.NewCycleState(), test.pod) if err != nil { t.Errorf("unexpected error: %v", err) } @@ -3916,7 +3914,7 @@ func Test_prioritizeNodes(t *testing.T) { nodes []*v1.Node pluginRegistrations []tf.RegisterPluginFunc extenders []tf.FakeExtender - want []framework.NodePluginScores + want []fwk.NodePluginScores }{ { name: "the score from all plugins should be recorded in PluginToNodeScores", @@ -3929,10 +3927,10 @@ func Test_prioritizeNodes(t *testing.T) { tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New), }, extenders: nil, - want: []framework.NodePluginScores{ + want: []fwk.NodePluginScores{ { Name: "node1", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: "Node2Prioritizer", Score: 10, @@ -3946,7 +3944,7 @@ func Test_prioritizeNodes(t *testing.T) { }, { Name: "node2", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: "Node2Prioritizer", Score: 100, @@ -3991,10 +3989,10 @@ func Test_prioritizeNodes(t *testing.T) { }, }, }, - want: []framework.NodePluginScores{ + want: []fwk.NodePluginScores{ { Name: "node1", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: "FakeExtender1", @@ -4013,7 +4011,7 @@ func Test_prioritizeNodes(t *testing.T) { }, { Name: "node2", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: "FakeExtender1", Score: 30, @@ -4046,10 +4044,10 @@ func Test_prioritizeNodes(t *testing.T) { ), "PreScore", "Score"), }, extenders: nil, - want: []framework.NodePluginScores{ + want: []fwk.NodePluginScores{ { Name: "node1", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: "Node2Prioritizer", Score: 10, @@ -4063,7 +4061,7 @@ func Test_prioritizeNodes(t *testing.T) { }, { Name: "node2", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: "Node2Prioritizer", Score: 100, @@ -4090,9 +4088,9 @@ func Test_prioritizeNodes(t *testing.T) { ), "PreScore", "Score"), }, extenders: nil, - want: []framework.NodePluginScores{ - {Name: "node1", Scores: []framework.PluginScore{}}, - {Name: "node2", Scores: []framework.PluginScore{}}, + want: []fwk.NodePluginScores{ + {Name: "node1", Scores: []fwk.PluginScore{}}, + {Name: "node2", Scores: []fwk.PluginScore{}}, }, }, { @@ -4117,10 +4115,10 @@ func Test_prioritizeNodes(t *testing.T) { tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New), }, extenders: nil, - want: []framework.NodePluginScores{ + want: []fwk.NodePluginScores{ { Name: "node1", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: "ImageLocality", Score: 5, @@ -4130,7 +4128,7 @@ func Test_prioritizeNodes(t *testing.T) { }, { Name: "node2", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: "ImageLocality", Score: 5, @@ -4140,7 +4138,7 @@ func Test_prioritizeNodes(t *testing.T) { }, { Name: "node3", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: "ImageLocality", Score: 5, @@ -4171,10 +4169,10 @@ func Test_prioritizeNodes(t *testing.T) { tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New), }, extenders: nil, - want: []framework.NodePluginScores{ + want: []fwk.NodePluginScores{ { Name: "node1", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: "ImageLocality", Score: 18, @@ -4184,7 +4182,7 @@ func Test_prioritizeNodes(t *testing.T) { }, { Name: "node2", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: "ImageLocality", Score: 18, @@ -4194,7 +4192,7 @@ func Test_prioritizeNodes(t *testing.T) { }, { Name: "node3", - Scores: []framework.PluginScore{ + Scores: []fwk.PluginScore{ { Name: "ImageLocality", Score: 0, @@ -4222,7 +4220,7 @@ func Test_prioritizeNodes(t *testing.T) { if err := cache.UpdateSnapshot(klog.FromContext(ctx), snapshot); err != nil { t.Fatal(err) } - fwk, err := tf.NewFramework( + schedFramework, err := tf.NewFramework( ctx, test.pluginRegistrations, "", frameworkruntime.WithInformerFactory(informerFactory), @@ -4235,7 +4233,7 @@ func Test_prioritizeNodes(t *testing.T) { } state := framework.NewCycleState() - var extenders []framework.Extender + var extenders []fwk.Extender for ii := range test.extenders { extenders = append(extenders, &test.extenders[ii]) } @@ -4243,7 +4241,7 @@ func Test_prioritizeNodes(t *testing.T) { if err != nil { t.Fatalf("failed to list node from snapshot: %v", err) } - nodesscores, err := prioritizeNodes(ctx, extenders, fwk, state, test.pod, nodeInfos) + nodesscores, err := prioritizeNodes(ctx, extenders, schedFramework, state, test.pod, nodeInfos) if err != nil { t.Errorf("unexpected error: %v", err) } @@ -4419,7 +4417,7 @@ func TestPreferNominatedNodeFilterCallCounts(t *testing.T) { plugin := tf.FakeFilterPlugin{FailedNodeReturnCodeMap: test.nodeReturnCodeMap} registerFakeFilterFunc := tf.RegisterFilterPlugin( "FakeFilter", - func(_ context.Context, _ runtime.Object, fh framework.Handle) (framework.Plugin, error) { + func(_ context.Context, _ runtime.Object, fh fwk.Handle) (fwk.Plugin, error) { return &plugin, nil }, ) @@ -4623,7 +4621,7 @@ func setupTestScheduler(ctx context.Context, t *testing.T, client clientset.Inte } sched.SchedulePod = sched.schedulePod - sched.FailureHandler = func(_ context.Context, _ framework.Framework, p *framework.QueuedPodInfo, status *fwk.Status, _ *framework.NominatingInfo, _ time.Time) { + sched.FailureHandler = func(_ context.Context, _ framework.Framework, p *framework.QueuedPodInfo, status *fwk.Status, _ *fwk.NominatingInfo, _ time.Time) { err := status.AsError() errChan <- err @@ -4675,7 +4673,7 @@ func setupTestSchedulerWithVolumeBinding(ctx context.Context, t *testing.T, clie fns := []tf.RegisterPluginFunc{ tf.RegisterQueueSortPlugin(queuesort.Name, queuesort.New), tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New), - tf.RegisterPluginAsExtensions(volumebinding.Name, func(ctx context.Context, plArgs runtime.Object, handle framework.Handle) (framework.Plugin, error) { + tf.RegisterPluginAsExtensions(volumebinding.Name, func(ctx context.Context, plArgs runtime.Object, handle fwk.Handle) (fwk.Plugin, error) { return &volumebinding.VolumeBinding{Binder: volumeBinder, PVCLister: pvcInformer.Lister()}, nil }, "PreFilter", "Filter", "Reserve", "PreBind"), } diff --git a/pkg/scheduler/scheduler.go b/pkg/scheduler/scheduler.go index 52a2462950e25..8dd01c5a84123 100644 --- a/pkg/scheduler/scheduler.go +++ b/pkg/scheduler/scheduler.go @@ -74,7 +74,7 @@ type Scheduler struct { // by NodeLister and Algorithm. Cache internalcache.Cache - Extenders []framework.Extender + Extenders []fwk.Extender // NextPod should be a function that blocks until the next pod // is available. We don't use a channel for this, because scheduling @@ -160,7 +160,7 @@ type ScheduleResult struct { // The number of nodes out of the evaluated ones that fit the pod. FeasibleNodes int // The nominating info for scheduling cycle. - nominatingInfo *framework.NominatingInfo + nominatingInfo *fwk.NominatingInfo } // WithComponentConfigVersion sets the component config version to the @@ -321,7 +321,7 @@ func New(ctx context.Context, var resourceClaimCache *assumecache.AssumeCache var resourceSliceTracker *resourceslicetracker.Tracker - var draManager framework.SharedDRAManager + var draManager fwk.SharedDRAManager if feature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { resourceClaimInformer := informerFactory.Resource().V1().ResourceClaims().Informer() resourceClaimCache = assumecache.NewAssumeCache(logger, resourceClaimInformer, "ResourceClaim", "", nil) @@ -370,12 +370,12 @@ func New(ctx context.Context, return nil, errors.New("at least one profile is required") } - preEnqueuePluginMap := make(map[string]map[string]framework.PreEnqueuePlugin) + preEnqueuePluginMap := make(map[string]map[string]fwk.PreEnqueuePlugin) queueingHintsPerProfile := make(internalqueue.QueueingHintMapPerProfile) var returnErr error for profileName, profile := range profiles { plugins := profile.PreEnqueuePlugins() - preEnqueuePluginMap[profileName] = make(map[string]framework.PreEnqueuePlugin, len(plugins)) + preEnqueuePluginMap[profileName] = make(map[string]fwk.PreEnqueuePlugin, len(plugins)) for _, plugin := range plugins { preEnqueuePluginMap[profileName][plugin.Name()] = plugin } @@ -401,13 +401,13 @@ func New(ctx context.Context, internalqueue.WithPreEnqueuePluginMap(preEnqueuePluginMap), internalqueue.WithQueueingHintMapPerProfile(queueingHintsPerProfile), internalqueue.WithPluginMetricsSamplePercent(pluginMetricsSamplePercent), - internalqueue.WithMetricsRecorder(*metricsRecorder), + internalqueue.WithMetricsRecorder(metricsRecorder), internalqueue.WithAPIDispatcher(apiDispatcher), ) schedulerCache := internalcache.New(ctx, durationToExpireAssumedPod, apiDispatcher) - var apiCache framework.APICacher + var apiCache fwk.APICacher if apiDispatcher != nil { apiCache = apicache.New(podQueue, schedulerCache) } @@ -451,7 +451,7 @@ var defaultQueueingHintFn = func(_ klog.Logger, _ *v1.Pod, _, _ interface{}) (fw return fwk.Queue, nil } -func buildQueueingHintMap(ctx context.Context, es []framework.EnqueueExtensions) (internalqueue.QueueingHintMap, error) { +func buildQueueingHintMap(ctx context.Context, es []fwk.EnqueueExtensions) (internalqueue.QueueingHintMap, error) { queueingHintMap := make(internalqueue.QueueingHintMap) var returnErr error for _, e := range es { @@ -558,14 +558,14 @@ func NewInformerFactory(cs clientset.Interface, resyncPeriod time.Duration) info return informerFactory } -func buildExtenders(logger klog.Logger, extenders []schedulerapi.Extender, profiles []schedulerapi.KubeSchedulerProfile) ([]framework.Extender, error) { - var fExtenders []framework.Extender +func buildExtenders(logger klog.Logger, extenders []schedulerapi.Extender, profiles []schedulerapi.KubeSchedulerProfile) ([]fwk.Extender, error) { + var fExtenders []fwk.Extender if len(extenders) == 0 { return nil, nil } var ignoredExtendedResources []string - var ignorableExtenders []framework.Extender + var ignorableExtenders []fwk.Extender for i := range extenders { logger.V(2).Info("Creating extender", "extender", extenders[i]) extender, err := NewHTTPExtender(&extenders[i]) @@ -616,7 +616,7 @@ func buildExtenders(logger klog.Logger, extenders []schedulerapi.Extender, profi return fExtenders, nil } -type FailureHandlerFn func(ctx context.Context, fwk framework.Framework, podInfo *framework.QueuedPodInfo, status *fwk.Status, nominatingInfo *framework.NominatingInfo, start time.Time) +type FailureHandlerFn func(ctx context.Context, fwk framework.Framework, podInfo *framework.QueuedPodInfo, status *fwk.Status, nominatingInfo *fwk.NominatingInfo, start time.Time) func unionedGVKs(queueingHintsPerProfile internalqueue.QueueingHintMapPerProfile) map[fwk.EventResource]fwk.ActionType { gvkMap := make(map[fwk.EventResource]fwk.ActionType) diff --git a/pkg/scheduler/scheduler_test.go b/pkg/scheduler/scheduler_test.go index 27c6524c03e59..3fa7f7c6a803e 100644 --- a/pkg/scheduler/scheduler_test.go +++ b/pkg/scheduler/scheduler_test.go @@ -53,12 +53,12 @@ import ( "k8s.io/kubernetes/pkg/features" schedulerapi "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/apis/config/testing/defaults" - "k8s.io/kubernetes/pkg/scheduler/backend/api_cache" - "k8s.io/kubernetes/pkg/scheduler/backend/api_dispatcher" + apicache "k8s.io/kubernetes/pkg/scheduler/backend/api_cache" + apidispatcher "k8s.io/kubernetes/pkg/scheduler/backend/api_dispatcher" internalcache "k8s.io/kubernetes/pkg/scheduler/backend/cache" internalqueue "k8s.io/kubernetes/pkg/scheduler/backend/queue" "k8s.io/kubernetes/pkg/scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework/api_calls" + apicalls "k8s.io/kubernetes/pkg/scheduler/framework/api_calls" "k8s.io/kubernetes/pkg/scheduler/framework/plugins" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/queuesort" @@ -242,7 +242,7 @@ func TestSchedulerCreation(t *testing.T) { t.Errorf("unexpected extenders (-want, +got):\n%s", diff) } - // framework.Handle.Extenders() + // fwk.Handle.Extenders() for _, p := range s.Profiles { extenders := make([]string, 0, len(p.Extenders())) for _, e := range p.Extenders() { @@ -308,7 +308,7 @@ func TestFailureHandler(t *testing.T) { } recorder := metrics.NewMetricsAsyncRecorder(3, 20*time.Microsecond, ctx.Done()) - queue := internalqueue.NewPriorityQueue(nil, informerFactory, internalqueue.WithClock(testingclock.NewFakeClock(time.Now())), internalqueue.WithMetricsRecorder(*recorder), internalqueue.WithAPIDispatcher(apiDispatcher)) + queue := internalqueue.NewPriorityQueue(nil, informerFactory, internalqueue.WithClock(testingclock.NewFakeClock(time.Now())), internalqueue.WithMetricsRecorder(recorder), internalqueue.WithAPIDispatcher(apiDispatcher)) schedulerCache := internalcache.New(ctx, 30*time.Second, apiDispatcher) queue.Add(logger, testPod) @@ -525,7 +525,7 @@ func TestInitPluginsWithIndexers(t *testing.T) { { name: "register indexer, no conflicts", entrypoints: map[string]frameworkruntime.PluginFactory{ - "AddIndexer": func(ctx context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error) { + "AddIndexer": func(ctx context.Context, obj runtime.Object, handle fwk.Handle) (fwk.Plugin, error) { podInformer := handle.SharedInformerFactory().Core().V1().Pods() err := podInformer.Informer().AddIndexers(cache.Indexers{ "nodeName": indexByPodSpecNodeName, @@ -538,14 +538,14 @@ func TestInitPluginsWithIndexers(t *testing.T) { name: "register the same indexer name multiple times, conflict", // order of registration doesn't matter entrypoints: map[string]frameworkruntime.PluginFactory{ - "AddIndexer1": func(ctx context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error) { + "AddIndexer1": func(ctx context.Context, obj runtime.Object, handle fwk.Handle) (fwk.Plugin, error) { podInformer := handle.SharedInformerFactory().Core().V1().Pods() err := podInformer.Informer().AddIndexers(cache.Indexers{ "nodeName": indexByPodSpecNodeName, }) return &TestPlugin{name: "AddIndexer1"}, err }, - "AddIndexer2": func(ctx context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error) { + "AddIndexer2": func(ctx context.Context, obj runtime.Object, handle fwk.Handle) (fwk.Plugin, error) { podInformer := handle.SharedInformerFactory().Core().V1().Pods() err := podInformer.Informer().AddIndexers(cache.Indexers{ "nodeName": indexByPodAnnotationNodeName, @@ -559,14 +559,14 @@ func TestInitPluginsWithIndexers(t *testing.T) { name: "register the same indexer body with different names, no conflicts", // order of registration doesn't matter entrypoints: map[string]frameworkruntime.PluginFactory{ - "AddIndexer1": func(ctx context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error) { + "AddIndexer1": func(ctx context.Context, obj runtime.Object, handle fwk.Handle) (fwk.Plugin, error) { podInformer := handle.SharedInformerFactory().Core().V1().Pods() err := podInformer.Informer().AddIndexers(cache.Indexers{ "nodeName1": indexByPodSpecNodeName, }) return &TestPlugin{name: "AddIndexer1"}, err }, - "AddIndexer2": func(ctx context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error) { + "AddIndexer2": func(ctx context.Context, obj runtime.Object, handle fwk.Handle) (fwk.Plugin, error) { podInformer := handle.SharedInformerFactory().Core().V1().Pods() err := podInformer.Informer().AddIndexers(cache.Indexers{ "nodeName2": indexByPodAnnotationNodeName, @@ -652,14 +652,14 @@ const ( func Test_buildQueueingHintMap(t *testing.T) { tests := []struct { name string - plugins []framework.Plugin + plugins []fwk.Plugin want map[fwk.ClusterEvent][]*internalqueue.QueueingHintFunction featuregateDisabled bool wantErr error }{ { name: "filter without EnqueueExtensions plugin", - plugins: []framework.Plugin{&filterWithoutEnqueueExtensionsPlugin{}}, + plugins: []fwk.Plugin{&filterWithoutEnqueueExtensionsPlugin{}}, want: map[fwk.ClusterEvent][]*internalqueue.QueueingHintFunction{ {Resource: fwk.Pod, ActionType: fwk.All}: { {PluginName: filterWithoutEnqueueExtensions, QueueingHintFn: defaultQueueingHintFn}, @@ -695,7 +695,7 @@ func Test_buildQueueingHintMap(t *testing.T) { }, { name: "node and pod plugin", - plugins: []framework.Plugin{&fakeNodePlugin{}, &fakePodPlugin{}}, + plugins: []fwk.Plugin{&fakeNodePlugin{}, &fakePodPlugin{}}, want: map[fwk.ClusterEvent][]*internalqueue.QueueingHintFunction{ {Resource: fwk.Pod, ActionType: fwk.Add}: { {PluginName: fakePod, QueueingHintFn: fakePodPluginQueueingFn}, @@ -710,7 +710,7 @@ func Test_buildQueueingHintMap(t *testing.T) { }, { name: "node and pod plugin (featuregate is disabled)", - plugins: []framework.Plugin{&fakeNodePlugin{}, &fakePodPlugin{}}, + plugins: []fwk.Plugin{&fakeNodePlugin{}, &fakePodPlugin{}}, featuregateDisabled: true, want: map[fwk.ClusterEvent][]*internalqueue.QueueingHintFunction{ {Resource: fwk.Pod, ActionType: fwk.Add}: { @@ -726,12 +726,12 @@ func Test_buildQueueingHintMap(t *testing.T) { }, { name: "register plugin with empty event", - plugins: []framework.Plugin{&emptyEventPlugin{}}, + plugins: []fwk.Plugin{&emptyEventPlugin{}}, want: map[fwk.ClusterEvent][]*internalqueue.QueueingHintFunction{}, }, { name: "register plugins including emptyEventPlugin", - plugins: []framework.Plugin{&emptyEventPlugin{}, &fakeNodePlugin{}}, + plugins: []fwk.Plugin{&emptyEventPlugin{}, &fakeNodePlugin{}}, want: map[fwk.ClusterEvent][]*internalqueue.QueueingHintFunction{ {Resource: fwk.Pod, ActionType: fwk.Add}: { {PluginName: fakePod, QueueingHintFn: fakePodPluginQueueingFn}, @@ -746,7 +746,7 @@ func Test_buildQueueingHintMap(t *testing.T) { }, { name: "one EventsToRegister returns an error", - plugins: []framework.Plugin{&errorEventsToRegisterPlugin{}}, + plugins: []fwk.Plugin{&errorEventsToRegisterPlugin{}}, want: map[fwk.ClusterEvent][]*internalqueue.QueueingHintFunction{}, wantErr: errors.New("mock error"), }, @@ -767,7 +767,7 @@ func Test_buildQueueingHintMap(t *testing.T) { plugins := append(tt.plugins, &fakebindPlugin{}, &fakeQueueSortPlugin{}) for _, pl := range plugins { tmpPl := pl - if err := registry.Register(pl.Name(), func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + if err := registry.Register(pl.Name(), func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return tmpPl, nil }); err != nil { t.Fatalf("fail to register filter plugin (%s)", pl.Name()) @@ -1030,10 +1030,10 @@ func Test_UnionedGVKs(t *testing.T) { registry := plugins.NewInTreeRegistry() cfgPls := &schedulerapi.Plugins{MultiPoint: tt.plugins} - plugins := []framework.Plugin{&fakeNodePlugin{}, &fakePodPlugin{}, &filterWithoutEnqueueExtensionsPlugin{}, &emptyEventsToRegisterPlugin{}, &fakeQueueSortPlugin{}, &fakebindPlugin{}} + plugins := []fwk.Plugin{&fakeNodePlugin{}, &fakePodPlugin{}, &filterWithoutEnqueueExtensionsPlugin{}, &emptyEventsToRegisterPlugin{}, &fakeQueueSortPlugin{}, &fakebindPlugin{}} for _, pl := range plugins { tmpPl := pl - if err := registry.Register(pl.Name(), func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + if err := registry.Register(pl.Name(), func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return tmpPl, nil }); err != nil { t.Fatalf("fail to register filter plugin (%s)", pl.Name()) @@ -1209,8 +1209,8 @@ func TestFrameworkHandler_IterateOverWaitingPods(t *testing.T) { utiltesting.Eventually(tCtx, func(utiltesting.TContext) sets.Set[string] { // Ensure that all waitingPods in scheduler can be obtained from any profiles. actualPodNamesInWaitingPods := sets.New[string]() - for _, fwk := range scheduler.Profiles { - fwk.IterateOverWaitingPods(func(pod framework.WaitingPod) { + for _, schedFramework := range scheduler.Profiles { + schedFramework.IterateOverWaitingPods(func(pod fwk.WaitingPod) { actualPodNamesInWaitingPods.Insert(pod.GetPod().Name) }) } @@ -1220,7 +1220,7 @@ func TestFrameworkHandler_IterateOverWaitingPods(t *testing.T) { } } -var _ framework.QueueSortPlugin = &fakeQueueSortPlugin{} +var _ fwk.QueueSortPlugin = &fakeQueueSortPlugin{} // fakeQueueSortPlugin is a no-op implementation for QueueSort extension point. type fakeQueueSortPlugin struct{} @@ -1233,7 +1233,7 @@ func (pl *fakeQueueSortPlugin) Less(_, _ fwk.QueuedPodInfo) bool { return false } -var _ framework.BindPlugin = &fakebindPlugin{} +var _ fwk.BindPlugin = &fakebindPlugin{} // fakebindPlugin is a no-op implementation for Bind extension point. type fakebindPlugin struct{} @@ -1320,7 +1320,7 @@ func (*errorEventsToRegisterPlugin) EventsToRegister(_ context.Context) ([]fwk.C return nil, errors.New("mock error") } -// emptyEventsToRegisterPlugin implement interface framework.EnqueueExtensions, but returns nil from EventsToRegister. +// emptyEventsToRegisterPlugin implement interface fwk.EnqueueExtensions, but returns nil from EventsToRegister. // This can simulate a plugin registered at scheduler setup, but does nothing // due to some disabled feature gate. type emptyEventsToRegisterPlugin struct{} @@ -1341,7 +1341,7 @@ type fakePermitPlugin struct { } func newFakePermitPlugin(eventRecorder events.EventRecorder) frameworkruntime.PluginFactory { - return func(ctx context.Context, configuration runtime.Object, f framework.Handle) (framework.Plugin, error) { + return func(ctx context.Context, configuration runtime.Object, f fwk.Handle) (fwk.Plugin, error) { pl := &fakePermitPlugin{ eventRecorder: eventRecorder, } @@ -1367,4 +1367,4 @@ func (f fakePermitPlugin) Permit(ctx context.Context, state fwk.CycleState, p *v return fwk.NewStatus(fwk.Wait), permitTimeout } -var _ framework.PermitPlugin = &fakePermitPlugin{} +var _ fwk.PermitPlugin = &fakePermitPlugin{} diff --git a/pkg/scheduler/testing/framework/fake_extender.go b/pkg/scheduler/testing/framework/fake_extender.go index 604cb4297c9e9..aed0c456a4146 100644 --- a/pkg/scheduler/testing/framework/fake_extender.go +++ b/pkg/scheduler/testing/framework/fake_extender.go @@ -36,7 +36,7 @@ import ( type FitPredicate func(pod *v1.Pod, node fwk.NodeInfo) *fwk.Status // PriorityFunc is a function type which is used in fake extender. -type PriorityFunc func(pod *v1.Pod, nodes []fwk.NodeInfo) (*framework.NodeScoreList, error) +type PriorityFunc func(pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.NodeScoreList, error) // PriorityConfig is used in fake extender to perform Prioritize function. type PriorityConfig struct { @@ -78,34 +78,34 @@ func Node2PredicateExtender(pod *v1.Pod, node fwk.NodeInfo) *fwk.Status { } // ErrorPrioritizerExtender implements PriorityFunc function to always return error. -func ErrorPrioritizerExtender(pod *v1.Pod, nodes []fwk.NodeInfo) (*framework.NodeScoreList, error) { - return &framework.NodeScoreList{}, fmt.Errorf("some error") +func ErrorPrioritizerExtender(pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.NodeScoreList, error) { + return &fwk.NodeScoreList{}, fmt.Errorf("some error") } // Node1PrioritizerExtender implements PriorityFunc function to give score 10 // if the given node's name is "node1"; otherwise score 1. -func Node1PrioritizerExtender(pod *v1.Pod, nodes []fwk.NodeInfo) (*framework.NodeScoreList, error) { - result := framework.NodeScoreList{} +func Node1PrioritizerExtender(pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.NodeScoreList, error) { + result := fwk.NodeScoreList{} for _, node := range nodes { score := 1 if node.Node().Name == "node1" { score = 10 } - result = append(result, framework.NodeScore{Name: node.Node().Name, Score: int64(score)}) + result = append(result, fwk.NodeScore{Name: node.Node().Name, Score: int64(score)}) } return &result, nil } // Node2PrioritizerExtender implements PriorityFunc function to give score 10 // if the given node's name is "node2"; otherwise score 1. -func Node2PrioritizerExtender(pod *v1.Pod, nodes []fwk.NodeInfo) (*framework.NodeScoreList, error) { - result := framework.NodeScoreList{} +func Node2PrioritizerExtender(pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.NodeScoreList, error) { + result := fwk.NodeScoreList{} for _, node := range nodes { score := 1 if node.Node().Name == "node2" { score = 10 } - result = append(result, framework.NodeScore{Name: node.Node().Name, Score: int64(score)}) + result = append(result, fwk.NodeScore{Name: node.Node().Name, Score: int64(score)}) } return &result, nil } @@ -114,7 +114,7 @@ type node2PrioritizerPlugin struct{} // NewNode2PrioritizerPlugin returns a factory function to build node2PrioritizerPlugin. func NewNode2PrioritizerPlugin() frameworkruntime.PluginFactory { - return func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + return func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &node2PrioritizerPlugin{}, nil } } @@ -134,7 +134,7 @@ func (pl *node2PrioritizerPlugin) Score(_ context.Context, _ fwk.CycleState, _ * } // ScoreExtensions returns nil. -func (pl *node2PrioritizerPlugin) ScoreExtensions() framework.ScoreExtensions { +func (pl *node2PrioritizerPlugin) ScoreExtensions() fwk.ScoreExtensions { return nil } @@ -182,7 +182,7 @@ func (f *FakeExtender) SupportsPreemption() bool { func (f *FakeExtender) ProcessPreemption( pod *v1.Pod, nodeNameToVictims map[string]*extenderv1.Victims, - nodeInfos framework.NodeInfoLister, + nodeInfos fwk.NodeInfoLister, ) (map[string]*extenderv1.Victims, error) { nodeNameToVictimsCopy := map[string]*extenderv1.Victims{} // We don't want to change the original nodeNameToVictims @@ -400,4 +400,4 @@ func (f *FakeExtender) IsInterested(pod *v1.Pod) bool { return !f.UnInterested } -var _ framework.Extender = &FakeExtender{} +var _ fwk.Extender = &FakeExtender{} diff --git a/pkg/scheduler/testing/framework/fake_plugins.go b/pkg/scheduler/testing/framework/fake_plugins.go index 607fbdb39f4e2..14caf01a5d4a4 100644 --- a/pkg/scheduler/testing/framework/fake_plugins.go +++ b/pkg/scheduler/testing/framework/fake_plugins.go @@ -25,7 +25,6 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" fwk "k8s.io/kube-scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework" frameworkruntime "k8s.io/kubernetes/pkg/scheduler/framework/runtime" ) @@ -46,7 +45,7 @@ func (pl *FalseFilterPlugin) Filter(_ context.Context, _ fwk.CycleState, pod *v1 } // NewFalseFilterPlugin initializes a FalseFilterPlugin and returns it. -func NewFalseFilterPlugin(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { +func NewFalseFilterPlugin(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &FalseFilterPlugin{}, nil } @@ -64,7 +63,7 @@ func (pl *TrueFilterPlugin) Filter(_ context.Context, _ fwk.CycleState, pod *v1. } // NewTrueFilterPlugin initializes a TrueFilterPlugin and returns it. -func NewTrueFilterPlugin(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { +func NewTrueFilterPlugin(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &TrueFilterPlugin{}, nil } @@ -103,7 +102,7 @@ func (pl *FakeFilterPlugin) Filter(_ context.Context, _ fwk.CycleState, pod *v1. // NewFakeFilterPlugin initializes a fakeFilterPlugin and returns it. func NewFakeFilterPlugin(failedNodeReturnCodeMap map[string]fwk.Code) frameworkruntime.PluginFactory { - return func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + return func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &FakeFilterPlugin{ FailedNodeReturnCodeMap: failedNodeReturnCodeMap, }, nil @@ -132,13 +131,13 @@ func (pl *MatchFilterPlugin) Filter(_ context.Context, _ fwk.CycleState, pod *v1 } // NewMatchFilterPlugin initializes a MatchFilterPlugin and returns it. -func NewMatchFilterPlugin(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { +func NewMatchFilterPlugin(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &MatchFilterPlugin{}, nil } // FakePreFilterPlugin is a test filter plugin. type FakePreFilterPlugin struct { - Result *framework.PreFilterResult + Result *fwk.PreFilterResult Status *fwk.Status name string } @@ -149,18 +148,18 @@ func (pl *FakePreFilterPlugin) Name() string { } // PreFilter invoked at the PreFilter extension point. -func (pl *FakePreFilterPlugin) PreFilter(_ context.Context, _ fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status) { +func (pl *FakePreFilterPlugin) PreFilter(_ context.Context, _ fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status) { return pl.Result, pl.Status } // PreFilterExtensions no extensions implemented by this plugin. -func (pl *FakePreFilterPlugin) PreFilterExtensions() framework.PreFilterExtensions { +func (pl *FakePreFilterPlugin) PreFilterExtensions() fwk.PreFilterExtensions { return nil } // NewFakePreFilterPlugin initializes a fakePreFilterPlugin and returns it. -func NewFakePreFilterPlugin(name string, result *framework.PreFilterResult, status *fwk.Status) frameworkruntime.PluginFactory { - return func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { +func NewFakePreFilterPlugin(name string, result *fwk.PreFilterResult, status *fwk.Status) frameworkruntime.PluginFactory { + return func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &FakePreFilterPlugin{ Result: result, Status: status, @@ -190,7 +189,7 @@ func (pl *FakeReservePlugin) Unreserve(_ context.Context, _ fwk.CycleState, _ *v // NewFakeReservePlugin initializes a fakeReservePlugin and returns it. func NewFakeReservePlugin(status *fwk.Status) frameworkruntime.PluginFactory { - return func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + return func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &FakeReservePlugin{ Status: status, }, nil @@ -220,7 +219,7 @@ func (pl *FakePreBindPlugin) PreBind(_ context.Context, _ fwk.CycleState, _ *v1. // NewFakePreBindPlugin initializes a fakePreBindPlugin and returns it. func NewFakePreBindPlugin(preBindPreFlightStatus, preBindStatus *fwk.Status) frameworkruntime.PluginFactory { - return func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + return func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &FakePreBindPlugin{ PreBindPreFlightStatus: preBindPreFlightStatus, PreBindStatus: preBindStatus, @@ -230,7 +229,7 @@ func NewFakePreBindPlugin(preBindPreFlightStatus, preBindStatus *fwk.Status) fra // FakePermitPlugin is a test permit plugin. type FakePermitPlugin struct { - Handle framework.Handle + Handle fwk.Handle Status *fwk.Status Timeout time.Duration } @@ -247,7 +246,7 @@ func (pl *FakePermitPlugin) Permit(_ context.Context, _ fwk.CycleState, p *v1.Po // NewFakePermitPlugin initializes a fakePermitPlugin and returns it. func NewFakePermitPlugin(status *fwk.Status, timeout time.Duration) frameworkruntime.PluginFactory { - return func(_ context.Context, _ runtime.Object, h framework.Handle) (framework.Plugin, error) { + return func(_ context.Context, _ runtime.Object, h fwk.Handle) (fwk.Plugin, error) { return &FakePermitPlugin{ Status: status, Timeout: timeout, @@ -272,7 +271,7 @@ func (pl *FakePreScoreAndScorePlugin) Score(ctx context.Context, state fwk.Cycle return pl.score, pl.scoreStatus } -func (pl *FakePreScoreAndScorePlugin) ScoreExtensions() framework.ScoreExtensions { +func (pl *FakePreScoreAndScorePlugin) ScoreExtensions() fwk.ScoreExtensions { return nil } @@ -281,7 +280,7 @@ func (pl *FakePreScoreAndScorePlugin) PreScore(ctx context.Context, state fwk.Cy } func NewFakePreScoreAndScorePlugin(name string, score int64, preScoreStatus, scoreStatus *fwk.Status) frameworkruntime.PluginFactory { - return func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + return func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &FakePreScoreAndScorePlugin{ name: name, score: score, @@ -293,7 +292,7 @@ func NewFakePreScoreAndScorePlugin(name string, score int64, preScoreStatus, sco // NewEqualPrioritizerPlugin returns a factory function to build equalPrioritizerPlugin. func NewEqualPrioritizerPlugin() frameworkruntime.PluginFactory { - return func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) { + return func(_ context.Context, _ runtime.Object, _ fwk.Handle) (fwk.Plugin, error) { return &FakePreScoreAndScorePlugin{ name: "EqualPrioritizerPlugin", score: 1, diff --git a/pkg/scheduler/testing/wrappers.go b/pkg/scheduler/testing/wrappers.go index 09c7b4f3ac327..5a67d6a507ab9 100644 --- a/pkg/scheduler/testing/wrappers.go +++ b/pkg/scheduler/testing/wrappers.go @@ -1173,6 +1173,21 @@ func (wrapper *ResourceClaimWrapper) RequestWithName(name, deviceClassName strin return wrapper } +// RequestWithNameCount adds one device request for the given device class with given request name and count. +func (wrapper *ResourceClaimWrapper) RequestWithNameCount(name, deviceClassName string, count int64) *ResourceClaimWrapper { + wrapper.Spec.Devices.Requests = append(wrapper.Spec.Devices.Requests, + resourceapi.DeviceRequest{ + Name: name, + Exactly: &resourceapi.ExactDeviceRequest{ + // Cannot rely on defaulting here, this is used in unit tests. + AllocationMode: resourceapi.DeviceAllocationModeExactCount, + Count: count, + DeviceClassName: deviceClassName, + }, + }) + return wrapper +} + // RequestWithPrioritizedList adds one device request with one subrequest // per provided deviceClassName. func (wrapper *ResourceClaimWrapper) RequestWithPrioritizedList(deviceClassNames ...string) *ResourceClaimWrapper { diff --git a/pkg/scheduler/util/utils.go b/pkg/scheduler/util/utils.go index acaaaabb4d71c..06ba395030dbd 100644 --- a/pkg/scheduler/util/utils.go +++ b/pkg/scheduler/util/utils.go @@ -20,9 +20,11 @@ import ( "context" "encoding/json" "fmt" + "strings" "time" v1 "k8s.io/api/core/v1" + resourceapi "k8s.io/api/resource/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -142,6 +144,12 @@ func IsScalarResourceName(name v1.ResourceName) bool { v1helper.IsPrefixedNativeResource(name) || v1helper.IsAttachableVolumeResourceName(name) } +// IsDRAExtendedResourceName returns true when name is an extended resource name, or an implicit extended resource name +// derived from device class name with the format of deviceclass.resource.kubernetes.io/ +func IsDRAExtendedResourceName(name v1.ResourceName) bool { + return v1helper.IsExtendedResourceName(name) || strings.HasPrefix(string(name), resourceapi.ResourceDeviceClassPrefix) +} + // As converts two objects to the given type. // Both objects must be of the same type. If not, an error is returned. // nil objects are allowed and will be converted to nil. diff --git a/pkg/util/flag/flags.go b/pkg/util/flag/flags.go index 9d518f7c659e7..f65eb3e950e53 100644 --- a/pkg/util/flag/flags.go +++ b/pkg/util/flag/flags.go @@ -171,7 +171,7 @@ type ReservedMemoryVar struct { // Set sets the flag value func (v *ReservedMemoryVar) Set(s string) error { if v.Value == nil { - return fmt.Errorf("no target (nil pointer to *[]MemoryReservation") + return fmt.Errorf("no target (nil pointer to *[]MemoryReservation)") } if s == "" { @@ -200,7 +200,7 @@ func (v *ReservedMemoryVar) Set(s string) error { } numaNodeID, err := strconv.Atoi(numaNodeReservation[0]) if err != nil { - return fmt.Errorf("failed to convert the NUMA node ID, exptected integer, got %s", numaNodeReservation[0]) + return fmt.Errorf("failed to convert the NUMA node ID, expected integer, got %s", numaNodeReservation[0]) } memoryReservation := kubeletconfig.MemoryReservation{ @@ -211,7 +211,7 @@ func (v *ReservedMemoryVar) Set(s string) error { for _, memoryTypeReservation := range memoryTypeReservations { limit := strings.Split(memoryTypeReservation, "=") if len(limit) != 2 { - return fmt.Errorf("the reserved limit has incorrect value, expected type=quantatity, got %s", memoryTypeReservation) + return fmt.Errorf("the reserved limit has incorrect value, expected type=quantity, got %s", memoryTypeReservation) } resourceName := v1.ResourceName(limit[0]) @@ -221,7 +221,7 @@ func (v *ReservedMemoryVar) Set(s string) error { q, err := resource.ParseQuantity(limit[1]) if err != nil { - return fmt.Errorf("failed to parse the quantatity, expected quantatity, got %s", limit[1]) + return fmt.Errorf("failed to parse the quantity: %s", limit[1]) } memoryReservation.Limits[v1.ResourceName(limit[0])] = q @@ -264,6 +264,10 @@ type RegisterWithTaintsVar struct { // Set sets the flag value func (t RegisterWithTaintsVar) Set(s string) error { + if t.Value == nil { + return fmt.Errorf("no target (nil pointer to []v1.Taint)") + } + if len(s) == 0 { *t.Value = nil return nil @@ -283,7 +287,7 @@ func (t RegisterWithTaintsVar) Set(s string) error { // String returns the flag value func (t RegisterWithTaintsVar) String() string { - if len(*t.Value) == 0 { + if t.Value == nil || len(*t.Value) == 0 { return "" } var taints []string diff --git a/pkg/util/iptables/iptables.go b/pkg/util/iptables/iptables.go index dd6cd005d5bcc..8476c1ca78d1b 100644 --- a/pkg/util/iptables/iptables.go +++ b/pkg/util/iptables/iptables.go @@ -247,37 +247,17 @@ func New(protocol Protocol) Interface { return newInternal(utilexec.New(), protocol, "", "") } -func newDualStackInternal(exec utilexec.Interface) (map[v1.IPFamily]Interface, error) { - var err error +func newDualStackInternal(exec utilexec.Interface) map[v1.IPFamily]Interface { interfaces := map[v1.IPFamily]Interface{} - iptv4 := newInternal(exec, ProtocolIPv4, "", "") - if presentErr := iptv4.Present(); presentErr != nil { - err = presentErr - } else { + if presentErr := iptv4.Present(); presentErr == nil { interfaces[v1.IPv4Protocol] = iptv4 } iptv6 := newInternal(exec, ProtocolIPv6, "", "") - if presentErr := iptv6.Present(); presentErr != nil { - // If we get an error for both IPv4 and IPv6 Present() calls, it's virtually guaranteed that - // they're going to be the same error. We ignore the error for IPv6 if IPv4 has already failed. - if err == nil { - err = presentErr - } - } else { + if presentErr := iptv6.Present(); presentErr == nil { interfaces[v1.IPv6Protocol] = iptv6 } - - return interfaces, err -} - -// NewDualStack returns a map containing an IPv4 Interface (if IPv4 iptables is supported) -// and an IPv6 Interface (if IPv6 iptables is supported). If only one family is supported, -// it will return a map with one Interface *and* an error (indicating the problem with the -// other family). If neither family is supported, it will return an empty map and an -// error. -func NewDualStack() (map[v1.IPFamily]Interface, error) { - return newDualStackInternal(utilexec.New()) + return interfaces } // NewBestEffort returns a map containing an IPv4 Interface (if IPv4 iptables is @@ -286,8 +266,7 @@ func NewDualStack() (map[v1.IPFamily]Interface, error) { // simple for callers that just want "best-effort" iptables support, where neither partial // nor complete lack of iptables support is considered an error. func NewBestEffort() map[v1.IPFamily]Interface { - ipts, _ := newDualStackInternal(utilexec.New()) - return ipts + return newDualStackInternal(utilexec.New()) } // EnsureChain is part of Interface. diff --git a/pkg/util/iptables/iptables_test.go b/pkg/util/iptables/iptables_test.go index 1847552621383..e98abff487aff 100644 --- a/pkg/util/iptables/iptables_test.go +++ b/pkg/util/iptables/iptables_test.go @@ -329,7 +329,7 @@ func TestNewDualStack(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { fexec := fakeExecForCommands(tc.commands) - runners, err := newDualStackInternal(fexec) + runners := newDualStackInternal(fexec) if tc.ipv4 && runners[v1.IPv4Protocol] == nil { t.Errorf("Expected ipv4 runner, got nil") @@ -341,12 +341,6 @@ func TestNewDualStack(t *testing.T) { } else if !tc.ipv6 && runners[v1.IPv6Protocol] != nil { t.Errorf("Expected no ipv6 runner, got one") } - - if len(runners) == 2 && err != nil { - t.Errorf("Got 2 runners but also an error (%v)", err) - } else if len(runners) != 2 && err == nil { - t.Errorf("Got %d runners but no error", len(runners)) - } }) } } diff --git a/pkg/util/parsers/parsers.go b/pkg/util/parsers/parsers.go index 80a5f32a877f2..73916fda304a6 100644 --- a/pkg/util/parsers/parsers.go +++ b/pkg/util/parsers/parsers.go @@ -24,6 +24,7 @@ import ( _ "crypto/sha512" dockerref "github.com/distribution/reference" + "github.com/robfig/cron/v3" ) // ParseImageName parses a docker image string into three parts: repo, tag and digest. @@ -52,3 +53,17 @@ func ParseImageName(image string) (string, string, string, error) { } return repoToPull, tag, digest, nil } + +// ParseCronScheduleWithPanicRecovery safely parses a cron schedule, recovering from panics +// that can occur in cron.ParseStandard for malformed schedules like "TZ=0". +func ParseCronScheduleWithPanicRecovery(schedule string) (sched cron.Schedule, err error) { + defer func() { + if r := recover(); r != nil { + sched = nil + err = fmt.Errorf("invalid schedule format: %v", r) + } + }() + + sched, err = cron.ParseStandard(schedule) + return +} diff --git a/pkg/util/parsers/parsers_test.go b/pkg/util/parsers/parsers_test.go index 82a75e6a258c5..96ead1c96cde9 100644 --- a/pkg/util/parsers/parsers_test.go +++ b/pkg/util/parsers/parsers_test.go @@ -19,6 +19,7 @@ package parsers import ( "strings" "testing" + "time" ) // Based on Docker test case removed in: @@ -58,3 +59,132 @@ func TestParseImageName(t *testing.T) { } } } + +func TestParseCronSchedule(t *testing.T) { + testCases := []struct { + name string + schedule string + expectError bool + expectedError string + expectPanic bool + }{ + { + name: "valid schedule without timezone", + schedule: "0 0 * * *", + expectError: false, + }, + { + name: "valid schedule with timezone", + schedule: "TZ=UTC 0 0 * * *", + expectError: false, + }, + { + name: "valid schedule with CRON_TZ", + schedule: "CRON_TZ=America/New_York 0 0 * * *", + expectError: false, + }, + { + name: "TZ=0 without space should panic and be recovered", + schedule: "TZ=0", + expectError: true, + expectedError: "invalid schedule format", + expectPanic: true, + }, + { + name: "TZ= without value should panic and be recovered", + schedule: "TZ=", + expectError: true, + expectedError: "invalid schedule format", + expectPanic: true, + }, + { + name: "CRON_TZ= without space should panic and be recovered", + schedule: "CRON_TZ=UTC", + expectError: true, + expectedError: "invalid schedule format", + expectPanic: true, + }, + { + name: "malformed timezone spec should panic and be recovered", + schedule: "TZ=Invalid/Timezone", + expectError: true, + expectedError: "invalid schedule format", + expectPanic: true, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + // This should not panic even with malformed schedules + sched, err := ParseCronScheduleWithPanicRecovery(tc.schedule) + + if tc.expectError { + if err == nil { + t.Errorf("Expected error for schedule %q, but got none", tc.schedule) + return + } + + if tc.expectedError != "" { + errMsg := err.Error() + if !strings.Contains(errMsg, tc.expectedError) { + t.Errorf("Expected error message to contain %q, but got: %s", tc.expectedError, errMsg) + } + } + + if sched != nil { + t.Errorf("Expected nil schedule when error occurs, but got: %v", sched) + } + } else { + if err != nil { + t.Errorf("Expected no error for schedule %q, but got: %v", tc.schedule, err) + return + } + + if sched == nil { + t.Errorf("Expected valid schedule for %q, but got nil", tc.schedule) + return + } + + // Verify that the schedule is actually valid by calling Next + // This ensures we got a real cron.Schedule, not just a non-nil value + next := sched.Next(time.Now()) + if next.IsZero() { + t.Errorf("Expected valid next execution time for schedule %q, but got zero time", tc.schedule) + } + } + }) + } +} + +func TestParseCronSchedulePanicRecovery(t *testing.T) { + // Test that panics are properly recovered and converted to errors + panicSchedules := []string{ + "TZ=0", + "TZ=", + "CRON_TZ=UTC", + "TZ=Invalid/Timezone", + } + + for _, schedule := range panicSchedules { + t.Run("panic_recovery_"+schedule, func(t *testing.T) { + // This should not panic + sched, err := ParseCronScheduleWithPanicRecovery(schedule) + + // Should get an error + if err == nil { + t.Errorf("Expected error for panic-causing schedule %q, but got none", schedule) + } + + // Should get nil schedule + if sched != nil { + t.Errorf("Expected nil schedule for panic-causing schedule %q, but got: %v", schedule, sched) + } + + // Error message should contain "invalid schedule format" + errMsg := err.Error() + if !strings.Contains(errMsg, "invalid schedule format") { + t.Errorf("Expected error message to contain 'invalid schedule format', but got: %s", errMsg) + } + }) + } +} diff --git a/pkg/volume/csi/csi_attacher.go b/pkg/volume/csi/csi_attacher.go index 314fe68a85e99..816da41bd2972 100644 --- a/pkg/volume/csi/csi_attacher.go +++ b/pkg/volume/csi/csi_attacher.go @@ -252,7 +252,7 @@ func (c *csiAttacher) VolumesAreAttached(specs []*volume.Spec, nodeName types.No } func (c *csiAttacher) GetDeviceMountPath(spec *volume.Spec) (string, error) { - klog.V(4).Info(log("attacher.GetDeviceMountPath(%v)", spec)) + klog.V(4).Info(log("attacher.GetDeviceMountPath for volume(%s)", spec.Name())) deviceMountPath, err := makeDeviceMountPath(c.plugin, spec) if err != nil { return "", errors.New(log("attacher.GetDeviceMountPath failed to make device mount path: %v", err)) @@ -356,7 +356,7 @@ func (c *csiAttacher) MountDevice(spec *volume.Spec, devicePath string, deviceMo return nil } - //TODO (vladimirvivien) implement better AccessModes mapping between k8s and CSI + // TODO (vladimirvivien) implement better AccessModes mapping between k8s and CSI accessMode := v1.ReadWriteOnce if spec.PersistentVolume.Spec.AccessModes != nil { accessMode = spec.PersistentVolume.Spec.AccessModes[0] diff --git a/pkg/volume/csi/csi_block.go b/pkg/volume/csi/csi_block.go index 4626751c393c1..2fc1cd388e2a4 100644 --- a/pkg/volume/csi/csi_block.go +++ b/pkg/volume/csi/csi_block.go @@ -68,7 +68,6 @@ package csi import ( "context" "errors" - "fmt" "os" "path/filepath" @@ -171,8 +170,8 @@ func (m *csiBlockMapper) stageVolumeForBlock( if csiSource.NodeStageSecretRef != nil { nodeStageSecrets, err = getCredentialsFromSecret(m.k8s, csiSource.NodeStageSecretRef) if err != nil { - return "", fmt.Errorf("failed to get NodeStageSecretRef %s/%s: %v", - csiSource.NodeStageSecretRef.Namespace, csiSource.NodeStageSecretRef.Name, err) + return "", volumetypes.NewTransientOperationFailure(log("failed to get NodeStageSecretRef %s/%s: %v", + csiSource.NodeStageSecretRef.Namespace, csiSource.NodeStageSecretRef.Name, err)) } } @@ -223,11 +222,11 @@ func (m *csiBlockMapper) publishVolumeForBlock( volAttribs := csiSource.VolumeAttributes podInfoEnabled, err := m.plugin.podInfoEnabled(string(m.driverName)) if err != nil { - return "", errors.New(log("blockMapper.publishVolumeForBlock failed to assemble volume attributes: %v", err)) + return "", volumetypes.NewTransientOperationFailure(log("blockMapper.publishVolumeForBlock failed to assemble volume attributes: %v", err)) } volumeLifecycleMode, err := m.plugin.getVolumeLifecycleMode(m.spec) if err != nil { - return "", errors.New(log("blockMapper.publishVolumeForBlock failed to get VolumeLifecycleMode: %v", err)) + return "", volumetypes.NewTransientOperationFailure(log("blockMapper.publishVolumeForBlock failed to get VolumeLifecycleMode: %v", err)) } if podInfoEnabled { volAttribs = mergeMap(volAttribs, getPodInfoAttrs(m.pod, volumeLifecycleMode)) @@ -237,7 +236,7 @@ func (m *csiBlockMapper) publishVolumeForBlock( if csiSource.NodePublishSecretRef != nil { nodePublishSecrets, err = getCredentialsFromSecret(m.k8s, csiSource.NodePublishSecretRef) if err != nil { - return "", errors.New(log("blockMapper.publishVolumeForBlock failed to get NodePublishSecretRef %s/%s: %v", + return "", volumetypes.NewTransientOperationFailure(log("blockMapper.publishVolumeForBlock failed to get NodePublishSecretRef %s/%s: %v", csiSource.NodePublishSecretRef.Namespace, csiSource.NodePublishSecretRef.Name, err)) } } @@ -304,11 +303,11 @@ func (m *csiBlockMapper) SetUpDevice() (string, error) { attachID := getAttachmentName(csiSource.VolumeHandle, csiSource.Driver, nodeName) attachment, err = m.k8s.StorageV1().VolumeAttachments().Get(context.TODO(), attachID, meta.GetOptions{}) if err != nil { - return "", errors.New(log("blockMapper.SetupDevice failed to get volume attachment [id=%v]: %v", attachID, err)) + return "", volumetypes.NewTransientOperationFailure(log("blockMapper.SetupDevice failed to get volume attachment [id=%v]: %v", attachID, err)) } } - //TODO (vladimirvivien) implement better AccessModes mapping between k8s and CSI + // TODO (vladimirvivien) implement better AccessModes mapping between k8s and CSI accessMode := v1.ReadWriteOnce if m.spec.PersistentVolume.Spec.AccessModes != nil { accessMode = m.spec.PersistentVolume.Spec.AccessModes[0] @@ -366,11 +365,11 @@ func (m *csiBlockMapper) MapPodDevice() (string, error) { attachID := getAttachmentName(csiSource.VolumeHandle, csiSource.Driver, nodeName) attachment, err = m.k8s.StorageV1().VolumeAttachments().Get(context.TODO(), attachID, meta.GetOptions{}) if err != nil { - return "", errors.New(log("blockMapper.MapPodDevice failed to get volume attachment [id=%v]: %v", attachID, err)) + return "", volumetypes.NewTransientOperationFailure(log("blockMapper.MapPodDevice failed to get volume attachment [id=%v]: %v", attachID, err)) } } - //TODO (vladimirvivien) implement better AccessModes mapping between k8s and CSI + // TODO (vladimirvivien) implement better AccessModes mapping between k8s and CSI accessMode := v1.ReadWriteOnce if m.spec.PersistentVolume.Spec.AccessModes != nil { accessMode = m.spec.PersistentVolume.Spec.AccessModes[0] diff --git a/pkg/volume/csi/csi_block_test.go b/pkg/volume/csi/csi_block_test.go index 3b06ff1c7c771..deffc6b39f902 100644 --- a/pkg/volume/csi/csi_block_test.go +++ b/pkg/volume/csi/csi_block_test.go @@ -18,6 +18,7 @@ package csi import ( "context" + "errors" "fmt" "os" "path/filepath" @@ -491,6 +492,46 @@ func TestBlockMapperMapPodDeviceNoClientError(t *testing.T) { } } +func TestBlockMapperMapPodDeviceGetStageSecretsError(t *testing.T) { + transientError := volumetypes.NewTransientOperationFailure("") + plug, tmpDir := newTestPlugin(t, nil) + defer func() { + if err := os.RemoveAll(tmpDir); err != nil { + t.Error(err) + } + }() + + csiMapper, _, pv, err := prepareBlockMapperTest(plug, "test-pv", t) + if err != nil { + t.Fatalf("Failed to make a new Mapper: %v", err) + } + + // set a stage secret for the pv + pv.Spec.PersistentVolumeSource.CSI.NodePublishSecretRef = &api.SecretReference{ + Name: "foo", + Namespace: "default", + } + pvName := pv.GetName() + nodeName := string(plug.host.GetNodeName()) + + csiMapper.csiClient = setupClient(t, true) + + attachID := getAttachmentName(csiMapper.volumeID, string(csiMapper.driverName), nodeName) + attachment := makeTestAttachment(attachID, nodeName, pvName) + attachment.Status.Attached = true + if _, err = csiMapper.k8s.StorageV1().VolumeAttachments().Create(context.Background(), attachment, metav1.CreateOptions{}); err != nil { + t.Fatalf("failed to setup VolumeAttachment: %v", err) + } + t.Log("created attachment ", attachID) + + _, err = csiMapper.MapPodDevice() + if err == nil { + t.Errorf("test should fail, but no error occurred") + } else if !errors.As(err, &transientError) { + t.Errorf("expected a transient error but got %v", err) + } +} + func TestBlockMapperTearDownDevice(t *testing.T) { plug, tmpDir := newTestPlugin(t, nil) defer os.RemoveAll(tmpDir) diff --git a/pkg/volume/csi/csi_mounter.go b/pkg/volume/csi/csi_mounter.go index fa8a8e5878989..909b67dd1c479 100644 --- a/pkg/volume/csi/csi_mounter.go +++ b/pkg/volume/csi/csi_mounter.go @@ -172,7 +172,7 @@ func (c *csiMountMgr) SetUpAt(dir string, mounterArgs volume.MounterArgs) error secretRef = pvSrc.NodePublishSecretRef } - //TODO (vladimirvivien) implement better AccessModes mapping between k8s and CSI + // TODO (vladimirvivien) implement better AccessModes mapping between k8s and CSI if c.spec.PersistentVolume.Spec.AccessModes != nil { accessMode = c.spec.PersistentVolume.Spec.AccessModes[0] } diff --git a/pkg/volume/emptydir/empty_dir.go b/pkg/volume/emptydir/empty_dir.go index 024b12a0022cc..d5c29b182fed5 100644 --- a/pkg/volume/emptydir/empty_dir.go +++ b/pkg/volume/emptydir/empty_dir.go @@ -112,14 +112,8 @@ func (plugin *emptyDirPlugin) NewMounter(spec *volume.Spec, pod *v1.Pod) (volume } func calculateEmptyDirMemorySize(nodeAllocatableMemory *resource.Quantity, spec *volume.Spec, pod *v1.Pod) *resource.Quantity { - // if feature is disabled, continue the default behavior of linux host default - sizeLimit := &resource.Quantity{} - if !utilfeature.DefaultFeatureGate.Enabled(features.SizeMemoryBackedVolumes) { - return sizeLimit - } - // size limit defaults to node allocatable (pods can't consume more memory than all pods) - sizeLimit = nodeAllocatableMemory + sizeLimit := nodeAllocatableMemory zero := resource.MustParse("0") // determine pod resource allocation diff --git a/pkg/volume/hostpath/host_path.go b/pkg/volume/hostpath/host_path.go index bdc3a3e623bfd..b167c932a185d 100644 --- a/pkg/volume/hostpath/host_path.go +++ b/pkg/volume/hostpath/host_path.go @@ -29,7 +29,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/uuid" - "k8s.io/kubernetes/pkg/kubelet/config" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util" "k8s.io/kubernetes/pkg/volume/util/hostutil" @@ -326,7 +326,7 @@ func (r *hostPathProvisioner) Provision(selectedNode *v1.Node, allowedTopologies return nil, err } if selinux.GetEnabled() { - err := selinux.SetFileLabel(pv.Spec.HostPath.Path, config.KubeletContainersSharedSELinuxLabel) + err := selinux.SetFileLabel(pv.Spec.HostPath.Path, kubeletconfig.KubeletContainersSharedSELinuxLabel) if err != nil { return nil, fmt.Errorf("failed to set selinux label for %q: %v", pv.Spec.HostPath.Path, err) } diff --git a/pkg/volume/iscsi/iscsi_util.go b/pkg/volume/iscsi/iscsi_util.go index b51127aa92f96..c876164feda06 100644 --- a/pkg/volume/iscsi/iscsi_util.go +++ b/pkg/volume/iscsi/iscsi_util.go @@ -34,7 +34,7 @@ import ( utilexec "k8s.io/utils/exec" v1 "k8s.io/api/core/v1" - "k8s.io/kubernetes/pkg/kubelet/config" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" "k8s.io/kubernetes/pkg/volume" volumeutil "k8s.io/kubernetes/pkg/volume/util" "k8s.io/kubernetes/pkg/volume/util/types" @@ -939,7 +939,7 @@ func getVolCount(dir, portal, iqn string) (int, error) { // portal + iqn, e.g., 127.0.0.1:3260-iqn.2003-01.io.k8s:e2e.volume-1-lun-2 var counter int for _, c := range contents { - if !c.IsDir() || c.Name() == config.DefaultKubeletVolumeDevicesDirName { + if !c.IsDir() || c.Name() == kubeletconfig.DefaultKubeletVolumeDevicesDirName { continue } diff --git a/pkg/volume/iscsi/iscsi_util_test.go b/pkg/volume/iscsi/iscsi_util_test.go index 7ab361a41795d..4d3906b509faf 100644 --- a/pkg/volume/iscsi/iscsi_util_test.go +++ b/pkg/volume/iscsi/iscsi_util_test.go @@ -28,7 +28,7 @@ import ( testingexec "k8s.io/utils/exec/testing" - "k8s.io/kubernetes/pkg/kubelet/config" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) @@ -414,7 +414,7 @@ func TestGetVolCount(t *testing.T) { }, { name: "volumeDevices (block) volume", - baseDir: filepath.Join(baseDir, config.DefaultKubeletVolumeDevicesDirName), + baseDir: filepath.Join(baseDir, kubeletconfig.DefaultKubeletVolumeDevicesDirName), portal: "192.168.0.2:3260", iqn: "iqn.2003-01.io.k8s:e2e.volume-1-lun-4", count: 1, @@ -451,8 +451,8 @@ func createFakePluginDirs() (string, error) { "iface-127.0.0.1:3260:pv1/127.0.0.1:3260-iqn.2003-01.io.k8s:e2e.volume-1-lun-3", "iface-127.0.0.1:3260:pv2/127.0.0.1:3260-iqn.2003-01.io.k8s:e2e.volume-1-lun-2", "iface-127.0.0.1:3260:pv2/192.168.0.1:3260-iqn.2003-01.io.k8s:e2e.volume-1-lun-1", - filepath.Join(config.DefaultKubeletVolumeDevicesDirName, "iface-127.0.0.1:3260/192.168.0.2:3260-iqn.2003-01.io.k8s:e2e.volume-1-lun-4"), - filepath.Join(config.DefaultKubeletVolumeDevicesDirName, "iface-127.0.0.1:3260/192.168.0.3:3260-iqn.2003-01.io.k8s:e2e.volume-1-lun-5"), + filepath.Join(kubeletconfig.DefaultKubeletVolumeDevicesDirName, "iface-127.0.0.1:3260/192.168.0.2:3260-iqn.2003-01.io.k8s:e2e.volume-1-lun-4"), + filepath.Join(kubeletconfig.DefaultKubeletVolumeDevicesDirName, "iface-127.0.0.1:3260/192.168.0.3:3260-iqn.2003-01.io.k8s:e2e.volume-1-lun-5"), } for _, d := range subdirs { diff --git a/pkg/volume/testing/testing.go b/pkg/volume/testing/testing.go index a897bab3a6a88..e96df4eb0f9d2 100644 --- a/pkg/volume/testing/testing.go +++ b/pkg/volume/testing/testing.go @@ -63,7 +63,7 @@ const ( TimeoutOnSetupVolumeName = "timeout-setup-volume" // FailOnSetupVolumeName will cause setup call to fail FailOnSetupVolumeName = "fail-setup-volume" - //TimeoutAndFailOnSetupVolumeName will first timeout and then fail the setup + // TimeoutAndFailOnSetupVolumeName will first timeout and then fail the setup TimeoutAndFailOnSetupVolumeName = "timeout-and-fail-setup-volume" // SuccessAndTimeoutSetupVolumeName will cause first mount operation to succeed but subsequent attempts to timeout SuccessAndTimeoutSetupVolumeName = "success-and-timeout-setup-volume-name" diff --git a/pkg/volume/util/fsquota/common/quota_common_linux_impl.go b/pkg/volume/util/fsquota/common/quota_common_linux_impl.go index 5e8e3850cfe5d..a995966239309 100644 --- a/pkg/volume/util/fsquota/common/quota_common_linux_impl.go +++ b/pkg/volume/util/fsquota/common/quota_common_linux_impl.go @@ -71,9 +71,11 @@ var ( type VolumeProvider struct { } -var quotaCmds = []string{"/sbin/xfs_quota", +var quotaCmds = []string{ + "/sbin/xfs_quota", "/usr/sbin/xfs_quota", - "/bin/xfs_quota"} + "/bin/xfs_quota", +} var quotaParseRegexp = regexp.MustCompilePOSIX("^[^ \t]*[ \t]*([0-9]+)") diff --git a/pkg/volume/util/nested_volumes.go b/pkg/volume/util/nested_volumes.go index 27a6c29cd9864..e059f43b092a5 100644 --- a/pkg/volume/util/nested_volumes.go +++ b/pkg/volume/util/nested_volumes.go @@ -50,7 +50,7 @@ func getNestedMountpoints(name, baseDir string, pod v1.Pod) ([]string, error) { // Don't let a container trick us into creating directories outside of its rootfs return fmt.Errorf("invalid container mount point %v", myMountPoint) } - myMPSlash := myMountPoint + string(os.PathSeparator) + myMountPointWithSlash := myMountPoint + string(os.PathSeparator) // The previously found nested mountpoints. // NOTE: We can't simply rely on sort.Strings to have all the mountpoints sorted and // grouped. For example, the following strings are sorted in this exact order: @@ -64,7 +64,7 @@ func getNestedMountpoints(name, baseDir string, pod v1.Pod) ([]string, error) { // For example, if this volume is mounted as /dir and other volumes are mounted // as /dir/nested and /dir/nested/other, only create /dir/nested. for _, mp := range allMountPoints { - if !strings.HasPrefix(mp, myMPSlash) { + if !strings.HasPrefix(mp, myMountPointWithSlash) { continue // skip -- not nested beneath myMountPoint } @@ -80,7 +80,7 @@ func getNestedMountpoints(name, baseDir string, pod v1.Pod) ([]string, error) { } // since this mount point is nested, remember it so that we can check that following ones aren't nested beneath this one prevNestedMPs = append(prevNestedMPs, mp+string(os.PathSeparator)) - retval = append(retval, mp[len(myMPSlash):]) + retval = append(retval, mp[len(myMountPointWithSlash):]) } } return nil diff --git a/pkg/volume/util/operationexecutor/operation_executor.go b/pkg/volume/util/operationexecutor/operation_executor.go index 462aafd00ed70..4100b0ae897e9 100644 --- a/pkg/volume/util/operationexecutor/operation_executor.go +++ b/pkg/volume/util/operationexecutor/operation_executor.go @@ -169,7 +169,6 @@ type MarkVolumeOpts struct { VolumeName v1.UniqueVolumeName Mounter volume.Mounter BlockVolumeMapper volume.BlockVolumeMapper - OuterVolumeSpecName string VolumeGIDVolume string VolumeSpec *volume.Spec VolumeMountState VolumeMountState @@ -303,7 +302,7 @@ type VolumeLogger interface { GenerateError(prefixMsg string, err error) (simpleErr, detailedErr error) } -// Generates an error string with the format ": " if err exists +// errSuffix generates an error string with the format ": " if err exists func errSuffix(err error) string { errStr := "" if err != nil { @@ -312,12 +311,12 @@ func errSuffix(err error) string { return errStr } -// Generate a detailed error msg for logs +// generateVolumeMsgDetailed generates a detailed error msg for logs func generateVolumeMsgDetailed(prefixMsg, suffixMsg, volumeName, details string) (detailedMsg string) { return fmt.Sprintf("%v for volume %q %v %v", prefixMsg, volumeName, details, suffixMsg) } -// Generate a simplified error msg for events and a detailed error msg for logs +// generateVolumeMsg generates a simplified error msg for events and a detailed error msg for logs func generateVolumeMsg(prefixMsg, suffixMsg, volumeName, details string) (simpleMsg, detailedMsg string) { simpleMsg = fmt.Sprintf("%v for volume %q %v", prefixMsg, volumeName, suffixMsg) return simpleMsg, generateVolumeMsgDetailed(prefixMsg, suffixMsg, volumeName, details) @@ -422,10 +421,8 @@ type VolumeToMount struct { // InnerVolumeSpecName. VolumeSpec *volume.Spec - // outerVolumeSpecName is the podSpec.Volume[x].Name of the volume. If the - // volume was referenced through a persistent volume claim, this contains - // the podSpec.Volume[x].Name of the persistent volume claim. - OuterVolumeSpecName string + // outerVolumeSpecNames are the podSpec.Volume[x].Name of the volume. + OuterVolumeSpecNames []string // Pod to mount the volume to. Used to create NewMounter. Pod *v1.Pod @@ -679,44 +676,6 @@ type MountedVolume struct { // fsType: ext4 InnerVolumeSpecName string - // outerVolumeSpecName is the podSpec.Volume[x].Name of the volume. If the - // volume was referenced through a persistent volume claim, this contains - // the podSpec.Volume[x].Name of the persistent volume claim. - // PVC example: - // kind: Pod - // apiVersion: v1 - // metadata: - // name: mypod - // spec: - // containers: - // - name: myfrontend - // image: dockerfile/nginx - // volumeMounts: - // - mountPath: "/var/www/html" - // name: mypd - // volumes: - // - name: mypd <- OuterVolumeSpecName - // persistentVolumeClaim: - // claimName: myclaim - // Non-PVC example: - // apiVersion: v1 - // kind: Pod - // metadata: - // name: test-pd - // spec: - // containers: - // - image: registry.k8s.io/test-webserver - // name: test-container - // volumeMounts: - // - mountPath: /test-pd - // name: test-volume - // volumes: - // - name: test-volume <- OuterVolumeSpecName - // gcePersistentDisk: - // pdName: my-data-disk - // fsType: ext4 - OuterVolumeSpecName string - // PluginName is the "Unescaped Qualified" name of the volume plugin used to // mount and unmount this volume. It can be used to fetch the volume plugin // to unmount with, on demand. It is also the name that plugins use, though @@ -758,13 +717,13 @@ type MountedVolume struct { // GenerateMsgDetailed returns detailed msgs for mounted volumes func (volume *MountedVolume) GenerateMsgDetailed(prefixMsg, suffixMsg string) (detailedMsg string) { detailedStr := fmt.Sprintf("(UniqueName: %q) pod %q (UID: %q)", volume.VolumeName, volume.PodName, volume.PodUID) - return generateVolumeMsgDetailed(prefixMsg, suffixMsg, volume.OuterVolumeSpecName, detailedStr) + return generateVolumeMsgDetailed(prefixMsg, suffixMsg, string(volume.VolumeName), detailedStr) } // GenerateMsg returns simple and detailed msgs for mounted volumes func (volume *MountedVolume) GenerateMsg(prefixMsg, suffixMsg string) (simpleMsg, detailedMsg string) { detailedStr := fmt.Sprintf("(UniqueName: %q) pod %q (UID: %q)", volume.VolumeName, volume.PodName, volume.PodUID) - return generateVolumeMsg(prefixMsg, suffixMsg, volume.OuterVolumeSpecName, detailedStr) + return generateVolumeMsg(prefixMsg, suffixMsg, string(volume.VolumeName), detailedStr) } // GenerateErrorDetailed returns simple and detailed errors for mounted volumes diff --git a/pkg/volume/util/operationexecutor/operation_generator.go b/pkg/volume/util/operationexecutor/operation_generator.go index a79e6cb628b1a..9d5c937d95372 100644 --- a/pkg/volume/util/operationexecutor/operation_generator.go +++ b/pkg/volume/util/operationexecutor/operation_generator.go @@ -593,7 +593,6 @@ func (og *operationGenerator) GenerateMountVolumeFunc( PodUID: volumeToMount.Pod.UID, VolumeName: volumeToMount.VolumeName, Mounter: volumeMounter, - OuterVolumeSpecName: volumeToMount.OuterVolumeSpecName, VolumeGIDVolume: volumeToMount.VolumeGIDValue, VolumeSpec: volumeToMount.VolumeSpec, VolumeMountState: VolumeMounted, @@ -759,13 +758,12 @@ func (og *operationGenerator) GenerateUnmountVolumeFunc( if unmountErr != nil { // Mark the volume as uncertain, so SetUp is called for new pods. Teardown may be already in progress. opts := MarkVolumeOpts{ - PodName: volumeToUnmount.PodName, - PodUID: volumeToUnmount.PodUID, - VolumeName: volumeToUnmount.VolumeName, - OuterVolumeSpecName: volumeToUnmount.OuterVolumeSpecName, - VolumeGIDVolume: volumeToUnmount.VolumeGIDValue, - VolumeSpec: volumeToUnmount.VolumeSpec, - VolumeMountState: VolumeMountUncertain, + PodName: volumeToUnmount.PodName, + PodUID: volumeToUnmount.PodUID, + VolumeName: volumeToUnmount.VolumeName, + VolumeGIDVolume: volumeToUnmount.VolumeGIDValue, + VolumeSpec: volumeToUnmount.VolumeSpec, + VolumeMountState: VolumeMountUncertain, } markMountUncertainErr := actualStateOfWorld.MarkVolumeMountAsUncertain(opts) if markMountUncertainErr != nil { @@ -779,9 +777,8 @@ func (og *operationGenerator) GenerateUnmountVolumeFunc( } klog.Infof( - "UnmountVolume.TearDown succeeded for volume %q (OuterVolumeSpecName: %q) pod %q (UID: %q). InnerVolumeSpecName %q. PluginName %q, VolumeGIDValue %q", + "UnmountVolume.TearDown succeeded for volume %q pod %q (UID: %q). InnerVolumeSpecName %q. PluginName %q, VolumeGIDValue %q", volumeToUnmount.VolumeName, - volumeToUnmount.OuterVolumeSpecName, volumeToUnmount.PodName, volumeToUnmount.PodUID, volumeToUnmount.InnerVolumeSpecName, @@ -1025,14 +1022,13 @@ func (og *operationGenerator) GenerateMapVolumeFunc( } markVolumeOpts := MarkVolumeOpts{ - PodName: volumeToMount.PodName, - PodUID: volumeToMount.Pod.UID, - VolumeName: volumeToMount.VolumeName, - BlockVolumeMapper: blockVolumeMapper, - OuterVolumeSpecName: volumeToMount.OuterVolumeSpecName, - VolumeGIDVolume: volumeToMount.VolumeGIDValue, - VolumeSpec: volumeToMount.VolumeSpec, - VolumeMountState: VolumeMounted, + PodName: volumeToMount.PodName, + PodUID: volumeToMount.Pod.UID, + VolumeName: volumeToMount.VolumeName, + BlockVolumeMapper: blockVolumeMapper, + VolumeGIDVolume: volumeToMount.VolumeGIDValue, + VolumeSpec: volumeToMount.VolumeSpec, + VolumeMountState: VolumeMounted, } // Call MapPodDevice if blockVolumeMapper implements CustomBlockVolumeMapper @@ -1199,13 +1195,12 @@ func (og *operationGenerator) GenerateUnmapVolumeFunc( // cases below. The volume is marked as fully un-mapped at the end of this function, when everything // succeeds. markVolumeOpts := MarkVolumeOpts{ - PodName: volumeToUnmount.PodName, - PodUID: volumeToUnmount.PodUID, - VolumeName: volumeToUnmount.VolumeName, - OuterVolumeSpecName: volumeToUnmount.OuterVolumeSpecName, - VolumeGIDVolume: volumeToUnmount.VolumeGIDValue, - VolumeSpec: volumeToUnmount.VolumeSpec, - VolumeMountState: VolumeMountUncertain, + PodName: volumeToUnmount.PodName, + PodUID: volumeToUnmount.PodUID, + VolumeName: volumeToUnmount.VolumeName, + VolumeGIDVolume: volumeToUnmount.VolumeGIDValue, + VolumeSpec: volumeToUnmount.VolumeSpec, + VolumeMountState: VolumeMountUncertain, } markVolumeUncertainErr := actualStateOfWorld.MarkVolumeMountAsUncertain(markVolumeOpts) if markVolumeUncertainErr != nil { @@ -1234,9 +1229,8 @@ func (og *operationGenerator) GenerateUnmapVolumeFunc( } klog.Infof( - "UnmapVolume succeeded for volume %q (OuterVolumeSpecName: %q) pod %q (UID: %q). InnerVolumeSpecName %q. PluginName %q, VolumeGIDValue %q", + "UnmapVolume succeeded for volume %q pod %q (UID: %q). InnerVolumeSpecName %q. PluginName %q, VolumeGIDValue %q", volumeToUnmount.VolumeName, - volumeToUnmount.OuterVolumeSpecName, volumeToUnmount.PodName, volumeToUnmount.PodUID, volumeToUnmount.InnerVolumeSpecName, @@ -2188,7 +2182,7 @@ func isDeviceOpened(deviceToDetach AttachedVolume, hostUtil hostutil.HostUtils) if !isDevicePath && devicePathErr == nil || (devicePathErr != nil && strings.Contains(devicePathErr.Error(), "does not exist")) { // not a device path or path doesn't exist - //TODO: refer to #36092 + // TODO: refer to #36092 klog.V(3).Infof("The path isn't device path or doesn't exist. Skip checking device path: %s", deviceToDetach.DevicePath) deviceOpened = false } else if devicePathErr != nil { diff --git a/pkg/volume/util/util.go b/pkg/volume/util/util.go index 4c77d5a9b0a55..29cc74923549e 100644 --- a/pkg/volume/util/util.go +++ b/pkg/volume/util/util.go @@ -676,7 +676,7 @@ func GetReliableMountRefs(mounter mount.Interface, mountPath string) ([]string, } return true, nil }) - if err == wait.ErrWaitTimeout { + if wait.Interrupted(err) { return nil, lastErr } return paths, err diff --git a/pkg/volume/util/volumepathhandler/volume_path_handler.go b/pkg/volume/util/volumepathhandler/volume_path_handler.go index 1f468410bf2ba..5eea77007cbed 100644 --- a/pkg/volume/util/volumepathhandler/volume_path_handler.go +++ b/pkg/volume/util/volumepathhandler/volume_path_handler.go @@ -130,11 +130,11 @@ func mapBindMountDevice(devicePath string, mapPath string, linkName string) erro // Check if device file // TODO: Need to check if this device file is actually the expected bind mount if file.Mode()&os.ModeDevice == os.ModeDevice { - klog.Warningf("Warning: Map skipped because bind mount already exist on the path: %v", linkPath) + klog.Warningf("Warning: Map skipped because bind mount already exists on the path: %v", linkPath) return nil } - klog.Warningf("Warning: file %s is already exist but not mounted, skip creating file", linkPath) + klog.Warningf("Warning: file %s already exists but is not mounted, skip creating file", linkPath) } // Bind mount file diff --git a/pkg/volume/volume.go b/pkg/volume/volume.go index 36814591ccbce..4a6fc55e29bb7 100644 --- a/pkg/volume/volume.go +++ b/pkg/volume/volume.go @@ -99,7 +99,7 @@ type Metrics struct { // and will not equal InodesUsed + InodesFree as the fs is shared. Inodes *resource.Quantity - // InodesFree represent the inodes available for the volume. For Volumes that share + // InodesFree represents the inodes available for the volume. For Volumes that share // a filesystem with the host (e.g. emptydir, hostpath), this is the free inodes // on the underlying storage, and is shared with host processes and other volumes InodesFree *resource.Quantity diff --git a/pkg/volume/volume_linux.go b/pkg/volume/volume_linux.go index 0df840cdea959..c3caf8c66c6d5 100644 --- a/pkg/volume/volume_linux.go +++ b/pkg/volume/volume_linux.go @@ -252,7 +252,7 @@ func readDirNames(dirname string) ([]string, error) { // walkDeep can be used to traverse directories and has two minor differences // from filepath.Walk: // - List of files/dirs is not sorted for performance reasons -// - callback walkFunc is invoked on root directory after visiting children dirs and files +// - callback walkFunc is invoked on root directory after visiting child dirs and files func walkDeep(root string, walkFunc filepath.WalkFunc) error { info, err := os.Lstat(root) if err != nil { diff --git a/plugin/pkg/admission/defaulttolerationseconds/admission.go b/plugin/pkg/admission/defaulttolerationseconds/admission.go index 08b22cdb9b16c..03dfffcdc9768 100644 --- a/plugin/pkg/admission/defaulttolerationseconds/admission.go +++ b/plugin/pkg/admission/defaulttolerationseconds/admission.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "io" + "sync" "github.com/spf13/pflag" v1 "k8s.io/api/core/v1" @@ -34,11 +35,21 @@ import ( const PluginName = "DefaultTolerationSeconds" var ( + // tolerationSecondsMutex protects registration and read in InspectFeatureGates, which is + // good enough for concurrent use in integration tests as long as the command + // line flags are not actually used by some test. In commands the registration, + // parsing and InspectFeatureGates are serialized. + tolerationSecondsMutex sync.RWMutex + defaultNotReadyTolerationSeconds = int64(300) defaultUnreachableTolerationSeconds = int64(300) ) func RegisterFlags(fs *pflag.FlagSet) { + // Indirect writes of the default value! + tolerationSecondsMutex.Lock() + defer tolerationSecondsMutex.Unlock() + fs.Int64Var(&defaultNotReadyTolerationSeconds, "default-not-ready-toleration-seconds", defaultNotReadyTolerationSeconds, "Indicates the tolerationSeconds of the toleration for notReady:NoExecute"+ " that is added by default to every pod that does not already have such a toleration.") @@ -78,17 +89,24 @@ func NewDefaultTolerationSeconds() *Plugin { // InspectFeatureGates runs after command-line flags have been parsed func (p *Plugin) InspectFeatureGates(featureGates featuregate.FeatureGate) { + // Read the default values while holding a read lock. + tolerationSecondsMutex.RLock() + defer tolerationSecondsMutex.RUnlock() + + notReadyTolerationSeconds := defaultNotReadyTolerationSeconds + unreachableTolerationSeconds := defaultUnreachableTolerationSeconds + p.notReadyToleration = api.Toleration{ Key: v1.TaintNodeNotReady, Operator: api.TolerationOpExists, Effect: api.TaintEffectNoExecute, - TolerationSeconds: &defaultNotReadyTolerationSeconds, + TolerationSeconds: ¬ReadyTolerationSeconds, } p.unreachableToleration = api.Toleration{ Key: v1.TaintNodeUnreachable, Operator: api.TolerationOpExists, Effect: api.TaintEffectNoExecute, - TolerationSeconds: &defaultUnreachableTolerationSeconds, + TolerationSeconds: &unreachableTolerationSeconds, } } diff --git a/plugin/pkg/admission/defaulttolerationseconds/admission_test.go b/plugin/pkg/admission/defaulttolerationseconds/admission_test.go index ca170305f55bf..1e1443b460346 100644 --- a/plugin/pkg/admission/defaulttolerationseconds/admission_test.go +++ b/plugin/pkg/admission/defaulttolerationseconds/admission_test.go @@ -300,7 +300,7 @@ func TestHandles(t *testing.T) { // newHandlerForTest returns a handler configured for testing. func newHandlerForTest() (*Plugin, error) { handler := NewDefaultTolerationSeconds() - pluginInitializer := initializer.New(nil, nil, nil, nil, nil, nil, nil) + pluginInitializer := initializer.New(nil, nil, nil, nil, nil, nil, nil, nil) pluginInitializer.Initialize(handler) return handler, admission.ValidateInitialization(handler) } diff --git a/plugin/pkg/admission/gc/gc_admission_test.go b/plugin/pkg/admission/gc/gc_admission_test.go index 1127e5385259b..bc02435e5696e 100644 --- a/plugin/pkg/admission/gc/gc_admission_test.go +++ b/plugin/pkg/admission/gc/gc_admission_test.go @@ -138,7 +138,7 @@ func newGCPermissionsEnforcement() (*gcPermissionsEnforcement, error) { return nil, fmt.Errorf("unexpected error while constructing resource list from fake discovery client: %v", err) } restMapper := restmapper.NewDiscoveryRESTMapper(restMapperRes) - genericPluginInitializer := initializer.New(nil, nil, nil, fakeAuthorizer{}, nil, nil, restMapper) + genericPluginInitializer := initializer.New(nil, nil, nil, fakeAuthorizer{}, nil, nil, nil, restMapper) pluginInitializer := controlplaneadmission.NewPluginInitializer(nil, nil) initializersChain := apiserveradmission.PluginInitializers{} initializersChain = append(initializersChain, genericPluginInitializer) diff --git a/plugin/pkg/admission/limitranger/admission_test.go b/plugin/pkg/admission/limitranger/admission_test.go index 17fc3211af358..67cf34d12b8eb 100644 --- a/plugin/pkg/admission/limitranger/admission_test.go +++ b/plugin/pkg/admission/limitranger/admission_test.go @@ -891,7 +891,7 @@ func newHandlerForTest(c clientset.Interface) (*LimitRanger, informers.SharedInf if err != nil { return nil, f, err } - pluginInitializer := genericadmissioninitializer.New(c, nil, f, nil, nil, nil, nil) + pluginInitializer := genericadmissioninitializer.New(c, nil, f, nil, nil, nil, nil, nil) pluginInitializer.Initialize(handler) err = admission.ValidateInitialization(handler) return handler, f, err diff --git a/plugin/pkg/admission/namespace/autoprovision/admission_test.go b/plugin/pkg/admission/namespace/autoprovision/admission_test.go index 935a1357677a6..2b34d1be38dab 100644 --- a/plugin/pkg/admission/namespace/autoprovision/admission_test.go +++ b/plugin/pkg/admission/namespace/autoprovision/admission_test.go @@ -41,7 +41,7 @@ import ( func newHandlerForTest(c clientset.Interface) (admission.MutationInterface, informers.SharedInformerFactory, error) { f := informers.NewSharedInformerFactory(c, 5*time.Minute) handler := NewProvision() - pluginInitializer := genericadmissioninitializer.New(c, nil, f, nil, nil, nil, nil) + pluginInitializer := genericadmissioninitializer.New(c, nil, f, nil, nil, nil, nil, nil) pluginInitializer.Initialize(handler) err := admission.ValidateInitialization(handler) return handler, f, err diff --git a/plugin/pkg/admission/namespace/exists/admission_test.go b/plugin/pkg/admission/namespace/exists/admission_test.go index 2937cb3948e2c..7d90a431b22e8 100644 --- a/plugin/pkg/admission/namespace/exists/admission_test.go +++ b/plugin/pkg/admission/namespace/exists/admission_test.go @@ -39,7 +39,7 @@ import ( func newHandlerForTest(c kubernetes.Interface) (admission.ValidationInterface, informers.SharedInformerFactory, error) { f := informers.NewSharedInformerFactory(c, 5*time.Minute) handler := NewExists() - pluginInitializer := genericadmissioninitializer.New(c, nil, f, nil, nil, nil, nil) + pluginInitializer := genericadmissioninitializer.New(c, nil, f, nil, nil, nil, nil, nil) pluginInitializer.Initialize(handler) err := admission.ValidateInitialization(handler) return handler, f, err diff --git a/plugin/pkg/admission/podnodeselector/admission_test.go b/plugin/pkg/admission/podnodeselector/admission_test.go index b1e191622ef50..e2ead7c1c4101 100644 --- a/plugin/pkg/admission/podnodeselector/admission_test.go +++ b/plugin/pkg/admission/podnodeselector/admission_test.go @@ -198,7 +198,7 @@ func TestHandles(t *testing.T) { func newHandlerForTest(c kubernetes.Interface) (*Plugin, informers.SharedInformerFactory, error) { f := informers.NewSharedInformerFactory(c, 5*time.Minute) handler := NewPodNodeSelector(nil) - pluginInitializer := genericadmissioninitializer.New(c, nil, f, nil, nil, nil, nil) + pluginInitializer := genericadmissioninitializer.New(c, nil, f, nil, nil, nil, nil, nil) pluginInitializer.Initialize(handler) err := admission.ValidateInitialization(handler) return handler, f, err diff --git a/plugin/pkg/admission/podtolerationrestriction/admission_test.go b/plugin/pkg/admission/podtolerationrestriction/admission_test.go index 9a23c03546293..f4bf95454c32c 100644 --- a/plugin/pkg/admission/podtolerationrestriction/admission_test.go +++ b/plugin/pkg/admission/podtolerationrestriction/admission_test.go @@ -23,6 +23,7 @@ import ( "time" "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -355,7 +356,7 @@ func newHandlerForTest(c kubernetes.Interface) (*Plugin, informers.SharedInforme return nil, nil, err } handler := NewPodTolerationsPlugin(pluginConfig) - pluginInitializer := genericadmissioninitializer.New(c, nil, f, nil, nil, nil, nil) + pluginInitializer := genericadmissioninitializer.New(c, nil, f, nil, nil, nil, nil, nil) pluginInitializer.Initialize(handler) err = admission.ValidateInitialization(handler) return handler, f, err diff --git a/plugin/pkg/admission/podtopologylabels/admission_test.go b/plugin/pkg/admission/podtopologylabels/admission_test.go index 581363c24bb70..f4fc9f76c48e8 100644 --- a/plugin/pkg/admission/podtopologylabels/admission_test.go +++ b/plugin/pkg/admission/podtopologylabels/admission_test.go @@ -226,7 +226,7 @@ func TestPodTopology(t *testing.T) { func newHandlerForTest(c kubernetes.Interface) (*Plugin, informers.SharedInformerFactory, error) { factory := informers.NewSharedInformerFactory(c, 5*time.Minute) handler := NewPodTopologyPlugin(defaultConfig) // todo: write additional test cases with non-default config. - pluginInitializer := genericadmissioninitializer.New(c, nil, factory, nil, feature.DefaultFeatureGate, nil, nil) + pluginInitializer := genericadmissioninitializer.New(c, nil, factory, nil, feature.DefaultFeatureGate, nil, nil, nil) pluginInitializer.Initialize(handler) return handler, factory, admission.ValidateInitialization(handler) } diff --git a/plugin/pkg/admission/resourcequota/admission_test.go b/plugin/pkg/admission/resourcequota/admission_test.go index 74223fae59de3..2a9c9461f9783 100644 --- a/plugin/pkg/admission/resourcequota/admission_test.go +++ b/plugin/pkg/admission/resourcequota/admission_test.go @@ -118,7 +118,7 @@ func createHandlerWithConfig(kubeClient kubernetes.Interface, informerFactory in } initializers := admission.PluginInitializers{ - genericadmissioninitializer.New(kubeClient, nil, informerFactory, nil, nil, stopCh, nil), + genericadmissioninitializer.New(kubeClient, nil, informerFactory, nil, nil, nil, stopCh, nil), controlplaneadmission.NewPluginInitializer(quotaConfiguration, nil), } initializers.Initialize(handler) diff --git a/plugin/pkg/admission/security/podsecurity/admission.go b/plugin/pkg/admission/security/podsecurity/admission.go index 64940994e62b2..879c1a6f7e7f8 100644 --- a/plugin/pkg/admission/security/podsecurity/admission.go +++ b/plugin/pkg/admission/security/podsecurity/admission.go @@ -43,6 +43,7 @@ import ( "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" corev1listers "k8s.io/client-go/listers/core/v1" + "k8s.io/component-base/compatibility" "k8s.io/component-base/featuregate" "k8s.io/component-base/metrics/legacyregistry" "k8s.io/kubernetes/pkg/api/legacyscheme" @@ -72,6 +73,9 @@ type Plugin struct { inspectedFeatureGates bool + inspectedEffectiveVersion bool + emulationVersion *podsecurityadmissionapi.Version + client kubernetes.Interface namespaceLister corev1listers.NamespaceLister podLister corev1listers.PodLister @@ -104,16 +108,10 @@ func newPlugin(reader io.Reader) (*Plugin, error) { return nil, err } - evaluator, err := policy.NewEvaluator(policy.DefaultChecks()) - if err != nil { - return nil, fmt.Errorf("could not create PodSecurityRegistry: %w", err) - } - return &Plugin{ Handler: admission.NewHandler(admission.Create, admission.Update), delegate: &podsecurityadmission.Admission{ Configuration: config, - Evaluator: evaluator, Metrics: getDefaultRecorder(), PodSpecExtractor: podsecurityadmission.DefaultPodSpecExtractor{}, }, @@ -146,24 +144,48 @@ func (p *Plugin) updateDelegate() { if p.client == nil { return } - p.delegate.PodLister = podsecurityadmission.PodListerFromInformer(p.podLister) - p.delegate.NamespaceGetter = podsecurityadmission.NamespaceGetterFromListerAndClient(p.namespaceLister, p.client) + if !p.inspectedEffectiveVersion { + return + } + if p.delegate.PodLister == nil { + p.delegate.PodLister = podsecurityadmission.PodListerFromInformer(p.podLister) + } + if p.delegate.NamespaceGetter == nil { + p.delegate.NamespaceGetter = podsecurityadmission.NamespaceGetterFromListerAndClient(p.namespaceLister, p.client) + } + if p.delegate.Evaluator == nil { + evaluator, err := policy.NewEvaluator(policy.DefaultChecks(), p.emulationVersion) + if err != nil { + panic(fmt.Errorf("could not create PodSecurityRegistry: %w", err)) + } + p.delegate.Evaluator = evaluator + } } -func (c *Plugin) InspectFeatureGates(featureGates featuregate.FeatureGate) { - c.inspectedFeatureGates = true - policy.RelaxPolicyForUserNamespacePods(featureGates.Enabled(features.UserNamespacesPodSecurityStandards)) - - if !featureGates.Enabled(features.ProbeHostPodSecurityStandards) { - policy.SkipProbeHostEnforcement() +func (p *Plugin) InspectEffectiveVersion(version compatibility.EffectiveVersion) { + p.inspectedEffectiveVersion = true + binaryVersion := version.BinaryVersion() + emulationVersion := version.EmulationVersion() + binaryMajorMinor := podsecurityadmissionapi.MajorMinorVersion(int(binaryVersion.Major()), int(binaryVersion.Minor())) + emulationMajorMinor := podsecurityadmissionapi.MajorMinorVersion(int(emulationVersion.Major()), int(emulationVersion.Minor())) + if binaryMajorMinor != emulationMajorMinor { + p.emulationVersion = &emulationMajorMinor } } +func (p *Plugin) InspectFeatureGates(featureGates featuregate.FeatureGate) { + p.inspectedFeatureGates = true + policy.RelaxPolicyForUserNamespacePods(featureGates.Enabled(features.UserNamespacesPodSecurityStandards)) +} + // ValidateInitialization ensures all required options are set func (p *Plugin) ValidateInitialization() error { if !p.inspectedFeatureGates { return fmt.Errorf("%s did not see feature gates", PluginName) } + if !p.inspectedEffectiveVersion { + return fmt.Errorf("%s did not see effective version", PluginName) + } if err := p.delegate.CompleteConfiguration(); err != nil { return fmt.Errorf("%s configuration error: %w", PluginName, err) } diff --git a/plugin/pkg/admission/security/podsecurity/admission_test.go b/plugin/pkg/admission/security/podsecurity/admission_test.go index ed4c4b92918b0..e4a6c253cf0ed 100644 --- a/plugin/pkg/admission/security/podsecurity/admission_test.go +++ b/plugin/pkg/admission/security/podsecurity/admission_test.go @@ -23,6 +23,8 @@ import ( "strings" "testing" + "sigs.k8s.io/yaml" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -30,6 +32,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authentication/user" + "k8s.io/apiserver/pkg/util/compatibility" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/apiserver/pkg/warning" "k8s.io/client-go/informers" @@ -40,7 +43,6 @@ import ( v1 "k8s.io/kubernetes/pkg/apis/core/v1" podsecurityadmission "k8s.io/pod-security-admission/admission" "k8s.io/utils/ptr" - "sigs.k8s.io/yaml" ) func TestConvert(t *testing.T) { @@ -81,6 +83,7 @@ func BenchmarkVerifyPod(b *testing.B) { b.Fatal(err) } + p.InspectEffectiveVersion(compatibility.DefaultBuildEffectiveVersion()) p.InspectFeatureGates(utilfeature.DefaultFeatureGate) enforceImplicitPrivilegedNamespace := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "enforce-implicit", Labels: map[string]string{}}} @@ -189,6 +192,7 @@ func BenchmarkVerifyNamespace(b *testing.B) { b.Fatal(err) } + p.InspectEffectiveVersion(compatibility.DefaultBuildEffectiveVersion()) p.InspectFeatureGates(utilfeature.DefaultFeatureGate) namespace := "enforce" diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go index eecbaf3520d40..e915800b1a8c3 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go @@ -396,15 +396,12 @@ func buildControllerRoles() ([]rbacv1.ClusterRole, []rbacv1.ClusterRoleBinding) rbacv1helpers.NewRule("get", "create", "delete", "update", "patch").Groups(legacyGroup).Resources("pods").RuleOrDie(), rbacv1helpers.NewRule("get", "create", "delete", "update", "patch", "list", "watch").Groups(appsGroup).Resources("controllerrevisions").RuleOrDie(), rbacv1helpers.NewRule("get", "create", "list", "watch").Groups(legacyGroup).Resources("persistentvolumeclaims").RuleOrDie(), + rbacv1helpers.NewRule("update", "delete").Groups(legacyGroup).Resources("persistentvolumeclaims").RuleOrDie(), + rbacv1helpers.NewRule("update").Groups(legacyGroup).Resources("pods/finalizers").RuleOrDie(), eventsRule(), }, } - if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) { - role.Rules = append(role.Rules, rbacv1helpers.NewRule("update", "delete").Groups(legacyGroup).Resources("persistentvolumeclaims").RuleOrDie()) - role.Rules = append(role.Rules, rbacv1helpers.NewRule("update").Groups(legacyGroup).Resources("pods/finalizers").RuleOrDie()) - } - return role }()) addControllerRole(&controllerRoles, &controllerRoleBindings, rbacv1.ClusterRole{ diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/namespace_policy.go b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/namespace_policy.go index 9329eba2b751e..385509a7546e0 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/namespace_policy.go +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/namespace_policy.go @@ -105,21 +105,17 @@ func init() { }) // TODO: Create util on Role+Binding for leader locking if more cases evolve. addNamespaceRole(metav1.NamespaceSystem, rbacv1.Role{ - // role for the leader locking on supplied configmap + // role for the leader locking on supplied lease ObjectMeta: metav1.ObjectMeta{Name: "system::leader-locking-kube-controller-manager"}, Rules: []rbacv1.PolicyRule{ - rbacv1helpers.NewRule("watch").Groups(legacyGroup).Resources("configmaps").RuleOrDie(), - rbacv1helpers.NewRule("get", "update").Groups(legacyGroup).Resources("configmaps").Names("kube-controller-manager").RuleOrDie(), rbacv1helpers.NewRule("get", "watch", "list", "create", "update").Groups("coordination.k8s.io").Resources("leases").RuleOrDie(), rbacv1helpers.NewRule("get", "watch", "list", "create", "update").Groups("coordination.k8s.io").Resources("leasecandidates").RuleOrDie(), }, }) addNamespaceRole(metav1.NamespaceSystem, rbacv1.Role{ - // role for the leader locking on supplied configmap + // role for the leader locking on supplied lease ObjectMeta: metav1.ObjectMeta{Name: "system::leader-locking-kube-scheduler"}, Rules: []rbacv1.PolicyRule{ - rbacv1helpers.NewRule("watch").Groups(legacyGroup).Resources("configmaps").RuleOrDie(), - rbacv1helpers.NewRule("get", "update").Groups(legacyGroup).Resources("configmaps").Names("kube-scheduler").RuleOrDie(), rbacv1helpers.NewRule("get", "watch", "list", "create", "update").Groups("coordination.k8s.io").Resources("leases").RuleOrDie(), rbacv1helpers.NewRule("get", "watch", "list", "create", "update").Groups("coordination.k8s.io").Resources("leasecandidates").RuleOrDie(), }, diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go index 447b0bc2e9976..3b68d182601f7 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go @@ -112,12 +112,14 @@ func viewRules() []rbacv1.PolicyRule { rules := []rbacv1.PolicyRule{ rbacv1helpers.NewRule(Read...).Groups(legacyGroup).Resources("pods", "replicationcontrollers", "replicationcontrollers/scale", "serviceaccounts", "services", "services/status", "endpoints", "persistentvolumeclaims", "persistentvolumeclaims/status", "configmaps").RuleOrDie(), - rbacv1helpers.NewRule(Read...).Groups(legacyGroup).Resources("limitranges", "resourcequotas", "bindings", "events", + rbacv1helpers.NewRule(Read...).Groups(legacyGroup).Resources("limitranges", "resourcequotas", "bindings", "pods/status", "resourcequotas/status", "namespaces/status", "replicationcontrollers/status", "pods/log").RuleOrDie(), // read access to namespaces at the namespace scope means you can read *this* namespace. This can be used as an // indicator of which namespaces you have access to. rbacv1helpers.NewRule(Read...).Groups(legacyGroup).Resources("namespaces").RuleOrDie(), + rbacv1helpers.NewRule(Read...).Groups(legacyGroup, eventsGroup).Resources("events").RuleOrDie(), + rbacv1helpers.NewRule(Read...).Groups(discoveryGroup).Resources("endpointslices").RuleOrDie(), rbacv1helpers.NewRule(Read...).Groups(appsGroup).Resources( @@ -155,9 +157,11 @@ func editRules() []rbacv1.PolicyRule { rbacv1helpers.NewRule(Write...).Groups(legacyGroup).Resources("pods", "pods/attach", "pods/proxy", "pods/exec", "pods/portforward").RuleOrDie(), rbacv1helpers.NewRule("create").Groups(legacyGroup).Resources("pods/eviction").RuleOrDie(), rbacv1helpers.NewRule(Write...).Groups(legacyGroup).Resources("replicationcontrollers", "replicationcontrollers/scale", "serviceaccounts", - "services", "services/proxy", "persistentvolumeclaims", "configmaps", "secrets", "events").RuleOrDie(), + "services", "services/proxy", "persistentvolumeclaims", "configmaps", "secrets").RuleOrDie(), rbacv1helpers.NewRule("create").Groups(legacyGroup).Resources("serviceaccounts/token").RuleOrDie(), + rbacv1helpers.NewRule(Write...).Groups(legacyGroup, eventsGroup).Resources("events").RuleOrDie(), + rbacv1helpers.NewRule(Write...).Groups(appsGroup).Resources( "statefulsets", "statefulsets/scale", "daemonsets", @@ -202,7 +206,7 @@ func NodeRules() []rbacv1.PolicyRule { rbacv1helpers.NewRule("update", "patch").Groups(legacyGroup).Resources("nodes").RuleOrDie(), // TODO: restrict to the bound node as creator in the NodeRestrictions admission plugin - rbacv1helpers.NewRule("create", "update", "patch").Groups(legacyGroup).Resources("events").RuleOrDie(), + rbacv1helpers.NewRule("create", "update", "patch").Groups(legacyGroup, eventsGroup).Resources("events").RuleOrDie(), // Use the Node authorizer to limit get to pods related to the node, and to limit list/watch to field selectors related to the node. rbacv1helpers.NewRule(Read...).Groups(legacyGroup).Resources("pods").RuleOrDie(), diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles-featuregates.yaml b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles-featuregates.yaml index 5770acd6f23e7..e67bc0a313e5e 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles-featuregates.yaml +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles-featuregates.yaml @@ -129,7 +129,6 @@ items: - "" resources: - configmaps - - events - persistentvolumeclaims - replicationcontrollers - replicationcontrollers/scale @@ -149,6 +148,17 @@ items: - serviceaccounts/token verbs: - create + - apiGroups: + - "" + - events.k8s.io + resources: + - events + verbs: + - create + - delete + - deletecollection + - patch + - update - apiGroups: - apps resources: @@ -281,7 +291,6 @@ items: - "" resources: - bindings - - events - limitranges - namespaces/status - pods/log @@ -301,6 +310,15 @@ items: - get - list - watch + - apiGroups: + - "" + - events.k8s.io + resources: + - events + verbs: + - get + - list + - watch - apiGroups: - discovery.k8s.io resources: @@ -1087,6 +1105,7 @@ items: - update - apiGroups: - "" + - events.k8s.io resources: - events verbs: diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles.yaml b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles.yaml index cd59a0d644716..e8e1ac600fcd4 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles.yaml +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles.yaml @@ -129,7 +129,6 @@ items: - "" resources: - configmaps - - events - persistentvolumeclaims - replicationcontrollers - replicationcontrollers/scale @@ -149,6 +148,17 @@ items: - serviceaccounts/token verbs: - create + - apiGroups: + - "" + - events.k8s.io + resources: + - events + verbs: + - create + - delete + - deletecollection + - patch + - update - apiGroups: - apps resources: @@ -281,7 +291,6 @@ items: - "" resources: - bindings - - events - limitranges - namespaces/status - pods/log @@ -301,6 +310,15 @@ items: - get - list - watch + - apiGroups: + - "" + - events.k8s.io + resources: + - events + verbs: + - get + - list + - watch - apiGroups: - discovery.k8s.io resources: @@ -1047,6 +1065,7 @@ items: - update - apiGroups: - "" + - events.k8s.io resources: - events verbs: diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml index 2cf50ff0876f7..eb84a955fadb3 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml @@ -1577,25 +1577,25 @@ items: - watch - apiGroups: - "" - - events.k8s.io resources: - - events + - persistentvolumeclaims verbs: - - create - - patch + - delete - update - apiGroups: - "" resources: - - persistentvolumeclaims + - pods/finalizers verbs: - - delete - update - apiGroups: - "" + - events.k8s.io resources: - - pods/finalizers + - events verbs: + - create + - patch - update - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/namespace-roles.yaml b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/namespace-roles.yaml index 3e45ae87fd2c4..3e9480680cbb3 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/namespace-roles.yaml +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/namespace-roles.yaml @@ -65,21 +65,6 @@ items: name: system::leader-locking-kube-controller-manager namespace: kube-system rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - watch - - apiGroups: - - "" - resourceNames: - - kube-controller-manager - resources: - - configmaps - verbs: - - get - - update - apiGroups: - coordination.k8s.io resources: @@ -110,21 +95,6 @@ items: name: system::leader-locking-kube-scheduler namespace: kube-system rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - watch - - apiGroups: - - "" - resourceNames: - - kube-scheduler - resources: - - configmaps - verbs: - - get - - update - apiGroups: - coordination.k8s.io resources: diff --git a/staging/OWNERS b/staging/OWNERS index d6971237df5ac..36159f87077f7 100644 --- a/staging/OWNERS +++ b/staging/OWNERS @@ -27,9 +27,9 @@ filters: - wojtek-t emeritus_approvers: - lavalamp - # go.{mod,sum} files relate to go dependencies, and should be reviewed by the - # dep-approvers - "go\\.(mod|sum)$": + # go.{mod,sum,work,work.sum} files relate to go dependencies, + # and should be reviewed by the dep-approvers + "go\\.(mod|sum|work|work\\.sum)$": approvers: - dep-approvers reviewers: diff --git a/staging/publishing/import-restrictions.yaml b/staging/publishing/import-restrictions.yaml index 6d2d68d8f3d2b..c4c2f9d4a751a 100644 --- a/staging/publishing/import-restrictions.yaml +++ b/staging/publishing/import-restrictions.yaml @@ -219,6 +219,7 @@ - k8s.io/klog - k8s.io/kube-scheduler - k8s.io/utils + - k8s.io/dynamic-resource-allocation/structured - baseImportPath: "./staging/src/k8s.io/kubelet" allowedImports: diff --git a/staging/publishing/rules.yaml b/staging/publishing/rules.yaml index f9952f7fb5fbe..c9f4fbcf1c892 100644 --- a/staging/publishing/rules.yaml +++ b/staging/publishing/rules.yaml @@ -19,13 +19,13 @@ rules: dirs: - staging/src/k8s.io/apimachinery - name: release-1.33 - go: 1.24.6 + go: 1.24.7 source: branch: release-1.33 dirs: - staging/src/k8s.io/apimachinery - name: release-1.34 - go: 1.24.6 + go: 1.24.7 source: branch: release-1.34 dirs: @@ -60,7 +60,7 @@ rules: dirs: - staging/src/k8s.io/api - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -69,7 +69,7 @@ rules: dirs: - staging/src/k8s.io/api - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -125,7 +125,7 @@ rules: go build -mod=mod ./... go test -mod=mod ./... - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -140,7 +140,7 @@ rules: go build -mod=mod ./... go test -mod=mod ./... - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -184,7 +184,7 @@ rules: dirs: - staging/src/k8s.io/code-generator - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -193,7 +193,7 @@ rules: dirs: - staging/src/k8s.io/code-generator - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -242,7 +242,7 @@ rules: dirs: - staging/src/k8s.io/component-base - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -255,7 +255,7 @@ rules: dirs: - staging/src/k8s.io/component-base - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -309,7 +309,7 @@ rules: dirs: - staging/src/k8s.io/component-helpers - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -322,7 +322,7 @@ rules: dirs: - staging/src/k8s.io/component-helpers - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -364,7 +364,7 @@ rules: dirs: - staging/src/k8s.io/kms - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -373,7 +373,7 @@ rules: dirs: - staging/src/k8s.io/kms - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -435,7 +435,7 @@ rules: dirs: - staging/src/k8s.io/apiserver - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -452,7 +452,7 @@ rules: dirs: - staging/src/k8s.io/apiserver - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -534,7 +534,7 @@ rules: dirs: - staging/src/k8s.io/kube-aggregator - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -555,7 +555,7 @@ rules: dirs: - staging/src/k8s.io/kube-aggregator - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -655,7 +655,7 @@ rules: # assumes GO111MODULE=on go build -mod=mod . - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -681,7 +681,7 @@ rules: # assumes GO111MODULE=on go build -mod=mod . - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -768,7 +768,7 @@ rules: # assumes GO111MODULE=on go build -mod=mod . - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -788,7 +788,7 @@ rules: # assumes GO111MODULE=on go build -mod=mod . - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -878,7 +878,7 @@ rules: required-packages: - k8s.io/code-generator - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -901,7 +901,7 @@ rules: required-packages: - k8s.io/code-generator - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -970,7 +970,7 @@ rules: dirs: - staging/src/k8s.io/metrics - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -985,7 +985,7 @@ rules: dirs: - staging/src/k8s.io/metrics - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -1041,7 +1041,7 @@ rules: dirs: - staging/src/k8s.io/cli-runtime - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.33 @@ -1054,7 +1054,7 @@ rules: dirs: - staging/src/k8s.io/cli-runtime - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.34 @@ -1114,7 +1114,7 @@ rules: dirs: - staging/src/k8s.io/sample-cli-plugin - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.33 @@ -1129,7 +1129,7 @@ rules: dirs: - staging/src/k8s.io/sample-cli-plugin - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.34 @@ -1190,7 +1190,7 @@ rules: dirs: - staging/src/k8s.io/kube-proxy - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -1205,7 +1205,7 @@ rules: dirs: - staging/src/k8s.io/kube-proxy - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -1240,13 +1240,13 @@ rules: dirs: - staging/src/k8s.io/cri-api - name: release-1.33 - go: 1.24.6 + go: 1.24.7 source: branch: release-1.33 dirs: - staging/src/k8s.io/cri-api - name: release-1.34 - go: 1.24.6 + go: 1.24.7 source: branch: release-1.34 dirs: @@ -1305,7 +1305,7 @@ rules: dirs: - staging/src/k8s.io/cri-client - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.33 @@ -1322,7 +1322,7 @@ rules: dirs: - staging/src/k8s.io/cri-client - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.34 @@ -1404,7 +1404,7 @@ rules: dirs: - staging/src/k8s.io/kubelet - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -1425,7 +1425,7 @@ rules: dirs: - staging/src/k8s.io/kubelet - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -1446,83 +1446,6 @@ rules: dirs: - staging/src/k8s.io/kubelet library: true -- destination: kube-scheduler - branches: - - name: master - dependencies: - - repository: apimachinery - branch: master - - repository: component-base - branch: master - - repository: api - branch: master - - repository: client-go - branch: master - source: - branch: master - dirs: - - staging/src/k8s.io/kube-scheduler - - name: release-1.31 - go: 1.23.12 - dependencies: - - repository: apimachinery - branch: release-1.31 - - repository: component-base - branch: release-1.31 - - repository: api - branch: release-1.31 - - repository: client-go - branch: release-1.31 - source: - branch: release-1.31 - dirs: - - staging/src/k8s.io/kube-scheduler - - name: release-1.32 - go: 1.23.12 - dependencies: - - repository: apimachinery - branch: release-1.32 - - repository: component-base - branch: release-1.32 - - repository: api - branch: release-1.32 - - repository: client-go - branch: release-1.32 - source: - branch: release-1.32 - dirs: - - staging/src/k8s.io/kube-scheduler - - name: release-1.33 - go: 1.24.6 - dependencies: - - repository: apimachinery - branch: release-1.33 - - repository: component-base - branch: release-1.33 - - repository: api - branch: release-1.33 - - repository: client-go - branch: release-1.33 - source: - branch: release-1.33 - dirs: - - staging/src/k8s.io/kube-scheduler - - name: release-1.34 - go: 1.24.6 - dependencies: - - repository: apimachinery - branch: release-1.34 - - repository: component-base - branch: release-1.34 - - repository: api - branch: release-1.34 - - repository: client-go - branch: release-1.34 - source: - branch: release-1.34 - dirs: - - staging/src/k8s.io/kube-scheduler - library: true - destination: controller-manager branches: - name: master @@ -1582,7 +1505,7 @@ rules: dirs: - staging/src/k8s.io/controller-manager - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.33 @@ -1601,7 +1524,7 @@ rules: dirs: - staging/src/k8s.io/controller-manager - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.34 @@ -1691,7 +1614,7 @@ rules: dirs: - staging/src/k8s.io/cloud-provider - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.33 @@ -1714,7 +1637,7 @@ rules: dirs: - staging/src/k8s.io/cloud-provider - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.34 @@ -1814,7 +1737,7 @@ rules: dirs: - staging/src/k8s.io/kube-controller-manager - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -1839,7 +1762,7 @@ rules: dirs: - staging/src/k8s.io/kube-controller-manager - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -1899,7 +1822,7 @@ rules: dirs: - staging/src/k8s.io/cluster-bootstrap - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -1910,7 +1833,7 @@ rules: dirs: - staging/src/k8s.io/cluster-bootstrap - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -1956,7 +1879,7 @@ rules: dirs: - staging/src/k8s.io/csi-translation-lib - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.33 @@ -1967,7 +1890,7 @@ rules: dirs: - staging/src/k8s.io/csi-translation-lib - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.34 @@ -1998,13 +1921,13 @@ rules: dirs: - staging/src/k8s.io/mount-utils - name: release-1.33 - go: 1.24.6 + go: 1.24.7 source: branch: release-1.33 dirs: - staging/src/k8s.io/mount-utils - name: release-1.34 - go: 1.24.6 + go: 1.24.7 source: branch: release-1.34 dirs: @@ -2081,7 +2004,7 @@ rules: dirs: - staging/src/k8s.io/kubectl - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.33 @@ -2104,7 +2027,7 @@ rules: dirs: - staging/src/k8s.io/kubectl - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.34 @@ -2186,7 +2109,7 @@ rules: dirs: - staging/src/k8s.io/pod-security-admission - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.33 @@ -2205,7 +2128,7 @@ rules: dirs: - staging/src/k8s.io/pod-security-admission - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.34 @@ -2301,7 +2224,7 @@ rules: dirs: - staging/src/k8s.io/dynamic-resource-allocation - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.33 @@ -2326,7 +2249,7 @@ rules: dirs: - staging/src/k8s.io/dynamic-resource-allocation - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: apimachinery branch: release-1.34 @@ -2350,6 +2273,103 @@ rules: branch: release-1.34 dirs: - staging/src/k8s.io/dynamic-resource-allocation +- destination: kube-scheduler + branches: + - name: master + dependencies: + - repository: apimachinery + branch: master + - repository: component-base + branch: master + - repository: api + branch: master + - repository: client-go + branch: master + - repository: apiserver + branch: master + - repository: component-helpers + branch: master + - repository: dynamic-resource-allocation + branch: master + - repository: kms + branch: master + - repository: kubelet + branch: master + source: + branch: master + dirs: + - staging/src/k8s.io/kube-scheduler + - name: release-1.31 + go: 1.23.11 + dependencies: + - repository: apimachinery + branch: release-1.31 + - repository: component-base + branch: release-1.31 + - repository: api + branch: release-1.31 + - repository: client-go + branch: release-1.31 + source: + branch: release-1.31 + dirs: + - staging/src/k8s.io/kube-scheduler + - name: release-1.32 + go: 1.23.11 + dependencies: + - repository: apimachinery + branch: release-1.32 + - repository: component-base + branch: release-1.32 + - repository: api + branch: release-1.32 + - repository: client-go + branch: release-1.32 + source: + branch: release-1.32 + dirs: + - staging/src/k8s.io/kube-scheduler + - name: release-1.33 + go: 1.24.5 + dependencies: + - repository: apimachinery + branch: release-1.33 + - repository: component-base + branch: release-1.33 + - repository: api + branch: release-1.33 + - repository: client-go + branch: release-1.33 + - repository: apiserver + branch: release-1.33 + - repository: component-helpers + branch: release-1.33 + - repository: dynamic-resource-allocation + branch: release-1.33 + - repository: kms + branch: release-1.33 + - repository: kubelet + branch: release-1.33 + source: + branch: release-1.33 + dirs: + - staging/src/k8s.io/kube-scheduler + - name: release-1.34 + go: 1.24.7 + dependencies: + - repository: apimachinery + branch: release-1.34 + - repository: component-base + branch: release-1.34 + - repository: api + branch: release-1.34 + - repository: client-go + branch: release-1.34 + source: + branch: release-1.34 + dirs: + - staging/src/k8s.io/kube-scheduler + library: true - destination: endpointslice branches: - name: master @@ -2397,7 +2417,7 @@ rules: dirs: - staging/src/k8s.io/endpointslice - name: release-1.33 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.33 @@ -2412,7 +2432,7 @@ rules: dirs: - staging/src/k8s.io/endpointslice - name: release-1.34 - go: 1.24.6 + go: 1.24.7 dependencies: - repository: api branch: release-1.34 @@ -2440,17 +2460,17 @@ rules: dirs: - staging/src/k8s.io/externaljwt - name: release-1.33 - go: 1.24.6 + go: 1.24.7 source: branch: release-1.33 dirs: - staging/src/k8s.io/externaljwt - name: release-1.34 - go: 1.24.6 + go: 1.24.7 source: branch: release-1.34 dirs: - staging/src/k8s.io/externaljwt recursive-delete-patterns: - '*/.gitattributes' -default-go-version: 1.24.6 +default-go-version: 1.25.1 diff --git a/staging/src/k8s.io/api/OWNERS b/staging/src/k8s.io/api/OWNERS index 9a58553856c68..43e3879f48078 100644 --- a/staging/src/k8s.io/api/OWNERS +++ b/staging/src/k8s.io/api/OWNERS @@ -11,9 +11,9 @@ filters: - api-approvers reviewers: - api-reviewers - # go.{mod,sum} files relate to go dependencies, and should be reviewed by the - # dep-approvers - "go\\.(mod|sum)$": + # go.{mod,sum,work,work.sum} files relate to go dependencies, + # and should be reviewed by the dep-approvers + "go\\.(mod|sum|work|work\\.sum)$": approvers: - dep-approvers reviewers: diff --git a/staging/src/k8s.io/api/admission/v1/doc.go b/staging/src/k8s.io/api/admission/v1/doc.go index cab6528214dc0..c8be5b2352cdd 100644 --- a/staging/src/k8s.io/api/admission/v1/doc.go +++ b/staging/src/k8s.io/api/admission/v1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=false // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.admission.v1 + // +groupName=admission.k8s.io package v1 diff --git a/staging/src/k8s.io/api/admission/v1/generated.pb.go b/staging/src/k8s.io/api/admission/v1/generated.pb.go index f5c417919826f..b9fe1402c3f8a 100644 --- a/staging/src/k8s.io/api/admission/v1/generated.pb.go +++ b/staging/src/k8s.io/api/admission/v1/generated.pb.go @@ -23,12 +23,10 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -36,172 +34,11 @@ import ( k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *AdmissionRequest) Reset() { *m = AdmissionRequest{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *AdmissionResponse) Reset() { *m = AdmissionResponse{} } -func (m *AdmissionRequest) Reset() { *m = AdmissionRequest{} } -func (*AdmissionRequest) ProtoMessage() {} -func (*AdmissionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7b47d27831186ccf, []int{0} -} -func (m *AdmissionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AdmissionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AdmissionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AdmissionRequest.Merge(m, src) -} -func (m *AdmissionRequest) XXX_Size() int { - return m.Size() -} -func (m *AdmissionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AdmissionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AdmissionRequest proto.InternalMessageInfo - -func (m *AdmissionResponse) Reset() { *m = AdmissionResponse{} } -func (*AdmissionResponse) ProtoMessage() {} -func (*AdmissionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7b47d27831186ccf, []int{1} -} -func (m *AdmissionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AdmissionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AdmissionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AdmissionResponse.Merge(m, src) -} -func (m *AdmissionResponse) XXX_Size() int { - return m.Size() -} -func (m *AdmissionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AdmissionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AdmissionResponse proto.InternalMessageInfo - -func (m *AdmissionReview) Reset() { *m = AdmissionReview{} } -func (*AdmissionReview) ProtoMessage() {} -func (*AdmissionReview) Descriptor() ([]byte, []int) { - return fileDescriptor_7b47d27831186ccf, []int{2} -} -func (m *AdmissionReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AdmissionReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AdmissionReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_AdmissionReview.Merge(m, src) -} -func (m *AdmissionReview) XXX_Size() int { - return m.Size() -} -func (m *AdmissionReview) XXX_DiscardUnknown() { - xxx_messageInfo_AdmissionReview.DiscardUnknown(m) -} - -var xxx_messageInfo_AdmissionReview proto.InternalMessageInfo - -func init() { - proto.RegisterType((*AdmissionRequest)(nil), "k8s.io.api.admission.v1.AdmissionRequest") - proto.RegisterType((*AdmissionResponse)(nil), "k8s.io.api.admission.v1.AdmissionResponse") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.admission.v1.AdmissionResponse.AuditAnnotationsEntry") - proto.RegisterType((*AdmissionReview)(nil), "k8s.io.api.admission.v1.AdmissionReview") -} - -func init() { - proto.RegisterFile("k8s.io/api/admission/v1/generated.proto", fileDescriptor_7b47d27831186ccf) -} - -var fileDescriptor_7b47d27831186ccf = []byte{ - // 907 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xd6, 0x8e, 0xed, 0x1d, 0x87, 0xda, 0x9d, 0x82, 0xba, 0xf2, 0x61, 0x6d, 0x72, 0x00, - 0x17, 0xb5, 0xbb, 0x24, 0x82, 0x2a, 0xaa, 0x40, 0x22, 0x4b, 0x2a, 0x14, 0x90, 0x9a, 0x68, 0xda, - 0x40, 0xc5, 0x01, 0x69, 0x62, 0x4f, 0xed, 0xc1, 0xf6, 0xcc, 0xb2, 0x33, 0xeb, 0xe0, 0x1b, 0x27, - 0xce, 0x7c, 0x03, 0x8e, 0x7c, 0x06, 0xbe, 0x41, 0x8e, 0x3d, 0xf6, 0x64, 0x11, 0xf3, 0x2d, 0x72, - 0x42, 0x33, 0x3b, 0xfb, 0xa7, 0x89, 0x2d, 0x42, 0xc3, 0x29, 0xfb, 0xfe, 0xfc, 0x7e, 0xef, 0xe5, - 0xf7, 0xf6, 0xbd, 0x35, 0xf8, 0x70, 0xbc, 0x2b, 0x3c, 0xca, 0x7d, 0x1c, 0x52, 0x1f, 0x0f, 0xa6, - 0x54, 0x08, 0xca, 0x99, 0x3f, 0xdb, 0xf6, 0x87, 0x84, 0x91, 0x08, 0x4b, 0x32, 0xf0, 0xc2, 0x88, - 0x4b, 0x0e, 0xef, 0x25, 0x89, 0x1e, 0x0e, 0xa9, 0x97, 0x25, 0x7a, 0xb3, 0xed, 0xf6, 0xc3, 0x21, - 0x95, 0xa3, 0xf8, 0xc4, 0xeb, 0xf3, 0xa9, 0x3f, 0xe4, 0x43, 0xee, 0xeb, 0xfc, 0x93, 0xf8, 0xa5, - 0xb6, 0xb4, 0xa1, 0x9f, 0x12, 0x9e, 0xf6, 0x83, 0x62, 0xc1, 0x58, 0x8e, 0x08, 0x93, 0xb4, 0x8f, - 0xe5, 0xea, 0xaa, 0xed, 0x4f, 0xf2, 0xec, 0x29, 0xee, 0x8f, 0x28, 0x23, 0xd1, 0xdc, 0x0f, 0xc7, - 0x43, 0xe5, 0x10, 0xfe, 0x94, 0x48, 0xbc, 0x0a, 0xe5, 0xaf, 0x43, 0x45, 0x31, 0x93, 0x74, 0x4a, - 0xae, 0x00, 0x1e, 0xfd, 0x1b, 0x40, 0xf4, 0x47, 0x64, 0x8a, 0x2f, 0xe3, 0xb6, 0x7e, 0xb7, 0x41, - 0x6b, 0x2f, 0x15, 0x03, 0x91, 0x9f, 0x62, 0x22, 0x24, 0x0c, 0x40, 0x39, 0xa6, 0x03, 0xc7, 0xea, - 0x5a, 0x3d, 0x3b, 0xf8, 0xf8, 0x6c, 0xd1, 0x29, 0x2d, 0x17, 0x9d, 0xf2, 0xf1, 0xc1, 0xfe, 0xc5, - 0xa2, 0xf3, 0xfe, 0xba, 0x42, 0x72, 0x1e, 0x12, 0xe1, 0x1d, 0x1f, 0xec, 0x23, 0x05, 0x86, 0x2f, - 0x40, 0x65, 0x4c, 0xd9, 0xc0, 0xb9, 0xd5, 0xb5, 0x7a, 0x8d, 0x9d, 0x47, 0x5e, 0x2e, 0x7e, 0x06, - 0xf3, 0xc2, 0xf1, 0x50, 0x39, 0x84, 0xa7, 0x64, 0xf0, 0x66, 0xdb, 0xde, 0x57, 0x11, 0x8f, 0xc3, - 0x6f, 0x49, 0xa4, 0x9a, 0xf9, 0x86, 0xb2, 0x41, 0xb0, 0x69, 0x8a, 0x57, 0x94, 0x85, 0x34, 0x23, - 0x1c, 0x81, 0x7a, 0x44, 0x04, 0x8f, 0xa3, 0x3e, 0x71, 0xca, 0x9a, 0xfd, 0xf1, 0x7f, 0x67, 0x47, - 0x86, 0x21, 0x68, 0x99, 0x0a, 0xf5, 0xd4, 0x83, 0x32, 0x76, 0xf8, 0x29, 0x68, 0x88, 0xf8, 0x24, - 0x0d, 0x38, 0x15, 0xad, 0xc7, 0x5d, 0x03, 0x68, 0x3c, 0xcb, 0x43, 0xa8, 0x98, 0x07, 0x29, 0x68, - 0x44, 0x89, 0x92, 0xaa, 0x6b, 0xe7, 0x9d, 0x1b, 0x29, 0xd0, 0x54, 0xa5, 0x50, 0x4e, 0x87, 0x8a, - 0xdc, 0x70, 0x0e, 0x9a, 0xc6, 0xcc, 0xba, 0xbc, 0x7d, 0x63, 0x49, 0xee, 0x2e, 0x17, 0x9d, 0x26, - 0x7a, 0x93, 0x16, 0x5d, 0xae, 0x03, 0xbf, 0x06, 0xd0, 0xb8, 0x0a, 0x42, 0x38, 0x4d, 0xad, 0x51, - 0xdb, 0x68, 0x04, 0xd1, 0x95, 0x0c, 0xb4, 0x02, 0x05, 0xbb, 0xa0, 0xc2, 0xf0, 0x94, 0x38, 0x1b, - 0x1a, 0x9d, 0x0d, 0xfd, 0x29, 0x9e, 0x12, 0xa4, 0x23, 0xd0, 0x07, 0xb6, 0xfa, 0x2b, 0x42, 0xdc, - 0x27, 0x4e, 0x55, 0xa7, 0xdd, 0x31, 0x69, 0xf6, 0xd3, 0x34, 0x80, 0xf2, 0x1c, 0xf8, 0x19, 0xb0, - 0x79, 0xa8, 0x5e, 0x75, 0xca, 0x99, 0x53, 0xd3, 0x00, 0x37, 0x05, 0x1c, 0xa6, 0x81, 0x8b, 0xa2, - 0x81, 0x72, 0x00, 0x7c, 0x0e, 0xea, 0xb1, 0x20, 0xd1, 0x01, 0x7b, 0xc9, 0x9d, 0xba, 0x16, 0xf4, - 0x03, 0xaf, 0x78, 0x3e, 0xde, 0x58, 0x7b, 0x25, 0xe4, 0xb1, 0xc9, 0xce, 0xdf, 0xa7, 0xd4, 0x83, - 0x32, 0x26, 0x78, 0x0c, 0xaa, 0xfc, 0xe4, 0x47, 0xd2, 0x97, 0x8e, 0xad, 0x39, 0x1f, 0xae, 0x1d, - 0x92, 0xd9, 0x5a, 0x0f, 0xe1, 0xd3, 0x27, 0x3f, 0x4b, 0xc2, 0xd4, 0x7c, 0x82, 0xdb, 0x86, 0xba, - 0x7a, 0xa8, 0x49, 0x90, 0x21, 0x83, 0x3f, 0x00, 0x9b, 0x4f, 0x06, 0x89, 0xd3, 0x01, 0x6f, 0xc3, - 0x9c, 0x49, 0x79, 0x98, 0xf2, 0xa0, 0x9c, 0x12, 0x6e, 0x81, 0xea, 0x20, 0x9a, 0xa3, 0x98, 0x39, - 0x8d, 0xae, 0xd5, 0xab, 0x07, 0x40, 0xf5, 0xb0, 0xaf, 0x3d, 0xc8, 0x44, 0xe0, 0x0b, 0x50, 0xe3, - 0xa1, 0x12, 0x43, 0x38, 0x9b, 0x6f, 0xd3, 0x41, 0xd3, 0x74, 0x50, 0x3b, 0x4c, 0x58, 0x50, 0x4a, - 0xb7, 0xf5, 0x47, 0x05, 0xdc, 0x29, 0x5c, 0x28, 0x11, 0x72, 0x26, 0xc8, 0xff, 0x72, 0xa2, 0xee, - 0x83, 0x1a, 0x9e, 0x4c, 0xf8, 0x29, 0x49, 0xae, 0x54, 0x3d, 0x6f, 0x62, 0x2f, 0x71, 0xa3, 0x34, - 0x0e, 0x8f, 0x40, 0x55, 0x48, 0x2c, 0x63, 0x61, 0x2e, 0xce, 0x83, 0xeb, 0xad, 0xd7, 0x33, 0x8d, - 0x49, 0x04, 0x43, 0x44, 0xc4, 0x13, 0x89, 0x0c, 0x0f, 0xec, 0x80, 0x8d, 0x10, 0xcb, 0xfe, 0x48, - 0x5f, 0x95, 0xcd, 0xc0, 0x5e, 0x2e, 0x3a, 0x1b, 0x47, 0xca, 0x81, 0x12, 0x3f, 0xdc, 0x05, 0xb6, - 0x7e, 0x78, 0x3e, 0x0f, 0xd3, 0xc5, 0x68, 0xab, 0x11, 0x1d, 0xa5, 0xce, 0x8b, 0xa2, 0x81, 0xf2, - 0x64, 0xf8, 0xab, 0x05, 0x5a, 0x38, 0x1e, 0x50, 0xb9, 0xc7, 0x18, 0x97, 0x38, 0x99, 0x4a, 0xb5, - 0x5b, 0xee, 0x35, 0x76, 0xbe, 0xf0, 0xd6, 0x7c, 0x04, 0xbd, 0x2b, 0x12, 0x7b, 0x7b, 0x97, 0x28, - 0x9e, 0x30, 0x19, 0xcd, 0x03, 0xc7, 0x68, 0xd4, 0xba, 0x1c, 0x46, 0x57, 0x6a, 0xc2, 0x1e, 0xa8, - 0x9f, 0xe2, 0x88, 0x51, 0x36, 0x14, 0x4e, 0xad, 0x5b, 0x56, 0xab, 0xad, 0x36, 0xe3, 0x3b, 0xe3, - 0x43, 0x59, 0xb4, 0xfd, 0x25, 0x78, 0x6f, 0x65, 0x39, 0xd8, 0x02, 0xe5, 0x31, 0x99, 0x27, 0x73, - 0x46, 0xea, 0x11, 0xbe, 0x0b, 0x36, 0x66, 0x78, 0x12, 0x13, 0x3d, 0x33, 0x1b, 0x25, 0xc6, 0xe3, - 0x5b, 0xbb, 0xd6, 0xd6, 0x9f, 0x16, 0x68, 0x16, 0xfe, 0x8d, 0x19, 0x25, 0xa7, 0xf0, 0x08, 0xd4, - 0xcc, 0xbd, 0xd1, 0x1c, 0x8d, 0x9d, 0xfb, 0xd7, 0x51, 0x40, 0x03, 0x82, 0x86, 0x7a, 0x15, 0xd2, - 0x3b, 0x98, 0xd2, 0xa8, 0xd3, 0x10, 0x19, 0x89, 0xcc, 0xc7, 0xed, 0xa3, 0xeb, 0x8b, 0x9a, 0x08, - 0x90, 0x5a, 0x28, 0x63, 0x0a, 0x3e, 0x3f, 0x3b, 0x77, 0x4b, 0xaf, 0xce, 0xdd, 0xd2, 0xeb, 0x73, - 0xb7, 0xf4, 0xcb, 0xd2, 0xb5, 0xce, 0x96, 0xae, 0xf5, 0x6a, 0xe9, 0x5a, 0xaf, 0x97, 0xae, 0xf5, - 0xd7, 0xd2, 0xb5, 0x7e, 0xfb, 0xdb, 0x2d, 0x7d, 0x7f, 0x6f, 0xcd, 0x6f, 0x9d, 0x7f, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x5c, 0x49, 0x23, 0x22, 0x05, 0x09, 0x00, 0x00, -} +func (m *AdmissionReview) Reset() { *m = AdmissionReview{} } func (m *AdmissionRequest) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -384,7 +221,7 @@ func (m *AdmissionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.AuditAnnotations { keysForAuditAnnotations = append(keysForAuditAnnotations, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAuditAnnotations) + sort.Strings(keysForAuditAnnotations) for iNdEx := len(keysForAuditAnnotations) - 1; iNdEx >= 0; iNdEx-- { v := m.AuditAnnotations[string(keysForAuditAnnotations[iNdEx])] baseI := i @@ -640,7 +477,7 @@ func (this *AdmissionResponse) String() string { for k := range this.AuditAnnotations { keysForAuditAnnotations = append(keysForAuditAnnotations, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAuditAnnotations) + sort.Strings(keysForAuditAnnotations) mapStringForAuditAnnotations := "map[string]string{" for _, k := range keysForAuditAnnotations { mapStringForAuditAnnotations += fmt.Sprintf("%v: %v,", k, this.AuditAnnotations[k]) diff --git a/staging/src/k8s.io/api/admission/v1/generated.proto b/staging/src/k8s.io/api/admission/v1/generated.proto index 9648aa58fbc34..b99004e4edb9b 100644 --- a/staging/src/k8s.io/api/admission/v1/generated.proto +++ b/staging/src/k8s.io/api/admission/v1/generated.proto @@ -151,6 +151,7 @@ message AdmissionResponse { // Limit warnings to 120 characters if possible. // Warnings over 256 characters and large numbers of warnings may be truncated. // +optional + // +listType=atomic repeated string warnings = 7; } diff --git a/staging/src/k8s.io/api/admission/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/admission/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..4e1ec547d6121 --- /dev/null +++ b/staging/src/k8s.io/api/admission/v1/generated.protomessage.pb.go @@ -0,0 +1,28 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*AdmissionRequest) ProtoMessage() {} + +func (*AdmissionResponse) ProtoMessage() {} + +func (*AdmissionReview) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/admission/v1/types.go b/staging/src/k8s.io/api/admission/v1/types.go index 2def92da5b394..80400070bf827 100644 --- a/staging/src/k8s.io/api/admission/v1/types.go +++ b/staging/src/k8s.io/api/admission/v1/types.go @@ -147,6 +147,7 @@ type AdmissionResponse struct { // Limit warnings to 120 characters if possible. // Warnings over 256 characters and large numbers of warnings may be truncated. // +optional + // +listType=atomic Warnings []string `json:"warnings,omitempty" protobuf:"bytes,7,rep,name=warnings"` } diff --git a/staging/src/k8s.io/api/admission/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/admission/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..b36acc0520e99 --- /dev/null +++ b/staging/src/k8s.io/api/admission/v1/zz_generated.model_name.go @@ -0,0 +1,37 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AdmissionRequest) OpenAPIModelName() string { + return "io.k8s.api.admission.v1.AdmissionRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AdmissionResponse) OpenAPIModelName() string { + return "io.k8s.api.admission.v1.AdmissionResponse" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AdmissionReview) OpenAPIModelName() string { + return "io.k8s.api.admission.v1.AdmissionReview" +} diff --git a/staging/src/k8s.io/api/admission/v1beta1/doc.go b/staging/src/k8s.io/api/admission/v1beta1/doc.go index 447495684e7a3..db856da122c74 100644 --- a/staging/src/k8s.io/api/admission/v1beta1/doc.go +++ b/staging/src/k8s.io/api/admission/v1beta1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=false // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.admission.v1beta1 // +groupName=admission.k8s.io diff --git a/staging/src/k8s.io/api/admission/v1beta1/generated.pb.go b/staging/src/k8s.io/api/admission/v1beta1/generated.pb.go index 22147cbe9473e..e8bb2c064bb5b 100644 --- a/staging/src/k8s.io/api/admission/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/admission/v1beta1/generated.pb.go @@ -23,12 +23,10 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -36,172 +34,11 @@ import ( k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *AdmissionRequest) Reset() { *m = AdmissionRequest{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *AdmissionResponse) Reset() { *m = AdmissionResponse{} } -func (m *AdmissionRequest) Reset() { *m = AdmissionRequest{} } -func (*AdmissionRequest) ProtoMessage() {} -func (*AdmissionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d8f147b43c61e73e, []int{0} -} -func (m *AdmissionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AdmissionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AdmissionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AdmissionRequest.Merge(m, src) -} -func (m *AdmissionRequest) XXX_Size() int { - return m.Size() -} -func (m *AdmissionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AdmissionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AdmissionRequest proto.InternalMessageInfo - -func (m *AdmissionResponse) Reset() { *m = AdmissionResponse{} } -func (*AdmissionResponse) ProtoMessage() {} -func (*AdmissionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d8f147b43c61e73e, []int{1} -} -func (m *AdmissionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AdmissionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AdmissionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AdmissionResponse.Merge(m, src) -} -func (m *AdmissionResponse) XXX_Size() int { - return m.Size() -} -func (m *AdmissionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AdmissionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AdmissionResponse proto.InternalMessageInfo - -func (m *AdmissionReview) Reset() { *m = AdmissionReview{} } -func (*AdmissionReview) ProtoMessage() {} -func (*AdmissionReview) Descriptor() ([]byte, []int) { - return fileDescriptor_d8f147b43c61e73e, []int{2} -} -func (m *AdmissionReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AdmissionReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AdmissionReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_AdmissionReview.Merge(m, src) -} -func (m *AdmissionReview) XXX_Size() int { - return m.Size() -} -func (m *AdmissionReview) XXX_DiscardUnknown() { - xxx_messageInfo_AdmissionReview.DiscardUnknown(m) -} - -var xxx_messageInfo_AdmissionReview proto.InternalMessageInfo - -func init() { - proto.RegisterType((*AdmissionRequest)(nil), "k8s.io.api.admission.v1beta1.AdmissionRequest") - proto.RegisterType((*AdmissionResponse)(nil), "k8s.io.api.admission.v1beta1.AdmissionResponse") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.admission.v1beta1.AdmissionResponse.AuditAnnotationsEntry") - proto.RegisterType((*AdmissionReview)(nil), "k8s.io.api.admission.v1beta1.AdmissionReview") -} - -func init() { - proto.RegisterFile("k8s.io/api/admission/v1beta1/generated.proto", fileDescriptor_d8f147b43c61e73e) -} - -var fileDescriptor_d8f147b43c61e73e = []byte{ - // 911 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xd6, 0x8e, 0xed, 0x1d, 0x87, 0xda, 0x9d, 0x82, 0xb4, 0xb2, 0xaa, 0xb5, 0xc9, 0x01, - 0x19, 0xa9, 0x9d, 0x25, 0x11, 0x54, 0x51, 0xc5, 0x25, 0x4b, 0x22, 0x14, 0x90, 0x9a, 0x68, 0x5a, - 0x43, 0xe1, 0x80, 0x34, 0xb6, 0xa7, 0xf6, 0x60, 0x7b, 0x66, 0xd9, 0x99, 0x4d, 0xf0, 0x8d, 0x3b, - 0x17, 0xbe, 0x01, 0x5f, 0x80, 0x6f, 0xc1, 0x25, 0xc7, 0x1e, 0x7b, 0xb2, 0x88, 0xf9, 0x16, 0x39, - 0xa1, 0x99, 0x9d, 0xf5, 0x3a, 0x4e, 0x52, 0xfa, 0xef, 0x94, 0x7d, 0x7f, 0x7e, 0xbf, 0xf7, 0xf2, - 0x7b, 0xfb, 0xde, 0x1a, 0xdc, 0x1f, 0xef, 0x4a, 0xc4, 0x44, 0x40, 0x22, 0x16, 0x90, 0xc1, 0x94, - 0x49, 0xc9, 0x04, 0x0f, 0x4e, 0xb6, 0x7b, 0x54, 0x91, 0xed, 0x60, 0x48, 0x39, 0x8d, 0x89, 0xa2, - 0x03, 0x14, 0xc5, 0x42, 0x09, 0x78, 0x2f, 0xcd, 0x46, 0x24, 0x62, 0x68, 0x99, 0x8d, 0x6c, 0x76, - 0xf3, 0xc1, 0x90, 0xa9, 0x51, 0xd2, 0x43, 0x7d, 0x31, 0x0d, 0x86, 0x62, 0x28, 0x02, 0x03, 0xea, - 0x25, 0xcf, 0x8d, 0x65, 0x0c, 0xf3, 0x94, 0x92, 0x35, 0x2f, 0x95, 0x4e, 0xd4, 0x88, 0x72, 0xc5, - 0xfa, 0x44, 0xa5, 0xf5, 0xd7, 0x4b, 0x37, 0x3f, 0xcf, 0xb3, 0xa7, 0xa4, 0x3f, 0x62, 0x9c, 0xc6, - 0xb3, 0x20, 0x1a, 0x0f, 0xb5, 0x43, 0x06, 0x53, 0xaa, 0xc8, 0x75, 0xa8, 0xe0, 0x26, 0x54, 0x9c, - 0x70, 0xc5, 0xa6, 0xf4, 0x0a, 0xe0, 0xe1, 0xff, 0x01, 0x64, 0x7f, 0x44, 0xa7, 0x64, 0x1d, 0xb7, - 0xf5, 0xa7, 0x0b, 0x1a, 0x7b, 0x99, 0x22, 0x98, 0xfe, 0x92, 0x50, 0xa9, 0x60, 0x08, 0x8a, 0x09, - 0x1b, 0x78, 0x4e, 0xdb, 0xe9, 0xb8, 0xe1, 0x67, 0x67, 0xf3, 0x56, 0x61, 0x31, 0x6f, 0x15, 0xbb, - 0x87, 0xfb, 0x17, 0xf3, 0xd6, 0xc7, 0x37, 0x15, 0x52, 0xb3, 0x88, 0x4a, 0xd4, 0x3d, 0xdc, 0xc7, - 0x1a, 0x0c, 0x9f, 0x81, 0xd2, 0x98, 0xf1, 0x81, 0x77, 0xab, 0xed, 0x74, 0x6a, 0x3b, 0x0f, 0x51, - 0x3e, 0x81, 0x25, 0x0c, 0x45, 0xe3, 0xa1, 0x76, 0x48, 0xa4, 0x65, 0x40, 0x27, 0xdb, 0xe8, 0xeb, - 0x58, 0x24, 0xd1, 0x77, 0x34, 0xd6, 0xcd, 0x7c, 0xcb, 0xf8, 0x20, 0xdc, 0xb4, 0xc5, 0x4b, 0xda, - 0xc2, 0x86, 0x11, 0x8e, 0x40, 0x35, 0xa6, 0x52, 0x24, 0x71, 0x9f, 0x7a, 0x45, 0xc3, 0xfe, 0xe8, - 0xcd, 0xd9, 0xb1, 0x65, 0x08, 0x1b, 0xb6, 0x42, 0x35, 0xf3, 0xe0, 0x25, 0x3b, 0xfc, 0x02, 0xd4, - 0x64, 0xd2, 0xcb, 0x02, 0x5e, 0xc9, 0xe8, 0x71, 0xd7, 0x02, 0x6a, 0x4f, 0xf2, 0x10, 0x5e, 0xcd, - 0x83, 0x0c, 0xd4, 0xe2, 0x54, 0x49, 0xdd, 0xb5, 0xf7, 0xc1, 0x3b, 0x29, 0x50, 0xd7, 0xa5, 0x70, - 0x4e, 0x87, 0x57, 0xb9, 0xe1, 0x0c, 0xd4, 0xad, 0xb9, 0xec, 0xf2, 0xf6, 0x3b, 0x4b, 0x72, 0x77, - 0x31, 0x6f, 0xd5, 0xf1, 0x65, 0x5a, 0xbc, 0x5e, 0x07, 0x7e, 0x03, 0xa0, 0x75, 0xad, 0x08, 0xe1, - 0xd5, 0x8d, 0x46, 0x4d, 0xab, 0x11, 0xc4, 0x57, 0x32, 0xf0, 0x35, 0x28, 0xd8, 0x06, 0x25, 0x4e, - 0xa6, 0xd4, 0xdb, 0x30, 0xe8, 0xe5, 0xd0, 0x1f, 0x93, 0x29, 0xc5, 0x26, 0x02, 0x03, 0xe0, 0xea, - 0xbf, 0x32, 0x22, 0x7d, 0xea, 0x95, 0x4d, 0xda, 0x1d, 0x9b, 0xe6, 0x3e, 0xce, 0x02, 0x38, 0xcf, - 0x81, 0x5f, 0x02, 0x57, 0x44, 0xfa, 0x55, 0x67, 0x82, 0x7b, 0x15, 0x03, 0xf0, 0x33, 0xc0, 0x51, - 0x16, 0xb8, 0x58, 0x35, 0x70, 0x0e, 0x80, 0x4f, 0x41, 0x35, 0x91, 0x34, 0x3e, 0xe4, 0xcf, 0x85, - 0x57, 0x35, 0x82, 0x7e, 0x82, 0x56, 0x6f, 0xc8, 0xa5, 0xb5, 0xd7, 0x42, 0x76, 0x6d, 0x76, 0xfe, - 0x3e, 0x65, 0x1e, 0xbc, 0x64, 0x82, 0x5d, 0x50, 0x16, 0xbd, 0x9f, 0x69, 0x5f, 0x79, 0xae, 0xe1, - 0x7c, 0x70, 0xe3, 0x90, 0xec, 0xd6, 0x22, 0x4c, 0x4e, 0x0f, 0x7e, 0x55, 0x94, 0xeb, 0xf9, 0x84, - 0xb7, 0x2d, 0x75, 0xf9, 0xc8, 0x90, 0x60, 0x4b, 0x06, 0x7f, 0x02, 0xae, 0x98, 0x0c, 0x52, 0xa7, - 0x07, 0xde, 0x86, 0x79, 0x29, 0xe5, 0x51, 0xc6, 0x83, 0x73, 0x4a, 0xb8, 0x05, 0xca, 0x83, 0x78, - 0x86, 0x13, 0xee, 0xd5, 0xda, 0x4e, 0xa7, 0x1a, 0x02, 0xdd, 0xc3, 0xbe, 0xf1, 0x60, 0x1b, 0x81, - 0xcf, 0x40, 0x45, 0x44, 0x5a, 0x0c, 0xe9, 0x6d, 0xbe, 0x4d, 0x07, 0x75, 0xdb, 0x41, 0xe5, 0x28, - 0x65, 0xc1, 0x19, 0xdd, 0xd6, 0x5f, 0x25, 0x70, 0x67, 0xe5, 0x42, 0xc9, 0x48, 0x70, 0x49, 0xdf, - 0xcb, 0x89, 0xfa, 0x14, 0x54, 0xc8, 0x64, 0x22, 0x4e, 0x69, 0x7a, 0xa5, 0xaa, 0x79, 0x13, 0x7b, - 0xa9, 0x1b, 0x67, 0x71, 0x78, 0x0c, 0xca, 0x52, 0x11, 0x95, 0x48, 0x7b, 0x71, 0xee, 0xbf, 0xde, - 0x7a, 0x3d, 0x31, 0x98, 0x54, 0x30, 0x4c, 0x65, 0x32, 0x51, 0xd8, 0xf2, 0xc0, 0x16, 0xd8, 0x88, - 0x88, 0xea, 0x8f, 0xcc, 0x55, 0xd9, 0x0c, 0xdd, 0xc5, 0xbc, 0xb5, 0x71, 0xac, 0x1d, 0x38, 0xf5, - 0xc3, 0x5d, 0xe0, 0x9a, 0x87, 0xa7, 0xb3, 0x28, 0x5b, 0x8c, 0xa6, 0x1e, 0xd1, 0x71, 0xe6, 0xbc, - 0x58, 0x35, 0x70, 0x9e, 0x0c, 0x7f, 0x77, 0x40, 0x83, 0x24, 0x03, 0xa6, 0xf6, 0x38, 0x17, 0x8a, - 0xa4, 0x53, 0x29, 0xb7, 0x8b, 0x9d, 0xda, 0xce, 0x01, 0x7a, 0xd5, 0x97, 0x10, 0x5d, 0xd1, 0x19, - 0xed, 0xad, 0xf1, 0x1c, 0x70, 0x15, 0xcf, 0x42, 0xcf, 0x0a, 0xd5, 0x58, 0x0f, 0xe3, 0x2b, 0x85, - 0x61, 0x07, 0x54, 0x4f, 0x49, 0xcc, 0x19, 0x1f, 0x4a, 0xaf, 0xd2, 0x2e, 0xea, 0xfd, 0xd6, 0xeb, - 0xf1, 0xbd, 0xf5, 0xe1, 0x65, 0xb4, 0xf9, 0x15, 0xf8, 0xe8, 0xda, 0x72, 0xb0, 0x01, 0x8a, 0x63, - 0x3a, 0x4b, 0x87, 0x8d, 0xf5, 0x23, 0xfc, 0x10, 0x6c, 0x9c, 0x90, 0x49, 0x42, 0xcd, 0xe0, 0x5c, - 0x9c, 0x1a, 0x8f, 0x6e, 0xed, 0x3a, 0x5b, 0x7f, 0x3b, 0xa0, 0xbe, 0xf2, 0x6f, 0x9c, 0x30, 0x7a, - 0x0a, 0xbb, 0xa0, 0x62, 0x8f, 0x8e, 0xe1, 0xa8, 0xed, 0xa0, 0xd7, 0x96, 0xc1, 0xa0, 0xc2, 0x9a, - 0x7e, 0x29, 0xb2, 0x8b, 0x98, 0x71, 0xc1, 0x1f, 0xcc, 0x87, 0xc8, 0xe8, 0x64, 0x3f, 0x73, 0xc1, - 0x1b, 0xca, 0x9b, 0x4a, 0x91, 0x59, 0x78, 0x49, 0x17, 0x86, 0x67, 0xe7, 0x7e, 0xe1, 0xc5, 0xb9, - 0x5f, 0x78, 0x79, 0xee, 0x17, 0x7e, 0x5b, 0xf8, 0xce, 0xd9, 0xc2, 0x77, 0x5e, 0x2c, 0x7c, 0xe7, - 0xe5, 0xc2, 0x77, 0xfe, 0x59, 0xf8, 0xce, 0x1f, 0xff, 0xfa, 0x85, 0x1f, 0xef, 0xbd, 0xea, 0x47, - 0xd0, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0x6e, 0x31, 0x41, 0x23, 0x09, 0x00, 0x00, -} +func (m *AdmissionReview) Reset() { *m = AdmissionReview{} } func (m *AdmissionRequest) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -384,7 +221,7 @@ func (m *AdmissionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.AuditAnnotations { keysForAuditAnnotations = append(keysForAuditAnnotations, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAuditAnnotations) + sort.Strings(keysForAuditAnnotations) for iNdEx := len(keysForAuditAnnotations) - 1; iNdEx >= 0; iNdEx-- { v := m.AuditAnnotations[string(keysForAuditAnnotations[iNdEx])] baseI := i @@ -640,7 +477,7 @@ func (this *AdmissionResponse) String() string { for k := range this.AuditAnnotations { keysForAuditAnnotations = append(keysForAuditAnnotations, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAuditAnnotations) + sort.Strings(keysForAuditAnnotations) mapStringForAuditAnnotations := "map[string]string{" for _, k := range keysForAuditAnnotations { mapStringForAuditAnnotations += fmt.Sprintf("%v: %v,", k, this.AuditAnnotations[k]) diff --git a/staging/src/k8s.io/api/admission/v1beta1/generated.proto b/staging/src/k8s.io/api/admission/v1beta1/generated.proto index d27c05b727eb5..cb6b0c4fda1da 100644 --- a/staging/src/k8s.io/api/admission/v1beta1/generated.proto +++ b/staging/src/k8s.io/api/admission/v1beta1/generated.proto @@ -151,6 +151,7 @@ message AdmissionResponse { // Limit warnings to 120 characters if possible. // Warnings over 256 characters and large numbers of warnings may be truncated. // +optional + // +listType=atomic repeated string warnings = 7; } diff --git a/staging/src/k8s.io/api/admission/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/admission/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..95c7022932260 --- /dev/null +++ b/staging/src/k8s.io/api/admission/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,28 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*AdmissionRequest) ProtoMessage() {} + +func (*AdmissionResponse) ProtoMessage() {} + +func (*AdmissionReview) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/admission/v1beta1/types.go b/staging/src/k8s.io/api/admission/v1beta1/types.go index 00c619d9986cc..b4a0aa2fa2be6 100644 --- a/staging/src/k8s.io/api/admission/v1beta1/types.go +++ b/staging/src/k8s.io/api/admission/v1beta1/types.go @@ -151,6 +151,7 @@ type AdmissionResponse struct { // Limit warnings to 120 characters if possible. // Warnings over 256 characters and large numbers of warnings may be truncated. // +optional + // +listType=atomic Warnings []string `json:"warnings,omitempty" protobuf:"bytes,7,rep,name=warnings"` } diff --git a/staging/src/k8s.io/api/admission/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/admission/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..e67adcd7129e8 --- /dev/null +++ b/staging/src/k8s.io/api/admission/v1beta1/zz_generated.model_name.go @@ -0,0 +1,37 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AdmissionRequest) OpenAPIModelName() string { + return "io.k8s.api.admission.v1beta1.AdmissionRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AdmissionResponse) OpenAPIModelName() string { + return "io.k8s.api.admission.v1beta1.AdmissionResponse" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AdmissionReview) OpenAPIModelName() string { + return "io.k8s.api.admission.v1beta1.AdmissionReview" +} diff --git a/staging/src/k8s.io/api/admissionregistration/v1/doc.go b/staging/src/k8s.io/api/admissionregistration/v1/doc.go index ec0ebb9c49c2e..0bcaeaa5464e9 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1/doc.go +++ b/staging/src/k8s.io/api/admissionregistration/v1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.admissionregistration.v1 + // +groupName=admissionregistration.k8s.io // Package v1 is the v1 version of the API. diff --git a/staging/src/k8s.io/api/admissionregistration/v1/generated.pb.go b/staging/src/k8s.io/api/admissionregistration/v1/generated.pb.go index 09295734dfe36..91b2f1cbaee2f 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1/generated.pb.go +++ b/staging/src/k8s.io/api/admissionregistration/v1/generated.pb.go @@ -24,950 +24,67 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } -func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } -func (*AuditAnnotation) ProtoMessage() {} -func (*AuditAnnotation) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{0} -} -func (m *AuditAnnotation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuditAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AuditAnnotation) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuditAnnotation.Merge(m, src) -} -func (m *AuditAnnotation) XXX_Size() int { - return m.Size() -} -func (m *AuditAnnotation) XXX_DiscardUnknown() { - xxx_messageInfo_AuditAnnotation.DiscardUnknown(m) -} - -var xxx_messageInfo_AuditAnnotation proto.InternalMessageInfo - -func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } -func (*ExpressionWarning) ProtoMessage() {} -func (*ExpressionWarning) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{1} -} -func (m *ExpressionWarning) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExpressionWarning) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExpressionWarning) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExpressionWarning.Merge(m, src) -} -func (m *ExpressionWarning) XXX_Size() int { - return m.Size() -} -func (m *ExpressionWarning) XXX_DiscardUnknown() { - xxx_messageInfo_ExpressionWarning.DiscardUnknown(m) -} - -var xxx_messageInfo_ExpressionWarning proto.InternalMessageInfo - -func (m *MatchCondition) Reset() { *m = MatchCondition{} } -func (*MatchCondition) ProtoMessage() {} -func (*MatchCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{2} -} -func (m *MatchCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MatchCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MatchCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_MatchCondition.Merge(m, src) -} -func (m *MatchCondition) XXX_Size() int { - return m.Size() -} -func (m *MatchCondition) XXX_DiscardUnknown() { - xxx_messageInfo_MatchCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_MatchCondition proto.InternalMessageInfo - -func (m *MatchResources) Reset() { *m = MatchResources{} } -func (*MatchResources) ProtoMessage() {} -func (*MatchResources) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{3} -} -func (m *MatchResources) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MatchResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MatchResources) XXX_Merge(src proto.Message) { - xxx_messageInfo_MatchResources.Merge(m, src) -} -func (m *MatchResources) XXX_Size() int { - return m.Size() -} -func (m *MatchResources) XXX_DiscardUnknown() { - xxx_messageInfo_MatchResources.DiscardUnknown(m) -} - -var xxx_messageInfo_MatchResources proto.InternalMessageInfo - -func (m *MutatingWebhook) Reset() { *m = MutatingWebhook{} } -func (*MutatingWebhook) ProtoMessage() {} -func (*MutatingWebhook) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{4} -} -func (m *MutatingWebhook) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingWebhook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingWebhook) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingWebhook.Merge(m, src) -} -func (m *MutatingWebhook) XXX_Size() int { - return m.Size() -} -func (m *MutatingWebhook) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingWebhook.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingWebhook proto.InternalMessageInfo - -func (m *MutatingWebhookConfiguration) Reset() { *m = MutatingWebhookConfiguration{} } -func (*MutatingWebhookConfiguration) ProtoMessage() {} -func (*MutatingWebhookConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{5} -} -func (m *MutatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingWebhookConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingWebhookConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingWebhookConfiguration.Merge(m, src) -} -func (m *MutatingWebhookConfiguration) XXX_Size() int { - return m.Size() -} -func (m *MutatingWebhookConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingWebhookConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingWebhookConfiguration proto.InternalMessageInfo - -func (m *MutatingWebhookConfigurationList) Reset() { *m = MutatingWebhookConfigurationList{} } -func (*MutatingWebhookConfigurationList) ProtoMessage() {} -func (*MutatingWebhookConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{6} -} -func (m *MutatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingWebhookConfigurationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingWebhookConfigurationList) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingWebhookConfigurationList.Merge(m, src) -} -func (m *MutatingWebhookConfigurationList) XXX_Size() int { - return m.Size() -} -func (m *MutatingWebhookConfigurationList) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingWebhookConfigurationList.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingWebhookConfigurationList proto.InternalMessageInfo - -func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } -func (*NamedRuleWithOperations) ProtoMessage() {} -func (*NamedRuleWithOperations) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{7} -} -func (m *NamedRuleWithOperations) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NamedRuleWithOperations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NamedRuleWithOperations) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedRuleWithOperations.Merge(m, src) -} -func (m *NamedRuleWithOperations) XXX_Size() int { - return m.Size() -} -func (m *NamedRuleWithOperations) XXX_DiscardUnknown() { - xxx_messageInfo_NamedRuleWithOperations.DiscardUnknown(m) -} - -var xxx_messageInfo_NamedRuleWithOperations proto.InternalMessageInfo - -func (m *ParamKind) Reset() { *m = ParamKind{} } -func (*ParamKind) ProtoMessage() {} -func (*ParamKind) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{8} -} -func (m *ParamKind) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParamKind) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ParamKind) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParamKind.Merge(m, src) -} -func (m *ParamKind) XXX_Size() int { - return m.Size() -} -func (m *ParamKind) XXX_DiscardUnknown() { - xxx_messageInfo_ParamKind.DiscardUnknown(m) -} - -var xxx_messageInfo_ParamKind proto.InternalMessageInfo - -func (m *ParamRef) Reset() { *m = ParamRef{} } -func (*ParamRef) ProtoMessage() {} -func (*ParamRef) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{9} -} -func (m *ParamRef) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParamRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ParamRef) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParamRef.Merge(m, src) -} -func (m *ParamRef) XXX_Size() int { - return m.Size() -} -func (m *ParamRef) XXX_DiscardUnknown() { - xxx_messageInfo_ParamRef.DiscardUnknown(m) -} - -var xxx_messageInfo_ParamRef proto.InternalMessageInfo - -func (m *Rule) Reset() { *m = Rule{} } -func (*Rule) ProtoMessage() {} -func (*Rule) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{10} -} -func (m *Rule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Rule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Rule) XXX_Merge(src proto.Message) { - xxx_messageInfo_Rule.Merge(m, src) -} -func (m *Rule) XXX_Size() int { - return m.Size() -} -func (m *Rule) XXX_DiscardUnknown() { - xxx_messageInfo_Rule.DiscardUnknown(m) -} - -var xxx_messageInfo_Rule proto.InternalMessageInfo - -func (m *RuleWithOperations) Reset() { *m = RuleWithOperations{} } -func (*RuleWithOperations) ProtoMessage() {} -func (*RuleWithOperations) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{11} -} -func (m *RuleWithOperations) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RuleWithOperations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RuleWithOperations) XXX_Merge(src proto.Message) { - xxx_messageInfo_RuleWithOperations.Merge(m, src) -} -func (m *RuleWithOperations) XXX_Size() int { - return m.Size() -} -func (m *RuleWithOperations) XXX_DiscardUnknown() { - xxx_messageInfo_RuleWithOperations.DiscardUnknown(m) -} - -var xxx_messageInfo_RuleWithOperations proto.InternalMessageInfo - -func (m *ServiceReference) Reset() { *m = ServiceReference{} } -func (*ServiceReference) ProtoMessage() {} -func (*ServiceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{12} -} -func (m *ServiceReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceReference.Merge(m, src) -} -func (m *ServiceReference) XXX_Size() int { - return m.Size() -} -func (m *ServiceReference) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceReference.DiscardUnknown(m) -} +func (m *MatchCondition) Reset() { *m = MatchCondition{} } -var xxx_messageInfo_ServiceReference proto.InternalMessageInfo +func (m *MatchResources) Reset() { *m = MatchResources{} } -func (m *TypeChecking) Reset() { *m = TypeChecking{} } -func (*TypeChecking) ProtoMessage() {} -func (*TypeChecking) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{13} -} -func (m *TypeChecking) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TypeChecking) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TypeChecking) XXX_Merge(src proto.Message) { - xxx_messageInfo_TypeChecking.Merge(m, src) -} -func (m *TypeChecking) XXX_Size() int { - return m.Size() -} -func (m *TypeChecking) XXX_DiscardUnknown() { - xxx_messageInfo_TypeChecking.DiscardUnknown(m) -} +func (m *MutatingWebhook) Reset() { *m = MutatingWebhook{} } -var xxx_messageInfo_TypeChecking proto.InternalMessageInfo +func (m *MutatingWebhookConfiguration) Reset() { *m = MutatingWebhookConfiguration{} } -func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } -func (*ValidatingAdmissionPolicy) ProtoMessage() {} -func (*ValidatingAdmissionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{14} -} -func (m *ValidatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicy.Merge(m, src) -} -func (m *ValidatingAdmissionPolicy) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicy.DiscardUnknown(m) -} +func (m *MutatingWebhookConfigurationList) Reset() { *m = MutatingWebhookConfigurationList{} } -var xxx_messageInfo_ValidatingAdmissionPolicy proto.InternalMessageInfo +func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } -func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } -func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} -func (*ValidatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{15} -} -func (m *ValidatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicyBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicyBinding) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicyBinding.Merge(m, src) -} -func (m *ValidatingAdmissionPolicyBinding) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicyBinding) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicyBinding.DiscardUnknown(m) -} +func (m *ParamKind) Reset() { *m = ParamKind{} } -var xxx_messageInfo_ValidatingAdmissionPolicyBinding proto.InternalMessageInfo +func (m *ParamRef) Reset() { *m = ParamRef{} } -func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } -func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} -func (*ValidatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{16} -} -func (m *ValidatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicyBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicyBindingList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicyBindingList.Merge(m, src) -} -func (m *ValidatingAdmissionPolicyBindingList) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicyBindingList) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicyBindingList.DiscardUnknown(m) -} +func (m *Rule) Reset() { *m = Rule{} } -var xxx_messageInfo_ValidatingAdmissionPolicyBindingList proto.InternalMessageInfo +func (m *RuleWithOperations) Reset() { *m = RuleWithOperations{} } -func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } -func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} -func (*ValidatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{17} -} -func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.Merge(m, src) -} -func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicyBindingSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec proto.InternalMessageInfo - -func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } -func (*ValidatingAdmissionPolicyList) ProtoMessage() {} -func (*ValidatingAdmissionPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{18} -} -func (m *ValidatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicyList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicyList.Merge(m, src) -} -func (m *ValidatingAdmissionPolicyList) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicyList) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicyList.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatingAdmissionPolicyList proto.InternalMessageInfo - -func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } -func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} -func (*ValidatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{19} -} -func (m *ValidatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicySpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicySpec.Merge(m, src) -} -func (m *ValidatingAdmissionPolicySpec) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicySpec) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicySpec.DiscardUnknown(m) -} +func (m *ServiceReference) Reset() { *m = ServiceReference{} } -var xxx_messageInfo_ValidatingAdmissionPolicySpec proto.InternalMessageInfo +func (m *TypeChecking) Reset() { *m = TypeChecking{} } -func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } -func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} -func (*ValidatingAdmissionPolicyStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{20} -} -func (m *ValidatingAdmissionPolicyStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicyStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicyStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicyStatus.Merge(m, src) -} -func (m *ValidatingAdmissionPolicyStatus) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicyStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicyStatus.DiscardUnknown(m) -} +func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } -var xxx_messageInfo_ValidatingAdmissionPolicyStatus proto.InternalMessageInfo +func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } -func (m *ValidatingWebhook) Reset() { *m = ValidatingWebhook{} } -func (*ValidatingWebhook) ProtoMessage() {} -func (*ValidatingWebhook) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{21} -} -func (m *ValidatingWebhook) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingWebhook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingWebhook) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingWebhook.Merge(m, src) -} -func (m *ValidatingWebhook) XXX_Size() int { - return m.Size() -} -func (m *ValidatingWebhook) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingWebhook.DiscardUnknown(m) -} +func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } -var xxx_messageInfo_ValidatingWebhook proto.InternalMessageInfo +func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } -func (m *ValidatingWebhookConfiguration) Reset() { *m = ValidatingWebhookConfiguration{} } -func (*ValidatingWebhookConfiguration) ProtoMessage() {} -func (*ValidatingWebhookConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{22} -} -func (m *ValidatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingWebhookConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingWebhookConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingWebhookConfiguration.Merge(m, src) -} -func (m *ValidatingWebhookConfiguration) XXX_Size() int { - return m.Size() -} -func (m *ValidatingWebhookConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingWebhookConfiguration.DiscardUnknown(m) -} +func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } -var xxx_messageInfo_ValidatingWebhookConfiguration proto.InternalMessageInfo +func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } -func (m *ValidatingWebhookConfigurationList) Reset() { *m = ValidatingWebhookConfigurationList{} } -func (*ValidatingWebhookConfigurationList) ProtoMessage() {} -func (*ValidatingWebhookConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{23} -} -func (m *ValidatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingWebhookConfigurationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingWebhookConfigurationList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingWebhookConfigurationList.Merge(m, src) -} -func (m *ValidatingWebhookConfigurationList) XXX_Size() int { - return m.Size() -} -func (m *ValidatingWebhookConfigurationList) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingWebhookConfigurationList.DiscardUnknown(m) -} +func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } -var xxx_messageInfo_ValidatingWebhookConfigurationList proto.InternalMessageInfo +func (m *ValidatingWebhook) Reset() { *m = ValidatingWebhook{} } -func (m *Validation) Reset() { *m = Validation{} } -func (*Validation) ProtoMessage() {} -func (*Validation) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{24} -} -func (m *Validation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Validation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Validation) XXX_Merge(src proto.Message) { - xxx_messageInfo_Validation.Merge(m, src) -} -func (m *Validation) XXX_Size() int { - return m.Size() -} -func (m *Validation) XXX_DiscardUnknown() { - xxx_messageInfo_Validation.DiscardUnknown(m) -} +func (m *ValidatingWebhookConfiguration) Reset() { *m = ValidatingWebhookConfiguration{} } -var xxx_messageInfo_Validation proto.InternalMessageInfo +func (m *ValidatingWebhookConfigurationList) Reset() { *m = ValidatingWebhookConfigurationList{} } -func (m *Variable) Reset() { *m = Variable{} } -func (*Variable) ProtoMessage() {} -func (*Variable) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{25} -} -func (m *Variable) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Variable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Variable) XXX_Merge(src proto.Message) { - xxx_messageInfo_Variable.Merge(m, src) -} -func (m *Variable) XXX_Size() int { - return m.Size() -} -func (m *Variable) XXX_DiscardUnknown() { - xxx_messageInfo_Variable.DiscardUnknown(m) -} +func (m *Validation) Reset() { *m = Validation{} } -var xxx_messageInfo_Variable proto.InternalMessageInfo +func (m *Variable) Reset() { *m = Variable{} } -func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } -func (*WebhookClientConfig) ProtoMessage() {} -func (*WebhookClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_3205c7dc5bf0c9bf, []int{26} -} -func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WebhookClientConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *WebhookClientConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_WebhookClientConfig.Merge(m, src) -} -func (m *WebhookClientConfig) XXX_Size() int { - return m.Size() -} -func (m *WebhookClientConfig) XXX_DiscardUnknown() { - xxx_messageInfo_WebhookClientConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_WebhookClientConfig proto.InternalMessageInfo - -func init() { - proto.RegisterType((*AuditAnnotation)(nil), "k8s.io.api.admissionregistration.v1.AuditAnnotation") - proto.RegisterType((*ExpressionWarning)(nil), "k8s.io.api.admissionregistration.v1.ExpressionWarning") - proto.RegisterType((*MatchCondition)(nil), "k8s.io.api.admissionregistration.v1.MatchCondition") - proto.RegisterType((*MatchResources)(nil), "k8s.io.api.admissionregistration.v1.MatchResources") - proto.RegisterType((*MutatingWebhook)(nil), "k8s.io.api.admissionregistration.v1.MutatingWebhook") - proto.RegisterType((*MutatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1.MutatingWebhookConfiguration") - proto.RegisterType((*MutatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1.MutatingWebhookConfigurationList") - proto.RegisterType((*NamedRuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1.NamedRuleWithOperations") - proto.RegisterType((*ParamKind)(nil), "k8s.io.api.admissionregistration.v1.ParamKind") - proto.RegisterType((*ParamRef)(nil), "k8s.io.api.admissionregistration.v1.ParamRef") - proto.RegisterType((*Rule)(nil), "k8s.io.api.admissionregistration.v1.Rule") - proto.RegisterType((*RuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1.RuleWithOperations") - proto.RegisterType((*ServiceReference)(nil), "k8s.io.api.admissionregistration.v1.ServiceReference") - proto.RegisterType((*TypeChecking)(nil), "k8s.io.api.admissionregistration.v1.TypeChecking") - proto.RegisterType((*ValidatingAdmissionPolicy)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicy") - proto.RegisterType((*ValidatingAdmissionPolicyBinding)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding") - proto.RegisterType((*ValidatingAdmissionPolicyBindingList)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingList") - proto.RegisterType((*ValidatingAdmissionPolicyBindingSpec)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingSpec") - proto.RegisterType((*ValidatingAdmissionPolicyList)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyList") - proto.RegisterType((*ValidatingAdmissionPolicySpec)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicySpec") - proto.RegisterType((*ValidatingAdmissionPolicyStatus)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyStatus") - proto.RegisterType((*ValidatingWebhook)(nil), "k8s.io.api.admissionregistration.v1.ValidatingWebhook") - proto.RegisterType((*ValidatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1.ValidatingWebhookConfiguration") - proto.RegisterType((*ValidatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1.ValidatingWebhookConfigurationList") - proto.RegisterType((*Validation)(nil), "k8s.io.api.admissionregistration.v1.Validation") - proto.RegisterType((*Variable)(nil), "k8s.io.api.admissionregistration.v1.Variable") - proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.api.admissionregistration.v1.WebhookClientConfig") -} - -func init() { - proto.RegisterFile("k8s.io/api/admissionregistration/v1/generated.proto", fileDescriptor_3205c7dc5bf0c9bf) -} - -var fileDescriptor_3205c7dc5bf0c9bf = []byte{ - // 2075 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xf7, 0x8a, 0x94, 0x44, 0x3e, 0xea, 0x8b, 0x13, 0x27, 0xa2, 0x1d, 0x87, 0x2b, 0x6c, 0x82, - 0xc2, 0x46, 0x63, 0x32, 0xb2, 0x53, 0x27, 0x08, 0x8a, 0x06, 0xa2, 0xfc, 0x01, 0xc5, 0x96, 0x2d, - 0x8c, 0x12, 0xa9, 0x68, 0xdd, 0x22, 0xab, 0xdd, 0x21, 0xb9, 0x11, 0xb9, 0xbb, 0xd8, 0xd9, 0x65, - 0xac, 0x9e, 0x8a, 0xf6, 0x5e, 0x14, 0xe8, 0x5f, 0xd0, 0xfe, 0x09, 0xbd, 0xb4, 0x40, 0x4f, 0xbd, - 0xf9, 0x52, 0x20, 0x3d, 0xd5, 0x87, 0x62, 0x51, 0xb3, 0x97, 0x1e, 0x7a, 0x68, 0xaf, 0x02, 0x8a, - 0x16, 0x33, 0x3b, 0xfb, 0xc9, 0xa5, 0xb5, 0x96, 0x6d, 0xf5, 0xe2, 0x9b, 0xf6, 0x7d, 0xfc, 0xde, - 0xbc, 0x37, 0x6f, 0xe6, 0xbd, 0x79, 0x14, 0x5c, 0x3f, 0xfc, 0x98, 0xb6, 0x0c, 0xab, 0xad, 0xda, - 0x46, 0x5b, 0xd5, 0x87, 0x06, 0xa5, 0x86, 0x65, 0x3a, 0xa4, 0x67, 0x50, 0xd7, 0x51, 0x5d, 0xc3, - 0x32, 0xdb, 0xa3, 0xf5, 0x76, 0x8f, 0x98, 0xc4, 0x51, 0x5d, 0xa2, 0xb7, 0x6c, 0xc7, 0x72, 0x2d, - 0xf4, 0x6e, 0xa0, 0xd4, 0x52, 0x6d, 0xa3, 0x95, 0xab, 0xd4, 0x1a, 0xad, 0x5f, 0xbc, 0xda, 0x33, - 0xdc, 0xbe, 0x77, 0xd0, 0xd2, 0xac, 0x61, 0xbb, 0x67, 0xf5, 0xac, 0x36, 0xd7, 0x3d, 0xf0, 0xba, - 0xfc, 0x8b, 0x7f, 0xf0, 0xbf, 0x02, 0xcc, 0x8b, 0x1f, 0xc6, 0x0b, 0x19, 0xaa, 0x5a, 0xdf, 0x30, - 0x89, 0x73, 0xd4, 0xb6, 0x0f, 0x7b, 0x8c, 0x40, 0xdb, 0x43, 0xe2, 0xaa, 0x39, 0x2b, 0xb9, 0xd8, - 0x9e, 0xa6, 0xe5, 0x78, 0xa6, 0x6b, 0x0c, 0xc9, 0x84, 0xc2, 0x8d, 0x93, 0x14, 0xa8, 0xd6, 0x27, - 0x43, 0x35, 0xab, 0xa7, 0x50, 0x58, 0xde, 0xf0, 0x74, 0xc3, 0xdd, 0x30, 0x4d, 0xcb, 0xe5, 0x3e, - 0xa2, 0x77, 0xa0, 0x74, 0x48, 0x8e, 0x1a, 0xd2, 0x9a, 0x74, 0xb9, 0xda, 0xa9, 0x3d, 0xf6, 0xe5, - 0x73, 0x63, 0x5f, 0x2e, 0xdd, 0x25, 0x47, 0x98, 0xd1, 0xd1, 0x06, 0x2c, 0x8f, 0xd4, 0x81, 0x47, - 0x6e, 0x3d, 0xb2, 0x1d, 0xc2, 0x23, 0xd4, 0x98, 0xe1, 0xa2, 0xab, 0x42, 0x74, 0x79, 0x2f, 0xcd, - 0xc6, 0x59, 0x79, 0x65, 0x00, 0xf5, 0xf8, 0x6b, 0x5f, 0x75, 0x4c, 0xc3, 0xec, 0xa1, 0xf7, 0xa1, - 0xd2, 0x35, 0xc8, 0x40, 0xc7, 0xa4, 0x2b, 0x00, 0x57, 0x04, 0x60, 0xe5, 0xb6, 0xa0, 0xe3, 0x48, - 0x02, 0x5d, 0x81, 0xf9, 0xaf, 0x03, 0xc5, 0x46, 0x89, 0x0b, 0x2f, 0x0b, 0xe1, 0x79, 0x81, 0x87, - 0x43, 0xbe, 0xd2, 0x85, 0xa5, 0x6d, 0xd5, 0xd5, 0xfa, 0x9b, 0x96, 0xa9, 0x1b, 0xdc, 0xc3, 0x35, - 0x28, 0x9b, 0xea, 0x90, 0x08, 0x17, 0x17, 0x84, 0x66, 0xf9, 0xbe, 0x3a, 0x24, 0x98, 0x73, 0xd0, - 0x35, 0x00, 0x92, 0xf5, 0x0f, 0x09, 0x39, 0x48, 0xb8, 0x96, 0x90, 0x52, 0xfe, 0x54, 0x16, 0x86, - 0x30, 0xa1, 0x96, 0xe7, 0x68, 0x84, 0xa2, 0x47, 0x50, 0x67, 0x70, 0xd4, 0x56, 0x35, 0xb2, 0x4b, - 0x06, 0x44, 0x73, 0x2d, 0x87, 0x5b, 0xad, 0x5d, 0xbb, 0xde, 0x8a, 0x93, 0x2d, 0xda, 0xb1, 0x96, - 0x7d, 0xd8, 0x63, 0x04, 0xda, 0x62, 0x89, 0xd1, 0x1a, 0xad, 0xb7, 0xee, 0xa9, 0x07, 0x64, 0x10, - 0xaa, 0x76, 0xde, 0x1c, 0xfb, 0x72, 0xfd, 0x7e, 0x16, 0x11, 0x4f, 0x1a, 0x41, 0x16, 0x2c, 0x59, - 0x07, 0x5f, 0x11, 0xcd, 0x8d, 0xcc, 0xce, 0x9c, 0xde, 0x2c, 0x1a, 0xfb, 0xf2, 0xd2, 0x83, 0x14, - 0x1c, 0xce, 0xc0, 0xa3, 0x23, 0x58, 0x74, 0x84, 0xdf, 0xd8, 0x1b, 0x10, 0xda, 0x28, 0xad, 0x95, - 0x2e, 0xd7, 0xae, 0x7d, 0xb7, 0x55, 0xe0, 0x4c, 0xb5, 0x98, 0x4b, 0x3a, 0x53, 0xdb, 0x37, 0xdc, - 0xfe, 0x03, 0x9b, 0x04, 0x1c, 0xda, 0x79, 0x53, 0x84, 0x7c, 0x11, 0x27, 0xa1, 0x71, 0xda, 0x12, - 0xfa, 0x85, 0x04, 0xe7, 0xc9, 0x23, 0x6d, 0xe0, 0xe9, 0x24, 0x25, 0xd7, 0x28, 0xbf, 0x84, 0x25, - 0x5c, 0x12, 0x4b, 0x38, 0x7f, 0x2b, 0xc7, 0x02, 0xce, 0xb5, 0x8b, 0x6e, 0x42, 0x6d, 0xc8, 0x12, - 0x61, 0xc7, 0x1a, 0x18, 0xda, 0x51, 0x63, 0x9e, 0xa7, 0x8f, 0x32, 0xf6, 0xe5, 0xda, 0x76, 0x4c, - 0x3e, 0xf6, 0xe5, 0xe5, 0xc4, 0xe7, 0xe7, 0x47, 0x36, 0xc1, 0x49, 0x35, 0xe5, 0x77, 0x15, 0x58, - 0xde, 0xf6, 0xd8, 0xa1, 0x34, 0x7b, 0xfb, 0xe4, 0xa0, 0x6f, 0x59, 0x87, 0x05, 0x32, 0xd7, 0x81, - 0x05, 0x6d, 0x60, 0x10, 0xd3, 0xdd, 0xb4, 0xcc, 0xae, 0xd1, 0x13, 0xdb, 0xfe, 0x71, 0xa1, 0x18, - 0x08, 0x2b, 0x9b, 0x09, 0xfd, 0xce, 0x79, 0x61, 0x63, 0x21, 0x49, 0xc5, 0x29, 0x1b, 0xe8, 0x21, - 0xcc, 0x3a, 0x89, 0x3d, 0xff, 0xa8, 0x90, 0xb1, 0x9c, 0x58, 0x2f, 0x0a, 0x5b, 0xb3, 0x41, 0x70, - 0x03, 0x50, 0x74, 0x0f, 0x16, 0xbb, 0xaa, 0x31, 0xf0, 0x1c, 0x22, 0xe2, 0x59, 0xe6, 0xce, 0x7f, - 0x8b, 0xe5, 0xc5, 0xed, 0x24, 0xe3, 0xd8, 0x97, 0xeb, 0x29, 0x02, 0x8f, 0x69, 0x5a, 0x39, 0xbb, - 0x37, 0xd5, 0x53, 0xed, 0x4d, 0xfe, 0xc1, 0x9e, 0xfd, 0xff, 0x1c, 0xec, 0xda, 0xab, 0x3d, 0xd8, - 0x37, 0xa1, 0x46, 0x0d, 0x9d, 0xdc, 0xea, 0x76, 0x89, 0xe6, 0xd2, 0xc6, 0x5c, 0x1c, 0xb0, 0xdd, - 0x98, 0xcc, 0x02, 0x16, 0x7f, 0x6e, 0x0e, 0x54, 0x4a, 0x71, 0x52, 0x0d, 0x7d, 0x02, 0x4b, 0xac, - 0x0c, 0x59, 0x9e, 0xbb, 0x4b, 0x34, 0xcb, 0xd4, 0x29, 0x3f, 0x15, 0xb3, 0xc1, 0x0a, 0x3e, 0x4f, - 0x71, 0x70, 0x46, 0x12, 0x7d, 0x01, 0xab, 0x51, 0x16, 0x61, 0x32, 0x32, 0xc8, 0xd7, 0x7b, 0xc4, - 0x61, 0x1f, 0xb4, 0x51, 0x59, 0x2b, 0x5d, 0xae, 0x76, 0xde, 0x1e, 0xfb, 0xf2, 0xea, 0x46, 0xbe, - 0x08, 0x9e, 0xa6, 0x8b, 0xbe, 0x04, 0xe4, 0x10, 0xc3, 0x1c, 0x59, 0x1a, 0x4f, 0x3f, 0x91, 0x10, - 0xc0, 0xfd, 0xfb, 0x60, 0xec, 0xcb, 0x08, 0x4f, 0x70, 0x8f, 0x7d, 0xf9, 0xad, 0x49, 0x2a, 0x4f, - 0x8f, 0x1c, 0x2c, 0x34, 0x82, 0xe5, 0x61, 0xaa, 0xf2, 0xd0, 0xc6, 0x02, 0x3f, 0x21, 0xd7, 0x0b, - 0x9d, 0x90, 0x74, 0xd5, 0x8a, 0xeb, 0x6b, 0x9a, 0x4e, 0x71, 0xd6, 0x88, 0xf2, 0x44, 0x82, 0x4b, - 0x99, 0x9b, 0x23, 0x38, 0xa9, 0x5e, 0x00, 0x8e, 0xbe, 0x84, 0x0a, 0x4b, 0x08, 0x5d, 0x75, 0x55, - 0x51, 0x8e, 0x3e, 0x28, 0x96, 0x3e, 0x41, 0xae, 0x6c, 0x13, 0x57, 0x8d, 0xcb, 0x61, 0x4c, 0xc3, - 0x11, 0x2a, 0xda, 0x83, 0x8a, 0xb0, 0x4c, 0x1b, 0x33, 0xdc, 0xe7, 0x0f, 0x8b, 0xf9, 0x9c, 0x5e, - 0x76, 0xa7, 0xcc, 0xac, 0xe0, 0x08, 0x4b, 0xf9, 0x87, 0x04, 0x6b, 0xcf, 0x72, 0xed, 0x9e, 0x41, - 0x5d, 0xf4, 0x70, 0xc2, 0xbd, 0x56, 0xc1, 0xd3, 0x61, 0xd0, 0xc0, 0xb9, 0xa8, 0xf5, 0x08, 0x29, - 0x09, 0xd7, 0xba, 0x30, 0x6b, 0xb8, 0x64, 0x18, 0xfa, 0xb5, 0x71, 0x1a, 0xbf, 0x52, 0x6b, 0x8e, - 0xef, 0xbd, 0x2d, 0x86, 0x8b, 0x03, 0x78, 0xb6, 0x8b, 0xab, 0x53, 0xaa, 0x12, 0xfa, 0x28, 0xae, - 0xb6, 0xfc, 0xd6, 0x68, 0x48, 0xfc, 0x20, 0xd4, 0x93, 0xb5, 0x92, 0x33, 0x70, 0x5a, 0x0e, 0xfd, - 0x5c, 0x02, 0xe4, 0x4c, 0xe0, 0x89, 0x2a, 0x71, 0xea, 0x8b, 0xfb, 0xa2, 0x70, 0x00, 0x4d, 0xf2, - 0x70, 0x8e, 0x39, 0x45, 0x85, 0xea, 0x8e, 0xea, 0xa8, 0xc3, 0xbb, 0x86, 0xa9, 0xb3, 0x5e, 0x4b, - 0xb5, 0x0d, 0x71, 0x2c, 0x45, 0x65, 0x8b, 0x92, 0x6b, 0x63, 0x67, 0x4b, 0x70, 0x70, 0x42, 0x8a, - 0xd5, 0xc1, 0x43, 0xc3, 0xd4, 0x45, 0x67, 0x16, 0xd5, 0x41, 0x86, 0x87, 0x39, 0x47, 0xf9, 0xed, - 0x0c, 0x54, 0xb8, 0x0d, 0xd6, 0x2d, 0x9e, 0x5c, 0x36, 0xdb, 0x50, 0x8d, 0xee, 0x5a, 0x81, 0x5a, - 0x17, 0x62, 0xd5, 0xe8, 0x5e, 0xc6, 0xb1, 0x0c, 0xfa, 0x11, 0x54, 0x68, 0x78, 0x03, 0x97, 0x4e, - 0x7f, 0x03, 0x2f, 0xb0, 0x24, 0x8b, 0xee, 0xde, 0x08, 0x12, 0xb9, 0xb0, 0x6a, 0xb3, 0xd5, 0x13, - 0x97, 0x38, 0xf7, 0x2d, 0xf7, 0xb6, 0xe5, 0x99, 0xfa, 0x86, 0xc6, 0xa2, 0x27, 0xca, 0xdf, 0x27, - 0xec, 0xce, 0xdb, 0xc9, 0x17, 0x39, 0xf6, 0xe5, 0xb7, 0xa7, 0xb0, 0xf8, 0x5d, 0x35, 0x0d, 0x5a, - 0xf9, 0xa3, 0x04, 0x65, 0xb6, 0x85, 0xe8, 0xdb, 0x50, 0x55, 0x6d, 0xe3, 0x8e, 0x63, 0x79, 0x76, - 0x98, 0x5b, 0x8b, 0x2c, 0x14, 0x1b, 0x3b, 0x5b, 0x01, 0x11, 0xc7, 0x7c, 0xb4, 0x0e, 0xb5, 0x78, - 0x6b, 0x82, 0x63, 0x51, 0xed, 0x2c, 0xb3, 0x0a, 0x11, 0xef, 0x1e, 0xc5, 0x49, 0x19, 0x86, 0x1f, - 0xe6, 0x65, 0xd0, 0x35, 0x08, 0xfc, 0xa8, 0x75, 0xc6, 0x31, 0x1f, 0xbd, 0x0f, 0xb3, 0x54, 0xb3, - 0x6c, 0x22, 0x3c, 0x7f, 0x8b, 0x9d, 0x94, 0x5d, 0x46, 0x38, 0xf6, 0xe5, 0x2a, 0xff, 0x83, 0x7b, - 0x15, 0x08, 0x29, 0xbf, 0x91, 0x20, 0x27, 0x0d, 0xd1, 0xa7, 0x00, 0x56, 0x9c, 0xef, 0x81, 0x4b, - 0x32, 0xbf, 0xbe, 0x22, 0xea, 0xb1, 0x2f, 0x2f, 0x46, 0x5f, 0x1c, 0x32, 0xa1, 0x82, 0xee, 0x42, - 0x99, 0x65, 0xb2, 0x38, 0x2a, 0x57, 0x0a, 0x1f, 0x95, 0x38, 0xdd, 0xd8, 0x17, 0xe6, 0x20, 0xca, - 0xaf, 0x25, 0x58, 0xd9, 0x25, 0xce, 0xc8, 0xd0, 0x08, 0x26, 0x5d, 0xe2, 0x10, 0x53, 0xcb, 0xe4, - 0xa0, 0x54, 0x20, 0x07, 0xc3, 0xb4, 0x9e, 0x99, 0x9a, 0xd6, 0x97, 0xa0, 0x6c, 0xab, 0x6e, 0x5f, - 0xbc, 0x91, 0x2a, 0x8c, 0xbb, 0xa3, 0xba, 0x7d, 0xcc, 0xa9, 0x9c, 0x6b, 0x39, 0x2e, 0x8f, 0xeb, - 0xac, 0xe0, 0x5a, 0x8e, 0x8b, 0x39, 0x55, 0xf9, 0x95, 0x04, 0x0b, 0x2c, 0x0a, 0x9b, 0x7d, 0xa2, - 0x1d, 0xb2, 0x17, 0xda, 0xcf, 0x24, 0x40, 0x24, 0xfb, 0x6e, 0x0b, 0x62, 0x59, 0xbb, 0x76, 0xa3, - 0x50, 0x40, 0x26, 0x9e, 0x7d, 0xf1, 0xd5, 0x31, 0xc1, 0xa2, 0x38, 0xc7, 0x9a, 0xf2, 0xe7, 0x19, - 0xb8, 0xb0, 0xa7, 0x0e, 0x0c, 0x9d, 0x5f, 0xa7, 0x51, 0xd1, 0x17, 0x15, 0xf7, 0xd5, 0x17, 0x36, - 0x1d, 0xca, 0xd4, 0x26, 0x9a, 0x48, 0x83, 0x4e, 0x21, 0xaf, 0xa7, 0xae, 0x77, 0xd7, 0x26, 0x5a, - 0xbc, 0x6f, 0xec, 0x0b, 0x73, 0x74, 0x34, 0x80, 0x39, 0xea, 0xaa, 0xae, 0x47, 0xc5, 0xdd, 0x72, - 0xf3, 0x05, 0xed, 0x70, 0xac, 0xce, 0x92, 0xb0, 0x34, 0x17, 0x7c, 0x63, 0x61, 0x43, 0xf9, 0xb7, - 0x04, 0x6b, 0x53, 0x75, 0x3b, 0x86, 0xa9, 0xb3, 0xdd, 0x7f, 0xf5, 0xa1, 0x3d, 0x4c, 0x85, 0x76, - 0xeb, 0xc5, 0x5c, 0x16, 0xcb, 0x9e, 0x16, 0x61, 0xe5, 0x5f, 0x12, 0xbc, 0x77, 0x92, 0xf2, 0x19, - 0x34, 0x13, 0x5f, 0xa5, 0x9b, 0x89, 0x5b, 0x2f, 0xc5, 0xe9, 0x29, 0x0d, 0xc5, 0x7f, 0x66, 0x4e, - 0x76, 0x99, 0x45, 0x88, 0x55, 0x64, 0x9b, 0x13, 0xef, 0xc7, 0x45, 0x33, 0xda, 0xba, 0x9d, 0x88, - 0x83, 0x13, 0x52, 0x68, 0x1f, 0x2a, 0xb6, 0x28, 0xb7, 0x62, 0x03, 0xaf, 0x16, 0xf2, 0x25, 0xac, - 0xd1, 0x41, 0x25, 0x0c, 0xbf, 0x70, 0x04, 0xc6, 0x1e, 0x3c, 0xc3, 0xd4, 0x54, 0x25, 0xa7, 0xdc, - 0x9e, 0xd0, 0x43, 0x47, 0xaa, 0xc1, 0x73, 0x23, 0x4d, 0xc3, 0x19, 0x78, 0xb4, 0x0f, 0xf5, 0x91, - 0x88, 0x92, 0x65, 0x06, 0x85, 0x31, 0x18, 0x25, 0x54, 0x3b, 0x57, 0xd8, 0x33, 0x6d, 0x2f, 0xcb, - 0x3c, 0xf6, 0xe5, 0x95, 0x2c, 0x11, 0x4f, 0x62, 0x28, 0x63, 0x09, 0xde, 0x99, 0x1a, 0xff, 0x33, - 0xc8, 0x35, 0x2d, 0x9d, 0x6b, 0xdf, 0x7b, 0xc1, 0x5c, 0x9b, 0x92, 0x64, 0xb3, 0xcf, 0x70, 0x92, - 0x67, 0xd7, 0x0f, 0xa1, 0x6a, 0x87, 0xcd, 0x5f, 0x8e, 0x97, 0x27, 0xa4, 0x0a, 0xd3, 0x0a, 0x7a, - 0x85, 0xe8, 0x13, 0xc7, 0x78, 0xc8, 0x83, 0x95, 0xf0, 0x35, 0xc4, 0x54, 0x0d, 0xd3, 0xa5, 0x39, - 0x93, 0xaf, 0xc2, 0xf9, 0x72, 0x7e, 0xec, 0xcb, 0x2b, 0xdb, 0x19, 0x40, 0x3c, 0x61, 0x02, 0x75, - 0xa1, 0x16, 0xef, 0x77, 0x38, 0x07, 0x69, 0x3f, 0x57, 0x80, 0x2d, 0xb3, 0xf3, 0x86, 0x88, 0x68, - 0x2d, 0xa6, 0x51, 0x9c, 0x04, 0x7e, 0xc9, 0xb3, 0x90, 0x9f, 0xc0, 0x8a, 0x9a, 0x1e, 0xfe, 0xd2, - 0xc6, 0xec, 0x73, 0x3c, 0xd6, 0x32, 0x93, 0xe3, 0x4e, 0x43, 0xac, 0x7f, 0x25, 0xc3, 0xa0, 0x78, - 0xc2, 0x4e, 0xde, 0xdb, 0x78, 0xee, 0x0c, 0xde, 0xc6, 0xe8, 0xc7, 0x50, 0x1d, 0xa9, 0x8e, 0xa1, - 0x1e, 0x0c, 0x08, 0x6d, 0xcc, 0x73, 0x8b, 0x57, 0x0b, 0xee, 0x53, 0xa0, 0x15, 0xf7, 0x64, 0x21, - 0x85, 0xe2, 0x18, 0x52, 0xf9, 0xc3, 0x0c, 0xc8, 0x27, 0xd4, 0x61, 0xf4, 0x19, 0x20, 0xeb, 0x80, - 0x12, 0x67, 0x44, 0xf4, 0x3b, 0xc1, 0x3c, 0x3e, 0x7c, 0xf9, 0x94, 0xe2, 0x7e, 0xe8, 0xc1, 0x84, - 0x04, 0xce, 0xd1, 0x42, 0x3d, 0x58, 0x70, 0x13, 0x4d, 0x9a, 0x48, 0xf6, 0xf5, 0x42, 0x2e, 0x25, - 0xbb, 0xbb, 0xce, 0xca, 0xd8, 0x97, 0x53, 0xfd, 0x1e, 0x4e, 0x01, 0x23, 0x0d, 0x40, 0x8b, 0xf7, - 0x6a, 0x32, 0xc3, 0x9f, 0x71, 0x3b, 0xc5, 0xfb, 0x14, 0x55, 0x91, 0xc4, 0x16, 0x25, 0x60, 0x95, - 0xbf, 0xcc, 0x43, 0x3d, 0x8e, 0xde, 0xeb, 0xa9, 0xe7, 0xeb, 0xa9, 0xe7, 0xb4, 0xa9, 0x27, 0xbc, - 0x9e, 0x7a, 0x9e, 0x6a, 0xea, 0x99, 0x73, 0xef, 0xd6, 0xce, 0x62, 0x26, 0xf9, 0x57, 0x09, 0x9a, - 0x13, 0x27, 0xfb, 0xac, 0xa7, 0x92, 0xdf, 0x9f, 0x98, 0x4a, 0xde, 0x78, 0xce, 0x26, 0x68, 0xda, - 0x5c, 0xf2, 0x9f, 0x12, 0x28, 0xcf, 0x76, 0xef, 0x0c, 0x1a, 0xbc, 0x7e, 0xba, 0xc1, 0xdb, 0x3c, - 0x9d, 0x6f, 0x45, 0x66, 0x93, 0xff, 0x95, 0x00, 0xe2, 0x26, 0x05, 0xbd, 0x07, 0x89, 0x1f, 0x45, - 0xc5, 0x35, 0x1d, 0x44, 0x28, 0x41, 0x47, 0x57, 0x60, 0x7e, 0x48, 0x28, 0x55, 0x7b, 0xe1, 0xc4, - 0x22, 0xfa, 0xcd, 0x76, 0x3b, 0x20, 0xe3, 0x90, 0x8f, 0xf6, 0x61, 0xce, 0x21, 0x2a, 0xb5, 0x4c, - 0x31, 0xb9, 0xf8, 0x94, 0xbd, 0x5a, 0x31, 0xa7, 0x1c, 0xfb, 0xf2, 0x7a, 0x91, 0xdf, 0xd4, 0x5b, - 0xe2, 0x91, 0xcb, 0x95, 0xb0, 0x80, 0x43, 0x77, 0xa0, 0x2e, 0x6c, 0x24, 0x16, 0x1c, 0x5c, 0xad, - 0x17, 0xc4, 0x6a, 0xea, 0xdb, 0x59, 0x01, 0x3c, 0xa9, 0xa3, 0x7c, 0x06, 0x95, 0xb0, 0xfe, 0xa3, - 0x06, 0x94, 0x13, 0x2f, 0xa5, 0xc0, 0x71, 0x4e, 0xc9, 0x04, 0x66, 0x26, 0x3f, 0x30, 0xca, 0xef, - 0x25, 0x78, 0x23, 0xa7, 0x0a, 0xa1, 0x0b, 0x50, 0xf2, 0x9c, 0x81, 0x08, 0xc1, 0xfc, 0xd8, 0x97, - 0x4b, 0x5f, 0xe0, 0x7b, 0x98, 0xd1, 0xd0, 0x43, 0x98, 0xa7, 0xc1, 0xfc, 0x48, 0xe4, 0xd1, 0x77, - 0x0a, 0x6d, 0x76, 0x76, 0xe6, 0xd4, 0xa9, 0xb1, 0xf0, 0x87, 0xd4, 0x10, 0x12, 0x5d, 0x86, 0x8a, - 0xa6, 0x76, 0x3c, 0x53, 0x17, 0xf3, 0xae, 0x85, 0xe0, 0x75, 0xb6, 0xb9, 0x11, 0xd0, 0x70, 0xc4, - 0xed, 0x6c, 0x3d, 0x7e, 0xda, 0x3c, 0xf7, 0xcd, 0xd3, 0xe6, 0xb9, 0x27, 0x4f, 0x9b, 0xe7, 0x7e, - 0x3a, 0x6e, 0x4a, 0x8f, 0xc7, 0x4d, 0xe9, 0x9b, 0x71, 0x53, 0x7a, 0x32, 0x6e, 0x4a, 0x7f, 0x1b, - 0x37, 0xa5, 0x5f, 0xfe, 0xbd, 0x79, 0xee, 0x07, 0xef, 0x16, 0xf8, 0x6f, 0x8c, 0xff, 0x05, 0x00, - 0x00, 0xff, 0xff, 0x1e, 0x59, 0xab, 0xd9, 0xb3, 0x21, 0x00, 0x00, -} +func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } func (m *AuditAnnotation) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/admissionregistration/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/admissionregistration/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..04a23c597ca44 --- /dev/null +++ b/staging/src/k8s.io/api/admissionregistration/v1/generated.protomessage.pb.go @@ -0,0 +1,76 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*AuditAnnotation) ProtoMessage() {} + +func (*ExpressionWarning) ProtoMessage() {} + +func (*MatchCondition) ProtoMessage() {} + +func (*MatchResources) ProtoMessage() {} + +func (*MutatingWebhook) ProtoMessage() {} + +func (*MutatingWebhookConfiguration) ProtoMessage() {} + +func (*MutatingWebhookConfigurationList) ProtoMessage() {} + +func (*NamedRuleWithOperations) ProtoMessage() {} + +func (*ParamKind) ProtoMessage() {} + +func (*ParamRef) ProtoMessage() {} + +func (*Rule) ProtoMessage() {} + +func (*RuleWithOperations) ProtoMessage() {} + +func (*ServiceReference) ProtoMessage() {} + +func (*TypeChecking) ProtoMessage() {} + +func (*ValidatingAdmissionPolicy) ProtoMessage() {} + +func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} + +func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} + +func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} + +func (*ValidatingAdmissionPolicyList) ProtoMessage() {} + +func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} + +func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} + +func (*ValidatingWebhook) ProtoMessage() {} + +func (*ValidatingWebhookConfiguration) ProtoMessage() {} + +func (*ValidatingWebhookConfigurationList) ProtoMessage() {} + +func (*Validation) ProtoMessage() {} + +func (*Variable) ProtoMessage() {} + +func (*WebhookClientConfig) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/admissionregistration/v1/types.go b/staging/src/k8s.io/api/admissionregistration/v1/types.go index 4efeb26748c6d..311c05c0ffa76 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1/types.go +++ b/staging/src/k8s.io/api/admissionregistration/v1/types.go @@ -1098,17 +1098,18 @@ type MutatingWebhook struct { MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,12,opt,name=matchConditions"` } -// ReinvocationPolicyType specifies what type of policy the admission hook uses. +// ReinvocationPolicyType specifies what type of policy is used when other admission plugins also perform +// modifications. // +enum type ReinvocationPolicyType string const ( - // NeverReinvocationPolicy indicates that the webhook must not be called more than once in a + // NeverReinvocationPolicy indicates that the mutation must not be called more than once in a // single admission evaluation. NeverReinvocationPolicy ReinvocationPolicyType = "Never" - // IfNeededReinvocationPolicy indicates that the webhook may be called at least one + // IfNeededReinvocationPolicy indicates that the mutation may be called at least one // additional time as part of the admission evaluation if the object being admitted is - // modified by other admission plugins after the initial webhook call. + // modified by other admission plugins after the initial mutation call. IfNeededReinvocationPolicy ReinvocationPolicyType = "IfNeeded" ) diff --git a/staging/src/k8s.io/api/admissionregistration/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/admissionregistration/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..3264285cd072f --- /dev/null +++ b/staging/src/k8s.io/api/admissionregistration/v1/zz_generated.model_name.go @@ -0,0 +1,157 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AuditAnnotation) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.AuditAnnotation" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExpressionWarning) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.ExpressionWarning" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MatchCondition) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.MatchCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MatchResources) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.MatchResources" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingWebhook) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.MutatingWebhook" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingWebhookConfiguration) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingWebhookConfigurationList) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.MutatingWebhookConfigurationList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NamedRuleWithOperations) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.NamedRuleWithOperations" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ParamKind) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.ParamKind" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ParamRef) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.ParamRef" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Rule) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.Rule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RuleWithOperations) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.RuleWithOperations" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceReference) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.ServiceReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TypeChecking) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.TypeChecking" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicy) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicyBinding) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicyBindingList) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicyBindingSpec) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicyList) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicySpec) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicySpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicyStatus) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingWebhook) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.ValidatingWebhook" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingWebhookConfiguration) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingWebhookConfigurationList) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfigurationList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Validation) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.Validation" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Variable) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.Variable" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in WebhookClientConfig) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1.WebhookClientConfig" +} diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/doc.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/doc.go index 344af9ae09ff8..8cac29df647f5 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/doc.go +++ b/staging/src/k8s.io/api/admissionregistration/v1alpha1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.admissionregistration.v1alpha1 + // +groupName=admissionregistration.k8s.io // Package v1alpha1 is the v1alpha1 version of the API. diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go index 993ff6f20eb09..8229043919052 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go +++ b/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go @@ -24,904 +24,66 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" k8s_io_api_admissionregistration_v1 "k8s.io/api/admissionregistration/v1" k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ApplyConfiguration) Reset() { *m = ApplyConfiguration{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } -func (m *ApplyConfiguration) Reset() { *m = ApplyConfiguration{} } -func (*ApplyConfiguration) ProtoMessage() {} -func (*ApplyConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{0} -} -func (m *ApplyConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ApplyConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ApplyConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_ApplyConfiguration.Merge(m, src) -} -func (m *ApplyConfiguration) XXX_Size() int { - return m.Size() -} -func (m *ApplyConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_ApplyConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_ApplyConfiguration proto.InternalMessageInfo - -func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } -func (*AuditAnnotation) ProtoMessage() {} -func (*AuditAnnotation) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{1} -} -func (m *AuditAnnotation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuditAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AuditAnnotation) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuditAnnotation.Merge(m, src) -} -func (m *AuditAnnotation) XXX_Size() int { - return m.Size() -} -func (m *AuditAnnotation) XXX_DiscardUnknown() { - xxx_messageInfo_AuditAnnotation.DiscardUnknown(m) -} - -var xxx_messageInfo_AuditAnnotation proto.InternalMessageInfo - -func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } -func (*ExpressionWarning) ProtoMessage() {} -func (*ExpressionWarning) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{2} -} -func (m *ExpressionWarning) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExpressionWarning) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExpressionWarning) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExpressionWarning.Merge(m, src) -} -func (m *ExpressionWarning) XXX_Size() int { - return m.Size() -} -func (m *ExpressionWarning) XXX_DiscardUnknown() { - xxx_messageInfo_ExpressionWarning.DiscardUnknown(m) -} - -var xxx_messageInfo_ExpressionWarning proto.InternalMessageInfo - -func (m *JSONPatch) Reset() { *m = JSONPatch{} } -func (*JSONPatch) ProtoMessage() {} -func (*JSONPatch) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{3} -} -func (m *JSONPatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONPatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JSONPatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONPatch.Merge(m, src) -} -func (m *JSONPatch) XXX_Size() int { - return m.Size() -} -func (m *JSONPatch) XXX_DiscardUnknown() { - xxx_messageInfo_JSONPatch.DiscardUnknown(m) -} - -var xxx_messageInfo_JSONPatch proto.InternalMessageInfo - -func (m *MatchCondition) Reset() { *m = MatchCondition{} } -func (*MatchCondition) ProtoMessage() {} -func (*MatchCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{4} -} -func (m *MatchCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MatchCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MatchCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_MatchCondition.Merge(m, src) -} -func (m *MatchCondition) XXX_Size() int { - return m.Size() -} -func (m *MatchCondition) XXX_DiscardUnknown() { - xxx_messageInfo_MatchCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_MatchCondition proto.InternalMessageInfo - -func (m *MatchResources) Reset() { *m = MatchResources{} } -func (*MatchResources) ProtoMessage() {} -func (*MatchResources) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{5} -} -func (m *MatchResources) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MatchResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MatchResources) XXX_Merge(src proto.Message) { - xxx_messageInfo_MatchResources.Merge(m, src) -} -func (m *MatchResources) XXX_Size() int { - return m.Size() -} -func (m *MatchResources) XXX_DiscardUnknown() { - xxx_messageInfo_MatchResources.DiscardUnknown(m) -} - -var xxx_messageInfo_MatchResources proto.InternalMessageInfo - -func (m *MutatingAdmissionPolicy) Reset() { *m = MutatingAdmissionPolicy{} } -func (*MutatingAdmissionPolicy) ProtoMessage() {} -func (*MutatingAdmissionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{6} -} -func (m *MutatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingAdmissionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingAdmissionPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingAdmissionPolicy.Merge(m, src) -} -func (m *MutatingAdmissionPolicy) XXX_Size() int { - return m.Size() -} -func (m *MutatingAdmissionPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingAdmissionPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingAdmissionPolicy proto.InternalMessageInfo - -func (m *MutatingAdmissionPolicyBinding) Reset() { *m = MutatingAdmissionPolicyBinding{} } -func (*MutatingAdmissionPolicyBinding) ProtoMessage() {} -func (*MutatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{7} -} -func (m *MutatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingAdmissionPolicyBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingAdmissionPolicyBinding) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingAdmissionPolicyBinding.Merge(m, src) -} -func (m *MutatingAdmissionPolicyBinding) XXX_Size() int { - return m.Size() -} -func (m *MutatingAdmissionPolicyBinding) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingAdmissionPolicyBinding.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingAdmissionPolicyBinding proto.InternalMessageInfo - -func (m *MutatingAdmissionPolicyBindingList) Reset() { *m = MutatingAdmissionPolicyBindingList{} } -func (*MutatingAdmissionPolicyBindingList) ProtoMessage() {} -func (*MutatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{8} -} -func (m *MutatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingAdmissionPolicyBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingAdmissionPolicyBindingList) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingAdmissionPolicyBindingList.Merge(m, src) -} -func (m *MutatingAdmissionPolicyBindingList) XXX_Size() int { - return m.Size() -} -func (m *MutatingAdmissionPolicyBindingList) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingAdmissionPolicyBindingList.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingAdmissionPolicyBindingList proto.InternalMessageInfo - -func (m *MutatingAdmissionPolicyBindingSpec) Reset() { *m = MutatingAdmissionPolicyBindingSpec{} } -func (*MutatingAdmissionPolicyBindingSpec) ProtoMessage() {} -func (*MutatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{9} -} -func (m *MutatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingAdmissionPolicyBindingSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingAdmissionPolicyBindingSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingAdmissionPolicyBindingSpec.Merge(m, src) -} -func (m *MutatingAdmissionPolicyBindingSpec) XXX_Size() int { - return m.Size() -} -func (m *MutatingAdmissionPolicyBindingSpec) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingAdmissionPolicyBindingSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingAdmissionPolicyBindingSpec proto.InternalMessageInfo - -func (m *MutatingAdmissionPolicyList) Reset() { *m = MutatingAdmissionPolicyList{} } -func (*MutatingAdmissionPolicyList) ProtoMessage() {} -func (*MutatingAdmissionPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{10} -} -func (m *MutatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingAdmissionPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingAdmissionPolicyList) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingAdmissionPolicyList.Merge(m, src) -} -func (m *MutatingAdmissionPolicyList) XXX_Size() int { - return m.Size() -} -func (m *MutatingAdmissionPolicyList) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingAdmissionPolicyList.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingAdmissionPolicyList proto.InternalMessageInfo - -func (m *MutatingAdmissionPolicySpec) Reset() { *m = MutatingAdmissionPolicySpec{} } -func (*MutatingAdmissionPolicySpec) ProtoMessage() {} -func (*MutatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{11} -} -func (m *MutatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingAdmissionPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingAdmissionPolicySpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingAdmissionPolicySpec.Merge(m, src) -} -func (m *MutatingAdmissionPolicySpec) XXX_Size() int { - return m.Size() -} -func (m *MutatingAdmissionPolicySpec) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingAdmissionPolicySpec.DiscardUnknown(m) -} +func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } -var xxx_messageInfo_MutatingAdmissionPolicySpec proto.InternalMessageInfo +func (m *JSONPatch) Reset() { *m = JSONPatch{} } -func (m *Mutation) Reset() { *m = Mutation{} } -func (*Mutation) ProtoMessage() {} -func (*Mutation) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{12} -} -func (m *Mutation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Mutation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Mutation) XXX_Merge(src proto.Message) { - xxx_messageInfo_Mutation.Merge(m, src) -} -func (m *Mutation) XXX_Size() int { - return m.Size() -} -func (m *Mutation) XXX_DiscardUnknown() { - xxx_messageInfo_Mutation.DiscardUnknown(m) -} +func (m *MatchCondition) Reset() { *m = MatchCondition{} } -var xxx_messageInfo_Mutation proto.InternalMessageInfo +func (m *MatchResources) Reset() { *m = MatchResources{} } -func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } -func (*NamedRuleWithOperations) ProtoMessage() {} -func (*NamedRuleWithOperations) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{13} -} -func (m *NamedRuleWithOperations) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NamedRuleWithOperations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NamedRuleWithOperations) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedRuleWithOperations.Merge(m, src) -} -func (m *NamedRuleWithOperations) XXX_Size() int { - return m.Size() -} -func (m *NamedRuleWithOperations) XXX_DiscardUnknown() { - xxx_messageInfo_NamedRuleWithOperations.DiscardUnknown(m) -} +func (m *MutatingAdmissionPolicy) Reset() { *m = MutatingAdmissionPolicy{} } -var xxx_messageInfo_NamedRuleWithOperations proto.InternalMessageInfo +func (m *MutatingAdmissionPolicyBinding) Reset() { *m = MutatingAdmissionPolicyBinding{} } -func (m *ParamKind) Reset() { *m = ParamKind{} } -func (*ParamKind) ProtoMessage() {} -func (*ParamKind) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{14} -} -func (m *ParamKind) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParamKind) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ParamKind) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParamKind.Merge(m, src) -} -func (m *ParamKind) XXX_Size() int { - return m.Size() -} -func (m *ParamKind) XXX_DiscardUnknown() { - xxx_messageInfo_ParamKind.DiscardUnknown(m) -} +func (m *MutatingAdmissionPolicyBindingList) Reset() { *m = MutatingAdmissionPolicyBindingList{} } -var xxx_messageInfo_ParamKind proto.InternalMessageInfo +func (m *MutatingAdmissionPolicyBindingSpec) Reset() { *m = MutatingAdmissionPolicyBindingSpec{} } -func (m *ParamRef) Reset() { *m = ParamRef{} } -func (*ParamRef) ProtoMessage() {} -func (*ParamRef) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{15} -} -func (m *ParamRef) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParamRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ParamRef) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParamRef.Merge(m, src) -} -func (m *ParamRef) XXX_Size() int { - return m.Size() -} -func (m *ParamRef) XXX_DiscardUnknown() { - xxx_messageInfo_ParamRef.DiscardUnknown(m) -} +func (m *MutatingAdmissionPolicyList) Reset() { *m = MutatingAdmissionPolicyList{} } -var xxx_messageInfo_ParamRef proto.InternalMessageInfo +func (m *MutatingAdmissionPolicySpec) Reset() { *m = MutatingAdmissionPolicySpec{} } -func (m *TypeChecking) Reset() { *m = TypeChecking{} } -func (*TypeChecking) ProtoMessage() {} -func (*TypeChecking) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{16} -} -func (m *TypeChecking) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TypeChecking) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TypeChecking) XXX_Merge(src proto.Message) { - xxx_messageInfo_TypeChecking.Merge(m, src) -} -func (m *TypeChecking) XXX_Size() int { - return m.Size() -} -func (m *TypeChecking) XXX_DiscardUnknown() { - xxx_messageInfo_TypeChecking.DiscardUnknown(m) -} +func (m *Mutation) Reset() { *m = Mutation{} } -var xxx_messageInfo_TypeChecking proto.InternalMessageInfo +func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } -func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } -func (*ValidatingAdmissionPolicy) ProtoMessage() {} -func (*ValidatingAdmissionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{17} -} -func (m *ValidatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicy.Merge(m, src) -} -func (m *ValidatingAdmissionPolicy) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicy.DiscardUnknown(m) -} +func (m *ParamKind) Reset() { *m = ParamKind{} } -var xxx_messageInfo_ValidatingAdmissionPolicy proto.InternalMessageInfo +func (m *ParamRef) Reset() { *m = ParamRef{} } -func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } -func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} -func (*ValidatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{18} -} -func (m *ValidatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicyBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicyBinding) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicyBinding.Merge(m, src) -} -func (m *ValidatingAdmissionPolicyBinding) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicyBinding) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicyBinding.DiscardUnknown(m) -} +func (m *TypeChecking) Reset() { *m = TypeChecking{} } -var xxx_messageInfo_ValidatingAdmissionPolicyBinding proto.InternalMessageInfo +func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } -func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } -func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} -func (*ValidatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{19} -} -func (m *ValidatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicyBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicyBindingList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicyBindingList.Merge(m, src) -} -func (m *ValidatingAdmissionPolicyBindingList) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicyBindingList) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicyBindingList.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatingAdmissionPolicyBindingList proto.InternalMessageInfo - -func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } -func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} -func (*ValidatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{20} -} -func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.Merge(m, src) -} -func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicyBindingSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec proto.InternalMessageInfo - -func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } -func (*ValidatingAdmissionPolicyList) ProtoMessage() {} -func (*ValidatingAdmissionPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{21} -} -func (m *ValidatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicyList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicyList.Merge(m, src) -} -func (m *ValidatingAdmissionPolicyList) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicyList) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicyList.DiscardUnknown(m) -} +func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } -var xxx_messageInfo_ValidatingAdmissionPolicyList proto.InternalMessageInfo - -func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } -func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} -func (*ValidatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{22} -} -func (m *ValidatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicySpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicySpec.Merge(m, src) -} -func (m *ValidatingAdmissionPolicySpec) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicySpec) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicySpec.DiscardUnknown(m) -} +func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } -var xxx_messageInfo_ValidatingAdmissionPolicySpec proto.InternalMessageInfo +func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } -func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } -func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} -func (*ValidatingAdmissionPolicyStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{23} -} -func (m *ValidatingAdmissionPolicyStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicyStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicyStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicyStatus.Merge(m, src) -} -func (m *ValidatingAdmissionPolicyStatus) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicyStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicyStatus.DiscardUnknown(m) -} +func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } -var xxx_messageInfo_ValidatingAdmissionPolicyStatus proto.InternalMessageInfo +func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } -func (m *Validation) Reset() { *m = Validation{} } -func (*Validation) ProtoMessage() {} -func (*Validation) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{24} -} -func (m *Validation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Validation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Validation) XXX_Merge(src proto.Message) { - xxx_messageInfo_Validation.Merge(m, src) -} -func (m *Validation) XXX_Size() int { - return m.Size() -} -func (m *Validation) XXX_DiscardUnknown() { - xxx_messageInfo_Validation.DiscardUnknown(m) -} +func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } -var xxx_messageInfo_Validation proto.InternalMessageInfo +func (m *Validation) Reset() { *m = Validation{} } -func (m *Variable) Reset() { *m = Variable{} } -func (*Variable) ProtoMessage() {} -func (*Variable) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{25} -} -func (m *Variable) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Variable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Variable) XXX_Merge(src proto.Message) { - xxx_messageInfo_Variable.Merge(m, src) -} -func (m *Variable) XXX_Size() int { - return m.Size() -} -func (m *Variable) XXX_DiscardUnknown() { - xxx_messageInfo_Variable.DiscardUnknown(m) -} - -var xxx_messageInfo_Variable proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ApplyConfiguration)(nil), "k8s.io.api.admissionregistration.v1alpha1.ApplyConfiguration") - proto.RegisterType((*AuditAnnotation)(nil), "k8s.io.api.admissionregistration.v1alpha1.AuditAnnotation") - proto.RegisterType((*ExpressionWarning)(nil), "k8s.io.api.admissionregistration.v1alpha1.ExpressionWarning") - proto.RegisterType((*JSONPatch)(nil), "k8s.io.api.admissionregistration.v1alpha1.JSONPatch") - proto.RegisterType((*MatchCondition)(nil), "k8s.io.api.admissionregistration.v1alpha1.MatchCondition") - proto.RegisterType((*MatchResources)(nil), "k8s.io.api.admissionregistration.v1alpha1.MatchResources") - proto.RegisterType((*MutatingAdmissionPolicy)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy") - proto.RegisterType((*MutatingAdmissionPolicyBinding)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding") - proto.RegisterType((*MutatingAdmissionPolicyBindingList)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingList") - proto.RegisterType((*MutatingAdmissionPolicyBindingSpec)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingSpec") - proto.RegisterType((*MutatingAdmissionPolicyList)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyList") - proto.RegisterType((*MutatingAdmissionPolicySpec)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicySpec") - proto.RegisterType((*Mutation)(nil), "k8s.io.api.admissionregistration.v1alpha1.Mutation") - proto.RegisterType((*NamedRuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1alpha1.NamedRuleWithOperations") - proto.RegisterType((*ParamKind)(nil), "k8s.io.api.admissionregistration.v1alpha1.ParamKind") - proto.RegisterType((*ParamRef)(nil), "k8s.io.api.admissionregistration.v1alpha1.ParamRef") - proto.RegisterType((*TypeChecking)(nil), "k8s.io.api.admissionregistration.v1alpha1.TypeChecking") - proto.RegisterType((*ValidatingAdmissionPolicy)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy") - proto.RegisterType((*ValidatingAdmissionPolicyBinding)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding") - proto.RegisterType((*ValidatingAdmissionPolicyBindingList)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingList") - proto.RegisterType((*ValidatingAdmissionPolicyBindingSpec)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingSpec") - proto.RegisterType((*ValidatingAdmissionPolicyList)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyList") - proto.RegisterType((*ValidatingAdmissionPolicySpec)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicySpec") - proto.RegisterType((*ValidatingAdmissionPolicyStatus)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyStatus") - proto.RegisterType((*Validation)(nil), "k8s.io.api.admissionregistration.v1alpha1.Validation") - proto.RegisterType((*Variable)(nil), "k8s.io.api.admissionregistration.v1alpha1.Variable") -} - -func init() { - proto.RegisterFile("k8s.io/api/admissionregistration/v1alpha1/generated.proto", fileDescriptor_2c49182728ae0af5) -} - -var fileDescriptor_2c49182728ae0af5 = []byte{ - // 1783 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xdd, 0x6f, 0x1b, 0x4b, - 0x15, 0xcf, 0xda, 0xce, 0x87, 0xc7, 0xf9, 0xf2, 0xd0, 0x12, 0x37, 0xa5, 0xde, 0x68, 0x55, 0xa1, - 0x46, 0x82, 0x35, 0x49, 0x0b, 0xa5, 0x55, 0x51, 0x95, 0x6d, 0x9b, 0xb6, 0x69, 0x9d, 0x44, 0x53, - 0x94, 0x20, 0x04, 0x12, 0x93, 0xf5, 0xc4, 0xde, 0xc6, 0xfb, 0xc1, 0xce, 0x3a, 0x34, 0x02, 0x89, - 0x4a, 0x08, 0x09, 0xde, 0x78, 0xe0, 0x85, 0x37, 0xc4, 0x1f, 0xc0, 0x03, 0xfc, 0x05, 0xbc, 0xf5, - 0xb1, 0x8f, 0xe5, 0x81, 0x15, 0x35, 0x20, 0xf1, 0x0c, 0xd2, 0xbd, 0x52, 0x5e, 0xee, 0xd5, 0xcc, - 0xce, 0x7e, 0x79, 0xed, 0xc6, 0x4e, 0xd3, 0xf4, 0xe1, 0xde, 0x37, 0xcf, 0xf9, 0xf8, 0x9d, 0x39, - 0x67, 0xce, 0x9c, 0x39, 0xc7, 0x0b, 0x6e, 0x1d, 0x7c, 0x97, 0xaa, 0x86, 0x5d, 0xc3, 0x8e, 0x51, - 0xc3, 0x0d, 0xd3, 0xa0, 0xd4, 0xb0, 0x2d, 0x97, 0x34, 0x0d, 0xea, 0xb9, 0xd8, 0x33, 0x6c, 0xab, - 0x76, 0xb8, 0x82, 0xdb, 0x4e, 0x0b, 0xaf, 0xd4, 0x9a, 0xc4, 0x22, 0x2e, 0xf6, 0x48, 0x43, 0x75, - 0x5c, 0xdb, 0xb3, 0xe1, 0x72, 0xa0, 0xaa, 0x62, 0xc7, 0x50, 0xfb, 0xaa, 0xaa, 0xa1, 0xea, 0xe2, - 0x37, 0x9b, 0x86, 0xd7, 0xea, 0xec, 0xa9, 0xba, 0x6d, 0xd6, 0x9a, 0x76, 0xd3, 0xae, 0x71, 0x84, - 0xbd, 0xce, 0x3e, 0x5f, 0xf1, 0x05, 0xff, 0x15, 0x20, 0x2f, 0x5e, 0x1f, 0x62, 0x53, 0xbd, 0xdb, - 0x59, 0xbc, 0x11, 0x2b, 0x99, 0x58, 0x6f, 0x19, 0x16, 0x71, 0x8f, 0x6a, 0xce, 0x41, 0x93, 0x11, - 0x68, 0xcd, 0x24, 0x1e, 0xee, 0xa7, 0x55, 0x1b, 0xa4, 0xe5, 0x76, 0x2c, 0xcf, 0x30, 0x49, 0x46, - 0xe1, 0x3b, 0x27, 0x29, 0x50, 0xbd, 0x45, 0x4c, 0xdc, 0xab, 0xa7, 0x3c, 0x02, 0x70, 0xcd, 0x71, - 0xda, 0x47, 0xf7, 0x6c, 0x6b, 0xdf, 0x68, 0x76, 0x02, 0x3f, 0xe0, 0x2a, 0x00, 0xe4, 0x85, 0xe3, - 0x12, 0xee, 0x61, 0x45, 0x5a, 0x92, 0xae, 0x15, 0x35, 0xf8, 0xca, 0x97, 0xc7, 0xba, 0xbe, 0x0c, - 0x1e, 0x44, 0x1c, 0x94, 0x90, 0x52, 0x28, 0x98, 0x5b, 0xeb, 0x34, 0x0c, 0x6f, 0xcd, 0xb2, 0x6c, - 0x2f, 0x80, 0xb9, 0x02, 0xf2, 0x07, 0xe4, 0x48, 0xe8, 0x97, 0x84, 0x7e, 0xfe, 0x09, 0x39, 0x42, - 0x8c, 0x0e, 0xd7, 0xc0, 0xdc, 0x21, 0x6e, 0x77, 0x48, 0x0c, 0x58, 0xc9, 0x71, 0xd1, 0x05, 0x21, - 0x3a, 0xb7, 0x93, 0x66, 0xa3, 0x5e, 0x79, 0xa5, 0x0d, 0xca, 0xf1, 0x6a, 0x17, 0xbb, 0x96, 0x61, - 0x35, 0xe1, 0x37, 0xc0, 0xd4, 0xbe, 0x41, 0xda, 0x0d, 0x44, 0xf6, 0x05, 0xe0, 0xbc, 0x00, 0x9c, - 0x5a, 0x17, 0x74, 0x14, 0x49, 0xc0, 0x65, 0x30, 0xf9, 0xb3, 0x40, 0xb1, 0x92, 0xe7, 0xc2, 0x73, - 0x42, 0x78, 0x52, 0xe0, 0xa1, 0x90, 0xaf, 0xdc, 0x05, 0xc5, 0x8d, 0x67, 0x5b, 0x9b, 0xdb, 0xd8, - 0xd3, 0x5b, 0xa7, 0x8a, 0xd1, 0x3e, 0x98, 0xad, 0x33, 0xe5, 0x7b, 0xb6, 0xd5, 0x30, 0x78, 0x88, - 0x96, 0x40, 0xc1, 0xc2, 0x26, 0x11, 0xfa, 0xd3, 0x42, 0xbf, 0xb0, 0x89, 0x4d, 0x82, 0x38, 0xa7, - 0xc7, 0x4e, 0x6e, 0x28, 0x3b, 0x7f, 0x2f, 0x08, 0x43, 0x88, 0x50, 0xbb, 0xe3, 0xea, 0x84, 0xc2, - 0x17, 0xa0, 0xcc, 0xe0, 0xa8, 0x83, 0x75, 0xf2, 0x8c, 0xb4, 0x89, 0xee, 0xd9, 0x2e, 0xb7, 0x5a, - 0x5a, 0xbd, 0xae, 0xc6, 0x57, 0x26, 0x4a, 0x1e, 0xd5, 0x39, 0x68, 0x32, 0x02, 0x55, 0x59, 0x8e, - 0xaa, 0x87, 0x2b, 0xea, 0x53, 0xbc, 0x47, 0xda, 0xa1, 0xaa, 0x76, 0xb1, 0xeb, 0xcb, 0xe5, 0xcd, - 0x5e, 0x44, 0x94, 0x35, 0x02, 0x6d, 0x30, 0x6b, 0xef, 0x3d, 0x27, 0xba, 0x17, 0x99, 0xcd, 0x9d, - 0xde, 0x2c, 0xec, 0xfa, 0xf2, 0xec, 0x56, 0x0a, 0x0e, 0xf5, 0xc0, 0xc3, 0x5f, 0x82, 0x19, 0x57, - 0xf8, 0x8d, 0x3a, 0x6d, 0x42, 0x2b, 0xf9, 0xa5, 0xfc, 0xb5, 0xd2, 0xaa, 0xa6, 0x0e, 0x5d, 0x19, - 0x54, 0xe6, 0x58, 0x83, 0x29, 0xef, 0x1a, 0x5e, 0x6b, 0xcb, 0x21, 0x01, 0x9f, 0x6a, 0x17, 0x45, - 0xe0, 0x67, 0x50, 0xd2, 0x00, 0x4a, 0xdb, 0x83, 0xbf, 0x97, 0xc0, 0x05, 0xf2, 0x42, 0x6f, 0x77, - 0x1a, 0x24, 0x25, 0x57, 0x29, 0x9c, 0xd9, 0x46, 0xbe, 0x26, 0x36, 0x72, 0xe1, 0x41, 0x1f, 0x3b, - 0xa8, 0xaf, 0x75, 0x78, 0x1f, 0x94, 0x4c, 0x96, 0x14, 0xdb, 0x76, 0xdb, 0xd0, 0x8f, 0x2a, 0x93, - 0x3c, 0x95, 0x94, 0xae, 0x2f, 0x97, 0xea, 0x31, 0xf9, 0xd8, 0x97, 0xe7, 0x12, 0xcb, 0xef, 0x1f, - 0x39, 0x04, 0x25, 0xd5, 0x94, 0xff, 0x48, 0x60, 0xa1, 0xde, 0x61, 0x37, 0xdc, 0x6a, 0xae, 0x85, - 0x9b, 0x0f, 0x78, 0xf0, 0x27, 0x60, 0x8a, 0x1d, 0x5b, 0x03, 0x7b, 0x58, 0xe4, 0xd6, 0xb7, 0x86, - 0x3b, 0xe4, 0xe0, 0x44, 0xeb, 0xc4, 0xc3, 0x71, 0x6e, 0xc7, 0x34, 0x14, 0xa1, 0xc2, 0x16, 0x28, - 0x50, 0x87, 0xe8, 0x22, 0x85, 0xd6, 0x47, 0x88, 0xe4, 0x80, 0x3d, 0x3f, 0x73, 0x88, 0x1e, 0xdf, - 0x3b, 0xb6, 0x42, 0xdc, 0x82, 0xf2, 0x7f, 0x09, 0x54, 0x07, 0xe8, 0x68, 0x86, 0xd5, 0x60, 0x85, - 0xe6, 0xc3, 0xbb, 0x6b, 0xa7, 0xdc, 0xad, 0xbf, 0xbf, 0xbb, 0x62, 0xeb, 0x03, 0xbd, 0xfe, 0x9f, - 0x04, 0x94, 0x77, 0xab, 0x3e, 0x35, 0xa8, 0x07, 0x7f, 0x94, 0xf1, 0x5c, 0x1d, 0xf2, 0x36, 0x1b, - 0x34, 0xf0, 0x3b, 0x2a, 0xc9, 0x21, 0x25, 0xe1, 0xb5, 0x05, 0xc6, 0x0d, 0x8f, 0x98, 0xb4, 0x92, - 0xe3, 0xf7, 0xe5, 0xf1, 0x99, 0xb9, 0xad, 0xcd, 0x08, 0xab, 0xe3, 0x8f, 0x19, 0x3e, 0x0a, 0xcc, - 0x28, 0x7f, 0xce, 0x9d, 0xe4, 0x34, 0x8b, 0x10, 0xab, 0xc4, 0x0e, 0x27, 0x6e, 0xc6, 0x15, 0x3b, - 0x3a, 0xbe, 0xed, 0x88, 0x83, 0x12, 0x52, 0xf0, 0xc7, 0x60, 0xca, 0xc1, 0x2e, 0x36, 0xc3, 0xb7, - 0x28, 0x5d, 0xf6, 0x4e, 0xf2, 0x66, 0x5b, 0xa8, 0x6a, 0xd3, 0x2c, 0x52, 0xe1, 0x0a, 0x45, 0x90, - 0xb0, 0x03, 0x66, 0xcd, 0x54, 0x9d, 0xe7, 0x6f, 0x58, 0x69, 0xf5, 0xd6, 0x28, 0x21, 0x4b, 0x01, - 0x04, 0x15, 0x36, 0x4d, 0x43, 0x3d, 0x46, 0x94, 0x7f, 0x4b, 0xe0, 0xf2, 0x80, 0x80, 0x9d, 0x43, - 0x7a, 0x34, 0xd3, 0xe9, 0xa1, 0x9d, 0x41, 0x7a, 0xf4, 0xcf, 0x8b, 0x3f, 0x4e, 0x0c, 0x74, 0x93, - 0x27, 0x04, 0x06, 0x45, 0x7e, 0x12, 0x4f, 0x0c, 0xab, 0x21, 0xfc, 0xbc, 0x31, 0xea, 0xe9, 0x32, - 0x5d, 0x6d, 0xa6, 0xeb, 0xcb, 0xc5, 0x68, 0x89, 0x62, 0x54, 0xf8, 0x73, 0x30, 0x6f, 0x8a, 0x8e, - 0x81, 0x01, 0x18, 0x96, 0x47, 0x45, 0x1e, 0xbd, 0xc7, 0x11, 0x5f, 0xe8, 0xfa, 0xf2, 0x7c, 0xbd, - 0x07, 0x16, 0x65, 0x0c, 0xc1, 0x06, 0x28, 0x1e, 0x62, 0xd7, 0xc0, 0x7b, 0xf1, 0x23, 0x3a, 0x4a, - 0xf6, 0xee, 0x08, 0x5d, 0xad, 0x2c, 0xa2, 0x5b, 0x0c, 0x29, 0x14, 0xc5, 0xc0, 0xcc, 0x8a, 0xd9, - 0x09, 0x3a, 0xc6, 0xf0, 0x85, 0xbc, 0x3e, 0xf2, 0x91, 0xda, 0x56, 0x6c, 0x25, 0xa4, 0x50, 0x14, - 0x03, 0xc3, 0xa7, 0x60, 0x66, 0x1f, 0x1b, 0xed, 0x8e, 0x4b, 0xc4, 0xf3, 0x37, 0xce, 0xef, 0xef, - 0xd7, 0xd9, 0x63, 0xbe, 0x9e, 0x64, 0x1c, 0xfb, 0x72, 0x39, 0x45, 0xe0, 0x4f, 0x60, 0x5a, 0x19, - 0xfe, 0x02, 0xcc, 0x99, 0xa9, 0x46, 0x8e, 0x56, 0x26, 0xf8, 0xce, 0x47, 0x3e, 0x95, 0x08, 0x21, - 0xee, 0x7a, 0xd3, 0x74, 0x8a, 0x7a, 0x4d, 0xc1, 0xdf, 0x48, 0x00, 0xba, 0xc4, 0xb0, 0x0e, 0x6d, - 0x9d, 0x43, 0xa6, 0x1e, 0xf4, 0x1f, 0x08, 0x18, 0x88, 0x32, 0x12, 0xc7, 0xbe, 0x7c, 0x7b, 0x88, - 0x19, 0x46, 0xcd, 0x6a, 0xf2, 0x18, 0xf4, 0xb1, 0xa9, 0xfc, 0x35, 0x07, 0xa6, 0xc2, 0x78, 0xc3, - 0x3b, 0xec, 0x3e, 0x78, 0x7a, 0x8b, 0x49, 0x8b, 0x4e, 0xb5, 0x1a, 0x1e, 0xca, 0x76, 0xc8, 0x38, - 0x4e, 0x2e, 0x50, 0xac, 0x00, 0x7f, 0x2d, 0x01, 0x88, 0x33, 0xb3, 0x88, 0x28, 0x68, 0xdf, 0x1b, - 0x21, 0xae, 0xd9, 0x81, 0x46, 0xfb, 0x2a, 0x0b, 0x48, 0x96, 0x8e, 0xfa, 0x18, 0x64, 0xb7, 0xfa, - 0x39, 0xb5, 0x2d, 0xbe, 0xc7, 0x4a, 0x61, 0xe4, 0x5b, 0x1d, 0x4d, 0x08, 0xc1, 0xad, 0x8e, 0x96, - 0x28, 0x46, 0x55, 0xde, 0x48, 0x60, 0x61, 0x40, 0x67, 0x07, 0x6f, 0xc6, 0xdd, 0x2b, 0x6f, 0xaf, - 0x2b, 0xd2, 0x52, 0xfe, 0x5a, 0x51, 0x2b, 0x27, 0xbb, 0x4e, 0xce, 0x40, 0x69, 0x39, 0xf8, 0x2b, - 0x96, 0x15, 0x19, 0x3c, 0x51, 0x2d, 0x6e, 0x0e, 0xe3, 0x81, 0xda, 0xa7, 0xd1, 0x5c, 0x8c, 0xd2, - 0x29, 0xc3, 0x43, 0x7d, 0xcc, 0x29, 0x18, 0xc4, 0x85, 0x8c, 0xbd, 0x98, 0xd8, 0x31, 0x76, 0x88, - 0xdb, 0x6f, 0x46, 0x5a, 0xdb, 0x7e, 0x2c, 0x38, 0x28, 0x21, 0xc5, 0x26, 0xa2, 0x03, 0x56, 0x4f, - 0x73, 0xe9, 0x89, 0x88, 0x17, 0x46, 0xce, 0x51, 0xfe, 0x92, 0x03, 0xd1, 0x5b, 0x38, 0xc4, 0x00, - 0x55, 0x03, 0xc5, 0x68, 0x28, 0x11, 0xa8, 0x51, 0xa9, 0x88, 0x06, 0x18, 0x14, 0xcb, 0xb0, 0x37, - 0x9b, 0x86, 0xa3, 0x4a, 0xfe, 0xf4, 0xa3, 0x0a, 0x7f, 0xb3, 0xa3, 0x21, 0x25, 0x82, 0x84, 0x1e, - 0x58, 0xe0, 0xf5, 0x9d, 0x78, 0xc4, 0xdd, 0xb4, 0xbd, 0x75, 0xbb, 0x63, 0x35, 0xd6, 0x74, 0x9e, - 0xeb, 0x05, 0xbe, 0xbb, 0xdb, 0x5d, 0x5f, 0x5e, 0xd8, 0xee, 0x2f, 0x72, 0xec, 0xcb, 0x97, 0x07, - 0xb0, 0xf8, 0x7d, 0x1a, 0x04, 0xad, 0xfc, 0x41, 0x02, 0xd3, 0x4c, 0xe2, 0x5e, 0x8b, 0xe8, 0x07, - 0xac, 0x79, 0x65, 0x45, 0x84, 0xf4, 0xce, 0xce, 0x41, 0xb6, 0x95, 0x56, 0xef, 0x8c, 0x90, 0xf0, - 0x99, 0x01, 0x3c, 0xce, 0x99, 0x0c, 0x8b, 0xa2, 0x3e, 0x36, 0x95, 0x7f, 0xe4, 0xc0, 0xa5, 0x1d, - 0xdc, 0x36, 0x1a, 0x1f, 0x69, 0xa8, 0x78, 0x9e, 0xea, 0xb2, 0x1f, 0x8d, 0xf4, 0xc4, 0x0d, 0xd8, - 0xf5, 0xa0, 0x06, 0x1b, 0xba, 0x60, 0x82, 0x7a, 0xd8, 0xeb, 0x84, 0x9d, 0xda, 0xc6, 0x99, 0x58, - 0xe3, 0x88, 0xda, 0xac, 0xb0, 0x37, 0x11, 0xac, 0x91, 0xb0, 0xa4, 0x7c, 0x2a, 0x81, 0xa5, 0x81, - 0xba, 0xe7, 0x37, 0xcc, 0xfc, 0x34, 0x15, 0xe6, 0xad, 0xb3, 0x70, 0xfc, 0xa4, 0x71, 0xe6, 0x13, - 0x09, 0x5c, 0x3d, 0x49, 0xf9, 0x1c, 0x3a, 0x56, 0x27, 0xdd, 0xb1, 0x3e, 0x39, 0x43, 0xd7, 0x07, - 0xb4, 0xae, 0xbf, 0xcd, 0x9f, 0xec, 0xf8, 0x97, 0x43, 0x4d, 0xea, 0x1f, 0xb2, 0x5d, 0x50, 0x3e, - 0x14, 0x11, 0xb3, 0xad, 0xa0, 0x6a, 0x06, 0xfd, 0x68, 0x51, 0x5b, 0xee, 0xfa, 0x72, 0x79, 0xa7, - 0x97, 0x79, 0xec, 0xcb, 0xf3, 0xbd, 0x44, 0x94, 0xc5, 0x50, 0xfe, 0x2b, 0x81, 0x2b, 0x03, 0xcf, - 0xe2, 0x1c, 0xb2, 0xcf, 0x48, 0x67, 0xdf, 0xfd, 0x33, 0xc9, 0xbe, 0xfe, 0x69, 0xf7, 0xa7, 0x89, - 0x77, 0xb8, 0xfa, 0x85, 0x98, 0x99, 0xda, 0xa0, 0x14, 0x67, 0x40, 0x38, 0x35, 0x7d, 0xfb, 0x14, - 0x21, 0xb7, 0x2d, 0xed, 0x2b, 0x22, 0xc6, 0xa5, 0x98, 0x46, 0x51, 0x12, 0x3e, 0x3b, 0xd5, 0x14, - 0xde, 0x67, 0xaa, 0x79, 0x29, 0x81, 0x79, 0x9c, 0xfe, 0x0f, 0x9f, 0x56, 0xc6, 0xb9, 0x07, 0xb7, - 0x47, 0xe9, 0xbf, 0xd3, 0x10, 0x5a, 0x45, 0xb8, 0x31, 0xdf, 0xc3, 0xa0, 0x28, 0x63, 0xed, 0x23, - 0x0f, 0x56, 0xa9, 0x81, 0x77, 0xf2, 0x03, 0x0d, 0xbc, 0xca, 0xdf, 0x72, 0x40, 0x3e, 0xe1, 0x29, - 0x87, 0x1b, 0x00, 0xda, 0x7b, 0x94, 0xb8, 0x87, 0xa4, 0xf1, 0x30, 0xf8, 0x64, 0x13, 0x76, 0xd0, - 0xf9, 0xb8, 0xbd, 0xda, 0xca, 0x48, 0xa0, 0x3e, 0x5a, 0xd0, 0x04, 0xd3, 0x5e, 0xa2, 0xf3, 0x1b, - 0x65, 0x22, 0x10, 0x8e, 0x25, 0x1b, 0x47, 0x6d, 0xbe, 0xeb, 0xcb, 0xa9, 0x56, 0x12, 0xa5, 0xe0, - 0xa1, 0x0e, 0x80, 0x1e, 0x9f, 0x5e, 0x70, 0x01, 0x6a, 0xc3, 0x95, 0xb3, 0xf8, 0xcc, 0xa2, 0x27, - 0x28, 0x71, 0x5c, 0x09, 0x58, 0xe5, 0x33, 0x09, 0x80, 0xf8, 0x56, 0xc0, 0xab, 0x20, 0xf1, 0x29, - 0x44, 0xbc, 0x62, 0x05, 0x06, 0x81, 0x12, 0x74, 0xb8, 0x0c, 0x26, 0x4d, 0x42, 0x29, 0x6e, 0x86, - 0x73, 0x40, 0xf4, 0xa9, 0xa7, 0x1e, 0x90, 0x51, 0xc8, 0x87, 0xbb, 0x60, 0xc2, 0x25, 0x98, 0x8a, - 0xf9, 0xb3, 0xa8, 0xdd, 0x65, 0x6d, 0x15, 0xe2, 0x94, 0x63, 0x5f, 0x5e, 0x19, 0xe6, 0xa3, 0x9e, - 0x2a, 0xba, 0x30, 0xae, 0x84, 0x04, 0x1c, 0x7c, 0x08, 0xca, 0xc2, 0x46, 0x62, 0xc3, 0xc1, 0xad, - 0xbd, 0x24, 0x76, 0x53, 0xae, 0xf7, 0x0a, 0xa0, 0xac, 0x8e, 0xb2, 0x01, 0xa6, 0xc2, 0xec, 0x82, - 0x15, 0x50, 0x48, 0x3c, 0xdf, 0x81, 0xe3, 0x9c, 0xd2, 0x13, 0x98, 0x5c, 0xff, 0xc0, 0x68, 0x5b, - 0xaf, 0xde, 0x56, 0xc7, 0x5e, 0xbf, 0xad, 0x8e, 0xbd, 0x79, 0x5b, 0x1d, 0x7b, 0xd9, 0xad, 0x4a, - 0xaf, 0xba, 0x55, 0xe9, 0x75, 0xb7, 0x2a, 0xbd, 0xe9, 0x56, 0xa5, 0x7f, 0x76, 0xab, 0xd2, 0xef, - 0xfe, 0x55, 0x1d, 0xfb, 0xe1, 0xf2, 0xd0, 0x1f, 0x65, 0x3f, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xac, - 0xc8, 0x8c, 0x78, 0xc0, 0x1d, 0x00, 0x00, -} +func (m *Variable) Reset() { *m = Variable{} } func (m *ApplyConfiguration) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.protomessage.pb.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..651a01f0b395f --- /dev/null +++ b/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.protomessage.pb.go @@ -0,0 +1,74 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1alpha1 + +func (*ApplyConfiguration) ProtoMessage() {} + +func (*AuditAnnotation) ProtoMessage() {} + +func (*ExpressionWarning) ProtoMessage() {} + +func (*JSONPatch) ProtoMessage() {} + +func (*MatchCondition) ProtoMessage() {} + +func (*MatchResources) ProtoMessage() {} + +func (*MutatingAdmissionPolicy) ProtoMessage() {} + +func (*MutatingAdmissionPolicyBinding) ProtoMessage() {} + +func (*MutatingAdmissionPolicyBindingList) ProtoMessage() {} + +func (*MutatingAdmissionPolicyBindingSpec) ProtoMessage() {} + +func (*MutatingAdmissionPolicyList) ProtoMessage() {} + +func (*MutatingAdmissionPolicySpec) ProtoMessage() {} + +func (*Mutation) ProtoMessage() {} + +func (*NamedRuleWithOperations) ProtoMessage() {} + +func (*ParamKind) ProtoMessage() {} + +func (*ParamRef) ProtoMessage() {} + +func (*TypeChecking) ProtoMessage() {} + +func (*ValidatingAdmissionPolicy) ProtoMessage() {} + +func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} + +func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} + +func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} + +func (*ValidatingAdmissionPolicyList) ProtoMessage() {} + +func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} + +func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} + +func (*Validation) ProtoMessage() {} + +func (*Variable) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/types.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/types.go index f183498a5540e..459f7944c7b2c 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/types.go +++ b/staging/src/k8s.io/api/admissionregistration/v1alpha1/types.go @@ -930,7 +930,8 @@ type JSONPatch struct { Expression string `json:"expression,omitempty" protobuf:"bytes,1,opt,name=expression"` } -// ReinvocationPolicyType specifies what type of policy the admission mutation uses. +// ReinvocationPolicyType specifies what type of policy is used when other admission plugins also perform +// modifications. // +enum type ReinvocationPolicyType = v1.ReinvocationPolicyType diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.model_name.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.model_name.go new file mode 100644 index 0000000000000..ea43d464905d2 --- /dev/null +++ b/staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.model_name.go @@ -0,0 +1,152 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1alpha1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ApplyConfiguration) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.ApplyConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AuditAnnotation) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExpressionWarning) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.ExpressionWarning" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JSONPatch) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.JSONPatch" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MatchCondition) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.MatchCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MatchResources) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.MatchResources" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingAdmissionPolicy) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingAdmissionPolicyBinding) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingAdmissionPolicyBindingList) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingAdmissionPolicyBindingSpec) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingAdmissionPolicyList) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingAdmissionPolicySpec) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicySpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Mutation) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.Mutation" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NamedRuleWithOperations) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.NamedRuleWithOperations" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ParamKind) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.ParamKind" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ParamRef) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.ParamRef" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TypeChecking) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.TypeChecking" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicy) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicyBinding) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicyBindingList) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicyBindingSpec) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicyList) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicySpec) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicySpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicyStatus) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Validation) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.Validation" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Variable) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1alpha1.Variable" +} diff --git a/staging/src/k8s.io/api/admissionregistration/v1beta1/doc.go b/staging/src/k8s.io/api/admissionregistration/v1beta1/doc.go index 40d8315738ec5..016a81fa85e21 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1beta1/doc.go +++ b/staging/src/k8s.io/api/admissionregistration/v1beta1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.admissionregistration.v1beta1 + // +groupName=admissionregistration.k8s.io // Package v1beta1 is the v1beta1 version of the API. diff --git a/staging/src/k8s.io/api/admissionregistration/v1beta1/generated.pb.go b/staging/src/k8s.io/api/admissionregistration/v1beta1/generated.pb.go index bf1ae594882de..8e79eae397888 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/admissionregistration/v1beta1/generated.pb.go @@ -24,1164 +24,83 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" k8s_io_api_admissionregistration_v1 "k8s.io/api/admissionregistration/v1" v11 "k8s.io/api/admissionregistration/v1" k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ApplyConfiguration) Reset() { *m = ApplyConfiguration{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } -func (m *ApplyConfiguration) Reset() { *m = ApplyConfiguration{} } -func (*ApplyConfiguration) ProtoMessage() {} -func (*ApplyConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{0} -} -func (m *ApplyConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ApplyConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ApplyConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_ApplyConfiguration.Merge(m, src) -} -func (m *ApplyConfiguration) XXX_Size() int { - return m.Size() -} -func (m *ApplyConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_ApplyConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_ApplyConfiguration proto.InternalMessageInfo - -func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } -func (*AuditAnnotation) ProtoMessage() {} -func (*AuditAnnotation) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{1} -} -func (m *AuditAnnotation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuditAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AuditAnnotation) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuditAnnotation.Merge(m, src) -} -func (m *AuditAnnotation) XXX_Size() int { - return m.Size() -} -func (m *AuditAnnotation) XXX_DiscardUnknown() { - xxx_messageInfo_AuditAnnotation.DiscardUnknown(m) -} - -var xxx_messageInfo_AuditAnnotation proto.InternalMessageInfo - -func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } -func (*ExpressionWarning) ProtoMessage() {} -func (*ExpressionWarning) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{2} -} -func (m *ExpressionWarning) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExpressionWarning) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExpressionWarning) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExpressionWarning.Merge(m, src) -} -func (m *ExpressionWarning) XXX_Size() int { - return m.Size() -} -func (m *ExpressionWarning) XXX_DiscardUnknown() { - xxx_messageInfo_ExpressionWarning.DiscardUnknown(m) -} - -var xxx_messageInfo_ExpressionWarning proto.InternalMessageInfo - -func (m *JSONPatch) Reset() { *m = JSONPatch{} } -func (*JSONPatch) ProtoMessage() {} -func (*JSONPatch) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{3} -} -func (m *JSONPatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONPatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JSONPatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONPatch.Merge(m, src) -} -func (m *JSONPatch) XXX_Size() int { - return m.Size() -} -func (m *JSONPatch) XXX_DiscardUnknown() { - xxx_messageInfo_JSONPatch.DiscardUnknown(m) -} - -var xxx_messageInfo_JSONPatch proto.InternalMessageInfo - -func (m *MatchCondition) Reset() { *m = MatchCondition{} } -func (*MatchCondition) ProtoMessage() {} -func (*MatchCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{4} -} -func (m *MatchCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MatchCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MatchCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_MatchCondition.Merge(m, src) -} -func (m *MatchCondition) XXX_Size() int { - return m.Size() -} -func (m *MatchCondition) XXX_DiscardUnknown() { - xxx_messageInfo_MatchCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_MatchCondition proto.InternalMessageInfo - -func (m *MatchResources) Reset() { *m = MatchResources{} } -func (*MatchResources) ProtoMessage() {} -func (*MatchResources) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{5} -} -func (m *MatchResources) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MatchResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MatchResources) XXX_Merge(src proto.Message) { - xxx_messageInfo_MatchResources.Merge(m, src) -} -func (m *MatchResources) XXX_Size() int { - return m.Size() -} -func (m *MatchResources) XXX_DiscardUnknown() { - xxx_messageInfo_MatchResources.DiscardUnknown(m) -} - -var xxx_messageInfo_MatchResources proto.InternalMessageInfo - -func (m *MutatingAdmissionPolicy) Reset() { *m = MutatingAdmissionPolicy{} } -func (*MutatingAdmissionPolicy) ProtoMessage() {} -func (*MutatingAdmissionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{6} -} -func (m *MutatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingAdmissionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingAdmissionPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingAdmissionPolicy.Merge(m, src) -} -func (m *MutatingAdmissionPolicy) XXX_Size() int { - return m.Size() -} -func (m *MutatingAdmissionPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingAdmissionPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingAdmissionPolicy proto.InternalMessageInfo - -func (m *MutatingAdmissionPolicyBinding) Reset() { *m = MutatingAdmissionPolicyBinding{} } -func (*MutatingAdmissionPolicyBinding) ProtoMessage() {} -func (*MutatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{7} -} -func (m *MutatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingAdmissionPolicyBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingAdmissionPolicyBinding) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingAdmissionPolicyBinding.Merge(m, src) -} -func (m *MutatingAdmissionPolicyBinding) XXX_Size() int { - return m.Size() -} -func (m *MutatingAdmissionPolicyBinding) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingAdmissionPolicyBinding.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingAdmissionPolicyBinding proto.InternalMessageInfo - -func (m *MutatingAdmissionPolicyBindingList) Reset() { *m = MutatingAdmissionPolicyBindingList{} } -func (*MutatingAdmissionPolicyBindingList) ProtoMessage() {} -func (*MutatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{8} -} -func (m *MutatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingAdmissionPolicyBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingAdmissionPolicyBindingList) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingAdmissionPolicyBindingList.Merge(m, src) -} -func (m *MutatingAdmissionPolicyBindingList) XXX_Size() int { - return m.Size() -} -func (m *MutatingAdmissionPolicyBindingList) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingAdmissionPolicyBindingList.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingAdmissionPolicyBindingList proto.InternalMessageInfo - -func (m *MutatingAdmissionPolicyBindingSpec) Reset() { *m = MutatingAdmissionPolicyBindingSpec{} } -func (*MutatingAdmissionPolicyBindingSpec) ProtoMessage() {} -func (*MutatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{9} -} -func (m *MutatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingAdmissionPolicyBindingSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingAdmissionPolicyBindingSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingAdmissionPolicyBindingSpec.Merge(m, src) -} -func (m *MutatingAdmissionPolicyBindingSpec) XXX_Size() int { - return m.Size() -} -func (m *MutatingAdmissionPolicyBindingSpec) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingAdmissionPolicyBindingSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingAdmissionPolicyBindingSpec proto.InternalMessageInfo - -func (m *MutatingAdmissionPolicyList) Reset() { *m = MutatingAdmissionPolicyList{} } -func (*MutatingAdmissionPolicyList) ProtoMessage() {} -func (*MutatingAdmissionPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{10} -} -func (m *MutatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingAdmissionPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingAdmissionPolicyList) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingAdmissionPolicyList.Merge(m, src) -} -func (m *MutatingAdmissionPolicyList) XXX_Size() int { - return m.Size() -} -func (m *MutatingAdmissionPolicyList) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingAdmissionPolicyList.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingAdmissionPolicyList proto.InternalMessageInfo - -func (m *MutatingAdmissionPolicySpec) Reset() { *m = MutatingAdmissionPolicySpec{} } -func (*MutatingAdmissionPolicySpec) ProtoMessage() {} -func (*MutatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{11} -} -func (m *MutatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingAdmissionPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingAdmissionPolicySpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingAdmissionPolicySpec.Merge(m, src) -} -func (m *MutatingAdmissionPolicySpec) XXX_Size() int { - return m.Size() -} -func (m *MutatingAdmissionPolicySpec) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingAdmissionPolicySpec.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingAdmissionPolicySpec proto.InternalMessageInfo - -func (m *MutatingWebhook) Reset() { *m = MutatingWebhook{} } -func (*MutatingWebhook) ProtoMessage() {} -func (*MutatingWebhook) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{12} -} -func (m *MutatingWebhook) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingWebhook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingWebhook) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingWebhook.Merge(m, src) -} -func (m *MutatingWebhook) XXX_Size() int { - return m.Size() -} -func (m *MutatingWebhook) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingWebhook.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingWebhook proto.InternalMessageInfo - -func (m *MutatingWebhookConfiguration) Reset() { *m = MutatingWebhookConfiguration{} } -func (*MutatingWebhookConfiguration) ProtoMessage() {} -func (*MutatingWebhookConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{13} -} -func (m *MutatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingWebhookConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingWebhookConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingWebhookConfiguration.Merge(m, src) -} -func (m *MutatingWebhookConfiguration) XXX_Size() int { - return m.Size() -} -func (m *MutatingWebhookConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingWebhookConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingWebhookConfiguration proto.InternalMessageInfo - -func (m *MutatingWebhookConfigurationList) Reset() { *m = MutatingWebhookConfigurationList{} } -func (*MutatingWebhookConfigurationList) ProtoMessage() {} -func (*MutatingWebhookConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{14} -} -func (m *MutatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MutatingWebhookConfigurationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MutatingWebhookConfigurationList) XXX_Merge(src proto.Message) { - xxx_messageInfo_MutatingWebhookConfigurationList.Merge(m, src) -} -func (m *MutatingWebhookConfigurationList) XXX_Size() int { - return m.Size() -} -func (m *MutatingWebhookConfigurationList) XXX_DiscardUnknown() { - xxx_messageInfo_MutatingWebhookConfigurationList.DiscardUnknown(m) -} - -var xxx_messageInfo_MutatingWebhookConfigurationList proto.InternalMessageInfo - -func (m *Mutation) Reset() { *m = Mutation{} } -func (*Mutation) ProtoMessage() {} -func (*Mutation) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{15} -} -func (m *Mutation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Mutation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Mutation) XXX_Merge(src proto.Message) { - xxx_messageInfo_Mutation.Merge(m, src) -} -func (m *Mutation) XXX_Size() int { - return m.Size() -} -func (m *Mutation) XXX_DiscardUnknown() { - xxx_messageInfo_Mutation.DiscardUnknown(m) -} +func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } -var xxx_messageInfo_Mutation proto.InternalMessageInfo +func (m *JSONPatch) Reset() { *m = JSONPatch{} } -func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } -func (*NamedRuleWithOperations) ProtoMessage() {} -func (*NamedRuleWithOperations) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{16} -} -func (m *NamedRuleWithOperations) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NamedRuleWithOperations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NamedRuleWithOperations) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedRuleWithOperations.Merge(m, src) -} -func (m *NamedRuleWithOperations) XXX_Size() int { - return m.Size() -} -func (m *NamedRuleWithOperations) XXX_DiscardUnknown() { - xxx_messageInfo_NamedRuleWithOperations.DiscardUnknown(m) -} +func (m *MatchCondition) Reset() { *m = MatchCondition{} } -var xxx_messageInfo_NamedRuleWithOperations proto.InternalMessageInfo +func (m *MatchResources) Reset() { *m = MatchResources{} } -func (m *ParamKind) Reset() { *m = ParamKind{} } -func (*ParamKind) ProtoMessage() {} -func (*ParamKind) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{17} -} -func (m *ParamKind) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParamKind) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ParamKind) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParamKind.Merge(m, src) -} -func (m *ParamKind) XXX_Size() int { - return m.Size() -} -func (m *ParamKind) XXX_DiscardUnknown() { - xxx_messageInfo_ParamKind.DiscardUnknown(m) -} +func (m *MutatingAdmissionPolicy) Reset() { *m = MutatingAdmissionPolicy{} } -var xxx_messageInfo_ParamKind proto.InternalMessageInfo +func (m *MutatingAdmissionPolicyBinding) Reset() { *m = MutatingAdmissionPolicyBinding{} } -func (m *ParamRef) Reset() { *m = ParamRef{} } -func (*ParamRef) ProtoMessage() {} -func (*ParamRef) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{18} -} -func (m *ParamRef) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParamRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ParamRef) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParamRef.Merge(m, src) -} -func (m *ParamRef) XXX_Size() int { - return m.Size() -} -func (m *ParamRef) XXX_DiscardUnknown() { - xxx_messageInfo_ParamRef.DiscardUnknown(m) -} +func (m *MutatingAdmissionPolicyBindingList) Reset() { *m = MutatingAdmissionPolicyBindingList{} } -var xxx_messageInfo_ParamRef proto.InternalMessageInfo +func (m *MutatingAdmissionPolicyBindingSpec) Reset() { *m = MutatingAdmissionPolicyBindingSpec{} } -func (m *ServiceReference) Reset() { *m = ServiceReference{} } -func (*ServiceReference) ProtoMessage() {} -func (*ServiceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{19} -} -func (m *ServiceReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceReference.Merge(m, src) -} -func (m *ServiceReference) XXX_Size() int { - return m.Size() -} -func (m *ServiceReference) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceReference.DiscardUnknown(m) -} +func (m *MutatingAdmissionPolicyList) Reset() { *m = MutatingAdmissionPolicyList{} } -var xxx_messageInfo_ServiceReference proto.InternalMessageInfo +func (m *MutatingAdmissionPolicySpec) Reset() { *m = MutatingAdmissionPolicySpec{} } -func (m *TypeChecking) Reset() { *m = TypeChecking{} } -func (*TypeChecking) ProtoMessage() {} -func (*TypeChecking) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{20} -} -func (m *TypeChecking) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TypeChecking) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TypeChecking) XXX_Merge(src proto.Message) { - xxx_messageInfo_TypeChecking.Merge(m, src) -} -func (m *TypeChecking) XXX_Size() int { - return m.Size() -} -func (m *TypeChecking) XXX_DiscardUnknown() { - xxx_messageInfo_TypeChecking.DiscardUnknown(m) -} +func (m *MutatingWebhook) Reset() { *m = MutatingWebhook{} } -var xxx_messageInfo_TypeChecking proto.InternalMessageInfo +func (m *MutatingWebhookConfiguration) Reset() { *m = MutatingWebhookConfiguration{} } -func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } -func (*ValidatingAdmissionPolicy) ProtoMessage() {} -func (*ValidatingAdmissionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{21} -} -func (m *ValidatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicy.Merge(m, src) -} -func (m *ValidatingAdmissionPolicy) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicy.DiscardUnknown(m) -} +func (m *MutatingWebhookConfigurationList) Reset() { *m = MutatingWebhookConfigurationList{} } -var xxx_messageInfo_ValidatingAdmissionPolicy proto.InternalMessageInfo +func (m *Mutation) Reset() { *m = Mutation{} } -func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } -func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} -func (*ValidatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{22} -} -func (m *ValidatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicyBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicyBinding) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicyBinding.Merge(m, src) -} -func (m *ValidatingAdmissionPolicyBinding) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicyBinding) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicyBinding.DiscardUnknown(m) -} +func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } -var xxx_messageInfo_ValidatingAdmissionPolicyBinding proto.InternalMessageInfo +func (m *ParamKind) Reset() { *m = ParamKind{} } -func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } -func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} -func (*ValidatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{23} -} -func (m *ValidatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicyBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicyBindingList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicyBindingList.Merge(m, src) -} -func (m *ValidatingAdmissionPolicyBindingList) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicyBindingList) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicyBindingList.DiscardUnknown(m) -} +func (m *ParamRef) Reset() { *m = ParamRef{} } -var xxx_messageInfo_ValidatingAdmissionPolicyBindingList proto.InternalMessageInfo +func (m *ServiceReference) Reset() { *m = ServiceReference{} } -func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } -func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} -func (*ValidatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{24} -} -func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.Merge(m, src) -} -func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicyBindingSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec proto.InternalMessageInfo - -func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } -func (*ValidatingAdmissionPolicyList) ProtoMessage() {} -func (*ValidatingAdmissionPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{25} -} -func (m *ValidatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicyList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicyList.Merge(m, src) -} -func (m *ValidatingAdmissionPolicyList) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicyList) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicyList.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatingAdmissionPolicyList proto.InternalMessageInfo - -func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } -func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} -func (*ValidatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{26} -} -func (m *ValidatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicySpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicySpec.Merge(m, src) -} -func (m *ValidatingAdmissionPolicySpec) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicySpec) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicySpec.DiscardUnknown(m) -} +func (m *TypeChecking) Reset() { *m = TypeChecking{} } -var xxx_messageInfo_ValidatingAdmissionPolicySpec proto.InternalMessageInfo +func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } -func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } -func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} -func (*ValidatingAdmissionPolicyStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{27} -} -func (m *ValidatingAdmissionPolicyStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingAdmissionPolicyStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingAdmissionPolicyStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingAdmissionPolicyStatus.Merge(m, src) -} -func (m *ValidatingAdmissionPolicyStatus) XXX_Size() int { - return m.Size() -} -func (m *ValidatingAdmissionPolicyStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingAdmissionPolicyStatus.DiscardUnknown(m) -} +func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } -var xxx_messageInfo_ValidatingAdmissionPolicyStatus proto.InternalMessageInfo - -func (m *ValidatingWebhook) Reset() { *m = ValidatingWebhook{} } -func (*ValidatingWebhook) ProtoMessage() {} -func (*ValidatingWebhook) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{28} -} -func (m *ValidatingWebhook) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingWebhook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingWebhook) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingWebhook.Merge(m, src) -} -func (m *ValidatingWebhook) XXX_Size() int { - return m.Size() -} -func (m *ValidatingWebhook) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingWebhook.DiscardUnknown(m) -} +func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } -var xxx_messageInfo_ValidatingWebhook proto.InternalMessageInfo +func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } -func (m *ValidatingWebhookConfiguration) Reset() { *m = ValidatingWebhookConfiguration{} } -func (*ValidatingWebhookConfiguration) ProtoMessage() {} -func (*ValidatingWebhookConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{29} -} -func (m *ValidatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingWebhookConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingWebhookConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingWebhookConfiguration.Merge(m, src) -} -func (m *ValidatingWebhookConfiguration) XXX_Size() int { - return m.Size() -} -func (m *ValidatingWebhookConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingWebhookConfiguration.DiscardUnknown(m) -} +func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } -var xxx_messageInfo_ValidatingWebhookConfiguration proto.InternalMessageInfo +func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } -func (m *ValidatingWebhookConfigurationList) Reset() { *m = ValidatingWebhookConfigurationList{} } -func (*ValidatingWebhookConfigurationList) ProtoMessage() {} -func (*ValidatingWebhookConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{30} -} -func (m *ValidatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatingWebhookConfigurationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidatingWebhookConfigurationList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatingWebhookConfigurationList.Merge(m, src) -} -func (m *ValidatingWebhookConfigurationList) XXX_Size() int { - return m.Size() -} -func (m *ValidatingWebhookConfigurationList) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatingWebhookConfigurationList.DiscardUnknown(m) -} +func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } -var xxx_messageInfo_ValidatingWebhookConfigurationList proto.InternalMessageInfo +func (m *ValidatingWebhook) Reset() { *m = ValidatingWebhook{} } -func (m *Validation) Reset() { *m = Validation{} } -func (*Validation) ProtoMessage() {} -func (*Validation) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{31} -} -func (m *Validation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Validation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Validation) XXX_Merge(src proto.Message) { - xxx_messageInfo_Validation.Merge(m, src) -} -func (m *Validation) XXX_Size() int { - return m.Size() -} -func (m *Validation) XXX_DiscardUnknown() { - xxx_messageInfo_Validation.DiscardUnknown(m) -} +func (m *ValidatingWebhookConfiguration) Reset() { *m = ValidatingWebhookConfiguration{} } -var xxx_messageInfo_Validation proto.InternalMessageInfo +func (m *ValidatingWebhookConfigurationList) Reset() { *m = ValidatingWebhookConfigurationList{} } -func (m *Variable) Reset() { *m = Variable{} } -func (*Variable) ProtoMessage() {} -func (*Variable) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{32} -} -func (m *Variable) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Variable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Variable) XXX_Merge(src proto.Message) { - xxx_messageInfo_Variable.Merge(m, src) -} -func (m *Variable) XXX_Size() int { - return m.Size() -} -func (m *Variable) XXX_DiscardUnknown() { - xxx_messageInfo_Variable.DiscardUnknown(m) -} +func (m *Validation) Reset() { *m = Validation{} } -var xxx_messageInfo_Variable proto.InternalMessageInfo +func (m *Variable) Reset() { *m = Variable{} } -func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } -func (*WebhookClientConfig) ProtoMessage() {} -func (*WebhookClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_7f7c65a4f012fb19, []int{33} -} -func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WebhookClientConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *WebhookClientConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_WebhookClientConfig.Merge(m, src) -} -func (m *WebhookClientConfig) XXX_Size() int { - return m.Size() -} -func (m *WebhookClientConfig) XXX_DiscardUnknown() { - xxx_messageInfo_WebhookClientConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_WebhookClientConfig proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ApplyConfiguration)(nil), "k8s.io.api.admissionregistration.v1beta1.ApplyConfiguration") - proto.RegisterType((*AuditAnnotation)(nil), "k8s.io.api.admissionregistration.v1beta1.AuditAnnotation") - proto.RegisterType((*ExpressionWarning)(nil), "k8s.io.api.admissionregistration.v1beta1.ExpressionWarning") - proto.RegisterType((*JSONPatch)(nil), "k8s.io.api.admissionregistration.v1beta1.JSONPatch") - proto.RegisterType((*MatchCondition)(nil), "k8s.io.api.admissionregistration.v1beta1.MatchCondition") - proto.RegisterType((*MatchResources)(nil), "k8s.io.api.admissionregistration.v1beta1.MatchResources") - proto.RegisterType((*MutatingAdmissionPolicy)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingAdmissionPolicy") - proto.RegisterType((*MutatingAdmissionPolicyBinding)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingAdmissionPolicyBinding") - proto.RegisterType((*MutatingAdmissionPolicyBindingList)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingAdmissionPolicyBindingList") - proto.RegisterType((*MutatingAdmissionPolicyBindingSpec)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingAdmissionPolicyBindingSpec") - proto.RegisterType((*MutatingAdmissionPolicyList)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingAdmissionPolicyList") - proto.RegisterType((*MutatingAdmissionPolicySpec)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingAdmissionPolicySpec") - proto.RegisterType((*MutatingWebhook)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingWebhook") - proto.RegisterType((*MutatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingWebhookConfiguration") - proto.RegisterType((*MutatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingWebhookConfigurationList") - proto.RegisterType((*Mutation)(nil), "k8s.io.api.admissionregistration.v1beta1.Mutation") - proto.RegisterType((*NamedRuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1beta1.NamedRuleWithOperations") - proto.RegisterType((*ParamKind)(nil), "k8s.io.api.admissionregistration.v1beta1.ParamKind") - proto.RegisterType((*ParamRef)(nil), "k8s.io.api.admissionregistration.v1beta1.ParamRef") - proto.RegisterType((*ServiceReference)(nil), "k8s.io.api.admissionregistration.v1beta1.ServiceReference") - proto.RegisterType((*TypeChecking)(nil), "k8s.io.api.admissionregistration.v1beta1.TypeChecking") - proto.RegisterType((*ValidatingAdmissionPolicy)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy") - proto.RegisterType((*ValidatingAdmissionPolicyBinding)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding") - proto.RegisterType((*ValidatingAdmissionPolicyBindingList)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingList") - proto.RegisterType((*ValidatingAdmissionPolicyBindingSpec)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingSpec") - proto.RegisterType((*ValidatingAdmissionPolicyList)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyList") - proto.RegisterType((*ValidatingAdmissionPolicySpec)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingAdmissionPolicySpec") - proto.RegisterType((*ValidatingAdmissionPolicyStatus)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyStatus") - proto.RegisterType((*ValidatingWebhook)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingWebhook") - proto.RegisterType((*ValidatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingWebhookConfiguration") - proto.RegisterType((*ValidatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingWebhookConfigurationList") - proto.RegisterType((*Validation)(nil), "k8s.io.api.admissionregistration.v1beta1.Validation") - proto.RegisterType((*Variable)(nil), "k8s.io.api.admissionregistration.v1beta1.Variable") - proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.api.admissionregistration.v1beta1.WebhookClientConfig") -} - -func init() { - proto.RegisterFile("k8s.io/api/admissionregistration/v1beta1/generated.proto", fileDescriptor_7f7c65a4f012fb19) -} - -var fileDescriptor_7f7c65a4f012fb19 = []byte{ - // 2215 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0x4d, 0x6c, 0x1b, 0xc7, - 0x15, 0xf6, 0x92, 0x92, 0x45, 0x3e, 0xca, 0x92, 0x38, 0x71, 0x2a, 0xfa, 0x8f, 0x14, 0x16, 0x41, - 0x21, 0x03, 0x2d, 0x59, 0x2b, 0x41, 0xe2, 0x3a, 0x29, 0x02, 0xae, 0x62, 0x3b, 0x76, 0x24, 0x59, - 0x18, 0x39, 0x52, 0xd1, 0x26, 0x40, 0x56, 0xcb, 0x21, 0xb9, 0x11, 0xb9, 0xcb, 0xee, 0x2c, 0x65, - 0xab, 0x05, 0xda, 0x02, 0x2d, 0x90, 0x1e, 0x0b, 0xf4, 0x52, 0xa0, 0xa7, 0xde, 0x7b, 0x69, 0xef, - 0x05, 0x7a, 0xf4, 0x31, 0xb7, 0x1a, 0x28, 0x4a, 0x54, 0x4c, 0xd1, 0x9e, 0x7a, 0x48, 0x81, 0xf6, - 0xa0, 0x4b, 0x8b, 0x99, 0x9d, 0xfd, 0xdf, 0x95, 0x56, 0xb2, 0x2c, 0x17, 0x85, 0x6f, 0xda, 0xf7, - 0xe6, 0xbd, 0x37, 0xef, 0xcd, 0x9b, 0xf7, 0xbe, 0x79, 0x22, 0xdc, 0xdc, 0xb9, 0x49, 0xeb, 0xba, - 0xd9, 0x50, 0x07, 0x7a, 0x43, 0x6d, 0xf5, 0x75, 0x4a, 0x75, 0xd3, 0xb0, 0x48, 0x47, 0xa7, 0xb6, - 0xa5, 0xda, 0xba, 0x69, 0x34, 0x76, 0x6f, 0x6c, 0x13, 0x5b, 0xbd, 0xd1, 0xe8, 0x10, 0x83, 0x58, - 0xaa, 0x4d, 0x5a, 0xf5, 0x81, 0x65, 0xda, 0x26, 0x5a, 0x74, 0x24, 0xeb, 0xea, 0x40, 0xaf, 0x27, - 0x4a, 0xd6, 0x85, 0xe4, 0xe5, 0xaf, 0x77, 0x74, 0xbb, 0x3b, 0xdc, 0xae, 0x6b, 0x66, 0xbf, 0xd1, - 0x31, 0x3b, 0x66, 0x83, 0x2b, 0xd8, 0x1e, 0xb6, 0xf9, 0x17, 0xff, 0xe0, 0x7f, 0x39, 0x8a, 0x2f, - 0xbf, 0x9e, 0x61, 0x4b, 0xd1, 0xdd, 0x5c, 0x7e, 0xc3, 0x17, 0xea, 0xab, 0x5a, 0x57, 0x37, 0x88, - 0xb5, 0xd7, 0x18, 0xec, 0x74, 0x18, 0x81, 0x36, 0xfa, 0xc4, 0x56, 0x93, 0xa4, 0x1a, 0x69, 0x52, - 0xd6, 0xd0, 0xb0, 0xf5, 0x3e, 0x89, 0x09, 0xbc, 0x79, 0x94, 0x00, 0xd5, 0xba, 0xa4, 0xaf, 0x46, - 0xe5, 0xe4, 0xf7, 0x01, 0x35, 0x07, 0x83, 0xde, 0xde, 0xb2, 0x69, 0xb4, 0xf5, 0xce, 0xd0, 0xf1, - 0x03, 0x2d, 0x01, 0x90, 0xc7, 0x03, 0x8b, 0x70, 0x0f, 0x2b, 0xd2, 0x82, 0xb4, 0x58, 0x54, 0xd0, - 0x93, 0x51, 0xed, 0xdc, 0x78, 0x54, 0x83, 0xdb, 0x1e, 0x07, 0x07, 0x56, 0xc9, 0x14, 0x66, 0x9b, - 0xc3, 0x96, 0x6e, 0x37, 0x0d, 0xc3, 0xb4, 0x1d, 0x35, 0xd7, 0x20, 0xbf, 0x43, 0xf6, 0x84, 0x7c, - 0x49, 0xc8, 0xe7, 0x3f, 0x20, 0x7b, 0x98, 0xd1, 0x51, 0x13, 0x66, 0x77, 0xd5, 0xde, 0x90, 0xf8, - 0x0a, 0x2b, 0x39, 0xbe, 0x74, 0x5e, 0x2c, 0x9d, 0xdd, 0x0c, 0xb3, 0x71, 0x74, 0xbd, 0xdc, 0x83, - 0xb2, 0xff, 0xb5, 0xa5, 0x5a, 0x86, 0x6e, 0x74, 0xd0, 0xd7, 0xa0, 0xd0, 0xd6, 0x49, 0xaf, 0x85, - 0x49, 0x5b, 0x28, 0x9c, 0x13, 0x0a, 0x0b, 0x77, 0x04, 0x1d, 0x7b, 0x2b, 0xd0, 0x75, 0x98, 0x7a, - 0xe4, 0x08, 0x56, 0xf2, 0x7c, 0xf1, 0xac, 0x58, 0x3c, 0x25, 0xf4, 0x61, 0x97, 0x2f, 0xbf, 0x0b, - 0xc5, 0xfb, 0x1b, 0x0f, 0xd6, 0xd6, 0x55, 0x5b, 0xeb, 0x9e, 0x28, 0x46, 0x6d, 0x98, 0x59, 0x65, - 0xc2, 0xcb, 0xa6, 0xd1, 0xd2, 0x79, 0x88, 0x16, 0x60, 0xc2, 0x50, 0xfb, 0x44, 0xc8, 0x4f, 0x0b, - 0xf9, 0x89, 0x35, 0xb5, 0x4f, 0x30, 0xe7, 0x44, 0xec, 0xe4, 0x32, 0xd9, 0xf9, 0xe3, 0x84, 0x30, - 0x84, 0x09, 0x35, 0x87, 0x96, 0x46, 0x28, 0x7a, 0x0c, 0x65, 0xa6, 0x8e, 0x0e, 0x54, 0x8d, 0x6c, - 0x90, 0x1e, 0xd1, 0x6c, 0xd3, 0xe2, 0x56, 0x4b, 0x4b, 0xaf, 0xd7, 0xfd, 0x1b, 0xe3, 0x25, 0x4f, - 0x7d, 0xb0, 0xd3, 0x61, 0x04, 0x5a, 0x67, 0x39, 0x5a, 0xdf, 0xbd, 0x51, 0x5f, 0x51, 0xb7, 0x49, - 0xcf, 0x15, 0x55, 0x5e, 0x1d, 0x8f, 0x6a, 0xe5, 0xb5, 0xa8, 0x46, 0x1c, 0x37, 0x82, 0x4c, 0x98, - 0x31, 0xb7, 0x3f, 0x25, 0x9a, 0xed, 0x99, 0xcd, 0x9d, 0xdc, 0x2c, 0x1a, 0x8f, 0x6a, 0x33, 0x0f, - 0x42, 0xea, 0x70, 0x44, 0x3d, 0xfa, 0x21, 0x5c, 0xb0, 0x84, 0xdf, 0x78, 0xd8, 0x23, 0xb4, 0x92, - 0x5f, 0xc8, 0x2f, 0x96, 0x96, 0x9a, 0xf5, 0xac, 0x85, 0xa1, 0xce, 0xfc, 0x6a, 0x31, 0xd9, 0x2d, - 0xdd, 0xee, 0x3e, 0x18, 0x10, 0x87, 0x4d, 0x95, 0x57, 0x45, 0xdc, 0x2f, 0xe0, 0xa0, 0x7e, 0x1c, - 0x36, 0x87, 0x7e, 0x21, 0xc1, 0x45, 0xf2, 0x58, 0xeb, 0x0d, 0x5b, 0x24, 0xb4, 0xae, 0x32, 0x71, - 0x5a, 0xfb, 0xb8, 0x2a, 0xf6, 0x71, 0xf1, 0x76, 0x82, 0x19, 0x9c, 0x68, 0x1c, 0xbd, 0x07, 0xa5, - 0x3e, 0x4b, 0x89, 0x75, 0xb3, 0xa7, 0x6b, 0x7b, 0x95, 0x29, 0x9e, 0x48, 0xf2, 0x78, 0x54, 0x2b, - 0xad, 0xfa, 0xe4, 0x83, 0x51, 0x6d, 0x36, 0xf0, 0xf9, 0x70, 0x6f, 0x40, 0x70, 0x50, 0x4c, 0xfe, - 0xab, 0x04, 0xf3, 0xab, 0x43, 0x76, 0xbf, 0x8d, 0x4e, 0xd3, 0xdd, 0xbb, 0xc3, 0x43, 0x9f, 0x40, - 0x81, 0x1d, 0x5a, 0x4b, 0xb5, 0x55, 0x91, 0x59, 0xdf, 0xc8, 0x76, 0xc4, 0xce, 0x79, 0xae, 0x12, - 0x5b, 0xf5, 0x33, 0xdb, 0xa7, 0x61, 0x4f, 0x2b, 0xea, 0xc0, 0x04, 0x1d, 0x10, 0x4d, 0x24, 0xd0, - 0xed, 0xec, 0x81, 0x4c, 0xd9, 0xf2, 0xc6, 0x80, 0x68, 0xfe, 0xa5, 0x63, 0x5f, 0x98, 0x1b, 0x90, - 0xff, 0x29, 0x41, 0x35, 0x45, 0x46, 0xd1, 0x8d, 0x16, 0xab, 0x32, 0xcf, 0xdf, 0x5b, 0x23, 0xe4, - 0xed, 0xca, 0x33, 0x7b, 0x2b, 0x76, 0x9e, 0xea, 0xf4, 0x97, 0x12, 0xc8, 0x87, 0x8b, 0xae, 0xe8, - 0xd4, 0x46, 0x1f, 0xc5, 0x1c, 0xaf, 0x67, 0xbc, 0xc9, 0x3a, 0x75, 0xdc, 0xf6, 0xca, 0xb1, 0x4b, - 0x09, 0x38, 0xdd, 0x87, 0x49, 0xdd, 0x26, 0x7d, 0x5a, 0xc9, 0xf1, 0xcb, 0xf2, 0xfe, 0x69, 0x79, - 0xad, 0x5c, 0x10, 0x46, 0x27, 0xef, 0x31, 0xf5, 0xd8, 0xb1, 0x22, 0xff, 0x26, 0x77, 0x94, 0xcf, - 0x2c, 0x40, 0xac, 0x08, 0x0f, 0x38, 0x71, 0xcd, 0x2f, 0xd6, 0xde, 0xe1, 0xad, 0x7b, 0x1c, 0x1c, - 0x58, 0xc5, 0xe2, 0x34, 0x50, 0x2d, 0xb5, 0xef, 0xb6, 0xa1, 0xd2, 0xd2, 0x52, 0x76, 0x67, 0xd6, - 0x85, 0xa4, 0x32, 0xcd, 0xe2, 0xe4, 0x7e, 0x61, 0x4f, 0x23, 0xb2, 0x61, 0xa6, 0x1f, 0xaa, 0xf0, - 0xbc, 0x7b, 0x95, 0x96, 0x6e, 0x1e, 0x23, 0x60, 0x21, 0x79, 0xa7, 0xb4, 0x86, 0x69, 0x38, 0x62, - 0x43, 0xfe, 0x42, 0x82, 0x2b, 0x29, 0xe1, 0x3a, 0x83, 0xdc, 0x68, 0x87, 0x73, 0xa3, 0xf9, 0xec, - 0xb9, 0x91, 0x9c, 0x14, 0xbf, 0x3a, 0x9f, 0xea, 0x25, 0xcf, 0x86, 0x4f, 0xa0, 0xc8, 0xcf, 0xe1, - 0x03, 0xdd, 0x68, 0x25, 0xf4, 0xd0, 0x2c, 0x47, 0xcb, 0x44, 0x95, 0x0b, 0xe3, 0x51, 0xad, 0xe8, - 0x7d, 0x62, 0x5f, 0x29, 0xfa, 0x3e, 0xcc, 0xf5, 0x05, 0x50, 0x60, 0xf2, 0xba, 0x61, 0x53, 0x91, - 0x43, 0x27, 0x3f, 0xdf, 0x8b, 0xe3, 0x51, 0x6d, 0x6e, 0x35, 0xa2, 0x15, 0xc7, 0xec, 0x20, 0x0d, - 0x8a, 0xbb, 0xaa, 0xa5, 0xab, 0xdb, 0x7e, 0xeb, 0x3c, 0x46, 0xe2, 0x6e, 0x0a, 0x51, 0xa5, 0x2c, - 0x42, 0x5b, 0x74, 0x29, 0x14, 0xfb, 0x7a, 0x99, 0x91, 0xfe, 0xd0, 0x81, 0x89, 0x6e, 0x5f, 0x5c, - 0x3a, 0xee, 0x71, 0x9a, 0x86, 0x6f, 0xc4, 0xa5, 0x50, 0xec, 0xeb, 0x45, 0x2b, 0x70, 0xa1, 0xad, - 0xea, 0xbd, 0xa1, 0x45, 0x44, 0xd3, 0x9b, 0xe4, 0x17, 0xf7, 0xab, 0xac, 0x83, 0xdf, 0x09, 0x32, - 0x0e, 0x46, 0xb5, 0x72, 0x88, 0xc0, 0x1b, 0x5f, 0x58, 0x18, 0xfd, 0x00, 0x66, 0xfb, 0x21, 0xf0, - 0x46, 0x2b, 0xe7, 0xf9, 0xc6, 0x8f, 0x7b, 0x24, 0x9e, 0x02, 0x1f, 0xe8, 0x86, 0xe9, 0x14, 0x47, - 0x2d, 0xa1, 0x9f, 0x49, 0x80, 0x2c, 0xa2, 0x1b, 0xbb, 0xa6, 0xc6, 0x35, 0x86, 0xba, 0xf8, 0xb7, - 0x85, 0x1a, 0x84, 0x63, 0x2b, 0x0e, 0x46, 0xb5, 0x5b, 0x19, 0x9e, 0x2d, 0xf5, 0xb8, 0x24, 0x0f, - 0x41, 0x82, 0x4d, 0xf9, 0x6f, 0x05, 0x98, 0x75, 0x6f, 0xc7, 0x16, 0xd9, 0xee, 0x9a, 0xe6, 0x4e, - 0x06, 0x18, 0xfb, 0x08, 0xa6, 0xb5, 0x9e, 0x4e, 0x0c, 0xdb, 0x79, 0x69, 0x88, 0x6c, 0xfe, 0x56, - 0xf6, 0xd0, 0x09, 0x53, 0xcb, 0x01, 0x25, 0xca, 0x45, 0x61, 0x68, 0x3a, 0x48, 0xc5, 0x21, 0x43, - 0xe8, 0x23, 0x98, 0xb4, 0x02, 0x28, 0xf0, 0xad, 0x2c, 0x16, 0xeb, 0x09, 0x98, 0xcb, 0x2b, 0x15, - 0x0e, 0xc8, 0x72, 0x94, 0xc6, 0x53, 0x6c, 0xe2, 0x59, 0x52, 0x2c, 0x82, 0xd1, 0x8a, 0x27, 0xc2, - 0x68, 0xc9, 0x50, 0x7f, 0xf2, 0xc5, 0x40, 0xfd, 0xd2, 0xf3, 0x85, 0xfa, 0xef, 0x41, 0x89, 0xea, - 0x2d, 0x72, 0xbb, 0xdd, 0x26, 0x9a, 0xcd, 0xee, 0xa3, 0x17, 0xb0, 0x0d, 0x9f, 0xcc, 0x02, 0xe6, - 0x7f, 0x2e, 0xf7, 0x54, 0x4a, 0x71, 0x50, 0x0c, 0xdd, 0x82, 0x19, 0xf6, 0x46, 0x36, 0x87, 0xf6, - 0x06, 0xd1, 0x4c, 0xa3, 0x45, 0xf9, 0xbd, 0x9a, 0x74, 0x76, 0xf0, 0x30, 0xc4, 0xc1, 0x91, 0x95, - 0xe8, 0x43, 0x98, 0xf7, 0xb2, 0x08, 0x93, 0x5d, 0x9d, 0x3c, 0xda, 0x24, 0x16, 0xe5, 0xd5, 0xa1, - 0xb0, 0x90, 0x5f, 0x2c, 0x2a, 0x57, 0xc6, 0xa3, 0xda, 0x7c, 0x33, 0x79, 0x09, 0x4e, 0x93, 0x45, - 0x3f, 0x4d, 0xbe, 0xef, 0xc0, 0x1d, 0x7c, 0x78, 0x56, 0x77, 0x3d, 0xa9, 0xe6, 0x4d, 0x9f, 0x55, - 0xcd, 0x93, 0xff, 0x2c, 0xc1, 0xd5, 0x48, 0xa1, 0x09, 0x8f, 0x29, 0x9e, 0x3f, 0x04, 0xff, 0x2e, - 0x14, 0x84, 0x65, 0x17, 0x74, 0x7c, 0xf3, 0xf8, 0xa0, 0x43, 0x68, 0x50, 0x26, 0x98, 0x29, 0xec, - 0x29, 0x94, 0xff, 0x21, 0xc1, 0xc2, 0x61, 0xfe, 0x9d, 0x01, 0xa2, 0xda, 0x09, 0x23, 0xaa, 0x3b, - 0x27, 0x76, 0x2e, 0xb4, 0xf1, 0x14, 0x58, 0xf5, 0xdb, 0x1c, 0x14, 0xdc, 0x3e, 0x8d, 0xde, 0x61, - 0x18, 0xca, 0xd6, 0xba, 0x2c, 0xf5, 0xc4, 0x54, 0xa3, 0xea, 0x36, 0xf3, 0x75, 0x97, 0x71, 0x10, - 0xfc, 0xc0, 0xbe, 0x00, 0xbf, 0x1e, 0x6a, 0x6c, 0x6e, 0x25, 0x20, 0xf0, 0x3b, 0xd9, 0xbd, 0x88, - 0xcf, 0xbe, 0x94, 0xaf, 0xb0, 0xcb, 0x15, 0xa7, 0xe3, 0x04, 0x7b, 0x0c, 0x08, 0x7e, 0x4a, 0x4d, - 0x83, 0x6f, 0x91, 0x57, 0xfe, 0x63, 0x01, 0x41, 0x6f, 0x96, 0xe4, 0x00, 0x41, 0xef, 0x13, 0xfb, - 0x4a, 0xe5, 0xa7, 0x12, 0xcc, 0xa7, 0x4c, 0x01, 0xd0, 0x5b, 0xfe, 0x9c, 0x83, 0x57, 0xe7, 0x8a, - 0xc4, 0x0b, 0x4e, 0x39, 0x38, 0xa0, 0xe0, 0x0c, 0x1c, 0x5e, 0x87, 0x7e, 0xc2, 0x8a, 0x4b, 0x4c, - 0x9f, 0x68, 0xc9, 0x27, 0x6e, 0x90, 0x97, 0x3d, 0x14, 0x12, 0xe3, 0xe1, 0x04, 0x73, 0xb2, 0x0a, - 0x3e, 0xf6, 0x65, 0x0f, 0x2c, 0x75, 0xa0, 0x8b, 0xf2, 0x17, 0x7d, 0x60, 0x35, 0xd7, 0xef, 0x09, - 0x0e, 0x0e, 0xac, 0x62, 0xa0, 0x63, 0x87, 0x21, 0xf0, 0x5c, 0x18, 0x74, 0x70, 0x2c, 0xcd, 0x39, - 0xf2, 0xef, 0x72, 0xe0, 0xbd, 0x9d, 0x32, 0x60, 0x94, 0x06, 0x14, 0xbd, 0x9e, 0x26, 0xb4, 0x7a, - 0x00, 0xd3, 0xeb, 0x7f, 0xd8, 0x5f, 0x83, 0x3e, 0x86, 0x02, 0x75, 0x3b, 0x5d, 0xfe, 0xe4, 0x9d, - 0x8e, 0xbf, 0xf1, 0xbc, 0x1e, 0xe7, 0xa9, 0x44, 0x36, 0xcc, 0xf3, 0x27, 0x01, 0xb1, 0x89, 0xb5, - 0x66, 0xda, 0x77, 0xcc, 0xa1, 0xd1, 0x6a, 0x6a, 0x3c, 0xd3, 0x1d, 0x98, 0x71, 0x8b, 0xf5, 0x96, - 0xf5, 0xe4, 0x25, 0x07, 0xa3, 0xda, 0x95, 0x14, 0x16, 0xbf, 0x4d, 0x69, 0xaa, 0xe5, 0x5f, 0x4b, - 0x30, 0xb7, 0x41, 0xac, 0x5d, 0x5d, 0x23, 0x98, 0xb4, 0x89, 0x45, 0x0c, 0x2d, 0x12, 0x1a, 0x29, - 0x43, 0x68, 0xdc, 0x68, 0xe7, 0x52, 0xa3, 0x7d, 0x15, 0x26, 0x06, 0xaa, 0xdd, 0x15, 0x53, 0xd7, - 0x02, 0xe3, 0xae, 0xab, 0x76, 0x17, 0x73, 0x2a, 0xe7, 0x9a, 0x96, 0xcd, 0x1d, 0x9d, 0x14, 0x5c, - 0xd3, 0xb2, 0x31, 0xa7, 0xca, 0xbf, 0x94, 0x60, 0x9a, 0x79, 0xb1, 0xdc, 0x25, 0xda, 0x8e, 0x6e, - 0x74, 0xd0, 0x67, 0x12, 0x20, 0x12, 0x9d, 0x04, 0x3b, 0x37, 0xa2, 0xb4, 0xf4, 0x76, 0xf6, 0x3b, - 0x19, 0x9b, 0x26, 0xfb, 0x69, 0x1d, 0x63, 0x51, 0x9c, 0x60, 0x52, 0xfe, 0x53, 0x0e, 0x2e, 0x6d, - 0xaa, 0x3d, 0xbd, 0xf5, 0x82, 0x66, 0x64, 0x7a, 0x68, 0x6a, 0x74, 0xf7, 0x38, 0x2f, 0xb7, 0x94, - 0x4d, 0xa7, 0x0d, 0x8c, 0xd0, 0xf7, 0xe0, 0x3c, 0xb5, 0x55, 0x7b, 0xe8, 0xce, 0x1e, 0xee, 0x9d, - 0x86, 0x31, 0xae, 0x50, 0x99, 0x11, 0xe6, 0xce, 0x3b, 0xdf, 0x58, 0x18, 0x92, 0xff, 0x2d, 0xc1, - 0x42, 0xaa, 0xec, 0xd9, 0x8d, 0xe6, 0x06, 0xa1, 0x20, 0xaf, 0x9d, 0x82, 0xdf, 0x47, 0x0d, 0xe7, - 0xfe, 0x25, 0xc1, 0x6b, 0x47, 0x09, 0x9f, 0x01, 0x60, 0x30, 0xc3, 0x80, 0xe1, 0xfe, 0xe9, 0x79, - 0x9e, 0x02, 0x1a, 0x3e, 0xcb, 0x1f, 0xed, 0xf7, 0xcb, 0x11, 0x5d, 0xe0, 0x1f, 0x3d, 0x5b, 0x50, - 0xde, 0x15, 0xf1, 0x32, 0x0d, 0xa7, 0xa4, 0x3b, 0x13, 0x96, 0xa2, 0x72, 0x9d, 0x3d, 0xe4, 0x36, - 0xa3, 0xcc, 0x83, 0x51, 0x6d, 0x2e, 0x4a, 0xc4, 0x71, 0x1d, 0xf2, 0xdf, 0x25, 0xb8, 0x96, 0x7a, - 0x12, 0x67, 0x90, 0x7a, 0xdd, 0x70, 0xea, 0x2d, 0x9f, 0x46, 0xea, 0xa5, 0xce, 0xff, 0xae, 0x1d, - 0x5a, 0x0d, 0xff, 0xcf, 0x27, 0x80, 0x3b, 0x50, 0xf2, 0x8f, 0xdf, 0x1d, 0x9c, 0xbc, 0x71, 0xfc, - 0x78, 0x9b, 0x86, 0xf2, 0x8a, 0x08, 0x70, 0xc9, 0xa7, 0x51, 0x1c, 0xd4, 0x7e, 0xca, 0x13, 0x94, - 0x1f, 0xc1, 0x9c, 0x1a, 0xfe, 0x2f, 0x34, 0xad, 0x4c, 0x1e, 0xf7, 0xe1, 0x16, 0xf9, 0x3f, 0xb6, - 0x52, 0x11, 0x4e, 0xcc, 0x45, 0x18, 0x14, 0xc7, 0x8c, 0xbd, 0xd8, 0x29, 0x61, 0x68, 0x74, 0x3b, - 0xf5, 0x7c, 0x46, 0xb7, 0xf2, 0x1f, 0x72, 0x50, 0x3b, 0xa2, 0x7d, 0xa3, 0xfb, 0x80, 0xcc, 0x6d, - 0x4a, 0xac, 0x5d, 0xd2, 0xba, 0xeb, 0xfc, 0xe2, 0xc0, 0x85, 0xf5, 0x79, 0x1f, 0x50, 0x3d, 0x88, - 0xad, 0xc0, 0x09, 0x52, 0xa8, 0x07, 0xd3, 0x76, 0x00, 0xea, 0x89, 0x5b, 0xf0, 0x66, 0x76, 0xbf, - 0x82, 0x40, 0x51, 0x99, 0x1b, 0x8f, 0x6a, 0x21, 0xe8, 0x88, 0x43, 0xda, 0x91, 0x06, 0xa0, 0xf9, - 0x47, 0xe7, 0xa4, 0x7e, 0x23, 0x5b, 0x15, 0xf3, 0x4f, 0xcc, 0xeb, 0x3b, 0x81, 0xc3, 0x0a, 0xa8, - 0x95, 0xf7, 0xa7, 0xa0, 0xec, 0x87, 0xf0, 0xe5, 0x10, 0xf5, 0xe5, 0x10, 0xf5, 0xd0, 0x21, 0x2a, - 0xbc, 0x1c, 0xa2, 0x9e, 0x68, 0x88, 0x9a, 0x50, 0x8b, 0x4b, 0x67, 0x36, 0xbd, 0xdc, 0x97, 0xa0, - 0x1a, 0xbb, 0xe3, 0x67, 0x3d, 0xbf, 0xfc, 0x38, 0x36, 0xbf, 0x7c, 0xfb, 0x24, 0xb0, 0x29, 0x6d, - 0x82, 0xf9, 0xa5, 0x04, 0xf2, 0xe1, 0x3e, 0xfe, 0x4f, 0xff, 0x62, 0xe0, 0xf0, 0xad, 0xa7, 0x80, - 0xc3, 0xff, 0x48, 0x00, 0x3e, 0x98, 0x41, 0xaf, 0x41, 0xe0, 0x47, 0x58, 0xa2, 0x74, 0x3b, 0x61, - 0x0a, 0xd0, 0xd1, 0x75, 0x98, 0xea, 0x13, 0x4a, 0xd5, 0x8e, 0x3b, 0x10, 0xf1, 0x7e, 0x64, 0xb6, - 0xea, 0x90, 0xb1, 0xcb, 0x47, 0x5b, 0x70, 0xde, 0x22, 0x2a, 0x15, 0xd3, 0xcc, 0xa2, 0xf2, 0x2e, - 0x7b, 0x05, 0x63, 0x4e, 0x39, 0x18, 0xd5, 0x6e, 0x64, 0xf9, 0x39, 0x61, 0x5d, 0x3c, 0x9a, 0xb9, - 0x10, 0x16, 0xea, 0xd0, 0x5d, 0x28, 0x0b, 0x1b, 0x81, 0x0d, 0x3b, 0x95, 0xf6, 0x92, 0xd8, 0x4d, - 0x79, 0x35, 0xba, 0x00, 0xc7, 0x65, 0xe4, 0xfb, 0x50, 0x70, 0x81, 0x01, 0xaa, 0xc0, 0x44, 0xe0, - 0xbd, 0xe5, 0x38, 0xce, 0x29, 0x91, 0xc0, 0xe4, 0x92, 0x03, 0x23, 0xff, 0x5e, 0x82, 0x57, 0x12, - 0x9a, 0x12, 0xba, 0x04, 0xf9, 0xa1, 0xd5, 0x13, 0x21, 0x98, 0x1a, 0x8f, 0x6a, 0xf9, 0x0f, 0xf1, - 0x0a, 0x66, 0x34, 0xa4, 0xc2, 0x14, 0x75, 0xc6, 0x53, 0x22, 0x99, 0x6e, 0x65, 0x3f, 0xf1, 0xe8, - 0x5c, 0x4b, 0x29, 0xb1, 0x33, 0x70, 0xa9, 0xae, 0x5e, 0xb4, 0x08, 0x05, 0x4d, 0x55, 0x86, 0x46, - 0xab, 0xe7, 0x9c, 0xd7, 0xb4, 0xf3, 0xc6, 0x5b, 0x6e, 0x3a, 0x34, 0xec, 0x71, 0x95, 0xb5, 0x27, - 0xfb, 0xd5, 0x73, 0x9f, 0xef, 0x57, 0xcf, 0x3d, 0xdd, 0xaf, 0x9e, 0xfb, 0xf1, 0xb8, 0x2a, 0x3d, - 0x19, 0x57, 0xa5, 0xcf, 0xc7, 0x55, 0xe9, 0xe9, 0xb8, 0x2a, 0xfd, 0x65, 0x5c, 0x95, 0x7e, 0xfe, - 0x45, 0xf5, 0xdc, 0x77, 0x16, 0xb3, 0xfe, 0x98, 0xf5, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x13, - 0x7c, 0x49, 0xa4, 0xf7, 0x2a, 0x00, 0x00, -} +func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } func (m *ApplyConfiguration) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/admissionregistration/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/admissionregistration/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..67b85ac629cb6 --- /dev/null +++ b/staging/src/k8s.io/api/admissionregistration/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,90 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*ApplyConfiguration) ProtoMessage() {} + +func (*AuditAnnotation) ProtoMessage() {} + +func (*ExpressionWarning) ProtoMessage() {} + +func (*JSONPatch) ProtoMessage() {} + +func (*MatchCondition) ProtoMessage() {} + +func (*MatchResources) ProtoMessage() {} + +func (*MutatingAdmissionPolicy) ProtoMessage() {} + +func (*MutatingAdmissionPolicyBinding) ProtoMessage() {} + +func (*MutatingAdmissionPolicyBindingList) ProtoMessage() {} + +func (*MutatingAdmissionPolicyBindingSpec) ProtoMessage() {} + +func (*MutatingAdmissionPolicyList) ProtoMessage() {} + +func (*MutatingAdmissionPolicySpec) ProtoMessage() {} + +func (*MutatingWebhook) ProtoMessage() {} + +func (*MutatingWebhookConfiguration) ProtoMessage() {} + +func (*MutatingWebhookConfigurationList) ProtoMessage() {} + +func (*Mutation) ProtoMessage() {} + +func (*NamedRuleWithOperations) ProtoMessage() {} + +func (*ParamKind) ProtoMessage() {} + +func (*ParamRef) ProtoMessage() {} + +func (*ServiceReference) ProtoMessage() {} + +func (*TypeChecking) ProtoMessage() {} + +func (*ValidatingAdmissionPolicy) ProtoMessage() {} + +func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} + +func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} + +func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} + +func (*ValidatingAdmissionPolicyList) ProtoMessage() {} + +func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} + +func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} + +func (*ValidatingWebhook) ProtoMessage() {} + +func (*ValidatingWebhookConfiguration) ProtoMessage() {} + +func (*ValidatingWebhookConfigurationList) ProtoMessage() {} + +func (*Validation) ProtoMessage() {} + +func (*Variable) ProtoMessage() {} + +func (*WebhookClientConfig) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/admissionregistration/v1beta1/types.go b/staging/src/k8s.io/api/admissionregistration/v1beta1/types.go index cffdda82c9a52..ef7c41961aef7 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1beta1/types.go +++ b/staging/src/k8s.io/api/admissionregistration/v1beta1/types.go @@ -26,6 +26,7 @@ import ( type Rule = v1.Rule // ScopeType specifies a scope for a Rule. +// +enum type ScopeType = v1.ScopeType const ( @@ -1072,16 +1073,18 @@ type MutatingWebhook struct { MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,12,rep,name=matchConditions"` } -// ReinvocationPolicyType specifies what type of policy the admission hook uses. +// ReinvocationPolicyType specifies what type of policy is used when other admission plugins also perform +// modifications. +// +enum type ReinvocationPolicyType = v1.ReinvocationPolicyType const ( - // NeverReinvocationPolicy indicates that the webhook must not be called more than once in a + // NeverReinvocationPolicy indicates that the mutation must not be called more than once in a // single admission evaluation. NeverReinvocationPolicy ReinvocationPolicyType = "Never" - // IfNeededReinvocationPolicy indicates that the webhook may be called at least one + // IfNeededReinvocationPolicy indicates that the mutation may be called at least one // additional time as part of the admission evaluation if the object being admitted is - // modified by other admission plugins after the initial webhook call. + // modified by other admission plugins after the initial mutation call. IfNeededReinvocationPolicy ReinvocationPolicyType = "IfNeeded" ) diff --git a/staging/src/k8s.io/api/admissionregistration/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/admissionregistration/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..f747248e9c85d --- /dev/null +++ b/staging/src/k8s.io/api/admissionregistration/v1beta1/zz_generated.model_name.go @@ -0,0 +1,192 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ApplyConfiguration) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.ApplyConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AuditAnnotation) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.AuditAnnotation" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExpressionWarning) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.ExpressionWarning" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JSONPatch) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.JSONPatch" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MatchCondition) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.MatchCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MatchResources) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.MatchResources" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingAdmissionPolicy) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.MutatingAdmissionPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingAdmissionPolicyBinding) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.MutatingAdmissionPolicyBinding" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingAdmissionPolicyBindingList) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.MutatingAdmissionPolicyBindingList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingAdmissionPolicyBindingSpec) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.MutatingAdmissionPolicyBindingSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingAdmissionPolicyList) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.MutatingAdmissionPolicyList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingAdmissionPolicySpec) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.MutatingAdmissionPolicySpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingWebhook) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.MutatingWebhook" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingWebhookConfiguration) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.MutatingWebhookConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MutatingWebhookConfigurationList) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.MutatingWebhookConfigurationList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Mutation) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.Mutation" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NamedRuleWithOperations) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.NamedRuleWithOperations" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ParamKind) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.ParamKind" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ParamRef) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.ParamRef" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceReference) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.ServiceReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TypeChecking) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.TypeChecking" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicy) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicyBinding) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicyBindingList) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicyBindingSpec) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicyList) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicySpec) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicySpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingAdmissionPolicyStatus) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingWebhook) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.ValidatingWebhook" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingWebhookConfiguration) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.ValidatingWebhookConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidatingWebhookConfigurationList) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.ValidatingWebhookConfigurationList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Validation) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.Validation" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Variable) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.Variable" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in WebhookClientConfig) OpenAPIModelName() string { + return "io.k8s.api.admissionregistration.v1beta1.WebhookClientConfig" +} diff --git a/staging/src/k8s.io/api/apidiscovery/v2/doc.go b/staging/src/k8s.io/api/apidiscovery/v2/doc.go index f46d33e942f2e..9d30b342a785c 100644 --- a/staging/src/k8s.io/api/apidiscovery/v2/doc.go +++ b/staging/src/k8s.io/api/apidiscovery/v2/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.apidiscovery.v2 + // +groupName=apidiscovery.k8s.io package v2 diff --git a/staging/src/k8s.io/api/apidiscovery/v2/generated.pb.go b/staging/src/k8s.io/api/apidiscovery/v2/generated.pb.go index 5c37feaa2ea3e..5056c8a49bccd 100644 --- a/staging/src/k8s.io/api/apidiscovery/v2/generated.pb.go +++ b/staging/src/k8s.io/api/apidiscovery/v2/generated.pb.go @@ -24,227 +24,22 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *APIGroupDiscovery) Reset() { *m = APIGroupDiscovery{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *APIGroupDiscoveryList) Reset() { *m = APIGroupDiscoveryList{} } -func (m *APIGroupDiscovery) Reset() { *m = APIGroupDiscovery{} } -func (*APIGroupDiscovery) ProtoMessage() {} -func (*APIGroupDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_e0b7287280068d8f, []int{0} -} -func (m *APIGroupDiscovery) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APIGroupDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *APIGroupDiscovery) XXX_Merge(src proto.Message) { - xxx_messageInfo_APIGroupDiscovery.Merge(m, src) -} -func (m *APIGroupDiscovery) XXX_Size() int { - return m.Size() -} -func (m *APIGroupDiscovery) XXX_DiscardUnknown() { - xxx_messageInfo_APIGroupDiscovery.DiscardUnknown(m) -} - -var xxx_messageInfo_APIGroupDiscovery proto.InternalMessageInfo - -func (m *APIGroupDiscoveryList) Reset() { *m = APIGroupDiscoveryList{} } -func (*APIGroupDiscoveryList) ProtoMessage() {} -func (*APIGroupDiscoveryList) Descriptor() ([]byte, []int) { - return fileDescriptor_e0b7287280068d8f, []int{1} -} -func (m *APIGroupDiscoveryList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APIGroupDiscoveryList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *APIGroupDiscoveryList) XXX_Merge(src proto.Message) { - xxx_messageInfo_APIGroupDiscoveryList.Merge(m, src) -} -func (m *APIGroupDiscoveryList) XXX_Size() int { - return m.Size() -} -func (m *APIGroupDiscoveryList) XXX_DiscardUnknown() { - xxx_messageInfo_APIGroupDiscoveryList.DiscardUnknown(m) -} - -var xxx_messageInfo_APIGroupDiscoveryList proto.InternalMessageInfo - -func (m *APIResourceDiscovery) Reset() { *m = APIResourceDiscovery{} } -func (*APIResourceDiscovery) ProtoMessage() {} -func (*APIResourceDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_e0b7287280068d8f, []int{2} -} -func (m *APIResourceDiscovery) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APIResourceDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *APIResourceDiscovery) XXX_Merge(src proto.Message) { - xxx_messageInfo_APIResourceDiscovery.Merge(m, src) -} -func (m *APIResourceDiscovery) XXX_Size() int { - return m.Size() -} -func (m *APIResourceDiscovery) XXX_DiscardUnknown() { - xxx_messageInfo_APIResourceDiscovery.DiscardUnknown(m) -} +func (m *APIResourceDiscovery) Reset() { *m = APIResourceDiscovery{} } -var xxx_messageInfo_APIResourceDiscovery proto.InternalMessageInfo +func (m *APISubresourceDiscovery) Reset() { *m = APISubresourceDiscovery{} } -func (m *APISubresourceDiscovery) Reset() { *m = APISubresourceDiscovery{} } -func (*APISubresourceDiscovery) ProtoMessage() {} -func (*APISubresourceDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_e0b7287280068d8f, []int{3} -} -func (m *APISubresourceDiscovery) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APISubresourceDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *APISubresourceDiscovery) XXX_Merge(src proto.Message) { - xxx_messageInfo_APISubresourceDiscovery.Merge(m, src) -} -func (m *APISubresourceDiscovery) XXX_Size() int { - return m.Size() -} -func (m *APISubresourceDiscovery) XXX_DiscardUnknown() { - xxx_messageInfo_APISubresourceDiscovery.DiscardUnknown(m) -} - -var xxx_messageInfo_APISubresourceDiscovery proto.InternalMessageInfo - -func (m *APIVersionDiscovery) Reset() { *m = APIVersionDiscovery{} } -func (*APIVersionDiscovery) ProtoMessage() {} -func (*APIVersionDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_e0b7287280068d8f, []int{4} -} -func (m *APIVersionDiscovery) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APIVersionDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *APIVersionDiscovery) XXX_Merge(src proto.Message) { - xxx_messageInfo_APIVersionDiscovery.Merge(m, src) -} -func (m *APIVersionDiscovery) XXX_Size() int { - return m.Size() -} -func (m *APIVersionDiscovery) XXX_DiscardUnknown() { - xxx_messageInfo_APIVersionDiscovery.DiscardUnknown(m) -} - -var xxx_messageInfo_APIVersionDiscovery proto.InternalMessageInfo - -func init() { - proto.RegisterType((*APIGroupDiscovery)(nil), "k8s.io.api.apidiscovery.v2.APIGroupDiscovery") - proto.RegisterType((*APIGroupDiscoveryList)(nil), "k8s.io.api.apidiscovery.v2.APIGroupDiscoveryList") - proto.RegisterType((*APIResourceDiscovery)(nil), "k8s.io.api.apidiscovery.v2.APIResourceDiscovery") - proto.RegisterType((*APISubresourceDiscovery)(nil), "k8s.io.api.apidiscovery.v2.APISubresourceDiscovery") - proto.RegisterType((*APIVersionDiscovery)(nil), "k8s.io.api.apidiscovery.v2.APIVersionDiscovery") -} - -func init() { - proto.RegisterFile("k8s.io/api/apidiscovery/v2/generated.proto", fileDescriptor_e0b7287280068d8f) -} - -var fileDescriptor_e0b7287280068d8f = []byte{ - // 736 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x4e, 0xdb, 0x4c, - 0x14, 0x8d, 0x09, 0xf9, 0x48, 0x26, 0xc9, 0xd7, 0x30, 0x80, 0x6a, 0x65, 0xe1, 0xa0, 0x6c, 0x4a, - 0xab, 0x32, 0x86, 0x94, 0xa2, 0x2e, 0x9b, 0x94, 0xb6, 0x8a, 0xfa, 0x87, 0x26, 0x15, 0x8b, 0xaa, - 0x95, 0xea, 0x38, 0x83, 0xe3, 0x82, 0x7f, 0x34, 0xe3, 0x44, 0x62, 0xd7, 0x47, 0xe8, 0x13, 0xf4, - 0x79, 0xe8, 0x8e, 0x05, 0x0b, 0x56, 0x51, 0x49, 0x77, 0x7d, 0x04, 0x56, 0xd5, 0x8c, 0xc7, 0x3f, - 0x21, 0x44, 0x41, 0x5d, 0x74, 0x81, 0x84, 0xcf, 0x9c, 0x73, 0xee, 0x3d, 0xd7, 0xd7, 0x13, 0xf0, - 0xe0, 0xe8, 0x09, 0x43, 0xb6, 0xa7, 0x1b, 0xbe, 0xcd, 0xff, 0x7a, 0x36, 0x33, 0xbd, 0x21, 0xa1, - 0x27, 0xfa, 0xb0, 0xa1, 0x5b, 0xc4, 0x25, 0xd4, 0x08, 0x48, 0x0f, 0xf9, 0xd4, 0x0b, 0x3c, 0x58, - 0x0d, 0xb9, 0xc8, 0xf0, 0x6d, 0x94, 0xe6, 0xa2, 0x61, 0xa3, 0xba, 0x69, 0xd9, 0x41, 0x7f, 0xd0, - 0x45, 0xa6, 0xe7, 0xe8, 0x96, 0x67, 0x79, 0xba, 0x90, 0x74, 0x07, 0x87, 0xe2, 0x49, 0x3c, 0x88, - 0xff, 0x42, 0xab, 0xea, 0x4e, 0x52, 0xd6, 0x31, 0xcc, 0xbe, 0xed, 0xf2, 0x92, 0xfe, 0x91, 0xc5, - 0x01, 0xa6, 0x3b, 0x24, 0x30, 0xf4, 0xe1, 0xf6, 0xf5, 0x06, 0xaa, 0xfa, 0x2c, 0x15, 0x1d, 0xb8, - 0x81, 0xed, 0x90, 0x29, 0xc1, 0xee, 0x3c, 0x01, 0x33, 0xfb, 0xc4, 0x31, 0xae, 0xeb, 0xea, 0xe7, - 0x0a, 0x58, 0x6e, 0xee, 0xb7, 0x5f, 0x52, 0x6f, 0xe0, 0xef, 0x45, 0x31, 0xe1, 0x67, 0x90, 0xe7, - 0x9d, 0xf5, 0x8c, 0xc0, 0x50, 0x95, 0x75, 0x65, 0xa3, 0xd8, 0xd8, 0x42, 0xc9, 0x48, 0xe2, 0x02, - 0xc8, 0x3f, 0xb2, 0x38, 0xc0, 0x10, 0x67, 0xa3, 0xe1, 0x36, 0x7a, 0xd7, 0xfd, 0x42, 0xcc, 0xe0, - 0x0d, 0x09, 0x8c, 0x16, 0x3c, 0x1d, 0xd5, 0x32, 0xe3, 0x51, 0x0d, 0x24, 0x18, 0x8e, 0x5d, 0xe1, - 0x27, 0x90, 0x1f, 0x12, 0xca, 0x6c, 0xcf, 0x65, 0xea, 0xc2, 0x7a, 0x76, 0xa3, 0xd8, 0xd0, 0xd1, - 0xec, 0xa1, 0xa3, 0xe6, 0x7e, 0xfb, 0x20, 0xa4, 0xc7, 0x4d, 0xb6, 0x2a, 0xb2, 0x40, 0x5e, 0x9e, - 0x30, 0x1c, 0x5b, 0xd6, 0x7f, 0x28, 0x60, 0x6d, 0x2a, 0xd6, 0x6b, 0x9b, 0x05, 0xf0, 0xe3, 0x54, - 0x34, 0x74, 0xbb, 0x68, 0x5c, 0x2d, 0x82, 0xc5, 0x75, 0x23, 0x24, 0x15, 0x0b, 0x83, 0x9c, 0x1d, - 0x10, 0x27, 0xca, 0xb4, 0x39, 0x27, 0xd3, 0x64, 0x7f, 0xad, 0xb2, 0x74, 0xce, 0xb5, 0xb9, 0x07, - 0x0e, 0xad, 0xea, 0xdf, 0x17, 0xc1, 0x6a, 0x73, 0xbf, 0x8d, 0x09, 0xf3, 0x06, 0xd4, 0x24, 0xc9, - 0x5b, 0x7a, 0x08, 0xf2, 0x54, 0x82, 0x22, 0x4a, 0x21, 0x69, 0x2d, 0x22, 0xe3, 0x98, 0x01, 0x8f, - 0x41, 0x89, 0x12, 0xe6, 0x7b, 0x2e, 0x23, 0xaf, 0x6c, 0xb7, 0xa7, 0x2e, 0x88, 0xf0, 0xbb, 0xb7, - 0x0b, 0x2f, 0x1a, 0x95, 0x73, 0xe6, 0xea, 0x56, 0x65, 0x3c, 0xaa, 0x95, 0x70, 0xca, 0x0f, 0x4f, - 0xb8, 0xc3, 0x1d, 0x90, 0x63, 0xa6, 0xe7, 0x13, 0x35, 0x2b, 0x1a, 0xd3, 0xa2, 0x64, 0x1d, 0x0e, - 0x5e, 0x8d, 0x6a, 0xe5, 0xa8, 0x43, 0x01, 0xe0, 0x90, 0x0c, 0xf7, 0x40, 0x85, 0xd9, 0xae, 0x35, - 0x38, 0x36, 0x68, 0x74, 0xae, 0x2e, 0x0a, 0x03, 0x55, 0x1a, 0x54, 0x3a, 0xd7, 0xce, 0xf1, 0x94, - 0x02, 0xd6, 0x40, 0x6e, 0x48, 0x68, 0x97, 0xa9, 0xb9, 0xf5, 0xec, 0x46, 0xa1, 0x55, 0xe0, 0x75, - 0x0f, 0x38, 0x80, 0x43, 0x1c, 0x22, 0x00, 0x58, 0xdf, 0xa3, 0xc1, 0x5b, 0xc3, 0x21, 0x4c, 0xfd, - 0x4f, 0xb0, 0xfe, 0xe7, 0xab, 0xda, 0x89, 0x51, 0x9c, 0x62, 0x70, 0xbe, 0x69, 0x04, 0xc4, 0xf2, - 0xa8, 0x4d, 0x98, 0xba, 0x94, 0xf0, 0x9f, 0xc5, 0x28, 0x4e, 0x31, 0xa0, 0x03, 0x4a, 0x6c, 0xd0, - 0x8d, 0x26, 0xcf, 0xd4, 0xbc, 0x58, 0x86, 0x47, 0x73, 0x96, 0xa1, 0x93, 0x48, 0x92, 0x95, 0x58, - 0x95, 0xb9, 0x4b, 0xa9, 0x53, 0x86, 0x27, 0xec, 0xeb, 0xe7, 0x0b, 0xe0, 0xee, 0x0c, 0x3d, 0x7c, - 0x0c, 0x8a, 0x29, 0xae, 0x5c, 0x93, 0x15, 0x69, 0x5a, 0x4c, 0x49, 0x70, 0x9a, 0xf7, 0x8f, 0x97, - 0x85, 0x81, 0xb2, 0x61, 0x9a, 0xc4, 0x0f, 0x48, 0xef, 0xfd, 0x89, 0x4f, 0x98, 0x9a, 0x15, 0x03, - 0xfb, 0xdb, 0x72, 0x6b, 0x32, 0x5e, 0xb9, 0x99, 0x36, 0xc5, 0x93, 0x35, 0x92, 0x2d, 0x59, 0xbc, - 0x79, 0x4b, 0xea, 0xbf, 0x15, 0xb0, 0x72, 0xc3, 0xbd, 0x03, 0xef, 0x83, 0x25, 0x79, 0xcf, 0xc8, - 0x71, 0xde, 0x91, 0xf5, 0x96, 0x24, 0x15, 0x47, 0xe7, 0xd0, 0x00, 0x85, 0x64, 0x0b, 0xc2, 0x2b, - 0x61, 0x6b, 0xce, 0x16, 0x4c, 0x7d, 0xe6, 0xad, 0x65, 0x69, 0x5f, 0xc0, 0xf1, 0xfb, 0x4f, 0x5c, - 0xe1, 0x73, 0x50, 0x38, 0xa4, 0x84, 0xf5, 0x5d, 0xc2, 0x98, 0xfc, 0xd8, 0xee, 0x45, 0x82, 0x17, - 0xd1, 0xc1, 0xd5, 0xa8, 0x06, 0x63, 0xc3, 0x18, 0xc5, 0x89, 0xb2, 0xf5, 0xf4, 0xf4, 0x52, 0xcb, - 0x9c, 0x5d, 0x6a, 0x99, 0x8b, 0x4b, 0x2d, 0xf3, 0x75, 0xac, 0x29, 0xa7, 0x63, 0x4d, 0x39, 0x1b, - 0x6b, 0xca, 0xc5, 0x58, 0x53, 0x7e, 0x8e, 0x35, 0xe5, 0xdb, 0x2f, 0x2d, 0xf3, 0xa1, 0x3a, 0xfb, - 0x37, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x35, 0x6a, 0x0f, 0x60, 0x07, 0x00, 0x00, -} +func (m *APIVersionDiscovery) Reset() { *m = APIVersionDiscovery{} } func (m *APIGroupDiscovery) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/apidiscovery/v2/generated.protomessage.pb.go b/staging/src/k8s.io/api/apidiscovery/v2/generated.protomessage.pb.go new file mode 100644 index 0000000000000..35fe0d2a8ad18 --- /dev/null +++ b/staging/src/k8s.io/api/apidiscovery/v2/generated.protomessage.pb.go @@ -0,0 +1,32 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v2 + +func (*APIGroupDiscovery) ProtoMessage() {} + +func (*APIGroupDiscoveryList) ProtoMessage() {} + +func (*APIResourceDiscovery) ProtoMessage() {} + +func (*APISubresourceDiscovery) ProtoMessage() {} + +func (*APIVersionDiscovery) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/apidiscovery/v2/zz_generated.model_name.go b/staging/src/k8s.io/api/apidiscovery/v2/zz_generated.model_name.go new file mode 100644 index 0000000000000..40724b0fd7dfc --- /dev/null +++ b/staging/src/k8s.io/api/apidiscovery/v2/zz_generated.model_name.go @@ -0,0 +1,47 @@ +//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 openapi-gen. DO NOT EDIT. + +package v2 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in APIGroupDiscovery) OpenAPIModelName() string { + return "io.k8s.api.apidiscovery.v2.APIGroupDiscovery" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in APIGroupDiscoveryList) OpenAPIModelName() string { + return "io.k8s.api.apidiscovery.v2.APIGroupDiscoveryList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in APIResourceDiscovery) OpenAPIModelName() string { + return "io.k8s.api.apidiscovery.v2.APIResourceDiscovery" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in APISubresourceDiscovery) OpenAPIModelName() string { + return "io.k8s.api.apidiscovery.v2.APISubresourceDiscovery" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in APIVersionDiscovery) OpenAPIModelName() string { + return "io.k8s.api.apidiscovery.v2.APIVersionDiscovery" +} diff --git a/staging/src/k8s.io/api/apidiscovery/v2beta1/doc.go b/staging/src/k8s.io/api/apidiscovery/v2beta1/doc.go index d4fceab68d428..244986bb419f4 100644 --- a/staging/src/k8s.io/api/apidiscovery/v2beta1/doc.go +++ b/staging/src/k8s.io/api/apidiscovery/v2beta1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.apidiscovery.v2beta1 // +groupName=apidiscovery.k8s.io diff --git a/staging/src/k8s.io/api/apidiscovery/v2beta1/generated.pb.go b/staging/src/k8s.io/api/apidiscovery/v2beta1/generated.pb.go index 398c5f94f2af4..8994f570f51c7 100644 --- a/staging/src/k8s.io/api/apidiscovery/v2beta1/generated.pb.go +++ b/staging/src/k8s.io/api/apidiscovery/v2beta1/generated.pb.go @@ -24,228 +24,22 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *APIGroupDiscovery) Reset() { *m = APIGroupDiscovery{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *APIGroupDiscoveryList) Reset() { *m = APIGroupDiscoveryList{} } -func (m *APIGroupDiscovery) Reset() { *m = APIGroupDiscovery{} } -func (*APIGroupDiscovery) ProtoMessage() {} -func (*APIGroupDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_48661e6ba3d554f3, []int{0} -} -func (m *APIGroupDiscovery) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APIGroupDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *APIGroupDiscovery) XXX_Merge(src proto.Message) { - xxx_messageInfo_APIGroupDiscovery.Merge(m, src) -} -func (m *APIGroupDiscovery) XXX_Size() int { - return m.Size() -} -func (m *APIGroupDiscovery) XXX_DiscardUnknown() { - xxx_messageInfo_APIGroupDiscovery.DiscardUnknown(m) -} - -var xxx_messageInfo_APIGroupDiscovery proto.InternalMessageInfo - -func (m *APIGroupDiscoveryList) Reset() { *m = APIGroupDiscoveryList{} } -func (*APIGroupDiscoveryList) ProtoMessage() {} -func (*APIGroupDiscoveryList) Descriptor() ([]byte, []int) { - return fileDescriptor_48661e6ba3d554f3, []int{1} -} -func (m *APIGroupDiscoveryList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APIGroupDiscoveryList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *APIGroupDiscoveryList) XXX_Merge(src proto.Message) { - xxx_messageInfo_APIGroupDiscoveryList.Merge(m, src) -} -func (m *APIGroupDiscoveryList) XXX_Size() int { - return m.Size() -} -func (m *APIGroupDiscoveryList) XXX_DiscardUnknown() { - xxx_messageInfo_APIGroupDiscoveryList.DiscardUnknown(m) -} - -var xxx_messageInfo_APIGroupDiscoveryList proto.InternalMessageInfo - -func (m *APIResourceDiscovery) Reset() { *m = APIResourceDiscovery{} } -func (*APIResourceDiscovery) ProtoMessage() {} -func (*APIResourceDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_48661e6ba3d554f3, []int{2} -} -func (m *APIResourceDiscovery) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APIResourceDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *APIResourceDiscovery) XXX_Merge(src proto.Message) { - xxx_messageInfo_APIResourceDiscovery.Merge(m, src) -} -func (m *APIResourceDiscovery) XXX_Size() int { - return m.Size() -} -func (m *APIResourceDiscovery) XXX_DiscardUnknown() { - xxx_messageInfo_APIResourceDiscovery.DiscardUnknown(m) -} +func (m *APIResourceDiscovery) Reset() { *m = APIResourceDiscovery{} } -var xxx_messageInfo_APIResourceDiscovery proto.InternalMessageInfo +func (m *APISubresourceDiscovery) Reset() { *m = APISubresourceDiscovery{} } -func (m *APISubresourceDiscovery) Reset() { *m = APISubresourceDiscovery{} } -func (*APISubresourceDiscovery) ProtoMessage() {} -func (*APISubresourceDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_48661e6ba3d554f3, []int{3} -} -func (m *APISubresourceDiscovery) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APISubresourceDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *APISubresourceDiscovery) XXX_Merge(src proto.Message) { - xxx_messageInfo_APISubresourceDiscovery.Merge(m, src) -} -func (m *APISubresourceDiscovery) XXX_Size() int { - return m.Size() -} -func (m *APISubresourceDiscovery) XXX_DiscardUnknown() { - xxx_messageInfo_APISubresourceDiscovery.DiscardUnknown(m) -} - -var xxx_messageInfo_APISubresourceDiscovery proto.InternalMessageInfo - -func (m *APIVersionDiscovery) Reset() { *m = APIVersionDiscovery{} } -func (*APIVersionDiscovery) ProtoMessage() {} -func (*APIVersionDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_48661e6ba3d554f3, []int{4} -} -func (m *APIVersionDiscovery) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APIVersionDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *APIVersionDiscovery) XXX_Merge(src proto.Message) { - xxx_messageInfo_APIVersionDiscovery.Merge(m, src) -} -func (m *APIVersionDiscovery) XXX_Size() int { - return m.Size() -} -func (m *APIVersionDiscovery) XXX_DiscardUnknown() { - xxx_messageInfo_APIVersionDiscovery.DiscardUnknown(m) -} - -var xxx_messageInfo_APIVersionDiscovery proto.InternalMessageInfo - -func init() { - proto.RegisterType((*APIGroupDiscovery)(nil), "k8s.io.api.apidiscovery.v2beta1.APIGroupDiscovery") - proto.RegisterType((*APIGroupDiscoveryList)(nil), "k8s.io.api.apidiscovery.v2beta1.APIGroupDiscoveryList") - proto.RegisterType((*APIResourceDiscovery)(nil), "k8s.io.api.apidiscovery.v2beta1.APIResourceDiscovery") - proto.RegisterType((*APISubresourceDiscovery)(nil), "k8s.io.api.apidiscovery.v2beta1.APISubresourceDiscovery") - proto.RegisterType((*APIVersionDiscovery)(nil), "k8s.io.api.apidiscovery.v2beta1.APIVersionDiscovery") -} - -func init() { - proto.RegisterFile("k8s.io/api/apidiscovery/v2beta1/generated.proto", fileDescriptor_48661e6ba3d554f3) -} - -var fileDescriptor_48661e6ba3d554f3 = []byte{ - // 740 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x4e, 0xdb, 0x4a, - 0x18, 0x8d, 0x09, 0xb9, 0x24, 0x93, 0xe4, 0xde, 0x30, 0x80, 0xae, 0xc5, 0xc2, 0x46, 0xd9, 0x5c, - 0xae, 0xd4, 0x8e, 0x4b, 0x04, 0x88, 0x6d, 0x52, 0x68, 0x15, 0xf5, 0x0f, 0x4d, 0x2a, 0x2a, 0x55, - 0x5d, 0xd4, 0x71, 0x06, 0xc7, 0x85, 0xd8, 0xd6, 0xcc, 0x24, 0x12, 0xbb, 0x3e, 0x42, 0xdf, 0xa1, - 0x2f, 0xc3, 0xaa, 0x62, 0xd1, 0x05, 0xdd, 0x44, 0x25, 0x7d, 0x80, 0xee, 0x59, 0x55, 0x33, 0x1e, - 0xff, 0x84, 0x80, 0x88, 0xba, 0xe8, 0x22, 0x52, 0x7c, 0xe6, 0x9c, 0xf3, 0x7d, 0xe7, 0xcb, 0xe7, - 0x09, 0xb0, 0x4e, 0xf6, 0x18, 0xf2, 0x02, 0xcb, 0x0e, 0x3d, 0xf1, 0xe9, 0x79, 0xcc, 0x09, 0x46, - 0x84, 0x9e, 0x59, 0xa3, 0x46, 0x97, 0x70, 0x7b, 0xcb, 0x72, 0x89, 0x4f, 0xa8, 0xcd, 0x49, 0x0f, - 0x85, 0x34, 0xe0, 0x01, 0x34, 0x23, 0x01, 0xb2, 0x43, 0x0f, 0x65, 0x05, 0x48, 0x09, 0xd6, 0x1f, - 0xba, 0x1e, 0xef, 0x0f, 0xbb, 0xc8, 0x09, 0x06, 0x96, 0x1b, 0xb8, 0x81, 0x25, 0x75, 0xdd, 0xe1, - 0xb1, 0x7c, 0x92, 0x0f, 0xf2, 0x5b, 0xe4, 0xb7, 0xbe, 0x9d, 0x36, 0x30, 0xb0, 0x9d, 0xbe, 0xe7, - 0x8b, 0xe2, 0xe1, 0x89, 0x2b, 0x00, 0x66, 0x0d, 0x08, 0xb7, 0xad, 0xd1, 0x4c, 0x17, 0xeb, 0xd6, - 0x5d, 0x2a, 0x3a, 0xf4, 0xb9, 0x37, 0x20, 0x33, 0x82, 0xdd, 0xfb, 0x04, 0xcc, 0xe9, 0x93, 0x81, - 0x7d, 0x53, 0x57, 0xff, 0xa6, 0x81, 0xe5, 0xe6, 0x61, 0xfb, 0x29, 0x0d, 0x86, 0xe1, 0x7e, 0x9c, - 0x15, 0xbe, 0x07, 0x45, 0xd1, 0x59, 0xcf, 0xe6, 0xb6, 0xae, 0x6d, 0x68, 0x9b, 0xe5, 0xc6, 0x23, - 0x94, 0xce, 0x25, 0x29, 0x80, 0xc2, 0x13, 0x57, 0x00, 0x0c, 0x09, 0x36, 0x1a, 0x6d, 0xa1, 0x57, - 0xdd, 0x0f, 0xc4, 0xe1, 0x2f, 0x08, 0xb7, 0x5b, 0xf0, 0x7c, 0x6c, 0xe6, 0x26, 0x63, 0x13, 0xa4, - 0x18, 0x4e, 0x5c, 0x61, 0x17, 0x14, 0x47, 0x84, 0x32, 0x2f, 0xf0, 0x99, 0xbe, 0xb0, 0x91, 0xdf, - 0x2c, 0x37, 0xb6, 0xd1, 0x3d, 0x93, 0x47, 0xcd, 0xc3, 0xf6, 0x51, 0xa4, 0x49, 0x3a, 0x6d, 0xd5, - 0x54, 0x95, 0xa2, 0x3a, 0x61, 0x38, 0xf1, 0xad, 0x7f, 0xd1, 0xc0, 0xda, 0x4c, 0xb6, 0xe7, 0x1e, - 0xe3, 0xf0, 0xdd, 0x4c, 0x3e, 0x34, 0x5f, 0x3e, 0xa1, 0x96, 0xe9, 0x92, 0xba, 0x31, 0x92, 0xc9, - 0xf6, 0x06, 0x14, 0x3c, 0x4e, 0x06, 0x71, 0xb0, 0xc6, 0x3c, 0xc1, 0xa6, 0x9b, 0x6c, 0x55, 0x95, - 0x7d, 0xa1, 0x2d, 0x8c, 0x70, 0xe4, 0x57, 0xff, 0xbc, 0x08, 0x56, 0x9b, 0x87, 0x6d, 0x4c, 0x58, - 0x30, 0xa4, 0x0e, 0x49, 0x7f, 0xaf, 0x07, 0xa0, 0x48, 0x15, 0x28, 0xf3, 0x94, 0xd2, 0xfe, 0x62, - 0x32, 0x4e, 0x18, 0xf0, 0x14, 0x54, 0x28, 0x61, 0x61, 0xe0, 0x33, 0xf2, 0xcc, 0xf3, 0x7b, 0xfa, - 0x82, 0x9c, 0xc0, 0xee, 0x7c, 0x13, 0x90, 0x8d, 0xaa, 0x61, 0x0b, 0x75, 0xab, 0x36, 0x19, 0x9b, - 0x15, 0x9c, 0xf1, 0xc3, 0x53, 0xee, 0x70, 0x1b, 0x14, 0x98, 0x13, 0x84, 0x44, 0xcf, 0xcb, 0xc6, - 0x8c, 0x38, 0x59, 0x47, 0x80, 0xd7, 0x63, 0xb3, 0x1a, 0x77, 0x28, 0x01, 0x1c, 0x91, 0xe1, 0x3e, - 0xa8, 0x31, 0xcf, 0x77, 0x87, 0xa7, 0x36, 0x8d, 0xcf, 0xf5, 0x45, 0x69, 0xa0, 0x2b, 0x83, 0x5a, - 0xe7, 0xc6, 0x39, 0x9e, 0x51, 0x40, 0x13, 0x14, 0x46, 0x84, 0x76, 0x99, 0x5e, 0xd8, 0xc8, 0x6f, - 0x96, 0x5a, 0x25, 0x51, 0xf7, 0x48, 0x00, 0x38, 0xc2, 0x21, 0x02, 0x80, 0xf5, 0x03, 0xca, 0x5f, - 0xda, 0x03, 0xc2, 0xf4, 0xbf, 0x24, 0xeb, 0x6f, 0xb1, 0xb4, 0x9d, 0x04, 0xc5, 0x19, 0x86, 0xe0, - 0x3b, 0x36, 0x27, 0x6e, 0x40, 0x3d, 0xc2, 0xf4, 0xa5, 0x94, 0xff, 0x38, 0x41, 0x71, 0x86, 0x01, - 0x29, 0xa8, 0xb0, 0x61, 0x37, 0x9e, 0x3c, 0xd3, 0x8b, 0x72, 0x23, 0xf6, 0xe6, 0xd9, 0x88, 0x4e, - 0xaa, 0x4b, 0xf7, 0x62, 0x55, 0x85, 0xaf, 0x64, 0x4e, 0x19, 0x9e, 0xaa, 0x51, 0xff, 0xba, 0x00, - 0xfe, 0xbd, 0x43, 0x0f, 0x77, 0x40, 0x39, 0xc3, 0x55, 0xbb, 0xb2, 0xa2, 0x4c, 0xcb, 0x19, 0x09, - 0xce, 0xf2, 0xfe, 0xf0, 0xc6, 0x30, 0x50, 0xb5, 0x1d, 0x87, 0x84, 0x9c, 0xf4, 0x5e, 0x9f, 0x85, - 0x84, 0xe9, 0x79, 0x39, 0xb5, 0xdf, 0x2d, 0xb7, 0xa6, 0xe2, 0x55, 0x9b, 0x59, 0x53, 0x3c, 0x5d, - 0x23, 0x5d, 0x95, 0xc5, 0xdb, 0x57, 0xa5, 0xfe, 0x53, 0x03, 0x2b, 0xb7, 0xdc, 0x40, 0xf0, 0x7f, - 0xb0, 0xa4, 0x6e, 0x1c, 0x35, 0xce, 0x7f, 0x54, 0xbd, 0x25, 0x45, 0xc5, 0xf1, 0x39, 0x3c, 0x06, - 0xa5, 0x74, 0x15, 0xa2, 0xcb, 0x61, 0x67, 0x9e, 0x55, 0x98, 0x79, 0xe1, 0x5b, 0xcb, 0xaa, 0x46, - 0x09, 0x27, 0x4b, 0x90, 0x5a, 0xc3, 0x03, 0x50, 0x3a, 0xa6, 0x84, 0xf5, 0x7d, 0xc2, 0x98, 0x7a, - 0xed, 0xfe, 0x8b, 0x05, 0x4f, 0xe2, 0x83, 0xeb, 0xb1, 0x09, 0x13, 0xc3, 0x04, 0xc5, 0xa9, 0xb2, - 0x75, 0x70, 0x7e, 0x65, 0xe4, 0x2e, 0xae, 0x8c, 0xdc, 0xe5, 0x95, 0x91, 0xfb, 0x38, 0x31, 0xb4, - 0xf3, 0x89, 0xa1, 0x5d, 0x4c, 0x0c, 0xed, 0x72, 0x62, 0x68, 0xdf, 0x27, 0x86, 0xf6, 0xe9, 0x87, - 0x91, 0x7b, 0x6b, 0xde, 0xf3, 0x0f, 0xfb, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x85, 0x3b, 0x06, - 0x83, 0x07, 0x00, 0x00, -} +func (m *APIVersionDiscovery) Reset() { *m = APIVersionDiscovery{} } func (m *APIGroupDiscovery) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/apidiscovery/v2beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/apidiscovery/v2beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..0998c461bb8d1 --- /dev/null +++ b/staging/src/k8s.io/api/apidiscovery/v2beta1/generated.protomessage.pb.go @@ -0,0 +1,32 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v2beta1 + +func (*APIGroupDiscovery) ProtoMessage() {} + +func (*APIGroupDiscoveryList) ProtoMessage() {} + +func (*APIResourceDiscovery) ProtoMessage() {} + +func (*APISubresourceDiscovery) ProtoMessage() {} + +func (*APIVersionDiscovery) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/apidiscovery/v2beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/apidiscovery/v2beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..8054db78a2973 --- /dev/null +++ b/staging/src/k8s.io/api/apidiscovery/v2beta1/zz_generated.model_name.go @@ -0,0 +1,47 @@ +//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 openapi-gen. DO NOT EDIT. + +package v2beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in APIGroupDiscovery) OpenAPIModelName() string { + return "io.k8s.api.apidiscovery.v2beta1.APIGroupDiscovery" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in APIGroupDiscoveryList) OpenAPIModelName() string { + return "io.k8s.api.apidiscovery.v2beta1.APIGroupDiscoveryList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in APIResourceDiscovery) OpenAPIModelName() string { + return "io.k8s.api.apidiscovery.v2beta1.APIResourceDiscovery" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in APISubresourceDiscovery) OpenAPIModelName() string { + return "io.k8s.api.apidiscovery.v2beta1.APISubresourceDiscovery" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in APIVersionDiscovery) OpenAPIModelName() string { + return "io.k8s.api.apidiscovery.v2beta1.APIVersionDiscovery" +} diff --git a/staging/src/k8s.io/api/apiserverinternal/v1alpha1/doc.go b/staging/src/k8s.io/api/apiserverinternal/v1alpha1/doc.go index 867d74165143f..7a2253c8536dd 100644 --- a/staging/src/k8s.io/api/apiserverinternal/v1alpha1/doc.go +++ b/staging/src/k8s.io/api/apiserverinternal/v1alpha1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:openapi-model-package=io.k8s.api.apiserverinternal.v1alpha1 // +groupName=internal.apiserver.k8s.io diff --git a/staging/src/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go b/staging/src/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go index b0343ffcfb380..0c73dc29a7581 100644 --- a/staging/src/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go +++ b/staging/src/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go @@ -24,258 +24,22 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ServerStorageVersion) Reset() { *m = ServerStorageVersion{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *StorageVersion) Reset() { *m = StorageVersion{} } -func (m *ServerStorageVersion) Reset() { *m = ServerStorageVersion{} } -func (*ServerStorageVersion) ProtoMessage() {} -func (*ServerStorageVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_126bcbf538b54729, []int{0} -} -func (m *ServerStorageVersion) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServerStorageVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServerStorageVersion) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServerStorageVersion.Merge(m, src) -} -func (m *ServerStorageVersion) XXX_Size() int { - return m.Size() -} -func (m *ServerStorageVersion) XXX_DiscardUnknown() { - xxx_messageInfo_ServerStorageVersion.DiscardUnknown(m) -} +func (m *StorageVersionCondition) Reset() { *m = StorageVersionCondition{} } -var xxx_messageInfo_ServerStorageVersion proto.InternalMessageInfo +func (m *StorageVersionList) Reset() { *m = StorageVersionList{} } -func (m *StorageVersion) Reset() { *m = StorageVersion{} } -func (*StorageVersion) ProtoMessage() {} -func (*StorageVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_126bcbf538b54729, []int{1} -} -func (m *StorageVersion) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StorageVersion) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageVersion.Merge(m, src) -} -func (m *StorageVersion) XXX_Size() int { - return m.Size() -} -func (m *StorageVersion) XXX_DiscardUnknown() { - xxx_messageInfo_StorageVersion.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageVersion proto.InternalMessageInfo +func (m *StorageVersionSpec) Reset() { *m = StorageVersionSpec{} } -func (m *StorageVersionCondition) Reset() { *m = StorageVersionCondition{} } -func (*StorageVersionCondition) ProtoMessage() {} -func (*StorageVersionCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_126bcbf538b54729, []int{2} -} -func (m *StorageVersionCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageVersionCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StorageVersionCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageVersionCondition.Merge(m, src) -} -func (m *StorageVersionCondition) XXX_Size() int { - return m.Size() -} -func (m *StorageVersionCondition) XXX_DiscardUnknown() { - xxx_messageInfo_StorageVersionCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageVersionCondition proto.InternalMessageInfo - -func (m *StorageVersionList) Reset() { *m = StorageVersionList{} } -func (*StorageVersionList) ProtoMessage() {} -func (*StorageVersionList) Descriptor() ([]byte, []int) { - return fileDescriptor_126bcbf538b54729, []int{3} -} -func (m *StorageVersionList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageVersionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StorageVersionList) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageVersionList.Merge(m, src) -} -func (m *StorageVersionList) XXX_Size() int { - return m.Size() -} -func (m *StorageVersionList) XXX_DiscardUnknown() { - xxx_messageInfo_StorageVersionList.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageVersionList proto.InternalMessageInfo - -func (m *StorageVersionSpec) Reset() { *m = StorageVersionSpec{} } -func (*StorageVersionSpec) ProtoMessage() {} -func (*StorageVersionSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_126bcbf538b54729, []int{4} -} -func (m *StorageVersionSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageVersionSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StorageVersionSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageVersionSpec.Merge(m, src) -} -func (m *StorageVersionSpec) XXX_Size() int { - return m.Size() -} -func (m *StorageVersionSpec) XXX_DiscardUnknown() { - xxx_messageInfo_StorageVersionSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageVersionSpec proto.InternalMessageInfo - -func (m *StorageVersionStatus) Reset() { *m = StorageVersionStatus{} } -func (*StorageVersionStatus) ProtoMessage() {} -func (*StorageVersionStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_126bcbf538b54729, []int{5} -} -func (m *StorageVersionStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageVersionStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StorageVersionStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageVersionStatus.Merge(m, src) -} -func (m *StorageVersionStatus) XXX_Size() int { - return m.Size() -} -func (m *StorageVersionStatus) XXX_DiscardUnknown() { - xxx_messageInfo_StorageVersionStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageVersionStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ServerStorageVersion)(nil), "k8s.io.api.apiserverinternal.v1alpha1.ServerStorageVersion") - proto.RegisterType((*StorageVersion)(nil), "k8s.io.api.apiserverinternal.v1alpha1.StorageVersion") - proto.RegisterType((*StorageVersionCondition)(nil), "k8s.io.api.apiserverinternal.v1alpha1.StorageVersionCondition") - proto.RegisterType((*StorageVersionList)(nil), "k8s.io.api.apiserverinternal.v1alpha1.StorageVersionList") - proto.RegisterType((*StorageVersionSpec)(nil), "k8s.io.api.apiserverinternal.v1alpha1.StorageVersionSpec") - proto.RegisterType((*StorageVersionStatus)(nil), "k8s.io.api.apiserverinternal.v1alpha1.StorageVersionStatus") -} - -func init() { - proto.RegisterFile("k8s.io/api/apiserverinternal/v1alpha1/generated.proto", fileDescriptor_126bcbf538b54729) -} - -var fileDescriptor_126bcbf538b54729 = []byte{ - // 770 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x41, 0x4f, 0x13, 0x41, - 0x14, 0xee, 0xd2, 0x52, 0x60, 0xaa, 0xad, 0x8c, 0x10, 0x6a, 0x4d, 0xb6, 0xd8, 0x04, 0x83, 0x1a, - 0x77, 0xa5, 0x11, 0x23, 0x9a, 0x68, 0x58, 0x20, 0x06, 0x85, 0x60, 0xa6, 0xc4, 0x03, 0x7a, 0x70, - 0xba, 0x1d, 0xb7, 0x2b, 0xdd, 0x9d, 0xcd, 0xce, 0xb4, 0x09, 0x17, 0xe3, 0x4f, 0xd0, 0xff, 0xe1, - 0xd1, 0x1f, 0xc1, 0xc9, 0x70, 0x24, 0x31, 0x69, 0x64, 0xfd, 0x17, 0x9c, 0xcc, 0xcc, 0x6e, 0xb7, - 0x6c, 0x5b, 0x62, 0xc3, 0xa1, 0x49, 0xe7, 0xbd, 0xf7, 0x7d, 0xef, 0xcd, 0x37, 0xdf, 0xcc, 0x82, - 0xd5, 0xc3, 0xa7, 0x4c, 0xb3, 0xa9, 0x8e, 0x3d, 0x5b, 0xfc, 0x18, 0xf1, 0x3b, 0xc4, 0xb7, 0x5d, - 0x4e, 0x7c, 0x17, 0xb7, 0xf4, 0xce, 0x0a, 0x6e, 0x79, 0x4d, 0xbc, 0xa2, 0x5b, 0xc4, 0x25, 0x3e, - 0xe6, 0xa4, 0xa1, 0x79, 0x3e, 0xe5, 0x14, 0x2e, 0x85, 0x30, 0x0d, 0x7b, 0xb6, 0x36, 0x04, 0xd3, - 0x7a, 0xb0, 0xd2, 0x43, 0xcb, 0xe6, 0xcd, 0x76, 0x5d, 0x33, 0xa9, 0xa3, 0x5b, 0xd4, 0xa2, 0xba, - 0x44, 0xd7, 0xdb, 0x9f, 0xe4, 0x4a, 0x2e, 0xe4, 0xbf, 0x90, 0xb5, 0xf4, 0xb8, 0x3f, 0x8c, 0x83, - 0xcd, 0xa6, 0xed, 0x12, 0xff, 0x48, 0xf7, 0x0e, 0x2d, 0x39, 0x99, 0xee, 0x10, 0x8e, 0xf5, 0xce, - 0xd0, 0x2c, 0x25, 0xfd, 0x32, 0x94, 0xdf, 0x76, 0xb9, 0xed, 0x90, 0x21, 0xc0, 0x93, 0xff, 0x01, - 0x98, 0xd9, 0x24, 0x0e, 0x1e, 0xc4, 0x55, 0xbe, 0x4f, 0x80, 0xb9, 0x9a, 0xdc, 0x69, 0x8d, 0x53, - 0x1f, 0x5b, 0xe4, 0x1d, 0xf1, 0x99, 0x4d, 0x5d, 0xb8, 0x0a, 0x72, 0xd8, 0xb3, 0xc3, 0xd4, 0xf6, - 0x66, 0x51, 0x59, 0x54, 0x96, 0x67, 0x8c, 0x9b, 0xc7, 0xdd, 0x72, 0x2a, 0xe8, 0x96, 0x73, 0xeb, - 0x6f, 0xb7, 0x7b, 0x29, 0x74, 0xb1, 0x0e, 0xae, 0x83, 0x02, 0x71, 0x4d, 0xda, 0xb0, 0x5d, 0x2b, - 0x62, 0x2a, 0x4e, 0x48, 0xe8, 0x42, 0x04, 0x2d, 0x6c, 0x25, 0xd3, 0x68, 0xb0, 0x1e, 0x6e, 0x80, - 0xd9, 0x06, 0x31, 0x69, 0x03, 0xd7, 0x5b, 0xbd, 0x69, 0x58, 0x31, 0xbd, 0x98, 0x5e, 0x9e, 0x31, - 0xe6, 0x83, 0x6e, 0x79, 0x76, 0x73, 0x30, 0x89, 0x86, 0xeb, 0xe1, 0x33, 0x90, 0x97, 0x07, 0xd8, - 0x88, 0x19, 0x32, 0x92, 0x01, 0x06, 0xdd, 0x72, 0xbe, 0x96, 0xc8, 0xa0, 0x81, 0xca, 0xca, 0xcf, - 0x09, 0x90, 0x1f, 0x50, 0xe3, 0x23, 0x98, 0x16, 0x47, 0xd5, 0xc0, 0x1c, 0x4b, 0x29, 0x72, 0xd5, - 0x47, 0x5a, 0xdf, 0x2e, 0xb1, 0xe2, 0x9a, 0x77, 0x68, 0x49, 0xef, 0x68, 0xa2, 0x5a, 0xeb, 0xac, - 0x68, 0x7b, 0xf5, 0xcf, 0xc4, 0xe4, 0xbb, 0x84, 0x63, 0x03, 0x46, 0x0a, 0x80, 0x7e, 0x0c, 0xc5, - 0xac, 0xf0, 0x3d, 0xc8, 0x30, 0x8f, 0x98, 0x52, 0xad, 0x5c, 0x75, 0x4d, 0x1b, 0xcb, 0x8c, 0x5a, - 0x72, 0xcc, 0x9a, 0x47, 0x4c, 0xe3, 0x5a, 0xd4, 0x26, 0x23, 0x56, 0x48, 0x92, 0x42, 0x13, 0x64, - 0x19, 0xc7, 0xbc, 0x2d, 0x74, 0x14, 0xf4, 0xcf, 0xaf, 0x46, 0x2f, 0x29, 0x8c, 0x7c, 0xd4, 0x20, - 0x1b, 0xae, 0x51, 0x44, 0x5d, 0xf9, 0x91, 0x06, 0x0b, 0x49, 0xc0, 0x06, 0x75, 0x1b, 0x36, 0x17, - 0xfa, 0xbd, 0x04, 0x19, 0x7e, 0xe4, 0x91, 0xc8, 0x46, 0x0f, 0x7a, 0x23, 0xee, 0x1f, 0x79, 0xe4, - 0xbc, 0x5b, 0xbe, 0x7d, 0x09, 0x4c, 0xa4, 0x91, 0x04, 0xc2, 0xb5, 0x78, 0x07, 0xa1, 0x9d, 0xee, - 0x24, 0x87, 0x38, 0xef, 0x96, 0x0b, 0x31, 0x2c, 0x39, 0x17, 0x7c, 0x0d, 0x20, 0xad, 0x87, 0x47, - 0xfc, 0x2a, 0x74, 0xbf, 0x70, 0xa5, 0x10, 0x22, 0x6d, 0x94, 0x22, 0x1a, 0xb8, 0x37, 0x54, 0x81, - 0x46, 0xa0, 0x60, 0x07, 0xc0, 0x16, 0x66, 0x7c, 0xdf, 0xc7, 0x2e, 0x0b, 0x47, 0xb4, 0x1d, 0x52, - 0xcc, 0x48, 0x51, 0xef, 0x8f, 0xe7, 0x08, 0x81, 0xe8, 0xf7, 0xdd, 0x19, 0x62, 0x43, 0x23, 0x3a, - 0xc0, 0xbb, 0x20, 0xeb, 0x13, 0xcc, 0xa8, 0x5b, 0x9c, 0x94, 0xdb, 0x8f, 0xcf, 0x00, 0xc9, 0x28, - 0x8a, 0xb2, 0xf0, 0x1e, 0x98, 0x72, 0x08, 0x63, 0xd8, 0x22, 0xc5, 0xac, 0x2c, 0x2c, 0x44, 0x85, - 0x53, 0xbb, 0x61, 0x18, 0xf5, 0xf2, 0x95, 0x5f, 0x0a, 0x80, 0x49, 0xdd, 0x77, 0x6c, 0xc6, 0xe1, - 0x87, 0x21, 0xa7, 0x6b, 0xe3, 0xed, 0x4b, 0xa0, 0xa5, 0xcf, 0x6f, 0x44, 0x2d, 0xa7, 0x7b, 0x91, - 0x0b, 0x2e, 0x3f, 0x00, 0x93, 0x36, 0x27, 0x8e, 0x38, 0xc5, 0xf4, 0x72, 0xae, 0xba, 0x7a, 0x25, - 0x1f, 0x1a, 0xd7, 0xa3, 0x0e, 0x93, 0xdb, 0x82, 0x0b, 0x85, 0x94, 0x95, 0xb9, 0xc1, 0xfd, 0x88, - 0x0b, 0x50, 0xf9, 0x2d, 0x1e, 0xb8, 0x11, 0x36, 0x86, 0x5f, 0x40, 0x81, 0x25, 0xe2, 0xac, 0xa8, - 0xc8, 0xa1, 0xc6, 0xbe, 0x1c, 0x23, 0x9e, 0xcd, 0xfe, 0x33, 0x97, 0x8c, 0x33, 0x34, 0xd8, 0x0c, - 0xee, 0x81, 0x79, 0x93, 0x3a, 0x0e, 0x75, 0xb7, 0x46, 0xbe, 0x97, 0xb7, 0x82, 0x6e, 0x79, 0x7e, - 0x63, 0x54, 0x01, 0x1a, 0x8d, 0x83, 0x3e, 0x00, 0x66, 0xef, 0x0a, 0x84, 0x0f, 0x66, 0xae, 0xfa, - 0xe2, 0x4a, 0x02, 0xc7, 0x37, 0xa9, 0xff, 0x66, 0xc5, 0x21, 0x86, 0x2e, 0x74, 0x31, 0xde, 0x1c, - 0x9f, 0xa9, 0xa9, 0x93, 0x33, 0x35, 0x75, 0x7a, 0xa6, 0xa6, 0xbe, 0x06, 0xaa, 0x72, 0x1c, 0xa8, - 0xca, 0x49, 0xa0, 0x2a, 0xa7, 0x81, 0xaa, 0xfc, 0x09, 0x54, 0xe5, 0xdb, 0x5f, 0x35, 0x75, 0xb0, - 0x34, 0xd6, 0x07, 0xf9, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x79, 0x04, 0x7d, 0x78, 0xb8, 0x07, - 0x00, 0x00, -} +func (m *StorageVersionStatus) Reset() { *m = StorageVersionStatus{} } func (m *ServerStorageVersion) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/apiserverinternal/v1alpha1/generated.protomessage.pb.go b/staging/src/k8s.io/api/apiserverinternal/v1alpha1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..b0839952b2aa1 --- /dev/null +++ b/staging/src/k8s.io/api/apiserverinternal/v1alpha1/generated.protomessage.pb.go @@ -0,0 +1,34 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1alpha1 + +func (*ServerStorageVersion) ProtoMessage() {} + +func (*StorageVersion) ProtoMessage() {} + +func (*StorageVersionCondition) ProtoMessage() {} + +func (*StorageVersionList) ProtoMessage() {} + +func (*StorageVersionSpec) ProtoMessage() {} + +func (*StorageVersionStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/apiserverinternal/v1alpha1/zz_generated.model_name.go b/staging/src/k8s.io/api/apiserverinternal/v1alpha1/zz_generated.model_name.go new file mode 100644 index 0000000000000..5f48f5ff3883e --- /dev/null +++ b/staging/src/k8s.io/api/apiserverinternal/v1alpha1/zz_generated.model_name.go @@ -0,0 +1,52 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1alpha1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServerStorageVersion) OpenAPIModelName() string { + return "io.k8s.api.apiserverinternal.v1alpha1.ServerStorageVersion" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StorageVersion) OpenAPIModelName() string { + return "io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StorageVersionCondition) OpenAPIModelName() string { + return "io.k8s.api.apiserverinternal.v1alpha1.StorageVersionCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StorageVersionList) OpenAPIModelName() string { + return "io.k8s.api.apiserverinternal.v1alpha1.StorageVersionList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StorageVersionSpec) OpenAPIModelName() string { + return "io.k8s.api.apiserverinternal.v1alpha1.StorageVersionSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StorageVersionStatus) OpenAPIModelName() string { + return "io.k8s.api.apiserverinternal.v1alpha1.StorageVersionStatus" +} diff --git a/staging/src/k8s.io/api/apps/v1/doc.go b/staging/src/k8s.io/api/apps/v1/doc.go index 51fe12c53ded3..122ae8eeb1e51 100644 --- a/staging/src/k8s.io/api/apps/v1/doc.go +++ b/staging/src/k8s.io/api/apps/v1/doc.go @@ -18,5 +18,6 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.apps.v1 package v1 diff --git a/staging/src/k8s.io/api/apps/v1/generated.pb.go b/staging/src/k8s.io/api/apps/v1/generated.pb.go index eacc25931be73..b46ed0dc40bbd 100644 --- a/staging/src/k8s.io/api/apps/v1/generated.pb.go +++ b/staging/src/k8s.io/api/apps/v1/generated.pb.go @@ -24,12 +24,10 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" k8s_io_api_core_v1 "k8s.io/api/core/v1" v11 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -37,1039 +35,67 @@ import ( intstr "k8s.io/apimachinery/pkg/util/intstr" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ControllerRevision) Reset() { *m = ControllerRevision{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} } -func (m *ControllerRevision) Reset() { *m = ControllerRevision{} } -func (*ControllerRevision) ProtoMessage() {} -func (*ControllerRevision) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{0} -} -func (m *ControllerRevision) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ControllerRevision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ControllerRevision) XXX_Merge(src proto.Message) { - xxx_messageInfo_ControllerRevision.Merge(m, src) -} -func (m *ControllerRevision) XXX_Size() int { - return m.Size() -} -func (m *ControllerRevision) XXX_DiscardUnknown() { - xxx_messageInfo_ControllerRevision.DiscardUnknown(m) -} - -var xxx_messageInfo_ControllerRevision proto.InternalMessageInfo - -func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} } -func (*ControllerRevisionList) ProtoMessage() {} -func (*ControllerRevisionList) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{1} -} -func (m *ControllerRevisionList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ControllerRevisionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ControllerRevisionList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ControllerRevisionList.Merge(m, src) -} -func (m *ControllerRevisionList) XXX_Size() int { - return m.Size() -} -func (m *ControllerRevisionList) XXX_DiscardUnknown() { - xxx_messageInfo_ControllerRevisionList.DiscardUnknown(m) -} - -var xxx_messageInfo_ControllerRevisionList proto.InternalMessageInfo - -func (m *DaemonSet) Reset() { *m = DaemonSet{} } -func (*DaemonSet) ProtoMessage() {} -func (*DaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{2} -} -func (m *DaemonSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSet.Merge(m, src) -} -func (m *DaemonSet) XXX_Size() int { - return m.Size() -} -func (m *DaemonSet) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSet.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSet proto.InternalMessageInfo - -func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} } -func (*DaemonSetCondition) ProtoMessage() {} -func (*DaemonSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{3} -} -func (m *DaemonSetCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSetCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSetCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSetCondition.Merge(m, src) -} -func (m *DaemonSetCondition) XXX_Size() int { - return m.Size() -} -func (m *DaemonSetCondition) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSetCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSetCondition proto.InternalMessageInfo - -func (m *DaemonSetList) Reset() { *m = DaemonSetList{} } -func (*DaemonSetList) ProtoMessage() {} -func (*DaemonSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{4} -} -func (m *DaemonSetList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSetList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSetList.Merge(m, src) -} -func (m *DaemonSetList) XXX_Size() int { - return m.Size() -} -func (m *DaemonSetList) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSetList.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSetList proto.InternalMessageInfo - -func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} } -func (*DaemonSetSpec) ProtoMessage() {} -func (*DaemonSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{5} -} -func (m *DaemonSetSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSetSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSetSpec.Merge(m, src) -} -func (m *DaemonSetSpec) XXX_Size() int { - return m.Size() -} -func (m *DaemonSetSpec) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSetSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSetSpec proto.InternalMessageInfo - -func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } -func (*DaemonSetStatus) ProtoMessage() {} -func (*DaemonSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{6} -} -func (m *DaemonSetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSetStatus.Merge(m, src) -} -func (m *DaemonSetStatus) XXX_Size() int { - return m.Size() -} -func (m *DaemonSetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSetStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSetStatus proto.InternalMessageInfo - -func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } -func (*DaemonSetUpdateStrategy) ProtoMessage() {} -func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{7} -} -func (m *DaemonSetUpdateStrategy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSetUpdateStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSetUpdateStrategy) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSetUpdateStrategy.Merge(m, src) -} -func (m *DaemonSetUpdateStrategy) XXX_Size() int { - return m.Size() -} -func (m *DaemonSetUpdateStrategy) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSetUpdateStrategy.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSetUpdateStrategy proto.InternalMessageInfo - -func (m *Deployment) Reset() { *m = Deployment{} } -func (*Deployment) ProtoMessage() {} -func (*Deployment) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{8} -} -func (m *Deployment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Deployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Deployment) XXX_Merge(src proto.Message) { - xxx_messageInfo_Deployment.Merge(m, src) -} -func (m *Deployment) XXX_Size() int { - return m.Size() -} -func (m *Deployment) XXX_DiscardUnknown() { - xxx_messageInfo_Deployment.DiscardUnknown(m) -} - -var xxx_messageInfo_Deployment proto.InternalMessageInfo - -func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } -func (*DeploymentCondition) ProtoMessage() {} -func (*DeploymentCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{9} -} -func (m *DeploymentCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentCondition.Merge(m, src) -} -func (m *DeploymentCondition) XXX_Size() int { - return m.Size() -} -func (m *DeploymentCondition) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentCondition proto.InternalMessageInfo - -func (m *DeploymentList) Reset() { *m = DeploymentList{} } -func (*DeploymentList) ProtoMessage() {} -func (*DeploymentList) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{10} -} -func (m *DeploymentList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentList.Merge(m, src) -} -func (m *DeploymentList) XXX_Size() int { - return m.Size() -} -func (m *DeploymentList) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentList.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentList proto.InternalMessageInfo - -func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } -func (*DeploymentSpec) ProtoMessage() {} -func (*DeploymentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{11} -} -func (m *DeploymentSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentSpec.Merge(m, src) -} -func (m *DeploymentSpec) XXX_Size() int { - return m.Size() -} -func (m *DeploymentSpec) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentSpec proto.InternalMessageInfo - -func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } -func (*DeploymentStatus) ProtoMessage() {} -func (*DeploymentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{12} -} -func (m *DeploymentStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentStatus.Merge(m, src) -} -func (m *DeploymentStatus) XXX_Size() int { - return m.Size() -} -func (m *DeploymentStatus) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentStatus proto.InternalMessageInfo - -func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } -func (*DeploymentStrategy) ProtoMessage() {} -func (*DeploymentStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{13} -} -func (m *DeploymentStrategy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentStrategy) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentStrategy.Merge(m, src) -} -func (m *DeploymentStrategy) XXX_Size() int { - return m.Size() -} -func (m *DeploymentStrategy) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentStrategy.DiscardUnknown(m) -} +func (m *DaemonSet) Reset() { *m = DaemonSet{} } -var xxx_messageInfo_DeploymentStrategy proto.InternalMessageInfo +func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} } -func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } -func (*ReplicaSet) ProtoMessage() {} -func (*ReplicaSet) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{14} -} -func (m *ReplicaSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSet.Merge(m, src) -} -func (m *ReplicaSet) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSet) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSet.DiscardUnknown(m) -} +func (m *DaemonSetList) Reset() { *m = DaemonSetList{} } -var xxx_messageInfo_ReplicaSet proto.InternalMessageInfo +func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} } -func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} } -func (*ReplicaSetCondition) ProtoMessage() {} -func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{15} -} -func (m *ReplicaSetCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSetCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSetCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSetCondition.Merge(m, src) -} -func (m *ReplicaSetCondition) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSetCondition) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSetCondition.DiscardUnknown(m) -} +func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } -var xxx_messageInfo_ReplicaSetCondition proto.InternalMessageInfo +func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } -func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} } -func (*ReplicaSetList) ProtoMessage() {} -func (*ReplicaSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{16} -} -func (m *ReplicaSetList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSetList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSetList.Merge(m, src) -} -func (m *ReplicaSetList) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSetList) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSetList.DiscardUnknown(m) -} +func (m *Deployment) Reset() { *m = Deployment{} } -var xxx_messageInfo_ReplicaSetList proto.InternalMessageInfo +func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } -func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } -func (*ReplicaSetSpec) ProtoMessage() {} -func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{17} -} -func (m *ReplicaSetSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSetSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSetSpec.Merge(m, src) -} -func (m *ReplicaSetSpec) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSetSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSetSpec.DiscardUnknown(m) -} +func (m *DeploymentList) Reset() { *m = DeploymentList{} } -var xxx_messageInfo_ReplicaSetSpec proto.InternalMessageInfo +func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } -func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } -func (*ReplicaSetStatus) ProtoMessage() {} -func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{18} -} -func (m *ReplicaSetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSetStatus.Merge(m, src) -} -func (m *ReplicaSetStatus) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSetStatus.DiscardUnknown(m) -} +func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } -var xxx_messageInfo_ReplicaSetStatus proto.InternalMessageInfo +func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } -func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } -func (*RollingUpdateDaemonSet) ProtoMessage() {} -func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{19} -} -func (m *RollingUpdateDaemonSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RollingUpdateDaemonSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RollingUpdateDaemonSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollingUpdateDaemonSet.Merge(m, src) -} -func (m *RollingUpdateDaemonSet) XXX_Size() int { - return m.Size() -} -func (m *RollingUpdateDaemonSet) XXX_DiscardUnknown() { - xxx_messageInfo_RollingUpdateDaemonSet.DiscardUnknown(m) -} +func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } -var xxx_messageInfo_RollingUpdateDaemonSet proto.InternalMessageInfo +func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} } -func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } -func (*RollingUpdateDeployment) ProtoMessage() {} -func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{20} -} -func (m *RollingUpdateDeployment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RollingUpdateDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RollingUpdateDeployment) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollingUpdateDeployment.Merge(m, src) -} -func (m *RollingUpdateDeployment) XXX_Size() int { - return m.Size() -} -func (m *RollingUpdateDeployment) XXX_DiscardUnknown() { - xxx_messageInfo_RollingUpdateDeployment.DiscardUnknown(m) -} +func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} } -var xxx_messageInfo_RollingUpdateDeployment proto.InternalMessageInfo +func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } -func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} } -func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {} -func (*RollingUpdateStatefulSetStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{21} -} -func (m *RollingUpdateStatefulSetStrategy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RollingUpdateStatefulSetStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RollingUpdateStatefulSetStrategy) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollingUpdateStatefulSetStrategy.Merge(m, src) -} -func (m *RollingUpdateStatefulSetStrategy) XXX_Size() int { - return m.Size() -} -func (m *RollingUpdateStatefulSetStrategy) XXX_DiscardUnknown() { - xxx_messageInfo_RollingUpdateStatefulSetStrategy.DiscardUnknown(m) -} +func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } -var xxx_messageInfo_RollingUpdateStatefulSetStrategy proto.InternalMessageInfo +func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } -func (m *StatefulSet) Reset() { *m = StatefulSet{} } -func (*StatefulSet) ProtoMessage() {} -func (*StatefulSet) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{22} -} -func (m *StatefulSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSet.Merge(m, src) -} -func (m *StatefulSet) XXX_Size() int { - return m.Size() -} -func (m *StatefulSet) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSet.DiscardUnknown(m) -} +func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } -var xxx_messageInfo_StatefulSet proto.InternalMessageInfo +func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} } -func (m *StatefulSetCondition) Reset() { *m = StatefulSetCondition{} } -func (*StatefulSetCondition) ProtoMessage() {} -func (*StatefulSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{23} -} -func (m *StatefulSetCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetCondition.Merge(m, src) -} -func (m *StatefulSetCondition) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetCondition) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetCondition.DiscardUnknown(m) -} +func (m *StatefulSet) Reset() { *m = StatefulSet{} } -var xxx_messageInfo_StatefulSetCondition proto.InternalMessageInfo +func (m *StatefulSetCondition) Reset() { *m = StatefulSetCondition{} } -func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } -func (*StatefulSetList) ProtoMessage() {} -func (*StatefulSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{24} -} -func (m *StatefulSetList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetList) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetList.Merge(m, src) -} -func (m *StatefulSetList) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetList) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetList.DiscardUnknown(m) -} - -var xxx_messageInfo_StatefulSetList proto.InternalMessageInfo - -func (m *StatefulSetOrdinals) Reset() { *m = StatefulSetOrdinals{} } -func (*StatefulSetOrdinals) ProtoMessage() {} -func (*StatefulSetOrdinals) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{25} -} -func (m *StatefulSetOrdinals) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetOrdinals) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetOrdinals) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetOrdinals.Merge(m, src) -} -func (m *StatefulSetOrdinals) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetOrdinals) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetOrdinals.DiscardUnknown(m) -} +func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } -var xxx_messageInfo_StatefulSetOrdinals proto.InternalMessageInfo +func (m *StatefulSetOrdinals) Reset() { *m = StatefulSetOrdinals{} } func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) Reset() { *m = StatefulSetPersistentVolumeClaimRetentionPolicy{} } -func (*StatefulSetPersistentVolumeClaimRetentionPolicy) ProtoMessage() {} -func (*StatefulSetPersistentVolumeClaimRetentionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{26} -} -func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetPersistentVolumeClaimRetentionPolicy.Merge(m, src) -} -func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetPersistentVolumeClaimRetentionPolicy.DiscardUnknown(m) -} -var xxx_messageInfo_StatefulSetPersistentVolumeClaimRetentionPolicy proto.InternalMessageInfo +func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } -func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } -func (*StatefulSetSpec) ProtoMessage() {} -func (*StatefulSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{27} -} -func (m *StatefulSetSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetSpec.Merge(m, src) -} -func (m *StatefulSetSpec) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetSpec) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetSpec.DiscardUnknown(m) -} +func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } -var xxx_messageInfo_StatefulSetSpec proto.InternalMessageInfo - -func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } -func (*StatefulSetStatus) ProtoMessage() {} -func (*StatefulSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{28} -} -func (m *StatefulSetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetStatus.Merge(m, src) -} -func (m *StatefulSetStatus) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_StatefulSetStatus proto.InternalMessageInfo - -func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} } -func (*StatefulSetUpdateStrategy) ProtoMessage() {} -func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_5b781835628d5338, []int{29} -} -func (m *StatefulSetUpdateStrategy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetUpdateStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetUpdateStrategy) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetUpdateStrategy.Merge(m, src) -} -func (m *StatefulSetUpdateStrategy) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetUpdateStrategy) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetUpdateStrategy.DiscardUnknown(m) -} - -var xxx_messageInfo_StatefulSetUpdateStrategy proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ControllerRevision)(nil), "k8s.io.api.apps.v1.ControllerRevision") - proto.RegisterType((*ControllerRevisionList)(nil), "k8s.io.api.apps.v1.ControllerRevisionList") - proto.RegisterType((*DaemonSet)(nil), "k8s.io.api.apps.v1.DaemonSet") - proto.RegisterType((*DaemonSetCondition)(nil), "k8s.io.api.apps.v1.DaemonSetCondition") - proto.RegisterType((*DaemonSetList)(nil), "k8s.io.api.apps.v1.DaemonSetList") - proto.RegisterType((*DaemonSetSpec)(nil), "k8s.io.api.apps.v1.DaemonSetSpec") - proto.RegisterType((*DaemonSetStatus)(nil), "k8s.io.api.apps.v1.DaemonSetStatus") - proto.RegisterType((*DaemonSetUpdateStrategy)(nil), "k8s.io.api.apps.v1.DaemonSetUpdateStrategy") - proto.RegisterType((*Deployment)(nil), "k8s.io.api.apps.v1.Deployment") - proto.RegisterType((*DeploymentCondition)(nil), "k8s.io.api.apps.v1.DeploymentCondition") - proto.RegisterType((*DeploymentList)(nil), "k8s.io.api.apps.v1.DeploymentList") - proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.api.apps.v1.DeploymentSpec") - proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.api.apps.v1.DeploymentStatus") - proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.api.apps.v1.DeploymentStrategy") - proto.RegisterType((*ReplicaSet)(nil), "k8s.io.api.apps.v1.ReplicaSet") - proto.RegisterType((*ReplicaSetCondition)(nil), "k8s.io.api.apps.v1.ReplicaSetCondition") - proto.RegisterType((*ReplicaSetList)(nil), "k8s.io.api.apps.v1.ReplicaSetList") - proto.RegisterType((*ReplicaSetSpec)(nil), "k8s.io.api.apps.v1.ReplicaSetSpec") - proto.RegisterType((*ReplicaSetStatus)(nil), "k8s.io.api.apps.v1.ReplicaSetStatus") - proto.RegisterType((*RollingUpdateDaemonSet)(nil), "k8s.io.api.apps.v1.RollingUpdateDaemonSet") - proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.api.apps.v1.RollingUpdateDeployment") - proto.RegisterType((*RollingUpdateStatefulSetStrategy)(nil), "k8s.io.api.apps.v1.RollingUpdateStatefulSetStrategy") - proto.RegisterType((*StatefulSet)(nil), "k8s.io.api.apps.v1.StatefulSet") - proto.RegisterType((*StatefulSetCondition)(nil), "k8s.io.api.apps.v1.StatefulSetCondition") - proto.RegisterType((*StatefulSetList)(nil), "k8s.io.api.apps.v1.StatefulSetList") - proto.RegisterType((*StatefulSetOrdinals)(nil), "k8s.io.api.apps.v1.StatefulSetOrdinals") - proto.RegisterType((*StatefulSetPersistentVolumeClaimRetentionPolicy)(nil), "k8s.io.api.apps.v1.StatefulSetPersistentVolumeClaimRetentionPolicy") - proto.RegisterType((*StatefulSetSpec)(nil), "k8s.io.api.apps.v1.StatefulSetSpec") - proto.RegisterType((*StatefulSetStatus)(nil), "k8s.io.api.apps.v1.StatefulSetStatus") - proto.RegisterType((*StatefulSetUpdateStrategy)(nil), "k8s.io.api.apps.v1.StatefulSetUpdateStrategy") -} - -func init() { - proto.RegisterFile("k8s.io/api/apps/v1/generated.proto", fileDescriptor_5b781835628d5338) -} - -var fileDescriptor_5b781835628d5338 = []byte{ - // 2225 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x52, 0xa4, 0x44, 0x0d, 0x2d, 0xc9, 0x1e, 0xa9, 0x12, 0x63, 0x37, 0xa4, 0xbb, 0x71, - 0x6d, 0x25, 0x8e, 0xc9, 0xda, 0x71, 0x82, 0xc0, 0x29, 0x12, 0x88, 0x54, 0x9a, 0xba, 0xd1, 0x57, - 0x87, 0x92, 0x03, 0xb8, 0x69, 0xd1, 0xd1, 0x72, 0x4c, 0x6d, 0xbc, 0x5f, 0xd8, 0x1d, 0x2a, 0x16, - 0x7a, 0x29, 0x0a, 0x14, 0xe8, 0x21, 0x87, 0xfe, 0x0d, 0xfd, 0x07, 0x8a, 0xa2, 0x68, 0x6e, 0x45, - 0x50, 0xf4, 0xe2, 0x4b, 0x81, 0xa0, 0x97, 0xe6, 0x44, 0xd4, 0xcc, 0xa9, 0x28, 0x7a, 0x6b, 0x2f, - 0xbe, 0xb4, 0x98, 0xd9, 0xd9, 0xef, 0x59, 0x91, 0x92, 0x63, 0xa5, 0x09, 0x7c, 0xe3, 0xce, 0x7b, - 0xef, 0x37, 0x6f, 0x66, 0xde, 0x9b, 0xf7, 0x9b, 0x19, 0x02, 0xf5, 0xfe, 0xeb, 0x5e, 0x43, 0xb7, - 0x9b, 0xd8, 0xd1, 0x9b, 0xd8, 0x71, 0xbc, 0xe6, 0xc1, 0xf5, 0x66, 0x8f, 0x58, 0xc4, 0xc5, 0x94, - 0x74, 0x1b, 0x8e, 0x6b, 0x53, 0x1b, 0x42, 0x5f, 0xa7, 0x81, 0x1d, 0xbd, 0xc1, 0x74, 0x1a, 0x07, - 0xd7, 0xcf, 0x5f, 0xeb, 0xe9, 0x74, 0xbf, 0xbf, 0xd7, 0xd0, 0x6c, 0xb3, 0xd9, 0xb3, 0x7b, 0x76, - 0x93, 0xab, 0xee, 0xf5, 0xef, 0xf1, 0x2f, 0xfe, 0xc1, 0x7f, 0xf9, 0x10, 0xe7, 0xe3, 0xdd, 0x68, - 0xb6, 0x4b, 0x24, 0xdd, 0x9c, 0xbf, 0x19, 0xe9, 0x98, 0x58, 0xdb, 0xd7, 0x2d, 0xe2, 0x1e, 0x36, - 0x9d, 0xfb, 0x3d, 0xd6, 0xe0, 0x35, 0x4d, 0x42, 0xb1, 0xcc, 0xaa, 0x99, 0x67, 0xe5, 0xf6, 0x2d, - 0xaa, 0x9b, 0x24, 0x63, 0xf0, 0xda, 0x28, 0x03, 0x4f, 0xdb, 0x27, 0x26, 0xce, 0xd8, 0xbd, 0x92, - 0x67, 0xd7, 0xa7, 0xba, 0xd1, 0xd4, 0x2d, 0xea, 0x51, 0x37, 0x6d, 0xa4, 0xfe, 0x47, 0x01, 0xb0, - 0x6d, 0x5b, 0xd4, 0xb5, 0x0d, 0x83, 0xb8, 0x88, 0x1c, 0xe8, 0x9e, 0x6e, 0x5b, 0xf0, 0xa7, 0xa0, - 0xcc, 0xc6, 0xd3, 0xc5, 0x14, 0x57, 0x95, 0x8b, 0xca, 0x4a, 0xe5, 0xc6, 0x77, 0x1a, 0xd1, 0x24, - 0x87, 0xf0, 0x0d, 0xe7, 0x7e, 0x8f, 0x35, 0x78, 0x0d, 0xa6, 0xdd, 0x38, 0xb8, 0xde, 0xd8, 0xda, - 0xfb, 0x80, 0x68, 0x74, 0x83, 0x50, 0xdc, 0x82, 0x0f, 0x07, 0xf5, 0x89, 0xe1, 0xa0, 0x0e, 0xa2, - 0x36, 0x14, 0xa2, 0xc2, 0x2d, 0x50, 0xe4, 0xe8, 0x05, 0x8e, 0x7e, 0x2d, 0x17, 0x5d, 0x0c, 0xba, - 0x81, 0xf0, 0x87, 0x6f, 0x3f, 0xa0, 0xc4, 0x62, 0xee, 0xb5, 0xce, 0x08, 0xe8, 0xe2, 0x1a, 0xa6, - 0x18, 0x71, 0x20, 0xf8, 0x32, 0x28, 0xbb, 0xc2, 0xfd, 0xea, 0xe4, 0x45, 0x65, 0x65, 0xb2, 0x75, - 0x56, 0x68, 0x95, 0x83, 0x61, 0xa1, 0x50, 0x43, 0xfd, 0xb3, 0x02, 0x96, 0xb2, 0xe3, 0x5e, 0xd7, - 0x3d, 0x0a, 0xdf, 0xcf, 0x8c, 0xbd, 0x31, 0xde, 0xd8, 0x99, 0x35, 0x1f, 0x79, 0xd8, 0x71, 0xd0, - 0x12, 0x1b, 0xf7, 0xbb, 0xa0, 0xa4, 0x53, 0x62, 0x7a, 0xd5, 0xc2, 0xc5, 0xc9, 0x95, 0xca, 0x8d, - 0xcb, 0x8d, 0x6c, 0xec, 0x36, 0xb2, 0x8e, 0xb5, 0x66, 0x05, 0x64, 0xe9, 0x36, 0x33, 0x46, 0x3e, - 0x86, 0xfa, 0x5f, 0x05, 0xcc, 0xac, 0x61, 0x62, 0xda, 0x56, 0x87, 0xd0, 0x53, 0x58, 0xb4, 0x36, - 0x28, 0x7a, 0x0e, 0xd1, 0xc4, 0xa2, 0x7d, 0x4b, 0xe6, 0x7b, 0xe8, 0x4e, 0xc7, 0x21, 0x5a, 0xb4, - 0x50, 0xec, 0x0b, 0x71, 0x63, 0xf8, 0x2e, 0x98, 0xf2, 0x28, 0xa6, 0x7d, 0x8f, 0x2f, 0x53, 0xe5, - 0xc6, 0x0b, 0x47, 0xc3, 0x70, 0xd5, 0xd6, 0x9c, 0x00, 0x9a, 0xf2, 0xbf, 0x91, 0x80, 0x50, 0xff, - 0x51, 0x00, 0x30, 0xd4, 0x6d, 0xdb, 0x56, 0x57, 0xa7, 0x2c, 0x7e, 0x6f, 0x81, 0x22, 0x3d, 0x74, - 0x08, 0x9f, 0x86, 0x99, 0xd6, 0xe5, 0xc0, 0x8b, 0x9d, 0x43, 0x87, 0x3c, 0x1e, 0xd4, 0x97, 0xb2, - 0x16, 0x4c, 0x82, 0xb8, 0x0d, 0x5c, 0x0f, 0xfd, 0x2b, 0x70, 0xeb, 0x9b, 0xc9, 0xae, 0x1f, 0x0f, - 0xea, 0x92, 0xcd, 0xa2, 0x11, 0x22, 0x25, 0x1d, 0x84, 0x07, 0x00, 0x1a, 0xd8, 0xa3, 0x3b, 0x2e, - 0xb6, 0x3c, 0xbf, 0x27, 0xdd, 0x24, 0x62, 0xe4, 0x2f, 0x8d, 0xb7, 0x3c, 0xcc, 0xa2, 0x75, 0x5e, - 0x78, 0x01, 0xd7, 0x33, 0x68, 0x48, 0xd2, 0x03, 0xbc, 0x0c, 0xa6, 0x5c, 0x82, 0x3d, 0xdb, 0xaa, - 0x16, 0xf9, 0x28, 0xc2, 0x09, 0x44, 0xbc, 0x15, 0x09, 0x29, 0x7c, 0x11, 0x4c, 0x9b, 0xc4, 0xf3, - 0x70, 0x8f, 0x54, 0x4b, 0x5c, 0x71, 0x5e, 0x28, 0x4e, 0x6f, 0xf8, 0xcd, 0x28, 0x90, 0xab, 0xbf, - 0x53, 0xc0, 0x6c, 0x38, 0x73, 0xa7, 0x90, 0x2a, 0xad, 0x64, 0xaa, 0x3c, 0x7f, 0x64, 0x9c, 0xe4, - 0x64, 0xc8, 0x27, 0x93, 0x31, 0x9f, 0x59, 0x10, 0xc2, 0x1f, 0x83, 0xb2, 0x47, 0x0c, 0xa2, 0x51, - 0xdb, 0x15, 0x3e, 0xbf, 0x32, 0xa6, 0xcf, 0x78, 0x8f, 0x18, 0x1d, 0x61, 0xda, 0x3a, 0xc3, 0x9c, - 0x0e, 0xbe, 0x50, 0x08, 0x09, 0x7f, 0x08, 0xca, 0x94, 0x98, 0x8e, 0x81, 0x29, 0x11, 0x69, 0x92, - 0x88, 0x6f, 0x16, 0x2e, 0x0c, 0x6c, 0xdb, 0xee, 0xee, 0x08, 0x35, 0x9e, 0x28, 0xe1, 0x3c, 0x04, - 0xad, 0x28, 0x84, 0x81, 0xf7, 0xc1, 0x5c, 0xdf, 0xe9, 0x32, 0x4d, 0xca, 0xb6, 0xee, 0xde, 0xa1, - 0x08, 0x9f, 0xab, 0x47, 0x4e, 0xc8, 0x6e, 0xc2, 0xa4, 0xb5, 0x24, 0x3a, 0x98, 0x4b, 0xb6, 0xa3, - 0x14, 0x34, 0x5c, 0x05, 0xf3, 0xa6, 0x6e, 0x21, 0x82, 0xbb, 0x87, 0x1d, 0xa2, 0xd9, 0x56, 0xd7, - 0xe3, 0x01, 0x54, 0x6a, 0x2d, 0x0b, 0x80, 0xf9, 0x8d, 0xa4, 0x18, 0xa5, 0xf5, 0xe1, 0x3a, 0x58, - 0x0c, 0xf6, 0xd9, 0xef, 0xeb, 0x1e, 0xb5, 0xdd, 0xc3, 0x75, 0xdd, 0xd4, 0x69, 0x75, 0x8a, 0xe3, - 0x54, 0x87, 0x83, 0xfa, 0x22, 0x92, 0xc8, 0x91, 0xd4, 0x4a, 0xfd, 0x68, 0x0a, 0xcc, 0xa7, 0x76, - 0x03, 0x78, 0x07, 0x2c, 0x69, 0x7d, 0xd7, 0x25, 0x16, 0xdd, 0xec, 0x9b, 0x7b, 0xc4, 0xed, 0x68, - 0xfb, 0xa4, 0xdb, 0x37, 0x48, 0x97, 0xaf, 0x68, 0xa9, 0x55, 0x13, 0xbe, 0x2e, 0xb5, 0xa5, 0x5a, - 0x28, 0xc7, 0x1a, 0xfe, 0x00, 0x40, 0x8b, 0x37, 0x6d, 0xe8, 0x9e, 0x17, 0x62, 0x16, 0x38, 0x66, - 0x98, 0x80, 0x9b, 0x19, 0x0d, 0x24, 0xb1, 0x62, 0x3e, 0x76, 0x89, 0xa7, 0xbb, 0xa4, 0x9b, 0xf6, - 0x71, 0x32, 0xe9, 0xe3, 0x9a, 0x54, 0x0b, 0xe5, 0x58, 0xc3, 0x57, 0x41, 0xc5, 0xef, 0x8d, 0xcf, - 0xb9, 0x58, 0x9c, 0x05, 0x01, 0x56, 0xd9, 0x8c, 0x44, 0x28, 0xae, 0xc7, 0x86, 0x66, 0xef, 0x79, - 0xc4, 0x3d, 0x20, 0xdd, 0x77, 0x7c, 0x0e, 0xc0, 0x0a, 0x65, 0x89, 0x17, 0xca, 0x70, 0x68, 0x5b, - 0x19, 0x0d, 0x24, 0xb1, 0x62, 0x43, 0xf3, 0xa3, 0x26, 0x33, 0xb4, 0xa9, 0xe4, 0xd0, 0x76, 0xa5, - 0x5a, 0x28, 0xc7, 0x9a, 0xc5, 0x9e, 0xef, 0xf2, 0xea, 0x01, 0xd6, 0x0d, 0xbc, 0x67, 0x90, 0xea, - 0x74, 0x32, 0xf6, 0x36, 0x93, 0x62, 0x94, 0xd6, 0x87, 0xef, 0x80, 0x73, 0x7e, 0xd3, 0xae, 0x85, - 0x43, 0x90, 0x32, 0x07, 0x79, 0x4e, 0x80, 0x9c, 0xdb, 0x4c, 0x2b, 0xa0, 0xac, 0x0d, 0xbc, 0x05, - 0xe6, 0x34, 0xdb, 0x30, 0x78, 0x3c, 0xb6, 0xed, 0xbe, 0x45, 0xab, 0x33, 0x1c, 0x05, 0xb2, 0x1c, - 0x6a, 0x27, 0x24, 0x28, 0xa5, 0x09, 0xef, 0x02, 0xa0, 0x05, 0xe5, 0xc0, 0xab, 0x82, 0xfc, 0x42, - 0x9f, 0xad, 0x43, 0x51, 0x01, 0x0e, 0x9b, 0x3c, 0x14, 0x43, 0x53, 0x3f, 0x51, 0xc0, 0x72, 0x4e, - 0x8e, 0xc3, 0xb7, 0x12, 0x55, 0xef, 0x6a, 0xaa, 0xea, 0x5d, 0xc8, 0x31, 0x8b, 0x95, 0x3e, 0x0d, - 0xcc, 0x32, 0xde, 0xa1, 0x5b, 0x3d, 0x5f, 0x45, 0xec, 0x60, 0x2f, 0xc9, 0x7c, 0x47, 0x71, 0xc5, - 0x68, 0x1b, 0x3e, 0x37, 0x1c, 0xd4, 0x67, 0x13, 0x32, 0x94, 0xc4, 0x54, 0x7f, 0x51, 0x00, 0x60, - 0x8d, 0x38, 0x86, 0x7d, 0x68, 0x12, 0xeb, 0x34, 0x58, 0xcb, 0x5a, 0x82, 0xb5, 0xa8, 0xd2, 0x85, - 0x08, 0xfd, 0xc9, 0xa5, 0x2d, 0xeb, 0x29, 0xda, 0x72, 0x69, 0x04, 0xce, 0xd1, 0xbc, 0xe5, 0x6f, - 0x93, 0x60, 0x21, 0x52, 0x8e, 0x88, 0xcb, 0x1b, 0x89, 0x25, 0xbc, 0x92, 0x5a, 0xc2, 0x65, 0x89, - 0xc9, 0x53, 0x63, 0x2e, 0x1f, 0x80, 0x39, 0xc6, 0x2b, 0xfc, 0x55, 0xe3, 0xac, 0x65, 0xea, 0xd8, - 0xac, 0x25, 0xac, 0x3a, 0xeb, 0x09, 0x24, 0x94, 0x42, 0xce, 0x61, 0x49, 0xd3, 0x5f, 0x45, 0x96, - 0xf4, 0x7b, 0x05, 0xcc, 0x45, 0xcb, 0x74, 0x0a, 0x34, 0xa9, 0x9d, 0xa4, 0x49, 0xb5, 0xa3, 0xe3, - 0x32, 0x87, 0x27, 0xfd, 0xb5, 0x18, 0xf7, 0x9a, 0x13, 0xa5, 0x15, 0x76, 0xa0, 0x72, 0x0c, 0x5d, - 0xc3, 0x9e, 0x28, 0xab, 0x67, 0xfc, 0xc3, 0x94, 0xdf, 0x86, 0x42, 0x69, 0x82, 0x52, 0x15, 0x9e, - 0x2e, 0xa5, 0x9a, 0xfc, 0x62, 0x28, 0xd5, 0x0e, 0x28, 0x7b, 0x01, 0x99, 0x2a, 0x72, 0xc8, 0xcb, - 0xa3, 0xd2, 0x59, 0xf0, 0xa8, 0x10, 0x35, 0x64, 0x50, 0x21, 0x92, 0x8c, 0x3b, 0x95, 0xbe, 0x4c, - 0xee, 0xc4, 0xc2, 0xdb, 0xc1, 0x7d, 0x8f, 0x74, 0x79, 0x2a, 0x95, 0xa3, 0xf0, 0xde, 0xe6, 0xad, - 0x48, 0x48, 0xe1, 0x2e, 0x58, 0x76, 0x5c, 0xbb, 0xe7, 0x12, 0xcf, 0x5b, 0x23, 0xb8, 0x6b, 0xe8, - 0x16, 0x09, 0x06, 0xe0, 0x57, 0xbd, 0x0b, 0xc3, 0x41, 0x7d, 0x79, 0x5b, 0xae, 0x82, 0xf2, 0x6c, - 0xd5, 0x5f, 0x95, 0xc0, 0xd9, 0xf4, 0x8e, 0x98, 0x43, 0x44, 0x94, 0x13, 0x11, 0x91, 0x97, 0x63, - 0x21, 0xea, 0xb3, 0xb4, 0xd8, 0x99, 0x3f, 0x13, 0xa6, 0xab, 0x60, 0x5e, 0x10, 0x8f, 0x40, 0x28, - 0xa8, 0x58, 0xb8, 0x3c, 0xbb, 0x49, 0x31, 0x4a, 0xeb, 0xc3, 0x37, 0xc0, 0xac, 0xcb, 0xb9, 0x55, - 0x00, 0xe0, 0xf3, 0x93, 0x6f, 0x08, 0x80, 0x59, 0x14, 0x17, 0xa2, 0xa4, 0x2e, 0xe3, 0x26, 0x11, - 0xe5, 0x08, 0x00, 0x8a, 0x49, 0x6e, 0xb2, 0x9a, 0x56, 0x40, 0x59, 0x1b, 0xb8, 0x01, 0x16, 0xfa, - 0x56, 0x16, 0xca, 0x8f, 0xb5, 0x0b, 0x02, 0x6a, 0x61, 0x37, 0xab, 0x82, 0x64, 0x76, 0xf0, 0x36, - 0x58, 0xa0, 0xc4, 0x35, 0x75, 0x0b, 0x53, 0xdd, 0xea, 0x85, 0x70, 0xfe, 0xca, 0x2f, 0x33, 0xa8, - 0x9d, 0xac, 0x18, 0xc9, 0x6c, 0xe0, 0x8f, 0x12, 0xcc, 0x67, 0x8a, 0x6f, 0x48, 0x57, 0x8e, 0xce, - 0xac, 0xb1, 0xa9, 0x8f, 0x84, 0x92, 0x95, 0xc7, 0xa5, 0x64, 0xea, 0xc7, 0x0a, 0x80, 0xd9, 0x6c, - 0x1e, 0x79, 0x4f, 0x90, 0xb1, 0x88, 0x55, 0xdb, 0xae, 0x9c, 0x2c, 0x5d, 0x1d, 0x4d, 0x96, 0xa2, - 0xcd, 0x78, 0x3c, 0xb6, 0x24, 0xa6, 0xf7, 0x74, 0xee, 0x78, 0xc6, 0x60, 0x4b, 0x91, 0x3f, 0x4f, - 0xc6, 0x96, 0x62, 0x38, 0x47, 0xb3, 0xa5, 0x7f, 0x16, 0xc0, 0x42, 0xa4, 0x3c, 0x36, 0x5b, 0x92, - 0x98, 0x3c, 0xbb, 0xe7, 0x19, 0x8f, 0xc1, 0x44, 0x53, 0xf7, 0x7f, 0xc2, 0x60, 0x22, 0x87, 0x72, - 0x18, 0xcc, 0x6f, 0x0b, 0x71, 0xaf, 0x8f, 0xc9, 0x60, 0xbe, 0x80, 0x5b, 0x8f, 0xaf, 0x1c, 0x09, - 0x52, 0x3f, 0x2a, 0x82, 0xb3, 0xe9, 0x14, 0x4c, 0x94, 0x54, 0x65, 0x64, 0x49, 0xdd, 0x06, 0x8b, - 0xf7, 0xfa, 0x86, 0x71, 0xc8, 0xc7, 0x10, 0xab, 0xab, 0x7e, 0x31, 0xfe, 0xa6, 0xb0, 0x5c, 0xfc, - 0x9e, 0x44, 0x07, 0x49, 0x2d, 0xb3, 0x15, 0xb6, 0xf8, 0xa4, 0x15, 0xb6, 0x74, 0x82, 0x0a, 0x9b, - 0x53, 0x12, 0xa7, 0x4f, 0x50, 0x12, 0xe5, 0x7c, 0x67, 0xf2, 0x44, 0x7c, 0x67, 0xec, 0xf2, 0x2a, - 0xd9, 0xf9, 0x46, 0xde, 0x2c, 0x0c, 0x15, 0xb0, 0x24, 0x3f, 0xd4, 0x43, 0x03, 0xcc, 0x99, 0xf8, - 0x41, 0xfc, 0x4a, 0x65, 0x54, 0xed, 0xe9, 0x53, 0xdd, 0x68, 0xf8, 0x6f, 0x4e, 0x8d, 0xdb, 0x16, - 0xdd, 0x72, 0x3b, 0xd4, 0xd5, 0xad, 0x9e, 0x5f, 0xab, 0x37, 0x12, 0x58, 0x28, 0x85, 0x0d, 0xef, - 0x82, 0xb2, 0x89, 0x1f, 0x74, 0xfa, 0x6e, 0x2f, 0xa8, 0xa9, 0xc7, 0xef, 0x87, 0xa7, 0xd1, 0x86, - 0x40, 0x41, 0x21, 0x9e, 0xfa, 0xb9, 0x02, 0x96, 0x73, 0x8a, 0xf1, 0xd7, 0x68, 0x94, 0x7f, 0x54, - 0xc0, 0xc5, 0xc4, 0x28, 0x59, 0x72, 0x93, 0x7b, 0x7d, 0x83, 0xe7, 0xb9, 0xe0, 0x3e, 0x57, 0xc1, - 0x8c, 0x83, 0x5d, 0xaa, 0x87, 0xfc, 0xbb, 0xd4, 0x9a, 0x1d, 0x0e, 0xea, 0x33, 0xdb, 0x41, 0x23, - 0x8a, 0xe4, 0x92, 0xb9, 0x29, 0x3c, 0xbd, 0xb9, 0x51, 0x7f, 0x59, 0x00, 0x95, 0x98, 0xcb, 0xa7, - 0xc0, 0x7a, 0xde, 0x4e, 0xb0, 0x1e, 0xe9, 0x93, 0x54, 0x7c, 0x0e, 0xf3, 0x68, 0xcf, 0x46, 0x8a, - 0xf6, 0x7c, 0x7b, 0x14, 0xd0, 0xd1, 0xbc, 0xe7, 0x5f, 0x05, 0xb0, 0x18, 0xd3, 0x8e, 0x88, 0xcf, - 0x77, 0x13, 0xc4, 0x67, 0x25, 0x45, 0x7c, 0xaa, 0x32, 0x9b, 0x67, 0xcc, 0x67, 0x34, 0xf3, 0xf9, - 0x83, 0x02, 0xe6, 0x63, 0x73, 0x77, 0x0a, 0xd4, 0x67, 0x2d, 0x49, 0x7d, 0xea, 0x23, 0xe2, 0x25, - 0x87, 0xfb, 0xdc, 0x02, 0x0b, 0x31, 0xa5, 0x2d, 0xb7, 0xab, 0x5b, 0xd8, 0xf0, 0xe0, 0x0b, 0xa0, - 0xe4, 0x51, 0xec, 0xd2, 0x20, 0xbb, 0x03, 0xdb, 0x0e, 0x6b, 0x44, 0xbe, 0x4c, 0xfd, 0xb7, 0x02, - 0x9a, 0x31, 0xe3, 0x6d, 0xe2, 0x7a, 0xba, 0x47, 0x89, 0x45, 0xef, 0xd8, 0x46, 0xdf, 0x24, 0x6d, - 0x03, 0xeb, 0x26, 0x22, 0xac, 0x41, 0xb7, 0xad, 0x6d, 0xdb, 0xd0, 0xb5, 0x43, 0x88, 0x41, 0xe5, - 0xc3, 0x7d, 0x62, 0xad, 0x11, 0x83, 0x50, 0xf1, 0xe8, 0x32, 0xd3, 0x7a, 0x2b, 0x78, 0x83, 0x78, - 0x2f, 0x12, 0x3d, 0x1e, 0xd4, 0x57, 0xc6, 0x41, 0xe4, 0xc1, 0x19, 0xc7, 0x84, 0x3f, 0x01, 0x80, - 0x7d, 0x76, 0x34, 0x1c, 0x3c, 0xc1, 0xcc, 0xb4, 0xde, 0x0c, 0x52, 0xf8, 0xbd, 0x50, 0x72, 0xac, - 0x0e, 0x62, 0x88, 0xea, 0x6f, 0xca, 0x89, 0xa5, 0xfe, 0xda, 0xdf, 0x78, 0xfd, 0x0c, 0x2c, 0x1e, - 0x44, 0xb3, 0x13, 0x28, 0x30, 0x7a, 0xc5, 0xe2, 0xee, 0x45, 0x29, 0xbc, 0x6c, 0x5e, 0x23, 0x52, - 0x77, 0x47, 0x02, 0x87, 0xa4, 0x9d, 0xc0, 0x57, 0x41, 0x85, 0x71, 0x19, 0x5d, 0x23, 0x9b, 0xd8, - 0x0c, 0xd2, 0x30, 0x7c, 0xb3, 0xea, 0x44, 0x22, 0x14, 0xd7, 0x83, 0xfb, 0x60, 0xc1, 0xb1, 0xbb, - 0x1b, 0xd8, 0xc2, 0x3d, 0xc2, 0x2a, 0xb4, 0xbf, 0x94, 0xfc, 0x2e, 0x6c, 0xa6, 0xf5, 0x5a, 0x70, - 0xcf, 0xb1, 0x9d, 0x55, 0x61, 0x87, 0x3f, 0x49, 0x33, 0x0f, 0x02, 0x19, 0x24, 0x34, 0x33, 0x4f, - 0xac, 0xd3, 0x99, 0xff, 0xa5, 0xc8, 0xf2, 0xf1, 0x84, 0x8f, 0xac, 0x79, 0xb7, 0x7c, 0xe5, 0x13, - 0xdd, 0xf2, 0x49, 0x0e, 0x2f, 0x33, 0xc7, 0x3c, 0xbc, 0xfc, 0x49, 0x01, 0x97, 0x9c, 0x31, 0xd2, - 0xa8, 0x0a, 0xf8, 0xb4, 0xb4, 0x47, 0x4c, 0xcb, 0x38, 0x19, 0xd9, 0x5a, 0x19, 0x0e, 0xea, 0x97, - 0xc6, 0xd1, 0x44, 0x63, 0xb9, 0xc6, 0x92, 0xc6, 0x16, 0x3b, 0x5f, 0xb5, 0xc2, 0xdd, 0xbc, 0x32, - 0xc2, 0xcd, 0x60, 0xa3, 0xf4, 0xf3, 0x30, 0xf8, 0x42, 0x21, 0x8c, 0xfa, 0x71, 0x09, 0x9c, 0xcb, - 0x54, 0xeb, 0x2f, 0xf1, 0x06, 0x33, 0x73, 0x38, 0x9a, 0x3c, 0xc6, 0xe1, 0x68, 0x15, 0xcc, 0x8b, - 0x67, 0xef, 0xd4, 0xd9, 0x2a, 0x0c, 0x93, 0x76, 0x52, 0x8c, 0xd2, 0xfa, 0xb2, 0x1b, 0xd4, 0xd2, - 0x31, 0x6f, 0x50, 0xe3, 0x5e, 0x88, 0x7f, 0x6b, 0xf9, 0xf9, 0x9c, 0xf5, 0x42, 0xfc, 0x69, 0x2b, - 0xad, 0x0f, 0xdf, 0x0c, 0x92, 0x35, 0x44, 0x98, 0xe6, 0x08, 0xa9, 0xec, 0x0b, 0x01, 0x52, 0xda, - 0x4f, 0xf4, 0xb4, 0xfb, 0xbe, 0xe4, 0x69, 0x77, 0x65, 0x44, 0x98, 0x8d, 0x7f, 0xc3, 0x29, 0x3d, - 0xbf, 0x56, 0x8e, 0x7f, 0x7e, 0x55, 0xff, 0xa2, 0x80, 0xe7, 0x72, 0xb7, 0x29, 0xb8, 0x9a, 0x60, - 0x8f, 0xd7, 0x52, 0xec, 0xf1, 0xf9, 0x5c, 0xc3, 0x18, 0x85, 0x34, 0xe5, 0x97, 0x9f, 0x37, 0x47, - 0x5e, 0x7e, 0x4a, 0x4e, 0x22, 0xa3, 0x6f, 0x41, 0x5b, 0xaf, 0x3f, 0x7c, 0x54, 0x9b, 0xf8, 0xf4, - 0x51, 0x6d, 0xe2, 0xb3, 0x47, 0xb5, 0x89, 0x9f, 0x0f, 0x6b, 0xca, 0xc3, 0x61, 0x4d, 0xf9, 0x74, - 0x58, 0x53, 0x3e, 0x1b, 0xd6, 0x94, 0xbf, 0x0f, 0x6b, 0xca, 0xaf, 0x3f, 0xaf, 0x4d, 0xdc, 0x85, - 0xd9, 0xff, 0x8a, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x0a, 0xea, 0xf9, 0x40, 0x2a, 0x00, - 0x00, -} +func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} } func (m *ControllerRevision) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/apps/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/apps/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..f9faa4e13a0d9 --- /dev/null +++ b/staging/src/k8s.io/api/apps/v1/generated.protomessage.pb.go @@ -0,0 +1,82 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*ControllerRevision) ProtoMessage() {} + +func (*ControllerRevisionList) ProtoMessage() {} + +func (*DaemonSet) ProtoMessage() {} + +func (*DaemonSetCondition) ProtoMessage() {} + +func (*DaemonSetList) ProtoMessage() {} + +func (*DaemonSetSpec) ProtoMessage() {} + +func (*DaemonSetStatus) ProtoMessage() {} + +func (*DaemonSetUpdateStrategy) ProtoMessage() {} + +func (*Deployment) ProtoMessage() {} + +func (*DeploymentCondition) ProtoMessage() {} + +func (*DeploymentList) ProtoMessage() {} + +func (*DeploymentSpec) ProtoMessage() {} + +func (*DeploymentStatus) ProtoMessage() {} + +func (*DeploymentStrategy) ProtoMessage() {} + +func (*ReplicaSet) ProtoMessage() {} + +func (*ReplicaSetCondition) ProtoMessage() {} + +func (*ReplicaSetList) ProtoMessage() {} + +func (*ReplicaSetSpec) ProtoMessage() {} + +func (*ReplicaSetStatus) ProtoMessage() {} + +func (*RollingUpdateDaemonSet) ProtoMessage() {} + +func (*RollingUpdateDeployment) ProtoMessage() {} + +func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {} + +func (*StatefulSet) ProtoMessage() {} + +func (*StatefulSetCondition) ProtoMessage() {} + +func (*StatefulSetList) ProtoMessage() {} + +func (*StatefulSetOrdinals) ProtoMessage() {} + +func (*StatefulSetPersistentVolumeClaimRetentionPolicy) ProtoMessage() {} + +func (*StatefulSetSpec) ProtoMessage() {} + +func (*StatefulSetStatus) ProtoMessage() {} + +func (*StatefulSetUpdateStrategy) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/apps/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/apps/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..ae9c3ace130d1 --- /dev/null +++ b/staging/src/k8s.io/api/apps/v1/zz_generated.model_name.go @@ -0,0 +1,172 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ControllerRevision) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.ControllerRevision" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ControllerRevisionList) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.ControllerRevisionList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSet) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.DaemonSet" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSetCondition) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.DaemonSetCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSetList) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.DaemonSetList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSetSpec) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.DaemonSetSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSetStatus) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.DaemonSetStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSetUpdateStrategy) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.DaemonSetUpdateStrategy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Deployment) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.Deployment" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentCondition) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.DeploymentCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentList) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.DeploymentList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentSpec) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.DeploymentSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentStatus) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.DeploymentStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentStrategy) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.DeploymentStrategy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicaSet) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.ReplicaSet" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicaSetCondition) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.ReplicaSetCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicaSetList) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.ReplicaSetList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicaSetSpec) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.ReplicaSetSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicaSetStatus) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.ReplicaSetStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RollingUpdateDaemonSet) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.RollingUpdateDaemonSet" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RollingUpdateDeployment) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.RollingUpdateDeployment" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RollingUpdateStatefulSetStrategy) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.RollingUpdateStatefulSetStrategy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSet) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.StatefulSet" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetCondition) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.StatefulSetCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetList) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.StatefulSetList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetOrdinals) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.StatefulSetOrdinals" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetPersistentVolumeClaimRetentionPolicy) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.StatefulSetPersistentVolumeClaimRetentionPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetSpec) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.StatefulSetSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetStatus) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.StatefulSetStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetUpdateStrategy) OpenAPIModelName() string { + return "io.k8s.api.apps.v1.StatefulSetUpdateStrategy" +} diff --git a/staging/src/k8s.io/api/apps/v1beta1/doc.go b/staging/src/k8s.io/api/apps/v1beta1/doc.go index 7770fab5d2110..85f6df3fde96f 100644 --- a/staging/src/k8s.io/api/apps/v1beta1/doc.go +++ b/staging/src/k8s.io/api/apps/v1beta1/doc.go @@ -18,5 +18,6 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.apps.v1beta1 package v1beta1 diff --git a/staging/src/k8s.io/api/apps/v1beta1/generated.pb.go b/staging/src/k8s.io/api/apps/v1beta1/generated.pb.go index ae84aaf487bc5..3058b6d272c62 100644 --- a/staging/src/k8s.io/api/apps/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/apps/v1beta1/generated.pb.go @@ -23,14 +23,12 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" k8s_io_api_core_v1 "k8s.io/api/core/v1" v11 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -38,826 +36,53 @@ import ( intstr "k8s.io/apimachinery/pkg/util/intstr" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ControllerRevision) Reset() { *m = ControllerRevision{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} } -func (m *ControllerRevision) Reset() { *m = ControllerRevision{} } -func (*ControllerRevision) ProtoMessage() {} -func (*ControllerRevision) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{0} -} -func (m *ControllerRevision) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ControllerRevision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ControllerRevision) XXX_Merge(src proto.Message) { - xxx_messageInfo_ControllerRevision.Merge(m, src) -} -func (m *ControllerRevision) XXX_Size() int { - return m.Size() -} -func (m *ControllerRevision) XXX_DiscardUnknown() { - xxx_messageInfo_ControllerRevision.DiscardUnknown(m) -} - -var xxx_messageInfo_ControllerRevision proto.InternalMessageInfo - -func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} } -func (*ControllerRevisionList) ProtoMessage() {} -func (*ControllerRevisionList) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{1} -} -func (m *ControllerRevisionList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ControllerRevisionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ControllerRevisionList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ControllerRevisionList.Merge(m, src) -} -func (m *ControllerRevisionList) XXX_Size() int { - return m.Size() -} -func (m *ControllerRevisionList) XXX_DiscardUnknown() { - xxx_messageInfo_ControllerRevisionList.DiscardUnknown(m) -} - -var xxx_messageInfo_ControllerRevisionList proto.InternalMessageInfo - -func (m *Deployment) Reset() { *m = Deployment{} } -func (*Deployment) ProtoMessage() {} -func (*Deployment) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{2} -} -func (m *Deployment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Deployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Deployment) XXX_Merge(src proto.Message) { - xxx_messageInfo_Deployment.Merge(m, src) -} -func (m *Deployment) XXX_Size() int { - return m.Size() -} -func (m *Deployment) XXX_DiscardUnknown() { - xxx_messageInfo_Deployment.DiscardUnknown(m) -} - -var xxx_messageInfo_Deployment proto.InternalMessageInfo - -func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } -func (*DeploymentCondition) ProtoMessage() {} -func (*DeploymentCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{3} -} -func (m *DeploymentCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentCondition.Merge(m, src) -} -func (m *DeploymentCondition) XXX_Size() int { - return m.Size() -} -func (m *DeploymentCondition) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentCondition proto.InternalMessageInfo - -func (m *DeploymentList) Reset() { *m = DeploymentList{} } -func (*DeploymentList) ProtoMessage() {} -func (*DeploymentList) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{4} -} -func (m *DeploymentList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentList.Merge(m, src) -} -func (m *DeploymentList) XXX_Size() int { - return m.Size() -} -func (m *DeploymentList) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentList.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentList proto.InternalMessageInfo - -func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} } -func (*DeploymentRollback) ProtoMessage() {} -func (*DeploymentRollback) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{5} -} -func (m *DeploymentRollback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentRollback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentRollback) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentRollback.Merge(m, src) -} -func (m *DeploymentRollback) XXX_Size() int { - return m.Size() -} -func (m *DeploymentRollback) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentRollback.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentRollback proto.InternalMessageInfo - -func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } -func (*DeploymentSpec) ProtoMessage() {} -func (*DeploymentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{6} -} -func (m *DeploymentSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentSpec.Merge(m, src) -} -func (m *DeploymentSpec) XXX_Size() int { - return m.Size() -} -func (m *DeploymentSpec) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentSpec proto.InternalMessageInfo - -func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } -func (*DeploymentStatus) ProtoMessage() {} -func (*DeploymentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{7} -} -func (m *DeploymentStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentStatus.Merge(m, src) -} -func (m *DeploymentStatus) XXX_Size() int { - return m.Size() -} -func (m *DeploymentStatus) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentStatus proto.InternalMessageInfo - -func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } -func (*DeploymentStrategy) ProtoMessage() {} -func (*DeploymentStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{8} -} -func (m *DeploymentStrategy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentStrategy) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentStrategy.Merge(m, src) -} -func (m *DeploymentStrategy) XXX_Size() int { - return m.Size() -} -func (m *DeploymentStrategy) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentStrategy.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentStrategy proto.InternalMessageInfo - -func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } -func (*RollbackConfig) ProtoMessage() {} -func (*RollbackConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{9} -} -func (m *RollbackConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RollbackConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RollbackConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollbackConfig.Merge(m, src) -} -func (m *RollbackConfig) XXX_Size() int { - return m.Size() -} -func (m *RollbackConfig) XXX_DiscardUnknown() { - xxx_messageInfo_RollbackConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_RollbackConfig proto.InternalMessageInfo - -func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } -func (*RollingUpdateDeployment) ProtoMessage() {} -func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{10} -} -func (m *RollingUpdateDeployment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RollingUpdateDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RollingUpdateDeployment) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollingUpdateDeployment.Merge(m, src) -} -func (m *RollingUpdateDeployment) XXX_Size() int { - return m.Size() -} -func (m *RollingUpdateDeployment) XXX_DiscardUnknown() { - xxx_messageInfo_RollingUpdateDeployment.DiscardUnknown(m) -} +func (m *Deployment) Reset() { *m = Deployment{} } -var xxx_messageInfo_RollingUpdateDeployment proto.InternalMessageInfo +func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } -func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} } -func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {} -func (*RollingUpdateStatefulSetStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{11} -} -func (m *RollingUpdateStatefulSetStrategy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RollingUpdateStatefulSetStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RollingUpdateStatefulSetStrategy) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollingUpdateStatefulSetStrategy.Merge(m, src) -} -func (m *RollingUpdateStatefulSetStrategy) XXX_Size() int { - return m.Size() -} -func (m *RollingUpdateStatefulSetStrategy) XXX_DiscardUnknown() { - xxx_messageInfo_RollingUpdateStatefulSetStrategy.DiscardUnknown(m) -} +func (m *DeploymentList) Reset() { *m = DeploymentList{} } -var xxx_messageInfo_RollingUpdateStatefulSetStrategy proto.InternalMessageInfo +func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} } -func (m *Scale) Reset() { *m = Scale{} } -func (*Scale) ProtoMessage() {} -func (*Scale) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{12} -} -func (m *Scale) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Scale) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Scale) XXX_Merge(src proto.Message) { - xxx_messageInfo_Scale.Merge(m, src) -} -func (m *Scale) XXX_Size() int { - return m.Size() -} -func (m *Scale) XXX_DiscardUnknown() { - xxx_messageInfo_Scale.DiscardUnknown(m) -} +func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } -var xxx_messageInfo_Scale proto.InternalMessageInfo +func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } -func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } -func (*ScaleSpec) ProtoMessage() {} -func (*ScaleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{13} -} -func (m *ScaleSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScaleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ScaleSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScaleSpec.Merge(m, src) -} -func (m *ScaleSpec) XXX_Size() int { - return m.Size() -} -func (m *ScaleSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ScaleSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ScaleSpec proto.InternalMessageInfo +func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } -func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } -func (*ScaleStatus) ProtoMessage() {} -func (*ScaleStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{14} -} -func (m *ScaleStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScaleStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ScaleStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScaleStatus.Merge(m, src) -} -func (m *ScaleStatus) XXX_Size() int { - return m.Size() -} -func (m *ScaleStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ScaleStatus.DiscardUnknown(m) -} +func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } -var xxx_messageInfo_ScaleStatus proto.InternalMessageInfo +func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } -func (m *StatefulSet) Reset() { *m = StatefulSet{} } -func (*StatefulSet) ProtoMessage() {} -func (*StatefulSet) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{15} -} -func (m *StatefulSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSet.Merge(m, src) -} -func (m *StatefulSet) XXX_Size() int { - return m.Size() -} -func (m *StatefulSet) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSet.DiscardUnknown(m) -} +func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} } -var xxx_messageInfo_StatefulSet proto.InternalMessageInfo +func (m *Scale) Reset() { *m = Scale{} } -func (m *StatefulSetCondition) Reset() { *m = StatefulSetCondition{} } -func (*StatefulSetCondition) ProtoMessage() {} -func (*StatefulSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{16} -} -func (m *StatefulSetCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetCondition.Merge(m, src) -} -func (m *StatefulSetCondition) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetCondition) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetCondition.DiscardUnknown(m) -} +func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } -var xxx_messageInfo_StatefulSetCondition proto.InternalMessageInfo +func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } -func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } -func (*StatefulSetList) ProtoMessage() {} -func (*StatefulSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{17} -} -func (m *StatefulSetList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetList) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetList.Merge(m, src) -} -func (m *StatefulSetList) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetList) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetList.DiscardUnknown(m) -} +func (m *StatefulSet) Reset() { *m = StatefulSet{} } -var xxx_messageInfo_StatefulSetList proto.InternalMessageInfo +func (m *StatefulSetCondition) Reset() { *m = StatefulSetCondition{} } -func (m *StatefulSetOrdinals) Reset() { *m = StatefulSetOrdinals{} } -func (*StatefulSetOrdinals) ProtoMessage() {} -func (*StatefulSetOrdinals) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{18} -} -func (m *StatefulSetOrdinals) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetOrdinals) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetOrdinals) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetOrdinals.Merge(m, src) -} -func (m *StatefulSetOrdinals) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetOrdinals) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetOrdinals.DiscardUnknown(m) -} +func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } -var xxx_messageInfo_StatefulSetOrdinals proto.InternalMessageInfo +func (m *StatefulSetOrdinals) Reset() { *m = StatefulSetOrdinals{} } func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) Reset() { *m = StatefulSetPersistentVolumeClaimRetentionPolicy{} } -func (*StatefulSetPersistentVolumeClaimRetentionPolicy) ProtoMessage() {} -func (*StatefulSetPersistentVolumeClaimRetentionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{19} -} -func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetPersistentVolumeClaimRetentionPolicy.Merge(m, src) -} -func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetPersistentVolumeClaimRetentionPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_StatefulSetPersistentVolumeClaimRetentionPolicy proto.InternalMessageInfo - -func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } -func (*StatefulSetSpec) ProtoMessage() {} -func (*StatefulSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{20} -} -func (m *StatefulSetSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetSpec.Merge(m, src) -} -func (m *StatefulSetSpec) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetSpec) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_StatefulSetSpec proto.InternalMessageInfo -func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } -func (*StatefulSetStatus) ProtoMessage() {} -func (*StatefulSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{21} -} -func (m *StatefulSetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetStatus.Merge(m, src) -} -func (m *StatefulSetStatus) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetStatus.DiscardUnknown(m) -} +func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } -var xxx_messageInfo_StatefulSetStatus proto.InternalMessageInfo +func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } -func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} } -func (*StatefulSetUpdateStrategy) ProtoMessage() {} -func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_2747f709ac7c95e7, []int{22} -} -func (m *StatefulSetUpdateStrategy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetUpdateStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetUpdateStrategy) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetUpdateStrategy.Merge(m, src) -} -func (m *StatefulSetUpdateStrategy) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetUpdateStrategy) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetUpdateStrategy.DiscardUnknown(m) -} - -var xxx_messageInfo_StatefulSetUpdateStrategy proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ControllerRevision)(nil), "k8s.io.api.apps.v1beta1.ControllerRevision") - proto.RegisterType((*ControllerRevisionList)(nil), "k8s.io.api.apps.v1beta1.ControllerRevisionList") - proto.RegisterType((*Deployment)(nil), "k8s.io.api.apps.v1beta1.Deployment") - proto.RegisterType((*DeploymentCondition)(nil), "k8s.io.api.apps.v1beta1.DeploymentCondition") - proto.RegisterType((*DeploymentList)(nil), "k8s.io.api.apps.v1beta1.DeploymentList") - proto.RegisterType((*DeploymentRollback)(nil), "k8s.io.api.apps.v1beta1.DeploymentRollback") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.apps.v1beta1.DeploymentRollback.UpdatedAnnotationsEntry") - proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.api.apps.v1beta1.DeploymentSpec") - proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.api.apps.v1beta1.DeploymentStatus") - proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.api.apps.v1beta1.DeploymentStrategy") - proto.RegisterType((*RollbackConfig)(nil), "k8s.io.api.apps.v1beta1.RollbackConfig") - proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.api.apps.v1beta1.RollingUpdateDeployment") - proto.RegisterType((*RollingUpdateStatefulSetStrategy)(nil), "k8s.io.api.apps.v1beta1.RollingUpdateStatefulSetStrategy") - proto.RegisterType((*Scale)(nil), "k8s.io.api.apps.v1beta1.Scale") - proto.RegisterType((*ScaleSpec)(nil), "k8s.io.api.apps.v1beta1.ScaleSpec") - proto.RegisterType((*ScaleStatus)(nil), "k8s.io.api.apps.v1beta1.ScaleStatus") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.apps.v1beta1.ScaleStatus.SelectorEntry") - proto.RegisterType((*StatefulSet)(nil), "k8s.io.api.apps.v1beta1.StatefulSet") - proto.RegisterType((*StatefulSetCondition)(nil), "k8s.io.api.apps.v1beta1.StatefulSetCondition") - proto.RegisterType((*StatefulSetList)(nil), "k8s.io.api.apps.v1beta1.StatefulSetList") - proto.RegisterType((*StatefulSetOrdinals)(nil), "k8s.io.api.apps.v1beta1.StatefulSetOrdinals") - proto.RegisterType((*StatefulSetPersistentVolumeClaimRetentionPolicy)(nil), "k8s.io.api.apps.v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy") - proto.RegisterType((*StatefulSetSpec)(nil), "k8s.io.api.apps.v1beta1.StatefulSetSpec") - proto.RegisterType((*StatefulSetStatus)(nil), "k8s.io.api.apps.v1beta1.StatefulSetStatus") - proto.RegisterType((*StatefulSetUpdateStrategy)(nil), "k8s.io.api.apps.v1beta1.StatefulSetUpdateStrategy") -} - -func init() { - proto.RegisterFile("k8s.io/api/apps/v1beta1/generated.proto", fileDescriptor_2747f709ac7c95e7) -} - -var fileDescriptor_2747f709ac7c95e7 = []byte{ - // 2041 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xdd, 0x6f, 0x1b, 0xc7, - 0x11, 0xd7, 0x51, 0xa2, 0x44, 0x8d, 0x22, 0xca, 0x5e, 0xa9, 0x16, 0xa3, 0xb4, 0x92, 0x70, 0x31, - 0x62, 0x25, 0xb1, 0x8f, 0xb1, 0x92, 0x06, 0x89, 0xdd, 0xba, 0x10, 0x25, 0x37, 0x56, 0x20, 0x45, - 0xca, 0x4a, 0xb2, 0xd1, 0xf4, 0x03, 0x59, 0x91, 0x6b, 0xea, 0xa2, 0xfb, 0xc2, 0xdd, 0x52, 0x31, - 0xd1, 0x97, 0xfe, 0x01, 0x2d, 0xd2, 0xe7, 0xfe, 0x15, 0xed, 0x53, 0x8b, 0x16, 0x7d, 0x2d, 0xfc, - 0x18, 0xf4, 0xa5, 0x79, 0x22, 0x6a, 0xe6, 0xb5, 0x7d, 0x6b, 0x5f, 0x0c, 0x14, 0x28, 0x76, 0x6f, - 0xef, 0xfb, 0x4e, 0x3a, 0x16, 0xb0, 0x80, 0xe6, 0x8d, 0xb7, 0x33, 0xf3, 0x9b, 0xd9, 0xd9, 0x99, - 0xd9, 0x99, 0x25, 0xdc, 0x38, 0x7d, 0xcf, 0xd3, 0x74, 0xbb, 0x49, 0x1c, 0xbd, 0x49, 0x1c, 0xc7, - 0x6b, 0x9e, 0xdd, 0x3e, 0xa6, 0x8c, 0xdc, 0x6e, 0x76, 0xa9, 0x45, 0x5d, 0xc2, 0x68, 0x47, 0x73, - 0x5c, 0x9b, 0xd9, 0x68, 0xd1, 0x67, 0xd4, 0x88, 0xa3, 0x6b, 0x9c, 0x51, 0x93, 0x8c, 0x4b, 0xb7, - 0xba, 0x3a, 0x3b, 0xe9, 0x1d, 0x6b, 0x6d, 0xdb, 0x6c, 0x76, 0xed, 0xae, 0xdd, 0x14, 0xfc, 0xc7, - 0xbd, 0xc7, 0xe2, 0x4b, 0x7c, 0x88, 0x5f, 0x3e, 0xce, 0x92, 0x1a, 0x53, 0xd8, 0xb6, 0x5d, 0xda, - 0x3c, 0xcb, 0xe8, 0x5a, 0x7a, 0x27, 0xe2, 0x31, 0x49, 0xfb, 0x44, 0xb7, 0xa8, 0xdb, 0x6f, 0x3a, - 0xa7, 0x5d, 0xbe, 0xe0, 0x35, 0x4d, 0xca, 0x48, 0x9e, 0x54, 0xb3, 0x48, 0xca, 0xed, 0x59, 0x4c, - 0x37, 0x69, 0x46, 0xe0, 0xdd, 0x8b, 0x04, 0xbc, 0xf6, 0x09, 0x35, 0x49, 0x46, 0xee, 0xed, 0x22, - 0xb9, 0x1e, 0xd3, 0x8d, 0xa6, 0x6e, 0x31, 0x8f, 0xb9, 0x69, 0x21, 0xf5, 0xdf, 0x0a, 0xa0, 0x4d, - 0xdb, 0x62, 0xae, 0x6d, 0x18, 0xd4, 0xc5, 0xf4, 0x4c, 0xf7, 0x74, 0xdb, 0x42, 0x9f, 0x42, 0x8d, - 0xef, 0xa7, 0x43, 0x18, 0x69, 0x28, 0xab, 0xca, 0xda, 0xcc, 0xfa, 0x5b, 0x5a, 0xe4, 0xe9, 0x10, - 0x5e, 0x73, 0x4e, 0xbb, 0x7c, 0xc1, 0xd3, 0x38, 0xb7, 0x76, 0x76, 0x5b, 0xdb, 0x3b, 0xfe, 0x8c, - 0xb6, 0xd9, 0x2e, 0x65, 0xa4, 0x85, 0x9e, 0x0e, 0x56, 0xc6, 0x86, 0x83, 0x15, 0x88, 0xd6, 0x70, - 0x88, 0x8a, 0xf6, 0x60, 0x42, 0xa0, 0x57, 0x04, 0xfa, 0xad, 0x42, 0x74, 0xb9, 0x69, 0x0d, 0x93, - 0xcf, 0xef, 0x3f, 0x61, 0xd4, 0xe2, 0xe6, 0xb5, 0x5e, 0x92, 0xd0, 0x13, 0x5b, 0x84, 0x11, 0x2c, - 0x80, 0xd0, 0x4d, 0xa8, 0xb9, 0xd2, 0xfc, 0xc6, 0xf8, 0xaa, 0xb2, 0x36, 0xde, 0xba, 0x22, 0xb9, - 0x6a, 0xc1, 0xb6, 0x70, 0xc8, 0xa1, 0x3e, 0x55, 0xe0, 0x5a, 0x76, 0xdf, 0x3b, 0xba, 0xc7, 0xd0, - 0x4f, 0x32, 0x7b, 0xd7, 0xca, 0xed, 0x9d, 0x4b, 0x8b, 0x9d, 0x87, 0x8a, 0x83, 0x95, 0xd8, 0xbe, - 0xf7, 0xa1, 0xaa, 0x33, 0x6a, 0x7a, 0x8d, 0xca, 0xea, 0xf8, 0xda, 0xcc, 0xfa, 0x9b, 0x5a, 0x41, - 0x00, 0x6b, 0x59, 0xeb, 0x5a, 0xb3, 0x12, 0xb7, 0xba, 0xcd, 0x11, 0xb0, 0x0f, 0xa4, 0xfe, 0xb2, - 0x02, 0xb0, 0x45, 0x1d, 0xc3, 0xee, 0x9b, 0xd4, 0x62, 0x97, 0x70, 0x74, 0xdb, 0x30, 0xe1, 0x39, - 0xb4, 0x2d, 0x8f, 0xee, 0x46, 0xe1, 0x0e, 0x22, 0xa3, 0x0e, 0x1c, 0xda, 0x8e, 0x0e, 0x8d, 0x7f, - 0x61, 0x01, 0x81, 0x3e, 0x86, 0x49, 0x8f, 0x11, 0xd6, 0xf3, 0xc4, 0x91, 0xcd, 0xac, 0xbf, 0x5e, - 0x06, 0x4c, 0x08, 0xb4, 0xea, 0x12, 0x6e, 0xd2, 0xff, 0xc6, 0x12, 0x48, 0xfd, 0xdb, 0x38, 0xcc, - 0x47, 0xcc, 0x9b, 0xb6, 0xd5, 0xd1, 0x19, 0x0f, 0xe9, 0xbb, 0x30, 0xc1, 0xfa, 0x0e, 0x15, 0x3e, - 0x99, 0x6e, 0xdd, 0x08, 0x8c, 0x39, 0xec, 0x3b, 0xf4, 0xf9, 0x60, 0x65, 0x31, 0x47, 0x84, 0x93, - 0xb0, 0x10, 0x42, 0x3b, 0xa1, 0x9d, 0x15, 0x21, 0xfe, 0x4e, 0x52, 0xf9, 0xf3, 0xc1, 0x4a, 0x4e, - 0x01, 0xd1, 0x42, 0xa4, 0xa4, 0x89, 0xe8, 0x33, 0xa8, 0x1b, 0xc4, 0x63, 0x47, 0x4e, 0x87, 0x30, - 0x7a, 0xa8, 0x9b, 0xb4, 0x31, 0x29, 0x76, 0xff, 0x46, 0xb9, 0x83, 0xe2, 0x12, 0xad, 0x6b, 0xd2, - 0x82, 0xfa, 0x4e, 0x02, 0x09, 0xa7, 0x90, 0xd1, 0x19, 0x20, 0xbe, 0x72, 0xe8, 0x12, 0xcb, 0xf3, - 0x77, 0xc5, 0xf5, 0x4d, 0x8d, 0xac, 0x6f, 0x49, 0xea, 0x43, 0x3b, 0x19, 0x34, 0x9c, 0xa3, 0x01, - 0xbd, 0x06, 0x93, 0x2e, 0x25, 0x9e, 0x6d, 0x35, 0x26, 0x84, 0xc7, 0xc2, 0xe3, 0xc2, 0x62, 0x15, - 0x4b, 0x2a, 0x7a, 0x1d, 0xa6, 0x4c, 0xea, 0x79, 0xa4, 0x4b, 0x1b, 0x55, 0xc1, 0x38, 0x27, 0x19, - 0xa7, 0x76, 0xfd, 0x65, 0x1c, 0xd0, 0xd5, 0x3f, 0x28, 0x50, 0x8f, 0x8e, 0xe9, 0x12, 0x72, 0xf5, - 0x41, 0x32, 0x57, 0x5f, 0x2d, 0x11, 0x9c, 0x05, 0x39, 0xfa, 0x8f, 0x0a, 0xa0, 0x88, 0x09, 0xdb, - 0x86, 0x71, 0x4c, 0xda, 0xa7, 0x68, 0x15, 0x26, 0x2c, 0x62, 0x06, 0x31, 0x19, 0x26, 0xc8, 0x47, - 0xc4, 0xa4, 0x58, 0x50, 0xd0, 0x17, 0x0a, 0xa0, 0x9e, 0x38, 0xcd, 0xce, 0x86, 0x65, 0xd9, 0x8c, - 0x70, 0x07, 0x07, 0x06, 0x6d, 0x96, 0x30, 0x28, 0xd0, 0xa5, 0x1d, 0x65, 0x50, 0xee, 0x5b, 0xcc, - 0xed, 0x47, 0x07, 0x9b, 0x65, 0xc0, 0x39, 0xaa, 0xd1, 0x8f, 0x01, 0x5c, 0x89, 0x79, 0x68, 0xcb, - 0xb4, 0x2d, 0xae, 0x01, 0x81, 0xfa, 0x4d, 0xdb, 0x7a, 0xac, 0x77, 0xa3, 0xc2, 0x82, 0x43, 0x08, - 0x1c, 0x83, 0x5b, 0xba, 0x0f, 0x8b, 0x05, 0x76, 0xa2, 0x2b, 0x30, 0x7e, 0x4a, 0xfb, 0xbe, 0xab, - 0x30, 0xff, 0x89, 0x16, 0xa0, 0x7a, 0x46, 0x8c, 0x1e, 0xf5, 0x73, 0x12, 0xfb, 0x1f, 0x77, 0x2a, - 0xef, 0x29, 0xea, 0x6f, 0xab, 0xf1, 0x48, 0xe1, 0xf5, 0x06, 0xad, 0xf1, 0xeb, 0xc1, 0x31, 0xf4, - 0x36, 0xf1, 0x04, 0x46, 0xb5, 0xf5, 0x92, 0x7f, 0x35, 0xf8, 0x6b, 0x38, 0xa4, 0xa2, 0x9f, 0x42, - 0xcd, 0xa3, 0x06, 0x6d, 0x33, 0xdb, 0x95, 0x25, 0xee, 0xed, 0x92, 0x31, 0x45, 0x8e, 0xa9, 0x71, - 0x20, 0x45, 0x7d, 0xf8, 0xe0, 0x0b, 0x87, 0x90, 0xe8, 0x63, 0xa8, 0x31, 0x6a, 0x3a, 0x06, 0x61, - 0x54, 0x7a, 0x2f, 0x11, 0x57, 0xbc, 0x76, 0x70, 0xb0, 0x7d, 0xbb, 0x73, 0x28, 0xd9, 0x44, 0xf5, - 0x0c, 0xe3, 0x34, 0x58, 0xc5, 0x21, 0x0c, 0xfa, 0x11, 0xd4, 0x3c, 0xc6, 0x6f, 0xf5, 0x6e, 0x5f, - 0x64, 0xdb, 0x79, 0xd7, 0x4a, 0xbc, 0x8e, 0xfa, 0x22, 0x11, 0x74, 0xb0, 0x82, 0x43, 0x38, 0xb4, - 0x01, 0x73, 0xa6, 0x6e, 0x61, 0x4a, 0x3a, 0xfd, 0x03, 0xda, 0xb6, 0xad, 0x8e, 0x27, 0xd2, 0xb4, - 0xda, 0x5a, 0x94, 0x42, 0x73, 0xbb, 0x49, 0x32, 0x4e, 0xf3, 0xa3, 0x1d, 0x58, 0x08, 0xae, 0xdd, - 0x07, 0xba, 0xc7, 0x6c, 0xb7, 0xbf, 0xa3, 0x9b, 0x3a, 0x13, 0x35, 0xaf, 0xda, 0x6a, 0x0c, 0x07, - 0x2b, 0x0b, 0x38, 0x87, 0x8e, 0x73, 0xa5, 0x78, 0x5d, 0x71, 0x48, 0xcf, 0xa3, 0x1d, 0x51, 0xc3, - 0x6a, 0x51, 0x5d, 0xd9, 0x17, 0xab, 0x58, 0x52, 0xd1, 0xa3, 0x44, 0x98, 0xd6, 0x46, 0x0b, 0xd3, - 0x7a, 0x71, 0x88, 0xa2, 0x23, 0x58, 0x74, 0x5c, 0xbb, 0xeb, 0x52, 0xcf, 0xdb, 0xa2, 0xa4, 0x63, - 0xe8, 0x16, 0x0d, 0x3c, 0x33, 0x2d, 0x76, 0xf4, 0xca, 0x70, 0xb0, 0xb2, 0xb8, 0x9f, 0xcf, 0x82, - 0x8b, 0x64, 0xd5, 0x5f, 0x55, 0xe1, 0x4a, 0xfa, 0x8e, 0x43, 0x1f, 0x02, 0xb2, 0x8f, 0x3d, 0xea, - 0x9e, 0xd1, 0xce, 0x07, 0x7e, 0xe3, 0xc6, 0xbb, 0x1b, 0x45, 0x74, 0x37, 0x61, 0xde, 0xee, 0x65, - 0x38, 0x70, 0x8e, 0x94, 0xdf, 0x1f, 0xc9, 0x04, 0xa8, 0x08, 0x43, 0x63, 0xfd, 0x51, 0x26, 0x09, - 0x36, 0x60, 0x4e, 0xe6, 0x7e, 0x40, 0x14, 0xc1, 0x1a, 0x3b, 0xf7, 0xa3, 0x24, 0x19, 0xa7, 0xf9, - 0xd1, 0x5d, 0x98, 0x75, 0x79, 0x1c, 0x84, 0x00, 0x53, 0x02, 0xe0, 0x5b, 0x12, 0x60, 0x16, 0xc7, - 0x89, 0x38, 0xc9, 0x8b, 0x3e, 0x80, 0xab, 0xe4, 0x8c, 0xe8, 0x06, 0x39, 0x36, 0x68, 0x08, 0x30, - 0x21, 0x00, 0x5e, 0x96, 0x00, 0x57, 0x37, 0xd2, 0x0c, 0x38, 0x2b, 0x83, 0x76, 0x61, 0xbe, 0x67, - 0x65, 0xa1, 0xfc, 0x20, 0x7e, 0x45, 0x42, 0xcd, 0x1f, 0x65, 0x59, 0x70, 0x9e, 0x1c, 0xda, 0x86, - 0x79, 0x46, 0x5d, 0x53, 0xb7, 0x08, 0xd3, 0xad, 0x6e, 0x08, 0xe7, 0x9f, 0xfc, 0x22, 0x87, 0x3a, - 0xcc, 0x92, 0x71, 0x9e, 0x0c, 0xfa, 0x14, 0xa0, 0x1d, 0x34, 0x08, 0x5e, 0x63, 0x52, 0x54, 0xf4, - 0x9b, 0x25, 0xf2, 0x36, 0xec, 0x2a, 0xa2, 0x6a, 0x1a, 0x2e, 0x79, 0x38, 0x86, 0x89, 0xee, 0x40, - 0xbd, 0x6d, 0x1b, 0x86, 0x48, 0xa2, 0x4d, 0xbb, 0x67, 0x31, 0x91, 0x07, 0xd5, 0x16, 0xe2, 0x7d, - 0xc3, 0x66, 0x82, 0x82, 0x53, 0x9c, 0xea, 0x9f, 0x94, 0xf8, 0x8d, 0x15, 0x54, 0x06, 0x74, 0x27, - 0xd1, 0x45, 0xbd, 0x96, 0xea, 0xa2, 0xae, 0x65, 0x25, 0x62, 0x4d, 0x94, 0x0e, 0xb3, 0x3c, 0x8f, - 0x74, 0xab, 0xeb, 0xc7, 0x8e, 0xac, 0xae, 0x6f, 0x9d, 0x9b, 0x95, 0x21, 0x77, 0xec, 0x8e, 0xbd, - 0x2a, 0xc2, 0x27, 0x4e, 0xc4, 0x49, 0x64, 0xf5, 0x1e, 0xd4, 0x93, 0x29, 0x9d, 0x18, 0x0f, 0x94, - 0x0b, 0xc7, 0x83, 0xaf, 0x15, 0x58, 0x2c, 0xd0, 0x8e, 0x0c, 0xa8, 0x9b, 0xe4, 0x49, 0x2c, 0x62, - 0x2e, 0x6c, 0xb3, 0xf9, 0x00, 0xa6, 0xf9, 0x03, 0x98, 0xb6, 0x6d, 0xb1, 0x3d, 0xf7, 0x80, 0xb9, - 0xba, 0xd5, 0xf5, 0xcf, 0x61, 0x37, 0x81, 0x85, 0x53, 0xd8, 0xe8, 0x13, 0xa8, 0x99, 0xe4, 0xc9, - 0x41, 0xcf, 0xed, 0xe6, 0xf9, 0xab, 0x9c, 0x1e, 0x71, 0x15, 0xed, 0x4a, 0x14, 0x1c, 0xe2, 0xa9, - 0x7f, 0x56, 0x60, 0x35, 0xb1, 0x4b, 0x5e, 0x76, 0xe8, 0xe3, 0x9e, 0x71, 0x40, 0xa3, 0x13, 0x7f, - 0x13, 0xa6, 0x1d, 0xe2, 0x32, 0x3d, 0x2c, 0x3d, 0xd5, 0xd6, 0xec, 0x70, 0xb0, 0x32, 0xbd, 0x1f, - 0x2c, 0xe2, 0x88, 0x9e, 0xe3, 0x9b, 0xca, 0x8b, 0xf3, 0x8d, 0xfa, 0x1f, 0x05, 0xaa, 0x07, 0x6d, - 0x62, 0xd0, 0x4b, 0x18, 0x7a, 0xb6, 0x12, 0x43, 0x8f, 0x5a, 0x18, 0xb3, 0xc2, 0x9e, 0xc2, 0x79, - 0x67, 0x27, 0x35, 0xef, 0x5c, 0xbf, 0x00, 0xe7, 0xfc, 0x51, 0xe7, 0x7d, 0x98, 0x0e, 0xd5, 0x25, - 0xea, 0xbb, 0x72, 0x51, 0x7d, 0x57, 0x7f, 0x53, 0x81, 0x99, 0x98, 0x8a, 0xd1, 0xa4, 0xb9, 0xbb, - 0x63, 0x2d, 0x12, 0x2f, 0x5c, 0xeb, 0x65, 0x36, 0xa2, 0x05, 0xed, 0x90, 0xdf, 0x79, 0x46, 0x7d, - 0x47, 0xb6, 0x4b, 0xba, 0x07, 0x75, 0x46, 0xdc, 0x2e, 0x65, 0x01, 0x4d, 0x38, 0x6c, 0x3a, 0x1a, - 0x7b, 0x0e, 0x13, 0x54, 0x9c, 0xe2, 0x5e, 0xba, 0x0b, 0xb3, 0x09, 0x65, 0x23, 0xb5, 0x8f, 0x5f, - 0x70, 0xe7, 0x44, 0xa9, 0x70, 0x09, 0xd1, 0xf5, 0x61, 0x22, 0xba, 0xd6, 0x8a, 0x9d, 0x19, 0x4b, - 0xd0, 0xa2, 0x18, 0xc3, 0xa9, 0x18, 0x7b, 0xa3, 0x14, 0xda, 0xf9, 0x91, 0xf6, 0xcf, 0x0a, 0x2c, - 0xc4, 0xb8, 0xa3, 0xa9, 0xfa, 0x7b, 0x89, 0xfb, 0x60, 0x2d, 0x75, 0x1f, 0x34, 0xf2, 0x64, 0x5e, - 0xd8, 0x58, 0x9d, 0x3f, 0xea, 0x8e, 0xff, 0x3f, 0x8e, 0xba, 0x7f, 0x54, 0x60, 0x2e, 0xe6, 0xbb, - 0x4b, 0x98, 0x75, 0xb7, 0x93, 0xb3, 0xee, 0xf5, 0x32, 0x41, 0x53, 0x30, 0xec, 0xde, 0x81, 0xf9, - 0x18, 0xd3, 0x9e, 0xdb, 0xd1, 0x2d, 0x62, 0x78, 0xe8, 0x55, 0xa8, 0x7a, 0x8c, 0xb8, 0x2c, 0xb8, - 0x44, 0x02, 0xd9, 0x03, 0xbe, 0x88, 0x7d, 0x9a, 0xfa, 0x2f, 0x05, 0x9a, 0x31, 0xe1, 0x7d, 0xea, - 0x7a, 0xba, 0xc7, 0xa8, 0xc5, 0x1e, 0xda, 0x46, 0xcf, 0xa4, 0x9b, 0x06, 0xd1, 0x4d, 0x4c, 0xf9, - 0x82, 0x6e, 0x5b, 0xfb, 0xb6, 0xa1, 0xb7, 0xfb, 0x88, 0xc0, 0xcc, 0xe7, 0x27, 0xd4, 0xda, 0xa2, - 0x06, 0x65, 0xb4, 0x23, 0x43, 0xf1, 0x07, 0x12, 0x7e, 0xe6, 0x51, 0x44, 0x7a, 0x3e, 0x58, 0x59, - 0x2b, 0x83, 0x28, 0x22, 0x34, 0x8e, 0x89, 0x7e, 0x06, 0xc0, 0x3f, 0x45, 0x2d, 0xeb, 0xc8, 0x60, - 0xbd, 0x17, 0x64, 0xf4, 0xa3, 0x90, 0x32, 0x92, 0x82, 0x18, 0xa2, 0xfa, 0xbb, 0x5a, 0xe2, 0xbc, - 0xbf, 0xf1, 0x13, 0xeb, 0xcf, 0x61, 0xe1, 0x2c, 0xf2, 0x4e, 0xc0, 0xc0, 0x3b, 0xfc, 0xf1, 0xf4, - 0x2b, 0x60, 0x08, 0x9f, 0xe7, 0xd7, 0xd6, 0xb7, 0xa5, 0x92, 0x85, 0x87, 0x39, 0x70, 0x38, 0x57, - 0x09, 0xfa, 0x2e, 0xcc, 0xf0, 0xe9, 0x48, 0x6f, 0xd3, 0x8f, 0x88, 0x19, 0xe4, 0xe2, 0x7c, 0x10, - 0x2f, 0x07, 0x11, 0x09, 0xc7, 0xf9, 0xd0, 0x09, 0xcc, 0x3b, 0x76, 0x67, 0x97, 0x58, 0xa4, 0x4b, - 0x79, 0x23, 0xe8, 0x1f, 0xa5, 0x18, 0x63, 0xa7, 0x5b, 0xef, 0x06, 0x93, 0xc4, 0x7e, 0x96, 0xe5, - 0x39, 0x9f, 0x07, 0xb3, 0xcb, 0x22, 0x08, 0xf2, 0x20, 0x91, 0x0b, 0xf5, 0x9e, 0xec, 0xc7, 0xe4, - 0x54, 0xef, 0xbf, 0xd7, 0xad, 0x97, 0x49, 0xca, 0xa3, 0x84, 0x64, 0x74, 0x61, 0x26, 0xd7, 0x71, - 0x4a, 0x43, 0xe1, 0x94, 0x5e, 0xfb, 0x9f, 0xa6, 0xf4, 0x9c, 0x67, 0x83, 0xe9, 0x11, 0x9f, 0x0d, - 0xfe, 0xa2, 0xc0, 0x75, 0xa7, 0x44, 0x2e, 0x35, 0x40, 0xf8, 0xe6, 0x41, 0x19, 0xdf, 0x94, 0xc9, - 0xcd, 0xd6, 0xda, 0x70, 0xb0, 0x72, 0xbd, 0x0c, 0x27, 0x2e, 0x65, 0x1f, 0x7a, 0x08, 0x35, 0x5b, - 0xd6, 0xc0, 0xc6, 0x8c, 0xb0, 0xf5, 0x66, 0x19, 0x5b, 0x83, 0xba, 0xe9, 0xa7, 0x65, 0xf0, 0x85, - 0x43, 0x2c, 0xf5, 0xf7, 0x55, 0xb8, 0x9a, 0xb9, 0xc1, 0xd1, 0x0f, 0xcf, 0x79, 0x32, 0xb8, 0xf6, - 0xc2, 0x9e, 0x0b, 0x32, 0xb3, 0xfe, 0xf8, 0x08, 0xb3, 0xfe, 0x06, 0xcc, 0xb5, 0x7b, 0xae, 0x4b, - 0x2d, 0x96, 0x9a, 0xf4, 0xc3, 0x60, 0xd9, 0x4c, 0x92, 0x71, 0x9a, 0x3f, 0xef, 0xb9, 0xa2, 0x3a, - 0xe2, 0x73, 0x45, 0xdc, 0x0a, 0x39, 0x27, 0xfa, 0xa9, 0x9d, 0xb5, 0x42, 0x8e, 0x8b, 0x69, 0x7e, - 0xde, 0xb4, 0xfa, 0xa8, 0x21, 0xc2, 0x54, 0xb2, 0x69, 0x3d, 0x4a, 0x50, 0x71, 0x8a, 0x3b, 0x67, - 0x5e, 0x9f, 0x2e, 0x3b, 0xaf, 0x23, 0x92, 0x78, 0x4d, 0x00, 0x51, 0x47, 0x6f, 0x95, 0x89, 0xb3, - 0xf2, 0xcf, 0x09, 0xb9, 0x6f, 0x32, 0x33, 0xa3, 0xbf, 0xc9, 0xa8, 0x7f, 0x55, 0xe0, 0xe5, 0xc2, - 0x8a, 0x85, 0x36, 0x12, 0x2d, 0xe5, 0xad, 0x54, 0x4b, 0xf9, 0x9d, 0x42, 0xc1, 0x58, 0x5f, 0xe9, - 0xe6, 0xbf, 0x34, 0xbc, 0x5f, 0xee, 0xa5, 0x21, 0x67, 0x0a, 0xbe, 0xf8, 0xc9, 0xa1, 0xf5, 0xfd, - 0xa7, 0xcf, 0x96, 0xc7, 0xbe, 0x7c, 0xb6, 0x3c, 0xf6, 0xd5, 0xb3, 0xe5, 0xb1, 0x5f, 0x0c, 0x97, - 0x95, 0xa7, 0xc3, 0x65, 0xe5, 0xcb, 0xe1, 0xb2, 0xf2, 0xd5, 0x70, 0x59, 0xf9, 0xfb, 0x70, 0x59, - 0xf9, 0xf5, 0xd7, 0xcb, 0x63, 0x9f, 0x2c, 0x16, 0xfc, 0xb1, 0xfd, 0xdf, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x40, 0xa4, 0x4b, 0xb9, 0xf2, 0x1e, 0x00, 0x00, -} +func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} } func (m *ControllerRevision) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -1150,7 +375,7 @@ func (m *DeploymentRollback) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.UpdatedAnnotations { keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations) + sort.Strings(keysForUpdatedAnnotations) for iNdEx := len(keysForUpdatedAnnotations) - 1; iNdEx >= 0; iNdEx-- { v := m.UpdatedAnnotations[string(keysForUpdatedAnnotations[iNdEx])] baseI := i @@ -1597,7 +822,7 @@ func (m *ScaleStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Selector { keysForSelector = append(keysForSelector, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForSelector) + sort.Strings(keysForSelector) for iNdEx := len(keysForSelector) - 1; iNdEx >= 0; iNdEx-- { v := m.Selector[string(keysForSelector[iNdEx])] baseI := i @@ -2586,7 +1811,7 @@ func (this *DeploymentRollback) String() string { for k := range this.UpdatedAnnotations { keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations) + sort.Strings(keysForUpdatedAnnotations) mapStringForUpdatedAnnotations := "map[string]string{" for _, k := range keysForUpdatedAnnotations { mapStringForUpdatedAnnotations += fmt.Sprintf("%v: %v,", k, this.UpdatedAnnotations[k]) @@ -2714,7 +1939,7 @@ func (this *ScaleStatus) String() string { for k := range this.Selector { keysForSelector = append(keysForSelector, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForSelector) + sort.Strings(keysForSelector) mapStringForSelector := "map[string]string{" for _, k := range keysForSelector { mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k]) diff --git a/staging/src/k8s.io/api/apps/v1beta1/generated.proto b/staging/src/k8s.io/api/apps/v1beta1/generated.proto index b61dc490dbdef..2c58114fabdc8 100644 --- a/staging/src/k8s.io/api/apps/v1beta1/generated.proto +++ b/staging/src/k8s.io/api/apps/v1beta1/generated.proto @@ -496,8 +496,12 @@ message StatefulSetSpec { // +optional optional int32 minReadySeconds = 9; - // PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from - // the StatefulSet VolumeClaimTemplates. + // persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent + // volume claims created from volumeClaimTemplates. By default, all persistent + // volume claims are created as needed and retained until manually deleted. This + // policy allows the lifecycle to be altered, for example by deleting persistent + // volume claims when their stateful set is deleted, or when their pod is scaled + // down. // +optional optional StatefulSetPersistentVolumeClaimRetentionPolicy persistentVolumeClaimRetentionPolicy = 10; diff --git a/staging/src/k8s.io/api/apps/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/apps/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..3127ea3caeca7 --- /dev/null +++ b/staging/src/k8s.io/api/apps/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,68 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*ControllerRevision) ProtoMessage() {} + +func (*ControllerRevisionList) ProtoMessage() {} + +func (*Deployment) ProtoMessage() {} + +func (*DeploymentCondition) ProtoMessage() {} + +func (*DeploymentList) ProtoMessage() {} + +func (*DeploymentRollback) ProtoMessage() {} + +func (*DeploymentSpec) ProtoMessage() {} + +func (*DeploymentStatus) ProtoMessage() {} + +func (*DeploymentStrategy) ProtoMessage() {} + +func (*RollbackConfig) ProtoMessage() {} + +func (*RollingUpdateDeployment) ProtoMessage() {} + +func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {} + +func (*Scale) ProtoMessage() {} + +func (*ScaleSpec) ProtoMessage() {} + +func (*ScaleStatus) ProtoMessage() {} + +func (*StatefulSet) ProtoMessage() {} + +func (*StatefulSetCondition) ProtoMessage() {} + +func (*StatefulSetList) ProtoMessage() {} + +func (*StatefulSetOrdinals) ProtoMessage() {} + +func (*StatefulSetPersistentVolumeClaimRetentionPolicy) ProtoMessage() {} + +func (*StatefulSetSpec) ProtoMessage() {} + +func (*StatefulSetStatus) ProtoMessage() {} + +func (*StatefulSetUpdateStrategy) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/apps/v1beta1/types.go b/staging/src/k8s.io/api/apps/v1beta1/types.go index cd140be12faa4..0cf7b4db94fea 100644 --- a/staging/src/k8s.io/api/apps/v1beta1/types.go +++ b/staging/src/k8s.io/api/apps/v1beta1/types.go @@ -294,8 +294,12 @@ type StatefulSetSpec struct { // +optional MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,9,opt,name=minReadySeconds"` - // PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from - // the StatefulSet VolumeClaimTemplates. + // persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent + // volume claims created from volumeClaimTemplates. By default, all persistent + // volume claims are created as needed and retained until manually deleted. This + // policy allows the lifecycle to be altered, for example by deleting persistent + // volume claims when their stateful set is deleted, or when their pod is scaled + // down. // +optional PersistentVolumeClaimRetentionPolicy *StatefulSetPersistentVolumeClaimRetentionPolicy `json:"persistentVolumeClaimRetentionPolicy,omitempty" protobuf:"bytes,10,opt,name=persistentVolumeClaimRetentionPolicy"` diff --git a/staging/src/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go index 02ea5f7f26e52..7522c9f5c9cc6 100644 --- a/staging/src/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go @@ -259,7 +259,7 @@ var map_StatefulSetSpec = map[string]string{ "updateStrategy": "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", "revisionHistoryLimit": "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.", "minReadySeconds": "minReadySeconds is the minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", - "persistentVolumeClaimRetentionPolicy": "PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.", + "persistentVolumeClaimRetentionPolicy": "persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down.", "ordinals": "ordinals controls the numbering of replica indices in a StatefulSet. The default ordinals behavior assigns a \"0\" index to the first replica and increments the index by one for each additional replica requested.", } diff --git a/staging/src/k8s.io/api/apps/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/apps/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..5da1ed3f741b4 --- /dev/null +++ b/staging/src/k8s.io/api/apps/v1beta1/zz_generated.model_name.go @@ -0,0 +1,137 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ControllerRevision) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.ControllerRevision" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ControllerRevisionList) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.ControllerRevisionList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Deployment) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.Deployment" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentCondition) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.DeploymentCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentList) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.DeploymentList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentRollback) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.DeploymentRollback" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentSpec) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.DeploymentSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentStatus) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.DeploymentStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentStrategy) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.DeploymentStrategy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RollbackConfig) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.RollbackConfig" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RollingUpdateDeployment) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.RollingUpdateDeployment" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RollingUpdateStatefulSetStrategy) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Scale) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.Scale" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ScaleSpec) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.ScaleSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ScaleStatus) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.ScaleStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSet) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.StatefulSet" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetCondition) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.StatefulSetCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetList) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.StatefulSetList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetOrdinals) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.StatefulSetOrdinals" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetPersistentVolumeClaimRetentionPolicy) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetSpec) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.StatefulSetSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetStatus) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.StatefulSetStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetUpdateStrategy) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta1.StatefulSetUpdateStrategy" +} diff --git a/staging/src/k8s.io/api/apps/v1beta2/doc.go b/staging/src/k8s.io/api/apps/v1beta2/doc.go index 7d28fe42df5ab..3259a47ba2eb6 100644 --- a/staging/src/k8s.io/api/apps/v1beta2/doc.go +++ b/staging/src/k8s.io/api/apps/v1beta2/doc.go @@ -18,5 +18,6 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.apps.v1beta2 package v1beta2 diff --git a/staging/src/k8s.io/api/apps/v1beta2/generated.pb.go b/staging/src/k8s.io/api/apps/v1beta2/generated.pb.go index 9fcba6feb1eed..777a66f12c8bf 100644 --- a/staging/src/k8s.io/api/apps/v1beta2/generated.pb.go +++ b/staging/src/k8s.io/api/apps/v1beta2/generated.pb.go @@ -23,14 +23,12 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" k8s_io_api_core_v1 "k8s.io/api/core/v1" v11 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -38,1135 +36,73 @@ import ( intstr "k8s.io/apimachinery/pkg/util/intstr" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ControllerRevision) Reset() { *m = ControllerRevision{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} } -func (m *ControllerRevision) Reset() { *m = ControllerRevision{} } -func (*ControllerRevision) ProtoMessage() {} -func (*ControllerRevision) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{0} -} -func (m *ControllerRevision) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ControllerRevision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ControllerRevision) XXX_Merge(src proto.Message) { - xxx_messageInfo_ControllerRevision.Merge(m, src) -} -func (m *ControllerRevision) XXX_Size() int { - return m.Size() -} -func (m *ControllerRevision) XXX_DiscardUnknown() { - xxx_messageInfo_ControllerRevision.DiscardUnknown(m) -} - -var xxx_messageInfo_ControllerRevision proto.InternalMessageInfo - -func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} } -func (*ControllerRevisionList) ProtoMessage() {} -func (*ControllerRevisionList) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{1} -} -func (m *ControllerRevisionList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ControllerRevisionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ControllerRevisionList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ControllerRevisionList.Merge(m, src) -} -func (m *ControllerRevisionList) XXX_Size() int { - return m.Size() -} -func (m *ControllerRevisionList) XXX_DiscardUnknown() { - xxx_messageInfo_ControllerRevisionList.DiscardUnknown(m) -} - -var xxx_messageInfo_ControllerRevisionList proto.InternalMessageInfo - -func (m *DaemonSet) Reset() { *m = DaemonSet{} } -func (*DaemonSet) ProtoMessage() {} -func (*DaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{2} -} -func (m *DaemonSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSet.Merge(m, src) -} -func (m *DaemonSet) XXX_Size() int { - return m.Size() -} -func (m *DaemonSet) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSet.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSet proto.InternalMessageInfo - -func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} } -func (*DaemonSetCondition) ProtoMessage() {} -func (*DaemonSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{3} -} -func (m *DaemonSetCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSetCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSetCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSetCondition.Merge(m, src) -} -func (m *DaemonSetCondition) XXX_Size() int { - return m.Size() -} -func (m *DaemonSetCondition) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSetCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSetCondition proto.InternalMessageInfo - -func (m *DaemonSetList) Reset() { *m = DaemonSetList{} } -func (*DaemonSetList) ProtoMessage() {} -func (*DaemonSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{4} -} -func (m *DaemonSetList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSetList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSetList.Merge(m, src) -} -func (m *DaemonSetList) XXX_Size() int { - return m.Size() -} -func (m *DaemonSetList) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSetList.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSetList proto.InternalMessageInfo - -func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} } -func (*DaemonSetSpec) ProtoMessage() {} -func (*DaemonSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{5} -} -func (m *DaemonSetSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSetSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSetSpec.Merge(m, src) -} -func (m *DaemonSetSpec) XXX_Size() int { - return m.Size() -} -func (m *DaemonSetSpec) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSetSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSetSpec proto.InternalMessageInfo - -func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } -func (*DaemonSetStatus) ProtoMessage() {} -func (*DaemonSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{6} -} -func (m *DaemonSetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSetStatus.Merge(m, src) -} -func (m *DaemonSetStatus) XXX_Size() int { - return m.Size() -} -func (m *DaemonSetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSetStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSetStatus proto.InternalMessageInfo - -func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } -func (*DaemonSetUpdateStrategy) ProtoMessage() {} -func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{7} -} -func (m *DaemonSetUpdateStrategy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSetUpdateStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSetUpdateStrategy) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSetUpdateStrategy.Merge(m, src) -} -func (m *DaemonSetUpdateStrategy) XXX_Size() int { - return m.Size() -} -func (m *DaemonSetUpdateStrategy) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSetUpdateStrategy.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSetUpdateStrategy proto.InternalMessageInfo - -func (m *Deployment) Reset() { *m = Deployment{} } -func (*Deployment) ProtoMessage() {} -func (*Deployment) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{8} -} -func (m *Deployment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Deployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Deployment) XXX_Merge(src proto.Message) { - xxx_messageInfo_Deployment.Merge(m, src) -} -func (m *Deployment) XXX_Size() int { - return m.Size() -} -func (m *Deployment) XXX_DiscardUnknown() { - xxx_messageInfo_Deployment.DiscardUnknown(m) -} - -var xxx_messageInfo_Deployment proto.InternalMessageInfo - -func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } -func (*DeploymentCondition) ProtoMessage() {} -func (*DeploymentCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{9} -} -func (m *DeploymentCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentCondition.Merge(m, src) -} -func (m *DeploymentCondition) XXX_Size() int { - return m.Size() -} -func (m *DeploymentCondition) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentCondition proto.InternalMessageInfo - -func (m *DeploymentList) Reset() { *m = DeploymentList{} } -func (*DeploymentList) ProtoMessage() {} -func (*DeploymentList) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{10} -} -func (m *DeploymentList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentList.Merge(m, src) -} -func (m *DeploymentList) XXX_Size() int { - return m.Size() -} -func (m *DeploymentList) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentList.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentList proto.InternalMessageInfo - -func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } -func (*DeploymentSpec) ProtoMessage() {} -func (*DeploymentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{11} -} -func (m *DeploymentSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentSpec.Merge(m, src) -} -func (m *DeploymentSpec) XXX_Size() int { - return m.Size() -} -func (m *DeploymentSpec) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentSpec proto.InternalMessageInfo - -func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } -func (*DeploymentStatus) ProtoMessage() {} -func (*DeploymentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{12} -} -func (m *DeploymentStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentStatus.Merge(m, src) -} -func (m *DeploymentStatus) XXX_Size() int { - return m.Size() -} -func (m *DeploymentStatus) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentStatus proto.InternalMessageInfo - -func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } -func (*DeploymentStrategy) ProtoMessage() {} -func (*DeploymentStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{13} -} -func (m *DeploymentStrategy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentStrategy) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentStrategy.Merge(m, src) -} -func (m *DeploymentStrategy) XXX_Size() int { - return m.Size() -} -func (m *DeploymentStrategy) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentStrategy.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentStrategy proto.InternalMessageInfo - -func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } -func (*ReplicaSet) ProtoMessage() {} -func (*ReplicaSet) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{14} -} -func (m *ReplicaSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSet.Merge(m, src) -} -func (m *ReplicaSet) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSet) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSet.DiscardUnknown(m) -} - -var xxx_messageInfo_ReplicaSet proto.InternalMessageInfo +func (m *DaemonSet) Reset() { *m = DaemonSet{} } -func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} } -func (*ReplicaSetCondition) ProtoMessage() {} -func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{15} -} -func (m *ReplicaSetCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSetCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSetCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSetCondition.Merge(m, src) -} -func (m *ReplicaSetCondition) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSetCondition) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSetCondition.DiscardUnknown(m) -} +func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} } -var xxx_messageInfo_ReplicaSetCondition proto.InternalMessageInfo +func (m *DaemonSetList) Reset() { *m = DaemonSetList{} } -func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} } -func (*ReplicaSetList) ProtoMessage() {} -func (*ReplicaSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{16} -} -func (m *ReplicaSetList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSetList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSetList.Merge(m, src) -} -func (m *ReplicaSetList) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSetList) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSetList.DiscardUnknown(m) -} +func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} } -var xxx_messageInfo_ReplicaSetList proto.InternalMessageInfo +func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } -func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } -func (*ReplicaSetSpec) ProtoMessage() {} -func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{17} -} -func (m *ReplicaSetSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSetSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSetSpec.Merge(m, src) -} -func (m *ReplicaSetSpec) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSetSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSetSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ReplicaSetSpec proto.InternalMessageInfo - -func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } -func (*ReplicaSetStatus) ProtoMessage() {} -func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{18} -} -func (m *ReplicaSetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSetStatus.Merge(m, src) -} -func (m *ReplicaSetStatus) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSetStatus.DiscardUnknown(m) -} +func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } -var xxx_messageInfo_ReplicaSetStatus proto.InternalMessageInfo +func (m *Deployment) Reset() { *m = Deployment{} } -func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } -func (*RollingUpdateDaemonSet) ProtoMessage() {} -func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{19} -} -func (m *RollingUpdateDaemonSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RollingUpdateDaemonSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RollingUpdateDaemonSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollingUpdateDaemonSet.Merge(m, src) -} -func (m *RollingUpdateDaemonSet) XXX_Size() int { - return m.Size() -} -func (m *RollingUpdateDaemonSet) XXX_DiscardUnknown() { - xxx_messageInfo_RollingUpdateDaemonSet.DiscardUnknown(m) -} +func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } -var xxx_messageInfo_RollingUpdateDaemonSet proto.InternalMessageInfo +func (m *DeploymentList) Reset() { *m = DeploymentList{} } -func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } -func (*RollingUpdateDeployment) ProtoMessage() {} -func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{20} -} -func (m *RollingUpdateDeployment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RollingUpdateDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RollingUpdateDeployment) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollingUpdateDeployment.Merge(m, src) -} -func (m *RollingUpdateDeployment) XXX_Size() int { - return m.Size() -} -func (m *RollingUpdateDeployment) XXX_DiscardUnknown() { - xxx_messageInfo_RollingUpdateDeployment.DiscardUnknown(m) -} +func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } -var xxx_messageInfo_RollingUpdateDeployment proto.InternalMessageInfo +func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } -func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} } -func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {} -func (*RollingUpdateStatefulSetStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{21} -} -func (m *RollingUpdateStatefulSetStrategy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RollingUpdateStatefulSetStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RollingUpdateStatefulSetStrategy) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollingUpdateStatefulSetStrategy.Merge(m, src) -} -func (m *RollingUpdateStatefulSetStrategy) XXX_Size() int { - return m.Size() -} -func (m *RollingUpdateStatefulSetStrategy) XXX_DiscardUnknown() { - xxx_messageInfo_RollingUpdateStatefulSetStrategy.DiscardUnknown(m) -} +func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } -var xxx_messageInfo_RollingUpdateStatefulSetStrategy proto.InternalMessageInfo +func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } -func (m *Scale) Reset() { *m = Scale{} } -func (*Scale) ProtoMessage() {} -func (*Scale) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{22} -} -func (m *Scale) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Scale) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Scale) XXX_Merge(src proto.Message) { - xxx_messageInfo_Scale.Merge(m, src) -} -func (m *Scale) XXX_Size() int { - return m.Size() -} -func (m *Scale) XXX_DiscardUnknown() { - xxx_messageInfo_Scale.DiscardUnknown(m) -} +func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} } -var xxx_messageInfo_Scale proto.InternalMessageInfo +func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} } -func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } -func (*ScaleSpec) ProtoMessage() {} -func (*ScaleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{23} -} -func (m *ScaleSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScaleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ScaleSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScaleSpec.Merge(m, src) -} -func (m *ScaleSpec) XXX_Size() int { - return m.Size() -} -func (m *ScaleSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ScaleSpec.DiscardUnknown(m) -} +func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } -var xxx_messageInfo_ScaleSpec proto.InternalMessageInfo +func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } -func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } -func (*ScaleStatus) ProtoMessage() {} -func (*ScaleStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{24} -} -func (m *ScaleStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScaleStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ScaleStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScaleStatus.Merge(m, src) -} -func (m *ScaleStatus) XXX_Size() int { - return m.Size() -} -func (m *ScaleStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ScaleStatus.DiscardUnknown(m) -} +func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } -var xxx_messageInfo_ScaleStatus proto.InternalMessageInfo +func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } -func (m *StatefulSet) Reset() { *m = StatefulSet{} } -func (*StatefulSet) ProtoMessage() {} -func (*StatefulSet) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{25} -} -func (m *StatefulSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSet.Merge(m, src) -} -func (m *StatefulSet) XXX_Size() int { - return m.Size() -} -func (m *StatefulSet) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSet.DiscardUnknown(m) -} +func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} } -var xxx_messageInfo_StatefulSet proto.InternalMessageInfo +func (m *Scale) Reset() { *m = Scale{} } -func (m *StatefulSetCondition) Reset() { *m = StatefulSetCondition{} } -func (*StatefulSetCondition) ProtoMessage() {} -func (*StatefulSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{26} -} -func (m *StatefulSetCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetCondition.Merge(m, src) -} -func (m *StatefulSetCondition) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetCondition) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetCondition.DiscardUnknown(m) -} +func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } -var xxx_messageInfo_StatefulSetCondition proto.InternalMessageInfo +func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } -func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } -func (*StatefulSetList) ProtoMessage() {} -func (*StatefulSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{27} -} -func (m *StatefulSetList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetList) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetList.Merge(m, src) -} -func (m *StatefulSetList) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetList) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetList.DiscardUnknown(m) -} +func (m *StatefulSet) Reset() { *m = StatefulSet{} } -var xxx_messageInfo_StatefulSetList proto.InternalMessageInfo +func (m *StatefulSetCondition) Reset() { *m = StatefulSetCondition{} } -func (m *StatefulSetOrdinals) Reset() { *m = StatefulSetOrdinals{} } -func (*StatefulSetOrdinals) ProtoMessage() {} -func (*StatefulSetOrdinals) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{28} -} -func (m *StatefulSetOrdinals) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetOrdinals) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetOrdinals) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetOrdinals.Merge(m, src) -} -func (m *StatefulSetOrdinals) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetOrdinals) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetOrdinals.DiscardUnknown(m) -} +func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } -var xxx_messageInfo_StatefulSetOrdinals proto.InternalMessageInfo +func (m *StatefulSetOrdinals) Reset() { *m = StatefulSetOrdinals{} } func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) Reset() { *m = StatefulSetPersistentVolumeClaimRetentionPolicy{} } -func (*StatefulSetPersistentVolumeClaimRetentionPolicy) ProtoMessage() {} -func (*StatefulSetPersistentVolumeClaimRetentionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{29} -} -func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetPersistentVolumeClaimRetentionPolicy.Merge(m, src) -} -func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetPersistentVolumeClaimRetentionPolicy.DiscardUnknown(m) -} -var xxx_messageInfo_StatefulSetPersistentVolumeClaimRetentionPolicy proto.InternalMessageInfo +func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } -func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } -func (*StatefulSetSpec) ProtoMessage() {} -func (*StatefulSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{30} -} -func (m *StatefulSetSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetSpec.Merge(m, src) -} -func (m *StatefulSetSpec) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetSpec) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_StatefulSetSpec proto.InternalMessageInfo - -func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } -func (*StatefulSetStatus) ProtoMessage() {} -func (*StatefulSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{31} -} -func (m *StatefulSetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetStatus.Merge(m, src) -} -func (m *StatefulSetStatus) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetStatus.DiscardUnknown(m) -} +func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } -var xxx_messageInfo_StatefulSetStatus proto.InternalMessageInfo - -func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} } -func (*StatefulSetUpdateStrategy) ProtoMessage() {} -func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_c423c016abf485d4, []int{32} -} -func (m *StatefulSetUpdateStrategy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatefulSetUpdateStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatefulSetUpdateStrategy) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatefulSetUpdateStrategy.Merge(m, src) -} -func (m *StatefulSetUpdateStrategy) XXX_Size() int { - return m.Size() -} -func (m *StatefulSetUpdateStrategy) XXX_DiscardUnknown() { - xxx_messageInfo_StatefulSetUpdateStrategy.DiscardUnknown(m) -} - -var xxx_messageInfo_StatefulSetUpdateStrategy proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ControllerRevision)(nil), "k8s.io.api.apps.v1beta2.ControllerRevision") - proto.RegisterType((*ControllerRevisionList)(nil), "k8s.io.api.apps.v1beta2.ControllerRevisionList") - proto.RegisterType((*DaemonSet)(nil), "k8s.io.api.apps.v1beta2.DaemonSet") - proto.RegisterType((*DaemonSetCondition)(nil), "k8s.io.api.apps.v1beta2.DaemonSetCondition") - proto.RegisterType((*DaemonSetList)(nil), "k8s.io.api.apps.v1beta2.DaemonSetList") - proto.RegisterType((*DaemonSetSpec)(nil), "k8s.io.api.apps.v1beta2.DaemonSetSpec") - proto.RegisterType((*DaemonSetStatus)(nil), "k8s.io.api.apps.v1beta2.DaemonSetStatus") - proto.RegisterType((*DaemonSetUpdateStrategy)(nil), "k8s.io.api.apps.v1beta2.DaemonSetUpdateStrategy") - proto.RegisterType((*Deployment)(nil), "k8s.io.api.apps.v1beta2.Deployment") - proto.RegisterType((*DeploymentCondition)(nil), "k8s.io.api.apps.v1beta2.DeploymentCondition") - proto.RegisterType((*DeploymentList)(nil), "k8s.io.api.apps.v1beta2.DeploymentList") - proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.api.apps.v1beta2.DeploymentSpec") - proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.api.apps.v1beta2.DeploymentStatus") - proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.api.apps.v1beta2.DeploymentStrategy") - proto.RegisterType((*ReplicaSet)(nil), "k8s.io.api.apps.v1beta2.ReplicaSet") - proto.RegisterType((*ReplicaSetCondition)(nil), "k8s.io.api.apps.v1beta2.ReplicaSetCondition") - proto.RegisterType((*ReplicaSetList)(nil), "k8s.io.api.apps.v1beta2.ReplicaSetList") - proto.RegisterType((*ReplicaSetSpec)(nil), "k8s.io.api.apps.v1beta2.ReplicaSetSpec") - proto.RegisterType((*ReplicaSetStatus)(nil), "k8s.io.api.apps.v1beta2.ReplicaSetStatus") - proto.RegisterType((*RollingUpdateDaemonSet)(nil), "k8s.io.api.apps.v1beta2.RollingUpdateDaemonSet") - proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.api.apps.v1beta2.RollingUpdateDeployment") - proto.RegisterType((*RollingUpdateStatefulSetStrategy)(nil), "k8s.io.api.apps.v1beta2.RollingUpdateStatefulSetStrategy") - proto.RegisterType((*Scale)(nil), "k8s.io.api.apps.v1beta2.Scale") - proto.RegisterType((*ScaleSpec)(nil), "k8s.io.api.apps.v1beta2.ScaleSpec") - proto.RegisterType((*ScaleStatus)(nil), "k8s.io.api.apps.v1beta2.ScaleStatus") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.apps.v1beta2.ScaleStatus.SelectorEntry") - proto.RegisterType((*StatefulSet)(nil), "k8s.io.api.apps.v1beta2.StatefulSet") - proto.RegisterType((*StatefulSetCondition)(nil), "k8s.io.api.apps.v1beta2.StatefulSetCondition") - proto.RegisterType((*StatefulSetList)(nil), "k8s.io.api.apps.v1beta2.StatefulSetList") - proto.RegisterType((*StatefulSetOrdinals)(nil), "k8s.io.api.apps.v1beta2.StatefulSetOrdinals") - proto.RegisterType((*StatefulSetPersistentVolumeClaimRetentionPolicy)(nil), "k8s.io.api.apps.v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy") - proto.RegisterType((*StatefulSetSpec)(nil), "k8s.io.api.apps.v1beta2.StatefulSetSpec") - proto.RegisterType((*StatefulSetStatus)(nil), "k8s.io.api.apps.v1beta2.StatefulSetStatus") - proto.RegisterType((*StatefulSetUpdateStrategy)(nil), "k8s.io.api.apps.v1beta2.StatefulSetUpdateStrategy") -} - -func init() { - proto.RegisterFile("k8s.io/api/apps/v1beta2/generated.proto", fileDescriptor_c423c016abf485d4) -} - -var fileDescriptor_c423c016abf485d4 = []byte{ - // 2359 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xf7, 0x92, 0xa2, 0x44, 0x0e, 0x2d, 0xc9, 0x1e, 0xa9, 0x22, 0x63, 0xb7, 0xa4, 0xb1, 0x36, - 0x6c, 0x25, 0xb6, 0x49, 0x5b, 0xf9, 0x40, 0x62, 0xb7, 0x09, 0x44, 0x29, 0xb5, 0x1d, 0x48, 0x32, - 0x33, 0xb4, 0x1c, 0x34, 0xe8, 0x87, 0x47, 0xe4, 0x98, 0xda, 0x78, 0xbf, 0xb0, 0x3b, 0x54, 0x4c, - 0xf4, 0xd2, 0x6b, 0x81, 0x16, 0x6d, 0xae, 0xfd, 0x27, 0x8a, 0x5e, 0x8a, 0xa2, 0x41, 0x6f, 0x41, - 0xe1, 0x63, 0xd0, 0x4b, 0x72, 0x22, 0x6a, 0xe6, 0x54, 0x14, 0xbd, 0xb5, 0x17, 0x03, 0x05, 0x8a, - 0x99, 0x9d, 0xfd, 0xde, 0x35, 0x97, 0x8a, 0xad, 0x34, 0x41, 0x6e, 0xdc, 0x79, 0xef, 0xfd, 0xe6, - 0xcd, 0xcc, 0x7b, 0xf3, 0x7e, 0xfb, 0xb8, 0xe0, 0xc2, 0x83, 0xd7, 0xed, 0x86, 0x62, 0x34, 0xb1, - 0xa9, 0x34, 0xb1, 0x69, 0xda, 0xcd, 0x83, 0xab, 0x7b, 0x84, 0xe2, 0xb5, 0x66, 0x9f, 0xe8, 0xc4, - 0xc2, 0x94, 0xf4, 0x1a, 0xa6, 0x65, 0x50, 0x03, 0x56, 0x1c, 0xc5, 0x06, 0x36, 0x95, 0x06, 0x53, - 0x6c, 0x08, 0xc5, 0x53, 0x97, 0xfb, 0x0a, 0xdd, 0x1f, 0xec, 0x35, 0xba, 0x86, 0xd6, 0xec, 0x1b, - 0x7d, 0xa3, 0xc9, 0xf5, 0xf7, 0x06, 0xf7, 0xf9, 0x13, 0x7f, 0xe0, 0xbf, 0x1c, 0x9c, 0x53, 0x72, - 0x60, 0xc2, 0xae, 0x61, 0x91, 0xe6, 0xc1, 0xd5, 0xe8, 0x5c, 0xa7, 0x5e, 0xf1, 0x75, 0x34, 0xdc, - 0xdd, 0x57, 0x74, 0x62, 0x0d, 0x9b, 0xe6, 0x83, 0x3e, 0x1b, 0xb0, 0x9b, 0x1a, 0xa1, 0x38, 0xc9, - 0xaa, 0x99, 0x66, 0x65, 0x0d, 0x74, 0xaa, 0x68, 0x24, 0x66, 0xf0, 0xda, 0x24, 0x03, 0xbb, 0xbb, - 0x4f, 0x34, 0x1c, 0xb3, 0x7b, 0x39, 0xcd, 0x6e, 0x40, 0x15, 0xb5, 0xa9, 0xe8, 0xd4, 0xa6, 0x56, - 0xd4, 0x48, 0xfe, 0x8f, 0x04, 0xe0, 0x86, 0xa1, 0x53, 0xcb, 0x50, 0x55, 0x62, 0x21, 0x72, 0xa0, - 0xd8, 0x8a, 0xa1, 0xc3, 0x7b, 0xa0, 0xc8, 0xd6, 0xd3, 0xc3, 0x14, 0x57, 0xa5, 0x33, 0xd2, 0x6a, - 0x79, 0xed, 0x4a, 0xc3, 0xdf, 0x69, 0x0f, 0xbe, 0x61, 0x3e, 0xe8, 0xb3, 0x01, 0xbb, 0xc1, 0xb4, - 0x1b, 0x07, 0x57, 0x1b, 0xb7, 0xf7, 0x3e, 0x20, 0x5d, 0xba, 0x4d, 0x28, 0x6e, 0xc1, 0x47, 0xa3, - 0xfa, 0xb1, 0xf1, 0xa8, 0x0e, 0xfc, 0x31, 0xe4, 0xa1, 0xc2, 0xdb, 0x60, 0x86, 0xa3, 0xe7, 0x38, - 0xfa, 0xe5, 0x54, 0x74, 0xb1, 0xe8, 0x06, 0xc2, 0x1f, 0xbe, 0xfd, 0x90, 0x12, 0x9d, 0xb9, 0xd7, - 0x3a, 0x2e, 0xa0, 0x67, 0x36, 0x31, 0xc5, 0x88, 0x03, 0xc1, 0x4b, 0xa0, 0x68, 0x09, 0xf7, 0xab, - 0xf9, 0x33, 0xd2, 0x6a, 0xbe, 0x75, 0x42, 0x68, 0x15, 0xdd, 0x65, 0x21, 0x4f, 0x43, 0x7e, 0x24, - 0x81, 0x95, 0xf8, 0xba, 0xb7, 0x14, 0x9b, 0xc2, 0x1f, 0xc7, 0xd6, 0xde, 0xc8, 0xb6, 0x76, 0x66, - 0xcd, 0x57, 0xee, 0x4d, 0xec, 0x8e, 0x04, 0xd6, 0xdd, 0x06, 0x05, 0x85, 0x12, 0xcd, 0xae, 0xe6, - 0xce, 0xe4, 0x57, 0xcb, 0x6b, 0x17, 0x1b, 0x29, 0x01, 0xdc, 0x88, 0x7b, 0xd7, 0x9a, 0x17, 0xb8, - 0x85, 0x5b, 0x0c, 0x01, 0x39, 0x40, 0xf2, 0x2f, 0x73, 0xa0, 0xb4, 0x89, 0x89, 0x66, 0xe8, 0x1d, - 0x42, 0x8f, 0xe0, 0xe4, 0x6e, 0x82, 0x19, 0xdb, 0x24, 0x5d, 0x71, 0x72, 0xe7, 0x53, 0x17, 0xe0, - 0xf9, 0xd4, 0x31, 0x49, 0xd7, 0x3f, 0x32, 0xf6, 0x84, 0x38, 0x02, 0x6c, 0x83, 0x59, 0x9b, 0x62, - 0x3a, 0xb0, 0xf9, 0x81, 0x95, 0xd7, 0x56, 0x33, 0x60, 0x71, 0xfd, 0xd6, 0x82, 0x40, 0x9b, 0x75, - 0x9e, 0x91, 0xc0, 0x91, 0xff, 0x91, 0x03, 0xd0, 0xd3, 0xdd, 0x30, 0xf4, 0x9e, 0x42, 0x59, 0x38, - 0x5f, 0x03, 0x33, 0x74, 0x68, 0x12, 0xbe, 0x21, 0xa5, 0xd6, 0x79, 0xd7, 0x95, 0x3b, 0x43, 0x93, - 0x3c, 0x19, 0xd5, 0x57, 0xe2, 0x16, 0x4c, 0x82, 0xb8, 0x0d, 0xdc, 0xf2, 0x9c, 0xcc, 0x71, 0xeb, - 0x57, 0xc2, 0x53, 0x3f, 0x19, 0xd5, 0x13, 0xee, 0x8e, 0x86, 0x87, 0x14, 0x76, 0x10, 0x1e, 0x00, - 0xa8, 0x62, 0x9b, 0xde, 0xb1, 0xb0, 0x6e, 0x3b, 0x33, 0x29, 0x1a, 0x11, 0xcb, 0x7f, 0x29, 0xdb, - 0x41, 0x31, 0x8b, 0xd6, 0x29, 0xe1, 0x05, 0xdc, 0x8a, 0xa1, 0xa1, 0x84, 0x19, 0xe0, 0x79, 0x30, - 0x6b, 0x11, 0x6c, 0x1b, 0x7a, 0x75, 0x86, 0xaf, 0xc2, 0xdb, 0x40, 0xc4, 0x47, 0x91, 0x90, 0xc2, - 0x17, 0xc1, 0x9c, 0x46, 0x6c, 0x1b, 0xf7, 0x49, 0xb5, 0xc0, 0x15, 0x17, 0x85, 0xe2, 0xdc, 0xb6, - 0x33, 0x8c, 0x5c, 0xb9, 0xfc, 0x47, 0x09, 0xcc, 0x7b, 0x3b, 0x77, 0x04, 0x99, 0x73, 0x23, 0x9c, - 0x39, 0xf2, 0xe4, 0x60, 0x49, 0x49, 0x98, 0x4f, 0xf2, 0x01, 0xc7, 0x59, 0x38, 0xc2, 0x9f, 0x80, - 0xa2, 0x4d, 0x54, 0xd2, 0xa5, 0x86, 0x25, 0x1c, 0x7f, 0x39, 0xa3, 0xe3, 0x78, 0x8f, 0xa8, 0x1d, - 0x61, 0xda, 0x3a, 0xce, 0x3c, 0x77, 0x9f, 0x90, 0x07, 0x09, 0xdf, 0x05, 0x45, 0x4a, 0x34, 0x53, - 0xc5, 0x94, 0x88, 0xac, 0x39, 0x1b, 0x74, 0x9e, 0xc5, 0x0c, 0x03, 0x6b, 0x1b, 0xbd, 0x3b, 0x42, - 0x8d, 0xa7, 0x8c, 0xb7, 0x19, 0xee, 0x28, 0xf2, 0x60, 0xa0, 0x09, 0x16, 0x06, 0x66, 0x8f, 0x69, - 0x52, 0x76, 0x9d, 0xf7, 0x87, 0x22, 0x86, 0xae, 0x4c, 0xde, 0x95, 0xdd, 0x90, 0x5d, 0x6b, 0x45, - 0xcc, 0xb2, 0x10, 0x1e, 0x47, 0x11, 0x7c, 0xb8, 0x0e, 0x16, 0x35, 0x45, 0x47, 0x04, 0xf7, 0x86, - 0x1d, 0xd2, 0x35, 0xf4, 0x9e, 0xcd, 0x43, 0xa9, 0xd0, 0xaa, 0x08, 0x80, 0xc5, 0xed, 0xb0, 0x18, - 0x45, 0xf5, 0xe1, 0x16, 0x58, 0x76, 0x2f, 0xe0, 0x9b, 0x8a, 0x4d, 0x0d, 0x6b, 0xb8, 0xa5, 0x68, - 0x0a, 0xad, 0xce, 0x72, 0x9c, 0xea, 0x78, 0x54, 0x5f, 0x46, 0x09, 0x72, 0x94, 0x68, 0x25, 0x7f, - 0x34, 0x0b, 0x16, 0x23, 0xf7, 0x02, 0xbc, 0x0b, 0x56, 0xba, 0x03, 0xcb, 0x22, 0x3a, 0xdd, 0x19, - 0x68, 0x7b, 0xc4, 0xea, 0x74, 0xf7, 0x49, 0x6f, 0xa0, 0x92, 0x1e, 0x3f, 0xd6, 0x42, 0xab, 0x26, - 0x7c, 0x5d, 0xd9, 0x48, 0xd4, 0x42, 0x29, 0xd6, 0xf0, 0x1d, 0x00, 0x75, 0x3e, 0xb4, 0xad, 0xd8, - 0xb6, 0x87, 0x99, 0xe3, 0x98, 0x5e, 0x2a, 0xee, 0xc4, 0x34, 0x50, 0x82, 0x15, 0xf3, 0xb1, 0x47, - 0x6c, 0xc5, 0x22, 0xbd, 0xa8, 0x8f, 0xf9, 0xb0, 0x8f, 0x9b, 0x89, 0x5a, 0x28, 0xc5, 0x1a, 0xbe, - 0x0a, 0xca, 0xce, 0x6c, 0x7c, 0xcf, 0xc5, 0xe1, 0x2c, 0x09, 0xb0, 0xf2, 0x8e, 0x2f, 0x42, 0x41, - 0x3d, 0xb6, 0x34, 0x63, 0xcf, 0x26, 0xd6, 0x01, 0xe9, 0xdd, 0x70, 0xc8, 0x01, 0xab, 0xa0, 0x05, - 0x5e, 0x41, 0xbd, 0xa5, 0xdd, 0x8e, 0x69, 0xa0, 0x04, 0x2b, 0xb6, 0x34, 0x27, 0x6a, 0x62, 0x4b, - 0x9b, 0x0d, 0x2f, 0x6d, 0x37, 0x51, 0x0b, 0xa5, 0x58, 0xb3, 0xd8, 0x73, 0x5c, 0x5e, 0x3f, 0xc0, - 0x8a, 0x8a, 0xf7, 0x54, 0x52, 0x9d, 0x0b, 0xc7, 0xde, 0x4e, 0x58, 0x8c, 0xa2, 0xfa, 0xf0, 0x06, - 0x38, 0xe9, 0x0c, 0xed, 0xea, 0xd8, 0x03, 0x29, 0x72, 0x90, 0x17, 0x04, 0xc8, 0xc9, 0x9d, 0xa8, - 0x02, 0x8a, 0xdb, 0xc0, 0x6b, 0x60, 0xa1, 0x6b, 0xa8, 0x2a, 0x8f, 0xc7, 0x0d, 0x63, 0xa0, 0xd3, - 0x6a, 0x89, 0xa3, 0x40, 0x96, 0x43, 0x1b, 0x21, 0x09, 0x8a, 0x68, 0xc2, 0x9f, 0x01, 0xd0, 0x75, - 0x0b, 0x83, 0x5d, 0x05, 0x13, 0x18, 0x40, 0xbc, 0x2c, 0xf9, 0x95, 0xd9, 0x1b, 0xb2, 0x51, 0x00, - 0x52, 0xfe, 0x44, 0x02, 0x95, 0x94, 0x44, 0x87, 0x6f, 0x85, 0x8a, 0xe0, 0xc5, 0x48, 0x11, 0x3c, - 0x9d, 0x62, 0x16, 0xa8, 0x84, 0xfb, 0x60, 0x9e, 0x11, 0x12, 0x45, 0xef, 0x3b, 0x2a, 0xe2, 0x2e, - 0x6b, 0xa6, 0x2e, 0x00, 0x05, 0xb5, 0xfd, 0x5b, 0xf9, 0xe4, 0x78, 0x54, 0x9f, 0x0f, 0xc9, 0x50, - 0x18, 0x58, 0xfe, 0x55, 0x0e, 0x80, 0x4d, 0x62, 0xaa, 0xc6, 0x50, 0x23, 0xfa, 0x51, 0x70, 0x9a, - 0x5b, 0x21, 0x4e, 0x73, 0x21, 0xfd, 0x48, 0x3c, 0xa7, 0x52, 0x49, 0xcd, 0xbb, 0x11, 0x52, 0xf3, - 0x62, 0x16, 0xb0, 0xa7, 0xb3, 0x9a, 0xcf, 0xf2, 0x60, 0xc9, 0x57, 0xf6, 0x69, 0xcd, 0xf5, 0xd0, - 0x89, 0x5e, 0x88, 0x9c, 0x68, 0x25, 0xc1, 0xe4, 0xb9, 0xf1, 0x9a, 0x0f, 0xc0, 0x02, 0x63, 0x1d, - 0xce, 0xf9, 0x71, 0x4e, 0x33, 0x3b, 0x35, 0xa7, 0xf1, 0x2a, 0xd1, 0x56, 0x08, 0x09, 0x45, 0x90, - 0x53, 0x38, 0xd4, 0xdc, 0xd7, 0x91, 0x43, 0xfd, 0x49, 0x02, 0x0b, 0xfe, 0x31, 0x1d, 0x01, 0x89, - 0xba, 0x19, 0x26, 0x51, 0x67, 0x33, 0x04, 0x67, 0x0a, 0x8b, 0xfa, 0x6c, 0x26, 0xe8, 0x3a, 0xa7, - 0x51, 0xab, 0xec, 0x15, 0xcc, 0x54, 0x95, 0x2e, 0xb6, 0x45, 0xbd, 0x3d, 0xee, 0xbc, 0x7e, 0x39, - 0x63, 0xc8, 0x93, 0x86, 0x08, 0x57, 0xee, 0xf9, 0x12, 0xae, 0xfc, 0xb3, 0x21, 0x5c, 0x3f, 0x02, - 0x45, 0xdb, 0xa5, 0x5a, 0x33, 0x1c, 0xf2, 0x62, 0xa6, 0xc4, 0x16, 0x2c, 0xcb, 0x83, 0xf6, 0xf8, - 0x95, 0x07, 0x97, 0xc4, 0xac, 0x0a, 0x5f, 0x25, 0xb3, 0x62, 0x81, 0x6e, 0xe2, 0x81, 0x4d, 0x7a, - 0x3c, 0xa9, 0x8a, 0x7e, 0xa0, 0xb7, 0xf9, 0x28, 0x12, 0x52, 0xb8, 0x0b, 0x2a, 0xa6, 0x65, 0xf4, - 0x2d, 0x62, 0xdb, 0x9b, 0x04, 0xf7, 0x54, 0x45, 0x27, 0xee, 0x02, 0x9c, 0x9a, 0x78, 0x7a, 0x3c, - 0xaa, 0x57, 0xda, 0xc9, 0x2a, 0x28, 0xcd, 0x56, 0xfe, 0x75, 0x01, 0x9c, 0x88, 0xde, 0x8d, 0x29, - 0x34, 0x45, 0x3a, 0x14, 0x4d, 0xb9, 0x14, 0x88, 0x53, 0x87, 0xc3, 0x05, 0x5a, 0x05, 0xb1, 0x58, - 0x5d, 0x07, 0x8b, 0x82, 0x96, 0xb8, 0x42, 0x41, 0xd4, 0xbc, 0xe3, 0xd9, 0x0d, 0x8b, 0x51, 0x54, - 0x1f, 0x5e, 0x07, 0xf3, 0x16, 0x67, 0x5e, 0x2e, 0x80, 0xc3, 0x5e, 0xbe, 0x23, 0x00, 0xe6, 0x51, - 0x50, 0x88, 0xc2, 0xba, 0x8c, 0xb9, 0xf8, 0x84, 0xc4, 0x05, 0x98, 0x09, 0x33, 0x97, 0xf5, 0xa8, - 0x02, 0x8a, 0xdb, 0xc0, 0x6d, 0xb0, 0x34, 0xd0, 0xe3, 0x50, 0x4e, 0xac, 0x9d, 0x16, 0x50, 0x4b, - 0xbb, 0x71, 0x15, 0x94, 0x64, 0x07, 0x6f, 0x81, 0x25, 0x4a, 0x2c, 0x4d, 0xd1, 0x31, 0x55, 0xf4, - 0xbe, 0x07, 0xe7, 0x9c, 0x7c, 0x85, 0x41, 0xdd, 0x89, 0x8b, 0x51, 0x92, 0x0d, 0xbc, 0x17, 0xe2, - 0x45, 0xb3, 0xfc, 0x6a, 0xba, 0x94, 0x21, 0xbd, 0x32, 0x13, 0xa3, 0x04, 0xd6, 0x56, 0xcc, 0xca, - 0xda, 0xe4, 0x8f, 0x25, 0x00, 0xe3, 0x29, 0x3d, 0xb1, 0xa9, 0x10, 0xb3, 0x08, 0x14, 0x5f, 0x25, - 0x99, 0x4a, 0x5d, 0xc9, 0x48, 0xa5, 0xfc, 0xbb, 0x39, 0x1b, 0x97, 0x12, 0x1b, 0x7d, 0x34, 0xfd, - 0xa1, 0xac, 0x5c, 0xca, 0x77, 0xea, 0x19, 0x70, 0xa9, 0x00, 0xd8, 0xd3, 0xb9, 0xd4, 0x3f, 0x73, - 0x60, 0xc9, 0x57, 0xce, 0xcc, 0xa5, 0x12, 0x4c, 0xbe, 0xed, 0x11, 0x65, 0xe3, 0x37, 0xfe, 0xd6, - 0xfd, 0x3f, 0xf1, 0x1b, 0xdf, 0xab, 0x14, 0x7e, 0xf3, 0xfb, 0x5c, 0xd0, 0xf5, 0x29, 0xf9, 0xcd, - 0x33, 0x68, 0x96, 0x7c, 0xed, 0x28, 0x92, 0xfc, 0xd1, 0x0c, 0x38, 0x11, 0xcd, 0xc3, 0x50, 0xad, - 0x95, 0x26, 0xd6, 0xda, 0x36, 0x58, 0xbe, 0x3f, 0x50, 0xd5, 0x21, 0x5f, 0x43, 0xa0, 0xe0, 0x3a, - 0x55, 0xfa, 0xbb, 0xc2, 0x72, 0xf9, 0x87, 0x09, 0x3a, 0x28, 0xd1, 0x32, 0x5e, 0x7a, 0x67, 0xbe, - 0x6c, 0xe9, 0x2d, 0x1c, 0xa2, 0xf4, 0xa6, 0xd4, 0xca, 0xb9, 0x43, 0xd4, 0xca, 0x64, 0x22, 0x94, - 0x3f, 0x14, 0x11, 0x9a, 0xae, 0xee, 0x26, 0xdc, 0x81, 0x13, 0x1b, 0x12, 0x63, 0x09, 0xac, 0x24, - 0xb7, 0x01, 0xa0, 0x0a, 0x16, 0x34, 0xfc, 0x30, 0xd8, 0x8e, 0x99, 0x54, 0x8f, 0x06, 0x54, 0x51, - 0x1b, 0xce, 0x1f, 0x59, 0x8d, 0x5b, 0x3a, 0xbd, 0x6d, 0x75, 0xa8, 0xa5, 0xe8, 0x7d, 0xa7, 0x88, - 0x6f, 0x87, 0xb0, 0x50, 0x04, 0x1b, 0xbe, 0x0f, 0x8a, 0x1a, 0x7e, 0xd8, 0x19, 0x58, 0xfd, 0xa4, - 0x62, 0x9b, 0x6d, 0x1e, 0x9e, 0x4b, 0xdb, 0x02, 0x05, 0x79, 0x78, 0xf2, 0x17, 0x12, 0xa8, 0xa4, - 0x14, 0xe8, 0x6f, 0xd0, 0x2a, 0xff, 0x22, 0x81, 0x33, 0xa1, 0x55, 0xb2, 0x0c, 0x27, 0xf7, 0x07, - 0x2a, 0x4f, 0x76, 0x41, 0x8a, 0x2e, 0x82, 0x92, 0x89, 0x2d, 0xaa, 0x78, 0xec, 0xbc, 0xd0, 0x9a, - 0x1f, 0x8f, 0xea, 0xa5, 0xb6, 0x3b, 0x88, 0x7c, 0x79, 0xc2, 0xde, 0xe4, 0x9e, 0xdf, 0xde, 0xc8, - 0xff, 0x95, 0x40, 0xa1, 0xd3, 0xc5, 0x2a, 0x39, 0x02, 0x0e, 0xb4, 0x19, 0xe2, 0x40, 0xe9, 0x7f, - 0x55, 0x70, 0x7f, 0x52, 0xe9, 0xcf, 0x56, 0x84, 0xfe, 0x9c, 0x9b, 0x80, 0xf3, 0x74, 0xe6, 0xf3, - 0x06, 0x28, 0x79, 0xd3, 0x4d, 0x77, 0x2d, 0xcb, 0xbf, 0xcb, 0x81, 0x72, 0x60, 0x8a, 0x29, 0x2f, - 0xf5, 0x7b, 0xa1, 0x4a, 0xc6, 0xee, 0x98, 0xb5, 0x2c, 0x0b, 0x69, 0xb8, 0x55, 0xeb, 0x6d, 0x9d, - 0x5a, 0xc1, 0x37, 0xe8, 0x78, 0x31, 0x7b, 0x13, 0x2c, 0x50, 0x6c, 0xf5, 0x09, 0x75, 0x65, 0x7c, - 0xc3, 0x4a, 0x7e, 0x47, 0xe9, 0x4e, 0x48, 0x8a, 0x22, 0xda, 0xa7, 0xae, 0x83, 0xf9, 0xd0, 0x64, - 0xf0, 0x04, 0xc8, 0x3f, 0x20, 0x43, 0x87, 0x0c, 0x22, 0xf6, 0x13, 0x2e, 0x83, 0xc2, 0x01, 0x56, - 0x07, 0x4e, 0x88, 0x96, 0x90, 0xf3, 0x70, 0x2d, 0xf7, 0xba, 0x24, 0xff, 0x86, 0x6d, 0x8e, 0x9f, - 0x0a, 0x47, 0x10, 0x5d, 0xef, 0x84, 0xa2, 0x2b, 0xfd, 0x5f, 0xd3, 0x60, 0x82, 0xa6, 0xc5, 0x18, - 0x8a, 0xc4, 0xd8, 0x4b, 0x99, 0xd0, 0x9e, 0x1e, 0x69, 0xff, 0xca, 0x81, 0xe5, 0x80, 0xb6, 0x4f, - 0xb2, 0xbf, 0x1f, 0x22, 0xd9, 0xab, 0x11, 0x92, 0x5d, 0x4d, 0xb2, 0xf9, 0x96, 0x65, 0x4f, 0x66, - 0xd9, 0x7f, 0x96, 0xc0, 0x62, 0x60, 0xef, 0x8e, 0x80, 0x66, 0xdf, 0x0a, 0xd3, 0xec, 0x73, 0x59, - 0x82, 0x26, 0x85, 0x67, 0x5f, 0x03, 0x4b, 0x01, 0xa5, 0xdb, 0x56, 0x4f, 0xd1, 0xb1, 0x6a, 0xc3, - 0xb3, 0xa0, 0x60, 0x53, 0x6c, 0x51, 0xb7, 0x88, 0xb8, 0xb6, 0x1d, 0x36, 0x88, 0x1c, 0x99, 0xfc, - 0x6f, 0x09, 0x34, 0x03, 0xc6, 0x6d, 0x62, 0xd9, 0x8a, 0x4d, 0x89, 0x4e, 0xef, 0x1a, 0xea, 0x40, - 0x23, 0x1b, 0x2a, 0x56, 0x34, 0x44, 0xd8, 0x80, 0x62, 0xe8, 0x6d, 0x43, 0x55, 0xba, 0x43, 0x88, - 0x41, 0xf9, 0xc3, 0x7d, 0xa2, 0x6f, 0x12, 0x95, 0x50, 0xf1, 0xbf, 0x60, 0xa9, 0xf5, 0x96, 0xfb, - 0x37, 0xd9, 0x7b, 0xbe, 0xe8, 0xc9, 0xa8, 0xbe, 0x9a, 0x05, 0x91, 0x47, 0x68, 0x10, 0x13, 0xfe, - 0x14, 0x00, 0xf6, 0xc8, 0xef, 0xb2, 0x9e, 0x08, 0xd6, 0x37, 0xdd, 0x8c, 0x7e, 0xcf, 0x93, 0x4c, - 0x35, 0x41, 0x00, 0x51, 0xfe, 0x43, 0x31, 0x74, 0xde, 0xdf, 0xf8, 0xde, 0xeb, 0xcf, 0xc1, 0xf2, - 0x81, 0xbf, 0x3b, 0xae, 0x02, 0xa3, 0xf2, 0xf9, 0x68, 0x53, 0xc0, 0x83, 0x4f, 0xda, 0x57, 0xff, - 0x05, 0xe2, 0x6e, 0x02, 0x1c, 0x4a, 0x9c, 0x04, 0xbe, 0x0a, 0xca, 0x8c, 0x37, 0x2b, 0x5d, 0xb2, - 0x83, 0x35, 0x37, 0x17, 0xbd, 0xbf, 0x55, 0x3b, 0xbe, 0x08, 0x05, 0xf5, 0xe0, 0x3e, 0x58, 0x32, - 0x8d, 0xde, 0x36, 0xd6, 0x71, 0x9f, 0x30, 0x22, 0xe8, 0x1c, 0x25, 0x6f, 0xc8, 0x96, 0x5a, 0xaf, - 0xb9, 0xcd, 0xb6, 0x76, 0x5c, 0xe5, 0xc9, 0xa8, 0x5e, 0x49, 0x18, 0xe6, 0x41, 0x90, 0x04, 0x09, - 0xad, 0xd8, 0xa7, 0x00, 0xce, 0x5f, 0x21, 0x6b, 0x59, 0x92, 0xf2, 0x90, 0x1f, 0x03, 0xa4, 0xf5, - 0x9b, 0x8b, 0x87, 0xea, 0x37, 0x27, 0xbc, 0x2d, 0x97, 0xa6, 0x7c, 0x5b, 0xfe, 0xab, 0x04, 0xce, - 0x99, 0x19, 0x72, 0xa9, 0x0a, 0xf8, 0xde, 0xdc, 0xcc, 0xb2, 0x37, 0x59, 0x72, 0xb3, 0xb5, 0x3a, - 0x1e, 0xd5, 0xcf, 0x65, 0xd1, 0x44, 0x99, 0xfc, 0x83, 0x77, 0x41, 0xd1, 0x10, 0x77, 0x60, 0xb5, - 0xcc, 0x7d, 0xbd, 0x94, 0xc5, 0x57, 0xf7, 0xde, 0x74, 0xd2, 0xd2, 0x7d, 0x42, 0x1e, 0x96, 0xfc, - 0x71, 0x01, 0x9c, 0x8c, 0x55, 0xf0, 0xaf, 0xb0, 0xab, 0x1e, 0x7b, 0x2f, 0xcf, 0x4f, 0xf1, 0x5e, - 0xbe, 0x0e, 0x16, 0xc5, 0x87, 0x1a, 0x91, 0xd7, 0x7a, 0x2f, 0x60, 0x36, 0xc2, 0x62, 0x14, 0xd5, - 0x4f, 0xea, 0xea, 0x17, 0xa6, 0xec, 0xea, 0x07, 0xbd, 0x10, 0x1f, 0x1e, 0x3a, 0xe9, 0x1d, 0xf7, - 0x42, 0x7c, 0x7f, 0x18, 0xd5, 0x67, 0xc4, 0xd5, 0x41, 0xf5, 0x10, 0xe6, 0xc2, 0xc4, 0x75, 0x37, - 0x24, 0x45, 0x11, 0xed, 0x2f, 0xf5, 0x31, 0x02, 0x4e, 0xf8, 0x18, 0xe1, 0x72, 0x96, 0x58, 0xcb, - 0xde, 0x75, 0x4f, 0xec, 0x9f, 0x94, 0xa7, 0xef, 0x9f, 0xc8, 0x7f, 0x93, 0xc0, 0x0b, 0xa9, 0xb7, - 0x16, 0x5c, 0x0f, 0xd1, 0xca, 0xcb, 0x11, 0x5a, 0xf9, 0xbd, 0x54, 0xc3, 0x00, 0xb7, 0xb4, 0x92, - 0x1b, 0xf2, 0x6f, 0x64, 0x6b, 0xc8, 0x27, 0xbc, 0x09, 0x4f, 0xee, 0xcc, 0xb7, 0x7e, 0xf0, 0xe8, - 0x71, 0xed, 0xd8, 0xa7, 0x8f, 0x6b, 0xc7, 0x3e, 0x7f, 0x5c, 0x3b, 0xf6, 0x8b, 0x71, 0x4d, 0x7a, - 0x34, 0xae, 0x49, 0x9f, 0x8e, 0x6b, 0xd2, 0xe7, 0xe3, 0x9a, 0xf4, 0xf7, 0x71, 0x4d, 0xfa, 0xed, - 0x17, 0xb5, 0x63, 0xef, 0x57, 0x52, 0x3e, 0x85, 0xfe, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd4, - 0x01, 0x82, 0xf5, 0x24, 0x2d, 0x00, 0x00, -} +func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} } func (m *ControllerRevision) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -2438,7 +1374,7 @@ func (m *ScaleStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Selector { keysForSelector = append(keysForSelector, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForSelector) + sort.Strings(keysForSelector) for iNdEx := len(keysForSelector) - 1; iNdEx >= 0; iNdEx-- { v := m.Selector[string(keysForSelector[iNdEx])] baseI := i @@ -3884,7 +2820,7 @@ func (this *ScaleStatus) String() string { for k := range this.Selector { keysForSelector = append(keysForSelector, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForSelector) + sort.Strings(keysForSelector) mapStringForSelector := "map[string]string{" for _, k := range keysForSelector { mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k]) diff --git a/staging/src/k8s.io/api/apps/v1beta2/generated.proto b/staging/src/k8s.io/api/apps/v1beta2/generated.proto index 37c6d5ae1bf7b..60107b134653c 100644 --- a/staging/src/k8s.io/api/apps/v1beta2/generated.proto +++ b/staging/src/k8s.io/api/apps/v1beta2/generated.proto @@ -795,8 +795,12 @@ message StatefulSetSpec { // +optional optional int32 minReadySeconds = 9; - // PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from - // the StatefulSet VolumeClaimTemplates. + // persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent + // volume claims created from volumeClaimTemplates. By default, all persistent + // volume claims are created as needed and retained until manually deleted. This + // policy allows the lifecycle to be altered, for example by deleting persistent + // volume claims when their stateful set is deleted, or when their pod is scaled + // down. // +optional optional StatefulSetPersistentVolumeClaimRetentionPolicy persistentVolumeClaimRetentionPolicy = 10; diff --git a/staging/src/k8s.io/api/apps/v1beta2/generated.protomessage.pb.go b/staging/src/k8s.io/api/apps/v1beta2/generated.protomessage.pb.go new file mode 100644 index 0000000000000..18582bf290de7 --- /dev/null +++ b/staging/src/k8s.io/api/apps/v1beta2/generated.protomessage.pb.go @@ -0,0 +1,88 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta2 + +func (*ControllerRevision) ProtoMessage() {} + +func (*ControllerRevisionList) ProtoMessage() {} + +func (*DaemonSet) ProtoMessage() {} + +func (*DaemonSetCondition) ProtoMessage() {} + +func (*DaemonSetList) ProtoMessage() {} + +func (*DaemonSetSpec) ProtoMessage() {} + +func (*DaemonSetStatus) ProtoMessage() {} + +func (*DaemonSetUpdateStrategy) ProtoMessage() {} + +func (*Deployment) ProtoMessage() {} + +func (*DeploymentCondition) ProtoMessage() {} + +func (*DeploymentList) ProtoMessage() {} + +func (*DeploymentSpec) ProtoMessage() {} + +func (*DeploymentStatus) ProtoMessage() {} + +func (*DeploymentStrategy) ProtoMessage() {} + +func (*ReplicaSet) ProtoMessage() {} + +func (*ReplicaSetCondition) ProtoMessage() {} + +func (*ReplicaSetList) ProtoMessage() {} + +func (*ReplicaSetSpec) ProtoMessage() {} + +func (*ReplicaSetStatus) ProtoMessage() {} + +func (*RollingUpdateDaemonSet) ProtoMessage() {} + +func (*RollingUpdateDeployment) ProtoMessage() {} + +func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {} + +func (*Scale) ProtoMessage() {} + +func (*ScaleSpec) ProtoMessage() {} + +func (*ScaleStatus) ProtoMessage() {} + +func (*StatefulSet) ProtoMessage() {} + +func (*StatefulSetCondition) ProtoMessage() {} + +func (*StatefulSetList) ProtoMessage() {} + +func (*StatefulSetOrdinals) ProtoMessage() {} + +func (*StatefulSetPersistentVolumeClaimRetentionPolicy) ProtoMessage() {} + +func (*StatefulSetSpec) ProtoMessage() {} + +func (*StatefulSetStatus) ProtoMessage() {} + +func (*StatefulSetUpdateStrategy) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/apps/v1beta2/types.go b/staging/src/k8s.io/api/apps/v1beta2/types.go index e9dc85df05568..6bdcc2ea9c0c5 100644 --- a/staging/src/k8s.io/api/apps/v1beta2/types.go +++ b/staging/src/k8s.io/api/apps/v1beta2/types.go @@ -304,8 +304,12 @@ type StatefulSetSpec struct { // +optional MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,9,opt,name=minReadySeconds"` - // PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from - // the StatefulSet VolumeClaimTemplates. + // persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent + // volume claims created from volumeClaimTemplates. By default, all persistent + // volume claims are created as needed and retained until manually deleted. This + // policy allows the lifecycle to be altered, for example by deleting persistent + // volume claims when their stateful set is deleted, or when their pod is scaled + // down. // +optional PersistentVolumeClaimRetentionPolicy *StatefulSetPersistentVolumeClaimRetentionPolicy `json:"persistentVolumeClaimRetentionPolicy,omitempty" protobuf:"bytes,10,opt,name=persistentVolumeClaimRetentionPolicy"` diff --git a/staging/src/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go b/staging/src/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go index 34d80af58d76a..990065045ee12 100644 --- a/staging/src/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go @@ -384,7 +384,7 @@ var map_StatefulSetSpec = map[string]string{ "updateStrategy": "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", "revisionHistoryLimit": "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.", "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", - "persistentVolumeClaimRetentionPolicy": "PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.", + "persistentVolumeClaimRetentionPolicy": "persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down.", "ordinals": "ordinals controls the numbering of replica indices in a StatefulSet. The default ordinals behavior assigns a \"0\" index to the first replica and increments the index by one for each additional replica requested.", } diff --git a/staging/src/k8s.io/api/apps/v1beta2/zz_generated.model_name.go b/staging/src/k8s.io/api/apps/v1beta2/zz_generated.model_name.go new file mode 100644 index 0000000000000..f3ee41780b839 --- /dev/null +++ b/staging/src/k8s.io/api/apps/v1beta2/zz_generated.model_name.go @@ -0,0 +1,187 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta2 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ControllerRevision) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.ControllerRevision" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ControllerRevisionList) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.ControllerRevisionList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSet) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.DaemonSet" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSetCondition) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.DaemonSetCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSetList) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.DaemonSetList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSetSpec) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.DaemonSetSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSetStatus) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.DaemonSetStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSetUpdateStrategy) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.DaemonSetUpdateStrategy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Deployment) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.Deployment" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentCondition) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.DeploymentCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentList) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.DeploymentList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentSpec) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.DeploymentSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentStatus) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.DeploymentStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentStrategy) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.DeploymentStrategy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicaSet) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.ReplicaSet" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicaSetCondition) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.ReplicaSetCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicaSetList) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.ReplicaSetList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicaSetSpec) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.ReplicaSetSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicaSetStatus) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.ReplicaSetStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RollingUpdateDaemonSet) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.RollingUpdateDaemonSet" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RollingUpdateDeployment) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.RollingUpdateDeployment" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RollingUpdateStatefulSetStrategy) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.RollingUpdateStatefulSetStrategy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Scale) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.Scale" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ScaleSpec) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.ScaleSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ScaleStatus) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.ScaleStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSet) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.StatefulSet" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetCondition) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.StatefulSetCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetList) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.StatefulSetList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetOrdinals) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.StatefulSetOrdinals" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetPersistentVolumeClaimRetentionPolicy) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetSpec) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.StatefulSetSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetStatus) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.StatefulSetStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatefulSetUpdateStrategy) OpenAPIModelName() string { + return "io.k8s.api.apps.v1beta2.StatefulSetUpdateStrategy" +} diff --git a/staging/src/k8s.io/api/authentication/v1/doc.go b/staging/src/k8s.io/api/authentication/v1/doc.go index dc3aed4e4febd..bf0cd7055859d 100644 --- a/staging/src/k8s.io/api/authentication/v1/doc.go +++ b/staging/src/k8s.io/api/authentication/v1/doc.go @@ -19,5 +19,6 @@ limitations under the License. // +groupName=authentication.k8s.io // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.authentication.v1 package v1 diff --git a/staging/src/k8s.io/api/authentication/v1/generated.pb.go b/staging/src/k8s.io/api/authentication/v1/generated.pb.go index 6d922030c1c39..2b872c453e162 100644 --- a/staging/src/k8s.io/api/authentication/v1/generated.pb.go +++ b/staging/src/k8s.io/api/authentication/v1/generated.pb.go @@ -23,11 +23,8 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -35,407 +32,27 @@ import ( k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *BoundObjectReference) Reset() { *m = BoundObjectReference{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ExtraValue) Reset() { *m = ExtraValue{} } -func (m *BoundObjectReference) Reset() { *m = BoundObjectReference{} } -func (*BoundObjectReference) ProtoMessage() {} -func (*BoundObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_d1237cbf54dccd53, []int{0} -} -func (m *BoundObjectReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BoundObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *BoundObjectReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_BoundObjectReference.Merge(m, src) -} -func (m *BoundObjectReference) XXX_Size() int { - return m.Size() -} -func (m *BoundObjectReference) XXX_DiscardUnknown() { - xxx_messageInfo_BoundObjectReference.DiscardUnknown(m) -} +func (m *SelfSubjectReview) Reset() { *m = SelfSubjectReview{} } -var xxx_messageInfo_BoundObjectReference proto.InternalMessageInfo +func (m *SelfSubjectReviewStatus) Reset() { *m = SelfSubjectReviewStatus{} } -func (m *ExtraValue) Reset() { *m = ExtraValue{} } -func (*ExtraValue) ProtoMessage() {} -func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_d1237cbf54dccd53, []int{1} -} -func (m *ExtraValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExtraValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExtraValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtraValue.Merge(m, src) -} -func (m *ExtraValue) XXX_Size() int { - return m.Size() -} -func (m *ExtraValue) XXX_DiscardUnknown() { - xxx_messageInfo_ExtraValue.DiscardUnknown(m) -} +func (m *TokenRequest) Reset() { *m = TokenRequest{} } -var xxx_messageInfo_ExtraValue proto.InternalMessageInfo +func (m *TokenRequestSpec) Reset() { *m = TokenRequestSpec{} } -func (m *SelfSubjectReview) Reset() { *m = SelfSubjectReview{} } -func (*SelfSubjectReview) ProtoMessage() {} -func (*SelfSubjectReview) Descriptor() ([]byte, []int) { - return fileDescriptor_d1237cbf54dccd53, []int{2} -} -func (m *SelfSubjectReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelfSubjectReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelfSubjectReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelfSubjectReview.Merge(m, src) -} -func (m *SelfSubjectReview) XXX_Size() int { - return m.Size() -} -func (m *SelfSubjectReview) XXX_DiscardUnknown() { - xxx_messageInfo_SelfSubjectReview.DiscardUnknown(m) -} +func (m *TokenRequestStatus) Reset() { *m = TokenRequestStatus{} } -var xxx_messageInfo_SelfSubjectReview proto.InternalMessageInfo +func (m *TokenReview) Reset() { *m = TokenReview{} } -func (m *SelfSubjectReviewStatus) Reset() { *m = SelfSubjectReviewStatus{} } -func (*SelfSubjectReviewStatus) ProtoMessage() {} -func (*SelfSubjectReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_d1237cbf54dccd53, []int{3} -} -func (m *SelfSubjectReviewStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelfSubjectReviewStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelfSubjectReviewStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelfSubjectReviewStatus.Merge(m, src) -} -func (m *SelfSubjectReviewStatus) XXX_Size() int { - return m.Size() -} -func (m *SelfSubjectReviewStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SelfSubjectReviewStatus.DiscardUnknown(m) -} +func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} } -var xxx_messageInfo_SelfSubjectReviewStatus proto.InternalMessageInfo +func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} } -func (m *TokenRequest) Reset() { *m = TokenRequest{} } -func (*TokenRequest) ProtoMessage() {} -func (*TokenRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d1237cbf54dccd53, []int{4} -} -func (m *TokenRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TokenRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenRequest.Merge(m, src) -} -func (m *TokenRequest) XXX_Size() int { - return m.Size() -} -func (m *TokenRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TokenRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenRequest proto.InternalMessageInfo - -func (m *TokenRequestSpec) Reset() { *m = TokenRequestSpec{} } -func (*TokenRequestSpec) ProtoMessage() {} -func (*TokenRequestSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_d1237cbf54dccd53, []int{5} -} -func (m *TokenRequestSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenRequestSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TokenRequestSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenRequestSpec.Merge(m, src) -} -func (m *TokenRequestSpec) XXX_Size() int { - return m.Size() -} -func (m *TokenRequestSpec) XXX_DiscardUnknown() { - xxx_messageInfo_TokenRequestSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenRequestSpec proto.InternalMessageInfo - -func (m *TokenRequestStatus) Reset() { *m = TokenRequestStatus{} } -func (*TokenRequestStatus) ProtoMessage() {} -func (*TokenRequestStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_d1237cbf54dccd53, []int{6} -} -func (m *TokenRequestStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenRequestStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TokenRequestStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenRequestStatus.Merge(m, src) -} -func (m *TokenRequestStatus) XXX_Size() int { - return m.Size() -} -func (m *TokenRequestStatus) XXX_DiscardUnknown() { - xxx_messageInfo_TokenRequestStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenRequestStatus proto.InternalMessageInfo - -func (m *TokenReview) Reset() { *m = TokenReview{} } -func (*TokenReview) ProtoMessage() {} -func (*TokenReview) Descriptor() ([]byte, []int) { - return fileDescriptor_d1237cbf54dccd53, []int{7} -} -func (m *TokenReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TokenReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenReview.Merge(m, src) -} -func (m *TokenReview) XXX_Size() int { - return m.Size() -} -func (m *TokenReview) XXX_DiscardUnknown() { - xxx_messageInfo_TokenReview.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenReview proto.InternalMessageInfo - -func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} } -func (*TokenReviewSpec) ProtoMessage() {} -func (*TokenReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_d1237cbf54dccd53, []int{8} -} -func (m *TokenReviewSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenReviewSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TokenReviewSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenReviewSpec.Merge(m, src) -} -func (m *TokenReviewSpec) XXX_Size() int { - return m.Size() -} -func (m *TokenReviewSpec) XXX_DiscardUnknown() { - xxx_messageInfo_TokenReviewSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenReviewSpec proto.InternalMessageInfo - -func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} } -func (*TokenReviewStatus) ProtoMessage() {} -func (*TokenReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_d1237cbf54dccd53, []int{9} -} -func (m *TokenReviewStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenReviewStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TokenReviewStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenReviewStatus.Merge(m, src) -} -func (m *TokenReviewStatus) XXX_Size() int { - return m.Size() -} -func (m *TokenReviewStatus) XXX_DiscardUnknown() { - xxx_messageInfo_TokenReviewStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenReviewStatus proto.InternalMessageInfo - -func (m *UserInfo) Reset() { *m = UserInfo{} } -func (*UserInfo) ProtoMessage() {} -func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_d1237cbf54dccd53, []int{10} -} -func (m *UserInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *UserInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserInfo.Merge(m, src) -} -func (m *UserInfo) XXX_Size() int { - return m.Size() -} -func (m *UserInfo) XXX_DiscardUnknown() { - xxx_messageInfo_UserInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_UserInfo proto.InternalMessageInfo - -func init() { - proto.RegisterType((*BoundObjectReference)(nil), "k8s.io.api.authentication.v1.BoundObjectReference") - proto.RegisterType((*ExtraValue)(nil), "k8s.io.api.authentication.v1.ExtraValue") - proto.RegisterType((*SelfSubjectReview)(nil), "k8s.io.api.authentication.v1.SelfSubjectReview") - proto.RegisterType((*SelfSubjectReviewStatus)(nil), "k8s.io.api.authentication.v1.SelfSubjectReviewStatus") - proto.RegisterType((*TokenRequest)(nil), "k8s.io.api.authentication.v1.TokenRequest") - proto.RegisterType((*TokenRequestSpec)(nil), "k8s.io.api.authentication.v1.TokenRequestSpec") - proto.RegisterType((*TokenRequestStatus)(nil), "k8s.io.api.authentication.v1.TokenRequestStatus") - proto.RegisterType((*TokenReview)(nil), "k8s.io.api.authentication.v1.TokenReview") - proto.RegisterType((*TokenReviewSpec)(nil), "k8s.io.api.authentication.v1.TokenReviewSpec") - proto.RegisterType((*TokenReviewStatus)(nil), "k8s.io.api.authentication.v1.TokenReviewStatus") - proto.RegisterType((*UserInfo)(nil), "k8s.io.api.authentication.v1.UserInfo") - proto.RegisterMapType((map[string]ExtraValue)(nil), "k8s.io.api.authentication.v1.UserInfo.ExtraEntry") -} - -func init() { - proto.RegisterFile("k8s.io/api/authentication/v1/generated.proto", fileDescriptor_d1237cbf54dccd53) -} - -var fileDescriptor_d1237cbf54dccd53 = []byte{ - // 947 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4b, 0x6f, 0x23, 0xc5, - 0x13, 0xf7, 0xf8, 0x11, 0xd9, 0xe5, 0x4d, 0xfe, 0x49, 0xef, 0x7f, 0x85, 0x15, 0x16, 0x4f, 0x98, - 0x95, 0x50, 0x04, 0xbb, 0x33, 0x1b, 0x8b, 0xc7, 0x6a, 0x91, 0x90, 0x32, 0xc4, 0x02, 0x0b, 0xc1, - 0xae, 0xda, 0x49, 0x40, 0x48, 0x48, 0xb4, 0xc7, 0x1d, 0xa7, 0xf1, 0xce, 0x83, 0x99, 0x1e, 0xb3, - 0xbe, 0xed, 0x47, 0xe0, 0x08, 0x12, 0x07, 0x3e, 0x04, 0x12, 0x5f, 0x21, 0xc7, 0x15, 0xe2, 0xb0, - 0x07, 0x64, 0x91, 0xe1, 0xca, 0x91, 0x13, 0x27, 0xd4, 0x3d, 0x1d, 0xdb, 0x63, 0x27, 0x13, 0x9f, - 0xf6, 0xe6, 0xa9, 0xc7, 0xaf, 0xaa, 0x7e, 0x55, 0x5d, 0x65, 0xb8, 0x3b, 0x7c, 0x10, 0x99, 0xcc, - 0xb7, 0x48, 0xc0, 0x2c, 0x12, 0xf3, 0x53, 0xea, 0x71, 0xe6, 0x10, 0xce, 0x7c, 0xcf, 0x1a, 0xed, - 0x59, 0x03, 0xea, 0xd1, 0x90, 0x70, 0xda, 0x37, 0x83, 0xd0, 0xe7, 0x3e, 0xba, 0x9d, 0x5a, 0x9b, - 0x24, 0x60, 0x66, 0xd6, 0xda, 0x1c, 0xed, 0x6d, 0xdf, 0x1b, 0x30, 0x7e, 0x1a, 0xf7, 0x4c, 0xc7, - 0x77, 0xad, 0x81, 0x3f, 0xf0, 0x2d, 0xe9, 0xd4, 0x8b, 0x4f, 0xe4, 0x97, 0xfc, 0x90, 0xbf, 0x52, - 0xb0, 0xed, 0xb7, 0x67, 0xa1, 0x5d, 0xe2, 0x9c, 0x32, 0x8f, 0x86, 0x63, 0x2b, 0x18, 0x0e, 0x84, - 0x20, 0xb2, 0x5c, 0xca, 0xc9, 0x25, 0x29, 0x6c, 0x5b, 0x57, 0x79, 0x85, 0xb1, 0xc7, 0x99, 0x4b, - 0x97, 0x1c, 0xde, 0xbd, 0xce, 0x21, 0x72, 0x4e, 0xa9, 0x4b, 0x16, 0xfd, 0x8c, 0xdf, 0x34, 0xf8, - 0xbf, 0xed, 0xc7, 0x5e, 0xff, 0x51, 0xef, 0x1b, 0xea, 0x70, 0x4c, 0x4f, 0x68, 0x48, 0x3d, 0x87, - 0xa2, 0x1d, 0x28, 0x0f, 0x99, 0xd7, 0x6f, 0x68, 0x3b, 0xda, 0x6e, 0xcd, 0xbe, 0x71, 0x36, 0xd1, - 0x0b, 0xc9, 0x44, 0x2f, 0x7f, 0xc2, 0xbc, 0x3e, 0x96, 0x1a, 0xd4, 0x02, 0x20, 0x01, 0x3b, 0xa6, - 0x61, 0xc4, 0x7c, 0xaf, 0x51, 0x94, 0x76, 0x48, 0xd9, 0xc1, 0xfe, 0xe3, 0x8e, 0xd2, 0xe0, 0x39, - 0x2b, 0x81, 0xea, 0x11, 0x97, 0x36, 0x4a, 0x59, 0xd4, 0xcf, 0x88, 0x4b, 0xb1, 0xd4, 0x20, 0x1b, - 0x4a, 0x71, 0xe7, 0xa0, 0x51, 0x96, 0x06, 0xf7, 0x95, 0x41, 0xe9, 0xa8, 0x73, 0xf0, 0xef, 0x44, - 0x7f, 0xfd, 0xaa, 0x22, 0xf9, 0x38, 0xa0, 0x91, 0x79, 0xd4, 0x39, 0xc0, 0xc2, 0xd9, 0x78, 0x0f, - 0xa0, 0xfd, 0x94, 0x87, 0xe4, 0x98, 0x3c, 0x89, 0x29, 0xd2, 0xa1, 0xc2, 0x38, 0x75, 0xa3, 0x86, - 0xb6, 0x53, 0xda, 0xad, 0xd9, 0xb5, 0x64, 0xa2, 0x57, 0x3a, 0x42, 0x80, 0x53, 0xf9, 0xc3, 0xea, - 0x0f, 0x3f, 0xeb, 0x85, 0x67, 0x7f, 0xec, 0x14, 0x8c, 0xdf, 0x35, 0xd8, 0xea, 0xd2, 0x27, 0x27, - 0xdd, 0x58, 0xb1, 0x31, 0x62, 0xf4, 0x3b, 0xf4, 0x35, 0x54, 0x45, 0x9f, 0xfa, 0x84, 0x13, 0x49, - 0x47, 0xbd, 0x75, 0xdf, 0x9c, 0x8d, 0xc8, 0x34, 0x13, 0x33, 0x18, 0x0e, 0x84, 0x20, 0x32, 0x85, - 0xb5, 0x39, 0xda, 0x33, 0x53, 0x4e, 0x3f, 0xa5, 0x9c, 0xcc, 0x88, 0x99, 0xc9, 0xf0, 0x14, 0x15, - 0x7d, 0x05, 0x6b, 0x11, 0x27, 0x3c, 0x8e, 0x24, 0x8d, 0xf5, 0xd6, 0x3b, 0x66, 0xde, 0x08, 0x9a, - 0x4b, 0x29, 0x76, 0xa5, 0xb3, 0xbd, 0xa1, 0x82, 0xac, 0xa5, 0xdf, 0x58, 0x81, 0x1a, 0x3e, 0xbc, - 0x72, 0x85, 0x0b, 0x3a, 0x84, 0x6a, 0x1c, 0xd1, 0xb0, 0xe3, 0x9d, 0xf8, 0xaa, 0xb6, 0x37, 0xf2, - 0x63, 0x1f, 0x29, 0x6b, 0x7b, 0x53, 0x05, 0xab, 0x5e, 0x48, 0xf0, 0x14, 0xc9, 0xf8, 0xa9, 0x08, - 0x37, 0x0e, 0xfd, 0x21, 0xf5, 0x30, 0xfd, 0x36, 0xa6, 0x11, 0x7f, 0x09, 0x14, 0x3e, 0x86, 0x72, - 0x14, 0x50, 0x47, 0x11, 0x68, 0xe6, 0x17, 0x31, 0x9f, 0x5b, 0x37, 0xa0, 0xce, 0x6c, 0x12, 0xc5, - 0x17, 0x96, 0x48, 0xe8, 0x8b, 0x69, 0x53, 0x4a, 0x4b, 0x19, 0x5f, 0x87, 0x99, 0xdf, 0x8f, 0x7f, - 0x34, 0xd8, 0x5c, 0x4c, 0x01, 0xbd, 0x05, 0x35, 0x12, 0xf7, 0x99, 0x78, 0x7c, 0x17, 0xa3, 0xba, - 0x9e, 0x4c, 0xf4, 0xda, 0xfe, 0x85, 0x10, 0xcf, 0xf4, 0xe8, 0x43, 0xd8, 0xa2, 0x4f, 0x03, 0x16, - 0xca, 0xe8, 0x5d, 0xea, 0xf8, 0x5e, 0x3f, 0x92, 0x6f, 0xa6, 0x64, 0xdf, 0x4a, 0x26, 0xfa, 0x56, - 0x7b, 0x51, 0x89, 0x97, 0xed, 0x91, 0x07, 0x1b, 0xbd, 0xcc, 0xd3, 0x57, 0x85, 0xb6, 0xf2, 0x0b, - 0xbd, 0x6c, 0x5d, 0xd8, 0x28, 0x99, 0xe8, 0x1b, 0x59, 0x0d, 0x5e, 0x40, 0x37, 0x7e, 0xd1, 0x00, - 0x2d, 0xb3, 0x84, 0xee, 0x40, 0x85, 0x0b, 0xa9, 0x5a, 0x35, 0xeb, 0x8a, 0xb4, 0x4a, 0x6a, 0x9a, - 0xea, 0xd0, 0x18, 0x6e, 0xce, 0x0a, 0x38, 0x64, 0x2e, 0x8d, 0x38, 0x71, 0x03, 0xd5, 0xed, 0x37, - 0x57, 0x9b, 0x25, 0xe1, 0x66, 0xbf, 0xaa, 0xe0, 0x6f, 0xb6, 0x97, 0xe1, 0xf0, 0x65, 0x31, 0x8c, - 0x1f, 0x8b, 0x50, 0x57, 0x69, 0xbf, 0xa4, 0x75, 0xf0, 0x28, 0x33, 0xcb, 0xf7, 0x56, 0x9a, 0x3b, - 0xf9, 0xa6, 0xaf, 0x1a, 0xe5, 0xcf, 0x17, 0x46, 0xd9, 0x5a, 0x1d, 0x32, 0x7f, 0x92, 0x1d, 0xf8, - 0xdf, 0x42, 0xfc, 0xd5, 0xda, 0x99, 0x19, 0xf6, 0x62, 0xfe, 0xb0, 0x1b, 0x7f, 0x6b, 0xb0, 0xb5, - 0x94, 0x12, 0x7a, 0x1f, 0xd6, 0xe7, 0x32, 0xa7, 0xe9, 0xa5, 0xaa, 0xda, 0xb7, 0x54, 0xbc, 0xf5, - 0xfd, 0x79, 0x25, 0xce, 0xda, 0xa2, 0x8f, 0xa1, 0x2c, 0x96, 0x95, 0x62, 0x78, 0xd5, 0x95, 0x37, - 0xa5, 0x56, 0x48, 0xb0, 0x44, 0xc8, 0x56, 0x52, 0xbe, 0xe6, 0xd9, 0xde, 0x81, 0x0a, 0x0d, 0x43, - 0x3f, 0x54, 0xf7, 0x6f, 0xca, 0x4d, 0x5b, 0x08, 0x71, 0xaa, 0x33, 0x7e, 0x2d, 0xc2, 0x74, 0xa7, - 0xa2, 0xbb, 0xe9, 0x7e, 0x96, 0x47, 0x33, 0x25, 0x34, 0xb3, 0x77, 0x85, 0x1c, 0x4f, 0x2d, 0xd0, - 0x6b, 0x50, 0x8a, 0x59, 0x5f, 0xdd, 0xe2, 0xfa, 0xdc, 0xf1, 0xc4, 0x42, 0x8e, 0x0c, 0x58, 0x1b, - 0x84, 0x7e, 0x1c, 0x88, 0x31, 0x10, 0x89, 0x82, 0xe8, 0xe8, 0x47, 0x52, 0x82, 0x95, 0x06, 0x1d, - 0x43, 0x85, 0x8a, 0xdb, 0x29, 0x6b, 0xa9, 0xb7, 0xf6, 0x56, 0xa3, 0xc6, 0x94, 0xf7, 0xb6, 0xed, - 0xf1, 0x70, 0x3c, 0x57, 0x95, 0x90, 0xe1, 0x14, 0x6e, 0xbb, 0xa7, 0x6e, 0xb2, 0xb4, 0x41, 0x9b, - 0x50, 0x1a, 0xd2, 0x71, 0x5a, 0x11, 0x16, 0x3f, 0xd1, 0x07, 0x50, 0x19, 0x89, 0x73, 0xad, 0x5a, - 0xb2, 0x9b, 0x1f, 0x77, 0x76, 0xde, 0x71, 0xea, 0xf6, 0xb0, 0xf8, 0x40, 0xb3, 0xed, 0xb3, 0xf3, - 0x66, 0xe1, 0xf9, 0x79, 0xb3, 0xf0, 0xe2, 0xbc, 0x59, 0x78, 0x96, 0x34, 0xb5, 0xb3, 0xa4, 0xa9, - 0x3d, 0x4f, 0x9a, 0xda, 0x8b, 0xa4, 0xa9, 0xfd, 0x99, 0x34, 0xb5, 0xef, 0xff, 0x6a, 0x16, 0xbe, - 0xbc, 0x9d, 0xf7, 0x67, 0xf0, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xb7, 0xc1, 0xa0, 0x2b, - 0x0a, 0x00, 0x00, -} +func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *BoundObjectReference) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -898,7 +515,7 @@ func (m *UserInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Extra { keysForExtra = append(keysForExtra, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + sort.Strings(keysForExtra) for iNdEx := len(keysForExtra) - 1; iNdEx >= 0; iNdEx-- { v := m.Extra[string(keysForExtra[iNdEx])] baseI := i @@ -1260,7 +877,7 @@ func (this *UserInfo) String() string { for k := range this.Extra { keysForExtra = append(keysForExtra, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + sort.Strings(keysForExtra) mapStringForExtra := "map[string]ExtraValue{" for _, k := range keysForExtra { mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k]) diff --git a/staging/src/k8s.io/api/authentication/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/authentication/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..7003a8084351a --- /dev/null +++ b/staging/src/k8s.io/api/authentication/v1/generated.protomessage.pb.go @@ -0,0 +1,44 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*BoundObjectReference) ProtoMessage() {} + +func (*ExtraValue) ProtoMessage() {} + +func (*SelfSubjectReview) ProtoMessage() {} + +func (*SelfSubjectReviewStatus) ProtoMessage() {} + +func (*TokenRequest) ProtoMessage() {} + +func (*TokenRequestSpec) ProtoMessage() {} + +func (*TokenRequestStatus) ProtoMessage() {} + +func (*TokenReview) ProtoMessage() {} + +func (*TokenReviewSpec) ProtoMessage() {} + +func (*TokenReviewStatus) ProtoMessage() {} + +func (*UserInfo) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/authentication/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/authentication/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..ca0c6f353c973 --- /dev/null +++ b/staging/src/k8s.io/api/authentication/v1/zz_generated.model_name.go @@ -0,0 +1,72 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in BoundObjectReference) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1.BoundObjectReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelfSubjectReview) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1.SelfSubjectReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelfSubjectReviewStatus) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1.SelfSubjectReviewStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TokenRequest) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1.TokenRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TokenRequestSpec) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1.TokenRequestSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TokenRequestStatus) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1.TokenRequestStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TokenReview) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1.TokenReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TokenReviewSpec) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1.TokenReviewSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TokenReviewStatus) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1.TokenReviewStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in UserInfo) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1.UserInfo" +} diff --git a/staging/src/k8s.io/api/authentication/v1alpha1/doc.go b/staging/src/k8s.io/api/authentication/v1alpha1/doc.go index c199ccd499997..47f61e0b696bf 100644 --- a/staging/src/k8s.io/api/authentication/v1alpha1/doc.go +++ b/staging/src/k8s.io/api/authentication/v1alpha1/doc.go @@ -19,5 +19,6 @@ limitations under the License. // +groupName=authentication.k8s.io // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.authentication.v1alpha1 package v1alpha1 diff --git a/staging/src/k8s.io/api/authentication/v1alpha1/generated.pb.go b/staging/src/k8s.io/api/authentication/v1alpha1/generated.pb.go index 98c106ec65a88..b017e1c3342a1 100644 --- a/staging/src/k8s.io/api/authentication/v1alpha1/generated.pb.go +++ b/staging/src/k8s.io/api/authentication/v1alpha1/generated.pb.go @@ -24,116 +24,14 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *SelfSubjectReview) Reset() { *m = SelfSubjectReview{} } -func (m *SelfSubjectReview) Reset() { *m = SelfSubjectReview{} } -func (*SelfSubjectReview) ProtoMessage() {} -func (*SelfSubjectReview) Descriptor() ([]byte, []int) { - return fileDescriptor_f003acd72d3d5efb, []int{0} -} -func (m *SelfSubjectReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelfSubjectReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelfSubjectReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelfSubjectReview.Merge(m, src) -} -func (m *SelfSubjectReview) XXX_Size() int { - return m.Size() -} -func (m *SelfSubjectReview) XXX_DiscardUnknown() { - xxx_messageInfo_SelfSubjectReview.DiscardUnknown(m) -} - -var xxx_messageInfo_SelfSubjectReview proto.InternalMessageInfo - -func (m *SelfSubjectReviewStatus) Reset() { *m = SelfSubjectReviewStatus{} } -func (*SelfSubjectReviewStatus) ProtoMessage() {} -func (*SelfSubjectReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_f003acd72d3d5efb, []int{1} -} -func (m *SelfSubjectReviewStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelfSubjectReviewStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelfSubjectReviewStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelfSubjectReviewStatus.Merge(m, src) -} -func (m *SelfSubjectReviewStatus) XXX_Size() int { - return m.Size() -} -func (m *SelfSubjectReviewStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SelfSubjectReviewStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_SelfSubjectReviewStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*SelfSubjectReview)(nil), "k8s.io.api.authentication.v1alpha1.SelfSubjectReview") - proto.RegisterType((*SelfSubjectReviewStatus)(nil), "k8s.io.api.authentication.v1alpha1.SelfSubjectReviewStatus") -} - -func init() { - proto.RegisterFile("k8s.io/api/authentication/v1alpha1/generated.proto", fileDescriptor_f003acd72d3d5efb) -} - -var fileDescriptor_f003acd72d3d5efb = []byte{ - // 368 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x4f, 0xe2, 0x40, - 0x14, 0xc7, 0x3b, 0x7b, 0x20, 0xa4, 0x9b, 0x6c, 0x76, 0x7b, 0x59, 0xc2, 0x61, 0x30, 0x3d, 0x18, - 0x0f, 0x3a, 0x23, 0xc4, 0x18, 0x13, 0x6f, 0x3d, 0xe9, 0xc1, 0x98, 0x14, 0xbd, 0x78, 0xf2, 0x51, - 0x1e, 0xed, 0x08, 0xed, 0x34, 0xed, 0x14, 0xe3, 0xcd, 0x8f, 0xe0, 0xc7, 0xe2, 0xc8, 0x91, 0x78, - 0x20, 0x52, 0xbf, 0x88, 0xe9, 0x50, 0x20, 0x82, 0xc0, 0xad, 0xef, 0xe5, 0xfd, 0x7e, 0xef, 0xdf, - 0x99, 0x31, 0x5b, 0xfd, 0x8b, 0x94, 0x09, 0xc9, 0x21, 0x16, 0x1c, 0x32, 0x15, 0x60, 0xa4, 0x84, - 0x07, 0x4a, 0xc8, 0x88, 0x0f, 0x9b, 0x30, 0x88, 0x03, 0x68, 0x72, 0x1f, 0x23, 0x4c, 0x40, 0x61, - 0x97, 0xc5, 0x89, 0x54, 0xd2, 0xb2, 0xe7, 0x0c, 0x83, 0x58, 0xb0, 0xef, 0x0c, 0x5b, 0x30, 0xf5, - 0x13, 0x5f, 0xa8, 0x20, 0xeb, 0x30, 0x4f, 0x86, 0xdc, 0x97, 0xbe, 0xe4, 0x1a, 0xed, 0x64, 0x3d, - 0x5d, 0xe9, 0x42, 0x7f, 0xcd, 0x95, 0xf5, 0xe3, 0x5d, 0x31, 0xd6, 0x03, 0xd4, 0xcf, 0x56, 0xd3, - 0x21, 0x78, 0x81, 0x88, 0x30, 0x79, 0xe1, 0x71, 0xdf, 0x2f, 0x1a, 0x29, 0x0f, 0x51, 0xc1, 0x4f, - 0x14, 0xdf, 0x46, 0x25, 0x59, 0xa4, 0x44, 0x88, 0x1b, 0xc0, 0xf9, 0x3e, 0x20, 0xf5, 0x02, 0x0c, - 0x61, 0x9d, 0xb3, 0xdf, 0x89, 0xf9, 0xaf, 0x8d, 0x83, 0x5e, 0x3b, 0xeb, 0x3c, 0xa1, 0xa7, 0x5c, - 0x1c, 0x0a, 0x7c, 0xb6, 0x1e, 0xcd, 0x6a, 0x91, 0xac, 0x0b, 0x0a, 0x6a, 0xe4, 0x80, 0x1c, 0xfd, - 0x6e, 0x9d, 0xb2, 0xd5, 0x41, 0x2e, 0x17, 0xb0, 0xb8, 0xef, 0x17, 0x8d, 0x94, 0x15, 0xd3, 0x6c, - 0xd8, 0x64, 0xb7, 0xda, 0x72, 0x83, 0x0a, 0x1c, 0x6b, 0x34, 0x6d, 0x18, 0xf9, 0xb4, 0x61, 0xae, - 0x7a, 0xee, 0xd2, 0x6a, 0x79, 0x66, 0x25, 0x55, 0xa0, 0xb2, 0xb4, 0xf6, 0x4b, 0xfb, 0x2f, 0xd9, - 0xfe, 0x8b, 0x62, 0x1b, 0x41, 0xdb, 0x5a, 0xe1, 0xfc, 0x29, 0x57, 0x55, 0xe6, 0xb5, 0x5b, 0xaa, - 0x6d, 0x69, 0xfe, 0xdf, 0x82, 0x58, 0x77, 0x66, 0x35, 0x4b, 0x31, 0xb9, 0x8e, 0x7a, 0xb2, 0xfc, - 0xc3, 0xc3, 0x9d, 0x09, 0xd8, 0x7d, 0x39, 0xed, 0xfc, 0x2d, 0x97, 0x55, 0x17, 0x1d, 0x77, 0x69, - 0x72, 0xae, 0x46, 0x33, 0x6a, 0x8c, 0x67, 0xd4, 0x98, 0xcc, 0xa8, 0xf1, 0x9a, 0x53, 0x32, 0xca, - 0x29, 0x19, 0xe7, 0x94, 0x4c, 0x72, 0x4a, 0x3e, 0x72, 0x4a, 0xde, 0x3e, 0xa9, 0xf1, 0x60, 0xef, - 0x7f, 0xc7, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x04, 0xfb, 0xb6, 0xfb, 0xec, 0x02, 0x00, 0x00, -} +func (m *SelfSubjectReviewStatus) Reset() { *m = SelfSubjectReviewStatus{} } func (m *SelfSubjectReview) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/authentication/v1alpha1/generated.protomessage.pb.go b/staging/src/k8s.io/api/authentication/v1alpha1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..d0e9c4e564dc9 --- /dev/null +++ b/staging/src/k8s.io/api/authentication/v1alpha1/generated.protomessage.pb.go @@ -0,0 +1,26 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1alpha1 + +func (*SelfSubjectReview) ProtoMessage() {} + +func (*SelfSubjectReviewStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/authentication/v1alpha1/zz_generated.model_name.go b/staging/src/k8s.io/api/authentication/v1alpha1/zz_generated.model_name.go new file mode 100644 index 0000000000000..fbf0de8eda4be --- /dev/null +++ b/staging/src/k8s.io/api/authentication/v1alpha1/zz_generated.model_name.go @@ -0,0 +1,32 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1alpha1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelfSubjectReview) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1alpha1.SelfSubjectReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelfSubjectReviewStatus) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1alpha1.SelfSubjectReviewStatus" +} diff --git a/staging/src/k8s.io/api/authentication/v1beta1/doc.go b/staging/src/k8s.io/api/authentication/v1beta1/doc.go index af63dc845bcdd..2acdbd02e8bc6 100644 --- a/staging/src/k8s.io/api/authentication/v1beta1/doc.go +++ b/staging/src/k8s.io/api/authentication/v1beta1/doc.go @@ -19,5 +19,6 @@ limitations under the License. // +groupName=authentication.k8s.io // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.authentication.v1beta1 package v1beta1 diff --git a/staging/src/k8s.io/api/authentication/v1beta1/generated.pb.go b/staging/src/k8s.io/api/authentication/v1beta1/generated.pb.go index 4153926447836..7e337e0a19f8f 100644 --- a/staging/src/k8s.io/api/authentication/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/authentication/v1beta1/generated.pb.go @@ -23,286 +23,26 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *ExtraValue) Reset() { *m = ExtraValue{} } -func (*ExtraValue) ProtoMessage() {} -func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_fdc2de40fd7f3b21, []int{0} -} -func (m *ExtraValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExtraValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExtraValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtraValue.Merge(m, src) -} -func (m *ExtraValue) XXX_Size() int { - return m.Size() -} -func (m *ExtraValue) XXX_DiscardUnknown() { - xxx_messageInfo_ExtraValue.DiscardUnknown(m) -} - -var xxx_messageInfo_ExtraValue proto.InternalMessageInfo +func (m *ExtraValue) Reset() { *m = ExtraValue{} } -func (m *SelfSubjectReview) Reset() { *m = SelfSubjectReview{} } -func (*SelfSubjectReview) ProtoMessage() {} -func (*SelfSubjectReview) Descriptor() ([]byte, []int) { - return fileDescriptor_fdc2de40fd7f3b21, []int{1} -} -func (m *SelfSubjectReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelfSubjectReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelfSubjectReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelfSubjectReview.Merge(m, src) -} -func (m *SelfSubjectReview) XXX_Size() int { - return m.Size() -} -func (m *SelfSubjectReview) XXX_DiscardUnknown() { - xxx_messageInfo_SelfSubjectReview.DiscardUnknown(m) -} +func (m *SelfSubjectReview) Reset() { *m = SelfSubjectReview{} } -var xxx_messageInfo_SelfSubjectReview proto.InternalMessageInfo +func (m *SelfSubjectReviewStatus) Reset() { *m = SelfSubjectReviewStatus{} } -func (m *SelfSubjectReviewStatus) Reset() { *m = SelfSubjectReviewStatus{} } -func (*SelfSubjectReviewStatus) ProtoMessage() {} -func (*SelfSubjectReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_fdc2de40fd7f3b21, []int{2} -} -func (m *SelfSubjectReviewStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelfSubjectReviewStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelfSubjectReviewStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelfSubjectReviewStatus.Merge(m, src) -} -func (m *SelfSubjectReviewStatus) XXX_Size() int { - return m.Size() -} -func (m *SelfSubjectReviewStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SelfSubjectReviewStatus.DiscardUnknown(m) -} +func (m *TokenReview) Reset() { *m = TokenReview{} } -var xxx_messageInfo_SelfSubjectReviewStatus proto.InternalMessageInfo +func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} } -func (m *TokenReview) Reset() { *m = TokenReview{} } -func (*TokenReview) ProtoMessage() {} -func (*TokenReview) Descriptor() ([]byte, []int) { - return fileDescriptor_fdc2de40fd7f3b21, []int{3} -} -func (m *TokenReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TokenReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenReview.Merge(m, src) -} -func (m *TokenReview) XXX_Size() int { - return m.Size() -} -func (m *TokenReview) XXX_DiscardUnknown() { - xxx_messageInfo_TokenReview.DiscardUnknown(m) -} +func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} } -var xxx_messageInfo_TokenReview proto.InternalMessageInfo - -func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} } -func (*TokenReviewSpec) ProtoMessage() {} -func (*TokenReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_fdc2de40fd7f3b21, []int{4} -} -func (m *TokenReviewSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenReviewSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TokenReviewSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenReviewSpec.Merge(m, src) -} -func (m *TokenReviewSpec) XXX_Size() int { - return m.Size() -} -func (m *TokenReviewSpec) XXX_DiscardUnknown() { - xxx_messageInfo_TokenReviewSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenReviewSpec proto.InternalMessageInfo - -func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} } -func (*TokenReviewStatus) ProtoMessage() {} -func (*TokenReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_fdc2de40fd7f3b21, []int{5} -} -func (m *TokenReviewStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenReviewStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TokenReviewStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenReviewStatus.Merge(m, src) -} -func (m *TokenReviewStatus) XXX_Size() int { - return m.Size() -} -func (m *TokenReviewStatus) XXX_DiscardUnknown() { - xxx_messageInfo_TokenReviewStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenReviewStatus proto.InternalMessageInfo - -func (m *UserInfo) Reset() { *m = UserInfo{} } -func (*UserInfo) ProtoMessage() {} -func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fdc2de40fd7f3b21, []int{6} -} -func (m *UserInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *UserInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserInfo.Merge(m, src) -} -func (m *UserInfo) XXX_Size() int { - return m.Size() -} -func (m *UserInfo) XXX_DiscardUnknown() { - xxx_messageInfo_UserInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_UserInfo proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ExtraValue)(nil), "k8s.io.api.authentication.v1beta1.ExtraValue") - proto.RegisterType((*SelfSubjectReview)(nil), "k8s.io.api.authentication.v1beta1.SelfSubjectReview") - proto.RegisterType((*SelfSubjectReviewStatus)(nil), "k8s.io.api.authentication.v1beta1.SelfSubjectReviewStatus") - proto.RegisterType((*TokenReview)(nil), "k8s.io.api.authentication.v1beta1.TokenReview") - proto.RegisterType((*TokenReviewSpec)(nil), "k8s.io.api.authentication.v1beta1.TokenReviewSpec") - proto.RegisterType((*TokenReviewStatus)(nil), "k8s.io.api.authentication.v1beta1.TokenReviewStatus") - proto.RegisterType((*UserInfo)(nil), "k8s.io.api.authentication.v1beta1.UserInfo") - proto.RegisterMapType((map[string]ExtraValue)(nil), "k8s.io.api.authentication.v1beta1.UserInfo.ExtraEntry") -} - -func init() { - proto.RegisterFile("k8s.io/api/authentication/v1beta1/generated.proto", fileDescriptor_fdc2de40fd7f3b21) -} - -var fileDescriptor_fdc2de40fd7f3b21 = []byte{ - // 711 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x4e, 0xdb, 0x4e, - 0x10, 0x8e, 0xf3, 0x07, 0x25, 0x9b, 0x5f, 0x7e, 0x85, 0x95, 0xaa, 0xa2, 0x48, 0x75, 0x20, 0x95, - 0x2a, 0x24, 0x60, 0xdd, 0x20, 0x44, 0x11, 0x3d, 0xe1, 0x16, 0x21, 0x0e, 0xa8, 0xd2, 0x06, 0x7a, - 0x68, 0x7b, 0xe8, 0xc6, 0x19, 0x1c, 0x37, 0xc4, 0xb6, 0xec, 0x75, 0x5a, 0x6e, 0x3c, 0x42, 0x8f, - 0x3d, 0x56, 0xea, 0x93, 0xf4, 0xc6, 0x91, 0x23, 0x95, 0xaa, 0xa8, 0xb8, 0x4f, 0xd0, 0x37, 0xa8, - 0x76, 0xbd, 0x38, 0x09, 0x94, 0x00, 0x97, 0xde, 0xbc, 0xdf, 0xce, 0xf7, 0xcd, 0xcc, 0x37, 0xa3, - 0x35, 0x6a, 0x74, 0xd7, 0x43, 0xe2, 0x78, 0x06, 0xf3, 0x1d, 0x83, 0x45, 0xbc, 0x03, 0x2e, 0x77, - 0x2c, 0xc6, 0x1d, 0xcf, 0x35, 0xfa, 0x8d, 0x16, 0x70, 0xd6, 0x30, 0x6c, 0x70, 0x21, 0x60, 0x1c, - 0xda, 0xc4, 0x0f, 0x3c, 0xee, 0xe1, 0xf9, 0x84, 0x42, 0x98, 0xef, 0x90, 0x71, 0x0a, 0x51, 0x94, - 0xea, 0xb2, 0xed, 0xf0, 0x4e, 0xd4, 0x22, 0x96, 0xd7, 0x33, 0x6c, 0xcf, 0xf6, 0x0c, 0xc9, 0x6c, - 0x45, 0x07, 0xf2, 0x24, 0x0f, 0xf2, 0x2b, 0x51, 0xac, 0x2e, 0x4d, 0x2a, 0xe2, 0x72, 0xfe, 0xea, - 0xea, 0x30, 0xba, 0xc7, 0xac, 0x8e, 0xe3, 0x42, 0x70, 0x64, 0xf8, 0x5d, 0x5b, 0x00, 0xa1, 0xd1, - 0x03, 0xce, 0xfe, 0xc6, 0x32, 0xae, 0x63, 0x05, 0x91, 0xcb, 0x9d, 0x1e, 0x5c, 0x21, 0xac, 0xdd, - 0x44, 0x08, 0xad, 0x0e, 0xf4, 0xd8, 0x65, 0x5e, 0xfd, 0x29, 0x42, 0x5b, 0x1f, 0x79, 0xc0, 0x5e, - 0xb1, 0xc3, 0x08, 0x70, 0x0d, 0x15, 0x1c, 0x0e, 0xbd, 0x70, 0x56, 0x9b, 0xcb, 0x2d, 0x94, 0xcc, - 0x52, 0x3c, 0xa8, 0x15, 0x76, 0x04, 0x40, 0x13, 0x7c, 0xa3, 0xf8, 0xf9, 0x4b, 0x2d, 0x73, 0xfc, - 0x63, 0x2e, 0x53, 0xff, 0xae, 0xa1, 0x99, 0x26, 0x1c, 0x1e, 0x34, 0xa3, 0xd6, 0x7b, 0xb0, 0x38, - 0x85, 0xbe, 0x03, 0x1f, 0xf0, 0x3b, 0x54, 0x14, 0x2d, 0xb5, 0x19, 0x67, 0xb3, 0xda, 0x9c, 0xb6, - 0x50, 0x5e, 0x79, 0x42, 0x86, 0x03, 0x48, 0x2b, 0x23, 0x7e, 0xd7, 0x16, 0x40, 0x48, 0x44, 0x34, - 0xe9, 0x37, 0xc8, 0x4b, 0xa9, 0xb2, 0x0b, 0x9c, 0x99, 0xf8, 0x64, 0x50, 0xcb, 0xc4, 0x83, 0x1a, - 0x1a, 0x62, 0x34, 0x55, 0xc5, 0x2d, 0x34, 0x15, 0x72, 0xc6, 0xa3, 0x70, 0x36, 0x2b, 0xf5, 0x37, - 0xc8, 0x8d, 0x03, 0x26, 0x57, 0xea, 0x6c, 0x4a, 0x05, 0xf3, 0x7f, 0x95, 0x69, 0x2a, 0x39, 0x53, - 0xa5, 0x5c, 0xf7, 0xd0, 0x83, 0x6b, 0x28, 0x78, 0x0f, 0x15, 0xa3, 0x10, 0x82, 0x1d, 0xf7, 0xc0, - 0x53, 0x0d, 0x3e, 0x9e, 0x58, 0x00, 0xd9, 0x57, 0xd1, 0xe6, 0xb4, 0x4a, 0x56, 0xbc, 0x40, 0x68, - 0xaa, 0x54, 0xff, 0x9a, 0x45, 0xe5, 0x3d, 0xaf, 0x0b, 0xee, 0x3f, 0xb3, 0x71, 0x0f, 0xe5, 0x43, - 0x1f, 0x2c, 0x65, 0xe2, 0xca, 0x2d, 0x4c, 0x1c, 0xa9, 0xaf, 0xe9, 0x83, 0x65, 0xfe, 0xa7, 0xf4, - 0xf3, 0xe2, 0x44, 0xa5, 0x1a, 0x7e, 0x9b, 0x0e, 0x27, 0x27, 0x75, 0x57, 0xef, 0xa8, 0x3b, 0x79, - 0x2c, 0x16, 0xba, 0x77, 0xa9, 0x08, 0xfc, 0x08, 0x15, 0xb8, 0x80, 0xa4, 0x4b, 0x25, 0xb3, 0xa2, - 0x98, 0x85, 0x24, 0x2e, 0xb9, 0xc3, 0x8b, 0xa8, 0xc4, 0xa2, 0xb6, 0x03, 0xae, 0x05, 0x62, 0x6b, - 0xc4, 0x66, 0x57, 0xe2, 0x41, 0xad, 0xb4, 0x79, 0x01, 0xd2, 0xe1, 0x7d, 0xfd, 0xb7, 0x86, 0x66, - 0xae, 0x94, 0x84, 0x9f, 0xa1, 0xca, 0x48, 0xf9, 0xd0, 0x96, 0xf9, 0x8a, 0xe6, 0x7d, 0x95, 0xaf, - 0xb2, 0x39, 0x7a, 0x49, 0xc7, 0x63, 0xf1, 0x2e, 0xca, 0x8b, 0x49, 0x2b, 0xaf, 0x17, 0x6f, 0xe1, - 0x49, 0xba, 0x34, 0xa9, 0xc9, 0x02, 0xa1, 0x52, 0x66, 0xbc, 0x9d, 0xfc, 0xe4, 0x76, 0x84, 0x41, - 0x10, 0x04, 0x5e, 0x20, 0x07, 0x32, 0x62, 0xd0, 0x96, 0x00, 0x69, 0x72, 0x57, 0xff, 0x96, 0x45, - 0xe9, 0x56, 0xe2, 0xa5, 0x64, 0xc3, 0x5d, 0xd6, 0x03, 0xe5, 0xea, 0xd8, 0xe6, 0x0a, 0x9c, 0xa6, - 0x11, 0xf8, 0x21, 0xca, 0x45, 0x4e, 0x5b, 0xb6, 0x56, 0x32, 0xcb, 0x2a, 0x30, 0xb7, 0xbf, 0xf3, - 0x82, 0x0a, 0x1c, 0xd7, 0xd1, 0x94, 0x1d, 0x78, 0x91, 0x2f, 0x16, 0x42, 0x14, 0x8a, 0xc4, 0x58, - 0xb7, 0x25, 0x42, 0xd5, 0x0d, 0x7e, 0x83, 0x0a, 0x20, 0x9e, 0x20, 0xd9, 0x4b, 0x79, 0x65, 0xed, - 0x0e, 0xfe, 0x10, 0xf9, 0x76, 0x6d, 0xb9, 0x3c, 0x38, 0x1a, 0x69, 0x4d, 0x60, 0x34, 0xd1, 0xac, - 0xda, 0xea, 0x7d, 0x93, 0x31, 0x78, 0x1a, 0xe5, 0xba, 0x70, 0x94, 0xb4, 0x45, 0xc5, 0x27, 0x7e, - 0x8e, 0x0a, 0x7d, 0xf1, 0xf4, 0xa9, 0xe1, 0x2c, 0xdf, 0x22, 0xf9, 0xf0, 0xbd, 0xa4, 0x09, 0x77, - 0x23, 0xbb, 0xae, 0x99, 0xdb, 0x27, 0xe7, 0x7a, 0xe6, 0xf4, 0x5c, 0xcf, 0x9c, 0x9d, 0xeb, 0x99, - 0xe3, 0x58, 0xd7, 0x4e, 0x62, 0x5d, 0x3b, 0x8d, 0x75, 0xed, 0x2c, 0xd6, 0xb5, 0x9f, 0xb1, 0xae, - 0x7d, 0xfa, 0xa5, 0x67, 0x5e, 0xcf, 0xdf, 0xf8, 0x03, 0xfb, 0x13, 0x00, 0x00, 0xff, 0xff, 0x45, - 0x72, 0x2b, 0xf2, 0xe4, 0x06, 0x00, 0x00, -} +func (m *UserInfo) Reset() { *m = UserInfo{} } func (m ExtraValue) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -582,7 +322,7 @@ func (m *UserInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Extra { keysForExtra = append(keysForExtra, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + sort.Strings(keysForExtra) for iNdEx := len(keysForExtra) - 1; iNdEx >= 0; iNdEx-- { v := m.Extra[string(keysForExtra[iNdEx])] baseI := i @@ -829,7 +569,7 @@ func (this *UserInfo) String() string { for k := range this.Extra { keysForExtra = append(keysForExtra, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + sort.Strings(keysForExtra) mapStringForExtra := "map[string]ExtraValue{" for _, k := range keysForExtra { mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k]) diff --git a/staging/src/k8s.io/api/authentication/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/authentication/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..a55034da99046 --- /dev/null +++ b/staging/src/k8s.io/api/authentication/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,36 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*ExtraValue) ProtoMessage() {} + +func (*SelfSubjectReview) ProtoMessage() {} + +func (*SelfSubjectReviewStatus) ProtoMessage() {} + +func (*TokenReview) ProtoMessage() {} + +func (*TokenReviewSpec) ProtoMessage() {} + +func (*TokenReviewStatus) ProtoMessage() {} + +func (*UserInfo) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/authentication/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/authentication/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..f464c3f2f2b0b --- /dev/null +++ b/staging/src/k8s.io/api/authentication/v1beta1/zz_generated.model_name.go @@ -0,0 +1,52 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelfSubjectReview) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1beta1.SelfSubjectReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelfSubjectReviewStatus) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1beta1.SelfSubjectReviewStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TokenReview) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1beta1.TokenReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TokenReviewSpec) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1beta1.TokenReviewSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TokenReviewStatus) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1beta1.TokenReviewStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in UserInfo) OpenAPIModelName() string { + return "io.k8s.api.authentication.v1beta1.UserInfo" +} diff --git a/staging/src/k8s.io/api/authorization/v1/doc.go b/staging/src/k8s.io/api/authorization/v1/doc.go index 40bf8006e06ca..0a0cbf91becf3 100644 --- a/staging/src/k8s.io/api/authorization/v1/doc.go +++ b/staging/src/k8s.io/api/authorization/v1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.authorization.v1 + // +groupName=authorization.k8s.io package v1 diff --git a/staging/src/k8s.io/api/authorization/v1/generated.pb.go b/staging/src/k8s.io/api/authorization/v1/generated.pb.go index aed9a3a476169..f389c4c05f243 100644 --- a/staging/src/k8s.io/api/authorization/v1/generated.pb.go +++ b/staging/src/k8s.io/api/authorization/v1/generated.pb.go @@ -23,581 +23,46 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ExtraValue) Reset() { *m = ExtraValue{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *FieldSelectorAttributes) Reset() { *m = FieldSelectorAttributes{} } -func (m *ExtraValue) Reset() { *m = ExtraValue{} } -func (*ExtraValue) ProtoMessage() {} -func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{0} -} -func (m *ExtraValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExtraValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExtraValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtraValue.Merge(m, src) -} -func (m *ExtraValue) XXX_Size() int { - return m.Size() -} -func (m *ExtraValue) XXX_DiscardUnknown() { - xxx_messageInfo_ExtraValue.DiscardUnknown(m) -} - -var xxx_messageInfo_ExtraValue proto.InternalMessageInfo - -func (m *FieldSelectorAttributes) Reset() { *m = FieldSelectorAttributes{} } -func (*FieldSelectorAttributes) ProtoMessage() {} -func (*FieldSelectorAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{1} -} -func (m *FieldSelectorAttributes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FieldSelectorAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FieldSelectorAttributes) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldSelectorAttributes.Merge(m, src) -} -func (m *FieldSelectorAttributes) XXX_Size() int { - return m.Size() -} -func (m *FieldSelectorAttributes) XXX_DiscardUnknown() { - xxx_messageInfo_FieldSelectorAttributes.DiscardUnknown(m) -} - -var xxx_messageInfo_FieldSelectorAttributes proto.InternalMessageInfo - -func (m *LabelSelectorAttributes) Reset() { *m = LabelSelectorAttributes{} } -func (*LabelSelectorAttributes) ProtoMessage() {} -func (*LabelSelectorAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{2} -} -func (m *LabelSelectorAttributes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LabelSelectorAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LabelSelectorAttributes) XXX_Merge(src proto.Message) { - xxx_messageInfo_LabelSelectorAttributes.Merge(m, src) -} -func (m *LabelSelectorAttributes) XXX_Size() int { - return m.Size() -} -func (m *LabelSelectorAttributes) XXX_DiscardUnknown() { - xxx_messageInfo_LabelSelectorAttributes.DiscardUnknown(m) -} - -var xxx_messageInfo_LabelSelectorAttributes proto.InternalMessageInfo - -func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} } -func (*LocalSubjectAccessReview) ProtoMessage() {} -func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{3} -} -func (m *LocalSubjectAccessReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LocalSubjectAccessReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LocalSubjectAccessReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_LocalSubjectAccessReview.Merge(m, src) -} -func (m *LocalSubjectAccessReview) XXX_Size() int { - return m.Size() -} -func (m *LocalSubjectAccessReview) XXX_DiscardUnknown() { - xxx_messageInfo_LocalSubjectAccessReview.DiscardUnknown(m) -} - -var xxx_messageInfo_LocalSubjectAccessReview proto.InternalMessageInfo - -func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} } -func (*NonResourceAttributes) ProtoMessage() {} -func (*NonResourceAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{4} -} -func (m *NonResourceAttributes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NonResourceAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NonResourceAttributes) XXX_Merge(src proto.Message) { - xxx_messageInfo_NonResourceAttributes.Merge(m, src) -} -func (m *NonResourceAttributes) XXX_Size() int { - return m.Size() -} -func (m *NonResourceAttributes) XXX_DiscardUnknown() { - xxx_messageInfo_NonResourceAttributes.DiscardUnknown(m) -} - -var xxx_messageInfo_NonResourceAttributes proto.InternalMessageInfo - -func (m *NonResourceRule) Reset() { *m = NonResourceRule{} } -func (*NonResourceRule) ProtoMessage() {} -func (*NonResourceRule) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{5} -} -func (m *NonResourceRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NonResourceRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NonResourceRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_NonResourceRule.Merge(m, src) -} -func (m *NonResourceRule) XXX_Size() int { - return m.Size() -} -func (m *NonResourceRule) XXX_DiscardUnknown() { - xxx_messageInfo_NonResourceRule.DiscardUnknown(m) -} - -var xxx_messageInfo_NonResourceRule proto.InternalMessageInfo - -func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} } -func (*ResourceAttributes) ProtoMessage() {} -func (*ResourceAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{6} -} -func (m *ResourceAttributes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceAttributes) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceAttributes.Merge(m, src) -} -func (m *ResourceAttributes) XXX_Size() int { - return m.Size() -} -func (m *ResourceAttributes) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceAttributes.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceAttributes proto.InternalMessageInfo - -func (m *ResourceRule) Reset() { *m = ResourceRule{} } -func (*ResourceRule) ProtoMessage() {} -func (*ResourceRule) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{7} -} -func (m *ResourceRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceRule.Merge(m, src) -} -func (m *ResourceRule) XXX_Size() int { - return m.Size() -} -func (m *ResourceRule) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceRule.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceRule proto.InternalMessageInfo - -func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } -func (*SelfSubjectAccessReview) ProtoMessage() {} -func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{8} -} -func (m *SelfSubjectAccessReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelfSubjectAccessReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelfSubjectAccessReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelfSubjectAccessReview.Merge(m, src) -} -func (m *SelfSubjectAccessReview) XXX_Size() int { - return m.Size() -} -func (m *SelfSubjectAccessReview) XXX_DiscardUnknown() { - xxx_messageInfo_SelfSubjectAccessReview.DiscardUnknown(m) -} - -var xxx_messageInfo_SelfSubjectAccessReview proto.InternalMessageInfo - -func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } -func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} -func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{9} -} -func (m *SelfSubjectAccessReviewSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelfSubjectAccessReviewSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelfSubjectAccessReviewSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelfSubjectAccessReviewSpec.Merge(m, src) -} -func (m *SelfSubjectAccessReviewSpec) XXX_Size() int { - return m.Size() -} -func (m *SelfSubjectAccessReviewSpec) XXX_DiscardUnknown() { - xxx_messageInfo_SelfSubjectAccessReviewSpec.DiscardUnknown(m) -} +func (m *LabelSelectorAttributes) Reset() { *m = LabelSelectorAttributes{} } -var xxx_messageInfo_SelfSubjectAccessReviewSpec proto.InternalMessageInfo - -func (m *SelfSubjectRulesReview) Reset() { *m = SelfSubjectRulesReview{} } -func (*SelfSubjectRulesReview) ProtoMessage() {} -func (*SelfSubjectRulesReview) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{10} -} -func (m *SelfSubjectRulesReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelfSubjectRulesReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelfSubjectRulesReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelfSubjectRulesReview.Merge(m, src) -} -func (m *SelfSubjectRulesReview) XXX_Size() int { - return m.Size() -} -func (m *SelfSubjectRulesReview) XXX_DiscardUnknown() { - xxx_messageInfo_SelfSubjectRulesReview.DiscardUnknown(m) -} - -var xxx_messageInfo_SelfSubjectRulesReview proto.InternalMessageInfo - -func (m *SelfSubjectRulesReviewSpec) Reset() { *m = SelfSubjectRulesReviewSpec{} } -func (*SelfSubjectRulesReviewSpec) ProtoMessage() {} -func (*SelfSubjectRulesReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{11} -} -func (m *SelfSubjectRulesReviewSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelfSubjectRulesReviewSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelfSubjectRulesReviewSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelfSubjectRulesReviewSpec.Merge(m, src) -} -func (m *SelfSubjectRulesReviewSpec) XXX_Size() int { - return m.Size() -} -func (m *SelfSubjectRulesReviewSpec) XXX_DiscardUnknown() { - xxx_messageInfo_SelfSubjectRulesReviewSpec.DiscardUnknown(m) -} +func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} } -var xxx_messageInfo_SelfSubjectRulesReviewSpec proto.InternalMessageInfo +func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} } -func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} } -func (*SubjectAccessReview) ProtoMessage() {} -func (*SubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{12} -} -func (m *SubjectAccessReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SubjectAccessReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SubjectAccessReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubjectAccessReview.Merge(m, src) -} -func (m *SubjectAccessReview) XXX_Size() int { - return m.Size() -} -func (m *SubjectAccessReview) XXX_DiscardUnknown() { - xxx_messageInfo_SubjectAccessReview.DiscardUnknown(m) -} +func (m *NonResourceRule) Reset() { *m = NonResourceRule{} } -var xxx_messageInfo_SubjectAccessReview proto.InternalMessageInfo +func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} } -func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} } -func (*SubjectAccessReviewSpec) ProtoMessage() {} -func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{13} -} -func (m *SubjectAccessReviewSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SubjectAccessReviewSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SubjectAccessReviewSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubjectAccessReviewSpec.Merge(m, src) -} -func (m *SubjectAccessReviewSpec) XXX_Size() int { - return m.Size() -} -func (m *SubjectAccessReviewSpec) XXX_DiscardUnknown() { - xxx_messageInfo_SubjectAccessReviewSpec.DiscardUnknown(m) -} +func (m *ResourceRule) Reset() { *m = ResourceRule{} } -var xxx_messageInfo_SubjectAccessReviewSpec proto.InternalMessageInfo +func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } -func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} } -func (*SubjectAccessReviewStatus) ProtoMessage() {} -func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{14} -} -func (m *SubjectAccessReviewStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SubjectAccessReviewStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SubjectAccessReviewStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubjectAccessReviewStatus.Merge(m, src) -} -func (m *SubjectAccessReviewStatus) XXX_Size() int { - return m.Size() -} -func (m *SubjectAccessReviewStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SubjectAccessReviewStatus.DiscardUnknown(m) -} +func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } -var xxx_messageInfo_SubjectAccessReviewStatus proto.InternalMessageInfo +func (m *SelfSubjectRulesReview) Reset() { *m = SelfSubjectRulesReview{} } -func (m *SubjectRulesReviewStatus) Reset() { *m = SubjectRulesReviewStatus{} } -func (*SubjectRulesReviewStatus) ProtoMessage() {} -func (*SubjectRulesReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_aafd0e5e70cec678, []int{15} -} -func (m *SubjectRulesReviewStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SubjectRulesReviewStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SubjectRulesReviewStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubjectRulesReviewStatus.Merge(m, src) -} -func (m *SubjectRulesReviewStatus) XXX_Size() int { - return m.Size() -} -func (m *SubjectRulesReviewStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SubjectRulesReviewStatus.DiscardUnknown(m) -} +func (m *SelfSubjectRulesReviewSpec) Reset() { *m = SelfSubjectRulesReviewSpec{} } -var xxx_messageInfo_SubjectRulesReviewStatus proto.InternalMessageInfo +func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} } -func init() { - proto.RegisterType((*ExtraValue)(nil), "k8s.io.api.authorization.v1.ExtraValue") - proto.RegisterType((*FieldSelectorAttributes)(nil), "k8s.io.api.authorization.v1.FieldSelectorAttributes") - proto.RegisterType((*LabelSelectorAttributes)(nil), "k8s.io.api.authorization.v1.LabelSelectorAttributes") - proto.RegisterType((*LocalSubjectAccessReview)(nil), "k8s.io.api.authorization.v1.LocalSubjectAccessReview") - proto.RegisterType((*NonResourceAttributes)(nil), "k8s.io.api.authorization.v1.NonResourceAttributes") - proto.RegisterType((*NonResourceRule)(nil), "k8s.io.api.authorization.v1.NonResourceRule") - proto.RegisterType((*ResourceAttributes)(nil), "k8s.io.api.authorization.v1.ResourceAttributes") - proto.RegisterType((*ResourceRule)(nil), "k8s.io.api.authorization.v1.ResourceRule") - proto.RegisterType((*SelfSubjectAccessReview)(nil), "k8s.io.api.authorization.v1.SelfSubjectAccessReview") - proto.RegisterType((*SelfSubjectAccessReviewSpec)(nil), "k8s.io.api.authorization.v1.SelfSubjectAccessReviewSpec") - proto.RegisterType((*SelfSubjectRulesReview)(nil), "k8s.io.api.authorization.v1.SelfSubjectRulesReview") - proto.RegisterType((*SelfSubjectRulesReviewSpec)(nil), "k8s.io.api.authorization.v1.SelfSubjectRulesReviewSpec") - proto.RegisterType((*SubjectAccessReview)(nil), "k8s.io.api.authorization.v1.SubjectAccessReview") - proto.RegisterType((*SubjectAccessReviewSpec)(nil), "k8s.io.api.authorization.v1.SubjectAccessReviewSpec") - proto.RegisterMapType((map[string]ExtraValue)(nil), "k8s.io.api.authorization.v1.SubjectAccessReviewSpec.ExtraEntry") - proto.RegisterType((*SubjectAccessReviewStatus)(nil), "k8s.io.api.authorization.v1.SubjectAccessReviewStatus") - proto.RegisterType((*SubjectRulesReviewStatus)(nil), "k8s.io.api.authorization.v1.SubjectRulesReviewStatus") -} +func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} } -func init() { - proto.RegisterFile("k8s.io/api/authorization/v1/generated.proto", fileDescriptor_aafd0e5e70cec678) -} +func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} } -var fileDescriptor_aafd0e5e70cec678 = []byte{ - // 1247 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xf7, 0xfa, 0x47, 0x62, 0x8f, 0xe3, 0x6f, 0xd2, 0xc9, 0x37, 0xcd, 0x36, 0x11, 0x76, 0x64, - 0x24, 0x48, 0xd5, 0xb2, 0x26, 0x51, 0xdb, 0x44, 0x95, 0x0a, 0xf2, 0xaa, 0x01, 0x45, 0x4a, 0x4b, - 0x35, 0x51, 0x22, 0x51, 0x04, 0x62, 0xbc, 0x9e, 0xd8, 0x4b, 0xec, 0xdd, 0xed, 0xcc, 0xac, 0xd3, - 0x70, 0xaa, 0xc4, 0x3f, 0xc0, 0x91, 0x43, 0x0f, 0xfc, 0x07, 0x5c, 0x90, 0xb8, 0x73, 0x40, 0x11, - 0xa7, 0x1e, 0x8b, 0x84, 0x2c, 0x62, 0xce, 0xfc, 0x0f, 0x68, 0x66, 0xc7, 0xde, 0xdd, 0xc4, 0x76, - 0x6d, 0x0e, 0x94, 0x43, 0x6f, 0x9e, 0xf7, 0x79, 0xbf, 0xe7, 0xbd, 0xb7, 0x6f, 0x0c, 0x6e, 0x1c, - 0x6f, 0x33, 0xc3, 0x76, 0x2b, 0xd8, 0xb3, 0x2b, 0xd8, 0xe7, 0x4d, 0x97, 0xda, 0x5f, 0x63, 0x6e, - 0xbb, 0x4e, 0xa5, 0xb3, 0x51, 0x69, 0x10, 0x87, 0x50, 0xcc, 0x49, 0xdd, 0xf0, 0xa8, 0xcb, 0x5d, - 0xb8, 0x1a, 0x30, 0x1b, 0xd8, 0xb3, 0x8d, 0x18, 0xb3, 0xd1, 0xd9, 0x58, 0x79, 0xaf, 0x61, 0xf3, - 0xa6, 0x5f, 0x33, 0x2c, 0xb7, 0x5d, 0x69, 0xb8, 0x0d, 0xb7, 0x22, 0x65, 0x6a, 0xfe, 0x91, 0x3c, - 0xc9, 0x83, 0xfc, 0x15, 0xe8, 0x5a, 0xb9, 0x15, 0x1a, 0x6e, 0x63, 0xab, 0x69, 0x3b, 0x84, 0x9e, - 0x56, 0xbc, 0xe3, 0x86, 0x20, 0xb0, 0x4a, 0x9b, 0x70, 0x3c, 0xc4, 0x83, 0x95, 0xca, 0x28, 0x29, - 0xea, 0x3b, 0xdc, 0x6e, 0x93, 0x4b, 0x02, 0x77, 0x5e, 0x25, 0xc0, 0xac, 0x26, 0x69, 0xe3, 0x8b, - 0x72, 0xe5, 0x2d, 0x00, 0x76, 0x9e, 0x72, 0x8a, 0x0f, 0x71, 0xcb, 0x27, 0xb0, 0x04, 0x32, 0x36, - 0x27, 0x6d, 0xa6, 0x6b, 0x6b, 0xa9, 0xf5, 0x9c, 0x99, 0xeb, 0x75, 0x4b, 0x99, 0x5d, 0x41, 0x40, - 0x01, 0xfd, 0x6e, 0xf6, 0xbb, 0xef, 0x4b, 0x89, 0x67, 0xbf, 0xaf, 0x25, 0xca, 0xbf, 0x6a, 0x60, - 0xf9, 0x23, 0x9b, 0xb4, 0xea, 0xfb, 0xa4, 0x45, 0x2c, 0xee, 0xd2, 0x2a, 0xe7, 0xd4, 0xae, 0xf9, - 0x9c, 0x30, 0x78, 0x1b, 0xe4, 0x29, 0x3e, 0xe9, 0x03, 0xba, 0xb6, 0xa6, 0xad, 0xe7, 0xcc, 0xc5, - 0xb3, 0x6e, 0x29, 0xd1, 0xeb, 0x96, 0xf2, 0x28, 0x84, 0x50, 0x94, 0x0f, 0x3e, 0x05, 0x73, 0x94, - 0x3c, 0xf1, 0x6d, 0x4a, 0xda, 0xc4, 0xe1, 0x4c, 0x4f, 0xae, 0xa5, 0xd6, 0xf3, 0x9b, 0x1f, 0x18, - 0xe1, 0x6d, 0x0c, 0x42, 0x33, 0xbc, 0xe3, 0x86, 0x20, 0x30, 0x43, 0x64, 0xd0, 0xe8, 0x6c, 0x18, - 0x31, 0x5f, 0x50, 0xa8, 0xc6, 0xfc, 0xbf, 0xb2, 0x3b, 0x17, 0x21, 0x32, 0x14, 0xb3, 0x24, 0x83, - 0xd9, 0xc3, 0x35, 0xd2, 0xfa, 0x8f, 0x04, 0x13, 0xf3, 0x65, 0xda, 0x60, 0x7e, 0x4c, 0x02, 0x7d, - 0xcf, 0xb5, 0x70, 0x6b, 0xdf, 0xaf, 0x7d, 0x45, 0x2c, 0x5e, 0xb5, 0x2c, 0xc2, 0x18, 0x22, 0x1d, - 0x9b, 0x9c, 0xc0, 0x2f, 0x41, 0x56, 0x18, 0xa9, 0x63, 0x8e, 0x65, 0x28, 0xf9, 0xcd, 0xf7, 0x27, - 0x73, 0xe9, 0x13, 0xa9, 0xeb, 0x01, 0xe1, 0xd8, 0x84, 0xca, 0x09, 0x10, 0xd2, 0xd0, 0x40, 0x2b, - 0x3c, 0x04, 0x69, 0xe6, 0x11, 0x4b, 0x4f, 0x4a, 0xed, 0xb7, 0x8c, 0x31, 0xbd, 0x64, 0x0c, 0xf1, - 0x70, 0xdf, 0x23, 0x96, 0x39, 0xa7, 0x2c, 0xa4, 0xc5, 0x09, 0x49, 0x7d, 0xf0, 0x0b, 0x30, 0xc3, - 0x38, 0xe6, 0x3e, 0xd3, 0x53, 0x52, 0xf3, 0x9d, 0xa9, 0x35, 0x4b, 0x69, 0xf3, 0x7f, 0x4a, 0xf7, - 0x4c, 0x70, 0x46, 0x4a, 0x6b, 0xf9, 0x33, 0xb0, 0xf4, 0xd0, 0x75, 0x10, 0x61, 0xae, 0x4f, 0x2d, - 0x12, 0x29, 0x80, 0x35, 0x90, 0xf6, 0x30, 0x6f, 0xaa, 0x9b, 0x1f, 0xb8, 0xf6, 0x08, 0xf3, 0x26, - 0x92, 0x88, 0xe0, 0xe8, 0x10, 0x5a, 0x93, 0x21, 0x47, 0x38, 0x0e, 0x09, 0xad, 0x21, 0x89, 0x94, - 0x9f, 0x80, 0xf9, 0x88, 0x72, 0xe4, 0xb7, 0x64, 0xaf, 0x09, 0x28, 0xd6, 0x6b, 0x42, 0x82, 0xa1, - 0x80, 0x0e, 0xef, 0x81, 0x79, 0x27, 0x94, 0x39, 0x40, 0x7b, 0x41, 0x11, 0xe5, 0xcc, 0xc5, 0x5e, - 0xb7, 0x14, 0x55, 0x27, 0x20, 0x74, 0x91, 0xb7, 0xfc, 0x3c, 0x0d, 0xe0, 0x90, 0x68, 0x2a, 0x20, - 0xe7, 0xe0, 0x36, 0x61, 0x1e, 0xb6, 0x88, 0x0a, 0xe9, 0x8a, 0x72, 0x38, 0xf7, 0xb0, 0x0f, 0xa0, - 0x90, 0xe7, 0xd5, 0xc1, 0xc1, 0xb7, 0x41, 0xa6, 0x41, 0x5d, 0xdf, 0x93, 0x17, 0x93, 0x33, 0x0b, - 0x8a, 0x25, 0xf3, 0xb1, 0x20, 0xa2, 0x00, 0x83, 0xd7, 0xc1, 0x6c, 0x87, 0x50, 0x66, 0xbb, 0x8e, - 0x9e, 0x96, 0x6c, 0xf3, 0x8a, 0x6d, 0xf6, 0x30, 0x20, 0xa3, 0x3e, 0x0e, 0x6f, 0x82, 0x2c, 0x55, - 0x8e, 0xeb, 0x19, 0xc9, 0xbb, 0xa0, 0x78, 0xb3, 0x83, 0x0c, 0x0e, 0x38, 0x44, 0x7f, 0x32, 0xbf, - 0x36, 0x10, 0x98, 0x89, 0xf7, 0xe7, 0x7e, 0x08, 0xa1, 0x28, 0x9f, 0x08, 0x4b, 0xc4, 0xa8, 0xcf, - 0xc6, 0xc3, 0x12, 0x29, 0x40, 0x12, 0x81, 0x6d, 0x50, 0x38, 0x8a, 0x0e, 0x15, 0x3d, 0x3b, 0x41, - 0x45, 0x8f, 0x18, 0x89, 0xe6, 0x95, 0x5e, 0xb7, 0x54, 0x88, 0xcf, 0xa8, 0xb8, 0x76, 0x61, 0xae, - 0x15, 0x6d, 0x7b, 0x3d, 0x37, 0x81, 0xb9, 0x11, 0x43, 0x2b, 0x30, 0x17, 0x9f, 0x22, 0x71, 0xed, - 0xe5, 0x9f, 0x35, 0x30, 0x37, 0x5d, 0x3d, 0xde, 0x00, 0x39, 0xec, 0xd9, 0xf2, 0x52, 0xfb, 0x95, - 0x58, 0x10, 0x55, 0x53, 0x7d, 0xb4, 0x1b, 0x10, 0x51, 0x88, 0x0b, 0xe6, 0x7e, 0xaa, 0x45, 0xc3, - 0x0e, 0x98, 0xfb, 0x26, 0x19, 0x0a, 0x71, 0xb8, 0x05, 0x0a, 0xfd, 0x83, 0x2c, 0x41, 0x3d, 0x2d, - 0x05, 0x64, 0x10, 0x28, 0x0a, 0xa0, 0x38, 0x5f, 0xf9, 0xa7, 0x24, 0x58, 0xde, 0x27, 0xad, 0xa3, - 0xd7, 0x33, 0xe9, 0x1e, 0xc7, 0x26, 0xdd, 0xf6, 0xf8, 0x79, 0x34, 0xdc, 0xcb, 0xd7, 0x36, 0xed, - 0x9e, 0x27, 0xc1, 0xea, 0x18, 0x9f, 0xe0, 0x09, 0x80, 0xf4, 0xd2, 0xf0, 0x50, 0x79, 0xac, 0x8c, - 0xf5, 0xe5, 0xf2, 0xcc, 0x31, 0xaf, 0xf6, 0xba, 0xa5, 0x21, 0xb3, 0x08, 0x0d, 0x31, 0x01, 0xbf, - 0xd1, 0xc0, 0x92, 0x33, 0x6c, 0x0e, 0xab, 0x34, 0x6f, 0x8e, 0x35, 0x3e, 0x74, 0x82, 0x9b, 0xd7, - 0x7a, 0xdd, 0xd2, 0xf0, 0xe1, 0x8e, 0x86, 0xdb, 0x12, 0xdf, 0xd0, 0xab, 0x91, 0xf4, 0x88, 0x06, - 0xf9, 0xf7, 0xea, 0xea, 0xd3, 0x58, 0x5d, 0x6d, 0x4d, 0x5a, 0x57, 0x11, 0x27, 0x47, 0x96, 0xd5, - 0xe7, 0x17, 0xca, 0xea, 0xf6, 0x24, 0x65, 0x15, 0x55, 0x3c, 0xbe, 0xaa, 0x1e, 0x80, 0x95, 0xd1, - 0x0e, 0x4d, 0xfd, 0xe9, 0x29, 0xff, 0x90, 0x04, 0x8b, 0x6f, 0x96, 0x98, 0x69, 0xda, 0xfa, 0x97, - 0x34, 0x58, 0x7e, 0xd3, 0xd2, 0xa3, 0xd6, 0x38, 0x9f, 0x11, 0xaa, 0x96, 0x94, 0xc1, 0xe5, 0x1c, - 0x30, 0x42, 0x91, 0x44, 0x60, 0x19, 0xcc, 0x34, 0x82, 0xaf, 0x5b, 0xf0, 0xfd, 0x01, 0x22, 0xc1, - 0xea, 0xd3, 0xa6, 0x10, 0x58, 0x07, 0x19, 0x22, 0xde, 0x4b, 0x7a, 0x46, 0xee, 0xf3, 0x1f, 0xfe, - 0x93, 0xca, 0x30, 0xe4, 0x8b, 0x6b, 0xc7, 0xe1, 0xf4, 0x34, 0x5c, 0x96, 0x24, 0x0d, 0x05, 0xca, - 0xe1, 0x5b, 0x20, 0xe5, 0xdb, 0x75, 0xb5, 0xcb, 0xe4, 0x15, 0x4b, 0xea, 0x60, 0xf7, 0x3e, 0x12, - 0xf4, 0x15, 0xac, 0x1e, 0x6d, 0x52, 0x05, 0x5c, 0x00, 0xa9, 0x63, 0x72, 0x1a, 0x34, 0x14, 0x12, - 0x3f, 0xe1, 0x3d, 0x90, 0xe9, 0x88, 0xf7, 0x9c, 0xca, 0xef, 0xbb, 0x63, 0x9d, 0x0c, 0x9f, 0x7f, - 0x28, 0x90, 0xba, 0x9b, 0xdc, 0xd6, 0xca, 0xbf, 0x69, 0xe0, 0xda, 0xc8, 0xf2, 0x13, 0xcb, 0x1c, - 0x6e, 0xb5, 0xdc, 0x13, 0x52, 0x97, 0x66, 0xb3, 0xe1, 0x32, 0x57, 0x0d, 0xc8, 0xa8, 0x8f, 0xc3, - 0x77, 0xc0, 0x4c, 0x9d, 0x38, 0x36, 0xa9, 0xcb, 0xb5, 0x2f, 0x1b, 0x56, 0xee, 0x7d, 0x49, 0x45, - 0x0a, 0x15, 0x7c, 0x94, 0x60, 0xe6, 0x3a, 0x6a, 0xd1, 0x1c, 0xf0, 0x21, 0x49, 0x45, 0x0a, 0x85, - 0x55, 0x30, 0x4f, 0x84, 0x9b, 0xd2, 0xff, 0x1d, 0x4a, 0xdd, 0xfe, 0x8d, 0x2e, 0x2b, 0x81, 0xf9, - 0x9d, 0x38, 0x8c, 0x2e, 0xf2, 0x97, 0xff, 0x4a, 0x02, 0x7d, 0xd4, 0x68, 0x83, 0x47, 0xe1, 0x2e, - 0x22, 0x41, 0xb9, 0x0e, 0xe5, 0x37, 0xaf, 0x4f, 0xd4, 0x20, 0x42, 0xc2, 0x5c, 0x52, 0x8e, 0x14, - 0xa2, 0xd4, 0xc8, 0xea, 0x22, 0x8f, 0x90, 0x82, 0x05, 0x27, 0xfe, 0x22, 0xe8, 0xbf, 0x11, 0x6f, - 0x4e, 0xda, 0x0e, 0xd2, 0x9a, 0xae, 0xac, 0x2d, 0x5c, 0x00, 0x18, 0xba, 0xa4, 0x1f, 0x6e, 0x02, - 0x60, 0x3b, 0x96, 0xdb, 0xf6, 0x5a, 0x84, 0x13, 0x99, 0xb6, 0x6c, 0x38, 0x07, 0x77, 0x07, 0x08, - 0x8a, 0x70, 0x0d, 0xcb, 0x77, 0x7a, 0xba, 0x7c, 0x9b, 0xd5, 0xb3, 0xf3, 0x62, 0xe2, 0xc5, 0x79, - 0x31, 0xf1, 0xf2, 0xbc, 0x98, 0x78, 0xd6, 0x2b, 0x6a, 0x67, 0xbd, 0xa2, 0xf6, 0xa2, 0x57, 0xd4, - 0x5e, 0xf6, 0x8a, 0xda, 0x1f, 0xbd, 0xa2, 0xf6, 0xed, 0x9f, 0xc5, 0xc4, 0xe3, 0xd5, 0x31, 0xff, - 0xd0, 0xfc, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x8c, 0x77, 0x0f, 0xbf, 0x11, 0x00, 0x00, -} +func (m *SubjectRulesReviewStatus) Reset() { *m = SubjectRulesReviewStatus{} } func (m ExtraValue) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -1247,7 +712,7 @@ func (m *SubjectAccessReviewSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) for k := range m.Extra { keysForExtra = append(keysForExtra, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + sort.Strings(keysForExtra) for iNdEx := len(keysForExtra) - 1; iNdEx >= 0; iNdEx-- { v := m.Extra[string(keysForExtra[iNdEx])] baseI := i @@ -1914,7 +1379,7 @@ func (this *SubjectAccessReviewSpec) String() string { for k := range this.Extra { keysForExtra = append(keysForExtra, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + sort.Strings(keysForExtra) mapStringForExtra := "map[string]ExtraValue{" for _, k := range keysForExtra { mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k]) diff --git a/staging/src/k8s.io/api/authorization/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/authorization/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..dc1e1028c00c8 --- /dev/null +++ b/staging/src/k8s.io/api/authorization/v1/generated.protomessage.pb.go @@ -0,0 +1,54 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*ExtraValue) ProtoMessage() {} + +func (*FieldSelectorAttributes) ProtoMessage() {} + +func (*LabelSelectorAttributes) ProtoMessage() {} + +func (*LocalSubjectAccessReview) ProtoMessage() {} + +func (*NonResourceAttributes) ProtoMessage() {} + +func (*NonResourceRule) ProtoMessage() {} + +func (*ResourceAttributes) ProtoMessage() {} + +func (*ResourceRule) ProtoMessage() {} + +func (*SelfSubjectAccessReview) ProtoMessage() {} + +func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} + +func (*SelfSubjectRulesReview) ProtoMessage() {} + +func (*SelfSubjectRulesReviewSpec) ProtoMessage() {} + +func (*SubjectAccessReview) ProtoMessage() {} + +func (*SubjectAccessReviewSpec) ProtoMessage() {} + +func (*SubjectAccessReviewStatus) ProtoMessage() {} + +func (*SubjectRulesReviewStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/authorization/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/authorization/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..43e3b62eb0872 --- /dev/null +++ b/staging/src/k8s.io/api/authorization/v1/zz_generated.model_name.go @@ -0,0 +1,97 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FieldSelectorAttributes) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1.FieldSelectorAttributes" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LabelSelectorAttributes) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1.LabelSelectorAttributes" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LocalSubjectAccessReview) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1.LocalSubjectAccessReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NonResourceAttributes) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1.NonResourceAttributes" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NonResourceRule) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1.NonResourceRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceAttributes) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1.ResourceAttributes" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceRule) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1.ResourceRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelfSubjectAccessReview) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1.SelfSubjectAccessReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelfSubjectAccessReviewSpec) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1.SelfSubjectAccessReviewSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelfSubjectRulesReview) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1.SelfSubjectRulesReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelfSubjectRulesReviewSpec) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1.SelfSubjectRulesReviewSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SubjectAccessReview) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1.SubjectAccessReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SubjectAccessReviewSpec) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1.SubjectAccessReviewSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SubjectAccessReviewStatus) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1.SubjectAccessReviewStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SubjectRulesReviewStatus) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1.SubjectRulesReviewStatus" +} diff --git a/staging/src/k8s.io/api/authorization/v1beta1/doc.go b/staging/src/k8s.io/api/authorization/v1beta1/doc.go index 9f7332d493c0e..8937d1c157a3a 100644 --- a/staging/src/k8s.io/api/authorization/v1beta1/doc.go +++ b/staging/src/k8s.io/api/authorization/v1beta1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.authorization.v1beta1 // +groupName=authorization.k8s.io diff --git a/staging/src/k8s.io/api/authorization/v1beta1/generated.pb.go b/staging/src/k8s.io/api/authorization/v1beta1/generated.pb.go index 5007d1b4963ca..9578cfec44e26 100644 --- a/staging/src/k8s.io/api/authorization/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/authorization/v1beta1/generated.pb.go @@ -23,520 +23,42 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v11 "k8s.io/api/authorization/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ExtraValue) Reset() { *m = ExtraValue{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} } -func (m *ExtraValue) Reset() { *m = ExtraValue{} } -func (*ExtraValue) ProtoMessage() {} -func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_8eab727787743457, []int{0} -} -func (m *ExtraValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExtraValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExtraValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtraValue.Merge(m, src) -} -func (m *ExtraValue) XXX_Size() int { - return m.Size() -} -func (m *ExtraValue) XXX_DiscardUnknown() { - xxx_messageInfo_ExtraValue.DiscardUnknown(m) -} - -var xxx_messageInfo_ExtraValue proto.InternalMessageInfo - -func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} } -func (*LocalSubjectAccessReview) ProtoMessage() {} -func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_8eab727787743457, []int{1} -} -func (m *LocalSubjectAccessReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LocalSubjectAccessReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LocalSubjectAccessReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_LocalSubjectAccessReview.Merge(m, src) -} -func (m *LocalSubjectAccessReview) XXX_Size() int { - return m.Size() -} -func (m *LocalSubjectAccessReview) XXX_DiscardUnknown() { - xxx_messageInfo_LocalSubjectAccessReview.DiscardUnknown(m) -} - -var xxx_messageInfo_LocalSubjectAccessReview proto.InternalMessageInfo - -func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} } -func (*NonResourceAttributes) ProtoMessage() {} -func (*NonResourceAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_8eab727787743457, []int{2} -} -func (m *NonResourceAttributes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NonResourceAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NonResourceAttributes) XXX_Merge(src proto.Message) { - xxx_messageInfo_NonResourceAttributes.Merge(m, src) -} -func (m *NonResourceAttributes) XXX_Size() int { - return m.Size() -} -func (m *NonResourceAttributes) XXX_DiscardUnknown() { - xxx_messageInfo_NonResourceAttributes.DiscardUnknown(m) -} - -var xxx_messageInfo_NonResourceAttributes proto.InternalMessageInfo - -func (m *NonResourceRule) Reset() { *m = NonResourceRule{} } -func (*NonResourceRule) ProtoMessage() {} -func (*NonResourceRule) Descriptor() ([]byte, []int) { - return fileDescriptor_8eab727787743457, []int{3} -} -func (m *NonResourceRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NonResourceRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NonResourceRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_NonResourceRule.Merge(m, src) -} -func (m *NonResourceRule) XXX_Size() int { - return m.Size() -} -func (m *NonResourceRule) XXX_DiscardUnknown() { - xxx_messageInfo_NonResourceRule.DiscardUnknown(m) -} - -var xxx_messageInfo_NonResourceRule proto.InternalMessageInfo - -func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} } -func (*ResourceAttributes) ProtoMessage() {} -func (*ResourceAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_8eab727787743457, []int{4} -} -func (m *ResourceAttributes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceAttributes) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceAttributes.Merge(m, src) -} -func (m *ResourceAttributes) XXX_Size() int { - return m.Size() -} -func (m *ResourceAttributes) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceAttributes.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceAttributes proto.InternalMessageInfo - -func (m *ResourceRule) Reset() { *m = ResourceRule{} } -func (*ResourceRule) ProtoMessage() {} -func (*ResourceRule) Descriptor() ([]byte, []int) { - return fileDescriptor_8eab727787743457, []int{5} -} -func (m *ResourceRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceRule.Merge(m, src) -} -func (m *ResourceRule) XXX_Size() int { - return m.Size() -} -func (m *ResourceRule) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceRule.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceRule proto.InternalMessageInfo - -func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } -func (*SelfSubjectAccessReview) ProtoMessage() {} -func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_8eab727787743457, []int{6} -} -func (m *SelfSubjectAccessReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelfSubjectAccessReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelfSubjectAccessReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelfSubjectAccessReview.Merge(m, src) -} -func (m *SelfSubjectAccessReview) XXX_Size() int { - return m.Size() -} -func (m *SelfSubjectAccessReview) XXX_DiscardUnknown() { - xxx_messageInfo_SelfSubjectAccessReview.DiscardUnknown(m) -} - -var xxx_messageInfo_SelfSubjectAccessReview proto.InternalMessageInfo +func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} } -func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } -func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} -func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_8eab727787743457, []int{7} -} -func (m *SelfSubjectAccessReviewSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelfSubjectAccessReviewSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelfSubjectAccessReviewSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelfSubjectAccessReviewSpec.Merge(m, src) -} -func (m *SelfSubjectAccessReviewSpec) XXX_Size() int { - return m.Size() -} -func (m *SelfSubjectAccessReviewSpec) XXX_DiscardUnknown() { - xxx_messageInfo_SelfSubjectAccessReviewSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_SelfSubjectAccessReviewSpec proto.InternalMessageInfo - -func (m *SelfSubjectRulesReview) Reset() { *m = SelfSubjectRulesReview{} } -func (*SelfSubjectRulesReview) ProtoMessage() {} -func (*SelfSubjectRulesReview) Descriptor() ([]byte, []int) { - return fileDescriptor_8eab727787743457, []int{8} -} -func (m *SelfSubjectRulesReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelfSubjectRulesReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelfSubjectRulesReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelfSubjectRulesReview.Merge(m, src) -} -func (m *SelfSubjectRulesReview) XXX_Size() int { - return m.Size() -} -func (m *SelfSubjectRulesReview) XXX_DiscardUnknown() { - xxx_messageInfo_SelfSubjectRulesReview.DiscardUnknown(m) -} - -var xxx_messageInfo_SelfSubjectRulesReview proto.InternalMessageInfo - -func (m *SelfSubjectRulesReviewSpec) Reset() { *m = SelfSubjectRulesReviewSpec{} } -func (*SelfSubjectRulesReviewSpec) ProtoMessage() {} -func (*SelfSubjectRulesReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_8eab727787743457, []int{9} -} -func (m *SelfSubjectRulesReviewSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelfSubjectRulesReviewSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelfSubjectRulesReviewSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelfSubjectRulesReviewSpec.Merge(m, src) -} -func (m *SelfSubjectRulesReviewSpec) XXX_Size() int { - return m.Size() -} -func (m *SelfSubjectRulesReviewSpec) XXX_DiscardUnknown() { - xxx_messageInfo_SelfSubjectRulesReviewSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_SelfSubjectRulesReviewSpec proto.InternalMessageInfo - -func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} } -func (*SubjectAccessReview) ProtoMessage() {} -func (*SubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_8eab727787743457, []int{10} -} -func (m *SubjectAccessReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SubjectAccessReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SubjectAccessReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubjectAccessReview.Merge(m, src) -} -func (m *SubjectAccessReview) XXX_Size() int { - return m.Size() -} -func (m *SubjectAccessReview) XXX_DiscardUnknown() { - xxx_messageInfo_SubjectAccessReview.DiscardUnknown(m) -} +func (m *NonResourceRule) Reset() { *m = NonResourceRule{} } -var xxx_messageInfo_SubjectAccessReview proto.InternalMessageInfo +func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} } -func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} } -func (*SubjectAccessReviewSpec) ProtoMessage() {} -func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_8eab727787743457, []int{11} -} -func (m *SubjectAccessReviewSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SubjectAccessReviewSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SubjectAccessReviewSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubjectAccessReviewSpec.Merge(m, src) -} -func (m *SubjectAccessReviewSpec) XXX_Size() int { - return m.Size() -} -func (m *SubjectAccessReviewSpec) XXX_DiscardUnknown() { - xxx_messageInfo_SubjectAccessReviewSpec.DiscardUnknown(m) -} +func (m *ResourceRule) Reset() { *m = ResourceRule{} } -var xxx_messageInfo_SubjectAccessReviewSpec proto.InternalMessageInfo +func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } -func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} } -func (*SubjectAccessReviewStatus) ProtoMessage() {} -func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_8eab727787743457, []int{12} -} -func (m *SubjectAccessReviewStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SubjectAccessReviewStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SubjectAccessReviewStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubjectAccessReviewStatus.Merge(m, src) -} -func (m *SubjectAccessReviewStatus) XXX_Size() int { - return m.Size() -} -func (m *SubjectAccessReviewStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SubjectAccessReviewStatus.DiscardUnknown(m) -} +func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } -var xxx_messageInfo_SubjectAccessReviewStatus proto.InternalMessageInfo +func (m *SelfSubjectRulesReview) Reset() { *m = SelfSubjectRulesReview{} } -func (m *SubjectRulesReviewStatus) Reset() { *m = SubjectRulesReviewStatus{} } -func (*SubjectRulesReviewStatus) ProtoMessage() {} -func (*SubjectRulesReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_8eab727787743457, []int{13} -} -func (m *SubjectRulesReviewStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SubjectRulesReviewStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SubjectRulesReviewStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubjectRulesReviewStatus.Merge(m, src) -} -func (m *SubjectRulesReviewStatus) XXX_Size() int { - return m.Size() -} -func (m *SubjectRulesReviewStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SubjectRulesReviewStatus.DiscardUnknown(m) -} +func (m *SelfSubjectRulesReviewSpec) Reset() { *m = SelfSubjectRulesReviewSpec{} } -var xxx_messageInfo_SubjectRulesReviewStatus proto.InternalMessageInfo +func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} } -func init() { - proto.RegisterType((*ExtraValue)(nil), "k8s.io.api.authorization.v1beta1.ExtraValue") - proto.RegisterType((*LocalSubjectAccessReview)(nil), "k8s.io.api.authorization.v1beta1.LocalSubjectAccessReview") - proto.RegisterType((*NonResourceAttributes)(nil), "k8s.io.api.authorization.v1beta1.NonResourceAttributes") - proto.RegisterType((*NonResourceRule)(nil), "k8s.io.api.authorization.v1beta1.NonResourceRule") - proto.RegisterType((*ResourceAttributes)(nil), "k8s.io.api.authorization.v1beta1.ResourceAttributes") - proto.RegisterType((*ResourceRule)(nil), "k8s.io.api.authorization.v1beta1.ResourceRule") - proto.RegisterType((*SelfSubjectAccessReview)(nil), "k8s.io.api.authorization.v1beta1.SelfSubjectAccessReview") - proto.RegisterType((*SelfSubjectAccessReviewSpec)(nil), "k8s.io.api.authorization.v1beta1.SelfSubjectAccessReviewSpec") - proto.RegisterType((*SelfSubjectRulesReview)(nil), "k8s.io.api.authorization.v1beta1.SelfSubjectRulesReview") - proto.RegisterType((*SelfSubjectRulesReviewSpec)(nil), "k8s.io.api.authorization.v1beta1.SelfSubjectRulesReviewSpec") - proto.RegisterType((*SubjectAccessReview)(nil), "k8s.io.api.authorization.v1beta1.SubjectAccessReview") - proto.RegisterType((*SubjectAccessReviewSpec)(nil), "k8s.io.api.authorization.v1beta1.SubjectAccessReviewSpec") - proto.RegisterMapType((map[string]ExtraValue)(nil), "k8s.io.api.authorization.v1beta1.SubjectAccessReviewSpec.ExtraEntry") - proto.RegisterType((*SubjectAccessReviewStatus)(nil), "k8s.io.api.authorization.v1beta1.SubjectAccessReviewStatus") - proto.RegisterType((*SubjectRulesReviewStatus)(nil), "k8s.io.api.authorization.v1beta1.SubjectRulesReviewStatus") -} +func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} } -func init() { - proto.RegisterFile("k8s.io/api/authorization/v1beta1/generated.proto", fileDescriptor_8eab727787743457) -} +func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} } -var fileDescriptor_8eab727787743457 = []byte{ - // 1192 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0x8f, 0xf3, 0xa7, 0x4d, 0x26, 0x1b, 0xda, 0x9d, 0xaa, 0x5b, 0x6f, 0x11, 0x49, 0x14, 0x24, - 0x54, 0xb4, 0x8b, 0xb3, 0xad, 0x0a, 0x5d, 0x0a, 0x7b, 0xa8, 0xd5, 0x2e, 0xaa, 0xd4, 0x5d, 0x56, - 0x53, 0xb5, 0x07, 0x56, 0x02, 0x26, 0xce, 0x34, 0x31, 0x75, 0x6c, 0xe3, 0x19, 0xa7, 0x14, 0x71, - 0xd8, 0x23, 0x47, 0x8e, 0x1c, 0x38, 0x70, 0xe2, 0x3b, 0x70, 0x41, 0x82, 0x53, 0x8f, 0x7b, 0x2c, - 0x12, 0x8a, 0xa8, 0xf9, 0x10, 0x5c, 0xd1, 0x8c, 0x27, 0xb1, 0x9d, 0xba, 0x4d, 0xdb, 0x03, 0x7b, - 0xd9, 0x5b, 0xe6, 0xfd, 0x7e, 0xef, 0xcf, 0xbc, 0x79, 0xf3, 0xfc, 0x26, 0xe0, 0xc1, 0xe1, 0x43, - 0xaa, 0x99, 0x4e, 0x13, 0xbb, 0x66, 0x13, 0xfb, 0xac, 0xeb, 0x78, 0xe6, 0xb7, 0x98, 0x99, 0x8e, - 0xdd, 0xec, 0x2f, 0xb7, 0x08, 0xc3, 0xcb, 0xcd, 0x0e, 0xb1, 0x89, 0x87, 0x19, 0x69, 0x6b, 0xae, - 0xe7, 0x30, 0x07, 0xd6, 0x43, 0x0d, 0x0d, 0xbb, 0xa6, 0x96, 0xd0, 0xd0, 0xa4, 0xc6, 0xe2, 0x7b, - 0x1d, 0x93, 0x75, 0xfd, 0x96, 0x66, 0x38, 0xbd, 0x66, 0xc7, 0xe9, 0x38, 0x4d, 0xa1, 0xd8, 0xf2, - 0x0f, 0xc4, 0x4a, 0x2c, 0xc4, 0xaf, 0xd0, 0xe0, 0xe2, 0xbd, 0x4b, 0x42, 0x18, 0xf7, 0xbe, 0xb8, - 0x1a, 0x91, 0x7b, 0xd8, 0xe8, 0x9a, 0x36, 0xf1, 0x8e, 0x9b, 0xee, 0x61, 0x87, 0x0b, 0x68, 0xb3, - 0x47, 0x18, 0x4e, 0xd3, 0x6a, 0x5e, 0xa4, 0xe5, 0xf9, 0x36, 0x33, 0x7b, 0xe4, 0x9c, 0xc2, 0x07, - 0x93, 0x14, 0xa8, 0xd1, 0x25, 0x3d, 0x3c, 0xae, 0xd7, 0x58, 0x03, 0x60, 0xeb, 0x1b, 0xe6, 0xe1, - 0x7d, 0x6c, 0xf9, 0x04, 0xd6, 0x40, 0xc1, 0x64, 0xa4, 0x47, 0x55, 0xa5, 0x9e, 0x5b, 0x2a, 0xe9, - 0xa5, 0x60, 0x50, 0x2b, 0x6c, 0x73, 0x01, 0x0a, 0xe5, 0xeb, 0xc5, 0x1f, 0x7f, 0xae, 0x65, 0x5e, - 0xfc, 0x55, 0xcf, 0x34, 0x7e, 0xcb, 0x02, 0x75, 0xc7, 0x31, 0xb0, 0xb5, 0xeb, 0xb7, 0xbe, 0x22, - 0x06, 0xdb, 0x30, 0x0c, 0x42, 0x29, 0x22, 0x7d, 0x93, 0x1c, 0xc1, 0x2f, 0x41, 0x91, 0xef, 0xac, - 0x8d, 0x19, 0x56, 0x95, 0xba, 0xb2, 0x54, 0x5e, 0x79, 0xa0, 0x45, 0xa7, 0x30, 0x0a, 0x50, 0x73, - 0x0f, 0x3b, 0x5c, 0x40, 0x35, 0xce, 0xd6, 0xfa, 0xcb, 0xda, 0xa7, 0xc2, 0xd6, 0x13, 0xc2, 0xb0, - 0x0e, 0x4f, 0x06, 0xb5, 0x4c, 0x30, 0xa8, 0x81, 0x48, 0x86, 0x46, 0x56, 0xe1, 0x73, 0x90, 0xa7, - 0x2e, 0x31, 0xd4, 0xac, 0xb0, 0xfe, 0xa1, 0x36, 0xe9, 0x8c, 0xb5, 0x94, 0x30, 0x77, 0x5d, 0x62, - 0xe8, 0xb7, 0xa4, 0x9b, 0x3c, 0x5f, 0x21, 0x61, 0x14, 0x1a, 0x60, 0x8a, 0x32, 0xcc, 0x7c, 0xaa, - 0xe6, 0x84, 0xf9, 0x8f, 0x6e, 0x66, 0x5e, 0x98, 0xd0, 0xdf, 0x90, 0x0e, 0xa6, 0xc2, 0x35, 0x92, - 0xa6, 0x1b, 0xcf, 0xc1, 0xfc, 0x53, 0xc7, 0x46, 0x84, 0x3a, 0xbe, 0x67, 0x90, 0x0d, 0xc6, 0x3c, - 0xb3, 0xe5, 0x33, 0x42, 0x61, 0x1d, 0xe4, 0x5d, 0xcc, 0xba, 0x22, 0x71, 0xa5, 0x28, 0xbe, 0x67, - 0x98, 0x75, 0x91, 0x40, 0x38, 0xa3, 0x4f, 0xbc, 0x96, 0xd8, 0x7c, 0x8c, 0xb1, 0x4f, 0xbc, 0x16, - 0x12, 0x48, 0xe3, 0x6b, 0x30, 0x13, 0x33, 0x8e, 0x7c, 0x4b, 0x9c, 0x2d, 0x87, 0x12, 0x67, 0xcb, - 0x35, 0x28, 0x0a, 0xe5, 0xf0, 0x11, 0x98, 0xb1, 0x23, 0x9d, 0x3d, 0xb4, 0x43, 0xd5, 0xac, 0xa0, - 0xce, 0x05, 0x83, 0x5a, 0xdc, 0x1c, 0x87, 0xd0, 0x38, 0xb7, 0xf1, 0x53, 0x1e, 0xc0, 0x94, 0xdd, - 0x34, 0x41, 0xc9, 0xc6, 0x3d, 0x42, 0x5d, 0x6c, 0x10, 0xb9, 0xa5, 0xdb, 0x32, 0xe0, 0xd2, 0xd3, - 0x21, 0x80, 0x22, 0xce, 0xe4, 0xcd, 0xc1, 0xb7, 0x41, 0xa1, 0xe3, 0x39, 0xbe, 0x2b, 0x4e, 0xa7, - 0xa4, 0x57, 0x24, 0xa5, 0xf0, 0x09, 0x17, 0xa2, 0x10, 0x83, 0xef, 0x82, 0xe9, 0x3e, 0xf1, 0xa8, - 0xe9, 0xd8, 0x6a, 0x5e, 0xd0, 0x66, 0x24, 0x6d, 0x7a, 0x3f, 0x14, 0xa3, 0x21, 0x0e, 0xef, 0x83, - 0xa2, 0x27, 0x03, 0x57, 0x0b, 0x82, 0x3b, 0x2b, 0xb9, 0xc5, 0x51, 0x06, 0x47, 0x0c, 0xf8, 0x3e, - 0x28, 0x53, 0xbf, 0x35, 0x52, 0x98, 0x12, 0x0a, 0x73, 0x52, 0xa1, 0xbc, 0x1b, 0x41, 0x28, 0xce, - 0xe3, 0xdb, 0xe2, 0x7b, 0x54, 0xa7, 0x93, 0xdb, 0xe2, 0x29, 0x40, 0x02, 0x81, 0x3d, 0x50, 0x39, - 0x30, 0x89, 0xd5, 0xde, 0x25, 0x16, 0x31, 0x98, 0xe3, 0xa9, 0x45, 0x51, 0x7c, 0xab, 0x97, 0x15, - 0x9f, 0xf6, 0x38, 0xae, 0x11, 0xa5, 0x5d, 0xbf, 0x1d, 0x0c, 0x6a, 0x95, 0x04, 0x88, 0x92, 0xd6, - 0xb9, 0x3b, 0x0b, 0xb7, 0x88, 0x35, 0x72, 0x57, 0xba, 0x82, 0xbb, 0x9d, 0xb8, 0xc6, 0xb8, 0xbb, - 0x04, 0x88, 0x92, 0xd6, 0x1b, 0x7f, 0x28, 0xe0, 0xd6, 0xf5, 0xea, 0xf1, 0x1e, 0x28, 0x61, 0xd7, - 0x14, 0x87, 0x3a, 0xac, 0xc4, 0x0a, 0xaf, 0x9a, 0x8d, 0x67, 0xdb, 0xa1, 0x10, 0x45, 0x38, 0x27, - 0x0f, 0x53, 0xcd, 0x6f, 0xed, 0x88, 0x3c, 0x74, 0x49, 0x51, 0x84, 0xc3, 0x35, 0x50, 0x19, 0x2e, - 0x44, 0x09, 0xaa, 0x79, 0xa1, 0x20, 0x36, 0x81, 0xe2, 0x00, 0x4a, 0xf2, 0x1a, 0xbf, 0x67, 0xc1, - 0xc2, 0x2e, 0xb1, 0x0e, 0x5e, 0x4d, 0xcf, 0xfb, 0x22, 0xd1, 0xf3, 0x1e, 0x5d, 0xa1, 0x29, 0xa5, - 0x87, 0xfa, 0x6a, 0xfb, 0xde, 0x2f, 0x59, 0xf0, 0xe6, 0x25, 0x81, 0xc1, 0xef, 0x00, 0xf4, 0xce, - 0xb5, 0x11, 0x99, 0xd1, 0xd5, 0xc9, 0x01, 0x9d, 0x6f, 0x41, 0xfa, 0x9d, 0x60, 0x50, 0x4b, 0x69, - 0x4d, 0x28, 0xc5, 0x0f, 0xfc, 0x5e, 0x01, 0xf3, 0x76, 0x5a, 0x5b, 0x96, 0x59, 0x5f, 0x9b, 0x1c, - 0x41, 0x6a, 0x57, 0xd7, 0xef, 0x06, 0x83, 0x5a, 0x7a, 0xc3, 0x47, 0xe9, 0x0e, 0xf9, 0x17, 0xf6, - 0x4e, 0x2c, 0x51, 0xfc, 0xd2, 0xfc, 0x7f, 0xb5, 0xf6, 0x79, 0xa2, 0xd6, 0x3e, 0xbe, 0x56, 0xad, - 0xc5, 0x22, 0xbd, 0xb0, 0xd4, 0x5a, 0x63, 0xa5, 0xb6, 0x7e, 0xe5, 0x52, 0x8b, 0x5b, 0xbf, 0xbc, - 0xd2, 0x9e, 0x80, 0xc5, 0x8b, 0xa3, 0xba, 0xf6, 0x87, 0xa9, 0xf1, 0x6b, 0x16, 0xcc, 0xbd, 0x1e, - 0x76, 0x6e, 0x76, 0xe9, 0x4f, 0xf3, 0x60, 0xe1, 0xf5, 0x85, 0xbf, 0xfc, 0xc2, 0xf3, 0x11, 0xc1, - 0xa7, 0xc4, 0x93, 0x63, 0xcd, 0xe8, 0xac, 0xf6, 0x28, 0xf1, 0x90, 0x40, 0x60, 0x7d, 0x38, 0xf9, - 0x84, 0x1f, 0x2c, 0xc0, 0x33, 0x2d, 0xbf, 0x85, 0x72, 0xec, 0x31, 0x41, 0x81, 0xf0, 0x79, 0x5e, - 0x2d, 0xd4, 0x73, 0x4b, 0xe5, 0x95, 0xcd, 0x1b, 0xd7, 0x8a, 0x26, 0x9e, 0x05, 0x5b, 0x36, 0xf3, - 0x8e, 0xa3, 0x09, 0x4b, 0xc8, 0x50, 0xe8, 0x01, 0xbe, 0x05, 0x72, 0xbe, 0xd9, 0x96, 0x03, 0x50, - 0x59, 0x52, 0x72, 0x7b, 0xdb, 0x9b, 0x88, 0xcb, 0x17, 0x0f, 0xe4, 0xcb, 0x42, 0x98, 0x80, 0xb3, - 0x20, 0x77, 0x48, 0x8e, 0xc3, 0x7b, 0x86, 0xf8, 0x4f, 0xa8, 0x83, 0x42, 0x9f, 0x3f, 0x3a, 0x64, - 0x9e, 0xef, 0x4f, 0x8e, 0x34, 0x7a, 0xa8, 0xa0, 0x50, 0x75, 0x3d, 0xfb, 0x50, 0x69, 0xfc, 0xa9, - 0x80, 0xbb, 0x17, 0x16, 0x24, 0x1f, 0x03, 0xb1, 0x65, 0x39, 0x47, 0xa4, 0x2d, 0x7c, 0x17, 0xa3, - 0x31, 0x70, 0x23, 0x14, 0xa3, 0x21, 0x0e, 0xdf, 0x01, 0x53, 0x6d, 0x62, 0x9b, 0xa4, 0x2d, 0x06, - 0xc6, 0x62, 0x54, 0xcb, 0x9b, 0x42, 0x8a, 0x24, 0xca, 0x79, 0x1e, 0xc1, 0xd4, 0xb1, 0xe5, 0x88, - 0x3a, 0xe2, 0x21, 0x21, 0x45, 0x12, 0x85, 0x1b, 0x60, 0x86, 0xf0, 0x30, 0xc5, 0x26, 0xb6, 0x3c, - 0xcf, 0x19, 0x9e, 0xec, 0x82, 0x54, 0x98, 0xd9, 0x4a, 0xc2, 0x68, 0x9c, 0xdf, 0xf8, 0x37, 0x0b, - 0xd4, 0x8b, 0xda, 0x1e, 0x3c, 0x8c, 0xa6, 0x18, 0x01, 0x8a, 0x41, 0xaa, 0xbc, 0xa2, 0x5d, 0xfd, - 0xca, 0x70, 0x35, 0x7d, 0x5e, 0x46, 0x53, 0x89, 0x4b, 0x63, 0x93, 0x8f, 0x58, 0xc2, 0x23, 0x30, - 0x6b, 0x27, 0x1f, 0x14, 0xe1, 0x4c, 0x56, 0x5e, 0x59, 0xbe, 0xd6, 0x05, 0x11, 0x2e, 0x55, 0xe9, - 0x72, 0x76, 0x0c, 0xa0, 0xe8, 0x9c, 0x13, 0xb8, 0x02, 0x80, 0x69, 0x1b, 0x4e, 0xcf, 0xb5, 0x08, - 0x23, 0x22, 0x81, 0xc5, 0xa8, 0x5b, 0x6e, 0x8f, 0x10, 0x14, 0x63, 0xa5, 0x65, 0x3e, 0x7f, 0xbd, - 0xcc, 0xeb, 0x8f, 0x4f, 0xce, 0xaa, 0x99, 0x97, 0x67, 0xd5, 0xcc, 0xe9, 0x59, 0x35, 0xf3, 0x22, - 0xa8, 0x2a, 0x27, 0x41, 0x55, 0x79, 0x19, 0x54, 0x95, 0xd3, 0xa0, 0xaa, 0xfc, 0x1d, 0x54, 0x95, - 0x1f, 0xfe, 0xa9, 0x66, 0x3e, 0xab, 0x4f, 0xfa, 0x33, 0xe2, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x46, 0xf7, 0xe0, 0x3d, 0xaf, 0x10, 0x00, 0x00, -} +func (m *SubjectRulesReviewStatus) Reset() { *m = SubjectRulesReviewStatus{} } func (m ExtraValue) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -1102,7 +624,7 @@ func (m *SubjectAccessReviewSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) for k := range m.Extra { keysForExtra = append(keysForExtra, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + sort.Strings(keysForExtra) for iNdEx := len(keysForExtra) - 1; iNdEx >= 0; iNdEx-- { v := m.Extra[string(keysForExtra[iNdEx])] baseI := i @@ -1703,7 +1225,7 @@ func (this *SubjectAccessReviewSpec) String() string { for k := range this.Extra { keysForExtra = append(keysForExtra, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + sort.Strings(keysForExtra) mapStringForExtra := "map[string]ExtraValue{" for _, k := range keysForExtra { mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k]) diff --git a/staging/src/k8s.io/api/authorization/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/authorization/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..69af1b6c93050 --- /dev/null +++ b/staging/src/k8s.io/api/authorization/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,50 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*ExtraValue) ProtoMessage() {} + +func (*LocalSubjectAccessReview) ProtoMessage() {} + +func (*NonResourceAttributes) ProtoMessage() {} + +func (*NonResourceRule) ProtoMessage() {} + +func (*ResourceAttributes) ProtoMessage() {} + +func (*ResourceRule) ProtoMessage() {} + +func (*SelfSubjectAccessReview) ProtoMessage() {} + +func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} + +func (*SelfSubjectRulesReview) ProtoMessage() {} + +func (*SelfSubjectRulesReviewSpec) ProtoMessage() {} + +func (*SubjectAccessReview) ProtoMessage() {} + +func (*SubjectAccessReviewSpec) ProtoMessage() {} + +func (*SubjectAccessReviewStatus) ProtoMessage() {} + +func (*SubjectRulesReviewStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/authorization/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/authorization/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..0f1b55c13f10d --- /dev/null +++ b/staging/src/k8s.io/api/authorization/v1beta1/zz_generated.model_name.go @@ -0,0 +1,87 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LocalSubjectAccessReview) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1beta1.LocalSubjectAccessReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NonResourceAttributes) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1beta1.NonResourceAttributes" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NonResourceRule) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1beta1.NonResourceRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceAttributes) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1beta1.ResourceAttributes" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceRule) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1beta1.ResourceRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelfSubjectAccessReview) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1beta1.SelfSubjectAccessReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelfSubjectAccessReviewSpec) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1beta1.SelfSubjectAccessReviewSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelfSubjectRulesReview) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1beta1.SelfSubjectRulesReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelfSubjectRulesReviewSpec) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1beta1.SelfSubjectRulesReviewSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SubjectAccessReview) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1beta1.SubjectAccessReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SubjectAccessReviewSpec) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1beta1.SubjectAccessReviewSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SubjectAccessReviewStatus) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1beta1.SubjectAccessReviewStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SubjectRulesReviewStatus) OpenAPIModelName() string { + return "io.k8s.api.authorization.v1beta1.SubjectRulesReviewStatus" +} diff --git a/staging/src/k8s.io/api/autoscaling/v1/doc.go b/staging/src/k8s.io/api/autoscaling/v1/doc.go index 4ee085e165c89..9f502a66091c7 100644 --- a/staging/src/k8s.io/api/autoscaling/v1/doc.go +++ b/staging/src/k8s.io/api/autoscaling/v1/doc.go @@ -18,5 +18,6 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.autoscaling.v1 package v1 diff --git a/staging/src/k8s.io/api/autoscaling/v1/generated.pb.go b/staging/src/k8s.io/api/autoscaling/v1/generated.pb.go index 3e3c23135195f..6028054aefd05 100644 --- a/staging/src/k8s.io/api/autoscaling/v1/generated.pb.go +++ b/staging/src/k8s.io/api/autoscaling/v1/generated.pb.go @@ -24,748 +24,56 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - k8s_io_api_core_v1 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } -func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } -func (*ContainerResourceMetricSource) ProtoMessage() {} -func (*ContainerResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{0} -} -func (m *ContainerResourceMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerResourceMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerResourceMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerResourceMetricSource.Merge(m, src) -} -func (m *ContainerResourceMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ContainerResourceMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerResourceMetricSource.DiscardUnknown(m) -} +func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } -var xxx_messageInfo_ContainerResourceMetricSource proto.InternalMessageInfo +func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } -func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } -func (*ContainerResourceMetricStatus) ProtoMessage() {} -func (*ContainerResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{1} -} -func (m *ContainerResourceMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerResourceMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerResourceMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerResourceMetricStatus.Merge(m, src) -} -func (m *ContainerResourceMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ContainerResourceMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerResourceMetricStatus.DiscardUnknown(m) -} +func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } -var xxx_messageInfo_ContainerResourceMetricStatus proto.InternalMessageInfo +func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } -func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } -func (*CrossVersionObjectReference) ProtoMessage() {} -func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{2} -} -func (m *CrossVersionObjectReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CrossVersionObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CrossVersionObjectReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_CrossVersionObjectReference.Merge(m, src) -} -func (m *CrossVersionObjectReference) XXX_Size() int { - return m.Size() -} -func (m *CrossVersionObjectReference) XXX_DiscardUnknown() { - xxx_messageInfo_CrossVersionObjectReference.DiscardUnknown(m) -} +func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } -var xxx_messageInfo_CrossVersionObjectReference proto.InternalMessageInfo +func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } -func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } -func (*ExternalMetricSource) ProtoMessage() {} -func (*ExternalMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{3} -} -func (m *ExternalMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExternalMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExternalMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExternalMetricSource.Merge(m, src) -} -func (m *ExternalMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ExternalMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ExternalMetricSource.DiscardUnknown(m) -} +func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } -var xxx_messageInfo_ExternalMetricSource proto.InternalMessageInfo +func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } -func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } -func (*ExternalMetricStatus) ProtoMessage() {} -func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{4} -} -func (m *ExternalMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExternalMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExternalMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExternalMetricStatus.Merge(m, src) -} -func (m *ExternalMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ExternalMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ExternalMetricStatus.DiscardUnknown(m) -} +func (m *MetricSpec) Reset() { *m = MetricSpec{} } -var xxx_messageInfo_ExternalMetricStatus proto.InternalMessageInfo +func (m *MetricStatus) Reset() { *m = MetricStatus{} } -func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } -func (*HorizontalPodAutoscaler) ProtoMessage() {} -func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{5} -} -func (m *HorizontalPodAutoscaler) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscaler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscaler) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscaler.Merge(m, src) -} -func (m *HorizontalPodAutoscaler) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscaler) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscaler.DiscardUnknown(m) -} - -var xxx_messageInfo_HorizontalPodAutoscaler proto.InternalMessageInfo - -func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } -func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} -func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{6} -} -func (m *HorizontalPodAutoscalerCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerCondition.Merge(m, src) -} -func (m *HorizontalPodAutoscalerCondition) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerCondition) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerCondition.DiscardUnknown(m) -} +func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } -var xxx_messageInfo_HorizontalPodAutoscalerCondition proto.InternalMessageInfo +func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } -func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } -func (*HorizontalPodAutoscalerList) ProtoMessage() {} -func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{7} -} -func (m *HorizontalPodAutoscalerList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerList) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerList.Merge(m, src) -} -func (m *HorizontalPodAutoscalerList) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerList) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerList.DiscardUnknown(m) -} - -var xxx_messageInfo_HorizontalPodAutoscalerList proto.InternalMessageInfo - -func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } -func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} -func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{8} -} -func (m *HorizontalPodAutoscalerSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerSpec.Merge(m, src) -} -func (m *HorizontalPodAutoscalerSpec) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerSpec) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerSpec.DiscardUnknown(m) -} +func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } -var xxx_messageInfo_HorizontalPodAutoscalerSpec proto.InternalMessageInfo +func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } -func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } -func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} -func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{9} -} -func (m *HorizontalPodAutoscalerStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerStatus.Merge(m, src) -} -func (m *HorizontalPodAutoscalerStatus) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerStatus) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerStatus.DiscardUnknown(m) -} +func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } -var xxx_messageInfo_HorizontalPodAutoscalerStatus proto.InternalMessageInfo +func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } -func (m *MetricSpec) Reset() { *m = MetricSpec{} } -func (*MetricSpec) ProtoMessage() {} -func (*MetricSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{10} -} -func (m *MetricSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MetricSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricSpec.Merge(m, src) -} -func (m *MetricSpec) XXX_Size() int { - return m.Size() -} -func (m *MetricSpec) XXX_DiscardUnknown() { - xxx_messageInfo_MetricSpec.DiscardUnknown(m) -} +func (m *Scale) Reset() { *m = Scale{} } -var xxx_messageInfo_MetricSpec proto.InternalMessageInfo +func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } -func (m *MetricStatus) Reset() { *m = MetricStatus{} } -func (*MetricStatus) ProtoMessage() {} -func (*MetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{11} -} -func (m *MetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricStatus.Merge(m, src) -} -func (m *MetricStatus) XXX_Size() int { - return m.Size() -} -func (m *MetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_MetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricStatus proto.InternalMessageInfo - -func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } -func (*ObjectMetricSource) ProtoMessage() {} -func (*ObjectMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{12} -} -func (m *ObjectMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ObjectMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectMetricSource.Merge(m, src) -} -func (m *ObjectMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ObjectMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectMetricSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ObjectMetricSource proto.InternalMessageInfo - -func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } -func (*ObjectMetricStatus) ProtoMessage() {} -func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{13} -} -func (m *ObjectMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ObjectMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectMetricStatus.Merge(m, src) -} -func (m *ObjectMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ObjectMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectMetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ObjectMetricStatus proto.InternalMessageInfo - -func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } -func (*PodsMetricSource) ProtoMessage() {} -func (*PodsMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{14} -} -func (m *PodsMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodsMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodsMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodsMetricSource.Merge(m, src) -} -func (m *PodsMetricSource) XXX_Size() int { - return m.Size() -} -func (m *PodsMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_PodsMetricSource.DiscardUnknown(m) -} - -var xxx_messageInfo_PodsMetricSource proto.InternalMessageInfo - -func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } -func (*PodsMetricStatus) ProtoMessage() {} -func (*PodsMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{15} -} -func (m *PodsMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodsMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodsMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodsMetricStatus.Merge(m, src) -} -func (m *PodsMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *PodsMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PodsMetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PodsMetricStatus proto.InternalMessageInfo - -func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } -func (*ResourceMetricSource) ProtoMessage() {} -func (*ResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{16} -} -func (m *ResourceMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceMetricSource.Merge(m, src) -} -func (m *ResourceMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ResourceMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceMetricSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceMetricSource proto.InternalMessageInfo - -func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } -func (*ResourceMetricStatus) ProtoMessage() {} -func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{17} -} -func (m *ResourceMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceMetricStatus.Merge(m, src) -} -func (m *ResourceMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ResourceMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceMetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceMetricStatus proto.InternalMessageInfo - -func (m *Scale) Reset() { *m = Scale{} } -func (*Scale) ProtoMessage() {} -func (*Scale) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{18} -} -func (m *Scale) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Scale) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Scale) XXX_Merge(src proto.Message) { - xxx_messageInfo_Scale.Merge(m, src) -} -func (m *Scale) XXX_Size() int { - return m.Size() -} -func (m *Scale) XXX_DiscardUnknown() { - xxx_messageInfo_Scale.DiscardUnknown(m) -} - -var xxx_messageInfo_Scale proto.InternalMessageInfo - -func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } -func (*ScaleSpec) ProtoMessage() {} -func (*ScaleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{19} -} -func (m *ScaleSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScaleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ScaleSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScaleSpec.Merge(m, src) -} -func (m *ScaleSpec) XXX_Size() int { - return m.Size() -} -func (m *ScaleSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ScaleSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ScaleSpec proto.InternalMessageInfo - -func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } -func (*ScaleStatus) ProtoMessage() {} -func (*ScaleStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1972394c0c7aac8b, []int{20} -} -func (m *ScaleStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScaleStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ScaleStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScaleStatus.Merge(m, src) -} -func (m *ScaleStatus) XXX_Size() int { - return m.Size() -} -func (m *ScaleStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ScaleStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ScaleStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ContainerResourceMetricSource)(nil), "k8s.io.api.autoscaling.v1.ContainerResourceMetricSource") - proto.RegisterType((*ContainerResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus") - proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.api.autoscaling.v1.CrossVersionObjectReference") - proto.RegisterType((*ExternalMetricSource)(nil), "k8s.io.api.autoscaling.v1.ExternalMetricSource") - proto.RegisterType((*ExternalMetricStatus)(nil), "k8s.io.api.autoscaling.v1.ExternalMetricStatus") - proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler") - proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerCondition") - proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerList") - proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec") - proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus") - proto.RegisterType((*MetricSpec)(nil), "k8s.io.api.autoscaling.v1.MetricSpec") - proto.RegisterType((*MetricStatus)(nil), "k8s.io.api.autoscaling.v1.MetricStatus") - proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.api.autoscaling.v1.ObjectMetricSource") - proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.api.autoscaling.v1.ObjectMetricStatus") - proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.api.autoscaling.v1.PodsMetricSource") - proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.api.autoscaling.v1.PodsMetricStatus") - proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.api.autoscaling.v1.ResourceMetricSource") - proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v1.ResourceMetricStatus") - proto.RegisterType((*Scale)(nil), "k8s.io.api.autoscaling.v1.Scale") - proto.RegisterType((*ScaleSpec)(nil), "k8s.io.api.autoscaling.v1.ScaleSpec") - proto.RegisterType((*ScaleStatus)(nil), "k8s.io.api.autoscaling.v1.ScaleStatus") -} - -func init() { - proto.RegisterFile("k8s.io/api/autoscaling/v1/generated.proto", fileDescriptor_1972394c0c7aac8b) -} - -var fileDescriptor_1972394c0c7aac8b = []byte{ - // 1593 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6c, 0x13, 0xd7, - 0x16, 0x8e, 0x7f, 0x12, 0x92, 0xe3, 0x90, 0x9f, 0x0b, 0x0f, 0x92, 0xf0, 0xf0, 0x44, 0xf3, 0x10, - 0x0a, 0xef, 0x3d, 0xc6, 0x8d, 0x4b, 0x11, 0x5d, 0x55, 0xb1, 0x5b, 0x0a, 0x6a, 0x0c, 0xe1, 0x26, - 0x50, 0xfa, 0x2b, 0x6e, 0xc6, 0x17, 0x67, 0x88, 0x67, 0xc6, 0x9a, 0x19, 0x5b, 0x04, 0x09, 0xa9, - 0x5d, 0x74, 0xdf, 0x0d, 0xed, 0xb6, 0x95, 0xba, 0xed, 0x9a, 0x75, 0x77, 0x2c, 0x59, 0x20, 0x95, - 0x95, 0x55, 0xa6, 0x8b, 0x2e, 0xba, 0xea, 0x96, 0x55, 0x75, 0xef, 0xdc, 0x19, 0xcf, 0xd8, 0x9e, - 0x89, 0xe3, 0x84, 0xa8, 0xad, 0xd8, 0x65, 0x7c, 0xcf, 0xf9, 0xce, 0xbd, 0xe7, 0xff, 0x9c, 0xc0, - 0xb9, 0xed, 0x4b, 0xb6, 0xa2, 0x99, 0x05, 0xd2, 0xd0, 0x0a, 0xa4, 0xe9, 0x98, 0xb6, 0x4a, 0xea, - 0x9a, 0x51, 0x2b, 0xb4, 0x96, 0x0b, 0x35, 0x6a, 0x50, 0x8b, 0x38, 0xb4, 0xaa, 0x34, 0x2c, 0xd3, - 0x31, 0xd1, 0xbc, 0x47, 0xaa, 0x90, 0x86, 0xa6, 0x84, 0x48, 0x95, 0xd6, 0xf2, 0xc2, 0xf9, 0x9a, - 0xe6, 0x6c, 0x35, 0x37, 0x15, 0xd5, 0xd4, 0x0b, 0x35, 0xb3, 0x66, 0x16, 0x38, 0xc7, 0x66, 0xf3, - 0x2e, 0xff, 0xe2, 0x1f, 0xfc, 0x2f, 0x0f, 0x69, 0x41, 0x0e, 0x09, 0x55, 0x4d, 0x8b, 0xf6, 0x91, - 0xb6, 0x70, 0xa1, 0x43, 0xa3, 0x13, 0x75, 0x4b, 0x33, 0xa8, 0xb5, 0x53, 0x68, 0x6c, 0xd7, 0x38, - 0x93, 0x45, 0x6d, 0xb3, 0x69, 0xa9, 0x74, 0x4f, 0x5c, 0x76, 0x41, 0xa7, 0x0e, 0xe9, 0x27, 0xab, - 0x10, 0xc7, 0x65, 0x35, 0x0d, 0x47, 0xd3, 0x7b, 0xc5, 0x5c, 0xdc, 0x8d, 0xc1, 0x56, 0xb7, 0xa8, - 0x4e, 0xba, 0xf9, 0xe4, 0xdf, 0xd2, 0x70, 0xba, 0x6c, 0x1a, 0x0e, 0x61, 0x1c, 0x58, 0x3c, 0xa2, - 0x42, 0x1d, 0x4b, 0x53, 0xd7, 0xf9, 0xdf, 0xa8, 0x0c, 0x59, 0x83, 0xe8, 0x74, 0x2e, 0xb5, 0x98, - 0x5a, 0x9a, 0x28, 0x15, 0x9e, 0xb4, 0xa5, 0x11, 0xb7, 0x2d, 0x65, 0xaf, 0x11, 0x9d, 0xbe, 0x6c, - 0x4b, 0x52, 0xaf, 0xe2, 0x14, 0x1f, 0x86, 0x91, 0x60, 0xce, 0x8c, 0x6e, 0xc3, 0x9c, 0x43, 0xac, - 0x1a, 0x75, 0x56, 0x5a, 0xd4, 0x22, 0x35, 0x7a, 0xd3, 0xd1, 0xea, 0xda, 0x03, 0xe2, 0x68, 0xa6, - 0x31, 0x97, 0x5e, 0x4c, 0x2d, 0x8d, 0x96, 0xfe, 0xed, 0xb6, 0xa5, 0xb9, 0x8d, 0x18, 0x1a, 0x1c, - 0xcb, 0x8d, 0x5a, 0x80, 0x22, 0x67, 0xb7, 0x48, 0xbd, 0x49, 0xe7, 0x32, 0x8b, 0xa9, 0xa5, 0x5c, - 0x51, 0x51, 0x3a, 0x0e, 0x12, 0x68, 0x45, 0x69, 0x6c, 0xd7, 0xb8, 0xc7, 0xf8, 0x26, 0x53, 0x6e, - 0x34, 0x89, 0xe1, 0x68, 0xce, 0x4e, 0xe9, 0x84, 0xdb, 0x96, 0xd0, 0x46, 0x0f, 0x1a, 0xee, 0x23, - 0x01, 0x15, 0x60, 0x42, 0xf5, 0xf5, 0x36, 0x37, 0xca, 0x75, 0x33, 0x2b, 0x74, 0x33, 0xd1, 0x51, - 0x68, 0x87, 0x46, 0xfe, 0x23, 0x41, 0xd3, 0x0e, 0x71, 0x9a, 0xf6, 0xc1, 0x68, 0xfa, 0x13, 0x98, - 0x57, 0x9b, 0x96, 0x45, 0x8d, 0x78, 0x55, 0x9f, 0x76, 0xdb, 0xd2, 0x7c, 0x39, 0x8e, 0x08, 0xc7, - 0xf3, 0xa3, 0x87, 0x70, 0x2c, 0x7a, 0xb8, 0x1f, 0x6d, 0x9f, 0x12, 0x0f, 0x3c, 0x56, 0xee, 0x85, - 0xc4, 0xfd, 0xe4, 0x44, 0x75, 0x9e, 0x1d, 0x40, 0xe7, 0x8f, 0x52, 0x70, 0xaa, 0x6c, 0x99, 0xb6, - 0x7d, 0x8b, 0x5a, 0xb6, 0x66, 0x1a, 0xd7, 0x37, 0xef, 0x51, 0xd5, 0xc1, 0xf4, 0x2e, 0xb5, 0xa8, - 0xa1, 0x52, 0xb4, 0x08, 0xd9, 0x6d, 0xcd, 0xa8, 0x0a, 0x8d, 0x4f, 0xfa, 0x1a, 0xff, 0x40, 0x33, - 0xaa, 0x98, 0x9f, 0x30, 0x0a, 0x6e, 0x93, 0x74, 0x94, 0x22, 0xa4, 0xf0, 0x22, 0x00, 0x69, 0x68, - 0x42, 0x00, 0x57, 0xc5, 0x44, 0x09, 0x09, 0x3a, 0x58, 0x59, 0xbb, 0x2a, 0x4e, 0x70, 0x88, 0x4a, - 0xfe, 0x26, 0x03, 0xc7, 0xdf, 0xbb, 0xef, 0x50, 0xcb, 0x20, 0xf5, 0x48, 0xb0, 0x15, 0x01, 0x74, - 0xfe, 0x7d, 0xad, 0xe3, 0x08, 0x01, 0x58, 0x25, 0x38, 0xc1, 0x21, 0x2a, 0x64, 0xc2, 0x94, 0xf7, - 0xb5, 0x4e, 0xeb, 0x54, 0x75, 0x4c, 0x8b, 0x5f, 0x36, 0x57, 0x7c, 0x33, 0xc9, 0x1e, 0xb6, 0xc2, - 0x52, 0x8f, 0xd2, 0x5a, 0x56, 0x56, 0xc9, 0x26, 0xad, 0xfb, 0xac, 0x25, 0xe4, 0xb6, 0xa5, 0xa9, - 0x4a, 0x04, 0x0e, 0x77, 0xc1, 0x23, 0x02, 0x39, 0x2f, 0x20, 0xf6, 0x63, 0xfd, 0x69, 0xb7, 0x2d, - 0xe5, 0x36, 0x3a, 0x30, 0x38, 0x8c, 0x19, 0x13, 0xd5, 0xd9, 0x57, 0x1d, 0xd5, 0xf2, 0x77, 0xbd, - 0x86, 0xf1, 0x62, 0xf3, 0x6f, 0x61, 0x98, 0x2d, 0x98, 0x14, 0x61, 0xb3, 0x1f, 0xcb, 0x1c, 0x17, - 0xcf, 0x9a, 0x2c, 0x87, 0xb0, 0x70, 0x04, 0x19, 0xed, 0xf4, 0x4f, 0x04, 0xc3, 0x19, 0xe8, 0xe4, - 0x5e, 0x92, 0x80, 0xfc, 0x38, 0x0d, 0x27, 0xaf, 0x98, 0x96, 0xf6, 0x80, 0x45, 0x79, 0x7d, 0xcd, - 0xac, 0xae, 0x88, 0xca, 0x4f, 0x2d, 0x74, 0x07, 0xc6, 0x99, 0xf6, 0xaa, 0xc4, 0x21, 0xdc, 0x46, - 0xb9, 0xe2, 0x1b, 0x83, 0xe9, 0xda, 0x4b, 0x0c, 0x15, 0xea, 0x90, 0x8e, 0x55, 0x3b, 0xbf, 0xe1, - 0x00, 0x15, 0xdd, 0x86, 0xac, 0xdd, 0xa0, 0xaa, 0xb0, 0xe4, 0x45, 0x25, 0xb6, 0x03, 0x51, 0x62, - 0xee, 0xb8, 0xde, 0xa0, 0x6a, 0x27, 0x8f, 0xb0, 0x2f, 0xcc, 0x11, 0xd1, 0x1d, 0x18, 0xb3, 0xb9, - 0xaf, 0x09, 0xb3, 0x5d, 0x1a, 0x02, 0x9b, 0xf3, 0x97, 0xa6, 0x04, 0xfa, 0x98, 0xf7, 0x8d, 0x05, - 0xae, 0xfc, 0x55, 0x06, 0x16, 0x63, 0x38, 0xcb, 0xa6, 0x51, 0xd5, 0x78, 0x8a, 0xbf, 0x02, 0x59, - 0x67, 0xa7, 0xe1, 0xbb, 0xf8, 0x05, 0xff, 0xa2, 0x1b, 0x3b, 0x0d, 0x56, 0x84, 0xce, 0xec, 0xc6, - 0xcf, 0xe8, 0x30, 0x47, 0x40, 0xab, 0xc1, 0x83, 0xd2, 0x11, 0x2c, 0x71, 0xad, 0x97, 0x6d, 0xa9, - 0x4f, 0xd7, 0xa5, 0x04, 0x48, 0xd1, 0xcb, 0xb3, 0x8c, 0x50, 0x27, 0xb6, 0xb3, 0x61, 0x11, 0xc3, - 0xf6, 0x24, 0x69, 0xba, 0xef, 0xe1, 0xff, 0x1d, 0xcc, 0xc8, 0x8c, 0xa3, 0xb4, 0x20, 0x6e, 0x81, - 0x56, 0x7b, 0xd0, 0x70, 0x1f, 0x09, 0xe8, 0x2c, 0x8c, 0x59, 0x94, 0xd8, 0xa6, 0x21, 0x0a, 0x4e, - 0xa0, 0x5c, 0xcc, 0x7f, 0xc5, 0xe2, 0x14, 0x9d, 0x83, 0x23, 0x3a, 0xb5, 0x6d, 0x52, 0xa3, 0xa2, - 0x1b, 0x98, 0x16, 0x84, 0x47, 0x2a, 0xde, 0xcf, 0xd8, 0x3f, 0x97, 0x9f, 0xa5, 0xe0, 0x54, 0x8c, - 0x1e, 0x57, 0x35, 0xdb, 0x41, 0x9f, 0xf6, 0x78, 0xb1, 0x32, 0x60, 0xc6, 0xd0, 0x6c, 0xcf, 0x87, - 0x67, 0x84, 0xec, 0x71, 0xff, 0x97, 0x90, 0x07, 0x7f, 0x08, 0xa3, 0x9a, 0x43, 0x75, 0x66, 0x95, - 0xcc, 0x52, 0xae, 0x58, 0xdc, 0xbb, 0x9b, 0x95, 0x8e, 0x0a, 0xf8, 0xd1, 0xab, 0x0c, 0x08, 0x7b, - 0x78, 0xf2, 0xef, 0xe9, 0xd8, 0x67, 0x31, 0x37, 0x47, 0x2d, 0x98, 0xe2, 0x5f, 0x5e, 0x2a, 0xc6, - 0xf4, 0xae, 0x78, 0x5c, 0x52, 0x10, 0x25, 0x14, 0xef, 0xd2, 0x09, 0x71, 0x8b, 0xa9, 0xf5, 0x08, - 0x2a, 0xee, 0x92, 0x82, 0x96, 0x21, 0xa7, 0x6b, 0x06, 0xa6, 0x8d, 0xba, 0xa6, 0x12, 0x5b, 0xf4, - 0x40, 0xbc, 0xfc, 0x54, 0x3a, 0x3f, 0xe3, 0x30, 0x0d, 0x7a, 0x0b, 0x72, 0x3a, 0xb9, 0x1f, 0xb0, - 0x64, 0x38, 0xcb, 0x31, 0x21, 0x2f, 0x57, 0xe9, 0x1c, 0xe1, 0x30, 0x1d, 0xba, 0x07, 0x79, 0xaf, - 0xa6, 0x94, 0xd7, 0x6e, 0x86, 0xda, 0xa6, 0x35, 0x6a, 0xa9, 0xd4, 0x70, 0x98, 0x6b, 0x64, 0x39, - 0x92, 0xec, 0xb6, 0xa5, 0xfc, 0x46, 0x22, 0x25, 0xde, 0x05, 0x49, 0xfe, 0x29, 0x03, 0xa7, 0x13, - 0xd3, 0x00, 0xba, 0x0c, 0xc8, 0xdc, 0xb4, 0xa9, 0xd5, 0xa2, 0xd5, 0xf7, 0xbd, 0xae, 0x9f, 0x35, - 0x28, 0x4c, 0xe7, 0x19, 0xaf, 0x26, 0x5e, 0xef, 0x39, 0xc5, 0x7d, 0x38, 0x90, 0x0a, 0x47, 0x59, - 0x5c, 0x78, 0x5a, 0xd6, 0x44, 0x2f, 0xb4, 0xb7, 0xa0, 0x9b, 0x75, 0xdb, 0xd2, 0xd1, 0xd5, 0x30, - 0x08, 0x8e, 0x62, 0xa2, 0x15, 0x98, 0x16, 0xc9, 0xbe, 0x4b, 0xeb, 0x27, 0x85, 0xd6, 0xa7, 0xcb, - 0xd1, 0x63, 0xdc, 0x4d, 0xcf, 0x20, 0xaa, 0xd4, 0xd6, 0x2c, 0x5a, 0x0d, 0x20, 0xb2, 0x51, 0x88, - 0x77, 0xa3, 0xc7, 0xb8, 0x9b, 0x1e, 0xe9, 0x20, 0x09, 0xd4, 0x58, 0x0b, 0x8e, 0x72, 0xc8, 0xff, - 0xb8, 0x6d, 0x49, 0x2a, 0x27, 0x93, 0xe2, 0xdd, 0xb0, 0xe4, 0x47, 0x59, 0x10, 0xbd, 0x03, 0x0f, - 0x90, 0x0b, 0x91, 0xd4, 0xbb, 0xd8, 0x95, 0x7a, 0x67, 0xc2, 0x8d, 0x62, 0x28, 0xcd, 0xde, 0x80, - 0x31, 0x93, 0x47, 0x86, 0xb0, 0xcb, 0xf9, 0x84, 0x70, 0x0a, 0x4a, 0x5a, 0x00, 0x54, 0x02, 0x96, - 0xcb, 0x44, 0x68, 0x09, 0x20, 0x74, 0x15, 0xb2, 0x0d, 0xb3, 0xea, 0x17, 0xa2, 0xff, 0x25, 0x00, - 0xae, 0x99, 0x55, 0x3b, 0x02, 0x37, 0xce, 0x6e, 0xcc, 0x7e, 0xc5, 0x1c, 0x02, 0x7d, 0x04, 0xe3, - 0x7e, 0xc1, 0x17, 0xdd, 0x41, 0x21, 0x01, 0xae, 0xdf, 0x00, 0x5a, 0x9a, 0x64, 0x89, 0xcc, 0x3f, - 0xc1, 0x01, 0x1c, 0x7a, 0x08, 0xb3, 0x6a, 0xf7, 0x3c, 0x35, 0x77, 0x64, 0xd7, 0xda, 0x99, 0x38, - 0xed, 0x96, 0xfe, 0xe5, 0xb6, 0xa5, 0xd9, 0x1e, 0x12, 0xdc, 0x2b, 0x89, 0xbd, 0x8c, 0x8a, 0x4e, - 0x91, 0x3b, 0x45, 0xf2, 0xcb, 0xfa, 0x75, 0xfb, 0xde, 0xcb, 0xfc, 0x13, 0x1c, 0xc0, 0xc9, 0xdf, - 0x66, 0x61, 0x32, 0xd2, 0x7d, 0x1e, 0xb2, 0x67, 0x78, 0x6d, 0xc4, 0x81, 0x79, 0x86, 0x07, 0x77, - 0xa0, 0x9e, 0xe1, 0x41, 0x1e, 0x92, 0x67, 0x78, 0xc2, 0x0e, 0xc9, 0x33, 0x42, 0x2f, 0xeb, 0xe3, - 0x19, 0xcf, 0x32, 0x80, 0x7a, 0x83, 0x18, 0x7d, 0x0e, 0x63, 0x5e, 0xb9, 0xd8, 0x67, 0x49, 0x0d, - 0x9a, 0x1b, 0x51, 0x3d, 0x05, 0x6a, 0xd7, 0xf4, 0x93, 0x1e, 0x68, 0xfa, 0xa1, 0x07, 0x31, 0x25, - 0x06, 0x35, 0x37, 0x76, 0x52, 0xfc, 0x0c, 0xc6, 0x6d, 0x7f, 0xbc, 0xca, 0x0e, 0x3f, 0x5e, 0x71, - 0x85, 0x07, 0x83, 0x55, 0x00, 0x89, 0xaa, 0x30, 0x49, 0xc2, 0x13, 0xce, 0xe8, 0x50, 0xcf, 0x98, - 0x61, 0xe3, 0x54, 0x64, 0xb4, 0x89, 0xa0, 0xca, 0x3f, 0x77, 0x9b, 0xd5, 0x0b, 0xfb, 0xbf, 0xa2, - 0x59, 0x0f, 0x6f, 0xc6, 0xfc, 0x47, 0x58, 0xf6, 0xfb, 0x34, 0xcc, 0x74, 0x17, 0xc9, 0xa1, 0x96, - 0x09, 0x0f, 0xfa, 0x6e, 0x44, 0xd2, 0x43, 0x5d, 0x3a, 0x98, 0x81, 0x06, 0xdc, 0x75, 0x86, 0x2d, - 0x91, 0x39, 0x70, 0x4b, 0xc8, 0x3f, 0x44, 0x75, 0x34, 0xfc, 0xc2, 0x25, 0x66, 0x3d, 0x99, 0x3e, - 0xa4, 0xf5, 0xe4, 0x2b, 0x56, 0xd3, 0x8f, 0x69, 0x38, 0xfe, 0x7a, 0x43, 0x3f, 0xf8, 0x2e, 0xef, - 0x71, 0xaf, 0xbe, 0x5e, 0xef, 0xd9, 0x07, 0x5a, 0xb1, 0x7d, 0x99, 0x86, 0x51, 0x3e, 0x9a, 0x1d, - 0xc2, 0x42, 0xed, 0x72, 0x64, 0xa1, 0x76, 0x26, 0xa1, 0xc2, 0xf1, 0x1b, 0xc5, 0xae, 0xcf, 0xae, - 0x75, 0xad, 0xcf, 0xce, 0xee, 0x8a, 0x94, 0xbc, 0x2c, 0x7b, 0x1b, 0x26, 0x02, 0x81, 0xe8, 0xff, - 0xac, 0x57, 0x15, 0x33, 0x65, 0x8a, 0xdb, 0x36, 0xd8, 0xb0, 0x04, 0xc3, 0x64, 0x40, 0x21, 0x6b, - 0x90, 0x0b, 0x49, 0xd8, 0x1b, 0x33, 0xa3, 0xb6, 0xc3, 0xeb, 0xe2, 0x89, 0x0e, 0x75, 0x6f, 0x4e, - 0x28, 0xbd, 0xf3, 0xe4, 0x45, 0x7e, 0xe4, 0xe9, 0x8b, 0xfc, 0xc8, 0xf3, 0x17, 0xf9, 0x91, 0x2f, - 0xdc, 0x7c, 0xea, 0x89, 0x9b, 0x4f, 0x3d, 0x75, 0xf3, 0xa9, 0xe7, 0x6e, 0x3e, 0xf5, 0x8b, 0x9b, - 0x4f, 0x7d, 0xfd, 0x6b, 0x7e, 0xe4, 0xe3, 0xf9, 0xd8, 0x7f, 0xa9, 0xfe, 0x19, 0x00, 0x00, 0xff, - 0xff, 0xd7, 0x67, 0xd4, 0x08, 0x6e, 0x1d, 0x00, 0x00, -} +func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/autoscaling/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/autoscaling/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..7b073f92c3ea8 --- /dev/null +++ b/staging/src/k8s.io/api/autoscaling/v1/generated.protomessage.pb.go @@ -0,0 +1,64 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*ContainerResourceMetricSource) ProtoMessage() {} + +func (*ContainerResourceMetricStatus) ProtoMessage() {} + +func (*CrossVersionObjectReference) ProtoMessage() {} + +func (*ExternalMetricSource) ProtoMessage() {} + +func (*ExternalMetricStatus) ProtoMessage() {} + +func (*HorizontalPodAutoscaler) ProtoMessage() {} + +func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} + +func (*HorizontalPodAutoscalerList) ProtoMessage() {} + +func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} + +func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} + +func (*MetricSpec) ProtoMessage() {} + +func (*MetricStatus) ProtoMessage() {} + +func (*ObjectMetricSource) ProtoMessage() {} + +func (*ObjectMetricStatus) ProtoMessage() {} + +func (*PodsMetricSource) ProtoMessage() {} + +func (*PodsMetricStatus) ProtoMessage() {} + +func (*ResourceMetricSource) ProtoMessage() {} + +func (*ResourceMetricStatus) ProtoMessage() {} + +func (*Scale) ProtoMessage() {} + +func (*ScaleSpec) ProtoMessage() {} + +func (*ScaleStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/autoscaling/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/autoscaling/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..d4f18650db9e2 --- /dev/null +++ b/staging/src/k8s.io/api/autoscaling/v1/zz_generated.model_name.go @@ -0,0 +1,127 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerResourceMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.ContainerResourceMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerResourceMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.ContainerResourceMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CrossVersionObjectReference) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.CrossVersionObjectReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExternalMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.ExternalMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExternalMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.ExternalMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscaler) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerCondition) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerList) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerSpec) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MetricSpec) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.MetricSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.MetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ObjectMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.ObjectMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ObjectMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.ObjectMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodsMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.PodsMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodsMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.PodsMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.ResourceMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.ResourceMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Scale) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.Scale" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ScaleSpec) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.ScaleSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ScaleStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v1.ScaleStatus" +} diff --git a/staging/src/k8s.io/api/autoscaling/v2/doc.go b/staging/src/k8s.io/api/autoscaling/v2/doc.go index 8dea6339dfb1d..e9a98ae00994b 100644 --- a/staging/src/k8s.io/api/autoscaling/v2/doc.go +++ b/staging/src/k8s.io/api/autoscaling/v2/doc.go @@ -18,5 +18,6 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.autoscaling.v2 package v2 diff --git a/staging/src/k8s.io/api/autoscaling/v2/generated.pb.go b/staging/src/k8s.io/api/autoscaling/v2/generated.pb.go index 40b60ebeca4d7..7505c7592fc38 100644 --- a/staging/src/k8s.io/api/autoscaling/v2/generated.pb.go +++ b/staging/src/k8s.io/api/autoscaling/v2/generated.pb.go @@ -24,844 +24,62 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - k8s_io_api_core_v1 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } -func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } -func (*ContainerResourceMetricSource) ProtoMessage() {} -func (*ContainerResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{0} -} -func (m *ContainerResourceMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerResourceMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerResourceMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerResourceMetricSource.Merge(m, src) -} -func (m *ContainerResourceMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ContainerResourceMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerResourceMetricSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerResourceMetricSource proto.InternalMessageInfo - -func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } -func (*ContainerResourceMetricStatus) ProtoMessage() {} -func (*ContainerResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{1} -} -func (m *ContainerResourceMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerResourceMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerResourceMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerResourceMetricStatus.Merge(m, src) -} -func (m *ContainerResourceMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ContainerResourceMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerResourceMetricStatus.DiscardUnknown(m) -} +func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } -var xxx_messageInfo_ContainerResourceMetricStatus proto.InternalMessageInfo +func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } -func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } -func (*CrossVersionObjectReference) ProtoMessage() {} -func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{2} -} -func (m *CrossVersionObjectReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CrossVersionObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CrossVersionObjectReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_CrossVersionObjectReference.Merge(m, src) -} -func (m *CrossVersionObjectReference) XXX_Size() int { - return m.Size() -} -func (m *CrossVersionObjectReference) XXX_DiscardUnknown() { - xxx_messageInfo_CrossVersionObjectReference.DiscardUnknown(m) -} +func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } -var xxx_messageInfo_CrossVersionObjectReference proto.InternalMessageInfo +func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } -func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } -func (*ExternalMetricSource) ProtoMessage() {} -func (*ExternalMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{3} -} -func (m *ExternalMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExternalMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExternalMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExternalMetricSource.Merge(m, src) -} -func (m *ExternalMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ExternalMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ExternalMetricSource.DiscardUnknown(m) -} +func (m *HPAScalingPolicy) Reset() { *m = HPAScalingPolicy{} } -var xxx_messageInfo_ExternalMetricSource proto.InternalMessageInfo +func (m *HPAScalingRules) Reset() { *m = HPAScalingRules{} } -func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } -func (*ExternalMetricStatus) ProtoMessage() {} -func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{4} -} -func (m *ExternalMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExternalMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExternalMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExternalMetricStatus.Merge(m, src) -} -func (m *ExternalMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ExternalMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ExternalMetricStatus.DiscardUnknown(m) -} +func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } -var xxx_messageInfo_ExternalMetricStatus proto.InternalMessageInfo +func (m *HorizontalPodAutoscalerBehavior) Reset() { *m = HorizontalPodAutoscalerBehavior{} } -func (m *HPAScalingPolicy) Reset() { *m = HPAScalingPolicy{} } -func (*HPAScalingPolicy) ProtoMessage() {} -func (*HPAScalingPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{5} -} -func (m *HPAScalingPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HPAScalingPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HPAScalingPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_HPAScalingPolicy.Merge(m, src) -} -func (m *HPAScalingPolicy) XXX_Size() int { - return m.Size() -} -func (m *HPAScalingPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_HPAScalingPolicy.DiscardUnknown(m) -} +func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } -var xxx_messageInfo_HPAScalingPolicy proto.InternalMessageInfo +func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } -func (m *HPAScalingRules) Reset() { *m = HPAScalingRules{} } -func (*HPAScalingRules) ProtoMessage() {} -func (*HPAScalingRules) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{6} -} -func (m *HPAScalingRules) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HPAScalingRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HPAScalingRules) XXX_Merge(src proto.Message) { - xxx_messageInfo_HPAScalingRules.Merge(m, src) -} -func (m *HPAScalingRules) XXX_Size() int { - return m.Size() -} -func (m *HPAScalingRules) XXX_DiscardUnknown() { - xxx_messageInfo_HPAScalingRules.DiscardUnknown(m) -} +func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } -var xxx_messageInfo_HPAScalingRules proto.InternalMessageInfo +func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } -func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } -func (*HorizontalPodAutoscaler) ProtoMessage() {} -func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{7} -} -func (m *HorizontalPodAutoscaler) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscaler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscaler) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscaler.Merge(m, src) -} -func (m *HorizontalPodAutoscaler) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscaler) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscaler.DiscardUnknown(m) -} +func (m *MetricIdentifier) Reset() { *m = MetricIdentifier{} } -var xxx_messageInfo_HorizontalPodAutoscaler proto.InternalMessageInfo +func (m *MetricSpec) Reset() { *m = MetricSpec{} } -func (m *HorizontalPodAutoscalerBehavior) Reset() { *m = HorizontalPodAutoscalerBehavior{} } -func (*HorizontalPodAutoscalerBehavior) ProtoMessage() {} -func (*HorizontalPodAutoscalerBehavior) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{8} -} -func (m *HorizontalPodAutoscalerBehavior) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerBehavior) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerBehavior) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerBehavior.Merge(m, src) -} -func (m *HorizontalPodAutoscalerBehavior) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerBehavior) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerBehavior.DiscardUnknown(m) -} +func (m *MetricStatus) Reset() { *m = MetricStatus{} } -var xxx_messageInfo_HorizontalPodAutoscalerBehavior proto.InternalMessageInfo +func (m *MetricTarget) Reset() { *m = MetricTarget{} } -func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } -func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} -func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{9} -} -func (m *HorizontalPodAutoscalerCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerCondition.Merge(m, src) -} -func (m *HorizontalPodAutoscalerCondition) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerCondition) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerCondition.DiscardUnknown(m) -} +func (m *MetricValueStatus) Reset() { *m = MetricValueStatus{} } -var xxx_messageInfo_HorizontalPodAutoscalerCondition proto.InternalMessageInfo +func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } -func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } -func (*HorizontalPodAutoscalerList) ProtoMessage() {} -func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{10} -} -func (m *HorizontalPodAutoscalerList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerList) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerList.Merge(m, src) -} -func (m *HorizontalPodAutoscalerList) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerList) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerList.DiscardUnknown(m) -} +func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } -var xxx_messageInfo_HorizontalPodAutoscalerList proto.InternalMessageInfo +func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } -func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } -func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} -func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{11} -} -func (m *HorizontalPodAutoscalerSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerSpec.Merge(m, src) -} -func (m *HorizontalPodAutoscalerSpec) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerSpec) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerSpec.DiscardUnknown(m) -} +func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } -var xxx_messageInfo_HorizontalPodAutoscalerSpec proto.InternalMessageInfo +func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } -func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } -func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} -func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{12} -} -func (m *HorizontalPodAutoscalerStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerStatus.Merge(m, src) -} -func (m *HorizontalPodAutoscalerStatus) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerStatus) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_HorizontalPodAutoscalerStatus proto.InternalMessageInfo - -func (m *MetricIdentifier) Reset() { *m = MetricIdentifier{} } -func (*MetricIdentifier) ProtoMessage() {} -func (*MetricIdentifier) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{13} -} -func (m *MetricIdentifier) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricIdentifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MetricIdentifier) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricIdentifier.Merge(m, src) -} -func (m *MetricIdentifier) XXX_Size() int { - return m.Size() -} -func (m *MetricIdentifier) XXX_DiscardUnknown() { - xxx_messageInfo_MetricIdentifier.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricIdentifier proto.InternalMessageInfo - -func (m *MetricSpec) Reset() { *m = MetricSpec{} } -func (*MetricSpec) ProtoMessage() {} -func (*MetricSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{14} -} -func (m *MetricSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MetricSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricSpec.Merge(m, src) -} -func (m *MetricSpec) XXX_Size() int { - return m.Size() -} -func (m *MetricSpec) XXX_DiscardUnknown() { - xxx_messageInfo_MetricSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricSpec proto.InternalMessageInfo - -func (m *MetricStatus) Reset() { *m = MetricStatus{} } -func (*MetricStatus) ProtoMessage() {} -func (*MetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{15} -} -func (m *MetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricStatus.Merge(m, src) -} -func (m *MetricStatus) XXX_Size() int { - return m.Size() -} -func (m *MetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_MetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricStatus proto.InternalMessageInfo - -func (m *MetricTarget) Reset() { *m = MetricTarget{} } -func (*MetricTarget) ProtoMessage() {} -func (*MetricTarget) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{16} -} -func (m *MetricTarget) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricTarget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MetricTarget) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricTarget.Merge(m, src) -} -func (m *MetricTarget) XXX_Size() int { - return m.Size() -} -func (m *MetricTarget) XXX_DiscardUnknown() { - xxx_messageInfo_MetricTarget.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricTarget proto.InternalMessageInfo - -func (m *MetricValueStatus) Reset() { *m = MetricValueStatus{} } -func (*MetricValueStatus) ProtoMessage() {} -func (*MetricValueStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{17} -} -func (m *MetricValueStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricValueStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MetricValueStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricValueStatus.Merge(m, src) -} -func (m *MetricValueStatus) XXX_Size() int { - return m.Size() -} -func (m *MetricValueStatus) XXX_DiscardUnknown() { - xxx_messageInfo_MetricValueStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricValueStatus proto.InternalMessageInfo - -func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } -func (*ObjectMetricSource) ProtoMessage() {} -func (*ObjectMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{18} -} -func (m *ObjectMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ObjectMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectMetricSource.Merge(m, src) -} -func (m *ObjectMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ObjectMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectMetricSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ObjectMetricSource proto.InternalMessageInfo - -func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } -func (*ObjectMetricStatus) ProtoMessage() {} -func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{19} -} -func (m *ObjectMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ObjectMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectMetricStatus.Merge(m, src) -} -func (m *ObjectMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ObjectMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectMetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ObjectMetricStatus proto.InternalMessageInfo - -func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } -func (*PodsMetricSource) ProtoMessage() {} -func (*PodsMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{20} -} -func (m *PodsMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodsMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodsMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodsMetricSource.Merge(m, src) -} -func (m *PodsMetricSource) XXX_Size() int { - return m.Size() -} -func (m *PodsMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_PodsMetricSource.DiscardUnknown(m) -} - -var xxx_messageInfo_PodsMetricSource proto.InternalMessageInfo - -func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } -func (*PodsMetricStatus) ProtoMessage() {} -func (*PodsMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{21} -} -func (m *PodsMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodsMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodsMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodsMetricStatus.Merge(m, src) -} -func (m *PodsMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *PodsMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PodsMetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PodsMetricStatus proto.InternalMessageInfo - -func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } -func (*ResourceMetricSource) ProtoMessage() {} -func (*ResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{22} -} -func (m *ResourceMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceMetricSource.Merge(m, src) -} -func (m *ResourceMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ResourceMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceMetricSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceMetricSource proto.InternalMessageInfo - -func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } -func (*ResourceMetricStatus) ProtoMessage() {} -func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_4d5f2c8767749221, []int{23} -} -func (m *ResourceMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceMetricStatus.Merge(m, src) -} -func (m *ResourceMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ResourceMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceMetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceMetricStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ContainerResourceMetricSource)(nil), "k8s.io.api.autoscaling.v2.ContainerResourceMetricSource") - proto.RegisterType((*ContainerResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v2.ContainerResourceMetricStatus") - proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.api.autoscaling.v2.CrossVersionObjectReference") - proto.RegisterType((*ExternalMetricSource)(nil), "k8s.io.api.autoscaling.v2.ExternalMetricSource") - proto.RegisterType((*ExternalMetricStatus)(nil), "k8s.io.api.autoscaling.v2.ExternalMetricStatus") - proto.RegisterType((*HPAScalingPolicy)(nil), "k8s.io.api.autoscaling.v2.HPAScalingPolicy") - proto.RegisterType((*HPAScalingRules)(nil), "k8s.io.api.autoscaling.v2.HPAScalingRules") - proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.api.autoscaling.v2.HorizontalPodAutoscaler") - proto.RegisterType((*HorizontalPodAutoscalerBehavior)(nil), "k8s.io.api.autoscaling.v2.HorizontalPodAutoscalerBehavior") - proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.api.autoscaling.v2.HorizontalPodAutoscalerCondition") - proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.api.autoscaling.v2.HorizontalPodAutoscalerList") - proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.api.autoscaling.v2.HorizontalPodAutoscalerSpec") - proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.api.autoscaling.v2.HorizontalPodAutoscalerStatus") - proto.RegisterType((*MetricIdentifier)(nil), "k8s.io.api.autoscaling.v2.MetricIdentifier") - proto.RegisterType((*MetricSpec)(nil), "k8s.io.api.autoscaling.v2.MetricSpec") - proto.RegisterType((*MetricStatus)(nil), "k8s.io.api.autoscaling.v2.MetricStatus") - proto.RegisterType((*MetricTarget)(nil), "k8s.io.api.autoscaling.v2.MetricTarget") - proto.RegisterType((*MetricValueStatus)(nil), "k8s.io.api.autoscaling.v2.MetricValueStatus") - proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.api.autoscaling.v2.ObjectMetricSource") - proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.api.autoscaling.v2.ObjectMetricStatus") - proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.api.autoscaling.v2.PodsMetricSource") - proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.api.autoscaling.v2.PodsMetricStatus") - proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.api.autoscaling.v2.ResourceMetricSource") - proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v2.ResourceMetricStatus") -} - -func init() { - proto.RegisterFile("k8s.io/api/autoscaling/v2/generated.proto", fileDescriptor_4d5f2c8767749221) -} - -var fileDescriptor_4d5f2c8767749221 = []byte{ - // 1742 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xc9, 0x8f, 0x1b, 0x4b, - 0x19, 0x9f, 0xb6, 0x3d, 0x5b, 0x79, 0xd6, 0xca, 0xe6, 0x4c, 0x14, 0x7b, 0xd4, 0x04, 0xb2, 0x40, - 0xda, 0xc4, 0x84, 0x28, 0x22, 0x07, 0x34, 0x3d, 0x01, 0x32, 0xca, 0x0c, 0xe3, 0x94, 0x27, 0x19, - 0x76, 0xa5, 0xdc, 0x5d, 0xe3, 0x29, 0xc6, 0xee, 0xb6, 0xba, 0xdb, 0x4e, 0x26, 0x12, 0x12, 0x17, - 0xee, 0x08, 0x14, 0xf1, 0x4f, 0x44, 0x9c, 0x40, 0xe1, 0x00, 0x12, 0x12, 0x1c, 0x72, 0x41, 0xca, - 0x81, 0x43, 0x4e, 0x16, 0x31, 0xd2, 0x3b, 0xbe, 0xe3, 0x3b, 0xe4, 0xf4, 0x54, 0x4b, 0xaf, 0xde, - 0xc6, 0x79, 0x93, 0x91, 0xe6, 0xe6, 0xaa, 0xfa, 0xbe, 0xdf, 0xb7, 0xd4, 0xb7, 0x55, 0x1b, 0x5c, - 0x3f, 0xb8, 0xeb, 0x6a, 0xd4, 0x2e, 0xe2, 0x26, 0x2d, 0xe2, 0x96, 0x67, 0xbb, 0x06, 0xae, 0x53, - 0xab, 0x56, 0x6c, 0x97, 0x8a, 0x35, 0x62, 0x11, 0x07, 0x7b, 0xc4, 0xd4, 0x9a, 0x8e, 0xed, 0xd9, - 0xf0, 0xa2, 0x20, 0xd5, 0x70, 0x93, 0x6a, 0x11, 0x52, 0xad, 0x5d, 0x5a, 0xb9, 0x59, 0xa3, 0xde, - 0x7e, 0xab, 0xaa, 0x19, 0x76, 0xa3, 0x58, 0xb3, 0x6b, 0x76, 0x91, 0x73, 0x54, 0x5b, 0x7b, 0x7c, - 0xc5, 0x17, 0xfc, 0x97, 0x40, 0x5a, 0x51, 0x23, 0x42, 0x0d, 0xdb, 0x21, 0xc5, 0xf6, 0xad, 0xa4, - 0xb4, 0x95, 0xdb, 0x21, 0x4d, 0x03, 0x1b, 0xfb, 0xd4, 0x22, 0xce, 0x61, 0xb1, 0x79, 0x50, 0xe3, - 0x4c, 0x0e, 0x71, 0xed, 0x96, 0x63, 0x90, 0xb1, 0xb8, 0xdc, 0x62, 0x83, 0x78, 0xb8, 0x9f, 0xac, - 0xe2, 0x20, 0x2e, 0xa7, 0x65, 0x79, 0xb4, 0xd1, 0x2b, 0xe6, 0xce, 0x28, 0x06, 0xd7, 0xd8, 0x27, - 0x0d, 0x9c, 0xe4, 0x53, 0x3f, 0x53, 0xc0, 0xe5, 0x75, 0xdb, 0xf2, 0x30, 0xe3, 0x40, 0xd2, 0x88, - 0x2d, 0xe2, 0x39, 0xd4, 0xa8, 0xf0, 0xdf, 0x70, 0x1d, 0x64, 0x2c, 0xdc, 0x20, 0x39, 0x65, 0x55, - 0xb9, 0x36, 0xab, 0x17, 0xdf, 0x74, 0x0a, 0x13, 0xdd, 0x4e, 0x21, 0xf3, 0x63, 0xdc, 0x20, 0x1f, - 0x3a, 0x85, 0x42, 0xaf, 0xe3, 0x34, 0x1f, 0x86, 0x91, 0x20, 0xce, 0x0c, 0xb7, 0xc1, 0x94, 0x87, - 0x9d, 0x1a, 0xf1, 0x72, 0xa9, 0x55, 0xe5, 0x5a, 0xb6, 0x74, 0x55, 0x1b, 0x78, 0x75, 0x9a, 0x90, - 0xbe, 0xc3, 0xc9, 0xf5, 0x05, 0x29, 0x6f, 0x4a, 0xac, 0x91, 0x84, 0x81, 0x45, 0x30, 0x6b, 0xf8, - 0x6a, 0xe7, 0xd2, 0x5c, 0xb5, 0x65, 0x49, 0x3a, 0x1b, 0xda, 0x13, 0xd2, 0xa8, 0x9f, 0x0f, 0x31, - 0xd4, 0xc3, 0x5e, 0xcb, 0x3d, 0x1e, 0x43, 0x77, 0xc1, 0xb4, 0xd1, 0x72, 0x1c, 0x62, 0xf9, 0x96, - 0x7e, 0x6b, 0xa4, 0xa5, 0x4f, 0x70, 0xbd, 0x45, 0x84, 0x0e, 0xfa, 0xa2, 0x94, 0x3a, 0xbd, 0x2e, - 0x40, 0x90, 0x8f, 0x36, 0xbe, 0xc1, 0x2f, 0x15, 0x70, 0x69, 0xdd, 0xb1, 0x5d, 0xf7, 0x09, 0x71, - 0x5c, 0x6a, 0x5b, 0xdb, 0xd5, 0x5f, 0x13, 0xc3, 0x43, 0x64, 0x8f, 0x38, 0xc4, 0x32, 0x08, 0x5c, - 0x05, 0x99, 0x03, 0x6a, 0x99, 0xd2, 0xdc, 0x39, 0xdf, 0xdc, 0x87, 0xd4, 0x32, 0x11, 0x3f, 0x61, - 0x14, 0xdc, 0x21, 0xa9, 0x38, 0x45, 0xc4, 0xda, 0x12, 0x00, 0xb8, 0x49, 0xa5, 0x00, 0xa9, 0x15, - 0x94, 0x74, 0x60, 0xad, 0xbc, 0x21, 0x4f, 0x50, 0x84, 0x4a, 0xfd, 0xbb, 0x02, 0xce, 0xfe, 0xe0, - 0xb9, 0x47, 0x1c, 0x0b, 0xd7, 0x63, 0x81, 0x56, 0x01, 0x53, 0x0d, 0xbe, 0xe6, 0x2a, 0x65, 0x4b, - 0xdf, 0x1c, 0xe9, 0xb9, 0x0d, 0x93, 0x58, 0x1e, 0xdd, 0xa3, 0xc4, 0x09, 0xe3, 0x44, 0x9c, 0x20, - 0x09, 0x75, 0xec, 0x81, 0xa7, 0xfe, 0xbb, 0x57, 0x7d, 0x11, 0x3e, 0x9f, 0x44, 0xfd, 0x4f, 0x15, - 0x4e, 0xea, 0x9f, 0x15, 0xb0, 0xf4, 0xa0, 0xbc, 0x56, 0x11, 0xdc, 0x65, 0xbb, 0x4e, 0x8d, 0x43, - 0x78, 0x17, 0x64, 0xbc, 0xc3, 0xa6, 0x9f, 0x01, 0x57, 0xfc, 0x0b, 0xdf, 0x39, 0x6c, 0xb2, 0x0c, - 0x38, 0x9b, 0xa4, 0x67, 0xfb, 0x88, 0x73, 0xc0, 0xaf, 0x81, 0xc9, 0x36, 0x93, 0xcb, 0xb5, 0x9c, - 0xd4, 0xe7, 0x25, 0xeb, 0x24, 0x57, 0x06, 0x89, 0x33, 0x78, 0x0f, 0xcc, 0x37, 0x89, 0x43, 0x6d, - 0xb3, 0x42, 0x0c, 0xdb, 0x32, 0x5d, 0x1e, 0x30, 0x93, 0xfa, 0x39, 0x49, 0x3c, 0x5f, 0x8e, 0x1e, - 0xa2, 0x38, 0xad, 0xfa, 0x45, 0x0a, 0x2c, 0x86, 0x0a, 0xa0, 0x56, 0x9d, 0xb8, 0xf0, 0x57, 0x60, - 0xc5, 0xf5, 0x70, 0x95, 0xd6, 0xe9, 0x0b, 0xec, 0x51, 0xdb, 0xda, 0xa5, 0x96, 0x69, 0x3f, 0x8b, - 0xa3, 0xe7, 0xbb, 0x9d, 0xc2, 0x4a, 0x65, 0x20, 0x15, 0x1a, 0x82, 0x00, 0x1f, 0x82, 0x39, 0x97, - 0xd4, 0x89, 0xe1, 0x09, 0x7b, 0xa5, 0x5f, 0xae, 0x76, 0x3b, 0x85, 0xb9, 0x4a, 0x64, 0xff, 0x43, - 0xa7, 0x70, 0x26, 0xe6, 0x18, 0x71, 0x88, 0x62, 0xcc, 0xf0, 0xa7, 0x60, 0xa6, 0xc9, 0x7e, 0x51, - 0xe2, 0xe6, 0x52, 0xab, 0xe9, 0x11, 0x11, 0x92, 0xf4, 0xb5, 0xbe, 0x24, 0xbd, 0x34, 0x53, 0x96, - 0x20, 0x28, 0x80, 0x83, 0x3f, 0x07, 0xb3, 0x9e, 0x5d, 0x27, 0x0e, 0xb6, 0x0c, 0x92, 0xcb, 0xf0, - 0x38, 0xd1, 0x22, 0xd8, 0x41, 0x43, 0xd0, 0x9a, 0x07, 0x35, 0x2e, 0xcc, 0xef, 0x56, 0xda, 0xa3, - 0x16, 0xb6, 0x3c, 0xea, 0x1d, 0xea, 0xf3, 0xac, 0x8e, 0xec, 0xf8, 0x20, 0x28, 0xc4, 0x53, 0x5f, - 0xa7, 0xc0, 0x85, 0x07, 0xb6, 0x43, 0x5f, 0xb0, 0xca, 0x52, 0x2f, 0xdb, 0xe6, 0x9a, 0xd4, 0x94, - 0x38, 0xf0, 0x29, 0x98, 0x61, 0x1d, 0xcc, 0xc4, 0x1e, 0x96, 0x51, 0xff, 0xed, 0x61, 0x72, 0x5d, - 0x8d, 0x51, 0x6b, 0xed, 0x5b, 0x9a, 0x28, 0x46, 0x5b, 0xc4, 0xc3, 0x61, 0xbd, 0x08, 0xf7, 0x50, - 0x80, 0x0a, 0x7f, 0x02, 0x32, 0x6e, 0x93, 0x18, 0x32, 0xfa, 0xef, 0x0c, 0xf3, 0x58, 0x7f, 0x1d, - 0x2b, 0x4d, 0x62, 0x84, 0xb5, 0x8b, 0xad, 0x10, 0x47, 0x84, 0x4f, 0xc1, 0x94, 0xcb, 0xb3, 0x84, - 0x07, 0x4a, 0xb6, 0x74, 0xf7, 0x23, 0xb0, 0x45, 0x96, 0x05, 0xc9, 0x2b, 0xd6, 0x48, 0xe2, 0xaa, - 0xff, 0x51, 0x40, 0x61, 0x00, 0xa7, 0x4e, 0xf6, 0x71, 0x9b, 0xda, 0x0e, 0x7c, 0x04, 0xa6, 0xf9, - 0xce, 0xe3, 0xa6, 0x74, 0xe0, 0x8d, 0x23, 0x05, 0x05, 0x8f, 0x7f, 0x3d, 0xcb, 0x52, 0xbb, 0x22, - 0xd8, 0x91, 0x8f, 0x03, 0x77, 0xc1, 0x2c, 0xff, 0x79, 0xdf, 0x7e, 0x66, 0x49, 0xbf, 0x8d, 0x03, - 0xca, 0x23, 0xa1, 0xe2, 0x03, 0xa0, 0x10, 0x4b, 0xfd, 0x5d, 0x1a, 0xac, 0x0e, 0xb0, 0x67, 0xdd, - 0xb6, 0x4c, 0xca, 0x12, 0x08, 0x3e, 0x88, 0xd5, 0x90, 0xdb, 0x89, 0x1a, 0x72, 0x65, 0x14, 0x7f, - 0xa4, 0xa6, 0x6c, 0x06, 0x17, 0x94, 0x8a, 0x61, 0x49, 0x37, 0x7f, 0xe8, 0x14, 0xfa, 0x4c, 0x6d, - 0x5a, 0x80, 0x14, 0xbf, 0x0c, 0xd8, 0x06, 0xb0, 0x8e, 0x5d, 0x6f, 0xc7, 0xc1, 0x96, 0x2b, 0x24, - 0xd1, 0x06, 0x91, 0x57, 0x7f, 0xe3, 0x68, 0x41, 0xcb, 0x38, 0xf4, 0x15, 0xa9, 0x05, 0xdc, 0xec, - 0x41, 0x43, 0x7d, 0x24, 0xc0, 0x6f, 0x80, 0x29, 0x87, 0x60, 0xd7, 0xb6, 0x78, 0x62, 0xce, 0x86, - 0xc1, 0x82, 0xf8, 0x2e, 0x92, 0xa7, 0xf0, 0x3a, 0x98, 0x6e, 0x10, 0xd7, 0xc5, 0x35, 0x92, 0x9b, - 0xe4, 0x84, 0x41, 0xed, 0xde, 0x12, 0xdb, 0xc8, 0x3f, 0x57, 0xff, 0xab, 0x80, 0x4b, 0x03, 0xfc, - 0xb8, 0x49, 0x5d, 0x0f, 0xfe, 0xa2, 0x27, 0x2b, 0xb5, 0xa3, 0x19, 0xc8, 0xb8, 0x79, 0x4e, 0x06, - 0xc5, 0xc6, 0xdf, 0x89, 0x64, 0xe4, 0x2e, 0x98, 0xa4, 0x1e, 0x69, 0xf8, 0x45, 0xac, 0x34, 0x7e, - 0xda, 0x84, 0xed, 0x61, 0x83, 0x01, 0x21, 0x81, 0xa7, 0xbe, 0x4e, 0x0f, 0x34, 0x8b, 0xa5, 0x2d, - 0x6c, 0x83, 0x05, 0xbe, 0x92, 0x0d, 0x99, 0xec, 0x49, 0xe3, 0x86, 0x15, 0x85, 0x21, 0x03, 0x90, - 0x7e, 0x5e, 0x6a, 0xb1, 0x50, 0x89, 0xa1, 0xa2, 0x84, 0x14, 0x78, 0x0b, 0x64, 0x1b, 0xd4, 0x42, - 0xa4, 0x59, 0xa7, 0x06, 0x76, 0x65, 0x87, 0x5b, 0xec, 0x76, 0x0a, 0xd9, 0xad, 0x70, 0x1b, 0x45, - 0x69, 0xe0, 0x77, 0x41, 0xb6, 0x81, 0x9f, 0x07, 0x2c, 0xa2, 0x13, 0x9d, 0x91, 0xf2, 0xb2, 0x5b, - 0xe1, 0x11, 0x8a, 0xd2, 0xc1, 0x32, 0x8b, 0x01, 0xd6, 0xc3, 0xdd, 0x5c, 0x86, 0x3b, 0xf7, 0xeb, - 0x23, 0xbb, 0x3d, 0x2f, 0x6f, 0x91, 0x50, 0xe1, 0xdc, 0xc8, 0x87, 0x81, 0x26, 0x98, 0xa9, 0xca, - 0x52, 0xc3, 0xc3, 0x2a, 0x5b, 0xfa, 0xde, 0x47, 0xdc, 0x97, 0x44, 0xd0, 0xe7, 0x58, 0x48, 0xf8, - 0x2b, 0x14, 0x20, 0xab, 0xaf, 0x32, 0xe0, 0xf2, 0xd0, 0x12, 0x09, 0x7f, 0x08, 0xa0, 0x5d, 0x75, - 0x89, 0xd3, 0x26, 0xe6, 0x8f, 0xc4, 0x0b, 0x84, 0x0d, 0x8c, 0xec, 0xfe, 0xd2, 0xfa, 0x79, 0x96, - 0x4d, 0xdb, 0x3d, 0xa7, 0xa8, 0x0f, 0x07, 0x34, 0xc0, 0x3c, 0xcb, 0x31, 0x71, 0x63, 0x54, 0xce, - 0xa6, 0xe3, 0x25, 0xf0, 0x32, 0x1b, 0x35, 0x36, 0xa3, 0x20, 0x28, 0x8e, 0x09, 0xd7, 0xc0, 0xa2, - 0x1c, 0x93, 0x12, 0x37, 0x78, 0x41, 0xfa, 0x79, 0x71, 0x3d, 0x7e, 0x8c, 0x92, 0xf4, 0x0c, 0xc2, - 0x24, 0x2e, 0x75, 0x88, 0x19, 0x40, 0x64, 0xe2, 0x10, 0xf7, 0xe3, 0xc7, 0x28, 0x49, 0x0f, 0x6b, - 0x60, 0x41, 0xa2, 0xca, 0x5b, 0xcd, 0x4d, 0xf2, 0x98, 0x18, 0x3d, 0xc1, 0xca, 0xb6, 0x14, 0xc4, - 0xf7, 0x7a, 0x0c, 0x06, 0x25, 0x60, 0xa1, 0x0d, 0x80, 0xe1, 0x17, 0x4d, 0x37, 0x37, 0xc5, 0x85, - 0xdc, 0x1b, 0x3f, 0x4a, 0x82, 0xc2, 0x1b, 0x76, 0xf4, 0x60, 0xcb, 0x45, 0x11, 0x11, 0xea, 0x1f, - 0x15, 0xb0, 0x94, 0x9c, 0x80, 0x83, 0xc7, 0x86, 0x32, 0xf0, 0xb1, 0xf1, 0x4b, 0x30, 0x23, 0x06, - 0x2a, 0xdb, 0x91, 0xd7, 0xfe, 0x9d, 0x23, 0x96, 0x35, 0x5c, 0x25, 0xf5, 0x8a, 0x64, 0x15, 0x41, - 0xec, 0xaf, 0x50, 0x00, 0xa9, 0xbe, 0xcc, 0x00, 0x10, 0xe6, 0x14, 0xbc, 0x1d, 0xeb, 0x63, 0xab, - 0x89, 0x3e, 0xb6, 0x14, 0x7d, 0xb9, 0x44, 0x7a, 0xd6, 0x23, 0x30, 0x65, 0xf3, 0x32, 0x23, 0x35, - 0xbc, 0x39, 0xc4, 0x8f, 0xc1, 0xbc, 0x13, 0x00, 0xe9, 0x80, 0x35, 0x06, 0x59, 0xa7, 0x24, 0x10, - 0xdc, 0x00, 0x99, 0xa6, 0x6d, 0xfa, 0x53, 0xca, 0xb0, 0x99, 0xb1, 0x6c, 0x9b, 0x6e, 0x0c, 0x6e, - 0x86, 0x69, 0xcc, 0x76, 0x11, 0x87, 0x60, 0x23, 0xa8, 0x3f, 0xf9, 0xc9, 0x31, 0xb1, 0x38, 0x04, - 0xae, 0xdf, 0xd7, 0x00, 0xe1, 0x3d, 0xff, 0x04, 0x05, 0x70, 0xf0, 0x37, 0x60, 0xd9, 0x48, 0xbe, - 0xae, 0x73, 0xd3, 0x23, 0x07, 0xab, 0xa1, 0x9f, 0x1e, 0xf4, 0x73, 0xdd, 0x4e, 0x61, 0xb9, 0x87, - 0x04, 0xf5, 0x4a, 0x62, 0x96, 0x11, 0xf9, 0x28, 0x93, 0x75, 0x6e, 0x98, 0x65, 0xfd, 0x9e, 0x9f, - 0xc2, 0x32, 0xff, 0x04, 0x05, 0x70, 0xea, 0x9f, 0x32, 0x60, 0x2e, 0xf6, 0xd0, 0x3b, 0xe1, 0xc8, - 0x10, 0xc9, 0x7c, 0x6c, 0x91, 0x21, 0xe0, 0x8e, 0x35, 0x32, 0x04, 0xe4, 0x09, 0x45, 0x86, 0x10, - 0x76, 0x42, 0x91, 0x11, 0xb1, 0xac, 0x4f, 0x64, 0xfc, 0x2b, 0xe5, 0x47, 0x86, 0x18, 0x16, 0x8e, - 0x16, 0x19, 0x82, 0x36, 0x12, 0x19, 0xdb, 0xd1, 0xb7, 0xf3, 0xf8, 0x2f, 0xb7, 0xd9, 0x9e, 0x77, - 0xb6, 0x09, 0xe6, 0x70, 0x9b, 0x38, 0xb8, 0x46, 0xf8, 0xb6, 0x8c, 0x8f, 0x71, 0x71, 0x97, 0xd8, - 0x33, 0x77, 0x2d, 0x82, 0x83, 0x62, 0xa8, 0xac, 0xa5, 0xcb, 0xf5, 0x63, 0x2f, 0x78, 0x3f, 0xcb, - 0x2e, 0xc7, 0x5b, 0xfa, 0x5a, 0xcf, 0x29, 0xea, 0xc3, 0xa1, 0xfe, 0x21, 0x05, 0x96, 0x7b, 0xbe, - 0x5c, 0x84, 0x4e, 0x51, 0x3e, 0x91, 0x53, 0x52, 0x27, 0xe8, 0x94, 0xf4, 0xd8, 0x4e, 0xf9, 0x6b, - 0x0a, 0xc0, 0xde, 0xfe, 0x00, 0x0f, 0xf9, 0x58, 0x61, 0x38, 0xb4, 0x4a, 0x4c, 0x71, 0xfc, 0x15, - 0x67, 0xe0, 0xe8, 0x38, 0x12, 0x85, 0x45, 0x49, 0x39, 0xc7, 0xff, 0x05, 0x37, 0xfc, 0x5e, 0x96, - 0x3e, 0xb6, 0xef, 0x65, 0xea, 0x3f, 0x92, 0x7e, 0x3b, 0x85, 0xdf, 0xe6, 0xfa, 0xdd, 0x72, 0xfa, - 0x64, 0x6e, 0x59, 0xfd, 0x9b, 0x02, 0x96, 0x92, 0x63, 0xc4, 0x29, 0xf9, 0x30, 0xfb, 0xcf, 0xb8, - 0xea, 0xa7, 0xf1, 0xa3, 0xec, 0x2b, 0x05, 0x9c, 0x3d, 0x3d, 0xff, 0xc1, 0xa8, 0x7f, 0xe9, 0x55, - 0xf7, 0x14, 0xfc, 0x93, 0xa2, 0x7f, 0xff, 0xcd, 0xfb, 0xfc, 0xc4, 0xdb, 0xf7, 0xf9, 0x89, 0x77, - 0xef, 0xf3, 0x13, 0xbf, 0xed, 0xe6, 0x95, 0x37, 0xdd, 0xbc, 0xf2, 0xb6, 0x9b, 0x57, 0xde, 0x75, - 0xf3, 0xca, 0xff, 0xba, 0x79, 0xe5, 0xf7, 0xff, 0xcf, 0x4f, 0xfc, 0xec, 0xe2, 0xc0, 0xbf, 0x21, - 0xbf, 0x0c, 0x00, 0x00, 0xff, 0xff, 0xbe, 0x23, 0xae, 0x54, 0xa2, 0x1c, 0x00, 0x00, -} +func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/autoscaling/v2/generated.protomessage.pb.go b/staging/src/k8s.io/api/autoscaling/v2/generated.protomessage.pb.go new file mode 100644 index 0000000000000..0a73d526bc297 --- /dev/null +++ b/staging/src/k8s.io/api/autoscaling/v2/generated.protomessage.pb.go @@ -0,0 +1,70 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v2 + +func (*ContainerResourceMetricSource) ProtoMessage() {} + +func (*ContainerResourceMetricStatus) ProtoMessage() {} + +func (*CrossVersionObjectReference) ProtoMessage() {} + +func (*ExternalMetricSource) ProtoMessage() {} + +func (*ExternalMetricStatus) ProtoMessage() {} + +func (*HPAScalingPolicy) ProtoMessage() {} + +func (*HPAScalingRules) ProtoMessage() {} + +func (*HorizontalPodAutoscaler) ProtoMessage() {} + +func (*HorizontalPodAutoscalerBehavior) ProtoMessage() {} + +func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} + +func (*HorizontalPodAutoscalerList) ProtoMessage() {} + +func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} + +func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} + +func (*MetricIdentifier) ProtoMessage() {} + +func (*MetricSpec) ProtoMessage() {} + +func (*MetricStatus) ProtoMessage() {} + +func (*MetricTarget) ProtoMessage() {} + +func (*MetricValueStatus) ProtoMessage() {} + +func (*ObjectMetricSource) ProtoMessage() {} + +func (*ObjectMetricStatus) ProtoMessage() {} + +func (*PodsMetricSource) ProtoMessage() {} + +func (*PodsMetricStatus) ProtoMessage() {} + +func (*ResourceMetricSource) ProtoMessage() {} + +func (*ResourceMetricStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/autoscaling/v2/zz_generated.model_name.go b/staging/src/k8s.io/api/autoscaling/v2/zz_generated.model_name.go new file mode 100644 index 0000000000000..b15b34219b62c --- /dev/null +++ b/staging/src/k8s.io/api/autoscaling/v2/zz_generated.model_name.go @@ -0,0 +1,142 @@ +//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 openapi-gen. DO NOT EDIT. + +package v2 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerResourceMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.ContainerResourceMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerResourceMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.ContainerResourceMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CrossVersionObjectReference) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.CrossVersionObjectReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExternalMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.ExternalMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExternalMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.ExternalMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HPAScalingPolicy) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.HPAScalingPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HPAScalingRules) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.HPAScalingRules" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscaler) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerBehavior) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerCondition) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerList) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerSpec) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MetricIdentifier) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.MetricIdentifier" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MetricSpec) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.MetricSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.MetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MetricTarget) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.MetricTarget" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MetricValueStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.MetricValueStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ObjectMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.ObjectMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ObjectMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.ObjectMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodsMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.PodsMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodsMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.PodsMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.ResourceMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2.ResourceMetricStatus" +} diff --git a/staging/src/k8s.io/api/autoscaling/v2beta1/doc.go b/staging/src/k8s.io/api/autoscaling/v2beta1/doc.go index eac92e86e8070..58cc1f89dc7ca 100644 --- a/staging/src/k8s.io/api/autoscaling/v2beta1/doc.go +++ b/staging/src/k8s.io/api/autoscaling/v2beta1/doc.go @@ -18,5 +18,6 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.autoscaling.v2beta1 package v2beta1 diff --git a/staging/src/k8s.io/api/autoscaling/v2beta1/generated.pb.go b/staging/src/k8s.io/api/autoscaling/v2beta1/generated.pb.go index 69567089b6fcc..b3b535adc718b 100644 --- a/staging/src/k8s.io/api/autoscaling/v2beta1/generated.pb.go +++ b/staging/src/k8s.io/api/autoscaling/v2beta1/generated.pb.go @@ -24,658 +24,50 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - k8s_io_api_core_v1 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } -func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } -func (*ContainerResourceMetricSource) ProtoMessage() {} -func (*ContainerResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{0} -} -func (m *ContainerResourceMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerResourceMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerResourceMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerResourceMetricSource.Merge(m, src) -} -func (m *ContainerResourceMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ContainerResourceMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerResourceMetricSource.DiscardUnknown(m) -} +func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } -var xxx_messageInfo_ContainerResourceMetricSource proto.InternalMessageInfo +func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } -func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } -func (*ContainerResourceMetricStatus) ProtoMessage() {} -func (*ContainerResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{1} -} -func (m *ContainerResourceMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerResourceMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerResourceMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerResourceMetricStatus.Merge(m, src) -} -func (m *ContainerResourceMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ContainerResourceMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerResourceMetricStatus.DiscardUnknown(m) -} +func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } -var xxx_messageInfo_ContainerResourceMetricStatus proto.InternalMessageInfo +func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } -func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } -func (*CrossVersionObjectReference) ProtoMessage() {} -func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{2} -} -func (m *CrossVersionObjectReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CrossVersionObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CrossVersionObjectReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_CrossVersionObjectReference.Merge(m, src) -} -func (m *CrossVersionObjectReference) XXX_Size() int { - return m.Size() -} -func (m *CrossVersionObjectReference) XXX_DiscardUnknown() { - xxx_messageInfo_CrossVersionObjectReference.DiscardUnknown(m) -} +func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } -var xxx_messageInfo_CrossVersionObjectReference proto.InternalMessageInfo +func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } -func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } -func (*ExternalMetricSource) ProtoMessage() {} -func (*ExternalMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{3} -} -func (m *ExternalMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExternalMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExternalMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExternalMetricSource.Merge(m, src) -} -func (m *ExternalMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ExternalMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ExternalMetricSource.DiscardUnknown(m) -} +func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } -var xxx_messageInfo_ExternalMetricSource proto.InternalMessageInfo +func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } -func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } -func (*ExternalMetricStatus) ProtoMessage() {} -func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{4} -} -func (m *ExternalMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExternalMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExternalMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExternalMetricStatus.Merge(m, src) -} -func (m *ExternalMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ExternalMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ExternalMetricStatus.DiscardUnknown(m) -} +func (m *MetricSpec) Reset() { *m = MetricSpec{} } -var xxx_messageInfo_ExternalMetricStatus proto.InternalMessageInfo +func (m *MetricStatus) Reset() { *m = MetricStatus{} } -func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } -func (*HorizontalPodAutoscaler) ProtoMessage() {} -func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{5} -} -func (m *HorizontalPodAutoscaler) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscaler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscaler) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscaler.Merge(m, src) -} -func (m *HorizontalPodAutoscaler) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscaler) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscaler.DiscardUnknown(m) -} +func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } -var xxx_messageInfo_HorizontalPodAutoscaler proto.InternalMessageInfo +func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } -func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } -func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} -func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{6} -} -func (m *HorizontalPodAutoscalerCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerCondition.Merge(m, src) -} -func (m *HorizontalPodAutoscalerCondition) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerCondition) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerCondition.DiscardUnknown(m) -} +func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } -var xxx_messageInfo_HorizontalPodAutoscalerCondition proto.InternalMessageInfo +func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } -func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } -func (*HorizontalPodAutoscalerList) ProtoMessage() {} -func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{7} -} -func (m *HorizontalPodAutoscalerList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerList) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerList.Merge(m, src) -} -func (m *HorizontalPodAutoscalerList) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerList) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerList.DiscardUnknown(m) -} - -var xxx_messageInfo_HorizontalPodAutoscalerList proto.InternalMessageInfo - -func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } -func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} -func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{8} -} -func (m *HorizontalPodAutoscalerSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerSpec.Merge(m, src) -} -func (m *HorizontalPodAutoscalerSpec) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerSpec) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_HorizontalPodAutoscalerSpec proto.InternalMessageInfo - -func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } -func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} -func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{9} -} -func (m *HorizontalPodAutoscalerStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerStatus.Merge(m, src) -} -func (m *HorizontalPodAutoscalerStatus) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerStatus) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerStatus.DiscardUnknown(m) -} +func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } -var xxx_messageInfo_HorizontalPodAutoscalerStatus proto.InternalMessageInfo - -func (m *MetricSpec) Reset() { *m = MetricSpec{} } -func (*MetricSpec) ProtoMessage() {} -func (*MetricSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{10} -} -func (m *MetricSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MetricSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricSpec.Merge(m, src) -} -func (m *MetricSpec) XXX_Size() int { - return m.Size() -} -func (m *MetricSpec) XXX_DiscardUnknown() { - xxx_messageInfo_MetricSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricSpec proto.InternalMessageInfo - -func (m *MetricStatus) Reset() { *m = MetricStatus{} } -func (*MetricStatus) ProtoMessage() {} -func (*MetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{11} -} -func (m *MetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricStatus.Merge(m, src) -} -func (m *MetricStatus) XXX_Size() int { - return m.Size() -} -func (m *MetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_MetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricStatus proto.InternalMessageInfo - -func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } -func (*ObjectMetricSource) ProtoMessage() {} -func (*ObjectMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{12} -} -func (m *ObjectMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ObjectMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectMetricSource.Merge(m, src) -} -func (m *ObjectMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ObjectMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectMetricSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ObjectMetricSource proto.InternalMessageInfo - -func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } -func (*ObjectMetricStatus) ProtoMessage() {} -func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{13} -} -func (m *ObjectMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ObjectMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectMetricStatus.Merge(m, src) -} -func (m *ObjectMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ObjectMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectMetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ObjectMetricStatus proto.InternalMessageInfo - -func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } -func (*PodsMetricSource) ProtoMessage() {} -func (*PodsMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{14} -} -func (m *PodsMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodsMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodsMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodsMetricSource.Merge(m, src) -} -func (m *PodsMetricSource) XXX_Size() int { - return m.Size() -} -func (m *PodsMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_PodsMetricSource.DiscardUnknown(m) -} - -var xxx_messageInfo_PodsMetricSource proto.InternalMessageInfo - -func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } -func (*PodsMetricStatus) ProtoMessage() {} -func (*PodsMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{15} -} -func (m *PodsMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodsMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodsMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodsMetricStatus.Merge(m, src) -} -func (m *PodsMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *PodsMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PodsMetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PodsMetricStatus proto.InternalMessageInfo - -func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } -func (*ResourceMetricSource) ProtoMessage() {} -func (*ResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{16} -} -func (m *ResourceMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceMetricSource.Merge(m, src) -} -func (m *ResourceMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ResourceMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceMetricSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceMetricSource proto.InternalMessageInfo - -func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } -func (*ResourceMetricStatus) ProtoMessage() {} -func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ea74040359c1ed83, []int{17} -} -func (m *ResourceMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceMetricStatus.Merge(m, src) -} -func (m *ResourceMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ResourceMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceMetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceMetricStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ContainerResourceMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ContainerResourceMetricSource") - proto.RegisterType((*ContainerResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ContainerResourceMetricStatus") - proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.api.autoscaling.v2beta1.CrossVersionObjectReference") - proto.RegisterType((*ExternalMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ExternalMetricSource") - proto.RegisterType((*ExternalMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ExternalMetricStatus") - proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscaler") - proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition") - proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerList") - proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec") - proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus") - proto.RegisterType((*MetricSpec)(nil), "k8s.io.api.autoscaling.v2beta1.MetricSpec") - proto.RegisterType((*MetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.MetricStatus") - proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ObjectMetricSource") - proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ObjectMetricStatus") - proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.PodsMetricSource") - proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.PodsMetricStatus") - proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ResourceMetricSource") - proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ResourceMetricStatus") -} - -func init() { - proto.RegisterFile("k8s.io/api/autoscaling/v2beta1/generated.proto", fileDescriptor_ea74040359c1ed83) -} - -var fileDescriptor_ea74040359c1ed83 = []byte{ - // 1549 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6c, 0x1b, 0xc5, - 0x17, 0x8f, 0xed, 0x4d, 0x9a, 0x3c, 0xa7, 0xf9, 0x98, 0xf6, 0xdf, 0xba, 0xe9, 0xbf, 0x76, 0xb4, - 0xfa, 0xeb, 0xaf, 0x50, 0xc1, 0xba, 0x35, 0xe1, 0x43, 0x42, 0x48, 0xc4, 0x2e, 0xd0, 0x8a, 0xb8, - 0x2d, 0x93, 0xb4, 0x42, 0xd0, 0x22, 0x26, 0xeb, 0xa9, 0xb3, 0xc4, 0xde, 0xb5, 0x76, 0xc6, 0x51, - 0x53, 0x84, 0x84, 0x90, 0xb8, 0x73, 0x81, 0x33, 0x48, 0x5c, 0x11, 0xe2, 0x02, 0x67, 0x6e, 0x3d, - 0xf6, 0xd8, 0x0a, 0x64, 0x51, 0x73, 0xe0, 0xcc, 0xb5, 0x27, 0x34, 0xb3, 0xb3, 0xeb, 0x5d, 0xdb, - 0x6b, 0x3b, 0x6e, 0x1a, 0x3e, 0xd4, 0x9b, 0x77, 0xe7, 0xbd, 0xdf, 0x9b, 0xf9, 0xbd, 0xaf, 0x79, - 0x6b, 0x30, 0x76, 0x5e, 0x66, 0x86, 0xe5, 0xe4, 0x49, 0xc3, 0xca, 0x93, 0x26, 0x77, 0x98, 0x49, - 0x6a, 0x96, 0x5d, 0xcd, 0xef, 0x16, 0xb6, 0x28, 0x27, 0xe7, 0xf3, 0x55, 0x6a, 0x53, 0x97, 0x70, - 0x5a, 0x31, 0x1a, 0xae, 0xc3, 0x1d, 0x94, 0xf5, 0xe4, 0x0d, 0xd2, 0xb0, 0x8c, 0x90, 0xbc, 0xa1, - 0xe4, 0x97, 0x9e, 0xab, 0x5a, 0x7c, 0xbb, 0xb9, 0x65, 0x98, 0x4e, 0x3d, 0x5f, 0x75, 0xaa, 0x4e, - 0x5e, 0xaa, 0x6d, 0x35, 0x6f, 0xc9, 0x27, 0xf9, 0x20, 0x7f, 0x79, 0x70, 0x4b, 0x7a, 0xc8, 0xbc, - 0xe9, 0xb8, 0x34, 0xbf, 0xdb, 0x63, 0x72, 0x69, 0xb5, 0x23, 0x53, 0x27, 0xe6, 0xb6, 0x65, 0x53, - 0x77, 0x2f, 0xdf, 0xd8, 0xa9, 0x4a, 0x25, 0x97, 0x32, 0xa7, 0xe9, 0x9a, 0x74, 0x5f, 0x5a, 0x2c, - 0x5f, 0xa7, 0x9c, 0xf4, 0xb3, 0x95, 0x8f, 0xd3, 0x72, 0x9b, 0x36, 0xb7, 0xea, 0xbd, 0x66, 0x5e, - 0x1c, 0xa6, 0xc0, 0xcc, 0x6d, 0x5a, 0x27, 0xdd, 0x7a, 0xfa, 0xef, 0x49, 0x38, 0x53, 0x72, 0x6c, - 0x4e, 0x84, 0x06, 0x56, 0x87, 0x28, 0x53, 0xee, 0x5a, 0xe6, 0x86, 0xfc, 0x8d, 0x4a, 0xa0, 0xd9, - 0xa4, 0x4e, 0x33, 0x89, 0xe5, 0xc4, 0xca, 0x4c, 0x31, 0x7f, 0xb7, 0x95, 0x9b, 0x68, 0xb7, 0x72, - 0xda, 0x65, 0x52, 0xa7, 0x8f, 0x5a, 0xb9, 0x5c, 0x2f, 0x71, 0x86, 0x0f, 0x23, 0x44, 0xb0, 0x54, - 0x46, 0xef, 0x40, 0x86, 0x13, 0xb7, 0x4a, 0xf9, 0xda, 0x2e, 0x75, 0x49, 0x95, 0x5e, 0xe3, 0x56, - 0xcd, 0xba, 0x43, 0xb8, 0xe5, 0xd8, 0x99, 0xe4, 0x72, 0x62, 0x65, 0xb2, 0xf8, 0xdf, 0x76, 0x2b, - 0x97, 0xd9, 0x8c, 0x91, 0xc1, 0xb1, 0xda, 0x68, 0x17, 0x50, 0x64, 0xed, 0x3a, 0xa9, 0x35, 0x69, - 0x26, 0xb5, 0x9c, 0x58, 0x49, 0x17, 0x0c, 0xa3, 0x13, 0x25, 0x01, 0x2b, 0x46, 0x63, 0xa7, 0x2a, - 0xc3, 0xc6, 0x77, 0x99, 0xf1, 0x76, 0x93, 0xd8, 0xdc, 0xe2, 0x7b, 0xc5, 0x13, 0xed, 0x56, 0x0e, - 0x6d, 0xf6, 0xa0, 0xe1, 0x3e, 0x16, 0x50, 0x1e, 0x66, 0x4c, 0x9f, 0xb7, 0x8c, 0x26, 0xb9, 0x59, - 0x54, 0xdc, 0xcc, 0x74, 0x08, 0xed, 0xc8, 0xe8, 0x7f, 0x0c, 0x60, 0x9a, 0x13, 0xde, 0x64, 0x07, - 0xc3, 0xf4, 0x7b, 0x70, 0xca, 0x6c, 0xba, 0x2e, 0xb5, 0xe3, 0xa9, 0x3e, 0xd3, 0x6e, 0xe5, 0x4e, - 0x95, 0xe2, 0x84, 0x70, 0xbc, 0x3e, 0xfa, 0x18, 0x8e, 0x45, 0x17, 0x1f, 0x87, 0xed, 0xd3, 0xea, - 0x80, 0xc7, 0x4a, 0xbd, 0x90, 0xb8, 0x9f, 0x9d, 0xfd, 0x73, 0xfe, 0x45, 0x02, 0x4e, 0x97, 0x5c, - 0x87, 0xb1, 0xeb, 0xd4, 0x65, 0x96, 0x63, 0x5f, 0xd9, 0xfa, 0x90, 0x9a, 0x1c, 0xd3, 0x5b, 0xd4, - 0xa5, 0xb6, 0x49, 0xd1, 0x32, 0x68, 0x3b, 0x96, 0x5d, 0x51, 0x8c, 0xcf, 0xfa, 0x8c, 0xbf, 0x65, - 0xd9, 0x15, 0x2c, 0x57, 0x84, 0x84, 0xf4, 0x49, 0x32, 0x2a, 0x11, 0x22, 0xbc, 0x00, 0x40, 0x1a, - 0x96, 0x32, 0x20, 0xa9, 0x98, 0x29, 0x22, 0x25, 0x07, 0x6b, 0x57, 0x2f, 0xa9, 0x15, 0x1c, 0x92, - 0xd2, 0xbf, 0x4c, 0xc1, 0xf1, 0xd7, 0x6f, 0x73, 0xea, 0xda, 0xa4, 0x16, 0x49, 0xb6, 0x02, 0x40, - 0x5d, 0x3e, 0x5f, 0xee, 0x04, 0x42, 0x00, 0x56, 0x0e, 0x56, 0x70, 0x48, 0x0a, 0x39, 0x30, 0xe7, - 0x3d, 0x6d, 0xd0, 0x1a, 0x35, 0xb9, 0xe3, 0xca, 0xcd, 0xa6, 0x0b, 0xcf, 0x0f, 0xf2, 0x07, 0x33, - 0x44, 0xe9, 0x31, 0x76, 0xcf, 0x1b, 0xeb, 0x64, 0x8b, 0xd6, 0x7c, 0xd5, 0x22, 0x6a, 0xb7, 0x72, - 0x73, 0xe5, 0x08, 0x1c, 0xee, 0x82, 0x47, 0x04, 0xd2, 0x5e, 0x42, 0x3c, 0x8e, 0xf7, 0xe7, 0xdb, - 0xad, 0x5c, 0x7a, 0xb3, 0x03, 0x83, 0xc3, 0x98, 0x31, 0x59, 0xad, 0x3d, 0xe9, 0xac, 0xd6, 0xbf, - 0xea, 0x75, 0x8c, 0x97, 0x9b, 0xff, 0x08, 0xc7, 0x6c, 0xc3, 0xac, 0x4a, 0x9b, 0xc7, 0xf1, 0xcc, - 0x71, 0x75, 0xac, 0xd9, 0x52, 0x08, 0x0b, 0x47, 0x90, 0xd1, 0x5e, 0xff, 0x42, 0x30, 0x9e, 0x83, - 0x4e, 0xee, 0xa7, 0x08, 0xe8, 0x3f, 0x25, 0xe1, 0xe4, 0x45, 0xc7, 0xb5, 0xee, 0x88, 0x2c, 0xaf, - 0x5d, 0x75, 0x2a, 0x6b, 0xaa, 0xfd, 0x53, 0x17, 0x7d, 0x00, 0xd3, 0x82, 0xbd, 0x0a, 0xe1, 0x44, - 0xfa, 0x28, 0x5d, 0x38, 0x37, 0x1a, 0xd7, 0x5e, 0x61, 0x28, 0x53, 0x4e, 0x3a, 0x5e, 0xed, 0xbc, - 0xc3, 0x01, 0x2a, 0xba, 0x09, 0x1a, 0x6b, 0x50, 0x53, 0x79, 0xf2, 0x15, 0x63, 0xf0, 0x35, 0xc4, - 0x88, 0xd9, 0xe8, 0x46, 0x83, 0x9a, 0x9d, 0x62, 0x22, 0x9e, 0xb0, 0x84, 0x45, 0x14, 0xa6, 0x98, - 0x0c, 0x38, 0xe5, 0xbb, 0x57, 0xc7, 0x35, 0x20, 0x41, 0x8a, 0x73, 0xca, 0xc4, 0x94, 0xf7, 0x8c, - 0x15, 0xb8, 0xfe, 0x59, 0x0a, 0x96, 0x63, 0x34, 0x4b, 0x8e, 0x5d, 0xb1, 0x64, 0xb1, 0xbf, 0x08, - 0x1a, 0xdf, 0x6b, 0xf8, 0xc1, 0xbe, 0xea, 0xef, 0x76, 0x73, 0xaf, 0x21, 0xda, 0xd1, 0xff, 0x86, - 0xe9, 0x0b, 0x39, 0x2c, 0x11, 0xd0, 0x7a, 0x70, 0xaa, 0x64, 0x04, 0x4b, 0x6d, 0xeb, 0x51, 0x2b, - 0xd7, 0xe7, 0xfe, 0x65, 0x04, 0x48, 0xd1, 0xcd, 0x8b, 0xda, 0x50, 0x23, 0x8c, 0x6f, 0xba, 0xc4, - 0x66, 0x9e, 0x25, 0xab, 0xee, 0xc7, 0xfa, 0xd9, 0xd1, 0xdc, 0x2d, 0x34, 0x8a, 0x4b, 0x6a, 0x17, - 0x68, 0xbd, 0x07, 0x0d, 0xf7, 0xb1, 0x80, 0xfe, 0x0f, 0x53, 0x2e, 0x25, 0xcc, 0xb1, 0x55, 0xeb, - 0x09, 0xc8, 0xc5, 0xf2, 0x2d, 0x56, 0xab, 0xe8, 0x19, 0x38, 0x52, 0xa7, 0x8c, 0x91, 0x2a, 0xcd, - 0x4c, 0x4a, 0xc1, 0x79, 0x25, 0x78, 0xa4, 0xec, 0xbd, 0xc6, 0xfe, 0xba, 0xfe, 0x20, 0x01, 0xa7, - 0x63, 0x78, 0x5c, 0xb7, 0x18, 0x47, 0x37, 0x7a, 0xe2, 0xd9, 0x18, 0xb1, 0x76, 0x58, 0xcc, 0x8b, - 0xe6, 0x05, 0x65, 0x7b, 0xda, 0x7f, 0x13, 0x8a, 0xe5, 0x1b, 0x30, 0x69, 0x71, 0x5a, 0x17, 0x5e, - 0x49, 0xad, 0xa4, 0x0b, 0x2f, 0x8d, 0x19, 0x6b, 0xc5, 0xa3, 0xca, 0xc6, 0xe4, 0x25, 0x81, 0x86, - 0x3d, 0x50, 0xfd, 0xe7, 0x64, 0xec, 0xd9, 0x44, 0xc0, 0xa3, 0x8f, 0x60, 0x4e, 0x3e, 0x79, 0x95, - 0x19, 0xd3, 0x5b, 0xea, 0x84, 0x43, 0x73, 0x6a, 0x40, 0x43, 0x2f, 0x9e, 0x50, 0x5b, 0x99, 0xdb, - 0x88, 0x40, 0xe3, 0x2e, 0x53, 0xe8, 0x3c, 0xa4, 0xeb, 0x96, 0x8d, 0x69, 0xa3, 0x66, 0x99, 0x84, - 0xa9, 0x7b, 0x91, 0x6c, 0x49, 0xe5, 0xce, 0x6b, 0x1c, 0x96, 0x41, 0x2f, 0x40, 0xba, 0x4e, 0x6e, - 0x07, 0x2a, 0x29, 0xa9, 0x72, 0x4c, 0xd9, 0x4b, 0x97, 0x3b, 0x4b, 0x38, 0x2c, 0x87, 0xae, 0x89, - 0x68, 0x10, 0x55, 0x9a, 0x65, 0x34, 0x49, 0xf3, 0xd9, 0x61, 0xe7, 0x53, 0x45, 0x5e, 0x94, 0x88, - 0x50, 0xe4, 0x48, 0x08, 0xec, 0x63, 0xe9, 0x3f, 0x68, 0x70, 0x66, 0x60, 0xee, 0xa3, 0x37, 0x00, - 0x39, 0x5b, 0x8c, 0xba, 0xbb, 0xb4, 0xf2, 0xa6, 0x77, 0xe9, 0x17, 0xf7, 0x13, 0xc1, 0x71, 0xca, - 0x6b, 0x89, 0x57, 0x7a, 0x56, 0x71, 0x1f, 0x0d, 0x64, 0xc2, 0x51, 0x91, 0x0c, 0x1e, 0xa1, 0x96, - 0xba, 0x0a, 0xed, 0x2f, 0xd3, 0x16, 0xdb, 0xad, 0xdc, 0xd1, 0xf5, 0x30, 0x08, 0x8e, 0x62, 0xa2, - 0x35, 0x98, 0x57, 0xb5, 0xbe, 0x8b, 0xe0, 0x93, 0x8a, 0x81, 0xf9, 0x52, 0x74, 0x19, 0x77, 0xcb, - 0x0b, 0x88, 0x0a, 0x65, 0x96, 0x4b, 0x2b, 0x01, 0x84, 0x16, 0x85, 0xb8, 0x10, 0x5d, 0xc6, 0xdd, - 0xf2, 0xa8, 0x06, 0x73, 0x0a, 0x55, 0xf1, 0x9d, 0x99, 0x94, 0x2e, 0x7b, 0x76, 0x44, 0x97, 0x79, - 0x45, 0x37, 0x88, 0xc1, 0x52, 0x04, 0x0b, 0x77, 0x61, 0x23, 0x0e, 0x60, 0xfa, 0x25, 0x8e, 0x65, - 0xa6, 0xa4, 0xa5, 0xd7, 0xc6, 0xcc, 0xc1, 0xa0, 0x56, 0x76, 0xda, 0x57, 0xf0, 0x8a, 0xe1, 0x90, - 0x1d, 0xfd, 0x3b, 0x0d, 0xa0, 0x13, 0x61, 0x68, 0x35, 0x52, 0xe4, 0x97, 0xbb, 0x8a, 0xfc, 0x42, - 0xf8, 0x72, 0x1a, 0x2a, 0xe8, 0xd7, 0x61, 0xca, 0x91, 0x99, 0xa7, 0x82, 0xa1, 0x30, 0x6c, 0xdb, - 0x41, 0x2f, 0x0d, 0xd0, 0x8a, 0x20, 0x4a, 0xa7, 0xca, 0x5f, 0x85, 0x86, 0x2e, 0x83, 0xd6, 0x70, - 0x2a, 0x7e, 0xf3, 0x3b, 0x37, 0x0c, 0xf5, 0xaa, 0x53, 0x61, 0x11, 0xcc, 0x69, 0xb1, 0x77, 0xf1, - 0x16, 0x4b, 0x1c, 0xf4, 0x3e, 0x4c, 0xfb, 0xd7, 0x0d, 0x75, 0x37, 0x59, 0x1d, 0x86, 0xd9, 0x6f, - 0x06, 0x2e, 0xce, 0x8a, 0x0a, 0xea, 0xaf, 0xe0, 0x00, 0x13, 0x7d, 0x9a, 0x80, 0x45, 0xb3, 0x7b, - 0xa6, 0xcb, 0x1c, 0x19, 0xad, 0x75, 0x0f, 0x1c, 0xbb, 0x8b, 0xff, 0x69, 0xb7, 0x72, 0x8b, 0x3d, - 0x22, 0xb8, 0xd7, 0x9c, 0x38, 0x24, 0x55, 0x57, 0x56, 0xd9, 0x70, 0x46, 0x38, 0x64, 0xbf, 0xd9, - 0xc3, 0x3b, 0xa4, 0xbf, 0x82, 0x03, 0x4c, 0xfd, 0x7b, 0x0d, 0x66, 0x23, 0x77, 0xe1, 0xbf, 0x22, - 0x66, 0xbc, 0xd4, 0x3a, 0xd8, 0x98, 0xf1, 0x30, 0x0f, 0x3e, 0x66, 0x3c, 0xdc, 0x43, 0x8d, 0x19, - 0xcf, 0xe4, 0x61, 0xc6, 0x4c, 0xe8, 0x90, 0x7d, 0x62, 0xe6, 0x41, 0x0a, 0x50, 0x6f, 0xce, 0x23, - 0x13, 0xa6, 0xbc, 0xa1, 0xeb, 0x20, 0x7a, 0x7d, 0x70, 0xff, 0x52, 0x6d, 0x5d, 0x41, 0x77, 0x8d, - 0x6a, 0xc9, 0x91, 0x46, 0x35, 0x7a, 0x10, 0x23, 0x6d, 0x70, 0x19, 0x88, 0x1d, 0x6b, 0x6f, 0xc2, - 0x34, 0xf3, 0x67, 0x41, 0x6d, 0xfc, 0x59, 0x50, 0xb2, 0x1e, 0x4c, 0x81, 0x01, 0x24, 0xaa, 0xc0, - 0x2c, 0x09, 0x8f, 0x63, 0x93, 0x63, 0x1d, 0x63, 0x41, 0xcc, 0x7e, 0x91, 0x39, 0x2c, 0x82, 0xaa, - 0xff, 0xd2, 0xed, 0x5b, 0xaf, 0x2a, 0xfc, 0x6d, 0x7d, 0x7b, 0x78, 0x53, 0xf1, 0xbf, 0xc2, 0xbd, - 0x5f, 0x27, 0x61, 0xa1, 0xbb, 0xb1, 0x8e, 0xf5, 0xf9, 0xe3, 0x4e, 0xdf, 0x6f, 0x38, 0xc9, 0xb1, - 0x36, 0x1d, 0xcc, 0x6a, 0x23, 0x7e, 0x9d, 0x0d, 0x7b, 0x22, 0x75, 0xe0, 0x9e, 0xd0, 0xbf, 0x89, - 0x72, 0x34, 0xfe, 0x27, 0xa2, 0x98, 0x0f, 0xaa, 0xc9, 0x43, 0xfa, 0xa0, 0xfa, 0x84, 0x69, 0xfa, - 0x36, 0x09, 0xc7, 0x9f, 0xfe, 0xa7, 0x30, 0xfa, 0xd7, 0xc7, 0x1f, 0x7b, 0xf9, 0x7a, 0xfa, 0xcf, - 0xc0, 0x28, 0x81, 0x5c, 0xbc, 0x70, 0xf7, 0x61, 0x76, 0xe2, 0xde, 0xc3, 0xec, 0xc4, 0xfd, 0x87, - 0xd9, 0x89, 0x4f, 0xda, 0xd9, 0xc4, 0xdd, 0x76, 0x36, 0x71, 0xaf, 0x9d, 0x4d, 0xdc, 0x6f, 0x67, - 0x13, 0xbf, 0xb6, 0xb3, 0x89, 0xcf, 0x7f, 0xcb, 0x4e, 0xbc, 0x9b, 0x1d, 0xfc, 0x27, 0xe3, 0x9f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x5b, 0x05, 0xaa, 0x18, 0x85, 0x1c, 0x00, 0x00, -} +func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/autoscaling/v2beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/autoscaling/v2beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..ab1fe8c8b2b83 --- /dev/null +++ b/staging/src/k8s.io/api/autoscaling/v2beta1/generated.protomessage.pb.go @@ -0,0 +1,58 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v2beta1 + +func (*ContainerResourceMetricSource) ProtoMessage() {} + +func (*ContainerResourceMetricStatus) ProtoMessage() {} + +func (*CrossVersionObjectReference) ProtoMessage() {} + +func (*ExternalMetricSource) ProtoMessage() {} + +func (*ExternalMetricStatus) ProtoMessage() {} + +func (*HorizontalPodAutoscaler) ProtoMessage() {} + +func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} + +func (*HorizontalPodAutoscalerList) ProtoMessage() {} + +func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} + +func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} + +func (*MetricSpec) ProtoMessage() {} + +func (*MetricStatus) ProtoMessage() {} + +func (*ObjectMetricSource) ProtoMessage() {} + +func (*ObjectMetricStatus) ProtoMessage() {} + +func (*PodsMetricSource) ProtoMessage() {} + +func (*PodsMetricStatus) ProtoMessage() {} + +func (*ResourceMetricSource) ProtoMessage() {} + +func (*ResourceMetricStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/autoscaling/v2beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/autoscaling/v2beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..2b8674e651620 --- /dev/null +++ b/staging/src/k8s.io/api/autoscaling/v2beta1/zz_generated.model_name.go @@ -0,0 +1,112 @@ +//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 openapi-gen. DO NOT EDIT. + +package v2beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerResourceMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerResourceMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CrossVersionObjectReference) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExternalMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.ExternalMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExternalMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscaler) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerCondition) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerList) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerSpec) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MetricSpec) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.MetricSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.MetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ObjectMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.ObjectMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ObjectMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodsMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.PodsMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodsMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.PodsMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.ResourceMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus" +} diff --git a/staging/src/k8s.io/api/autoscaling/v2beta2/doc.go b/staging/src/k8s.io/api/autoscaling/v2beta2/doc.go index 1500372978d57..5ea9edb68ad87 100644 --- a/staging/src/k8s.io/api/autoscaling/v2beta2/doc.go +++ b/staging/src/k8s.io/api/autoscaling/v2beta2/doc.go @@ -18,5 +18,6 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.autoscaling.v2beta2 package v2beta2 diff --git a/staging/src/k8s.io/api/autoscaling/v2beta2/generated.pb.go b/staging/src/k8s.io/api/autoscaling/v2beta2/generated.pb.go index 741979505dc71..87c8738678d4f 100644 --- a/staging/src/k8s.io/api/autoscaling/v2beta2/generated.pb.go +++ b/staging/src/k8s.io/api/autoscaling/v2beta2/generated.pb.go @@ -24,843 +24,62 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - k8s_io_api_core_v1 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } -func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } -func (*ContainerResourceMetricSource) ProtoMessage() {} -func (*ContainerResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{0} -} -func (m *ContainerResourceMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerResourceMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerResourceMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerResourceMetricSource.Merge(m, src) -} -func (m *ContainerResourceMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ContainerResourceMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerResourceMetricSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerResourceMetricSource proto.InternalMessageInfo - -func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } -func (*ContainerResourceMetricStatus) ProtoMessage() {} -func (*ContainerResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{1} -} -func (m *ContainerResourceMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerResourceMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerResourceMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerResourceMetricStatus.Merge(m, src) -} -func (m *ContainerResourceMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ContainerResourceMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerResourceMetricStatus.DiscardUnknown(m) -} +func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } -var xxx_messageInfo_ContainerResourceMetricStatus proto.InternalMessageInfo +func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } -func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } -func (*CrossVersionObjectReference) ProtoMessage() {} -func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{2} -} -func (m *CrossVersionObjectReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CrossVersionObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CrossVersionObjectReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_CrossVersionObjectReference.Merge(m, src) -} -func (m *CrossVersionObjectReference) XXX_Size() int { - return m.Size() -} -func (m *CrossVersionObjectReference) XXX_DiscardUnknown() { - xxx_messageInfo_CrossVersionObjectReference.DiscardUnknown(m) -} +func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } -var xxx_messageInfo_CrossVersionObjectReference proto.InternalMessageInfo +func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } -func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } -func (*ExternalMetricSource) ProtoMessage() {} -func (*ExternalMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{3} -} -func (m *ExternalMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExternalMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExternalMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExternalMetricSource.Merge(m, src) -} -func (m *ExternalMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ExternalMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ExternalMetricSource.DiscardUnknown(m) -} +func (m *HPAScalingPolicy) Reset() { *m = HPAScalingPolicy{} } -var xxx_messageInfo_ExternalMetricSource proto.InternalMessageInfo +func (m *HPAScalingRules) Reset() { *m = HPAScalingRules{} } -func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } -func (*ExternalMetricStatus) ProtoMessage() {} -func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{4} -} -func (m *ExternalMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExternalMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExternalMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExternalMetricStatus.Merge(m, src) -} -func (m *ExternalMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ExternalMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ExternalMetricStatus.DiscardUnknown(m) -} +func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } -var xxx_messageInfo_ExternalMetricStatus proto.InternalMessageInfo +func (m *HorizontalPodAutoscalerBehavior) Reset() { *m = HorizontalPodAutoscalerBehavior{} } -func (m *HPAScalingPolicy) Reset() { *m = HPAScalingPolicy{} } -func (*HPAScalingPolicy) ProtoMessage() {} -func (*HPAScalingPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{5} -} -func (m *HPAScalingPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HPAScalingPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HPAScalingPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_HPAScalingPolicy.Merge(m, src) -} -func (m *HPAScalingPolicy) XXX_Size() int { - return m.Size() -} -func (m *HPAScalingPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_HPAScalingPolicy.DiscardUnknown(m) -} +func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } -var xxx_messageInfo_HPAScalingPolicy proto.InternalMessageInfo +func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } -func (m *HPAScalingRules) Reset() { *m = HPAScalingRules{} } -func (*HPAScalingRules) ProtoMessage() {} -func (*HPAScalingRules) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{6} -} -func (m *HPAScalingRules) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HPAScalingRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HPAScalingRules) XXX_Merge(src proto.Message) { - xxx_messageInfo_HPAScalingRules.Merge(m, src) -} -func (m *HPAScalingRules) XXX_Size() int { - return m.Size() -} -func (m *HPAScalingRules) XXX_DiscardUnknown() { - xxx_messageInfo_HPAScalingRules.DiscardUnknown(m) -} +func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } -var xxx_messageInfo_HPAScalingRules proto.InternalMessageInfo +func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } -func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } -func (*HorizontalPodAutoscaler) ProtoMessage() {} -func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{7} -} -func (m *HorizontalPodAutoscaler) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscaler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscaler) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscaler.Merge(m, src) -} -func (m *HorizontalPodAutoscaler) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscaler) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscaler.DiscardUnknown(m) -} +func (m *MetricIdentifier) Reset() { *m = MetricIdentifier{} } -var xxx_messageInfo_HorizontalPodAutoscaler proto.InternalMessageInfo +func (m *MetricSpec) Reset() { *m = MetricSpec{} } -func (m *HorizontalPodAutoscalerBehavior) Reset() { *m = HorizontalPodAutoscalerBehavior{} } -func (*HorizontalPodAutoscalerBehavior) ProtoMessage() {} -func (*HorizontalPodAutoscalerBehavior) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{8} -} -func (m *HorizontalPodAutoscalerBehavior) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerBehavior) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerBehavior) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerBehavior.Merge(m, src) -} -func (m *HorizontalPodAutoscalerBehavior) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerBehavior) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerBehavior.DiscardUnknown(m) -} +func (m *MetricStatus) Reset() { *m = MetricStatus{} } -var xxx_messageInfo_HorizontalPodAutoscalerBehavior proto.InternalMessageInfo +func (m *MetricTarget) Reset() { *m = MetricTarget{} } -func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } -func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} -func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{9} -} -func (m *HorizontalPodAutoscalerCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerCondition.Merge(m, src) -} -func (m *HorizontalPodAutoscalerCondition) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerCondition) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerCondition.DiscardUnknown(m) -} +func (m *MetricValueStatus) Reset() { *m = MetricValueStatus{} } -var xxx_messageInfo_HorizontalPodAutoscalerCondition proto.InternalMessageInfo +func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } -func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } -func (*HorizontalPodAutoscalerList) ProtoMessage() {} -func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{10} -} -func (m *HorizontalPodAutoscalerList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerList) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerList.Merge(m, src) -} -func (m *HorizontalPodAutoscalerList) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerList) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerList.DiscardUnknown(m) -} +func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } -var xxx_messageInfo_HorizontalPodAutoscalerList proto.InternalMessageInfo +func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } -func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } -func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} -func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{11} -} -func (m *HorizontalPodAutoscalerSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerSpec.Merge(m, src) -} -func (m *HorizontalPodAutoscalerSpec) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerSpec) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerSpec.DiscardUnknown(m) -} +func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } -var xxx_messageInfo_HorizontalPodAutoscalerSpec proto.InternalMessageInfo +func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } -func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } -func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} -func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{12} -} -func (m *HorizontalPodAutoscalerStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HorizontalPodAutoscalerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HorizontalPodAutoscalerStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_HorizontalPodAutoscalerStatus.Merge(m, src) -} -func (m *HorizontalPodAutoscalerStatus) XXX_Size() int { - return m.Size() -} -func (m *HorizontalPodAutoscalerStatus) XXX_DiscardUnknown() { - xxx_messageInfo_HorizontalPodAutoscalerStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_HorizontalPodAutoscalerStatus proto.InternalMessageInfo - -func (m *MetricIdentifier) Reset() { *m = MetricIdentifier{} } -func (*MetricIdentifier) ProtoMessage() {} -func (*MetricIdentifier) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{13} -} -func (m *MetricIdentifier) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricIdentifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MetricIdentifier) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricIdentifier.Merge(m, src) -} -func (m *MetricIdentifier) XXX_Size() int { - return m.Size() -} -func (m *MetricIdentifier) XXX_DiscardUnknown() { - xxx_messageInfo_MetricIdentifier.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricIdentifier proto.InternalMessageInfo - -func (m *MetricSpec) Reset() { *m = MetricSpec{} } -func (*MetricSpec) ProtoMessage() {} -func (*MetricSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{14} -} -func (m *MetricSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MetricSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricSpec.Merge(m, src) -} -func (m *MetricSpec) XXX_Size() int { - return m.Size() -} -func (m *MetricSpec) XXX_DiscardUnknown() { - xxx_messageInfo_MetricSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricSpec proto.InternalMessageInfo - -func (m *MetricStatus) Reset() { *m = MetricStatus{} } -func (*MetricStatus) ProtoMessage() {} -func (*MetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{15} -} -func (m *MetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricStatus.Merge(m, src) -} -func (m *MetricStatus) XXX_Size() int { - return m.Size() -} -func (m *MetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_MetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricStatus proto.InternalMessageInfo - -func (m *MetricTarget) Reset() { *m = MetricTarget{} } -func (*MetricTarget) ProtoMessage() {} -func (*MetricTarget) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{16} -} -func (m *MetricTarget) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricTarget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MetricTarget) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricTarget.Merge(m, src) -} -func (m *MetricTarget) XXX_Size() int { - return m.Size() -} -func (m *MetricTarget) XXX_DiscardUnknown() { - xxx_messageInfo_MetricTarget.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricTarget proto.InternalMessageInfo - -func (m *MetricValueStatus) Reset() { *m = MetricValueStatus{} } -func (*MetricValueStatus) ProtoMessage() {} -func (*MetricValueStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{17} -} -func (m *MetricValueStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricValueStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MetricValueStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricValueStatus.Merge(m, src) -} -func (m *MetricValueStatus) XXX_Size() int { - return m.Size() -} -func (m *MetricValueStatus) XXX_DiscardUnknown() { - xxx_messageInfo_MetricValueStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricValueStatus proto.InternalMessageInfo - -func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } -func (*ObjectMetricSource) ProtoMessage() {} -func (*ObjectMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{18} -} -func (m *ObjectMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ObjectMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectMetricSource.Merge(m, src) -} -func (m *ObjectMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ObjectMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectMetricSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ObjectMetricSource proto.InternalMessageInfo - -func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } -func (*ObjectMetricStatus) ProtoMessage() {} -func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{19} -} -func (m *ObjectMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ObjectMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectMetricStatus.Merge(m, src) -} -func (m *ObjectMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ObjectMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectMetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ObjectMetricStatus proto.InternalMessageInfo - -func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } -func (*PodsMetricSource) ProtoMessage() {} -func (*PodsMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{20} -} -func (m *PodsMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodsMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodsMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodsMetricSource.Merge(m, src) -} -func (m *PodsMetricSource) XXX_Size() int { - return m.Size() -} -func (m *PodsMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_PodsMetricSource.DiscardUnknown(m) -} - -var xxx_messageInfo_PodsMetricSource proto.InternalMessageInfo - -func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } -func (*PodsMetricStatus) ProtoMessage() {} -func (*PodsMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{21} -} -func (m *PodsMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodsMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodsMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodsMetricStatus.Merge(m, src) -} -func (m *PodsMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *PodsMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PodsMetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PodsMetricStatus proto.InternalMessageInfo - -func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } -func (*ResourceMetricSource) ProtoMessage() {} -func (*ResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{22} -} -func (m *ResourceMetricSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceMetricSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceMetricSource.Merge(m, src) -} -func (m *ResourceMetricSource) XXX_Size() int { - return m.Size() -} -func (m *ResourceMetricSource) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceMetricSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceMetricSource proto.InternalMessageInfo - -func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } -func (*ResourceMetricStatus) ProtoMessage() {} -func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1076ab1fac987148, []int{23} -} -func (m *ResourceMetricStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceMetricStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceMetricStatus.Merge(m, src) -} -func (m *ResourceMetricStatus) XXX_Size() int { - return m.Size() -} -func (m *ResourceMetricStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceMetricStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceMetricStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ContainerResourceMetricSource)(nil), "k8s.io.api.autoscaling.v2beta2.ContainerResourceMetricSource") - proto.RegisterType((*ContainerResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta2.ContainerResourceMetricStatus") - proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.api.autoscaling.v2beta2.CrossVersionObjectReference") - proto.RegisterType((*ExternalMetricSource)(nil), "k8s.io.api.autoscaling.v2beta2.ExternalMetricSource") - proto.RegisterType((*ExternalMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta2.ExternalMetricStatus") - proto.RegisterType((*HPAScalingPolicy)(nil), "k8s.io.api.autoscaling.v2beta2.HPAScalingPolicy") - proto.RegisterType((*HPAScalingRules)(nil), "k8s.io.api.autoscaling.v2beta2.HPAScalingRules") - proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscaler") - proto.RegisterType((*HorizontalPodAutoscalerBehavior)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior") - proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition") - proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscalerList") - proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec") - proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus") - proto.RegisterType((*MetricIdentifier)(nil), "k8s.io.api.autoscaling.v2beta2.MetricIdentifier") - proto.RegisterType((*MetricSpec)(nil), "k8s.io.api.autoscaling.v2beta2.MetricSpec") - proto.RegisterType((*MetricStatus)(nil), "k8s.io.api.autoscaling.v2beta2.MetricStatus") - proto.RegisterType((*MetricTarget)(nil), "k8s.io.api.autoscaling.v2beta2.MetricTarget") - proto.RegisterType((*MetricValueStatus)(nil), "k8s.io.api.autoscaling.v2beta2.MetricValueStatus") - proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.api.autoscaling.v2beta2.ObjectMetricSource") - proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta2.ObjectMetricStatus") - proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.api.autoscaling.v2beta2.PodsMetricSource") - proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta2.PodsMetricStatus") - proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.api.autoscaling.v2beta2.ResourceMetricSource") - proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta2.ResourceMetricStatus") -} - -func init() { - proto.RegisterFile("k8s.io/api/autoscaling/v2beta2/generated.proto", fileDescriptor_1076ab1fac987148) -} - -var fileDescriptor_1076ab1fac987148 = []byte{ - // 1727 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x92, 0xd4, 0xd7, 0x50, 0x9f, 0xe3, 0x2f, 0x42, 0x86, 0x49, 0x61, 0x6b, 0xb4, 0xae, - 0xd1, 0x2e, 0x2b, 0x56, 0x6d, 0x0d, 0x18, 0x45, 0xab, 0x95, 0xdb, 0xda, 0xb0, 0x64, 0xab, 0x43, - 0x59, 0x2d, 0x02, 0xd9, 0xc8, 0x70, 0x77, 0x44, 0x4d, 0x44, 0xee, 0x12, 0xbb, 0x4b, 0xda, 0x72, - 0x80, 0x20, 0x08, 0x90, 0x7b, 0x90, 0x20, 0xd7, 0xfc, 0x09, 0x09, 0x7c, 0x09, 0x90, 0x63, 0x3e, - 0x60, 0x18, 0x41, 0x10, 0xf8, 0x16, 0xe7, 0x42, 0xc4, 0xcc, 0x31, 0xc7, 0xdc, 0x7c, 0x0a, 0xe6, - 0x63, 0x3f, 0x49, 0x89, 0x94, 0x20, 0x29, 0xd0, 0x8d, 0x3b, 0xf3, 0xde, 0xef, 0xcd, 0x7b, 0xf3, - 0x7b, 0x6f, 0xde, 0x0c, 0x81, 0xb6, 0x73, 0xcd, 0xd5, 0xa8, 0x5d, 0xc4, 0x0d, 0x5a, 0xc4, 0x4d, - 0xcf, 0x76, 0x0d, 0x5c, 0xa3, 0x56, 0xb5, 0xd8, 0x2a, 0x55, 0x88, 0x87, 0x4b, 0xc5, 0x2a, 0xb1, - 0x88, 0x83, 0x3d, 0x62, 0x6a, 0x0d, 0xc7, 0xf6, 0x6c, 0x98, 0x17, 0xf2, 0x1a, 0x6e, 0x50, 0x2d, - 0x22, 0xaf, 0x49, 0xf9, 0xb9, 0x3f, 0x56, 0xa9, 0xb7, 0xdd, 0xac, 0x68, 0x86, 0x5d, 0x2f, 0x56, - 0xed, 0xaa, 0x5d, 0xe4, 0x6a, 0x95, 0xe6, 0x16, 0xff, 0xe2, 0x1f, 0xfc, 0x97, 0x80, 0x9b, 0x53, - 0x23, 0xe6, 0x0d, 0xdb, 0x21, 0xc5, 0xd6, 0x42, 0xd2, 0xe4, 0xdc, 0x62, 0x28, 0x53, 0xc7, 0xc6, - 0x36, 0xb5, 0x88, 0xb3, 0x5b, 0x6c, 0xec, 0x54, 0xb9, 0x92, 0x43, 0x5c, 0xbb, 0xe9, 0x18, 0xe4, - 0x40, 0x5a, 0x6e, 0xb1, 0x4e, 0x3c, 0xdc, 0xcb, 0x56, 0x71, 0x2f, 0x2d, 0xa7, 0x69, 0x79, 0xb4, - 0xde, 0x6d, 0xe6, 0xaf, 0xfd, 0x14, 0x5c, 0x63, 0x9b, 0xd4, 0x71, 0x52, 0x4f, 0xfd, 0x49, 0x01, - 0x97, 0x96, 0x6d, 0xcb, 0xc3, 0x4c, 0x03, 0x49, 0x27, 0x56, 0x89, 0xe7, 0x50, 0xa3, 0xcc, 0x7f, - 0xc3, 0x65, 0x90, 0xb1, 0x70, 0x9d, 0xe4, 0x94, 0x79, 0xe5, 0xca, 0xb8, 0x5e, 0x7c, 0xd6, 0x2e, - 0x0c, 0x75, 0xda, 0x85, 0xcc, 0x1d, 0x5c, 0x27, 0xaf, 0xda, 0x85, 0x42, 0x77, 0xe0, 0x34, 0x1f, - 0x86, 0x89, 0x20, 0xae, 0x0c, 0xd7, 0xc1, 0x88, 0x87, 0x9d, 0x2a, 0xf1, 0x72, 0xa9, 0x79, 0xe5, - 0x4a, 0xb6, 0xf4, 0x07, 0x6d, 0xff, 0xfd, 0xd3, 0xc4, 0x12, 0xd6, 0xb9, 0x8e, 0x3e, 0x25, 0x8d, - 0x8e, 0x88, 0x6f, 0x24, 0xb1, 0x60, 0x11, 0x8c, 0x1b, 0xfe, 0xda, 0x73, 0x69, 0xbe, 0xbe, 0x59, - 0x29, 0x3a, 0x1e, 0x3a, 0x15, 0xca, 0xa8, 0x3f, 0xef, 0xe3, 0xad, 0x87, 0xbd, 0xa6, 0x7b, 0x34, - 0xde, 0x6e, 0x82, 0x51, 0xa3, 0xe9, 0x38, 0xc4, 0xf2, 0xdd, 0x5d, 0x18, 0xcc, 0xdd, 0x0d, 0x5c, - 0x6b, 0x12, 0xb1, 0x10, 0x7d, 0x5a, 0x9a, 0x1e, 0x5d, 0x16, 0x48, 0xc8, 0x87, 0x3c, 0xb8, 0xd7, - 0x1f, 0x2a, 0xe0, 0xe2, 0xb2, 0x63, 0xbb, 0xee, 0x06, 0x71, 0x5c, 0x6a, 0x5b, 0x77, 0x2b, 0x6f, - 0x10, 0xc3, 0x43, 0x64, 0x8b, 0x38, 0xc4, 0x32, 0x08, 0x9c, 0x07, 0x99, 0x1d, 0x6a, 0x99, 0xd2, - 0xe7, 0x09, 0xdf, 0xe7, 0xdb, 0xd4, 0x32, 0x11, 0x9f, 0x61, 0x12, 0x3c, 0x2a, 0xa9, 0xb8, 0x44, - 0xc4, 0xe5, 0x12, 0x00, 0xb8, 0x41, 0xa5, 0x01, 0xb9, 0x2a, 0x28, 0xe5, 0xc0, 0xd2, 0xda, 0x2d, - 0x39, 0x83, 0x22, 0x52, 0xea, 0x53, 0x05, 0x9c, 0xfd, 0xd7, 0x23, 0x8f, 0x38, 0x16, 0xae, 0xc5, - 0x28, 0xf7, 0x7f, 0x30, 0x52, 0xe7, 0xdf, 0x7c, 0x49, 0xd9, 0xd2, 0x9f, 0x06, 0x0b, 0xdf, 0x2d, - 0x93, 0x58, 0x1e, 0xdd, 0xa2, 0xc4, 0x09, 0x19, 0x23, 0x66, 0x90, 0xc4, 0x3b, 0x1e, 0x1e, 0xaa, - 0xdf, 0x76, 0x3b, 0x22, 0xd8, 0x74, 0x7c, 0x8e, 0x1c, 0x2b, 0xc5, 0xd4, 0x8f, 0x15, 0x30, 0x73, - 0x73, 0x6d, 0xa9, 0x2c, 0x20, 0xd6, 0xec, 0x1a, 0x35, 0x76, 0xe1, 0x35, 0x90, 0xf1, 0x76, 0x1b, - 0x7e, 0x6a, 0x5c, 0xf6, 0x49, 0xb0, 0xbe, 0xdb, 0x60, 0xa9, 0x71, 0x36, 0x29, 0xcf, 0xc6, 0x11, - 0xd7, 0x80, 0xbf, 0x01, 0xc3, 0x2d, 0x66, 0x97, 0x2f, 0x75, 0x58, 0x9f, 0x94, 0xaa, 0xc3, 0x7c, - 0x31, 0x48, 0xcc, 0xc1, 0xeb, 0x60, 0xb2, 0x41, 0x1c, 0x6a, 0x9b, 0x65, 0x62, 0xd8, 0x96, 0xe9, - 0x72, 0x12, 0x0d, 0xeb, 0xe7, 0xa4, 0xf0, 0xe4, 0x5a, 0x74, 0x12, 0xc5, 0x65, 0xd5, 0x8f, 0x52, - 0x60, 0x3a, 0x5c, 0x00, 0x6a, 0xd6, 0x88, 0x0b, 0x1f, 0x80, 0x39, 0xd7, 0xc3, 0x15, 0x5a, 0xa3, - 0x8f, 0xb1, 0x47, 0x6d, 0xeb, 0x7f, 0xd4, 0x32, 0xed, 0x87, 0x71, 0xf4, 0x7c, 0xa7, 0x5d, 0x98, - 0x2b, 0xef, 0x29, 0x85, 0xf6, 0x41, 0x80, 0xb7, 0xc1, 0x84, 0x4b, 0x6a, 0xc4, 0xf0, 0x84, 0xbf, - 0x32, 0x2e, 0xbf, 0xeb, 0xb4, 0x0b, 0x13, 0xe5, 0xc8, 0xf8, 0xab, 0x76, 0xe1, 0x4c, 0x2c, 0x30, - 0x62, 0x12, 0xc5, 0x94, 0xe1, 0x03, 0x30, 0xd6, 0x60, 0xbf, 0x28, 0x71, 0x73, 0xa9, 0xf9, 0xf4, - 0x20, 0x5c, 0x49, 0x06, 0x5c, 0x9f, 0x91, 0xa1, 0x1a, 0x5b, 0x93, 0x48, 0x28, 0xc0, 0x54, 0x3f, - 0x4f, 0x81, 0x0b, 0x37, 0x6d, 0x87, 0x3e, 0x66, 0x55, 0xa1, 0xb6, 0x66, 0x9b, 0x4b, 0x12, 0x91, - 0x38, 0xf0, 0x75, 0x30, 0xc6, 0xce, 0x21, 0x13, 0x7b, 0xb8, 0x07, 0x4f, 0x83, 0xe3, 0x44, 0x6b, - 0xec, 0x54, 0xd9, 0x80, 0xab, 0x31, 0x69, 0xad, 0xb5, 0xa0, 0x89, 0x42, 0xb2, 0x4a, 0x3c, 0x1c, - 0xe6, 0x7a, 0x38, 0x86, 0x02, 0x54, 0x78, 0x1f, 0x64, 0xdc, 0x06, 0x31, 0x24, 0x55, 0xaf, 0xf7, - 0xf5, 0xac, 0xf7, 0x42, 0xcb, 0x0d, 0x62, 0x84, 0xc5, 0x87, 0x7d, 0x21, 0x0e, 0x0b, 0x09, 0x18, - 0x71, 0x39, 0xa5, 0xf9, 0xae, 0x66, 0x4b, 0x7f, 0x3f, 0xac, 0x01, 0x91, 0x17, 0x41, 0xce, 0x89, - 0x6f, 0x24, 0xc1, 0xd5, 0xef, 0x14, 0x50, 0xd8, 0x43, 0x53, 0x27, 0xdb, 0xb8, 0x45, 0x6d, 0x07, - 0x6e, 0x80, 0x51, 0x3e, 0x72, 0xaf, 0x21, 0x43, 0x59, 0x1c, 0x7c, 0x1b, 0x39, 0x6d, 0xf5, 0x2c, - 0xcb, 0xc8, 0xb2, 0xc0, 0x40, 0x3e, 0x18, 0xdc, 0x04, 0xe3, 0xfc, 0xe7, 0x0d, 0xfb, 0xa1, 0x25, - 0xc3, 0x78, 0x60, 0xe4, 0x49, 0x76, 0x42, 0x94, 0x7d, 0x14, 0x14, 0x02, 0xaa, 0xef, 0xa6, 0xc1, - 0xfc, 0x1e, 0x9e, 0x2d, 0xdb, 0x96, 0x49, 0x19, 0xf9, 0xe1, 0xcd, 0x58, 0xfe, 0x2f, 0x26, 0xf2, - 0xff, 0x72, 0x3f, 0xfd, 0x48, 0x3d, 0x58, 0x09, 0xf6, 0x2b, 0x15, 0xc3, 0x92, 0x01, 0x7f, 0xd5, - 0x2e, 0xf4, 0xe8, 0xc7, 0xb4, 0x00, 0x29, 0xbe, 0x2d, 0xb0, 0x05, 0x60, 0x0d, 0xbb, 0xde, 0xba, - 0x83, 0x2d, 0x57, 0x58, 0xa2, 0x75, 0x22, 0x99, 0x70, 0x75, 0x30, 0x22, 0x33, 0x0d, 0x7d, 0x4e, - 0xae, 0x02, 0xae, 0x74, 0xa1, 0xa1, 0x1e, 0x16, 0xe0, 0x6f, 0xc1, 0x88, 0x43, 0xb0, 0x6b, 0x5b, - 0xb9, 0x0c, 0xf7, 0x22, 0xa0, 0x0d, 0xe2, 0xa3, 0x48, 0xce, 0xc2, 0xdf, 0x83, 0xd1, 0x3a, 0x71, - 0x5d, 0x5c, 0x25, 0xb9, 0x61, 0x2e, 0x18, 0xd4, 0xdd, 0x55, 0x31, 0x8c, 0xfc, 0x79, 0xf5, 0x7b, - 0x05, 0x5c, 0xdc, 0x23, 0x8e, 0x2b, 0xd4, 0xf5, 0xe0, 0x66, 0x57, 0xa6, 0x6a, 0x83, 0x39, 0xc8, - 0xb4, 0x79, 0x9e, 0x06, 0x35, 0xc2, 0x1f, 0x89, 0x64, 0xe9, 0x26, 0x18, 0xa6, 0x1e, 0xa9, 0xfb, - 0x05, 0xe8, 0x6f, 0x87, 0xcc, 0xa2, 0xb0, 0xbe, 0xdf, 0x62, 0x68, 0x48, 0x80, 0xaa, 0x4f, 0xd3, - 0x7b, 0xfa, 0xc6, 0x52, 0x19, 0xbe, 0x09, 0xa6, 0xf8, 0x97, 0x3c, 0x5b, 0xc9, 0x96, 0xf4, 0xb0, - 0x6f, 0xb5, 0xd8, 0xa7, 0xb5, 0xd1, 0xcf, 0xcb, 0xa5, 0x4c, 0x95, 0x63, 0xd0, 0x28, 0x61, 0x0a, - 0x2e, 0x80, 0x6c, 0x9d, 0x5a, 0x88, 0x34, 0x6a, 0xd4, 0xc0, 0xae, 0x3c, 0xa7, 0xa6, 0x3b, 0xed, - 0x42, 0x76, 0x35, 0x1c, 0x46, 0x51, 0x19, 0xf8, 0x17, 0x90, 0xad, 0xe3, 0x47, 0x81, 0x8a, 0x38, - 0x4f, 0xce, 0x48, 0x7b, 0xd9, 0xd5, 0x70, 0x0a, 0x45, 0xe5, 0xe0, 0x3d, 0xc6, 0x06, 0x76, 0x12, - 0xbb, 0xb9, 0x0c, 0x0f, 0xf3, 0xd5, 0xc1, 0x0e, 0x6e, 0x5e, 0xfc, 0x22, 0xcc, 0xe1, 0x10, 0xc8, - 0xc7, 0x82, 0x14, 0x8c, 0x55, 0x64, 0x0d, 0xe2, 0x2c, 0xcb, 0x96, 0xfe, 0x71, 0xd8, 0xed, 0x93, - 0x30, 0xfa, 0x04, 0xa3, 0x89, 0xff, 0x85, 0x02, 0x78, 0xf5, 0xd3, 0x0c, 0xb8, 0xb4, 0x6f, 0x01, - 0x85, 0xff, 0x06, 0xd0, 0xae, 0xb8, 0xc4, 0x69, 0x11, 0xf3, 0x3f, 0xe2, 0xbe, 0xc1, 0x9a, 0x42, - 0xb6, 0x9d, 0x69, 0xfd, 0x3c, 0xcb, 0xb0, 0xbb, 0x5d, 0xb3, 0xa8, 0x87, 0x06, 0x34, 0xc0, 0x24, - 0xcb, 0x3b, 0xb1, 0x77, 0x54, 0xf6, 0x9f, 0x07, 0x4b, 0xea, 0x59, 0xd6, 0x3a, 0xac, 0x44, 0x41, - 0x50, 0x1c, 0x13, 0x2e, 0x81, 0x69, 0xd9, 0xf6, 0x24, 0xf6, 0xf2, 0x82, 0x0c, 0xf6, 0xf4, 0x72, - 0x7c, 0x1a, 0x25, 0xe5, 0x19, 0x84, 0x49, 0x5c, 0xea, 0x10, 0x33, 0x80, 0xc8, 0xc4, 0x21, 0x6e, - 0xc4, 0xa7, 0x51, 0x52, 0x1e, 0xd6, 0xc0, 0x94, 0x44, 0x95, 0x5b, 0x9b, 0x1b, 0xe6, 0xec, 0x18, - 0xb0, 0x41, 0x95, 0x27, 0x57, 0x40, 0xf7, 0xe5, 0x18, 0x16, 0x4a, 0x60, 0x43, 0x0f, 0x00, 0xc3, - 0xaf, 0xa6, 0x6e, 0x6e, 0x84, 0x5b, 0xfa, 0xe7, 0x21, 0xf9, 0x12, 0x94, 0xe5, 0xb0, 0x07, 0x08, - 0x86, 0x5c, 0x14, 0xb1, 0xa3, 0x7e, 0xa0, 0x80, 0x99, 0x64, 0x83, 0x1b, 0x5c, 0x2d, 0x94, 0x3d, - 0xaf, 0x16, 0xf7, 0xc1, 0x98, 0x68, 0x95, 0x6c, 0x47, 0x12, 0xe0, 0xcf, 0x03, 0x16, 0x3d, 0x5c, - 0x21, 0xb5, 0xb2, 0x54, 0x15, 0x74, 0xf6, 0xbf, 0x50, 0x00, 0xa9, 0x7e, 0x92, 0x01, 0x20, 0x4c, - 0x31, 0xb8, 0x18, 0x3b, 0xe5, 0xe6, 0x13, 0xa7, 0xdc, 0x4c, 0xf4, 0x9e, 0x12, 0x39, 0xd1, 0x36, - 0xc0, 0x88, 0xcd, 0x4b, 0x8f, 0x5c, 0x61, 0xa9, 0x5f, 0x30, 0x83, 0x36, 0x29, 0x40, 0xd3, 0x01, - 0x3b, 0x3b, 0x64, 0x01, 0x93, 0x68, 0xf0, 0x0e, 0xc8, 0x34, 0x6c, 0xd3, 0xef, 0x6b, 0xfa, 0xb6, - 0x84, 0x6b, 0xb6, 0xe9, 0xc6, 0x30, 0xc7, 0xd8, 0xda, 0xd9, 0x28, 0xe2, 0x38, 0xac, 0xcd, 0xf4, - 0x5f, 0x2a, 0x38, 0x45, 0xb3, 0xa5, 0xc5, 0x7e, 0x98, 0xbd, 0x1e, 0x05, 0x44, 0x30, 0xfd, 0x19, - 0x14, 0x60, 0xc2, 0x77, 0x14, 0x30, 0x6b, 0x24, 0x2f, 0xd8, 0xb9, 0xd1, 0xc1, 0xba, 0xb2, 0x7d, - 0xdf, 0x21, 0xf4, 0x73, 0x9d, 0x76, 0x61, 0xb6, 0x4b, 0x04, 0x75, 0x9b, 0x63, 0x4e, 0x12, 0x79, - 0x1b, 0x93, 0xb5, 0xb0, 0xaf, 0x93, 0xbd, 0xae, 0xa1, 0xc2, 0x49, 0x7f, 0x06, 0x05, 0x98, 0xea, - 0x93, 0x0c, 0x98, 0x88, 0x5d, 0xf3, 0x7e, 0x0d, 0xce, 0x88, 0x84, 0x3f, 0x5a, 0xce, 0x08, 0xcc, - 0xa3, 0xe7, 0x8c, 0xc0, 0x3d, 0x51, 0xce, 0x08, 0x93, 0x27, 0xc9, 0x99, 0x88, 0x93, 0x3d, 0x38, - 0xf3, 0x65, 0xca, 0xe7, 0x8c, 0x68, 0x3a, 0x06, 0xe3, 0x8c, 0x90, 0x8d, 0x70, 0xe6, 0x6e, 0xf4, - 0x26, 0xdd, 0xa7, 0xfb, 0xd3, 0xfc, 0x08, 0x6b, 0xff, 0x6d, 0x62, 0xcb, 0xa3, 0xde, 0xae, 0x3e, - 0xde, 0x75, 0xeb, 0x36, 0xc1, 0x04, 0x6e, 0x11, 0x07, 0x57, 0x09, 0x1f, 0x96, 0xa4, 0x39, 0x28, - 0xee, 0x0c, 0xbb, 0xf4, 0x2e, 0x45, 0x70, 0x50, 0x0c, 0x95, 0x35, 0x04, 0xf2, 0xfb, 0x9e, 0x17, - 0xdc, 0xa6, 0xe5, 0x19, 0xc9, 0x1b, 0x82, 0xa5, 0xae, 0x59, 0xd4, 0x43, 0x43, 0x7d, 0x3f, 0x05, - 0x66, 0xbb, 0xde, 0x31, 0xc2, 0xa0, 0x28, 0xc7, 0x14, 0x94, 0xd4, 0x09, 0x06, 0x25, 0x7d, 0xe0, - 0xa0, 0x7c, 0x95, 0x02, 0xb0, 0xfb, 0x38, 0x81, 0x6f, 0xf1, 0xa6, 0xc4, 0x70, 0x68, 0x85, 0x98, - 0x62, 0xfa, 0x28, 0x1a, 0xea, 0x68, 0x47, 0x13, 0xc5, 0x46, 0x49, 0x63, 0xc7, 0xf4, 0xe4, 0x1b, - 0xbe, 0xa8, 0xa5, 0x8f, 0xf6, 0x45, 0x4d, 0xfd, 0x26, 0x19, 0xc6, 0x53, 0xfd, 0x84, 0xd7, 0x6b, - 0xfb, 0xd3, 0x27, 0xb8, 0xfd, 0xea, 0x17, 0x0a, 0x98, 0x49, 0xb6, 0x23, 0xa7, 0xee, 0x61, 0xf7, - 0xeb, 0xb8, 0x13, 0xa7, 0xfb, 0x51, 0xf7, 0x89, 0x02, 0xce, 0x9e, 0xb2, 0x7f, 0x78, 0xd4, 0xcf, - 0xba, 0xd7, 0x7c, 0x5a, 0xfe, 0xa7, 0xd1, 0x6f, 0x3c, 0x7b, 0x99, 0x1f, 0x7a, 0xfe, 0x32, 0x3f, - 0xf4, 0xe2, 0x65, 0x7e, 0xe8, 0xed, 0x4e, 0x5e, 0x79, 0xd6, 0xc9, 0x2b, 0xcf, 0x3b, 0x79, 0xe5, - 0x45, 0x27, 0xaf, 0xfc, 0xd0, 0xc9, 0x2b, 0xef, 0xfd, 0x98, 0x1f, 0x7a, 0x2d, 0xbf, 0xff, 0x1f, - 0x9f, 0xbf, 0x04, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x27, 0xde, 0xc0, 0x19, 0x1d, 0x00, 0x00, -} +func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/autoscaling/v2beta2/generated.protomessage.pb.go b/staging/src/k8s.io/api/autoscaling/v2beta2/generated.protomessage.pb.go new file mode 100644 index 0000000000000..6064b1eb0265d --- /dev/null +++ b/staging/src/k8s.io/api/autoscaling/v2beta2/generated.protomessage.pb.go @@ -0,0 +1,70 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v2beta2 + +func (*ContainerResourceMetricSource) ProtoMessage() {} + +func (*ContainerResourceMetricStatus) ProtoMessage() {} + +func (*CrossVersionObjectReference) ProtoMessage() {} + +func (*ExternalMetricSource) ProtoMessage() {} + +func (*ExternalMetricStatus) ProtoMessage() {} + +func (*HPAScalingPolicy) ProtoMessage() {} + +func (*HPAScalingRules) ProtoMessage() {} + +func (*HorizontalPodAutoscaler) ProtoMessage() {} + +func (*HorizontalPodAutoscalerBehavior) ProtoMessage() {} + +func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} + +func (*HorizontalPodAutoscalerList) ProtoMessage() {} + +func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} + +func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} + +func (*MetricIdentifier) ProtoMessage() {} + +func (*MetricSpec) ProtoMessage() {} + +func (*MetricStatus) ProtoMessage() {} + +func (*MetricTarget) ProtoMessage() {} + +func (*MetricValueStatus) ProtoMessage() {} + +func (*ObjectMetricSource) ProtoMessage() {} + +func (*ObjectMetricStatus) ProtoMessage() {} + +func (*PodsMetricSource) ProtoMessage() {} + +func (*PodsMetricStatus) ProtoMessage() {} + +func (*ResourceMetricSource) ProtoMessage() {} + +func (*ResourceMetricStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/autoscaling/v2beta2/zz_generated.model_name.go b/staging/src/k8s.io/api/autoscaling/v2beta2/zz_generated.model_name.go new file mode 100644 index 0000000000000..20e8a854c674e --- /dev/null +++ b/staging/src/k8s.io/api/autoscaling/v2beta2/zz_generated.model_name.go @@ -0,0 +1,142 @@ +//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 openapi-gen. DO NOT EDIT. + +package v2beta2 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerResourceMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerResourceMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CrossVersionObjectReference) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExternalMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.ExternalMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExternalMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HPAScalingPolicy) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HPAScalingRules) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.HPAScalingRules" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscaler) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerBehavior) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerCondition) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerList) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerSpec) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HorizontalPodAutoscalerStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MetricIdentifier) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.MetricIdentifier" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MetricSpec) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.MetricSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.MetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MetricTarget) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.MetricTarget" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MetricValueStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.MetricValueStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ObjectMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.ObjectMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ObjectMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodsMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.PodsMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodsMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.PodsMetricStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceMetricSource) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.ResourceMetricSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceMetricStatus) OpenAPIModelName() string { + return "io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus" +} diff --git a/staging/src/k8s.io/api/batch/v1/doc.go b/staging/src/k8s.io/api/batch/v1/doc.go index 69088e2c5b84f..1525ce2aaf455 100644 --- a/staging/src/k8s.io/api/batch/v1/doc.go +++ b/staging/src/k8s.io/api/batch/v1/doc.go @@ -18,4 +18,6 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.batch.v1 + package v1 diff --git a/staging/src/k8s.io/api/batch/v1/generated.pb.go b/staging/src/k8s.io/api/batch/v1/generated.pb.go index 6108a60839fc6..099350e734803 100644 --- a/staging/src/k8s.io/api/batch/v1/generated.pb.go +++ b/staging/src/k8s.io/api/batch/v1/generated.pb.go @@ -24,12 +24,10 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" k8s_io_api_core_v1 "k8s.io/api/core/v1" v11 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -37,642 +35,43 @@ import ( k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *CronJob) Reset() { *m = CronJob{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *CronJobList) Reset() { *m = CronJobList{} } -func (m *CronJob) Reset() { *m = CronJob{} } -func (*CronJob) ProtoMessage() {} -func (*CronJob) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{0} -} -func (m *CronJob) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CronJob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CronJob) XXX_Merge(src proto.Message) { - xxx_messageInfo_CronJob.Merge(m, src) -} -func (m *CronJob) XXX_Size() int { - return m.Size() -} -func (m *CronJob) XXX_DiscardUnknown() { - xxx_messageInfo_CronJob.DiscardUnknown(m) -} +func (m *CronJobSpec) Reset() { *m = CronJobSpec{} } -var xxx_messageInfo_CronJob proto.InternalMessageInfo +func (m *CronJobStatus) Reset() { *m = CronJobStatus{} } -func (m *CronJobList) Reset() { *m = CronJobList{} } -func (*CronJobList) ProtoMessage() {} -func (*CronJobList) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{1} -} -func (m *CronJobList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CronJobList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CronJobList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CronJobList.Merge(m, src) -} -func (m *CronJobList) XXX_Size() int { - return m.Size() -} -func (m *CronJobList) XXX_DiscardUnknown() { - xxx_messageInfo_CronJobList.DiscardUnknown(m) -} +func (m *Job) Reset() { *m = Job{} } -var xxx_messageInfo_CronJobList proto.InternalMessageInfo - -func (m *CronJobSpec) Reset() { *m = CronJobSpec{} } -func (*CronJobSpec) ProtoMessage() {} -func (*CronJobSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{2} -} -func (m *CronJobSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CronJobSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CronJobSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_CronJobSpec.Merge(m, src) -} -func (m *CronJobSpec) XXX_Size() int { - return m.Size() -} -func (m *CronJobSpec) XXX_DiscardUnknown() { - xxx_messageInfo_CronJobSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_CronJobSpec proto.InternalMessageInfo - -func (m *CronJobStatus) Reset() { *m = CronJobStatus{} } -func (*CronJobStatus) ProtoMessage() {} -func (*CronJobStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{3} -} -func (m *CronJobStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CronJobStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CronJobStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_CronJobStatus.Merge(m, src) -} -func (m *CronJobStatus) XXX_Size() int { - return m.Size() -} -func (m *CronJobStatus) XXX_DiscardUnknown() { - xxx_messageInfo_CronJobStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_CronJobStatus proto.InternalMessageInfo - -func (m *Job) Reset() { *m = Job{} } -func (*Job) ProtoMessage() {} -func (*Job) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{4} -} -func (m *Job) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Job) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Job) XXX_Merge(src proto.Message) { - xxx_messageInfo_Job.Merge(m, src) -} -func (m *Job) XXX_Size() int { - return m.Size() -} -func (m *Job) XXX_DiscardUnknown() { - xxx_messageInfo_Job.DiscardUnknown(m) -} - -var xxx_messageInfo_Job proto.InternalMessageInfo - -func (m *JobCondition) Reset() { *m = JobCondition{} } -func (*JobCondition) ProtoMessage() {} -func (*JobCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{5} -} -func (m *JobCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JobCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JobCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobCondition.Merge(m, src) -} -func (m *JobCondition) XXX_Size() int { - return m.Size() -} -func (m *JobCondition) XXX_DiscardUnknown() { - xxx_messageInfo_JobCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_JobCondition proto.InternalMessageInfo - -func (m *JobList) Reset() { *m = JobList{} } -func (*JobList) ProtoMessage() {} -func (*JobList) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{6} -} -func (m *JobList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JobList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JobList) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobList.Merge(m, src) -} -func (m *JobList) XXX_Size() int { - return m.Size() -} -func (m *JobList) XXX_DiscardUnknown() { - xxx_messageInfo_JobList.DiscardUnknown(m) -} - -var xxx_messageInfo_JobList proto.InternalMessageInfo - -func (m *JobSpec) Reset() { *m = JobSpec{} } -func (*JobSpec) ProtoMessage() {} -func (*JobSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{7} -} -func (m *JobSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JobSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JobSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobSpec.Merge(m, src) -} -func (m *JobSpec) XXX_Size() int { - return m.Size() -} -func (m *JobSpec) XXX_DiscardUnknown() { - xxx_messageInfo_JobSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_JobSpec proto.InternalMessageInfo - -func (m *JobStatus) Reset() { *m = JobStatus{} } -func (*JobStatus) ProtoMessage() {} -func (*JobStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{8} -} -func (m *JobStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JobStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JobStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobStatus.Merge(m, src) -} -func (m *JobStatus) XXX_Size() int { - return m.Size() -} -func (m *JobStatus) XXX_DiscardUnknown() { - xxx_messageInfo_JobStatus.DiscardUnknown(m) -} +func (m *JobCondition) Reset() { *m = JobCondition{} } -var xxx_messageInfo_JobStatus proto.InternalMessageInfo +func (m *JobList) Reset() { *m = JobList{} } -func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} } -func (*JobTemplateSpec) ProtoMessage() {} -func (*JobTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{9} -} -func (m *JobTemplateSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JobTemplateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JobTemplateSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobTemplateSpec.Merge(m, src) -} -func (m *JobTemplateSpec) XXX_Size() int { - return m.Size() -} -func (m *JobTemplateSpec) XXX_DiscardUnknown() { - xxx_messageInfo_JobTemplateSpec.DiscardUnknown(m) -} +func (m *JobSpec) Reset() { *m = JobSpec{} } -var xxx_messageInfo_JobTemplateSpec proto.InternalMessageInfo +func (m *JobStatus) Reset() { *m = JobStatus{} } -func (m *PodFailurePolicy) Reset() { *m = PodFailurePolicy{} } -func (*PodFailurePolicy) ProtoMessage() {} -func (*PodFailurePolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{10} -} -func (m *PodFailurePolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodFailurePolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodFailurePolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodFailurePolicy.Merge(m, src) -} -func (m *PodFailurePolicy) XXX_Size() int { - return m.Size() -} -func (m *PodFailurePolicy) XXX_DiscardUnknown() { - xxx_messageInfo_PodFailurePolicy.DiscardUnknown(m) -} +func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} } -var xxx_messageInfo_PodFailurePolicy proto.InternalMessageInfo +func (m *PodFailurePolicy) Reset() { *m = PodFailurePolicy{} } func (m *PodFailurePolicyOnExitCodesRequirement) Reset() { *m = PodFailurePolicyOnExitCodesRequirement{} } -func (*PodFailurePolicyOnExitCodesRequirement) ProtoMessage() {} -func (*PodFailurePolicyOnExitCodesRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{11} -} -func (m *PodFailurePolicyOnExitCodesRequirement) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodFailurePolicyOnExitCodesRequirement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodFailurePolicyOnExitCodesRequirement) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodFailurePolicyOnExitCodesRequirement.Merge(m, src) -} -func (m *PodFailurePolicyOnExitCodesRequirement) XXX_Size() int { - return m.Size() -} -func (m *PodFailurePolicyOnExitCodesRequirement) XXX_DiscardUnknown() { - xxx_messageInfo_PodFailurePolicyOnExitCodesRequirement.DiscardUnknown(m) -} - -var xxx_messageInfo_PodFailurePolicyOnExitCodesRequirement proto.InternalMessageInfo func (m *PodFailurePolicyOnPodConditionsPattern) Reset() { *m = PodFailurePolicyOnPodConditionsPattern{} } -func (*PodFailurePolicyOnPodConditionsPattern) ProtoMessage() {} -func (*PodFailurePolicyOnPodConditionsPattern) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{12} -} -func (m *PodFailurePolicyOnPodConditionsPattern) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodFailurePolicyOnPodConditionsPattern) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodFailurePolicyOnPodConditionsPattern) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodFailurePolicyOnPodConditionsPattern.Merge(m, src) -} -func (m *PodFailurePolicyOnPodConditionsPattern) XXX_Size() int { - return m.Size() -} -func (m *PodFailurePolicyOnPodConditionsPattern) XXX_DiscardUnknown() { - xxx_messageInfo_PodFailurePolicyOnPodConditionsPattern.DiscardUnknown(m) -} -var xxx_messageInfo_PodFailurePolicyOnPodConditionsPattern proto.InternalMessageInfo +func (m *PodFailurePolicyRule) Reset() { *m = PodFailurePolicyRule{} } -func (m *PodFailurePolicyRule) Reset() { *m = PodFailurePolicyRule{} } -func (*PodFailurePolicyRule) ProtoMessage() {} -func (*PodFailurePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{13} -} -func (m *PodFailurePolicyRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodFailurePolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodFailurePolicyRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodFailurePolicyRule.Merge(m, src) -} -func (m *PodFailurePolicyRule) XXX_Size() int { - return m.Size() -} -func (m *PodFailurePolicyRule) XXX_DiscardUnknown() { - xxx_messageInfo_PodFailurePolicyRule.DiscardUnknown(m) -} - -var xxx_messageInfo_PodFailurePolicyRule proto.InternalMessageInfo - -func (m *SuccessPolicy) Reset() { *m = SuccessPolicy{} } -func (*SuccessPolicy) ProtoMessage() {} -func (*SuccessPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{14} -} -func (m *SuccessPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SuccessPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SuccessPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_SuccessPolicy.Merge(m, src) -} -func (m *SuccessPolicy) XXX_Size() int { - return m.Size() -} -func (m *SuccessPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_SuccessPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_SuccessPolicy proto.InternalMessageInfo - -func (m *SuccessPolicyRule) Reset() { *m = SuccessPolicyRule{} } -func (*SuccessPolicyRule) ProtoMessage() {} -func (*SuccessPolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{15} -} -func (m *SuccessPolicyRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SuccessPolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SuccessPolicyRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_SuccessPolicyRule.Merge(m, src) -} -func (m *SuccessPolicyRule) XXX_Size() int { - return m.Size() -} -func (m *SuccessPolicyRule) XXX_DiscardUnknown() { - xxx_messageInfo_SuccessPolicyRule.DiscardUnknown(m) -} - -var xxx_messageInfo_SuccessPolicyRule proto.InternalMessageInfo - -func (m *UncountedTerminatedPods) Reset() { *m = UncountedTerminatedPods{} } -func (*UncountedTerminatedPods) ProtoMessage() {} -func (*UncountedTerminatedPods) Descriptor() ([]byte, []int) { - return fileDescriptor_79228dc2c4001a22, []int{16} -} -func (m *UncountedTerminatedPods) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UncountedTerminatedPods) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *UncountedTerminatedPods) XXX_Merge(src proto.Message) { - xxx_messageInfo_UncountedTerminatedPods.Merge(m, src) -} -func (m *UncountedTerminatedPods) XXX_Size() int { - return m.Size() -} -func (m *UncountedTerminatedPods) XXX_DiscardUnknown() { - xxx_messageInfo_UncountedTerminatedPods.DiscardUnknown(m) -} +func (m *SuccessPolicy) Reset() { *m = SuccessPolicy{} } -var xxx_messageInfo_UncountedTerminatedPods proto.InternalMessageInfo +func (m *SuccessPolicyRule) Reset() { *m = SuccessPolicyRule{} } -func init() { - proto.RegisterType((*CronJob)(nil), "k8s.io.api.batch.v1.CronJob") - proto.RegisterType((*CronJobList)(nil), "k8s.io.api.batch.v1.CronJobList") - proto.RegisterType((*CronJobSpec)(nil), "k8s.io.api.batch.v1.CronJobSpec") - proto.RegisterType((*CronJobStatus)(nil), "k8s.io.api.batch.v1.CronJobStatus") - proto.RegisterType((*Job)(nil), "k8s.io.api.batch.v1.Job") - proto.RegisterType((*JobCondition)(nil), "k8s.io.api.batch.v1.JobCondition") - proto.RegisterType((*JobList)(nil), "k8s.io.api.batch.v1.JobList") - proto.RegisterType((*JobSpec)(nil), "k8s.io.api.batch.v1.JobSpec") - proto.RegisterType((*JobStatus)(nil), "k8s.io.api.batch.v1.JobStatus") - proto.RegisterType((*JobTemplateSpec)(nil), "k8s.io.api.batch.v1.JobTemplateSpec") - proto.RegisterType((*PodFailurePolicy)(nil), "k8s.io.api.batch.v1.PodFailurePolicy") - proto.RegisterType((*PodFailurePolicyOnExitCodesRequirement)(nil), "k8s.io.api.batch.v1.PodFailurePolicyOnExitCodesRequirement") - proto.RegisterType((*PodFailurePolicyOnPodConditionsPattern)(nil), "k8s.io.api.batch.v1.PodFailurePolicyOnPodConditionsPattern") - proto.RegisterType((*PodFailurePolicyRule)(nil), "k8s.io.api.batch.v1.PodFailurePolicyRule") - proto.RegisterType((*SuccessPolicy)(nil), "k8s.io.api.batch.v1.SuccessPolicy") - proto.RegisterType((*SuccessPolicyRule)(nil), "k8s.io.api.batch.v1.SuccessPolicyRule") - proto.RegisterType((*UncountedTerminatedPods)(nil), "k8s.io.api.batch.v1.UncountedTerminatedPods") -} - -func init() { - proto.RegisterFile("k8s.io/api/batch/v1/generated.proto", fileDescriptor_79228dc2c4001a22) -} - -var fileDescriptor_79228dc2c4001a22 = []byte{ - // 1882 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6f, 0xdb, 0xc8, - 0x15, 0x37, 0x6d, 0xcb, 0x96, 0x46, 0xfe, 0x90, 0x27, 0x4e, 0xa2, 0xba, 0x0b, 0xd1, 0xab, 0xec, - 0x06, 0xde, 0x76, 0x2b, 0x6d, 0xbc, 0x41, 0xb7, 0x1f, 0x68, 0xb1, 0xa1, 0xd2, 0x6c, 0xe3, 0x95, - 0x37, 0xea, 0xc8, 0x69, 0x81, 0xdd, 0xb4, 0xe8, 0x88, 0x1c, 0xc9, 0xdc, 0x50, 0x1c, 0x96, 0x1c, - 0x1a, 0xf1, 0xa5, 0x28, 0xd0, 0x7f, 0xa0, 0x3d, 0xf6, 0x1f, 0xe8, 0xb1, 0x97, 0xf6, 0xdc, 0xde, - 0x8a, 0x1c, 0x17, 0x3d, 0x2d, 0x7a, 0x20, 0x1a, 0xf6, 0x0f, 0xe8, 0xdd, 0x45, 0x81, 0x62, 0x86, - 0xc3, 0x4f, 0x91, 0x5e, 0x67, 0x81, 0x06, 0xbd, 0x89, 0xef, 0xfd, 0xde, 0x6f, 0x1e, 0xe7, 0x7d, - 0x52, 0xe0, 0xd6, 0xd3, 0x6f, 0x79, 0x3d, 0x93, 0xf6, 0xb1, 0x63, 0xf6, 0x27, 0x98, 0xe9, 0xa7, - 0xfd, 0xb3, 0x3b, 0xfd, 0x19, 0xb1, 0x89, 0x8b, 0x19, 0x31, 0x7a, 0x8e, 0x4b, 0x19, 0x85, 0xd7, - 0x22, 0x50, 0x0f, 0x3b, 0x66, 0x4f, 0x80, 0x7a, 0x67, 0x77, 0xf6, 0xbe, 0x31, 0x33, 0xd9, 0xa9, - 0x3f, 0xe9, 0xe9, 0x74, 0xde, 0x9f, 0xd1, 0x19, 0xed, 0x0b, 0xec, 0xc4, 0x9f, 0x8a, 0x27, 0xf1, - 0x20, 0x7e, 0x45, 0x1c, 0x7b, 0xdd, 0xcc, 0x41, 0x3a, 0x75, 0x49, 0xc9, 0x39, 0x7b, 0x77, 0x53, - 0xcc, 0x1c, 0xeb, 0xa7, 0xa6, 0x4d, 0xdc, 0xf3, 0xbe, 0xf3, 0x74, 0xc6, 0x05, 0x5e, 0x7f, 0x4e, - 0x18, 0x2e, 0xb3, 0xea, 0x57, 0x59, 0xb9, 0xbe, 0xcd, 0xcc, 0x39, 0x59, 0x30, 0xf8, 0xe6, 0x17, - 0x19, 0x78, 0xfa, 0x29, 0x99, 0xe3, 0xa2, 0x5d, 0xf7, 0xdf, 0x0a, 0x58, 0x1f, 0xb8, 0xd4, 0x3e, - 0xa2, 0x13, 0xf8, 0x73, 0x50, 0xe7, 0xfe, 0x18, 0x98, 0xe1, 0xb6, 0xb2, 0xaf, 0x1c, 0x34, 0x0f, - 0xdf, 0xe9, 0xa5, 0xb7, 0x94, 0xd0, 0xf6, 0x9c, 0xa7, 0x33, 0x2e, 0xf0, 0x7a, 0x1c, 0xdd, 0x3b, - 0xbb, 0xd3, 0x7b, 0x34, 0xf9, 0x94, 0xe8, 0xec, 0x98, 0x30, 0xac, 0xc1, 0xe7, 0x81, 0xba, 0x14, - 0x06, 0x2a, 0x48, 0x65, 0x28, 0x61, 0x85, 0x1a, 0x58, 0xf5, 0x1c, 0xa2, 0xb7, 0x97, 0x05, 0xfb, - 0x7e, 0xaf, 0x24, 0x06, 0x3d, 0xe9, 0xcd, 0xd8, 0x21, 0xba, 0xb6, 0x21, 0xd9, 0x56, 0xf9, 0x13, - 0x12, 0xb6, 0xf0, 0x08, 0xac, 0x79, 0x0c, 0x33, 0xdf, 0x6b, 0xaf, 0x08, 0x96, 0xee, 0xa5, 0x2c, - 0x02, 0xa9, 0x6d, 0x49, 0x9e, 0xb5, 0xe8, 0x19, 0x49, 0x86, 0xee, 0x1f, 0x14, 0xd0, 0x94, 0xc8, - 0xa1, 0xe9, 0x31, 0xf8, 0x64, 0xe1, 0x06, 0x7a, 0x57, 0xbb, 0x01, 0x6e, 0x2d, 0xde, 0xbf, 0x25, - 0x4f, 0xaa, 0xc7, 0x92, 0xcc, 0xdb, 0xdf, 0x03, 0x35, 0x93, 0x91, 0xb9, 0xd7, 0x5e, 0xde, 0x5f, - 0x39, 0x68, 0x1e, 0xbe, 0x76, 0x99, 0xe3, 0xda, 0xa6, 0x24, 0xaa, 0x3d, 0xe4, 0x26, 0x28, 0xb2, - 0xec, 0xfe, 0x6d, 0x35, 0x71, 0x98, 0x5f, 0x09, 0x7c, 0x1b, 0xd4, 0x79, 0x60, 0x0d, 0xdf, 0x22, - 0xc2, 0xe1, 0x46, 0xea, 0xc0, 0x58, 0xca, 0x51, 0x82, 0x80, 0x07, 0xa0, 0xce, 0x73, 0xe1, 0x63, - 0x6a, 0x93, 0x76, 0x5d, 0xa0, 0x37, 0x38, 0xf2, 0x44, 0xca, 0x50, 0xa2, 0x85, 0x8f, 0xc1, 0x4d, - 0x8f, 0x61, 0x97, 0x99, 0xf6, 0xec, 0x3e, 0xc1, 0x86, 0x65, 0xda, 0x64, 0x4c, 0x74, 0x6a, 0x1b, - 0x9e, 0x88, 0xdd, 0x8a, 0xf6, 0xd5, 0x30, 0x50, 0x6f, 0x8e, 0xcb, 0x21, 0xa8, 0xca, 0x16, 0x3e, - 0x01, 0x3b, 0x3a, 0xb5, 0x75, 0xdf, 0x75, 0x89, 0xad, 0x9f, 0x8f, 0xa8, 0x65, 0xea, 0xe7, 0x22, - 0x8c, 0x0d, 0xad, 0x27, 0xfd, 0xde, 0x19, 0x14, 0x01, 0x17, 0x65, 0x42, 0xb4, 0x48, 0x04, 0xdf, - 0x04, 0xeb, 0x9e, 0xef, 0x39, 0xc4, 0x36, 0xda, 0xab, 0xfb, 0xca, 0x41, 0x5d, 0x6b, 0x86, 0x81, - 0xba, 0x3e, 0x8e, 0x44, 0x28, 0xd6, 0xc1, 0x4f, 0x40, 0xf3, 0x53, 0x3a, 0x39, 0x21, 0x73, 0xc7, - 0xc2, 0x8c, 0xb4, 0x6b, 0x22, 0xce, 0x6f, 0x94, 0x06, 0xe3, 0x28, 0xc5, 0x89, 0x7c, 0xbc, 0x26, - 0x9d, 0x6c, 0x66, 0x14, 0x28, 0xcb, 0x06, 0x7f, 0x06, 0xf6, 0x3c, 0x5f, 0xd7, 0x89, 0xe7, 0x4d, - 0x7d, 0xeb, 0x88, 0x4e, 0xbc, 0x1f, 0x9a, 0x1e, 0xa3, 0xee, 0xf9, 0xd0, 0x9c, 0x9b, 0xac, 0xbd, - 0xb6, 0xaf, 0x1c, 0xd4, 0xb4, 0x4e, 0x18, 0xa8, 0x7b, 0xe3, 0x4a, 0x14, 0xba, 0x84, 0x01, 0x22, - 0x70, 0x63, 0x8a, 0x4d, 0x8b, 0x18, 0x0b, 0xdc, 0xeb, 0x82, 0x7b, 0x2f, 0x0c, 0xd4, 0x1b, 0x0f, - 0x4a, 0x11, 0xa8, 0xc2, 0xb2, 0xfb, 0xe7, 0x65, 0xb0, 0x99, 0xab, 0x17, 0xf8, 0x21, 0x58, 0xc3, - 0x3a, 0x33, 0xcf, 0x78, 0x52, 0xf1, 0x54, 0xbd, 0x95, 0xbd, 0x1d, 0xde, 0xe9, 0xd2, 0xaa, 0x47, - 0x64, 0x4a, 0x78, 0x10, 0x48, 0x5a, 0x64, 0xf7, 0x84, 0x29, 0x92, 0x14, 0xd0, 0x02, 0x2d, 0x0b, - 0x7b, 0x2c, 0xce, 0x47, 0x9e, 0x6d, 0x22, 0x3e, 0xcd, 0xc3, 0xaf, 0x5d, 0xad, 0xb8, 0xb8, 0x85, - 0xb6, 0x1b, 0x06, 0x6a, 0x6b, 0x58, 0xe0, 0x41, 0x0b, 0xcc, 0xd0, 0x05, 0x50, 0xc8, 0x92, 0x2b, - 0x14, 0xe7, 0xd5, 0x5e, 0xfa, 0xbc, 0x1b, 0x61, 0xa0, 0xc2, 0xe1, 0x02, 0x13, 0x2a, 0x61, 0xef, - 0xfe, 0x4b, 0x01, 0x2b, 0xaf, 0xa6, 0x81, 0x7e, 0x3f, 0xd7, 0x40, 0x5f, 0xab, 0x4a, 0xda, 0xca, - 0xe6, 0xf9, 0xa0, 0xd0, 0x3c, 0x3b, 0x95, 0x0c, 0x97, 0x37, 0xce, 0xbf, 0xae, 0x80, 0x8d, 0x23, - 0x3a, 0x19, 0x50, 0xdb, 0x30, 0x99, 0x49, 0x6d, 0x78, 0x17, 0xac, 0xb2, 0x73, 0x27, 0x6e, 0x42, - 0xfb, 0xf1, 0xd1, 0x27, 0xe7, 0x0e, 0xb9, 0x08, 0xd4, 0x56, 0x16, 0xcb, 0x65, 0x48, 0xa0, 0xe1, - 0x30, 0x71, 0x67, 0x59, 0xd8, 0xdd, 0xcd, 0x1f, 0x77, 0x11, 0xa8, 0x25, 0x23, 0xb6, 0x97, 0x30, - 0xe5, 0x9d, 0x82, 0x33, 0xb0, 0xc9, 0x83, 0x33, 0x72, 0xe9, 0x24, 0xca, 0xb2, 0x95, 0x97, 0x8e, - 0xfa, 0x75, 0xe9, 0xc0, 0xe6, 0x30, 0x4b, 0x84, 0xf2, 0xbc, 0xf0, 0x2c, 0xca, 0xb1, 0x13, 0x17, - 0xdb, 0x5e, 0xf4, 0x4a, 0x5f, 0x2e, 0xa7, 0xf7, 0xe4, 0x69, 0x22, 0xcf, 0xf2, 0x6c, 0xa8, 0xe4, - 0x04, 0x78, 0x1b, 0xac, 0xb9, 0x04, 0x7b, 0xd4, 0x16, 0xf9, 0xdc, 0x48, 0xa3, 0x83, 0x84, 0x14, - 0x49, 0x2d, 0x7c, 0x0b, 0xac, 0xcf, 0x89, 0xe7, 0xe1, 0x19, 0x11, 0x1d, 0xa7, 0xa1, 0x6d, 0x4b, - 0xe0, 0xfa, 0x71, 0x24, 0x46, 0xb1, 0xbe, 0xfb, 0x7b, 0x05, 0xac, 0xbf, 0x9a, 0xe9, 0xf7, 0xbd, - 0xfc, 0xf4, 0x6b, 0x57, 0x65, 0x5e, 0xc5, 0xe4, 0xfb, 0x5d, 0x43, 0x38, 0x2a, 0xa6, 0xde, 0x1d, - 0xd0, 0x74, 0xb0, 0x8b, 0x2d, 0x8b, 0x58, 0xa6, 0x37, 0x17, 0xbe, 0xd6, 0xb4, 0x6d, 0xde, 0x97, - 0x47, 0xa9, 0x18, 0x65, 0x31, 0xdc, 0x44, 0xa7, 0x73, 0xc7, 0x22, 0xfc, 0x32, 0xa3, 0x74, 0x93, - 0x26, 0x83, 0x54, 0x8c, 0xb2, 0x18, 0xf8, 0x08, 0x5c, 0x8f, 0x3a, 0x58, 0x71, 0x02, 0xae, 0x88, - 0x09, 0xf8, 0x95, 0x30, 0x50, 0xaf, 0xdf, 0x2b, 0x03, 0xa0, 0x72, 0x3b, 0x38, 0x03, 0x2d, 0x87, - 0x1a, 0xbc, 0x39, 0xfb, 0x2e, 0x91, 0xc3, 0xaf, 0x29, 0xee, 0xf9, 0xcd, 0xd2, 0xcb, 0x18, 0x15, - 0xc0, 0x51, 0x0f, 0x2c, 0x4a, 0xd1, 0x02, 0x29, 0xfc, 0x04, 0x6c, 0xca, 0x11, 0x22, 0x4f, 0x69, - 0x5d, 0xb2, 0x29, 0x8d, 0xb3, 0x48, 0x6d, 0x87, 0x27, 0x7f, 0x4e, 0x84, 0xf2, 0x5c, 0xf0, 0x2e, - 0xd8, 0x98, 0x60, 0xfd, 0x29, 0x9d, 0x4e, 0xb3, 0x73, 0xa7, 0x15, 0x06, 0xea, 0x86, 0x96, 0x91, - 0xa3, 0x1c, 0x0a, 0x0e, 0xc1, 0x6e, 0xf6, 0x79, 0x44, 0xdc, 0x87, 0xb6, 0x41, 0x9e, 0xb5, 0x37, - 0x84, 0x75, 0x3b, 0x0c, 0xd4, 0x5d, 0xad, 0x44, 0x8f, 0x4a, 0xad, 0xe0, 0xfb, 0xa0, 0x35, 0xc7, - 0xcf, 0xa2, 0x31, 0x27, 0x24, 0xc4, 0x6b, 0x6f, 0x0a, 0x26, 0x71, 0x45, 0xc7, 0x05, 0x1d, 0x5a, - 0x40, 0xc3, 0x9f, 0x82, 0xba, 0x47, 0x2c, 0xa2, 0x33, 0xea, 0xca, 0xc2, 0x7d, 0xf7, 0x8a, 0xb9, - 0x8e, 0x27, 0xc4, 0x1a, 0x4b, 0xd3, 0x68, 0x7f, 0x8a, 0x9f, 0x50, 0x42, 0x09, 0xbf, 0x03, 0xb6, - 0xe6, 0xd8, 0xf6, 0x71, 0x82, 0x14, 0x15, 0x5b, 0xd7, 0x60, 0x18, 0xa8, 0x5b, 0xc7, 0x39, 0x0d, - 0x2a, 0x20, 0xe1, 0x8f, 0x40, 0x9d, 0xc5, 0xcb, 0xc9, 0x9a, 0x70, 0xad, 0x74, 0xfc, 0x8e, 0xa8, - 0x91, 0xdb, 0x4d, 0x92, 0xda, 0x4b, 0x16, 0x93, 0x84, 0x86, 0xaf, 0x73, 0x8c, 0x59, 0x32, 0x0f, - 0xef, 0x4d, 0x19, 0x71, 0x1f, 0x98, 0xb6, 0xe9, 0x9d, 0x12, 0x43, 0xec, 0x81, 0xb5, 0x68, 0x9d, - 0x3b, 0x39, 0x19, 0x96, 0x41, 0x50, 0x95, 0x2d, 0x1c, 0x82, 0xad, 0xb4, 0x60, 0x8e, 0xa9, 0x41, - 0xda, 0x0d, 0xd1, 0x6e, 0xde, 0xe0, 0x6f, 0x39, 0xc8, 0x69, 0x2e, 0x16, 0x24, 0xa8, 0x60, 0x9b, - 0x5d, 0xdf, 0xc0, 0x25, 0xeb, 0x9b, 0x01, 0x76, 0x1d, 0x6a, 0x20, 0xe2, 0x58, 0x58, 0x27, 0x73, - 0x62, 0x33, 0x99, 0xe3, 0x5b, 0xe2, 0xe8, 0x77, 0x78, 0x26, 0x8d, 0x4a, 0xf4, 0x17, 0x15, 0x72, - 0x54, 0xca, 0x06, 0xbf, 0x0e, 0x1a, 0x73, 0x6c, 0xe3, 0x19, 0x31, 0xb4, 0xf3, 0xf6, 0xb6, 0xa0, - 0xde, 0x0c, 0x03, 0xb5, 0x71, 0x1c, 0x0b, 0x51, 0xaa, 0xef, 0xfe, 0xa7, 0x06, 0x1a, 0xe9, 0xf2, - 0xf4, 0x18, 0x00, 0x3d, 0x9e, 0x50, 0x9e, 0x5c, 0xa0, 0x5e, 0xaf, 0xea, 0x76, 0xc9, 0x2c, 0x4b, - 0x07, 0x7f, 0x22, 0xf2, 0x50, 0x86, 0x08, 0xfe, 0x04, 0x34, 0xc4, 0x5a, 0x2d, 0x66, 0xcd, 0xf2, - 0x4b, 0xcf, 0x1a, 0xe1, 0xfd, 0x38, 0x26, 0x40, 0x29, 0x17, 0x9c, 0x66, 0xa3, 0xf8, 0x25, 0xe7, - 0x26, 0xcc, 0x47, 0x5c, 0x1c, 0x51, 0x60, 0xe5, 0xd3, 0x4b, 0x2e, 0x95, 0xab, 0x22, 0xe7, 0xaa, - 0xf6, 0xc5, 0x3e, 0x68, 0x88, 0x8e, 0x43, 0x0c, 0x62, 0x88, 0xb2, 0xa9, 0x69, 0x3b, 0x12, 0xda, - 0x18, 0xc7, 0x0a, 0x94, 0x62, 0x38, 0x71, 0xb4, 0xd9, 0xca, 0xfd, 0x3a, 0x21, 0x8e, 0x4a, 0x1e, - 0x49, 0x2d, 0x9f, 0x01, 0x8c, 0xb8, 0x73, 0xd3, 0xc6, 0xfc, 0xdb, 0x44, 0xb4, 0x5e, 0x39, 0x03, - 0x4e, 0x52, 0x31, 0xca, 0x62, 0xe0, 0x7d, 0xd0, 0x92, 0x6f, 0x91, 0x36, 0x9a, 0x75, 0x91, 0x0d, - 0x6d, 0x79, 0x48, 0x6b, 0x50, 0xd0, 0xa3, 0x05, 0x0b, 0xf8, 0x1e, 0xd8, 0x9c, 0xe6, 0x7a, 0x15, - 0x10, 0x14, 0xa2, 0xd7, 0xe6, 0x1b, 0x55, 0x1e, 0x07, 0x7f, 0xad, 0x80, 0x9b, 0xbe, 0xad, 0x53, - 0xdf, 0x66, 0xc4, 0x88, 0x9d, 0x24, 0xc6, 0x88, 0x1a, 0x9e, 0x28, 0xdc, 0xe6, 0xe1, 0xdb, 0xa5, - 0x89, 0xf5, 0xb8, 0xdc, 0x26, 0x2a, 0xf3, 0x0a, 0x25, 0xaa, 0x3a, 0x09, 0xaa, 0xa0, 0xe6, 0x12, - 0x6c, 0x9c, 0x8b, 0xea, 0xae, 0x69, 0x0d, 0x3e, 0x9b, 0x11, 0x17, 0xa0, 0x48, 0xde, 0xfd, 0xa3, - 0x02, 0xb6, 0x0b, 0x9f, 0x4a, 0xff, 0xff, 0xbb, 0x70, 0x77, 0x02, 0x16, 0x66, 0x29, 0xfc, 0x08, - 0xd4, 0x5c, 0xdf, 0x22, 0x71, 0xd9, 0xbe, 0x75, 0xa5, 0xb9, 0x8c, 0x7c, 0x8b, 0xa4, 0x5b, 0x0b, - 0x7f, 0xf2, 0x50, 0x44, 0xd3, 0xfd, 0xbb, 0x02, 0x6e, 0x17, 0xe1, 0x8f, 0xec, 0x1f, 0x3c, 0x33, - 0xd9, 0x80, 0x1a, 0xc4, 0x43, 0xe4, 0x17, 0xbe, 0xe9, 0x8a, 0xbe, 0xc3, 0x93, 0x44, 0xa7, 0x36, - 0xc3, 0xfc, 0x5a, 0x3e, 0xc2, 0xf3, 0x78, 0x95, 0x16, 0x49, 0x32, 0xc8, 0x2a, 0x50, 0x1e, 0x07, - 0xc7, 0xa0, 0x4e, 0x1d, 0xe2, 0x62, 0x3e, 0x65, 0xa2, 0x35, 0xfa, 0xbd, 0x78, 0x14, 0x3c, 0x92, - 0xf2, 0x8b, 0x40, 0xbd, 0x75, 0x89, 0x1b, 0x31, 0x0c, 0x25, 0x44, 0xb0, 0x0b, 0xd6, 0xce, 0xb0, - 0xe5, 0x13, 0xbe, 0xed, 0xac, 0x1c, 0xd4, 0x34, 0xc0, 0xeb, 0xe9, 0xc7, 0x42, 0x82, 0xa4, 0xa6, - 0xfb, 0x97, 0xd2, 0x97, 0x1b, 0x51, 0x23, 0xed, 0x60, 0x23, 0xcc, 0x18, 0x71, 0x6d, 0xf8, 0x41, - 0xee, 0xf3, 0xe0, 0xdd, 0xc2, 0xe7, 0xc1, 0xad, 0x92, 0x25, 0x3f, 0x4b, 0xf3, 0xbf, 0xfa, 0x62, - 0xe8, 0x3e, 0x5f, 0x06, 0xbb, 0x65, 0xd1, 0x84, 0xef, 0x47, 0xbd, 0x8a, 0xda, 0xd2, 0xe3, 0x83, - 0x6c, 0xaf, 0xa2, 0xf6, 0x45, 0xa0, 0xde, 0x28, 0xda, 0x45, 0x1a, 0x24, 0xed, 0xa0, 0x0d, 0x9a, - 0x34, 0xbd, 0x61, 0x99, 0xa4, 0xdf, 0xbd, 0x52, 0x3e, 0x95, 0x27, 0x48, 0xd4, 0xa9, 0xb2, 0xba, - 0xec, 0x01, 0xf0, 0x97, 0x60, 0x9b, 0xe6, 0xef, 0x5e, 0x44, 0xee, 0xea, 0x67, 0x96, 0xc5, 0x4d, - 0xbb, 0x29, 0xdf, 0x7b, 0xbb, 0xa0, 0x47, 0xc5, 0xc3, 0xba, 0x4f, 0x40, 0x7e, 0x6d, 0x84, 0x1f, - 0xe6, 0x4b, 0xe9, 0xf6, 0x17, 0x2f, 0x9f, 0x97, 0xd4, 0xd1, 0x6f, 0x15, 0xb0, 0xb3, 0x80, 0xe5, - 0x6b, 0x60, 0x32, 0x05, 0xe2, 0xd6, 0x1a, 0xc5, 0x4b, 0xac, 0x81, 0xe3, 0x82, 0x0e, 0x2d, 0xa0, - 0xf9, 0x9e, 0x96, 0xc8, 0x06, 0xbc, 0xf9, 0xc9, 0x2f, 0x03, 0x31, 0xcf, 0xc6, 0x39, 0x0d, 0x2a, - 0x20, 0xbb, 0x7f, 0x52, 0x40, 0x55, 0x2f, 0x85, 0xa3, 0xec, 0x0c, 0xe3, 0x17, 0xd0, 0xd0, 0x0e, - 0x73, 0xf3, 0xeb, 0x22, 0x50, 0x5f, 0xaf, 0xfa, 0xcb, 0x96, 0x27, 0xba, 0xd7, 0x7b, 0xfc, 0xf0, - 0x7e, 0x76, 0xc8, 0x7d, 0x90, 0x0c, 0xb9, 0x65, 0x41, 0xd7, 0x4f, 0x07, 0xdc, 0xd5, 0xb8, 0xa4, - 0xb9, 0xf6, 0xed, 0xe7, 0x2f, 0x3a, 0x4b, 0x9f, 0xbd, 0xe8, 0x2c, 0x7d, 0xfe, 0xa2, 0xb3, 0xf4, - 0xab, 0xb0, 0xa3, 0x3c, 0x0f, 0x3b, 0xca, 0x67, 0x61, 0x47, 0xf9, 0x3c, 0xec, 0x28, 0xff, 0x08, - 0x3b, 0xca, 0x6f, 0xfe, 0xd9, 0x59, 0xfa, 0xf8, 0x5a, 0xc9, 0x7f, 0xe8, 0xff, 0x0d, 0x00, 0x00, - 0xff, 0xff, 0x1e, 0x70, 0x68, 0xe1, 0x59, 0x17, 0x00, 0x00, -} +func (m *UncountedTerminatedPods) Reset() { *m = UncountedTerminatedPods{} } func (m *CronJob) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/batch/v1/generated.proto b/staging/src/k8s.io/api/batch/v1/generated.proto index c0ce8cef26cb2..3034fd262c402 100644 --- a/staging/src/k8s.io/api/batch/v1/generated.proto +++ b/staging/src/k8s.io/api/batch/v1/generated.proto @@ -532,6 +532,7 @@ message PodFailurePolicyOnPodConditionsPattern { // Specifies the required Pod condition status. To match a pod condition // it is required that the specified status equals the pod condition status. // Defaults to True. + // +optional optional string status = 2; } diff --git a/staging/src/k8s.io/api/batch/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/batch/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..82928e07d1ede --- /dev/null +++ b/staging/src/k8s.io/api/batch/v1/generated.protomessage.pb.go @@ -0,0 +1,56 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*CronJob) ProtoMessage() {} + +func (*CronJobList) ProtoMessage() {} + +func (*CronJobSpec) ProtoMessage() {} + +func (*CronJobStatus) ProtoMessage() {} + +func (*Job) ProtoMessage() {} + +func (*JobCondition) ProtoMessage() {} + +func (*JobList) ProtoMessage() {} + +func (*JobSpec) ProtoMessage() {} + +func (*JobStatus) ProtoMessage() {} + +func (*JobTemplateSpec) ProtoMessage() {} + +func (*PodFailurePolicy) ProtoMessage() {} + +func (*PodFailurePolicyOnExitCodesRequirement) ProtoMessage() {} + +func (*PodFailurePolicyOnPodConditionsPattern) ProtoMessage() {} + +func (*PodFailurePolicyRule) ProtoMessage() {} + +func (*SuccessPolicy) ProtoMessage() {} + +func (*SuccessPolicyRule) ProtoMessage() {} + +func (*UncountedTerminatedPods) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/batch/v1/types.go b/staging/src/k8s.io/api/batch/v1/types.go index 9183c073d2ae3..8ad837f7c1bd3 100644 --- a/staging/src/k8s.io/api/batch/v1/types.go +++ b/staging/src/k8s.io/api/batch/v1/types.go @@ -209,6 +209,7 @@ type PodFailurePolicyOnPodConditionsPattern struct { // Specifies the required Pod condition status. To match a pod condition // it is required that the specified status equals the pod condition status. // Defaults to True. + // +optional Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,req,name=status"` } diff --git a/staging/src/k8s.io/api/batch/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/batch/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..c5b86f29cdf27 --- /dev/null +++ b/staging/src/k8s.io/api/batch/v1/zz_generated.model_name.go @@ -0,0 +1,107 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CronJob) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.CronJob" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CronJobList) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.CronJobList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CronJobSpec) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.CronJobSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CronJobStatus) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.CronJobStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Job) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.Job" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JobCondition) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.JobCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JobList) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.JobList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JobSpec) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.JobSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JobStatus) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.JobStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JobTemplateSpec) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.JobTemplateSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodFailurePolicy) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.PodFailurePolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodFailurePolicyOnExitCodesRequirement) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.PodFailurePolicyOnExitCodesRequirement" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodFailurePolicyOnPodConditionsPattern) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.PodFailurePolicyOnPodConditionsPattern" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodFailurePolicyRule) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.PodFailurePolicyRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SuccessPolicy) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.SuccessPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SuccessPolicyRule) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.SuccessPolicyRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in UncountedTerminatedPods) OpenAPIModelName() string { + return "io.k8s.api.batch.v1.UncountedTerminatedPods" +} diff --git a/staging/src/k8s.io/api/batch/v1beta1/doc.go b/staging/src/k8s.io/api/batch/v1beta1/doc.go index 3430d6939d47f..b71088480abc7 100644 --- a/staging/src/k8s.io/api/batch/v1beta1/doc.go +++ b/staging/src/k8s.io/api/batch/v1beta1/doc.go @@ -18,5 +18,6 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.batch.v1beta1 package v1beta1 diff --git a/staging/src/k8s.io/api/batch/v1beta1/generated.pb.go b/staging/src/k8s.io/api/batch/v1beta1/generated.pb.go index 895d9c91966ad..5e0888a6a0e77 100644 --- a/staging/src/k8s.io/api/batch/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/batch/v1beta1/generated.pb.go @@ -24,231 +24,23 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" v11 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *CronJob) Reset() { *m = CronJob{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *CronJobList) Reset() { *m = CronJobList{} } -func (m *CronJob) Reset() { *m = CronJob{} } -func (*CronJob) ProtoMessage() {} -func (*CronJob) Descriptor() ([]byte, []int) { - return fileDescriptor_ed95843ae7b4086b, []int{0} -} -func (m *CronJob) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CronJob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CronJob) XXX_Merge(src proto.Message) { - xxx_messageInfo_CronJob.Merge(m, src) -} -func (m *CronJob) XXX_Size() int { - return m.Size() -} -func (m *CronJob) XXX_DiscardUnknown() { - xxx_messageInfo_CronJob.DiscardUnknown(m) -} - -var xxx_messageInfo_CronJob proto.InternalMessageInfo - -func (m *CronJobList) Reset() { *m = CronJobList{} } -func (*CronJobList) ProtoMessage() {} -func (*CronJobList) Descriptor() ([]byte, []int) { - return fileDescriptor_ed95843ae7b4086b, []int{1} -} -func (m *CronJobList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CronJobList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CronJobList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CronJobList.Merge(m, src) -} -func (m *CronJobList) XXX_Size() int { - return m.Size() -} -func (m *CronJobList) XXX_DiscardUnknown() { - xxx_messageInfo_CronJobList.DiscardUnknown(m) -} - -var xxx_messageInfo_CronJobList proto.InternalMessageInfo - -func (m *CronJobSpec) Reset() { *m = CronJobSpec{} } -func (*CronJobSpec) ProtoMessage() {} -func (*CronJobSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_ed95843ae7b4086b, []int{2} -} -func (m *CronJobSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CronJobSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CronJobSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_CronJobSpec.Merge(m, src) -} -func (m *CronJobSpec) XXX_Size() int { - return m.Size() -} -func (m *CronJobSpec) XXX_DiscardUnknown() { - xxx_messageInfo_CronJobSpec.DiscardUnknown(m) -} +func (m *CronJobSpec) Reset() { *m = CronJobSpec{} } -var xxx_messageInfo_CronJobSpec proto.InternalMessageInfo +func (m *CronJobStatus) Reset() { *m = CronJobStatus{} } -func (m *CronJobStatus) Reset() { *m = CronJobStatus{} } -func (*CronJobStatus) ProtoMessage() {} -func (*CronJobStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ed95843ae7b4086b, []int{3} -} -func (m *CronJobStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CronJobStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CronJobStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_CronJobStatus.Merge(m, src) -} -func (m *CronJobStatus) XXX_Size() int { - return m.Size() -} -func (m *CronJobStatus) XXX_DiscardUnknown() { - xxx_messageInfo_CronJobStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_CronJobStatus proto.InternalMessageInfo - -func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} } -func (*JobTemplateSpec) ProtoMessage() {} -func (*JobTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_ed95843ae7b4086b, []int{4} -} -func (m *JobTemplateSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JobTemplateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JobTemplateSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobTemplateSpec.Merge(m, src) -} -func (m *JobTemplateSpec) XXX_Size() int { - return m.Size() -} -func (m *JobTemplateSpec) XXX_DiscardUnknown() { - xxx_messageInfo_JobTemplateSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_JobTemplateSpec proto.InternalMessageInfo - -func init() { - proto.RegisterType((*CronJob)(nil), "k8s.io.api.batch.v1beta1.CronJob") - proto.RegisterType((*CronJobList)(nil), "k8s.io.api.batch.v1beta1.CronJobList") - proto.RegisterType((*CronJobSpec)(nil), "k8s.io.api.batch.v1beta1.CronJobSpec") - proto.RegisterType((*CronJobStatus)(nil), "k8s.io.api.batch.v1beta1.CronJobStatus") - proto.RegisterType((*JobTemplateSpec)(nil), "k8s.io.api.batch.v1beta1.JobTemplateSpec") -} - -func init() { - proto.RegisterFile("k8s.io/api/batch/v1beta1/generated.proto", fileDescriptor_ed95843ae7b4086b) -} - -var fileDescriptor_ed95843ae7b4086b = []byte{ - // 771 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0xcf, 0x8f, 0xdb, 0x44, - 0x14, 0xc7, 0xe3, 0x6c, 0x7e, 0x75, 0xd2, 0xc2, 0x76, 0x40, 0x5b, 0x2b, 0x20, 0x3b, 0xa4, 0xaa, - 0x08, 0x08, 0xc6, 0xec, 0x0a, 0x21, 0x4e, 0x95, 0x70, 0x51, 0x81, 0x25, 0xa8, 0x68, 0x52, 0x2e, - 0x55, 0x85, 0x3a, 0x9e, 0x4c, 0x92, 0xe9, 0xda, 0x1e, 0xcb, 0x33, 0x5e, 0x29, 0x37, 0x2e, 0xdc, - 0xf9, 0x5f, 0xb8, 0x73, 0xde, 0x63, 0x6f, 0xf4, 0x64, 0xb1, 0xe6, 0xbf, 0xe0, 0x84, 0x66, 0xe2, - 0x4d, 0xd2, 0xc4, 0xe9, 0x96, 0x0b, 0xb7, 0xcc, 0xf3, 0xf7, 0xfb, 0x99, 0xa7, 0xf7, 0xde, 0xbc, - 0x80, 0xe1, 0xd9, 0x97, 0x12, 0x71, 0xe1, 0x91, 0x84, 0x7b, 0x01, 0x51, 0x74, 0xee, 0x9d, 0x1f, - 0x07, 0x4c, 0x91, 0x63, 0x6f, 0xc6, 0x62, 0x96, 0x12, 0xc5, 0x26, 0x28, 0x49, 0x85, 0x12, 0xd0, - 0x5e, 0x2a, 0x11, 0x49, 0x38, 0x32, 0x4a, 0x54, 0x2a, 0x7b, 0x9f, 0xce, 0xb8, 0x9a, 0x67, 0x01, - 0xa2, 0x22, 0xf2, 0x66, 0x62, 0x26, 0x3c, 0x63, 0x08, 0xb2, 0xa9, 0x39, 0x99, 0x83, 0xf9, 0xb5, - 0x04, 0xf5, 0xee, 0x56, 0x5c, 0xb9, 0x7d, 0x5b, 0x6f, 0xb0, 0x21, 0xa2, 0x22, 0x65, 0x55, 0x9a, - 0xcf, 0xd7, 0x9a, 0x88, 0xd0, 0x39, 0x8f, 0x59, 0xba, 0xf0, 0x92, 0xb3, 0x99, 0x0e, 0x48, 0x2f, - 0x62, 0x8a, 0x54, 0xb9, 0xbc, 0x7d, 0xae, 0x34, 0x8b, 0x15, 0x8f, 0xd8, 0x8e, 0xe1, 0x8b, 0xeb, - 0x0c, 0x92, 0xce, 0x59, 0x44, 0xb6, 0x7d, 0x83, 0x5f, 0xeb, 0xa0, 0xfd, 0x20, 0x15, 0xf1, 0xa9, - 0x08, 0xe0, 0x33, 0xd0, 0xd1, 0xf9, 0x4c, 0x88, 0x22, 0xb6, 0xd5, 0xb7, 0x86, 0xdd, 0x93, 0xcf, - 0xd0, 0xba, 0x9e, 0x2b, 0x2c, 0x4a, 0xce, 0x66, 0x3a, 0x20, 0x91, 0x56, 0xa3, 0xf3, 0x63, 0xf4, - 0x28, 0x78, 0xce, 0xa8, 0xfa, 0x81, 0x29, 0xe2, 0xc3, 0x8b, 0xdc, 0xad, 0x15, 0xb9, 0x0b, 0xd6, - 0x31, 0xbc, 0xa2, 0xc2, 0x6f, 0x40, 0x43, 0x26, 0x8c, 0xda, 0x75, 0x43, 0xbf, 0x87, 0xf6, 0x75, - 0x0b, 0x95, 0x29, 0x8d, 0x13, 0x46, 0xfd, 0x9b, 0x25, 0xb2, 0xa1, 0x4f, 0xd8, 0x00, 0xe0, 0x23, - 0xd0, 0x92, 0x8a, 0xa8, 0x4c, 0xda, 0x07, 0x06, 0xf5, 0xe1, 0xf5, 0x28, 0x23, 0xf7, 0xdf, 0x2a, - 0x61, 0xad, 0xe5, 0x19, 0x97, 0x98, 0xc1, 0xef, 0x16, 0xe8, 0x96, 0xca, 0x11, 0x97, 0x0a, 0x3e, - 0xdd, 0xa9, 0x05, 0x7a, 0xb3, 0x5a, 0x68, 0xb7, 0xa9, 0xc4, 0x61, 0x79, 0x53, 0xe7, 0x2a, 0xb2, - 0x51, 0x87, 0x87, 0xa0, 0xc9, 0x15, 0x8b, 0xa4, 0x5d, 0xef, 0x1f, 0x0c, 0xbb, 0x27, 0x1f, 0x5c, - 0x9b, 0xbd, 0x7f, 0xab, 0xa4, 0x35, 0xbf, 0xd3, 0x3e, 0xbc, 0xb4, 0x0f, 0xfe, 0x6c, 0xac, 0xb2, - 0xd6, 0xc5, 0x81, 0x9f, 0x80, 0x8e, 0xee, 0xf3, 0x24, 0x0b, 0x99, 0xc9, 0xfa, 0xc6, 0x3a, 0x8b, - 0x71, 0x19, 0xc7, 0x2b, 0x05, 0x1c, 0x82, 0x8e, 0x1e, 0x8d, 0x27, 0x22, 0x66, 0x76, 0xc7, 0xa8, - 0x6f, 0x6a, 0xe5, 0xe3, 0x32, 0x86, 0x57, 0x5f, 0xe1, 0x4f, 0xe0, 0x8e, 0x54, 0x24, 0x55, 0x3c, - 0x9e, 0x7d, 0xcd, 0xc8, 0x24, 0xe4, 0x31, 0x1b, 0x33, 0x2a, 0xe2, 0x89, 0x34, 0xad, 0x3c, 0xf0, - 0xdf, 0x2b, 0x72, 0xf7, 0xce, 0xb8, 0x5a, 0x82, 0xf7, 0x79, 0xe1, 0x53, 0x70, 0x9b, 0x8a, 0x98, - 0x66, 0x69, 0xca, 0x62, 0xba, 0xf8, 0x51, 0x84, 0x9c, 0x2e, 0x4c, 0x43, 0x6f, 0xf8, 0xa8, 0xcc, - 0xfb, 0xf6, 0x83, 0x6d, 0xc1, 0x3f, 0x55, 0x41, 0xbc, 0x0b, 0x82, 0xf7, 0x40, 0x5b, 0x66, 0x32, - 0x61, 0xf1, 0xc4, 0x6e, 0xf4, 0xad, 0x61, 0xc7, 0xef, 0x16, 0xb9, 0xdb, 0x1e, 0x2f, 0x43, 0xf8, - 0xea, 0x1b, 0x7c, 0x06, 0xba, 0xcf, 0x45, 0xf0, 0x98, 0x45, 0x49, 0x48, 0x14, 0xb3, 0x9b, 0xa6, - 0xd9, 0x1f, 0xed, 0xef, 0xc8, 0xe9, 0x5a, 0x6c, 0xc6, 0xf3, 0x9d, 0x32, 0xd3, 0xee, 0xc6, 0x07, - 0xbc, 0x89, 0x84, 0x3f, 0x83, 0x9e, 0xcc, 0x28, 0x65, 0x52, 0x4e, 0xb3, 0xf0, 0x54, 0x04, 0xf2, - 0x5b, 0x2e, 0x95, 0x48, 0x17, 0x23, 0x1e, 0x71, 0x65, 0xb7, 0xfa, 0xd6, 0xb0, 0xe9, 0x3b, 0x45, - 0xee, 0xf6, 0xc6, 0x7b, 0x55, 0xf8, 0x35, 0x04, 0x88, 0xc1, 0xd1, 0x94, 0xf0, 0x90, 0x4d, 0x76, - 0xd8, 0x6d, 0xc3, 0xee, 0x15, 0xb9, 0x7b, 0xf4, 0xb0, 0x52, 0x81, 0xf7, 0x38, 0x07, 0x7f, 0xd4, - 0xc1, 0xad, 0x57, 0x5e, 0x0e, 0xfc, 0x1e, 0xb4, 0x08, 0x55, 0xfc, 0x5c, 0x4f, 0x96, 0x1e, 0xda, - 0xbb, 0x9b, 0x25, 0xd2, 0xdb, 0x6f, 0xbd, 0x09, 0x30, 0x9b, 0x32, 0xdd, 0x09, 0xb6, 0x7e, 0x6e, - 0x5f, 0x19, 0x2b, 0x2e, 0x11, 0x30, 0x04, 0x87, 0x21, 0x91, 0xea, 0x6a, 0x28, 0xf5, 0xc8, 0x99, - 0x26, 0x75, 0x4f, 0x3e, 0x7e, 0xb3, 0x67, 0xa6, 0x1d, 0xfe, 0xbb, 0x45, 0xee, 0x1e, 0x8e, 0xb6, - 0x38, 0x78, 0x87, 0x0c, 0x53, 0x00, 0x4d, 0x6c, 0x55, 0x42, 0x73, 0x5f, 0xf3, 0x3f, 0xdf, 0x77, - 0x54, 0xe4, 0x2e, 0x1c, 0xed, 0x90, 0x70, 0x05, 0x5d, 0x2f, 0x94, 0xb7, 0xb7, 0x46, 0xe5, 0x7f, - 0x58, 0xb0, 0xf7, 0x5f, 0x59, 0xb0, 0xef, 0x57, 0x4d, 0x31, 0x7a, 0xcd, 0x5e, 0xf5, 0xef, 0x5f, - 0x5c, 0x3a, 0xb5, 0x17, 0x97, 0x4e, 0xed, 0xe5, 0xa5, 0x53, 0xfb, 0xa5, 0x70, 0xac, 0x8b, 0xc2, - 0xb1, 0x5e, 0x14, 0x8e, 0xf5, 0xb2, 0x70, 0xac, 0xbf, 0x0a, 0xc7, 0xfa, 0xed, 0x6f, 0xa7, 0xf6, - 0xc4, 0xde, 0xf7, 0x7f, 0xfc, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9e, 0xaa, 0x2c, 0x86, 0xaa, - 0x07, 0x00, 0x00, -} +func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} } func (m *CronJob) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/batch/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/batch/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..57520d7aff6db --- /dev/null +++ b/staging/src/k8s.io/api/batch/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,32 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*CronJob) ProtoMessage() {} + +func (*CronJobList) ProtoMessage() {} + +func (*CronJobSpec) ProtoMessage() {} + +func (*CronJobStatus) ProtoMessage() {} + +func (*JobTemplateSpec) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/batch/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/batch/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..77fe2f6629f90 --- /dev/null +++ b/staging/src/k8s.io/api/batch/v1beta1/zz_generated.model_name.go @@ -0,0 +1,47 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CronJob) OpenAPIModelName() string { + return "io.k8s.api.batch.v1beta1.CronJob" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CronJobList) OpenAPIModelName() string { + return "io.k8s.api.batch.v1beta1.CronJobList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CronJobSpec) OpenAPIModelName() string { + return "io.k8s.api.batch.v1beta1.CronJobSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CronJobStatus) OpenAPIModelName() string { + return "io.k8s.api.batch.v1beta1.CronJobStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JobTemplateSpec) OpenAPIModelName() string { + return "io.k8s.api.batch.v1beta1.JobTemplateSpec" +} diff --git a/staging/src/k8s.io/api/certificates/v1/doc.go b/staging/src/k8s.io/api/certificates/v1/doc.go index 6c16fc29b877a..3ed26758fba00 100644 --- a/staging/src/k8s.io/api/certificates/v1/doc.go +++ b/staging/src/k8s.io/api/certificates/v1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.certificates.v1 + // +groupName=certificates.k8s.io package v1 diff --git a/staging/src/k8s.io/api/certificates/v1/generated.pb.go b/staging/src/k8s.io/api/certificates/v1/generated.pb.go index cba4a8ea49260..e47a42e62e781 100644 --- a/staging/src/k8s.io/api/certificates/v1/generated.pb.go +++ b/staging/src/k8s.io/api/certificates/v1/generated.pb.go @@ -23,270 +23,26 @@ import ( fmt "fmt" io "io" - - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + "sort" k8s_io_api_core_v1 "k8s.io/api/core/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} } -func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} } -func (*CertificateSigningRequest) ProtoMessage() {} -func (*CertificateSigningRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5f7d41da689f96f7, []int{0} -} -func (m *CertificateSigningRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CertificateSigningRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CertificateSigningRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CertificateSigningRequest.Merge(m, src) -} -func (m *CertificateSigningRequest) XXX_Size() int { - return m.Size() -} -func (m *CertificateSigningRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CertificateSigningRequest.DiscardUnknown(m) -} +func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} } -var xxx_messageInfo_CertificateSigningRequest proto.InternalMessageInfo +func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} } -func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} } -func (*CertificateSigningRequestCondition) ProtoMessage() {} -func (*CertificateSigningRequestCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_5f7d41da689f96f7, []int{1} -} -func (m *CertificateSigningRequestCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CertificateSigningRequestCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CertificateSigningRequestCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_CertificateSigningRequestCondition.Merge(m, src) -} -func (m *CertificateSigningRequestCondition) XXX_Size() int { - return m.Size() -} -func (m *CertificateSigningRequestCondition) XXX_DiscardUnknown() { - xxx_messageInfo_CertificateSigningRequestCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_CertificateSigningRequestCondition proto.InternalMessageInfo +func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} } -func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} } -func (*CertificateSigningRequestList) ProtoMessage() {} -func (*CertificateSigningRequestList) Descriptor() ([]byte, []int) { - return fileDescriptor_5f7d41da689f96f7, []int{2} -} -func (m *CertificateSigningRequestList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CertificateSigningRequestList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CertificateSigningRequestList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CertificateSigningRequestList.Merge(m, src) -} -func (m *CertificateSigningRequestList) XXX_Size() int { - return m.Size() -} -func (m *CertificateSigningRequestList) XXX_DiscardUnknown() { - xxx_messageInfo_CertificateSigningRequestList.DiscardUnknown(m) -} - -var xxx_messageInfo_CertificateSigningRequestList proto.InternalMessageInfo - -func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} } -func (*CertificateSigningRequestSpec) ProtoMessage() {} -func (*CertificateSigningRequestSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_5f7d41da689f96f7, []int{3} -} -func (m *CertificateSigningRequestSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CertificateSigningRequestSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CertificateSigningRequestSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_CertificateSigningRequestSpec.Merge(m, src) -} -func (m *CertificateSigningRequestSpec) XXX_Size() int { - return m.Size() -} -func (m *CertificateSigningRequestSpec) XXX_DiscardUnknown() { - xxx_messageInfo_CertificateSigningRequestSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_CertificateSigningRequestSpec proto.InternalMessageInfo - -func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} } -func (*CertificateSigningRequestStatus) ProtoMessage() {} -func (*CertificateSigningRequestStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_5f7d41da689f96f7, []int{4} -} -func (m *CertificateSigningRequestStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CertificateSigningRequestStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CertificateSigningRequestStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_CertificateSigningRequestStatus.Merge(m, src) -} -func (m *CertificateSigningRequestStatus) XXX_Size() int { - return m.Size() -} -func (m *CertificateSigningRequestStatus) XXX_DiscardUnknown() { - xxx_messageInfo_CertificateSigningRequestStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_CertificateSigningRequestStatus proto.InternalMessageInfo - -func (m *ExtraValue) Reset() { *m = ExtraValue{} } -func (*ExtraValue) ProtoMessage() {} -func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_5f7d41da689f96f7, []int{5} -} -func (m *ExtraValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExtraValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExtraValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtraValue.Merge(m, src) -} -func (m *ExtraValue) XXX_Size() int { - return m.Size() -} -func (m *ExtraValue) XXX_DiscardUnknown() { - xxx_messageInfo_ExtraValue.DiscardUnknown(m) -} - -var xxx_messageInfo_ExtraValue proto.InternalMessageInfo - -func init() { - proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.api.certificates.v1.CertificateSigningRequest") - proto.RegisterType((*CertificateSigningRequestCondition)(nil), "k8s.io.api.certificates.v1.CertificateSigningRequestCondition") - proto.RegisterType((*CertificateSigningRequestList)(nil), "k8s.io.api.certificates.v1.CertificateSigningRequestList") - proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.api.certificates.v1.CertificateSigningRequestSpec") - proto.RegisterMapType((map[string]ExtraValue)(nil), "k8s.io.api.certificates.v1.CertificateSigningRequestSpec.ExtraEntry") - proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.api.certificates.v1.CertificateSigningRequestStatus") - proto.RegisterType((*ExtraValue)(nil), "k8s.io.api.certificates.v1.ExtraValue") -} - -func init() { - proto.RegisterFile("k8s.io/api/certificates/v1/generated.proto", fileDescriptor_5f7d41da689f96f7) -} - -var fileDescriptor_5f7d41da689f96f7 = []byte{ - // 896 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xc6, 0x7f, 0x62, 0x8f, 0x43, 0xda, 0x8e, 0xa0, 0x5a, 0x2c, 0xd5, 0x6b, 0xad, 0xa0, - 0x0a, 0x15, 0xcc, 0x92, 0xa8, 0x40, 0x28, 0x08, 0xa1, 0x4d, 0x23, 0x54, 0x91, 0x82, 0x34, 0x49, - 0x38, 0x14, 0x0e, 0x9d, 0xac, 0x5f, 0x37, 0xd3, 0x74, 0xff, 0xb0, 0x33, 0x6b, 0xd5, 0xb7, 0x7e, - 0x04, 0x8e, 0x1c, 0xf9, 0x02, 0x7c, 0x06, 0xae, 0x39, 0xf6, 0x58, 0x24, 0x64, 0x11, 0xf7, 0x5b, - 0xe4, 0x84, 0x66, 0x76, 0xbc, 0x76, 0x9c, 0xb8, 0x0d, 0xb9, 0x79, 0x7e, 0xf3, 0x7b, 0xbf, 0xdf, - 0x7b, 0x6f, 0xdf, 0x1b, 0x19, 0xdd, 0x39, 0xda, 0x14, 0x84, 0x27, 0x1e, 0x4b, 0xb9, 0x17, 0x40, - 0x26, 0xf9, 0x13, 0x1e, 0x30, 0x09, 0xc2, 0x1b, 0xac, 0x7b, 0x21, 0xc4, 0x90, 0x31, 0x09, 0x7d, - 0x92, 0x66, 0x89, 0x4c, 0x70, 0xa7, 0xe0, 0x12, 0x96, 0x72, 0x32, 0xcb, 0x25, 0x83, 0xf5, 0xce, - 0x27, 0x21, 0x97, 0x87, 0xf9, 0x01, 0x09, 0x92, 0xc8, 0x0b, 0x93, 0x30, 0xf1, 0x74, 0xc8, 0x41, - 0xfe, 0x44, 0x9f, 0xf4, 0x41, 0xff, 0x2a, 0xa4, 0x3a, 0xee, 0xac, 0x6d, 0x92, 0xc1, 0x05, 0x76, - 0x9d, 0xbb, 0x53, 0x4e, 0xc4, 0x82, 0x43, 0x1e, 0x43, 0x36, 0xf4, 0xd2, 0xa3, 0x50, 0x01, 0xc2, - 0x8b, 0x40, 0xb2, 0x8b, 0xa2, 0xbc, 0x45, 0x51, 0x59, 0x1e, 0x4b, 0x1e, 0xc1, 0xb9, 0x80, 0xcf, - 0xdf, 0x16, 0x20, 0x82, 0x43, 0x88, 0xd8, 0x7c, 0x9c, 0xfb, 0xd7, 0x12, 0x7a, 0x7f, 0x6b, 0xda, - 0x85, 0x5d, 0x1e, 0xc6, 0x3c, 0x0e, 0x29, 0xfc, 0x9a, 0x83, 0x90, 0xf8, 0x31, 0x6a, 0xaa, 0x0c, - 0xfb, 0x4c, 0x32, 0xdb, 0xea, 0x59, 0x6b, 0xed, 0x8d, 0x4f, 0xc9, 0xb4, 0x7d, 0xa5, 0x11, 0x49, - 0x8f, 0x42, 0x05, 0x08, 0xa2, 0xd8, 0x64, 0xb0, 0x4e, 0x7e, 0x3c, 0x78, 0x0a, 0x81, 0x7c, 0x08, - 0x92, 0xf9, 0xf8, 0x78, 0xe4, 0x54, 0xc6, 0x23, 0x07, 0x4d, 0x31, 0x5a, 0xaa, 0xe2, 0x9f, 0x51, - 0x4d, 0xa4, 0x10, 0xd8, 0x4b, 0x5a, 0xfd, 0x4b, 0xb2, 0xf8, 0xe3, 0x90, 0x85, 0x69, 0xee, 0xa6, - 0x10, 0xf8, 0x2b, 0xc6, 0xa6, 0xa6, 0x4e, 0x54, 0x8b, 0xe2, 0x00, 0x35, 0x84, 0x64, 0x32, 0x17, - 0x76, 0x55, 0xcb, 0x7f, 0x75, 0x35, 0x79, 0x2d, 0xe1, 0xaf, 0x1a, 0x83, 0x46, 0x71, 0xa6, 0x46, - 0xda, 0x7d, 0x5d, 0x45, 0xee, 0xc2, 0xd8, 0xad, 0x24, 0xee, 0x73, 0xc9, 0x93, 0x18, 0x6f, 0xa2, - 0x9a, 0x1c, 0xa6, 0xa0, 0xdb, 0xd8, 0xf2, 0x3f, 0x98, 0x64, 0xbb, 0x37, 0x4c, 0xe1, 0x74, 0xe4, - 0xbc, 0x3b, 0xcf, 0x57, 0x38, 0xd5, 0x11, 0x78, 0xa7, 0xac, 0xa2, 0xa1, 0x63, 0xef, 0x9e, 0x4d, - 0xe4, 0x74, 0xe4, 0x5c, 0x30, 0x87, 0xa4, 0x54, 0x3a, 0x9b, 0x2e, 0xbe, 0x8d, 0x1a, 0x19, 0x30, - 0x91, 0xc4, 0xba, 0xe5, 0xad, 0x69, 0x59, 0x54, 0xa3, 0xd4, 0xdc, 0xe2, 0x8f, 0xd0, 0x72, 0x04, - 0x42, 0xb0, 0x10, 0x74, 0xf3, 0x5a, 0xfe, 0x35, 0x43, 0x5c, 0x7e, 0x58, 0xc0, 0x74, 0x72, 0x8f, - 0x9f, 0xa2, 0xd5, 0x67, 0x4c, 0xc8, 0xfd, 0xb4, 0xcf, 0x24, 0xec, 0xf1, 0x08, 0xec, 0x9a, 0x6e, - 0xf7, 0x9d, 0xcb, 0xcd, 0x8a, 0x8a, 0xf0, 0x6f, 0x1a, 0xf5, 0xd5, 0x9d, 0x33, 0x4a, 0x74, 0x4e, - 0x19, 0x0f, 0x10, 0x56, 0xc8, 0x5e, 0xc6, 0x62, 0x51, 0x34, 0x4a, 0xf9, 0xd5, 0xff, 0xb7, 0x5f, - 0xc7, 0xf8, 0xe1, 0x9d, 0x73, 0x6a, 0xf4, 0x02, 0x07, 0xf7, 0x6f, 0x0b, 0xdd, 0x5a, 0xf8, 0x95, - 0x77, 0xb8, 0x90, 0xf8, 0x97, 0x73, 0xbb, 0x42, 0x2e, 0x97, 0x8f, 0x8a, 0xd6, 0x9b, 0x72, 0xdd, - 0xe4, 0xd4, 0x9c, 0x20, 0x33, 0x7b, 0xf2, 0x08, 0xd5, 0xb9, 0x84, 0x48, 0xd8, 0x4b, 0xbd, 0xea, - 0x5a, 0x7b, 0xe3, 0xb3, 0x2b, 0x4d, 0xb2, 0xff, 0x8e, 0x71, 0xa8, 0x3f, 0x50, 0x5a, 0xb4, 0x90, - 0x74, 0xff, 0xac, 0xbd, 0xa1, 0x36, 0xb5, 0x4e, 0xf8, 0x43, 0xb4, 0x9c, 0x15, 0x47, 0x5d, 0xda, - 0x8a, 0xdf, 0x56, 0x83, 0x60, 0x18, 0x74, 0x72, 0x87, 0x37, 0x10, 0x12, 0x3c, 0x8c, 0x21, 0xfb, - 0x81, 0x45, 0x60, 0x2f, 0xeb, 0xb1, 0x29, 0xd7, 0x7f, 0xb7, 0xbc, 0xa1, 0x33, 0x2c, 0xbc, 0x85, - 0x6e, 0xc0, 0xf3, 0x94, 0x67, 0x4c, 0xcf, 0x2a, 0x04, 0x49, 0xdc, 0x17, 0x76, 0xb3, 0x67, 0xad, - 0xd5, 0xfd, 0xf7, 0xc6, 0x23, 0xe7, 0xc6, 0xf6, 0xfc, 0x25, 0x3d, 0xcf, 0xc7, 0x04, 0x35, 0x72, - 0x35, 0x8a, 0xc2, 0xae, 0xf7, 0xaa, 0x6b, 0x2d, 0xff, 0xa6, 0x1a, 0xe8, 0x7d, 0x8d, 0x9c, 0x8e, - 0x9c, 0xe6, 0xf7, 0x30, 0xd4, 0x07, 0x6a, 0x58, 0xf8, 0x63, 0xd4, 0xcc, 0x05, 0x64, 0xb1, 0x4a, - 0xb3, 0x58, 0x83, 0xb2, 0xf7, 0xfb, 0x06, 0xa7, 0x25, 0x03, 0xdf, 0x42, 0xd5, 0x9c, 0xf7, 0xcd, - 0x1a, 0xb4, 0x0d, 0xb1, 0xba, 0xff, 0xe0, 0x3e, 0x55, 0x38, 0x76, 0x51, 0x23, 0xcc, 0x92, 0x3c, - 0x15, 0x76, 0x4d, 0x9b, 0x23, 0x65, 0xfe, 0x9d, 0x46, 0xa8, 0xb9, 0xc1, 0x1c, 0xd5, 0xe1, 0xb9, - 0xcc, 0x98, 0xdd, 0xd0, 0x9f, 0xef, 0xfe, 0x95, 0xdf, 0x39, 0xb2, 0xad, 0x64, 0xb6, 0x63, 0x99, - 0x0d, 0xa7, 0x5f, 0x53, 0x63, 0xb4, 0x70, 0xe8, 0x3c, 0x46, 0x68, 0xca, 0xc1, 0xd7, 0x51, 0xf5, - 0x08, 0x86, 0xc5, 0xab, 0x43, 0xd5, 0x4f, 0xfc, 0x35, 0xaa, 0x0f, 0xd8, 0xb3, 0x1c, 0xcc, 0x93, - 0x7b, 0xfb, 0x4d, 0xa9, 0x68, 0xa1, 0x9f, 0x14, 0x9b, 0x16, 0x41, 0xf7, 0x96, 0x36, 0x2d, 0xf7, - 0xd8, 0x42, 0xce, 0x5b, 0x5e, 0x4b, 0x9c, 0x21, 0x14, 0x4c, 0x5e, 0x20, 0x61, 0x5b, 0xba, 0xea, - 0x6f, 0xae, 0x54, 0x75, 0xf9, 0x90, 0x4d, 0x47, 0xa9, 0x84, 0x04, 0x9d, 0x71, 0xc1, 0xeb, 0xa8, - 0x3d, 0xa3, 0xaa, 0xeb, 0x5b, 0xf1, 0xaf, 0x8d, 0x47, 0x4e, 0x7b, 0x46, 0x9c, 0xce, 0x72, 0xdc, - 0x2f, 0x4c, 0xb3, 0x74, 0x8d, 0xd8, 0x99, 0x2c, 0x99, 0xa5, 0x3f, 0x64, 0x6b, 0x7e, 0x53, 0xee, - 0x35, 0x7f, 0xff, 0xc3, 0xa9, 0xbc, 0xf8, 0xa7, 0x57, 0xf1, 0xbf, 0x3d, 0x3e, 0xe9, 0x56, 0x5e, - 0x9e, 0x74, 0x2b, 0xaf, 0x4e, 0xba, 0x95, 0x17, 0xe3, 0xae, 0x75, 0x3c, 0xee, 0x5a, 0x2f, 0xc7, - 0x5d, 0xeb, 0xd5, 0xb8, 0x6b, 0xfd, 0x3b, 0xee, 0x5a, 0xbf, 0xbd, 0xee, 0x56, 0x1e, 0x75, 0x16, - 0xff, 0x2f, 0xf9, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x4a, 0x4f, 0xbc, 0xb4, 0x08, 0x00, 0x00, -} +func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (m *CertificateSigningRequest) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -486,7 +242,7 @@ func (m *CertificateSigningRequestSpec) MarshalToSizedBuffer(dAtA []byte) (int, for k := range m.Extra { keysForExtra = append(keysForExtra, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + sort.Strings(keysForExtra) for iNdEx := len(keysForExtra) - 1; iNdEx >= 0; iNdEx-- { v := m.Extra[string(keysForExtra[iNdEx])] baseI := i @@ -822,7 +578,7 @@ func (this *CertificateSigningRequestSpec) String() string { for k := range this.Extra { keysForExtra = append(keysForExtra, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + sort.Strings(keysForExtra) mapStringForExtra := "map[string]ExtraValue{" for _, k := range keysForExtra { mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k]) diff --git a/staging/src/k8s.io/api/certificates/v1/generated.proto b/staging/src/k8s.io/api/certificates/v1/generated.proto index 24528fc8bc21d..a689f3e8920eb 100644 --- a/staging/src/k8s.io/api/certificates/v1/generated.proto +++ b/staging/src/k8s.io/api/certificates/v1/generated.proto @@ -111,7 +111,6 @@ message CertificateSigningRequestList { message CertificateSigningRequestSpec { // request contains an x509 certificate signing request encoded in a "CERTIFICATE REQUEST" PEM block. // When serialized as JSON or YAML, the data is additionally base64-encoded. - // +listType=atomic optional bytes request = 1; // signerName indicates the requested signer, and is a qualified name. @@ -207,6 +206,7 @@ message CertificateSigningRequestStatus { // +optional // +k8s:listType=map // +k8s:listMapKey=type + // +k8s:customUnique // +k8s:optional // +k8s:item(type: "Approved")=+k8s:zeroOrOneOfMember // +k8s:item(type: "Denied")=+k8s:zeroOrOneOfMember @@ -239,7 +239,6 @@ message CertificateSigningRequestStatus { // -----END CERTIFICATE----- // ) // - // +listType=atomic // +optional optional bytes certificate = 2; } diff --git a/staging/src/k8s.io/api/certificates/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/certificates/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..527630582c77a --- /dev/null +++ b/staging/src/k8s.io/api/certificates/v1/generated.protomessage.pb.go @@ -0,0 +1,34 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*CertificateSigningRequest) ProtoMessage() {} + +func (*CertificateSigningRequestCondition) ProtoMessage() {} + +func (*CertificateSigningRequestList) ProtoMessage() {} + +func (*CertificateSigningRequestSpec) ProtoMessage() {} + +func (*CertificateSigningRequestStatus) ProtoMessage() {} + +func (*ExtraValue) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/certificates/v1/types.go b/staging/src/k8s.io/api/certificates/v1/types.go index 71203e80d55c0..8cd56e6db7e1d 100644 --- a/staging/src/k8s.io/api/certificates/v1/types.go +++ b/staging/src/k8s.io/api/certificates/v1/types.go @@ -61,7 +61,6 @@ type CertificateSigningRequest struct { type CertificateSigningRequestSpec struct { // request contains an x509 certificate signing request encoded in a "CERTIFICATE REQUEST" PEM block. // When serialized as JSON or YAML, the data is additionally base64-encoded. - // +listType=atomic Request []byte `json:"request" protobuf:"bytes,1,opt,name=request"` // signerName indicates the requested signer, and is a qualified name. @@ -182,6 +181,7 @@ type CertificateSigningRequestStatus struct { // +optional // +k8s:listType=map // +k8s:listMapKey=type + // +k8s:customUnique // +k8s:optional // +k8s:item(type: "Approved")=+k8s:zeroOrOneOfMember // +k8s:item(type: "Denied")=+k8s:zeroOrOneOfMember @@ -214,7 +214,6 @@ type CertificateSigningRequestStatus struct { // -----END CERTIFICATE----- // ) // - // +listType=atomic // +optional Certificate []byte `json:"certificate,omitempty" protobuf:"bytes,2,opt,name=certificate"` } diff --git a/staging/src/k8s.io/api/certificates/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/certificates/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..9c7ad07a2c4fe --- /dev/null +++ b/staging/src/k8s.io/api/certificates/v1/zz_generated.model_name.go @@ -0,0 +1,47 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CertificateSigningRequest) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1.CertificateSigningRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CertificateSigningRequestCondition) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1.CertificateSigningRequestCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CertificateSigningRequestList) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1.CertificateSigningRequestList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CertificateSigningRequestSpec) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1.CertificateSigningRequestSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CertificateSigningRequestStatus) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1.CertificateSigningRequestStatus" +} diff --git a/staging/src/k8s.io/api/certificates/v1alpha1/doc.go b/staging/src/k8s.io/api/certificates/v1alpha1/doc.go index 01481df8e50b1..b8b1b1a696ae7 100644 --- a/staging/src/k8s.io/api/certificates/v1alpha1/doc.go +++ b/staging/src/k8s.io/api/certificates/v1alpha1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.certificates.v1alpha1 // +groupName=certificates.k8s.io diff --git a/staging/src/k8s.io/api/certificates/v1alpha1/generated.pb.go b/staging/src/k8s.io/api/certificates/v1alpha1/generated.pb.go index c260f0436dadb..7b55632e13a76 100644 --- a/staging/src/k8s.io/api/certificates/v1alpha1/generated.pb.go +++ b/staging/src/k8s.io/api/certificates/v1alpha1/generated.pb.go @@ -24,10 +24,8 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -35,288 +33,19 @@ import ( k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ClusterTrustBundle) Reset() { *m = ClusterTrustBundle{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ClusterTrustBundleList) Reset() { *m = ClusterTrustBundleList{} } -func (m *ClusterTrustBundle) Reset() { *m = ClusterTrustBundle{} } -func (*ClusterTrustBundle) ProtoMessage() {} -func (*ClusterTrustBundle) Descriptor() ([]byte, []int) { - return fileDescriptor_f73d5fe56c015bb8, []int{0} -} -func (m *ClusterTrustBundle) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterTrustBundle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterTrustBundle) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterTrustBundle.Merge(m, src) -} -func (m *ClusterTrustBundle) XXX_Size() int { - return m.Size() -} -func (m *ClusterTrustBundle) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterTrustBundle.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterTrustBundle proto.InternalMessageInfo - -func (m *ClusterTrustBundleList) Reset() { *m = ClusterTrustBundleList{} } -func (*ClusterTrustBundleList) ProtoMessage() {} -func (*ClusterTrustBundleList) Descriptor() ([]byte, []int) { - return fileDescriptor_f73d5fe56c015bb8, []int{1} -} -func (m *ClusterTrustBundleList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterTrustBundleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterTrustBundleList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterTrustBundleList.Merge(m, src) -} -func (m *ClusterTrustBundleList) XXX_Size() int { - return m.Size() -} -func (m *ClusterTrustBundleList) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterTrustBundleList.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterTrustBundleList proto.InternalMessageInfo - -func (m *ClusterTrustBundleSpec) Reset() { *m = ClusterTrustBundleSpec{} } -func (*ClusterTrustBundleSpec) ProtoMessage() {} -func (*ClusterTrustBundleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_f73d5fe56c015bb8, []int{2} -} -func (m *ClusterTrustBundleSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterTrustBundleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterTrustBundleSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterTrustBundleSpec.Merge(m, src) -} -func (m *ClusterTrustBundleSpec) XXX_Size() int { - return m.Size() -} -func (m *ClusterTrustBundleSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterTrustBundleSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterTrustBundleSpec proto.InternalMessageInfo - -func (m *PodCertificateRequest) Reset() { *m = PodCertificateRequest{} } -func (*PodCertificateRequest) ProtoMessage() {} -func (*PodCertificateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f73d5fe56c015bb8, []int{3} -} -func (m *PodCertificateRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodCertificateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodCertificateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodCertificateRequest.Merge(m, src) -} -func (m *PodCertificateRequest) XXX_Size() int { - return m.Size() -} -func (m *PodCertificateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PodCertificateRequest.DiscardUnknown(m) -} +func (m *ClusterTrustBundleSpec) Reset() { *m = ClusterTrustBundleSpec{} } -var xxx_messageInfo_PodCertificateRequest proto.InternalMessageInfo +func (m *PodCertificateRequest) Reset() { *m = PodCertificateRequest{} } -func (m *PodCertificateRequestList) Reset() { *m = PodCertificateRequestList{} } -func (*PodCertificateRequestList) ProtoMessage() {} -func (*PodCertificateRequestList) Descriptor() ([]byte, []int) { - return fileDescriptor_f73d5fe56c015bb8, []int{4} -} -func (m *PodCertificateRequestList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodCertificateRequestList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodCertificateRequestList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodCertificateRequestList.Merge(m, src) -} -func (m *PodCertificateRequestList) XXX_Size() int { - return m.Size() -} -func (m *PodCertificateRequestList) XXX_DiscardUnknown() { - xxx_messageInfo_PodCertificateRequestList.DiscardUnknown(m) -} +func (m *PodCertificateRequestList) Reset() { *m = PodCertificateRequestList{} } -var xxx_messageInfo_PodCertificateRequestList proto.InternalMessageInfo +func (m *PodCertificateRequestSpec) Reset() { *m = PodCertificateRequestSpec{} } -func (m *PodCertificateRequestSpec) Reset() { *m = PodCertificateRequestSpec{} } -func (*PodCertificateRequestSpec) ProtoMessage() {} -func (*PodCertificateRequestSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_f73d5fe56c015bb8, []int{5} -} -func (m *PodCertificateRequestSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodCertificateRequestSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodCertificateRequestSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodCertificateRequestSpec.Merge(m, src) -} -func (m *PodCertificateRequestSpec) XXX_Size() int { - return m.Size() -} -func (m *PodCertificateRequestSpec) XXX_DiscardUnknown() { - xxx_messageInfo_PodCertificateRequestSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_PodCertificateRequestSpec proto.InternalMessageInfo - -func (m *PodCertificateRequestStatus) Reset() { *m = PodCertificateRequestStatus{} } -func (*PodCertificateRequestStatus) ProtoMessage() {} -func (*PodCertificateRequestStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_f73d5fe56c015bb8, []int{6} -} -func (m *PodCertificateRequestStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodCertificateRequestStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodCertificateRequestStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodCertificateRequestStatus.Merge(m, src) -} -func (m *PodCertificateRequestStatus) XXX_Size() int { - return m.Size() -} -func (m *PodCertificateRequestStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PodCertificateRequestStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PodCertificateRequestStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ClusterTrustBundle)(nil), "k8s.io.api.certificates.v1alpha1.ClusterTrustBundle") - proto.RegisterType((*ClusterTrustBundleList)(nil), "k8s.io.api.certificates.v1alpha1.ClusterTrustBundleList") - proto.RegisterType((*ClusterTrustBundleSpec)(nil), "k8s.io.api.certificates.v1alpha1.ClusterTrustBundleSpec") - proto.RegisterType((*PodCertificateRequest)(nil), "k8s.io.api.certificates.v1alpha1.PodCertificateRequest") - proto.RegisterType((*PodCertificateRequestList)(nil), "k8s.io.api.certificates.v1alpha1.PodCertificateRequestList") - proto.RegisterType((*PodCertificateRequestSpec)(nil), "k8s.io.api.certificates.v1alpha1.PodCertificateRequestSpec") - proto.RegisterType((*PodCertificateRequestStatus)(nil), "k8s.io.api.certificates.v1alpha1.PodCertificateRequestStatus") -} - -func init() { - proto.RegisterFile("k8s.io/api/certificates/v1alpha1/generated.proto", fileDescriptor_f73d5fe56c015bb8) -} - -var fileDescriptor_f73d5fe56c015bb8 = []byte{ - // 918 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0xc7, 0xe3, 0xb6, 0x69, 0x9b, 0x49, 0x5b, 0xda, 0x61, 0x17, 0x99, 0x22, 0x39, 0x21, 0x07, - 0x54, 0x90, 0xb0, 0xb7, 0xa5, 0xb0, 0x2b, 0x10, 0x48, 0x75, 0x0a, 0x52, 0xe9, 0x6e, 0x36, 0x9a, - 0x74, 0xf9, 0xb1, 0x5a, 0x24, 0x1c, 0xe7, 0x25, 0x19, 0x1a, 0x7b, 0x8c, 0x67, 0x5c, 0xb5, 0x37, - 0x24, 0xfe, 0x01, 0xfe, 0x23, 0xae, 0x3d, 0x2e, 0x5c, 0xd8, 0x53, 0xa0, 0xe6, 0x6f, 0xe0, 0xb2, - 0x27, 0xe4, 0xb1, 0x9d, 0x5f, 0x4e, 0xb6, 0xd9, 0x1e, 0x7a, 0xcb, 0xbc, 0x79, 0xdf, 0xcf, 0xfb, - 0xbe, 0x99, 0x37, 0x56, 0xd0, 0xbd, 0xd3, 0x07, 0x5c, 0xa7, 0xcc, 0xb0, 0x3c, 0x6a, 0xd8, 0xe0, - 0x0b, 0xda, 0xa6, 0xb6, 0x25, 0x80, 0x1b, 0x67, 0xbb, 0x56, 0xcf, 0xeb, 0x5a, 0xbb, 0x46, 0x07, - 0x5c, 0xf0, 0x2d, 0x01, 0x2d, 0xdd, 0xf3, 0x99, 0x60, 0xb8, 0x1c, 0x2b, 0x74, 0xcb, 0xa3, 0xfa, - 0xa8, 0x42, 0x4f, 0x15, 0xdb, 0x1f, 0x76, 0xa8, 0xe8, 0x06, 0x4d, 0xdd, 0x66, 0x8e, 0xd1, 0x61, - 0x1d, 0x66, 0x48, 0x61, 0x33, 0x68, 0xcb, 0x95, 0x5c, 0xc8, 0x5f, 0x31, 0x70, 0x7b, 0x7f, 0x68, - 0xc1, 0xb1, 0xec, 0x2e, 0x75, 0xc1, 0xbf, 0x30, 0xbc, 0xd3, 0x4e, 0x14, 0xe0, 0x86, 0x03, 0xc2, - 0x32, 0xce, 0x32, 0x36, 0xb6, 0x8d, 0x59, 0x2a, 0x3f, 0x70, 0x05, 0x75, 0x20, 0x23, 0xf8, 0xe4, - 0x3a, 0x01, 0xb7, 0xbb, 0xe0, 0x58, 0x93, 0xba, 0xca, 0x9f, 0x0a, 0xc2, 0xd5, 0x5e, 0xc0, 0x05, - 0xf8, 0x27, 0x7e, 0xc0, 0x85, 0x19, 0xb8, 0xad, 0x1e, 0xe0, 0x1f, 0xd1, 0x6a, 0x64, 0xad, 0x65, - 0x09, 0x4b, 0x55, 0xca, 0xca, 0x4e, 0x71, 0xef, 0x9e, 0x3e, 0x3c, 0x99, 0x41, 0x05, 0xdd, 0x3b, - 0xed, 0x44, 0x01, 0xae, 0x47, 0xd9, 0xfa, 0xd9, 0xae, 0xfe, 0xb8, 0xf9, 0x13, 0xd8, 0xe2, 0x11, - 0x08, 0xcb, 0xc4, 0x97, 0xfd, 0x52, 0x2e, 0xec, 0x97, 0xd0, 0x30, 0x46, 0x06, 0x54, 0xfc, 0x14, - 0x2d, 0x71, 0x0f, 0x6c, 0x75, 0x41, 0xd2, 0x1f, 0xe8, 0xd7, 0x9d, 0xbb, 0x9e, 0x75, 0xd9, 0xf0, - 0xc0, 0x36, 0xd7, 0x92, 0x2a, 0x4b, 0xd1, 0x8a, 0x48, 0x66, 0xe5, 0x0f, 0x05, 0xbd, 0x95, 0x4d, - 0x7f, 0x48, 0xb9, 0xc0, 0xcf, 0x32, 0x8d, 0xe9, 0xf3, 0x35, 0x16, 0xa9, 0x65, 0x5b, 0x9b, 0x49, - 0xc1, 0xd5, 0x34, 0x32, 0xd2, 0xd4, 0xf7, 0x28, 0x4f, 0x05, 0x38, 0x5c, 0x5d, 0x28, 0x2f, 0xee, - 0x14, 0xf7, 0xf6, 0x6f, 0xd2, 0x95, 0xb9, 0x9e, 0x14, 0xc8, 0x1f, 0x45, 0x28, 0x12, 0x13, 0x2b, - 0xbf, 0x4e, 0xed, 0x29, 0x6a, 0x1a, 0xef, 0x21, 0xc4, 0x69, 0xc7, 0x05, 0xbf, 0x66, 0x39, 0x20, - 0xbb, 0x2a, 0x0c, 0x0f, 0xbf, 0x31, 0xd8, 0x21, 0x23, 0x59, 0xf8, 0x63, 0x54, 0x14, 0x43, 0x8c, - 0xbc, 0x85, 0x82, 0xf9, 0x66, 0x22, 0x2a, 0x8e, 0x54, 0x20, 0xa3, 0x79, 0x95, 0xdf, 0x17, 0xd0, - 0xdd, 0x3a, 0x6b, 0x55, 0x87, 0xbd, 0x10, 0xf8, 0x39, 0x00, 0x2e, 0x6e, 0x61, 0x62, 0x7e, 0x18, - 0x9b, 0x98, 0xcf, 0xae, 0x3f, 0xdb, 0xa9, 0x46, 0x67, 0x0d, 0x0d, 0x06, 0xb4, 0xcc, 0x85, 0x25, - 0x02, 0xae, 0x2e, 0xca, 0x02, 0x9f, 0xdf, 0xb4, 0x80, 0x84, 0x98, 0x1b, 0x49, 0x89, 0xe5, 0x78, - 0x4d, 0x12, 0x78, 0xe5, 0x2f, 0x05, 0xbd, 0x3d, 0x55, 0x77, 0x0b, 0xe3, 0xf9, 0x6c, 0x7c, 0x3c, - 0xef, 0xdf, 0xb0, 0xc3, 0x19, 0x13, 0xfa, 0x5f, 0x7e, 0x46, 0x67, 0x37, 0x1e, 0xd2, 0xf7, 0xd1, - 0x8a, 0xc7, 0x5a, 0x52, 0x10, 0x0f, 0xe8, 0x1b, 0x89, 0x60, 0xa5, 0x1e, 0x87, 0x49, 0xba, 0x8f, - 0x8f, 0xd1, 0xb2, 0xc7, 0x5a, 0x4f, 0x8e, 0x0e, 0xe5, 0xed, 0x15, 0xcc, 0x8f, 0xd2, 0xe3, 0xaf, - 0xcb, 0xe8, 0xcb, 0x7e, 0xe9, 0xdd, 0x59, 0x5f, 0x48, 0x71, 0xe1, 0x01, 0xd7, 0x9f, 0x1c, 0x1d, - 0x92, 0x04, 0x81, 0xbf, 0x46, 0x98, 0x83, 0x7f, 0x46, 0x6d, 0x38, 0xb0, 0x6d, 0x16, 0xb8, 0x42, - 0x5a, 0x58, 0x92, 0xe0, 0xed, 0x04, 0x8c, 0x1b, 0x99, 0x0c, 0x32, 0x45, 0x85, 0x7b, 0x68, 0x6b, - 0x3c, 0x1a, 0x79, 0xcc, 0x4b, 0xd4, 0x17, 0x09, 0x6a, 0xab, 0x31, 0x99, 0x30, 0x9f, 0xdd, 0x2c, - 0x18, 0x7f, 0x83, 0x56, 0x5d, 0xd6, 0x02, 0xe9, 0x77, 0x59, 0x16, 0xf9, 0x34, 0x9d, 0x87, 0x5a, - 0x12, 0x7f, 0xd9, 0x2f, 0xbd, 0xf7, 0x6a, 0x76, 0x9a, 0x49, 0x06, 0x2c, 0x5c, 0x43, 0x2b, 0xd1, - 0xef, 0xc8, 0xfb, 0x8a, 0xc4, 0xee, 0xa7, 0x37, 0x51, 0x8b, 0xc3, 0xf3, 0x39, 0x4e, 0x21, 0xf8, - 0x21, 0xba, 0xe3, 0x58, 0xe7, 0x5f, 0x9e, 0x7b, 0xd4, 0xb7, 0x04, 0x65, 0x6e, 0x03, 0x6c, 0xe6, - 0xb6, 0xb8, 0xba, 0x5a, 0x56, 0x76, 0xf2, 0xa6, 0x1a, 0xf6, 0x4b, 0x77, 0x1e, 0x4d, 0xd9, 0x27, - 0x53, 0x55, 0xf8, 0x3e, 0x5a, 0xf7, 0x4e, 0xe9, 0x79, 0x3d, 0x68, 0xf6, 0xa8, 0x7d, 0x0c, 0x17, - 0x6a, 0xa1, 0xac, 0xec, 0xac, 0x99, 0x5b, 0x61, 0xbf, 0xb4, 0x5e, 0x3f, 0x3e, 0xfa, 0x6e, 0xb0, - 0x41, 0xc6, 0xf3, 0x70, 0x15, 0x6d, 0x79, 0x3e, 0x63, 0xed, 0xc7, 0xed, 0x3a, 0xe3, 0x1c, 0x38, - 0xa7, 0xcc, 0x55, 0x91, 0x14, 0xdf, 0x8d, 0x2e, 0xa6, 0x3e, 0xb9, 0x49, 0xb2, 0xf9, 0x95, 0xbf, - 0x17, 0xd1, 0x3b, 0xaf, 0xf8, 0x12, 0x60, 0x1b, 0xa1, 0xc8, 0x26, 0x8d, 0x1c, 0x73, 0x55, 0x91, - 0x4f, 0xcf, 0x98, 0xef, 0x55, 0x57, 0x53, 0xdd, 0xf0, 0xa9, 0x0c, 0x42, 0x9c, 0x8c, 0x60, 0xf1, - 0x21, 0xda, 0x1c, 0x79, 0xc1, 0xd5, 0xae, 0x45, 0xdd, 0xe4, 0xcd, 0xa8, 0x89, 0x72, 0xb3, 0x3a, - 0xb1, 0x4f, 0x32, 0x0a, 0xfc, 0x2d, 0x2a, 0xb8, 0x4c, 0x98, 0xd0, 0x66, 0x7e, 0x3c, 0xef, 0xc5, - 0xbd, 0x0f, 0xe6, 0x73, 0x7a, 0x42, 0x1d, 0x30, 0xd7, 0xc3, 0x7e, 0xa9, 0x50, 0x4b, 0x01, 0x64, - 0xc8, 0xc2, 0x6d, 0xb4, 0xd1, 0x84, 0x0e, 0x75, 0x09, 0xb4, 0x7d, 0xe0, 0xdd, 0x03, 0x21, 0x9f, - 0xc0, 0xeb, 0xd1, 0x71, 0xd8, 0x2f, 0x6d, 0x98, 0x63, 0x14, 0x32, 0x41, 0xc5, 0x27, 0xd1, 0xfc, - 0x8b, 0x83, 0xb6, 0x00, 0x5f, 0xce, 0xff, 0xeb, 0x55, 0x58, 0x8b, 0xdf, 0x49, 0xac, 0x27, 0x03, - 0x92, 0xf9, 0xd5, 0xe5, 0x95, 0x96, 0x7b, 0x7e, 0xa5, 0xe5, 0x5e, 0x5c, 0x69, 0xb9, 0x5f, 0x42, - 0x4d, 0xb9, 0x0c, 0x35, 0xe5, 0x79, 0xa8, 0x29, 0x2f, 0x42, 0x4d, 0xf9, 0x27, 0xd4, 0x94, 0xdf, - 0xfe, 0xd5, 0x72, 0x4f, 0xcb, 0xd7, 0xfd, 0xd9, 0xfc, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x6c, - 0x5a, 0xc4, 0x8f, 0x0a, 0x00, 0x00, -} +func (m *PodCertificateRequestStatus) Reset() { *m = PodCertificateRequestStatus{} } func (m *ClusterTrustBundle) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/certificates/v1alpha1/generated.protomessage.pb.go b/staging/src/k8s.io/api/certificates/v1alpha1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..7cace264496da --- /dev/null +++ b/staging/src/k8s.io/api/certificates/v1alpha1/generated.protomessage.pb.go @@ -0,0 +1,36 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1alpha1 + +func (*ClusterTrustBundle) ProtoMessage() {} + +func (*ClusterTrustBundleList) ProtoMessage() {} + +func (*ClusterTrustBundleSpec) ProtoMessage() {} + +func (*PodCertificateRequest) ProtoMessage() {} + +func (*PodCertificateRequestList) ProtoMessage() {} + +func (*PodCertificateRequestSpec) ProtoMessage() {} + +func (*PodCertificateRequestStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/certificates/v1alpha1/zz_generated.model_name.go b/staging/src/k8s.io/api/certificates/v1alpha1/zz_generated.model_name.go new file mode 100644 index 0000000000000..8861bb1b8bb2f --- /dev/null +++ b/staging/src/k8s.io/api/certificates/v1alpha1/zz_generated.model_name.go @@ -0,0 +1,57 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1alpha1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterTrustBundle) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterTrustBundleList) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1alpha1.ClusterTrustBundleList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterTrustBundleSpec) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1alpha1.ClusterTrustBundleSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodCertificateRequest) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1alpha1.PodCertificateRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodCertificateRequestList) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1alpha1.PodCertificateRequestList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodCertificateRequestSpec) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1alpha1.PodCertificateRequestSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodCertificateRequestStatus) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1alpha1.PodCertificateRequestStatus" +} diff --git a/staging/src/k8s.io/api/certificates/v1beta1/doc.go b/staging/src/k8s.io/api/certificates/v1beta1/doc.go index 81608a554c4e8..dddb7cb97fc7f 100644 --- a/staging/src/k8s.io/api/certificates/v1beta1/doc.go +++ b/staging/src/k8s.io/api/certificates/v1beta1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.certificates.v1beta1 // +groupName=certificates.k8s.io diff --git a/staging/src/k8s.io/api/certificates/v1beta1/generated.pb.go b/staging/src/k8s.io/api/certificates/v1beta1/generated.pb.go index 199a54496a8ad..429fc065fd8da 100644 --- a/staging/src/k8s.io/api/certificates/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/certificates/v1beta1/generated.pb.go @@ -23,363 +23,32 @@ import ( fmt "fmt" io "io" - - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + "sort" k8s_io_api_core_v1 "k8s.io/api/core/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} } -func (*CertificateSigningRequest) ProtoMessage() {} -func (*CertificateSigningRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6529c11a462c48a5, []int{0} -} -func (m *CertificateSigningRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CertificateSigningRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CertificateSigningRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CertificateSigningRequest.Merge(m, src) -} -func (m *CertificateSigningRequest) XXX_Size() int { - return m.Size() -} -func (m *CertificateSigningRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CertificateSigningRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CertificateSigningRequest proto.InternalMessageInfo - -func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} } -func (*CertificateSigningRequestCondition) ProtoMessage() {} -func (*CertificateSigningRequestCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_6529c11a462c48a5, []int{1} -} -func (m *CertificateSigningRequestCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CertificateSigningRequestCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CertificateSigningRequestCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_CertificateSigningRequestCondition.Merge(m, src) -} -func (m *CertificateSigningRequestCondition) XXX_Size() int { - return m.Size() -} -func (m *CertificateSigningRequestCondition) XXX_DiscardUnknown() { - xxx_messageInfo_CertificateSigningRequestCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_CertificateSigningRequestCondition proto.InternalMessageInfo - -func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} } -func (*CertificateSigningRequestList) ProtoMessage() {} -func (*CertificateSigningRequestList) Descriptor() ([]byte, []int) { - return fileDescriptor_6529c11a462c48a5, []int{2} -} -func (m *CertificateSigningRequestList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CertificateSigningRequestList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CertificateSigningRequestList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CertificateSigningRequestList.Merge(m, src) -} -func (m *CertificateSigningRequestList) XXX_Size() int { - return m.Size() -} -func (m *CertificateSigningRequestList) XXX_DiscardUnknown() { - xxx_messageInfo_CertificateSigningRequestList.DiscardUnknown(m) -} - -var xxx_messageInfo_CertificateSigningRequestList proto.InternalMessageInfo - -func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} } -func (*CertificateSigningRequestSpec) ProtoMessage() {} -func (*CertificateSigningRequestSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6529c11a462c48a5, []int{3} -} -func (m *CertificateSigningRequestSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CertificateSigningRequestSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CertificateSigningRequestSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_CertificateSigningRequestSpec.Merge(m, src) -} -func (m *CertificateSigningRequestSpec) XXX_Size() int { - return m.Size() -} -func (m *CertificateSigningRequestSpec) XXX_DiscardUnknown() { - xxx_messageInfo_CertificateSigningRequestSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_CertificateSigningRequestSpec proto.InternalMessageInfo - -func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} } -func (*CertificateSigningRequestStatus) ProtoMessage() {} -func (*CertificateSigningRequestStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6529c11a462c48a5, []int{4} -} -func (m *CertificateSigningRequestStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CertificateSigningRequestStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CertificateSigningRequestStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_CertificateSigningRequestStatus.Merge(m, src) -} -func (m *CertificateSigningRequestStatus) XXX_Size() int { - return m.Size() -} -func (m *CertificateSigningRequestStatus) XXX_DiscardUnknown() { - xxx_messageInfo_CertificateSigningRequestStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_CertificateSigningRequestStatus proto.InternalMessageInfo - -func (m *ClusterTrustBundle) Reset() { *m = ClusterTrustBundle{} } -func (*ClusterTrustBundle) ProtoMessage() {} -func (*ClusterTrustBundle) Descriptor() ([]byte, []int) { - return fileDescriptor_6529c11a462c48a5, []int{5} -} -func (m *ClusterTrustBundle) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterTrustBundle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterTrustBundle) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterTrustBundle.Merge(m, src) -} -func (m *ClusterTrustBundle) XXX_Size() int { - return m.Size() -} -func (m *ClusterTrustBundle) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterTrustBundle.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterTrustBundle proto.InternalMessageInfo +func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} } -func (m *ClusterTrustBundleList) Reset() { *m = ClusterTrustBundleList{} } -func (*ClusterTrustBundleList) ProtoMessage() {} -func (*ClusterTrustBundleList) Descriptor() ([]byte, []int) { - return fileDescriptor_6529c11a462c48a5, []int{6} -} -func (m *ClusterTrustBundleList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterTrustBundleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterTrustBundleList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterTrustBundleList.Merge(m, src) -} -func (m *ClusterTrustBundleList) XXX_Size() int { - return m.Size() -} -func (m *ClusterTrustBundleList) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterTrustBundleList.DiscardUnknown(m) -} +func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} } -var xxx_messageInfo_ClusterTrustBundleList proto.InternalMessageInfo +func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} } -func (m *ClusterTrustBundleSpec) Reset() { *m = ClusterTrustBundleSpec{} } -func (*ClusterTrustBundleSpec) ProtoMessage() {} -func (*ClusterTrustBundleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6529c11a462c48a5, []int{7} -} -func (m *ClusterTrustBundleSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterTrustBundleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterTrustBundleSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterTrustBundleSpec.Merge(m, src) -} -func (m *ClusterTrustBundleSpec) XXX_Size() int { - return m.Size() -} -func (m *ClusterTrustBundleSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterTrustBundleSpec.DiscardUnknown(m) -} +func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} } -var xxx_messageInfo_ClusterTrustBundleSpec proto.InternalMessageInfo +func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} } -func (m *ExtraValue) Reset() { *m = ExtraValue{} } -func (*ExtraValue) ProtoMessage() {} -func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_6529c11a462c48a5, []int{8} -} -func (m *ExtraValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExtraValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExtraValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtraValue.Merge(m, src) -} -func (m *ExtraValue) XXX_Size() int { - return m.Size() -} -func (m *ExtraValue) XXX_DiscardUnknown() { - xxx_messageInfo_ExtraValue.DiscardUnknown(m) -} +func (m *ClusterTrustBundle) Reset() { *m = ClusterTrustBundle{} } -var xxx_messageInfo_ExtraValue proto.InternalMessageInfo - -func init() { - proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.api.certificates.v1beta1.CertificateSigningRequest") - proto.RegisterType((*CertificateSigningRequestCondition)(nil), "k8s.io.api.certificates.v1beta1.CertificateSigningRequestCondition") - proto.RegisterType((*CertificateSigningRequestList)(nil), "k8s.io.api.certificates.v1beta1.CertificateSigningRequestList") - proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.api.certificates.v1beta1.CertificateSigningRequestSpec") - proto.RegisterMapType((map[string]ExtraValue)(nil), "k8s.io.api.certificates.v1beta1.CertificateSigningRequestSpec.ExtraEntry") - proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.api.certificates.v1beta1.CertificateSigningRequestStatus") - proto.RegisterType((*ClusterTrustBundle)(nil), "k8s.io.api.certificates.v1beta1.ClusterTrustBundle") - proto.RegisterType((*ClusterTrustBundleList)(nil), "k8s.io.api.certificates.v1beta1.ClusterTrustBundleList") - proto.RegisterType((*ClusterTrustBundleSpec)(nil), "k8s.io.api.certificates.v1beta1.ClusterTrustBundleSpec") - proto.RegisterType((*ExtraValue)(nil), "k8s.io.api.certificates.v1beta1.ExtraValue") -} +func (m *ClusterTrustBundleList) Reset() { *m = ClusterTrustBundleList{} } -func init() { - proto.RegisterFile("k8s.io/api/certificates/v1beta1/generated.proto", fileDescriptor_6529c11a462c48a5) -} +func (m *ClusterTrustBundleSpec) Reset() { *m = ClusterTrustBundleSpec{} } -var fileDescriptor_6529c11a462c48a5 = []byte{ - // 991 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0x8f, 0x9b, 0x3f, 0x4d, 0x26, 0xa5, 0xbb, 0x3b, 0x40, 0x65, 0x22, 0x6d, 0x1c, 0x59, 0x80, - 0xca, 0x3f, 0x9b, 0x96, 0x85, 0xad, 0x7a, 0x40, 0xe0, 0x50, 0xa1, 0x8a, 0x2e, 0x48, 0xd3, 0x16, - 0x01, 0x42, 0x62, 0xa7, 0xce, 0x5b, 0xd7, 0xdb, 0xc6, 0x36, 0x9e, 0x71, 0xd8, 0xdc, 0x56, 0xe2, - 0x0b, 0x70, 0xe4, 0xc8, 0x77, 0xe0, 0x4b, 0x94, 0x03, 0x52, 0xb9, 0xed, 0x01, 0x45, 0x34, 0xfb, - 0x2d, 0x7a, 0x42, 0x33, 0x9e, 0x38, 0x4e, 0xd2, 0x90, 0xa5, 0x2b, 0xed, 0x2d, 0xf3, 0xe6, 0xfd, - 0x7e, 0xbf, 0xf7, 0x9e, 0xdf, 0x7b, 0x13, 0x64, 0x9f, 0x6c, 0x31, 0xcb, 0x0f, 0x6d, 0x1a, 0xf9, - 0xb6, 0x0b, 0x31, 0xf7, 0x1f, 0xf8, 0x2e, 0xe5, 0xc0, 0xec, 0xde, 0xc6, 0x11, 0x70, 0xba, 0x61, - 0x7b, 0x10, 0x40, 0x4c, 0x39, 0x74, 0xac, 0x28, 0x0e, 0x79, 0x88, 0x8d, 0x14, 0x60, 0xd1, 0xc8, - 0xb7, 0xf2, 0x00, 0x4b, 0x01, 0x1a, 0xef, 0x79, 0x3e, 0x3f, 0x4e, 0x8e, 0x2c, 0x37, 0xec, 0xda, - 0x5e, 0xe8, 0x85, 0xb6, 0xc4, 0x1d, 0x25, 0x0f, 0xe4, 0x49, 0x1e, 0xe4, 0xaf, 0x94, 0xaf, 0x61, - 0xe6, 0x03, 0x08, 0x63, 0xb0, 0x7b, 0x33, 0x9a, 0x8d, 0x3b, 0x63, 0x9f, 0x2e, 0x75, 0x8f, 0xfd, - 0x00, 0xe2, 0xbe, 0x1d, 0x9d, 0x78, 0xc2, 0xc0, 0xec, 0x2e, 0x70, 0x7a, 0x15, 0xca, 0x9e, 0x87, - 0x8a, 0x93, 0x80, 0xfb, 0x5d, 0x98, 0x01, 0x7c, 0xb4, 0x08, 0xc0, 0xdc, 0x63, 0xe8, 0xd2, 0x69, - 0x9c, 0xf9, 0xc7, 0x12, 0x7a, 0xad, 0x3d, 0x2e, 0xc5, 0xbe, 0xef, 0x05, 0x7e, 0xe0, 0x11, 0xf8, - 0x31, 0x01, 0xc6, 0xf1, 0x7d, 0x54, 0x15, 0x11, 0x76, 0x28, 0xa7, 0xba, 0xd6, 0xd2, 0xd6, 0xeb, - 0x9b, 0xef, 0x5b, 0xe3, 0x1a, 0x66, 0x42, 0x56, 0x74, 0xe2, 0x09, 0x03, 0xb3, 0x84, 0xb7, 0xd5, - 0xdb, 0xb0, 0xbe, 0x3a, 0x7a, 0x08, 0x2e, 0xbf, 0x07, 0x9c, 0x3a, 0xf8, 0x6c, 0x60, 0x14, 0x86, - 0x03, 0x03, 0x8d, 0x6d, 0x24, 0x63, 0xc5, 0xf7, 0x51, 0x89, 0x45, 0xe0, 0xea, 0x4b, 0x92, 0xfd, - 0x63, 0x6b, 0xc1, 0x17, 0xb2, 0xe6, 0xc6, 0xba, 0x1f, 0x81, 0xeb, 0xac, 0x28, 0xad, 0x92, 0x38, - 0x11, 0xc9, 0x8c, 0x8f, 0x51, 0x85, 0x71, 0xca, 0x13, 0xa6, 0x17, 0xa5, 0xc6, 0x27, 0xcf, 0xa1, - 0x21, 0x79, 0x9c, 0x55, 0xa5, 0x52, 0x49, 0xcf, 0x44, 0xf1, 0x9b, 0x4f, 0x8b, 0xc8, 0x9c, 0x8b, - 0x6d, 0x87, 0x41, 0xc7, 0xe7, 0x7e, 0x18, 0xe0, 0x2d, 0x54, 0xe2, 0xfd, 0x08, 0x64, 0x41, 0x6b, - 0xce, 0xeb, 0xa3, 0x90, 0x0f, 0xfa, 0x11, 0x5c, 0x0e, 0x8c, 0x57, 0xa6, 0xfd, 0x85, 0x9d, 0x48, - 0x04, 0xde, 0xcb, 0x52, 0xa9, 0x48, 0xec, 0x9d, 0xc9, 0x40, 0x2e, 0x07, 0xc6, 0x15, 0x1d, 0x69, - 0x65, 0x4c, 0x93, 0xe1, 0xe2, 0x37, 0x51, 0x25, 0x06, 0xca, 0xc2, 0x40, 0x16, 0xbf, 0x36, 0x4e, - 0x8b, 0x48, 0x2b, 0x51, 0xb7, 0xf8, 0x2d, 0xb4, 0xdc, 0x05, 0xc6, 0xa8, 0x07, 0xb2, 0x82, 0x35, - 0xe7, 0x86, 0x72, 0x5c, 0xbe, 0x97, 0x9a, 0xc9, 0xe8, 0x1e, 0x3f, 0x44, 0xab, 0xa7, 0x94, 0xf1, - 0xc3, 0xa8, 0x43, 0x39, 0x1c, 0xf8, 0x5d, 0xd0, 0x4b, 0xb2, 0xe6, 0x6f, 0x3f, 0x5b, 0xd7, 0x08, - 0x84, 0xb3, 0xa6, 0xd8, 0x57, 0xf7, 0x26, 0x98, 0xc8, 0x14, 0x33, 0xee, 0x21, 0x2c, 0x2c, 0x07, - 0x31, 0x0d, 0x58, 0x5a, 0x28, 0xa1, 0x57, 0xfe, 0xdf, 0x7a, 0x0d, 0xa5, 0x87, 0xf7, 0x66, 0xd8, - 0xc8, 0x15, 0x0a, 0xe6, 0x40, 0x43, 0xb7, 0xe7, 0x7e, 0xe5, 0x3d, 0x9f, 0x71, 0xfc, 0xfd, 0xcc, - 0xd4, 0x58, 0xcf, 0x16, 0x8f, 0x40, 0xcb, 0x99, 0xb9, 0xa9, 0x62, 0xaa, 0x8e, 0x2c, 0xb9, 0x89, - 0xf9, 0x01, 0x95, 0x7d, 0x0e, 0x5d, 0xa6, 0x2f, 0xb5, 0x8a, 0xeb, 0xf5, 0xcd, 0xed, 0xeb, 0xb7, - 0xb3, 0xf3, 0x92, 0x92, 0x29, 0xef, 0x0a, 0x42, 0x92, 0xf2, 0x9a, 0xbf, 0x97, 0xfe, 0x23, 0x41, - 0x31, 0x58, 0xf8, 0x0d, 0xb4, 0x1c, 0xa7, 0x47, 0x99, 0xdf, 0x8a, 0x53, 0x17, 0xdd, 0xa0, 0x3c, - 0xc8, 0xe8, 0x0e, 0x5b, 0x08, 0x31, 0xdf, 0x0b, 0x20, 0xfe, 0x92, 0x76, 0x41, 0x5f, 0x4e, 0x9b, - 0x4c, 0x6c, 0x82, 0xfd, 0xcc, 0x4a, 0x72, 0x1e, 0xb8, 0x8d, 0x6e, 0xc1, 0xa3, 0xc8, 0x8f, 0xa9, - 0x6c, 0x56, 0x70, 0xc3, 0xa0, 0xc3, 0xf4, 0x6a, 0x4b, 0x5b, 0x2f, 0x3b, 0xaf, 0x0e, 0x07, 0xc6, - 0xad, 0x9d, 0xe9, 0x4b, 0x32, 0xeb, 0x8f, 0x2d, 0x54, 0x49, 0x44, 0x2f, 0x32, 0xbd, 0xdc, 0x2a, - 0xae, 0xd7, 0x9c, 0x35, 0xd1, 0xd1, 0x87, 0xd2, 0x72, 0x39, 0x30, 0xaa, 0x5f, 0x40, 0x5f, 0x1e, - 0x88, 0xf2, 0xc2, 0xef, 0xa2, 0x6a, 0xc2, 0x20, 0x0e, 0x44, 0x88, 0xe9, 0x1c, 0x64, 0xc5, 0x3f, - 0x54, 0x76, 0x92, 0x79, 0xe0, 0xdb, 0xa8, 0x98, 0xf8, 0x1d, 0x35, 0x07, 0x75, 0xe5, 0x58, 0x3c, - 0xdc, 0xfd, 0x8c, 0x08, 0x3b, 0x36, 0x51, 0xc5, 0x8b, 0xc3, 0x24, 0x62, 0x7a, 0x49, 0x8a, 0x23, - 0x21, 0xfe, 0xb9, 0xb4, 0x10, 0x75, 0x83, 0x03, 0x54, 0x86, 0x47, 0x3c, 0xa6, 0x7a, 0x45, 0x7e, - 0xbf, 0xdd, 0xe7, 0x5b, 0x79, 0xd6, 0x8e, 0xe0, 0xda, 0x09, 0x78, 0xdc, 0x1f, 0x7f, 0x4e, 0x69, - 0x23, 0xa9, 0x4c, 0x03, 0x10, 0x1a, 0xfb, 0xe0, 0x9b, 0xa8, 0x78, 0x02, 0xfd, 0x74, 0xf7, 0x10, - 0xf1, 0x13, 0x7f, 0x8a, 0xca, 0x3d, 0x7a, 0x9a, 0x80, 0x5a, 0xc1, 0xef, 0x2c, 0x8c, 0x47, 0xb2, - 0x7d, 0x2d, 0x20, 0x24, 0x45, 0x6e, 0x2f, 0x6d, 0x69, 0xe6, 0x9f, 0x1a, 0x32, 0x16, 0x2c, 0x4e, - 0xfc, 0x13, 0x42, 0xee, 0x68, 0x19, 0x31, 0x5d, 0x93, 0xf9, 0xb7, 0xaf, 0x9f, 0x7f, 0xb6, 0xd8, - 0xc6, 0x6f, 0x4c, 0x66, 0x62, 0x24, 0x27, 0x85, 0x37, 0x50, 0x3d, 0x47, 0x2d, 0x33, 0x5d, 0x71, - 0x6e, 0x0c, 0x07, 0x46, 0x3d, 0x47, 0x4e, 0xf2, 0x3e, 0xe6, 0x5f, 0x1a, 0xc2, 0xed, 0xd3, 0x84, - 0x71, 0x88, 0x0f, 0xe2, 0x84, 0x71, 0x27, 0x09, 0x3a, 0xa7, 0xf0, 0x02, 0x5e, 0xc4, 0x6f, 0x27, - 0x5e, 0xc4, 0xbb, 0x8b, 0xcb, 0x33, 0x13, 0xe4, 0xbc, 0xa7, 0xd0, 0x3c, 0xd7, 0xd0, 0xda, 0xac, - 0xfb, 0x0b, 0xd8, 0x59, 0xdf, 0x4c, 0xee, 0xac, 0x0f, 0xae, 0x91, 0xd4, 0x9c, 0x65, 0xf5, 0xf3, - 0x95, 0x29, 0xc9, 0x2d, 0xb5, 0x39, 0xb1, 0x7e, 0xd2, 0xd7, 0x36, 0x2b, 0xfd, 0x9c, 0x15, 0xf4, - 0x21, 0xaa, 0xf3, 0x31, 0x8d, 0x5a, 0x08, 0x2f, 0x2b, 0x50, 0x3d, 0xa7, 0x40, 0xf2, 0x7e, 0xe6, - 0x5d, 0x35, 0x63, 0x72, 0x2a, 0xb0, 0x31, 0xca, 0x56, 0x93, 0x4b, 0xa0, 0x36, 0x1d, 0xf4, 0x76, - 0xf5, 0xd7, 0xdf, 0x8c, 0xc2, 0xe3, 0xbf, 0x5b, 0x05, 0x67, 0xe7, 0xec, 0xa2, 0x59, 0x38, 0xbf, - 0x68, 0x16, 0x9e, 0x5c, 0x34, 0x0b, 0x8f, 0x87, 0x4d, 0xed, 0x6c, 0xd8, 0xd4, 0xce, 0x87, 0x4d, - 0xed, 0xc9, 0xb0, 0xa9, 0xfd, 0x33, 0x6c, 0x6a, 0xbf, 0x3c, 0x6d, 0x16, 0xbe, 0x33, 0x16, 0xfc, - 0xd1, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0x17, 0xbe, 0xe3, 0x02, 0x0a, 0x0b, 0x00, 0x00, -} +func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (m *CertificateSigningRequest) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -581,7 +250,7 @@ func (m *CertificateSigningRequestSpec) MarshalToSizedBuffer(dAtA []byte) (int, for k := range m.Extra { keysForExtra = append(keysForExtra, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + sort.Strings(keysForExtra) for iNdEx := len(keysForExtra) - 1; iNdEx >= 0; iNdEx-- { v := m.Extra[string(keysForExtra[iNdEx])] baseI := i @@ -1085,7 +754,7 @@ func (this *CertificateSigningRequestSpec) String() string { for k := range this.Extra { keysForExtra = append(keysForExtra, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + sort.Strings(keysForExtra) mapStringForExtra := "map[string]ExtraValue{" for _, k := range keysForExtra { mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k]) diff --git a/staging/src/k8s.io/api/certificates/v1beta1/generated.proto b/staging/src/k8s.io/api/certificates/v1beta1/generated.proto index 4c9385c1960c4..f96be36d0853f 100644 --- a/staging/src/k8s.io/api/certificates/v1beta1/generated.proto +++ b/staging/src/k8s.io/api/certificates/v1beta1/generated.proto @@ -86,7 +86,6 @@ message CertificateSigningRequestList { // CertificateSigningRequestSpec contains the certificate request. message CertificateSigningRequestSpec { // Base64-encoded PKCS#10 CSR data - // +listType=atomic optional bytes request = 1; // Requested signer for the request. It is a qualified name in the form: @@ -186,13 +185,13 @@ message CertificateSigningRequestStatus { // +optional // +k8s:listType=map // +k8s:listMapKey=type + // +k8s:customUnique // +k8s:optional // +k8s:item(type: "Approved")=+k8s:zeroOrOneOfMember // +k8s:item(type: "Denied")=+k8s:zeroOrOneOfMember repeated CertificateSigningRequestCondition conditions = 1; // If request was approved, the controller will place the issued certificate here. - // +listType=atomic // +optional optional bytes certificate = 2; } diff --git a/staging/src/k8s.io/api/certificates/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/certificates/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..e8c03160d0d46 --- /dev/null +++ b/staging/src/k8s.io/api/certificates/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,40 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*CertificateSigningRequest) ProtoMessage() {} + +func (*CertificateSigningRequestCondition) ProtoMessage() {} + +func (*CertificateSigningRequestList) ProtoMessage() {} + +func (*CertificateSigningRequestSpec) ProtoMessage() {} + +func (*CertificateSigningRequestStatus) ProtoMessage() {} + +func (*ClusterTrustBundle) ProtoMessage() {} + +func (*ClusterTrustBundleList) ProtoMessage() {} + +func (*ClusterTrustBundleSpec) ProtoMessage() {} + +func (*ExtraValue) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/certificates/v1beta1/types.go b/staging/src/k8s.io/api/certificates/v1beta1/types.go index fadb7e082efbc..c8976d206f265 100644 --- a/staging/src/k8s.io/api/certificates/v1beta1/types.go +++ b/staging/src/k8s.io/api/certificates/v1beta1/types.go @@ -51,7 +51,6 @@ type CertificateSigningRequest struct { // CertificateSigningRequestSpec contains the certificate request. type CertificateSigningRequestSpec struct { // Base64-encoded PKCS#10 CSR data - // +listType=atomic Request []byte `json:"request" protobuf:"bytes,1,opt,name=request"` // Requested signer for the request. It is a qualified name in the form: @@ -179,13 +178,13 @@ type CertificateSigningRequestStatus struct { // +optional // +k8s:listType=map // +k8s:listMapKey=type + // +k8s:customUnique // +k8s:optional // +k8s:item(type: "Approved")=+k8s:zeroOrOneOfMember // +k8s:item(type: "Denied")=+k8s:zeroOrOneOfMember Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"` // If request was approved, the controller will place the issued certificate here. - // +listType=atomic // +optional Certificate []byte `json:"certificate,omitempty" protobuf:"bytes,2,opt,name=certificate"` } diff --git a/staging/src/k8s.io/api/certificates/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/certificates/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..0a38a56956519 --- /dev/null +++ b/staging/src/k8s.io/api/certificates/v1beta1/zz_generated.model_name.go @@ -0,0 +1,62 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CertificateSigningRequest) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1beta1.CertificateSigningRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CertificateSigningRequestCondition) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CertificateSigningRequestList) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1beta1.CertificateSigningRequestList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CertificateSigningRequestSpec) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CertificateSigningRequestStatus) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterTrustBundle) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1beta1.ClusterTrustBundle" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterTrustBundleList) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1beta1.ClusterTrustBundleList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterTrustBundleSpec) OpenAPIModelName() string { + return "io.k8s.api.certificates.v1beta1.ClusterTrustBundleSpec" +} diff --git a/staging/src/k8s.io/api/coordination/v1/doc.go b/staging/src/k8s.io/api/coordination/v1/doc.go index 82ae6340c7d7d..fc427222c130a 100644 --- a/staging/src/k8s.io/api/coordination/v1/doc.go +++ b/staging/src/k8s.io/api/coordination/v1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.coordination.v1 // +groupName=coordination.k8s.io diff --git a/staging/src/k8s.io/api/coordination/v1/generated.pb.go b/staging/src/k8s.io/api/coordination/v1/generated.pb.go index cf6702aef37eb..2c32ca48ec46e 100644 --- a/staging/src/k8s.io/api/coordination/v1/generated.pb.go +++ b/staging/src/k8s.io/api/coordination/v1/generated.pb.go @@ -24,160 +24,18 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *Lease) Reset() { *m = Lease{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *LeaseList) Reset() { *m = LeaseList{} } -func (m *Lease) Reset() { *m = Lease{} } -func (*Lease) ProtoMessage() {} -func (*Lease) Descriptor() ([]byte, []int) { - return fileDescriptor_239d5a4df3139dce, []int{0} -} -func (m *Lease) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Lease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Lease) XXX_Merge(src proto.Message) { - xxx_messageInfo_Lease.Merge(m, src) -} -func (m *Lease) XXX_Size() int { - return m.Size() -} -func (m *Lease) XXX_DiscardUnknown() { - xxx_messageInfo_Lease.DiscardUnknown(m) -} - -var xxx_messageInfo_Lease proto.InternalMessageInfo - -func (m *LeaseList) Reset() { *m = LeaseList{} } -func (*LeaseList) ProtoMessage() {} -func (*LeaseList) Descriptor() ([]byte, []int) { - return fileDescriptor_239d5a4df3139dce, []int{1} -} -func (m *LeaseList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LeaseList) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseList.Merge(m, src) -} -func (m *LeaseList) XXX_Size() int { - return m.Size() -} -func (m *LeaseList) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseList.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseList proto.InternalMessageInfo - -func (m *LeaseSpec) Reset() { *m = LeaseSpec{} } -func (*LeaseSpec) ProtoMessage() {} -func (*LeaseSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_239d5a4df3139dce, []int{2} -} -func (m *LeaseSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LeaseSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseSpec.Merge(m, src) -} -func (m *LeaseSpec) XXX_Size() int { - return m.Size() -} -func (m *LeaseSpec) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseSpec proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Lease)(nil), "k8s.io.api.coordination.v1.Lease") - proto.RegisterType((*LeaseList)(nil), "k8s.io.api.coordination.v1.LeaseList") - proto.RegisterType((*LeaseSpec)(nil), "k8s.io.api.coordination.v1.LeaseSpec") -} - -func init() { - proto.RegisterFile("k8s.io/api/coordination/v1/generated.proto", fileDescriptor_239d5a4df3139dce) -} - -var fileDescriptor_239d5a4df3139dce = []byte{ - // 588 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xdf, 0x4e, 0xd4, 0x40, - 0x14, 0xc6, 0xb7, 0xb0, 0xab, 0xec, 0xac, 0xfc, 0xc9, 0xc8, 0x45, 0xb3, 0x17, 0x2d, 0x92, 0x98, - 0x10, 0x13, 0xa7, 0x42, 0x8c, 0x31, 0x26, 0x26, 0x58, 0x89, 0x4a, 0xb2, 0x44, 0x53, 0xb8, 0x32, - 0x5c, 0x38, 0xdb, 0x1e, 0xba, 0x23, 0xb4, 0x53, 0x67, 0x66, 0x31, 0xdc, 0xf9, 0x08, 0x3e, 0x81, - 0xef, 0xa0, 0x4f, 0xc1, 0x25, 0x97, 0x5c, 0x35, 0x32, 0xbe, 0x85, 0x57, 0x66, 0x66, 0x0b, 0x0b, - 0xcb, 0x6e, 0x20, 0xde, 0x75, 0xce, 0x39, 0xdf, 0xef, 0x7c, 0x73, 0x4e, 0x5b, 0xf4, 0x68, 0xff, - 0xb9, 0x24, 0x8c, 0x07, 0xb4, 0x60, 0x41, 0xcc, 0xb9, 0x48, 0x58, 0x4e, 0x15, 0xe3, 0x79, 0x70, - 0xb8, 0x1a, 0xa4, 0x90, 0x83, 0xa0, 0x0a, 0x12, 0x52, 0x08, 0xae, 0x38, 0x6e, 0x0f, 0x6a, 0x09, - 0x2d, 0x18, 0xb9, 0x5c, 0x4b, 0x0e, 0x57, 0xdb, 0x8f, 0x53, 0xa6, 0x7a, 0xfd, 0x2e, 0x89, 0x79, - 0x16, 0xa4, 0x3c, 0xe5, 0x81, 0x95, 0x74, 0xfb, 0x7b, 0xf6, 0x64, 0x0f, 0xf6, 0x69, 0x80, 0x6a, - 0x3f, 0x1d, 0xb6, 0xcd, 0x68, 0xdc, 0x63, 0x39, 0x88, 0xa3, 0xa0, 0xd8, 0x4f, 0x4d, 0x40, 0x06, - 0x19, 0x28, 0x3a, 0xc6, 0x40, 0x3b, 0x98, 0xa4, 0x12, 0xfd, 0x5c, 0xb1, 0x0c, 0xae, 0x09, 0x9e, - 0xdd, 0x24, 0x90, 0x71, 0x0f, 0x32, 0x3a, 0xaa, 0x5b, 0xfe, 0xe5, 0xa0, 0x46, 0x07, 0xa8, 0x04, - 0xfc, 0x09, 0xcd, 0x18, 0x37, 0x09, 0x55, 0xd4, 0x75, 0x96, 0x9c, 0x95, 0xd6, 0xda, 0x13, 0x32, - 0x1c, 0xc3, 0x05, 0x94, 0x14, 0xfb, 0xa9, 0x09, 0x48, 0x62, 0xaa, 0xc9, 0xe1, 0x2a, 0x79, 0xdf, - 0xfd, 0x0c, 0xb1, 0xda, 0x02, 0x45, 0x43, 0x7c, 0x5c, 0xfa, 0x35, 0x5d, 0xfa, 0x68, 0x18, 0x8b, - 0x2e, 0xa8, 0xf8, 0x2d, 0xaa, 0xcb, 0x02, 0x62, 0x77, 0xca, 0xd2, 0x1f, 0x92, 0xc9, 0x43, 0x26, - 0xd6, 0xd2, 0x76, 0x01, 0x71, 0x78, 0xaf, 0x42, 0xd6, 0xcd, 0x29, 0xb2, 0x80, 0xe5, 0x9f, 0x0e, - 0x6a, 0xda, 0x8a, 0x0e, 0x93, 0x0a, 0xef, 0x5e, 0x33, 0x4e, 0x6e, 0x67, 0xdc, 0xa8, 0xad, 0xed, - 0x85, 0xaa, 0xc7, 0xcc, 0x79, 0xe4, 0x92, 0xe9, 0x37, 0xa8, 0xc1, 0x14, 0x64, 0xd2, 0x9d, 0x5a, - 0x9a, 0x5e, 0x69, 0xad, 0x3d, 0xb8, 0xd1, 0x75, 0x38, 0x5b, 0xd1, 0x1a, 0x9b, 0x46, 0x17, 0x0d, - 0xe4, 0xcb, 0x3f, 0xea, 0x95, 0x67, 0x73, 0x0f, 0xfc, 0x02, 0xcd, 0xf5, 0xf8, 0x41, 0x02, 0x62, - 0x33, 0x81, 0x5c, 0x31, 0x75, 0x64, 0x9d, 0x37, 0x43, 0xac, 0x4b, 0x7f, 0xee, 0xdd, 0x95, 0x4c, - 0x34, 0x52, 0x89, 0x3b, 0x68, 0xf1, 0xc0, 0x80, 0x36, 0xfa, 0xc2, 0x76, 0xde, 0x86, 0x98, 0xe7, - 0x89, 0xb4, 0x63, 0x6d, 0x84, 0xae, 0x2e, 0xfd, 0xc5, 0xce, 0x98, 0x7c, 0x34, 0x56, 0x85, 0xbb, - 0xa8, 0x45, 0xe3, 0x2f, 0x7d, 0x26, 0x60, 0x87, 0x65, 0xe0, 0x4e, 0xdb, 0x01, 0x06, 0xb7, 0x1b, - 0xe0, 0x16, 0x8b, 0x05, 0x37, 0xb2, 0x70, 0x5e, 0x97, 0x7e, 0xeb, 0xd5, 0x90, 0x13, 0x5d, 0x86, - 0xe2, 0x5d, 0xd4, 0x14, 0x90, 0xc3, 0x57, 0xdb, 0xa1, 0xfe, 0x7f, 0x1d, 0x66, 0x75, 0xe9, 0x37, - 0xa3, 0x73, 0x4a, 0x34, 0x04, 0xe2, 0x75, 0xb4, 0x60, 0x6f, 0xb6, 0x23, 0x68, 0x2e, 0x99, 0xb9, - 0x9b, 0x74, 0x1b, 0x76, 0x16, 0x8b, 0xba, 0xf4, 0x17, 0x3a, 0x23, 0xb9, 0xe8, 0x5a, 0x35, 0xde, - 0x40, 0x33, 0x52, 0x99, 0xaf, 0x22, 0x3d, 0x72, 0xef, 0xd8, 0x3d, 0xac, 0x98, 0xb7, 0x61, 0xbb, - 0x8a, 0xfd, 0x2d, 0x7d, 0xf7, 0xf5, 0xf9, 0xaa, 0x21, 0x19, 0x6c, 0xb1, 0xca, 0x45, 0x17, 0x4a, - 0xfc, 0x12, 0xcd, 0x17, 0x02, 0xf6, 0x40, 0x08, 0x48, 0x06, 0x2b, 0x74, 0xef, 0x5a, 0xd8, 0x7d, - 0x5d, 0xfa, 0xf3, 0x1f, 0xae, 0xa6, 0xa2, 0xd1, 0xda, 0x70, 0xfd, 0xf8, 0xcc, 0xab, 0x9d, 0x9c, - 0x79, 0xb5, 0xd3, 0x33, 0xaf, 0xf6, 0x4d, 0x7b, 0xce, 0xb1, 0xf6, 0x9c, 0x13, 0xed, 0x39, 0xa7, - 0xda, 0x73, 0x7e, 0x6b, 0xcf, 0xf9, 0xfe, 0xc7, 0xab, 0x7d, 0x6c, 0x4f, 0xfe, 0x8b, 0xfd, 0x0b, - 0x00, 0x00, 0xff, 0xff, 0xf8, 0xf4, 0xd4, 0x78, 0xe2, 0x04, 0x00, 0x00, -} +func (m *LeaseSpec) Reset() { *m = LeaseSpec{} } func (m *Lease) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/coordination/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/coordination/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..f9210fce6a5fa --- /dev/null +++ b/staging/src/k8s.io/api/coordination/v1/generated.protomessage.pb.go @@ -0,0 +1,28 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*Lease) ProtoMessage() {} + +func (*LeaseList) ProtoMessage() {} + +func (*LeaseSpec) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/coordination/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/coordination/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..cf1217ef6c408 --- /dev/null +++ b/staging/src/k8s.io/api/coordination/v1/zz_generated.model_name.go @@ -0,0 +1,37 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Lease) OpenAPIModelName() string { + return "io.k8s.api.coordination.v1.Lease" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LeaseList) OpenAPIModelName() string { + return "io.k8s.api.coordination.v1.LeaseList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LeaseSpec) OpenAPIModelName() string { + return "io.k8s.api.coordination.v1.LeaseSpec" +} diff --git a/staging/src/k8s.io/api/coordination/v1alpha2/doc.go b/staging/src/k8s.io/api/coordination/v1alpha2/doc.go index dff7df47fc42f..134b182aedc3a 100644 --- a/staging/src/k8s.io/api/coordination/v1alpha2/doc.go +++ b/staging/src/k8s.io/api/coordination/v1alpha2/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.coordination.v1alpha2 // +groupName=coordination.k8s.io diff --git a/staging/src/k8s.io/api/coordination/v1alpha2/generated.pb.go b/staging/src/k8s.io/api/coordination/v1alpha2/generated.pb.go index 85ceea1f258f9..25a7a483058f7 100644 --- a/staging/src/k8s.io/api/coordination/v1alpha2/generated.pb.go +++ b/staging/src/k8s.io/api/coordination/v1alpha2/generated.pb.go @@ -24,160 +24,19 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - k8s_io_api_coordination_v1 "k8s.io/api/coordination/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *LeaseCandidate) Reset() { *m = LeaseCandidate{} } -func (*LeaseCandidate) ProtoMessage() {} -func (*LeaseCandidate) Descriptor() ([]byte, []int) { - return fileDescriptor_c1ec5c989d262916, []int{0} -} -func (m *LeaseCandidate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseCandidate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LeaseCandidate) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseCandidate.Merge(m, src) -} -func (m *LeaseCandidate) XXX_Size() int { - return m.Size() -} -func (m *LeaseCandidate) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseCandidate.DiscardUnknown(m) -} +func (m *LeaseCandidate) Reset() { *m = LeaseCandidate{} } -var xxx_messageInfo_LeaseCandidate proto.InternalMessageInfo +func (m *LeaseCandidateList) Reset() { *m = LeaseCandidateList{} } -func (m *LeaseCandidateList) Reset() { *m = LeaseCandidateList{} } -func (*LeaseCandidateList) ProtoMessage() {} -func (*LeaseCandidateList) Descriptor() ([]byte, []int) { - return fileDescriptor_c1ec5c989d262916, []int{1} -} -func (m *LeaseCandidateList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseCandidateList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LeaseCandidateList) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseCandidateList.Merge(m, src) -} -func (m *LeaseCandidateList) XXX_Size() int { - return m.Size() -} -func (m *LeaseCandidateList) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseCandidateList.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseCandidateList proto.InternalMessageInfo - -func (m *LeaseCandidateSpec) Reset() { *m = LeaseCandidateSpec{} } -func (*LeaseCandidateSpec) ProtoMessage() {} -func (*LeaseCandidateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c1ec5c989d262916, []int{2} -} -func (m *LeaseCandidateSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseCandidateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LeaseCandidateSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseCandidateSpec.Merge(m, src) -} -func (m *LeaseCandidateSpec) XXX_Size() int { - return m.Size() -} -func (m *LeaseCandidateSpec) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseCandidateSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseCandidateSpec proto.InternalMessageInfo - -func init() { - proto.RegisterType((*LeaseCandidate)(nil), "k8s.io.api.coordination.v1alpha2.LeaseCandidate") - proto.RegisterType((*LeaseCandidateList)(nil), "k8s.io.api.coordination.v1alpha2.LeaseCandidateList") - proto.RegisterType((*LeaseCandidateSpec)(nil), "k8s.io.api.coordination.v1alpha2.LeaseCandidateSpec") -} - -func init() { - proto.RegisterFile("k8s.io/api/coordination/v1alpha2/generated.proto", fileDescriptor_c1ec5c989d262916) -} - -var fileDescriptor_c1ec5c989d262916 = []byte{ - // 555 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x8b, 0xd3, 0x4e, - 0x18, 0xc7, 0x9b, 0xdd, 0xf6, 0x47, 0x3b, 0xbf, 0xad, 0xd4, 0x01, 0x21, 0xf4, 0x90, 0x96, 0x9e, - 0x44, 0x70, 0x66, 0x77, 0x5d, 0x44, 0xf0, 0x96, 0xf5, 0x0f, 0x42, 0x57, 0x25, 0xab, 0x0b, 0xca, - 0x1e, 0x9c, 0x26, 0x8f, 0xe9, 0xd8, 0x26, 0x13, 0x92, 0xe9, 0x4a, 0x6f, 0xbe, 0x04, 0x5f, 0x56, - 0xf5, 0xb4, 0xc7, 0x3d, 0x15, 0x1b, 0xc1, 0x17, 0xe1, 0x49, 0x66, 0x9a, 0xf4, 0xaf, 0xa5, 0xc5, - 0x5b, 0xe7, 0x99, 0xe7, 0xf3, 0x99, 0xf9, 0x3e, 0x69, 0x82, 0x0e, 0x7b, 0x8f, 0x12, 0xc2, 0x05, - 0x65, 0x11, 0xa7, 0xae, 0x10, 0xb1, 0xc7, 0x43, 0x26, 0xb9, 0x08, 0xe9, 0xd5, 0x11, 0xeb, 0x47, - 0x5d, 0x76, 0x4c, 0x7d, 0x08, 0x21, 0x66, 0x12, 0x3c, 0x12, 0xc5, 0x42, 0x0a, 0xdc, 0x9c, 0x12, - 0x84, 0x45, 0x9c, 0x2c, 0x12, 0x24, 0x27, 0xea, 0xf7, 0x7d, 0x2e, 0xbb, 0x83, 0x0e, 0x71, 0x45, - 0x40, 0x7d, 0xe1, 0x0b, 0xaa, 0xc1, 0xce, 0xe0, 0xa3, 0x5e, 0xe9, 0x85, 0xfe, 0x35, 0x15, 0xd6, - 0xef, 0x6d, 0xbe, 0xc2, 0xea, 0xe1, 0xf5, 0x93, 0x79, 0x6f, 0xc0, 0xdc, 0x2e, 0x0f, 0x21, 0x1e, - 0xd2, 0xa8, 0xe7, 0xab, 0x42, 0x42, 0x03, 0x90, 0xec, 0x6f, 0x14, 0xdd, 0x44, 0xc5, 0x83, 0x50, - 0xf2, 0x00, 0xd6, 0x80, 0x87, 0xdb, 0x80, 0xc4, 0xed, 0x42, 0xc0, 0x56, 0xb9, 0xd6, 0x77, 0x03, - 0xdd, 0x6a, 0x03, 0x4b, 0xe0, 0x94, 0x85, 0x1e, 0xf7, 0x98, 0x04, 0xfc, 0x01, 0x95, 0xd5, 0xb5, - 0x3c, 0x26, 0x99, 0x69, 0x34, 0x8d, 0xbb, 0xff, 0x1f, 0x1f, 0x92, 0xf9, 0x04, 0x67, 0x76, 0x12, - 0xf5, 0x7c, 0x55, 0x48, 0x88, 0xea, 0x26, 0x57, 0x47, 0xe4, 0x55, 0xe7, 0x13, 0xb8, 0xf2, 0x0c, - 0x24, 0xb3, 0xf1, 0x68, 0xdc, 0x28, 0xa4, 0xe3, 0x06, 0x9a, 0xd7, 0x9c, 0x99, 0x15, 0x5f, 0xa0, - 0x62, 0x12, 0x81, 0x6b, 0xee, 0x69, 0xfb, 0x09, 0xd9, 0xf6, 0x7c, 0xc8, 0xf2, 0x0d, 0xcf, 0x23, - 0x70, 0xed, 0x83, 0xec, 0x84, 0xa2, 0x5a, 0x39, 0xda, 0xd7, 0xfa, 0x66, 0x20, 0xbc, 0xdc, 0xda, - 0xe6, 0x89, 0xc4, 0x97, 0x6b, 0x81, 0xc8, 0x6e, 0x81, 0x14, 0xad, 0xe3, 0xd4, 0xb2, 0xc3, 0xca, - 0x79, 0x65, 0x21, 0xcc, 0x5b, 0x54, 0xe2, 0x12, 0x82, 0xc4, 0xdc, 0x6b, 0xee, 0xaf, 0xcc, 0x6a, - 0xa7, 0x34, 0x76, 0x35, 0x93, 0x97, 0x5e, 0x28, 0x8d, 0x33, 0xb5, 0xb5, 0x7e, 0xed, 0xaf, 0x66, - 0x51, 0x41, 0x31, 0x45, 0x95, 0xbe, 0xaa, 0xbe, 0x64, 0x01, 0xe8, 0x30, 0x15, 0xfb, 0x76, 0xc6, - 0x57, 0xda, 0xf9, 0x86, 0x33, 0xef, 0xc1, 0xef, 0x50, 0x39, 0xe2, 0xa1, 0xff, 0x86, 0x07, 0x90, - 0xcd, 0x9b, 0xee, 0x16, 0xfe, 0x8c, 0xbb, 0xb1, 0x50, 0x98, 0x7d, 0xa0, 0x92, 0xbf, 0xce, 0x24, - 0xce, 0x4c, 0x87, 0x2f, 0x51, 0x25, 0x86, 0x10, 0x3e, 0x6b, 0xf7, 0xfe, 0xbf, 0xb9, 0xab, 0xea, - 0xe2, 0x4e, 0x6e, 0x71, 0xe6, 0x42, 0xfc, 0x18, 0x55, 0x3b, 0x3c, 0x64, 0xf1, 0xf0, 0x02, 0xe2, - 0x84, 0x8b, 0xd0, 0x2c, 0xea, 0xb4, 0x77, 0xb2, 0xb4, 0x55, 0x7b, 0x71, 0xd3, 0x59, 0xee, 0xc5, - 0x4f, 0x50, 0x0d, 0x82, 0x41, 0x5f, 0x0f, 0x3e, 0xe7, 0x4b, 0x9a, 0x37, 0x33, 0xbe, 0xf6, 0x74, - 0x65, 0xdf, 0x59, 0x23, 0xb0, 0x8b, 0xca, 0x89, 0x54, 0x6f, 0x8b, 0x3f, 0x34, 0xff, 0xd3, 0xf4, - 0xf3, 0xfc, 0x8f, 0x70, 0x9e, 0xd5, 0x7f, 0x8f, 0x1b, 0x0f, 0x36, 0x7f, 0x0d, 0xc8, 0x69, 0xbe, - 0x06, 0x4f, 0x3f, 0x9d, 0x1c, 0x73, 0x66, 0x62, 0xfb, 0xd9, 0x68, 0x62, 0x15, 0xae, 0x27, 0x56, - 0xe1, 0x66, 0x62, 0x15, 0xbe, 0xa4, 0x96, 0x31, 0x4a, 0x2d, 0xe3, 0x3a, 0xb5, 0x8c, 0x9b, 0xd4, - 0x32, 0x7e, 0xa4, 0x96, 0xf1, 0xf5, 0xa7, 0x55, 0x78, 0xdf, 0xdc, 0xf6, 0xd5, 0xfb, 0x13, 0x00, - 0x00, 0xff, 0xff, 0x7f, 0x15, 0x63, 0xd0, 0x18, 0x05, 0x00, 0x00, -} +func (m *LeaseCandidateSpec) Reset() { *m = LeaseCandidateSpec{} } func (m *LeaseCandidate) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/coordination/v1alpha2/generated.protomessage.pb.go b/staging/src/k8s.io/api/coordination/v1alpha2/generated.protomessage.pb.go new file mode 100644 index 0000000000000..93743262291a9 --- /dev/null +++ b/staging/src/k8s.io/api/coordination/v1alpha2/generated.protomessage.pb.go @@ -0,0 +1,28 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1alpha2 + +func (*LeaseCandidate) ProtoMessage() {} + +func (*LeaseCandidateList) ProtoMessage() {} + +func (*LeaseCandidateSpec) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/coordination/v1alpha2/zz_generated.model_name.go b/staging/src/k8s.io/api/coordination/v1alpha2/zz_generated.model_name.go new file mode 100644 index 0000000000000..016d489f9b38b --- /dev/null +++ b/staging/src/k8s.io/api/coordination/v1alpha2/zz_generated.model_name.go @@ -0,0 +1,37 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1alpha2 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LeaseCandidate) OpenAPIModelName() string { + return "io.k8s.api.coordination.v1alpha2.LeaseCandidate" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LeaseCandidateList) OpenAPIModelName() string { + return "io.k8s.api.coordination.v1alpha2.LeaseCandidateList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LeaseCandidateSpec) OpenAPIModelName() string { + return "io.k8s.api.coordination.v1alpha2.LeaseCandidateSpec" +} diff --git a/staging/src/k8s.io/api/coordination/v1beta1/doc.go b/staging/src/k8s.io/api/coordination/v1beta1/doc.go index cab8becf677d6..22c5a91762812 100644 --- a/staging/src/k8s.io/api/coordination/v1beta1/doc.go +++ b/staging/src/k8s.io/api/coordination/v1beta1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.coordination.v1beta1 // +groupName=coordination.k8s.io diff --git a/staging/src/k8s.io/api/coordination/v1beta1/generated.pb.go b/staging/src/k8s.io/api/coordination/v1beta1/generated.pb.go index 52fd4167fa630..f9330ae787e22 100644 --- a/staging/src/k8s.io/api/coordination/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/coordination/v1beta1/generated.pb.go @@ -24,259 +24,25 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - k8s_io_api_coordination_v1 "k8s.io/api/coordination/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *Lease) Reset() { *m = Lease{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *LeaseCandidate) Reset() { *m = LeaseCandidate{} } -func (m *Lease) Reset() { *m = Lease{} } -func (*Lease) ProtoMessage() {} -func (*Lease) Descriptor() ([]byte, []int) { - return fileDescriptor_8d4e223b8bb23da3, []int{0} -} -func (m *Lease) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Lease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Lease) XXX_Merge(src proto.Message) { - xxx_messageInfo_Lease.Merge(m, src) -} -func (m *Lease) XXX_Size() int { - return m.Size() -} -func (m *Lease) XXX_DiscardUnknown() { - xxx_messageInfo_Lease.DiscardUnknown(m) -} +func (m *LeaseCandidateList) Reset() { *m = LeaseCandidateList{} } -var xxx_messageInfo_Lease proto.InternalMessageInfo +func (m *LeaseCandidateSpec) Reset() { *m = LeaseCandidateSpec{} } -func (m *LeaseCandidate) Reset() { *m = LeaseCandidate{} } -func (*LeaseCandidate) ProtoMessage() {} -func (*LeaseCandidate) Descriptor() ([]byte, []int) { - return fileDescriptor_8d4e223b8bb23da3, []int{1} -} -func (m *LeaseCandidate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseCandidate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LeaseCandidate) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseCandidate.Merge(m, src) -} -func (m *LeaseCandidate) XXX_Size() int { - return m.Size() -} -func (m *LeaseCandidate) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseCandidate.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseCandidate proto.InternalMessageInfo +func (m *LeaseList) Reset() { *m = LeaseList{} } -func (m *LeaseCandidateList) Reset() { *m = LeaseCandidateList{} } -func (*LeaseCandidateList) ProtoMessage() {} -func (*LeaseCandidateList) Descriptor() ([]byte, []int) { - return fileDescriptor_8d4e223b8bb23da3, []int{2} -} -func (m *LeaseCandidateList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseCandidateList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LeaseCandidateList) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseCandidateList.Merge(m, src) -} -func (m *LeaseCandidateList) XXX_Size() int { - return m.Size() -} -func (m *LeaseCandidateList) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseCandidateList.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseCandidateList proto.InternalMessageInfo - -func (m *LeaseCandidateSpec) Reset() { *m = LeaseCandidateSpec{} } -func (*LeaseCandidateSpec) ProtoMessage() {} -func (*LeaseCandidateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_8d4e223b8bb23da3, []int{3} -} -func (m *LeaseCandidateSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseCandidateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LeaseCandidateSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseCandidateSpec.Merge(m, src) -} -func (m *LeaseCandidateSpec) XXX_Size() int { - return m.Size() -} -func (m *LeaseCandidateSpec) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseCandidateSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseCandidateSpec proto.InternalMessageInfo - -func (m *LeaseList) Reset() { *m = LeaseList{} } -func (*LeaseList) ProtoMessage() {} -func (*LeaseList) Descriptor() ([]byte, []int) { - return fileDescriptor_8d4e223b8bb23da3, []int{4} -} -func (m *LeaseList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LeaseList) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseList.Merge(m, src) -} -func (m *LeaseList) XXX_Size() int { - return m.Size() -} -func (m *LeaseList) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseList.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseList proto.InternalMessageInfo - -func (m *LeaseSpec) Reset() { *m = LeaseSpec{} } -func (*LeaseSpec) ProtoMessage() {} -func (*LeaseSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_8d4e223b8bb23da3, []int{5} -} -func (m *LeaseSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LeaseSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseSpec.Merge(m, src) -} -func (m *LeaseSpec) XXX_Size() int { - return m.Size() -} -func (m *LeaseSpec) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseSpec proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Lease)(nil), "k8s.io.api.coordination.v1beta1.Lease") - proto.RegisterType((*LeaseCandidate)(nil), "k8s.io.api.coordination.v1beta1.LeaseCandidate") - proto.RegisterType((*LeaseCandidateList)(nil), "k8s.io.api.coordination.v1beta1.LeaseCandidateList") - proto.RegisterType((*LeaseCandidateSpec)(nil), "k8s.io.api.coordination.v1beta1.LeaseCandidateSpec") - proto.RegisterType((*LeaseList)(nil), "k8s.io.api.coordination.v1beta1.LeaseList") - proto.RegisterType((*LeaseSpec)(nil), "k8s.io.api.coordination.v1beta1.LeaseSpec") -} - -func init() { - proto.RegisterFile("k8s.io/api/coordination/v1beta1/generated.proto", fileDescriptor_8d4e223b8bb23da3) -} - -var fileDescriptor_8d4e223b8bb23da3 = []byte{ - // 750 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xdd, 0x4e, 0x1b, 0x39, - 0x18, 0xcd, 0x40, 0xb2, 0x9b, 0x38, 0x04, 0xb2, 0x5e, 0x56, 0x1a, 0x71, 0x31, 0x83, 0x72, 0xb1, - 0x42, 0x48, 0xeb, 0x59, 0x60, 0xb5, 0x5a, 0x6d, 0x55, 0xa9, 0x1d, 0x40, 0x2d, 0x6a, 0x68, 0x91, - 0xa1, 0x95, 0x5a, 0x21, 0xb5, 0xce, 0x8c, 0x99, 0xb8, 0x30, 0x3f, 0xf5, 0x38, 0x54, 0xb9, 0xeb, - 0x23, 0xf4, 0x69, 0x5a, 0xf5, 0x0d, 0xd2, 0x3b, 0x2e, 0xb9, 0x8a, 0xca, 0x54, 0xea, 0x43, 0xf4, - 0xaa, 0xb2, 0x33, 0xf9, 0x27, 0x22, 0x6d, 0x11, 0x77, 0xf1, 0xf7, 0x9d, 0x73, 0xfc, 0x1d, 0xfb, - 0x38, 0x1a, 0x60, 0x1d, 0xff, 0x17, 0x23, 0x16, 0x5a, 0x24, 0x62, 0x96, 0x13, 0x86, 0xdc, 0x65, - 0x01, 0x11, 0x2c, 0x0c, 0xac, 0xd3, 0xb5, 0x1a, 0x15, 0x64, 0xcd, 0xf2, 0x68, 0x40, 0x39, 0x11, - 0xd4, 0x45, 0x11, 0x0f, 0x45, 0x08, 0xcd, 0x0e, 0x01, 0x91, 0x88, 0xa1, 0x41, 0x02, 0x4a, 0x09, - 0x4b, 0x7f, 0x79, 0x4c, 0xd4, 0x1b, 0x35, 0xe4, 0x84, 0xbe, 0xe5, 0x85, 0x5e, 0x68, 0x29, 0x5e, - 0xad, 0x71, 0xa4, 0x56, 0x6a, 0xa1, 0x7e, 0x75, 0xf4, 0x96, 0x56, 0x27, 0x0f, 0x30, 0xba, 0xf7, - 0xd2, 0x3f, 0x7d, 0xac, 0x4f, 0x9c, 0x3a, 0x0b, 0x28, 0x6f, 0x5a, 0xd1, 0xb1, 0x27, 0x0b, 0xb1, - 0xe5, 0x53, 0x41, 0x2e, 0x63, 0x59, 0x93, 0x58, 0xbc, 0x11, 0x08, 0xe6, 0xd3, 0x31, 0xc2, 0xbf, - 0x57, 0x11, 0x62, 0xa7, 0x4e, 0x7d, 0x32, 0xca, 0xab, 0xbc, 0xd7, 0x40, 0xae, 0x4a, 0x49, 0x4c, - 0xe1, 0x0b, 0x90, 0x97, 0xd3, 0xb8, 0x44, 0x10, 0x5d, 0x5b, 0xd6, 0x56, 0x8a, 0xeb, 0x7f, 0xa3, - 0xfe, 0xb9, 0xf5, 0x44, 0x51, 0x74, 0xec, 0xc9, 0x42, 0x8c, 0x24, 0x1a, 0x9d, 0xae, 0xa1, 0x47, - 0xb5, 0x97, 0xd4, 0x11, 0xbb, 0x54, 0x10, 0x1b, 0xb6, 0xda, 0x66, 0x26, 0x69, 0x9b, 0xa0, 0x5f, - 0xc3, 0x3d, 0x55, 0x58, 0x05, 0xd9, 0x38, 0xa2, 0x8e, 0x3e, 0xa3, 0xd4, 0x57, 0xd1, 0x15, 0xb7, - 0x82, 0xd4, 0x5c, 0xfb, 0x11, 0x75, 0xec, 0xb9, 0x54, 0x37, 0x2b, 0x57, 0x58, 0xa9, 0x54, 0x3e, - 0x6a, 0x60, 0x5e, 0x21, 0x36, 0x49, 0xe0, 0x32, 0x97, 0x88, 0x9b, 0xb0, 0xf0, 0x78, 0xc8, 0xc2, - 0xc6, 0x74, 0x16, 0x7a, 0x03, 0x4e, 0xf4, 0xd2, 0xd2, 0x00, 0x1c, 0x86, 0x56, 0x59, 0x2c, 0xe0, - 0xe1, 0x98, 0x1f, 0x34, 0x9d, 0x1f, 0xc9, 0x56, 0x6e, 0xca, 0xe9, 0x66, 0xf9, 0x6e, 0x65, 0xc0, - 0xcb, 0x01, 0xc8, 0x31, 0x41, 0xfd, 0x58, 0x9f, 0x59, 0x9e, 0x5d, 0x29, 0xae, 0x5b, 0xdf, 0x69, - 0xc6, 0x2e, 0xa5, 0xda, 0xb9, 0x1d, 0xa9, 0x82, 0x3b, 0x62, 0x95, 0x2f, 0xb3, 0xa3, 0x56, 0xa4, - 0x4f, 0x68, 0x81, 0xc2, 0x89, 0xac, 0x3e, 0x24, 0x3e, 0x55, 0x5e, 0x0a, 0xf6, 0x6f, 0x29, 0xbf, - 0x50, 0xed, 0x36, 0x70, 0x1f, 0x03, 0x9f, 0x82, 0x7c, 0xc4, 0x02, 0xef, 0x80, 0xf9, 0x34, 0x3d, - 0x6d, 0x6b, 0x3a, 0xef, 0xbb, 0xcc, 0xe1, 0xa1, 0xa4, 0xd9, 0x73, 0xd2, 0xf8, 0x5e, 0x2a, 0x82, - 0x7b, 0x72, 0xf0, 0x10, 0x14, 0x38, 0x0d, 0xe8, 0x6b, 0xa5, 0x3d, 0xfb, 0x63, 0xda, 0x25, 0x39, - 0x38, 0xee, 0xaa, 0xe0, 0xbe, 0x20, 0xbc, 0x05, 0x4a, 0x35, 0x16, 0x10, 0xde, 0x7c, 0x42, 0x79, - 0xcc, 0xc2, 0x40, 0xcf, 0x2a, 0xb7, 0x7f, 0xa4, 0x6e, 0x4b, 0xf6, 0x60, 0x13, 0x0f, 0x63, 0xe1, - 0x16, 0x28, 0x53, 0xbf, 0x71, 0xa2, 0xce, 0xbd, 0xcb, 0xcf, 0x29, 0xbe, 0x9e, 0xf2, 0xcb, 0xdb, - 0x23, 0x7d, 0x3c, 0xc6, 0x80, 0x0e, 0xc8, 0xc7, 0x42, 0xbe, 0x72, 0xaf, 0xa9, 0xff, 0xa2, 0xd8, - 0xf7, 0xba, 0x39, 0xd8, 0x4f, 0xeb, 0x5f, 0xdb, 0xe6, 0xc6, 0xe4, 0x7f, 0x31, 0xb4, 0xd9, 0x5d, - 0x53, 0xb7, 0xf3, 0x0a, 0x53, 0x1a, 0xee, 0x09, 0x57, 0xde, 0x69, 0xa0, 0x73, 0x73, 0x37, 0x10, - 0xd5, 0x07, 0xc3, 0x51, 0xfd, 0x73, 0xba, 0xa8, 0x4e, 0x48, 0xe8, 0x87, 0x6c, 0x3a, 0xb8, 0x0a, - 0xe6, 0xff, 0x60, 0xbe, 0x1e, 0x9e, 0xb8, 0x94, 0xef, 0xb8, 0x34, 0x10, 0x4c, 0x34, 0xd3, 0x74, - 0xc2, 0xa4, 0x6d, 0xce, 0xdf, 0x1f, 0xea, 0xe0, 0x11, 0x24, 0xac, 0x82, 0x45, 0x15, 0xd8, 0xad, - 0x06, 0x57, 0xdb, 0xef, 0x53, 0x27, 0x0c, 0xdc, 0x58, 0xe5, 0x35, 0x67, 0xeb, 0x49, 0xdb, 0x5c, - 0xac, 0x5e, 0xd2, 0xc7, 0x97, 0xb2, 0x60, 0x0d, 0x14, 0x89, 0xf3, 0xaa, 0xc1, 0x38, 0xfd, 0x99, - 0x60, 0x2e, 0x24, 0x6d, 0xb3, 0x78, 0xb7, 0xaf, 0x83, 0x07, 0x45, 0x87, 0xa3, 0x9f, 0xbd, 0xee, - 0xe8, 0xdf, 0x01, 0x65, 0xe5, 0xec, 0x80, 0x93, 0x20, 0x66, 0xd2, 0x5b, 0xac, 0xd2, 0x9b, 0xb3, - 0x17, 0x65, 0x72, 0xab, 0x23, 0x3d, 0x3c, 0x86, 0x86, 0xcf, 0xc7, 0x92, 0xbb, 0x79, 0xad, 0xa9, - 0x85, 0xb7, 0xc1, 0x42, 0xc4, 0xe9, 0x11, 0xe5, 0x9c, 0xba, 0x9d, 0xdb, 0xd5, 0x7f, 0x55, 0xfb, - 0xfc, 0x9e, 0xb4, 0xcd, 0x85, 0xbd, 0xe1, 0x16, 0x1e, 0xc5, 0xda, 0xdb, 0xad, 0x0b, 0x23, 0x73, - 0x76, 0x61, 0x64, 0xce, 0x2f, 0x8c, 0xcc, 0x9b, 0xc4, 0xd0, 0x5a, 0x89, 0xa1, 0x9d, 0x25, 0x86, - 0x76, 0x9e, 0x18, 0xda, 0xa7, 0xc4, 0xd0, 0xde, 0x7e, 0x36, 0x32, 0xcf, 0xcc, 0x2b, 0x3e, 0x50, - 0xbe, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x56, 0x51, 0x57, 0xc2, 0x08, 0x00, 0x00, -} +func (m *LeaseSpec) Reset() { *m = LeaseSpec{} } func (m *Lease) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/coordination/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/coordination/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..a1a88e55ff019 --- /dev/null +++ b/staging/src/k8s.io/api/coordination/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,34 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*Lease) ProtoMessage() {} + +func (*LeaseCandidate) ProtoMessage() {} + +func (*LeaseCandidateList) ProtoMessage() {} + +func (*LeaseCandidateSpec) ProtoMessage() {} + +func (*LeaseList) ProtoMessage() {} + +func (*LeaseSpec) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/coordination/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/coordination/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..53b291dbd63d9 --- /dev/null +++ b/staging/src/k8s.io/api/coordination/v1beta1/zz_generated.model_name.go @@ -0,0 +1,52 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Lease) OpenAPIModelName() string { + return "io.k8s.api.coordination.v1beta1.Lease" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LeaseCandidate) OpenAPIModelName() string { + return "io.k8s.api.coordination.v1beta1.LeaseCandidate" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LeaseCandidateList) OpenAPIModelName() string { + return "io.k8s.api.coordination.v1beta1.LeaseCandidateList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LeaseCandidateSpec) OpenAPIModelName() string { + return "io.k8s.api.coordination.v1beta1.LeaseCandidateSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LeaseList) OpenAPIModelName() string { + return "io.k8s.api.coordination.v1beta1.LeaseList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LeaseSpec) OpenAPIModelName() string { + return "io.k8s.api.coordination.v1beta1.LeaseSpec" +} diff --git a/staging/src/k8s.io/api/core/v1/doc.go b/staging/src/k8s.io/api/core/v1/doc.go index e4e9196aebcb1..a41f2ce1f6ce6 100644 --- a/staging/src/k8s.io/api/core/v1/doc.go +++ b/staging/src/k8s.io/api/core/v1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.core.v1 + // +groupName= // Package v1 is the v1 version of the core API. diff --git a/staging/src/k8s.io/api/core/v1/generated.pb.go b/staging/src/k8s.io/api/core/v1/generated.pb.go index e1a297b985478..c38cc3f0585fd 100644 --- a/staging/src/k8s.io/api/core/v1/generated.pb.go +++ b/staging/src/k8s.io/api/core/v1/generated.pb.go @@ -23,14 +23,12 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -38,7973 +36,479 @@ import ( k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *AWSElasticBlockStoreVolumeSource) Reset() { *m = AWSElasticBlockStoreVolumeSource{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *Affinity) Reset() { *m = Affinity{} } -func (m *AWSElasticBlockStoreVolumeSource) Reset() { *m = AWSElasticBlockStoreVolumeSource{} } -func (*AWSElasticBlockStoreVolumeSource) ProtoMessage() {} -func (*AWSElasticBlockStoreVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{0} -} -func (m *AWSElasticBlockStoreVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AWSElasticBlockStoreVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AWSElasticBlockStoreVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_AWSElasticBlockStoreVolumeSource.Merge(m, src) -} -func (m *AWSElasticBlockStoreVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *AWSElasticBlockStoreVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_AWSElasticBlockStoreVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_AWSElasticBlockStoreVolumeSource proto.InternalMessageInfo - -func (m *Affinity) Reset() { *m = Affinity{} } -func (*Affinity) ProtoMessage() {} -func (*Affinity) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{1} -} -func (m *Affinity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Affinity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Affinity) XXX_Merge(src proto.Message) { - xxx_messageInfo_Affinity.Merge(m, src) -} -func (m *Affinity) XXX_Size() int { - return m.Size() -} -func (m *Affinity) XXX_DiscardUnknown() { - xxx_messageInfo_Affinity.DiscardUnknown(m) -} - -var xxx_messageInfo_Affinity proto.InternalMessageInfo - -func (m *AppArmorProfile) Reset() { *m = AppArmorProfile{} } -func (*AppArmorProfile) ProtoMessage() {} -func (*AppArmorProfile) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{2} -} -func (m *AppArmorProfile) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AppArmorProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AppArmorProfile) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppArmorProfile.Merge(m, src) -} -func (m *AppArmorProfile) XXX_Size() int { - return m.Size() -} -func (m *AppArmorProfile) XXX_DiscardUnknown() { - xxx_messageInfo_AppArmorProfile.DiscardUnknown(m) -} - -var xxx_messageInfo_AppArmorProfile proto.InternalMessageInfo - -func (m *AttachedVolume) Reset() { *m = AttachedVolume{} } -func (*AttachedVolume) ProtoMessage() {} -func (*AttachedVolume) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{3} -} -func (m *AttachedVolume) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AttachedVolume) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AttachedVolume) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttachedVolume.Merge(m, src) -} -func (m *AttachedVolume) XXX_Size() int { - return m.Size() -} -func (m *AttachedVolume) XXX_DiscardUnknown() { - xxx_messageInfo_AttachedVolume.DiscardUnknown(m) -} - -var xxx_messageInfo_AttachedVolume proto.InternalMessageInfo - -func (m *AvoidPods) Reset() { *m = AvoidPods{} } -func (*AvoidPods) ProtoMessage() {} -func (*AvoidPods) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{4} -} -func (m *AvoidPods) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AvoidPods) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AvoidPods) XXX_Merge(src proto.Message) { - xxx_messageInfo_AvoidPods.Merge(m, src) -} -func (m *AvoidPods) XXX_Size() int { - return m.Size() -} -func (m *AvoidPods) XXX_DiscardUnknown() { - xxx_messageInfo_AvoidPods.DiscardUnknown(m) -} - -var xxx_messageInfo_AvoidPods proto.InternalMessageInfo - -func (m *AzureDiskVolumeSource) Reset() { *m = AzureDiskVolumeSource{} } -func (*AzureDiskVolumeSource) ProtoMessage() {} -func (*AzureDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{5} -} -func (m *AzureDiskVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AzureDiskVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AzureDiskVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_AzureDiskVolumeSource.Merge(m, src) -} -func (m *AzureDiskVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *AzureDiskVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_AzureDiskVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_AzureDiskVolumeSource proto.InternalMessageInfo - -func (m *AzureFilePersistentVolumeSource) Reset() { *m = AzureFilePersistentVolumeSource{} } -func (*AzureFilePersistentVolumeSource) ProtoMessage() {} -func (*AzureFilePersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{6} -} -func (m *AzureFilePersistentVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AzureFilePersistentVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AzureFilePersistentVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_AzureFilePersistentVolumeSource.Merge(m, src) -} -func (m *AzureFilePersistentVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *AzureFilePersistentVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_AzureFilePersistentVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_AzureFilePersistentVolumeSource proto.InternalMessageInfo - -func (m *AzureFileVolumeSource) Reset() { *m = AzureFileVolumeSource{} } -func (*AzureFileVolumeSource) ProtoMessage() {} -func (*AzureFileVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{7} -} -func (m *AzureFileVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AzureFileVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AzureFileVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_AzureFileVolumeSource.Merge(m, src) -} -func (m *AzureFileVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *AzureFileVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_AzureFileVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_AzureFileVolumeSource proto.InternalMessageInfo - -func (m *Binding) Reset() { *m = Binding{} } -func (*Binding) ProtoMessage() {} -func (*Binding) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{8} -} -func (m *Binding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Binding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Binding) XXX_Merge(src proto.Message) { - xxx_messageInfo_Binding.Merge(m, src) -} -func (m *Binding) XXX_Size() int { - return m.Size() -} -func (m *Binding) XXX_DiscardUnknown() { - xxx_messageInfo_Binding.DiscardUnknown(m) -} - -var xxx_messageInfo_Binding proto.InternalMessageInfo - -func (m *CSIPersistentVolumeSource) Reset() { *m = CSIPersistentVolumeSource{} } -func (*CSIPersistentVolumeSource) ProtoMessage() {} -func (*CSIPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{9} -} -func (m *CSIPersistentVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIPersistentVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIPersistentVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIPersistentVolumeSource.Merge(m, src) -} -func (m *CSIPersistentVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *CSIPersistentVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_CSIPersistentVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIPersistentVolumeSource proto.InternalMessageInfo - -func (m *CSIVolumeSource) Reset() { *m = CSIVolumeSource{} } -func (*CSIVolumeSource) ProtoMessage() {} -func (*CSIVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{10} -} -func (m *CSIVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIVolumeSource.Merge(m, src) -} -func (m *CSIVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *CSIVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_CSIVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIVolumeSource proto.InternalMessageInfo - -func (m *Capabilities) Reset() { *m = Capabilities{} } -func (*Capabilities) ProtoMessage() {} -func (*Capabilities) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{11} -} -func (m *Capabilities) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Capabilities) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Capabilities) XXX_Merge(src proto.Message) { - xxx_messageInfo_Capabilities.Merge(m, src) -} -func (m *Capabilities) XXX_Size() int { - return m.Size() -} -func (m *Capabilities) XXX_DiscardUnknown() { - xxx_messageInfo_Capabilities.DiscardUnknown(m) -} - -var xxx_messageInfo_Capabilities proto.InternalMessageInfo - -func (m *CephFSPersistentVolumeSource) Reset() { *m = CephFSPersistentVolumeSource{} } -func (*CephFSPersistentVolumeSource) ProtoMessage() {} -func (*CephFSPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{12} -} -func (m *CephFSPersistentVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CephFSPersistentVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CephFSPersistentVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_CephFSPersistentVolumeSource.Merge(m, src) -} -func (m *CephFSPersistentVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *CephFSPersistentVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_CephFSPersistentVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_CephFSPersistentVolumeSource proto.InternalMessageInfo - -func (m *CephFSVolumeSource) Reset() { *m = CephFSVolumeSource{} } -func (*CephFSVolumeSource) ProtoMessage() {} -func (*CephFSVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{13} -} -func (m *CephFSVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CephFSVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CephFSVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_CephFSVolumeSource.Merge(m, src) -} -func (m *CephFSVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *CephFSVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_CephFSVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_CephFSVolumeSource proto.InternalMessageInfo - -func (m *CinderPersistentVolumeSource) Reset() { *m = CinderPersistentVolumeSource{} } -func (*CinderPersistentVolumeSource) ProtoMessage() {} -func (*CinderPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{14} -} -func (m *CinderPersistentVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CinderPersistentVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CinderPersistentVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_CinderPersistentVolumeSource.Merge(m, src) -} -func (m *CinderPersistentVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *CinderPersistentVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_CinderPersistentVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_CinderPersistentVolumeSource proto.InternalMessageInfo - -func (m *CinderVolumeSource) Reset() { *m = CinderVolumeSource{} } -func (*CinderVolumeSource) ProtoMessage() {} -func (*CinderVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{15} -} -func (m *CinderVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CinderVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CinderVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_CinderVolumeSource.Merge(m, src) -} -func (m *CinderVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *CinderVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_CinderVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_CinderVolumeSource proto.InternalMessageInfo - -func (m *ClientIPConfig) Reset() { *m = ClientIPConfig{} } -func (*ClientIPConfig) ProtoMessage() {} -func (*ClientIPConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{16} -} -func (m *ClientIPConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClientIPConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClientIPConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClientIPConfig.Merge(m, src) -} -func (m *ClientIPConfig) XXX_Size() int { - return m.Size() -} -func (m *ClientIPConfig) XXX_DiscardUnknown() { - xxx_messageInfo_ClientIPConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_ClientIPConfig proto.InternalMessageInfo - -func (m *ClusterTrustBundleProjection) Reset() { *m = ClusterTrustBundleProjection{} } -func (*ClusterTrustBundleProjection) ProtoMessage() {} -func (*ClusterTrustBundleProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{17} -} -func (m *ClusterTrustBundleProjection) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterTrustBundleProjection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterTrustBundleProjection) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterTrustBundleProjection.Merge(m, src) -} -func (m *ClusterTrustBundleProjection) XXX_Size() int { - return m.Size() -} -func (m *ClusterTrustBundleProjection) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterTrustBundleProjection.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterTrustBundleProjection proto.InternalMessageInfo - -func (m *ComponentCondition) Reset() { *m = ComponentCondition{} } -func (*ComponentCondition) ProtoMessage() {} -func (*ComponentCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{18} -} -func (m *ComponentCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ComponentCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ComponentCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_ComponentCondition.Merge(m, src) -} -func (m *ComponentCondition) XXX_Size() int { - return m.Size() -} -func (m *ComponentCondition) XXX_DiscardUnknown() { - xxx_messageInfo_ComponentCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_ComponentCondition proto.InternalMessageInfo - -func (m *ComponentStatus) Reset() { *m = ComponentStatus{} } -func (*ComponentStatus) ProtoMessage() {} -func (*ComponentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{19} -} -func (m *ComponentStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ComponentStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ComponentStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ComponentStatus.Merge(m, src) -} -func (m *ComponentStatus) XXX_Size() int { - return m.Size() -} -func (m *ComponentStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ComponentStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ComponentStatus proto.InternalMessageInfo - -func (m *ComponentStatusList) Reset() { *m = ComponentStatusList{} } -func (*ComponentStatusList) ProtoMessage() {} -func (*ComponentStatusList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{20} -} -func (m *ComponentStatusList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ComponentStatusList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ComponentStatusList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ComponentStatusList.Merge(m, src) -} -func (m *ComponentStatusList) XXX_Size() int { - return m.Size() -} -func (m *ComponentStatusList) XXX_DiscardUnknown() { - xxx_messageInfo_ComponentStatusList.DiscardUnknown(m) -} - -var xxx_messageInfo_ComponentStatusList proto.InternalMessageInfo - -func (m *ConfigMap) Reset() { *m = ConfigMap{} } -func (*ConfigMap) ProtoMessage() {} -func (*ConfigMap) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{21} -} -func (m *ConfigMap) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigMap) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigMap.Merge(m, src) -} -func (m *ConfigMap) XXX_Size() int { - return m.Size() -} -func (m *ConfigMap) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigMap.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfigMap proto.InternalMessageInfo - -func (m *ConfigMapEnvSource) Reset() { *m = ConfigMapEnvSource{} } -func (*ConfigMapEnvSource) ProtoMessage() {} -func (*ConfigMapEnvSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{22} -} -func (m *ConfigMapEnvSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigMapEnvSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigMapEnvSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigMapEnvSource.Merge(m, src) -} -func (m *ConfigMapEnvSource) XXX_Size() int { - return m.Size() -} -func (m *ConfigMapEnvSource) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigMapEnvSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfigMapEnvSource proto.InternalMessageInfo - -func (m *ConfigMapKeySelector) Reset() { *m = ConfigMapKeySelector{} } -func (*ConfigMapKeySelector) ProtoMessage() {} -func (*ConfigMapKeySelector) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{23} -} -func (m *ConfigMapKeySelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigMapKeySelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigMapKeySelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigMapKeySelector.Merge(m, src) -} -func (m *ConfigMapKeySelector) XXX_Size() int { - return m.Size() -} -func (m *ConfigMapKeySelector) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigMapKeySelector.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfigMapKeySelector proto.InternalMessageInfo - -func (m *ConfigMapList) Reset() { *m = ConfigMapList{} } -func (*ConfigMapList) ProtoMessage() {} -func (*ConfigMapList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{24} -} -func (m *ConfigMapList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigMapList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigMapList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigMapList.Merge(m, src) -} -func (m *ConfigMapList) XXX_Size() int { - return m.Size() -} -func (m *ConfigMapList) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigMapList.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfigMapList proto.InternalMessageInfo - -func (m *ConfigMapNodeConfigSource) Reset() { *m = ConfigMapNodeConfigSource{} } -func (*ConfigMapNodeConfigSource) ProtoMessage() {} -func (*ConfigMapNodeConfigSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{25} -} -func (m *ConfigMapNodeConfigSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigMapNodeConfigSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigMapNodeConfigSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigMapNodeConfigSource.Merge(m, src) -} -func (m *ConfigMapNodeConfigSource) XXX_Size() int { - return m.Size() -} -func (m *ConfigMapNodeConfigSource) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigMapNodeConfigSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfigMapNodeConfigSource proto.InternalMessageInfo - -func (m *ConfigMapProjection) Reset() { *m = ConfigMapProjection{} } -func (*ConfigMapProjection) ProtoMessage() {} -func (*ConfigMapProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{26} -} -func (m *ConfigMapProjection) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigMapProjection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigMapProjection) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigMapProjection.Merge(m, src) -} -func (m *ConfigMapProjection) XXX_Size() int { - return m.Size() -} -func (m *ConfigMapProjection) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigMapProjection.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfigMapProjection proto.InternalMessageInfo - -func (m *ConfigMapVolumeSource) Reset() { *m = ConfigMapVolumeSource{} } -func (*ConfigMapVolumeSource) ProtoMessage() {} -func (*ConfigMapVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{27} -} -func (m *ConfigMapVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigMapVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigMapVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigMapVolumeSource.Merge(m, src) -} -func (m *ConfigMapVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *ConfigMapVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigMapVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfigMapVolumeSource proto.InternalMessageInfo - -func (m *Container) Reset() { *m = Container{} } -func (*Container) ProtoMessage() {} -func (*Container) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{28} -} -func (m *Container) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Container) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Container) XXX_Merge(src proto.Message) { - xxx_messageInfo_Container.Merge(m, src) -} -func (m *Container) XXX_Size() int { - return m.Size() -} -func (m *Container) XXX_DiscardUnknown() { - xxx_messageInfo_Container.DiscardUnknown(m) -} - -var xxx_messageInfo_Container proto.InternalMessageInfo - -func (m *ContainerExtendedResourceRequest) Reset() { *m = ContainerExtendedResourceRequest{} } -func (*ContainerExtendedResourceRequest) ProtoMessage() {} -func (*ContainerExtendedResourceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{29} -} -func (m *ContainerExtendedResourceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerExtendedResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerExtendedResourceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerExtendedResourceRequest.Merge(m, src) -} -func (m *ContainerExtendedResourceRequest) XXX_Size() int { - return m.Size() -} -func (m *ContainerExtendedResourceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerExtendedResourceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerExtendedResourceRequest proto.InternalMessageInfo - -func (m *ContainerImage) Reset() { *m = ContainerImage{} } -func (*ContainerImage) ProtoMessage() {} -func (*ContainerImage) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{30} -} -func (m *ContainerImage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerImage) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerImage.Merge(m, src) -} -func (m *ContainerImage) XXX_Size() int { - return m.Size() -} -func (m *ContainerImage) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerImage.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerImage proto.InternalMessageInfo - -func (m *ContainerPort) Reset() { *m = ContainerPort{} } -func (*ContainerPort) ProtoMessage() {} -func (*ContainerPort) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{31} -} -func (m *ContainerPort) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerPort) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerPort.Merge(m, src) -} -func (m *ContainerPort) XXX_Size() int { - return m.Size() -} -func (m *ContainerPort) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerPort.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerPort proto.InternalMessageInfo - -func (m *ContainerResizePolicy) Reset() { *m = ContainerResizePolicy{} } -func (*ContainerResizePolicy) ProtoMessage() {} -func (*ContainerResizePolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{32} -} -func (m *ContainerResizePolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerResizePolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerResizePolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerResizePolicy.Merge(m, src) -} -func (m *ContainerResizePolicy) XXX_Size() int { - return m.Size() -} -func (m *ContainerResizePolicy) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerResizePolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerResizePolicy proto.InternalMessageInfo - -func (m *ContainerRestartRule) Reset() { *m = ContainerRestartRule{} } -func (*ContainerRestartRule) ProtoMessage() {} -func (*ContainerRestartRule) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{33} -} -func (m *ContainerRestartRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerRestartRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerRestartRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerRestartRule.Merge(m, src) -} -func (m *ContainerRestartRule) XXX_Size() int { - return m.Size() -} -func (m *ContainerRestartRule) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerRestartRule.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerRestartRule proto.InternalMessageInfo - -func (m *ContainerRestartRuleOnExitCodes) Reset() { *m = ContainerRestartRuleOnExitCodes{} } -func (*ContainerRestartRuleOnExitCodes) ProtoMessage() {} -func (*ContainerRestartRuleOnExitCodes) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{34} -} -func (m *ContainerRestartRuleOnExitCodes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerRestartRuleOnExitCodes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerRestartRuleOnExitCodes) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerRestartRuleOnExitCodes.Merge(m, src) -} -func (m *ContainerRestartRuleOnExitCodes) XXX_Size() int { - return m.Size() -} -func (m *ContainerRestartRuleOnExitCodes) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerRestartRuleOnExitCodes.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerRestartRuleOnExitCodes proto.InternalMessageInfo - -func (m *ContainerState) Reset() { *m = ContainerState{} } -func (*ContainerState) ProtoMessage() {} -func (*ContainerState) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{35} -} -func (m *ContainerState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerState) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerState.Merge(m, src) -} -func (m *ContainerState) XXX_Size() int { - return m.Size() -} -func (m *ContainerState) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerState.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerState proto.InternalMessageInfo - -func (m *ContainerStateRunning) Reset() { *m = ContainerStateRunning{} } -func (*ContainerStateRunning) ProtoMessage() {} -func (*ContainerStateRunning) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{36} -} -func (m *ContainerStateRunning) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerStateRunning) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerStateRunning) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerStateRunning.Merge(m, src) -} -func (m *ContainerStateRunning) XXX_Size() int { - return m.Size() -} -func (m *ContainerStateRunning) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerStateRunning.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerStateRunning proto.InternalMessageInfo - -func (m *ContainerStateTerminated) Reset() { *m = ContainerStateTerminated{} } -func (*ContainerStateTerminated) ProtoMessage() {} -func (*ContainerStateTerminated) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{37} -} -func (m *ContainerStateTerminated) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerStateTerminated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerStateTerminated) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerStateTerminated.Merge(m, src) -} -func (m *ContainerStateTerminated) XXX_Size() int { - return m.Size() -} -func (m *ContainerStateTerminated) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerStateTerminated.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerStateTerminated proto.InternalMessageInfo - -func (m *ContainerStateWaiting) Reset() { *m = ContainerStateWaiting{} } -func (*ContainerStateWaiting) ProtoMessage() {} -func (*ContainerStateWaiting) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{38} -} -func (m *ContainerStateWaiting) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerStateWaiting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerStateWaiting) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerStateWaiting.Merge(m, src) -} -func (m *ContainerStateWaiting) XXX_Size() int { - return m.Size() -} -func (m *ContainerStateWaiting) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerStateWaiting.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerStateWaiting proto.InternalMessageInfo - -func (m *ContainerStatus) Reset() { *m = ContainerStatus{} } -func (*ContainerStatus) ProtoMessage() {} -func (*ContainerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{39} -} -func (m *ContainerStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerStatus.Merge(m, src) -} -func (m *ContainerStatus) XXX_Size() int { - return m.Size() -} -func (m *ContainerStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerStatus proto.InternalMessageInfo - -func (m *ContainerUser) Reset() { *m = ContainerUser{} } -func (*ContainerUser) ProtoMessage() {} -func (*ContainerUser) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{40} -} -func (m *ContainerUser) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerUser) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerUser) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerUser.Merge(m, src) -} -func (m *ContainerUser) XXX_Size() int { - return m.Size() -} -func (m *ContainerUser) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerUser.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerUser proto.InternalMessageInfo - -func (m *DaemonEndpoint) Reset() { *m = DaemonEndpoint{} } -func (*DaemonEndpoint) ProtoMessage() {} -func (*DaemonEndpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{41} -} -func (m *DaemonEndpoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonEndpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonEndpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonEndpoint.Merge(m, src) -} -func (m *DaemonEndpoint) XXX_Size() int { - return m.Size() -} -func (m *DaemonEndpoint) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonEndpoint.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonEndpoint proto.InternalMessageInfo - -func (m *DownwardAPIProjection) Reset() { *m = DownwardAPIProjection{} } -func (*DownwardAPIProjection) ProtoMessage() {} -func (*DownwardAPIProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{42} -} -func (m *DownwardAPIProjection) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DownwardAPIProjection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DownwardAPIProjection) XXX_Merge(src proto.Message) { - xxx_messageInfo_DownwardAPIProjection.Merge(m, src) -} -func (m *DownwardAPIProjection) XXX_Size() int { - return m.Size() -} -func (m *DownwardAPIProjection) XXX_DiscardUnknown() { - xxx_messageInfo_DownwardAPIProjection.DiscardUnknown(m) -} - -var xxx_messageInfo_DownwardAPIProjection proto.InternalMessageInfo - -func (m *DownwardAPIVolumeFile) Reset() { *m = DownwardAPIVolumeFile{} } -func (*DownwardAPIVolumeFile) ProtoMessage() {} -func (*DownwardAPIVolumeFile) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{43} -} -func (m *DownwardAPIVolumeFile) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DownwardAPIVolumeFile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DownwardAPIVolumeFile) XXX_Merge(src proto.Message) { - xxx_messageInfo_DownwardAPIVolumeFile.Merge(m, src) -} -func (m *DownwardAPIVolumeFile) XXX_Size() int { - return m.Size() -} -func (m *DownwardAPIVolumeFile) XXX_DiscardUnknown() { - xxx_messageInfo_DownwardAPIVolumeFile.DiscardUnknown(m) -} - -var xxx_messageInfo_DownwardAPIVolumeFile proto.InternalMessageInfo - -func (m *DownwardAPIVolumeSource) Reset() { *m = DownwardAPIVolumeSource{} } -func (*DownwardAPIVolumeSource) ProtoMessage() {} -func (*DownwardAPIVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{44} -} -func (m *DownwardAPIVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DownwardAPIVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DownwardAPIVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_DownwardAPIVolumeSource.Merge(m, src) -} -func (m *DownwardAPIVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *DownwardAPIVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_DownwardAPIVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_DownwardAPIVolumeSource proto.InternalMessageInfo - -func (m *EmptyDirVolumeSource) Reset() { *m = EmptyDirVolumeSource{} } -func (*EmptyDirVolumeSource) ProtoMessage() {} -func (*EmptyDirVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{45} -} -func (m *EmptyDirVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EmptyDirVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EmptyDirVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_EmptyDirVolumeSource.Merge(m, src) -} -func (m *EmptyDirVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *EmptyDirVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_EmptyDirVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_EmptyDirVolumeSource proto.InternalMessageInfo - -func (m *EndpointAddress) Reset() { *m = EndpointAddress{} } -func (*EndpointAddress) ProtoMessage() {} -func (*EndpointAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{46} -} -func (m *EndpointAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointAddress.Merge(m, src) -} -func (m *EndpointAddress) XXX_Size() int { - return m.Size() -} -func (m *EndpointAddress) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointAddress.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointAddress proto.InternalMessageInfo - -func (m *EndpointPort) Reset() { *m = EndpointPort{} } -func (*EndpointPort) ProtoMessage() {} -func (*EndpointPort) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{47} -} -func (m *EndpointPort) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointPort) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointPort.Merge(m, src) -} -func (m *EndpointPort) XXX_Size() int { - return m.Size() -} -func (m *EndpointPort) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointPort.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointPort proto.InternalMessageInfo - -func (m *EndpointSubset) Reset() { *m = EndpointSubset{} } -func (*EndpointSubset) ProtoMessage() {} -func (*EndpointSubset) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{48} -} -func (m *EndpointSubset) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointSubset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointSubset) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointSubset.Merge(m, src) -} -func (m *EndpointSubset) XXX_Size() int { - return m.Size() -} -func (m *EndpointSubset) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointSubset.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointSubset proto.InternalMessageInfo - -func (m *Endpoints) Reset() { *m = Endpoints{} } -func (*Endpoints) ProtoMessage() {} -func (*Endpoints) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{49} -} -func (m *Endpoints) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Endpoints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Endpoints) XXX_Merge(src proto.Message) { - xxx_messageInfo_Endpoints.Merge(m, src) -} -func (m *Endpoints) XXX_Size() int { - return m.Size() -} -func (m *Endpoints) XXX_DiscardUnknown() { - xxx_messageInfo_Endpoints.DiscardUnknown(m) -} - -var xxx_messageInfo_Endpoints proto.InternalMessageInfo - -func (m *EndpointsList) Reset() { *m = EndpointsList{} } -func (*EndpointsList) ProtoMessage() {} -func (*EndpointsList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{50} -} -func (m *EndpointsList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointsList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointsList) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointsList.Merge(m, src) -} -func (m *EndpointsList) XXX_Size() int { - return m.Size() -} -func (m *EndpointsList) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointsList.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointsList proto.InternalMessageInfo - -func (m *EnvFromSource) Reset() { *m = EnvFromSource{} } -func (*EnvFromSource) ProtoMessage() {} -func (*EnvFromSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{51} -} -func (m *EnvFromSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EnvFromSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EnvFromSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_EnvFromSource.Merge(m, src) -} -func (m *EnvFromSource) XXX_Size() int { - return m.Size() -} -func (m *EnvFromSource) XXX_DiscardUnknown() { - xxx_messageInfo_EnvFromSource.DiscardUnknown(m) -} - -var xxx_messageInfo_EnvFromSource proto.InternalMessageInfo - -func (m *EnvVar) Reset() { *m = EnvVar{} } -func (*EnvVar) ProtoMessage() {} -func (*EnvVar) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{52} -} -func (m *EnvVar) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EnvVar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EnvVar) XXX_Merge(src proto.Message) { - xxx_messageInfo_EnvVar.Merge(m, src) -} -func (m *EnvVar) XXX_Size() int { - return m.Size() -} -func (m *EnvVar) XXX_DiscardUnknown() { - xxx_messageInfo_EnvVar.DiscardUnknown(m) -} - -var xxx_messageInfo_EnvVar proto.InternalMessageInfo - -func (m *EnvVarSource) Reset() { *m = EnvVarSource{} } -func (*EnvVarSource) ProtoMessage() {} -func (*EnvVarSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{53} -} -func (m *EnvVarSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EnvVarSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EnvVarSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_EnvVarSource.Merge(m, src) -} -func (m *EnvVarSource) XXX_Size() int { - return m.Size() -} -func (m *EnvVarSource) XXX_DiscardUnknown() { - xxx_messageInfo_EnvVarSource.DiscardUnknown(m) -} - -var xxx_messageInfo_EnvVarSource proto.InternalMessageInfo - -func (m *EphemeralContainer) Reset() { *m = EphemeralContainer{} } -func (*EphemeralContainer) ProtoMessage() {} -func (*EphemeralContainer) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{54} -} -func (m *EphemeralContainer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EphemeralContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EphemeralContainer) XXX_Merge(src proto.Message) { - xxx_messageInfo_EphemeralContainer.Merge(m, src) -} -func (m *EphemeralContainer) XXX_Size() int { - return m.Size() -} -func (m *EphemeralContainer) XXX_DiscardUnknown() { - xxx_messageInfo_EphemeralContainer.DiscardUnknown(m) -} - -var xxx_messageInfo_EphemeralContainer proto.InternalMessageInfo - -func (m *EphemeralContainerCommon) Reset() { *m = EphemeralContainerCommon{} } -func (*EphemeralContainerCommon) ProtoMessage() {} -func (*EphemeralContainerCommon) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{55} -} -func (m *EphemeralContainerCommon) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EphemeralContainerCommon) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EphemeralContainerCommon) XXX_Merge(src proto.Message) { - xxx_messageInfo_EphemeralContainerCommon.Merge(m, src) -} -func (m *EphemeralContainerCommon) XXX_Size() int { - return m.Size() -} -func (m *EphemeralContainerCommon) XXX_DiscardUnknown() { - xxx_messageInfo_EphemeralContainerCommon.DiscardUnknown(m) -} - -var xxx_messageInfo_EphemeralContainerCommon proto.InternalMessageInfo - -func (m *EphemeralVolumeSource) Reset() { *m = EphemeralVolumeSource{} } -func (*EphemeralVolumeSource) ProtoMessage() {} -func (*EphemeralVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{56} -} -func (m *EphemeralVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EphemeralVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EphemeralVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_EphemeralVolumeSource.Merge(m, src) -} -func (m *EphemeralVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *EphemeralVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_EphemeralVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_EphemeralVolumeSource proto.InternalMessageInfo - -func (m *Event) Reset() { *m = Event{} } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{57} -} -func (m *Event) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(m, src) -} -func (m *Event) XXX_Size() int { - return m.Size() -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Event proto.InternalMessageInfo - -func (m *EventList) Reset() { *m = EventList{} } -func (*EventList) ProtoMessage() {} -func (*EventList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{58} -} -func (m *EventList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EventList) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventList.Merge(m, src) -} -func (m *EventList) XXX_Size() int { - return m.Size() -} -func (m *EventList) XXX_DiscardUnknown() { - xxx_messageInfo_EventList.DiscardUnknown(m) -} - -var xxx_messageInfo_EventList proto.InternalMessageInfo - -func (m *EventSeries) Reset() { *m = EventSeries{} } -func (*EventSeries) ProtoMessage() {} -func (*EventSeries) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{59} -} -func (m *EventSeries) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventSeries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EventSeries) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventSeries.Merge(m, src) -} -func (m *EventSeries) XXX_Size() int { - return m.Size() -} -func (m *EventSeries) XXX_DiscardUnknown() { - xxx_messageInfo_EventSeries.DiscardUnknown(m) -} - -var xxx_messageInfo_EventSeries proto.InternalMessageInfo - -func (m *EventSource) Reset() { *m = EventSource{} } -func (*EventSource) ProtoMessage() {} -func (*EventSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{60} -} -func (m *EventSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EventSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventSource.Merge(m, src) -} -func (m *EventSource) XXX_Size() int { - return m.Size() -} -func (m *EventSource) XXX_DiscardUnknown() { - xxx_messageInfo_EventSource.DiscardUnknown(m) -} - -var xxx_messageInfo_EventSource proto.InternalMessageInfo - -func (m *ExecAction) Reset() { *m = ExecAction{} } -func (*ExecAction) ProtoMessage() {} -func (*ExecAction) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{61} -} -func (m *ExecAction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExecAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExecAction) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExecAction.Merge(m, src) -} -func (m *ExecAction) XXX_Size() int { - return m.Size() -} -func (m *ExecAction) XXX_DiscardUnknown() { - xxx_messageInfo_ExecAction.DiscardUnknown(m) -} - -var xxx_messageInfo_ExecAction proto.InternalMessageInfo - -func (m *FCVolumeSource) Reset() { *m = FCVolumeSource{} } -func (*FCVolumeSource) ProtoMessage() {} -func (*FCVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{62} -} -func (m *FCVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FCVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FCVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_FCVolumeSource.Merge(m, src) -} -func (m *FCVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *FCVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_FCVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_FCVolumeSource proto.InternalMessageInfo - -func (m *FileKeySelector) Reset() { *m = FileKeySelector{} } -func (*FileKeySelector) ProtoMessage() {} -func (*FileKeySelector) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{63} -} -func (m *FileKeySelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FileKeySelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FileKeySelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_FileKeySelector.Merge(m, src) -} -func (m *FileKeySelector) XXX_Size() int { - return m.Size() -} -func (m *FileKeySelector) XXX_DiscardUnknown() { - xxx_messageInfo_FileKeySelector.DiscardUnknown(m) -} - -var xxx_messageInfo_FileKeySelector proto.InternalMessageInfo - -func (m *FlexPersistentVolumeSource) Reset() { *m = FlexPersistentVolumeSource{} } -func (*FlexPersistentVolumeSource) ProtoMessage() {} -func (*FlexPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{64} -} -func (m *FlexPersistentVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlexPersistentVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlexPersistentVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlexPersistentVolumeSource.Merge(m, src) -} -func (m *FlexPersistentVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *FlexPersistentVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_FlexPersistentVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_FlexPersistentVolumeSource proto.InternalMessageInfo - -func (m *FlexVolumeSource) Reset() { *m = FlexVolumeSource{} } -func (*FlexVolumeSource) ProtoMessage() {} -func (*FlexVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{65} -} -func (m *FlexVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlexVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlexVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlexVolumeSource.Merge(m, src) -} -func (m *FlexVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *FlexVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_FlexVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_FlexVolumeSource proto.InternalMessageInfo - -func (m *FlockerVolumeSource) Reset() { *m = FlockerVolumeSource{} } -func (*FlockerVolumeSource) ProtoMessage() {} -func (*FlockerVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{66} -} -func (m *FlockerVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlockerVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlockerVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlockerVolumeSource.Merge(m, src) -} -func (m *FlockerVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *FlockerVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_FlockerVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_FlockerVolumeSource proto.InternalMessageInfo - -func (m *GCEPersistentDiskVolumeSource) Reset() { *m = GCEPersistentDiskVolumeSource{} } -func (*GCEPersistentDiskVolumeSource) ProtoMessage() {} -func (*GCEPersistentDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{67} -} -func (m *GCEPersistentDiskVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GCEPersistentDiskVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GCEPersistentDiskVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_GCEPersistentDiskVolumeSource.Merge(m, src) -} -func (m *GCEPersistentDiskVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *GCEPersistentDiskVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_GCEPersistentDiskVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_GCEPersistentDiskVolumeSource proto.InternalMessageInfo - -func (m *GRPCAction) Reset() { *m = GRPCAction{} } -func (*GRPCAction) ProtoMessage() {} -func (*GRPCAction) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{68} -} -func (m *GRPCAction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GRPCAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GRPCAction) XXX_Merge(src proto.Message) { - xxx_messageInfo_GRPCAction.Merge(m, src) -} -func (m *GRPCAction) XXX_Size() int { - return m.Size() -} -func (m *GRPCAction) XXX_DiscardUnknown() { - xxx_messageInfo_GRPCAction.DiscardUnknown(m) -} - -var xxx_messageInfo_GRPCAction proto.InternalMessageInfo - -func (m *GitRepoVolumeSource) Reset() { *m = GitRepoVolumeSource{} } -func (*GitRepoVolumeSource) ProtoMessage() {} -func (*GitRepoVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{69} -} -func (m *GitRepoVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GitRepoVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GitRepoVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_GitRepoVolumeSource.Merge(m, src) -} -func (m *GitRepoVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *GitRepoVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_GitRepoVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_GitRepoVolumeSource proto.InternalMessageInfo - -func (m *GlusterfsPersistentVolumeSource) Reset() { *m = GlusterfsPersistentVolumeSource{} } -func (*GlusterfsPersistentVolumeSource) ProtoMessage() {} -func (*GlusterfsPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{70} -} -func (m *GlusterfsPersistentVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GlusterfsPersistentVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GlusterfsPersistentVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_GlusterfsPersistentVolumeSource.Merge(m, src) -} -func (m *GlusterfsPersistentVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *GlusterfsPersistentVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_GlusterfsPersistentVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_GlusterfsPersistentVolumeSource proto.InternalMessageInfo - -func (m *GlusterfsVolumeSource) Reset() { *m = GlusterfsVolumeSource{} } -func (*GlusterfsVolumeSource) ProtoMessage() {} -func (*GlusterfsVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{71} -} -func (m *GlusterfsVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GlusterfsVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GlusterfsVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_GlusterfsVolumeSource.Merge(m, src) -} -func (m *GlusterfsVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *GlusterfsVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_GlusterfsVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_GlusterfsVolumeSource proto.InternalMessageInfo - -func (m *HTTPGetAction) Reset() { *m = HTTPGetAction{} } -func (*HTTPGetAction) ProtoMessage() {} -func (*HTTPGetAction) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{72} -} -func (m *HTTPGetAction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPGetAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HTTPGetAction) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPGetAction.Merge(m, src) -} -func (m *HTTPGetAction) XXX_Size() int { - return m.Size() -} -func (m *HTTPGetAction) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPGetAction.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPGetAction proto.InternalMessageInfo - -func (m *HTTPHeader) Reset() { *m = HTTPHeader{} } -func (*HTTPHeader) ProtoMessage() {} -func (*HTTPHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{73} -} -func (m *HTTPHeader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HTTPHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPHeader.Merge(m, src) -} -func (m *HTTPHeader) XXX_Size() int { - return m.Size() -} -func (m *HTTPHeader) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPHeader.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPHeader proto.InternalMessageInfo - -func (m *HostAlias) Reset() { *m = HostAlias{} } -func (*HostAlias) ProtoMessage() {} -func (*HostAlias) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{74} -} -func (m *HostAlias) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HostAlias) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HostAlias) XXX_Merge(src proto.Message) { - xxx_messageInfo_HostAlias.Merge(m, src) -} -func (m *HostAlias) XXX_Size() int { - return m.Size() -} -func (m *HostAlias) XXX_DiscardUnknown() { - xxx_messageInfo_HostAlias.DiscardUnknown(m) -} - -var xxx_messageInfo_HostAlias proto.InternalMessageInfo - -func (m *HostIP) Reset() { *m = HostIP{} } -func (*HostIP) ProtoMessage() {} -func (*HostIP) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{75} -} -func (m *HostIP) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HostIP) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HostIP) XXX_Merge(src proto.Message) { - xxx_messageInfo_HostIP.Merge(m, src) -} -func (m *HostIP) XXX_Size() int { - return m.Size() -} -func (m *HostIP) XXX_DiscardUnknown() { - xxx_messageInfo_HostIP.DiscardUnknown(m) -} - -var xxx_messageInfo_HostIP proto.InternalMessageInfo - -func (m *HostPathVolumeSource) Reset() { *m = HostPathVolumeSource{} } -func (*HostPathVolumeSource) ProtoMessage() {} -func (*HostPathVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{76} -} -func (m *HostPathVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HostPathVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HostPathVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_HostPathVolumeSource.Merge(m, src) -} -func (m *HostPathVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *HostPathVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_HostPathVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_HostPathVolumeSource proto.InternalMessageInfo - -func (m *ISCSIPersistentVolumeSource) Reset() { *m = ISCSIPersistentVolumeSource{} } -func (*ISCSIPersistentVolumeSource) ProtoMessage() {} -func (*ISCSIPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{77} -} -func (m *ISCSIPersistentVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ISCSIPersistentVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ISCSIPersistentVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ISCSIPersistentVolumeSource.Merge(m, src) -} -func (m *ISCSIPersistentVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *ISCSIPersistentVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_ISCSIPersistentVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ISCSIPersistentVolumeSource proto.InternalMessageInfo - -func (m *ISCSIVolumeSource) Reset() { *m = ISCSIVolumeSource{} } -func (*ISCSIVolumeSource) ProtoMessage() {} -func (*ISCSIVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{78} -} -func (m *ISCSIVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ISCSIVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ISCSIVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ISCSIVolumeSource.Merge(m, src) -} -func (m *ISCSIVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *ISCSIVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_ISCSIVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ISCSIVolumeSource proto.InternalMessageInfo - -func (m *ImageVolumeSource) Reset() { *m = ImageVolumeSource{} } -func (*ImageVolumeSource) ProtoMessage() {} -func (*ImageVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{79} -} -func (m *ImageVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImageVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ImageVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImageVolumeSource.Merge(m, src) -} -func (m *ImageVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *ImageVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_ImageVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ImageVolumeSource proto.InternalMessageInfo - -func (m *KeyToPath) Reset() { *m = KeyToPath{} } -func (*KeyToPath) ProtoMessage() {} -func (*KeyToPath) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{80} -} -func (m *KeyToPath) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *KeyToPath) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *KeyToPath) XXX_Merge(src proto.Message) { - xxx_messageInfo_KeyToPath.Merge(m, src) -} -func (m *KeyToPath) XXX_Size() int { - return m.Size() -} -func (m *KeyToPath) XXX_DiscardUnknown() { - xxx_messageInfo_KeyToPath.DiscardUnknown(m) -} - -var xxx_messageInfo_KeyToPath proto.InternalMessageInfo - -func (m *Lifecycle) Reset() { *m = Lifecycle{} } -func (*Lifecycle) ProtoMessage() {} -func (*Lifecycle) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{81} -} -func (m *Lifecycle) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Lifecycle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Lifecycle) XXX_Merge(src proto.Message) { - xxx_messageInfo_Lifecycle.Merge(m, src) -} -func (m *Lifecycle) XXX_Size() int { - return m.Size() -} -func (m *Lifecycle) XXX_DiscardUnknown() { - xxx_messageInfo_Lifecycle.DiscardUnknown(m) -} - -var xxx_messageInfo_Lifecycle proto.InternalMessageInfo - -func (m *LifecycleHandler) Reset() { *m = LifecycleHandler{} } -func (*LifecycleHandler) ProtoMessage() {} -func (*LifecycleHandler) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{82} -} -func (m *LifecycleHandler) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LifecycleHandler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LifecycleHandler) XXX_Merge(src proto.Message) { - xxx_messageInfo_LifecycleHandler.Merge(m, src) -} -func (m *LifecycleHandler) XXX_Size() int { - return m.Size() -} -func (m *LifecycleHandler) XXX_DiscardUnknown() { - xxx_messageInfo_LifecycleHandler.DiscardUnknown(m) -} - -var xxx_messageInfo_LifecycleHandler proto.InternalMessageInfo - -func (m *LimitRange) Reset() { *m = LimitRange{} } -func (*LimitRange) ProtoMessage() {} -func (*LimitRange) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{83} -} -func (m *LimitRange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LimitRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LimitRange) XXX_Merge(src proto.Message) { - xxx_messageInfo_LimitRange.Merge(m, src) -} -func (m *LimitRange) XXX_Size() int { - return m.Size() -} -func (m *LimitRange) XXX_DiscardUnknown() { - xxx_messageInfo_LimitRange.DiscardUnknown(m) -} - -var xxx_messageInfo_LimitRange proto.InternalMessageInfo - -func (m *LimitRangeItem) Reset() { *m = LimitRangeItem{} } -func (*LimitRangeItem) ProtoMessage() {} -func (*LimitRangeItem) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{84} -} -func (m *LimitRangeItem) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LimitRangeItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LimitRangeItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_LimitRangeItem.Merge(m, src) -} -func (m *LimitRangeItem) XXX_Size() int { - return m.Size() -} -func (m *LimitRangeItem) XXX_DiscardUnknown() { - xxx_messageInfo_LimitRangeItem.DiscardUnknown(m) -} - -var xxx_messageInfo_LimitRangeItem proto.InternalMessageInfo - -func (m *LimitRangeList) Reset() { *m = LimitRangeList{} } -func (*LimitRangeList) ProtoMessage() {} -func (*LimitRangeList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{85} -} -func (m *LimitRangeList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LimitRangeList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LimitRangeList) XXX_Merge(src proto.Message) { - xxx_messageInfo_LimitRangeList.Merge(m, src) -} -func (m *LimitRangeList) XXX_Size() int { - return m.Size() -} -func (m *LimitRangeList) XXX_DiscardUnknown() { - xxx_messageInfo_LimitRangeList.DiscardUnknown(m) -} - -var xxx_messageInfo_LimitRangeList proto.InternalMessageInfo - -func (m *LimitRangeSpec) Reset() { *m = LimitRangeSpec{} } -func (*LimitRangeSpec) ProtoMessage() {} -func (*LimitRangeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{86} -} -func (m *LimitRangeSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LimitRangeSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LimitRangeSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_LimitRangeSpec.Merge(m, src) -} -func (m *LimitRangeSpec) XXX_Size() int { - return m.Size() -} -func (m *LimitRangeSpec) XXX_DiscardUnknown() { - xxx_messageInfo_LimitRangeSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_LimitRangeSpec proto.InternalMessageInfo - -func (m *LinuxContainerUser) Reset() { *m = LinuxContainerUser{} } -func (*LinuxContainerUser) ProtoMessage() {} -func (*LinuxContainerUser) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{87} -} -func (m *LinuxContainerUser) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LinuxContainerUser) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LinuxContainerUser) XXX_Merge(src proto.Message) { - xxx_messageInfo_LinuxContainerUser.Merge(m, src) -} -func (m *LinuxContainerUser) XXX_Size() int { - return m.Size() -} -func (m *LinuxContainerUser) XXX_DiscardUnknown() { - xxx_messageInfo_LinuxContainerUser.DiscardUnknown(m) -} - -var xxx_messageInfo_LinuxContainerUser proto.InternalMessageInfo - -func (m *List) Reset() { *m = List{} } -func (*List) ProtoMessage() {} -func (*List) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{88} -} -func (m *List) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *List) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *List) XXX_Merge(src proto.Message) { - xxx_messageInfo_List.Merge(m, src) -} -func (m *List) XXX_Size() int { - return m.Size() -} -func (m *List) XXX_DiscardUnknown() { - xxx_messageInfo_List.DiscardUnknown(m) -} - -var xxx_messageInfo_List proto.InternalMessageInfo - -func (m *LoadBalancerIngress) Reset() { *m = LoadBalancerIngress{} } -func (*LoadBalancerIngress) ProtoMessage() {} -func (*LoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{89} -} -func (m *LoadBalancerIngress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LoadBalancerIngress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LoadBalancerIngress) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoadBalancerIngress.Merge(m, src) -} -func (m *LoadBalancerIngress) XXX_Size() int { - return m.Size() -} -func (m *LoadBalancerIngress) XXX_DiscardUnknown() { - xxx_messageInfo_LoadBalancerIngress.DiscardUnknown(m) -} - -var xxx_messageInfo_LoadBalancerIngress proto.InternalMessageInfo - -func (m *LoadBalancerStatus) Reset() { *m = LoadBalancerStatus{} } -func (*LoadBalancerStatus) ProtoMessage() {} -func (*LoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{90} -} -func (m *LoadBalancerStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LoadBalancerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LoadBalancerStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoadBalancerStatus.Merge(m, src) -} -func (m *LoadBalancerStatus) XXX_Size() int { - return m.Size() -} -func (m *LoadBalancerStatus) XXX_DiscardUnknown() { - xxx_messageInfo_LoadBalancerStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_LoadBalancerStatus proto.InternalMessageInfo - -func (m *LocalObjectReference) Reset() { *m = LocalObjectReference{} } -func (*LocalObjectReference) ProtoMessage() {} -func (*LocalObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{91} -} -func (m *LocalObjectReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LocalObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LocalObjectReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_LocalObjectReference.Merge(m, src) -} -func (m *LocalObjectReference) XXX_Size() int { - return m.Size() -} -func (m *LocalObjectReference) XXX_DiscardUnknown() { - xxx_messageInfo_LocalObjectReference.DiscardUnknown(m) -} - -var xxx_messageInfo_LocalObjectReference proto.InternalMessageInfo - -func (m *LocalVolumeSource) Reset() { *m = LocalVolumeSource{} } -func (*LocalVolumeSource) ProtoMessage() {} -func (*LocalVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{92} -} -func (m *LocalVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LocalVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LocalVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_LocalVolumeSource.Merge(m, src) -} -func (m *LocalVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *LocalVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_LocalVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_LocalVolumeSource proto.InternalMessageInfo - -func (m *ModifyVolumeStatus) Reset() { *m = ModifyVolumeStatus{} } -func (*ModifyVolumeStatus) ProtoMessage() {} -func (*ModifyVolumeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{93} -} -func (m *ModifyVolumeStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ModifyVolumeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ModifyVolumeStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyVolumeStatus.Merge(m, src) -} -func (m *ModifyVolumeStatus) XXX_Size() int { - return m.Size() -} -func (m *ModifyVolumeStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyVolumeStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyVolumeStatus proto.InternalMessageInfo - -func (m *NFSVolumeSource) Reset() { *m = NFSVolumeSource{} } -func (*NFSVolumeSource) ProtoMessage() {} -func (*NFSVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{94} -} -func (m *NFSVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NFSVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NFSVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_NFSVolumeSource.Merge(m, src) -} -func (m *NFSVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *NFSVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_NFSVolumeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_NFSVolumeSource proto.InternalMessageInfo - -func (m *Namespace) Reset() { *m = Namespace{} } -func (*Namespace) ProtoMessage() {} -func (*Namespace) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{95} -} -func (m *Namespace) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Namespace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Namespace) XXX_Merge(src proto.Message) { - xxx_messageInfo_Namespace.Merge(m, src) -} -func (m *Namespace) XXX_Size() int { - return m.Size() -} -func (m *Namespace) XXX_DiscardUnknown() { - xxx_messageInfo_Namespace.DiscardUnknown(m) -} - -var xxx_messageInfo_Namespace proto.InternalMessageInfo - -func (m *NamespaceCondition) Reset() { *m = NamespaceCondition{} } -func (*NamespaceCondition) ProtoMessage() {} -func (*NamespaceCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{96} -} -func (m *NamespaceCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NamespaceCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NamespaceCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamespaceCondition.Merge(m, src) -} -func (m *NamespaceCondition) XXX_Size() int { - return m.Size() -} -func (m *NamespaceCondition) XXX_DiscardUnknown() { - xxx_messageInfo_NamespaceCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_NamespaceCondition proto.InternalMessageInfo - -func (m *NamespaceList) Reset() { *m = NamespaceList{} } -func (*NamespaceList) ProtoMessage() {} -func (*NamespaceList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{97} -} -func (m *NamespaceList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NamespaceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NamespaceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamespaceList.Merge(m, src) -} -func (m *NamespaceList) XXX_Size() int { - return m.Size() -} -func (m *NamespaceList) XXX_DiscardUnknown() { - xxx_messageInfo_NamespaceList.DiscardUnknown(m) -} - -var xxx_messageInfo_NamespaceList proto.InternalMessageInfo - -func (m *NamespaceSpec) Reset() { *m = NamespaceSpec{} } -func (*NamespaceSpec) ProtoMessage() {} -func (*NamespaceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{98} -} -func (m *NamespaceSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NamespaceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NamespaceSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamespaceSpec.Merge(m, src) -} -func (m *NamespaceSpec) XXX_Size() int { - return m.Size() -} -func (m *NamespaceSpec) XXX_DiscardUnknown() { - xxx_messageInfo_NamespaceSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_NamespaceSpec proto.InternalMessageInfo - -func (m *NamespaceStatus) Reset() { *m = NamespaceStatus{} } -func (*NamespaceStatus) ProtoMessage() {} -func (*NamespaceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{99} -} -func (m *NamespaceStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NamespaceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NamespaceStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamespaceStatus.Merge(m, src) -} -func (m *NamespaceStatus) XXX_Size() int { - return m.Size() -} -func (m *NamespaceStatus) XXX_DiscardUnknown() { - xxx_messageInfo_NamespaceStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_NamespaceStatus proto.InternalMessageInfo - -func (m *Node) Reset() { *m = Node{} } -func (*Node) ProtoMessage() {} -func (*Node) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{100} -} -func (m *Node) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Node) XXX_Merge(src proto.Message) { - xxx_messageInfo_Node.Merge(m, src) -} -func (m *Node) XXX_Size() int { - return m.Size() -} -func (m *Node) XXX_DiscardUnknown() { - xxx_messageInfo_Node.DiscardUnknown(m) -} - -var xxx_messageInfo_Node proto.InternalMessageInfo - -func (m *NodeAddress) Reset() { *m = NodeAddress{} } -func (*NodeAddress) ProtoMessage() {} -func (*NodeAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{101} -} -func (m *NodeAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeAddress.Merge(m, src) -} -func (m *NodeAddress) XXX_Size() int { - return m.Size() -} -func (m *NodeAddress) XXX_DiscardUnknown() { - xxx_messageInfo_NodeAddress.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeAddress proto.InternalMessageInfo - -func (m *NodeAffinity) Reset() { *m = NodeAffinity{} } -func (*NodeAffinity) ProtoMessage() {} -func (*NodeAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{102} -} -func (m *NodeAffinity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeAffinity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeAffinity) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeAffinity.Merge(m, src) -} -func (m *NodeAffinity) XXX_Size() int { - return m.Size() -} -func (m *NodeAffinity) XXX_DiscardUnknown() { - xxx_messageInfo_NodeAffinity.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeAffinity proto.InternalMessageInfo - -func (m *NodeCondition) Reset() { *m = NodeCondition{} } -func (*NodeCondition) ProtoMessage() {} -func (*NodeCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{103} -} -func (m *NodeCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeCondition.Merge(m, src) -} -func (m *NodeCondition) XXX_Size() int { - return m.Size() -} -func (m *NodeCondition) XXX_DiscardUnknown() { - xxx_messageInfo_NodeCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeCondition proto.InternalMessageInfo - -func (m *NodeConfigSource) Reset() { *m = NodeConfigSource{} } -func (*NodeConfigSource) ProtoMessage() {} -func (*NodeConfigSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{104} -} -func (m *NodeConfigSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeConfigSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeConfigSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeConfigSource.Merge(m, src) -} -func (m *NodeConfigSource) XXX_Size() int { - return m.Size() -} -func (m *NodeConfigSource) XXX_DiscardUnknown() { - xxx_messageInfo_NodeConfigSource.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeConfigSource proto.InternalMessageInfo - -func (m *NodeConfigStatus) Reset() { *m = NodeConfigStatus{} } -func (*NodeConfigStatus) ProtoMessage() {} -func (*NodeConfigStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{105} -} -func (m *NodeConfigStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeConfigStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeConfigStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeConfigStatus.Merge(m, src) -} -func (m *NodeConfigStatus) XXX_Size() int { - return m.Size() -} -func (m *NodeConfigStatus) XXX_DiscardUnknown() { - xxx_messageInfo_NodeConfigStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeConfigStatus proto.InternalMessageInfo - -func (m *NodeDaemonEndpoints) Reset() { *m = NodeDaemonEndpoints{} } -func (*NodeDaemonEndpoints) ProtoMessage() {} -func (*NodeDaemonEndpoints) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{106} -} -func (m *NodeDaemonEndpoints) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeDaemonEndpoints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeDaemonEndpoints) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeDaemonEndpoints.Merge(m, src) -} -func (m *NodeDaemonEndpoints) XXX_Size() int { - return m.Size() -} -func (m *NodeDaemonEndpoints) XXX_DiscardUnknown() { - xxx_messageInfo_NodeDaemonEndpoints.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeDaemonEndpoints proto.InternalMessageInfo - -func (m *NodeFeatures) Reset() { *m = NodeFeatures{} } -func (*NodeFeatures) ProtoMessage() {} -func (*NodeFeatures) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{107} -} -func (m *NodeFeatures) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeFeatures) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeFeatures.Merge(m, src) -} -func (m *NodeFeatures) XXX_Size() int { - return m.Size() -} -func (m *NodeFeatures) XXX_DiscardUnknown() { - xxx_messageInfo_NodeFeatures.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeFeatures proto.InternalMessageInfo - -func (m *NodeList) Reset() { *m = NodeList{} } -func (*NodeList) ProtoMessage() {} -func (*NodeList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{108} -} -func (m *NodeList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeList) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeList.Merge(m, src) -} -func (m *NodeList) XXX_Size() int { - return m.Size() -} -func (m *NodeList) XXX_DiscardUnknown() { - xxx_messageInfo_NodeList.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeList proto.InternalMessageInfo - -func (m *NodeProxyOptions) Reset() { *m = NodeProxyOptions{} } -func (*NodeProxyOptions) ProtoMessage() {} -func (*NodeProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{109} -} -func (m *NodeProxyOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeProxyOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeProxyOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeProxyOptions.Merge(m, src) -} -func (m *NodeProxyOptions) XXX_Size() int { - return m.Size() -} -func (m *NodeProxyOptions) XXX_DiscardUnknown() { - xxx_messageInfo_NodeProxyOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeProxyOptions proto.InternalMessageInfo - -func (m *NodeRuntimeHandler) Reset() { *m = NodeRuntimeHandler{} } -func (*NodeRuntimeHandler) ProtoMessage() {} -func (*NodeRuntimeHandler) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{110} -} -func (m *NodeRuntimeHandler) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeRuntimeHandler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeRuntimeHandler) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeRuntimeHandler.Merge(m, src) -} -func (m *NodeRuntimeHandler) XXX_Size() int { - return m.Size() -} -func (m *NodeRuntimeHandler) XXX_DiscardUnknown() { - xxx_messageInfo_NodeRuntimeHandler.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeRuntimeHandler proto.InternalMessageInfo - -func (m *NodeRuntimeHandlerFeatures) Reset() { *m = NodeRuntimeHandlerFeatures{} } -func (*NodeRuntimeHandlerFeatures) ProtoMessage() {} -func (*NodeRuntimeHandlerFeatures) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{111} -} -func (m *NodeRuntimeHandlerFeatures) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeRuntimeHandlerFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeRuntimeHandlerFeatures) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeRuntimeHandlerFeatures.Merge(m, src) -} -func (m *NodeRuntimeHandlerFeatures) XXX_Size() int { - return m.Size() -} -func (m *NodeRuntimeHandlerFeatures) XXX_DiscardUnknown() { - xxx_messageInfo_NodeRuntimeHandlerFeatures.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeRuntimeHandlerFeatures proto.InternalMessageInfo - -func (m *NodeSelector) Reset() { *m = NodeSelector{} } -func (*NodeSelector) ProtoMessage() {} -func (*NodeSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{112} -} -func (m *NodeSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeSelector.Merge(m, src) -} -func (m *NodeSelector) XXX_Size() int { - return m.Size() -} -func (m *NodeSelector) XXX_DiscardUnknown() { - xxx_messageInfo_NodeSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeSelector proto.InternalMessageInfo - -func (m *NodeSelectorRequirement) Reset() { *m = NodeSelectorRequirement{} } -func (*NodeSelectorRequirement) ProtoMessage() {} -func (*NodeSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{113} -} -func (m *NodeSelectorRequirement) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeSelectorRequirement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeSelectorRequirement) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeSelectorRequirement.Merge(m, src) -} -func (m *NodeSelectorRequirement) XXX_Size() int { - return m.Size() -} -func (m *NodeSelectorRequirement) XXX_DiscardUnknown() { - xxx_messageInfo_NodeSelectorRequirement.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeSelectorRequirement proto.InternalMessageInfo - -func (m *NodeSelectorTerm) Reset() { *m = NodeSelectorTerm{} } -func (*NodeSelectorTerm) ProtoMessage() {} -func (*NodeSelectorTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{114} -} -func (m *NodeSelectorTerm) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeSelectorTerm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeSelectorTerm) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeSelectorTerm.Merge(m, src) -} -func (m *NodeSelectorTerm) XXX_Size() int { - return m.Size() -} -func (m *NodeSelectorTerm) XXX_DiscardUnknown() { - xxx_messageInfo_NodeSelectorTerm.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeSelectorTerm proto.InternalMessageInfo - -func (m *NodeSpec) Reset() { *m = NodeSpec{} } -func (*NodeSpec) ProtoMessage() {} -func (*NodeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{115} -} -func (m *NodeSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeSpec.Merge(m, src) -} -func (m *NodeSpec) XXX_Size() int { - return m.Size() -} -func (m *NodeSpec) XXX_DiscardUnknown() { - xxx_messageInfo_NodeSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeSpec proto.InternalMessageInfo - -func (m *NodeStatus) Reset() { *m = NodeStatus{} } -func (*NodeStatus) ProtoMessage() {} -func (*NodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{116} -} -func (m *NodeStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeStatus.Merge(m, src) -} -func (m *NodeStatus) XXX_Size() int { - return m.Size() -} -func (m *NodeStatus) XXX_DiscardUnknown() { - xxx_messageInfo_NodeStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeStatus proto.InternalMessageInfo - -func (m *NodeSwapStatus) Reset() { *m = NodeSwapStatus{} } -func (*NodeSwapStatus) ProtoMessage() {} -func (*NodeSwapStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{117} -} -func (m *NodeSwapStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeSwapStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeSwapStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeSwapStatus.Merge(m, src) -} -func (m *NodeSwapStatus) XXX_Size() int { - return m.Size() -} -func (m *NodeSwapStatus) XXX_DiscardUnknown() { - xxx_messageInfo_NodeSwapStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeSwapStatus proto.InternalMessageInfo - -func (m *NodeSystemInfo) Reset() { *m = NodeSystemInfo{} } -func (*NodeSystemInfo) ProtoMessage() {} -func (*NodeSystemInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{118} -} -func (m *NodeSystemInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeSystemInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeSystemInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeSystemInfo.Merge(m, src) -} -func (m *NodeSystemInfo) XXX_Size() int { - return m.Size() -} -func (m *NodeSystemInfo) XXX_DiscardUnknown() { - xxx_messageInfo_NodeSystemInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeSystemInfo proto.InternalMessageInfo - -func (m *ObjectFieldSelector) Reset() { *m = ObjectFieldSelector{} } -func (*ObjectFieldSelector) ProtoMessage() {} -func (*ObjectFieldSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{119} -} -func (m *ObjectFieldSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectFieldSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ObjectFieldSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectFieldSelector.Merge(m, src) -} -func (m *ObjectFieldSelector) XXX_Size() int { - return m.Size() -} -func (m *ObjectFieldSelector) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectFieldSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_ObjectFieldSelector proto.InternalMessageInfo - -func (m *ObjectReference) Reset() { *m = ObjectReference{} } -func (*ObjectReference) ProtoMessage() {} -func (*ObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{120} -} -func (m *ObjectReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ObjectReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectReference.Merge(m, src) -} -func (m *ObjectReference) XXX_Size() int { - return m.Size() -} -func (m *ObjectReference) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectReference.DiscardUnknown(m) -} - -var xxx_messageInfo_ObjectReference proto.InternalMessageInfo - -func (m *PersistentVolume) Reset() { *m = PersistentVolume{} } -func (*PersistentVolume) ProtoMessage() {} -func (*PersistentVolume) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{121} -} -func (m *PersistentVolume) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PersistentVolume) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PersistentVolume) XXX_Merge(src proto.Message) { - xxx_messageInfo_PersistentVolume.Merge(m, src) -} -func (m *PersistentVolume) XXX_Size() int { - return m.Size() -} -func (m *PersistentVolume) XXX_DiscardUnknown() { - xxx_messageInfo_PersistentVolume.DiscardUnknown(m) -} - -var xxx_messageInfo_PersistentVolume proto.InternalMessageInfo - -func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} } -func (*PersistentVolumeClaim) ProtoMessage() {} -func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{122} -} -func (m *PersistentVolumeClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PersistentVolumeClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PersistentVolumeClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_PersistentVolumeClaim.Merge(m, src) -} -func (m *PersistentVolumeClaim) XXX_Size() int { - return m.Size() -} -func (m *PersistentVolumeClaim) XXX_DiscardUnknown() { - xxx_messageInfo_PersistentVolumeClaim.DiscardUnknown(m) -} - -var xxx_messageInfo_PersistentVolumeClaim proto.InternalMessageInfo - -func (m *PersistentVolumeClaimCondition) Reset() { *m = PersistentVolumeClaimCondition{} } -func (*PersistentVolumeClaimCondition) ProtoMessage() {} -func (*PersistentVolumeClaimCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{123} -} -func (m *PersistentVolumeClaimCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PersistentVolumeClaimCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PersistentVolumeClaimCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_PersistentVolumeClaimCondition.Merge(m, src) -} -func (m *PersistentVolumeClaimCondition) XXX_Size() int { - return m.Size() -} -func (m *PersistentVolumeClaimCondition) XXX_DiscardUnknown() { - xxx_messageInfo_PersistentVolumeClaimCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_PersistentVolumeClaimCondition proto.InternalMessageInfo - -func (m *PersistentVolumeClaimList) Reset() { *m = PersistentVolumeClaimList{} } -func (*PersistentVolumeClaimList) ProtoMessage() {} -func (*PersistentVolumeClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{124} -} -func (m *PersistentVolumeClaimList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PersistentVolumeClaimList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PersistentVolumeClaimList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PersistentVolumeClaimList.Merge(m, src) -} -func (m *PersistentVolumeClaimList) XXX_Size() int { - return m.Size() -} -func (m *PersistentVolumeClaimList) XXX_DiscardUnknown() { - xxx_messageInfo_PersistentVolumeClaimList.DiscardUnknown(m) -} - -var xxx_messageInfo_PersistentVolumeClaimList proto.InternalMessageInfo +func (m *AppArmorProfile) Reset() { *m = AppArmorProfile{} } -func (m *PersistentVolumeClaimSpec) Reset() { *m = PersistentVolumeClaimSpec{} } -func (*PersistentVolumeClaimSpec) ProtoMessage() {} -func (*PersistentVolumeClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{125} -} -func (m *PersistentVolumeClaimSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PersistentVolumeClaimSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PersistentVolumeClaimSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_PersistentVolumeClaimSpec.Merge(m, src) -} -func (m *PersistentVolumeClaimSpec) XXX_Size() int { - return m.Size() -} -func (m *PersistentVolumeClaimSpec) XXX_DiscardUnknown() { - xxx_messageInfo_PersistentVolumeClaimSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_PersistentVolumeClaimSpec proto.InternalMessageInfo - -func (m *PersistentVolumeClaimStatus) Reset() { *m = PersistentVolumeClaimStatus{} } -func (*PersistentVolumeClaimStatus) ProtoMessage() {} -func (*PersistentVolumeClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{126} -} -func (m *PersistentVolumeClaimStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PersistentVolumeClaimStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PersistentVolumeClaimStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PersistentVolumeClaimStatus.Merge(m, src) -} -func (m *PersistentVolumeClaimStatus) XXX_Size() int { - return m.Size() -} -func (m *PersistentVolumeClaimStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PersistentVolumeClaimStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PersistentVolumeClaimStatus proto.InternalMessageInfo - -func (m *PersistentVolumeClaimTemplate) Reset() { *m = PersistentVolumeClaimTemplate{} } -func (*PersistentVolumeClaimTemplate) ProtoMessage() {} -func (*PersistentVolumeClaimTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{127} -} -func (m *PersistentVolumeClaimTemplate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PersistentVolumeClaimTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PersistentVolumeClaimTemplate) XXX_Merge(src proto.Message) { - xxx_messageInfo_PersistentVolumeClaimTemplate.Merge(m, src) -} -func (m *PersistentVolumeClaimTemplate) XXX_Size() int { - return m.Size() -} -func (m *PersistentVolumeClaimTemplate) XXX_DiscardUnknown() { - xxx_messageInfo_PersistentVolumeClaimTemplate.DiscardUnknown(m) -} +func (m *AttachedVolume) Reset() { *m = AttachedVolume{} } -var xxx_messageInfo_PersistentVolumeClaimTemplate proto.InternalMessageInfo +func (m *AvoidPods) Reset() { *m = AvoidPods{} } -func (m *PersistentVolumeClaimVolumeSource) Reset() { *m = PersistentVolumeClaimVolumeSource{} } -func (*PersistentVolumeClaimVolumeSource) ProtoMessage() {} -func (*PersistentVolumeClaimVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{128} -} -func (m *PersistentVolumeClaimVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PersistentVolumeClaimVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PersistentVolumeClaimVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_PersistentVolumeClaimVolumeSource.Merge(m, src) -} -func (m *PersistentVolumeClaimVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *PersistentVolumeClaimVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_PersistentVolumeClaimVolumeSource.DiscardUnknown(m) -} +func (m *AzureDiskVolumeSource) Reset() { *m = AzureDiskVolumeSource{} } -var xxx_messageInfo_PersistentVolumeClaimVolumeSource proto.InternalMessageInfo +func (m *AzureFilePersistentVolumeSource) Reset() { *m = AzureFilePersistentVolumeSource{} } -func (m *PersistentVolumeList) Reset() { *m = PersistentVolumeList{} } -func (*PersistentVolumeList) ProtoMessage() {} -func (*PersistentVolumeList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{129} -} -func (m *PersistentVolumeList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PersistentVolumeList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PersistentVolumeList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PersistentVolumeList.Merge(m, src) -} -func (m *PersistentVolumeList) XXX_Size() int { - return m.Size() -} -func (m *PersistentVolumeList) XXX_DiscardUnknown() { - xxx_messageInfo_PersistentVolumeList.DiscardUnknown(m) -} +func (m *AzureFileVolumeSource) Reset() { *m = AzureFileVolumeSource{} } -var xxx_messageInfo_PersistentVolumeList proto.InternalMessageInfo +func (m *Binding) Reset() { *m = Binding{} } -func (m *PersistentVolumeSource) Reset() { *m = PersistentVolumeSource{} } -func (*PersistentVolumeSource) ProtoMessage() {} -func (*PersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{130} -} -func (m *PersistentVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PersistentVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PersistentVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_PersistentVolumeSource.Merge(m, src) -} -func (m *PersistentVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *PersistentVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_PersistentVolumeSource.DiscardUnknown(m) -} +func (m *CSIPersistentVolumeSource) Reset() { *m = CSIPersistentVolumeSource{} } -var xxx_messageInfo_PersistentVolumeSource proto.InternalMessageInfo +func (m *CSIVolumeSource) Reset() { *m = CSIVolumeSource{} } -func (m *PersistentVolumeSpec) Reset() { *m = PersistentVolumeSpec{} } -func (*PersistentVolumeSpec) ProtoMessage() {} -func (*PersistentVolumeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{131} -} -func (m *PersistentVolumeSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PersistentVolumeSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PersistentVolumeSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_PersistentVolumeSpec.Merge(m, src) -} -func (m *PersistentVolumeSpec) XXX_Size() int { - return m.Size() -} -func (m *PersistentVolumeSpec) XXX_DiscardUnknown() { - xxx_messageInfo_PersistentVolumeSpec.DiscardUnknown(m) -} +func (m *Capabilities) Reset() { *m = Capabilities{} } -var xxx_messageInfo_PersistentVolumeSpec proto.InternalMessageInfo +func (m *CephFSPersistentVolumeSource) Reset() { *m = CephFSPersistentVolumeSource{} } -func (m *PersistentVolumeStatus) Reset() { *m = PersistentVolumeStatus{} } -func (*PersistentVolumeStatus) ProtoMessage() {} -func (*PersistentVolumeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{132} -} -func (m *PersistentVolumeStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PersistentVolumeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PersistentVolumeStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PersistentVolumeStatus.Merge(m, src) -} -func (m *PersistentVolumeStatus) XXX_Size() int { - return m.Size() -} -func (m *PersistentVolumeStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PersistentVolumeStatus.DiscardUnknown(m) -} +func (m *CephFSVolumeSource) Reset() { *m = CephFSVolumeSource{} } -var xxx_messageInfo_PersistentVolumeStatus proto.InternalMessageInfo +func (m *CinderPersistentVolumeSource) Reset() { *m = CinderPersistentVolumeSource{} } -func (m *PhotonPersistentDiskVolumeSource) Reset() { *m = PhotonPersistentDiskVolumeSource{} } -func (*PhotonPersistentDiskVolumeSource) ProtoMessage() {} -func (*PhotonPersistentDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{133} -} -func (m *PhotonPersistentDiskVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PhotonPersistentDiskVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PhotonPersistentDiskVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_PhotonPersistentDiskVolumeSource.Merge(m, src) -} -func (m *PhotonPersistentDiskVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *PhotonPersistentDiskVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_PhotonPersistentDiskVolumeSource.DiscardUnknown(m) -} +func (m *CinderVolumeSource) Reset() { *m = CinderVolumeSource{} } -var xxx_messageInfo_PhotonPersistentDiskVolumeSource proto.InternalMessageInfo +func (m *ClientIPConfig) Reset() { *m = ClientIPConfig{} } -func (m *Pod) Reset() { *m = Pod{} } -func (*Pod) ProtoMessage() {} -func (*Pod) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{134} -} -func (m *Pod) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Pod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Pod) XXX_Merge(src proto.Message) { - xxx_messageInfo_Pod.Merge(m, src) -} -func (m *Pod) XXX_Size() int { - return m.Size() -} -func (m *Pod) XXX_DiscardUnknown() { - xxx_messageInfo_Pod.DiscardUnknown(m) -} +func (m *ClusterTrustBundleProjection) Reset() { *m = ClusterTrustBundleProjection{} } -var xxx_messageInfo_Pod proto.InternalMessageInfo +func (m *ComponentCondition) Reset() { *m = ComponentCondition{} } -func (m *PodAffinity) Reset() { *m = PodAffinity{} } -func (*PodAffinity) ProtoMessage() {} -func (*PodAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{135} -} -func (m *PodAffinity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodAffinity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodAffinity) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodAffinity.Merge(m, src) -} -func (m *PodAffinity) XXX_Size() int { - return m.Size() -} -func (m *PodAffinity) XXX_DiscardUnknown() { - xxx_messageInfo_PodAffinity.DiscardUnknown(m) -} +func (m *ComponentStatus) Reset() { *m = ComponentStatus{} } -var xxx_messageInfo_PodAffinity proto.InternalMessageInfo +func (m *ComponentStatusList) Reset() { *m = ComponentStatusList{} } -func (m *PodAffinityTerm) Reset() { *m = PodAffinityTerm{} } -func (*PodAffinityTerm) ProtoMessage() {} -func (*PodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{136} -} -func (m *PodAffinityTerm) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodAffinityTerm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodAffinityTerm) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodAffinityTerm.Merge(m, src) -} -func (m *PodAffinityTerm) XXX_Size() int { - return m.Size() -} -func (m *PodAffinityTerm) XXX_DiscardUnknown() { - xxx_messageInfo_PodAffinityTerm.DiscardUnknown(m) -} +func (m *ConfigMap) Reset() { *m = ConfigMap{} } -var xxx_messageInfo_PodAffinityTerm proto.InternalMessageInfo +func (m *ConfigMapEnvSource) Reset() { *m = ConfigMapEnvSource{} } -func (m *PodAntiAffinity) Reset() { *m = PodAntiAffinity{} } -func (*PodAntiAffinity) ProtoMessage() {} -func (*PodAntiAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{137} -} -func (m *PodAntiAffinity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodAntiAffinity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodAntiAffinity) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodAntiAffinity.Merge(m, src) -} -func (m *PodAntiAffinity) XXX_Size() int { - return m.Size() -} -func (m *PodAntiAffinity) XXX_DiscardUnknown() { - xxx_messageInfo_PodAntiAffinity.DiscardUnknown(m) -} +func (m *ConfigMapKeySelector) Reset() { *m = ConfigMapKeySelector{} } -var xxx_messageInfo_PodAntiAffinity proto.InternalMessageInfo +func (m *ConfigMapList) Reset() { *m = ConfigMapList{} } -func (m *PodAttachOptions) Reset() { *m = PodAttachOptions{} } -func (*PodAttachOptions) ProtoMessage() {} -func (*PodAttachOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{138} -} -func (m *PodAttachOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodAttachOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodAttachOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodAttachOptions.Merge(m, src) -} -func (m *PodAttachOptions) XXX_Size() int { - return m.Size() -} -func (m *PodAttachOptions) XXX_DiscardUnknown() { - xxx_messageInfo_PodAttachOptions.DiscardUnknown(m) -} +func (m *ConfigMapNodeConfigSource) Reset() { *m = ConfigMapNodeConfigSource{} } -var xxx_messageInfo_PodAttachOptions proto.InternalMessageInfo +func (m *ConfigMapProjection) Reset() { *m = ConfigMapProjection{} } -func (m *PodCertificateProjection) Reset() { *m = PodCertificateProjection{} } -func (*PodCertificateProjection) ProtoMessage() {} -func (*PodCertificateProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{139} -} -func (m *PodCertificateProjection) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodCertificateProjection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodCertificateProjection) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodCertificateProjection.Merge(m, src) -} -func (m *PodCertificateProjection) XXX_Size() int { - return m.Size() -} -func (m *PodCertificateProjection) XXX_DiscardUnknown() { - xxx_messageInfo_PodCertificateProjection.DiscardUnknown(m) -} +func (m *ConfigMapVolumeSource) Reset() { *m = ConfigMapVolumeSource{} } -var xxx_messageInfo_PodCertificateProjection proto.InternalMessageInfo +func (m *Container) Reset() { *m = Container{} } -func (m *PodCondition) Reset() { *m = PodCondition{} } -func (*PodCondition) ProtoMessage() {} -func (*PodCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{140} -} -func (m *PodCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodCondition.Merge(m, src) -} -func (m *PodCondition) XXX_Size() int { - return m.Size() -} -func (m *PodCondition) XXX_DiscardUnknown() { - xxx_messageInfo_PodCondition.DiscardUnknown(m) -} +func (m *ContainerExtendedResourceRequest) Reset() { *m = ContainerExtendedResourceRequest{} } -var xxx_messageInfo_PodCondition proto.InternalMessageInfo +func (m *ContainerImage) Reset() { *m = ContainerImage{} } -func (m *PodDNSConfig) Reset() { *m = PodDNSConfig{} } -func (*PodDNSConfig) ProtoMessage() {} -func (*PodDNSConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{141} -} -func (m *PodDNSConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodDNSConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodDNSConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodDNSConfig.Merge(m, src) -} -func (m *PodDNSConfig) XXX_Size() int { - return m.Size() -} -func (m *PodDNSConfig) XXX_DiscardUnknown() { - xxx_messageInfo_PodDNSConfig.DiscardUnknown(m) -} +func (m *ContainerPort) Reset() { *m = ContainerPort{} } -var xxx_messageInfo_PodDNSConfig proto.InternalMessageInfo +func (m *ContainerResizePolicy) Reset() { *m = ContainerResizePolicy{} } -func (m *PodDNSConfigOption) Reset() { *m = PodDNSConfigOption{} } -func (*PodDNSConfigOption) ProtoMessage() {} -func (*PodDNSConfigOption) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{142} -} -func (m *PodDNSConfigOption) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodDNSConfigOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodDNSConfigOption) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodDNSConfigOption.Merge(m, src) -} -func (m *PodDNSConfigOption) XXX_Size() int { - return m.Size() -} -func (m *PodDNSConfigOption) XXX_DiscardUnknown() { - xxx_messageInfo_PodDNSConfigOption.DiscardUnknown(m) -} +func (m *ContainerRestartRule) Reset() { *m = ContainerRestartRule{} } -var xxx_messageInfo_PodDNSConfigOption proto.InternalMessageInfo +func (m *ContainerRestartRuleOnExitCodes) Reset() { *m = ContainerRestartRuleOnExitCodes{} } -func (m *PodExecOptions) Reset() { *m = PodExecOptions{} } -func (*PodExecOptions) ProtoMessage() {} -func (*PodExecOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{143} -} -func (m *PodExecOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodExecOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodExecOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodExecOptions.Merge(m, src) -} -func (m *PodExecOptions) XXX_Size() int { - return m.Size() -} -func (m *PodExecOptions) XXX_DiscardUnknown() { - xxx_messageInfo_PodExecOptions.DiscardUnknown(m) -} +func (m *ContainerState) Reset() { *m = ContainerState{} } -var xxx_messageInfo_PodExecOptions proto.InternalMessageInfo +func (m *ContainerStateRunning) Reset() { *m = ContainerStateRunning{} } -func (m *PodExtendedResourceClaimStatus) Reset() { *m = PodExtendedResourceClaimStatus{} } -func (*PodExtendedResourceClaimStatus) ProtoMessage() {} -func (*PodExtendedResourceClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{144} -} -func (m *PodExtendedResourceClaimStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodExtendedResourceClaimStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodExtendedResourceClaimStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodExtendedResourceClaimStatus.Merge(m, src) -} -func (m *PodExtendedResourceClaimStatus) XXX_Size() int { - return m.Size() -} -func (m *PodExtendedResourceClaimStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PodExtendedResourceClaimStatus.DiscardUnknown(m) -} +func (m *ContainerStateTerminated) Reset() { *m = ContainerStateTerminated{} } -var xxx_messageInfo_PodExtendedResourceClaimStatus proto.InternalMessageInfo +func (m *ContainerStateWaiting) Reset() { *m = ContainerStateWaiting{} } -func (m *PodIP) Reset() { *m = PodIP{} } -func (*PodIP) ProtoMessage() {} -func (*PodIP) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{145} -} -func (m *PodIP) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodIP) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodIP) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodIP.Merge(m, src) -} -func (m *PodIP) XXX_Size() int { - return m.Size() -} -func (m *PodIP) XXX_DiscardUnknown() { - xxx_messageInfo_PodIP.DiscardUnknown(m) -} +func (m *ContainerStatus) Reset() { *m = ContainerStatus{} } -var xxx_messageInfo_PodIP proto.InternalMessageInfo +func (m *ContainerUser) Reset() { *m = ContainerUser{} } -func (m *PodList) Reset() { *m = PodList{} } -func (*PodList) ProtoMessage() {} -func (*PodList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{146} -} -func (m *PodList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodList.Merge(m, src) -} -func (m *PodList) XXX_Size() int { - return m.Size() -} -func (m *PodList) XXX_DiscardUnknown() { - xxx_messageInfo_PodList.DiscardUnknown(m) -} +func (m *DaemonEndpoint) Reset() { *m = DaemonEndpoint{} } -var xxx_messageInfo_PodList proto.InternalMessageInfo +func (m *DownwardAPIProjection) Reset() { *m = DownwardAPIProjection{} } -func (m *PodLogOptions) Reset() { *m = PodLogOptions{} } -func (*PodLogOptions) ProtoMessage() {} -func (*PodLogOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{147} -} -func (m *PodLogOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodLogOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodLogOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodLogOptions.Merge(m, src) -} -func (m *PodLogOptions) XXX_Size() int { - return m.Size() -} -func (m *PodLogOptions) XXX_DiscardUnknown() { - xxx_messageInfo_PodLogOptions.DiscardUnknown(m) -} +func (m *DownwardAPIVolumeFile) Reset() { *m = DownwardAPIVolumeFile{} } -var xxx_messageInfo_PodLogOptions proto.InternalMessageInfo +func (m *DownwardAPIVolumeSource) Reset() { *m = DownwardAPIVolumeSource{} } -func (m *PodOS) Reset() { *m = PodOS{} } -func (*PodOS) ProtoMessage() {} -func (*PodOS) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{148} -} -func (m *PodOS) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodOS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodOS) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodOS.Merge(m, src) -} -func (m *PodOS) XXX_Size() int { - return m.Size() -} -func (m *PodOS) XXX_DiscardUnknown() { - xxx_messageInfo_PodOS.DiscardUnknown(m) -} +func (m *EmptyDirVolumeSource) Reset() { *m = EmptyDirVolumeSource{} } -var xxx_messageInfo_PodOS proto.InternalMessageInfo +func (m *EndpointAddress) Reset() { *m = EndpointAddress{} } -func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} } -func (*PodPortForwardOptions) ProtoMessage() {} -func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{149} -} -func (m *PodPortForwardOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodPortForwardOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodPortForwardOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodPortForwardOptions.Merge(m, src) -} -func (m *PodPortForwardOptions) XXX_Size() int { - return m.Size() -} -func (m *PodPortForwardOptions) XXX_DiscardUnknown() { - xxx_messageInfo_PodPortForwardOptions.DiscardUnknown(m) -} +func (m *EndpointPort) Reset() { *m = EndpointPort{} } -var xxx_messageInfo_PodPortForwardOptions proto.InternalMessageInfo +func (m *EndpointSubset) Reset() { *m = EndpointSubset{} } -func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} } -func (*PodProxyOptions) ProtoMessage() {} -func (*PodProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{150} -} -func (m *PodProxyOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodProxyOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodProxyOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodProxyOptions.Merge(m, src) -} -func (m *PodProxyOptions) XXX_Size() int { - return m.Size() -} -func (m *PodProxyOptions) XXX_DiscardUnknown() { - xxx_messageInfo_PodProxyOptions.DiscardUnknown(m) -} +func (m *Endpoints) Reset() { *m = Endpoints{} } -var xxx_messageInfo_PodProxyOptions proto.InternalMessageInfo +func (m *EndpointsList) Reset() { *m = EndpointsList{} } -func (m *PodReadinessGate) Reset() { *m = PodReadinessGate{} } -func (*PodReadinessGate) ProtoMessage() {} -func (*PodReadinessGate) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{151} -} -func (m *PodReadinessGate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodReadinessGate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodReadinessGate) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodReadinessGate.Merge(m, src) -} -func (m *PodReadinessGate) XXX_Size() int { - return m.Size() -} -func (m *PodReadinessGate) XXX_DiscardUnknown() { - xxx_messageInfo_PodReadinessGate.DiscardUnknown(m) -} +func (m *EnvFromSource) Reset() { *m = EnvFromSource{} } -var xxx_messageInfo_PodReadinessGate proto.InternalMessageInfo +func (m *EnvVar) Reset() { *m = EnvVar{} } -func (m *PodResourceClaim) Reset() { *m = PodResourceClaim{} } -func (*PodResourceClaim) ProtoMessage() {} -func (*PodResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{152} -} -func (m *PodResourceClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodResourceClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodResourceClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodResourceClaim.Merge(m, src) -} -func (m *PodResourceClaim) XXX_Size() int { - return m.Size() -} -func (m *PodResourceClaim) XXX_DiscardUnknown() { - xxx_messageInfo_PodResourceClaim.DiscardUnknown(m) -} +func (m *EnvVarSource) Reset() { *m = EnvVarSource{} } -var xxx_messageInfo_PodResourceClaim proto.InternalMessageInfo +func (m *EphemeralContainer) Reset() { *m = EphemeralContainer{} } -func (m *PodResourceClaimStatus) Reset() { *m = PodResourceClaimStatus{} } -func (*PodResourceClaimStatus) ProtoMessage() {} -func (*PodResourceClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{153} -} -func (m *PodResourceClaimStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodResourceClaimStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodResourceClaimStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodResourceClaimStatus.Merge(m, src) -} -func (m *PodResourceClaimStatus) XXX_Size() int { - return m.Size() -} -func (m *PodResourceClaimStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PodResourceClaimStatus.DiscardUnknown(m) -} +func (m *EphemeralContainerCommon) Reset() { *m = EphemeralContainerCommon{} } -var xxx_messageInfo_PodResourceClaimStatus proto.InternalMessageInfo +func (m *EphemeralVolumeSource) Reset() { *m = EphemeralVolumeSource{} } -func (m *PodSchedulingGate) Reset() { *m = PodSchedulingGate{} } -func (*PodSchedulingGate) ProtoMessage() {} -func (*PodSchedulingGate) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{154} -} -func (m *PodSchedulingGate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodSchedulingGate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodSchedulingGate) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodSchedulingGate.Merge(m, src) -} -func (m *PodSchedulingGate) XXX_Size() int { - return m.Size() -} -func (m *PodSchedulingGate) XXX_DiscardUnknown() { - xxx_messageInfo_PodSchedulingGate.DiscardUnknown(m) -} +func (m *Event) Reset() { *m = Event{} } -var xxx_messageInfo_PodSchedulingGate proto.InternalMessageInfo +func (m *EventList) Reset() { *m = EventList{} } -func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} } -func (*PodSecurityContext) ProtoMessage() {} -func (*PodSecurityContext) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{155} -} -func (m *PodSecurityContext) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodSecurityContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodSecurityContext) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodSecurityContext.Merge(m, src) -} -func (m *PodSecurityContext) XXX_Size() int { - return m.Size() -} -func (m *PodSecurityContext) XXX_DiscardUnknown() { - xxx_messageInfo_PodSecurityContext.DiscardUnknown(m) -} +func (m *EventSeries) Reset() { *m = EventSeries{} } -var xxx_messageInfo_PodSecurityContext proto.InternalMessageInfo +func (m *EventSource) Reset() { *m = EventSource{} } -func (m *PodSignature) Reset() { *m = PodSignature{} } -func (*PodSignature) ProtoMessage() {} -func (*PodSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{156} -} -func (m *PodSignature) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodSignature) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodSignature.Merge(m, src) -} -func (m *PodSignature) XXX_Size() int { - return m.Size() -} -func (m *PodSignature) XXX_DiscardUnknown() { - xxx_messageInfo_PodSignature.DiscardUnknown(m) -} +func (m *ExecAction) Reset() { *m = ExecAction{} } -var xxx_messageInfo_PodSignature proto.InternalMessageInfo +func (m *FCVolumeSource) Reset() { *m = FCVolumeSource{} } -func (m *PodSpec) Reset() { *m = PodSpec{} } -func (*PodSpec) ProtoMessage() {} -func (*PodSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{157} -} -func (m *PodSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodSpec.Merge(m, src) -} -func (m *PodSpec) XXX_Size() int { - return m.Size() -} -func (m *PodSpec) XXX_DiscardUnknown() { - xxx_messageInfo_PodSpec.DiscardUnknown(m) -} +func (m *FileKeySelector) Reset() { *m = FileKeySelector{} } -var xxx_messageInfo_PodSpec proto.InternalMessageInfo +func (m *FlexPersistentVolumeSource) Reset() { *m = FlexPersistentVolumeSource{} } -func (m *PodStatus) Reset() { *m = PodStatus{} } -func (*PodStatus) ProtoMessage() {} -func (*PodStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{158} -} -func (m *PodStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodStatus.Merge(m, src) -} -func (m *PodStatus) XXX_Size() int { - return m.Size() -} -func (m *PodStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PodStatus.DiscardUnknown(m) -} +func (m *FlexVolumeSource) Reset() { *m = FlexVolumeSource{} } -var xxx_messageInfo_PodStatus proto.InternalMessageInfo +func (m *FlockerVolumeSource) Reset() { *m = FlockerVolumeSource{} } -func (m *PodStatusResult) Reset() { *m = PodStatusResult{} } -func (*PodStatusResult) ProtoMessage() {} -func (*PodStatusResult) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{159} -} -func (m *PodStatusResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodStatusResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodStatusResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodStatusResult.Merge(m, src) -} -func (m *PodStatusResult) XXX_Size() int { - return m.Size() -} -func (m *PodStatusResult) XXX_DiscardUnknown() { - xxx_messageInfo_PodStatusResult.DiscardUnknown(m) -} +func (m *GCEPersistentDiskVolumeSource) Reset() { *m = GCEPersistentDiskVolumeSource{} } -var xxx_messageInfo_PodStatusResult proto.InternalMessageInfo +func (m *GRPCAction) Reset() { *m = GRPCAction{} } -func (m *PodTemplate) Reset() { *m = PodTemplate{} } -func (*PodTemplate) ProtoMessage() {} -func (*PodTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{160} -} -func (m *PodTemplate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodTemplate) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodTemplate.Merge(m, src) -} -func (m *PodTemplate) XXX_Size() int { - return m.Size() -} -func (m *PodTemplate) XXX_DiscardUnknown() { - xxx_messageInfo_PodTemplate.DiscardUnknown(m) -} +func (m *GitRepoVolumeSource) Reset() { *m = GitRepoVolumeSource{} } -var xxx_messageInfo_PodTemplate proto.InternalMessageInfo +func (m *GlusterfsPersistentVolumeSource) Reset() { *m = GlusterfsPersistentVolumeSource{} } -func (m *PodTemplateList) Reset() { *m = PodTemplateList{} } -func (*PodTemplateList) ProtoMessage() {} -func (*PodTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{161} -} -func (m *PodTemplateList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodTemplateList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodTemplateList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodTemplateList.Merge(m, src) -} -func (m *PodTemplateList) XXX_Size() int { - return m.Size() -} -func (m *PodTemplateList) XXX_DiscardUnknown() { - xxx_messageInfo_PodTemplateList.DiscardUnknown(m) -} +func (m *GlusterfsVolumeSource) Reset() { *m = GlusterfsVolumeSource{} } -var xxx_messageInfo_PodTemplateList proto.InternalMessageInfo +func (m *HTTPGetAction) Reset() { *m = HTTPGetAction{} } -func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} } -func (*PodTemplateSpec) ProtoMessage() {} -func (*PodTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{162} -} -func (m *PodTemplateSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodTemplateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodTemplateSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodTemplateSpec.Merge(m, src) -} -func (m *PodTemplateSpec) XXX_Size() int { - return m.Size() -} -func (m *PodTemplateSpec) XXX_DiscardUnknown() { - xxx_messageInfo_PodTemplateSpec.DiscardUnknown(m) -} +func (m *HTTPHeader) Reset() { *m = HTTPHeader{} } -var xxx_messageInfo_PodTemplateSpec proto.InternalMessageInfo +func (m *HostAlias) Reset() { *m = HostAlias{} } -func (m *PortStatus) Reset() { *m = PortStatus{} } -func (*PortStatus) ProtoMessage() {} -func (*PortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{163} -} -func (m *PortStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PortStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PortStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PortStatus.Merge(m, src) -} -func (m *PortStatus) XXX_Size() int { - return m.Size() -} -func (m *PortStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PortStatus.DiscardUnknown(m) -} +func (m *HostIP) Reset() { *m = HostIP{} } -var xxx_messageInfo_PortStatus proto.InternalMessageInfo +func (m *HostPathVolumeSource) Reset() { *m = HostPathVolumeSource{} } -func (m *PortworxVolumeSource) Reset() { *m = PortworxVolumeSource{} } -func (*PortworxVolumeSource) ProtoMessage() {} -func (*PortworxVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{164} -} -func (m *PortworxVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PortworxVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PortworxVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_PortworxVolumeSource.Merge(m, src) -} -func (m *PortworxVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *PortworxVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_PortworxVolumeSource.DiscardUnknown(m) -} +func (m *ISCSIPersistentVolumeSource) Reset() { *m = ISCSIPersistentVolumeSource{} } -var xxx_messageInfo_PortworxVolumeSource proto.InternalMessageInfo +func (m *ISCSIVolumeSource) Reset() { *m = ISCSIVolumeSource{} } -func (m *Preconditions) Reset() { *m = Preconditions{} } -func (*Preconditions) ProtoMessage() {} -func (*Preconditions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{165} -} -func (m *Preconditions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Preconditions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Preconditions) XXX_Merge(src proto.Message) { - xxx_messageInfo_Preconditions.Merge(m, src) -} -func (m *Preconditions) XXX_Size() int { - return m.Size() -} -func (m *Preconditions) XXX_DiscardUnknown() { - xxx_messageInfo_Preconditions.DiscardUnknown(m) -} +func (m *ImageVolumeSource) Reset() { *m = ImageVolumeSource{} } -var xxx_messageInfo_Preconditions proto.InternalMessageInfo +func (m *KeyToPath) Reset() { *m = KeyToPath{} } -func (m *PreferAvoidPodsEntry) Reset() { *m = PreferAvoidPodsEntry{} } -func (*PreferAvoidPodsEntry) ProtoMessage() {} -func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{166} -} -func (m *PreferAvoidPodsEntry) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PreferAvoidPodsEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PreferAvoidPodsEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_PreferAvoidPodsEntry.Merge(m, src) -} -func (m *PreferAvoidPodsEntry) XXX_Size() int { - return m.Size() -} -func (m *PreferAvoidPodsEntry) XXX_DiscardUnknown() { - xxx_messageInfo_PreferAvoidPodsEntry.DiscardUnknown(m) -} +func (m *Lifecycle) Reset() { *m = Lifecycle{} } -var xxx_messageInfo_PreferAvoidPodsEntry proto.InternalMessageInfo +func (m *LifecycleHandler) Reset() { *m = LifecycleHandler{} } -func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} } -func (*PreferredSchedulingTerm) ProtoMessage() {} -func (*PreferredSchedulingTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{167} -} -func (m *PreferredSchedulingTerm) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PreferredSchedulingTerm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PreferredSchedulingTerm) XXX_Merge(src proto.Message) { - xxx_messageInfo_PreferredSchedulingTerm.Merge(m, src) -} -func (m *PreferredSchedulingTerm) XXX_Size() int { - return m.Size() -} -func (m *PreferredSchedulingTerm) XXX_DiscardUnknown() { - xxx_messageInfo_PreferredSchedulingTerm.DiscardUnknown(m) -} +func (m *LimitRange) Reset() { *m = LimitRange{} } -var xxx_messageInfo_PreferredSchedulingTerm proto.InternalMessageInfo +func (m *LimitRangeItem) Reset() { *m = LimitRangeItem{} } -func (m *Probe) Reset() { *m = Probe{} } -func (*Probe) ProtoMessage() {} -func (*Probe) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{168} -} -func (m *Probe) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Probe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Probe) XXX_Merge(src proto.Message) { - xxx_messageInfo_Probe.Merge(m, src) -} -func (m *Probe) XXX_Size() int { - return m.Size() -} -func (m *Probe) XXX_DiscardUnknown() { - xxx_messageInfo_Probe.DiscardUnknown(m) -} +func (m *LimitRangeList) Reset() { *m = LimitRangeList{} } -var xxx_messageInfo_Probe proto.InternalMessageInfo +func (m *LimitRangeSpec) Reset() { *m = LimitRangeSpec{} } -func (m *ProbeHandler) Reset() { *m = ProbeHandler{} } -func (*ProbeHandler) ProtoMessage() {} -func (*ProbeHandler) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{169} -} -func (m *ProbeHandler) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProbeHandler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ProbeHandler) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProbeHandler.Merge(m, src) -} -func (m *ProbeHandler) XXX_Size() int { - return m.Size() -} -func (m *ProbeHandler) XXX_DiscardUnknown() { - xxx_messageInfo_ProbeHandler.DiscardUnknown(m) -} +func (m *LinuxContainerUser) Reset() { *m = LinuxContainerUser{} } -var xxx_messageInfo_ProbeHandler proto.InternalMessageInfo +func (m *List) Reset() { *m = List{} } -func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} } -func (*ProjectedVolumeSource) ProtoMessage() {} -func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{170} -} -func (m *ProjectedVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProjectedVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ProjectedVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProjectedVolumeSource.Merge(m, src) -} -func (m *ProjectedVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *ProjectedVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_ProjectedVolumeSource.DiscardUnknown(m) -} +func (m *LoadBalancerIngress) Reset() { *m = LoadBalancerIngress{} } -var xxx_messageInfo_ProjectedVolumeSource proto.InternalMessageInfo +func (m *LoadBalancerStatus) Reset() { *m = LoadBalancerStatus{} } -func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} } -func (*QuobyteVolumeSource) ProtoMessage() {} -func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{171} -} -func (m *QuobyteVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QuobyteVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *QuobyteVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuobyteVolumeSource.Merge(m, src) -} -func (m *QuobyteVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *QuobyteVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_QuobyteVolumeSource.DiscardUnknown(m) -} +func (m *LocalObjectReference) Reset() { *m = LocalObjectReference{} } -var xxx_messageInfo_QuobyteVolumeSource proto.InternalMessageInfo +func (m *LocalVolumeSource) Reset() { *m = LocalVolumeSource{} } -func (m *RBDPersistentVolumeSource) Reset() { *m = RBDPersistentVolumeSource{} } -func (*RBDPersistentVolumeSource) ProtoMessage() {} -func (*RBDPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{172} -} -func (m *RBDPersistentVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RBDPersistentVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RBDPersistentVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_RBDPersistentVolumeSource.Merge(m, src) -} -func (m *RBDPersistentVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *RBDPersistentVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_RBDPersistentVolumeSource.DiscardUnknown(m) -} +func (m *ModifyVolumeStatus) Reset() { *m = ModifyVolumeStatus{} } -var xxx_messageInfo_RBDPersistentVolumeSource proto.InternalMessageInfo +func (m *NFSVolumeSource) Reset() { *m = NFSVolumeSource{} } -func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} } -func (*RBDVolumeSource) ProtoMessage() {} -func (*RBDVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{173} -} -func (m *RBDVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RBDVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RBDVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_RBDVolumeSource.Merge(m, src) -} -func (m *RBDVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *RBDVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_RBDVolumeSource.DiscardUnknown(m) -} +func (m *Namespace) Reset() { *m = Namespace{} } -var xxx_messageInfo_RBDVolumeSource proto.InternalMessageInfo +func (m *NamespaceCondition) Reset() { *m = NamespaceCondition{} } -func (m *RangeAllocation) Reset() { *m = RangeAllocation{} } -func (*RangeAllocation) ProtoMessage() {} -func (*RangeAllocation) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{174} -} -func (m *RangeAllocation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RangeAllocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RangeAllocation) XXX_Merge(src proto.Message) { - xxx_messageInfo_RangeAllocation.Merge(m, src) -} -func (m *RangeAllocation) XXX_Size() int { - return m.Size() -} -func (m *RangeAllocation) XXX_DiscardUnknown() { - xxx_messageInfo_RangeAllocation.DiscardUnknown(m) -} +func (m *NamespaceList) Reset() { *m = NamespaceList{} } -var xxx_messageInfo_RangeAllocation proto.InternalMessageInfo +func (m *NamespaceSpec) Reset() { *m = NamespaceSpec{} } -func (m *ReplicationController) Reset() { *m = ReplicationController{} } -func (*ReplicationController) ProtoMessage() {} -func (*ReplicationController) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{175} -} -func (m *ReplicationController) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicationController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicationController) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicationController.Merge(m, src) -} -func (m *ReplicationController) XXX_Size() int { - return m.Size() -} -func (m *ReplicationController) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicationController.DiscardUnknown(m) -} +func (m *NamespaceStatus) Reset() { *m = NamespaceStatus{} } -var xxx_messageInfo_ReplicationController proto.InternalMessageInfo +func (m *Node) Reset() { *m = Node{} } -func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} } -func (*ReplicationControllerCondition) ProtoMessage() {} -func (*ReplicationControllerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{176} -} -func (m *ReplicationControllerCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicationControllerCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicationControllerCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicationControllerCondition.Merge(m, src) -} -func (m *ReplicationControllerCondition) XXX_Size() int { - return m.Size() -} -func (m *ReplicationControllerCondition) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicationControllerCondition.DiscardUnknown(m) -} +func (m *NodeAddress) Reset() { *m = NodeAddress{} } -var xxx_messageInfo_ReplicationControllerCondition proto.InternalMessageInfo +func (m *NodeAffinity) Reset() { *m = NodeAffinity{} } -func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} } -func (*ReplicationControllerList) ProtoMessage() {} -func (*ReplicationControllerList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{177} -} -func (m *ReplicationControllerList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicationControllerList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicationControllerList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicationControllerList.Merge(m, src) -} -func (m *ReplicationControllerList) XXX_Size() int { - return m.Size() -} -func (m *ReplicationControllerList) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicationControllerList.DiscardUnknown(m) -} +func (m *NodeCondition) Reset() { *m = NodeCondition{} } -var xxx_messageInfo_ReplicationControllerList proto.InternalMessageInfo +func (m *NodeConfigSource) Reset() { *m = NodeConfigSource{} } -func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} } -func (*ReplicationControllerSpec) ProtoMessage() {} -func (*ReplicationControllerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{178} -} -func (m *ReplicationControllerSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicationControllerSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicationControllerSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicationControllerSpec.Merge(m, src) -} -func (m *ReplicationControllerSpec) XXX_Size() int { - return m.Size() -} -func (m *ReplicationControllerSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicationControllerSpec.DiscardUnknown(m) -} +func (m *NodeConfigStatus) Reset() { *m = NodeConfigStatus{} } -var xxx_messageInfo_ReplicationControllerSpec proto.InternalMessageInfo +func (m *NodeDaemonEndpoints) Reset() { *m = NodeDaemonEndpoints{} } -func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} } -func (*ReplicationControllerStatus) ProtoMessage() {} -func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{179} -} -func (m *ReplicationControllerStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicationControllerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicationControllerStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicationControllerStatus.Merge(m, src) -} -func (m *ReplicationControllerStatus) XXX_Size() int { - return m.Size() -} -func (m *ReplicationControllerStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicationControllerStatus.DiscardUnknown(m) -} +func (m *NodeFeatures) Reset() { *m = NodeFeatures{} } -var xxx_messageInfo_ReplicationControllerStatus proto.InternalMessageInfo +func (m *NodeList) Reset() { *m = NodeList{} } -func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } -func (*ResourceClaim) ProtoMessage() {} -func (*ResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{180} -} -func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaim.Merge(m, src) -} -func (m *ResourceClaim) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaim) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaim.DiscardUnknown(m) -} +func (m *NodeProxyOptions) Reset() { *m = NodeProxyOptions{} } + +func (m *NodeRuntimeHandler) Reset() { *m = NodeRuntimeHandler{} } + +func (m *NodeRuntimeHandlerFeatures) Reset() { *m = NodeRuntimeHandlerFeatures{} } + +func (m *NodeSelector) Reset() { *m = NodeSelector{} } + +func (m *NodeSelectorRequirement) Reset() { *m = NodeSelectorRequirement{} } -var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo +func (m *NodeSelectorTerm) Reset() { *m = NodeSelectorTerm{} } -func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } -func (*ResourceFieldSelector) ProtoMessage() {} -func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{181} -} -func (m *ResourceFieldSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceFieldSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceFieldSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceFieldSelector.Merge(m, src) -} -func (m *ResourceFieldSelector) XXX_Size() int { - return m.Size() -} -func (m *ResourceFieldSelector) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceFieldSelector.DiscardUnknown(m) -} +func (m *NodeSpec) Reset() { *m = NodeSpec{} } -var xxx_messageInfo_ResourceFieldSelector proto.InternalMessageInfo +func (m *NodeStatus) Reset() { *m = NodeStatus{} } -func (m *ResourceHealth) Reset() { *m = ResourceHealth{} } -func (*ResourceHealth) ProtoMessage() {} -func (*ResourceHealth) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{182} -} -func (m *ResourceHealth) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceHealth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceHealth) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceHealth.Merge(m, src) -} -func (m *ResourceHealth) XXX_Size() int { - return m.Size() -} -func (m *ResourceHealth) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceHealth.DiscardUnknown(m) -} +func (m *NodeSwapStatus) Reset() { *m = NodeSwapStatus{} } -var xxx_messageInfo_ResourceHealth proto.InternalMessageInfo +func (m *NodeSystemInfo) Reset() { *m = NodeSystemInfo{} } -func (m *ResourceQuota) Reset() { *m = ResourceQuota{} } -func (*ResourceQuota) ProtoMessage() {} -func (*ResourceQuota) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{183} -} -func (m *ResourceQuota) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceQuota) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceQuota) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceQuota.Merge(m, src) -} -func (m *ResourceQuota) XXX_Size() int { - return m.Size() -} -func (m *ResourceQuota) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceQuota.DiscardUnknown(m) -} +func (m *ObjectFieldSelector) Reset() { *m = ObjectFieldSelector{} } -var xxx_messageInfo_ResourceQuota proto.InternalMessageInfo +func (m *ObjectReference) Reset() { *m = ObjectReference{} } -func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} } -func (*ResourceQuotaList) ProtoMessage() {} -func (*ResourceQuotaList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{184} -} -func (m *ResourceQuotaList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceQuotaList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceQuotaList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceQuotaList.Merge(m, src) -} -func (m *ResourceQuotaList) XXX_Size() int { - return m.Size() -} -func (m *ResourceQuotaList) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceQuotaList.DiscardUnknown(m) -} +func (m *PersistentVolume) Reset() { *m = PersistentVolume{} } -var xxx_messageInfo_ResourceQuotaList proto.InternalMessageInfo +func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} } -func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} } -func (*ResourceQuotaSpec) ProtoMessage() {} -func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{185} -} -func (m *ResourceQuotaSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceQuotaSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceQuotaSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceQuotaSpec.Merge(m, src) -} -func (m *ResourceQuotaSpec) XXX_Size() int { - return m.Size() -} -func (m *ResourceQuotaSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceQuotaSpec.DiscardUnknown(m) -} +func (m *PersistentVolumeClaimCondition) Reset() { *m = PersistentVolumeClaimCondition{} } -var xxx_messageInfo_ResourceQuotaSpec proto.InternalMessageInfo +func (m *PersistentVolumeClaimList) Reset() { *m = PersistentVolumeClaimList{} } -func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} } -func (*ResourceQuotaStatus) ProtoMessage() {} -func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{186} -} -func (m *ResourceQuotaStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceQuotaStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceQuotaStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceQuotaStatus.Merge(m, src) -} -func (m *ResourceQuotaStatus) XXX_Size() int { - return m.Size() -} -func (m *ResourceQuotaStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceQuotaStatus.DiscardUnknown(m) -} +func (m *PersistentVolumeClaimSpec) Reset() { *m = PersistentVolumeClaimSpec{} } -var xxx_messageInfo_ResourceQuotaStatus proto.InternalMessageInfo +func (m *PersistentVolumeClaimStatus) Reset() { *m = PersistentVolumeClaimStatus{} } -func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} } -func (*ResourceRequirements) ProtoMessage() {} -func (*ResourceRequirements) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{187} -} -func (m *ResourceRequirements) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceRequirements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceRequirements) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceRequirements.Merge(m, src) -} -func (m *ResourceRequirements) XXX_Size() int { - return m.Size() -} -func (m *ResourceRequirements) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceRequirements.DiscardUnknown(m) -} +func (m *PersistentVolumeClaimTemplate) Reset() { *m = PersistentVolumeClaimTemplate{} } -var xxx_messageInfo_ResourceRequirements proto.InternalMessageInfo +func (m *PersistentVolumeClaimVolumeSource) Reset() { *m = PersistentVolumeClaimVolumeSource{} } -func (m *ResourceStatus) Reset() { *m = ResourceStatus{} } -func (*ResourceStatus) ProtoMessage() {} -func (*ResourceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{188} -} -func (m *ResourceStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceStatus.Merge(m, src) -} -func (m *ResourceStatus) XXX_Size() int { - return m.Size() -} -func (m *ResourceStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceStatus.DiscardUnknown(m) -} +func (m *PersistentVolumeList) Reset() { *m = PersistentVolumeList{} } -var xxx_messageInfo_ResourceStatus proto.InternalMessageInfo +func (m *PersistentVolumeSource) Reset() { *m = PersistentVolumeSource{} } -func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} } -func (*SELinuxOptions) ProtoMessage() {} -func (*SELinuxOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{189} -} -func (m *SELinuxOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SELinuxOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SELinuxOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_SELinuxOptions.Merge(m, src) -} -func (m *SELinuxOptions) XXX_Size() int { - return m.Size() -} -func (m *SELinuxOptions) XXX_DiscardUnknown() { - xxx_messageInfo_SELinuxOptions.DiscardUnknown(m) -} +func (m *PersistentVolumeSpec) Reset() { *m = PersistentVolumeSpec{} } -var xxx_messageInfo_SELinuxOptions proto.InternalMessageInfo +func (m *PersistentVolumeStatus) Reset() { *m = PersistentVolumeStatus{} } -func (m *ScaleIOPersistentVolumeSource) Reset() { *m = ScaleIOPersistentVolumeSource{} } -func (*ScaleIOPersistentVolumeSource) ProtoMessage() {} -func (*ScaleIOPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{190} -} -func (m *ScaleIOPersistentVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScaleIOPersistentVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ScaleIOPersistentVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScaleIOPersistentVolumeSource.Merge(m, src) -} -func (m *ScaleIOPersistentVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *ScaleIOPersistentVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_ScaleIOPersistentVolumeSource.DiscardUnknown(m) -} +func (m *PhotonPersistentDiskVolumeSource) Reset() { *m = PhotonPersistentDiskVolumeSource{} } -var xxx_messageInfo_ScaleIOPersistentVolumeSource proto.InternalMessageInfo +func (m *Pod) Reset() { *m = Pod{} } -func (m *ScaleIOVolumeSource) Reset() { *m = ScaleIOVolumeSource{} } -func (*ScaleIOVolumeSource) ProtoMessage() {} -func (*ScaleIOVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{191} -} -func (m *ScaleIOVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScaleIOVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ScaleIOVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScaleIOVolumeSource.Merge(m, src) -} -func (m *ScaleIOVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *ScaleIOVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_ScaleIOVolumeSource.DiscardUnknown(m) -} +func (m *PodAffinity) Reset() { *m = PodAffinity{} } -var xxx_messageInfo_ScaleIOVolumeSource proto.InternalMessageInfo +func (m *PodAffinityTerm) Reset() { *m = PodAffinityTerm{} } -func (m *ScopeSelector) Reset() { *m = ScopeSelector{} } -func (*ScopeSelector) ProtoMessage() {} -func (*ScopeSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{192} -} -func (m *ScopeSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScopeSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ScopeSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScopeSelector.Merge(m, src) -} -func (m *ScopeSelector) XXX_Size() int { - return m.Size() -} -func (m *ScopeSelector) XXX_DiscardUnknown() { - xxx_messageInfo_ScopeSelector.DiscardUnknown(m) -} +func (m *PodAntiAffinity) Reset() { *m = PodAntiAffinity{} } -var xxx_messageInfo_ScopeSelector proto.InternalMessageInfo +func (m *PodAttachOptions) Reset() { *m = PodAttachOptions{} } -func (m *ScopedResourceSelectorRequirement) Reset() { *m = ScopedResourceSelectorRequirement{} } -func (*ScopedResourceSelectorRequirement) ProtoMessage() {} -func (*ScopedResourceSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{193} -} -func (m *ScopedResourceSelectorRequirement) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScopedResourceSelectorRequirement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ScopedResourceSelectorRequirement) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScopedResourceSelectorRequirement.Merge(m, src) -} -func (m *ScopedResourceSelectorRequirement) XXX_Size() int { - return m.Size() -} -func (m *ScopedResourceSelectorRequirement) XXX_DiscardUnknown() { - xxx_messageInfo_ScopedResourceSelectorRequirement.DiscardUnknown(m) -} +func (m *PodCertificateProjection) Reset() { *m = PodCertificateProjection{} } -var xxx_messageInfo_ScopedResourceSelectorRequirement proto.InternalMessageInfo +func (m *PodCondition) Reset() { *m = PodCondition{} } -func (m *SeccompProfile) Reset() { *m = SeccompProfile{} } -func (*SeccompProfile) ProtoMessage() {} -func (*SeccompProfile) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{194} -} -func (m *SeccompProfile) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SeccompProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SeccompProfile) XXX_Merge(src proto.Message) { - xxx_messageInfo_SeccompProfile.Merge(m, src) -} -func (m *SeccompProfile) XXX_Size() int { - return m.Size() -} -func (m *SeccompProfile) XXX_DiscardUnknown() { - xxx_messageInfo_SeccompProfile.DiscardUnknown(m) -} +func (m *PodDNSConfig) Reset() { *m = PodDNSConfig{} } -var xxx_messageInfo_SeccompProfile proto.InternalMessageInfo +func (m *PodDNSConfigOption) Reset() { *m = PodDNSConfigOption{} } -func (m *Secret) Reset() { *m = Secret{} } -func (*Secret) ProtoMessage() {} -func (*Secret) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{195} -} -func (m *Secret) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Secret) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Secret) XXX_Merge(src proto.Message) { - xxx_messageInfo_Secret.Merge(m, src) -} -func (m *Secret) XXX_Size() int { - return m.Size() -} -func (m *Secret) XXX_DiscardUnknown() { - xxx_messageInfo_Secret.DiscardUnknown(m) -} +func (m *PodExecOptions) Reset() { *m = PodExecOptions{} } -var xxx_messageInfo_Secret proto.InternalMessageInfo +func (m *PodExtendedResourceClaimStatus) Reset() { *m = PodExtendedResourceClaimStatus{} } -func (m *SecretEnvSource) Reset() { *m = SecretEnvSource{} } -func (*SecretEnvSource) ProtoMessage() {} -func (*SecretEnvSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{196} -} -func (m *SecretEnvSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SecretEnvSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SecretEnvSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_SecretEnvSource.Merge(m, src) -} -func (m *SecretEnvSource) XXX_Size() int { - return m.Size() -} -func (m *SecretEnvSource) XXX_DiscardUnknown() { - xxx_messageInfo_SecretEnvSource.DiscardUnknown(m) -} +func (m *PodIP) Reset() { *m = PodIP{} } -var xxx_messageInfo_SecretEnvSource proto.InternalMessageInfo +func (m *PodList) Reset() { *m = PodList{} } -func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} } -func (*SecretKeySelector) ProtoMessage() {} -func (*SecretKeySelector) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{197} -} -func (m *SecretKeySelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SecretKeySelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SecretKeySelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_SecretKeySelector.Merge(m, src) -} -func (m *SecretKeySelector) XXX_Size() int { - return m.Size() -} -func (m *SecretKeySelector) XXX_DiscardUnknown() { - xxx_messageInfo_SecretKeySelector.DiscardUnknown(m) -} +func (m *PodLogOptions) Reset() { *m = PodLogOptions{} } -var xxx_messageInfo_SecretKeySelector proto.InternalMessageInfo +func (m *PodOS) Reset() { *m = PodOS{} } -func (m *SecretList) Reset() { *m = SecretList{} } -func (*SecretList) ProtoMessage() {} -func (*SecretList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{198} -} -func (m *SecretList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SecretList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SecretList) XXX_Merge(src proto.Message) { - xxx_messageInfo_SecretList.Merge(m, src) -} -func (m *SecretList) XXX_Size() int { - return m.Size() -} -func (m *SecretList) XXX_DiscardUnknown() { - xxx_messageInfo_SecretList.DiscardUnknown(m) -} +func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} } -var xxx_messageInfo_SecretList proto.InternalMessageInfo +func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} } -func (m *SecretProjection) Reset() { *m = SecretProjection{} } -func (*SecretProjection) ProtoMessage() {} -func (*SecretProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{199} -} -func (m *SecretProjection) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SecretProjection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SecretProjection) XXX_Merge(src proto.Message) { - xxx_messageInfo_SecretProjection.Merge(m, src) -} -func (m *SecretProjection) XXX_Size() int { - return m.Size() -} -func (m *SecretProjection) XXX_DiscardUnknown() { - xxx_messageInfo_SecretProjection.DiscardUnknown(m) -} +func (m *PodReadinessGate) Reset() { *m = PodReadinessGate{} } -var xxx_messageInfo_SecretProjection proto.InternalMessageInfo +func (m *PodResourceClaim) Reset() { *m = PodResourceClaim{} } -func (m *SecretReference) Reset() { *m = SecretReference{} } -func (*SecretReference) ProtoMessage() {} -func (*SecretReference) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{200} -} -func (m *SecretReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SecretReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SecretReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_SecretReference.Merge(m, src) -} -func (m *SecretReference) XXX_Size() int { - return m.Size() -} -func (m *SecretReference) XXX_DiscardUnknown() { - xxx_messageInfo_SecretReference.DiscardUnknown(m) -} +func (m *PodResourceClaimStatus) Reset() { *m = PodResourceClaimStatus{} } -var xxx_messageInfo_SecretReference proto.InternalMessageInfo +func (m *PodSchedulingGate) Reset() { *m = PodSchedulingGate{} } -func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} } -func (*SecretVolumeSource) ProtoMessage() {} -func (*SecretVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{201} -} -func (m *SecretVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SecretVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SecretVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_SecretVolumeSource.Merge(m, src) -} -func (m *SecretVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *SecretVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_SecretVolumeSource.DiscardUnknown(m) -} +func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} } -var xxx_messageInfo_SecretVolumeSource proto.InternalMessageInfo +func (m *PodSignature) Reset() { *m = PodSignature{} } -func (m *SecurityContext) Reset() { *m = SecurityContext{} } -func (*SecurityContext) ProtoMessage() {} -func (*SecurityContext) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{202} -} -func (m *SecurityContext) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SecurityContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SecurityContext) XXX_Merge(src proto.Message) { - xxx_messageInfo_SecurityContext.Merge(m, src) -} -func (m *SecurityContext) XXX_Size() int { - return m.Size() -} -func (m *SecurityContext) XXX_DiscardUnknown() { - xxx_messageInfo_SecurityContext.DiscardUnknown(m) -} +func (m *PodSpec) Reset() { *m = PodSpec{} } -var xxx_messageInfo_SecurityContext proto.InternalMessageInfo +func (m *PodStatus) Reset() { *m = PodStatus{} } -func (m *SerializedReference) Reset() { *m = SerializedReference{} } -func (*SerializedReference) ProtoMessage() {} -func (*SerializedReference) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{203} -} -func (m *SerializedReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SerializedReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SerializedReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_SerializedReference.Merge(m, src) -} -func (m *SerializedReference) XXX_Size() int { - return m.Size() -} -func (m *SerializedReference) XXX_DiscardUnknown() { - xxx_messageInfo_SerializedReference.DiscardUnknown(m) -} +func (m *PodStatusResult) Reset() { *m = PodStatusResult{} } -var xxx_messageInfo_SerializedReference proto.InternalMessageInfo +func (m *PodTemplate) Reset() { *m = PodTemplate{} } -func (m *Service) Reset() { *m = Service{} } -func (*Service) ProtoMessage() {} -func (*Service) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{204} -} -func (m *Service) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Service) XXX_Merge(src proto.Message) { - xxx_messageInfo_Service.Merge(m, src) -} -func (m *Service) XXX_Size() int { - return m.Size() -} -func (m *Service) XXX_DiscardUnknown() { - xxx_messageInfo_Service.DiscardUnknown(m) -} +func (m *PodTemplateList) Reset() { *m = PodTemplateList{} } -var xxx_messageInfo_Service proto.InternalMessageInfo +func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} } -func (m *ServiceAccount) Reset() { *m = ServiceAccount{} } -func (*ServiceAccount) ProtoMessage() {} -func (*ServiceAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{205} -} -func (m *ServiceAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceAccount.Merge(m, src) -} -func (m *ServiceAccount) XXX_Size() int { - return m.Size() -} -func (m *ServiceAccount) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceAccount.DiscardUnknown(m) -} +func (m *PortStatus) Reset() { *m = PortStatus{} } -var xxx_messageInfo_ServiceAccount proto.InternalMessageInfo +func (m *PortworxVolumeSource) Reset() { *m = PortworxVolumeSource{} } -func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} } -func (*ServiceAccountList) ProtoMessage() {} -func (*ServiceAccountList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{206} -} -func (m *ServiceAccountList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceAccountList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceAccountList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceAccountList.Merge(m, src) -} -func (m *ServiceAccountList) XXX_Size() int { - return m.Size() -} -func (m *ServiceAccountList) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceAccountList.DiscardUnknown(m) -} +func (m *Preconditions) Reset() { *m = Preconditions{} } -var xxx_messageInfo_ServiceAccountList proto.InternalMessageInfo +func (m *PreferAvoidPodsEntry) Reset() { *m = PreferAvoidPodsEntry{} } -func (m *ServiceAccountTokenProjection) Reset() { *m = ServiceAccountTokenProjection{} } -func (*ServiceAccountTokenProjection) ProtoMessage() {} -func (*ServiceAccountTokenProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{207} -} -func (m *ServiceAccountTokenProjection) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceAccountTokenProjection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceAccountTokenProjection) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceAccountTokenProjection.Merge(m, src) -} -func (m *ServiceAccountTokenProjection) XXX_Size() int { - return m.Size() -} -func (m *ServiceAccountTokenProjection) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceAccountTokenProjection.DiscardUnknown(m) -} +func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} } -var xxx_messageInfo_ServiceAccountTokenProjection proto.InternalMessageInfo +func (m *Probe) Reset() { *m = Probe{} } -func (m *ServiceList) Reset() { *m = ServiceList{} } -func (*ServiceList) ProtoMessage() {} -func (*ServiceList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{208} -} -func (m *ServiceList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceList.Merge(m, src) -} -func (m *ServiceList) XXX_Size() int { - return m.Size() -} -func (m *ServiceList) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceList.DiscardUnknown(m) -} +func (m *ProbeHandler) Reset() { *m = ProbeHandler{} } + +func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} } + +func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} } + +func (m *RBDPersistentVolumeSource) Reset() { *m = RBDPersistentVolumeSource{} } + +func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} } -var xxx_messageInfo_ServiceList proto.InternalMessageInfo +func (m *RangeAllocation) Reset() { *m = RangeAllocation{} } -func (m *ServicePort) Reset() { *m = ServicePort{} } -func (*ServicePort) ProtoMessage() {} -func (*ServicePort) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{209} -} -func (m *ServicePort) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServicePort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServicePort) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServicePort.Merge(m, src) -} -func (m *ServicePort) XXX_Size() int { - return m.Size() -} -func (m *ServicePort) XXX_DiscardUnknown() { - xxx_messageInfo_ServicePort.DiscardUnknown(m) -} +func (m *ReplicationController) Reset() { *m = ReplicationController{} } -var xxx_messageInfo_ServicePort proto.InternalMessageInfo +func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} } -func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} } -func (*ServiceProxyOptions) ProtoMessage() {} -func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{210} -} -func (m *ServiceProxyOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceProxyOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceProxyOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceProxyOptions.Merge(m, src) -} -func (m *ServiceProxyOptions) XXX_Size() int { - return m.Size() -} -func (m *ServiceProxyOptions) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceProxyOptions.DiscardUnknown(m) -} +func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} } -var xxx_messageInfo_ServiceProxyOptions proto.InternalMessageInfo +func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} } -func (m *ServiceSpec) Reset() { *m = ServiceSpec{} } -func (*ServiceSpec) ProtoMessage() {} -func (*ServiceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{211} -} -func (m *ServiceSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceSpec.Merge(m, src) -} -func (m *ServiceSpec) XXX_Size() int { - return m.Size() -} -func (m *ServiceSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceSpec.DiscardUnknown(m) -} +func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} } -var xxx_messageInfo_ServiceSpec proto.InternalMessageInfo +func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } -func (m *ServiceStatus) Reset() { *m = ServiceStatus{} } -func (*ServiceStatus) ProtoMessage() {} -func (*ServiceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{212} -} -func (m *ServiceStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceStatus.Merge(m, src) -} -func (m *ServiceStatus) XXX_Size() int { - return m.Size() -} -func (m *ServiceStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceStatus.DiscardUnknown(m) -} +func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } -var xxx_messageInfo_ServiceStatus proto.InternalMessageInfo +func (m *ResourceHealth) Reset() { *m = ResourceHealth{} } -func (m *SessionAffinityConfig) Reset() { *m = SessionAffinityConfig{} } -func (*SessionAffinityConfig) ProtoMessage() {} -func (*SessionAffinityConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{213} -} -func (m *SessionAffinityConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SessionAffinityConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SessionAffinityConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_SessionAffinityConfig.Merge(m, src) -} -func (m *SessionAffinityConfig) XXX_Size() int { - return m.Size() -} -func (m *SessionAffinityConfig) XXX_DiscardUnknown() { - xxx_messageInfo_SessionAffinityConfig.DiscardUnknown(m) -} +func (m *ResourceQuota) Reset() { *m = ResourceQuota{} } -var xxx_messageInfo_SessionAffinityConfig proto.InternalMessageInfo +func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} } -func (m *SleepAction) Reset() { *m = SleepAction{} } -func (*SleepAction) ProtoMessage() {} -func (*SleepAction) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{214} -} -func (m *SleepAction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SleepAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SleepAction) XXX_Merge(src proto.Message) { - xxx_messageInfo_SleepAction.Merge(m, src) -} -func (m *SleepAction) XXX_Size() int { - return m.Size() -} -func (m *SleepAction) XXX_DiscardUnknown() { - xxx_messageInfo_SleepAction.DiscardUnknown(m) -} +func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} } -var xxx_messageInfo_SleepAction proto.InternalMessageInfo +func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} } -func (m *StorageOSPersistentVolumeSource) Reset() { *m = StorageOSPersistentVolumeSource{} } -func (*StorageOSPersistentVolumeSource) ProtoMessage() {} -func (*StorageOSPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{215} -} -func (m *StorageOSPersistentVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageOSPersistentVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StorageOSPersistentVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageOSPersistentVolumeSource.Merge(m, src) -} -func (m *StorageOSPersistentVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *StorageOSPersistentVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_StorageOSPersistentVolumeSource.DiscardUnknown(m) -} +func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} } -var xxx_messageInfo_StorageOSPersistentVolumeSource proto.InternalMessageInfo +func (m *ResourceStatus) Reset() { *m = ResourceStatus{} } -func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} } -func (*StorageOSVolumeSource) ProtoMessage() {} -func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{216} -} -func (m *StorageOSVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageOSVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StorageOSVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageOSVolumeSource.Merge(m, src) -} -func (m *StorageOSVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *StorageOSVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_StorageOSVolumeSource.DiscardUnknown(m) -} +func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} } -var xxx_messageInfo_StorageOSVolumeSource proto.InternalMessageInfo +func (m *ScaleIOPersistentVolumeSource) Reset() { *m = ScaleIOPersistentVolumeSource{} } -func (m *Sysctl) Reset() { *m = Sysctl{} } -func (*Sysctl) ProtoMessage() {} -func (*Sysctl) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{217} -} -func (m *Sysctl) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Sysctl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Sysctl) XXX_Merge(src proto.Message) { - xxx_messageInfo_Sysctl.Merge(m, src) -} -func (m *Sysctl) XXX_Size() int { - return m.Size() -} -func (m *Sysctl) XXX_DiscardUnknown() { - xxx_messageInfo_Sysctl.DiscardUnknown(m) -} +func (m *ScaleIOVolumeSource) Reset() { *m = ScaleIOVolumeSource{} } -var xxx_messageInfo_Sysctl proto.InternalMessageInfo +func (m *ScopeSelector) Reset() { *m = ScopeSelector{} } -func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} } -func (*TCPSocketAction) ProtoMessage() {} -func (*TCPSocketAction) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{218} -} -func (m *TCPSocketAction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TCPSocketAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TCPSocketAction) XXX_Merge(src proto.Message) { - xxx_messageInfo_TCPSocketAction.Merge(m, src) -} -func (m *TCPSocketAction) XXX_Size() int { - return m.Size() -} -func (m *TCPSocketAction) XXX_DiscardUnknown() { - xxx_messageInfo_TCPSocketAction.DiscardUnknown(m) -} +func (m *ScopedResourceSelectorRequirement) Reset() { *m = ScopedResourceSelectorRequirement{} } -var xxx_messageInfo_TCPSocketAction proto.InternalMessageInfo +func (m *SeccompProfile) Reset() { *m = SeccompProfile{} } -func (m *Taint) Reset() { *m = Taint{} } -func (*Taint) ProtoMessage() {} -func (*Taint) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{219} -} -func (m *Taint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Taint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Taint) XXX_Merge(src proto.Message) { - xxx_messageInfo_Taint.Merge(m, src) -} -func (m *Taint) XXX_Size() int { - return m.Size() -} -func (m *Taint) XXX_DiscardUnknown() { - xxx_messageInfo_Taint.DiscardUnknown(m) -} +func (m *Secret) Reset() { *m = Secret{} } -var xxx_messageInfo_Taint proto.InternalMessageInfo +func (m *SecretEnvSource) Reset() { *m = SecretEnvSource{} } -func (m *Toleration) Reset() { *m = Toleration{} } -func (*Toleration) ProtoMessage() {} -func (*Toleration) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{220} -} -func (m *Toleration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Toleration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Toleration) XXX_Merge(src proto.Message) { - xxx_messageInfo_Toleration.Merge(m, src) -} -func (m *Toleration) XXX_Size() int { - return m.Size() -} -func (m *Toleration) XXX_DiscardUnknown() { - xxx_messageInfo_Toleration.DiscardUnknown(m) -} +func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} } -var xxx_messageInfo_Toleration proto.InternalMessageInfo +func (m *SecretList) Reset() { *m = SecretList{} } -func (m *TopologySelectorLabelRequirement) Reset() { *m = TopologySelectorLabelRequirement{} } -func (*TopologySelectorLabelRequirement) ProtoMessage() {} -func (*TopologySelectorLabelRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{221} -} -func (m *TopologySelectorLabelRequirement) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TopologySelectorLabelRequirement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TopologySelectorLabelRequirement) XXX_Merge(src proto.Message) { - xxx_messageInfo_TopologySelectorLabelRequirement.Merge(m, src) -} -func (m *TopologySelectorLabelRequirement) XXX_Size() int { - return m.Size() -} -func (m *TopologySelectorLabelRequirement) XXX_DiscardUnknown() { - xxx_messageInfo_TopologySelectorLabelRequirement.DiscardUnknown(m) -} +func (m *SecretProjection) Reset() { *m = SecretProjection{} } -var xxx_messageInfo_TopologySelectorLabelRequirement proto.InternalMessageInfo +func (m *SecretReference) Reset() { *m = SecretReference{} } -func (m *TopologySelectorTerm) Reset() { *m = TopologySelectorTerm{} } -func (*TopologySelectorTerm) ProtoMessage() {} -func (*TopologySelectorTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{222} -} -func (m *TopologySelectorTerm) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TopologySelectorTerm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TopologySelectorTerm) XXX_Merge(src proto.Message) { - xxx_messageInfo_TopologySelectorTerm.Merge(m, src) -} -func (m *TopologySelectorTerm) XXX_Size() int { - return m.Size() -} -func (m *TopologySelectorTerm) XXX_DiscardUnknown() { - xxx_messageInfo_TopologySelectorTerm.DiscardUnknown(m) -} +func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} } -var xxx_messageInfo_TopologySelectorTerm proto.InternalMessageInfo +func (m *SecurityContext) Reset() { *m = SecurityContext{} } -func (m *TopologySpreadConstraint) Reset() { *m = TopologySpreadConstraint{} } -func (*TopologySpreadConstraint) ProtoMessage() {} -func (*TopologySpreadConstraint) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{223} -} -func (m *TopologySpreadConstraint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TopologySpreadConstraint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TopologySpreadConstraint) XXX_Merge(src proto.Message) { - xxx_messageInfo_TopologySpreadConstraint.Merge(m, src) -} -func (m *TopologySpreadConstraint) XXX_Size() int { - return m.Size() -} -func (m *TopologySpreadConstraint) XXX_DiscardUnknown() { - xxx_messageInfo_TopologySpreadConstraint.DiscardUnknown(m) -} +func (m *SerializedReference) Reset() { *m = SerializedReference{} } -var xxx_messageInfo_TopologySpreadConstraint proto.InternalMessageInfo +func (m *Service) Reset() { *m = Service{} } -func (m *TypedLocalObjectReference) Reset() { *m = TypedLocalObjectReference{} } -func (*TypedLocalObjectReference) ProtoMessage() {} -func (*TypedLocalObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{224} -} -func (m *TypedLocalObjectReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TypedLocalObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TypedLocalObjectReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_TypedLocalObjectReference.Merge(m, src) -} -func (m *TypedLocalObjectReference) XXX_Size() int { - return m.Size() -} -func (m *TypedLocalObjectReference) XXX_DiscardUnknown() { - xxx_messageInfo_TypedLocalObjectReference.DiscardUnknown(m) -} +func (m *ServiceAccount) Reset() { *m = ServiceAccount{} } -var xxx_messageInfo_TypedLocalObjectReference proto.InternalMessageInfo +func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} } -func (m *TypedObjectReference) Reset() { *m = TypedObjectReference{} } -func (*TypedObjectReference) ProtoMessage() {} -func (*TypedObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{225} -} -func (m *TypedObjectReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TypedObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TypedObjectReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_TypedObjectReference.Merge(m, src) -} -func (m *TypedObjectReference) XXX_Size() int { - return m.Size() -} -func (m *TypedObjectReference) XXX_DiscardUnknown() { - xxx_messageInfo_TypedObjectReference.DiscardUnknown(m) -} +func (m *ServiceAccountTokenProjection) Reset() { *m = ServiceAccountTokenProjection{} } -var xxx_messageInfo_TypedObjectReference proto.InternalMessageInfo +func (m *ServiceList) Reset() { *m = ServiceList{} } -func (m *Volume) Reset() { *m = Volume{} } -func (*Volume) ProtoMessage() {} -func (*Volume) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{226} -} -func (m *Volume) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Volume) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Volume) XXX_Merge(src proto.Message) { - xxx_messageInfo_Volume.Merge(m, src) -} -func (m *Volume) XXX_Size() int { - return m.Size() -} -func (m *Volume) XXX_DiscardUnknown() { - xxx_messageInfo_Volume.DiscardUnknown(m) -} +func (m *ServicePort) Reset() { *m = ServicePort{} } -var xxx_messageInfo_Volume proto.InternalMessageInfo +func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} } -func (m *VolumeDevice) Reset() { *m = VolumeDevice{} } -func (*VolumeDevice) ProtoMessage() {} -func (*VolumeDevice) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{227} -} -func (m *VolumeDevice) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeDevice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeDevice) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeDevice.Merge(m, src) -} -func (m *VolumeDevice) XXX_Size() int { - return m.Size() -} -func (m *VolumeDevice) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeDevice.DiscardUnknown(m) -} +func (m *ServiceSpec) Reset() { *m = ServiceSpec{} } -var xxx_messageInfo_VolumeDevice proto.InternalMessageInfo +func (m *ServiceStatus) Reset() { *m = ServiceStatus{} } -func (m *VolumeMount) Reset() { *m = VolumeMount{} } -func (*VolumeMount) ProtoMessage() {} -func (*VolumeMount) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{228} -} -func (m *VolumeMount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeMount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeMount) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeMount.Merge(m, src) -} -func (m *VolumeMount) XXX_Size() int { - return m.Size() -} -func (m *VolumeMount) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeMount.DiscardUnknown(m) -} +func (m *SessionAffinityConfig) Reset() { *m = SessionAffinityConfig{} } -var xxx_messageInfo_VolumeMount proto.InternalMessageInfo +func (m *SleepAction) Reset() { *m = SleepAction{} } -func (m *VolumeMountStatus) Reset() { *m = VolumeMountStatus{} } -func (*VolumeMountStatus) ProtoMessage() {} -func (*VolumeMountStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{229} -} -func (m *VolumeMountStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeMountStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeMountStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeMountStatus.Merge(m, src) -} -func (m *VolumeMountStatus) XXX_Size() int { - return m.Size() -} -func (m *VolumeMountStatus) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeMountStatus.DiscardUnknown(m) -} +func (m *StorageOSPersistentVolumeSource) Reset() { *m = StorageOSPersistentVolumeSource{} } -var xxx_messageInfo_VolumeMountStatus proto.InternalMessageInfo +func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} } -func (m *VolumeNodeAffinity) Reset() { *m = VolumeNodeAffinity{} } -func (*VolumeNodeAffinity) ProtoMessage() {} -func (*VolumeNodeAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{230} -} -func (m *VolumeNodeAffinity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeNodeAffinity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeNodeAffinity) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeNodeAffinity.Merge(m, src) -} -func (m *VolumeNodeAffinity) XXX_Size() int { - return m.Size() -} -func (m *VolumeNodeAffinity) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeNodeAffinity.DiscardUnknown(m) -} +func (m *Sysctl) Reset() { *m = Sysctl{} } -var xxx_messageInfo_VolumeNodeAffinity proto.InternalMessageInfo +func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} } -func (m *VolumeProjection) Reset() { *m = VolumeProjection{} } -func (*VolumeProjection) ProtoMessage() {} -func (*VolumeProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{231} -} -func (m *VolumeProjection) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeProjection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeProjection) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeProjection.Merge(m, src) -} -func (m *VolumeProjection) XXX_Size() int { - return m.Size() -} -func (m *VolumeProjection) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeProjection.DiscardUnknown(m) -} +func (m *Taint) Reset() { *m = Taint{} } -var xxx_messageInfo_VolumeProjection proto.InternalMessageInfo +func (m *Toleration) Reset() { *m = Toleration{} } -func (m *VolumeResourceRequirements) Reset() { *m = VolumeResourceRequirements{} } -func (*VolumeResourceRequirements) ProtoMessage() {} -func (*VolumeResourceRequirements) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{232} -} -func (m *VolumeResourceRequirements) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeResourceRequirements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeResourceRequirements) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeResourceRequirements.Merge(m, src) -} -func (m *VolumeResourceRequirements) XXX_Size() int { - return m.Size() -} -func (m *VolumeResourceRequirements) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeResourceRequirements.DiscardUnknown(m) -} +func (m *TopologySelectorLabelRequirement) Reset() { *m = TopologySelectorLabelRequirement{} } -var xxx_messageInfo_VolumeResourceRequirements proto.InternalMessageInfo +func (m *TopologySelectorTerm) Reset() { *m = TopologySelectorTerm{} } -func (m *VolumeSource) Reset() { *m = VolumeSource{} } -func (*VolumeSource) ProtoMessage() {} -func (*VolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{233} -} -func (m *VolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeSource.Merge(m, src) -} -func (m *VolumeSource) XXX_Size() int { - return m.Size() -} -func (m *VolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeSource.DiscardUnknown(m) -} +func (m *TopologySpreadConstraint) Reset() { *m = TopologySpreadConstraint{} } -var xxx_messageInfo_VolumeSource proto.InternalMessageInfo +func (m *TypedLocalObjectReference) Reset() { *m = TypedLocalObjectReference{} } -func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} } -func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {} -func (*VsphereVirtualDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{234} -} -func (m *VsphereVirtualDiskVolumeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VsphereVirtualDiskVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VsphereVirtualDiskVolumeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_VsphereVirtualDiskVolumeSource.Merge(m, src) -} -func (m *VsphereVirtualDiskVolumeSource) XXX_Size() int { - return m.Size() -} -func (m *VsphereVirtualDiskVolumeSource) XXX_DiscardUnknown() { - xxx_messageInfo_VsphereVirtualDiskVolumeSource.DiscardUnknown(m) -} +func (m *TypedObjectReference) Reset() { *m = TypedObjectReference{} } -var xxx_messageInfo_VsphereVirtualDiskVolumeSource proto.InternalMessageInfo +func (m *Volume) Reset() { *m = Volume{} } -func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} } -func (*WeightedPodAffinityTerm) ProtoMessage() {} -func (*WeightedPodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{235} -} -func (m *WeightedPodAffinityTerm) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WeightedPodAffinityTerm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *WeightedPodAffinityTerm) XXX_Merge(src proto.Message) { - xxx_messageInfo_WeightedPodAffinityTerm.Merge(m, src) -} -func (m *WeightedPodAffinityTerm) XXX_Size() int { - return m.Size() -} -func (m *WeightedPodAffinityTerm) XXX_DiscardUnknown() { - xxx_messageInfo_WeightedPodAffinityTerm.DiscardUnknown(m) -} +func (m *VolumeDevice) Reset() { *m = VolumeDevice{} } -var xxx_messageInfo_WeightedPodAffinityTerm proto.InternalMessageInfo +func (m *VolumeMount) Reset() { *m = VolumeMount{} } -func (m *WindowsSecurityContextOptions) Reset() { *m = WindowsSecurityContextOptions{} } -func (*WindowsSecurityContextOptions) ProtoMessage() {} -func (*WindowsSecurityContextOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{236} -} -func (m *WindowsSecurityContextOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WindowsSecurityContextOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *WindowsSecurityContextOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_WindowsSecurityContextOptions.Merge(m, src) -} -func (m *WindowsSecurityContextOptions) XXX_Size() int { - return m.Size() -} -func (m *WindowsSecurityContextOptions) XXX_DiscardUnknown() { - xxx_messageInfo_WindowsSecurityContextOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_WindowsSecurityContextOptions proto.InternalMessageInfo - -func init() { - proto.RegisterType((*AWSElasticBlockStoreVolumeSource)(nil), "k8s.io.api.core.v1.AWSElasticBlockStoreVolumeSource") - proto.RegisterType((*Affinity)(nil), "k8s.io.api.core.v1.Affinity") - proto.RegisterType((*AppArmorProfile)(nil), "k8s.io.api.core.v1.AppArmorProfile") - proto.RegisterType((*AttachedVolume)(nil), "k8s.io.api.core.v1.AttachedVolume") - proto.RegisterType((*AvoidPods)(nil), "k8s.io.api.core.v1.AvoidPods") - proto.RegisterType((*AzureDiskVolumeSource)(nil), "k8s.io.api.core.v1.AzureDiskVolumeSource") - proto.RegisterType((*AzureFilePersistentVolumeSource)(nil), "k8s.io.api.core.v1.AzureFilePersistentVolumeSource") - proto.RegisterType((*AzureFileVolumeSource)(nil), "k8s.io.api.core.v1.AzureFileVolumeSource") - proto.RegisterType((*Binding)(nil), "k8s.io.api.core.v1.Binding") - proto.RegisterType((*CSIPersistentVolumeSource)(nil), "k8s.io.api.core.v1.CSIPersistentVolumeSource") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.core.v1.CSIPersistentVolumeSource.VolumeAttributesEntry") - proto.RegisterType((*CSIVolumeSource)(nil), "k8s.io.api.core.v1.CSIVolumeSource") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.core.v1.CSIVolumeSource.VolumeAttributesEntry") - proto.RegisterType((*Capabilities)(nil), "k8s.io.api.core.v1.Capabilities") - proto.RegisterType((*CephFSPersistentVolumeSource)(nil), "k8s.io.api.core.v1.CephFSPersistentVolumeSource") - proto.RegisterType((*CephFSVolumeSource)(nil), "k8s.io.api.core.v1.CephFSVolumeSource") - proto.RegisterType((*CinderPersistentVolumeSource)(nil), "k8s.io.api.core.v1.CinderPersistentVolumeSource") - proto.RegisterType((*CinderVolumeSource)(nil), "k8s.io.api.core.v1.CinderVolumeSource") - proto.RegisterType((*ClientIPConfig)(nil), "k8s.io.api.core.v1.ClientIPConfig") - proto.RegisterType((*ClusterTrustBundleProjection)(nil), "k8s.io.api.core.v1.ClusterTrustBundleProjection") - proto.RegisterType((*ComponentCondition)(nil), "k8s.io.api.core.v1.ComponentCondition") - proto.RegisterType((*ComponentStatus)(nil), "k8s.io.api.core.v1.ComponentStatus") - proto.RegisterType((*ComponentStatusList)(nil), "k8s.io.api.core.v1.ComponentStatusList") - proto.RegisterType((*ConfigMap)(nil), "k8s.io.api.core.v1.ConfigMap") - proto.RegisterMapType((map[string][]byte)(nil), "k8s.io.api.core.v1.ConfigMap.BinaryDataEntry") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.core.v1.ConfigMap.DataEntry") - proto.RegisterType((*ConfigMapEnvSource)(nil), "k8s.io.api.core.v1.ConfigMapEnvSource") - proto.RegisterType((*ConfigMapKeySelector)(nil), "k8s.io.api.core.v1.ConfigMapKeySelector") - proto.RegisterType((*ConfigMapList)(nil), "k8s.io.api.core.v1.ConfigMapList") - proto.RegisterType((*ConfigMapNodeConfigSource)(nil), "k8s.io.api.core.v1.ConfigMapNodeConfigSource") - proto.RegisterType((*ConfigMapProjection)(nil), "k8s.io.api.core.v1.ConfigMapProjection") - proto.RegisterType((*ConfigMapVolumeSource)(nil), "k8s.io.api.core.v1.ConfigMapVolumeSource") - proto.RegisterType((*Container)(nil), "k8s.io.api.core.v1.Container") - proto.RegisterType((*ContainerExtendedResourceRequest)(nil), "k8s.io.api.core.v1.ContainerExtendedResourceRequest") - proto.RegisterType((*ContainerImage)(nil), "k8s.io.api.core.v1.ContainerImage") - proto.RegisterType((*ContainerPort)(nil), "k8s.io.api.core.v1.ContainerPort") - proto.RegisterType((*ContainerResizePolicy)(nil), "k8s.io.api.core.v1.ContainerResizePolicy") - proto.RegisterType((*ContainerRestartRule)(nil), "k8s.io.api.core.v1.ContainerRestartRule") - proto.RegisterType((*ContainerRestartRuleOnExitCodes)(nil), "k8s.io.api.core.v1.ContainerRestartRuleOnExitCodes") - proto.RegisterType((*ContainerState)(nil), "k8s.io.api.core.v1.ContainerState") - proto.RegisterType((*ContainerStateRunning)(nil), "k8s.io.api.core.v1.ContainerStateRunning") - proto.RegisterType((*ContainerStateTerminated)(nil), "k8s.io.api.core.v1.ContainerStateTerminated") - proto.RegisterType((*ContainerStateWaiting)(nil), "k8s.io.api.core.v1.ContainerStateWaiting") - proto.RegisterType((*ContainerStatus)(nil), "k8s.io.api.core.v1.ContainerStatus") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.ContainerStatus.AllocatedResourcesEntry") - proto.RegisterType((*ContainerUser)(nil), "k8s.io.api.core.v1.ContainerUser") - proto.RegisterType((*DaemonEndpoint)(nil), "k8s.io.api.core.v1.DaemonEndpoint") - proto.RegisterType((*DownwardAPIProjection)(nil), "k8s.io.api.core.v1.DownwardAPIProjection") - proto.RegisterType((*DownwardAPIVolumeFile)(nil), "k8s.io.api.core.v1.DownwardAPIVolumeFile") - proto.RegisterType((*DownwardAPIVolumeSource)(nil), "k8s.io.api.core.v1.DownwardAPIVolumeSource") - proto.RegisterType((*EmptyDirVolumeSource)(nil), "k8s.io.api.core.v1.EmptyDirVolumeSource") - proto.RegisterType((*EndpointAddress)(nil), "k8s.io.api.core.v1.EndpointAddress") - proto.RegisterType((*EndpointPort)(nil), "k8s.io.api.core.v1.EndpointPort") - proto.RegisterType((*EndpointSubset)(nil), "k8s.io.api.core.v1.EndpointSubset") - proto.RegisterType((*Endpoints)(nil), "k8s.io.api.core.v1.Endpoints") - proto.RegisterType((*EndpointsList)(nil), "k8s.io.api.core.v1.EndpointsList") - proto.RegisterType((*EnvFromSource)(nil), "k8s.io.api.core.v1.EnvFromSource") - proto.RegisterType((*EnvVar)(nil), "k8s.io.api.core.v1.EnvVar") - proto.RegisterType((*EnvVarSource)(nil), "k8s.io.api.core.v1.EnvVarSource") - proto.RegisterType((*EphemeralContainer)(nil), "k8s.io.api.core.v1.EphemeralContainer") - proto.RegisterType((*EphemeralContainerCommon)(nil), "k8s.io.api.core.v1.EphemeralContainerCommon") - proto.RegisterType((*EphemeralVolumeSource)(nil), "k8s.io.api.core.v1.EphemeralVolumeSource") - proto.RegisterType((*Event)(nil), "k8s.io.api.core.v1.Event") - proto.RegisterType((*EventList)(nil), "k8s.io.api.core.v1.EventList") - proto.RegisterType((*EventSeries)(nil), "k8s.io.api.core.v1.EventSeries") - proto.RegisterType((*EventSource)(nil), "k8s.io.api.core.v1.EventSource") - proto.RegisterType((*ExecAction)(nil), "k8s.io.api.core.v1.ExecAction") - proto.RegisterType((*FCVolumeSource)(nil), "k8s.io.api.core.v1.FCVolumeSource") - proto.RegisterType((*FileKeySelector)(nil), "k8s.io.api.core.v1.FileKeySelector") - proto.RegisterType((*FlexPersistentVolumeSource)(nil), "k8s.io.api.core.v1.FlexPersistentVolumeSource") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.core.v1.FlexPersistentVolumeSource.OptionsEntry") - proto.RegisterType((*FlexVolumeSource)(nil), "k8s.io.api.core.v1.FlexVolumeSource") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.core.v1.FlexVolumeSource.OptionsEntry") - proto.RegisterType((*FlockerVolumeSource)(nil), "k8s.io.api.core.v1.FlockerVolumeSource") - proto.RegisterType((*GCEPersistentDiskVolumeSource)(nil), "k8s.io.api.core.v1.GCEPersistentDiskVolumeSource") - proto.RegisterType((*GRPCAction)(nil), "k8s.io.api.core.v1.GRPCAction") - proto.RegisterType((*GitRepoVolumeSource)(nil), "k8s.io.api.core.v1.GitRepoVolumeSource") - proto.RegisterType((*GlusterfsPersistentVolumeSource)(nil), "k8s.io.api.core.v1.GlusterfsPersistentVolumeSource") - proto.RegisterType((*GlusterfsVolumeSource)(nil), "k8s.io.api.core.v1.GlusterfsVolumeSource") - proto.RegisterType((*HTTPGetAction)(nil), "k8s.io.api.core.v1.HTTPGetAction") - proto.RegisterType((*HTTPHeader)(nil), "k8s.io.api.core.v1.HTTPHeader") - proto.RegisterType((*HostAlias)(nil), "k8s.io.api.core.v1.HostAlias") - proto.RegisterType((*HostIP)(nil), "k8s.io.api.core.v1.HostIP") - proto.RegisterType((*HostPathVolumeSource)(nil), "k8s.io.api.core.v1.HostPathVolumeSource") - proto.RegisterType((*ISCSIPersistentVolumeSource)(nil), "k8s.io.api.core.v1.ISCSIPersistentVolumeSource") - proto.RegisterType((*ISCSIVolumeSource)(nil), "k8s.io.api.core.v1.ISCSIVolumeSource") - proto.RegisterType((*ImageVolumeSource)(nil), "k8s.io.api.core.v1.ImageVolumeSource") - proto.RegisterType((*KeyToPath)(nil), "k8s.io.api.core.v1.KeyToPath") - proto.RegisterType((*Lifecycle)(nil), "k8s.io.api.core.v1.Lifecycle") - proto.RegisterType((*LifecycleHandler)(nil), "k8s.io.api.core.v1.LifecycleHandler") - proto.RegisterType((*LimitRange)(nil), "k8s.io.api.core.v1.LimitRange") - proto.RegisterType((*LimitRangeItem)(nil), "k8s.io.api.core.v1.LimitRangeItem") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.LimitRangeItem.DefaultEntry") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.LimitRangeItem.DefaultRequestEntry") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.LimitRangeItem.MaxEntry") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.LimitRangeItem.MaxLimitRequestRatioEntry") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.LimitRangeItem.MinEntry") - proto.RegisterType((*LimitRangeList)(nil), "k8s.io.api.core.v1.LimitRangeList") - proto.RegisterType((*LimitRangeSpec)(nil), "k8s.io.api.core.v1.LimitRangeSpec") - proto.RegisterType((*LinuxContainerUser)(nil), "k8s.io.api.core.v1.LinuxContainerUser") - proto.RegisterType((*List)(nil), "k8s.io.api.core.v1.List") - proto.RegisterType((*LoadBalancerIngress)(nil), "k8s.io.api.core.v1.LoadBalancerIngress") - proto.RegisterType((*LoadBalancerStatus)(nil), "k8s.io.api.core.v1.LoadBalancerStatus") - proto.RegisterType((*LocalObjectReference)(nil), "k8s.io.api.core.v1.LocalObjectReference") - proto.RegisterType((*LocalVolumeSource)(nil), "k8s.io.api.core.v1.LocalVolumeSource") - proto.RegisterType((*ModifyVolumeStatus)(nil), "k8s.io.api.core.v1.ModifyVolumeStatus") - proto.RegisterType((*NFSVolumeSource)(nil), "k8s.io.api.core.v1.NFSVolumeSource") - proto.RegisterType((*Namespace)(nil), "k8s.io.api.core.v1.Namespace") - proto.RegisterType((*NamespaceCondition)(nil), "k8s.io.api.core.v1.NamespaceCondition") - proto.RegisterType((*NamespaceList)(nil), "k8s.io.api.core.v1.NamespaceList") - proto.RegisterType((*NamespaceSpec)(nil), "k8s.io.api.core.v1.NamespaceSpec") - proto.RegisterType((*NamespaceStatus)(nil), "k8s.io.api.core.v1.NamespaceStatus") - proto.RegisterType((*Node)(nil), "k8s.io.api.core.v1.Node") - proto.RegisterType((*NodeAddress)(nil), "k8s.io.api.core.v1.NodeAddress") - proto.RegisterType((*NodeAffinity)(nil), "k8s.io.api.core.v1.NodeAffinity") - proto.RegisterType((*NodeCondition)(nil), "k8s.io.api.core.v1.NodeCondition") - proto.RegisterType((*NodeConfigSource)(nil), "k8s.io.api.core.v1.NodeConfigSource") - proto.RegisterType((*NodeConfigStatus)(nil), "k8s.io.api.core.v1.NodeConfigStatus") - proto.RegisterType((*NodeDaemonEndpoints)(nil), "k8s.io.api.core.v1.NodeDaemonEndpoints") - proto.RegisterType((*NodeFeatures)(nil), "k8s.io.api.core.v1.NodeFeatures") - proto.RegisterType((*NodeList)(nil), "k8s.io.api.core.v1.NodeList") - proto.RegisterType((*NodeProxyOptions)(nil), "k8s.io.api.core.v1.NodeProxyOptions") - proto.RegisterType((*NodeRuntimeHandler)(nil), "k8s.io.api.core.v1.NodeRuntimeHandler") - proto.RegisterType((*NodeRuntimeHandlerFeatures)(nil), "k8s.io.api.core.v1.NodeRuntimeHandlerFeatures") - proto.RegisterType((*NodeSelector)(nil), "k8s.io.api.core.v1.NodeSelector") - proto.RegisterType((*NodeSelectorRequirement)(nil), "k8s.io.api.core.v1.NodeSelectorRequirement") - proto.RegisterType((*NodeSelectorTerm)(nil), "k8s.io.api.core.v1.NodeSelectorTerm") - proto.RegisterType((*NodeSpec)(nil), "k8s.io.api.core.v1.NodeSpec") - proto.RegisterType((*NodeStatus)(nil), "k8s.io.api.core.v1.NodeStatus") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.NodeStatus.AllocatableEntry") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.NodeStatus.CapacityEntry") - proto.RegisterType((*NodeSwapStatus)(nil), "k8s.io.api.core.v1.NodeSwapStatus") - proto.RegisterType((*NodeSystemInfo)(nil), "k8s.io.api.core.v1.NodeSystemInfo") - proto.RegisterType((*ObjectFieldSelector)(nil), "k8s.io.api.core.v1.ObjectFieldSelector") - proto.RegisterType((*ObjectReference)(nil), "k8s.io.api.core.v1.ObjectReference") - proto.RegisterType((*PersistentVolume)(nil), "k8s.io.api.core.v1.PersistentVolume") - proto.RegisterType((*PersistentVolumeClaim)(nil), "k8s.io.api.core.v1.PersistentVolumeClaim") - proto.RegisterType((*PersistentVolumeClaimCondition)(nil), "k8s.io.api.core.v1.PersistentVolumeClaimCondition") - proto.RegisterType((*PersistentVolumeClaimList)(nil), "k8s.io.api.core.v1.PersistentVolumeClaimList") - proto.RegisterType((*PersistentVolumeClaimSpec)(nil), "k8s.io.api.core.v1.PersistentVolumeClaimSpec") - proto.RegisterType((*PersistentVolumeClaimStatus)(nil), "k8s.io.api.core.v1.PersistentVolumeClaimStatus") - proto.RegisterMapType((map[ResourceName]ClaimResourceStatus)(nil), "k8s.io.api.core.v1.PersistentVolumeClaimStatus.AllocatedResourceStatusesEntry") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.PersistentVolumeClaimStatus.AllocatedResourcesEntry") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.PersistentVolumeClaimStatus.CapacityEntry") - proto.RegisterType((*PersistentVolumeClaimTemplate)(nil), "k8s.io.api.core.v1.PersistentVolumeClaimTemplate") - proto.RegisterType((*PersistentVolumeClaimVolumeSource)(nil), "k8s.io.api.core.v1.PersistentVolumeClaimVolumeSource") - proto.RegisterType((*PersistentVolumeList)(nil), "k8s.io.api.core.v1.PersistentVolumeList") - proto.RegisterType((*PersistentVolumeSource)(nil), "k8s.io.api.core.v1.PersistentVolumeSource") - proto.RegisterType((*PersistentVolumeSpec)(nil), "k8s.io.api.core.v1.PersistentVolumeSpec") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.PersistentVolumeSpec.CapacityEntry") - proto.RegisterType((*PersistentVolumeStatus)(nil), "k8s.io.api.core.v1.PersistentVolumeStatus") - proto.RegisterType((*PhotonPersistentDiskVolumeSource)(nil), "k8s.io.api.core.v1.PhotonPersistentDiskVolumeSource") - proto.RegisterType((*Pod)(nil), "k8s.io.api.core.v1.Pod") - proto.RegisterType((*PodAffinity)(nil), "k8s.io.api.core.v1.PodAffinity") - proto.RegisterType((*PodAffinityTerm)(nil), "k8s.io.api.core.v1.PodAffinityTerm") - proto.RegisterType((*PodAntiAffinity)(nil), "k8s.io.api.core.v1.PodAntiAffinity") - proto.RegisterType((*PodAttachOptions)(nil), "k8s.io.api.core.v1.PodAttachOptions") - proto.RegisterType((*PodCertificateProjection)(nil), "k8s.io.api.core.v1.PodCertificateProjection") - proto.RegisterType((*PodCondition)(nil), "k8s.io.api.core.v1.PodCondition") - proto.RegisterType((*PodDNSConfig)(nil), "k8s.io.api.core.v1.PodDNSConfig") - proto.RegisterType((*PodDNSConfigOption)(nil), "k8s.io.api.core.v1.PodDNSConfigOption") - proto.RegisterType((*PodExecOptions)(nil), "k8s.io.api.core.v1.PodExecOptions") - proto.RegisterType((*PodExtendedResourceClaimStatus)(nil), "k8s.io.api.core.v1.PodExtendedResourceClaimStatus") - proto.RegisterType((*PodIP)(nil), "k8s.io.api.core.v1.PodIP") - proto.RegisterType((*PodList)(nil), "k8s.io.api.core.v1.PodList") - proto.RegisterType((*PodLogOptions)(nil), "k8s.io.api.core.v1.PodLogOptions") - proto.RegisterType((*PodOS)(nil), "k8s.io.api.core.v1.PodOS") - proto.RegisterType((*PodPortForwardOptions)(nil), "k8s.io.api.core.v1.PodPortForwardOptions") - proto.RegisterType((*PodProxyOptions)(nil), "k8s.io.api.core.v1.PodProxyOptions") - proto.RegisterType((*PodReadinessGate)(nil), "k8s.io.api.core.v1.PodReadinessGate") - proto.RegisterType((*PodResourceClaim)(nil), "k8s.io.api.core.v1.PodResourceClaim") - proto.RegisterType((*PodResourceClaimStatus)(nil), "k8s.io.api.core.v1.PodResourceClaimStatus") - proto.RegisterType((*PodSchedulingGate)(nil), "k8s.io.api.core.v1.PodSchedulingGate") - proto.RegisterType((*PodSecurityContext)(nil), "k8s.io.api.core.v1.PodSecurityContext") - proto.RegisterType((*PodSignature)(nil), "k8s.io.api.core.v1.PodSignature") - proto.RegisterType((*PodSpec)(nil), "k8s.io.api.core.v1.PodSpec") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.core.v1.PodSpec.NodeSelectorEntry") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.PodSpec.OverheadEntry") - proto.RegisterType((*PodStatus)(nil), "k8s.io.api.core.v1.PodStatus") - proto.RegisterType((*PodStatusResult)(nil), "k8s.io.api.core.v1.PodStatusResult") - proto.RegisterType((*PodTemplate)(nil), "k8s.io.api.core.v1.PodTemplate") - proto.RegisterType((*PodTemplateList)(nil), "k8s.io.api.core.v1.PodTemplateList") - proto.RegisterType((*PodTemplateSpec)(nil), "k8s.io.api.core.v1.PodTemplateSpec") - proto.RegisterType((*PortStatus)(nil), "k8s.io.api.core.v1.PortStatus") - proto.RegisterType((*PortworxVolumeSource)(nil), "k8s.io.api.core.v1.PortworxVolumeSource") - proto.RegisterType((*Preconditions)(nil), "k8s.io.api.core.v1.Preconditions") - proto.RegisterType((*PreferAvoidPodsEntry)(nil), "k8s.io.api.core.v1.PreferAvoidPodsEntry") - proto.RegisterType((*PreferredSchedulingTerm)(nil), "k8s.io.api.core.v1.PreferredSchedulingTerm") - proto.RegisterType((*Probe)(nil), "k8s.io.api.core.v1.Probe") - proto.RegisterType((*ProbeHandler)(nil), "k8s.io.api.core.v1.ProbeHandler") - proto.RegisterType((*ProjectedVolumeSource)(nil), "k8s.io.api.core.v1.ProjectedVolumeSource") - proto.RegisterType((*QuobyteVolumeSource)(nil), "k8s.io.api.core.v1.QuobyteVolumeSource") - proto.RegisterType((*RBDPersistentVolumeSource)(nil), "k8s.io.api.core.v1.RBDPersistentVolumeSource") - proto.RegisterType((*RBDVolumeSource)(nil), "k8s.io.api.core.v1.RBDVolumeSource") - proto.RegisterType((*RangeAllocation)(nil), "k8s.io.api.core.v1.RangeAllocation") - proto.RegisterType((*ReplicationController)(nil), "k8s.io.api.core.v1.ReplicationController") - proto.RegisterType((*ReplicationControllerCondition)(nil), "k8s.io.api.core.v1.ReplicationControllerCondition") - proto.RegisterType((*ReplicationControllerList)(nil), "k8s.io.api.core.v1.ReplicationControllerList") - proto.RegisterType((*ReplicationControllerSpec)(nil), "k8s.io.api.core.v1.ReplicationControllerSpec") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.core.v1.ReplicationControllerSpec.SelectorEntry") - proto.RegisterType((*ReplicationControllerStatus)(nil), "k8s.io.api.core.v1.ReplicationControllerStatus") - proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.core.v1.ResourceClaim") - proto.RegisterType((*ResourceFieldSelector)(nil), "k8s.io.api.core.v1.ResourceFieldSelector") - proto.RegisterType((*ResourceHealth)(nil), "k8s.io.api.core.v1.ResourceHealth") - proto.RegisterType((*ResourceQuota)(nil), "k8s.io.api.core.v1.ResourceQuota") - proto.RegisterType((*ResourceQuotaList)(nil), "k8s.io.api.core.v1.ResourceQuotaList") - proto.RegisterType((*ResourceQuotaSpec)(nil), "k8s.io.api.core.v1.ResourceQuotaSpec") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.ResourceQuotaSpec.HardEntry") - proto.RegisterType((*ResourceQuotaStatus)(nil), "k8s.io.api.core.v1.ResourceQuotaStatus") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.ResourceQuotaStatus.HardEntry") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.ResourceQuotaStatus.UsedEntry") - proto.RegisterType((*ResourceRequirements)(nil), "k8s.io.api.core.v1.ResourceRequirements") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.ResourceRequirements.LimitsEntry") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.ResourceRequirements.RequestsEntry") - proto.RegisterType((*ResourceStatus)(nil), "k8s.io.api.core.v1.ResourceStatus") - proto.RegisterType((*SELinuxOptions)(nil), "k8s.io.api.core.v1.SELinuxOptions") - proto.RegisterType((*ScaleIOPersistentVolumeSource)(nil), "k8s.io.api.core.v1.ScaleIOPersistentVolumeSource") - proto.RegisterType((*ScaleIOVolumeSource)(nil), "k8s.io.api.core.v1.ScaleIOVolumeSource") - proto.RegisterType((*ScopeSelector)(nil), "k8s.io.api.core.v1.ScopeSelector") - proto.RegisterType((*ScopedResourceSelectorRequirement)(nil), "k8s.io.api.core.v1.ScopedResourceSelectorRequirement") - proto.RegisterType((*SeccompProfile)(nil), "k8s.io.api.core.v1.SeccompProfile") - proto.RegisterType((*Secret)(nil), "k8s.io.api.core.v1.Secret") - proto.RegisterMapType((map[string][]byte)(nil), "k8s.io.api.core.v1.Secret.DataEntry") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.core.v1.Secret.StringDataEntry") - proto.RegisterType((*SecretEnvSource)(nil), "k8s.io.api.core.v1.SecretEnvSource") - proto.RegisterType((*SecretKeySelector)(nil), "k8s.io.api.core.v1.SecretKeySelector") - proto.RegisterType((*SecretList)(nil), "k8s.io.api.core.v1.SecretList") - proto.RegisterType((*SecretProjection)(nil), "k8s.io.api.core.v1.SecretProjection") - proto.RegisterType((*SecretReference)(nil), "k8s.io.api.core.v1.SecretReference") - proto.RegisterType((*SecretVolumeSource)(nil), "k8s.io.api.core.v1.SecretVolumeSource") - proto.RegisterType((*SecurityContext)(nil), "k8s.io.api.core.v1.SecurityContext") - proto.RegisterType((*SerializedReference)(nil), "k8s.io.api.core.v1.SerializedReference") - proto.RegisterType((*Service)(nil), "k8s.io.api.core.v1.Service") - proto.RegisterType((*ServiceAccount)(nil), "k8s.io.api.core.v1.ServiceAccount") - proto.RegisterType((*ServiceAccountList)(nil), "k8s.io.api.core.v1.ServiceAccountList") - proto.RegisterType((*ServiceAccountTokenProjection)(nil), "k8s.io.api.core.v1.ServiceAccountTokenProjection") - proto.RegisterType((*ServiceList)(nil), "k8s.io.api.core.v1.ServiceList") - proto.RegisterType((*ServicePort)(nil), "k8s.io.api.core.v1.ServicePort") - proto.RegisterType((*ServiceProxyOptions)(nil), "k8s.io.api.core.v1.ServiceProxyOptions") - proto.RegisterType((*ServiceSpec)(nil), "k8s.io.api.core.v1.ServiceSpec") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.core.v1.ServiceSpec.SelectorEntry") - proto.RegisterType((*ServiceStatus)(nil), "k8s.io.api.core.v1.ServiceStatus") - proto.RegisterType((*SessionAffinityConfig)(nil), "k8s.io.api.core.v1.SessionAffinityConfig") - proto.RegisterType((*SleepAction)(nil), "k8s.io.api.core.v1.SleepAction") - proto.RegisterType((*StorageOSPersistentVolumeSource)(nil), "k8s.io.api.core.v1.StorageOSPersistentVolumeSource") - proto.RegisterType((*StorageOSVolumeSource)(nil), "k8s.io.api.core.v1.StorageOSVolumeSource") - proto.RegisterType((*Sysctl)(nil), "k8s.io.api.core.v1.Sysctl") - proto.RegisterType((*TCPSocketAction)(nil), "k8s.io.api.core.v1.TCPSocketAction") - proto.RegisterType((*Taint)(nil), "k8s.io.api.core.v1.Taint") - proto.RegisterType((*Toleration)(nil), "k8s.io.api.core.v1.Toleration") - proto.RegisterType((*TopologySelectorLabelRequirement)(nil), "k8s.io.api.core.v1.TopologySelectorLabelRequirement") - proto.RegisterType((*TopologySelectorTerm)(nil), "k8s.io.api.core.v1.TopologySelectorTerm") - proto.RegisterType((*TopologySpreadConstraint)(nil), "k8s.io.api.core.v1.TopologySpreadConstraint") - proto.RegisterType((*TypedLocalObjectReference)(nil), "k8s.io.api.core.v1.TypedLocalObjectReference") - proto.RegisterType((*TypedObjectReference)(nil), "k8s.io.api.core.v1.TypedObjectReference") - proto.RegisterType((*Volume)(nil), "k8s.io.api.core.v1.Volume") - proto.RegisterType((*VolumeDevice)(nil), "k8s.io.api.core.v1.VolumeDevice") - proto.RegisterType((*VolumeMount)(nil), "k8s.io.api.core.v1.VolumeMount") - proto.RegisterType((*VolumeMountStatus)(nil), "k8s.io.api.core.v1.VolumeMountStatus") - proto.RegisterType((*VolumeNodeAffinity)(nil), "k8s.io.api.core.v1.VolumeNodeAffinity") - proto.RegisterType((*VolumeProjection)(nil), "k8s.io.api.core.v1.VolumeProjection") - proto.RegisterType((*VolumeResourceRequirements)(nil), "k8s.io.api.core.v1.VolumeResourceRequirements") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.VolumeResourceRequirements.LimitsEntry") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.VolumeResourceRequirements.RequestsEntry") - proto.RegisterType((*VolumeSource)(nil), "k8s.io.api.core.v1.VolumeSource") - proto.RegisterType((*VsphereVirtualDiskVolumeSource)(nil), "k8s.io.api.core.v1.VsphereVirtualDiskVolumeSource") - proto.RegisterType((*WeightedPodAffinityTerm)(nil), "k8s.io.api.core.v1.WeightedPodAffinityTerm") - proto.RegisterType((*WindowsSecurityContextOptions)(nil), "k8s.io.api.core.v1.WindowsSecurityContextOptions") -} - -func init() { - proto.RegisterFile("k8s.io/api/core/v1/generated.proto", fileDescriptor_6c07b07c062484ab) -} - -var fileDescriptor_6c07b07c062484ab = []byte{ - // 16665 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x5b, 0x90, 0x5c, 0x49, - 0x76, 0x18, 0xb6, 0xb7, 0xaa, 0x9f, 0xa7, 0xdf, 0x89, 0x57, 0xa1, 0x07, 0x40, 0x61, 0xee, 0xcc, - 0x60, 0x30, 0x3b, 0x33, 0x8d, 0xc5, 0x3c, 0x76, 0xb1, 0x33, 0xb3, 0xc3, 0xe9, 0x27, 0xd0, 0x03, - 0x74, 0xa3, 0x26, 0xab, 0x01, 0xec, 0x63, 0x76, 0xb5, 0x17, 0x55, 0xd9, 0xdd, 0x77, 0xbb, 0xea, - 0xde, 0x9a, 0x7b, 0x6f, 0x35, 0xd0, 0x30, 0x15, 0xa4, 0x56, 0xe6, 0x4a, 0x4b, 0xd2, 0x11, 0x1b, - 0x0a, 0x4b, 0x72, 0x90, 0x0a, 0x7e, 0xe8, 0x45, 0xd2, 0xb4, 0x64, 0x52, 0xa4, 0x45, 0x59, 0x14, - 0x29, 0xda, 0x96, 0x23, 0x68, 0x7f, 0xc8, 0x14, 0x23, 0xcc, 0x65, 0x58, 0xe1, 0x96, 0xd9, 0xb6, - 0x42, 0xc1, 0x0f, 0x53, 0x0a, 0xda, 0x1f, 0x76, 0x87, 0x6c, 0x2a, 0xf2, 0x79, 0x33, 0xef, 0xab, - 0xaa, 0x31, 0x40, 0xef, 0x70, 0x63, 0xfe, 0xaa, 0xf2, 0x9c, 0x3c, 0x99, 0x37, 0x1f, 0x27, 0x4f, - 0x9e, 0x73, 0xf2, 0x1c, 0xb0, 0x77, 0xae, 0x85, 0x73, 0xae, 0x7f, 0xc5, 0xe9, 0xb8, 0x57, 0x1a, - 0x7e, 0x40, 0xae, 0xec, 0x5e, 0xbd, 0xb2, 0x45, 0x3c, 0x12, 0x38, 0x11, 0x69, 0xce, 0x75, 0x02, - 0x3f, 0xf2, 0x11, 0xe2, 0x38, 0x73, 0x4e, 0xc7, 0x9d, 0xa3, 0x38, 0x73, 0xbb, 0x57, 0x67, 0x5f, - 0xdd, 0x72, 0xa3, 0xed, 0xee, 0xfd, 0xb9, 0x86, 0xdf, 0xbe, 0xb2, 0xe5, 0x6f, 0xf9, 0x57, 0x18, - 0xea, 0xfd, 0xee, 0x26, 0xfb, 0xc7, 0xfe, 0xb0, 0x5f, 0x9c, 0xc4, 0xec, 0x1b, 0x71, 0x33, 0x6d, - 0xa7, 0xb1, 0xed, 0x7a, 0x24, 0xd8, 0xbb, 0xd2, 0xd9, 0xd9, 0x62, 0xed, 0x06, 0x24, 0xf4, 0xbb, - 0x41, 0x83, 0x24, 0x1b, 0x2e, 0xac, 0x15, 0x5e, 0x69, 0x93, 0xc8, 0xc9, 0xe8, 0xee, 0xec, 0x95, - 0xbc, 0x5a, 0x41, 0xd7, 0x8b, 0xdc, 0x76, 0xba, 0x99, 0xcf, 0xf7, 0xaa, 0x10, 0x36, 0xb6, 0x49, - 0xdb, 0x49, 0xd5, 0x7b, 0x3d, 0xaf, 0x5e, 0x37, 0x72, 0x5b, 0x57, 0x5c, 0x2f, 0x0a, 0xa3, 0x20, - 0x59, 0xc9, 0xfe, 0xbe, 0x05, 0x17, 0xe7, 0xef, 0xd5, 0x97, 0x5b, 0x4e, 0x18, 0xb9, 0x8d, 0x85, - 0x96, 0xdf, 0xd8, 0xa9, 0x47, 0x7e, 0x40, 0xee, 0xfa, 0xad, 0x6e, 0x9b, 0xd4, 0xd9, 0x40, 0xa0, - 0x57, 0x60, 0x64, 0x97, 0xfd, 0x5f, 0x5d, 0xaa, 0x58, 0x17, 0xad, 0xcb, 0xa3, 0x0b, 0xd3, 0xbf, - 0xb3, 0x5f, 0xfd, 0xcc, 0xc1, 0x7e, 0x75, 0xe4, 0xae, 0x28, 0xc7, 0x0a, 0x03, 0x5d, 0x82, 0xa1, - 0xcd, 0x70, 0x63, 0xaf, 0x43, 0x2a, 0x25, 0x86, 0x3b, 0x29, 0x70, 0x87, 0x56, 0xea, 0xb4, 0x14, - 0x0b, 0x28, 0xba, 0x02, 0xa3, 0x1d, 0x27, 0x88, 0xdc, 0xc8, 0xf5, 0xbd, 0x4a, 0xf9, 0xa2, 0x75, - 0x79, 0x70, 0x61, 0x46, 0xa0, 0x8e, 0xd6, 0x24, 0x00, 0xc7, 0x38, 0xb4, 0x1b, 0x01, 0x71, 0x9a, - 0xb7, 0xbd, 0xd6, 0x5e, 0x65, 0xe0, 0xa2, 0x75, 0x79, 0x24, 0xee, 0x06, 0x16, 0xe5, 0x58, 0x61, - 0xd8, 0x3f, 0x53, 0x82, 0x91, 0xf9, 0xcd, 0x4d, 0xd7, 0x73, 0xa3, 0x3d, 0x74, 0x17, 0xc6, 0x3d, - 0xbf, 0x49, 0xe4, 0x7f, 0xf6, 0x15, 0x63, 0xaf, 0x5d, 0x9c, 0x4b, 0x2f, 0xa5, 0xb9, 0x75, 0x0d, - 0x6f, 0x61, 0xfa, 0x60, 0xbf, 0x3a, 0xae, 0x97, 0x60, 0x83, 0x0e, 0xc2, 0x30, 0xd6, 0xf1, 0x9b, - 0x8a, 0x6c, 0x89, 0x91, 0xad, 0x66, 0x91, 0xad, 0xc5, 0x68, 0x0b, 0x53, 0x07, 0xfb, 0xd5, 0x31, - 0xad, 0x00, 0xeb, 0x44, 0xd0, 0x7d, 0x98, 0xa2, 0x7f, 0xbd, 0xc8, 0x55, 0x74, 0xcb, 0x8c, 0xee, - 0x73, 0x79, 0x74, 0x35, 0xd4, 0x85, 0x13, 0x07, 0xfb, 0xd5, 0xa9, 0x44, 0x21, 0x4e, 0x12, 0xb4, - 0x7f, 0xda, 0x82, 0xa9, 0xf9, 0x4e, 0x67, 0x3e, 0x68, 0xfb, 0x41, 0x2d, 0xf0, 0x37, 0xdd, 0x16, - 0x41, 0x5f, 0x80, 0x81, 0x88, 0xce, 0x1a, 0x9f, 0xe1, 0xe7, 0xc4, 0xd0, 0x0e, 0xd0, 0xb9, 0x3a, - 0xdc, 0xaf, 0x9e, 0x48, 0xa0, 0xb3, 0xa9, 0x64, 0x15, 0xd0, 0x7b, 0x30, 0xdd, 0xf2, 0x1b, 0x4e, - 0x6b, 0xdb, 0x0f, 0x23, 0x01, 0x15, 0x53, 0x7f, 0xf2, 0x60, 0xbf, 0x3a, 0x7d, 0x2b, 0x01, 0xc3, - 0x29, 0x6c, 0xfb, 0x11, 0x4c, 0xce, 0x47, 0x91, 0xd3, 0xd8, 0x26, 0x4d, 0xbe, 0xa0, 0xd0, 0x1b, - 0x30, 0xe0, 0x39, 0x6d, 0xd9, 0x99, 0x8b, 0xb2, 0x33, 0xeb, 0x4e, 0x9b, 0x76, 0x66, 0xfa, 0x8e, - 0xe7, 0x7e, 0xd4, 0x15, 0x8b, 0x94, 0x96, 0x61, 0x86, 0x8d, 0x5e, 0x03, 0x68, 0x92, 0x5d, 0xb7, - 0x41, 0x6a, 0x4e, 0xb4, 0x2d, 0xfa, 0x80, 0x44, 0x5d, 0x58, 0x52, 0x10, 0xac, 0x61, 0xd9, 0x0f, - 0x61, 0x74, 0x7e, 0xd7, 0x77, 0x9b, 0x35, 0xbf, 0x19, 0xa2, 0x1d, 0x98, 0xea, 0x04, 0x64, 0x93, - 0x04, 0xaa, 0xa8, 0x62, 0x5d, 0x2c, 0x5f, 0x1e, 0x7b, 0xed, 0x72, 0xe6, 0xd8, 0x9b, 0xa8, 0xcb, - 0x5e, 0x14, 0xec, 0x2d, 0x9c, 0x11, 0xed, 0x4d, 0x25, 0xa0, 0x38, 0x49, 0xd9, 0xfe, 0x67, 0x25, - 0x38, 0x35, 0xff, 0xa8, 0x1b, 0x90, 0x25, 0x37, 0xdc, 0x49, 0x6e, 0xb8, 0xa6, 0x1b, 0xee, 0xac, - 0xc7, 0x23, 0xa0, 0x56, 0xfa, 0x92, 0x28, 0xc7, 0x0a, 0x03, 0xbd, 0x0a, 0xc3, 0xf4, 0xf7, 0x1d, - 0xbc, 0x2a, 0x3e, 0xf9, 0x84, 0x40, 0x1e, 0x5b, 0x72, 0x22, 0x67, 0x89, 0x83, 0xb0, 0xc4, 0x41, - 0x6b, 0x30, 0xd6, 0x60, 0xfc, 0x61, 0x6b, 0xcd, 0x6f, 0x12, 0xb6, 0xb6, 0x46, 0x17, 0x5e, 0xa6, - 0xe8, 0x8b, 0x71, 0xf1, 0xe1, 0x7e, 0xb5, 0xc2, 0xfb, 0x26, 0x48, 0x68, 0x30, 0xac, 0xd7, 0x47, - 0xb6, 0xda, 0xee, 0x03, 0x8c, 0x12, 0x64, 0x6c, 0xf5, 0xcb, 0xda, 0xce, 0x1d, 0x64, 0x3b, 0x77, - 0x3c, 0x7b, 0xd7, 0xa2, 0xab, 0x30, 0xb0, 0xe3, 0x7a, 0xcd, 0xca, 0x10, 0xa3, 0x75, 0x9e, 0xce, - 0xf9, 0x4d, 0xd7, 0x6b, 0x1e, 0xee, 0x57, 0x67, 0x8c, 0xee, 0xd0, 0x42, 0xcc, 0x50, 0xed, 0xff, - 0xcb, 0x82, 0x2a, 0x83, 0xad, 0xb8, 0x2d, 0x52, 0x23, 0x41, 0xe8, 0x86, 0x11, 0xf1, 0x22, 0x63, - 0x40, 0x5f, 0x03, 0x08, 0x49, 0x23, 0x20, 0x91, 0x36, 0xa4, 0x6a, 0x61, 0xd4, 0x15, 0x04, 0x6b, - 0x58, 0x94, 0x3f, 0x85, 0xdb, 0x4e, 0xc0, 0xd6, 0x97, 0x18, 0x58, 0xc5, 0x9f, 0xea, 0x12, 0x80, - 0x63, 0x1c, 0x83, 0x3f, 0x95, 0x7b, 0xf1, 0x27, 0xf4, 0x25, 0x98, 0x8a, 0x1b, 0x0b, 0x3b, 0x4e, - 0x43, 0x0e, 0x20, 0xdb, 0xc1, 0x75, 0x13, 0x84, 0x93, 0xb8, 0xf6, 0x7f, 0x6e, 0x89, 0xc5, 0x43, - 0xbf, 0xfa, 0x13, 0xfe, 0xad, 0xf6, 0x3f, 0xb2, 0x60, 0x78, 0xc1, 0xf5, 0x9a, 0xae, 0xb7, 0x85, - 0xbe, 0x09, 0x23, 0xf4, 0xa8, 0x6c, 0x3a, 0x91, 0x23, 0xd8, 0xf0, 0xe7, 0xb4, 0xbd, 0xa5, 0x4e, - 0xae, 0xb9, 0xce, 0xce, 0x16, 0x2d, 0x08, 0xe7, 0x28, 0x36, 0xdd, 0x6d, 0xb7, 0xef, 0x7f, 0x8b, - 0x34, 0xa2, 0x35, 0x12, 0x39, 0xf1, 0xe7, 0xc4, 0x65, 0x58, 0x51, 0x45, 0x37, 0x61, 0x28, 0x72, - 0x82, 0x2d, 0x12, 0x09, 0x7e, 0x9c, 0xc9, 0x37, 0x79, 0x4d, 0x4c, 0x77, 0x24, 0xf1, 0x1a, 0x24, - 0x3e, 0xa5, 0x36, 0x58, 0x55, 0x2c, 0x48, 0xd8, 0xff, 0xdf, 0x30, 0x9c, 0x5d, 0xac, 0xaf, 0xe6, - 0xac, 0xab, 0x4b, 0x30, 0xd4, 0x0c, 0xdc, 0x5d, 0x12, 0x88, 0x71, 0x56, 0x54, 0x96, 0x58, 0x29, - 0x16, 0x50, 0x74, 0x0d, 0xc6, 0xf9, 0xf9, 0x78, 0xc3, 0xf1, 0x9a, 0x31, 0x7b, 0x14, 0xd8, 0xe3, - 0x77, 0x35, 0x18, 0x36, 0x30, 0x8f, 0xb8, 0xa8, 0x2e, 0x25, 0x36, 0x63, 0xde, 0xd9, 0xfb, 0x5d, - 0x0b, 0xa6, 0x79, 0x33, 0xf3, 0x51, 0x14, 0xb8, 0xf7, 0xbb, 0x11, 0x09, 0x2b, 0x83, 0x8c, 0xd3, - 0x2d, 0x66, 0x8d, 0x56, 0xee, 0x08, 0xcc, 0xdd, 0x4d, 0x50, 0xe1, 0x4c, 0xb0, 0x22, 0xda, 0x9d, - 0x4e, 0x82, 0x71, 0xaa, 0x59, 0xf4, 0x17, 0x2d, 0x98, 0x6d, 0xf8, 0x5e, 0x14, 0xf8, 0xad, 0x16, - 0x09, 0x6a, 0xdd, 0xfb, 0x2d, 0x37, 0xdc, 0xe6, 0xeb, 0x14, 0x93, 0x4d, 0xc6, 0x09, 0x72, 0xe6, - 0x50, 0x21, 0x89, 0x39, 0xbc, 0x70, 0xb0, 0x5f, 0x9d, 0x5d, 0xcc, 0x25, 0x85, 0x0b, 0x9a, 0x41, - 0x3b, 0x80, 0xe8, 0xc9, 0x5e, 0x8f, 0x9c, 0x2d, 0x12, 0x37, 0x3e, 0xdc, 0x7f, 0xe3, 0xa7, 0x0f, - 0xf6, 0xab, 0x68, 0x3d, 0x45, 0x02, 0x67, 0x90, 0x45, 0x1f, 0xc1, 0x49, 0x5a, 0x9a, 0xfa, 0xd6, - 0x91, 0xfe, 0x9b, 0xab, 0x1c, 0xec, 0x57, 0x4f, 0xae, 0x67, 0x10, 0xc1, 0x99, 0xa4, 0xd1, 0x8f, - 0x5b, 0x70, 0x36, 0xfe, 0xfc, 0xe5, 0x87, 0x1d, 0xc7, 0x6b, 0xc6, 0x0d, 0x8f, 0xf6, 0xdf, 0x30, - 0xe5, 0xc9, 0x67, 0x17, 0xf3, 0x28, 0xe1, 0xfc, 0x46, 0x90, 0x07, 0x27, 0x68, 0xd7, 0x92, 0x6d, - 0x43, 0xff, 0x6d, 0x9f, 0x39, 0xd8, 0xaf, 0x9e, 0x58, 0x4f, 0xd3, 0xc0, 0x59, 0x84, 0x67, 0x17, - 0xe1, 0x54, 0xe6, 0xea, 0x44, 0xd3, 0x50, 0xde, 0x21, 0x5c, 0x08, 0x1c, 0xc5, 0xf4, 0x27, 0x3a, - 0x09, 0x83, 0xbb, 0x4e, 0xab, 0x2b, 0x36, 0x26, 0xe6, 0x7f, 0xde, 0x2a, 0x5d, 0xb3, 0xec, 0xff, - 0xbe, 0x0c, 0x53, 0x8b, 0xf5, 0xd5, 0xc7, 0xda, 0xf5, 0xfa, 0xb1, 0x57, 0x2a, 0x3c, 0xf6, 0xe2, - 0x43, 0xb4, 0x9c, 0x7b, 0x88, 0xfe, 0x58, 0xc6, 0x96, 0x1d, 0x60, 0x5b, 0xf6, 0x8b, 0x39, 0x5b, - 0xf6, 0x09, 0x6f, 0xd4, 0xdd, 0x9c, 0x55, 0x3b, 0xc8, 0x26, 0x30, 0x53, 0x42, 0x62, 0xb2, 0x5f, - 0x92, 0xd5, 0x1e, 0x71, 0xe9, 0x3e, 0x99, 0x79, 0x6c, 0xc0, 0xf8, 0xa2, 0xd3, 0x71, 0xee, 0xbb, - 0x2d, 0x37, 0x72, 0x49, 0x88, 0x5e, 0x84, 0xb2, 0xd3, 0x6c, 0x32, 0xe9, 0x6e, 0x74, 0xe1, 0xd4, - 0xc1, 0x7e, 0xb5, 0x3c, 0xdf, 0xa4, 0x62, 0x06, 0x28, 0xac, 0x3d, 0x4c, 0x31, 0xd0, 0x67, 0x61, - 0xa0, 0x19, 0xf8, 0x9d, 0x4a, 0x89, 0x61, 0xd2, 0x5d, 0x3e, 0xb0, 0x14, 0xf8, 0x9d, 0x04, 0x2a, - 0xc3, 0xb1, 0x7f, 0xbb, 0x04, 0xe7, 0x16, 0x49, 0x67, 0x7b, 0xa5, 0x9e, 0x73, 0x5e, 0x5c, 0x86, - 0x91, 0xb6, 0xef, 0xb9, 0x91, 0x1f, 0x84, 0xa2, 0x69, 0xb6, 0x22, 0xd6, 0x44, 0x19, 0x56, 0x50, - 0x74, 0x11, 0x06, 0x3a, 0xb1, 0x10, 0x3b, 0x2e, 0x05, 0x60, 0x26, 0xbe, 0x32, 0x08, 0xc5, 0xe8, - 0x86, 0x24, 0x10, 0x2b, 0x46, 0x61, 0xdc, 0x09, 0x49, 0x80, 0x19, 0x24, 0x96, 0x04, 0xa8, 0x8c, - 0x20, 0x4e, 0x84, 0x84, 0x24, 0x40, 0x21, 0x58, 0xc3, 0x42, 0x35, 0x18, 0x0d, 0x13, 0x33, 0xdb, - 0xd7, 0xd6, 0x9c, 0x60, 0xa2, 0x82, 0x9a, 0xc9, 0x98, 0x88, 0x71, 0x82, 0x0d, 0xf5, 0x14, 0x15, - 0x7e, 0xa3, 0x04, 0x88, 0x0f, 0xe1, 0x9f, 0xb1, 0x81, 0xbb, 0x93, 0x1e, 0xb8, 0xfe, 0xb7, 0xc4, - 0x93, 0x1a, 0xbd, 0xff, 0xdb, 0x82, 0x73, 0x8b, 0xae, 0xd7, 0x24, 0x41, 0xce, 0x02, 0x7c, 0x3a, - 0x57, 0xf9, 0xa3, 0x09, 0x29, 0xc6, 0x12, 0x1b, 0x78, 0x02, 0x4b, 0xcc, 0xfe, 0xb7, 0x16, 0x20, - 0xfe, 0xd9, 0x9f, 0xb8, 0x8f, 0xbd, 0x93, 0xfe, 0xd8, 0x27, 0xb0, 0x2c, 0xec, 0x5b, 0x30, 0xb9, - 0xd8, 0x72, 0x89, 0x17, 0xad, 0xd6, 0x16, 0x7d, 0x6f, 0xd3, 0xdd, 0x42, 0x6f, 0xc1, 0x64, 0xe4, - 0xb6, 0x89, 0xdf, 0x8d, 0xea, 0xa4, 0xe1, 0x7b, 0xec, 0xe6, 0x6a, 0x5d, 0x1e, 0x5c, 0x40, 0x07, - 0xfb, 0xd5, 0xc9, 0x0d, 0x03, 0x82, 0x13, 0x98, 0xf6, 0xdf, 0xa5, 0x7c, 0xab, 0xd5, 0x0d, 0x23, - 0x12, 0x6c, 0x04, 0xdd, 0x30, 0x5a, 0xe8, 0x52, 0xd9, 0xb3, 0x16, 0xf8, 0xb4, 0x3b, 0xae, 0xef, - 0xa1, 0x73, 0xc6, 0x75, 0x7c, 0x44, 0x5e, 0xc5, 0xc5, 0xb5, 0x7b, 0x0e, 0x20, 0x74, 0xb7, 0x3c, - 0x12, 0x68, 0xd7, 0x87, 0x49, 0xb6, 0x55, 0x54, 0x29, 0xd6, 0x30, 0x50, 0x0b, 0x26, 0x5a, 0xce, - 0x7d, 0xd2, 0xaa, 0x93, 0x16, 0x69, 0x44, 0x7e, 0x20, 0xf4, 0x1b, 0xaf, 0xf7, 0x77, 0x0f, 0xb8, - 0xa5, 0x57, 0x5d, 0x98, 0x39, 0xd8, 0xaf, 0x4e, 0x18, 0x45, 0xd8, 0x24, 0x4e, 0x59, 0x87, 0xdf, - 0xa1, 0x5f, 0xe1, 0xb4, 0xf4, 0xcb, 0xe7, 0x6d, 0x51, 0x86, 0x15, 0x54, 0xb1, 0x8e, 0x81, 0x3c, - 0xd6, 0x61, 0xff, 0x4b, 0xba, 0xd0, 0xfc, 0x76, 0xc7, 0xf7, 0x88, 0x17, 0x2d, 0xfa, 0x5e, 0x93, - 0x6b, 0xa6, 0xde, 0x32, 0x54, 0x27, 0x97, 0x12, 0xaa, 0x93, 0xd3, 0xe9, 0x1a, 0x9a, 0xf6, 0xe4, - 0x8b, 0x30, 0x14, 0x46, 0x4e, 0xd4, 0x0d, 0xc5, 0xc0, 0x3d, 0x2b, 0x97, 0x5d, 0x9d, 0x95, 0x1e, - 0xee, 0x57, 0xa7, 0x54, 0x35, 0x5e, 0x84, 0x45, 0x05, 0xf4, 0x12, 0x0c, 0xb7, 0x49, 0x18, 0x3a, - 0x5b, 0x52, 0x6c, 0x98, 0x12, 0x75, 0x87, 0xd7, 0x78, 0x31, 0x96, 0x70, 0xf4, 0x1c, 0x0c, 0x92, - 0x20, 0xf0, 0x03, 0xf1, 0x6d, 0x13, 0x02, 0x71, 0x70, 0x99, 0x16, 0x62, 0x0e, 0xb3, 0xff, 0x27, - 0x0b, 0xa6, 0x54, 0x5f, 0x79, 0x5b, 0xc7, 0x70, 0x5d, 0xfb, 0x2a, 0x40, 0x43, 0x7e, 0x60, 0xc8, - 0x8e, 0xd9, 0xb1, 0xd7, 0x2e, 0x65, 0x4a, 0x34, 0xa9, 0x61, 0x8c, 0x29, 0xab, 0xa2, 0x10, 0x6b, - 0xd4, 0xec, 0xdf, 0xb4, 0xe0, 0x44, 0xe2, 0x8b, 0x6e, 0xb9, 0x61, 0x84, 0x3e, 0x4c, 0x7d, 0xd5, - 0x5c, 0x9f, 0x8b, 0xcf, 0x0d, 0xf9, 0x37, 0xa9, 0x3d, 0x2f, 0x4b, 0xb4, 0x2f, 0xba, 0x01, 0x83, - 0x6e, 0x44, 0xda, 0xf2, 0x63, 0x9e, 0x2b, 0xfc, 0x18, 0xde, 0xab, 0x78, 0x46, 0x56, 0x69, 0x4d, - 0xcc, 0x09, 0xd8, 0xbf, 0x5d, 0x86, 0x51, 0xbe, 0xbf, 0xd7, 0x9c, 0xce, 0x31, 0xcc, 0xc5, 0xcb, - 0x30, 0xea, 0xb6, 0xdb, 0xdd, 0xc8, 0xb9, 0x2f, 0xce, 0xbd, 0x11, 0xce, 0x83, 0x56, 0x65, 0x21, - 0x8e, 0xe1, 0x68, 0x15, 0x06, 0x58, 0x57, 0xf8, 0x57, 0xbe, 0x98, 0xfd, 0x95, 0xa2, 0xef, 0x73, - 0x4b, 0x4e, 0xe4, 0x70, 0x91, 0x53, 0xed, 0x2b, 0x5a, 0x84, 0x19, 0x09, 0xe4, 0x00, 0xdc, 0x77, - 0x3d, 0x27, 0xd8, 0xa3, 0x65, 0x95, 0x32, 0x23, 0xf8, 0x6a, 0x31, 0xc1, 0x05, 0x85, 0xcf, 0xc9, - 0xaa, 0x0f, 0x8b, 0x01, 0x58, 0x23, 0x3a, 0xfb, 0x05, 0x18, 0x55, 0xc8, 0x47, 0x91, 0x1c, 0x67, - 0xbf, 0x04, 0x53, 0x89, 0xb6, 0x7a, 0x55, 0x1f, 0xd7, 0x05, 0xcf, 0x7f, 0xcc, 0x58, 0x86, 0xe8, - 0xf5, 0xb2, 0xb7, 0x2b, 0xce, 0xa6, 0x47, 0x70, 0xb2, 0x95, 0xc1, 0xf2, 0xc5, 0xbc, 0xf6, 0x7f, - 0x44, 0x9c, 0x13, 0x9f, 0x7d, 0x32, 0x0b, 0x8a, 0x33, 0xdb, 0x30, 0x38, 0x62, 0xa9, 0x88, 0x23, - 0x52, 0x7e, 0x77, 0x52, 0x75, 0xfe, 0x26, 0xd9, 0x53, 0x4c, 0xf5, 0x07, 0xd9, 0xfd, 0xf3, 0x7c, - 0xf4, 0x39, 0xbb, 0x1c, 0x13, 0x04, 0xca, 0x37, 0xc9, 0x1e, 0x9f, 0x0a, 0xfd, 0xeb, 0xca, 0x85, - 0x5f, 0xf7, 0x2b, 0x16, 0x4c, 0xa8, 0xaf, 0x3b, 0x06, 0xbe, 0xb0, 0x60, 0xf2, 0x85, 0xf3, 0x85, - 0x0b, 0x3c, 0x87, 0x23, 0xfc, 0x46, 0x09, 0xce, 0x2a, 0x1c, 0x7a, 0x89, 0xe2, 0x7f, 0xc4, 0xaa, - 0xba, 0x02, 0xa3, 0x9e, 0x52, 0x27, 0x5a, 0xa6, 0x1e, 0x2f, 0x56, 0x26, 0xc6, 0x38, 0xf4, 0xc8, - 0xf3, 0xe2, 0x43, 0x7b, 0x5c, 0xd7, 0xb3, 0x8b, 0xc3, 0x7d, 0x01, 0xca, 0x5d, 0xb7, 0x29, 0x0e, - 0x98, 0xcf, 0xc9, 0xd1, 0xbe, 0xb3, 0xba, 0x74, 0xb8, 0x5f, 0x7d, 0x36, 0xcf, 0xe4, 0x44, 0x4f, - 0xb6, 0x70, 0xee, 0xce, 0xea, 0x12, 0xa6, 0x95, 0xd1, 0x3c, 0x4c, 0x49, 0xab, 0xda, 0x5d, 0x2a, - 0x97, 0xfa, 0x9e, 0x38, 0x87, 0x94, 0xb2, 0x1c, 0x9b, 0x60, 0x9c, 0xc4, 0x47, 0x4b, 0x30, 0xbd, - 0xd3, 0xbd, 0x4f, 0x5a, 0x24, 0xe2, 0x1f, 0x7c, 0x93, 0x70, 0x55, 0xf2, 0x68, 0x7c, 0x85, 0xbd, - 0x99, 0x80, 0xe3, 0x54, 0x0d, 0xfb, 0x4f, 0xd9, 0x79, 0x20, 0x46, 0x4f, 0x93, 0x6f, 0x7e, 0x90, - 0xcb, 0xb9, 0x9f, 0x55, 0x71, 0x93, 0xec, 0x6d, 0xf8, 0x54, 0x0e, 0xc9, 0x5e, 0x15, 0xc6, 0x9a, - 0x1f, 0x28, 0x5c, 0xf3, 0xbf, 0x56, 0x82, 0x53, 0x6a, 0x04, 0x0c, 0x69, 0xf9, 0xcf, 0xfa, 0x18, - 0x5c, 0x85, 0xb1, 0x26, 0xd9, 0x74, 0xba, 0xad, 0x48, 0xd9, 0x35, 0x06, 0xb9, 0xa9, 0x6d, 0x29, - 0x2e, 0xc6, 0x3a, 0xce, 0x11, 0x86, 0xed, 0x6f, 0x4d, 0xb2, 0x83, 0x38, 0x72, 0xe8, 0x1a, 0x57, - 0xbb, 0xc6, 0xca, 0xdd, 0x35, 0xcf, 0xc1, 0xa0, 0xdb, 0xa6, 0x82, 0x59, 0xc9, 0x94, 0xb7, 0x56, - 0x69, 0x21, 0xe6, 0x30, 0xf4, 0x02, 0x0c, 0x37, 0xfc, 0x76, 0xdb, 0xf1, 0x9a, 0xec, 0xc8, 0x1b, - 0x5d, 0x18, 0xa3, 0xb2, 0xdb, 0x22, 0x2f, 0xc2, 0x12, 0x46, 0x85, 0x6f, 0x27, 0xd8, 0xe2, 0xca, - 0x1e, 0x21, 0x7c, 0xcf, 0x07, 0x5b, 0x21, 0x66, 0xa5, 0xf4, 0xae, 0xfa, 0xc0, 0x0f, 0x76, 0x5c, - 0x6f, 0x6b, 0xc9, 0x0d, 0xc4, 0x96, 0x50, 0x67, 0xe1, 0x3d, 0x05, 0xc1, 0x1a, 0x16, 0x5a, 0x81, - 0xc1, 0x8e, 0x1f, 0x44, 0x61, 0x65, 0x88, 0x0d, 0xf7, 0xb3, 0x39, 0x8c, 0x88, 0x7f, 0x6d, 0xcd, - 0x0f, 0xa2, 0xf8, 0x03, 0xe8, 0xbf, 0x10, 0xf3, 0xea, 0xe8, 0x16, 0x0c, 0x13, 0x6f, 0x77, 0x25, - 0xf0, 0xdb, 0x95, 0x13, 0xf9, 0x94, 0x96, 0x39, 0x0a, 0x5f, 0x66, 0xb1, 0x8c, 0x2a, 0x8a, 0xb1, - 0x24, 0x81, 0xbe, 0x08, 0x65, 0xe2, 0xed, 0x56, 0x86, 0x19, 0xa5, 0xd9, 0x1c, 0x4a, 0x77, 0x9d, - 0x20, 0xe6, 0xf9, 0xcb, 0xde, 0x2e, 0xa6, 0x75, 0xd0, 0x57, 0x60, 0x54, 0x32, 0x8c, 0x50, 0x68, - 0x51, 0x33, 0x17, 0xac, 0x64, 0x33, 0x98, 0x7c, 0xd4, 0x75, 0x03, 0xd2, 0x26, 0x5e, 0x14, 0xc6, - 0x1c, 0x52, 0x42, 0x43, 0x1c, 0x53, 0x43, 0x0d, 0x18, 0x0f, 0x48, 0xe8, 0x3e, 0x22, 0x35, 0xbf, - 0xe5, 0x36, 0xf6, 0x2a, 0x67, 0x58, 0xf7, 0x5e, 0x2a, 0x1c, 0x32, 0xac, 0x55, 0x88, 0xb5, 0xfc, - 0x7a, 0x29, 0x36, 0x88, 0xa2, 0x0f, 0x60, 0x22, 0x20, 0x61, 0xe4, 0x04, 0x91, 0x68, 0xa5, 0xa2, - 0xac, 0x72, 0x13, 0x58, 0x07, 0xf0, 0xeb, 0x44, 0xdc, 0x4c, 0x0c, 0xc1, 0x26, 0x05, 0x14, 0x01, - 0x32, 0x0a, 0x70, 0xb7, 0x45, 0xc2, 0xca, 0xd9, 0x7c, 0x6b, 0x66, 0x92, 0x2c, 0xad, 0xb0, 0x30, - 0x2b, 0x3a, 0x8f, 0x70, 0x8a, 0x16, 0xce, 0xa0, 0x8f, 0xbe, 0x22, 0x0d, 0x1d, 0x6b, 0x7e, 0xd7, - 0x8b, 0xc2, 0xca, 0x28, 0x6b, 0x2f, 0xd3, 0x22, 0x7e, 0x37, 0xc6, 0x4b, 0x5a, 0x42, 0x78, 0x65, - 0x6c, 0x90, 0x42, 0x5f, 0x87, 0x09, 0xfe, 0x9f, 0x1b, 0x72, 0xc3, 0xca, 0x29, 0x46, 0xfb, 0x62, - 0x3e, 0x6d, 0x8e, 0xb8, 0x70, 0x4a, 0x10, 0x9f, 0xd0, 0x4b, 0x43, 0x6c, 0x52, 0x43, 0x18, 0x26, - 0x5a, 0xee, 0x2e, 0xf1, 0x48, 0x18, 0xd6, 0x02, 0xff, 0x3e, 0x11, 0x7a, 0xe9, 0xb3, 0xd9, 0x86, - 0x5f, 0xff, 0x3e, 0x11, 0x57, 0x4f, 0xbd, 0x0e, 0x36, 0x49, 0xa0, 0x3b, 0x30, 0x19, 0x10, 0xa7, - 0xe9, 0xc6, 0x44, 0xc7, 0x7a, 0x11, 0x65, 0xd7, 0x75, 0x6c, 0x54, 0xc2, 0x09, 0x22, 0xe8, 0x36, - 0x8c, 0xb3, 0x81, 0xef, 0x76, 0x38, 0xd1, 0xd3, 0xbd, 0x88, 0x32, 0x37, 0x86, 0xba, 0x56, 0x05, - 0x1b, 0x04, 0xd0, 0xfb, 0x30, 0xda, 0x72, 0x37, 0x49, 0x63, 0xaf, 0xd1, 0x22, 0x95, 0x71, 0x46, - 0x2d, 0x93, 0x05, 0xdf, 0x92, 0x48, 0xfc, 0x56, 0xa0, 0xfe, 0xe2, 0xb8, 0x3a, 0xba, 0x0b, 0xa7, - 0x23, 0x12, 0xb4, 0x5d, 0xcf, 0xa1, 0xac, 0x53, 0x5c, 0x44, 0x99, 0x3d, 0x7e, 0x82, 0xad, 0xe9, - 0x0b, 0x62, 0x36, 0x4e, 0x6f, 0x64, 0x62, 0xe1, 0x9c, 0xda, 0xe8, 0x21, 0x54, 0x32, 0x20, 0x7c, - 0xb7, 0x9c, 0x64, 0x94, 0xdf, 0x11, 0x94, 0x2b, 0x1b, 0x39, 0x78, 0x87, 0x05, 0x30, 0x9c, 0x4b, - 0x1d, 0xdd, 0x86, 0x29, 0xc6, 0xaf, 0x6b, 0xdd, 0x56, 0x4b, 0x34, 0x38, 0xc9, 0x1a, 0x7c, 0x41, - 0x4a, 0x2f, 0xab, 0x26, 0xf8, 0x70, 0xbf, 0x0a, 0xf1, 0x3f, 0x9c, 0xac, 0x8d, 0xee, 0x33, 0xd3, - 0x6f, 0x37, 0x70, 0xa3, 0x3d, 0xba, 0xe9, 0xc8, 0xc3, 0xa8, 0x32, 0x55, 0xa8, 0x06, 0xd3, 0x51, - 0x95, 0x7d, 0x58, 0x2f, 0xc4, 0x49, 0x82, 0xf4, 0x00, 0x0a, 0xa3, 0xa6, 0xeb, 0x55, 0xa6, 0xf9, - 0x2d, 0x4e, 0xf2, 0xef, 0x3a, 0x2d, 0xc4, 0x1c, 0xc6, 0xcc, 0xbe, 0xf4, 0xc7, 0x6d, 0x7a, 0xce, - 0xcf, 0x30, 0xc4, 0xd8, 0xec, 0x2b, 0x01, 0x38, 0xc6, 0xa1, 0xa2, 0x77, 0x14, 0xed, 0x55, 0x10, - 0x43, 0x55, 0x6c, 0x78, 0x63, 0xe3, 0x2b, 0x98, 0x96, 0xdb, 0xbf, 0x6b, 0xc1, 0x45, 0xc5, 0x46, - 0x96, 0x1f, 0x46, 0xc4, 0x6b, 0x92, 0xa6, 0xce, 0x73, 0x49, 0x18, 0xa1, 0xb7, 0x61, 0xa2, 0x21, - 0x71, 0x34, 0x13, 0xb5, 0xda, 0xa5, 0x8b, 0x3a, 0x10, 0x9b, 0xb8, 0xe8, 0x1a, 0xe3, 0xc6, 0x8c, - 0x9e, 0xa6, 0x6c, 0xd2, 0x59, 0xac, 0x82, 0x61, 0x03, 0x13, 0xbd, 0x09, 0x63, 0x01, 0xef, 0x01, - 0xab, 0x58, 0x36, 0x3d, 0x25, 0x70, 0x0c, 0xc2, 0x3a, 0x9e, 0x7d, 0x1f, 0x26, 0x55, 0x87, 0xd8, - 0x34, 0xa3, 0x2a, 0x0c, 0x32, 0xf9, 0x59, 0xe8, 0xa1, 0x47, 0xe9, 0xa8, 0x32, 0xd9, 0x1a, 0xf3, - 0x72, 0x36, 0xaa, 0xee, 0x23, 0xb2, 0xb0, 0x17, 0x11, 0xae, 0xd4, 0x29, 0x6b, 0xa3, 0x2a, 0x01, - 0x38, 0xc6, 0xb1, 0xff, 0x7f, 0x7e, 0x0f, 0x89, 0x8f, 0xdb, 0x3e, 0x04, 0x8c, 0x57, 0x60, 0x84, - 0x79, 0xd0, 0xf8, 0x01, 0x37, 0x73, 0x0f, 0xc6, 0x37, 0x8f, 0x1b, 0xa2, 0x1c, 0x2b, 0x0c, 0x63, - 0xcc, 0x59, 0x15, 0x2e, 0x1d, 0xa5, 0xc7, 0x9c, 0xd5, 0x33, 0x71, 0xd1, 0x35, 0x18, 0x61, 0xce, - 0x62, 0x0d, 0xbf, 0x25, 0xc4, 0x76, 0x29, 0xe2, 0x8d, 0xd4, 0x44, 0xf9, 0xa1, 0xf6, 0x1b, 0x2b, - 0x6c, 0x74, 0x09, 0x86, 0x68, 0x17, 0x56, 0x6b, 0x42, 0x2e, 0x51, 0x2a, 0xd5, 0x1b, 0xac, 0x14, - 0x0b, 0xa8, 0xfd, 0x9b, 0x16, 0x13, 0x4a, 0xd3, 0x87, 0x27, 0xba, 0x91, 0x98, 0x6f, 0x3e, 0x20, - 0xcf, 0x67, 0xcd, 0xf7, 0x61, 0xf1, 0xfc, 0x7f, 0x35, 0x79, 0xc4, 0xf2, 0xa5, 0xf3, 0x86, 0x1c, - 0x82, 0xe4, 0x31, 0xfb, 0x4c, 0xbc, 0x6e, 0x69, 0x7f, 0x8a, 0xce, 0x5a, 0xfb, 0xb7, 0xf8, 0x35, - 0x39, 0x75, 0x7c, 0xa2, 0x25, 0x18, 0x72, 0xd8, 0x0d, 0x43, 0x74, 0xfc, 0x15, 0x39, 0x00, 0xf3, - 0xac, 0xf4, 0x50, 0xd8, 0xab, 0x93, 0xf5, 0x38, 0x14, 0x8b, 0xba, 0xe8, 0x9b, 0x30, 0x4a, 0x1e, - 0xba, 0xd1, 0xa2, 0xdf, 0x14, 0x0b, 0xca, 0xd4, 0x95, 0x16, 0x9e, 0xe0, 0xb7, 0xbd, 0x65, 0x59, - 0x95, 0x33, 0x6d, 0xf5, 0x17, 0xc7, 0x44, 0xed, 0x9f, 0xb3, 0xa0, 0xda, 0xa3, 0x36, 0xba, 0x47, - 0x85, 0x65, 0x12, 0x38, 0x91, 0x2f, 0xed, 0x9e, 0x6f, 0xcb, 0x65, 0x70, 0x5b, 0x94, 0x1f, 0xee, - 0x57, 0x5f, 0xec, 0x41, 0x46, 0xa2, 0x62, 0x45, 0x0c, 0xd9, 0x30, 0xc4, 0xd4, 0x25, 0x5c, 0xfa, - 0x1f, 0xe4, 0xc6, 0xcf, 0xbb, 0xac, 0x04, 0x0b, 0x88, 0xfd, 0x57, 0x4a, 0xda, 0x3e, 0xac, 0x47, - 0x4e, 0x44, 0x50, 0x0d, 0x86, 0x1f, 0x38, 0x6e, 0xe4, 0x7a, 0x5b, 0xe2, 0x8a, 0x52, 0x2c, 0x93, - 0xb1, 0x4a, 0xf7, 0x78, 0x05, 0x2e, 0x68, 0x8b, 0x3f, 0x58, 0x92, 0xa1, 0x14, 0x83, 0xae, 0xe7, - 0x51, 0x8a, 0xa5, 0x7e, 0x29, 0x62, 0x5e, 0x81, 0x53, 0x14, 0x7f, 0xb0, 0x24, 0x83, 0x3e, 0x04, - 0x90, 0xc7, 0x0a, 0x69, 0x0a, 0x35, 0xf7, 0x2b, 0xbd, 0x89, 0x6e, 0xa8, 0x3a, 0x5c, 0x8f, 0x1e, - 0xff, 0xc7, 0x1a, 0x3d, 0x3b, 0xd2, 0x76, 0x8d, 0xde, 0x19, 0xf4, 0x35, 0xca, 0xd7, 0x9d, 0x20, - 0x22, 0xcd, 0xf9, 0x48, 0x0c, 0xce, 0x67, 0xfb, 0xd3, 0x63, 0x6c, 0xb8, 0x6d, 0xa2, 0x9f, 0x01, - 0x82, 0x08, 0x8e, 0xe9, 0xd9, 0xbf, 0x5e, 0x86, 0x4a, 0x5e, 0x77, 0x29, 0x5b, 0x92, 0xab, 0x4a, - 0xd8, 0x1f, 0x14, 0x5b, 0x92, 0x4b, 0x00, 0x2b, 0x0c, 0xca, 0x1f, 0x42, 0x77, 0x4b, 0xaa, 0xa1, - 0x06, 0x63, 0xfe, 0x50, 0x67, 0xa5, 0x58, 0x40, 0x29, 0x5e, 0x40, 0x9c, 0x50, 0xf8, 0x89, 0x6a, - 0x7c, 0x04, 0xb3, 0x52, 0x2c, 0xa0, 0xba, 0x42, 0x7c, 0xa0, 0x87, 0x42, 0xdc, 0x18, 0xa2, 0xc1, - 0x27, 0x3b, 0x44, 0xe8, 0x1b, 0x00, 0x9b, 0xae, 0xe7, 0x86, 0xdb, 0x8c, 0xfa, 0xd0, 0x91, 0xa9, - 0xab, 0xfb, 0xdb, 0x8a, 0xa2, 0x82, 0x35, 0x8a, 0xf4, 0x2c, 0x53, 0x2c, 0x7a, 0x75, 0x89, 0x79, - 0xa9, 0x68, 0x67, 0x59, 0x7c, 0x5e, 0x2d, 0x61, 0x1d, 0xcf, 0xfe, 0x56, 0x72, 0xbd, 0x88, 0x1d, - 0xa0, 0x8d, 0xaf, 0xd5, 0xef, 0xf8, 0x96, 0x8a, 0xc7, 0xd7, 0xfe, 0x17, 0xa3, 0x30, 0x65, 0x34, - 0xd6, 0x0d, 0xfb, 0x38, 0xd5, 0xae, 0x53, 0xa9, 0xc5, 0x89, 0x88, 0xd8, 0x7f, 0x76, 0xef, 0xad, - 0xa2, 0x4b, 0x36, 0x74, 0x07, 0xf0, 0xfa, 0xe8, 0x1b, 0x30, 0xda, 0x72, 0x42, 0xa6, 0x5c, 0x27, - 0x62, 0xdf, 0xf5, 0x43, 0x2c, 0xd6, 0x5d, 0x38, 0x61, 0xa4, 0x89, 0x8a, 0x9c, 0x76, 0x4c, 0x92, - 0x8a, 0x57, 0x54, 0x28, 0x97, 0x8e, 0xc8, 0xaa, 0x13, 0x54, 0x72, 0xdf, 0xc3, 0x1c, 0x26, 0x84, - 0x15, 0xba, 0x2a, 0x16, 0xe9, 0x15, 0x86, 0x2d, 0xb3, 0x41, 0x43, 0x58, 0x51, 0x30, 0x6c, 0x60, - 0xc6, 0xea, 0x83, 0xa1, 0x02, 0xf5, 0xc1, 0x4b, 0x30, 0xcc, 0x7e, 0xa8, 0x15, 0xa0, 0x66, 0x63, - 0x95, 0x17, 0x63, 0x09, 0x4f, 0x2e, 0x98, 0x91, 0xfe, 0x16, 0x0c, 0x7a, 0x01, 0x86, 0xc5, 0xa2, - 0x66, 0x1e, 0x42, 0x23, 0x9c, 0xcb, 0x89, 0x25, 0x8f, 0x25, 0x0c, 0xfd, 0xbc, 0x05, 0xc8, 0x69, - 0xb5, 0xfc, 0x06, 0xe3, 0x50, 0xea, 0x1e, 0x0e, 0xec, 0x7e, 0xf6, 0x76, 0xcf, 0x61, 0xef, 0x86, - 0x73, 0xf3, 0xa9, 0xda, 0x5c, 0xa9, 0xff, 0x96, 0xbc, 0x7e, 0xa6, 0x11, 0xf4, 0xe3, 0xfe, 0x96, - 0x1b, 0x46, 0xdf, 0xfe, 0x57, 0x89, 0xe3, 0x3f, 0xa3, 0x4b, 0xe8, 0x8e, 0xae, 0x27, 0x18, 0x3b, - 0xa2, 0x9e, 0x60, 0x22, 0x57, 0x47, 0xf0, 0xe7, 0x12, 0xb7, 0xde, 0x71, 0xf6, 0xe5, 0x2f, 0xf4, - 0xb8, 0xf5, 0x0a, 0xcb, 0x4f, 0x3f, 0x77, 0xdf, 0x9a, 0x70, 0x59, 0x98, 0x60, 0x5d, 0x2e, 0xd6, - 0xd7, 0xdc, 0x09, 0x49, 0xb0, 0x70, 0x56, 0x7a, 0x34, 0x1c, 0xea, 0xd2, 0x9d, 0xe6, 0xe2, 0xf0, - 0xe3, 0x16, 0x54, 0xd2, 0x03, 0xc4, 0xbb, 0x54, 0x99, 0x64, 0xfd, 0xb7, 0x8b, 0x46, 0x46, 0x74, - 0x5e, 0x7a, 0x66, 0x57, 0xe6, 0x73, 0x68, 0xe1, 0xdc, 0x56, 0xd0, 0x35, 0x80, 0x30, 0xf2, 0x3b, - 0x9c, 0xd7, 0xb3, 0x1b, 0xd0, 0x28, 0xf3, 0x0d, 0x82, 0xba, 0x2a, 0x3d, 0x8c, 0xcf, 0x02, 0x0d, - 0x77, 0xb6, 0x0b, 0x67, 0x72, 0x56, 0x4c, 0x86, 0x69, 0x66, 0x49, 0x37, 0xcd, 0xf4, 0x50, 0xe8, - 0xcf, 0xc9, 0x39, 0x9d, 0xfb, 0xa0, 0xeb, 0x78, 0x91, 0x1b, 0xed, 0xe9, 0xa6, 0x1c, 0x0f, 0xcc, - 0xa1, 0x44, 0x5f, 0x87, 0xc1, 0x96, 0xeb, 0x75, 0x1f, 0x8a, 0x33, 0xf6, 0x52, 0xf6, 0x9d, 0xd9, - 0xeb, 0x3e, 0x34, 0x27, 0xa7, 0x4a, 0xb7, 0x32, 0x2b, 0x3f, 0xdc, 0xaf, 0xa2, 0x34, 0x02, 0xe6, - 0x54, 0xed, 0xcf, 0xc2, 0xe4, 0x92, 0x43, 0xda, 0xbe, 0xb7, 0xec, 0x35, 0x3b, 0xbe, 0xeb, 0x45, - 0xa8, 0x02, 0x03, 0x4c, 0x7c, 0xe7, 0x47, 0xeb, 0x00, 0x1d, 0x7c, 0xcc, 0x4a, 0xec, 0x2d, 0x38, - 0xb5, 0xe4, 0x3f, 0xf0, 0x1e, 0x38, 0x41, 0x73, 0xbe, 0xb6, 0xaa, 0xa9, 0xb6, 0xd7, 0xa5, 0x6a, - 0xd5, 0xca, 0x57, 0x5c, 0x69, 0x35, 0xf9, 0x22, 0x5c, 0x71, 0x5b, 0x24, 0xc7, 0x00, 0xf1, 0xd7, - 0x4b, 0x46, 0x4b, 0x31, 0xbe, 0x32, 0x9f, 0x5b, 0xb9, 0x9e, 0x37, 0x1f, 0xc0, 0xc8, 0xa6, 0x4b, - 0x5a, 0x4d, 0x4c, 0x36, 0xc5, 0x6c, 0xbc, 0x98, 0xef, 0x9b, 0xbb, 0x42, 0x31, 0x95, 0x9d, 0x9f, - 0x29, 0x66, 0x57, 0x44, 0x65, 0xac, 0xc8, 0xa0, 0x1d, 0x98, 0x96, 0x73, 0x26, 0xa1, 0x82, 0xdf, - 0xbf, 0x54, 0xb4, 0x7c, 0x4d, 0xe2, 0xec, 0x9d, 0x02, 0x4e, 0x90, 0xc1, 0x29, 0xc2, 0xe8, 0x1c, - 0x0c, 0xb4, 0xa9, 0x64, 0x33, 0xc0, 0x86, 0x9f, 0x69, 0x62, 0x99, 0x52, 0x99, 0x95, 0xda, 0x7f, - 0xc3, 0x82, 0x33, 0xa9, 0x91, 0x11, 0xca, 0xf5, 0x27, 0x3c, 0x0b, 0x49, 0x65, 0x77, 0xa9, 0xb7, - 0xb2, 0xdb, 0xfe, 0x2f, 0x2c, 0x38, 0xb9, 0xdc, 0xee, 0x44, 0x7b, 0x4b, 0xae, 0xe9, 0x26, 0xf3, - 0x05, 0x18, 0x6a, 0x93, 0xa6, 0xdb, 0x6d, 0x8b, 0x99, 0xab, 0xca, 0xd3, 0x7f, 0x8d, 0x95, 0x52, - 0x0e, 0x52, 0x8f, 0xfc, 0xc0, 0xd9, 0x22, 0xbc, 0x00, 0x0b, 0x74, 0x26, 0x43, 0xb9, 0x8f, 0xc8, - 0x2d, 0xb7, 0xed, 0x46, 0x8f, 0xb7, 0xbb, 0x84, 0x87, 0x8b, 0x24, 0x82, 0x63, 0x7a, 0xf6, 0xf7, - 0x2d, 0x98, 0x92, 0xeb, 0x7e, 0xbe, 0xd9, 0x0c, 0x48, 0x18, 0xa2, 0x59, 0x28, 0xb9, 0x1d, 0xd1, - 0x4b, 0x10, 0xbd, 0x2c, 0xad, 0xd6, 0x70, 0xc9, 0xed, 0xc8, 0x0b, 0xb1, 0x17, 0x5f, 0xee, 0x8d, - 0x0b, 0xb1, 0xc7, 0xde, 0x4c, 0x48, 0x0c, 0x74, 0x19, 0x46, 0x3c, 0xbf, 0xc9, 0xef, 0x94, 0xc2, - 0xdd, 0x83, 0x62, 0xae, 0x8b, 0x32, 0xac, 0xa0, 0xa8, 0x06, 0xa3, 0xdc, 0x15, 0x3c, 0x5e, 0xb4, - 0x7d, 0x39, 0x94, 0xb3, 0x2f, 0xdb, 0x90, 0x35, 0x71, 0x4c, 0xc4, 0xfe, 0xa7, 0x16, 0x8c, 0xcb, - 0x2f, 0xeb, 0xf3, 0xb6, 0x4f, 0xb7, 0x56, 0x7c, 0xd3, 0x8f, 0xb7, 0x16, 0xbd, 0xad, 0x33, 0x88, - 0x71, 0x49, 0x2f, 0x1f, 0xe9, 0x92, 0x7e, 0x15, 0xc6, 0x9c, 0x4e, 0xa7, 0x66, 0xde, 0xf0, 0xd9, - 0x52, 0x9a, 0x8f, 0x8b, 0xb1, 0x8e, 0x63, 0xff, 0x6c, 0x09, 0x26, 0xe5, 0x17, 0xd4, 0xbb, 0xf7, - 0x43, 0x12, 0xa1, 0x0d, 0x18, 0x75, 0xf8, 0x2c, 0x11, 0xb9, 0xc8, 0x9f, 0xcb, 0x56, 0xe1, 0x1b, - 0x53, 0x1a, 0x0b, 0xd2, 0xf3, 0xb2, 0x36, 0x8e, 0x09, 0xa1, 0x16, 0xcc, 0x78, 0x7e, 0xc4, 0x84, - 0x2a, 0x05, 0x2f, 0xf2, 0xaa, 0x48, 0x52, 0x3f, 0x2b, 0xa8, 0xcf, 0xac, 0x27, 0xa9, 0xe0, 0x34, - 0x61, 0xb4, 0x2c, 0xcd, 0x22, 0xe5, 0x7c, 0xcd, 0xb2, 0x3e, 0x71, 0xd9, 0x56, 0x11, 0xfb, 0x9f, - 0x58, 0x30, 0x2a, 0xd1, 0x8e, 0xc3, 0x81, 0x66, 0x0d, 0x86, 0x43, 0x36, 0x09, 0x72, 0x68, 0xec, - 0xa2, 0x8e, 0xf3, 0xf9, 0x8a, 0x65, 0x45, 0xfe, 0x3f, 0xc4, 0x92, 0x06, 0xb3, 0x8a, 0xab, 0xee, - 0x7f, 0x42, 0xac, 0xe2, 0xaa, 0x3f, 0x39, 0x87, 0xd2, 0xbf, 0x61, 0x7d, 0xd6, 0xcc, 0x4c, 0xf4, - 0x4a, 0xd3, 0x09, 0xc8, 0xa6, 0xfb, 0x30, 0x79, 0xa5, 0xa9, 0xb1, 0x52, 0x2c, 0xa0, 0xe8, 0x43, - 0x18, 0x6f, 0x48, 0x73, 0x68, 0xbc, 0xc3, 0x2f, 0x15, 0x9a, 0xe6, 0x95, 0x17, 0x07, 0x57, 0xac, - 0x2f, 0x6a, 0xf5, 0xb1, 0x41, 0xcd, 0x74, 0x75, 0x2c, 0xf7, 0x72, 0x75, 0x8c, 0xe9, 0xe6, 0x3b, - 0xfe, 0xfd, 0x9c, 0x05, 0x43, 0xdc, 0x0c, 0xd6, 0x9f, 0x15, 0x52, 0x73, 0x6a, 0x89, 0xc7, 0x8e, - 0x29, 0x57, 0x84, 0x64, 0x83, 0xd6, 0x60, 0x94, 0xfd, 0x60, 0x66, 0xbc, 0x72, 0xfe, 0xc3, 0x48, - 0xde, 0xaa, 0xde, 0xc1, 0xbb, 0xb2, 0x1a, 0x8e, 0x29, 0xd8, 0x7f, 0x54, 0xa6, 0xdc, 0x2d, 0x46, - 0x35, 0x0e, 0x7d, 0xeb, 0xe9, 0x1d, 0xfa, 0xa5, 0xa7, 0x75, 0xe8, 0x6f, 0xc1, 0x54, 0x43, 0x73, - 0x81, 0x89, 0x67, 0xf2, 0x72, 0xe1, 0x22, 0xd1, 0xbc, 0x65, 0xb8, 0xca, 0x7e, 0xd1, 0x24, 0x82, - 0x93, 0x54, 0xd1, 0xd7, 0x60, 0x9c, 0xcf, 0xb3, 0x68, 0x85, 0x7b, 0x8b, 0xbe, 0x90, 0xbf, 0x5e, - 0xf4, 0x26, 0xb8, 0x89, 0x47, 0xab, 0x8e, 0x0d, 0x62, 0xa8, 0x0e, 0xb0, 0xe9, 0xb6, 0x88, 0x20, - 0x5d, 0xe0, 0xd8, 0xbd, 0xc2, 0xb1, 0x14, 0xe1, 0x49, 0xae, 0x87, 0x90, 0x55, 0xb1, 0x46, 0xc6, - 0xfe, 0x77, 0x16, 0xa0, 0xe5, 0xce, 0x36, 0x69, 0x93, 0xc0, 0x69, 0xc5, 0xe6, 0xf1, 0x9f, 0xb4, - 0xa0, 0x42, 0x52, 0xc5, 0x8b, 0x7e, 0xbb, 0x2d, 0x34, 0x0c, 0x39, 0x4a, 0xb0, 0xe5, 0x9c, 0x3a, - 0xf1, 0x2d, 0x23, 0x0f, 0x03, 0xe7, 0xb6, 0x87, 0xd6, 0xe0, 0x04, 0x3f, 0x7a, 0x0d, 0xbb, 0x82, - 0xd8, 0x11, 0xcf, 0x08, 0xc2, 0x27, 0x36, 0xd2, 0x28, 0x38, 0xab, 0x9e, 0xfd, 0x0f, 0x26, 0x21, - 0xb7, 0x17, 0x9f, 0xfa, 0x05, 0x7c, 0xea, 0x17, 0xf0, 0xa9, 0x5f, 0xc0, 0xa7, 0x7e, 0x01, 0x9f, - 0xfa, 0x05, 0x7c, 0xea, 0x17, 0xf0, 0xa9, 0x5f, 0x80, 0xe6, 0x17, 0xf0, 0x57, 0x2d, 0x38, 0xa5, - 0x0e, 0x4d, 0x43, 0xf7, 0xf0, 0xa3, 0x70, 0x82, 0x6f, 0xb7, 0xc5, 0x96, 0xe3, 0xb6, 0x37, 0x48, - 0xbb, 0xd3, 0x72, 0x22, 0xe9, 0x73, 0x78, 0x35, 0x73, 0xe5, 0x26, 0x1e, 0x36, 0x19, 0x15, 0xf9, - 0x0b, 0xd1, 0x0c, 0x00, 0xce, 0x6a, 0xc6, 0xfe, 0xf5, 0x11, 0x18, 0x5c, 0xde, 0x25, 0x5e, 0x74, - 0x0c, 0xb7, 0xb4, 0x06, 0x4c, 0xba, 0xde, 0xae, 0xdf, 0xda, 0x25, 0x4d, 0x0e, 0x3f, 0x8a, 0x32, - 0xe1, 0xb4, 0x20, 0x3d, 0xb9, 0x6a, 0x90, 0xc0, 0x09, 0x92, 0x4f, 0xc3, 0x50, 0x76, 0x1d, 0x86, - 0xf8, 0x91, 0x27, 0x84, 0xc6, 0x4c, 0x9e, 0xcd, 0x06, 0x51, 0x1c, 0xe4, 0xb1, 0x11, 0x8f, 0x1f, - 0xa9, 0xa2, 0x3a, 0xfa, 0x16, 0x4c, 0x6e, 0xba, 0x41, 0x18, 0x6d, 0xb8, 0x6d, 0x7a, 0x3e, 0xb4, - 0x3b, 0x8f, 0x61, 0x18, 0x53, 0xe3, 0xb0, 0x62, 0x50, 0xc2, 0x09, 0xca, 0x68, 0x0b, 0x26, 0x5a, - 0x8e, 0xde, 0xd4, 0xf0, 0x91, 0x9b, 0x52, 0xa7, 0xc3, 0x2d, 0x9d, 0x10, 0x36, 0xe9, 0xd2, 0xed, - 0xd4, 0x60, 0xb6, 0x9d, 0x11, 0xa6, 0x99, 0x51, 0xdb, 0x89, 0x1b, 0x75, 0x38, 0x8c, 0x8a, 0x85, - 0xec, 0x79, 0xd0, 0xa8, 0x29, 0x16, 0x6a, 0x8f, 0x80, 0xbe, 0x09, 0xa3, 0x84, 0x0e, 0x21, 0x25, - 0x2c, 0x0e, 0x98, 0x2b, 0xfd, 0xf5, 0x75, 0xcd, 0x6d, 0x04, 0xbe, 0x69, 0x92, 0x5c, 0x96, 0x94, - 0x70, 0x4c, 0x14, 0x2d, 0xc2, 0x50, 0x48, 0x02, 0x57, 0x99, 0x3d, 0x0a, 0xa6, 0x91, 0xa1, 0x71, - 0x2b, 0x3c, 0xff, 0x8d, 0x45, 0x55, 0xba, 0xbc, 0x84, 0x3b, 0xc3, 0xb8, 0xb9, 0xbc, 0x12, 0x0e, - 0x0b, 0xef, 0xc3, 0x70, 0x40, 0x5a, 0xcc, 0xe6, 0x3d, 0xd1, 0xff, 0x22, 0xe7, 0x26, 0x74, 0x5e, - 0x0f, 0x4b, 0x02, 0xe8, 0x26, 0x95, 0x57, 0xa8, 0x58, 0xe9, 0x7a, 0x5b, 0xea, 0xd1, 0x8c, 0x60, - 0xb4, 0x4a, 0x7c, 0xc7, 0x31, 0x86, 0x7c, 0x7d, 0x8e, 0x33, 0xaa, 0xa1, 0xeb, 0x30, 0xa3, 0x4a, - 0x57, 0xbd, 0x30, 0x72, 0x28, 0x83, 0xe3, 0x96, 0x07, 0xa5, 0x2a, 0xc2, 0x49, 0x04, 0x9c, 0xae, - 0x63, 0xff, 0xa2, 0x05, 0x7c, 0x9c, 0x8f, 0x41, 0x41, 0xf2, 0xae, 0xa9, 0x20, 0x39, 0x9b, 0x3b, - 0x73, 0x39, 0xca, 0x91, 0x5f, 0xb4, 0x60, 0x4c, 0x9b, 0xd9, 0x78, 0xcd, 0x5a, 0x05, 0x6b, 0xb6, - 0x0b, 0xd3, 0x74, 0xa5, 0xdf, 0xbe, 0x1f, 0x92, 0x60, 0x97, 0x34, 0xd9, 0xc2, 0x2c, 0x3d, 0xde, - 0xc2, 0x54, 0x0e, 0xfa, 0xb7, 0x12, 0x04, 0x71, 0xaa, 0x09, 0xfb, 0x9b, 0xb2, 0xab, 0xea, 0x3d, - 0x43, 0x43, 0xcd, 0x79, 0xe2, 0x3d, 0x83, 0x9a, 0x55, 0x1c, 0xe3, 0xd0, 0xad, 0xb6, 0xed, 0x87, - 0x51, 0xf2, 0x3d, 0xc3, 0x0d, 0x3f, 0x8c, 0x30, 0x83, 0xd8, 0xaf, 0x03, 0x2c, 0x3f, 0x24, 0x0d, - 0xbe, 0x62, 0xf5, 0xab, 0x96, 0x95, 0x7f, 0xd5, 0xb2, 0x7f, 0xcf, 0x82, 0xc9, 0x95, 0x45, 0xe3, - 0xe4, 0x9a, 0x03, 0xe0, 0xf7, 0xc3, 0x7b, 0xf7, 0xd6, 0xa5, 0x2f, 0x18, 0x77, 0xd6, 0x50, 0xa5, - 0x58, 0xc3, 0x40, 0x67, 0xa1, 0xdc, 0xea, 0x7a, 0x42, 0x83, 0x3b, 0x4c, 0x8f, 0xc7, 0x5b, 0x5d, - 0x0f, 0xd3, 0x32, 0xed, 0xe5, 0x69, 0xb9, 0xef, 0x97, 0xa7, 0x3d, 0x03, 0x60, 0xa1, 0x2a, 0x0c, - 0x3e, 0x78, 0xe0, 0x36, 0x79, 0x5c, 0x0f, 0xe1, 0xa7, 0x76, 0xef, 0xde, 0xea, 0x52, 0x88, 0x79, - 0xb9, 0xfd, 0xcb, 0x16, 0x4c, 0x25, 0x6e, 0xfb, 0xf4, 0xd6, 0xb8, 0xab, 0xa2, 0x2a, 0x25, 0x83, - 0xc7, 0x68, 0xf1, 0x96, 0x34, 0xac, 0x3e, 0x5e, 0x5c, 0x8b, 0x17, 0x3b, 0xe5, 0x3e, 0x5e, 0xec, - 0x14, 0xbb, 0xe1, 0x7f, 0xaf, 0x0c, 0xb3, 0x2b, 0x2d, 0xf2, 0xf0, 0x63, 0x86, 0x63, 0xe9, 0xf7, - 0xa9, 0xef, 0xd1, 0xd4, 0x77, 0x47, 0x7d, 0xce, 0xdd, 0x7b, 0x0a, 0x37, 0x61, 0x98, 0x7f, 0xba, - 0x0c, 0xce, 0x92, 0x69, 0x4c, 0xcf, 0x1f, 0x90, 0x39, 0x3e, 0x84, 0xc2, 0x98, 0xae, 0xce, 0x78, - 0x51, 0x8a, 0x25, 0xf1, 0xd9, 0xb7, 0x60, 0x5c, 0xc7, 0x3c, 0x52, 0x60, 0x85, 0xbf, 0x50, 0x86, - 0x69, 0xda, 0x83, 0xa7, 0x3a, 0x11, 0x77, 0xd2, 0x13, 0xf1, 0xa4, 0x1f, 0xd7, 0xf7, 0x9e, 0x8d, - 0x0f, 0x93, 0xb3, 0x71, 0x35, 0x6f, 0x36, 0x8e, 0x7b, 0x0e, 0xfe, 0xa2, 0x05, 0x27, 0x56, 0x5a, - 0x7e, 0x63, 0x27, 0xf1, 0x00, 0xfe, 0x4d, 0x18, 0xa3, 0x27, 0x48, 0x68, 0xc4, 0x82, 0x32, 0xa2, - 0x83, 0x09, 0x10, 0xd6, 0xf1, 0xb4, 0x6a, 0x77, 0xee, 0xac, 0x2e, 0x65, 0x05, 0x15, 0x13, 0x20, - 0xac, 0xe3, 0xd9, 0xff, 0xdc, 0x82, 0xf3, 0xd7, 0x17, 0x97, 0xe3, 0xa5, 0x98, 0x8a, 0x6b, 0x76, - 0x09, 0x86, 0x3a, 0x4d, 0xad, 0x2b, 0xb1, 0x52, 0x7e, 0x89, 0xf5, 0x42, 0x40, 0x3f, 0x29, 0x21, - 0x04, 0xef, 0x00, 0x5c, 0xc7, 0xb5, 0x45, 0x71, 0x54, 0x48, 0x1b, 0x9c, 0x95, 0x6b, 0x83, 0x7b, - 0x01, 0x86, 0xe9, 0x51, 0xe6, 0x36, 0x64, 0xbf, 0xb9, 0xbb, 0x0c, 0x2f, 0xc2, 0x12, 0x66, 0xff, - 0x82, 0x05, 0x27, 0xae, 0xbb, 0x11, 0x95, 0x33, 0x92, 0x81, 0xbb, 0xa8, 0xa0, 0x11, 0xba, 0x91, - 0x1f, 0xec, 0x25, 0x79, 0x2f, 0x56, 0x10, 0xac, 0x61, 0xf1, 0x0f, 0xda, 0x75, 0xd9, 0x93, 0xba, - 0x92, 0x69, 0xf5, 0xc4, 0xa2, 0x1c, 0x2b, 0x0c, 0x3a, 0x5e, 0x4d, 0x37, 0x60, 0x9c, 0x5e, 0x72, - 0x63, 0x35, 0x5e, 0x4b, 0x12, 0x80, 0x63, 0x1c, 0xfb, 0x8f, 0x2d, 0xa8, 0x5e, 0xe7, 0x81, 0x01, - 0x36, 0xc3, 0x1c, 0xa6, 0xfb, 0x3a, 0x8c, 0x12, 0x69, 0x9e, 0x49, 0xfa, 0x72, 0x2b, 0xbb, 0x0d, - 0x8f, 0x1f, 0xa6, 0xf0, 0xfa, 0x38, 0x33, 0x8e, 0x16, 0x66, 0x61, 0x05, 0x10, 0xd1, 0xdb, 0xd2, - 0x03, 0xaa, 0xb1, 0xc8, 0x4c, 0xcb, 0x29, 0x28, 0xce, 0xa8, 0x61, 0xff, 0x0d, 0x0b, 0x4e, 0xa9, - 0x0f, 0xfe, 0xc4, 0x7d, 0xa6, 0xfd, 0xab, 0x25, 0x98, 0xb8, 0xb1, 0xb1, 0x51, 0xbb, 0x4e, 0x22, - 0x6d, 0x55, 0x16, 0x3b, 0x5d, 0x60, 0xcd, 0x76, 0x5c, 0x74, 0xad, 0xed, 0x46, 0x6e, 0x6b, 0x8e, - 0x87, 0x09, 0x9d, 0x5b, 0xf5, 0xa2, 0xdb, 0x41, 0x3d, 0x0a, 0x5c, 0x6f, 0x2b, 0x73, 0xa5, 0x4b, - 0x31, 0xab, 0x9c, 0x27, 0x66, 0xa1, 0xd7, 0x61, 0x88, 0xc5, 0x29, 0x95, 0x93, 0xf0, 0x8c, 0xba, - 0x15, 0xb2, 0xd2, 0xc3, 0xfd, 0xea, 0xe8, 0x1d, 0xbc, 0xca, 0xff, 0x60, 0x81, 0x8a, 0xee, 0xc0, - 0xd8, 0x76, 0x14, 0x75, 0x6e, 0x10, 0xa7, 0x49, 0x02, 0xc9, 0x65, 0x2f, 0x64, 0x71, 0x59, 0x3a, - 0x08, 0x1c, 0x2d, 0x66, 0x4c, 0x71, 0x59, 0x88, 0x75, 0x3a, 0x76, 0x1d, 0x20, 0x86, 0x3d, 0x21, - 0xb3, 0x99, 0xbd, 0x01, 0xa3, 0xf4, 0x73, 0xe7, 0x5b, 0xae, 0x53, 0xec, 0x98, 0xf0, 0x32, 0x8c, - 0x4a, 0xb7, 0x83, 0x50, 0x44, 0x11, 0x62, 0x27, 0x92, 0xf4, 0x4a, 0x08, 0x71, 0x0c, 0xb7, 0x9f, - 0x07, 0xe1, 0x1b, 0x5f, 0x44, 0xd2, 0xde, 0x84, 0x93, 0xcc, 0xc9, 0xdf, 0x89, 0xb6, 0x8d, 0x35, - 0xda, 0x7b, 0x31, 0xbc, 0x22, 0xae, 0xa2, 0x25, 0xe5, 0x6d, 0x25, 0xa3, 0x54, 0x8c, 0x4b, 0x8a, - 0xf1, 0xb5, 0xd4, 0xfe, 0xa3, 0x01, 0x78, 0x66, 0xb5, 0x9e, 0x1f, 0xfe, 0xee, 0x1a, 0x8c, 0x73, - 0x09, 0x97, 0x2e, 0x0d, 0xa7, 0x25, 0xda, 0x55, 0x4a, 0xdb, 0x0d, 0x0d, 0x86, 0x0d, 0x4c, 0x2a, - 0x11, 0xba, 0x1f, 0x79, 0xc9, 0x37, 0xdc, 0xab, 0x1f, 0xac, 0x63, 0x5a, 0x4e, 0xc1, 0x54, 0x58, - 0xe6, 0x2c, 0x5d, 0x81, 0x95, 0xc0, 0xfc, 0x2e, 0x4c, 0xba, 0x61, 0x23, 0x74, 0x57, 0x3d, 0xba, - 0x4f, 0xb5, 0x9d, 0xae, 0xd4, 0x24, 0xb4, 0xd3, 0x0a, 0x8a, 0x13, 0xd8, 0xda, 0xf9, 0x32, 0xd8, - 0xb7, 0xc0, 0xdd, 0x33, 0xf8, 0x0e, 0x65, 0xff, 0x1d, 0xf6, 0x75, 0x21, 0xb3, 0x55, 0x08, 0xf6, - 0xcf, 0x3f, 0x38, 0xc4, 0x12, 0x46, 0xef, 0xa0, 0x8d, 0x6d, 0xa7, 0x33, 0xdf, 0x8d, 0xb6, 0x97, - 0xdc, 0xb0, 0xe1, 0xef, 0x92, 0x60, 0x8f, 0xa9, 0x0f, 0x46, 0xe2, 0x3b, 0xa8, 0x02, 0x2c, 0xde, - 0x98, 0xaf, 0x51, 0x4c, 0x9c, 0xae, 0x83, 0xe6, 0x61, 0x4a, 0x16, 0xd6, 0x49, 0xc8, 0x8e, 0x80, - 0x31, 0x46, 0x46, 0xbd, 0xaa, 0x16, 0xc5, 0x8a, 0x48, 0x12, 0xdf, 0x14, 0x70, 0xe1, 0x49, 0x08, - 0xb8, 0x5f, 0x80, 0x09, 0xd7, 0x73, 0x23, 0xd7, 0x89, 0x7c, 0x6e, 0x68, 0xe3, 0x9a, 0x02, 0xa6, - 0x13, 0x5f, 0xd5, 0x01, 0xd8, 0xc4, 0xb3, 0xff, 0x8f, 0x01, 0x98, 0x61, 0xd3, 0xf6, 0xe9, 0x0a, - 0xfb, 0x61, 0x5a, 0x61, 0x77, 0xd2, 0x2b, 0xec, 0x49, 0x48, 0xee, 0x8f, 0xbd, 0xcc, 0xbe, 0x63, - 0xc1, 0x0c, 0x53, 0xcb, 0x1b, 0xcb, 0xec, 0x0a, 0x8c, 0x06, 0xc6, 0x83, 0xf7, 0x51, 0xdd, 0xfa, - 0x27, 0xdf, 0xae, 0xc7, 0x38, 0xe8, 0x3d, 0x80, 0x4e, 0xac, 0xf6, 0x2f, 0x19, 0x51, 0x8a, 0x21, - 0x57, 0xe3, 0xaf, 0xd5, 0xb1, 0xbf, 0x05, 0xa3, 0xea, 0x45, 0xbb, 0xbc, 0x20, 0x5b, 0x39, 0x17, - 0xe4, 0xde, 0x62, 0x84, 0xf4, 0x4c, 0x2c, 0x67, 0x7a, 0x26, 0xfe, 0x6b, 0x0b, 0x62, 0xa3, 0x0c, - 0xfa, 0x00, 0x46, 0x3b, 0x3e, 0x73, 0x64, 0x0f, 0xe4, 0xeb, 0x90, 0xe7, 0x0b, 0xad, 0x3a, 0x3c, - 0x14, 0x69, 0xc0, 0xa7, 0xa3, 0x26, 0xab, 0xe2, 0x98, 0x0a, 0xba, 0x09, 0xc3, 0x9d, 0x80, 0xd4, - 0x23, 0x16, 0x27, 0xaf, 0x7f, 0x82, 0x7c, 0xf9, 0xf2, 0x8a, 0x58, 0x52, 0x48, 0xf8, 0x05, 0x97, - 0xfb, 0xf7, 0x0b, 0xb6, 0xff, 0x7e, 0x09, 0xa6, 0x93, 0x8d, 0xa0, 0x77, 0x60, 0x80, 0x3c, 0x24, - 0x0d, 0xf1, 0xa5, 0x99, 0xd2, 0x44, 0xac, 0x10, 0xe2, 0x43, 0x47, 0xff, 0x63, 0x56, 0x0b, 0xdd, - 0x80, 0x61, 0x2a, 0x4a, 0x5c, 0x57, 0xd1, 0x64, 0x9f, 0xcd, 0x13, 0x47, 0x94, 0x4c, 0xc6, 0x3f, - 0x4b, 0x14, 0x61, 0x59, 0x9d, 0x39, 0x12, 0x36, 0x3a, 0x75, 0x7a, 0x4b, 0x8b, 0x8a, 0x94, 0x09, - 0x1b, 0x8b, 0x35, 0x8e, 0x24, 0xa8, 0x71, 0x47, 0x42, 0x59, 0x88, 0x63, 0x22, 0xe8, 0x3d, 0x18, - 0x0c, 0x5b, 0x84, 0x74, 0x84, 0xa7, 0x48, 0xa6, 0x4a, 0xb7, 0x4e, 0x11, 0x04, 0x25, 0xa6, 0x02, - 0x62, 0x05, 0x98, 0x57, 0xb4, 0x7f, 0xcd, 0x02, 0xe0, 0x9e, 0x97, 0x8e, 0xb7, 0x45, 0x8e, 0xc1, - 0x0a, 0xb2, 0x04, 0x03, 0x61, 0x87, 0x34, 0x8a, 0xde, 0x77, 0xc4, 0xfd, 0xa9, 0x77, 0x48, 0x23, - 0x5e, 0xed, 0xf4, 0x1f, 0x66, 0xb5, 0xed, 0x9f, 0x00, 0x98, 0x8c, 0xd1, 0x56, 0x23, 0xd2, 0x46, - 0xaf, 0x1a, 0x21, 0xb8, 0xce, 0x26, 0x42, 0x70, 0x8d, 0x32, 0x6c, 0x4d, 0xe1, 0xfe, 0x2d, 0x28, - 0xb7, 0x9d, 0x87, 0x42, 0xa3, 0xfa, 0x72, 0x71, 0x37, 0x28, 0xfd, 0xb9, 0x35, 0xe7, 0x21, 0xbf, - 0xc1, 0xbf, 0x2c, 0x77, 0xe7, 0x9a, 0xf3, 0xb0, 0xe7, 0x1b, 0x04, 0xda, 0x08, 0x6b, 0xcb, 0xf5, - 0x84, 0x53, 0x61, 0x5f, 0x6d, 0xb9, 0x5e, 0xb2, 0x2d, 0xd7, 0xeb, 0xa3, 0x2d, 0xd7, 0x43, 0x8f, - 0x60, 0x58, 0xf8, 0xfc, 0x8a, 0xd8, 0xa0, 0x57, 0xfa, 0x68, 0x4f, 0xb8, 0x0c, 0xf3, 0x36, 0xaf, - 0x48, 0x0d, 0x85, 0x28, 0xed, 0xd9, 0xae, 0x6c, 0x10, 0xfd, 0x35, 0x0b, 0x26, 0xc5, 0x6f, 0xf1, - 0x9c, 0x56, 0x48, 0xf0, 0x9f, 0xef, 0xbf, 0x0f, 0xa2, 0x22, 0xef, 0xca, 0xe7, 0xe5, 0x61, 0x6b, - 0x02, 0x7b, 0xf6, 0x28, 0xd1, 0x0b, 0xf4, 0xf7, 0x2d, 0x38, 0xd9, 0x76, 0x1e, 0xf2, 0x16, 0x79, - 0x19, 0x76, 0x22, 0xd7, 0x17, 0x6e, 0x2e, 0xef, 0xf4, 0x37, 0xfd, 0xa9, 0xea, 0xbc, 0x93, 0xd2, - 0xba, 0x7c, 0x32, 0x0b, 0xa5, 0x67, 0x57, 0x33, 0xfb, 0x35, 0xbb, 0x09, 0x23, 0x72, 0xbd, 0x3d, - 0xcd, 0x07, 0x0d, 0xac, 0x1d, 0xb1, 0xd6, 0x9e, 0x6a, 0x3b, 0xdf, 0x82, 0x71, 0x7d, 0x8d, 0x3d, - 0xd5, 0xb6, 0x3e, 0x82, 0x13, 0x19, 0x6b, 0xe9, 0xa9, 0x36, 0xf9, 0x00, 0xce, 0xe6, 0xae, 0x8f, - 0xa7, 0xfa, 0x20, 0xe5, 0x57, 0x2d, 0x9d, 0x0f, 0x1e, 0x83, 0x29, 0x6a, 0xd1, 0x34, 0x45, 0x5d, - 0x28, 0xde, 0x39, 0x39, 0xf6, 0xa8, 0x0f, 0xf5, 0x4e, 0x53, 0xae, 0x8e, 0xde, 0x87, 0xa1, 0x16, - 0x2d, 0x91, 0x9e, 0xe3, 0x76, 0xef, 0x1d, 0x19, 0x4b, 0xd4, 0xac, 0x3c, 0xc4, 0x82, 0x82, 0xfd, - 0x33, 0x16, 0x64, 0x3c, 0xa9, 0xa1, 0x12, 0x56, 0xd7, 0x6d, 0xb2, 0x21, 0x29, 0xc7, 0x12, 0x96, - 0x8a, 0x50, 0x75, 0x1e, 0xca, 0x5b, 0x6e, 0x53, 0xbc, 0xd6, 0x57, 0xe0, 0xeb, 0x14, 0xbc, 0xe5, - 0x36, 0xd1, 0x0a, 0xa0, 0xb0, 0xdb, 0xe9, 0xb4, 0x98, 0x67, 0x98, 0xd3, 0xba, 0x1e, 0xf8, 0xdd, - 0x0e, 0x77, 0x13, 0x2f, 0x73, 0xf5, 0x52, 0x3d, 0x05, 0xc5, 0x19, 0x35, 0xec, 0x7f, 0x64, 0xc1, - 0xc0, 0x31, 0x4c, 0x13, 0x36, 0xa7, 0xe9, 0xd5, 0x5c, 0xd2, 0x22, 0xa5, 0xcc, 0x1c, 0x76, 0x1e, - 0xb0, 0x70, 0x0d, 0x21, 0x13, 0x38, 0x32, 0x67, 0x6d, 0xdf, 0x82, 0x13, 0xb7, 0x7c, 0xa7, 0xb9, - 0xe0, 0xb4, 0x1c, 0xaf, 0x41, 0x82, 0x55, 0x6f, 0xeb, 0x48, 0x6f, 0x32, 0x4a, 0x3d, 0xdf, 0x64, - 0x5c, 0x83, 0x21, 0xb7, 0xa3, 0xe5, 0xa4, 0xb8, 0x48, 0x67, 0x77, 0xb5, 0x26, 0xd2, 0x51, 0x20, - 0xa3, 0x71, 0x56, 0x8a, 0x05, 0x3e, 0x5d, 0x96, 0xdc, 0x6f, 0x71, 0x20, 0x7f, 0x59, 0xd2, 0x5b, - 0x52, 0x32, 0xd6, 0xa2, 0xe1, 0xb6, 0xbf, 0x0d, 0x46, 0x13, 0xe2, 0x91, 0x1a, 0x86, 0x61, 0x97, - 0x7f, 0xa9, 0x58, 0x9b, 0x2f, 0x66, 0xdf, 0x5e, 0x52, 0x03, 0xa3, 0xbd, 0xc6, 0xe4, 0x05, 0x58, - 0x12, 0xb2, 0xaf, 0x41, 0x66, 0x6c, 0xac, 0xde, 0x9a, 0x29, 0xfb, 0x2b, 0x30, 0xc3, 0x6a, 0x1e, - 0x51, 0xeb, 0x63, 0x27, 0xf4, 0xe9, 0x19, 0xe1, 0xc5, 0xed, 0xff, 0xc5, 0x02, 0xb4, 0xe6, 0x37, - 0xdd, 0xcd, 0x3d, 0x41, 0x9c, 0x7f, 0xff, 0x47, 0x50, 0xe5, 0xd7, 0xea, 0x64, 0x08, 0xee, 0xc5, - 0x96, 0x13, 0x86, 0x9a, 0x2e, 0xff, 0x45, 0xd1, 0x6e, 0x75, 0xa3, 0x18, 0x1d, 0xf7, 0xa2, 0x87, - 0x3e, 0x48, 0x44, 0x44, 0xfd, 0x62, 0x2a, 0x22, 0xea, 0x8b, 0x99, 0x4e, 0x40, 0xe9, 0xde, 0xcb, - 0x48, 0xa9, 0xf6, 0x77, 0x2d, 0x98, 0x5a, 0x4f, 0x84, 0x94, 0xbe, 0xc4, 0x3c, 0x22, 0x32, 0x6c, - 0x54, 0x75, 0x56, 0x8a, 0x05, 0xf4, 0x89, 0xeb, 0x70, 0xff, 0xd4, 0x82, 0x38, 0x16, 0xdf, 0x31, - 0x88, 0xdc, 0x8b, 0x86, 0xc8, 0x9d, 0x79, 0x7d, 0x51, 0xdd, 0xc9, 0x93, 0xb8, 0xd1, 0x4d, 0x35, - 0x27, 0x05, 0x37, 0x97, 0x98, 0x0c, 0xdf, 0x67, 0x93, 0xe6, 0xc4, 0xa9, 0xd9, 0xf8, 0xfd, 0x12, - 0x20, 0x85, 0xdb, 0x77, 0x14, 0xdd, 0x74, 0x8d, 0x27, 0x13, 0x45, 0x77, 0x17, 0x10, 0xf3, 0xe9, - 0x09, 0x1c, 0x2f, 0xe4, 0x64, 0x5d, 0xa1, 0xb5, 0x3e, 0x9a, 0xc3, 0x90, 0x72, 0x89, 0xbd, 0x95, - 0xa2, 0x86, 0x33, 0x5a, 0xd0, 0x7c, 0xb5, 0x06, 0xfb, 0xf5, 0xd5, 0x1a, 0xea, 0xf1, 0xe8, 0xfe, - 0x57, 0x2c, 0x98, 0x50, 0xc3, 0xf4, 0x09, 0x79, 0xba, 0xa3, 0xfa, 0x93, 0x73, 0xae, 0xd4, 0xb4, - 0x2e, 0x33, 0x61, 0xe0, 0x47, 0x58, 0xf0, 0x04, 0xa7, 0xe5, 0x3e, 0x22, 0x2a, 0xd8, 0x7b, 0x55, - 0x04, 0x43, 0x10, 0xa5, 0x87, 0xfb, 0xd5, 0x09, 0xf5, 0x8f, 0xfb, 0x23, 0xc4, 0x55, 0xec, 0xbf, - 0x4d, 0x37, 0xbb, 0xb9, 0x14, 0xd1, 0x9b, 0x30, 0xd8, 0xd9, 0x76, 0x42, 0x92, 0x78, 0xe2, 0x38, - 0x58, 0xa3, 0x85, 0x87, 0xfb, 0xd5, 0x49, 0x55, 0x81, 0x95, 0x60, 0x8e, 0xdd, 0x7f, 0x6c, 0xe2, - 0xf4, 0xe2, 0xec, 0x19, 0x9b, 0xf8, 0xdf, 0x59, 0x30, 0xb0, 0x4e, 0x4f, 0xaf, 0xa7, 0xcf, 0x02, - 0xde, 0x35, 0x58, 0xc0, 0xb9, 0xbc, 0xb4, 0x67, 0xb9, 0xbb, 0x7f, 0x25, 0xb1, 0xfb, 0x2f, 0xe4, - 0x52, 0x28, 0xde, 0xf8, 0x6d, 0x18, 0x63, 0xc9, 0xd4, 0xc4, 0x73, 0xce, 0xd7, 0x8d, 0x0d, 0x5f, - 0x4d, 0x6c, 0xf8, 0x29, 0x0d, 0x55, 0xdb, 0xe9, 0x2f, 0xc1, 0xb0, 0x78, 0x1f, 0x98, 0x8c, 0x41, - 0x21, 0x70, 0xb1, 0x84, 0xdb, 0x3f, 0x57, 0x06, 0x23, 0x79, 0x1b, 0xfa, 0x27, 0x16, 0xcc, 0x05, - 0xdc, 0xc5, 0xbf, 0xb9, 0xd4, 0x0d, 0x5c, 0x6f, 0xab, 0xde, 0xd8, 0x26, 0xcd, 0x6e, 0xcb, 0xf5, - 0xb6, 0x56, 0xb7, 0x3c, 0x5f, 0x15, 0x2f, 0x3f, 0x24, 0x8d, 0xae, 0x8a, 0xdb, 0x53, 0x90, 0x29, - 0x4e, 0x3d, 0x93, 0x79, 0xed, 0x60, 0xbf, 0x3a, 0x87, 0x8f, 0x44, 0x1b, 0x1f, 0xb1, 0x2f, 0xe8, - 0x9f, 0x5b, 0x70, 0x85, 0x27, 0x11, 0xeb, 0xbf, 0xff, 0x05, 0x1a, 0x8e, 0x9a, 0x24, 0x15, 0x13, - 0xd9, 0x20, 0x41, 0x7b, 0xe1, 0x0b, 0x62, 0x40, 0xaf, 0xd4, 0x8e, 0xd6, 0x16, 0x3e, 0x6a, 0xe7, - 0xec, 0xff, 0xa6, 0x0c, 0x13, 0x22, 0x86, 0xad, 0x38, 0x03, 0xde, 0x34, 0x96, 0xc4, 0xb3, 0x89, - 0x25, 0x31, 0x63, 0x20, 0x3f, 0x19, 0xf6, 0x1f, 0xc2, 0x0c, 0x65, 0xce, 0x37, 0x88, 0x13, 0x44, - 0xf7, 0x89, 0xc3, 0x5d, 0x30, 0xcb, 0x47, 0xe6, 0xfe, 0x4a, 0xb1, 0x7e, 0x2b, 0x49, 0x0c, 0xa7, - 0xe9, 0xff, 0x30, 0x9d, 0x39, 0x1e, 0x4c, 0xa7, 0xc2, 0x10, 0x7f, 0x15, 0x46, 0xd5, 0xe3, 0x36, - 0xc1, 0x74, 0x8a, 0xa3, 0x79, 0x27, 0x29, 0x70, 0xa5, 0x67, 0xfc, 0xb0, 0x32, 0x26, 0x67, 0xff, - 0x72, 0xc9, 0x68, 0x90, 0x4f, 0xe2, 0x3a, 0x8c, 0x38, 0x21, 0xcb, 0x30, 0xd0, 0x2c, 0xd2, 0x68, - 0xa7, 0x9a, 0x61, 0x7e, 0x66, 0xf3, 0xa2, 0x26, 0x56, 0x34, 0xd0, 0x0d, 0xee, 0xe8, 0xba, 0x4b, - 0x8a, 0xd4, 0xd9, 0x29, 0x6a, 0x20, 0x5d, 0x61, 0x77, 0x09, 0x16, 0xf5, 0xd1, 0xd7, 0xb9, 0x27, - 0xf2, 0x4d, 0xcf, 0x7f, 0xe0, 0x5d, 0xf7, 0x7d, 0x19, 0x04, 0xaa, 0x3f, 0x82, 0x33, 0xd2, 0xff, - 0x58, 0x55, 0xc7, 0x26, 0xb5, 0xfe, 0xe2, 0xfa, 0xff, 0x28, 0xb0, 0xa4, 0x49, 0x66, 0x2c, 0x89, - 0x10, 0x11, 0x98, 0x12, 0x01, 0x92, 0x65, 0x99, 0x18, 0xbb, 0xcc, 0xeb, 0xb7, 0x59, 0x3b, 0xb6, - 0x00, 0xdd, 0x34, 0x49, 0xe0, 0x24, 0x4d, 0x7b, 0x9b, 0x33, 0xe1, 0x15, 0xe2, 0x44, 0xdd, 0x80, - 0x84, 0xe8, 0xcb, 0x50, 0x49, 0xdf, 0x8c, 0x85, 0x21, 0xc5, 0x62, 0xd2, 0xf3, 0xb9, 0x83, 0xfd, - 0x6a, 0xa5, 0x9e, 0x83, 0x83, 0x73, 0x6b, 0xdb, 0x3f, 0x6f, 0x01, 0x7b, 0xc1, 0x7f, 0x0c, 0x92, - 0xcf, 0x97, 0x4c, 0xc9, 0xa7, 0x92, 0x37, 0x9d, 0x39, 0x42, 0xcf, 0x1b, 0x7c, 0x0d, 0xd7, 0x02, - 0xff, 0xe1, 0x9e, 0xf0, 0xfa, 0xea, 0x7d, 0x8d, 0xb3, 0xbf, 0x67, 0x01, 0xcb, 0x30, 0x86, 0xf9, - 0xad, 0x5d, 0x1a, 0x38, 0x7a, 0x3b, 0x34, 0x7c, 0x19, 0x46, 0x36, 0xc5, 0xf0, 0x67, 0x28, 0x9d, - 0x8c, 0x0e, 0x9b, 0xb4, 0xe5, 0xa4, 0x89, 0x97, 0xb8, 0xe2, 0x1f, 0x56, 0xd4, 0xec, 0xff, 0xd2, - 0x82, 0xd9, 0xfc, 0x6a, 0xe8, 0x0e, 0x9c, 0x09, 0x48, 0xa3, 0x1b, 0x84, 0x74, 0x4b, 0x88, 0x0b, - 0x90, 0x78, 0x01, 0xc6, 0xa7, 0xfa, 0x99, 0x83, 0xfd, 0xea, 0x19, 0x9c, 0x8d, 0x82, 0xf3, 0xea, - 0xa2, 0xb7, 0x60, 0xb2, 0x1b, 0x72, 0xc9, 0x8f, 0x09, 0x5d, 0xa1, 0x08, 0x63, 0xcf, 0x1e, 0x49, - 0xdd, 0x31, 0x20, 0x38, 0x81, 0x69, 0xff, 0x79, 0xbe, 0x1c, 0x95, 0xc7, 0x6b, 0x1b, 0x66, 0x3c, - 0xed, 0x3f, 0x3d, 0x01, 0xe5, 0x55, 0xff, 0xf9, 0x5e, 0xa7, 0x3e, 0x3b, 0x2e, 0xb5, 0x18, 0x03, - 0x09, 0x32, 0x38, 0x4d, 0xd9, 0xfe, 0x9b, 0x16, 0x9c, 0xd1, 0x11, 0xb5, 0x17, 0x87, 0xbd, 0xac, - 0x80, 0x4b, 0x5a, 0x00, 0x3e, 0x7e, 0xcc, 0x5d, 0xce, 0x08, 0xc0, 0x77, 0x52, 0xa7, 0x5e, 0x18, - 0x6d, 0x8f, 0xbf, 0x2d, 0xcd, 0x8a, 0xb6, 0xf7, 0x47, 0x16, 0x5f, 0x9f, 0x7a, 0xd7, 0xd1, 0x47, - 0x30, 0xdd, 0x76, 0xa2, 0xc6, 0xf6, 0xf2, 0xc3, 0x4e, 0xc0, 0x8d, 0xbb, 0x72, 0x9c, 0x5e, 0xee, - 0x35, 0x4e, 0xda, 0x47, 0xc6, 0xde, 0xe0, 0x6b, 0x09, 0x62, 0x38, 0x45, 0x1e, 0xdd, 0x87, 0x31, - 0x56, 0xc6, 0xde, 0x62, 0x87, 0x45, 0xb2, 0x4c, 0x5e, 0x6b, 0xca, 0x39, 0x68, 0x2d, 0xa6, 0x83, - 0x75, 0xa2, 0xf6, 0x2f, 0x95, 0x39, 0xd3, 0x60, 0x77, 0x8f, 0x97, 0x60, 0xb8, 0xe3, 0x37, 0x17, - 0x57, 0x97, 0xb0, 0x98, 0x05, 0x75, 0xee, 0xd5, 0x78, 0x31, 0x96, 0x70, 0x74, 0x19, 0x46, 0xc4, - 0x4f, 0x69, 0x8c, 0x67, 0x7b, 0x44, 0xe0, 0x85, 0x58, 0x41, 0xd1, 0x6b, 0x00, 0x9d, 0xc0, 0xdf, - 0x75, 0x9b, 0x2c, 0xf6, 0x56, 0xd9, 0xf4, 0xeb, 0xab, 0x29, 0x08, 0xd6, 0xb0, 0xd0, 0xdb, 0x30, - 0xd1, 0xf5, 0x42, 0x2e, 0x3f, 0x69, 0xc9, 0x38, 0x94, 0xc7, 0xd9, 0x1d, 0x1d, 0x88, 0x4d, 0x5c, - 0x34, 0x0f, 0x43, 0x91, 0xc3, 0xfc, 0xd4, 0x06, 0xf3, 0x5f, 0x0c, 0x6c, 0x50, 0x0c, 0x3d, 0xed, - 0x25, 0xad, 0x80, 0x45, 0x45, 0xf4, 0x55, 0x19, 0x16, 0x81, 0x9f, 0x44, 0xe2, 0xa9, 0x4e, 0x7f, - 0xa7, 0x96, 0x16, 0x14, 0x41, 0x3c, 0x01, 0x32, 0x68, 0xa1, 0xb7, 0x00, 0xc8, 0xc3, 0x88, 0x04, - 0x9e, 0xd3, 0x52, 0xde, 0xa5, 0x4a, 0x90, 0x59, 0xf2, 0xd7, 0xfd, 0xe8, 0x4e, 0x48, 0x96, 0x15, - 0x06, 0xd6, 0xb0, 0xed, 0x9f, 0x18, 0x03, 0x88, 0x2f, 0x1a, 0xe8, 0x11, 0x8c, 0x34, 0x9c, 0x8e, - 0xd3, 0xe0, 0x39, 0x9d, 0xcb, 0x79, 0x0f, 0xcb, 0xe3, 0x1a, 0x73, 0x8b, 0x02, 0x9d, 0x1b, 0x6f, - 0x64, 0x3e, 0x83, 0x11, 0x59, 0xdc, 0xd3, 0x60, 0xa3, 0xda, 0x43, 0xdf, 0xb1, 0x60, 0x4c, 0xc4, - 0xb6, 0x62, 0x33, 0x54, 0xca, 0xb7, 0xb7, 0x69, 0xed, 0xcf, 0xc7, 0x35, 0x78, 0x17, 0x5e, 0x97, - 0x2b, 0x54, 0x83, 0xf4, 0xec, 0x85, 0xde, 0x30, 0xfa, 0x9c, 0xbc, 0xdb, 0x96, 0x8d, 0xa1, 0x54, - 0x77, 0xdb, 0x51, 0x76, 0xd4, 0xe8, 0xd7, 0xda, 0x3b, 0xc6, 0xb5, 0x76, 0x20, 0xff, 0x89, 0xb6, - 0x21, 0x6f, 0xf7, 0xba, 0xd1, 0xa2, 0x9a, 0x1e, 0x03, 0x66, 0x30, 0xff, 0x85, 0xaf, 0x76, 0xb1, - 0xeb, 0x11, 0xff, 0xe5, 0x5b, 0x30, 0xd5, 0x34, 0xa5, 0x16, 0xb1, 0x12, 0x5f, 0xcc, 0xa3, 0x9b, - 0x10, 0x72, 0x62, 0x39, 0x25, 0x01, 0xc0, 0x49, 0xc2, 0xa8, 0xc6, 0x43, 0x02, 0xad, 0x7a, 0x9b, - 0xbe, 0x78, 0x2e, 0x66, 0xe7, 0xce, 0xe5, 0x5e, 0x18, 0x91, 0x36, 0xc5, 0x8c, 0x85, 0x84, 0x75, - 0x51, 0x17, 0x2b, 0x2a, 0xe8, 0x7d, 0x18, 0x62, 0x4f, 0x3c, 0xc3, 0xca, 0x48, 0xbe, 0x59, 0xc3, - 0x8c, 0x2e, 0x1c, 0x6f, 0x48, 0xf6, 0x37, 0xc4, 0x82, 0x02, 0xba, 0x21, 0x1f, 0x50, 0x87, 0xab, - 0xde, 0x9d, 0x90, 0xb0, 0x07, 0xd4, 0xa3, 0x0b, 0xcf, 0xc7, 0x6f, 0xa3, 0x79, 0x79, 0x66, 0x72, - 0x6c, 0xa3, 0x26, 0x15, 0xfb, 0xc4, 0x7f, 0x99, 0x73, 0x5b, 0x44, 0xea, 0xcb, 0xec, 0x9e, 0x99, - 0x97, 0x3b, 0x1e, 0xce, 0xbb, 0x26, 0x09, 0x9c, 0xa4, 0x49, 0x45, 0x68, 0xbe, 0xeb, 0xc5, 0x83, - 0xb3, 0x5e, 0xbc, 0x83, 0x6b, 0x0e, 0xd8, 0x69, 0xc4, 0x4b, 0xb0, 0xa8, 0x8f, 0x5c, 0x98, 0x0a, - 0x0c, 0xf1, 0x42, 0x06, 0xd8, 0xbb, 0xd4, 0x9f, 0x10, 0xa3, 0x65, 0x19, 0x31, 0xc9, 0xe0, 0x24, - 0x5d, 0xf4, 0xbe, 0x26, 0x28, 0x4d, 0x14, 0xdf, 0xfc, 0x7b, 0x89, 0x46, 0xb3, 0x3b, 0x30, 0x61, - 0x30, 0x9b, 0xa7, 0x6a, 0x82, 0xf4, 0x60, 0x3a, 0xc9, 0x59, 0x9e, 0xaa, 0xe5, 0xf1, 0x2d, 0x98, - 0x64, 0x1b, 0xe1, 0x81, 0xd3, 0x11, 0xac, 0xf8, 0xb2, 0xc1, 0x8a, 0xad, 0xcb, 0x65, 0x3e, 0x30, - 0x72, 0x08, 0x62, 0xc6, 0x69, 0xff, 0x9d, 0x41, 0x51, 0x59, 0xed, 0x22, 0x74, 0x05, 0x46, 0x45, - 0x07, 0x54, 0xaa, 0x3e, 0xc5, 0x18, 0xd6, 0x24, 0x00, 0xc7, 0x38, 0x2c, 0x43, 0x23, 0xab, 0xae, - 0xbd, 0x50, 0x88, 0x33, 0x34, 0x2a, 0x08, 0xd6, 0xb0, 0xe8, 0xe5, 0xf7, 0xbe, 0xef, 0x47, 0xea, - 0x0c, 0x56, 0x5b, 0x6d, 0x81, 0x95, 0x62, 0x01, 0xa5, 0x67, 0xef, 0x0e, 0x09, 0x3c, 0xd2, 0x32, - 0x73, 0xd5, 0xa8, 0xb3, 0xf7, 0xa6, 0x0e, 0xc4, 0x26, 0x2e, 0x95, 0x20, 0xfc, 0x90, 0xed, 0x5d, - 0x71, 0xc5, 0x8e, 0x5f, 0x7c, 0xd4, 0x79, 0x90, 0x0f, 0x09, 0x47, 0x5f, 0x81, 0x33, 0x2a, 0xd8, - 0xa6, 0x58, 0x99, 0xb2, 0xc5, 0x21, 0x43, 0x23, 0x76, 0x66, 0x31, 0x1b, 0x0d, 0xe7, 0xd5, 0x47, - 0xef, 0xc2, 0xa4, 0xb8, 0x86, 0x49, 0x8a, 0xc3, 0xa6, 0xfb, 0xe2, 0x4d, 0x03, 0x8a, 0x13, 0xd8, - 0x32, 0xdb, 0x0e, 0xbb, 0x9f, 0x48, 0x0a, 0x23, 0xe9, 0x6c, 0x3b, 0x3a, 0x1c, 0xa7, 0x6a, 0xa0, - 0x79, 0x98, 0xe2, 0x62, 0xa7, 0xeb, 0x6d, 0xf1, 0x39, 0x11, 0x4f, 0x60, 0xd5, 0x86, 0xbc, 0x6d, - 0x82, 0x71, 0x12, 0x1f, 0x5d, 0x83, 0x71, 0x27, 0x68, 0x6c, 0xbb, 0x11, 0x69, 0xd0, 0x5d, 0xc5, - 0x3c, 0x08, 0x35, 0xff, 0xcf, 0x79, 0x0d, 0x86, 0x0d, 0x4c, 0xf4, 0x1e, 0x0c, 0x84, 0x0f, 0x9c, - 0x8e, 0xe0, 0x3e, 0xf9, 0xac, 0x5c, 0xad, 0x60, 0xee, 0xfa, 0x45, 0xff, 0x63, 0x56, 0xd3, 0x7e, - 0x04, 0x27, 0x32, 0x82, 0x12, 0xd1, 0xa5, 0xe7, 0x74, 0x5c, 0x39, 0x2a, 0x89, 0x67, 0x1a, 0xf3, - 0xb5, 0x55, 0x39, 0x1e, 0x1a, 0x16, 0x5d, 0xdf, 0x2c, 0x78, 0x51, 0x2d, 0x36, 0x24, 0xa9, 0xf5, - 0xbd, 0x22, 0x01, 0x38, 0xc6, 0xb1, 0xff, 0xa4, 0x04, 0x53, 0x19, 0xe6, 0x41, 0x96, 0x1b, 0x3f, - 0x71, 0xcf, 0x8b, 0x53, 0xe1, 0x9b, 0xe9, 0x9f, 0x4a, 0x47, 0x48, 0xff, 0x54, 0xee, 0x95, 0xfe, - 0x69, 0xe0, 0xe3, 0xa4, 0x7f, 0x32, 0x47, 0x6c, 0xb0, 0xaf, 0x11, 0xcb, 0x48, 0x19, 0x35, 0x74, - 0xc4, 0x94, 0x51, 0xc6, 0xa0, 0x0f, 0xf7, 0x31, 0xe8, 0xff, 0x69, 0x09, 0xa6, 0x93, 0x96, 0xc5, - 0x63, 0xd0, 0xce, 0xbf, 0x6f, 0x68, 0xe7, 0x2f, 0xf7, 0x13, 0xf4, 0x20, 0x57, 0x53, 0x8f, 0x13, - 0x9a, 0xfa, 0xcf, 0xf6, 0x45, 0xad, 0x58, 0x6b, 0xff, 0xb7, 0x4a, 0x70, 0x2a, 0xd3, 0xe0, 0x7a, - 0x0c, 0x63, 0x73, 0xdb, 0x18, 0x9b, 0x57, 0xfb, 0x0e, 0x08, 0x91, 0x3b, 0x40, 0xf7, 0x12, 0x03, - 0x74, 0xa5, 0x7f, 0x92, 0xc5, 0xa3, 0xf4, 0xfd, 0x32, 0x5c, 0xc8, 0xac, 0x17, 0x2b, 0xb7, 0x57, - 0x0c, 0xe5, 0xf6, 0x6b, 0x09, 0xe5, 0xb6, 0x5d, 0x5c, 0xfb, 0xc9, 0x68, 0xbb, 0x45, 0x60, 0x04, - 0x16, 0xde, 0xe5, 0x31, 0x35, 0xdd, 0x46, 0x60, 0x04, 0x45, 0x08, 0x9b, 0x74, 0x7f, 0x98, 0x34, - 0xdc, 0xff, 0x83, 0x05, 0x67, 0x33, 0xe7, 0xe6, 0x18, 0xf4, 0x8c, 0xeb, 0xa6, 0x9e, 0xf1, 0xa5, - 0xbe, 0x57, 0x6b, 0x8e, 0xe2, 0xf1, 0xbb, 0x43, 0x39, 0xdf, 0xc2, 0xd4, 0x1f, 0xb7, 0x61, 0xcc, - 0x69, 0x34, 0x48, 0x18, 0xae, 0xb1, 0x54, 0x13, 0xdc, 0xf6, 0xfa, 0x2a, 0xbb, 0x9c, 0xc6, 0xc5, - 0x87, 0xfb, 0xd5, 0xd9, 0x24, 0x89, 0x18, 0x8c, 0x75, 0x0a, 0xe8, 0xeb, 0x30, 0x12, 0xca, 0x24, - 0xbf, 0x03, 0x8f, 0x9f, 0xe4, 0x97, 0x49, 0x92, 0x4a, 0xbd, 0xa3, 0x48, 0xa2, 0x3f, 0xa7, 0x87, - 0xf7, 0x2a, 0x50, 0x6c, 0xf2, 0x4e, 0x3e, 0x46, 0x90, 0x2f, 0xf3, 0x39, 0x7c, 0xb9, 0xaf, 0xe7, - 0xf0, 0xef, 0xc1, 0x74, 0xc8, 0xc3, 0xe5, 0xc6, 0x2e, 0x32, 0x7c, 0x2d, 0xb2, 0x88, 0x83, 0xf5, - 0x04, 0x0c, 0xa7, 0xb0, 0xd1, 0x8a, 0x6c, 0x95, 0x39, 0x43, 0xf1, 0xe5, 0x79, 0x29, 0x6e, 0x51, - 0x38, 0x44, 0x9d, 0x4c, 0x4e, 0x02, 0x1b, 0x7e, 0xad, 0x26, 0xfa, 0x3a, 0x00, 0x5d, 0x44, 0x42, - 0x85, 0x33, 0x9c, 0xcf, 0x42, 0x29, 0x6f, 0x69, 0x66, 0xbe, 0xc0, 0x60, 0x11, 0x0d, 0x96, 0x14, - 0x11, 0xac, 0x11, 0x44, 0x0e, 0x4c, 0xc4, 0xff, 0x30, 0xd9, 0x2c, 0x0a, 0xb0, 0xc6, 0x5a, 0x48, - 0x12, 0x67, 0xe6, 0x8d, 0x25, 0x9d, 0x04, 0x36, 0x29, 0xa2, 0xaf, 0xc1, 0xd9, 0xdd, 0x5c, 0xbf, - 0x23, 0x2e, 0x4b, 0x9e, 0x3f, 0xd8, 0xaf, 0x9e, 0xcd, 0xf7, 0x36, 0xca, 0xaf, 0x6f, 0xff, 0x8f, - 0x00, 0xcf, 0x14, 0x70, 0x7a, 0x34, 0x6f, 0xfa, 0x0c, 0xbc, 0x9c, 0xd4, 0xab, 0xcc, 0x66, 0x56, - 0x36, 0x14, 0x2d, 0x89, 0x0d, 0x55, 0xfa, 0xd8, 0x1b, 0xea, 0xa7, 0x2c, 0xed, 0x9a, 0xc5, 0x3d, - 0xca, 0xbf, 0x74, 0xc4, 0x13, 0xec, 0x09, 0xaa, 0xc0, 0x36, 0x33, 0xf4, 0x48, 0xaf, 0xf5, 0xdd, - 0x9d, 0xfe, 0x15, 0x4b, 0xbf, 0x9a, 0x9d, 0x60, 0x80, 0xab, 0x98, 0xae, 0x1f, 0xf5, 0xfb, 0x8f, - 0x2b, 0xd9, 0xc0, 0xef, 0x5b, 0x70, 0x36, 0x55, 0xcc, 0xfb, 0x40, 0x42, 0x11, 0xce, 0x70, 0xfd, - 0x63, 0x77, 0x5e, 0x12, 0xe4, 0xdf, 0x70, 0x43, 0x7c, 0xc3, 0xd9, 0x5c, 0xbc, 0x64, 0xd7, 0x7f, - 0xf2, 0x5f, 0x55, 0x4f, 0xb0, 0x06, 0x4c, 0x44, 0x9c, 0xdf, 0x75, 0xd4, 0x81, 0x8b, 0x8d, 0x6e, - 0x10, 0xc4, 0x8b, 0x35, 0x63, 0x73, 0xf2, 0xdb, 0xe2, 0xf3, 0x07, 0xfb, 0xd5, 0x8b, 0x8b, 0x3d, - 0x70, 0x71, 0x4f, 0x6a, 0xc8, 0x03, 0xd4, 0x4e, 0x79, 0xf7, 0x31, 0x06, 0x90, 0xa3, 0x05, 0x4a, - 0xfb, 0x02, 0x72, 0x3f, 0xdd, 0x0c, 0x1f, 0xc1, 0x0c, 0xca, 0xc7, 0xab, 0xbb, 0xf9, 0xc1, 0x64, - 0x33, 0x98, 0xbd, 0x05, 0x17, 0x8a, 0x17, 0xd3, 0x91, 0x42, 0x50, 0xfc, 0x9e, 0x05, 0xe7, 0x0b, - 0x43, 0xb3, 0xfd, 0x19, 0xbc, 0x2c, 0xd8, 0xdf, 0xb6, 0xe0, 0xd9, 0xcc, 0x1a, 0xc9, 0xc7, 0x83, - 0x0d, 0x5a, 0xa8, 0x39, 0xc3, 0xc6, 0x41, 0x8a, 0x24, 0x00, 0xc7, 0x38, 0x86, 0xbf, 0x68, 0xa9, - 0xa7, 0xbf, 0xe8, 0x3f, 0xb5, 0x20, 0x75, 0xd4, 0x1f, 0x83, 0xe4, 0xb9, 0x6a, 0x4a, 0x9e, 0xcf, - 0xf7, 0x33, 0x9a, 0x39, 0x42, 0xe7, 0xbf, 0x9d, 0x82, 0xd3, 0x39, 0x2f, 0xc8, 0x77, 0x61, 0x66, - 0xab, 0x41, 0xcc, 0x90, 0x21, 0x45, 0xd1, 0xff, 0x0a, 0xe3, 0x8b, 0x2c, 0x9c, 0x3a, 0xd8, 0xaf, - 0xce, 0xa4, 0x50, 0x70, 0xba, 0x09, 0xf4, 0x6d, 0x0b, 0x4e, 0x3a, 0x0f, 0xc2, 0x65, 0x7a, 0x83, - 0x70, 0x1b, 0x0b, 0x2d, 0xbf, 0xb1, 0x43, 0x05, 0x33, 0xb9, 0xad, 0xde, 0xc8, 0x54, 0x85, 0xdf, - 0xab, 0xa7, 0xf0, 0x8d, 0xe6, 0x2b, 0x07, 0xfb, 0xd5, 0x93, 0x59, 0x58, 0x38, 0xb3, 0x2d, 0x84, - 0x45, 0x0e, 0x3f, 0x27, 0xda, 0x2e, 0x0a, 0x6a, 0x93, 0xf5, 0xd4, 0x9f, 0x8b, 0xc4, 0x12, 0x82, - 0x15, 0x1d, 0xf4, 0x4d, 0x18, 0xdd, 0x92, 0xf1, 0x2b, 0x32, 0x44, 0xee, 0x78, 0x20, 0x8b, 0xa3, - 0x7a, 0x70, 0x07, 0x1c, 0x85, 0x84, 0x63, 0xa2, 0xe8, 0x5d, 0x28, 0x7b, 0x9b, 0x61, 0x51, 0x08, - 0xe9, 0x84, 0xa7, 0x35, 0x8f, 0x76, 0xb5, 0xbe, 0x52, 0xc7, 0xb4, 0x22, 0xba, 0x01, 0xe5, 0xe0, - 0x7e, 0x53, 0xd8, 0x71, 0x32, 0x37, 0x29, 0x5e, 0x58, 0xca, 0xe9, 0x15, 0xa3, 0x84, 0x17, 0x96, - 0x30, 0x25, 0x81, 0x6a, 0x30, 0xc8, 0x9e, 0x5d, 0x0b, 0xd1, 0x36, 0xf3, 0x2a, 0x5f, 0x10, 0xbe, - 0x80, 0xbf, 0x87, 0x64, 0x08, 0x98, 0x13, 0x42, 0x1b, 0x30, 0xd4, 0x70, 0xbd, 0x26, 0x09, 0x84, - 0x2c, 0xfb, 0xb9, 0x4c, 0x8b, 0x0d, 0xc3, 0xc8, 0xa1, 0xc9, 0x0d, 0x18, 0x0c, 0x03, 0x0b, 0x5a, - 0x8c, 0x2a, 0xe9, 0x6c, 0x6f, 0xca, 0x13, 0x2b, 0x9b, 0x2a, 0xe9, 0x6c, 0xaf, 0xd4, 0x0b, 0xa9, - 0x32, 0x0c, 0x2c, 0x68, 0xa1, 0xb7, 0xa0, 0xb4, 0xd9, 0x10, 0x4f, 0xaa, 0x33, 0xd5, 0x9b, 0x66, - 0xc0, 0xb2, 0x85, 0xa1, 0x83, 0xfd, 0x6a, 0x69, 0x65, 0x11, 0x97, 0x36, 0x1b, 0x68, 0x1d, 0x86, - 0x37, 0x79, 0xbc, 0x20, 0xa1, 0x1f, 0x7d, 0x31, 0x3b, 0x94, 0x51, 0x2a, 0xa4, 0x10, 0x7f, 0xdb, - 0x2a, 0x00, 0x58, 0x12, 0x61, 0x09, 0xcf, 0x54, 0xdc, 0x23, 0x11, 0x29, 0x76, 0xee, 0x68, 0xb1, - 0xaa, 0x44, 0xa0, 0x71, 0x45, 0x05, 0x6b, 0x14, 0xe9, 0xaa, 0x76, 0x1e, 0x75, 0x03, 0x96, 0x11, - 0x45, 0x18, 0x66, 0x32, 0x57, 0xf5, 0xbc, 0x44, 0x2a, 0x5a, 0xd5, 0x0a, 0x09, 0xc7, 0x44, 0xd1, - 0x0e, 0x4c, 0xec, 0x86, 0x9d, 0x6d, 0x22, 0xb7, 0x34, 0x8b, 0x30, 0x98, 0x23, 0xcd, 0xde, 0x15, - 0x88, 0x6e, 0x10, 0x75, 0x9d, 0x56, 0x8a, 0x0b, 0xb1, 0x6b, 0xcd, 0x5d, 0x9d, 0x18, 0x36, 0x69, - 0xd3, 0xe1, 0xff, 0xa8, 0xeb, 0xdf, 0xdf, 0x8b, 0x88, 0x08, 0xf0, 0x9a, 0x39, 0xfc, 0x1f, 0x70, - 0x94, 0xf4, 0xf0, 0x0b, 0x00, 0x96, 0x44, 0xd0, 0x5d, 0x31, 0x3c, 0x8c, 0x7b, 0x4e, 0xe7, 0x07, - 0xc2, 0x9f, 0x97, 0x48, 0x39, 0x83, 0xc2, 0xb8, 0x65, 0x4c, 0x8a, 0x71, 0xc9, 0xce, 0xb6, 0x1f, - 0xf9, 0x5e, 0x82, 0x43, 0xcf, 0xe4, 0x73, 0xc9, 0x5a, 0x06, 0x7e, 0x9a, 0x4b, 0x66, 0x61, 0xe1, - 0xcc, 0xb6, 0x50, 0x13, 0x26, 0x3b, 0x7e, 0x10, 0x3d, 0xf0, 0x03, 0xb9, 0xbe, 0x50, 0x81, 0xa2, - 0xd4, 0xc0, 0x14, 0x2d, 0x32, 0xb7, 0x20, 0x13, 0x82, 0x13, 0x34, 0xd1, 0x97, 0x61, 0x38, 0x6c, - 0x38, 0x2d, 0xb2, 0x7a, 0xbb, 0x72, 0x22, 0xff, 0xf8, 0xa9, 0x73, 0x94, 0x9c, 0xd5, 0xc5, 0xc3, - 0x3d, 0x71, 0x14, 0x2c, 0xc9, 0xa1, 0x15, 0x18, 0x64, 0x39, 0xef, 0x59, 0x34, 0xe2, 0x9c, 0x78, - 0xfe, 0xa9, 0x47, 0x3d, 0x9c, 0x37, 0xb1, 0x62, 0xcc, 0xab, 0xd3, 0x3d, 0x20, 0x34, 0x05, 0x7e, - 0x58, 0x39, 0x95, 0xbf, 0x07, 0x84, 0x82, 0xe1, 0x76, 0xbd, 0x68, 0x0f, 0x28, 0x24, 0x1c, 0x13, - 0xa5, 0x9c, 0x99, 0x72, 0xd3, 0xd3, 0x05, 0x0e, 0x9b, 0xb9, 0xbc, 0x94, 0x71, 0x66, 0xca, 0x49, - 0x29, 0x09, 0xfb, 0x37, 0x47, 0xd2, 0x32, 0x0b, 0xd3, 0x30, 0xfd, 0xc7, 0x56, 0xca, 0x63, 0xe3, - 0xf3, 0xfd, 0x2a, 0xbc, 0x9f, 0xe0, 0xc5, 0xf5, 0xdb, 0x16, 0x9c, 0xee, 0x64, 0x7e, 0x88, 0x10, - 0x00, 0xfa, 0xd3, 0x9b, 0xf3, 0x4f, 0x57, 0x91, 0xab, 0xb3, 0xe1, 0x38, 0xa7, 0xa5, 0xa4, 0x72, - 0xa0, 0xfc, 0xb1, 0x95, 0x03, 0x6b, 0x30, 0xd2, 0xe0, 0x37, 0x39, 0x99, 0x3c, 0xa2, 0xaf, 0xb8, - 0xab, 0xdc, 0x4e, 0x2b, 0x2a, 0x62, 0x45, 0x02, 0xfd, 0xb4, 0x05, 0xe7, 0x93, 0x5d, 0xc7, 0x84, - 0x81, 0x85, 0xbb, 0x26, 0x57, 0x6b, 0xad, 0x88, 0xef, 0x4f, 0xc9, 0xff, 0x06, 0xf2, 0x61, 0x2f, - 0x04, 0x5c, 0xdc, 0x18, 0x5a, 0xca, 0xd0, 0xab, 0x0d, 0x99, 0x36, 0xc9, 0x3e, 0x74, 0x6b, 0x6f, - 0xc0, 0x78, 0xdb, 0xef, 0x7a, 0x91, 0xf0, 0xba, 0x14, 0xae, 0x5b, 0xcc, 0x65, 0x69, 0x4d, 0x2b, - 0xc7, 0x06, 0x56, 0x42, 0x23, 0x37, 0xf2, 0xd8, 0x1a, 0xb9, 0x0f, 0x61, 0xdc, 0xd3, 0x1e, 0x24, - 0x14, 0xdd, 0x60, 0x85, 0x76, 0x51, 0xc3, 0xe6, 0xbd, 0xd4, 0x4b, 0xb0, 0x41, 0xad, 0x58, 0x5b, - 0x06, 0x1f, 0x4f, 0x5b, 0x76, 0xac, 0x57, 0x62, 0xfb, 0xef, 0x95, 0x32, 0x6e, 0x0c, 0x5c, 0x2b, - 0xf7, 0x8e, 0xa9, 0x95, 0xbb, 0x94, 0xd4, 0xca, 0xa5, 0x4c, 0x55, 0x86, 0x42, 0xae, 0xff, 0x0c, - 0xa6, 0x7d, 0xc7, 0xd2, 0xfe, 0x0b, 0x16, 0x9c, 0x61, 0xb6, 0x0f, 0xda, 0xc0, 0xc7, 0xb6, 0x77, - 0x30, 0x87, 0xd8, 0x5b, 0xd9, 0xe4, 0x70, 0x5e, 0x3b, 0x76, 0x0b, 0x2e, 0xf6, 0x3a, 0x77, 0x99, - 0x7f, 0x71, 0x53, 0xb9, 0x57, 0xc4, 0xfe, 0xc5, 0xcd, 0xd5, 0x25, 0xcc, 0x20, 0xfd, 0x86, 0x5d, - 0xb4, 0xff, 0x4f, 0x0b, 0xca, 0x35, 0xbf, 0x79, 0x0c, 0x37, 0xfa, 0x2f, 0x19, 0x37, 0xfa, 0x67, - 0xb2, 0x4f, 0xfc, 0x66, 0xae, 0xb1, 0x6f, 0x39, 0x61, 0xec, 0x3b, 0x9f, 0x47, 0xa0, 0xd8, 0xb4, - 0xf7, 0xb7, 0xcb, 0x30, 0x56, 0xf3, 0x9b, 0x6a, 0x9f, 0xfd, 0x77, 0x8f, 0xf3, 0x8c, 0x28, 0x37, - 0x67, 0x99, 0x46, 0x99, 0xf9, 0x13, 0xcb, 0xa8, 0x17, 0x7f, 0xc6, 0x5e, 0x13, 0xdd, 0x23, 0xee, - 0xd6, 0x76, 0x44, 0x9a, 0xc9, 0xcf, 0x39, 0xbe, 0xd7, 0x44, 0x7f, 0x58, 0x86, 0xa9, 0x44, 0xeb, - 0xa8, 0x05, 0x13, 0x2d, 0xdd, 0x94, 0x24, 0xd6, 0xe9, 0x63, 0x59, 0xa1, 0xc4, 0x6b, 0x0c, 0xad, - 0x08, 0x9b, 0xc4, 0xd1, 0x1c, 0x80, 0xa7, 0xfb, 0xa4, 0xab, 0x98, 0xd0, 0x9a, 0x3f, 0xba, 0x86, - 0x81, 0xde, 0x84, 0xb1, 0xc8, 0xef, 0xf8, 0x2d, 0x7f, 0x6b, 0xef, 0xa6, 0x8a, 0x8f, 0xac, 0x5c, - 0x96, 0x37, 0x62, 0x10, 0xd6, 0xf1, 0xd0, 0x43, 0x98, 0x51, 0x44, 0xea, 0x4f, 0xc0, 0xbc, 0xc6, - 0xd4, 0x26, 0xeb, 0x49, 0x8a, 0x38, 0xdd, 0x08, 0x7a, 0x0b, 0x26, 0x99, 0xef, 0x34, 0xab, 0x7f, - 0x93, 0xec, 0xc9, 0xe0, 0xd2, 0x4c, 0xc2, 0x5e, 0x33, 0x20, 0x38, 0x81, 0x89, 0x16, 0x61, 0xa6, - 0xed, 0x86, 0x89, 0xea, 0x43, 0xac, 0x3a, 0xeb, 0xc0, 0x5a, 0x12, 0x88, 0xd3, 0xf8, 0xf6, 0x2f, - 0x88, 0x39, 0xf6, 0x22, 0xf7, 0xd3, 0xed, 0xf8, 0xc9, 0xde, 0x8e, 0xdf, 0xb7, 0x60, 0x9a, 0xb6, - 0xce, 0x1c, 0x42, 0xa5, 0x20, 0xa5, 0xd2, 0x8f, 0x58, 0x05, 0xe9, 0x47, 0x2e, 0x51, 0xb6, 0xdd, - 0xf4, 0xbb, 0x91, 0xd0, 0x8e, 0x6a, 0x7c, 0x99, 0x96, 0x62, 0x01, 0x15, 0x78, 0x24, 0x08, 0xc4, - 0xab, 0x7b, 0x1d, 0x8f, 0x04, 0x01, 0x16, 0x50, 0x99, 0x9d, 0x64, 0x20, 0x3b, 0x3b, 0x09, 0x0f, - 0x32, 0x2f, 0xfc, 0xe8, 0x84, 0x48, 0xab, 0x05, 0x99, 0x97, 0x0e, 0x76, 0x31, 0x8e, 0xfd, 0xd7, - 0xca, 0x50, 0xa9, 0xf9, 0xcd, 0x45, 0x12, 0x44, 0xee, 0xa6, 0xdb, 0x70, 0x22, 0xa2, 0xe5, 0xdb, - 0x7d, 0x0d, 0x80, 0x3d, 0x22, 0x0b, 0xb2, 0x22, 0xa8, 0xd7, 0x15, 0x04, 0x6b, 0x58, 0x54, 0x2a, - 0xd9, 0x21, 0x7b, 0xda, 0xc9, 0xab, 0xa4, 0x92, 0x9b, 0xbc, 0x18, 0x4b, 0x38, 0xba, 0xc5, 0x42, - 0x19, 0x2d, 0x3f, 0xec, 0xb8, 0x01, 0xcf, 0x4c, 0x4e, 0x1a, 0xbe, 0xd7, 0x0c, 0x45, 0xe0, 0xb7, - 0x8a, 0x08, 0x44, 0x94, 0x82, 0xe3, 0xcc, 0x5a, 0xa8, 0x06, 0x27, 0x1b, 0x01, 0x69, 0x12, 0x2f, - 0x72, 0x9d, 0xd6, 0x42, 0xd7, 0x6b, 0xb6, 0x78, 0x4a, 0x9e, 0x01, 0x23, 0x83, 0xe8, 0xc9, 0xc5, - 0x0c, 0x1c, 0x9c, 0x59, 0x53, 0x7c, 0x0a, 0x23, 0x32, 0x98, 0xfa, 0x14, 0x56, 0x4f, 0xc2, 0x59, - 0xe3, 0xf1, 0x10, 0x2e, 0x6e, 0x3b, 0xae, 0xc7, 0xea, 0x0d, 0x25, 0x1a, 0xcf, 0xc0, 0xc1, 0x99, - 0x35, 0xed, 0x3f, 0x2d, 0xc3, 0x38, 0x9d, 0x18, 0xe5, 0x71, 0xf3, 0x86, 0xe1, 0x71, 0x73, 0x31, - 0xe1, 0x71, 0x33, 0xad, 0xe3, 0x6a, 0xfe, 0x35, 0xef, 0x03, 0xf2, 0x45, 0x52, 0x82, 0xeb, 0xc4, - 0x23, 0x7c, 0xc8, 0x98, 0x92, 0xb1, 0x1c, 0xfb, 0xa3, 0xdc, 0x4e, 0x61, 0xe0, 0x8c, 0x5a, 0x9f, - 0xfa, 0xea, 0x1c, 0xaf, 0xaf, 0xce, 0x6f, 0x59, 0x6c, 0x05, 0x2c, 0xad, 0xd7, 0xb9, 0x13, 0x39, - 0xba, 0x0a, 0x63, 0xec, 0x18, 0x63, 0xb1, 0x3c, 0xa4, 0x4b, 0x0b, 0xcb, 0x6e, 0xbb, 0x1e, 0x17, - 0x63, 0x1d, 0x07, 0x5d, 0x86, 0x91, 0x90, 0x38, 0x41, 0x63, 0x5b, 0x9d, 0xe1, 0xc2, 0xff, 0x84, - 0x97, 0x61, 0x05, 0x45, 0x1f, 0xc4, 0x11, 0xe1, 0xcb, 0xf9, 0x1e, 0xe9, 0x7a, 0x7f, 0x38, 0x1f, - 0xcc, 0x0f, 0x03, 0x6f, 0xdf, 0x03, 0x94, 0xc6, 0xef, 0xe3, 0x89, 0x5f, 0xd5, 0x8c, 0x59, 0x3c, - 0x9a, 0x8a, 0x57, 0xfc, 0xef, 0x2d, 0x98, 0xac, 0xf9, 0x4d, 0xca, 0x9f, 0x7f, 0x98, 0x98, 0xb1, - 0x9e, 0xc1, 0x63, 0xa8, 0x20, 0x83, 0xc7, 0x81, 0x05, 0x17, 0xd8, 0xe7, 0x47, 0xc4, 0x6b, 0xc6, - 0x06, 0x4f, 0xdd, 0xdf, 0xe3, 0x01, 0x4c, 0x05, 0x3c, 0x7c, 0xd7, 0x9a, 0xd3, 0xe9, 0xb8, 0xde, - 0x96, 0x7c, 0xdf, 0xf6, 0x46, 0xe1, 0xbb, 0x8d, 0x24, 0x49, 0x11, 0x02, 0x4c, 0x77, 0x54, 0x35, - 0x88, 0xe2, 0x64, 0x2b, 0x3c, 0x2b, 0x8d, 0xd6, 0x1f, 0x2d, 0x41, 0xa5, 0x96, 0x95, 0x26, 0x81, - 0x80, 0xd3, 0x75, 0xec, 0xe7, 0x60, 0xb0, 0xe6, 0x37, 0x7b, 0x04, 0x8f, 0xfe, 0x3b, 0x16, 0x0c, - 0xd7, 0xfc, 0xe6, 0x31, 0x98, 0x10, 0xdf, 0x31, 0x4d, 0x88, 0x67, 0x72, 0x36, 0x47, 0x8e, 0xd5, - 0xf0, 0x9f, 0x0d, 0xc0, 0x04, 0xed, 0xa7, 0xbf, 0x25, 0xd7, 0xab, 0xb1, 0x36, 0xac, 0x3e, 0xd6, - 0x06, 0xbd, 0xd0, 0xfa, 0xad, 0x96, 0xff, 0x20, 0xb9, 0x76, 0x57, 0x58, 0x29, 0x16, 0x50, 0xf4, - 0x0a, 0x8c, 0x74, 0x02, 0xb2, 0xeb, 0xfa, 0xe2, 0xa6, 0xa8, 0x19, 0x64, 0x6b, 0xa2, 0x1c, 0x2b, - 0x0c, 0xf4, 0x06, 0x8c, 0x87, 0xae, 0x47, 0xa5, 0x62, 0x7e, 0xf4, 0x0e, 0xb0, 0x83, 0x81, 0xe7, - 0xd2, 0xd3, 0xca, 0xb1, 0x81, 0x85, 0xee, 0xc1, 0x28, 0xfb, 0xcf, 0x78, 0xeb, 0xe0, 0x91, 0x79, - 0xab, 0x48, 0x94, 0x2e, 0x08, 0xe0, 0x98, 0x16, 0x15, 0x38, 0x22, 0x99, 0x8f, 0x2a, 0x14, 0x41, - 0x84, 0x95, 0xc0, 0xa1, 0x32, 0x55, 0x85, 0x58, 0xc3, 0x42, 0x2f, 0xc3, 0x68, 0xe4, 0xb8, 0xad, - 0x5b, 0xae, 0xc7, 0x3c, 0x51, 0x68, 0xff, 0x45, 0xbe, 0x72, 0x51, 0x88, 0x63, 0x38, 0xbd, 0xd5, - 0xb0, 0xd8, 0x6a, 0x0b, 0x7b, 0x91, 0xc8, 0xa2, 0x59, 0xe6, 0xb7, 0x9a, 0x5b, 0xaa, 0x14, 0x6b, - 0x18, 0x68, 0x1b, 0xce, 0xb9, 0x1e, 0xcb, 0x3b, 0x47, 0xea, 0x3b, 0x6e, 0x67, 0xe3, 0x56, 0xfd, - 0x2e, 0x09, 0xdc, 0xcd, 0xbd, 0x05, 0xa7, 0xb1, 0x43, 0xbc, 0x26, 0x53, 0x7a, 0x8d, 0x2c, 0x3c, - 0x2f, 0xba, 0x78, 0x6e, 0xb5, 0x00, 0x17, 0x17, 0x52, 0x42, 0x36, 0xe5, 0x39, 0x01, 0x71, 0xda, - 0x42, 0xbb, 0xc5, 0x73, 0x56, 0xb1, 0x12, 0x2c, 0x20, 0xf6, 0xeb, 0x6c, 0x4f, 0xdc, 0xae, 0xa3, - 0xcf, 0x1a, 0x3c, 0xf4, 0xb4, 0xce, 0x43, 0x0f, 0xf7, 0xab, 0x43, 0xb7, 0xeb, 0x5a, 0x9c, 0xad, - 0x6b, 0x70, 0xaa, 0xe6, 0x37, 0x6b, 0x7e, 0x10, 0xad, 0xf8, 0xc1, 0x03, 0x27, 0x68, 0xca, 0x25, - 0x58, 0x95, 0x91, 0xc6, 0x28, 0x67, 0x18, 0xe4, 0x6c, 0xd6, 0x88, 0x22, 0xf6, 0x3a, 0xbb, 0x9f, - 0x1c, 0xf1, 0x61, 0x77, 0x83, 0x49, 0xca, 0x2a, 0xbb, 0xe3, 0x75, 0x27, 0x22, 0xe8, 0x36, 0x4c, - 0x34, 0x74, 0xd9, 0x44, 0x54, 0x7f, 0x49, 0x9e, 0xe8, 0x86, 0xe0, 0x92, 0x29, 0xcc, 0x98, 0xf5, - 0xed, 0xdf, 0xb7, 0x44, 0x2b, 0x1a, 0xd7, 0xe8, 0xe3, 0x60, 0x59, 0xcc, 0x62, 0x4e, 0xfc, 0xa6, - 0x7a, 0xaa, 0x5f, 0xc6, 0x84, 0xbe, 0x06, 0x67, 0x8d, 0x42, 0xe9, 0x14, 0xa2, 0xe5, 0xdf, 0x67, - 0x9a, 0x49, 0x9c, 0x87, 0x84, 0xf3, 0xeb, 0xdb, 0x3f, 0x06, 0xa7, 0x93, 0xdf, 0x25, 0x38, 0xfa, - 0x63, 0x7e, 0x5d, 0xe9, 0x68, 0x5f, 0x67, 0xbf, 0x09, 0x33, 0x35, 0x5f, 0x8b, 0xa2, 0xc2, 0xe6, - 0xaf, 0x77, 0x30, 0xb7, 0x5f, 0x1e, 0x61, 0x67, 0x7d, 0x22, 0x65, 0x23, 0xfa, 0x06, 0x4c, 0x86, - 0x84, 0x45, 0x30, 0x94, 0x3a, 0xea, 0x82, 0xa8, 0x0c, 0xf5, 0x65, 0x1d, 0x93, 0xdf, 0xc3, 0xcd, - 0x32, 0x9c, 0xa0, 0x86, 0xda, 0x30, 0xf9, 0xc0, 0xf5, 0x9a, 0xfe, 0x83, 0x50, 0xd2, 0x1f, 0xc9, - 0x37, 0x78, 0xdd, 0xe3, 0x98, 0x89, 0x3e, 0x1a, 0xcd, 0xdd, 0x33, 0x88, 0xe1, 0x04, 0x71, 0xca, - 0x6a, 0x82, 0xae, 0x37, 0x1f, 0xde, 0x09, 0x49, 0x20, 0xe2, 0x2b, 0x32, 0x56, 0x83, 0x65, 0x21, - 0x8e, 0xe1, 0x94, 0xd5, 0xb0, 0x3f, 0x2c, 0xac, 0x03, 0xe3, 0x65, 0x82, 0xd5, 0x60, 0x55, 0x8a, - 0x35, 0x0c, 0xca, 0x8a, 0xd9, 0xbf, 0x75, 0xdf, 0xc3, 0xbe, 0x1f, 0x49, 0xe6, 0xcd, 0xb2, 0xea, - 0x6a, 0xe5, 0xd8, 0xc0, 0xca, 0x89, 0xe6, 0x38, 0x70, 0xd4, 0x68, 0x8e, 0x28, 0x2a, 0x88, 0x64, - 0xc1, 0xe3, 0x91, 0x5f, 0x2b, 0x8a, 0x64, 0x71, 0xf8, 0x58, 0x51, 0x2e, 0xa8, 0xc0, 0xb3, 0x29, - 0x06, 0x68, 0x90, 0x87, 0xab, 0x64, 0x26, 0xf9, 0x3a, 0x1f, 0x1d, 0x09, 0x43, 0xcb, 0x30, 0x1c, - 0xee, 0x85, 0x8d, 0xa8, 0x15, 0x16, 0x65, 0x4e, 0xae, 0x33, 0x94, 0x58, 0x1e, 0xe5, 0xff, 0x43, - 0x2c, 0xeb, 0xa2, 0x06, 0x9c, 0x10, 0x14, 0x17, 0xb7, 0x1d, 0x4f, 0x65, 0x56, 0xe5, 0xbe, 0xb7, - 0x57, 0x0f, 0xf6, 0xab, 0x27, 0x44, 0xcb, 0x3a, 0xf8, 0x70, 0xbf, 0x4a, 0xb7, 0x64, 0x06, 0x04, - 0x67, 0x51, 0xe3, 0x4b, 0xbe, 0xd1, 0xf0, 0xdb, 0x9d, 0x5a, 0xe0, 0x6f, 0xba, 0x2d, 0x52, 0xe4, - 0xd6, 0x50, 0x37, 0x30, 0xc5, 0x92, 0x37, 0xca, 0x70, 0x82, 0x1a, 0xba, 0x0f, 0x53, 0x4e, 0xa7, - 0x33, 0x1f, 0xb4, 0xfd, 0x40, 0x36, 0x30, 0x96, 0x6f, 0x1f, 0x9b, 0x37, 0x51, 0x79, 0x62, 0xd5, - 0x44, 0x21, 0x4e, 0x12, 0xa4, 0x03, 0x25, 0x36, 0x9a, 0x31, 0x50, 0x13, 0xf1, 0x40, 0x89, 0x7d, - 0x99, 0x31, 0x50, 0x19, 0x10, 0x9c, 0x45, 0xcd, 0xfe, 0xf3, 0xec, 0x76, 0xc3, 0xa2, 0x9d, 0xb3, - 0x47, 0x6e, 0x6d, 0x98, 0xe8, 0x30, 0xb6, 0x2f, 0x92, 0x1e, 0x0a, 0x56, 0xf1, 0x46, 0x9f, 0x6a, - 0xf8, 0x07, 0x2c, 0xab, 0xb3, 0xe1, 0x8e, 0x5d, 0xd3, 0xc9, 0x61, 0x93, 0xba, 0xfd, 0xaf, 0x67, - 0x99, 0xe8, 0x58, 0xe7, 0xba, 0xf5, 0x61, 0xf1, 0xe4, 0x57, 0x48, 0xc9, 0xb3, 0xf9, 0x56, 0xac, - 0x78, 0x7d, 0x89, 0x67, 0xc3, 0x58, 0xd6, 0x45, 0x5f, 0x87, 0x49, 0xd7, 0x73, 0xe3, 0x24, 0xeb, - 0x61, 0xe5, 0x64, 0x7e, 0x2c, 0x39, 0x85, 0xa5, 0x27, 0x44, 0xd5, 0x2b, 0xe3, 0x04, 0x31, 0xf4, - 0x01, 0xf3, 0x50, 0x96, 0xa4, 0x4b, 0xfd, 0x90, 0xd6, 0x9d, 0x91, 0x25, 0x59, 0x8d, 0x08, 0xea, - 0xc2, 0x89, 0x74, 0xb2, 0xf9, 0xb0, 0x62, 0xe7, 0x5f, 0x00, 0xd3, 0xf9, 0xe2, 0xe3, 0xcc, 0x95, - 0x69, 0x58, 0x88, 0xb3, 0xe8, 0xa3, 0x5b, 0xc9, 0x54, 0xe0, 0x65, 0xc3, 0xfe, 0x95, 0x4a, 0x07, - 0x3e, 0x51, 0x98, 0x05, 0x7c, 0x0b, 0xce, 0x6b, 0x79, 0x8d, 0xaf, 0x07, 0x0e, 0xf3, 0x90, 0x73, - 0xd9, 0x69, 0xa4, 0x09, 0xb5, 0xcf, 0x1e, 0xec, 0x57, 0xcf, 0x6f, 0x14, 0x21, 0xe2, 0x62, 0x3a, - 0xe8, 0x36, 0x9c, 0xe2, 0x91, 0x90, 0x96, 0x88, 0xd3, 0x6c, 0xb9, 0x9e, 0x92, 0x9a, 0x39, 0xef, - 0x3a, 0x7b, 0xb0, 0x5f, 0x3d, 0x35, 0x9f, 0x85, 0x80, 0xb3, 0xeb, 0xa1, 0x77, 0x60, 0xb4, 0xe9, - 0x49, 0x2e, 0x3b, 0x64, 0xa4, 0x8e, 0x1e, 0x5d, 0x5a, 0xaf, 0xab, 0xef, 0x8f, 0xff, 0xe0, 0xb8, - 0x02, 0xda, 0xe2, 0x06, 0x58, 0xa5, 0x35, 0x1f, 0x4e, 0x05, 0xc8, 0x4d, 0x1a, 0x96, 0x8c, 0xd0, - 0x22, 0xdc, 0xf3, 0x40, 0x3d, 0x3f, 0x35, 0xa2, 0x8e, 0x18, 0x84, 0xd1, 0xfb, 0x80, 0x44, 0xbe, - 0xaf, 0xf9, 0x06, 0xcb, 0xa8, 0xa9, 0x79, 0x45, 0x2b, 0x3d, 0x49, 0x3d, 0x85, 0x81, 0x33, 0x6a, - 0xa1, 0x1b, 0x94, 0x3d, 0xea, 0xa5, 0x82, 0xfd, 0x4a, 0x7d, 0x56, 0x65, 0x89, 0x74, 0x02, 0xc2, - 0x1c, 0x79, 0x4d, 0x8a, 0x38, 0x51, 0x0f, 0x35, 0xe1, 0x9c, 0xd3, 0x8d, 0x7c, 0x66, 0xdb, 0x36, - 0x51, 0x37, 0xfc, 0x1d, 0xe2, 0x31, 0xb7, 0x92, 0x11, 0x16, 0x78, 0xf7, 0xdc, 0x7c, 0x01, 0x1e, - 0x2e, 0xa4, 0x42, 0xaf, 0x53, 0x74, 0x2c, 0x34, 0xb3, 0xb3, 0x11, 0x25, 0x81, 0xfb, 0x62, 0x48, - 0x0c, 0xf4, 0x26, 0x8c, 0x6d, 0xfb, 0x61, 0xb4, 0x4e, 0xa2, 0x07, 0x7e, 0xb0, 0x23, 0x12, 0x8c, - 0xc4, 0x49, 0x9d, 0x62, 0x10, 0xd6, 0xf1, 0xd0, 0x4b, 0x30, 0xcc, 0x9c, 0x1e, 0x57, 0x97, 0xd8, - 0x59, 0x3b, 0x12, 0xf3, 0x98, 0x1b, 0xbc, 0x18, 0x4b, 0xb8, 0x44, 0x5d, 0xad, 0x2d, 0x32, 0x76, - 0x9c, 0x40, 0x5d, 0xad, 0x2d, 0x62, 0x09, 0xa7, 0xcb, 0x35, 0xdc, 0x76, 0x02, 0x52, 0x0b, 0xfc, - 0x06, 0x09, 0xb5, 0x54, 0x62, 0xcf, 0xf0, 0xf4, 0x29, 0x74, 0xb9, 0xd6, 0xb3, 0x10, 0x70, 0x76, - 0x3d, 0x44, 0xd2, 0x39, 0xbd, 0x27, 0xf3, 0x8d, 0xfe, 0x69, 0x71, 0xb0, 0xcf, 0xb4, 0xde, 0x1e, - 0x4c, 0xab, 0x6c, 0xe2, 0x3c, 0x61, 0x4a, 0x58, 0x99, 0xca, 0xcf, 0xe9, 0x9f, 0xf9, 0xd6, 0x47, - 0xb9, 0x51, 0xac, 0x26, 0x28, 0xe1, 0x14, 0x6d, 0x23, 0xb2, 0xf3, 0x74, 0xcf, 0xc8, 0xce, 0x57, - 0x60, 0x34, 0xec, 0xde, 0x6f, 0xfa, 0x6d, 0xc7, 0xf5, 0x98, 0xef, 0x98, 0x76, 0x71, 0xaf, 0x4b, - 0x00, 0x8e, 0x71, 0xd0, 0x0a, 0x8c, 0x38, 0xd2, 0x47, 0x02, 0xe5, 0x07, 0xad, 0x54, 0x9e, 0x11, - 0x3c, 0x8e, 0x9b, 0xf4, 0x8a, 0x50, 0x75, 0xd1, 0xdb, 0x30, 0x21, 0x02, 0xe3, 0x08, 0x7d, 0xfc, - 0x09, 0xf3, 0x29, 0x7f, 0x5d, 0x07, 0x62, 0x13, 0x17, 0xdd, 0x81, 0xb1, 0xc8, 0x6f, 0x09, 0x45, - 0x6e, 0x58, 0x39, 0x9d, 0x1f, 0x5b, 0x7a, 0x43, 0xa1, 0xe9, 0xd6, 0x3b, 0x55, 0x15, 0xeb, 0x74, - 0xd0, 0x06, 0x5f, 0xef, 0x2c, 0x71, 0x18, 0x09, 0x2b, 0x67, 0xf2, 0xcf, 0x24, 0x95, 0x5f, 0xcc, - 0xdc, 0x0e, 0xa2, 0x26, 0xd6, 0xc9, 0xa0, 0xeb, 0x30, 0xd3, 0x09, 0x5c, 0x9f, 0xad, 0x09, 0xe5, - 0xf3, 0x51, 0x31, 0x75, 0x48, 0xb5, 0x24, 0x02, 0x4e, 0xd7, 0x61, 0x71, 0x8d, 0x44, 0x61, 0xe5, - 0x2c, 0x4f, 0x75, 0xc8, 0xf5, 0x20, 0xbc, 0x0c, 0x2b, 0x28, 0x5a, 0x63, 0x9c, 0x98, 0xeb, 0x29, - 0x2b, 0xb3, 0xf9, 0xd1, 0x32, 0x74, 0x7d, 0x26, 0x97, 0xfd, 0xd5, 0x5f, 0x1c, 0x53, 0x40, 0x4d, - 0x98, 0x0c, 0xf4, 0x1b, 0x70, 0x58, 0x39, 0x57, 0xe0, 0x79, 0x9e, 0xb8, 0x2e, 0xc7, 0x02, 0x81, - 0x51, 0x1c, 0xe2, 0x04, 0x4d, 0xf4, 0x1e, 0x4c, 0x8b, 0xa0, 0x1f, 0xf1, 0x30, 0x9d, 0x8f, 0x5f, - 0xe7, 0xe1, 0x04, 0x0c, 0xa7, 0xb0, 0x79, 0xaa, 0x41, 0xe7, 0x7e, 0x8b, 0x08, 0xd6, 0x77, 0xcb, - 0xf5, 0x76, 0xc2, 0xca, 0x05, 0xc6, 0x1f, 0x44, 0xaa, 0xc1, 0x24, 0x14, 0x67, 0xd4, 0x40, 0x1b, - 0x30, 0xdd, 0x09, 0x08, 0x69, 0xb3, 0x7b, 0x92, 0x38, 0xcf, 0xaa, 0x3c, 0xac, 0x17, 0xed, 0x49, - 0x2d, 0x01, 0x3b, 0xcc, 0x28, 0xc3, 0x29, 0x0a, 0xe8, 0x01, 0x8c, 0xf8, 0xbb, 0x24, 0xd8, 0x26, - 0x4e, 0xb3, 0x72, 0xb1, 0xe0, 0xcd, 0xa8, 0x38, 0xdc, 0x6e, 0x0b, 0xdc, 0x84, 0x4b, 0x9d, 0x2c, - 0xee, 0xed, 0x52, 0x27, 0x1b, 0x43, 0xff, 0x89, 0x05, 0x67, 0xa5, 0x91, 0xba, 0xde, 0xa1, 0xa3, - 0xbe, 0xe8, 0x7b, 0x61, 0x14, 0xf0, 0x40, 0x54, 0xcf, 0xe6, 0x07, 0x67, 0xda, 0xc8, 0xa9, 0xa4, - 0x4c, 0x25, 0x67, 0xf3, 0x30, 0x42, 0x9c, 0xdf, 0x22, 0xbd, 0xd9, 0x87, 0x24, 0x92, 0xcc, 0x68, - 0x3e, 0x5c, 0xf9, 0x60, 0x69, 0xbd, 0xf2, 0x1c, 0x8f, 0xa2, 0x45, 0x37, 0x43, 0x3d, 0x09, 0xc4, - 0x69, 0x7c, 0x74, 0x15, 0x4a, 0x7e, 0x58, 0x79, 0x9e, 0xad, 0xed, 0xb3, 0x39, 0xe3, 0x78, 0xbb, - 0xce, 0x5d, 0xab, 0x6f, 0xd7, 0x71, 0xc9, 0x0f, 0x65, 0xba, 0x3f, 0x7a, 0x9d, 0x0d, 0x2b, 0x2f, - 0x70, 0xc5, 0xba, 0x4c, 0xf7, 0xc7, 0x0a, 0x71, 0x0c, 0x47, 0xdb, 0x30, 0x15, 0x1a, 0x6a, 0x83, - 0xb0, 0x72, 0x89, 0x8d, 0xd4, 0x0b, 0x79, 0x93, 0x66, 0x60, 0x6b, 0x79, 0xb8, 0x4c, 0x2a, 0x38, - 0x49, 0x96, 0xef, 0x2e, 0x4d, 0x71, 0x11, 0x56, 0x5e, 0xec, 0xb1, 0xbb, 0x34, 0x64, 0x7d, 0x77, - 0xe9, 0x34, 0x70, 0x82, 0x26, 0xba, 0xa3, 0x3f, 0xc8, 0xbd, 0x9c, 0xef, 0xa6, 0x9b, 0xf9, 0x14, - 0x77, 0x22, 0xf7, 0x19, 0xee, 0x7b, 0x30, 0x2d, 0xcf, 0x12, 0xba, 0x32, 0x03, 0xb7, 0x49, 0x2a, - 0x2f, 0xc5, 0x9b, 0xf6, 0x46, 0x02, 0x86, 0x53, 0xd8, 0xb3, 0x3f, 0x02, 0x33, 0x29, 0x39, 0xee, - 0x28, 0xef, 0x9b, 0x66, 0x77, 0x60, 0xc2, 0xd8, 0x2b, 0x4f, 0xd7, 0xfd, 0x6d, 0x0c, 0x46, 0x95, - 0x5b, 0x52, 0x8e, 0x39, 0x72, 0xe6, 0xb1, 0xcc, 0x91, 0x57, 0x4c, 0xef, 0xb9, 0xb3, 0x49, 0xef, - 0xb9, 0x91, 0x9a, 0xdf, 0x34, 0x1c, 0xe6, 0x36, 0x32, 0x22, 0x60, 0xe7, 0x71, 0xf9, 0xfe, 0x1f, - 0x74, 0x6a, 0x16, 0xbd, 0x72, 0xdf, 0x6e, 0x78, 0x03, 0x85, 0x46, 0xc2, 0xeb, 0x30, 0xe3, 0xf9, - 0xec, 0x22, 0x42, 0x9a, 0x52, 0xca, 0x64, 0xc2, 0xe4, 0xa8, 0x1e, 0xa1, 0x31, 0x81, 0x80, 0xd3, - 0x75, 0x68, 0x83, 0x5c, 0x1a, 0x4c, 0x5a, 0x25, 0xb9, 0xb0, 0x88, 0x05, 0x94, 0x5e, 0x80, 0xf9, - 0xaf, 0xb0, 0x32, 0x9d, 0x7f, 0x01, 0xe6, 0x95, 0x92, 0x12, 0x67, 0x28, 0x25, 0x4e, 0x66, 0x84, - 0xeb, 0xf8, 0xcd, 0xd5, 0x9a, 0xb8, 0xcb, 0x68, 0xb9, 0x29, 0x9a, 0xab, 0x35, 0xcc, 0x61, 0x68, - 0x1e, 0x86, 0xd8, 0x0f, 0x19, 0xf9, 0x2a, 0x8f, 0x17, 0xad, 0xd6, 0xb4, 0x9c, 0xca, 0xac, 0x02, - 0x16, 0x15, 0x99, 0xfd, 0x81, 0x5e, 0x00, 0x99, 0xfd, 0x61, 0xf8, 0x31, 0xed, 0x0f, 0x92, 0x00, - 0x8e, 0x69, 0xa1, 0x87, 0x70, 0xca, 0xb8, 0x74, 0xab, 0x17, 0xae, 0x90, 0xef, 0x64, 0x93, 0x40, - 0x5e, 0x38, 0x2f, 0x3a, 0x7d, 0x6a, 0x35, 0x8b, 0x12, 0xce, 0x6e, 0x00, 0xb5, 0x60, 0xa6, 0x91, - 0x6a, 0x75, 0xa4, 0xff, 0x56, 0xd5, 0xba, 0x48, 0xb7, 0x98, 0x26, 0x8c, 0xde, 0x86, 0x91, 0x8f, - 0x7c, 0xee, 0x10, 0x2b, 0xee, 0x5f, 0x32, 0x3e, 0xd3, 0xc8, 0x07, 0xb7, 0xeb, 0xac, 0xfc, 0x70, - 0xbf, 0x3a, 0x56, 0xf3, 0x9b, 0xf2, 0x2f, 0x56, 0x15, 0xd0, 0x5f, 0xb2, 0x60, 0x36, 0x7d, 0xab, - 0x57, 0x9d, 0x9e, 0xe8, 0xbf, 0xd3, 0xb6, 0x68, 0x74, 0x76, 0x39, 0x97, 0x1c, 0x2e, 0x68, 0x0a, - 0x7d, 0x91, 0xee, 0xa7, 0xd0, 0x7d, 0xc4, 0x5f, 0xb8, 0x68, 0x0e, 0x09, 0x98, 0x95, 0x1e, 0xee, - 0x57, 0xa7, 0x38, 0xfb, 0x77, 0x1f, 0xa9, 0x2c, 0x1a, 0xbc, 0x02, 0xfa, 0x31, 0x38, 0x15, 0xa4, - 0xb5, 0xec, 0x44, 0xde, 0x34, 0x3e, 0xdb, 0xcf, 0x51, 0x92, 0x9c, 0x70, 0x9c, 0x45, 0x10, 0x67, - 0xb7, 0x83, 0xfe, 0xaa, 0x05, 0xcf, 0x90, 0x7c, 0x0b, 0xae, 0xb8, 0x2a, 0xbc, 0x96, 0xd3, 0x8f, - 0x02, 0xdb, 0x2f, 0x4b, 0x30, 0xf0, 0x4c, 0x01, 0x02, 0x2e, 0x6a, 0xd7, 0xfe, 0xc7, 0x16, 0xb3, - 0xfa, 0x08, 0x54, 0x12, 0x76, 0x5b, 0xd1, 0x31, 0x38, 0xc7, 0x2e, 0x1b, 0xae, 0x25, 0x8f, 0xed, - 0xdd, 0xfa, 0xdf, 0x5a, 0xcc, 0xbb, 0xf5, 0x18, 0xdf, 0xe9, 0x7e, 0x00, 0x23, 0x91, 0x68, 0x4d, - 0x74, 0x3d, 0xcf, 0x13, 0x4f, 0x76, 0x8a, 0x79, 0xf8, 0xaa, 0x1b, 0xa6, 0x2c, 0xc5, 0x8a, 0x8c, - 0xfd, 0x5f, 0xf1, 0x19, 0x90, 0x90, 0x63, 0x30, 0x6e, 0x2f, 0x99, 0xc6, 0xed, 0x6a, 0x8f, 0x2f, - 0xc8, 0x31, 0x72, 0xff, 0x03, 0xb3, 0xdf, 0x4c, 0xb3, 0xfa, 0x49, 0x77, 0xab, 0xb6, 0xbf, 0x6b, - 0x01, 0xc4, 0xe9, 0x94, 0xfa, 0x48, 0x8c, 0x7f, 0x8d, 0xde, 0x29, 0xfd, 0xc8, 0x6f, 0xf8, 0x2d, - 0x61, 0x5c, 0x3b, 0x17, 0xdb, 0xd7, 0x79, 0xf9, 0xa1, 0xf6, 0x1b, 0x2b, 0x6c, 0x54, 0x95, 0xf1, - 0xcd, 0xcb, 0xb1, 0x5b, 0x8b, 0x11, 0xdb, 0xfc, 0x67, 0x2c, 0x38, 0x99, 0xf5, 0xe8, 0x0b, 0xbd, - 0x02, 0x23, 0x5c, 0xc7, 0xac, 0x5c, 0xde, 0xd5, 0x6c, 0xde, 0x15, 0xe5, 0x58, 0x61, 0xf4, 0xeb, - 0xfa, 0x7e, 0xc4, 0x54, 0x3f, 0xb7, 0x61, 0xa2, 0x16, 0x10, 0x4d, 0xee, 0x79, 0x37, 0xce, 0x42, - 0x36, 0xba, 0xf0, 0xca, 0x91, 0x23, 0xa9, 0xd9, 0xbf, 0x54, 0x82, 0x93, 0xdc, 0x71, 0x73, 0x7e, - 0xd7, 0x77, 0x9b, 0x35, 0xbf, 0x29, 0x9e, 0xea, 0x7f, 0x15, 0xc6, 0x3b, 0x9a, 0x61, 0xa0, 0x28, - 0x6d, 0x85, 0x6e, 0x40, 0x88, 0x55, 0x99, 0x7a, 0x29, 0x36, 0x68, 0xa1, 0x26, 0x8c, 0x93, 0x5d, - 0xb7, 0xa1, 0x1c, 0xc3, 0x4a, 0x47, 0x16, 0x1e, 0x54, 0x2b, 0xcb, 0x1a, 0x1d, 0x6c, 0x50, 0xed, - 0xfb, 0xb9, 0x85, 0x26, 0x3a, 0x0e, 0xf4, 0x70, 0x06, 0xfb, 0x59, 0x0b, 0xce, 0xe4, 0x24, 0xb9, - 0xa0, 0xcd, 0x3d, 0x60, 0x2e, 0xb2, 0x62, 0xd9, 0xaa, 0xe6, 0xb8, 0xe3, 0x2c, 0x16, 0x50, 0xf4, - 0x65, 0x80, 0x4e, 0x9c, 0x1a, 0xb8, 0x47, 0x36, 0x00, 0x23, 0x2e, 0xb8, 0x16, 0xe2, 0x59, 0x65, - 0x10, 0xd6, 0x68, 0xd9, 0x3f, 0x33, 0x00, 0x83, 0xcc, 0x07, 0x0f, 0xd5, 0x60, 0x78, 0x9b, 0x47, - 0x20, 0x2d, 0x9c, 0x37, 0x8a, 0x2b, 0x43, 0x9a, 0xc6, 0xf3, 0xa6, 0x95, 0x62, 0x49, 0x06, 0xad, - 0xc1, 0x09, 0x9e, 0xf6, 0xb8, 0xb5, 0x44, 0x5a, 0xce, 0x9e, 0xd4, 0xb9, 0x97, 0xd8, 0xa7, 0x2a, - 0xdb, 0xc3, 0x6a, 0x1a, 0x05, 0x67, 0xd5, 0x43, 0xef, 0xc2, 0x64, 0xe4, 0xb6, 0x89, 0xdf, 0x8d, - 0x4c, 0x77, 0x53, 0x75, 0x2d, 0xdc, 0x30, 0xa0, 0x38, 0x81, 0x8d, 0xde, 0x86, 0x89, 0x4e, 0xca, - 0xba, 0x30, 0x18, 0xab, 0xe1, 0x4c, 0x8b, 0x82, 0x89, 0xcb, 0xde, 0x7d, 0x75, 0xd9, 0x2b, 0xb7, - 0x8d, 0xed, 0x80, 0x84, 0xdb, 0x7e, 0xab, 0xc9, 0x24, 0xf3, 0x41, 0xed, 0xdd, 0x57, 0x02, 0x8e, - 0x53, 0x35, 0x28, 0x95, 0x4d, 0xc7, 0x6d, 0x75, 0x03, 0x12, 0x53, 0x19, 0x32, 0xa9, 0xac, 0x24, - 0xe0, 0x38, 0x55, 0xa3, 0xb7, 0xd9, 0x64, 0xf8, 0xc9, 0x98, 0x4d, 0xec, 0xbf, 0x5b, 0x02, 0x63, - 0x6a, 0x7f, 0x88, 0xb3, 0x18, 0xbf, 0x03, 0x03, 0x5b, 0x41, 0xa7, 0x21, 0xfc, 0x4d, 0x33, 0xbf, - 0xec, 0x3a, 0xae, 0x2d, 0xea, 0x5f, 0x46, 0xff, 0x63, 0x56, 0x8b, 0xee, 0xf1, 0x53, 0xc2, 0xfb, - 0x5a, 0x06, 0x29, 0x56, 0xcf, 0x2b, 0x87, 0xa5, 0x26, 0xa2, 0x20, 0x9c, 0xbf, 0x78, 0x23, 0xa6, - 0xfc, 0xb7, 0x35, 0x53, 0xb8, 0xd0, 0x43, 0x48, 0x2a, 0xe8, 0x2a, 0x8c, 0x89, 0xc4, 0xb2, 0xec, - 0x15, 0x20, 0xdf, 0x4c, 0xcc, 0x95, 0x74, 0x29, 0x2e, 0xc6, 0x3a, 0x8e, 0xfd, 0x97, 0x4b, 0x70, - 0x22, 0xe3, 0x19, 0x37, 0x3f, 0x46, 0xb6, 0xdc, 0x30, 0x0a, 0xf6, 0x92, 0x87, 0x13, 0x16, 0xe5, - 0x58, 0x61, 0x50, 0x5e, 0xc5, 0x0f, 0xaa, 0xe4, 0xe1, 0x24, 0x9e, 0x49, 0x0a, 0xe8, 0xd1, 0x0e, - 0x27, 0x7a, 0x6c, 0x77, 0x43, 0x22, 0x33, 0x87, 0xa8, 0x63, 0x9b, 0xb9, 0x64, 0x30, 0x08, 0xbd, - 0x9a, 0x6e, 0x29, 0x3f, 0x03, 0xed, 0x6a, 0xca, 0x3d, 0x0d, 0x38, 0x8c, 0x76, 0x2e, 0x22, 0x9e, - 0xe3, 0x45, 0xe2, 0x02, 0x1b, 0x47, 0x94, 0x67, 0xa5, 0x58, 0x40, 0xed, 0xef, 0x95, 0xe1, 0x6c, - 0x6e, 0x60, 0x07, 0xda, 0xf5, 0xb6, 0xef, 0xb9, 0x91, 0xaf, 0x7c, 0x74, 0x79, 0x14, 0x79, 0xd2, - 0xd9, 0x5e, 0x13, 0xe5, 0x58, 0x61, 0xa0, 0x4b, 0x30, 0xc8, 0x2c, 0x12, 0xc9, 0xa4, 0x92, 0x78, - 0x61, 0x89, 0xc7, 0xd8, 0xe5, 0x60, 0xed, 0x54, 0x2f, 0x17, 0x9e, 0xea, 0xcf, 0x51, 0x09, 0xc6, - 0x6f, 0x25, 0x0f, 0x14, 0xda, 0x5d, 0xdf, 0x6f, 0x61, 0x06, 0x44, 0x2f, 0x88, 0xf1, 0x4a, 0x38, - 0xa5, 0x62, 0xa7, 0xe9, 0x87, 0xda, 0xa0, 0x71, 0x07, 0xf8, 0xc0, 0xf5, 0xb6, 0x92, 0xce, 0xca, - 0x37, 0x79, 0x31, 0x96, 0x70, 0xba, 0x97, 0xe2, 0xdc, 0xf8, 0xc3, 0xf9, 0x7b, 0x49, 0x65, 0xc0, - 0xef, 0x99, 0x16, 0x5f, 0x5f, 0x01, 0x23, 0x3d, 0xc5, 0x93, 0x9f, 0x2a, 0xc3, 0x14, 0x5e, 0x58, - 0xfa, 0x74, 0x22, 0xee, 0xa4, 0x27, 0xa2, 0x7f, 0xb3, 0xd9, 0x93, 0x9a, 0x8d, 0x7f, 0x68, 0xc1, - 0x14, 0x4b, 0x6f, 0x2b, 0xa2, 0x32, 0xb9, 0xbe, 0x77, 0x0c, 0x57, 0x81, 0xe7, 0x60, 0x30, 0xa0, - 0x8d, 0x8a, 0x19, 0x54, 0x7b, 0x9c, 0xf5, 0x04, 0x73, 0x18, 0x3a, 0x07, 0x03, 0xac, 0x0b, 0x74, - 0xf2, 0xc6, 0x39, 0x0b, 0x5e, 0x72, 0x22, 0x07, 0xb3, 0x52, 0x16, 0x1f, 0x16, 0x93, 0x4e, 0xcb, - 0xe5, 0x9d, 0x8e, 0xfd, 0x45, 0x3e, 0x19, 0x21, 0x9f, 0x32, 0xbb, 0xf6, 0xf1, 0xe2, 0xc3, 0x66, - 0x93, 0x2c, 0xbe, 0x66, 0xff, 0x71, 0x09, 0x2e, 0x64, 0xd6, 0xeb, 0x3b, 0x3e, 0x6c, 0x71, 0xed, - 0xa7, 0x99, 0x0c, 0xb3, 0x7c, 0x8c, 0x4f, 0x41, 0x06, 0xfa, 0x95, 0xfe, 0x07, 0xfb, 0x08, 0xdb, - 0x9a, 0x39, 0x64, 0x9f, 0x90, 0xb0, 0xad, 0x99, 0x7d, 0xcb, 0x51, 0x13, 0xfc, 0x69, 0x29, 0xe7, - 0x5b, 0x98, 0xc2, 0xe0, 0x32, 0xe5, 0x33, 0x0c, 0x18, 0xca, 0x4b, 0x38, 0xe7, 0x31, 0xbc, 0x0c, - 0x2b, 0x28, 0x9a, 0x87, 0xa9, 0xb6, 0xeb, 0x51, 0xe6, 0xb3, 0x67, 0x8a, 0xe2, 0xca, 0x90, 0xb4, - 0x66, 0x82, 0x71, 0x12, 0x1f, 0xb9, 0x5a, 0x48, 0x57, 0xfe, 0x75, 0x6f, 0x1f, 0x69, 0xd7, 0xcd, - 0x99, 0xbe, 0x34, 0x6a, 0x14, 0x33, 0xc2, 0xbb, 0xae, 0x69, 0x7a, 0xa2, 0x72, 0xff, 0x7a, 0xa2, - 0xf1, 0x6c, 0x1d, 0xd1, 0xec, 0xdb, 0x30, 0xf1, 0xd8, 0xf6, 0x1f, 0xfb, 0xfb, 0x65, 0x78, 0xa6, - 0x60, 0xdb, 0x73, 0x5e, 0x6f, 0xcc, 0x81, 0xc6, 0xeb, 0x53, 0xf3, 0x50, 0x83, 0x93, 0x9b, 0xdd, - 0x56, 0x6b, 0x8f, 0x3d, 0x6c, 0x25, 0x4d, 0x89, 0x21, 0x64, 0x4a, 0xf5, 0xf4, 0x6d, 0x25, 0x03, - 0x07, 0x67, 0xd6, 0xa4, 0x57, 0x2c, 0x7a, 0x92, 0xec, 0x29, 0x52, 0x89, 0x2b, 0x16, 0xd6, 0x81, - 0xd8, 0xc4, 0x45, 0xd7, 0x61, 0xc6, 0xd9, 0x75, 0x5c, 0x9e, 0x4c, 0x48, 0x12, 0xe0, 0x77, 0x2c, - 0xa5, 0x23, 0x9f, 0x4f, 0x22, 0xe0, 0x74, 0x9d, 0x1c, 0x53, 0x55, 0xf9, 0xb1, 0x4c, 0x55, 0x66, - 0x70, 0xd1, 0xa1, 0xfc, 0xe0, 0xa2, 0xc5, 0x7c, 0xb1, 0x67, 0x1e, 0xd6, 0x0f, 0x61, 0xe2, 0xa8, - 0x3e, 0xf1, 0x2f, 0xc1, 0xb0, 0x78, 0xc3, 0x93, 0x7c, 0xaf, 0x29, 0xf3, 0xff, 0x4b, 0xb8, 0xfd, - 0xbf, 0x5a, 0xa0, 0x74, 0xdc, 0x66, 0x1e, 0x81, 0xb7, 0x99, 0x83, 0x3f, 0xd7, 0xce, 0x6b, 0x6f, - 0x45, 0x4f, 0x69, 0x0e, 0xfe, 0x31, 0x10, 0x9b, 0xb8, 0x7c, 0xb9, 0x85, 0x71, 0xc4, 0x1a, 0xe3, - 0x02, 0x21, 0x6c, 0xab, 0x0a, 0x03, 0x7d, 0x05, 0x86, 0x9b, 0xee, 0xae, 0x1b, 0x0a, 0x3d, 0xda, - 0x91, 0x6d, 0x93, 0xf1, 0xf7, 0x2d, 0x71, 0x32, 0x58, 0xd2, 0xb3, 0xff, 0x8a, 0x05, 0xca, 0x28, - 0x7c, 0x83, 0x38, 0xad, 0x68, 0x1b, 0xbd, 0x07, 0x20, 0x29, 0x28, 0xdd, 0x9b, 0x74, 0x55, 0x03, - 0xac, 0x20, 0x87, 0xc6, 0x3f, 0xac, 0xd5, 0x41, 0xef, 0xc2, 0xd0, 0x36, 0xa3, 0x25, 0xbe, 0xed, - 0x92, 0x32, 0xc1, 0xb1, 0xd2, 0xc3, 0xfd, 0xea, 0x49, 0xb3, 0x4d, 0x79, 0x8a, 0xf1, 0x5a, 0xf6, - 0x4f, 0x95, 0xe2, 0x39, 0xfd, 0xa0, 0xeb, 0x47, 0xce, 0x31, 0x48, 0x22, 0xd7, 0x0d, 0x49, 0xe4, - 0x85, 0x22, 0xab, 0x37, 0xeb, 0x52, 0xae, 0x04, 0x72, 0x3b, 0x21, 0x81, 0xbc, 0xd8, 0x9b, 0x54, - 0xb1, 0xe4, 0xf1, 0x5f, 0x5b, 0x30, 0x63, 0xe0, 0x1f, 0xc3, 0x01, 0xb8, 0x62, 0x1e, 0x80, 0xcf, - 0xf6, 0xfc, 0x86, 0x9c, 0x83, 0xef, 0x27, 0xca, 0x89, 0xbe, 0xb3, 0x03, 0xef, 0x23, 0x18, 0xd8, - 0x76, 0x82, 0xa6, 0xb8, 0xd7, 0x5f, 0xe9, 0x6b, 0xac, 0xe7, 0x6e, 0x38, 0x81, 0x70, 0x73, 0x79, - 0x45, 0x8e, 0x3a, 0x2d, 0xea, 0xe9, 0xe2, 0xc2, 0x9a, 0x42, 0xd7, 0x60, 0x28, 0x6c, 0xf8, 0x1d, - 0xf5, 0x24, 0xf4, 0x22, 0x1b, 0x68, 0x56, 0x72, 0xb8, 0x5f, 0x45, 0x66, 0x73, 0xb4, 0x18, 0x0b, - 0x7c, 0xf4, 0x55, 0x98, 0x60, 0xbf, 0x94, 0xcf, 0x69, 0x39, 0x5f, 0x03, 0x53, 0xd7, 0x11, 0xb9, - 0x43, 0xb6, 0x51, 0x84, 0x4d, 0x52, 0xb3, 0x5b, 0x30, 0xaa, 0x3e, 0xeb, 0xa9, 0x7a, 0x24, 0xfc, - 0x8b, 0x32, 0x9c, 0xc8, 0x58, 0x73, 0x28, 0x34, 0x66, 0xe2, 0x6a, 0x9f, 0x4b, 0xf5, 0x63, 0xce, - 0x45, 0xc8, 0x2e, 0x80, 0x4d, 0xb1, 0xb6, 0xfa, 0x6e, 0xf4, 0x4e, 0x48, 0x92, 0x8d, 0xd2, 0xa2, - 0xde, 0x8d, 0xd2, 0xc6, 0x8e, 0x6d, 0xa8, 0x69, 0x43, 0xaa, 0xa7, 0x4f, 0x75, 0x4e, 0x7f, 0x6b, - 0x00, 0x4e, 0x66, 0x39, 0xe2, 0xa0, 0x1f, 0x85, 0x21, 0xf6, 0x9c, 0xaf, 0xf0, 0xfd, 0x6b, 0x56, - 0xcd, 0x39, 0xf6, 0x22, 0x50, 0x84, 0xa2, 0x9e, 0x93, 0xec, 0x88, 0x17, 0xf6, 0x1c, 0x66, 0xd1, - 0x26, 0x0b, 0x11, 0x27, 0x4e, 0x4f, 0xc9, 0x3e, 0x3e, 0xdf, 0x77, 0x07, 0xc4, 0xf9, 0x1b, 0x26, - 0xfc, 0xd9, 0x64, 0x71, 0x6f, 0x7f, 0x36, 0xd9, 0x32, 0x5a, 0x85, 0xa1, 0x06, 0x77, 0x94, 0x2a, - 0xf7, 0x66, 0x61, 0xdc, 0x4b, 0x4a, 0x31, 0x60, 0xe1, 0x1d, 0x25, 0x08, 0xcc, 0xba, 0x30, 0xa6, - 0x0d, 0xcc, 0x53, 0x5d, 0x3c, 0x3b, 0xf4, 0xe0, 0xd3, 0x86, 0xe0, 0xa9, 0x2e, 0xa0, 0xbf, 0xae, - 0x9d, 0xfd, 0x82, 0x1f, 0x7c, 0xce, 0x90, 0x9d, 0xce, 0x25, 0x1e, 0x59, 0x26, 0xf6, 0x15, 0x93, - 0xa5, 0xea, 0x66, 0x0e, 0x87, 0xdc, 0x44, 0x74, 0xe6, 0x81, 0x5f, 0x9c, 0xb7, 0xc1, 0xfe, 0x59, - 0x0b, 0x12, 0xcf, 0xe0, 0x94, 0xba, 0xd3, 0xca, 0x55, 0x77, 0x5e, 0x84, 0x81, 0xc0, 0x6f, 0x49, - 0x79, 0x4a, 0x61, 0x60, 0xbf, 0x45, 0x30, 0x83, 0x50, 0x8c, 0x28, 0x56, 0x62, 0x8d, 0xeb, 0x17, - 0x74, 0x71, 0xf5, 0x7e, 0x0e, 0x06, 0x5b, 0x64, 0x97, 0xb4, 0x92, 0xf9, 0x98, 0x6f, 0xd1, 0x42, - 0xcc, 0x61, 0xf6, 0x3f, 0x1c, 0x80, 0xf3, 0x85, 0x91, 0x24, 0xa9, 0x80, 0xb9, 0xe5, 0x44, 0xe4, - 0x81, 0xb3, 0x97, 0xcc, 0x43, 0x7a, 0x9d, 0x17, 0x63, 0x09, 0x67, 0xef, 0xee, 0x79, 0x6e, 0xad, - 0x84, 0x72, 0x58, 0xa4, 0xd4, 0x12, 0x50, 0x53, 0xd9, 0x58, 0x7e, 0x12, 0xca, 0xc6, 0xd7, 0x00, - 0xc2, 0xb0, 0xc5, 0xbd, 0x5d, 0x9b, 0xe2, 0x41, 0x7f, 0x1c, 0xe9, 0xa4, 0x7e, 0x4b, 0x40, 0xb0, - 0x86, 0x85, 0x96, 0x60, 0xba, 0x13, 0xf8, 0x11, 0xd7, 0xb5, 0x2f, 0x71, 0x87, 0xf0, 0x41, 0x33, - 0x88, 0x5f, 0x2d, 0x01, 0xc7, 0xa9, 0x1a, 0xe8, 0x4d, 0x18, 0x13, 0x81, 0xfd, 0x6a, 0xbe, 0xdf, - 0x12, 0xea, 0x3d, 0xe5, 0x23, 0x5d, 0x8f, 0x41, 0x58, 0xc7, 0xd3, 0xaa, 0x31, 0x05, 0xfe, 0x70, - 0x66, 0x35, 0xae, 0xc4, 0xd7, 0xf0, 0x12, 0x49, 0x40, 0x46, 0xfa, 0x4a, 0x02, 0x12, 0x2b, 0x3c, - 0x47, 0xfb, 0xb6, 0x27, 0x43, 0x4f, 0x15, 0xe1, 0xaf, 0x0c, 0xc0, 0x09, 0xb1, 0x70, 0x9e, 0xf6, - 0x72, 0xb9, 0x93, 0x5e, 0x2e, 0x4f, 0x42, 0x25, 0xfa, 0xe9, 0x9a, 0x39, 0xee, 0x35, 0xf3, 0xd3, - 0x16, 0x98, 0x32, 0x24, 0xfa, 0x8f, 0x72, 0x13, 0x39, 0xbf, 0x99, 0x2b, 0x93, 0xc6, 0x19, 0x02, - 0x3e, 0x5e, 0x4a, 0x67, 0xfb, 0x7f, 0xb6, 0xe0, 0xd9, 0x9e, 0x14, 0xd1, 0x32, 0x8c, 0x32, 0x41, - 0x57, 0xbb, 0x17, 0xbf, 0xa8, 0x1e, 0x8c, 0x48, 0x40, 0x8e, 0xdc, 0x1d, 0xd7, 0x44, 0xcb, 0xa9, - 0x8c, 0xd9, 0x2f, 0x65, 0x64, 0xcc, 0x3e, 0x65, 0x0c, 0xcf, 0x63, 0xa6, 0xcc, 0xfe, 0x49, 0x7a, - 0xe2, 0x98, 0xaf, 0x4e, 0x3f, 0x6f, 0xa8, 0x73, 0xed, 0x84, 0x3a, 0x17, 0x99, 0xd8, 0xda, 0x19, - 0xf2, 0x1e, 0x4c, 0xb3, 0x88, 0xbf, 0xec, 0xf9, 0x92, 0x78, 0xae, 0x5a, 0x8a, 0xbd, 0x9d, 0x6f, - 0x25, 0x60, 0x38, 0x85, 0x6d, 0xff, 0x9b, 0x32, 0x0c, 0xf1, 0xed, 0x77, 0x0c, 0x17, 0xdf, 0x97, - 0x61, 0xd4, 0x6d, 0xb7, 0xbb, 0x3c, 0x09, 0xf2, 0x60, 0xec, 0xf0, 0xbe, 0x2a, 0x0b, 0x71, 0x0c, - 0x47, 0x2b, 0xc2, 0x92, 0x50, 0x90, 0x54, 0x80, 0x77, 0x7c, 0x6e, 0xc9, 0x89, 0x1c, 0x2e, 0xc5, - 0xa9, 0x73, 0x36, 0xb6, 0x39, 0xa0, 0x6f, 0x00, 0x84, 0x51, 0xe0, 0x7a, 0x5b, 0xb4, 0x4c, 0x64, - 0x9e, 0xf9, 0x6c, 0x01, 0xb5, 0xba, 0x42, 0xe6, 0x34, 0x63, 0x9e, 0xa3, 0x00, 0x58, 0xa3, 0x88, - 0xe6, 0x8c, 0x93, 0x7e, 0x36, 0x31, 0x77, 0xc0, 0xa9, 0xc6, 0x73, 0x36, 0xfb, 0x05, 0x18, 0x55, - 0xc4, 0x7b, 0xe9, 0x15, 0xc7, 0x75, 0x81, 0xed, 0x4b, 0x30, 0x95, 0xe8, 0xdb, 0x91, 0xd4, 0x92, - 0xbf, 0x6e, 0xc1, 0x14, 0xef, 0xcc, 0xb2, 0xb7, 0x2b, 0x4e, 0x83, 0x47, 0x70, 0xb2, 0x95, 0xc1, - 0x95, 0xc5, 0xf4, 0xf7, 0xcf, 0xc5, 0x95, 0x1a, 0x32, 0x0b, 0x8a, 0x33, 0xdb, 0x40, 0x97, 0xe9, - 0x8e, 0xa3, 0x5c, 0xd7, 0x69, 0x89, 0x98, 0x2b, 0xe3, 0x7c, 0xb7, 0xf1, 0x32, 0xac, 0xa0, 0xf6, - 0x1f, 0x58, 0x30, 0xc3, 0x7b, 0x7e, 0x93, 0xec, 0x29, 0xde, 0xf4, 0x83, 0xec, 0xbb, 0x48, 0xbf, - 0x5f, 0xca, 0x49, 0xbf, 0xaf, 0x7f, 0x5a, 0xb9, 0xf0, 0xd3, 0x7e, 0xc9, 0x02, 0xb1, 0x42, 0x8e, - 0x41, 0xd3, 0xf2, 0x23, 0xa6, 0xa6, 0x65, 0x36, 0x7f, 0x13, 0xe4, 0xa8, 0x58, 0xfe, 0xbd, 0x05, - 0xd3, 0x1c, 0x41, 0x8b, 0x62, 0xf7, 0x83, 0x9c, 0x87, 0x05, 0xf3, 0x8b, 0x32, 0xdd, 0x5a, 0x6f, - 0x92, 0xbd, 0x0d, 0xbf, 0xe6, 0x44, 0xdb, 0xd9, 0x1f, 0x65, 0x4c, 0xd6, 0x40, 0xe1, 0x64, 0x35, - 0xe5, 0x06, 0x32, 0x12, 0xad, 0xf6, 0x50, 0x00, 0x1f, 0x35, 0xd1, 0xaa, 0xfd, 0x47, 0x16, 0x20, - 0xde, 0x8c, 0x21, 0xb8, 0x51, 0x71, 0x88, 0x95, 0x66, 0x06, 0x0b, 0x54, 0x10, 0xac, 0x61, 0x3d, - 0x91, 0xe1, 0x49, 0xb8, 0xb2, 0x94, 0x7b, 0xbb, 0xb2, 0x1c, 0x61, 0x44, 0x7f, 0x69, 0x18, 0x92, - 0x0f, 0x56, 0xd1, 0x5d, 0x18, 0x6f, 0x38, 0x1d, 0xe7, 0xbe, 0xdb, 0x72, 0x23, 0x97, 0x84, 0x45, - 0x7e, 0x6e, 0x8b, 0x1a, 0x9e, 0x70, 0x3e, 0xd0, 0x4a, 0xb0, 0x41, 0x07, 0xcd, 0x01, 0x74, 0x02, - 0x77, 0xd7, 0x6d, 0x91, 0x2d, 0xa6, 0x10, 0x62, 0x51, 0x9e, 0xb8, 0xd3, 0x9d, 0x2c, 0xc5, 0x1a, - 0x46, 0x46, 0x70, 0x95, 0xf2, 0x53, 0x0e, 0xae, 0x02, 0xc7, 0x16, 0x5c, 0x65, 0xe0, 0x48, 0xc1, - 0x55, 0x46, 0x8e, 0x1c, 0x5c, 0x65, 0xb0, 0xaf, 0xe0, 0x2a, 0x18, 0x4e, 0x4b, 0xd9, 0x93, 0xfe, - 0x5f, 0x71, 0x5b, 0x44, 0x5c, 0x38, 0x78, 0x68, 0xaa, 0xd9, 0x83, 0xfd, 0xea, 0x69, 0x9c, 0x89, - 0x81, 0x73, 0x6a, 0xa2, 0x2f, 0x43, 0xc5, 0x69, 0xb5, 0xfc, 0x07, 0x6a, 0x52, 0x97, 0xc3, 0x86, - 0xd3, 0x8a, 0xc3, 0x32, 0x8e, 0x2c, 0x9c, 0x3b, 0xd8, 0xaf, 0x56, 0xe6, 0x73, 0x70, 0x70, 0x6e, - 0x6d, 0xf4, 0x0e, 0x8c, 0x76, 0x02, 0xbf, 0xb1, 0xa6, 0xbd, 0xaa, 0xbf, 0x40, 0x07, 0xb0, 0x26, - 0x0b, 0x0f, 0xf7, 0xab, 0x13, 0xea, 0x0f, 0x3b, 0xf0, 0xe3, 0x0a, 0x19, 0x71, 0x4b, 0xc6, 0x9e, - 0x76, 0xdc, 0x92, 0xf1, 0x27, 0x1c, 0xb7, 0xc4, 0xde, 0x81, 0x13, 0x75, 0x12, 0xb8, 0x4e, 0xcb, - 0x7d, 0x44, 0x65, 0x72, 0xc9, 0x03, 0x37, 0x60, 0x34, 0x48, 0x70, 0xfd, 0xbe, 0x92, 0x09, 0x68, - 0x7a, 0x19, 0xc9, 0xe5, 0x63, 0x42, 0xf6, 0xff, 0x6b, 0xc1, 0xb0, 0x78, 0x04, 0x7b, 0x0c, 0x92, - 0xe9, 0xbc, 0x61, 0x92, 0xa9, 0x66, 0x4f, 0x0a, 0xeb, 0x4c, 0xae, 0x31, 0x66, 0x35, 0x61, 0x8c, - 0x79, 0xb6, 0x88, 0x48, 0xb1, 0x19, 0xe6, 0x3f, 0x2b, 0xd3, 0x1b, 0x82, 0x11, 0x8e, 0xe1, 0xe9, - 0x0f, 0xc1, 0x3a, 0x0c, 0x87, 0x22, 0x1c, 0x40, 0x29, 0xff, 0x8d, 0x51, 0x72, 0x12, 0x63, 0x1f, - 0x48, 0x11, 0x00, 0x40, 0x12, 0xc9, 0x8c, 0x33, 0x50, 0x7e, 0x8a, 0x71, 0x06, 0x7a, 0x05, 0xac, - 0x18, 0x78, 0x12, 0x01, 0x2b, 0xec, 0xdf, 0x60, 0xa7, 0xb3, 0x5e, 0x7e, 0x0c, 0x82, 0xdb, 0x75, - 0xf3, 0x1c, 0xb7, 0x0b, 0x56, 0x96, 0xe8, 0x54, 0x8e, 0x00, 0xf7, 0x6b, 0x16, 0x9c, 0xcf, 0xf8, - 0x2a, 0x4d, 0x9a, 0x7b, 0x05, 0x46, 0x9c, 0x6e, 0xd3, 0x55, 0x7b, 0x59, 0xb3, 0x16, 0xcf, 0x8b, - 0x72, 0xac, 0x30, 0xd0, 0x22, 0xcc, 0x90, 0x54, 0x7c, 0x61, 0x1e, 0xb9, 0x8b, 0xbd, 0x9c, 0x4e, - 0x07, 0x17, 0x4e, 0xe3, 0xab, 0xa0, 0x77, 0xe5, 0xdc, 0xa0, 0x77, 0x7f, 0xcf, 0x82, 0x31, 0xf5, - 0x20, 0xfe, 0xa9, 0x8f, 0xf6, 0x7b, 0xe6, 0x68, 0x3f, 0x53, 0x30, 0xda, 0x39, 0xc3, 0xfc, 0x7b, - 0x25, 0xd5, 0xdf, 0x9a, 0x1f, 0x44, 0x7d, 0x48, 0x89, 0x8f, 0xff, 0xec, 0xe5, 0x2a, 0x8c, 0x39, - 0x9d, 0x8e, 0x04, 0x48, 0xff, 0x45, 0x96, 0x1a, 0x26, 0x2e, 0xc6, 0x3a, 0x8e, 0x7a, 0x85, 0x53, - 0xce, 0x7d, 0x85, 0xd3, 0x04, 0x88, 0x9c, 0x60, 0x8b, 0x44, 0xb4, 0x4c, 0xb8, 0x5b, 0xe7, 0xf3, - 0x9b, 0x6e, 0xe4, 0xb6, 0xe6, 0x5c, 0x2f, 0x0a, 0xa3, 0x60, 0x6e, 0xd5, 0x8b, 0x6e, 0x07, 0xfc, - 0x9a, 0xaa, 0x85, 0x96, 0x54, 0xb4, 0xb0, 0x46, 0x57, 0x06, 0x7f, 0x61, 0x6d, 0x0c, 0x9a, 0x8e, - 0x30, 0xeb, 0xa2, 0x1c, 0x2b, 0x0c, 0xfb, 0x0b, 0xec, 0xf4, 0x61, 0x63, 0x7a, 0xb4, 0x90, 0x89, - 0x7f, 0x3c, 0xae, 0x66, 0x83, 0x99, 0x84, 0x97, 0xf4, 0xc0, 0x8c, 0xc5, 0xcc, 0x9e, 0x36, 0xac, - 0xbf, 0xb3, 0x8d, 0xa3, 0x37, 0xa2, 0xaf, 0xa5, 0x9c, 0x9b, 0x5e, 0xed, 0x71, 0x6a, 0x1c, 0xc1, - 0x9d, 0x89, 0xe5, 0x89, 0x64, 0x59, 0xf4, 0x56, 0x6b, 0x62, 0x5f, 0x68, 0x79, 0x22, 0x05, 0x00, - 0xc7, 0x38, 0x54, 0x60, 0x53, 0x7f, 0xc2, 0x0a, 0x8a, 0xd3, 0x09, 0x28, 0xec, 0x10, 0x6b, 0x18, - 0xe8, 0x8a, 0x50, 0x5a, 0x70, 0xdb, 0xc3, 0x33, 0x09, 0xa5, 0x85, 0x1c, 0x2e, 0x4d, 0xd3, 0x74, - 0x15, 0xc6, 0xc8, 0xc3, 0x88, 0x04, 0x9e, 0xd3, 0xa2, 0x2d, 0x0c, 0xc6, 0xc1, 0x91, 0x97, 0xe3, - 0x62, 0xac, 0xe3, 0xa0, 0x0d, 0x98, 0x0a, 0xb9, 0x2e, 0x4f, 0x25, 0xb1, 0xe1, 0x3a, 0xd1, 0xcf, - 0xaa, 0x50, 0x04, 0x26, 0xf8, 0x90, 0x15, 0x71, 0xee, 0x24, 0x03, 0xb4, 0x24, 0x49, 0xa0, 0x77, - 0x61, 0xb2, 0xe5, 0x3b, 0xcd, 0x05, 0xa7, 0xe5, 0x78, 0x0d, 0x36, 0x3e, 0x23, 0x46, 0x94, 0xce, - 0xc9, 0x5b, 0x06, 0x14, 0x27, 0xb0, 0xa9, 0x80, 0xa8, 0x97, 0x88, 0xc4, 0x4b, 0x8e, 0xb7, 0x45, - 0xc2, 0xca, 0x28, 0xfb, 0x2a, 0x26, 0x20, 0xde, 0xca, 0xc1, 0xc1, 0xb9, 0xb5, 0xd1, 0x35, 0x18, - 0x97, 0x9f, 0xaf, 0xc5, 0x33, 0x8a, 0x1f, 0x34, 0x69, 0x30, 0x6c, 0x60, 0xa2, 0x10, 0x4e, 0xc9, - 0xff, 0x1b, 0x81, 0xb3, 0xb9, 0xe9, 0x36, 0x44, 0x90, 0x0f, 0xfe, 0x28, 0xfd, 0x4b, 0xf2, 0x05, - 0xec, 0x72, 0x16, 0xd2, 0xe1, 0x7e, 0xf5, 0x9c, 0x18, 0xb5, 0x4c, 0x38, 0xce, 0xa6, 0x8d, 0xd6, - 0xe0, 0x04, 0xf7, 0x81, 0x59, 0xdc, 0x26, 0x8d, 0x1d, 0xb9, 0xe1, 0x98, 0xd4, 0xa8, 0x3d, 0xfc, - 0xb9, 0x91, 0x46, 0xc1, 0x59, 0xf5, 0xd0, 0x87, 0x50, 0xe9, 0x74, 0xef, 0xb7, 0xdc, 0x70, 0x7b, - 0xdd, 0x8f, 0x98, 0x0b, 0xd9, 0x7c, 0xb3, 0x19, 0x90, 0x90, 0xbf, 0x59, 0x66, 0x47, 0xaf, 0x8c, - 0x41, 0x55, 0xcb, 0xc1, 0xc3, 0xb9, 0x14, 0xd0, 0x23, 0x38, 0x95, 0x58, 0x08, 0x22, 0x98, 0xcc, - 0x64, 0x7e, 0x0a, 0xbb, 0x7a, 0x56, 0x05, 0x11, 0x97, 0x29, 0x0b, 0x84, 0xb3, 0x9b, 0x40, 0x6f, - 0x01, 0xb8, 0x9d, 0x15, 0xa7, 0xed, 0xb6, 0xe8, 0x75, 0xf4, 0x04, 0x5b, 0x23, 0xf4, 0x6a, 0x02, - 0xab, 0x35, 0x59, 0x4a, 0x79, 0xb3, 0xf8, 0xb7, 0x87, 0x35, 0x6c, 0x74, 0x0b, 0x26, 0xc5, 0xbf, - 0x3d, 0x31, 0xa5, 0x33, 0x2a, 0xdb, 0xf1, 0xa4, 0xac, 0xa1, 0xe6, 0x31, 0x51, 0x82, 0x13, 0x75, - 0xd1, 0x16, 0x9c, 0x97, 0xa9, 0x96, 0xf5, 0xf5, 0x29, 0xe7, 0x20, 0x64, 0x79, 0xe3, 0x46, 0xf8, - 0x9b, 0xa2, 0xf9, 0x22, 0x44, 0x5c, 0x4c, 0x87, 0x9e, 0xeb, 0xfa, 0x32, 0xe7, 0x2f, 0xd9, 0x4f, - 0xc5, 0xb1, 0x4e, 0x6f, 0x25, 0x81, 0x38, 0x8d, 0x8f, 0x7c, 0x38, 0xe5, 0x7a, 0x59, 0xab, 0xfa, - 0x34, 0x23, 0xf4, 0x45, 0xfe, 0x88, 0xbf, 0x78, 0x45, 0x67, 0xc2, 0x71, 0x36, 0x5d, 0xb4, 0x0a, - 0x27, 0x22, 0x5e, 0xb0, 0xe4, 0x86, 0x3c, 0x2d, 0x15, 0xbd, 0xf6, 0x9d, 0x61, 0xcd, 0x9d, 0xa1, - 0xab, 0x79, 0x23, 0x0d, 0xc6, 0x59, 0x75, 0x3e, 0x9e, 0x03, 0xe8, 0xef, 0x5b, 0xb4, 0xb6, 0x26, - 0xe8, 0xa3, 0x6f, 0xc2, 0xb8, 0x3e, 0x3e, 0x42, 0x68, 0xb9, 0x94, 0x2d, 0x07, 0x6b, 0xec, 0x85, - 0x5f, 0x13, 0x14, 0x0b, 0xd1, 0x61, 0xd8, 0xa0, 0x88, 0x1a, 0x19, 0xc1, 0x37, 0xae, 0xf4, 0x27, - 0x14, 0xf5, 0xef, 0xff, 0x48, 0x20, 0x7b, 0xe7, 0xa0, 0x5b, 0x30, 0xd2, 0x68, 0xb9, 0xc4, 0x8b, - 0x56, 0x6b, 0x45, 0x21, 0x68, 0x17, 0x05, 0x8e, 0xd8, 0x8a, 0x22, 0x9b, 0x1c, 0x2f, 0xc3, 0x8a, - 0x82, 0x7d, 0x0d, 0xc6, 0xea, 0x2d, 0x42, 0x3a, 0xfc, 0x1d, 0x17, 0x7a, 0x89, 0x5d, 0x4c, 0x98, - 0x68, 0x69, 0x31, 0xd1, 0x52, 0xbf, 0x73, 0x30, 0xa1, 0x52, 0xc2, 0xed, 0xdf, 0x2e, 0x41, 0xb5, - 0x47, 0x52, 0xc3, 0x84, 0xbd, 0xcd, 0xea, 0xcb, 0xde, 0x36, 0x0f, 0x53, 0xf1, 0x3f, 0x5d, 0x95, - 0xa7, 0x9c, 0xa1, 0xef, 0x9a, 0x60, 0x9c, 0xc4, 0xef, 0xfb, 0x5d, 0x8b, 0x6e, 0xb2, 0x1b, 0xe8, - 0xf9, 0x32, 0xcb, 0x30, 0xd5, 0x0f, 0xf6, 0x7f, 0xf7, 0xce, 0x35, 0xbb, 0xda, 0xbf, 0x51, 0x82, - 0x53, 0x6a, 0x08, 0x7f, 0x78, 0x07, 0xee, 0x4e, 0x7a, 0xe0, 0x9e, 0x80, 0xd1, 0xda, 0xbe, 0x0d, - 0x43, 0x3c, 0x2e, 0x6e, 0x1f, 0x32, 0xff, 0x73, 0x66, 0x1e, 0x06, 0x25, 0x66, 0x1a, 0xb9, 0x18, - 0xfe, 0x92, 0x05, 0x53, 0x89, 0x07, 0x92, 0x08, 0x6b, 0xaf, 0xe8, 0x1f, 0x47, 0x2e, 0xcf, 0x92, - 0xf8, 0x2f, 0xc2, 0xc0, 0xb6, 0xaf, 0x9c, 0x94, 0x15, 0xc6, 0x0d, 0x3f, 0x8c, 0x30, 0x83, 0xd8, - 0xff, 0xd2, 0x82, 0xc1, 0x0d, 0xc7, 0xf5, 0x22, 0x69, 0xfd, 0xb0, 0x72, 0xac, 0x1f, 0xfd, 0x7c, - 0x17, 0x7a, 0x13, 0x86, 0xc8, 0xe6, 0x26, 0x69, 0x44, 0x62, 0x56, 0x65, 0x94, 0x8f, 0xa1, 0x65, - 0x56, 0x4a, 0x85, 0x50, 0xd6, 0x18, 0xff, 0x8b, 0x05, 0x32, 0xba, 0x07, 0xa3, 0x91, 0xdb, 0x26, - 0xf3, 0xcd, 0xa6, 0xf0, 0x09, 0x78, 0x8c, 0xd0, 0x34, 0x1b, 0x92, 0x00, 0x8e, 0x69, 0xd9, 0xdf, - 0x2b, 0x01, 0xc4, 0x71, 0xf8, 0x7a, 0x7d, 0xe2, 0x42, 0xca, 0x5a, 0x7c, 0x29, 0xc3, 0x5a, 0x8c, - 0x62, 0x82, 0x19, 0xa6, 0x62, 0x35, 0x4c, 0xe5, 0xbe, 0x86, 0x69, 0xe0, 0x28, 0xc3, 0xb4, 0x08, - 0x33, 0x71, 0x1c, 0x41, 0x33, 0x8c, 0x2a, 0x3b, 0xbf, 0x37, 0x92, 0x40, 0x9c, 0xc6, 0xb7, 0x09, - 0x5c, 0x54, 0xe1, 0xd4, 0xc4, 0x59, 0xc8, 0x9e, 0x12, 0xe8, 0xd6, 0xf7, 0x1e, 0xe3, 0x14, 0x9b, - 0xc3, 0x4b, 0xb9, 0xe6, 0xf0, 0xbf, 0x69, 0xc1, 0xc9, 0x64, 0x3b, 0xec, 0xdd, 0xfd, 0x77, 0x2d, - 0x38, 0x15, 0xe7, 0xf4, 0x4a, 0xbb, 0x20, 0xbc, 0x51, 0x18, 0x22, 0x2e, 0xa7, 0xc7, 0x71, 0x38, - 0x99, 0xb5, 0x2c, 0xd2, 0x38, 0xbb, 0x45, 0xfb, 0xff, 0x19, 0x80, 0x4a, 0x5e, 0x6c, 0x39, 0xf6, - 0xd2, 0xc8, 0x79, 0x58, 0xdf, 0x21, 0x0f, 0xc4, 0x7b, 0x8e, 0xf8, 0xa5, 0x11, 0x2f, 0xc6, 0x12, - 0x9e, 0x4c, 0xe3, 0x56, 0xea, 0x33, 0x8d, 0xdb, 0x36, 0xcc, 0x3c, 0xd8, 0x26, 0xde, 0x1d, 0x2f, - 0x74, 0x22, 0x37, 0xdc, 0x74, 0x99, 0x01, 0x9d, 0xaf, 0x9b, 0xb7, 0xe4, 0xab, 0x8b, 0x7b, 0x49, - 0x84, 0xc3, 0xfd, 0xea, 0x79, 0xa3, 0x20, 0xee, 0x32, 0x67, 0x24, 0x38, 0x4d, 0x34, 0x9d, 0x05, - 0x6f, 0xe0, 0x29, 0x67, 0xc1, 0x6b, 0xbb, 0xc2, 0xed, 0x46, 0x3e, 0x23, 0x61, 0xd7, 0xd6, 0x35, - 0x55, 0x8a, 0x35, 0x0c, 0xf4, 0x75, 0x40, 0x7a, 0x1a, 0x53, 0x23, 0xb4, 0xef, 0xab, 0x07, 0xfb, - 0x55, 0xb4, 0x9e, 0x82, 0x1e, 0xee, 0x57, 0x4f, 0xd0, 0xd2, 0x55, 0x8f, 0x5e, 0x7f, 0xe3, 0x78, - 0x88, 0x19, 0x84, 0xd0, 0x3d, 0x98, 0xa6, 0xa5, 0x6c, 0x47, 0xc9, 0xb8, 0xc1, 0xfc, 0xca, 0xfa, - 0xf2, 0xc1, 0x7e, 0x75, 0x7a, 0x3d, 0x01, 0xcb, 0x23, 0x9d, 0x22, 0x92, 0x91, 0x0c, 0x6f, 0xa4, - 0xdf, 0x64, 0x78, 0xf6, 0x77, 0x2d, 0x38, 0x4b, 0x0f, 0xb8, 0xe6, 0xad, 0x1c, 0x2b, 0xba, 0xd3, - 0x71, 0xb9, 0x9d, 0x46, 0x1c, 0x35, 0x4c, 0x57, 0x57, 0x5b, 0xe5, 0x56, 0x1a, 0x05, 0xa5, 0x1c, - 0x7e, 0xc7, 0xf5, 0x9a, 0x49, 0x0e, 0x7f, 0xd3, 0xf5, 0x9a, 0x98, 0x41, 0xd4, 0x91, 0x55, 0xce, - 0xcd, 0x43, 0xf0, 0x2b, 0x74, 0xaf, 0xd2, 0xbe, 0xfc, 0x40, 0xbb, 0x81, 0x5e, 0xd6, 0x6d, 0xaa, - 0xc2, 0x7d, 0x32, 0xd7, 0x9e, 0xfa, 0x1d, 0x0b, 0xc4, 0xeb, 0xf7, 0x3e, 0xce, 0xe4, 0xaf, 0xc2, - 0xf8, 0x6e, 0x3a, 0xc5, 0xf3, 0xc5, 0xfc, 0x70, 0x00, 0x22, 0xb1, 0xb3, 0x12, 0xd1, 0x8d, 0x74, - 0xce, 0x06, 0x2d, 0xbb, 0x09, 0x02, 0xba, 0x44, 0x98, 0x55, 0xa3, 0x77, 0x6f, 0x5e, 0x03, 0x68, - 0x32, 0x5c, 0x96, 0xec, 0xac, 0x64, 0x4a, 0x5c, 0x4b, 0x0a, 0x82, 0x35, 0x2c, 0xfb, 0x17, 0xca, - 0x30, 0x26, 0x53, 0x0a, 0x77, 0xbd, 0x7e, 0x74, 0x8f, 0xba, 0xe0, 0x54, 0xea, 0x29, 0x38, 0x7d, - 0x08, 0x33, 0x01, 0x69, 0x74, 0x83, 0xd0, 0xdd, 0x25, 0x12, 0x2c, 0x36, 0xc9, 0x1c, 0x4f, 0x83, - 0x91, 0x00, 0x1e, 0xb2, 0xd0, 0x5d, 0x89, 0x42, 0x66, 0x34, 0x4e, 0x13, 0x42, 0x57, 0x60, 0x94, - 0xa9, 0xde, 0x6b, 0xb1, 0x42, 0x58, 0x29, 0xbe, 0xd6, 0x24, 0x00, 0xc7, 0x38, 0xec, 0x72, 0xd0, - 0xbd, 0xaf, 0x65, 0xa2, 0x8b, 0x2f, 0x07, 0xbc, 0x18, 0x4b, 0x38, 0xfa, 0x32, 0x4c, 0xf3, 0x7a, - 0x81, 0xdf, 0x71, 0xb6, 0xb8, 0x49, 0x70, 0x50, 0x85, 0xd7, 0x99, 0x5e, 0x4b, 0xc0, 0x0e, 0xf7, - 0xab, 0x27, 0x93, 0x65, 0xac, 0xdb, 0x29, 0x2a, 0xcc, 0xf3, 0x8f, 0x37, 0x42, 0xcf, 0x8c, 0x94, - 0xc3, 0x60, 0x0c, 0xc2, 0x3a, 0x9e, 0xfd, 0x27, 0x16, 0xcc, 0x68, 0x53, 0xd5, 0x77, 0x26, 0x12, - 0x63, 0x90, 0x4a, 0x7d, 0x0c, 0xd2, 0xd1, 0xa2, 0x3d, 0x64, 0xce, 0xf0, 0xc0, 0x13, 0x9a, 0x61, - 0xfb, 0x9b, 0x80, 0xd2, 0xf9, 0xaa, 0xd1, 0xfb, 0xdc, 0x91, 0xdf, 0x0d, 0x48, 0xb3, 0xc8, 0xe0, - 0xaf, 0x47, 0xce, 0x91, 0x2f, 0x57, 0x79, 0x2d, 0xac, 0xea, 0xdb, 0x7f, 0x32, 0x00, 0xd3, 0xc9, - 0x58, 0x1d, 0xe8, 0x06, 0x0c, 0x71, 0x29, 0x5d, 0x90, 0x2f, 0xf0, 0x27, 0xd3, 0x22, 0x7c, 0xf0, - 0x2c, 0x41, 0x5c, 0xba, 0x17, 0xf5, 0xd1, 0x87, 0x30, 0xd6, 0xf4, 0x1f, 0x78, 0x0f, 0x9c, 0xa0, - 0x39, 0x5f, 0x5b, 0x15, 0x1c, 0x22, 0x53, 0x01, 0xb5, 0x14, 0xa3, 0xe9, 0x51, 0x43, 0x98, 0xef, - 0x44, 0x0c, 0xc2, 0x3a, 0x39, 0xb4, 0xc1, 0x12, 0x57, 0x6d, 0xba, 0x5b, 0x6b, 0x4e, 0xa7, 0xe8, - 0x55, 0xd7, 0xa2, 0x44, 0xd2, 0x28, 0x4f, 0x88, 0xec, 0x56, 0x1c, 0x80, 0x63, 0x42, 0xe8, 0x47, - 0xe1, 0x44, 0x98, 0x63, 0x12, 0xcb, 0x71, 0x38, 0x28, 0xb4, 0x12, 0x71, 0x65, 0x4a, 0x96, 0xf1, - 0x2c, 0xab, 0x19, 0xf4, 0x10, 0x90, 0x50, 0x3d, 0x6f, 0x04, 0xdd, 0x30, 0xe2, 0x29, 0x20, 0xc5, - 0xa5, 0xeb, 0x73, 0xd9, 0x7a, 0x82, 0x24, 0xb6, 0xd6, 0x36, 0x0b, 0x9c, 0x9c, 0xc6, 0xc0, 0x19, - 0x6d, 0xa0, 0x6d, 0x98, 0xec, 0x18, 0xd9, 0x37, 0xd9, 0xde, 0xcc, 0x89, 0x2e, 0x9c, 0x97, 0xa7, - 0x93, 0x9f, 0xd2, 0x26, 0x14, 0x27, 0xe8, 0xda, 0xdf, 0x19, 0x80, 0x59, 0x99, 0x8a, 0x3e, 0xe3, - 0x9d, 0xcc, 0xb7, 0xad, 0xc4, 0x43, 0x99, 0xb7, 0xf2, 0x8f, 0x94, 0xa7, 0xf6, 0x5c, 0xe6, 0x27, - 0xd3, 0xcf, 0x65, 0xde, 0x39, 0x62, 0x37, 0x9e, 0xd8, 0xa3, 0x99, 0x1f, 0xda, 0x97, 0x2e, 0x07, - 0x27, 0xc1, 0x10, 0x02, 0x10, 0xe6, 0xf1, 0xef, 0x6b, 0xd2, 0x48, 0x95, 0xa3, 0x68, 0xb8, 0x21, - 0x70, 0x0c, 0xb1, 0x62, 0x5c, 0x46, 0xc9, 0x67, 0x1c, 0x5d, 0xd1, 0xa1, 0x34, 0x49, 0xbb, 0x13, - 0xed, 0x2d, 0xb9, 0x81, 0xe8, 0x71, 0x26, 0xcd, 0x65, 0x81, 0x93, 0xa6, 0x29, 0x21, 0x58, 0xd1, - 0x41, 0xbb, 0x30, 0xb3, 0xc5, 0x62, 0x4b, 0x69, 0x59, 0xe1, 0x05, 0x07, 0xca, 0xe4, 0x10, 0xd7, - 0x17, 0x97, 0xf3, 0x53, 0xc8, 0xf3, 0x6b, 0x66, 0x0a, 0x05, 0xa7, 0x9b, 0xa0, 0x5b, 0xe3, 0xa4, - 0xf3, 0x20, 0x5c, 0x6e, 0x39, 0x61, 0xe4, 0x36, 0x16, 0x5a, 0x7e, 0x63, 0xa7, 0x1e, 0xf9, 0x81, - 0xcc, 0x2a, 0x9a, 0x79, 0xcb, 0x9b, 0xbf, 0x57, 0x4f, 0xe1, 0x1b, 0xcd, 0xb3, 0xec, 0xb6, 0x59, - 0x58, 0x38, 0xb3, 0x2d, 0xb4, 0x0e, 0xc3, 0x5b, 0x6e, 0x84, 0x49, 0xc7, 0x17, 0x7c, 0x29, 0x93, - 0xe9, 0x5e, 0xe7, 0x28, 0x46, 0x4b, 0x2c, 0xf6, 0x95, 0x00, 0x60, 0x49, 0x04, 0xbd, 0xaf, 0x8e, - 0x9b, 0xa1, 0x7c, 0x55, 0x6f, 0xda, 0xcb, 0x2f, 0xf3, 0xc0, 0x79, 0x17, 0xca, 0xde, 0x66, 0x58, - 0x14, 0xf5, 0x67, 0x7d, 0xc5, 0xd0, 0xd4, 0x2d, 0x0c, 0xd3, 0x4b, 0xf8, 0xfa, 0x4a, 0x1d, 0xd3, - 0x8a, 0xec, 0x81, 0x6d, 0xd8, 0x08, 0x5d, 0x91, 0xbc, 0x2b, 0xf3, 0xbd, 0xf1, 0x6a, 0x7d, 0xb1, - 0xbe, 0x6a, 0xd0, 0x60, 0xf1, 0x13, 0x59, 0x31, 0xe6, 0xd5, 0xd1, 0x5d, 0x18, 0xdd, 0xe2, 0x2c, - 0x76, 0x93, 0x87, 0xb5, 0xcd, 0x39, 0xf6, 0xae, 0x4b, 0x24, 0x83, 0x1e, 0x3b, 0x9c, 0x14, 0x08, - 0xc7, 0xa4, 0xd0, 0x77, 0x2c, 0x38, 0xd5, 0x49, 0xe8, 0x6a, 0xd9, 0xb3, 0x38, 0xe1, 0x10, 0x97, - 0xf9, 0xd4, 0xa0, 0x96, 0x55, 0xc1, 0x68, 0x90, 0x19, 0x7a, 0x32, 0xd1, 0x70, 0x76, 0x73, 0x74, - 0xa0, 0x83, 0xfb, 0xcd, 0xa2, 0x7c, 0x4f, 0x89, 0x10, 0x48, 0x7c, 0xa0, 0xf1, 0xc2, 0x12, 0xa6, - 0x15, 0xd1, 0x06, 0xc0, 0x66, 0x8b, 0x88, 0xd8, 0x92, 0xc2, 0xfd, 0x2a, 0x53, 0xce, 0x58, 0x51, - 0x58, 0x82, 0x0e, 0xbb, 0xf3, 0xc6, 0xa5, 0x58, 0xa3, 0x43, 0x97, 0x52, 0xc3, 0xf5, 0x9a, 0x24, - 0x60, 0x66, 0xb4, 0x9c, 0xa5, 0xb4, 0xc8, 0x30, 0xd2, 0x4b, 0x89, 0x97, 0x63, 0x41, 0x81, 0xd1, - 0x22, 0x9d, 0xed, 0xcd, 0xb0, 0x28, 0xb3, 0xc8, 0x22, 0xe9, 0x6c, 0x27, 0x16, 0x14, 0xa7, 0xc5, - 0xca, 0xb1, 0xa0, 0x40, 0xb7, 0xcc, 0x26, 0xdd, 0x40, 0x24, 0xa8, 0x4c, 0xe5, 0x6f, 0x99, 0x15, - 0x8e, 0x92, 0xde, 0x32, 0x02, 0x80, 0x25, 0x11, 0xf4, 0x0d, 0x53, 0xae, 0x9a, 0x66, 0x34, 0x5f, - 0xee, 0x21, 0x57, 0x19, 0x74, 0x8b, 0x25, 0xab, 0xb7, 0xa0, 0xb4, 0xd9, 0x60, 0xe6, 0xb7, 0x1c, - 0xeb, 0xc4, 0xca, 0xa2, 0x41, 0x8d, 0x45, 0xea, 0x5f, 0x59, 0xc4, 0xa5, 0xcd, 0x06, 0x5d, 0xfa, - 0xce, 0xa3, 0x6e, 0x40, 0x56, 0xdc, 0x16, 0x11, 0xa1, 0x83, 0x33, 0x97, 0xfe, 0xbc, 0x44, 0x4a, - 0x2f, 0x7d, 0x05, 0xc2, 0x31, 0x29, 0x4a, 0x37, 0x96, 0xf6, 0x4e, 0xe4, 0xd3, 0x55, 0x42, 0x5d, - 0x9a, 0x6e, 0xa6, 0xbc, 0xb7, 0x03, 0x13, 0xbb, 0x61, 0x67, 0x9b, 0x48, 0xae, 0xc8, 0x0c, 0x83, - 0x39, 0x31, 0x31, 0xee, 0x0a, 0x44, 0x37, 0x88, 0xba, 0x4e, 0x2b, 0xc5, 0xc8, 0x99, 0x12, 0xe7, - 0xae, 0x4e, 0x0c, 0x9b, 0xb4, 0xe9, 0x42, 0xf8, 0x88, 0x07, 0xae, 0x63, 0x26, 0xc2, 0x9c, 0x85, - 0x90, 0x11, 0xdb, 0x8e, 0x2f, 0x04, 0x01, 0xc0, 0x92, 0x88, 0x1a, 0x6c, 0x76, 0x00, 0x9d, 0xee, - 0x31, 0xd8, 0xa9, 0xfe, 0xc6, 0x83, 0xcd, 0x0e, 0x9c, 0x98, 0x14, 0x3b, 0x68, 0x3a, 0xdb, 0x7e, - 0xe4, 0x7b, 0x89, 0x43, 0xee, 0x4c, 0xfe, 0x41, 0x53, 0xcb, 0xc0, 0x4f, 0x1f, 0x34, 0x59, 0x58, - 0x38, 0xb3, 0x2d, 0xfa, 0x71, 0x1d, 0x19, 0x83, 0x50, 0x64, 0x42, 0x79, 0x29, 0x27, 0x84, 0x67, - 0x3a, 0x50, 0x21, 0xff, 0x38, 0x05, 0xc2, 0x31, 0x29, 0xd4, 0xa4, 0x92, 0xae, 0x1e, 0xdb, 0x96, - 0x65, 0x74, 0xc9, 0x91, 0x0b, 0xb2, 0xa2, 0xe0, 0x4a, 0x29, 0x57, 0x87, 0xe0, 0x04, 0x4d, 0xe6, - 0x23, 0xc8, 0x1f, 0x15, 0xb2, 0x84, 0x2f, 0x39, 0x53, 0x9d, 0xf1, 0xee, 0x90, 0x4f, 0xb5, 0x00, - 0x60, 0x49, 0x84, 0x8e, 0x86, 0x78, 0x0a, 0xe7, 0x87, 0x2c, 0x6f, 0x52, 0x9e, 0x29, 0x3f, 0xcb, - 0x20, 0x25, 0x03, 0xcd, 0x0b, 0x10, 0x8e, 0x49, 0x51, 0x4e, 0x4e, 0x0f, 0xbc, 0x73, 0xf9, 0x9c, - 0x3c, 0x79, 0xdc, 0x31, 0x4e, 0x4e, 0x0f, 0xbb, 0xb2, 0x38, 0xea, 0x54, 0x5c, 0x74, 0x96, 0xf3, - 0x25, 0xa7, 0x5f, 0x2a, 0xb0, 0x7a, 0xba, 0x5f, 0x0a, 0x84, 0x63, 0x52, 0xec, 0x28, 0x66, 0x41, - 0xf0, 0x2e, 0x14, 0x1c, 0xc5, 0x14, 0x21, 0xe3, 0x28, 0xd6, 0x82, 0xe4, 0xd9, 0x7f, 0xb9, 0x04, - 0x17, 0x8a, 0xf7, 0x6d, 0x6c, 0xad, 0xab, 0xc5, 0xde, 0x51, 0x09, 0x6b, 0x1d, 0xd7, 0x1d, 0xc5, - 0x58, 0x7d, 0x87, 0x36, 0xbe, 0x0e, 0x33, 0xea, 0xe1, 0x63, 0xcb, 0x6d, 0xec, 0x69, 0x89, 0x5e, - 0x55, 0x10, 0xa0, 0x7a, 0x12, 0x01, 0xa7, 0xeb, 0xa0, 0x79, 0x98, 0x32, 0x0a, 0x57, 0x97, 0x84, - 0xa2, 0x21, 0xce, 0x56, 0x62, 0x82, 0x71, 0x12, 0xdf, 0xfe, 0x45, 0x0b, 0xce, 0xf0, 0x40, 0xbc, - 0xa4, 0x59, 0xf3, 0x9b, 0x52, 0xa3, 0x70, 0xa4, 0xc8, 0xbd, 0x9b, 0x30, 0xd5, 0x31, 0xab, 0xf6, - 0x08, 0x36, 0xae, 0xa3, 0xc6, 0x7d, 0x4d, 0x00, 0x70, 0x92, 0xa8, 0xfd, 0xf3, 0x25, 0x38, 0x5f, - 0xe8, 0xc9, 0x8f, 0x30, 0x9c, 0xde, 0x6a, 0x87, 0xce, 0x62, 0x40, 0x9a, 0xc4, 0x8b, 0x5c, 0xa7, - 0x55, 0xef, 0x90, 0x86, 0x66, 0x6f, 0x65, 0x2e, 0xf1, 0xd7, 0xd7, 0xea, 0xf3, 0x69, 0x0c, 0x9c, - 0x53, 0x13, 0xad, 0x00, 0x4a, 0x43, 0xc4, 0x0c, 0xb3, 0xcb, 0x74, 0x9a, 0x1e, 0xce, 0xa8, 0x81, - 0xbe, 0x00, 0x13, 0xea, 0x85, 0x80, 0x36, 0xe3, 0xec, 0x80, 0xc0, 0x3a, 0x00, 0x9b, 0x78, 0xe8, - 0x2a, 0x4f, 0x63, 0x25, 0x12, 0x9e, 0x09, 0xe3, 0xec, 0x94, 0xcc, 0x51, 0x25, 0x8a, 0xb1, 0x8e, - 0xb3, 0x70, 0xed, 0x77, 0xfe, 0xf0, 0xc2, 0x67, 0x7e, 0xf7, 0x0f, 0x2f, 0x7c, 0xe6, 0x0f, 0xfe, - 0xf0, 0xc2, 0x67, 0x7e, 0xfc, 0xe0, 0x82, 0xf5, 0x3b, 0x07, 0x17, 0xac, 0xdf, 0x3d, 0xb8, 0x60, - 0xfd, 0xc1, 0xc1, 0x05, 0xeb, 0x7f, 0x3b, 0xb8, 0x60, 0x7d, 0xef, 0x7f, 0xbf, 0xf0, 0x99, 0xaf, - 0xa2, 0x38, 0x16, 0xf6, 0x15, 0x3a, 0x3b, 0x57, 0x76, 0xaf, 0xfe, 0x87, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xba, 0xfb, 0xfc, 0xdd, 0x18, 0x2e, 0x01, 0x00, -} +func (m *VolumeMountStatus) Reset() { *m = VolumeMountStatus{} } + +func (m *VolumeNodeAffinity) Reset() { *m = VolumeNodeAffinity{} } + +func (m *VolumeProjection) Reset() { *m = VolumeProjection{} } + +func (m *VolumeResourceRequirements) Reset() { *m = VolumeResourceRequirements{} } + +func (m *VolumeSource) Reset() { *m = VolumeSource{} } + +func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} } + +func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} } + +func (m *WindowsSecurityContextOptions) Reset() { *m = WindowsSecurityContextOptions{} } func (m *AWSElasticBlockStoreVolumeSource) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -8495,7 +999,7 @@ func (m *CSIPersistentVolumeSource) MarshalToSizedBuffer(dAtA []byte) (int, erro for k := range m.VolumeAttributes { keysForVolumeAttributes = append(keysForVolumeAttributes, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForVolumeAttributes) + sort.Strings(keysForVolumeAttributes) for iNdEx := len(keysForVolumeAttributes) - 1; iNdEx >= 0; iNdEx-- { v := m.VolumeAttributes[string(keysForVolumeAttributes[iNdEx])] baseI := i @@ -8577,7 +1081,7 @@ func (m *CSIVolumeSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.VolumeAttributes { keysForVolumeAttributes = append(keysForVolumeAttributes, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForVolumeAttributes) + sort.Strings(keysForVolumeAttributes) for iNdEx := len(keysForVolumeAttributes) - 1; iNdEx >= 0; iNdEx-- { v := m.VolumeAttributes[string(keysForVolumeAttributes[iNdEx])] baseI := i @@ -9166,7 +1670,7 @@ func (m *ConfigMap) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.BinaryData { keysForBinaryData = append(keysForBinaryData, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForBinaryData) + sort.Strings(keysForBinaryData) for iNdEx := len(keysForBinaryData) - 1; iNdEx >= 0; iNdEx-- { v := m.BinaryData[string(keysForBinaryData[iNdEx])] baseI := i @@ -9192,7 +1696,7 @@ func (m *ConfigMap) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Data { keysForData = append(keysForData, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForData) + sort.Strings(keysForData) for iNdEx := len(keysForData) - 1; iNdEx >= 0; iNdEx-- { v := m.Data[string(keysForData[iNdEx])] baseI := i @@ -10317,7 +2821,7 @@ func (m *ContainerStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.AllocatedResources { keysForAllocatedResources = append(keysForAllocatedResources, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatedResources) + sort.Strings(keysForAllocatedResources) for iNdEx := len(keysForAllocatedResources) - 1; iNdEx >= 0; iNdEx-- { v := m.AllocatedResources[ResourceName(keysForAllocatedResources[iNdEx])] baseI := i @@ -11859,7 +4363,7 @@ func (m *FlexPersistentVolumeSource) MarshalToSizedBuffer(dAtA []byte) (int, err for k := range m.Options { keysForOptions = append(keysForOptions, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForOptions) + sort.Strings(keysForOptions) for iNdEx := len(keysForOptions) - 1; iNdEx >= 0; iNdEx-- { v := m.Options[string(keysForOptions[iNdEx])] baseI := i @@ -11936,7 +4440,7 @@ func (m *FlexVolumeSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Options { keysForOptions = append(keysForOptions, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForOptions) + sort.Strings(keysForOptions) for iNdEx := len(keysForOptions) - 1; iNdEx >= 0; iNdEx-- { v := m.Options[string(keysForOptions[iNdEx])] baseI := i @@ -12880,7 +5384,7 @@ func (m *LimitRangeItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.MaxLimitRequestRatio { keysForMaxLimitRequestRatio = append(keysForMaxLimitRequestRatio, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForMaxLimitRequestRatio) + sort.Strings(keysForMaxLimitRequestRatio) for iNdEx := len(keysForMaxLimitRequestRatio) - 1; iNdEx >= 0; iNdEx-- { v := m.MaxLimitRequestRatio[ResourceName(keysForMaxLimitRequestRatio[iNdEx])] baseI := i @@ -12909,7 +5413,7 @@ func (m *LimitRangeItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.DefaultRequest { keysForDefaultRequest = append(keysForDefaultRequest, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDefaultRequest) + sort.Strings(keysForDefaultRequest) for iNdEx := len(keysForDefaultRequest) - 1; iNdEx >= 0; iNdEx-- { v := m.DefaultRequest[ResourceName(keysForDefaultRequest[iNdEx])] baseI := i @@ -12938,7 +5442,7 @@ func (m *LimitRangeItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Default { keysForDefault = append(keysForDefault, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDefault) + sort.Strings(keysForDefault) for iNdEx := len(keysForDefault) - 1; iNdEx >= 0; iNdEx-- { v := m.Default[ResourceName(keysForDefault[iNdEx])] baseI := i @@ -12967,7 +5471,7 @@ func (m *LimitRangeItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Min { keysForMin = append(keysForMin, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForMin) + sort.Strings(keysForMin) for iNdEx := len(keysForMin) - 1; iNdEx >= 0; iNdEx-- { v := m.Min[ResourceName(keysForMin[iNdEx])] baseI := i @@ -12996,7 +5500,7 @@ func (m *LimitRangeItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Max { keysForMax = append(keysForMax, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForMax) + sort.Strings(keysForMax) for iNdEx := len(keysForMax) - 1; iNdEx >= 0; iNdEx-- { v := m.Max[ResourceName(keysForMax[iNdEx])] baseI := i @@ -14535,7 +7039,7 @@ func (m *NodeStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Allocatable { keysForAllocatable = append(keysForAllocatable, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatable) + sort.Strings(keysForAllocatable) for iNdEx := len(keysForAllocatable) - 1; iNdEx >= 0; iNdEx-- { v := m.Allocatable[ResourceName(keysForAllocatable[iNdEx])] baseI := i @@ -14564,7 +7068,7 @@ func (m *NodeStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Capacity { keysForCapacity = append(keysForCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + sort.Strings(keysForCapacity) for iNdEx := len(keysForCapacity) - 1; iNdEx >= 0; iNdEx-- { v := m.Capacity[ResourceName(keysForCapacity[iNdEx])] baseI := i @@ -15159,7 +7663,7 @@ func (m *PersistentVolumeClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, er for k := range m.AllocatedResourceStatuses { keysForAllocatedResourceStatuses = append(keysForAllocatedResourceStatuses, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatedResourceStatuses) + sort.Strings(keysForAllocatedResourceStatuses) for iNdEx := len(keysForAllocatedResourceStatuses) - 1; iNdEx >= 0; iNdEx-- { v := m.AllocatedResourceStatuses[ResourceName(keysForAllocatedResourceStatuses[iNdEx])] baseI := i @@ -15183,7 +7687,7 @@ func (m *PersistentVolumeClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, er for k := range m.AllocatedResources { keysForAllocatedResources = append(keysForAllocatedResources, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatedResources) + sort.Strings(keysForAllocatedResources) for iNdEx := len(keysForAllocatedResources) - 1; iNdEx >= 0; iNdEx-- { v := m.AllocatedResources[ResourceName(keysForAllocatedResources[iNdEx])] baseI := i @@ -15226,7 +7730,7 @@ func (m *PersistentVolumeClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, er for k := range m.Capacity { keysForCapacity = append(keysForCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + sort.Strings(keysForCapacity) for iNdEx := len(keysForCapacity) - 1; iNdEx >= 0; iNdEx-- { v := m.Capacity[ResourceName(keysForCapacity[iNdEx])] baseI := i @@ -15795,7 +8299,7 @@ func (m *PersistentVolumeSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Capacity { keysForCapacity = append(keysForCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + sort.Strings(keysForCapacity) for iNdEx := len(keysForCapacity) - 1; iNdEx >= 0; iNdEx-- { v := m.Capacity[ResourceName(keysForCapacity[iNdEx])] baseI := i @@ -17230,7 +9734,7 @@ func (m *PodSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Overhead { keysForOverhead = append(keysForOverhead, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForOverhead) + sort.Strings(keysForOverhead) for iNdEx := len(keysForOverhead) - 1; iNdEx >= 0; iNdEx-- { v := m.Overhead[ResourceName(keysForOverhead[iNdEx])] baseI := i @@ -17507,7 +10011,7 @@ func (m *PodSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.NodeSelector { keysForNodeSelector = append(keysForNodeSelector, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector) + sort.Strings(keysForNodeSelector) for iNdEx := len(keysForNodeSelector) - 1; iNdEx >= 0; iNdEx-- { v := m.NodeSelector[string(keysForNodeSelector[iNdEx])] baseI := i @@ -18759,7 +11263,7 @@ func (m *ReplicationControllerSpec) MarshalToSizedBuffer(dAtA []byte) (int, erro for k := range m.Selector { keysForSelector = append(keysForSelector, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForSelector) + sort.Strings(keysForSelector) for iNdEx := len(keysForSelector) - 1; iNdEx >= 0; iNdEx-- { v := m.Selector[string(keysForSelector[iNdEx])] baseI := i @@ -19093,7 +11597,7 @@ func (m *ResourceQuotaSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Hard { keysForHard = append(keysForHard, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForHard) + sort.Strings(keysForHard) for iNdEx := len(keysForHard) - 1; iNdEx >= 0; iNdEx-- { v := m.Hard[ResourceName(keysForHard[iNdEx])] baseI := i @@ -19145,7 +11649,7 @@ func (m *ResourceQuotaStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Used { keysForUsed = append(keysForUsed, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForUsed) + sort.Strings(keysForUsed) for iNdEx := len(keysForUsed) - 1; iNdEx >= 0; iNdEx-- { v := m.Used[ResourceName(keysForUsed[iNdEx])] baseI := i @@ -19174,7 +11678,7 @@ func (m *ResourceQuotaStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Hard { keysForHard = append(keysForHard, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForHard) + sort.Strings(keysForHard) for iNdEx := len(keysForHard) - 1; iNdEx >= 0; iNdEx-- { v := m.Hard[ResourceName(keysForHard[iNdEx])] baseI := i @@ -19240,7 +11744,7 @@ func (m *ResourceRequirements) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Requests { keysForRequests = append(keysForRequests, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForRequests) + sort.Strings(keysForRequests) for iNdEx := len(keysForRequests) - 1; iNdEx >= 0; iNdEx-- { v := m.Requests[ResourceName(keysForRequests[iNdEx])] baseI := i @@ -19269,7 +11773,7 @@ func (m *ResourceRequirements) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Limits { keysForLimits = append(keysForLimits, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForLimits) + sort.Strings(keysForLimits) for iNdEx := len(keysForLimits) - 1; iNdEx >= 0; iNdEx-- { v := m.Limits[ResourceName(keysForLimits[iNdEx])] baseI := i @@ -19702,7 +12206,7 @@ func (m *Secret) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.StringData { keysForStringData = append(keysForStringData, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringData) + sort.Strings(keysForStringData) for iNdEx := len(keysForStringData) - 1; iNdEx >= 0; iNdEx-- { v := m.StringData[string(keysForStringData[iNdEx])] baseI := i @@ -19731,7 +12235,7 @@ func (m *Secret) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Data { keysForData = append(keysForData, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForData) + sort.Strings(keysForData) for iNdEx := len(keysForData) - 1; iNdEx >= 0; iNdEx-- { v := m.Data[string(keysForData[iNdEx])] baseI := i @@ -20729,7 +13233,7 @@ func (m *ServiceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Selector { keysForSelector = append(keysForSelector, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForSelector) + sort.Strings(keysForSelector) for iNdEx := len(keysForSelector) - 1; iNdEx >= 0; iNdEx-- { v := m.Selector[string(keysForSelector[iNdEx])] baseI := i @@ -21734,7 +14238,7 @@ func (m *VolumeResourceRequirements) MarshalToSizedBuffer(dAtA []byte) (int, err for k := range m.Requests { keysForRequests = append(keysForRequests, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForRequests) + sort.Strings(keysForRequests) for iNdEx := len(keysForRequests) - 1; iNdEx >= 0; iNdEx-- { v := m.Requests[ResourceName(keysForRequests[iNdEx])] baseI := i @@ -21763,7 +14267,7 @@ func (m *VolumeResourceRequirements) MarshalToSizedBuffer(dAtA []byte) (int, err for k := range m.Limits { keysForLimits = append(keysForLimits, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForLimits) + sort.Strings(keysForLimits) for iNdEx := len(keysForLimits) - 1; iNdEx >= 0; iNdEx-- { v := m.Limits[ResourceName(keysForLimits[iNdEx])] baseI := i @@ -27759,7 +20263,7 @@ func (this *CSIPersistentVolumeSource) String() string { for k := range this.VolumeAttributes { keysForVolumeAttributes = append(keysForVolumeAttributes, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForVolumeAttributes) + sort.Strings(keysForVolumeAttributes) mapStringForVolumeAttributes := "map[string]string{" for _, k := range keysForVolumeAttributes { mapStringForVolumeAttributes += fmt.Sprintf("%v: %v,", k, this.VolumeAttributes[k]) @@ -27788,7 +20292,7 @@ func (this *CSIVolumeSource) String() string { for k := range this.VolumeAttributes { keysForVolumeAttributes = append(keysForVolumeAttributes, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForVolumeAttributes) + sort.Strings(keysForVolumeAttributes) mapStringForVolumeAttributes := "map[string]string{" for _, k := range keysForVolumeAttributes { mapStringForVolumeAttributes += fmt.Sprintf("%v: %v,", k, this.VolumeAttributes[k]) @@ -27948,7 +20452,7 @@ func (this *ConfigMap) String() string { for k := range this.Data { keysForData = append(keysForData, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForData) + sort.Strings(keysForData) mapStringForData := "map[string]string{" for _, k := range keysForData { mapStringForData += fmt.Sprintf("%v: %v,", k, this.Data[k]) @@ -27958,7 +20462,7 @@ func (this *ConfigMap) String() string { for k := range this.BinaryData { keysForBinaryData = append(keysForBinaryData, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForBinaryData) + sort.Strings(keysForBinaryData) mapStringForBinaryData := "map[string][]byte{" for _, k := range keysForBinaryData { mapStringForBinaryData += fmt.Sprintf("%v: %v,", k, this.BinaryData[k]) @@ -28267,7 +20771,7 @@ func (this *ContainerStatus) String() string { for k := range this.AllocatedResources { keysForAllocatedResources = append(keysForAllocatedResources, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatedResources) + sort.Strings(keysForAllocatedResources) mapStringForAllocatedResources := "ResourceList{" for _, k := range keysForAllocatedResources { mapStringForAllocatedResources += fmt.Sprintf("%v: %v,", k, this.AllocatedResources[ResourceName(k)]) @@ -28688,7 +21192,7 @@ func (this *FlexPersistentVolumeSource) String() string { for k := range this.Options { keysForOptions = append(keysForOptions, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForOptions) + sort.Strings(keysForOptions) mapStringForOptions := "map[string]string{" for _, k := range keysForOptions { mapStringForOptions += fmt.Sprintf("%v: %v,", k, this.Options[k]) @@ -28712,7 +21216,7 @@ func (this *FlexVolumeSource) String() string { for k := range this.Options { keysForOptions = append(keysForOptions, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForOptions) + sort.Strings(keysForOptions) mapStringForOptions := "map[string]string{" for _, k := range keysForOptions { mapStringForOptions += fmt.Sprintf("%v: %v,", k, this.Options[k]) @@ -28969,7 +21473,7 @@ func (this *LimitRangeItem) String() string { for k := range this.Max { keysForMax = append(keysForMax, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForMax) + sort.Strings(keysForMax) mapStringForMax := "ResourceList{" for _, k := range keysForMax { mapStringForMax += fmt.Sprintf("%v: %v,", k, this.Max[ResourceName(k)]) @@ -28979,7 +21483,7 @@ func (this *LimitRangeItem) String() string { for k := range this.Min { keysForMin = append(keysForMin, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForMin) + sort.Strings(keysForMin) mapStringForMin := "ResourceList{" for _, k := range keysForMin { mapStringForMin += fmt.Sprintf("%v: %v,", k, this.Min[ResourceName(k)]) @@ -28989,7 +21493,7 @@ func (this *LimitRangeItem) String() string { for k := range this.Default { keysForDefault = append(keysForDefault, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDefault) + sort.Strings(keysForDefault) mapStringForDefault := "ResourceList{" for _, k := range keysForDefault { mapStringForDefault += fmt.Sprintf("%v: %v,", k, this.Default[ResourceName(k)]) @@ -28999,7 +21503,7 @@ func (this *LimitRangeItem) String() string { for k := range this.DefaultRequest { keysForDefaultRequest = append(keysForDefaultRequest, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDefaultRequest) + sort.Strings(keysForDefaultRequest) mapStringForDefaultRequest := "ResourceList{" for _, k := range keysForDefaultRequest { mapStringForDefaultRequest += fmt.Sprintf("%v: %v,", k, this.DefaultRequest[ResourceName(k)]) @@ -29009,7 +21513,7 @@ func (this *LimitRangeItem) String() string { for k := range this.MaxLimitRequestRatio { keysForMaxLimitRequestRatio = append(keysForMaxLimitRequestRatio, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForMaxLimitRequestRatio) + sort.Strings(keysForMaxLimitRequestRatio) mapStringForMaxLimitRequestRatio := "ResourceList{" for _, k := range keysForMaxLimitRequestRatio { mapStringForMaxLimitRequestRatio += fmt.Sprintf("%v: %v,", k, this.MaxLimitRequestRatio[ResourceName(k)]) @@ -29477,7 +21981,7 @@ func (this *NodeStatus) String() string { for k := range this.Capacity { keysForCapacity = append(keysForCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + sort.Strings(keysForCapacity) mapStringForCapacity := "ResourceList{" for _, k := range keysForCapacity { mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[ResourceName(k)]) @@ -29487,7 +21991,7 @@ func (this *NodeStatus) String() string { for k := range this.Allocatable { keysForAllocatable = append(keysForAllocatable, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatable) + sort.Strings(keysForAllocatable) mapStringForAllocatable := "ResourceList{" for _, k := range keysForAllocatable { mapStringForAllocatable += fmt.Sprintf("%v: %v,", k, this.Allocatable[ResourceName(k)]) @@ -29654,7 +22158,7 @@ func (this *PersistentVolumeClaimStatus) String() string { for k := range this.Capacity { keysForCapacity = append(keysForCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + sort.Strings(keysForCapacity) mapStringForCapacity := "ResourceList{" for _, k := range keysForCapacity { mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[ResourceName(k)]) @@ -29664,7 +22168,7 @@ func (this *PersistentVolumeClaimStatus) String() string { for k := range this.AllocatedResources { keysForAllocatedResources = append(keysForAllocatedResources, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatedResources) + sort.Strings(keysForAllocatedResources) mapStringForAllocatedResources := "ResourceList{" for _, k := range keysForAllocatedResources { mapStringForAllocatedResources += fmt.Sprintf("%v: %v,", k, this.AllocatedResources[ResourceName(k)]) @@ -29674,7 +22178,7 @@ func (this *PersistentVolumeClaimStatus) String() string { for k := range this.AllocatedResourceStatuses { keysForAllocatedResourceStatuses = append(keysForAllocatedResourceStatuses, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatedResourceStatuses) + sort.Strings(keysForAllocatedResourceStatuses) mapStringForAllocatedResourceStatuses := "map[ResourceName]ClaimResourceStatus{" for _, k := range keysForAllocatedResourceStatuses { mapStringForAllocatedResourceStatuses += fmt.Sprintf("%v: %v,", k, this.AllocatedResourceStatuses[ResourceName(k)]) @@ -29770,7 +22274,7 @@ func (this *PersistentVolumeSpec) String() string { for k := range this.Capacity { keysForCapacity = append(keysForCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + sort.Strings(keysForCapacity) mapStringForCapacity := "ResourceList{" for _, k := range keysForCapacity { mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[ResourceName(k)]) @@ -30206,7 +22710,7 @@ func (this *PodSpec) String() string { for k := range this.NodeSelector { keysForNodeSelector = append(keysForNodeSelector, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector) + sort.Strings(keysForNodeSelector) mapStringForNodeSelector := "map[string]string{" for _, k := range keysForNodeSelector { mapStringForNodeSelector += fmt.Sprintf("%v: %v,", k, this.NodeSelector[k]) @@ -30216,7 +22720,7 @@ func (this *PodSpec) String() string { for k := range this.Overhead { keysForOverhead = append(keysForOverhead, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForOverhead) + sort.Strings(keysForOverhead) mapStringForOverhead := "ResourceList{" for _, k := range keysForOverhead { mapStringForOverhead += fmt.Sprintf("%v: %v,", k, this.Overhead[ResourceName(k)]) @@ -30593,7 +23097,7 @@ func (this *ReplicationControllerSpec) String() string { for k := range this.Selector { keysForSelector = append(keysForSelector, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForSelector) + sort.Strings(keysForSelector) mapStringForSelector := "map[string]string{" for _, k := range keysForSelector { mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k]) @@ -30698,7 +23202,7 @@ func (this *ResourceQuotaSpec) String() string { for k := range this.Hard { keysForHard = append(keysForHard, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForHard) + sort.Strings(keysForHard) mapStringForHard := "ResourceList{" for _, k := range keysForHard { mapStringForHard += fmt.Sprintf("%v: %v,", k, this.Hard[ResourceName(k)]) @@ -30720,7 +23224,7 @@ func (this *ResourceQuotaStatus) String() string { for k := range this.Hard { keysForHard = append(keysForHard, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForHard) + sort.Strings(keysForHard) mapStringForHard := "ResourceList{" for _, k := range keysForHard { mapStringForHard += fmt.Sprintf("%v: %v,", k, this.Hard[ResourceName(k)]) @@ -30730,7 +23234,7 @@ func (this *ResourceQuotaStatus) String() string { for k := range this.Used { keysForUsed = append(keysForUsed, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForUsed) + sort.Strings(keysForUsed) mapStringForUsed := "ResourceList{" for _, k := range keysForUsed { mapStringForUsed += fmt.Sprintf("%v: %v,", k, this.Used[ResourceName(k)]) @@ -30756,7 +23260,7 @@ func (this *ResourceRequirements) String() string { for k := range this.Limits { keysForLimits = append(keysForLimits, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForLimits) + sort.Strings(keysForLimits) mapStringForLimits := "ResourceList{" for _, k := range keysForLimits { mapStringForLimits += fmt.Sprintf("%v: %v,", k, this.Limits[ResourceName(k)]) @@ -30766,7 +23270,7 @@ func (this *ResourceRequirements) String() string { for k := range this.Requests { keysForRequests = append(keysForRequests, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForRequests) + sort.Strings(keysForRequests) mapStringForRequests := "ResourceList{" for _, k := range keysForRequests { mapStringForRequests += fmt.Sprintf("%v: %v,", k, this.Requests[ResourceName(k)]) @@ -30893,7 +23397,7 @@ func (this *Secret) String() string { for k := range this.Data { keysForData = append(keysForData, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForData) + sort.Strings(keysForData) mapStringForData := "map[string][]byte{" for _, k := range keysForData { mapStringForData += fmt.Sprintf("%v: %v,", k, this.Data[k]) @@ -30903,7 +23407,7 @@ func (this *Secret) String() string { for k := range this.StringData { keysForStringData = append(keysForStringData, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringData) + sort.Strings(keysForStringData) mapStringForStringData := "map[string]string{" for _, k := range keysForStringData { mapStringForStringData += fmt.Sprintf("%v: %v,", k, this.StringData[k]) @@ -31152,7 +23656,7 @@ func (this *ServiceSpec) String() string { for k := range this.Selector { keysForSelector = append(keysForSelector, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForSelector) + sort.Strings(keysForSelector) mapStringForSelector := "map[string]string{" for _, k := range keysForSelector { mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k]) @@ -31448,7 +23952,7 @@ func (this *VolumeResourceRequirements) String() string { for k := range this.Limits { keysForLimits = append(keysForLimits, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForLimits) + sort.Strings(keysForLimits) mapStringForLimits := "ResourceList{" for _, k := range keysForLimits { mapStringForLimits += fmt.Sprintf("%v: %v,", k, this.Limits[ResourceName(k)]) @@ -31458,7 +23962,7 @@ func (this *VolumeResourceRequirements) String() string { for k := range this.Requests { keysForRequests = append(keysForRequests, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForRequests) + sort.Strings(keysForRequests) mapStringForRequests := "ResourceList{" for _, k := range keysForRequests { mapStringForRequests += fmt.Sprintf("%v: %v,", k, this.Requests[ResourceName(k)]) diff --git a/staging/src/k8s.io/api/core/v1/generated.proto b/staging/src/k8s.io/api/core/v1/generated.proto index fb26953147d90..c4325d930a843 100644 --- a/staging/src/k8s.io/api/core/v1/generated.proto +++ b/staging/src/k8s.io/api/core/v1/generated.proto @@ -782,7 +782,6 @@ message Container { // container. Instead, the next init container starts immediately after this // init container is started, or after any startupProbe has successfully // completed. - // +featureGate=SidecarContainers // +optional optional string restartPolicy = 24; @@ -1148,7 +1147,6 @@ message ContainerStatus { // +patchStrategy=merge // +listType=map // +listMapKey=mountPath - // +featureGate=RecursiveReadOnlyMounts repeated VolumeMountStatus volumeMounts = 12; // User represents user identity information initially attached to the first process of the container @@ -1582,7 +1580,6 @@ message EphemeralContainerCommon { // Restart policy for the container to manage the restart behavior of each // container within a pod. // You cannot set this field on ephemeral containers. - // +featureGate=SidecarContainers // +optional optional string restartPolicy = 24; @@ -2346,7 +2343,6 @@ message LifecycleHandler { optional TCPSocketAction tcpSocket = 3; // Sleep represents a duration that the container should sleep. - // +featureGate=PodLifecycleSleepAction // +optional optional SleepAction sleep = 4; } @@ -2811,7 +2807,6 @@ message NodeRuntimeHandler { // NodeRuntimeHandlerFeatures is a set of features implemented by the runtime handler. message NodeRuntimeHandlerFeatures { // RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts. - // +featureGate=RecursiveReadOnlyMounts // +optional optional bool recursiveReadOnlyMounts = 1; @@ -2978,7 +2973,6 @@ message NodeStatus { optional NodeConfigStatus config = 11; // The available runtime handlers. - // +featureGate=RecursiveReadOnlyMounts // +featureGate=UserNamespacesSupport // +optional // +listType=atomic @@ -3206,7 +3200,7 @@ message PersistentVolumeClaimSpec { optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4; // resources represents the minimum resources the volume should have. - // If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements + // Users are allowed to specify resource requirements // that are lower than previous value but must still be higher than capacity recorded in the // status field of the claim. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources @@ -3324,9 +3318,6 @@ message PersistentVolumeClaimStatus { // should ignore the update for the purpose it was designed. For example - a controller that // only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid // resources associated with PVC. - // - // This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - // +featureGate=RecoverVolumeExpansionFailure // +optional map allocatedResources = 5; @@ -3363,9 +3354,6 @@ message PersistentVolumeClaimStatus { // should ignore the update for the purpose it was designed. For example - a controller that // only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid // resources associated with PVC. - // - // This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - // +featureGate=RecoverVolumeExpansionFailure // +mapType=granular // +optional map allocatedResourceStatuses = 7; @@ -3907,7 +3895,7 @@ message PodCondition { optional string type = 1; // If set, this represents the .metadata.generation that the pod condition was set based upon. - // This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field. + // The PodObservedGenerationTracking feature gate must be enabled to use this field. // +featureGate=PodObservedGenerationTracking // +optional optional int64 observedGeneration = 7; @@ -4681,8 +4669,8 @@ message PodSpec { // will be made available to those containers which consume them // by name. // - // This is an alpha field and requires enabling the - // DynamicResourceAllocation feature gate. + // This is a stable field but requires that the + // DynamicResourceAllocation feature gate is enabled. // // This field is immutable. // @@ -4730,7 +4718,7 @@ message PodSpec { // plane. message PodStatus { // If set, this represents the .metadata.generation that the pod status was set based upon. - // This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field. + // The PodObservedGenerationTracking feature gate must be enabled to use this field. // +featureGate=PodObservedGenerationTracking // +optional optional int64 observedGeneration = 17; @@ -5263,6 +5251,8 @@ message ReplicationController { // be the same as the Pod(s) that the replication controller manages. // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional + // +k8s:subfield(name)=+k8s:optional + // +k8s:subfield(name)=+k8s:format=k8s-long-name optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the specification of the desired behavior of the replication controller. @@ -6378,7 +6368,6 @@ message ServiceSpec { // field is not set, the implementation will apply its default routing // strategy. If set to "PreferClose", implementations should prioritize // endpoints that are in the same zone. - // +featureGate=ServiceTrafficDistribution // +optional optional string trafficDistribution = 23; } @@ -6800,8 +6789,6 @@ message VolumeMount { // None (or be unspecified, which defaults to None). // // If this field is not specified, it is treated as an equivalent of Disabled. - // - // +featureGate=RecursiveReadOnlyMounts // +optional optional string recursiveReadOnly = 7; @@ -6846,7 +6833,6 @@ message VolumeMountStatus { // RecursiveReadOnly must be set to Disabled, Enabled, or unspecified (for non-readonly mounts). // An IfPossible value in the original VolumeMount must be translated to Disabled or Enabled, // depending on the mount result. - // +featureGate=RecursiveReadOnlyMounts // +optional optional string recursiveReadOnly = 4; } @@ -6929,7 +6915,8 @@ message VolumeProjection { // issues; consult the signer implementation's documentation to learn how to // use the certificates it issues. // - // +featureGate=PodCertificateProjection +optional + // +featureGate=PodCertificateProjection + // +optional optional PodCertificateProjection podCertificate = 6; } diff --git a/staging/src/k8s.io/api/core/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/core/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..58acf13752b4b --- /dev/null +++ b/staging/src/k8s.io/api/core/v1/generated.protomessage.pb.go @@ -0,0 +1,496 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*AWSElasticBlockStoreVolumeSource) ProtoMessage() {} + +func (*Affinity) ProtoMessage() {} + +func (*AppArmorProfile) ProtoMessage() {} + +func (*AttachedVolume) ProtoMessage() {} + +func (*AvoidPods) ProtoMessage() {} + +func (*AzureDiskVolumeSource) ProtoMessage() {} + +func (*AzureFilePersistentVolumeSource) ProtoMessage() {} + +func (*AzureFileVolumeSource) ProtoMessage() {} + +func (*Binding) ProtoMessage() {} + +func (*CSIPersistentVolumeSource) ProtoMessage() {} + +func (*CSIVolumeSource) ProtoMessage() {} + +func (*Capabilities) ProtoMessage() {} + +func (*CephFSPersistentVolumeSource) ProtoMessage() {} + +func (*CephFSVolumeSource) ProtoMessage() {} + +func (*CinderPersistentVolumeSource) ProtoMessage() {} + +func (*CinderVolumeSource) ProtoMessage() {} + +func (*ClientIPConfig) ProtoMessage() {} + +func (*ClusterTrustBundleProjection) ProtoMessage() {} + +func (*ComponentCondition) ProtoMessage() {} + +func (*ComponentStatus) ProtoMessage() {} + +func (*ComponentStatusList) ProtoMessage() {} + +func (*ConfigMap) ProtoMessage() {} + +func (*ConfigMapEnvSource) ProtoMessage() {} + +func (*ConfigMapKeySelector) ProtoMessage() {} + +func (*ConfigMapList) ProtoMessage() {} + +func (*ConfigMapNodeConfigSource) ProtoMessage() {} + +func (*ConfigMapProjection) ProtoMessage() {} + +func (*ConfigMapVolumeSource) ProtoMessage() {} + +func (*Container) ProtoMessage() {} + +func (*ContainerExtendedResourceRequest) ProtoMessage() {} + +func (*ContainerImage) ProtoMessage() {} + +func (*ContainerPort) ProtoMessage() {} + +func (*ContainerResizePolicy) ProtoMessage() {} + +func (*ContainerRestartRule) ProtoMessage() {} + +func (*ContainerRestartRuleOnExitCodes) ProtoMessage() {} + +func (*ContainerState) ProtoMessage() {} + +func (*ContainerStateRunning) ProtoMessage() {} + +func (*ContainerStateTerminated) ProtoMessage() {} + +func (*ContainerStateWaiting) ProtoMessage() {} + +func (*ContainerStatus) ProtoMessage() {} + +func (*ContainerUser) ProtoMessage() {} + +func (*DaemonEndpoint) ProtoMessage() {} + +func (*DownwardAPIProjection) ProtoMessage() {} + +func (*DownwardAPIVolumeFile) ProtoMessage() {} + +func (*DownwardAPIVolumeSource) ProtoMessage() {} + +func (*EmptyDirVolumeSource) ProtoMessage() {} + +func (*EndpointAddress) ProtoMessage() {} + +func (*EndpointPort) ProtoMessage() {} + +func (*EndpointSubset) ProtoMessage() {} + +func (*Endpoints) ProtoMessage() {} + +func (*EndpointsList) ProtoMessage() {} + +func (*EnvFromSource) ProtoMessage() {} + +func (*EnvVar) ProtoMessage() {} + +func (*EnvVarSource) ProtoMessage() {} + +func (*EphemeralContainer) ProtoMessage() {} + +func (*EphemeralContainerCommon) ProtoMessage() {} + +func (*EphemeralVolumeSource) ProtoMessage() {} + +func (*Event) ProtoMessage() {} + +func (*EventList) ProtoMessage() {} + +func (*EventSeries) ProtoMessage() {} + +func (*EventSource) ProtoMessage() {} + +func (*ExecAction) ProtoMessage() {} + +func (*FCVolumeSource) ProtoMessage() {} + +func (*FileKeySelector) ProtoMessage() {} + +func (*FlexPersistentVolumeSource) ProtoMessage() {} + +func (*FlexVolumeSource) ProtoMessage() {} + +func (*FlockerVolumeSource) ProtoMessage() {} + +func (*GCEPersistentDiskVolumeSource) ProtoMessage() {} + +func (*GRPCAction) ProtoMessage() {} + +func (*GitRepoVolumeSource) ProtoMessage() {} + +func (*GlusterfsPersistentVolumeSource) ProtoMessage() {} + +func (*GlusterfsVolumeSource) ProtoMessage() {} + +func (*HTTPGetAction) ProtoMessage() {} + +func (*HTTPHeader) ProtoMessage() {} + +func (*HostAlias) ProtoMessage() {} + +func (*HostIP) ProtoMessage() {} + +func (*HostPathVolumeSource) ProtoMessage() {} + +func (*ISCSIPersistentVolumeSource) ProtoMessage() {} + +func (*ISCSIVolumeSource) ProtoMessage() {} + +func (*ImageVolumeSource) ProtoMessage() {} + +func (*KeyToPath) ProtoMessage() {} + +func (*Lifecycle) ProtoMessage() {} + +func (*LifecycleHandler) ProtoMessage() {} + +func (*LimitRange) ProtoMessage() {} + +func (*LimitRangeItem) ProtoMessage() {} + +func (*LimitRangeList) ProtoMessage() {} + +func (*LimitRangeSpec) ProtoMessage() {} + +func (*LinuxContainerUser) ProtoMessage() {} + +func (*List) ProtoMessage() {} + +func (*LoadBalancerIngress) ProtoMessage() {} + +func (*LoadBalancerStatus) ProtoMessage() {} + +func (*LocalObjectReference) ProtoMessage() {} + +func (*LocalVolumeSource) ProtoMessage() {} + +func (*ModifyVolumeStatus) ProtoMessage() {} + +func (*NFSVolumeSource) ProtoMessage() {} + +func (*Namespace) ProtoMessage() {} + +func (*NamespaceCondition) ProtoMessage() {} + +func (*NamespaceList) ProtoMessage() {} + +func (*NamespaceSpec) ProtoMessage() {} + +func (*NamespaceStatus) ProtoMessage() {} + +func (*Node) ProtoMessage() {} + +func (*NodeAddress) ProtoMessage() {} + +func (*NodeAffinity) ProtoMessage() {} + +func (*NodeCondition) ProtoMessage() {} + +func (*NodeConfigSource) ProtoMessage() {} + +func (*NodeConfigStatus) ProtoMessage() {} + +func (*NodeDaemonEndpoints) ProtoMessage() {} + +func (*NodeFeatures) ProtoMessage() {} + +func (*NodeList) ProtoMessage() {} + +func (*NodeProxyOptions) ProtoMessage() {} + +func (*NodeRuntimeHandler) ProtoMessage() {} + +func (*NodeRuntimeHandlerFeatures) ProtoMessage() {} + +func (*NodeSelector) ProtoMessage() {} + +func (*NodeSelectorRequirement) ProtoMessage() {} + +func (*NodeSelectorTerm) ProtoMessage() {} + +func (*NodeSpec) ProtoMessage() {} + +func (*NodeStatus) ProtoMessage() {} + +func (*NodeSwapStatus) ProtoMessage() {} + +func (*NodeSystemInfo) ProtoMessage() {} + +func (*ObjectFieldSelector) ProtoMessage() {} + +func (*ObjectReference) ProtoMessage() {} + +func (*PersistentVolume) ProtoMessage() {} + +func (*PersistentVolumeClaim) ProtoMessage() {} + +func (*PersistentVolumeClaimCondition) ProtoMessage() {} + +func (*PersistentVolumeClaimList) ProtoMessage() {} + +func (*PersistentVolumeClaimSpec) ProtoMessage() {} + +func (*PersistentVolumeClaimStatus) ProtoMessage() {} + +func (*PersistentVolumeClaimTemplate) ProtoMessage() {} + +func (*PersistentVolumeClaimVolumeSource) ProtoMessage() {} + +func (*PersistentVolumeList) ProtoMessage() {} + +func (*PersistentVolumeSource) ProtoMessage() {} + +func (*PersistentVolumeSpec) ProtoMessage() {} + +func (*PersistentVolumeStatus) ProtoMessage() {} + +func (*PhotonPersistentDiskVolumeSource) ProtoMessage() {} + +func (*Pod) ProtoMessage() {} + +func (*PodAffinity) ProtoMessage() {} + +func (*PodAffinityTerm) ProtoMessage() {} + +func (*PodAntiAffinity) ProtoMessage() {} + +func (*PodAttachOptions) ProtoMessage() {} + +func (*PodCertificateProjection) ProtoMessage() {} + +func (*PodCondition) ProtoMessage() {} + +func (*PodDNSConfig) ProtoMessage() {} + +func (*PodDNSConfigOption) ProtoMessage() {} + +func (*PodExecOptions) ProtoMessage() {} + +func (*PodExtendedResourceClaimStatus) ProtoMessage() {} + +func (*PodIP) ProtoMessage() {} + +func (*PodList) ProtoMessage() {} + +func (*PodLogOptions) ProtoMessage() {} + +func (*PodOS) ProtoMessage() {} + +func (*PodPortForwardOptions) ProtoMessage() {} + +func (*PodProxyOptions) ProtoMessage() {} + +func (*PodReadinessGate) ProtoMessage() {} + +func (*PodResourceClaim) ProtoMessage() {} + +func (*PodResourceClaimStatus) ProtoMessage() {} + +func (*PodSchedulingGate) ProtoMessage() {} + +func (*PodSecurityContext) ProtoMessage() {} + +func (*PodSignature) ProtoMessage() {} + +func (*PodSpec) ProtoMessage() {} + +func (*PodStatus) ProtoMessage() {} + +func (*PodStatusResult) ProtoMessage() {} + +func (*PodTemplate) ProtoMessage() {} + +func (*PodTemplateList) ProtoMessage() {} + +func (*PodTemplateSpec) ProtoMessage() {} + +func (*PortStatus) ProtoMessage() {} + +func (*PortworxVolumeSource) ProtoMessage() {} + +func (*Preconditions) ProtoMessage() {} + +func (*PreferAvoidPodsEntry) ProtoMessage() {} + +func (*PreferredSchedulingTerm) ProtoMessage() {} + +func (*Probe) ProtoMessage() {} + +func (*ProbeHandler) ProtoMessage() {} + +func (*ProjectedVolumeSource) ProtoMessage() {} + +func (*QuobyteVolumeSource) ProtoMessage() {} + +func (*RBDPersistentVolumeSource) ProtoMessage() {} + +func (*RBDVolumeSource) ProtoMessage() {} + +func (*RangeAllocation) ProtoMessage() {} + +func (*ReplicationController) ProtoMessage() {} + +func (*ReplicationControllerCondition) ProtoMessage() {} + +func (*ReplicationControllerList) ProtoMessage() {} + +func (*ReplicationControllerSpec) ProtoMessage() {} + +func (*ReplicationControllerStatus) ProtoMessage() {} + +func (*ResourceClaim) ProtoMessage() {} + +func (*ResourceFieldSelector) ProtoMessage() {} + +func (*ResourceHealth) ProtoMessage() {} + +func (*ResourceQuota) ProtoMessage() {} + +func (*ResourceQuotaList) ProtoMessage() {} + +func (*ResourceQuotaSpec) ProtoMessage() {} + +func (*ResourceQuotaStatus) ProtoMessage() {} + +func (*ResourceRequirements) ProtoMessage() {} + +func (*ResourceStatus) ProtoMessage() {} + +func (*SELinuxOptions) ProtoMessage() {} + +func (*ScaleIOPersistentVolumeSource) ProtoMessage() {} + +func (*ScaleIOVolumeSource) ProtoMessage() {} + +func (*ScopeSelector) ProtoMessage() {} + +func (*ScopedResourceSelectorRequirement) ProtoMessage() {} + +func (*SeccompProfile) ProtoMessage() {} + +func (*Secret) ProtoMessage() {} + +func (*SecretEnvSource) ProtoMessage() {} + +func (*SecretKeySelector) ProtoMessage() {} + +func (*SecretList) ProtoMessage() {} + +func (*SecretProjection) ProtoMessage() {} + +func (*SecretReference) ProtoMessage() {} + +func (*SecretVolumeSource) ProtoMessage() {} + +func (*SecurityContext) ProtoMessage() {} + +func (*SerializedReference) ProtoMessage() {} + +func (*Service) ProtoMessage() {} + +func (*ServiceAccount) ProtoMessage() {} + +func (*ServiceAccountList) ProtoMessage() {} + +func (*ServiceAccountTokenProjection) ProtoMessage() {} + +func (*ServiceList) ProtoMessage() {} + +func (*ServicePort) ProtoMessage() {} + +func (*ServiceProxyOptions) ProtoMessage() {} + +func (*ServiceSpec) ProtoMessage() {} + +func (*ServiceStatus) ProtoMessage() {} + +func (*SessionAffinityConfig) ProtoMessage() {} + +func (*SleepAction) ProtoMessage() {} + +func (*StorageOSPersistentVolumeSource) ProtoMessage() {} + +func (*StorageOSVolumeSource) ProtoMessage() {} + +func (*Sysctl) ProtoMessage() {} + +func (*TCPSocketAction) ProtoMessage() {} + +func (*Taint) ProtoMessage() {} + +func (*Toleration) ProtoMessage() {} + +func (*TopologySelectorLabelRequirement) ProtoMessage() {} + +func (*TopologySelectorTerm) ProtoMessage() {} + +func (*TopologySpreadConstraint) ProtoMessage() {} + +func (*TypedLocalObjectReference) ProtoMessage() {} + +func (*TypedObjectReference) ProtoMessage() {} + +func (*Volume) ProtoMessage() {} + +func (*VolumeDevice) ProtoMessage() {} + +func (*VolumeMount) ProtoMessage() {} + +func (*VolumeMountStatus) ProtoMessage() {} + +func (*VolumeNodeAffinity) ProtoMessage() {} + +func (*VolumeProjection) ProtoMessage() {} + +func (*VolumeResourceRequirements) ProtoMessage() {} + +func (*VolumeSource) ProtoMessage() {} + +func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {} + +func (*WeightedPodAffinityTerm) ProtoMessage() {} + +func (*WindowsSecurityContextOptions) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index 08b6d351cc67e..cc992af4e08b3 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -558,7 +558,7 @@ type PersistentVolumeClaimSpec struct { // +optional Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"` // resources represents the minimum resources the volume should have. - // If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements + // Users are allowed to specify resource requirements // that are lower than previous value but must still be higher than capacity recorded in the // status field of the claim. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources @@ -648,7 +648,7 @@ type TypedObjectReference struct { // Valid values are: // - "Resizing", "FileSystemResizePending" // -// If RecoverVolumeExpansionFailure feature gate is enabled, then following additional values can be expected: +// The following additional values can be expected: // - "ControllerResizeError", "NodeResizeError" // // If VolumeAttributesClass feature gate is enabled, then following additional values can be expected: @@ -796,9 +796,6 @@ type PersistentVolumeClaimStatus struct { // should ignore the update for the purpose it was designed. For example - a controller that // only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid // resources associated with PVC. - // - // This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - // +featureGate=RecoverVolumeExpansionFailure // +optional AllocatedResources ResourceList `json:"allocatedResources,omitempty" protobuf:"bytes,5,rep,name=allocatedResources,casttype=ResourceList,castkey=ResourceName"` @@ -838,9 +835,6 @@ type PersistentVolumeClaimStatus struct { // should ignore the update for the purpose it was designed. For example - a controller that // only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid // resources associated with PVC. - // - // This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - // +featureGate=RecoverVolumeExpansionFailure // +mapType=granular // +optional AllocatedResourceStatuses map[ResourceName]ClaimResourceStatus `json:"allocatedResourceStatuses,omitempty" protobuf:"bytes,7,rep,name=allocatedResourceStatuses"` @@ -2144,7 +2138,8 @@ type VolumeProjection struct { // issues; consult the signer implementation's documentation to learn how to // use the certificates it issues. // - // +featureGate=PodCertificateProjection +optional + // +featureGate=PodCertificateProjection + // +optional PodCertificate *PodCertificateProjection `json:"podCertificate,omitempty" protobuf:"bytes,6,opt,name=podCertificate"` } @@ -2379,8 +2374,6 @@ type VolumeMount struct { // None (or be unspecified, which defaults to None). // // If this field is not specified, it is treated as an equivalent of Disabled. - // - // +featureGate=RecursiveReadOnlyMounts // +optional RecursiveReadOnly *RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty" protobuf:"bytes,7,opt,name=recursiveReadOnly,casttype=RecursiveReadOnlyMode"` // Path within the container at which the volume should be mounted. Must @@ -2984,7 +2977,6 @@ type Container struct { // container. Instead, the next init container starts immediately after this // init container is started, or after any startupProbe has successfully // completed. - // +featureGate=SidecarContainers // +optional RestartPolicy *ContainerRestartPolicy `json:"restartPolicy,omitempty" protobuf:"bytes,24,opt,name=restartPolicy,casttype=ContainerRestartPolicy"` // Represents a list of rules to be checked to determine if the @@ -3128,7 +3120,6 @@ type LifecycleHandler struct { // +optional TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"` // Sleep represents a duration that the container should sleep. - // +featureGate=PodLifecycleSleepAction // +optional Sleep *SleepAction `json:"sleep,omitempty" protobuf:"bytes,4,opt,name=sleep"` } @@ -3369,7 +3360,6 @@ type ContainerStatus struct { // +patchStrategy=merge // +listType=map // +listMapKey=mountPath - // +featureGate=RecursiveReadOnlyMounts VolumeMounts []VolumeMountStatus `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,12,rep,name=volumeMounts"` // User represents user identity information initially attached to the first process of the container // +featureGate=SupplementalGroupsPolicy @@ -3566,7 +3556,7 @@ type PodCondition struct { // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions Type PodConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PodConditionType"` // If set, this represents the .metadata.generation that the pod condition was set based upon. - // This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field. + // The PodObservedGenerationTracking feature gate must be enabled to use this field. // +featureGate=PodObservedGenerationTracking // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,7,opt,name=observedGeneration"` @@ -3612,7 +3602,6 @@ type VolumeMountStatus struct { // RecursiveReadOnly must be set to Disabled, Enabled, or unspecified (for non-readonly mounts). // An IfPossible value in the original VolumeMount must be translated to Disabled or Enabled, // depending on the mount result. - // +featureGate=RecursiveReadOnlyMounts // +optional RecursiveReadOnly *RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty" protobuf:"bytes,4,opt,name=recursiveReadOnly,casttype=RecursiveReadOnlyMode"` } @@ -4388,8 +4377,8 @@ type PodSpec struct { // will be made available to those containers which consume them // by name. // - // This is an alpha field and requires enabling the - // DynamicResourceAllocation feature gate. + // This is a stable field but requires that the + // DynamicResourceAllocation feature gate is enabled. // // This field is immutable. // @@ -5074,7 +5063,6 @@ type EphemeralContainerCommon struct { // Restart policy for the container to manage the restart behavior of each // container within a pod. // You cannot set this field on ephemeral containers. - // +featureGate=SidecarContainers // +optional RestartPolicy *ContainerRestartPolicy `json:"restartPolicy,omitempty" protobuf:"bytes,24,opt,name=restartPolicy,casttype=ContainerRestartPolicy"` // Represents a list of rules to be checked to determine if the @@ -5198,7 +5186,7 @@ type EphemeralContainer struct { // plane. type PodStatus struct { // If set, this represents the .metadata.generation that the pod status was set based upon. - // This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field. + // The PodObservedGenerationTracking feature gate must be enabled to use this field. // +featureGate=PodObservedGenerationTracking // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,17,opt,name=observedGeneration"` @@ -5578,6 +5566,8 @@ type ReplicationController struct { // be the same as the Pod(s) that the replication controller manages. // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional + // +k8s:subfield(name)=+k8s:optional + // +k8s:subfield(name)=+k8s:format=k8s-long-name metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the specification of the desired behavior of the replication controller. @@ -5678,8 +5668,11 @@ const ( ServiceInternalTrafficPolicyLocal ServiceInternalTrafficPolicy = "Local" ) -// for backwards compat +// ServiceInternalTrafficPolicy describes how nodes distribute service traffic they +// receive on the ClusterIP. // +enum +// +// Deprecated: use ServiceInternalTrafficPolicy instead. type ServiceInternalTrafficPolicyType = ServiceInternalTrafficPolicy // ServiceExternalTrafficPolicy describes how nodes distribute service traffic they @@ -5698,8 +5691,12 @@ const ( ServiceExternalTrafficPolicyLocal ServiceExternalTrafficPolicy = "Local" ) -// for backwards compat +// ServiceExternalTrafficPolicy describes how nodes distribute service traffic they +// receive on one of the Service's "externally-facing" addresses (NodePorts, ExternalIPs, +// and LoadBalancer IPs. // +enum +// +// Deprecated: use ServiceExternalTrafficPolicy instead. type ServiceExternalTrafficPolicyType = ServiceExternalTrafficPolicy const ( @@ -5833,8 +5830,10 @@ const ( IPFamilyPolicyRequireDualStack IPFamilyPolicy = "RequireDualStack" ) -// for backwards compat +// IPFamilyPolicy represents the dual-stack-ness requested or required by a Service // +enum +// +// Deprecated: use IPFamilyPolicy instead. type IPFamilyPolicyType = IPFamilyPolicy // ServiceSpec describes the attributes that a user creates on a service. @@ -6083,7 +6082,6 @@ type ServiceSpec struct { // field is not set, the implementation will apply its default routing // strategy. If set to "PreferClose", implementations should prioritize // endpoints that are in the same zone. - // +featureGate=ServiceTrafficDistribution // +optional TrafficDistribution *string `json:"trafficDistribution,omitempty" protobuf:"bytes,23,opt,name=trafficDistribution"` } @@ -6508,7 +6506,6 @@ type NodeDaemonEndpoints struct { // NodeRuntimeHandlerFeatures is a set of features implemented by the runtime handler. type NodeRuntimeHandlerFeatures struct { // RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts. - // +featureGate=RecursiveReadOnlyMounts // +optional RecursiveReadOnlyMounts *bool `json:"recursiveReadOnlyMounts,omitempty" protobuf:"varint,1,opt,name=recursiveReadOnlyMounts"` // UserNamespaces is set to true if the runtime handler supports UserNamespaces, including for volumes. @@ -6683,7 +6680,6 @@ type NodeStatus struct { // +optional Config *NodeConfigStatus `json:"config,omitempty" protobuf:"bytes,11,opt,name=config"` // The available runtime handlers. - // +featureGate=RecursiveReadOnlyMounts // +featureGate=UserNamespacesSupport // +optional // +listType=atomic diff --git a/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go index 1204307667fac..b912cf48aa883 100644 --- a/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -1486,7 +1486,7 @@ var map_PersistentVolumeClaimSpec = map[string]string{ "": "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes", "accessModes": "accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", "selector": "selector is a label query over volumes to consider for binding.", - "resources": "resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + "resources": "resources represents the minimum resources the volume should have. Users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", "volumeName": "volumeName is the binding reference to the PersistentVolume backing this claim.", "storageClassName": "storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", "volumeMode": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", @@ -1505,8 +1505,8 @@ var map_PersistentVolumeClaimStatus = map[string]string{ "accessModes": "accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", "capacity": "capacity represents the actual resources of the underlying volume.", "conditions": "conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'Resizing'.", - "allocatedResources": "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", - "allocatedResourceStatuses": "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + "allocatedResources": "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.", + "allocatedResourceStatuses": "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.", "currentVolumeAttributesClassName": "currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim", "modifyVolumeStatus": "ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. When this is unset, there is no ModifyVolume operation being attempted.", } @@ -1689,7 +1689,7 @@ func (PodCertificateProjection) SwaggerDoc() map[string]string { var map_PodCondition = map[string]string{ "": "PodCondition contains details for the current condition of this pod.", "type": "Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", - "observedGeneration": "If set, this represents the .metadata.generation that the pod condition was set based upon. This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field.", + "observedGeneration": "If set, this represents the .metadata.generation that the pod condition was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.", "status": "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", "lastProbeTime": "Last time we probed the condition.", "lastTransitionTime": "Last time the condition transitioned from one status to another.", @@ -1919,7 +1919,7 @@ var map_PodSpec = map[string]string{ "os": "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.resources - spec.securityContext.appArmorProfile - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.securityContext.supplementalGroupsPolicy - spec.containers[*].securityContext.appArmorProfile - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup", "hostUsers": "Use the host's user namespace. Optional: Default to true. If set to true or not present, the pod will be run in the host user namespace, useful for when the pod needs a feature only available to the host user namespace, such as loading a kernel module with CAP_SYS_MODULE. When set to false, a new userns is created for the pod. Setting false is useful for mitigating container breakout vulnerabilities even allowing users to run their containers as root without actually having root privileges on the host. This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature.", "schedulingGates": "SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod.\n\nSchedulingGates can only be set at pod creation time, and be removed only afterwards.", - "resourceClaims": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.", + "resourceClaims": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is a stable field but requires that the DynamicResourceAllocation feature gate is enabled.\n\nThis field is immutable.", "resources": "Resources is the total amount of CPU and Memory resources required by all containers in the pod. It supports specifying Requests and Limits for \"cpu\", \"memory\" and \"hugepages-\" resource names only. ResourceClaims are not supported.\n\nThis field enables fine-grained control over resource allocation for the entire pod, allowing resource sharing among containers in a pod.\n\nThis is an alpha field and requires enabling the PodLevelResources feature gate.", "hostnameOverride": "HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. This field only specifies the pod's hostname and does not affect its DNS records. When this field is set to a non-empty string: - It takes precedence over the values set in `hostname` and `subdomain`. - The Pod's hostname will be set to this value. - `setHostnameAsFQDN` must be nil or set to false. - `hostNetwork` must be set to false.\n\nThis field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. Requires the HostnameOverride feature gate to be enabled.", } @@ -1930,7 +1930,7 @@ func (PodSpec) SwaggerDoc() map[string]string { var map_PodStatus = map[string]string{ "": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.", - "observedGeneration": "If set, this represents the .metadata.generation that the pod status was set based upon. This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field.", + "observedGeneration": "If set, this represents the .metadata.generation that the pod status was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.", "phase": "The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod's status. There are five possible phase values:\n\nPending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod.\n\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase", "conditions": "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", "message": "A human readable message indicating details about why the pod is in this condition.", diff --git a/staging/src/k8s.io/api/core/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/core/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..524ad288c3fc2 --- /dev/null +++ b/staging/src/k8s.io/api/core/v1/zz_generated.model_name.go @@ -0,0 +1,1207 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AWSElasticBlockStoreVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Affinity) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Affinity" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AppArmorProfile) OpenAPIModelName() string { + return "io.k8s.api.core.v1.AppArmorProfile" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AttachedVolume) OpenAPIModelName() string { + return "io.k8s.api.core.v1.AttachedVolume" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AvoidPods) OpenAPIModelName() string { + return "io.k8s.api.core.v1.AvoidPods" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AzureDiskVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.AzureDiskVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AzureFilePersistentVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.AzureFilePersistentVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AzureFileVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.AzureFileVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Binding) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Binding" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSIPersistentVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.CSIPersistentVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSIVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.CSIVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Capabilities) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Capabilities" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CephFSPersistentVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.CephFSPersistentVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CephFSVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.CephFSVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CinderPersistentVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.CinderPersistentVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CinderVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.CinderVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClientIPConfig) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ClientIPConfig" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterTrustBundleProjection) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ClusterTrustBundleProjection" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ComponentCondition) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ComponentCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ComponentStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ComponentStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ComponentStatusList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ComponentStatusList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ConfigMap) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ConfigMap" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ConfigMapEnvSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ConfigMapEnvSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ConfigMapKeySelector) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ConfigMapKeySelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ConfigMapList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ConfigMapList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ConfigMapNodeConfigSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ConfigMapNodeConfigSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ConfigMapProjection) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ConfigMapProjection" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ConfigMapVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ConfigMapVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Container) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Container" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerExtendedResourceRequest) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ContainerExtendedResourceRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerImage) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ContainerImage" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerPort) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ContainerPort" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerResizePolicy) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ContainerResizePolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerRestartRule) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ContainerRestartRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerRestartRuleOnExitCodes) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ContainerRestartRuleOnExitCodes" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerState) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ContainerState" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerStateRunning) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ContainerStateRunning" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerStateTerminated) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ContainerStateTerminated" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerStateWaiting) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ContainerStateWaiting" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ContainerStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ContainerUser) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ContainerUser" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonEndpoint) OpenAPIModelName() string { + return "io.k8s.api.core.v1.DaemonEndpoint" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DownwardAPIProjection) OpenAPIModelName() string { + return "io.k8s.api.core.v1.DownwardAPIProjection" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DownwardAPIVolumeFile) OpenAPIModelName() string { + return "io.k8s.api.core.v1.DownwardAPIVolumeFile" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DownwardAPIVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.DownwardAPIVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EmptyDirVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.EmptyDirVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EndpointAddress) OpenAPIModelName() string { + return "io.k8s.api.core.v1.EndpointAddress" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EndpointPort) OpenAPIModelName() string { + return "io.k8s.api.core.v1.EndpointPort" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EndpointSubset) OpenAPIModelName() string { + return "io.k8s.api.core.v1.EndpointSubset" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Endpoints) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Endpoints" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EndpointsList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.EndpointsList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EnvFromSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.EnvFromSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EnvVar) OpenAPIModelName() string { + return "io.k8s.api.core.v1.EnvVar" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EnvVarSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.EnvVarSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EphemeralContainer) OpenAPIModelName() string { + return "io.k8s.api.core.v1.EphemeralContainer" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EphemeralContainerCommon) OpenAPIModelName() string { + return "io.k8s.api.core.v1.EphemeralContainerCommon" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EphemeralVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.EphemeralVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Event) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Event" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EventList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.EventList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EventSeries) OpenAPIModelName() string { + return "io.k8s.api.core.v1.EventSeries" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EventSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.EventSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExecAction) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ExecAction" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FCVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.FCVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FileKeySelector) OpenAPIModelName() string { + return "io.k8s.api.core.v1.FileKeySelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlexPersistentVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.FlexPersistentVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlexVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.FlexVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlockerVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.FlockerVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GCEPersistentDiskVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.GCEPersistentDiskVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GRPCAction) OpenAPIModelName() string { + return "io.k8s.api.core.v1.GRPCAction" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GitRepoVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.GitRepoVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GlusterfsPersistentVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.GlusterfsPersistentVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GlusterfsVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.GlusterfsVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HTTPGetAction) OpenAPIModelName() string { + return "io.k8s.api.core.v1.HTTPGetAction" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HTTPHeader) OpenAPIModelName() string { + return "io.k8s.api.core.v1.HTTPHeader" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HostAlias) OpenAPIModelName() string { + return "io.k8s.api.core.v1.HostAlias" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HostIP) OpenAPIModelName() string { + return "io.k8s.api.core.v1.HostIP" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HostPathVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.HostPathVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ISCSIPersistentVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ISCSIPersistentVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ISCSIVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ISCSIVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ImageVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ImageVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in KeyToPath) OpenAPIModelName() string { + return "io.k8s.api.core.v1.KeyToPath" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Lifecycle) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Lifecycle" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LifecycleHandler) OpenAPIModelName() string { + return "io.k8s.api.core.v1.LifecycleHandler" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LimitRange) OpenAPIModelName() string { + return "io.k8s.api.core.v1.LimitRange" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LimitRangeItem) OpenAPIModelName() string { + return "io.k8s.api.core.v1.LimitRangeItem" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LimitRangeList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.LimitRangeList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LimitRangeSpec) OpenAPIModelName() string { + return "io.k8s.api.core.v1.LimitRangeSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LinuxContainerUser) OpenAPIModelName() string { + return "io.k8s.api.core.v1.LinuxContainerUser" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in List) OpenAPIModelName() string { + return "io.k8s.api.core.v1.List" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LoadBalancerIngress) OpenAPIModelName() string { + return "io.k8s.api.core.v1.LoadBalancerIngress" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LoadBalancerStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.LoadBalancerStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LocalObjectReference) OpenAPIModelName() string { + return "io.k8s.api.core.v1.LocalObjectReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LocalVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.LocalVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ModifyVolumeStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ModifyVolumeStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NFSVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NFSVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Namespace) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Namespace" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NamespaceCondition) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NamespaceCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NamespaceList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NamespaceList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NamespaceSpec) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NamespaceSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NamespaceStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NamespaceStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Node) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Node" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeAddress) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeAddress" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeAffinity) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeAffinity" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeCondition) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeConfigSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeConfigSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeConfigStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeConfigStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeDaemonEndpoints) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeDaemonEndpoints" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeFeatures) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeFeatures" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeProxyOptions) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeProxyOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeRuntimeHandler) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeRuntimeHandler" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeRuntimeHandlerFeatures) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeRuntimeHandlerFeatures" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeSelector) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeSelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeSelectorRequirement) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeSelectorRequirement" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeSelectorTerm) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeSelectorTerm" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeSpec) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeSwapStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeSwapStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeSystemInfo) OpenAPIModelName() string { + return "io.k8s.api.core.v1.NodeSystemInfo" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ObjectFieldSelector) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ObjectFieldSelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ObjectReference) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ObjectReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PersistentVolume) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PersistentVolume" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PersistentVolumeClaim) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PersistentVolumeClaim" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PersistentVolumeClaimCondition) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PersistentVolumeClaimCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PersistentVolumeClaimList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PersistentVolumeClaimList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PersistentVolumeClaimSpec) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PersistentVolumeClaimSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PersistentVolumeClaimStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PersistentVolumeClaimStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PersistentVolumeClaimTemplate) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PersistentVolumeClaimTemplate" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PersistentVolumeClaimVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PersistentVolumeList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PersistentVolumeList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PersistentVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PersistentVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PersistentVolumeSpec) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PersistentVolumeSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PersistentVolumeStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PersistentVolumeStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PhotonPersistentDiskVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Pod) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Pod" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodAffinity) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodAffinity" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodAffinityTerm) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodAffinityTerm" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodAntiAffinity) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodAntiAffinity" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodAttachOptions) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodAttachOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodCertificateProjection) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodCertificateProjection" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodCondition) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodDNSConfig) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodDNSConfig" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodDNSConfigOption) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodDNSConfigOption" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodExecOptions) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodExecOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodExtendedResourceClaimStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodExtendedResourceClaimStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodIP) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodIP" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodLogOptions) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodLogOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodOS) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodOS" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodPortForwardOptions) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodPortForwardOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodProxyOptions) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodProxyOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodReadinessGate) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodReadinessGate" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodResourceClaim) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodResourceClaim" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodResourceClaimStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodResourceClaimStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodSchedulingGate) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodSchedulingGate" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodSecurityContext) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodSecurityContext" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodSignature) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodSignature" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodSpec) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodStatusResult) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodStatusResult" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodTemplate) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodTemplate" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodTemplateList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodTemplateList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodTemplateSpec) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PodTemplateSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PortStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PortStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PortworxVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PortworxVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Preconditions) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Preconditions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PreferAvoidPodsEntry) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PreferAvoidPodsEntry" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PreferredSchedulingTerm) OpenAPIModelName() string { + return "io.k8s.api.core.v1.PreferredSchedulingTerm" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Probe) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Probe" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ProbeHandler) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ProbeHandler" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ProjectedVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ProjectedVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in QuobyteVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.QuobyteVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RBDPersistentVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.RBDPersistentVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RBDVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.RBDVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RangeAllocation) OpenAPIModelName() string { + return "io.k8s.api.core.v1.RangeAllocation" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicationController) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ReplicationController" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicationControllerCondition) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ReplicationControllerCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicationControllerList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ReplicationControllerList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicationControllerSpec) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ReplicationControllerSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicationControllerStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ReplicationControllerStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaim) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ResourceClaim" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceFieldSelector) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ResourceFieldSelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceHealth) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ResourceHealth" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceQuota) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ResourceQuota" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceQuotaList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ResourceQuotaList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceQuotaSpec) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ResourceQuotaSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceQuotaStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ResourceQuotaStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceRequirements) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ResourceRequirements" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ResourceStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SELinuxOptions) OpenAPIModelName() string { + return "io.k8s.api.core.v1.SELinuxOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ScaleIOPersistentVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ScaleIOPersistentVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ScaleIOVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ScaleIOVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ScopeSelector) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ScopeSelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ScopedResourceSelectorRequirement) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ScopedResourceSelectorRequirement" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SeccompProfile) OpenAPIModelName() string { + return "io.k8s.api.core.v1.SeccompProfile" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Secret) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Secret" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SecretEnvSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.SecretEnvSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SecretKeySelector) OpenAPIModelName() string { + return "io.k8s.api.core.v1.SecretKeySelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SecretList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.SecretList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SecretProjection) OpenAPIModelName() string { + return "io.k8s.api.core.v1.SecretProjection" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SecretReference) OpenAPIModelName() string { + return "io.k8s.api.core.v1.SecretReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SecretVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.SecretVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SecurityContext) OpenAPIModelName() string { + return "io.k8s.api.core.v1.SecurityContext" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SerializedReference) OpenAPIModelName() string { + return "io.k8s.api.core.v1.SerializedReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Service) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Service" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceAccount) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ServiceAccount" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceAccountList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ServiceAccountList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceAccountTokenProjection) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ServiceAccountTokenProjection" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceList) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ServiceList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServicePort) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ServicePort" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceProxyOptions) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ServiceProxyOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceSpec) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ServiceSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.ServiceStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SessionAffinityConfig) OpenAPIModelName() string { + return "io.k8s.api.core.v1.SessionAffinityConfig" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SleepAction) OpenAPIModelName() string { + return "io.k8s.api.core.v1.SleepAction" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StorageOSPersistentVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.StorageOSPersistentVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StorageOSVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.StorageOSVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Sysctl) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Sysctl" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TCPSocketAction) OpenAPIModelName() string { + return "io.k8s.api.core.v1.TCPSocketAction" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Taint) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Taint" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Toleration) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Toleration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TopologySelectorLabelRequirement) OpenAPIModelName() string { + return "io.k8s.api.core.v1.TopologySelectorLabelRequirement" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TopologySelectorTerm) OpenAPIModelName() string { + return "io.k8s.api.core.v1.TopologySelectorTerm" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TopologySpreadConstraint) OpenAPIModelName() string { + return "io.k8s.api.core.v1.TopologySpreadConstraint" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TypedLocalObjectReference) OpenAPIModelName() string { + return "io.k8s.api.core.v1.TypedLocalObjectReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TypedObjectReference) OpenAPIModelName() string { + return "io.k8s.api.core.v1.TypedObjectReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Volume) OpenAPIModelName() string { + return "io.k8s.api.core.v1.Volume" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeDevice) OpenAPIModelName() string { + return "io.k8s.api.core.v1.VolumeDevice" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeMount) OpenAPIModelName() string { + return "io.k8s.api.core.v1.VolumeMount" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeMountStatus) OpenAPIModelName() string { + return "io.k8s.api.core.v1.VolumeMountStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeNodeAffinity) OpenAPIModelName() string { + return "io.k8s.api.core.v1.VolumeNodeAffinity" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeProjection) OpenAPIModelName() string { + return "io.k8s.api.core.v1.VolumeProjection" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeResourceRequirements) OpenAPIModelName() string { + return "io.k8s.api.core.v1.VolumeResourceRequirements" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.VolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VsphereVirtualDiskVolumeSource) OpenAPIModelName() string { + return "io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in WeightedPodAffinityTerm) OpenAPIModelName() string { + return "io.k8s.api.core.v1.WeightedPodAffinityTerm" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in WindowsSecurityContextOptions) OpenAPIModelName() string { + return "io.k8s.api.core.v1.WindowsSecurityContextOptions" +} diff --git a/staging/src/k8s.io/api/discovery/v1/doc.go b/staging/src/k8s.io/api/discovery/v1/doc.go index 43e30b7f43213..2f4d40a4e23d0 100644 --- a/staging/src/k8s.io/api/discovery/v1/doc.go +++ b/staging/src/k8s.io/api/discovery/v1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.discovery.v1 + // +groupName=discovery.k8s.io package v1 diff --git a/staging/src/k8s.io/api/discovery/v1/generated.pb.go b/staging/src/k8s.io/api/discovery/v1/generated.pb.go index 443ff8f8f3d66..39c1db71a7a4f 100644 --- a/staging/src/k8s.io/api/discovery/v1/generated.pb.go +++ b/staging/src/k8s.io/api/discovery/v1/generated.pb.go @@ -23,329 +23,31 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" k8s_io_api_core_v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *Endpoint) Reset() { *m = Endpoint{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *EndpointConditions) Reset() { *m = EndpointConditions{} } -func (m *Endpoint) Reset() { *m = Endpoint{} } -func (*Endpoint) ProtoMessage() {} -func (*Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_2237b452324cf77e, []int{0} -} -func (m *Endpoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Endpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_Endpoint.Merge(m, src) -} -func (m *Endpoint) XXX_Size() int { - return m.Size() -} -func (m *Endpoint) XXX_DiscardUnknown() { - xxx_messageInfo_Endpoint.DiscardUnknown(m) -} - -var xxx_messageInfo_Endpoint proto.InternalMessageInfo - -func (m *EndpointConditions) Reset() { *m = EndpointConditions{} } -func (*EndpointConditions) ProtoMessage() {} -func (*EndpointConditions) Descriptor() ([]byte, []int) { - return fileDescriptor_2237b452324cf77e, []int{1} -} -func (m *EndpointConditions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointConditions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointConditions) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointConditions.Merge(m, src) -} -func (m *EndpointConditions) XXX_Size() int { - return m.Size() -} -func (m *EndpointConditions) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointConditions.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointConditions proto.InternalMessageInfo - -func (m *EndpointHints) Reset() { *m = EndpointHints{} } -func (*EndpointHints) ProtoMessage() {} -func (*EndpointHints) Descriptor() ([]byte, []int) { - return fileDescriptor_2237b452324cf77e, []int{2} -} -func (m *EndpointHints) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointHints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointHints) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointHints.Merge(m, src) -} -func (m *EndpointHints) XXX_Size() int { - return m.Size() -} -func (m *EndpointHints) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointHints.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointHints proto.InternalMessageInfo - -func (m *EndpointPort) Reset() { *m = EndpointPort{} } -func (*EndpointPort) ProtoMessage() {} -func (*EndpointPort) Descriptor() ([]byte, []int) { - return fileDescriptor_2237b452324cf77e, []int{3} -} -func (m *EndpointPort) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointPort) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointPort.Merge(m, src) -} -func (m *EndpointPort) XXX_Size() int { - return m.Size() -} -func (m *EndpointPort) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointPort.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointPort proto.InternalMessageInfo - -func (m *EndpointSlice) Reset() { *m = EndpointSlice{} } -func (*EndpointSlice) ProtoMessage() {} -func (*EndpointSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_2237b452324cf77e, []int{4} -} -func (m *EndpointSlice) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointSlice) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointSlice.Merge(m, src) -} -func (m *EndpointSlice) XXX_Size() int { - return m.Size() -} -func (m *EndpointSlice) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointSlice.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointSlice proto.InternalMessageInfo - -func (m *EndpointSliceList) Reset() { *m = EndpointSliceList{} } -func (*EndpointSliceList) ProtoMessage() {} -func (*EndpointSliceList) Descriptor() ([]byte, []int) { - return fileDescriptor_2237b452324cf77e, []int{5} -} -func (m *EndpointSliceList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointSliceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointSliceList.Merge(m, src) -} -func (m *EndpointSliceList) XXX_Size() int { - return m.Size() -} -func (m *EndpointSliceList) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointSliceList.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointSliceList proto.InternalMessageInfo - -func (m *ForNode) Reset() { *m = ForNode{} } -func (*ForNode) ProtoMessage() {} -func (*ForNode) Descriptor() ([]byte, []int) { - return fileDescriptor_2237b452324cf77e, []int{6} -} -func (m *ForNode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ForNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ForNode) XXX_Merge(src proto.Message) { - xxx_messageInfo_ForNode.Merge(m, src) -} -func (m *ForNode) XXX_Size() int { - return m.Size() -} -func (m *ForNode) XXX_DiscardUnknown() { - xxx_messageInfo_ForNode.DiscardUnknown(m) -} +func (m *EndpointHints) Reset() { *m = EndpointHints{} } -var xxx_messageInfo_ForNode proto.InternalMessageInfo - -func (m *ForZone) Reset() { *m = ForZone{} } -func (*ForZone) ProtoMessage() {} -func (*ForZone) Descriptor() ([]byte, []int) { - return fileDescriptor_2237b452324cf77e, []int{7} -} -func (m *ForZone) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ForZone) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ForZone) XXX_Merge(src proto.Message) { - xxx_messageInfo_ForZone.Merge(m, src) -} -func (m *ForZone) XXX_Size() int { - return m.Size() -} -func (m *ForZone) XXX_DiscardUnknown() { - xxx_messageInfo_ForZone.DiscardUnknown(m) -} +func (m *EndpointPort) Reset() { *m = EndpointPort{} } -var xxx_messageInfo_ForZone proto.InternalMessageInfo +func (m *EndpointSlice) Reset() { *m = EndpointSlice{} } -func init() { - proto.RegisterType((*Endpoint)(nil), "k8s.io.api.discovery.v1.Endpoint") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.discovery.v1.Endpoint.DeprecatedTopologyEntry") - proto.RegisterType((*EndpointConditions)(nil), "k8s.io.api.discovery.v1.EndpointConditions") - proto.RegisterType((*EndpointHints)(nil), "k8s.io.api.discovery.v1.EndpointHints") - proto.RegisterType((*EndpointPort)(nil), "k8s.io.api.discovery.v1.EndpointPort") - proto.RegisterType((*EndpointSlice)(nil), "k8s.io.api.discovery.v1.EndpointSlice") - proto.RegisterType((*EndpointSliceList)(nil), "k8s.io.api.discovery.v1.EndpointSliceList") - proto.RegisterType((*ForNode)(nil), "k8s.io.api.discovery.v1.ForNode") - proto.RegisterType((*ForZone)(nil), "k8s.io.api.discovery.v1.ForZone") -} +func (m *EndpointSliceList) Reset() { *m = EndpointSliceList{} } -func init() { - proto.RegisterFile("k8s.io/api/discovery/v1/generated.proto", fileDescriptor_2237b452324cf77e) -} +func (m *ForNode) Reset() { *m = ForNode{} } -var fileDescriptor_2237b452324cf77e = []byte{ - // 902 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0x8e, 0x9b, 0x9a, 0xda, 0xe3, 0x56, 0xec, 0x8e, 0x90, 0x6a, 0x05, 0x64, 0x07, 0xa3, 0x85, - 0x48, 0x15, 0x0e, 0xad, 0x10, 0x5a, 0x90, 0x38, 0xd4, 0x6c, 0xd9, 0xe5, 0x57, 0xa9, 0x66, 0x7b, - 0x5a, 0x21, 0x81, 0x6b, 0xbf, 0x3a, 0xa6, 0x8d, 0xc7, 0xf2, 0x4c, 0x22, 0x85, 0x13, 0x17, 0xce, - 0xf0, 0x9f, 0xf0, 0x1f, 0x70, 0x44, 0x3d, 0xee, 0x8d, 0x3d, 0x59, 0xd4, 0xfc, 0x0b, 0x9c, 0xf6, - 0x84, 0x66, 0xfc, 0x33, 0xa4, 0x51, 0xf6, 0xe6, 0xf9, 0xe6, 0x7b, 0xdf, 0x7b, 0xf3, 0xcd, 0x7b, - 0x23, 0xa3, 0xf7, 0xae, 0x1e, 0x32, 0x37, 0xa6, 0x63, 0x3f, 0x8d, 0xc7, 0x61, 0xcc, 0x02, 0x3a, - 0x87, 0x6c, 0x31, 0x9e, 0x1f, 0x8e, 0x23, 0x48, 0x20, 0xf3, 0x39, 0x84, 0x6e, 0x9a, 0x51, 0x4e, - 0xf1, 0x7e, 0x49, 0x74, 0xfd, 0x34, 0x76, 0x1b, 0xa2, 0x3b, 0x3f, 0x1c, 0xbc, 0x1f, 0xc5, 0x7c, - 0x32, 0xbb, 0x70, 0x03, 0x3a, 0x1d, 0x47, 0x34, 0xa2, 0x63, 0xc9, 0xbf, 0x98, 0x5d, 0xca, 0x95, - 0x5c, 0xc8, 0xaf, 0x52, 0x67, 0xe0, 0x74, 0x12, 0x06, 0x34, 0x83, 0x3b, 0x72, 0x0d, 0x3e, 0x6c, - 0x39, 0x53, 0x3f, 0x98, 0xc4, 0x89, 0xa8, 0x29, 0xbd, 0x8a, 0x04, 0xc0, 0xc6, 0x53, 0xe0, 0xfe, - 0x5d, 0x51, 0xe3, 0x75, 0x51, 0xd9, 0x2c, 0xe1, 0xf1, 0x14, 0x56, 0x02, 0x3e, 0xda, 0x14, 0xc0, - 0x82, 0x09, 0x4c, 0xfd, 0xff, 0xc7, 0x39, 0xff, 0x6e, 0x23, 0xed, 0x24, 0x09, 0x53, 0x1a, 0x27, - 0x1c, 0x1f, 0x20, 0xdd, 0x0f, 0xc3, 0x0c, 0x18, 0x03, 0x66, 0x2a, 0xc3, 0xfe, 0x48, 0xf7, 0xf6, - 0x8a, 0xdc, 0xd6, 0x8f, 0x6b, 0x90, 0xb4, 0xfb, 0xf8, 0x7b, 0x84, 0x02, 0x9a, 0x84, 0x31, 0x8f, - 0x69, 0xc2, 0xcc, 0xad, 0xa1, 0x32, 0x32, 0x8e, 0x0e, 0xdc, 0x35, 0xce, 0xba, 0x75, 0x8e, 0xcf, - 0x9a, 0x10, 0x0f, 0xdf, 0xe4, 0x76, 0xaf, 0xc8, 0x6d, 0xd4, 0x62, 0xa4, 0x23, 0x89, 0x47, 0x48, - 0x9b, 0x50, 0xc6, 0x13, 0x7f, 0x0a, 0x66, 0x7f, 0xa8, 0x8c, 0x74, 0x6f, 0xb7, 0xc8, 0x6d, 0xed, - 0x49, 0x85, 0x91, 0x66, 0x17, 0x9f, 0x21, 0x9d, 0xfb, 0x59, 0x04, 0x9c, 0xc0, 0xa5, 0xb9, 0x2d, - 0x2b, 0x79, 0xa7, 0x5b, 0x89, 0xb8, 0x1b, 0x51, 0xc4, 0xb7, 0x17, 0x3f, 0x42, 0x20, 0x48, 0x90, - 0x41, 0x12, 0x40, 0x79, 0xb8, 0xf3, 0x3a, 0x92, 0xb4, 0x22, 0xf8, 0x17, 0x05, 0xe1, 0x10, 0xd2, - 0x0c, 0x02, 0xe1, 0xd5, 0x39, 0x4d, 0xe9, 0x35, 0x8d, 0x16, 0xa6, 0x3a, 0xec, 0x8f, 0x8c, 0xa3, - 0x8f, 0x37, 0x9e, 0xd2, 0x7d, 0xb4, 0x12, 0x7b, 0x92, 0xf0, 0x6c, 0xe1, 0x0d, 0xaa, 0x33, 0xe3, - 0x55, 0x02, 0xb9, 0x23, 0xa1, 0xf0, 0x20, 0xa1, 0x21, 0x9c, 0x0a, 0x0f, 0x5e, 0x6b, 0x3d, 0x38, - 0xad, 0x30, 0xd2, 0xec, 0xe2, 0xb7, 0xd0, 0xf6, 0x4f, 0x34, 0x01, 0x73, 0x47, 0xb2, 0xb4, 0x22, - 0xb7, 0xb7, 0x9f, 0xd1, 0x04, 0x88, 0x44, 0xf1, 0x63, 0xa4, 0x4e, 0xe2, 0x84, 0x33, 0x53, 0x93, - 0xee, 0xbc, 0xbb, 0xf1, 0x04, 0x4f, 0x04, 0xdb, 0xd3, 0x8b, 0xdc, 0x56, 0xe5, 0x27, 0x29, 0xe3, - 0x07, 0x27, 0x68, 0x7f, 0xcd, 0xd9, 0xf0, 0x3d, 0xd4, 0xbf, 0x82, 0x85, 0xa9, 0x88, 0x02, 0x88, - 0xf8, 0xc4, 0x6f, 0x20, 0x75, 0xee, 0x5f, 0xcf, 0x40, 0x76, 0x87, 0x4e, 0xca, 0xc5, 0x27, 0x5b, - 0x0f, 0x15, 0xe7, 0x57, 0x05, 0xe1, 0xd5, 0x96, 0xc0, 0x36, 0x52, 0x33, 0xf0, 0xc3, 0x52, 0x44, - 0x2b, 0xd3, 0x13, 0x01, 0x90, 0x12, 0xc7, 0x0f, 0xd0, 0x0e, 0x83, 0x6c, 0x1e, 0x27, 0x91, 0xd4, - 0xd4, 0x3c, 0xa3, 0xc8, 0xed, 0x9d, 0xa7, 0x25, 0x44, 0xea, 0x3d, 0x7c, 0x88, 0x0c, 0x0e, 0xd9, - 0x34, 0x4e, 0x7c, 0x2e, 0xa8, 0x7d, 0x49, 0x7d, 0xbd, 0xc8, 0x6d, 0xe3, 0xbc, 0x85, 0x49, 0x97, - 0xe3, 0xfc, 0xae, 0xa0, 0xbd, 0xa5, 0xc3, 0xe3, 0x53, 0xa4, 0x5d, 0xd2, 0x4c, 0x98, 0x58, 0x0e, - 0x83, 0x71, 0x34, 0x5c, 0x6b, 0xdb, 0xe7, 0x25, 0xd1, 0xbb, 0x57, 0xdd, 0xaf, 0x56, 0x01, 0x8c, - 0x34, 0x1a, 0x95, 0x9e, 0xb8, 0x3a, 0x31, 0x2e, 0x1b, 0xf5, 0x04, 0x71, 0x49, 0x4f, 0x46, 0x92, - 0x46, 0xc3, 0xf9, 0x53, 0x41, 0xbb, 0x75, 0xc5, 0x67, 0x34, 0xe3, 0xa2, 0x05, 0xe4, 0xb0, 0x28, - 0x6d, 0x0b, 0xc8, 0x26, 0x91, 0x28, 0x7e, 0x8c, 0x34, 0x39, 0xf2, 0x01, 0xbd, 0x2e, 0xef, 0xc3, - 0x3b, 0x10, 0xc2, 0x67, 0x15, 0xf6, 0x32, 0xb7, 0xdf, 0x5c, 0x7d, 0xce, 0xdc, 0x7a, 0x9b, 0x34, - 0xc1, 0x22, 0x4d, 0x4a, 0x33, 0x2e, 0x5d, 0x55, 0xcb, 0x34, 0x22, 0x3d, 0x91, 0xa8, 0xb0, 0xde, - 0x4f, 0xd3, 0x3a, 0x4c, 0x4e, 0xa3, 0x5e, 0x5a, 0x7f, 0xdc, 0xc2, 0xa4, 0xcb, 0x71, 0xfe, 0xda, - 0x6a, 0xad, 0x7f, 0x7a, 0x1d, 0x07, 0x80, 0x7f, 0x40, 0x9a, 0x78, 0x19, 0x43, 0x9f, 0xfb, 0xf2, - 0x34, 0xc6, 0xd1, 0x07, 0x1d, 0xab, 0x9a, 0x07, 0xce, 0x4d, 0xaf, 0x22, 0x01, 0x30, 0x57, 0xb0, - 0xdb, 0x09, 0xff, 0x06, 0xb8, 0xdf, 0x3e, 0x2f, 0x2d, 0x46, 0x1a, 0x55, 0xfc, 0x08, 0x19, 0xd5, - 0x53, 0x76, 0xbe, 0x48, 0xa1, 0x2a, 0xd3, 0xa9, 0x42, 0x8c, 0xe3, 0x76, 0xeb, 0xe5, 0xf2, 0x92, - 0x74, 0xc3, 0x30, 0x41, 0x3a, 0x54, 0x85, 0xd7, 0x77, 0xfa, 0xf6, 0xc6, 0xd1, 0xf2, 0xee, 0x57, - 0x69, 0xf4, 0x1a, 0x61, 0xa4, 0x95, 0xc1, 0x5f, 0x22, 0x55, 0x18, 0xc9, 0xcc, 0xbe, 0xd4, 0x7b, - 0xb0, 0x51, 0x4f, 0x98, 0xef, 0xed, 0x55, 0x9a, 0xaa, 0x58, 0x31, 0x52, 0x4a, 0x38, 0x7f, 0x28, - 0xe8, 0xfe, 0x92, 0xb3, 0x5f, 0xc7, 0x8c, 0xe3, 0xef, 0x56, 0xdc, 0x75, 0x5f, 0xcd, 0x5d, 0x11, - 0x2d, 0xbd, 0x6d, 0xda, 0xb2, 0x46, 0x3a, 0xce, 0x7e, 0x85, 0xd4, 0x98, 0xc3, 0xb4, 0xf6, 0x63, - 0xf3, 0x53, 0x23, 0x0b, 0x6b, 0x0f, 0xf0, 0x85, 0x08, 0x26, 0xa5, 0x86, 0x73, 0x80, 0x76, 0xaa, - 0xce, 0xc7, 0xc3, 0xa5, 0xee, 0xde, 0xad, 0xe8, 0x9d, 0x0e, 0xaf, 0xc8, 0x62, 0xd8, 0x36, 0x93, - 0xbd, 0x4f, 0x6f, 0x6e, 0xad, 0xde, 0xf3, 0x5b, 0xab, 0xf7, 0xe2, 0xd6, 0xea, 0xfd, 0x5c, 0x58, - 0xca, 0x4d, 0x61, 0x29, 0xcf, 0x0b, 0x4b, 0x79, 0x51, 0x58, 0xca, 0xdf, 0x85, 0xa5, 0xfc, 0xf6, - 0x8f, 0xd5, 0x7b, 0xb6, 0xbf, 0xe6, 0x97, 0xe2, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf4, 0xfc, - 0xbe, 0xad, 0x6c, 0x08, 0x00, 0x00, -} +func (m *ForZone) Reset() { *m = ForZone{} } func (m *Endpoint) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -398,7 +100,7 @@ func (m *Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.DeprecatedTopology { keysForDeprecatedTopology = append(keysForDeprecatedTopology, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDeprecatedTopology) + sort.Strings(keysForDeprecatedTopology) for iNdEx := len(keysForDeprecatedTopology) - 1; iNdEx >= 0; iNdEx-- { v := m.DeprecatedTopology[string(keysForDeprecatedTopology[iNdEx])] baseI := i @@ -977,7 +679,7 @@ func (this *Endpoint) String() string { for k := range this.DeprecatedTopology { keysForDeprecatedTopology = append(keysForDeprecatedTopology, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDeprecatedTopology) + sort.Strings(keysForDeprecatedTopology) mapStringForDeprecatedTopology := "map[string]string{" for _, k := range keysForDeprecatedTopology { mapStringForDeprecatedTopology += fmt.Sprintf("%v: %v,", k, this.DeprecatedTopology[k]) diff --git a/staging/src/k8s.io/api/discovery/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/discovery/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..9e246b87b8bf3 --- /dev/null +++ b/staging/src/k8s.io/api/discovery/v1/generated.protomessage.pb.go @@ -0,0 +1,38 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*Endpoint) ProtoMessage() {} + +func (*EndpointConditions) ProtoMessage() {} + +func (*EndpointHints) ProtoMessage() {} + +func (*EndpointPort) ProtoMessage() {} + +func (*EndpointSlice) ProtoMessage() {} + +func (*EndpointSliceList) ProtoMessage() {} + +func (*ForNode) ProtoMessage() {} + +func (*ForZone) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/discovery/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/discovery/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..2053c56117419 --- /dev/null +++ b/staging/src/k8s.io/api/discovery/v1/zz_generated.model_name.go @@ -0,0 +1,62 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Endpoint) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1.Endpoint" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EndpointConditions) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1.EndpointConditions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EndpointHints) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1.EndpointHints" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EndpointPort) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1.EndpointPort" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EndpointSlice) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1.EndpointSlice" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EndpointSliceList) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1.EndpointSliceList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ForNode) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1.ForNode" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ForZone) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1.ForZone" +} diff --git a/staging/src/k8s.io/api/discovery/v1beta1/doc.go b/staging/src/k8s.io/api/discovery/v1beta1/doc.go index f12087eff1bca..aa5ba7442878f 100644 --- a/staging/src/k8s.io/api/discovery/v1beta1/doc.go +++ b/staging/src/k8s.io/api/discovery/v1beta1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.discovery.v1beta1 + // +groupName=discovery.k8s.io package v1beta1 diff --git a/staging/src/k8s.io/api/discovery/v1beta1/generated.pb.go b/staging/src/k8s.io/api/discovery/v1beta1/generated.pb.go index de32577864363..7a7613d01f726 100644 --- a/staging/src/k8s.io/api/discovery/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/discovery/v1beta1/generated.pb.go @@ -23,327 +23,31 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" k8s_io_api_core_v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *Endpoint) Reset() { *m = Endpoint{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *EndpointConditions) Reset() { *m = EndpointConditions{} } -func (m *Endpoint) Reset() { *m = Endpoint{} } -func (*Endpoint) ProtoMessage() {} -func (*Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_6555bad15de200e0, []int{0} -} -func (m *Endpoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Endpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_Endpoint.Merge(m, src) -} -func (m *Endpoint) XXX_Size() int { - return m.Size() -} -func (m *Endpoint) XXX_DiscardUnknown() { - xxx_messageInfo_Endpoint.DiscardUnknown(m) -} - -var xxx_messageInfo_Endpoint proto.InternalMessageInfo - -func (m *EndpointConditions) Reset() { *m = EndpointConditions{} } -func (*EndpointConditions) ProtoMessage() {} -func (*EndpointConditions) Descriptor() ([]byte, []int) { - return fileDescriptor_6555bad15de200e0, []int{1} -} -func (m *EndpointConditions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointConditions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointConditions) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointConditions.Merge(m, src) -} -func (m *EndpointConditions) XXX_Size() int { - return m.Size() -} -func (m *EndpointConditions) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointConditions.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointConditions proto.InternalMessageInfo - -func (m *EndpointHints) Reset() { *m = EndpointHints{} } -func (*EndpointHints) ProtoMessage() {} -func (*EndpointHints) Descriptor() ([]byte, []int) { - return fileDescriptor_6555bad15de200e0, []int{2} -} -func (m *EndpointHints) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointHints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointHints) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointHints.Merge(m, src) -} -func (m *EndpointHints) XXX_Size() int { - return m.Size() -} -func (m *EndpointHints) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointHints.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointHints proto.InternalMessageInfo - -func (m *EndpointPort) Reset() { *m = EndpointPort{} } -func (*EndpointPort) ProtoMessage() {} -func (*EndpointPort) Descriptor() ([]byte, []int) { - return fileDescriptor_6555bad15de200e0, []int{3} -} -func (m *EndpointPort) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointPort) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointPort.Merge(m, src) -} -func (m *EndpointPort) XXX_Size() int { - return m.Size() -} -func (m *EndpointPort) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointPort.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointPort proto.InternalMessageInfo - -func (m *EndpointSlice) Reset() { *m = EndpointSlice{} } -func (*EndpointSlice) ProtoMessage() {} -func (*EndpointSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_6555bad15de200e0, []int{4} -} -func (m *EndpointSlice) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointSlice) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointSlice.Merge(m, src) -} -func (m *EndpointSlice) XXX_Size() int { - return m.Size() -} -func (m *EndpointSlice) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointSlice.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointSlice proto.InternalMessageInfo - -func (m *EndpointSliceList) Reset() { *m = EndpointSliceList{} } -func (*EndpointSliceList) ProtoMessage() {} -func (*EndpointSliceList) Descriptor() ([]byte, []int) { - return fileDescriptor_6555bad15de200e0, []int{5} -} -func (m *EndpointSliceList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointSliceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointSliceList.Merge(m, src) -} -func (m *EndpointSliceList) XXX_Size() int { - return m.Size() -} -func (m *EndpointSliceList) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointSliceList.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointSliceList proto.InternalMessageInfo - -func (m *ForNode) Reset() { *m = ForNode{} } -func (*ForNode) ProtoMessage() {} -func (*ForNode) Descriptor() ([]byte, []int) { - return fileDescriptor_6555bad15de200e0, []int{6} -} -func (m *ForNode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ForNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ForNode) XXX_Merge(src proto.Message) { - xxx_messageInfo_ForNode.Merge(m, src) -} -func (m *ForNode) XXX_Size() int { - return m.Size() -} -func (m *ForNode) XXX_DiscardUnknown() { - xxx_messageInfo_ForNode.DiscardUnknown(m) -} +func (m *EndpointHints) Reset() { *m = EndpointHints{} } -var xxx_messageInfo_ForNode proto.InternalMessageInfo - -func (m *ForZone) Reset() { *m = ForZone{} } -func (*ForZone) ProtoMessage() {} -func (*ForZone) Descriptor() ([]byte, []int) { - return fileDescriptor_6555bad15de200e0, []int{7} -} -func (m *ForZone) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ForZone) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ForZone) XXX_Merge(src proto.Message) { - xxx_messageInfo_ForZone.Merge(m, src) -} -func (m *ForZone) XXX_Size() int { - return m.Size() -} -func (m *ForZone) XXX_DiscardUnknown() { - xxx_messageInfo_ForZone.DiscardUnknown(m) -} +func (m *EndpointPort) Reset() { *m = EndpointPort{} } -var xxx_messageInfo_ForZone proto.InternalMessageInfo +func (m *EndpointSlice) Reset() { *m = EndpointSlice{} } -func init() { - proto.RegisterType((*Endpoint)(nil), "k8s.io.api.discovery.v1beta1.Endpoint") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.discovery.v1beta1.Endpoint.TopologyEntry") - proto.RegisterType((*EndpointConditions)(nil), "k8s.io.api.discovery.v1beta1.EndpointConditions") - proto.RegisterType((*EndpointHints)(nil), "k8s.io.api.discovery.v1beta1.EndpointHints") - proto.RegisterType((*EndpointPort)(nil), "k8s.io.api.discovery.v1beta1.EndpointPort") - proto.RegisterType((*EndpointSlice)(nil), "k8s.io.api.discovery.v1beta1.EndpointSlice") - proto.RegisterType((*EndpointSliceList)(nil), "k8s.io.api.discovery.v1beta1.EndpointSliceList") - proto.RegisterType((*ForNode)(nil), "k8s.io.api.discovery.v1beta1.ForNode") - proto.RegisterType((*ForZone)(nil), "k8s.io.api.discovery.v1beta1.ForZone") -} +func (m *EndpointSliceList) Reset() { *m = EndpointSliceList{} } -func init() { - proto.RegisterFile("k8s.io/api/discovery/v1beta1/generated.proto", fileDescriptor_6555bad15de200e0) -} +func (m *ForNode) Reset() { *m = ForNode{} } -var fileDescriptor_6555bad15de200e0 = []byte{ - // 877 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0x4f, 0x6f, 0xe4, 0x34, - 0x1c, 0x9d, 0x74, 0x1a, 0x9a, 0x78, 0x5a, 0xb1, 0x6b, 0x71, 0x18, 0x95, 0x2a, 0x19, 0x05, 0x2d, - 0x1a, 0x51, 0x48, 0x68, 0xb5, 0x42, 0x2b, 0x38, 0x35, 0xb0, 0xb0, 0x48, 0xcb, 0x6e, 0xe5, 0x56, - 0x42, 0x5a, 0x71, 0xc0, 0x93, 0xb8, 0x19, 0xd3, 0x26, 0x8e, 0x62, 0x77, 0xa4, 0xb9, 0xf1, 0x0d, - 0xe0, 0xb3, 0x70, 0xe3, 0x8c, 0x84, 0x7a, 0xdc, 0xe3, 0x9e, 0x22, 0x1a, 0xbe, 0xc5, 0x9e, 0x90, - 0x1d, 0xe7, 0xcf, 0x30, 0xd0, 0xce, 0x2d, 0x7e, 0x7e, 0xef, 0xfd, 0xfe, 0xd9, 0x56, 0xc0, 0xc7, - 0x97, 0x4f, 0xb8, 0x4f, 0x59, 0x80, 0x73, 0x1a, 0xc4, 0x94, 0x47, 0x6c, 0x41, 0x8a, 0x65, 0xb0, - 0x38, 0x9a, 0x11, 0x81, 0x8f, 0x82, 0x84, 0x64, 0xa4, 0xc0, 0x82, 0xc4, 0x7e, 0x5e, 0x30, 0xc1, - 0xe0, 0x41, 0xcd, 0xf6, 0x71, 0x4e, 0xfd, 0x96, 0xed, 0x6b, 0xf6, 0xfe, 0x27, 0x09, 0x15, 0xf3, - 0xeb, 0x99, 0x1f, 0xb1, 0x34, 0x48, 0x58, 0xc2, 0x02, 0x25, 0x9a, 0x5d, 0x5f, 0xa8, 0x95, 0x5a, - 0xa8, 0xaf, 0xda, 0x6c, 0xdf, 0xeb, 0x85, 0x8e, 0x58, 0x41, 0x82, 0xc5, 0x5a, 0xc0, 0xfd, 0xc7, - 0x1d, 0x27, 0xc5, 0xd1, 0x9c, 0x66, 0x32, 0xbb, 0xfc, 0x32, 0x91, 0x00, 0x0f, 0x52, 0x22, 0xf0, - 0x7f, 0xa9, 0x82, 0xff, 0x53, 0x15, 0xd7, 0x99, 0xa0, 0x29, 0x59, 0x13, 0x7c, 0x76, 0x9f, 0x80, - 0x47, 0x73, 0x92, 0xe2, 0x7f, 0xeb, 0xbc, 0xdf, 0xb6, 0x81, 0xf5, 0x34, 0x8b, 0x73, 0x46, 0x33, - 0x01, 0x0f, 0x81, 0x8d, 0xe3, 0xb8, 0x20, 0x9c, 0x13, 0x3e, 0x36, 0x26, 0xc3, 0xa9, 0x1d, 0xee, - 0x55, 0xa5, 0x6b, 0x9f, 0x34, 0x20, 0xea, 0xf6, 0x61, 0x0c, 0x40, 0xc4, 0xb2, 0x98, 0x0a, 0xca, - 0x32, 0x3e, 0xde, 0x9a, 0x18, 0xd3, 0xd1, 0xf1, 0xa7, 0xfe, 0x5d, 0xed, 0xf5, 0x9b, 0x40, 0x5f, - 0xb6, 0xba, 0x10, 0xde, 0x94, 0xee, 0xa0, 0x2a, 0x5d, 0xd0, 0x61, 0xa8, 0xe7, 0x0b, 0xa7, 0xc0, - 0x9a, 0x33, 0x2e, 0x32, 0x9c, 0x92, 0xf1, 0x70, 0x62, 0x4c, 0xed, 0x70, 0xb7, 0x2a, 0x5d, 0xeb, - 0x99, 0xc6, 0x50, 0xbb, 0x0b, 0x4f, 0x81, 0x2d, 0x70, 0x91, 0x10, 0x81, 0xc8, 0xc5, 0x78, 0x5b, - 0xa5, 0xf3, 0x41, 0x3f, 0x1d, 0x39, 0x20, 0x7f, 0x71, 0xe4, 0xbf, 0x9c, 0xfd, 0x44, 0x22, 0x49, - 0x22, 0x05, 0xc9, 0x22, 0x52, 0x57, 0x78, 0xde, 0x28, 0x51, 0x67, 0x02, 0x67, 0xc0, 0x12, 0x2c, - 0x67, 0x57, 0x2c, 0x59, 0x8e, 0xcd, 0xc9, 0x70, 0x3a, 0x3a, 0x7e, 0xbc, 0x59, 0x7d, 0xfe, 0xb9, - 0x96, 0x3d, 0xcd, 0x44, 0xb1, 0x0c, 0x1f, 0xe8, 0x1a, 0xad, 0x06, 0x46, 0xad, 0xaf, 0xac, 0x2f, - 0x63, 0x31, 0x79, 0x21, 0xeb, 0x7b, 0xa7, 0xab, 0xef, 0x85, 0xc6, 0x50, 0xbb, 0x0b, 0x9f, 0x03, - 0x73, 0x4e, 0x33, 0xc1, 0xc7, 0x3b, 0xaa, 0xb6, 0xc3, 0xcd, 0x52, 0x79, 0x26, 0x25, 0xa1, 0x5d, - 0x95, 0xae, 0xa9, 0x3e, 0x51, 0x6d, 0xb2, 0xff, 0x05, 0xd8, 0x5b, 0x49, 0x12, 0x3e, 0x00, 0xc3, - 0x4b, 0xb2, 0x1c, 0x1b, 0x32, 0x07, 0x24, 0x3f, 0xe1, 0x7b, 0xc0, 0x5c, 0xe0, 0xab, 0x6b, 0xa2, - 0x66, 0x6b, 0xa3, 0x7a, 0xf1, 0xf9, 0xd6, 0x13, 0xc3, 0xfb, 0xc5, 0x00, 0x70, 0x7d, 0x96, 0xd0, - 0x05, 0x66, 0x41, 0x70, 0x5c, 0x9b, 0x58, 0x75, 0x50, 0x24, 0x01, 0x54, 0xe3, 0xf0, 0x11, 0xd8, - 0xe1, 0xa4, 0x58, 0xd0, 0x2c, 0x51, 0x9e, 0x56, 0x38, 0xaa, 0x4a, 0x77, 0xe7, 0xac, 0x86, 0x50, - 0xb3, 0x07, 0x8f, 0xc0, 0x48, 0x90, 0x22, 0xa5, 0x19, 0x16, 0x92, 0x3a, 0x54, 0xd4, 0x77, 0xab, - 0xd2, 0x1d, 0x9d, 0x77, 0x30, 0xea, 0x73, 0xbc, 0xdf, 0x0d, 0xb0, 0xb7, 0x52, 0x32, 0x3c, 0x03, - 0xd6, 0x05, 0x2b, 0x5e, 0xb1, 0x4c, 0x1f, 0xe5, 0xd1, 0xf1, 0xa3, 0xbb, 0x3b, 0xf6, 0x75, 0xcd, - 0xee, 0xa6, 0xa5, 0x01, 0x8e, 0x5a, 0x23, 0x6d, 0x2a, 0x87, 0x23, 0x4f, 0xfc, 0x66, 0xa6, 0x92, - 0xbd, 0x62, 0xaa, 0xe4, 0xa8, 0x35, 0xf2, 0xfe, 0x34, 0xc0, 0x6e, 0x93, 0xfb, 0x29, 0x2b, 0x04, - 0x3c, 0x00, 0xdb, 0xea, 0xbc, 0xab, 0x59, 0x84, 0x56, 0x55, 0xba, 0xdb, 0xea, 0x2c, 0x28, 0x14, - 0x7e, 0x03, 0x2c, 0x75, 0x75, 0x23, 0x76, 0x55, 0x4f, 0x26, 0x3c, 0x94, 0xc6, 0xa7, 0x1a, 0x7b, - 0x5b, 0xba, 0xef, 0xaf, 0x3f, 0x4b, 0x7e, 0xb3, 0x8d, 0x5a, 0xb1, 0x0c, 0x93, 0xb3, 0x42, 0xa8, - 0xfe, 0x9a, 0x75, 0x18, 0x19, 0x1e, 0x29, 0x54, 0x0e, 0x01, 0xe7, 0x79, 0x23, 0x53, 0x17, 0xca, - 0xae, 0x87, 0x70, 0xd2, 0xc1, 0xa8, 0xcf, 0xf1, 0x6e, 0xb7, 0xba, 0x21, 0x9c, 0x5d, 0xd1, 0x88, - 0xc0, 0x1f, 0x81, 0x25, 0x5f, 0xb8, 0x18, 0x0b, 0xac, 0xaa, 0x59, 0x7d, 0x21, 0xda, 0x87, 0xca, - 0xcf, 0x2f, 0x13, 0x09, 0x70, 0x5f, 0xb2, 0xbb, 0x4b, 0xfa, 0x1d, 0x11, 0xb8, 0x7b, 0x21, 0x3a, - 0x0c, 0xb5, 0xae, 0xf0, 0x2b, 0x30, 0xd2, 0x4f, 0xd2, 0xf9, 0x32, 0x27, 0x3a, 0x4d, 0x4f, 0x4b, - 0x46, 0x27, 0xdd, 0xd6, 0xdb, 0xd5, 0x25, 0xea, 0xcb, 0xe0, 0xf7, 0xc0, 0x26, 0x3a, 0xf1, 0x66, - 0xb0, 0x1f, 0x6e, 0x76, 0xbf, 0xc2, 0x87, 0x3a, 0x96, 0xdd, 0x20, 0x1c, 0x75, 0x5e, 0xf0, 0x25, - 0x30, 0x65, 0x37, 0xf9, 0x78, 0xa8, 0x4c, 0x3f, 0xda, 0xcc, 0x54, 0x8e, 0x21, 0xdc, 0xd3, 0xc6, - 0xa6, 0x5c, 0x71, 0x54, 0xfb, 0x78, 0x7f, 0x18, 0xe0, 0xe1, 0x4a, 0x8f, 0x9f, 0x53, 0x2e, 0xe0, - 0x0f, 0x6b, 0x7d, 0xf6, 0x37, 0xeb, 0xb3, 0x54, 0xab, 0x2e, 0xb7, 0x07, 0xb4, 0x41, 0x7a, 0x3d, - 0x3e, 0x05, 0x26, 0x15, 0x24, 0x6d, 0x3a, 0xb3, 0xe1, 0xcb, 0xa3, 0xb2, 0xeb, 0xaa, 0xf8, 0x56, - 0x3a, 0xa0, 0xda, 0xc8, 0x3b, 0x04, 0x3b, 0xfa, 0x22, 0xc0, 0xc9, 0xca, 0x61, 0xdf, 0xd5, 0xf4, - 0xde, 0x81, 0xd7, 0x64, 0x79, 0x01, 0xef, 0x27, 0x87, 0xe1, 0xcd, 0xad, 0x33, 0x78, 0x7d, 0xeb, - 0x0c, 0xde, 0xdc, 0x3a, 0x83, 0x9f, 0x2b, 0xc7, 0xb8, 0xa9, 0x1c, 0xe3, 0x75, 0xe5, 0x18, 0x6f, - 0x2a, 0xc7, 0xf8, 0xab, 0x72, 0x8c, 0x5f, 0xff, 0x76, 0x06, 0xaf, 0x0e, 0xee, 0xfa, 0x67, 0xf8, - 0x27, 0x00, 0x00, 0xff, 0xff, 0x76, 0x8e, 0x48, 0x7e, 0x52, 0x08, 0x00, 0x00, -} +func (m *ForZone) Reset() { *m = ForZone{} } func (m *Endpoint) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -389,7 +93,7 @@ func (m *Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Topology { keysForTopology = append(keysForTopology, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForTopology) + sort.Strings(keysForTopology) for iNdEx := len(keysForTopology) - 1; iNdEx >= 0; iNdEx-- { v := m.Topology[string(keysForTopology[iNdEx])] baseI := i @@ -964,7 +668,7 @@ func (this *Endpoint) String() string { for k := range this.Topology { keysForTopology = append(keysForTopology, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForTopology) + sort.Strings(keysForTopology) mapStringForTopology := "map[string]string{" for _, k := range keysForTopology { mapStringForTopology += fmt.Sprintf("%v: %v,", k, this.Topology[k]) diff --git a/staging/src/k8s.io/api/discovery/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/discovery/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..6e60bb139e7f1 --- /dev/null +++ b/staging/src/k8s.io/api/discovery/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,38 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*Endpoint) ProtoMessage() {} + +func (*EndpointConditions) ProtoMessage() {} + +func (*EndpointHints) ProtoMessage() {} + +func (*EndpointPort) ProtoMessage() {} + +func (*EndpointSlice) ProtoMessage() {} + +func (*EndpointSliceList) ProtoMessage() {} + +func (*ForNode) ProtoMessage() {} + +func (*ForZone) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/discovery/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/discovery/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..531c6672da82c --- /dev/null +++ b/staging/src/k8s.io/api/discovery/v1beta1/zz_generated.model_name.go @@ -0,0 +1,62 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Endpoint) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1beta1.Endpoint" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EndpointConditions) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1beta1.EndpointConditions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EndpointHints) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1beta1.EndpointHints" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EndpointPort) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1beta1.EndpointPort" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EndpointSlice) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1beta1.EndpointSlice" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EndpointSliceList) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1beta1.EndpointSliceList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ForNode) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1beta1.ForNode" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ForZone) OpenAPIModelName() string { + return "io.k8s.api.discovery.v1beta1.ForZone" +} diff --git a/staging/src/k8s.io/api/events/v1/doc.go b/staging/src/k8s.io/api/events/v1/doc.go index 911639044f8c7..49e9733f4680e 100644 --- a/staging/src/k8s.io/api/events/v1/doc.go +++ b/staging/src/k8s.io/api/events/v1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.events.v1 + // +groupName=events.k8s.io package v1 diff --git a/staging/src/k8s.io/api/events/v1/generated.pb.go b/staging/src/k8s.io/api/events/v1/generated.pb.go index 96a6047e86022..82d88d95b1708 100644 --- a/staging/src/k8s.io/api/events/v1/generated.pb.go +++ b/staging/src/k8s.io/api/events/v1/generated.pb.go @@ -24,171 +24,18 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" v11 "k8s.io/api/core/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *Event) Reset() { *m = Event{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *EventList) Reset() { *m = EventList{} } -func (m *Event) Reset() { *m = Event{} } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_d3a3e1495c224e47, []int{0} -} -func (m *Event) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(m, src) -} -func (m *Event) XXX_Size() int { - return m.Size() -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Event proto.InternalMessageInfo - -func (m *EventList) Reset() { *m = EventList{} } -func (*EventList) ProtoMessage() {} -func (*EventList) Descriptor() ([]byte, []int) { - return fileDescriptor_d3a3e1495c224e47, []int{1} -} -func (m *EventList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EventList) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventList.Merge(m, src) -} -func (m *EventList) XXX_Size() int { - return m.Size() -} -func (m *EventList) XXX_DiscardUnknown() { - xxx_messageInfo_EventList.DiscardUnknown(m) -} - -var xxx_messageInfo_EventList proto.InternalMessageInfo - -func (m *EventSeries) Reset() { *m = EventSeries{} } -func (*EventSeries) ProtoMessage() {} -func (*EventSeries) Descriptor() ([]byte, []int) { - return fileDescriptor_d3a3e1495c224e47, []int{2} -} -func (m *EventSeries) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventSeries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EventSeries) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventSeries.Merge(m, src) -} -func (m *EventSeries) XXX_Size() int { - return m.Size() -} -func (m *EventSeries) XXX_DiscardUnknown() { - xxx_messageInfo_EventSeries.DiscardUnknown(m) -} - -var xxx_messageInfo_EventSeries proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Event)(nil), "k8s.io.api.events.v1.Event") - proto.RegisterType((*EventList)(nil), "k8s.io.api.events.v1.EventList") - proto.RegisterType((*EventSeries)(nil), "k8s.io.api.events.v1.EventSeries") -} - -func init() { - proto.RegisterFile("k8s.io/api/events/v1/generated.proto", fileDescriptor_d3a3e1495c224e47) -} - -var fileDescriptor_d3a3e1495c224e47 = []byte{ - // 759 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4f, 0x4f, 0xdb, 0x48, - 0x14, 0x8f, 0x81, 0x04, 0x32, 0xe1, 0x4f, 0x18, 0x90, 0x98, 0x05, 0xc9, 0xc9, 0x86, 0xd5, 0x2a, - 0x5a, 0x69, 0xed, 0x05, 0xad, 0x56, 0xab, 0x3d, 0x2d, 0x26, 0xec, 0x8a, 0x0a, 0x8a, 0x34, 0x70, - 0xaa, 0x7a, 0x60, 0xe2, 0x3c, 0x8c, 0x4b, 0xec, 0xb1, 0xc6, 0x93, 0x48, 0xdc, 0x7a, 0xa9, 0xd4, - 0x63, 0xbf, 0x40, 0x3f, 0x40, 0xd5, 0x2f, 0xc2, 0x91, 0x23, 0xa7, 0xa8, 0xb8, 0x5f, 0xa4, 0xf2, - 0xd8, 0x89, 0x43, 0xfe, 0xb4, 0xa9, 0x7a, 0xf3, 0xbc, 0xf7, 0xfb, 0xf3, 0xde, 0xcc, 0xcb, 0x0b, - 0xfa, 0xe5, 0xe6, 0xef, 0xd0, 0x70, 0xb9, 0xc9, 0x02, 0xd7, 0x84, 0x2e, 0xf8, 0x32, 0x34, 0xbb, - 0x7b, 0xa6, 0x03, 0x3e, 0x08, 0x26, 0xa1, 0x65, 0x04, 0x82, 0x4b, 0x8e, 0x37, 0x13, 0x94, 0xc1, - 0x02, 0xd7, 0x48, 0x50, 0x46, 0x77, 0x6f, 0xfb, 0x77, 0xc7, 0x95, 0xd7, 0x9d, 0xa6, 0x61, 0x73, - 0xcf, 0x74, 0xb8, 0xc3, 0x4d, 0x05, 0x6e, 0x76, 0xae, 0xd4, 0x49, 0x1d, 0xd4, 0x57, 0x22, 0xb2, - 0x5d, 0x1b, 0xb2, 0xb2, 0xb9, 0x80, 0x09, 0x46, 0xdb, 0x7f, 0x66, 0x18, 0x8f, 0xd9, 0xd7, 0xae, - 0x0f, 0xe2, 0xd6, 0x0c, 0x6e, 0x9c, 0x38, 0x10, 0x9a, 0x1e, 0x48, 0x36, 0x89, 0x65, 0x4e, 0x63, - 0x89, 0x8e, 0x2f, 0x5d, 0x0f, 0xc6, 0x08, 0x7f, 0x7d, 0x8b, 0x10, 0xda, 0xd7, 0xe0, 0xb1, 0x51, - 0x5e, 0xed, 0x7d, 0x11, 0xe5, 0x8f, 0xe2, 0xfe, 0xf1, 0x25, 0x5a, 0x8a, 0xab, 0x69, 0x31, 0xc9, - 0x88, 0x56, 0xd5, 0xea, 0xa5, 0xfd, 0x3f, 0x8c, 0xec, 0x92, 0x06, 0xa2, 0x46, 0x70, 0xe3, 0xc4, - 0x81, 0xd0, 0x88, 0xd1, 0x46, 0x77, 0xcf, 0x38, 0x6b, 0xbe, 0x02, 0x5b, 0x9e, 0x82, 0x64, 0x16, - 0xbe, 0xeb, 0x55, 0x72, 0x51, 0xaf, 0x82, 0xb2, 0x18, 0x1d, 0xa8, 0xe2, 0x4b, 0x54, 0x54, 0x57, - 0x7d, 0xe1, 0x7a, 0x40, 0xe6, 0x94, 0x85, 0x39, 0x9b, 0xc5, 0xa9, 0x6b, 0x0b, 0x1e, 0xd3, 0xac, - 0xf5, 0xd4, 0xa1, 0x78, 0xd4, 0x57, 0xa2, 0x99, 0x28, 0x3e, 0x42, 0x85, 0x10, 0x84, 0x0b, 0x21, - 0x99, 0x57, 0xf2, 0x3f, 0x1b, 0x93, 0x9e, 0xd9, 0x50, 0xdc, 0x73, 0x05, 0xb4, 0x50, 0xd4, 0xab, - 0x14, 0x92, 0x6f, 0x9a, 0x92, 0xf1, 0x29, 0xda, 0x10, 0x10, 0x70, 0x21, 0x5d, 0xdf, 0x39, 0xe4, - 0xbe, 0x14, 0xbc, 0xdd, 0x06, 0x41, 0x16, 0xaa, 0x5a, 0xbd, 0x68, 0xed, 0xa4, 0x15, 0x6c, 0xd0, - 0x71, 0x08, 0x9d, 0xc4, 0xc3, 0xff, 0xa3, 0xf5, 0x41, 0xf8, 0xd8, 0x0f, 0x25, 0xf3, 0x6d, 0x20, - 0x79, 0x25, 0xf6, 0x53, 0x2a, 0xb6, 0x4e, 0x47, 0x01, 0x74, 0x9c, 0x83, 0x7f, 0x45, 0x05, 0x66, - 0x4b, 0x97, 0xfb, 0xa4, 0xa0, 0xd8, 0xab, 0x29, 0xbb, 0x70, 0xa0, 0xa2, 0x34, 0xcd, 0xc6, 0x38, - 0x01, 0x2c, 0xe4, 0x3e, 0x59, 0x7c, 0x8a, 0xa3, 0x2a, 0x4a, 0xd3, 0x2c, 0xbe, 0x40, 0x45, 0x01, - 0x0e, 0x13, 0x2d, 0xd7, 0x77, 0xc8, 0x92, 0xba, 0xb1, 0xdd, 0xe1, 0x1b, 0x8b, 0x67, 0x3a, 0x7b, - 0x61, 0x0a, 0x57, 0x20, 0xc0, 0xb7, 0x87, 0x1e, 0x81, 0xf6, 0xd9, 0x34, 0x13, 0xc2, 0xcf, 0xd0, - 0xa2, 0x80, 0x76, 0x3c, 0x63, 0xa4, 0x38, 0xbb, 0x66, 0x29, 0xea, 0x55, 0x16, 0x69, 0xc2, 0xa3, - 0x7d, 0x01, 0x5c, 0x45, 0x0b, 0x3e, 0x97, 0x40, 0x90, 0xea, 0x63, 0x39, 0xf5, 0x5d, 0x78, 0xce, - 0x25, 0x50, 0x95, 0x89, 0x11, 0xf2, 0x36, 0x00, 0x52, 0x7a, 0x8a, 0xb8, 0xb8, 0x0d, 0x80, 0xaa, - 0x0c, 0x06, 0x54, 0x6e, 0x41, 0x20, 0xc0, 0x8e, 0x15, 0xcf, 0x79, 0x47, 0xd8, 0x40, 0x96, 0x55, - 0x61, 0x95, 0x49, 0x85, 0x25, 0xc3, 0xa1, 0x60, 0x16, 0x49, 0xe5, 0xca, 0x8d, 0x11, 0x01, 0x3a, - 0x26, 0x89, 0xdf, 0x6a, 0x88, 0x64, 0xc1, 0xff, 0x5c, 0x11, 0xaa, 0x99, 0x0c, 0x25, 0xf3, 0x02, - 0xb2, 0xa2, 0xfc, 0x7e, 0x9b, 0x6d, 0xda, 0xd5, 0xa0, 0x57, 0x53, 0x6b, 0xd2, 0x98, 0xa2, 0x49, - 0xa7, 0xba, 0xe1, 0x37, 0x1a, 0xda, 0xca, 0x92, 0x27, 0x6c, 0xb8, 0x92, 0xd5, 0xef, 0xae, 0xa4, - 0x92, 0x56, 0xb2, 0xd5, 0x98, 0x2c, 0x49, 0xa7, 0x79, 0xe1, 0x03, 0xb4, 0x96, 0xa5, 0x0e, 0x79, - 0xc7, 0x97, 0x64, 0xad, 0xaa, 0xd5, 0xf3, 0xd6, 0x56, 0x2a, 0xb9, 0xd6, 0x78, 0x9a, 0xa6, 0xa3, - 0xf8, 0xda, 0x47, 0x0d, 0x25, 0x3f, 0xf5, 0x13, 0x37, 0x94, 0xf8, 0xe5, 0xd8, 0x8e, 0x32, 0x66, - 0x6b, 0x24, 0x66, 0xab, 0x0d, 0x55, 0x4e, 0x9d, 0x97, 0xfa, 0x91, 0xa1, 0xfd, 0xf4, 0x2f, 0xca, - 0xbb, 0x12, 0xbc, 0x90, 0xcc, 0x55, 0xe7, 0xeb, 0xa5, 0xfd, 0x9d, 0xaf, 0x2c, 0x0f, 0x6b, 0x25, - 0xd5, 0xc9, 0x1f, 0xc7, 0x0c, 0x9a, 0x10, 0x6b, 0x1f, 0x34, 0x54, 0x1a, 0x5a, 0x2e, 0x78, 0x17, - 0xe5, 0x6d, 0xd5, 0xb6, 0xa6, 0xda, 0x1e, 0x90, 0x92, 0x66, 0x93, 0x1c, 0xee, 0xa0, 0x72, 0x9b, - 0x85, 0xf2, 0xac, 0x19, 0x82, 0xe8, 0x42, 0xeb, 0x47, 0xb6, 0xe3, 0x60, 0x5e, 0x4f, 0x46, 0x04, - 0xe9, 0x98, 0x85, 0xf5, 0xcf, 0xdd, 0xa3, 0x9e, 0xbb, 0x7f, 0xd4, 0x73, 0x0f, 0x8f, 0x7a, 0xee, - 0x75, 0xa4, 0x6b, 0x77, 0x91, 0xae, 0xdd, 0x47, 0xba, 0xf6, 0x10, 0xe9, 0xda, 0xa7, 0x48, 0xd7, - 0xde, 0x7d, 0xd6, 0x73, 0x2f, 0x36, 0x27, 0xfd, 0x9b, 0x7e, 0x09, 0x00, 0x00, 0xff, 0xff, 0x6f, - 0x4f, 0x7a, 0xe4, 0x64, 0x07, 0x00, 0x00, -} +func (m *EventSeries) Reset() { *m = EventSeries{} } func (m *Event) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/events/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/events/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..09ff231dac6d1 --- /dev/null +++ b/staging/src/k8s.io/api/events/v1/generated.protomessage.pb.go @@ -0,0 +1,28 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*Event) ProtoMessage() {} + +func (*EventList) ProtoMessage() {} + +func (*EventSeries) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/events/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/events/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..ac580c796ac0f --- /dev/null +++ b/staging/src/k8s.io/api/events/v1/zz_generated.model_name.go @@ -0,0 +1,37 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Event) OpenAPIModelName() string { + return "io.k8s.api.events.v1.Event" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EventList) OpenAPIModelName() string { + return "io.k8s.api.events.v1.EventList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EventSeries) OpenAPIModelName() string { + return "io.k8s.api.events.v1.EventSeries" +} diff --git a/staging/src/k8s.io/api/events/v1beta1/doc.go b/staging/src/k8s.io/api/events/v1beta1/doc.go index e4864294fd274..2402303855424 100644 --- a/staging/src/k8s.io/api/events/v1beta1/doc.go +++ b/staging/src/k8s.io/api/events/v1beta1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.events.v1beta1 // +groupName=events.k8s.io diff --git a/staging/src/k8s.io/api/events/v1beta1/generated.pb.go b/staging/src/k8s.io/api/events/v1beta1/generated.pb.go index 5d7881e8c090e..70eee4abf85a4 100644 --- a/staging/src/k8s.io/api/events/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/events/v1beta1/generated.pb.go @@ -24,171 +24,18 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" v11 "k8s.io/api/core/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *Event) Reset() { *m = Event{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *EventList) Reset() { *m = EventList{} } -func (m *Event) Reset() { *m = Event{} } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_99027a32dee7673b, []int{0} -} -func (m *Event) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(m, src) -} -func (m *Event) XXX_Size() int { - return m.Size() -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Event proto.InternalMessageInfo - -func (m *EventList) Reset() { *m = EventList{} } -func (*EventList) ProtoMessage() {} -func (*EventList) Descriptor() ([]byte, []int) { - return fileDescriptor_99027a32dee7673b, []int{1} -} -func (m *EventList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EventList) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventList.Merge(m, src) -} -func (m *EventList) XXX_Size() int { - return m.Size() -} -func (m *EventList) XXX_DiscardUnknown() { - xxx_messageInfo_EventList.DiscardUnknown(m) -} - -var xxx_messageInfo_EventList proto.InternalMessageInfo - -func (m *EventSeries) Reset() { *m = EventSeries{} } -func (*EventSeries) ProtoMessage() {} -func (*EventSeries) Descriptor() ([]byte, []int) { - return fileDescriptor_99027a32dee7673b, []int{2} -} -func (m *EventSeries) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventSeries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EventSeries) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventSeries.Merge(m, src) -} -func (m *EventSeries) XXX_Size() int { - return m.Size() -} -func (m *EventSeries) XXX_DiscardUnknown() { - xxx_messageInfo_EventSeries.DiscardUnknown(m) -} - -var xxx_messageInfo_EventSeries proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Event)(nil), "k8s.io.api.events.v1beta1.Event") - proto.RegisterType((*EventList)(nil), "k8s.io.api.events.v1beta1.EventList") - proto.RegisterType((*EventSeries)(nil), "k8s.io.api.events.v1beta1.EventSeries") -} - -func init() { - proto.RegisterFile("k8s.io/api/events/v1beta1/generated.proto", fileDescriptor_99027a32dee7673b) -} - -var fileDescriptor_99027a32dee7673b = []byte{ - // 764 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcf, 0x4f, 0xdb, 0x48, - 0x14, 0xc7, 0x63, 0x20, 0x81, 0x4c, 0xf8, 0x11, 0x86, 0x03, 0x03, 0x2b, 0x39, 0x51, 0x90, 0x50, - 0x76, 0xa5, 0xb5, 0x17, 0xb4, 0x5a, 0xed, 0x6d, 0x85, 0x09, 0x5b, 0x81, 0xa0, 0x48, 0x03, 0xa7, - 0xaa, 0x07, 0x26, 0xce, 0xc3, 0xb8, 0xc4, 0x1e, 0x6b, 0x3c, 0x89, 0xc4, 0xad, 0x97, 0x4a, 0x3d, - 0xf6, 0x6f, 0xe8, 0xad, 0xb7, 0xfe, 0x19, 0x1c, 0x39, 0x72, 0x8a, 0x8a, 0xfb, 0x8f, 0x54, 0x1e, - 0x3b, 0x71, 0xc8, 0x0f, 0x91, 0xaa, 0x37, 0xfb, 0xbd, 0xef, 0xf7, 0xf3, 0xde, 0x8c, 0x5f, 0x5e, - 0xd0, 0xef, 0xb7, 0xff, 0x86, 0x86, 0xcb, 0x4d, 0x16, 0xb8, 0x26, 0x74, 0xc1, 0x97, 0xa1, 0xd9, - 0xdd, 0x6b, 0x82, 0x64, 0x7b, 0xa6, 0x03, 0x3e, 0x08, 0x26, 0xa1, 0x65, 0x04, 0x82, 0x4b, 0x8e, - 0xb7, 0x12, 0xa9, 0xc1, 0x02, 0xd7, 0x48, 0xa4, 0x46, 0x2a, 0xdd, 0xfe, 0xd3, 0x71, 0xe5, 0x4d, - 0xa7, 0x69, 0xd8, 0xdc, 0x33, 0x1d, 0xee, 0x70, 0x53, 0x39, 0x9a, 0x9d, 0x6b, 0xf5, 0xa6, 0x5e, - 0xd4, 0x53, 0x42, 0xda, 0xae, 0x0d, 0x15, 0xb5, 0xb9, 0x00, 0xb3, 0x3b, 0x56, 0x6d, 0xfb, 0xef, - 0x4c, 0xe3, 0x31, 0xfb, 0xc6, 0xf5, 0x41, 0xdc, 0x99, 0xc1, 0xad, 0x13, 0x07, 0x42, 0xd3, 0x03, - 0xc9, 0x26, 0xb9, 0xcc, 0x69, 0x2e, 0xd1, 0xf1, 0xa5, 0xeb, 0xc1, 0x98, 0xe1, 0x9f, 0x97, 0x0c, - 0xa1, 0x7d, 0x03, 0x1e, 0x1b, 0xf5, 0xd5, 0x3e, 0x17, 0x51, 0xfe, 0x28, 0xbe, 0x04, 0x7c, 0x85, - 0x96, 0xe2, 0x6e, 0x5a, 0x4c, 0x32, 0xa2, 0x55, 0xb5, 0x7a, 0x69, 0xff, 0x2f, 0x23, 0xbb, 0xa9, - 0x01, 0xd4, 0x08, 0x6e, 0x9d, 0x38, 0x10, 0x1a, 0xb1, 0xda, 0xe8, 0xee, 0x19, 0xe7, 0xcd, 0x77, - 0x60, 0xcb, 0x33, 0x90, 0xcc, 0xc2, 0xf7, 0xbd, 0x4a, 0x2e, 0xea, 0x55, 0x50, 0x16, 0xa3, 0x03, - 0x2a, 0xbe, 0x42, 0x45, 0x75, 0xdf, 0x97, 0xae, 0x07, 0x64, 0x4e, 0x95, 0x30, 0x67, 0x2b, 0x71, - 0xe6, 0xda, 0x82, 0xc7, 0x36, 0x6b, 0x3d, 0xad, 0x50, 0x3c, 0xea, 0x93, 0x68, 0x06, 0xc5, 0x27, - 0xa8, 0x10, 0x82, 0x70, 0x21, 0x24, 0xf3, 0x0a, 0xbf, 0x6b, 0x4c, 0xfd, 0xd6, 0x86, 0x02, 0x5c, - 0x28, 0xb5, 0x85, 0xa2, 0x5e, 0xa5, 0x90, 0x3c, 0xd3, 0x94, 0x80, 0xcf, 0xd0, 0x86, 0x80, 0x80, - 0x0b, 0xe9, 0xfa, 0xce, 0x21, 0xf7, 0xa5, 0xe0, 0xed, 0x36, 0x08, 0xb2, 0x50, 0xd5, 0xea, 0x45, - 0xeb, 0xb7, 0xb4, 0x8d, 0x0d, 0x3a, 0x2e, 0xa1, 0x93, 0x7c, 0xf8, 0x15, 0x5a, 0x1f, 0x84, 0x8f, - 0xfd, 0x50, 0x32, 0xdf, 0x06, 0x92, 0x57, 0xb0, 0xad, 0x14, 0xb6, 0x4e, 0x47, 0x05, 0x74, 0xdc, - 0x83, 0x77, 0x51, 0x81, 0xd9, 0xd2, 0xe5, 0x3e, 0x29, 0x28, 0xf7, 0x6a, 0xea, 0x2e, 0x1c, 0xa8, - 0x28, 0x4d, 0xb3, 0xb1, 0x4e, 0x00, 0x0b, 0xb9, 0x4f, 0x16, 0x9f, 0xeb, 0xa8, 0x8a, 0xd2, 0x34, - 0x8b, 0x2f, 0x51, 0x51, 0x80, 0xc3, 0x44, 0xcb, 0xf5, 0x1d, 0xb2, 0xa4, 0xae, 0x6d, 0x67, 0xf8, - 0xda, 0xe2, 0xc1, 0xce, 0x3e, 0x33, 0x85, 0x6b, 0x10, 0xe0, 0xdb, 0x43, 0x5f, 0x82, 0xf6, 0xdd, - 0x34, 0x03, 0xe1, 0x13, 0xb4, 0x28, 0xa0, 0x1d, 0x0f, 0x1a, 0x29, 0xce, 0xce, 0x2c, 0x45, 0xbd, - 0xca, 0x22, 0x4d, 0x7c, 0xb4, 0x0f, 0xc0, 0x55, 0xb4, 0xe0, 0x73, 0x09, 0x04, 0xa9, 0x73, 0x2c, - 0xa7, 0x75, 0x17, 0x5e, 0x73, 0x09, 0x54, 0x65, 0x62, 0x85, 0xbc, 0x0b, 0x80, 0x94, 0x9e, 0x2b, - 0x2e, 0xef, 0x02, 0xa0, 0x2a, 0x83, 0x01, 0x95, 0x5b, 0x10, 0x08, 0xb0, 0x63, 0xe2, 0x05, 0xef, - 0x08, 0x1b, 0xc8, 0xb2, 0x6a, 0xac, 0x32, 0xa9, 0xb1, 0x64, 0x38, 0x94, 0xcc, 0x22, 0x29, 0xae, - 0xdc, 0x18, 0x01, 0xd0, 0x31, 0x24, 0xfe, 0xa8, 0x21, 0x92, 0x05, 0xff, 0x77, 0x45, 0xa8, 0x06, - 0x33, 0x94, 0xcc, 0x0b, 0xc8, 0x8a, 0xaa, 0xf7, 0xc7, 0x6c, 0x23, 0xaf, 0xa6, 0xbd, 0x9a, 0x96, - 0x26, 0x8d, 0x29, 0x4c, 0x3a, 0xb5, 0x1a, 0xfe, 0xa0, 0xa1, 0xcd, 0x2c, 0x79, 0xca, 0x86, 0x3b, - 0x59, 0xfd, 0xe9, 0x4e, 0x2a, 0x69, 0x27, 0x9b, 0x8d, 0xc9, 0x48, 0x3a, 0xad, 0x16, 0x3e, 0x40, - 0x6b, 0x59, 0xea, 0x90, 0x77, 0x7c, 0x49, 0xd6, 0xaa, 0x5a, 0x3d, 0x6f, 0x6d, 0xa6, 0xc8, 0xb5, - 0xc6, 0xf3, 0x34, 0x1d, 0xd5, 0xd7, 0xbe, 0x6a, 0x28, 0xf9, 0xbd, 0x9f, 0xba, 0xa1, 0xc4, 0x6f, - 0xc7, 0x16, 0x95, 0x31, 0xdb, 0x41, 0x62, 0xb7, 0x5a, 0x53, 0xe5, 0xb4, 0xf2, 0x52, 0x3f, 0x32, - 0xb4, 0xa4, 0x8e, 0x50, 0xde, 0x95, 0xe0, 0x85, 0x64, 0xae, 0x3a, 0x5f, 0x2f, 0xed, 0x57, 0x5f, - 0xda, 0x20, 0xd6, 0x4a, 0x0a, 0xcb, 0x1f, 0xc7, 0x36, 0x9a, 0xb8, 0x6b, 0x5f, 0x34, 0x54, 0x1a, - 0xda, 0x30, 0x78, 0x07, 0xe5, 0x6d, 0x75, 0x76, 0x4d, 0x9d, 0x7d, 0x60, 0x4a, 0x4e, 0x9c, 0xe4, - 0x70, 0x07, 0x95, 0xdb, 0x2c, 0x94, 0xe7, 0xcd, 0x10, 0x44, 0x17, 0x5a, 0xbf, 0xb2, 0x27, 0x07, - 0x43, 0x7b, 0x3a, 0x02, 0xa4, 0x63, 0x25, 0xac, 0xff, 0xee, 0x9f, 0xf4, 0xdc, 0xc3, 0x93, 0x9e, - 0x7b, 0x7c, 0xd2, 0x73, 0xef, 0x23, 0x5d, 0xbb, 0x8f, 0x74, 0xed, 0x21, 0xd2, 0xb5, 0xc7, 0x48, - 0xd7, 0xbe, 0x45, 0xba, 0xf6, 0xe9, 0xbb, 0x9e, 0x7b, 0xb3, 0x35, 0xf5, 0x1f, 0xf6, 0x47, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x2b, 0xc1, 0x64, 0x36, 0x7d, 0x07, 0x00, 0x00, -} +func (m *EventSeries) Reset() { *m = EventSeries{} } func (m *Event) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/events/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/events/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..a70924a20dcd1 --- /dev/null +++ b/staging/src/k8s.io/api/events/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,28 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*Event) ProtoMessage() {} + +func (*EventList) ProtoMessage() {} + +func (*EventSeries) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/events/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/events/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..189a20ad740d4 --- /dev/null +++ b/staging/src/k8s.io/api/events/v1beta1/zz_generated.model_name.go @@ -0,0 +1,37 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Event) OpenAPIModelName() string { + return "io.k8s.api.events.v1beta1.Event" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EventList) OpenAPIModelName() string { + return "io.k8s.api.events.v1beta1.EventList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EventSeries) OpenAPIModelName() string { + return "io.k8s.api.events.v1beta1.EventSeries" +} diff --git a/staging/src/k8s.io/api/extensions/v1beta1/doc.go b/staging/src/k8s.io/api/extensions/v1beta1/doc.go index be710973cb932..bf39ca3e1e70d 100644 --- a/staging/src/k8s.io/api/extensions/v1beta1/doc.go +++ b/staging/src/k8s.io/api/extensions/v1beta1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.extensions.v1beta1 // +k8s:validation-gen=TypeMeta // +k8s:validation-gen-input=k8s.io/api/extensions/v1beta1 diff --git a/staging/src/k8s.io/api/extensions/v1beta1/generated.pb.go b/staging/src/k8s.io/api/extensions/v1beta1/generated.pb.go index 35b9a4ff2aa78..ca9477394f4f1 100644 --- a/staging/src/k8s.io/api/extensions/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/extensions/v1beta1/generated.pb.go @@ -23,14 +23,12 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" k8s_io_api_core_v1 "k8s.io/api/core/v1" v11 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -38,1514 +36,95 @@ import ( intstr "k8s.io/apimachinery/pkg/util/intstr" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *DaemonSet) Reset() { *m = DaemonSet{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} } -func (m *DaemonSet) Reset() { *m = DaemonSet{} } -func (*DaemonSet) ProtoMessage() {} -func (*DaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{0} -} -func (m *DaemonSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSet.Merge(m, src) -} -func (m *DaemonSet) XXX_Size() int { - return m.Size() -} -func (m *DaemonSet) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSet.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSet proto.InternalMessageInfo - -func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} } -func (*DaemonSetCondition) ProtoMessage() {} -func (*DaemonSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{1} -} -func (m *DaemonSetCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSetCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSetCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSetCondition.Merge(m, src) -} -func (m *DaemonSetCondition) XXX_Size() int { - return m.Size() -} -func (m *DaemonSetCondition) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSetCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSetCondition proto.InternalMessageInfo - -func (m *DaemonSetList) Reset() { *m = DaemonSetList{} } -func (*DaemonSetList) ProtoMessage() {} -func (*DaemonSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{2} -} -func (m *DaemonSetList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSetList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSetList.Merge(m, src) -} -func (m *DaemonSetList) XXX_Size() int { - return m.Size() -} -func (m *DaemonSetList) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSetList.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSetList proto.InternalMessageInfo - -func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} } -func (*DaemonSetSpec) ProtoMessage() {} -func (*DaemonSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{3} -} -func (m *DaemonSetSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSetSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSetSpec.Merge(m, src) -} -func (m *DaemonSetSpec) XXX_Size() int { - return m.Size() -} -func (m *DaemonSetSpec) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSetSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSetSpec proto.InternalMessageInfo - -func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } -func (*DaemonSetStatus) ProtoMessage() {} -func (*DaemonSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{4} -} -func (m *DaemonSetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSetStatus.Merge(m, src) -} -func (m *DaemonSetStatus) XXX_Size() int { - return m.Size() -} -func (m *DaemonSetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSetStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSetStatus proto.InternalMessageInfo - -func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } -func (*DaemonSetUpdateStrategy) ProtoMessage() {} -func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{5} -} -func (m *DaemonSetUpdateStrategy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DaemonSetUpdateStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DaemonSetUpdateStrategy) XXX_Merge(src proto.Message) { - xxx_messageInfo_DaemonSetUpdateStrategy.Merge(m, src) -} -func (m *DaemonSetUpdateStrategy) XXX_Size() int { - return m.Size() -} -func (m *DaemonSetUpdateStrategy) XXX_DiscardUnknown() { - xxx_messageInfo_DaemonSetUpdateStrategy.DiscardUnknown(m) -} - -var xxx_messageInfo_DaemonSetUpdateStrategy proto.InternalMessageInfo - -func (m *Deployment) Reset() { *m = Deployment{} } -func (*Deployment) ProtoMessage() {} -func (*Deployment) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{6} -} -func (m *Deployment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Deployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Deployment) XXX_Merge(src proto.Message) { - xxx_messageInfo_Deployment.Merge(m, src) -} -func (m *Deployment) XXX_Size() int { - return m.Size() -} -func (m *Deployment) XXX_DiscardUnknown() { - xxx_messageInfo_Deployment.DiscardUnknown(m) -} - -var xxx_messageInfo_Deployment proto.InternalMessageInfo - -func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } -func (*DeploymentCondition) ProtoMessage() {} -func (*DeploymentCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{7} -} -func (m *DeploymentCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentCondition.Merge(m, src) -} -func (m *DeploymentCondition) XXX_Size() int { - return m.Size() -} -func (m *DeploymentCondition) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentCondition proto.InternalMessageInfo - -func (m *DeploymentList) Reset() { *m = DeploymentList{} } -func (*DeploymentList) ProtoMessage() {} -func (*DeploymentList) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{8} -} -func (m *DeploymentList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentList.Merge(m, src) -} -func (m *DeploymentList) XXX_Size() int { - return m.Size() -} -func (m *DeploymentList) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentList.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentList proto.InternalMessageInfo - -func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} } -func (*DeploymentRollback) ProtoMessage() {} -func (*DeploymentRollback) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{9} -} -func (m *DeploymentRollback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentRollback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentRollback) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentRollback.Merge(m, src) -} -func (m *DeploymentRollback) XXX_Size() int { - return m.Size() -} -func (m *DeploymentRollback) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentRollback.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentRollback proto.InternalMessageInfo - -func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } -func (*DeploymentSpec) ProtoMessage() {} -func (*DeploymentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{10} -} -func (m *DeploymentSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentSpec.Merge(m, src) -} -func (m *DeploymentSpec) XXX_Size() int { - return m.Size() -} -func (m *DeploymentSpec) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentSpec proto.InternalMessageInfo - -func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } -func (*DeploymentStatus) ProtoMessage() {} -func (*DeploymentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{11} -} -func (m *DeploymentStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentStatus.Merge(m, src) -} -func (m *DeploymentStatus) XXX_Size() int { - return m.Size() -} -func (m *DeploymentStatus) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentStatus proto.InternalMessageInfo - -func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } -func (*DeploymentStrategy) ProtoMessage() {} -func (*DeploymentStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{12} -} -func (m *DeploymentStrategy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeploymentStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeploymentStrategy) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeploymentStrategy.Merge(m, src) -} -func (m *DeploymentStrategy) XXX_Size() int { - return m.Size() -} -func (m *DeploymentStrategy) XXX_DiscardUnknown() { - xxx_messageInfo_DeploymentStrategy.DiscardUnknown(m) -} - -var xxx_messageInfo_DeploymentStrategy proto.InternalMessageInfo - -func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } -func (*HTTPIngressPath) ProtoMessage() {} -func (*HTTPIngressPath) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{13} -} -func (m *HTTPIngressPath) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPIngressPath) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HTTPIngressPath) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPIngressPath.Merge(m, src) -} -func (m *HTTPIngressPath) XXX_Size() int { - return m.Size() -} -func (m *HTTPIngressPath) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPIngressPath.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPIngressPath proto.InternalMessageInfo - -func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} } -func (*HTTPIngressRuleValue) ProtoMessage() {} -func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{14} -} -func (m *HTTPIngressRuleValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPIngressRuleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HTTPIngressRuleValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPIngressRuleValue.Merge(m, src) -} -func (m *HTTPIngressRuleValue) XXX_Size() int { - return m.Size() -} -func (m *HTTPIngressRuleValue) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPIngressRuleValue.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPIngressRuleValue proto.InternalMessageInfo - -func (m *IPBlock) Reset() { *m = IPBlock{} } -func (*IPBlock) ProtoMessage() {} -func (*IPBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{15} -} -func (m *IPBlock) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IPBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IPBlock) XXX_Merge(src proto.Message) { - xxx_messageInfo_IPBlock.Merge(m, src) -} -func (m *IPBlock) XXX_Size() int { - return m.Size() -} -func (m *IPBlock) XXX_DiscardUnknown() { - xxx_messageInfo_IPBlock.DiscardUnknown(m) -} - -var xxx_messageInfo_IPBlock proto.InternalMessageInfo - -func (m *Ingress) Reset() { *m = Ingress{} } -func (*Ingress) ProtoMessage() {} -func (*Ingress) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{16} -} -func (m *Ingress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Ingress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Ingress) XXX_Merge(src proto.Message) { - xxx_messageInfo_Ingress.Merge(m, src) -} -func (m *Ingress) XXX_Size() int { - return m.Size() -} -func (m *Ingress) XXX_DiscardUnknown() { - xxx_messageInfo_Ingress.DiscardUnknown(m) -} - -var xxx_messageInfo_Ingress proto.InternalMessageInfo - -func (m *IngressBackend) Reset() { *m = IngressBackend{} } -func (*IngressBackend) ProtoMessage() {} -func (*IngressBackend) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{17} -} -func (m *IngressBackend) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressBackend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressBackend) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressBackend.Merge(m, src) -} -func (m *IngressBackend) XXX_Size() int { - return m.Size() -} -func (m *IngressBackend) XXX_DiscardUnknown() { - xxx_messageInfo_IngressBackend.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressBackend proto.InternalMessageInfo - -func (m *IngressList) Reset() { *m = IngressList{} } -func (*IngressList) ProtoMessage() {} -func (*IngressList) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{18} -} -func (m *IngressList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressList) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressList.Merge(m, src) -} -func (m *IngressList) XXX_Size() int { - return m.Size() -} -func (m *IngressList) XXX_DiscardUnknown() { - xxx_messageInfo_IngressList.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressList proto.InternalMessageInfo - -func (m *IngressLoadBalancerIngress) Reset() { *m = IngressLoadBalancerIngress{} } -func (*IngressLoadBalancerIngress) ProtoMessage() {} -func (*IngressLoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{19} -} -func (m *IngressLoadBalancerIngress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressLoadBalancerIngress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressLoadBalancerIngress) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressLoadBalancerIngress.Merge(m, src) -} -func (m *IngressLoadBalancerIngress) XXX_Size() int { - return m.Size() -} -func (m *IngressLoadBalancerIngress) XXX_DiscardUnknown() { - xxx_messageInfo_IngressLoadBalancerIngress.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressLoadBalancerIngress proto.InternalMessageInfo - -func (m *IngressLoadBalancerStatus) Reset() { *m = IngressLoadBalancerStatus{} } -func (*IngressLoadBalancerStatus) ProtoMessage() {} -func (*IngressLoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{20} -} -func (m *IngressLoadBalancerStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressLoadBalancerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressLoadBalancerStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressLoadBalancerStatus.Merge(m, src) -} -func (m *IngressLoadBalancerStatus) XXX_Size() int { - return m.Size() -} -func (m *IngressLoadBalancerStatus) XXX_DiscardUnknown() { - xxx_messageInfo_IngressLoadBalancerStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressLoadBalancerStatus proto.InternalMessageInfo - -func (m *IngressPortStatus) Reset() { *m = IngressPortStatus{} } -func (*IngressPortStatus) ProtoMessage() {} -func (*IngressPortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{21} -} -func (m *IngressPortStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressPortStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressPortStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressPortStatus.Merge(m, src) -} -func (m *IngressPortStatus) XXX_Size() int { - return m.Size() -} -func (m *IngressPortStatus) XXX_DiscardUnknown() { - xxx_messageInfo_IngressPortStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressPortStatus proto.InternalMessageInfo - -func (m *IngressRule) Reset() { *m = IngressRule{} } -func (*IngressRule) ProtoMessage() {} -func (*IngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{22} -} -func (m *IngressRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressRule.Merge(m, src) -} -func (m *IngressRule) XXX_Size() int { - return m.Size() -} -func (m *IngressRule) XXX_DiscardUnknown() { - xxx_messageInfo_IngressRule.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressRule proto.InternalMessageInfo +func (m *DaemonSetList) Reset() { *m = DaemonSetList{} } -func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } -func (*IngressRuleValue) ProtoMessage() {} -func (*IngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{23} -} -func (m *IngressRuleValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressRuleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressRuleValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressRuleValue.Merge(m, src) -} -func (m *IngressRuleValue) XXX_Size() int { - return m.Size() -} -func (m *IngressRuleValue) XXX_DiscardUnknown() { - xxx_messageInfo_IngressRuleValue.DiscardUnknown(m) -} +func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} } -var xxx_messageInfo_IngressRuleValue proto.InternalMessageInfo - -func (m *IngressSpec) Reset() { *m = IngressSpec{} } -func (*IngressSpec) ProtoMessage() {} -func (*IngressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{24} -} -func (m *IngressSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressSpec.Merge(m, src) -} -func (m *IngressSpec) XXX_Size() int { - return m.Size() -} -func (m *IngressSpec) XXX_DiscardUnknown() { - xxx_messageInfo_IngressSpec.DiscardUnknown(m) -} +func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } -var xxx_messageInfo_IngressSpec proto.InternalMessageInfo +func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } -func (m *IngressStatus) Reset() { *m = IngressStatus{} } -func (*IngressStatus) ProtoMessage() {} -func (*IngressStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{25} -} -func (m *IngressStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressStatus.Merge(m, src) -} -func (m *IngressStatus) XXX_Size() int { - return m.Size() -} -func (m *IngressStatus) XXX_DiscardUnknown() { - xxx_messageInfo_IngressStatus.DiscardUnknown(m) -} +func (m *Deployment) Reset() { *m = Deployment{} } -var xxx_messageInfo_IngressStatus proto.InternalMessageInfo +func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } -func (m *IngressTLS) Reset() { *m = IngressTLS{} } -func (*IngressTLS) ProtoMessage() {} -func (*IngressTLS) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{26} -} -func (m *IngressTLS) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressTLS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressTLS) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressTLS.Merge(m, src) -} -func (m *IngressTLS) XXX_Size() int { - return m.Size() -} -func (m *IngressTLS) XXX_DiscardUnknown() { - xxx_messageInfo_IngressTLS.DiscardUnknown(m) -} +func (m *DeploymentList) Reset() { *m = DeploymentList{} } -var xxx_messageInfo_IngressTLS proto.InternalMessageInfo +func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} } -func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } -func (*NetworkPolicy) ProtoMessage() {} -func (*NetworkPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{27} -} -func (m *NetworkPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicy.Merge(m, src) -} -func (m *NetworkPolicy) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicy.DiscardUnknown(m) -} +func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } -var xxx_messageInfo_NetworkPolicy proto.InternalMessageInfo +func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } -func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } -func (*NetworkPolicyEgressRule) ProtoMessage() {} -func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{28} -} -func (m *NetworkPolicyEgressRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyEgressRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyEgressRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyEgressRule.Merge(m, src) -} -func (m *NetworkPolicyEgressRule) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyEgressRule) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyEgressRule.DiscardUnknown(m) -} +func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } -var xxx_messageInfo_NetworkPolicyEgressRule proto.InternalMessageInfo +func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } -func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} } -func (*NetworkPolicyIngressRule) ProtoMessage() {} -func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{29} -} -func (m *NetworkPolicyIngressRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyIngressRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyIngressRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyIngressRule.Merge(m, src) -} -func (m *NetworkPolicyIngressRule) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyIngressRule) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyIngressRule.DiscardUnknown(m) -} +func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} } -var xxx_messageInfo_NetworkPolicyIngressRule proto.InternalMessageInfo +func (m *IPBlock) Reset() { *m = IPBlock{} } -func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} } -func (*NetworkPolicyList) ProtoMessage() {} -func (*NetworkPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{30} -} -func (m *NetworkPolicyList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyList) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyList.Merge(m, src) -} -func (m *NetworkPolicyList) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyList) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyList.DiscardUnknown(m) -} +func (m *Ingress) Reset() { *m = Ingress{} } -var xxx_messageInfo_NetworkPolicyList proto.InternalMessageInfo +func (m *IngressBackend) Reset() { *m = IngressBackend{} } -func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} } -func (*NetworkPolicyPeer) ProtoMessage() {} -func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{31} -} -func (m *NetworkPolicyPeer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyPeer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyPeer) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyPeer.Merge(m, src) -} -func (m *NetworkPolicyPeer) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyPeer) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyPeer.DiscardUnknown(m) -} +func (m *IngressList) Reset() { *m = IngressList{} } -var xxx_messageInfo_NetworkPolicyPeer proto.InternalMessageInfo +func (m *IngressLoadBalancerIngress) Reset() { *m = IngressLoadBalancerIngress{} } -func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} } -func (*NetworkPolicyPort) ProtoMessage() {} -func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{32} -} -func (m *NetworkPolicyPort) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyPort) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyPort.Merge(m, src) -} -func (m *NetworkPolicyPort) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyPort) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyPort.DiscardUnknown(m) -} +func (m *IngressLoadBalancerStatus) Reset() { *m = IngressLoadBalancerStatus{} } -var xxx_messageInfo_NetworkPolicyPort proto.InternalMessageInfo +func (m *IngressPortStatus) Reset() { *m = IngressPortStatus{} } -func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} } -func (*NetworkPolicySpec) ProtoMessage() {} -func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{33} -} -func (m *NetworkPolicySpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicySpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicySpec.Merge(m, src) -} -func (m *NetworkPolicySpec) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicySpec) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicySpec.DiscardUnknown(m) -} +func (m *IngressRule) Reset() { *m = IngressRule{} } -var xxx_messageInfo_NetworkPolicySpec proto.InternalMessageInfo +func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } -func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } -func (*ReplicaSet) ProtoMessage() {} -func (*ReplicaSet) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{34} -} -func (m *ReplicaSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSet.Merge(m, src) -} -func (m *ReplicaSet) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSet) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSet.DiscardUnknown(m) -} +func (m *IngressSpec) Reset() { *m = IngressSpec{} } -var xxx_messageInfo_ReplicaSet proto.InternalMessageInfo +func (m *IngressStatus) Reset() { *m = IngressStatus{} } -func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} } -func (*ReplicaSetCondition) ProtoMessage() {} -func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{35} -} -func (m *ReplicaSetCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSetCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSetCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSetCondition.Merge(m, src) -} -func (m *ReplicaSetCondition) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSetCondition) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSetCondition.DiscardUnknown(m) -} +func (m *IngressTLS) Reset() { *m = IngressTLS{} } -var xxx_messageInfo_ReplicaSetCondition proto.InternalMessageInfo +func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } -func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} } -func (*ReplicaSetList) ProtoMessage() {} -func (*ReplicaSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{36} -} -func (m *ReplicaSetList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSetList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSetList.Merge(m, src) -} -func (m *ReplicaSetList) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSetList) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSetList.DiscardUnknown(m) -} +func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } -var xxx_messageInfo_ReplicaSetList proto.InternalMessageInfo +func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} } -func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } -func (*ReplicaSetSpec) ProtoMessage() {} -func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{37} -} -func (m *ReplicaSetSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSetSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSetSpec.Merge(m, src) -} -func (m *ReplicaSetSpec) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSetSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSetSpec.DiscardUnknown(m) -} +func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} } -var xxx_messageInfo_ReplicaSetSpec proto.InternalMessageInfo +func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} } -func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } -func (*ReplicaSetStatus) ProtoMessage() {} -func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{38} -} -func (m *ReplicaSetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSetStatus.Merge(m, src) -} -func (m *ReplicaSetStatus) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSetStatus.DiscardUnknown(m) -} +func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} } -var xxx_messageInfo_ReplicaSetStatus proto.InternalMessageInfo +func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} } -func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } -func (*RollbackConfig) ProtoMessage() {} -func (*RollbackConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{39} -} -func (m *RollbackConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RollbackConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RollbackConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollbackConfig.Merge(m, src) -} -func (m *RollbackConfig) XXX_Size() int { - return m.Size() -} -func (m *RollbackConfig) XXX_DiscardUnknown() { - xxx_messageInfo_RollbackConfig.DiscardUnknown(m) -} +func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } -var xxx_messageInfo_RollbackConfig proto.InternalMessageInfo +func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} } -func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } -func (*RollingUpdateDaemonSet) ProtoMessage() {} -func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{40} -} -func (m *RollingUpdateDaemonSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RollingUpdateDaemonSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RollingUpdateDaemonSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollingUpdateDaemonSet.Merge(m, src) -} -func (m *RollingUpdateDaemonSet) XXX_Size() int { - return m.Size() -} -func (m *RollingUpdateDaemonSet) XXX_DiscardUnknown() { - xxx_messageInfo_RollingUpdateDaemonSet.DiscardUnknown(m) -} +func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} } -var xxx_messageInfo_RollingUpdateDaemonSet proto.InternalMessageInfo +func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } -func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } -func (*RollingUpdateDeployment) ProtoMessage() {} -func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{41} -} -func (m *RollingUpdateDeployment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RollingUpdateDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RollingUpdateDeployment) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollingUpdateDeployment.Merge(m, src) -} -func (m *RollingUpdateDeployment) XXX_Size() int { - return m.Size() -} -func (m *RollingUpdateDeployment) XXX_DiscardUnknown() { - xxx_messageInfo_RollingUpdateDeployment.DiscardUnknown(m) -} +func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } -var xxx_messageInfo_RollingUpdateDeployment proto.InternalMessageInfo +func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } -func (m *Scale) Reset() { *m = Scale{} } -func (*Scale) ProtoMessage() {} -func (*Scale) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{42} -} -func (m *Scale) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Scale) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Scale) XXX_Merge(src proto.Message) { - xxx_messageInfo_Scale.Merge(m, src) -} -func (m *Scale) XXX_Size() int { - return m.Size() -} -func (m *Scale) XXX_DiscardUnknown() { - xxx_messageInfo_Scale.DiscardUnknown(m) -} +func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } -var xxx_messageInfo_Scale proto.InternalMessageInfo +func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } -func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } -func (*ScaleSpec) ProtoMessage() {} -func (*ScaleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{43} -} -func (m *ScaleSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScaleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ScaleSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScaleSpec.Merge(m, src) -} -func (m *ScaleSpec) XXX_Size() int { - return m.Size() -} -func (m *ScaleSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ScaleSpec.DiscardUnknown(m) -} +func (m *Scale) Reset() { *m = Scale{} } -var xxx_messageInfo_ScaleSpec proto.InternalMessageInfo +func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } -func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } -func (*ScaleStatus) ProtoMessage() {} -func (*ScaleStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_90a532284de28347, []int{44} -} -func (m *ScaleStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScaleStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ScaleStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScaleStatus.Merge(m, src) -} -func (m *ScaleStatus) XXX_Size() int { - return m.Size() -} -func (m *ScaleStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ScaleStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ScaleStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*DaemonSet)(nil), "k8s.io.api.extensions.v1beta1.DaemonSet") - proto.RegisterType((*DaemonSetCondition)(nil), "k8s.io.api.extensions.v1beta1.DaemonSetCondition") - proto.RegisterType((*DaemonSetList)(nil), "k8s.io.api.extensions.v1beta1.DaemonSetList") - proto.RegisterType((*DaemonSetSpec)(nil), "k8s.io.api.extensions.v1beta1.DaemonSetSpec") - proto.RegisterType((*DaemonSetStatus)(nil), "k8s.io.api.extensions.v1beta1.DaemonSetStatus") - proto.RegisterType((*DaemonSetUpdateStrategy)(nil), "k8s.io.api.extensions.v1beta1.DaemonSetUpdateStrategy") - proto.RegisterType((*Deployment)(nil), "k8s.io.api.extensions.v1beta1.Deployment") - proto.RegisterType((*DeploymentCondition)(nil), "k8s.io.api.extensions.v1beta1.DeploymentCondition") - proto.RegisterType((*DeploymentList)(nil), "k8s.io.api.extensions.v1beta1.DeploymentList") - proto.RegisterType((*DeploymentRollback)(nil), "k8s.io.api.extensions.v1beta1.DeploymentRollback") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.extensions.v1beta1.DeploymentRollback.UpdatedAnnotationsEntry") - proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.api.extensions.v1beta1.DeploymentSpec") - proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.api.extensions.v1beta1.DeploymentStatus") - proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.api.extensions.v1beta1.DeploymentStrategy") - proto.RegisterType((*HTTPIngressPath)(nil), "k8s.io.api.extensions.v1beta1.HTTPIngressPath") - proto.RegisterType((*HTTPIngressRuleValue)(nil), "k8s.io.api.extensions.v1beta1.HTTPIngressRuleValue") - proto.RegisterType((*IPBlock)(nil), "k8s.io.api.extensions.v1beta1.IPBlock") - proto.RegisterType((*Ingress)(nil), "k8s.io.api.extensions.v1beta1.Ingress") - proto.RegisterType((*IngressBackend)(nil), "k8s.io.api.extensions.v1beta1.IngressBackend") - proto.RegisterType((*IngressList)(nil), "k8s.io.api.extensions.v1beta1.IngressList") - proto.RegisterType((*IngressLoadBalancerIngress)(nil), "k8s.io.api.extensions.v1beta1.IngressLoadBalancerIngress") - proto.RegisterType((*IngressLoadBalancerStatus)(nil), "k8s.io.api.extensions.v1beta1.IngressLoadBalancerStatus") - proto.RegisterType((*IngressPortStatus)(nil), "k8s.io.api.extensions.v1beta1.IngressPortStatus") - proto.RegisterType((*IngressRule)(nil), "k8s.io.api.extensions.v1beta1.IngressRule") - proto.RegisterType((*IngressRuleValue)(nil), "k8s.io.api.extensions.v1beta1.IngressRuleValue") - proto.RegisterType((*IngressSpec)(nil), "k8s.io.api.extensions.v1beta1.IngressSpec") - proto.RegisterType((*IngressStatus)(nil), "k8s.io.api.extensions.v1beta1.IngressStatus") - proto.RegisterType((*IngressTLS)(nil), "k8s.io.api.extensions.v1beta1.IngressTLS") - proto.RegisterType((*NetworkPolicy)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicy") - proto.RegisterType((*NetworkPolicyEgressRule)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicyEgressRule") - proto.RegisterType((*NetworkPolicyIngressRule)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicyIngressRule") - proto.RegisterType((*NetworkPolicyList)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicyList") - proto.RegisterType((*NetworkPolicyPeer)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicyPeer") - proto.RegisterType((*NetworkPolicyPort)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicyPort") - proto.RegisterType((*NetworkPolicySpec)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicySpec") - proto.RegisterType((*ReplicaSet)(nil), "k8s.io.api.extensions.v1beta1.ReplicaSet") - proto.RegisterType((*ReplicaSetCondition)(nil), "k8s.io.api.extensions.v1beta1.ReplicaSetCondition") - proto.RegisterType((*ReplicaSetList)(nil), "k8s.io.api.extensions.v1beta1.ReplicaSetList") - proto.RegisterType((*ReplicaSetSpec)(nil), "k8s.io.api.extensions.v1beta1.ReplicaSetSpec") - proto.RegisterType((*ReplicaSetStatus)(nil), "k8s.io.api.extensions.v1beta1.ReplicaSetStatus") - proto.RegisterType((*RollbackConfig)(nil), "k8s.io.api.extensions.v1beta1.RollbackConfig") - proto.RegisterType((*RollingUpdateDaemonSet)(nil), "k8s.io.api.extensions.v1beta1.RollingUpdateDaemonSet") - proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.api.extensions.v1beta1.RollingUpdateDeployment") - proto.RegisterType((*Scale)(nil), "k8s.io.api.extensions.v1beta1.Scale") - proto.RegisterType((*ScaleSpec)(nil), "k8s.io.api.extensions.v1beta1.ScaleSpec") - proto.RegisterType((*ScaleStatus)(nil), "k8s.io.api.extensions.v1beta1.ScaleStatus") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.extensions.v1beta1.ScaleStatus.SelectorEntry") -} - -func init() { - proto.RegisterFile("k8s.io/api/extensions/v1beta1/generated.proto", fileDescriptor_90a532284de28347) -} - -var fileDescriptor_90a532284de28347 = []byte{ - // 2875 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcf, 0x6f, 0x24, 0x47, - 0xf5, 0xdf, 0x9e, 0xf1, 0xd8, 0xe3, 0xe7, 0xb5, 0xbd, 0x5b, 0xeb, 0xac, 0x1d, 0xef, 0x37, 0x76, - 0xd4, 0x5f, 0x11, 0x36, 0x61, 0x77, 0x86, 0xdd, 0x24, 0x4b, 0x7e, 0x48, 0x09, 0x3b, 0xde, 0x4d, - 0xd6, 0x89, 0x7f, 0x4c, 0x6a, 0xc6, 0x09, 0x8a, 0x08, 0xd0, 0xee, 0x29, 0x8f, 0x3b, 0xee, 0xe9, - 0x1e, 0x75, 0xd7, 0x98, 0xf5, 0x0d, 0x04, 0x97, 0x9c, 0x40, 0x42, 0x21, 0x1c, 0x91, 0x90, 0xb8, - 0x72, 0xe5, 0x10, 0x22, 0x10, 0x41, 0x8a, 0x38, 0x45, 0xe2, 0x40, 0x4e, 0x16, 0x71, 0x4e, 0x88, - 0x7f, 0x00, 0xed, 0x09, 0xd5, 0x8f, 0xae, 0xfe, 0x6d, 0xf7, 0x0c, 0x5e, 0x8b, 0x20, 0x4e, 0xeb, - 0xa9, 0xf7, 0xde, 0xa7, 0x5e, 0x55, 0xbd, 0x7a, 0xef, 0x53, 0x55, 0xbd, 0x70, 0x7d, 0xef, 0x39, - 0xbf, 0x66, 0xb9, 0x75, 0xa3, 0x6f, 0xd5, 0xc9, 0x7d, 0x4a, 0x1c, 0xdf, 0x72, 0x1d, 0xbf, 0xbe, - 0x7f, 0x63, 0x9b, 0x50, 0xe3, 0x46, 0xbd, 0x4b, 0x1c, 0xe2, 0x19, 0x94, 0x74, 0x6a, 0x7d, 0xcf, - 0xa5, 0x2e, 0x7a, 0x4c, 0xa8, 0xd7, 0x8c, 0xbe, 0x55, 0x0b, 0xd5, 0x6b, 0x52, 0x7d, 0xf1, 0x7a, - 0xd7, 0xa2, 0xbb, 0x83, 0xed, 0x9a, 0xe9, 0xf6, 0xea, 0x5d, 0xb7, 0xeb, 0xd6, 0xb9, 0xd5, 0xf6, - 0x60, 0x87, 0xff, 0xe2, 0x3f, 0xf8, 0x5f, 0x02, 0x6d, 0x51, 0x8f, 0x74, 0x6e, 0xba, 0x1e, 0xa9, - 0xef, 0xa7, 0x7a, 0x5c, 0x7c, 0x26, 0xd4, 0xe9, 0x19, 0xe6, 0xae, 0xe5, 0x10, 0xef, 0xa0, 0xde, - 0xdf, 0xeb, 0xb2, 0x06, 0xbf, 0xde, 0x23, 0xd4, 0xc8, 0xb2, 0xaa, 0xe7, 0x59, 0x79, 0x03, 0x87, - 0x5a, 0x3d, 0x92, 0x32, 0xb8, 0x75, 0x92, 0x81, 0x6f, 0xee, 0x92, 0x9e, 0x91, 0xb2, 0x7b, 0x3a, - 0xcf, 0x6e, 0x40, 0x2d, 0xbb, 0x6e, 0x39, 0xd4, 0xa7, 0x5e, 0xd2, 0x48, 0x7f, 0xbf, 0x04, 0x93, - 0x77, 0x0c, 0xd2, 0x73, 0x9d, 0x16, 0xa1, 0xe8, 0x7b, 0x50, 0x65, 0xc3, 0xe8, 0x18, 0xd4, 0x58, - 0xd0, 0x1e, 0xd7, 0xae, 0x4e, 0xdd, 0xfc, 0x7a, 0x2d, 0x9c, 0x66, 0x85, 0x5a, 0xeb, 0xef, 0x75, - 0x59, 0x83, 0x5f, 0x63, 0xda, 0xb5, 0xfd, 0x1b, 0xb5, 0xcd, 0xed, 0x77, 0x89, 0x49, 0xd7, 0x09, - 0x35, 0x1a, 0xe8, 0x93, 0xc3, 0xe5, 0x73, 0x47, 0x87, 0xcb, 0x10, 0xb6, 0x61, 0x85, 0x8a, 0x36, - 0x60, 0xcc, 0xef, 0x13, 0x73, 0xa1, 0xc4, 0xd1, 0xaf, 0xd5, 0x8e, 0x5d, 0xc4, 0x9a, 0xf2, 0xac, - 0xd5, 0x27, 0x66, 0xe3, 0xbc, 0x44, 0x1e, 0x63, 0xbf, 0x30, 0xc7, 0x41, 0x6f, 0xc2, 0xb8, 0x4f, - 0x0d, 0x3a, 0xf0, 0x17, 0xca, 0x1c, 0xb1, 0x56, 0x18, 0x91, 0x5b, 0x35, 0x66, 0x24, 0xe6, 0xb8, - 0xf8, 0x8d, 0x25, 0x9a, 0xfe, 0xf7, 0x12, 0x20, 0xa5, 0xbb, 0xe2, 0x3a, 0x1d, 0x8b, 0x5a, 0xae, - 0x83, 0x5e, 0x80, 0x31, 0x7a, 0xd0, 0x27, 0x7c, 0x72, 0x26, 0x1b, 0x4f, 0x04, 0x0e, 0xb5, 0x0f, - 0xfa, 0xe4, 0xc1, 0xe1, 0xf2, 0xe5, 0xb4, 0x05, 0x93, 0x60, 0x6e, 0x83, 0xd6, 0x94, 0xab, 0x25, - 0x6e, 0xfd, 0x4c, 0xbc, 0xeb, 0x07, 0x87, 0xcb, 0x19, 0x41, 0x58, 0x53, 0x48, 0x71, 0x07, 0xd1, - 0x3e, 0x20, 0xdb, 0xf0, 0x69, 0xdb, 0x33, 0x1c, 0x5f, 0xf4, 0x64, 0xf5, 0x88, 0x9c, 0x84, 0xa7, - 0x8a, 0x2d, 0x1a, 0xb3, 0x68, 0x2c, 0x4a, 0x2f, 0xd0, 0x5a, 0x0a, 0x0d, 0x67, 0xf4, 0x80, 0x9e, - 0x80, 0x71, 0x8f, 0x18, 0xbe, 0xeb, 0x2c, 0x8c, 0xf1, 0x51, 0xa8, 0x09, 0xc4, 0xbc, 0x15, 0x4b, - 0x29, 0x7a, 0x12, 0x26, 0x7a, 0xc4, 0xf7, 0x8d, 0x2e, 0x59, 0xa8, 0x70, 0xc5, 0x59, 0xa9, 0x38, - 0xb1, 0x2e, 0x9a, 0x71, 0x20, 0xd7, 0x3f, 0xd4, 0x60, 0x5a, 0xcd, 0xdc, 0x9a, 0xe5, 0x53, 0xf4, - 0xed, 0x54, 0x1c, 0xd6, 0x8a, 0x0d, 0x89, 0x59, 0xf3, 0x28, 0xbc, 0x20, 0x7b, 0xab, 0x06, 0x2d, - 0x91, 0x18, 0x5c, 0x87, 0x8a, 0x45, 0x49, 0x8f, 0xad, 0x43, 0xf9, 0xea, 0xd4, 0xcd, 0xab, 0x45, - 0x43, 0xa6, 0x31, 0x2d, 0x41, 0x2b, 0xab, 0xcc, 0x1c, 0x0b, 0x14, 0xfd, 0xe7, 0x63, 0x11, 0xf7, - 0x59, 0x68, 0xa2, 0x77, 0xa0, 0xea, 0x13, 0x9b, 0x98, 0xd4, 0xf5, 0xa4, 0xfb, 0x4f, 0x17, 0x74, - 0xdf, 0xd8, 0x26, 0x76, 0x4b, 0x9a, 0x36, 0xce, 0x33, 0xff, 0x83, 0x5f, 0x58, 0x41, 0xa2, 0x37, - 0xa0, 0x4a, 0x49, 0xaf, 0x6f, 0x1b, 0x94, 0xc8, 0x7d, 0xf4, 0xff, 0xd1, 0x21, 0xb0, 0xc8, 0x61, - 0x60, 0x4d, 0xb7, 0xd3, 0x96, 0x6a, 0x7c, 0xfb, 0xa8, 0x29, 0x09, 0x5a, 0xb1, 0x82, 0x41, 0xfb, - 0x30, 0x33, 0xe8, 0x77, 0x98, 0x26, 0x65, 0xd9, 0xa1, 0x7b, 0x20, 0x23, 0xe9, 0x56, 0xd1, 0xb9, - 0xd9, 0x8a, 0x59, 0x37, 0x2e, 0xcb, 0xbe, 0x66, 0xe2, 0xed, 0x38, 0xd1, 0x0b, 0xba, 0x0d, 0xb3, - 0x3d, 0xcb, 0xc1, 0xc4, 0xe8, 0x1c, 0xb4, 0x88, 0xe9, 0x3a, 0x1d, 0x9f, 0x87, 0x55, 0xa5, 0x31, - 0x2f, 0x01, 0x66, 0xd7, 0xe3, 0x62, 0x9c, 0xd4, 0x47, 0xaf, 0x01, 0x0a, 0x86, 0xf1, 0xaa, 0x48, - 0x6e, 0x96, 0xeb, 0xf0, 0x98, 0x2b, 0x87, 0xc1, 0xdd, 0x4e, 0x69, 0xe0, 0x0c, 0x2b, 0xb4, 0x06, - 0x73, 0x1e, 0xd9, 0xb7, 0xd8, 0x18, 0xef, 0x59, 0x3e, 0x75, 0xbd, 0x83, 0x35, 0xab, 0x67, 0xd1, - 0x85, 0x71, 0xee, 0xd3, 0xc2, 0xd1, 0xe1, 0xf2, 0x1c, 0xce, 0x90, 0xe3, 0x4c, 0x2b, 0xfd, 0x83, - 0x71, 0x98, 0x4d, 0xe4, 0x1b, 0xf4, 0x26, 0x5c, 0x36, 0x07, 0x9e, 0x47, 0x1c, 0xba, 0x31, 0xe8, - 0x6d, 0x13, 0xaf, 0x65, 0xee, 0x92, 0xce, 0xc0, 0x26, 0x1d, 0x1e, 0x28, 0x95, 0xc6, 0x92, 0xf4, - 0xf8, 0xf2, 0x4a, 0xa6, 0x16, 0xce, 0xb1, 0x66, 0xb3, 0xe0, 0xf0, 0xa6, 0x75, 0xcb, 0xf7, 0x15, - 0x66, 0x89, 0x63, 0xaa, 0x59, 0xd8, 0x48, 0x69, 0xe0, 0x0c, 0x2b, 0xe6, 0x63, 0x87, 0xf8, 0x96, - 0x47, 0x3a, 0x49, 0x1f, 0xcb, 0x71, 0x1f, 0xef, 0x64, 0x6a, 0xe1, 0x1c, 0x6b, 0xf4, 0x2c, 0x4c, - 0x89, 0xde, 0xf8, 0xfa, 0xc9, 0x85, 0xbe, 0x24, 0xc1, 0xa6, 0x36, 0x42, 0x11, 0x8e, 0xea, 0xb1, - 0xa1, 0xb9, 0xdb, 0x3e, 0xf1, 0xf6, 0x49, 0x27, 0x7f, 0x81, 0x37, 0x53, 0x1a, 0x38, 0xc3, 0x8a, - 0x0d, 0x4d, 0x44, 0x60, 0x6a, 0x68, 0xe3, 0xf1, 0xa1, 0x6d, 0x65, 0x6a, 0xe1, 0x1c, 0x6b, 0x16, - 0xc7, 0xc2, 0xe5, 0xdb, 0xfb, 0x86, 0x65, 0x1b, 0xdb, 0x36, 0x59, 0x98, 0x88, 0xc7, 0xf1, 0x46, - 0x5c, 0x8c, 0x93, 0xfa, 0xe8, 0x55, 0xb8, 0x28, 0x9a, 0xb6, 0x1c, 0x43, 0x81, 0x54, 0x39, 0xc8, - 0xa3, 0x12, 0xe4, 0xe2, 0x46, 0x52, 0x01, 0xa7, 0x6d, 0xd0, 0x0b, 0x30, 0x63, 0xba, 0xb6, 0xcd, - 0xe3, 0x71, 0xc5, 0x1d, 0x38, 0x74, 0x61, 0x92, 0xa3, 0x20, 0xb6, 0x1f, 0x57, 0x62, 0x12, 0x9c, - 0xd0, 0x44, 0x04, 0xc0, 0x0c, 0x0a, 0x8e, 0xbf, 0x00, 0x3c, 0x3f, 0xde, 0x28, 0x9a, 0x03, 0x54, - 0xa9, 0x0a, 0x39, 0x80, 0x6a, 0xf2, 0x71, 0x04, 0x58, 0xff, 0xb3, 0x06, 0xf3, 0x39, 0xa9, 0x03, - 0xbd, 0x1c, 0x2b, 0xb1, 0x5f, 0x4b, 0x94, 0xd8, 0x2b, 0x39, 0x66, 0x91, 0x3a, 0xeb, 0xc0, 0xb4, - 0xc7, 0x46, 0xe5, 0x74, 0x85, 0x8a, 0xcc, 0x91, 0xcf, 0x9e, 0x30, 0x0c, 0x1c, 0xb5, 0x09, 0x73, - 0xfe, 0xc5, 0xa3, 0xc3, 0xe5, 0xe9, 0x98, 0x0c, 0xc7, 0xe1, 0xf5, 0x5f, 0x94, 0x00, 0xee, 0x90, - 0xbe, 0xed, 0x1e, 0xf4, 0x88, 0x73, 0x16, 0x1c, 0x6a, 0x33, 0xc6, 0xa1, 0xae, 0x9f, 0xb4, 0x3c, - 0xca, 0xb5, 0x5c, 0x12, 0xf5, 0x56, 0x82, 0x44, 0xd5, 0x8b, 0x43, 0x1e, 0xcf, 0xa2, 0xfe, 0x5a, - 0x86, 0x4b, 0xa1, 0x72, 0x48, 0xa3, 0x5e, 0x8c, 0xad, 0xf1, 0x57, 0x13, 0x6b, 0x3c, 0x9f, 0x61, - 0xf2, 0xd0, 0x78, 0xd4, 0xbb, 0x30, 0xc3, 0x58, 0x8e, 0x58, 0x4b, 0xce, 0xa1, 0xc6, 0x87, 0xe6, - 0x50, 0xaa, 0xda, 0xad, 0xc5, 0x90, 0x70, 0x02, 0x39, 0x87, 0xb3, 0x4d, 0x7c, 0x19, 0x39, 0xdb, - 0x47, 0x1a, 0xcc, 0x84, 0xcb, 0x74, 0x06, 0xa4, 0x6d, 0x23, 0x4e, 0xda, 0x9e, 0x2c, 0x1c, 0xa2, - 0x39, 0xac, 0xed, 0x9f, 0x8c, 0xe0, 0x2b, 0x25, 0xb6, 0xc1, 0xb7, 0x0d, 0x73, 0x0f, 0x3d, 0x0e, - 0x63, 0x8e, 0xd1, 0x0b, 0x22, 0x53, 0x6d, 0x96, 0x0d, 0xa3, 0x47, 0x30, 0x97, 0xa0, 0xf7, 0x35, - 0x40, 0xb2, 0x0a, 0xdc, 0x76, 0x1c, 0x97, 0x1a, 0x22, 0x57, 0x0a, 0xb7, 0x56, 0x0b, 0xbb, 0x15, - 0xf4, 0x58, 0xdb, 0x4a, 0x61, 0xdd, 0x75, 0xa8, 0x77, 0x10, 0x2e, 0x72, 0x5a, 0x01, 0x67, 0x38, - 0x80, 0x0c, 0x00, 0x4f, 0x62, 0xb6, 0x5d, 0xb9, 0x91, 0xaf, 0x17, 0xc8, 0x79, 0xcc, 0x60, 0xc5, - 0x75, 0x76, 0xac, 0x6e, 0x98, 0x76, 0xb0, 0x02, 0xc2, 0x11, 0xd0, 0xc5, 0xbb, 0x30, 0x9f, 0xe3, - 0x2d, 0xba, 0x00, 0xe5, 0x3d, 0x72, 0x20, 0xa6, 0x0d, 0xb3, 0x3f, 0xd1, 0x1c, 0x54, 0xf6, 0x0d, - 0x7b, 0x20, 0xd2, 0xef, 0x24, 0x16, 0x3f, 0x5e, 0x28, 0x3d, 0xa7, 0xe9, 0x1f, 0x56, 0xa2, 0xb1, - 0xc3, 0x19, 0xf3, 0x55, 0xa8, 0x7a, 0xa4, 0x6f, 0x5b, 0xa6, 0xe1, 0x4b, 0x22, 0xc4, 0xc9, 0x2f, - 0x96, 0x6d, 0x58, 0x49, 0x63, 0xdc, 0xba, 0xf4, 0x70, 0xb9, 0x75, 0xf9, 0x74, 0xb8, 0xf5, 0x77, - 0xa1, 0xea, 0x07, 0xac, 0x7a, 0x8c, 0x43, 0xde, 0x18, 0x22, 0xbf, 0x4a, 0x42, 0xad, 0x3a, 0x50, - 0x54, 0x5a, 0x81, 0x66, 0x91, 0xe8, 0xca, 0x90, 0x24, 0xfa, 0x54, 0x89, 0x2f, 0xcb, 0x37, 0x7d, - 0x63, 0xe0, 0x93, 0x0e, 0xcf, 0x6d, 0xd5, 0x30, 0xdf, 0x34, 0x79, 0x2b, 0x96, 0x52, 0xf4, 0x4e, - 0x2c, 0x64, 0xab, 0xa3, 0x84, 0xec, 0x4c, 0x7e, 0xb8, 0xa2, 0x2d, 0x98, 0xef, 0x7b, 0x6e, 0xd7, - 0x23, 0xbe, 0x7f, 0x87, 0x18, 0x1d, 0xdb, 0x72, 0x48, 0x30, 0x3f, 0x82, 0x11, 0x5d, 0x39, 0x3a, - 0x5c, 0x9e, 0x6f, 0x66, 0xab, 0xe0, 0x3c, 0x5b, 0xfd, 0x67, 0x15, 0xb8, 0x90, 0xac, 0x80, 0x39, - 0x24, 0x55, 0x1b, 0x89, 0xa4, 0x5e, 0x8b, 0x6c, 0x06, 0xc1, 0xe0, 0xd5, 0xea, 0x67, 0x6c, 0x88, - 0xdb, 0x30, 0x2b, 0xb3, 0x41, 0x20, 0x94, 0x34, 0x5d, 0xad, 0xfe, 0x56, 0x5c, 0x8c, 0x93, 0xfa, - 0xe8, 0x45, 0x98, 0xf6, 0x38, 0xef, 0x0e, 0x00, 0x04, 0x77, 0x7d, 0x44, 0x02, 0x4c, 0xe3, 0xa8, - 0x10, 0xc7, 0x75, 0x19, 0x6f, 0x0d, 0xe9, 0x68, 0x00, 0x30, 0x16, 0xe7, 0xad, 0xb7, 0x93, 0x0a, - 0x38, 0x6d, 0x83, 0xd6, 0xe1, 0xd2, 0xc0, 0x49, 0x43, 0x89, 0x50, 0xbe, 0x22, 0xa1, 0x2e, 0x6d, - 0xa5, 0x55, 0x70, 0x96, 0x1d, 0x5a, 0x85, 0x4b, 0x94, 0x78, 0x3d, 0xcb, 0x31, 0xa8, 0xe5, 0x74, - 0x15, 0x9c, 0x58, 0xf9, 0x79, 0x06, 0xd5, 0x4e, 0x8b, 0x71, 0x96, 0x0d, 0xda, 0x89, 0xb1, 0xe2, - 0x71, 0x9e, 0xe9, 0x6f, 0x16, 0xde, 0xc3, 0x85, 0x69, 0x71, 0x06, 0x73, 0xaf, 0x16, 0x65, 0xee, - 0xfa, 0x1f, 0xb4, 0x68, 0x3d, 0x53, 0x6c, 0xfa, 0xa4, 0x0b, 0xab, 0x94, 0x45, 0x84, 0x68, 0xb9, - 0xd9, 0x44, 0xfa, 0xd6, 0x50, 0x44, 0x3a, 0xac, 0xc3, 0x27, 0x33, 0xe9, 0x3f, 0x6a, 0x30, 0x7b, - 0xaf, 0xdd, 0x6e, 0xae, 0x3a, 0x7c, 0xe3, 0x35, 0x0d, 0xba, 0xcb, 0x0a, 0x72, 0xdf, 0xa0, 0xbb, - 0xc9, 0x82, 0xcc, 0x64, 0x98, 0x4b, 0xd0, 0x33, 0x50, 0x65, 0xff, 0x32, 0xc7, 0x79, 0xe4, 0x4f, - 0xf2, 0x7c, 0x55, 0x6d, 0xca, 0xb6, 0x07, 0x91, 0xbf, 0xb1, 0xd2, 0x44, 0xdf, 0x82, 0x09, 0x96, - 0x26, 0x88, 0xd3, 0x29, 0xc8, 0xa3, 0xa5, 0x53, 0x0d, 0x61, 0x14, 0x52, 0x23, 0xd9, 0x80, 0x03, - 0x38, 0x7d, 0x0f, 0xe6, 0x22, 0x83, 0xc0, 0x03, 0x9b, 0xbc, 0xc9, 0x4a, 0x1f, 0x6a, 0x41, 0x85, - 0xf5, 0xce, 0x0a, 0x5c, 0xb9, 0xc0, 0x4d, 0x65, 0x62, 0x22, 0x42, 0x1a, 0xc3, 0x7e, 0xf9, 0x58, - 0x60, 0xe9, 0x9b, 0x30, 0xb1, 0xda, 0x6c, 0xd8, 0xae, 0xa0, 0x2e, 0xa6, 0xd5, 0xf1, 0x92, 0x33, - 0xb5, 0xb2, 0x7a, 0x07, 0x63, 0x2e, 0x41, 0x3a, 0x8c, 0x93, 0xfb, 0x26, 0xe9, 0x53, 0xce, 0x56, - 0x26, 0x1b, 0xc0, 0x72, 0xf2, 0x5d, 0xde, 0x82, 0xa5, 0x44, 0xff, 0x49, 0x09, 0x26, 0x64, 0xb7, - 0x67, 0x70, 0x94, 0x59, 0x8b, 0x1d, 0x65, 0x9e, 0x2a, 0xb6, 0x04, 0xb9, 0xe7, 0x98, 0x76, 0xe2, - 0x1c, 0x73, 0xad, 0x20, 0xde, 0xf1, 0x87, 0x98, 0xf7, 0x4a, 0x30, 0x13, 0x5f, 0x7c, 0xf4, 0x2c, - 0x4c, 0xb1, 0xac, 0x6d, 0x99, 0x64, 0x23, 0x24, 0x8b, 0xea, 0x26, 0xa3, 0x15, 0x8a, 0x70, 0x54, - 0x0f, 0x75, 0x95, 0x59, 0xd3, 0xf5, 0xa8, 0x1c, 0x74, 0xfe, 0x94, 0x0e, 0xa8, 0x65, 0xd7, 0xc4, - 0xbd, 0x7d, 0x6d, 0xd5, 0xa1, 0x9b, 0x5e, 0x8b, 0x7a, 0x96, 0xd3, 0x4d, 0x75, 0xc4, 0xc0, 0x70, - 0x14, 0x19, 0xbd, 0xc5, 0x2a, 0x88, 0xef, 0x0e, 0x3c, 0x93, 0x64, 0x31, 0xc1, 0x80, 0xc5, 0xb0, - 0x8d, 0xd0, 0x59, 0x73, 0x4d, 0xc3, 0x16, 0x8b, 0x83, 0xc9, 0x0e, 0xf1, 0x88, 0x63, 0x92, 0x80, - 0x7d, 0x09, 0x08, 0xac, 0xc0, 0xf4, 0xdf, 0x6a, 0x30, 0x25, 0xe7, 0xe2, 0x0c, 0x38, 0xff, 0xeb, - 0x71, 0xce, 0xff, 0x44, 0xc1, 0x1d, 0x9a, 0x4d, 0xf8, 0x7f, 0xa7, 0xc1, 0x62, 0xe0, 0xba, 0x6b, - 0x74, 0x1a, 0x86, 0x6d, 0x38, 0x26, 0xf1, 0x82, 0x58, 0x5f, 0x84, 0x92, 0xd5, 0x97, 0x2b, 0x09, - 0x12, 0xa0, 0xb4, 0xda, 0xc4, 0x25, 0xab, 0xcf, 0x0a, 0xf2, 0xae, 0xeb, 0x53, 0x7e, 0x30, 0x10, - 0x67, 0x4e, 0xe5, 0xf5, 0x3d, 0xd9, 0x8e, 0x95, 0x06, 0xda, 0x82, 0x4a, 0xdf, 0xf5, 0x28, 0x2b, - 0x82, 0xe5, 0xc4, 0xfa, 0x1e, 0xe3, 0x35, 0x5b, 0x37, 0x19, 0x88, 0xe1, 0x4e, 0x67, 0x30, 0x58, - 0xa0, 0xe9, 0x3f, 0xd4, 0xe0, 0xd1, 0x0c, 0xff, 0x25, 0xff, 0xe8, 0xc0, 0x84, 0x25, 0x84, 0x32, - 0xbd, 0x3c, 0x5f, 0xac, 0xdb, 0x8c, 0xa9, 0x08, 0x53, 0x5b, 0x90, 0xc2, 0x02, 0x68, 0xfd, 0x57, - 0x1a, 0x5c, 0x4c, 0xf9, 0xcb, 0x53, 0x34, 0x8b, 0x67, 0x49, 0xdc, 0x55, 0x8a, 0x66, 0x61, 0xc9, - 0x25, 0xe8, 0x75, 0xa8, 0xf2, 0xe7, 0x26, 0xd3, 0xb5, 0xe5, 0x04, 0xd6, 0x83, 0x09, 0x6c, 0xca, - 0xf6, 0x07, 0x87, 0xcb, 0x57, 0x32, 0x8e, 0xed, 0x81, 0x18, 0x2b, 0x00, 0xb4, 0x0c, 0x15, 0xe2, - 0x79, 0xae, 0x27, 0x93, 0xfd, 0x24, 0x9b, 0xa9, 0xbb, 0xac, 0x01, 0x8b, 0x76, 0xfd, 0xd7, 0x61, - 0x90, 0xb2, 0xec, 0xcb, 0xfc, 0x63, 0x8b, 0x93, 0x4c, 0x8c, 0x6c, 0xe9, 0x30, 0x97, 0xa0, 0x01, - 0x5c, 0xb0, 0x12, 0xe9, 0x5a, 0xee, 0xce, 0x7a, 0xb1, 0x69, 0x54, 0x66, 0x8d, 0x05, 0x09, 0x7f, - 0x21, 0x29, 0xc1, 0xa9, 0x2e, 0x74, 0x02, 0x29, 0x2d, 0xf4, 0x06, 0x8c, 0xed, 0x52, 0xda, 0xcf, - 0x78, 0x37, 0x38, 0xa1, 0x48, 0x84, 0x2e, 0x54, 0xf9, 0xe8, 0xda, 0xed, 0x26, 0xe6, 0x50, 0xfa, - 0xef, 0x4b, 0x6a, 0x3e, 0xf8, 0x61, 0xeb, 0x9b, 0x6a, 0xb4, 0x2b, 0xb6, 0xe1, 0xfb, 0x3c, 0x85, - 0x89, 0x8b, 0x81, 0xb9, 0x88, 0xe3, 0x4a, 0x86, 0x53, 0xda, 0xa8, 0x1d, 0x16, 0x4f, 0x6d, 0x94, - 0xe2, 0x39, 0x95, 0x55, 0x38, 0xd1, 0x3d, 0x28, 0x53, 0xbb, 0xe8, 0x01, 0x5f, 0x22, 0xb6, 0xd7, - 0x5a, 0x8d, 0x29, 0x39, 0xe5, 0xe5, 0xf6, 0x5a, 0x0b, 0x33, 0x08, 0xb4, 0x09, 0x15, 0x6f, 0x60, - 0x13, 0x56, 0x07, 0xca, 0xc5, 0xeb, 0x0a, 0x9b, 0xc1, 0x70, 0xf3, 0xb1, 0x5f, 0x3e, 0x16, 0x38, - 0xfa, 0x8f, 0x34, 0x98, 0x8e, 0x55, 0x0b, 0xe4, 0xc1, 0x79, 0x3b, 0xb2, 0x77, 0xe4, 0x3c, 0x3c, - 0x37, 0xfc, 0xae, 0x93, 0x9b, 0x7e, 0x4e, 0xf6, 0x7b, 0x3e, 0x2a, 0xc3, 0xb1, 0x3e, 0x74, 0x03, - 0x20, 0x1c, 0x36, 0xdb, 0x07, 0x2c, 0x78, 0xc5, 0x86, 0x97, 0xfb, 0x80, 0xc5, 0xb4, 0x8f, 0x45, - 0x3b, 0xba, 0x09, 0xe0, 0x13, 0xd3, 0x23, 0x74, 0x23, 0x4c, 0x5c, 0xaa, 0x1c, 0xb7, 0x94, 0x04, - 0x47, 0xb4, 0xf4, 0x3f, 0x69, 0x30, 0xbd, 0x41, 0xe8, 0xf7, 0x5d, 0x6f, 0xaf, 0xe9, 0xda, 0x96, - 0x79, 0x70, 0x06, 0x24, 0x00, 0xc7, 0x48, 0xc0, 0x49, 0xf9, 0x32, 0xe6, 0x5d, 0x1e, 0x15, 0xd0, - 0x3f, 0xd2, 0x60, 0x3e, 0xa6, 0x79, 0x37, 0xcc, 0x07, 0x2a, 0x41, 0x6b, 0x85, 0x12, 0x74, 0x0c, - 0x86, 0x25, 0xb5, 0xec, 0x04, 0x8d, 0xd6, 0xa0, 0x44, 0x5d, 0x19, 0xbd, 0xc3, 0x61, 0x12, 0xe2, - 0x85, 0x35, 0xa7, 0xed, 0xe2, 0x12, 0x75, 0xd9, 0x42, 0x2c, 0xc4, 0xb4, 0xa2, 0x19, 0xed, 0x21, - 0x8d, 0x00, 0xc3, 0xd8, 0x8e, 0xe7, 0xf6, 0x46, 0x1e, 0x83, 0x5a, 0x88, 0x57, 0x3c, 0xb7, 0x87, - 0x39, 0x96, 0xfe, 0xb1, 0x06, 0x17, 0x63, 0x9a, 0x67, 0xc0, 0x1b, 0xde, 0x88, 0xf3, 0x86, 0x6b, - 0xc3, 0x0c, 0x24, 0x87, 0x3d, 0x7c, 0x5c, 0x4a, 0x0c, 0x83, 0x0d, 0x18, 0xed, 0xc0, 0x54, 0xdf, - 0xed, 0xb4, 0x4e, 0xe1, 0xad, 0x77, 0x96, 0xf1, 0xb9, 0x66, 0x88, 0x85, 0xa3, 0xc0, 0xe8, 0x3e, - 0x5c, 0x64, 0xd4, 0xc2, 0xef, 0x1b, 0x26, 0x69, 0x9d, 0xc2, 0xed, 0xd7, 0x23, 0xfc, 0x31, 0x29, - 0x89, 0x88, 0xd3, 0x9d, 0xa0, 0x75, 0x98, 0xb0, 0xfa, 0xfc, 0x7c, 0x21, 0x89, 0xe4, 0x89, 0x24, - 0x4c, 0x9c, 0x46, 0x44, 0x8a, 0x97, 0x3f, 0x70, 0x80, 0xa1, 0xff, 0x25, 0x19, 0x0d, 0x9c, 0xae, - 0xbe, 0x1a, 0xa1, 0x07, 0xf2, 0xd9, 0x67, 0x34, 0x6a, 0xb0, 0x21, 0x99, 0xc8, 0xa8, 0xcc, 0xba, - 0x9a, 0xe0, 0x2d, 0x5f, 0x81, 0x09, 0xe2, 0x74, 0x38, 0x59, 0x17, 0x77, 0x2a, 0x7c, 0x54, 0x77, - 0x45, 0x13, 0x0e, 0x64, 0xfa, 0x8f, 0xcb, 0x89, 0x51, 0xf1, 0x32, 0xfb, 0xee, 0xa9, 0x05, 0x87, - 0x22, 0xfc, 0xb9, 0x01, 0xb2, 0x1d, 0xd2, 0x3f, 0x11, 0xf3, 0xdf, 0x18, 0x26, 0xe6, 0xa3, 0xf5, - 0x2f, 0x97, 0xfc, 0xa1, 0xef, 0xc0, 0x38, 0x11, 0x5d, 0x88, 0xaa, 0x7a, 0x6b, 0x98, 0x2e, 0xc2, - 0xf4, 0x1b, 0x9e, 0xb3, 0x64, 0x9b, 0x44, 0x45, 0x2f, 0xb3, 0xf9, 0x62, 0xba, 0xec, 0x58, 0x22, - 0xd8, 0xf3, 0x64, 0xe3, 0x31, 0x31, 0x6c, 0xd5, 0xfc, 0xe0, 0x70, 0x19, 0xc2, 0x9f, 0x38, 0x6a, - 0xc1, 0x1f, 0xe2, 0xe4, 0x9d, 0xcd, 0xd9, 0x7c, 0xcc, 0x34, 0xdc, 0x43, 0x5c, 0xe8, 0xda, 0xa9, - 0x3d, 0xc4, 0x45, 0x20, 0x8f, 0x3f, 0xc3, 0xfe, 0xa3, 0x04, 0x97, 0x42, 0xe5, 0xc2, 0x0f, 0x71, - 0x19, 0x26, 0xff, 0xfb, 0xa0, 0xa9, 0xd8, 0xe3, 0x58, 0x38, 0x75, 0xff, 0x79, 0x8f, 0x63, 0xa1, - 0x6f, 0x39, 0xd5, 0xee, 0x37, 0xa5, 0xe8, 0x00, 0x86, 0x7c, 0xa1, 0x39, 0x85, 0x6f, 0x7a, 0xbe, - 0x74, 0x8f, 0x3c, 0xfa, 0x07, 0x63, 0x70, 0x21, 0xb9, 0x1b, 0x63, 0x17, 0xf9, 0xda, 0x89, 0x17, - 0xf9, 0x4d, 0x98, 0xdb, 0x19, 0xd8, 0xf6, 0x01, 0x1f, 0x43, 0xe4, 0x36, 0x5f, 0x3c, 0x01, 0xfc, - 0x9f, 0xb4, 0x9c, 0x7b, 0x25, 0x43, 0x07, 0x67, 0x5a, 0xa6, 0xef, 0xf5, 0xc7, 0xfe, 0xdd, 0x7b, - 0xfd, 0xca, 0x08, 0xf7, 0xfa, 0x39, 0x17, 0xf1, 0x13, 0x23, 0x5c, 0xc4, 0x67, 0xbf, 0xb2, 0x94, - 0x47, 0x7a, 0x65, 0x19, 0xe5, 0x52, 0x3f, 0x23, 0x1f, 0x9e, 0xf8, 0xad, 0xcb, 0x4b, 0x30, 0x13, - 0x7f, 0xb3, 0x12, 0x61, 0x21, 0x9e, 0xcd, 0xe4, 0x0b, 0x51, 0x24, 0x2c, 0x44, 0x3b, 0x56, 0x1a, - 0xfa, 0x91, 0x06, 0x97, 0xb3, 0xbf, 0x4d, 0x41, 0x36, 0xcc, 0xf4, 0x8c, 0xfb, 0xd1, 0xef, 0x85, - 0xb4, 0x11, 0x89, 0x0f, 0x7f, 0x61, 0x58, 0x8f, 0x61, 0xe1, 0x04, 0x36, 0x7a, 0x1b, 0xaa, 0x3d, - 0xe3, 0x7e, 0x6b, 0xe0, 0x75, 0xc9, 0xc8, 0x04, 0x8b, 0xef, 0xc8, 0x75, 0x89, 0x82, 0x15, 0x9e, - 0xfe, 0x85, 0x06, 0xf3, 0x39, 0xef, 0x06, 0xff, 0x45, 0xa3, 0x7c, 0xaf, 0x04, 0x95, 0x96, 0x69, - 0xd8, 0xe4, 0x0c, 0xb8, 0xc9, 0x6b, 0x31, 0x6e, 0x72, 0xd2, 0x37, 0xae, 0xdc, 0xab, 0x5c, 0x5a, - 0x82, 0x13, 0xb4, 0xe4, 0xa9, 0x42, 0x68, 0xc7, 0x33, 0x92, 0xe7, 0x61, 0x52, 0x75, 0x3a, 0x5c, - 0xa2, 0xd4, 0x7f, 0x59, 0x82, 0xa9, 0x48, 0x17, 0x43, 0xa6, 0xd9, 0x9d, 0x58, 0x6d, 0x29, 0x17, - 0xb8, 0xb4, 0x89, 0xf4, 0x55, 0x0b, 0xaa, 0x89, 0xf8, 0x46, 0x23, 0x7c, 0x95, 0x4f, 0x17, 0x99, - 0x97, 0x60, 0x86, 0x1a, 0x5e, 0x97, 0x50, 0x75, 0x02, 0x10, 0xf7, 0x95, 0xea, 0x63, 0xa1, 0x76, - 0x4c, 0x8a, 0x13, 0xda, 0x8b, 0x2f, 0xc2, 0x74, 0xac, 0xb3, 0x61, 0x3e, 0xb1, 0x68, 0xac, 0x7c, - 0xf2, 0xf9, 0xd2, 0xb9, 0x4f, 0x3f, 0x5f, 0x3a, 0xf7, 0xd9, 0xe7, 0x4b, 0xe7, 0x7e, 0x70, 0xb4, - 0xa4, 0x7d, 0x72, 0xb4, 0xa4, 0x7d, 0x7a, 0xb4, 0xa4, 0x7d, 0x76, 0xb4, 0xa4, 0xfd, 0xed, 0x68, - 0x49, 0xfb, 0xe9, 0x17, 0x4b, 0xe7, 0xde, 0x7e, 0xec, 0xd8, 0xff, 0x71, 0xf1, 0xaf, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x6a, 0x79, 0xb9, 0xab, 0x91, 0x31, 0x00, 0x00, -} +func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (m *DaemonSet) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -2070,7 +649,7 @@ func (m *DeploymentRollback) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.UpdatedAnnotations { keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations) + sort.Strings(keysForUpdatedAnnotations) for iNdEx := len(keysForUpdatedAnnotations) - 1; iNdEx >= 0; iNdEx-- { v := m.UpdatedAnnotations[string(keysForUpdatedAnnotations[iNdEx])] baseI := i @@ -3759,7 +2338,7 @@ func (m *ScaleStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Selector { keysForSelector = append(keysForSelector, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForSelector) + sort.Strings(keysForSelector) for iNdEx := len(keysForSelector) - 1; iNdEx >= 0; iNdEx-- { v := m.Selector[string(keysForSelector[iNdEx])] baseI := i @@ -4761,7 +3340,7 @@ func (this *DeploymentRollback) String() string { for k := range this.UpdatedAnnotations { keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations) + sort.Strings(keysForUpdatedAnnotations) mapStringForUpdatedAnnotations := "map[string]string{" for _, k := range keysForUpdatedAnnotations { mapStringForUpdatedAnnotations += fmt.Sprintf("%v: %v,", k, this.UpdatedAnnotations[k]) @@ -5268,7 +3847,7 @@ func (this *ScaleStatus) String() string { for k := range this.Selector { keysForSelector = append(keysForSelector, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForSelector) + sort.Strings(keysForSelector) mapStringForSelector := "map[string]string{" for _, k := range keysForSelector { mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k]) diff --git a/staging/src/k8s.io/api/extensions/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/extensions/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..ef18ae29964f5 --- /dev/null +++ b/staging/src/k8s.io/api/extensions/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,112 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*DaemonSet) ProtoMessage() {} + +func (*DaemonSetCondition) ProtoMessage() {} + +func (*DaemonSetList) ProtoMessage() {} + +func (*DaemonSetSpec) ProtoMessage() {} + +func (*DaemonSetStatus) ProtoMessage() {} + +func (*DaemonSetUpdateStrategy) ProtoMessage() {} + +func (*Deployment) ProtoMessage() {} + +func (*DeploymentCondition) ProtoMessage() {} + +func (*DeploymentList) ProtoMessage() {} + +func (*DeploymentRollback) ProtoMessage() {} + +func (*DeploymentSpec) ProtoMessage() {} + +func (*DeploymentStatus) ProtoMessage() {} + +func (*DeploymentStrategy) ProtoMessage() {} + +func (*HTTPIngressPath) ProtoMessage() {} + +func (*HTTPIngressRuleValue) ProtoMessage() {} + +func (*IPBlock) ProtoMessage() {} + +func (*Ingress) ProtoMessage() {} + +func (*IngressBackend) ProtoMessage() {} + +func (*IngressList) ProtoMessage() {} + +func (*IngressLoadBalancerIngress) ProtoMessage() {} + +func (*IngressLoadBalancerStatus) ProtoMessage() {} + +func (*IngressPortStatus) ProtoMessage() {} + +func (*IngressRule) ProtoMessage() {} + +func (*IngressRuleValue) ProtoMessage() {} + +func (*IngressSpec) ProtoMessage() {} + +func (*IngressStatus) ProtoMessage() {} + +func (*IngressTLS) ProtoMessage() {} + +func (*NetworkPolicy) ProtoMessage() {} + +func (*NetworkPolicyEgressRule) ProtoMessage() {} + +func (*NetworkPolicyIngressRule) ProtoMessage() {} + +func (*NetworkPolicyList) ProtoMessage() {} + +func (*NetworkPolicyPeer) ProtoMessage() {} + +func (*NetworkPolicyPort) ProtoMessage() {} + +func (*NetworkPolicySpec) ProtoMessage() {} + +func (*ReplicaSet) ProtoMessage() {} + +func (*ReplicaSetCondition) ProtoMessage() {} + +func (*ReplicaSetList) ProtoMessage() {} + +func (*ReplicaSetSpec) ProtoMessage() {} + +func (*ReplicaSetStatus) ProtoMessage() {} + +func (*RollbackConfig) ProtoMessage() {} + +func (*RollingUpdateDaemonSet) ProtoMessage() {} + +func (*RollingUpdateDeployment) ProtoMessage() {} + +func (*Scale) ProtoMessage() {} + +func (*ScaleSpec) ProtoMessage() {} + +func (*ScaleStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/extensions/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/extensions/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..bba6d5d9ddbd0 --- /dev/null +++ b/staging/src/k8s.io/api/extensions/v1beta1/zz_generated.model_name.go @@ -0,0 +1,247 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSet) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.DaemonSet" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSetCondition) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.DaemonSetCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSetList) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.DaemonSetList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSetSpec) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.DaemonSetSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSetStatus) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.DaemonSetStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DaemonSetUpdateStrategy) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.DaemonSetUpdateStrategy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Deployment) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.Deployment" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentCondition) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.DeploymentCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentList) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.DeploymentList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentRollback) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.DeploymentRollback" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentSpec) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.DeploymentSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentStatus) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.DeploymentStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeploymentStrategy) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.DeploymentStrategy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HTTPIngressPath) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.HTTPIngressPath" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HTTPIngressRuleValue) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IPBlock) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.IPBlock" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Ingress) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.Ingress" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressBackend) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.IngressBackend" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressList) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.IngressList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressLoadBalancerIngress) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.IngressLoadBalancerIngress" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressLoadBalancerStatus) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.IngressLoadBalancerStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressPortStatus) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.IngressPortStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressRule) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.IngressRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressRuleValue) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.IngressRuleValue" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressSpec) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.IngressSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressStatus) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.IngressStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressTLS) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.IngressTLS" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkPolicy) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.NetworkPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkPolicyEgressRule) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkPolicyIngressRule) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkPolicyList) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.NetworkPolicyList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkPolicyPeer) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.NetworkPolicyPeer" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkPolicyPort) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.NetworkPolicyPort" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkPolicySpec) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.NetworkPolicySpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicaSet) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.ReplicaSet" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicaSetCondition) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.ReplicaSetCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicaSetList) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.ReplicaSetList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicaSetSpec) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.ReplicaSetSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ReplicaSetStatus) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.ReplicaSetStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RollbackConfig) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.RollbackConfig" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RollingUpdateDaemonSet) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.RollingUpdateDaemonSet" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RollingUpdateDeployment) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.RollingUpdateDeployment" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Scale) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.Scale" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ScaleSpec) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.ScaleSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ScaleStatus) OpenAPIModelName() string { + return "io.k8s.api.extensions.v1beta1.ScaleStatus" +} diff --git a/staging/src/k8s.io/api/extensions/v1beta1/zz_generated.validations.go b/staging/src/k8s.io/api/extensions/v1beta1/zz_generated.validations.go index 6d2a1666ae31d..0c873efc3ad04 100644 --- a/staging/src/k8s.io/api/extensions/v1beta1/zz_generated.validations.go +++ b/staging/src/k8s.io/api/extensions/v1beta1/zz_generated.validations.go @@ -37,6 +37,7 @@ func init() { localSchemeBuilder.Register(RegisterValidations) } // RegisterValidations adds validation functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterValidations(scheme *runtime.Scheme) error { + // type Scale scheme.AddValidationFunc((*Scale)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList { switch op.Request.SubresourcePath() { case "/scale": @@ -47,6 +48,8 @@ func RegisterValidations(scheme *runtime.Scheme) error { return nil } +// Validate_Scale validates an instance of Scale according +// to declarative validation rules in the API schema. func Validate_Scale(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *Scale) (errs field.ErrorList) { // field Scale.TypeMeta has no validation // field Scale.ObjectMeta has no validation @@ -54,6 +57,11 @@ func Validate_Scale(ctx context.Context, op operation.Operation, fldPath *field. // field Scale.Spec errs = append(errs, func(fldPath *field.Path, obj, oldObj *ScaleSpec) (errs field.ErrorList) { + // don't revalidate unchanged data + if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { + return nil + } + // call the type's validation function errs = append(errs, Validate_ScaleSpec(ctx, op, fldPath, obj, oldObj)...) return }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *Scale) *ScaleSpec { return &oldObj.Spec }))...) @@ -62,14 +70,18 @@ func Validate_Scale(ctx context.Context, op operation.Operation, fldPath *field. return errs } +// Validate_ScaleSpec validates an instance of ScaleSpec according +// to declarative validation rules in the API schema. func Validate_ScaleSpec(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *ScaleSpec) (errs field.ErrorList) { // field ScaleSpec.Replicas errs = append(errs, func(fldPath *field.Path, obj, oldObj *int32) (errs field.ErrorList) { // optional value-type fields with zero-value defaults are purely documentation + // don't revalidate unchanged data if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) { - return nil // no changes + return nil } + // call field-attached validations errs = append(errs, validate.Minimum(ctx, op, fldPath, obj, oldObj, 0)...) return }(fldPath.Child("replicas"), &obj.Replicas, safe.Field(oldObj, func(oldObj *ScaleSpec) *int32 { return &oldObj.Replicas }))...) diff --git a/staging/src/k8s.io/api/flowcontrol/v1/doc.go b/staging/src/k8s.io/api/flowcontrol/v1/doc.go index ad5f457919148..b1367b9251649 100644 --- a/staging/src/k8s.io/api/flowcontrol/v1/doc.go +++ b/staging/src/k8s.io/api/flowcontrol/v1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.flowcontrol.v1 // +groupName=flowcontrol.apiserver.k8s.io diff --git a/staging/src/k8s.io/api/flowcontrol/v1/generated.pb.go b/staging/src/k8s.io/api/flowcontrol/v1/generated.pb.go index b342445f71bdb..d1f3186872f3b 100644 --- a/staging/src/k8s.io/api/flowcontrol/v1/generated.pb.go +++ b/staging/src/k8s.io/api/flowcontrol/v1/generated.pb.go @@ -24,801 +24,56 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } -func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } -func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} -func (*ExemptPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{0} -} -func (m *ExemptPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExemptPriorityLevelConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExemptPriorityLevelConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExemptPriorityLevelConfiguration.Merge(m, src) -} -func (m *ExemptPriorityLevelConfiguration) XXX_Size() int { - return m.Size() -} -func (m *ExemptPriorityLevelConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_ExemptPriorityLevelConfiguration.DiscardUnknown(m) -} +func (m *FlowSchema) Reset() { *m = FlowSchema{} } -var xxx_messageInfo_ExemptPriorityLevelConfiguration proto.InternalMessageInfo +func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } -func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } -func (*FlowDistinguisherMethod) ProtoMessage() {} -func (*FlowDistinguisherMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{1} -} -func (m *FlowDistinguisherMethod) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowDistinguisherMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowDistinguisherMethod) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowDistinguisherMethod.Merge(m, src) -} -func (m *FlowDistinguisherMethod) XXX_Size() int { - return m.Size() -} -func (m *FlowDistinguisherMethod) XXX_DiscardUnknown() { - xxx_messageInfo_FlowDistinguisherMethod.DiscardUnknown(m) -} +func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } -var xxx_messageInfo_FlowDistinguisherMethod proto.InternalMessageInfo +func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } -func (m *FlowSchema) Reset() { *m = FlowSchema{} } -func (*FlowSchema) ProtoMessage() {} -func (*FlowSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{2} -} -func (m *FlowSchema) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchema) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchema.Merge(m, src) -} -func (m *FlowSchema) XXX_Size() int { - return m.Size() -} -func (m *FlowSchema) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchema.DiscardUnknown(m) -} +func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } -var xxx_messageInfo_FlowSchema proto.InternalMessageInfo +func (m *GroupSubject) Reset() { *m = GroupSubject{} } -func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } -func (*FlowSchemaCondition) ProtoMessage() {} -func (*FlowSchemaCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{3} -} -func (m *FlowSchemaCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaCondition.Merge(m, src) -} -func (m *FlowSchemaCondition) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaCondition) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaCondition.DiscardUnknown(m) -} +func (m *LimitResponse) Reset() { *m = LimitResponse{} } -var xxx_messageInfo_FlowSchemaCondition proto.InternalMessageInfo +func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } -func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } -func (*FlowSchemaList) ProtoMessage() {} -func (*FlowSchemaList) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{4} -} -func (m *FlowSchemaList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaList) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaList.Merge(m, src) -} -func (m *FlowSchemaList) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaList) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaList.DiscardUnknown(m) -} +func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } -var xxx_messageInfo_FlowSchemaList proto.InternalMessageInfo +func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } -func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } -func (*FlowSchemaSpec) ProtoMessage() {} -func (*FlowSchemaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{5} -} -func (m *FlowSchemaSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaSpec.Merge(m, src) -} -func (m *FlowSchemaSpec) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaSpec) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaSpec.DiscardUnknown(m) -} +func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } -var xxx_messageInfo_FlowSchemaSpec proto.InternalMessageInfo +func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } -func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } -func (*FlowSchemaStatus) ProtoMessage() {} -func (*FlowSchemaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{6} -} -func (m *FlowSchemaStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaStatus.Merge(m, src) -} -func (m *FlowSchemaStatus) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaStatus) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaStatus.DiscardUnknown(m) -} +func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } -var xxx_messageInfo_FlowSchemaStatus proto.InternalMessageInfo +func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } -func (m *GroupSubject) Reset() { *m = GroupSubject{} } -func (*GroupSubject) ProtoMessage() {} -func (*GroupSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{7} -} -func (m *GroupSubject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GroupSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GroupSubject) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupSubject.Merge(m, src) -} -func (m *GroupSubject) XXX_Size() int { - return m.Size() -} -func (m *GroupSubject) XXX_DiscardUnknown() { - xxx_messageInfo_GroupSubject.DiscardUnknown(m) -} +func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } -var xxx_messageInfo_GroupSubject proto.InternalMessageInfo +func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } -func (m *LimitResponse) Reset() { *m = LimitResponse{} } -func (*LimitResponse) ProtoMessage() {} -func (*LimitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{8} -} -func (m *LimitResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LimitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LimitResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LimitResponse.Merge(m, src) -} -func (m *LimitResponse) XXX_Size() int { - return m.Size() -} -func (m *LimitResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LimitResponse.DiscardUnknown(m) -} +func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } -var xxx_messageInfo_LimitResponse proto.InternalMessageInfo +func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } -func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } -func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} -func (*LimitedPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{9} -} -func (m *LimitedPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LimitedPriorityLevelConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LimitedPriorityLevelConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_LimitedPriorityLevelConfiguration.Merge(m, src) -} -func (m *LimitedPriorityLevelConfiguration) XXX_Size() int { - return m.Size() -} -func (m *LimitedPriorityLevelConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_LimitedPriorityLevelConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_LimitedPriorityLevelConfiguration proto.InternalMessageInfo - -func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } -func (*NonResourcePolicyRule) ProtoMessage() {} -func (*NonResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{10} -} -func (m *NonResourcePolicyRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NonResourcePolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NonResourcePolicyRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_NonResourcePolicyRule.Merge(m, src) -} -func (m *NonResourcePolicyRule) XXX_Size() int { - return m.Size() -} -func (m *NonResourcePolicyRule) XXX_DiscardUnknown() { - xxx_messageInfo_NonResourcePolicyRule.DiscardUnknown(m) -} - -var xxx_messageInfo_NonResourcePolicyRule proto.InternalMessageInfo - -func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } -func (*PolicyRulesWithSubjects) ProtoMessage() {} -func (*PolicyRulesWithSubjects) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{11} -} -func (m *PolicyRulesWithSubjects) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PolicyRulesWithSubjects) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PolicyRulesWithSubjects) XXX_Merge(src proto.Message) { - xxx_messageInfo_PolicyRulesWithSubjects.Merge(m, src) -} -func (m *PolicyRulesWithSubjects) XXX_Size() int { - return m.Size() -} -func (m *PolicyRulesWithSubjects) XXX_DiscardUnknown() { - xxx_messageInfo_PolicyRulesWithSubjects.DiscardUnknown(m) -} +func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } -var xxx_messageInfo_PolicyRulesWithSubjects proto.InternalMessageInfo +func (m *Subject) Reset() { *m = Subject{} } -func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } -func (*PriorityLevelConfiguration) ProtoMessage() {} -func (*PriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{12} -} -func (m *PriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfiguration.Merge(m, src) -} -func (m *PriorityLevelConfiguration) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfiguration proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } -func (*PriorityLevelConfigurationCondition) ProtoMessage() {} -func (*PriorityLevelConfigurationCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{13} -} -func (m *PriorityLevelConfigurationCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationCondition.Merge(m, src) -} -func (m *PriorityLevelConfigurationCondition) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationCondition) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationCondition proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } -func (*PriorityLevelConfigurationList) ProtoMessage() {} -func (*PriorityLevelConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{14} -} -func (m *PriorityLevelConfigurationList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationList.Merge(m, src) -} -func (m *PriorityLevelConfigurationList) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationList) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationList.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationList proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } -func (*PriorityLevelConfigurationReference) ProtoMessage() {} -func (*PriorityLevelConfigurationReference) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{15} -} -func (m *PriorityLevelConfigurationReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationReference.Merge(m, src) -} -func (m *PriorityLevelConfigurationReference) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationReference) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationReference.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationReference proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } -func (*PriorityLevelConfigurationSpec) ProtoMessage() {} -func (*PriorityLevelConfigurationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{16} -} -func (m *PriorityLevelConfigurationSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationSpec.Merge(m, src) -} -func (m *PriorityLevelConfigurationSpec) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationSpec) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationSpec proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } -func (*PriorityLevelConfigurationStatus) ProtoMessage() {} -func (*PriorityLevelConfigurationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{17} -} -func (m *PriorityLevelConfigurationStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationStatus.Merge(m, src) -} -func (m *PriorityLevelConfigurationStatus) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationStatus proto.InternalMessageInfo - -func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } -func (*QueuingConfiguration) ProtoMessage() {} -func (*QueuingConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{18} -} -func (m *QueuingConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueuingConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *QueuingConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueuingConfiguration.Merge(m, src) -} -func (m *QueuingConfiguration) XXX_Size() int { - return m.Size() -} -func (m *QueuingConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_QueuingConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_QueuingConfiguration proto.InternalMessageInfo - -func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } -func (*ResourcePolicyRule) ProtoMessage() {} -func (*ResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{19} -} -func (m *ResourcePolicyRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourcePolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourcePolicyRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourcePolicyRule.Merge(m, src) -} -func (m *ResourcePolicyRule) XXX_Size() int { - return m.Size() -} -func (m *ResourcePolicyRule) XXX_DiscardUnknown() { - xxx_messageInfo_ResourcePolicyRule.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourcePolicyRule proto.InternalMessageInfo - -func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } -func (*ServiceAccountSubject) ProtoMessage() {} -func (*ServiceAccountSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{20} -} -func (m *ServiceAccountSubject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceAccountSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceAccountSubject) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceAccountSubject.Merge(m, src) -} -func (m *ServiceAccountSubject) XXX_Size() int { - return m.Size() -} -func (m *ServiceAccountSubject) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceAccountSubject.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceAccountSubject proto.InternalMessageInfo - -func (m *Subject) Reset() { *m = Subject{} } -func (*Subject) ProtoMessage() {} -func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{21} -} -func (m *Subject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Subject) XXX_Merge(src proto.Message) { - xxx_messageInfo_Subject.Merge(m, src) -} -func (m *Subject) XXX_Size() int { - return m.Size() -} -func (m *Subject) XXX_DiscardUnknown() { - xxx_messageInfo_Subject.DiscardUnknown(m) -} - -var xxx_messageInfo_Subject proto.InternalMessageInfo - -func (m *UserSubject) Reset() { *m = UserSubject{} } -func (*UserSubject) ProtoMessage() {} -func (*UserSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_5d08a1401821035d, []int{22} -} -func (m *UserSubject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *UserSubject) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserSubject.Merge(m, src) -} -func (m *UserSubject) XXX_Size() int { - return m.Size() -} -func (m *UserSubject) XXX_DiscardUnknown() { - xxx_messageInfo_UserSubject.DiscardUnknown(m) -} - -var xxx_messageInfo_UserSubject proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ExemptPriorityLevelConfiguration)(nil), "k8s.io.api.flowcontrol.v1.ExemptPriorityLevelConfiguration") - proto.RegisterType((*FlowDistinguisherMethod)(nil), "k8s.io.api.flowcontrol.v1.FlowDistinguisherMethod") - proto.RegisterType((*FlowSchema)(nil), "k8s.io.api.flowcontrol.v1.FlowSchema") - proto.RegisterType((*FlowSchemaCondition)(nil), "k8s.io.api.flowcontrol.v1.FlowSchemaCondition") - proto.RegisterType((*FlowSchemaList)(nil), "k8s.io.api.flowcontrol.v1.FlowSchemaList") - proto.RegisterType((*FlowSchemaSpec)(nil), "k8s.io.api.flowcontrol.v1.FlowSchemaSpec") - proto.RegisterType((*FlowSchemaStatus)(nil), "k8s.io.api.flowcontrol.v1.FlowSchemaStatus") - proto.RegisterType((*GroupSubject)(nil), "k8s.io.api.flowcontrol.v1.GroupSubject") - proto.RegisterType((*LimitResponse)(nil), "k8s.io.api.flowcontrol.v1.LimitResponse") - proto.RegisterType((*LimitedPriorityLevelConfiguration)(nil), "k8s.io.api.flowcontrol.v1.LimitedPriorityLevelConfiguration") - proto.RegisterType((*NonResourcePolicyRule)(nil), "k8s.io.api.flowcontrol.v1.NonResourcePolicyRule") - proto.RegisterType((*PolicyRulesWithSubjects)(nil), "k8s.io.api.flowcontrol.v1.PolicyRulesWithSubjects") - proto.RegisterType((*PriorityLevelConfiguration)(nil), "k8s.io.api.flowcontrol.v1.PriorityLevelConfiguration") - proto.RegisterType((*PriorityLevelConfigurationCondition)(nil), "k8s.io.api.flowcontrol.v1.PriorityLevelConfigurationCondition") - proto.RegisterType((*PriorityLevelConfigurationList)(nil), "k8s.io.api.flowcontrol.v1.PriorityLevelConfigurationList") - proto.RegisterType((*PriorityLevelConfigurationReference)(nil), "k8s.io.api.flowcontrol.v1.PriorityLevelConfigurationReference") - proto.RegisterType((*PriorityLevelConfigurationSpec)(nil), "k8s.io.api.flowcontrol.v1.PriorityLevelConfigurationSpec") - proto.RegisterType((*PriorityLevelConfigurationStatus)(nil), "k8s.io.api.flowcontrol.v1.PriorityLevelConfigurationStatus") - proto.RegisterType((*QueuingConfiguration)(nil), "k8s.io.api.flowcontrol.v1.QueuingConfiguration") - proto.RegisterType((*ResourcePolicyRule)(nil), "k8s.io.api.flowcontrol.v1.ResourcePolicyRule") - proto.RegisterType((*ServiceAccountSubject)(nil), "k8s.io.api.flowcontrol.v1.ServiceAccountSubject") - proto.RegisterType((*Subject)(nil), "k8s.io.api.flowcontrol.v1.Subject") - proto.RegisterType((*UserSubject)(nil), "k8s.io.api.flowcontrol.v1.UserSubject") -} - -func init() { - proto.RegisterFile("k8s.io/api/flowcontrol/v1/generated.proto", fileDescriptor_5d08a1401821035d) -} - -var fileDescriptor_5d08a1401821035d = []byte{ - // 1575 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4b, 0x6f, 0xdb, 0x56, - 0x16, 0x36, 0x65, 0xc9, 0xb6, 0x8e, 0x9f, 0xb9, 0x8e, 0x61, 0xc5, 0x19, 0x48, 0x0e, 0x07, 0x93, - 0xc7, 0x64, 0x42, 0x25, 0xc6, 0x64, 0x26, 0x41, 0x66, 0x26, 0x08, 0x93, 0x4c, 0x5e, 0xb6, 0xe3, - 0x5c, 0xe5, 0x51, 0xa4, 0x05, 0x5a, 0x9a, 0xba, 0x96, 0x18, 0x8b, 0x8f, 0xf2, 0x92, 0x72, 0x5d, - 0xa0, 0x40, 0x7f, 0x42, 0x56, 0x5d, 0x76, 0xd1, 0xfe, 0x83, 0xae, 0x8a, 0x76, 0xd3, 0x65, 0x76, - 0xcd, 0x32, 0xed, 0x42, 0x68, 0xd4, 0xbf, 0xd0, 0x45, 0x9b, 0x55, 0x71, 0x2f, 0x2f, 0x49, 0x51, - 0x12, 0x69, 0xc1, 0x8b, 0x74, 0xd3, 0x9d, 0x79, 0xce, 0x77, 0xbe, 0x73, 0xef, 0xb9, 0xe7, 0x25, - 0xc3, 0x99, 0xdd, 0x4b, 0x54, 0x31, 0xec, 0xaa, 0xe6, 0x18, 0xd5, 0x9d, 0x96, 0xbd, 0xa7, 0xdb, - 0x96, 0xe7, 0xda, 0xad, 0x6a, 0xfb, 0x42, 0xb5, 0x41, 0x2c, 0xe2, 0x6a, 0x1e, 0xa9, 0x2b, 0x8e, - 0x6b, 0x7b, 0x36, 0x3a, 0x16, 0x40, 0x15, 0xcd, 0x31, 0x94, 0x1e, 0xa8, 0xd2, 0xbe, 0xb0, 0x72, - 0xae, 0x61, 0x78, 0x4d, 0x7f, 0x5b, 0xd1, 0x6d, 0xb3, 0xda, 0xb0, 0x1b, 0x76, 0x95, 0x5b, 0x6c, - 0xfb, 0x3b, 0xfc, 0x8b, 0x7f, 0xf0, 0xbf, 0x02, 0xa6, 0x95, 0x7f, 0xc6, 0x4e, 0x4d, 0x4d, 0x6f, - 0x1a, 0x16, 0x71, 0xf7, 0xab, 0xce, 0x6e, 0x83, 0x09, 0x68, 0xd5, 0x24, 0x9e, 0x36, 0xc4, 0xff, - 0x4a, 0x35, 0xcd, 0xca, 0xf5, 0x2d, 0xcf, 0x30, 0xc9, 0x80, 0xc1, 0xbf, 0x0e, 0x32, 0xa0, 0x7a, - 0x93, 0x98, 0x5a, 0xbf, 0x9d, 0xfc, 0xad, 0x04, 0xab, 0x37, 0x3f, 0x22, 0xa6, 0xe3, 0x6d, 0xb9, - 0x86, 0xed, 0x1a, 0xde, 0xfe, 0x3a, 0x69, 0x93, 0xd6, 0x75, 0xdb, 0xda, 0x31, 0x1a, 0xbe, 0xab, - 0x79, 0x86, 0x6d, 0xa1, 0x77, 0xa0, 0x64, 0xd9, 0xa6, 0x61, 0x69, 0x4c, 0xae, 0xfb, 0xae, 0x4b, - 0x2c, 0x7d, 0xbf, 0xd6, 0xd4, 0x5c, 0x42, 0x4b, 0xd2, 0xaa, 0x74, 0xba, 0xa0, 0xfe, 0xa5, 0xdb, - 0xa9, 0x94, 0x36, 0x53, 0x30, 0x38, 0xd5, 0x1a, 0xfd, 0x17, 0xe6, 0x5b, 0xc4, 0xaa, 0x6b, 0xdb, - 0x2d, 0xb2, 0x45, 0x5c, 0x9d, 0x58, 0x5e, 0x29, 0xc7, 0x09, 0x17, 0xbb, 0x9d, 0xca, 0xfc, 0x7a, - 0x52, 0x85, 0xfb, 0xb1, 0xf2, 0x53, 0x58, 0xfe, 0x7f, 0xcb, 0xde, 0xbb, 0x61, 0x50, 0xcf, 0xb0, - 0x1a, 0xbe, 0x41, 0x9b, 0xc4, 0xdd, 0x20, 0x5e, 0xd3, 0xae, 0xa3, 0xab, 0x90, 0xf7, 0xf6, 0x1d, - 0xc2, 0xcf, 0x57, 0x54, 0xcf, 0xbe, 0xe8, 0x54, 0xc6, 0xba, 0x9d, 0x4a, 0xfe, 0xe1, 0xbe, 0x43, - 0xde, 0x74, 0x2a, 0xc7, 0x53, 0xcc, 0x98, 0x1a, 0x73, 0x43, 0xf9, 0x79, 0x0e, 0x80, 0xa1, 0x6a, - 0x3c, 0x70, 0xe8, 0x03, 0x98, 0x62, 0x8f, 0x55, 0xd7, 0x3c, 0x8d, 0x73, 0x4e, 0xaf, 0x9d, 0x57, - 0xe2, 0x24, 0x89, 0x62, 0xae, 0x38, 0xbb, 0x0d, 0x26, 0xa0, 0x0a, 0x43, 0x2b, 0xed, 0x0b, 0xca, - 0xfd, 0xed, 0x67, 0x44, 0xf7, 0x36, 0x88, 0xa7, 0xa9, 0x48, 0x9c, 0x02, 0x62, 0x19, 0x8e, 0x58, - 0xd1, 0x3d, 0xc8, 0x53, 0x87, 0xe8, 0x3c, 0x00, 0xd3, 0x6b, 0x67, 0x94, 0xd4, 0x14, 0x54, 0xe2, - 0x63, 0xd5, 0x1c, 0xa2, 0xab, 0x33, 0xe1, 0xe5, 0xd8, 0x17, 0xe6, 0x24, 0xa8, 0x06, 0x13, 0xd4, - 0xd3, 0x3c, 0x9f, 0x96, 0xc6, 0x39, 0xdd, 0xd9, 0xd1, 0xe8, 0xb8, 0x89, 0x3a, 0x27, 0x08, 0x27, - 0x82, 0x6f, 0x2c, 0xa8, 0xe4, 0x57, 0x39, 0x58, 0x8c, 0xc1, 0xd7, 0x6d, 0xab, 0x6e, 0xf0, 0xfc, - 0xb8, 0x92, 0x88, 0xf5, 0xa9, 0xbe, 0x58, 0x2f, 0x0f, 0x31, 0x89, 0xe3, 0x8c, 0x2e, 0x47, 0x27, - 0xcd, 0x71, 0xf3, 0x13, 0x49, 0xe7, 0x6f, 0x3a, 0x95, 0xf9, 0xc8, 0x2c, 0x79, 0x1e, 0xd4, 0x06, - 0xd4, 0xd2, 0xa8, 0xf7, 0xd0, 0xd5, 0x2c, 0x1a, 0xd0, 0x1a, 0x26, 0x11, 0x17, 0xfe, 0xfb, 0x68, - 0xaf, 0xc3, 0x2c, 0xd4, 0x15, 0xe1, 0x12, 0xad, 0x0f, 0xb0, 0xe1, 0x21, 0x1e, 0xd0, 0x49, 0x98, - 0x70, 0x89, 0x46, 0x6d, 0xab, 0x94, 0xe7, 0x47, 0x8e, 0xe2, 0x85, 0xb9, 0x14, 0x0b, 0x2d, 0x3a, - 0x03, 0x93, 0x26, 0xa1, 0x54, 0x6b, 0x90, 0x52, 0x81, 0x03, 0xe7, 0x05, 0x70, 0x72, 0x23, 0x10, - 0xe3, 0x50, 0x2f, 0x7f, 0x23, 0xc1, 0x5c, 0x1c, 0xa7, 0x75, 0x83, 0x7a, 0xe8, 0xbd, 0x81, 0x8c, - 0x53, 0x46, 0xbb, 0x13, 0xb3, 0xe6, 0xf9, 0xb6, 0x20, 0xdc, 0x4d, 0x85, 0x92, 0x9e, 0x6c, 0xbb, - 0x0b, 0x05, 0xc3, 0x23, 0x26, 0x8b, 0xfa, 0xf8, 0xe9, 0xe9, 0xb5, 0xbf, 0x8d, 0x94, 0x1f, 0xea, - 0xac, 0x60, 0x2c, 0xdc, 0x61, 0xb6, 0x38, 0xa0, 0x90, 0x7f, 0x18, 0xef, 0x3d, 0x3c, 0xcb, 0x42, - 0xf4, 0x85, 0x04, 0x2b, 0x4e, 0x6a, 0x47, 0x11, 0xf7, 0xf9, 0x5f, 0x86, 0xd3, 0xf4, 0x76, 0x84, - 0xc9, 0x0e, 0x61, 0x3d, 0x84, 0xa8, 0xb2, 0x38, 0xcd, 0x4a, 0x06, 0x38, 0xe3, 0x14, 0xe8, 0x2e, - 0x20, 0x53, 0xf3, 0x58, 0x1c, 0x1b, 0x5b, 0x2e, 0xd1, 0x49, 0x9d, 0xb1, 0x8a, 0x06, 0x14, 0xe5, - 0xc4, 0xc6, 0x00, 0x02, 0x0f, 0xb1, 0x42, 0x9f, 0xc0, 0x62, 0x7d, 0xb0, 0x9f, 0x88, 0x64, 0x5c, - 0x3b, 0x20, 0xba, 0x43, 0x3a, 0x91, 0xba, 0xdc, 0xed, 0x54, 0x16, 0x87, 0x28, 0xf0, 0x30, 0x3f, - 0xe8, 0x09, 0x14, 0x5c, 0xbf, 0x45, 0x68, 0x29, 0xcf, 0x9f, 0x33, 0xcb, 0xe1, 0x96, 0xdd, 0x32, - 0xf4, 0x7d, 0xcc, 0xd0, 0x4f, 0x0c, 0xaf, 0x59, 0xf3, 0x79, 0x33, 0xa2, 0xf1, 0xdb, 0x72, 0x15, - 0x0e, 0xf8, 0xe4, 0x36, 0x2c, 0xf4, 0xf7, 0x07, 0xb4, 0x0d, 0xa0, 0x87, 0x25, 0xc9, 0x26, 0xc0, - 0x78, 0x5f, 0x6e, 0xa6, 0x27, 0x50, 0x54, 0xc9, 0x71, 0x2f, 0x8c, 0x44, 0x14, 0xf7, 0xb0, 0xca, - 0xe7, 0x61, 0xe6, 0x96, 0x6b, 0xfb, 0x8e, 0x38, 0x1e, 0x5a, 0x85, 0xbc, 0xa5, 0x99, 0x61, 0x8f, - 0x89, 0x5a, 0xde, 0xa6, 0x66, 0x12, 0xcc, 0x35, 0xf2, 0xe7, 0x12, 0xcc, 0xae, 0x1b, 0xa6, 0xe1, - 0x61, 0x42, 0x1d, 0xdb, 0xa2, 0x04, 0x5d, 0x4c, 0xf4, 0xa5, 0x13, 0x7d, 0x7d, 0xe9, 0x48, 0x02, - 0xdc, 0xd3, 0x91, 0x1e, 0xc3, 0xe4, 0x87, 0x3e, 0xf1, 0x0d, 0xab, 0x21, 0x7a, 0x71, 0x35, 0xe3, - 0x6e, 0x0f, 0x02, 0x64, 0x22, 0xb1, 0xd4, 0x69, 0x56, 0xe3, 0x42, 0x83, 0x43, 0x32, 0xf9, 0x97, - 0x1c, 0x9c, 0xe0, 0x3e, 0x49, 0xfd, 0x0f, 0x19, 0xb6, 0x04, 0x66, 0x5b, 0xbd, 0x57, 0x16, 0xb7, - 0x3b, 0x9d, 0x71, 0xbb, 0x44, 0x88, 0xd4, 0x25, 0x11, 0xc1, 0x64, 0x98, 0x71, 0x92, 0x75, 0xd8, - 0x4c, 0x1f, 0x1f, 0x7d, 0xa6, 0xa3, 0xfb, 0xb0, 0xb4, 0x6d, 0xbb, 0xae, 0xbd, 0x67, 0x58, 0x0d, - 0xee, 0x27, 0x24, 0xc9, 0x73, 0x92, 0x63, 0xdd, 0x4e, 0x65, 0x49, 0x1d, 0x06, 0xc0, 0xc3, 0xed, - 0xe4, 0x3d, 0x58, 0xda, 0x64, 0x5d, 0x83, 0xda, 0xbe, 0xab, 0x93, 0x38, 0xfb, 0x51, 0x05, 0x0a, - 0x6d, 0xe2, 0x6e, 0x07, 0x19, 0x5c, 0x54, 0x8b, 0x2c, 0xf7, 0x1f, 0x33, 0x01, 0x0e, 0xe4, 0xec, - 0x26, 0x56, 0x6c, 0xf9, 0x08, 0xaf, 0xd3, 0xd2, 0x04, 0x87, 0xf2, 0x9b, 0x6c, 0x26, 0x55, 0xb8, - 0x1f, 0x2b, 0x7f, 0x9f, 0x83, 0xe5, 0x94, 0x62, 0x43, 0x5b, 0x30, 0x45, 0xc5, 0xdf, 0xa2, 0x80, - 0xe4, 0x8c, 0x67, 0x10, 0x66, 0x71, 0x43, 0x0f, 0x79, 0x70, 0xc4, 0x82, 0x9e, 0xc1, 0xac, 0x2b, - 0xbc, 0x73, 0x77, 0xa2, 0xb1, 0x9f, 0xcb, 0xa0, 0x1d, 0x8c, 0x49, 0xfc, 0xc4, 0xb8, 0x97, 0x0b, - 0x27, 0xa9, 0x51, 0x1b, 0x16, 0x7a, 0x2e, 0x1b, 0xb8, 0x1b, 0xe7, 0xee, 0xce, 0x67, 0xb8, 0x1b, - 0xfa, 0x0a, 0x6a, 0x49, 0x78, 0x5c, 0xd8, 0xec, 0x63, 0xc4, 0x03, 0x3e, 0xe4, 0xef, 0x72, 0x90, - 0xd1, 0xeb, 0xdf, 0xc2, 0x8e, 0xf6, 0x6e, 0x62, 0x47, 0xbb, 0x7c, 0xa8, 0xf9, 0x95, 0xba, 0xb3, - 0xe9, 0x7d, 0x3b, 0xdb, 0x95, 0xc3, 0xd1, 0x67, 0xef, 0x70, 0xbf, 0xe6, 0xe0, 0xaf, 0xe9, 0xc6, - 0xf1, 0x4e, 0x77, 0x2f, 0xd1, 0x3b, 0xff, 0xdd, 0xd7, 0x3b, 0x4f, 0x8d, 0x40, 0xf1, 0xe7, 0x8e, - 0xd7, 0xb7, 0xe3, 0xfd, 0x28, 0x41, 0x39, 0x3d, 0x6e, 0x6f, 0x61, 0xe7, 0x7b, 0x9a, 0xdc, 0xf9, - 0x2e, 0x1e, 0x2a, 0xbf, 0x52, 0x76, 0xc0, 0x5b, 0x59, 0x69, 0x15, 0xad, 0x6c, 0x23, 0x8c, 0xf1, - 0x2f, 0x73, 0x59, 0x51, 0xe2, 0xcb, 0xe5, 0x01, 0xbf, 0x37, 0x12, 0xd6, 0x37, 0x2d, 0x36, 0x5c, - 0x4c, 0x36, 0x1f, 0x82, 0x5c, 0xd4, 0x61, 0xb2, 0x15, 0x0c, 0x61, 0x51, 0xc5, 0xff, 0x39, 0x68, - 0xfe, 0x65, 0x8d, 0xeb, 0x60, 0xd4, 0x0b, 0x18, 0x0e, 0x99, 0xd1, 0xfb, 0x30, 0x41, 0xf8, 0xaf, - 0xea, 0x11, 0x4a, 0xf9, 0xa0, 0x9f, 0xdf, 0x2a, 0xb0, 0xb4, 0x0b, 0x50, 0x58, 0xd0, 0xca, 0x9f, - 0x49, 0xb0, 0x7a, 0x50, 0x0f, 0x40, 0xee, 0x90, 0x3d, 0xed, 0x70, 0x3b, 0xf7, 0xe8, 0x7b, 0xdb, - 0x57, 0x12, 0x1c, 0x1d, 0xb6, 0x13, 0xb1, 0x82, 0x62, 0x8b, 0x50, 0xb4, 0xc5, 0x44, 0x05, 0xf5, - 0x80, 0x4b, 0xb1, 0xd0, 0xa2, 0x7f, 0xc0, 0x54, 0x53, 0xb3, 0xea, 0x35, 0xe3, 0xe3, 0x70, 0x15, - 0x8f, 0x52, 0xfa, 0xb6, 0x90, 0xe3, 0x08, 0x81, 0x6e, 0xc0, 0x02, 0xb7, 0x5b, 0x27, 0x56, 0xc3, - 0x6b, 0xf2, 0x77, 0x10, 0xdb, 0x46, 0x34, 0x57, 0x1e, 0xf4, 0xe9, 0xf1, 0x80, 0x85, 0xfc, 0x9b, - 0x04, 0xe8, 0x30, 0x0b, 0xc2, 0x59, 0x28, 0x6a, 0x8e, 0xc1, 0xf7, 0xd4, 0xa0, 0xa8, 0x8a, 0xea, - 0x6c, 0xb7, 0x53, 0x29, 0x5e, 0xdb, 0xba, 0x13, 0x08, 0x71, 0xac, 0x67, 0xe0, 0x70, 0x8a, 0x06, - 0xd3, 0x52, 0x80, 0x43, 0xc7, 0x14, 0xc7, 0x7a, 0x74, 0x09, 0x66, 0xf4, 0x96, 0x4f, 0x3d, 0xe2, - 0xd6, 0x74, 0xdb, 0x21, 0xbc, 0x09, 0x4d, 0xa9, 0x47, 0xc5, 0x9d, 0x66, 0xae, 0xf7, 0xe8, 0x70, - 0x02, 0x89, 0x14, 0x00, 0x56, 0x47, 0xd4, 0xd1, 0x98, 0x9f, 0x02, 0xf7, 0x33, 0xc7, 0x1e, 0x6c, - 0x33, 0x92, 0xe2, 0x1e, 0x84, 0xfc, 0x0c, 0x96, 0x6a, 0xc4, 0x6d, 0x1b, 0x3a, 0xb9, 0xa6, 0xeb, - 0xb6, 0x6f, 0x79, 0xe1, 0xc6, 0x5d, 0x85, 0x62, 0x04, 0x13, 0xa5, 0x76, 0x44, 0xf8, 0x2f, 0x46, - 0x5c, 0x38, 0xc6, 0x44, 0xb5, 0x9d, 0x4b, 0xad, 0xed, 0xaf, 0x73, 0x30, 0x19, 0xd3, 0xe7, 0x77, - 0x0d, 0xab, 0x2e, 0x98, 0x8f, 0x87, 0xe8, 0x7b, 0x86, 0x55, 0x7f, 0xd3, 0xa9, 0x4c, 0x0b, 0x18, - 0xfb, 0xc4, 0x1c, 0x88, 0x6e, 0x40, 0xde, 0xa7, 0xc4, 0x15, 0x55, 0x7b, 0x32, 0x23, 0x8f, 0x1f, - 0x51, 0xe2, 0x86, 0x2b, 0xd3, 0x14, 0x23, 0x65, 0x02, 0xcc, 0xad, 0xd1, 0x6d, 0x28, 0x34, 0xd8, - 0x7b, 0x88, 0xc2, 0x3c, 0x95, 0x41, 0xd3, 0xfb, 0xfb, 0x23, 0x78, 0x7c, 0x2e, 0xc1, 0x01, 0x01, - 0x6a, 0xc1, 0x1c, 0x4d, 0x04, 0x8e, 0x3f, 0x52, 0xf6, 0x0a, 0x34, 0x34, 0xd2, 0x2a, 0xea, 0x76, - 0x2a, 0x73, 0x49, 0x15, 0xee, 0xe3, 0x96, 0xab, 0x30, 0xdd, 0x73, 0xad, 0x83, 0xfb, 0xa8, 0x7a, - 0xf5, 0xc5, 0xeb, 0xf2, 0xd8, 0xcb, 0xd7, 0xe5, 0xb1, 0x57, 0xaf, 0xcb, 0x63, 0x9f, 0x76, 0xcb, - 0xd2, 0x8b, 0x6e, 0x59, 0x7a, 0xd9, 0x2d, 0x4b, 0xaf, 0xba, 0x65, 0xe9, 0xa7, 0x6e, 0x59, 0x7a, - 0xfe, 0x73, 0x79, 0xec, 0xe9, 0xb1, 0xd4, 0xff, 0x89, 0xfe, 0x1e, 0x00, 0x00, 0xff, 0xff, 0x16, - 0x4e, 0x14, 0xcf, 0x2f, 0x15, 0x00, 0x00, -} +func (m *UserSubject) Reset() { *m = UserSubject{} } func (m *ExemptPriorityLevelConfiguration) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/flowcontrol/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/flowcontrol/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..51612dee82634 --- /dev/null +++ b/staging/src/k8s.io/api/flowcontrol/v1/generated.protomessage.pb.go @@ -0,0 +1,68 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} + +func (*FlowDistinguisherMethod) ProtoMessage() {} + +func (*FlowSchema) ProtoMessage() {} + +func (*FlowSchemaCondition) ProtoMessage() {} + +func (*FlowSchemaList) ProtoMessage() {} + +func (*FlowSchemaSpec) ProtoMessage() {} + +func (*FlowSchemaStatus) ProtoMessage() {} + +func (*GroupSubject) ProtoMessage() {} + +func (*LimitResponse) ProtoMessage() {} + +func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} + +func (*NonResourcePolicyRule) ProtoMessage() {} + +func (*PolicyRulesWithSubjects) ProtoMessage() {} + +func (*PriorityLevelConfiguration) ProtoMessage() {} + +func (*PriorityLevelConfigurationCondition) ProtoMessage() {} + +func (*PriorityLevelConfigurationList) ProtoMessage() {} + +func (*PriorityLevelConfigurationReference) ProtoMessage() {} + +func (*PriorityLevelConfigurationSpec) ProtoMessage() {} + +func (*PriorityLevelConfigurationStatus) ProtoMessage() {} + +func (*QueuingConfiguration) ProtoMessage() {} + +func (*ResourcePolicyRule) ProtoMessage() {} + +func (*ServiceAccountSubject) ProtoMessage() {} + +func (*Subject) ProtoMessage() {} + +func (*UserSubject) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/flowcontrol/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/flowcontrol/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..a3bfb2c5dc4df --- /dev/null +++ b/staging/src/k8s.io/api/flowcontrol/v1/zz_generated.model_name.go @@ -0,0 +1,137 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExemptPriorityLevelConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.ExemptPriorityLevelConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowDistinguisherMethod) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.FlowDistinguisherMethod" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchema) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.FlowSchema" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaCondition) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.FlowSchemaCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaList) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.FlowSchemaList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaSpec) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.FlowSchemaSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaStatus) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.FlowSchemaStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GroupSubject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.GroupSubject" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LimitResponse) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.LimitResponse" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LimitedPriorityLevelConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.LimitedPriorityLevelConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NonResourcePolicyRule) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.NonResourcePolicyRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PolicyRulesWithSubjects) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.PolicyRulesWithSubjects" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationCondition) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationList) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationReference) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationSpec) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationStatus) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in QueuingConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.QueuingConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourcePolicyRule) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.ResourcePolicyRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceAccountSubject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.ServiceAccountSubject" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Subject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.Subject" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in UserSubject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1.UserSubject" +} diff --git a/staging/src/k8s.io/api/flowcontrol/v1beta1/doc.go b/staging/src/k8s.io/api/flowcontrol/v1beta1/doc.go index 20268c1f2dad5..e66df16d6a07c 100644 --- a/staging/src/k8s.io/api/flowcontrol/v1beta1/doc.go +++ b/staging/src/k8s.io/api/flowcontrol/v1beta1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.flowcontrol.v1beta1 // +groupName=flowcontrol.apiserver.k8s.io diff --git a/staging/src/k8s.io/api/flowcontrol/v1beta1/generated.pb.go b/staging/src/k8s.io/api/flowcontrol/v1beta1/generated.pb.go index 96e368f6fdb9b..de8950c212bf8 100644 --- a/staging/src/k8s.io/api/flowcontrol/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/flowcontrol/v1beta1/generated.pb.go @@ -24,802 +24,56 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } -func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } -func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} -func (*ExemptPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{0} -} -func (m *ExemptPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExemptPriorityLevelConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExemptPriorityLevelConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExemptPriorityLevelConfiguration.Merge(m, src) -} -func (m *ExemptPriorityLevelConfiguration) XXX_Size() int { - return m.Size() -} -func (m *ExemptPriorityLevelConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_ExemptPriorityLevelConfiguration.DiscardUnknown(m) -} +func (m *FlowSchema) Reset() { *m = FlowSchema{} } -var xxx_messageInfo_ExemptPriorityLevelConfiguration proto.InternalMessageInfo +func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } -func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } -func (*FlowDistinguisherMethod) ProtoMessage() {} -func (*FlowDistinguisherMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{1} -} -func (m *FlowDistinguisherMethod) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowDistinguisherMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowDistinguisherMethod) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowDistinguisherMethod.Merge(m, src) -} -func (m *FlowDistinguisherMethod) XXX_Size() int { - return m.Size() -} -func (m *FlowDistinguisherMethod) XXX_DiscardUnknown() { - xxx_messageInfo_FlowDistinguisherMethod.DiscardUnknown(m) -} +func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } -var xxx_messageInfo_FlowDistinguisherMethod proto.InternalMessageInfo +func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } -func (m *FlowSchema) Reset() { *m = FlowSchema{} } -func (*FlowSchema) ProtoMessage() {} -func (*FlowSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{2} -} -func (m *FlowSchema) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchema) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchema.Merge(m, src) -} -func (m *FlowSchema) XXX_Size() int { - return m.Size() -} -func (m *FlowSchema) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchema.DiscardUnknown(m) -} +func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } -var xxx_messageInfo_FlowSchema proto.InternalMessageInfo +func (m *GroupSubject) Reset() { *m = GroupSubject{} } -func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } -func (*FlowSchemaCondition) ProtoMessage() {} -func (*FlowSchemaCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{3} -} -func (m *FlowSchemaCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaCondition.Merge(m, src) -} -func (m *FlowSchemaCondition) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaCondition) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaCondition.DiscardUnknown(m) -} +func (m *LimitResponse) Reset() { *m = LimitResponse{} } -var xxx_messageInfo_FlowSchemaCondition proto.InternalMessageInfo +func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } -func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } -func (*FlowSchemaList) ProtoMessage() {} -func (*FlowSchemaList) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{4} -} -func (m *FlowSchemaList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaList) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaList.Merge(m, src) -} -func (m *FlowSchemaList) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaList) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaList.DiscardUnknown(m) -} +func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } -var xxx_messageInfo_FlowSchemaList proto.InternalMessageInfo +func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } -func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } -func (*FlowSchemaSpec) ProtoMessage() {} -func (*FlowSchemaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{5} -} -func (m *FlowSchemaSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaSpec.Merge(m, src) -} -func (m *FlowSchemaSpec) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaSpec) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaSpec.DiscardUnknown(m) -} +func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } -var xxx_messageInfo_FlowSchemaSpec proto.InternalMessageInfo +func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } -func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } -func (*FlowSchemaStatus) ProtoMessage() {} -func (*FlowSchemaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{6} -} -func (m *FlowSchemaStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaStatus.Merge(m, src) -} -func (m *FlowSchemaStatus) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaStatus) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaStatus.DiscardUnknown(m) -} +func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } -var xxx_messageInfo_FlowSchemaStatus proto.InternalMessageInfo +func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } -func (m *GroupSubject) Reset() { *m = GroupSubject{} } -func (*GroupSubject) ProtoMessage() {} -func (*GroupSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{7} -} -func (m *GroupSubject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GroupSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GroupSubject) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupSubject.Merge(m, src) -} -func (m *GroupSubject) XXX_Size() int { - return m.Size() -} -func (m *GroupSubject) XXX_DiscardUnknown() { - xxx_messageInfo_GroupSubject.DiscardUnknown(m) -} +func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } -var xxx_messageInfo_GroupSubject proto.InternalMessageInfo +func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } -func (m *LimitResponse) Reset() { *m = LimitResponse{} } -func (*LimitResponse) ProtoMessage() {} -func (*LimitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{8} -} -func (m *LimitResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LimitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LimitResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LimitResponse.Merge(m, src) -} -func (m *LimitResponse) XXX_Size() int { - return m.Size() -} -func (m *LimitResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LimitResponse.DiscardUnknown(m) -} +func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } -var xxx_messageInfo_LimitResponse proto.InternalMessageInfo +func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } -func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } -func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} -func (*LimitedPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{9} -} -func (m *LimitedPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LimitedPriorityLevelConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LimitedPriorityLevelConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_LimitedPriorityLevelConfiguration.Merge(m, src) -} -func (m *LimitedPriorityLevelConfiguration) XXX_Size() int { - return m.Size() -} -func (m *LimitedPriorityLevelConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_LimitedPriorityLevelConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_LimitedPriorityLevelConfiguration proto.InternalMessageInfo - -func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } -func (*NonResourcePolicyRule) ProtoMessage() {} -func (*NonResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{10} -} -func (m *NonResourcePolicyRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NonResourcePolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NonResourcePolicyRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_NonResourcePolicyRule.Merge(m, src) -} -func (m *NonResourcePolicyRule) XXX_Size() int { - return m.Size() -} -func (m *NonResourcePolicyRule) XXX_DiscardUnknown() { - xxx_messageInfo_NonResourcePolicyRule.DiscardUnknown(m) -} - -var xxx_messageInfo_NonResourcePolicyRule proto.InternalMessageInfo - -func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } -func (*PolicyRulesWithSubjects) ProtoMessage() {} -func (*PolicyRulesWithSubjects) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{11} -} -func (m *PolicyRulesWithSubjects) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PolicyRulesWithSubjects) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PolicyRulesWithSubjects) XXX_Merge(src proto.Message) { - xxx_messageInfo_PolicyRulesWithSubjects.Merge(m, src) -} -func (m *PolicyRulesWithSubjects) XXX_Size() int { - return m.Size() -} -func (m *PolicyRulesWithSubjects) XXX_DiscardUnknown() { - xxx_messageInfo_PolicyRulesWithSubjects.DiscardUnknown(m) -} +func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } -var xxx_messageInfo_PolicyRulesWithSubjects proto.InternalMessageInfo +func (m *Subject) Reset() { *m = Subject{} } -func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } -func (*PriorityLevelConfiguration) ProtoMessage() {} -func (*PriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{12} -} -func (m *PriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfiguration.Merge(m, src) -} -func (m *PriorityLevelConfiguration) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfiguration proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } -func (*PriorityLevelConfigurationCondition) ProtoMessage() {} -func (*PriorityLevelConfigurationCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{13} -} -func (m *PriorityLevelConfigurationCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationCondition.Merge(m, src) -} -func (m *PriorityLevelConfigurationCondition) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationCondition) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationCondition proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } -func (*PriorityLevelConfigurationList) ProtoMessage() {} -func (*PriorityLevelConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{14} -} -func (m *PriorityLevelConfigurationList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationList.Merge(m, src) -} -func (m *PriorityLevelConfigurationList) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationList) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationList.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationList proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } -func (*PriorityLevelConfigurationReference) ProtoMessage() {} -func (*PriorityLevelConfigurationReference) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{15} -} -func (m *PriorityLevelConfigurationReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationReference.Merge(m, src) -} -func (m *PriorityLevelConfigurationReference) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationReference) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationReference.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationReference proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } -func (*PriorityLevelConfigurationSpec) ProtoMessage() {} -func (*PriorityLevelConfigurationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{16} -} -func (m *PriorityLevelConfigurationSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationSpec.Merge(m, src) -} -func (m *PriorityLevelConfigurationSpec) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationSpec) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationSpec proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } -func (*PriorityLevelConfigurationStatus) ProtoMessage() {} -func (*PriorityLevelConfigurationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{17} -} -func (m *PriorityLevelConfigurationStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationStatus.Merge(m, src) -} -func (m *PriorityLevelConfigurationStatus) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationStatus proto.InternalMessageInfo - -func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } -func (*QueuingConfiguration) ProtoMessage() {} -func (*QueuingConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{18} -} -func (m *QueuingConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueuingConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *QueuingConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueuingConfiguration.Merge(m, src) -} -func (m *QueuingConfiguration) XXX_Size() int { - return m.Size() -} -func (m *QueuingConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_QueuingConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_QueuingConfiguration proto.InternalMessageInfo - -func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } -func (*ResourcePolicyRule) ProtoMessage() {} -func (*ResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{19} -} -func (m *ResourcePolicyRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourcePolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourcePolicyRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourcePolicyRule.Merge(m, src) -} -func (m *ResourcePolicyRule) XXX_Size() int { - return m.Size() -} -func (m *ResourcePolicyRule) XXX_DiscardUnknown() { - xxx_messageInfo_ResourcePolicyRule.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourcePolicyRule proto.InternalMessageInfo - -func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } -func (*ServiceAccountSubject) ProtoMessage() {} -func (*ServiceAccountSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{20} -} -func (m *ServiceAccountSubject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceAccountSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceAccountSubject) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceAccountSubject.Merge(m, src) -} -func (m *ServiceAccountSubject) XXX_Size() int { - return m.Size() -} -func (m *ServiceAccountSubject) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceAccountSubject.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceAccountSubject proto.InternalMessageInfo - -func (m *Subject) Reset() { *m = Subject{} } -func (*Subject) ProtoMessage() {} -func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{21} -} -func (m *Subject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Subject) XXX_Merge(src proto.Message) { - xxx_messageInfo_Subject.Merge(m, src) -} -func (m *Subject) XXX_Size() int { - return m.Size() -} -func (m *Subject) XXX_DiscardUnknown() { - xxx_messageInfo_Subject.DiscardUnknown(m) -} - -var xxx_messageInfo_Subject proto.InternalMessageInfo - -func (m *UserSubject) Reset() { *m = UserSubject{} } -func (*UserSubject) ProtoMessage() {} -func (*UserSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5cb22a034fcb2a, []int{22} -} -func (m *UserSubject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *UserSubject) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserSubject.Merge(m, src) -} -func (m *UserSubject) XXX_Size() int { - return m.Size() -} -func (m *UserSubject) XXX_DiscardUnknown() { - xxx_messageInfo_UserSubject.DiscardUnknown(m) -} - -var xxx_messageInfo_UserSubject proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ExemptPriorityLevelConfiguration)(nil), "k8s.io.api.flowcontrol.v1beta1.ExemptPriorityLevelConfiguration") - proto.RegisterType((*FlowDistinguisherMethod)(nil), "k8s.io.api.flowcontrol.v1beta1.FlowDistinguisherMethod") - proto.RegisterType((*FlowSchema)(nil), "k8s.io.api.flowcontrol.v1beta1.FlowSchema") - proto.RegisterType((*FlowSchemaCondition)(nil), "k8s.io.api.flowcontrol.v1beta1.FlowSchemaCondition") - proto.RegisterType((*FlowSchemaList)(nil), "k8s.io.api.flowcontrol.v1beta1.FlowSchemaList") - proto.RegisterType((*FlowSchemaSpec)(nil), "k8s.io.api.flowcontrol.v1beta1.FlowSchemaSpec") - proto.RegisterType((*FlowSchemaStatus)(nil), "k8s.io.api.flowcontrol.v1beta1.FlowSchemaStatus") - proto.RegisterType((*GroupSubject)(nil), "k8s.io.api.flowcontrol.v1beta1.GroupSubject") - proto.RegisterType((*LimitResponse)(nil), "k8s.io.api.flowcontrol.v1beta1.LimitResponse") - proto.RegisterType((*LimitedPriorityLevelConfiguration)(nil), "k8s.io.api.flowcontrol.v1beta1.LimitedPriorityLevelConfiguration") - proto.RegisterType((*NonResourcePolicyRule)(nil), "k8s.io.api.flowcontrol.v1beta1.NonResourcePolicyRule") - proto.RegisterType((*PolicyRulesWithSubjects)(nil), "k8s.io.api.flowcontrol.v1beta1.PolicyRulesWithSubjects") - proto.RegisterType((*PriorityLevelConfiguration)(nil), "k8s.io.api.flowcontrol.v1beta1.PriorityLevelConfiguration") - proto.RegisterType((*PriorityLevelConfigurationCondition)(nil), "k8s.io.api.flowcontrol.v1beta1.PriorityLevelConfigurationCondition") - proto.RegisterType((*PriorityLevelConfigurationList)(nil), "k8s.io.api.flowcontrol.v1beta1.PriorityLevelConfigurationList") - proto.RegisterType((*PriorityLevelConfigurationReference)(nil), "k8s.io.api.flowcontrol.v1beta1.PriorityLevelConfigurationReference") - proto.RegisterType((*PriorityLevelConfigurationSpec)(nil), "k8s.io.api.flowcontrol.v1beta1.PriorityLevelConfigurationSpec") - proto.RegisterType((*PriorityLevelConfigurationStatus)(nil), "k8s.io.api.flowcontrol.v1beta1.PriorityLevelConfigurationStatus") - proto.RegisterType((*QueuingConfiguration)(nil), "k8s.io.api.flowcontrol.v1beta1.QueuingConfiguration") - proto.RegisterType((*ResourcePolicyRule)(nil), "k8s.io.api.flowcontrol.v1beta1.ResourcePolicyRule") - proto.RegisterType((*ServiceAccountSubject)(nil), "k8s.io.api.flowcontrol.v1beta1.ServiceAccountSubject") - proto.RegisterType((*Subject)(nil), "k8s.io.api.flowcontrol.v1beta1.Subject") - proto.RegisterType((*UserSubject)(nil), "k8s.io.api.flowcontrol.v1beta1.UserSubject") -} - -func init() { - proto.RegisterFile("k8s.io/api/flowcontrol/v1beta1/generated.proto", fileDescriptor_3a5cb22a034fcb2a) -} - -var fileDescriptor_3a5cb22a034fcb2a = []byte{ - // 1599 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x73, 0xdb, 0xc4, - 0x17, 0x8f, 0x1c, 0x3b, 0x89, 0x5f, 0x7e, 0x76, 0xd3, 0x4c, 0xfc, 0x4d, 0xbf, 0x63, 0xa7, 0x62, - 0x86, 0x02, 0x6d, 0xe5, 0xb6, 0xb4, 0xb4, 0xc0, 0xf0, 0x23, 0x4a, 0x4b, 0x29, 0x4d, 0xd2, 0x74, - 0xd3, 0x42, 0xa7, 0x74, 0x86, 0x2a, 0xf2, 0xc6, 0x56, 0x63, 0xfd, 0xa8, 0x56, 0x4a, 0x08, 0xbd, - 0x30, 0xfc, 0x05, 0x9c, 0xe1, 0xc8, 0x81, 0x13, 0x17, 0xae, 0x1c, 0x38, 0xd2, 0xe1, 0xd4, 0x63, - 0x4f, 0x86, 0x9a, 0x13, 0xff, 0x01, 0x74, 0x86, 0x19, 0x66, 0x57, 0x2b, 0xc9, 0xb2, 0x2d, 0xcb, - 0xd3, 0xce, 0xf4, 0xc4, 0x2d, 0x7a, 0xfb, 0x79, 0x9f, 0xb7, 0xef, 0xed, 0xfb, 0xe5, 0x80, 0xb2, - 0x7b, 0x81, 0x2a, 0x86, 0x5d, 0xd5, 0x1c, 0xa3, 0xba, 0xd3, 0xb4, 0xf7, 0x75, 0xdb, 0xf2, 0x5c, - 0xbb, 0x59, 0xdd, 0x3b, 0xbd, 0x4d, 0x3c, 0xed, 0x74, 0xb5, 0x4e, 0x2c, 0xe2, 0x6a, 0x1e, 0xa9, - 0x29, 0x8e, 0x6b, 0x7b, 0x36, 0x2a, 0x07, 0x78, 0x45, 0x73, 0x0c, 0xa5, 0x03, 0xaf, 0x08, 0xfc, - 0xd2, 0xc9, 0xba, 0xe1, 0x35, 0xfc, 0x6d, 0x45, 0xb7, 0xcd, 0x6a, 0xdd, 0xae, 0xdb, 0x55, 0xae, - 0xb6, 0xed, 0xef, 0xf0, 0x2f, 0xfe, 0xc1, 0xff, 0x0a, 0xe8, 0x96, 0xce, 0xc6, 0xe6, 0x4d, 0x4d, - 0x6f, 0x18, 0x16, 0x71, 0x0f, 0xaa, 0xce, 0x6e, 0x9d, 0x09, 0x68, 0xd5, 0x24, 0x9e, 0x56, 0xdd, - 0xeb, 0xb9, 0xc4, 0x52, 0x35, 0x4d, 0xcb, 0xf5, 0x2d, 0xcf, 0x30, 0x49, 0x8f, 0xc2, 0x1b, 0x59, - 0x0a, 0x54, 0x6f, 0x10, 0x53, 0xeb, 0xd6, 0x93, 0x7f, 0x92, 0x60, 0xf9, 0xd2, 0xe7, 0xc4, 0x74, - 0xbc, 0x4d, 0xd7, 0xb0, 0x5d, 0xc3, 0x3b, 0x58, 0x23, 0x7b, 0xa4, 0xb9, 0x6a, 0x5b, 0x3b, 0x46, - 0xdd, 0x77, 0x35, 0xcf, 0xb0, 0x2d, 0x74, 0x0b, 0x4a, 0x96, 0x6d, 0x1a, 0x96, 0xc6, 0xe4, 0xba, - 0xef, 0xba, 0xc4, 0xd2, 0x0f, 0xb6, 0x1a, 0x9a, 0x4b, 0x68, 0x49, 0x5a, 0x96, 0x5e, 0x29, 0xa8, - 0xff, 0x6f, 0xb7, 0x2a, 0xa5, 0x8d, 0x14, 0x0c, 0x4e, 0xd5, 0x46, 0xef, 0xc0, 0x6c, 0x93, 0x58, - 0x35, 0x6d, 0xbb, 0x49, 0x36, 0x89, 0xab, 0x13, 0xcb, 0x2b, 0xe5, 0x38, 0xe1, 0x7c, 0xbb, 0x55, - 0x99, 0x5d, 0x4b, 0x1e, 0xe1, 0x6e, 0xac, 0x7c, 0x1b, 0x16, 0x3f, 0x68, 0xda, 0xfb, 0x17, 0x0d, - 0xea, 0x19, 0x56, 0xdd, 0x37, 0x68, 0x83, 0xb8, 0xeb, 0xc4, 0x6b, 0xd8, 0x35, 0xf4, 0x1e, 0xe4, - 0xbd, 0x03, 0x87, 0xf0, 0xfb, 0x15, 0xd5, 0xe3, 0x0f, 0x5b, 0x95, 0x91, 0x76, 0xab, 0x92, 0xbf, - 0x71, 0xe0, 0x90, 0xa7, 0xad, 0xca, 0x91, 0x14, 0x35, 0x76, 0x8c, 0xb9, 0xa2, 0xfc, 0x4d, 0x0e, - 0x80, 0xa1, 0xb6, 0x78, 0xe0, 0xd0, 0x5d, 0x98, 0x60, 0x8f, 0x55, 0xd3, 0x3c, 0x8d, 0x73, 0x4e, - 0x9e, 0x39, 0xa5, 0xc4, 0x99, 0x12, 0xc5, 0x5c, 0x71, 0x76, 0xeb, 0x4c, 0x40, 0x15, 0x86, 0x56, - 0xf6, 0x4e, 0x2b, 0xd7, 0xb6, 0xef, 0x11, 0xdd, 0x5b, 0x27, 0x9e, 0xa6, 0x22, 0x71, 0x0b, 0x88, - 0x65, 0x38, 0x62, 0x45, 0x9b, 0x90, 0xa7, 0x0e, 0xd1, 0x79, 0x00, 0x26, 0xcf, 0x28, 0xca, 0xe0, - 0x3c, 0x54, 0xe2, 0xbb, 0x6d, 0x39, 0x44, 0x57, 0xa7, 0x42, 0x0f, 0xd9, 0x17, 0xe6, 0x4c, 0xe8, - 0x16, 0x8c, 0x51, 0x4f, 0xf3, 0x7c, 0x5a, 0x1a, 0xed, 0xb9, 0x71, 0x16, 0x27, 0xd7, 0x53, 0x67, - 0x04, 0xeb, 0x58, 0xf0, 0x8d, 0x05, 0x9f, 0xfc, 0x38, 0x07, 0xf3, 0x31, 0x78, 0xd5, 0xb6, 0x6a, - 0x06, 0xcf, 0x94, 0xb7, 0x13, 0x51, 0x3f, 0xd6, 0x15, 0xf5, 0xc5, 0x3e, 0x2a, 0x71, 0xc4, 0xd1, - 0x9b, 0xd1, 0x75, 0x73, 0x5c, 0xfd, 0x68, 0xd2, 0xf8, 0xd3, 0x56, 0x65, 0x36, 0x52, 0x4b, 0xde, - 0x07, 0xed, 0x01, 0x6a, 0x6a, 0xd4, 0xbb, 0xe1, 0x6a, 0x16, 0x0d, 0x68, 0x0d, 0x93, 0x08, 0xaf, - 0x5f, 0x1b, 0xee, 0x9d, 0x98, 0x86, 0xba, 0x24, 0x4c, 0xa2, 0xb5, 0x1e, 0x36, 0xdc, 0xc7, 0x02, - 0x7a, 0x19, 0xc6, 0x5c, 0xa2, 0x51, 0xdb, 0x2a, 0xe5, 0xf9, 0x95, 0xa3, 0x78, 0x61, 0x2e, 0xc5, - 0xe2, 0x14, 0xbd, 0x0a, 0xe3, 0x26, 0xa1, 0x54, 0xab, 0x93, 0x52, 0x81, 0x03, 0x67, 0x05, 0x70, - 0x7c, 0x3d, 0x10, 0xe3, 0xf0, 0x5c, 0xfe, 0x59, 0x82, 0x99, 0x38, 0x4e, 0x6b, 0x06, 0xf5, 0xd0, - 0x9d, 0x9e, 0xdc, 0x53, 0x86, 0xf3, 0x89, 0x69, 0xf3, 0xcc, 0x9b, 0x13, 0xe6, 0x26, 0x42, 0x49, - 0x47, 0xde, 0x5d, 0x83, 0x82, 0xe1, 0x11, 0x93, 0x45, 0x7d, 0xb4, 0x2b, 0x5c, 0x19, 0x49, 0xa2, - 0x4e, 0x0b, 0xda, 0xc2, 0x15, 0x46, 0x80, 0x03, 0x1e, 0xf9, 0xcf, 0xd1, 0x4e, 0x0f, 0x58, 0x3e, - 0xa2, 0xef, 0x25, 0x58, 0x72, 0x52, 0x1b, 0x8c, 0x70, 0x6a, 0x35, 0xcb, 0x72, 0x7a, 0x8b, 0xc2, - 0x64, 0x87, 0xb0, 0xbe, 0x42, 0x54, 0x59, 0x5c, 0x69, 0x69, 0x00, 0x78, 0xc0, 0x55, 0xd0, 0x47, - 0x80, 0x4c, 0xcd, 0x63, 0x11, 0xad, 0x6f, 0xba, 0x44, 0x27, 0x35, 0xc6, 0x2a, 0x9a, 0x52, 0x94, - 0x1d, 0xeb, 0x3d, 0x08, 0xdc, 0x47, 0x0b, 0x7d, 0x25, 0xc1, 0x7c, 0xad, 0xb7, 0xc9, 0x88, 0xbc, - 0x3c, 0x3f, 0x4c, 0xa0, 0xfb, 0xf4, 0x28, 0x75, 0xb1, 0xdd, 0xaa, 0xcc, 0xf7, 0x39, 0xc0, 0xfd, - 0x8c, 0xa1, 0x3b, 0x50, 0x70, 0xfd, 0x26, 0xa1, 0xa5, 0x3c, 0x7f, 0xde, 0x4c, 0xab, 0x9b, 0x76, - 0xd3, 0xd0, 0x0f, 0x30, 0x53, 0xf9, 0xc4, 0xf0, 0x1a, 0x5b, 0x3e, 0xef, 0x55, 0x34, 0x7e, 0x6b, - 0x7e, 0x84, 0x03, 0x52, 0xf9, 0x01, 0xcc, 0x75, 0x37, 0x0d, 0x54, 0x07, 0xd0, 0xc3, 0x3a, 0x65, - 0x03, 0x82, 0x99, 0x7d, 0x7d, 0xf8, 0xac, 0x8a, 0x6a, 0x3c, 0xee, 0x97, 0x91, 0x88, 0xe2, 0x0e, - 0x6a, 0xf9, 0x14, 0x4c, 0x5d, 0x76, 0x6d, 0xdf, 0x11, 0x77, 0x44, 0xcb, 0x90, 0xb7, 0x34, 0x33, - 0xec, 0x3e, 0x51, 0x47, 0xdc, 0xd0, 0x4c, 0x82, 0xf9, 0x89, 0xfc, 0x9d, 0x04, 0xd3, 0x6b, 0x86, - 0x69, 0x78, 0x98, 0x50, 0xc7, 0xb6, 0x28, 0x41, 0xe7, 0x12, 0x1d, 0xeb, 0x68, 0x57, 0xc7, 0x3a, - 0x94, 0x00, 0x77, 0xf4, 0xaa, 0x4f, 0x61, 0xfc, 0xbe, 0x4f, 0x7c, 0xc3, 0xaa, 0x8b, 0x7e, 0x7d, - 0x36, 0xcb, 0xc1, 0xeb, 0x01, 0x3c, 0x91, 0x6d, 0xea, 0x24, 0x6b, 0x01, 0xe2, 0x04, 0x87, 0x8c, - 0xf2, 0x3f, 0x39, 0x38, 0xca, 0x0d, 0x93, 0xda, 0x80, 0xa9, 0x7c, 0x07, 0x4a, 0x1a, 0xa5, 0xbe, - 0x4b, 0x6a, 0x69, 0x53, 0x79, 0x59, 0x78, 0x53, 0x5a, 0x49, 0xc1, 0xe1, 0x54, 0x06, 0x74, 0x0f, - 0xa6, 0x9b, 0x9d, 0xbe, 0x0b, 0x37, 0x4f, 0x66, 0xb9, 0x99, 0x08, 0x98, 0xba, 0x20, 0x6e, 0x90, - 0x0c, 0x3a, 0x4e, 0x52, 0xf7, 0xdb, 0x02, 0x46, 0x87, 0xdf, 0x02, 0xd0, 0x35, 0x58, 0xd8, 0xb6, - 0x5d, 0xd7, 0xde, 0x37, 0xac, 0x3a, 0xb7, 0x13, 0x92, 0xe4, 0x39, 0xc9, 0xff, 0xda, 0xad, 0xca, - 0x82, 0xda, 0x0f, 0x80, 0xfb, 0xeb, 0xc9, 0xfb, 0xb0, 0xb0, 0xc1, 0x7a, 0x0a, 0xb5, 0x7d, 0x57, - 0x27, 0x71, 0x41, 0xa0, 0x0a, 0x14, 0xf6, 0x88, 0xbb, 0x1d, 0x24, 0x75, 0x51, 0x2d, 0xb2, 0x72, - 0xf8, 0x98, 0x09, 0x70, 0x20, 0x67, 0x9e, 0x58, 0xb1, 0xe6, 0x4d, 0xbc, 0x46, 0x4b, 0x63, 0x1c, - 0xca, 0x3d, 0xd9, 0x48, 0x1e, 0xe1, 0x6e, 0xac, 0xdc, 0xca, 0xc1, 0x62, 0x4a, 0xfd, 0xa1, 0x9b, - 0x30, 0x41, 0xc5, 0xdf, 0xa2, 0xa6, 0x8e, 0x65, 0xbd, 0x85, 0xd0, 0x8d, 0xbb, 0x7f, 0x48, 0x86, - 0x23, 0x2a, 0x64, 0xc3, 0xb4, 0x2b, 0xae, 0xc0, 0x6d, 0x8a, 0x29, 0x70, 0x26, 0x8b, 0xbb, 0x37, - 0x3a, 0xf1, 0x63, 0xe3, 0x4e, 0x42, 0x9c, 0xe4, 0x47, 0x0f, 0x60, 0xae, 0xc3, 0xed, 0xc0, 0xe6, - 0x28, 0xb7, 0x79, 0x2e, 0xcb, 0x66, 0xdf, 0x47, 0x51, 0x4b, 0xc2, 0xec, 0xdc, 0x46, 0x17, 0x2d, - 0xee, 0x31, 0x24, 0xff, 0x9a, 0x83, 0x01, 0x83, 0xe1, 0x05, 0x2c, 0x79, 0x77, 0x13, 0x4b, 0xde, - 0xbb, 0xcf, 0x3e, 0xf1, 0x52, 0x97, 0xbe, 0x46, 0xd7, 0xd2, 0xf7, 0xfe, 0x73, 0xd8, 0x18, 0xbc, - 0x04, 0xfe, 0x95, 0x83, 0x97, 0xd2, 0x95, 0xe3, 0xa5, 0xf0, 0x6a, 0xa2, 0xc5, 0x9e, 0xef, 0x6a, - 0xb1, 0xc7, 0x86, 0xa0, 0xf8, 0x6f, 0x49, 0xec, 0x5a, 0x12, 0x7f, 0x93, 0xa0, 0x9c, 0x1e, 0xb7, - 0x17, 0xb0, 0x34, 0x7e, 0x96, 0x5c, 0x1a, 0xdf, 0x7a, 0xf6, 0x24, 0x4b, 0x59, 0x22, 0x2f, 0x0f, - 0xca, 0xad, 0x68, 0xdd, 0x1b, 0x62, 0xe4, 0xff, 0x90, 0x1b, 0x14, 0x2a, 0xbe, 0x9d, 0x66, 0xfc, - 0x6a, 0x49, 0x68, 0x5f, 0xb2, 0xd8, 0xe8, 0x31, 0xd9, 0xf4, 0x08, 0x12, 0xb2, 0x01, 0xe3, 0xcd, - 0x60, 0x56, 0x8b, 0xa2, 0x5e, 0x19, 0x6a, 0x44, 0x0e, 0x1a, 0xed, 0xc1, 0x5a, 0x20, 0x60, 0x38, - 0xa4, 0x47, 0x35, 0x18, 0x23, 0xfc, 0xa7, 0xfa, 0xb0, 0x95, 0x9d, 0xf5, 0xc3, 0x5e, 0x05, 0x96, - 0x85, 0x01, 0x0a, 0x0b, 0x6e, 0xf9, 0x5b, 0x09, 0x96, 0xb3, 0x5a, 0x02, 0xda, 0xef, 0xb3, 0xe2, - 0x3d, 0xc7, 0xfa, 0x3e, 0xfc, 0xca, 0xf7, 0xa3, 0x04, 0x87, 0xfb, 0x6d, 0x52, 0xac, 0xc8, 0xd8, - 0xfa, 0x14, 0xed, 0x3e, 0x51, 0x91, 0x5d, 0xe7, 0x52, 0x2c, 0x4e, 0xd1, 0x09, 0x98, 0x68, 0x68, - 0x56, 0x6d, 0xcb, 0xf8, 0x22, 0xdc, 0xea, 0xa3, 0x34, 0xff, 0x50, 0xc8, 0x71, 0x84, 0x40, 0x17, - 0x61, 0x8e, 0xeb, 0xad, 0x11, 0xab, 0xee, 0x35, 0xf8, 0x8b, 0x88, 0xd5, 0x24, 0x9a, 0x3a, 0xd7, - 0xbb, 0xce, 0x71, 0x8f, 0x86, 0xfc, 0xb7, 0x04, 0xe8, 0x59, 0xb6, 0x89, 0xe3, 0x50, 0xd4, 0x1c, - 0x83, 0xaf, 0xb8, 0x41, 0xa1, 0x15, 0xd5, 0xe9, 0x76, 0xab, 0x52, 0x5c, 0xd9, 0xbc, 0x12, 0x08, - 0x71, 0x7c, 0xce, 0xc0, 0xe1, 0xa0, 0x0d, 0x06, 0xaa, 0x00, 0x87, 0x86, 0x29, 0x8e, 0xcf, 0xd1, - 0x05, 0x98, 0xd2, 0x9b, 0x3e, 0xf5, 0x88, 0xbb, 0xa5, 0xdb, 0x0e, 0xe1, 0x8d, 0x69, 0x42, 0x3d, - 0x2c, 0x7c, 0x9a, 0x5a, 0xed, 0x38, 0xc3, 0x09, 0x24, 0x52, 0x00, 0x58, 0x59, 0x51, 0x47, 0x63, - 0x76, 0x0a, 0xdc, 0xce, 0x0c, 0x7b, 0xb0, 0x8d, 0x48, 0x8a, 0x3b, 0x10, 0xf2, 0x3d, 0x58, 0xd8, - 0x22, 0xee, 0x9e, 0xa1, 0x93, 0x15, 0x5d, 0xb7, 0x7d, 0xcb, 0x0b, 0x97, 0xf5, 0x2a, 0x14, 0x23, - 0x98, 0xa8, 0xbc, 0x43, 0xc2, 0x7e, 0x31, 0xe2, 0xc2, 0x31, 0x26, 0x2a, 0xf5, 0x5c, 0x6a, 0xa9, - 0xff, 0x92, 0x83, 0xf1, 0x98, 0x3e, 0xbf, 0x6b, 0x58, 0x35, 0xc1, 0x7c, 0x24, 0x44, 0x5f, 0x35, - 0xac, 0xda, 0xd3, 0x56, 0x65, 0x52, 0xc0, 0xd8, 0x27, 0xe6, 0x40, 0x74, 0x05, 0xf2, 0x3e, 0x25, - 0xae, 0x28, 0xe2, 0xe3, 0x59, 0xc9, 0x7c, 0x93, 0x12, 0x37, 0xdc, 0xaf, 0x26, 0x18, 0x33, 0x13, - 0x60, 0x4e, 0x81, 0xd6, 0xa1, 0x50, 0x67, 0x8f, 0x22, 0xea, 0xf4, 0x44, 0x16, 0x57, 0xe7, 0x8f, - 0x98, 0x20, 0x0d, 0xb8, 0x04, 0x07, 0x2c, 0xe8, 0x3e, 0xcc, 0xd0, 0x44, 0x08, 0xf9, 0x73, 0x0d, - 0xb1, 0x2f, 0xf5, 0x0d, 0xbc, 0x8a, 0xda, 0xad, 0xca, 0x4c, 0xf2, 0x08, 0x77, 0x19, 0x90, 0xab, - 0x30, 0xd9, 0xe1, 0x60, 0x76, 0x97, 0x55, 0x2f, 0x3e, 0x7c, 0x52, 0x1e, 0x79, 0xf4, 0xa4, 0x3c, - 0xf2, 0xf8, 0x49, 0x79, 0xe4, 0xcb, 0x76, 0x59, 0x7a, 0xd8, 0x2e, 0x4b, 0x8f, 0xda, 0x65, 0xe9, - 0x71, 0xbb, 0x2c, 0xfd, 0xde, 0x2e, 0x4b, 0x5f, 0xff, 0x51, 0x1e, 0xb9, 0x5d, 0x1e, 0xfc, 0xbf, - 0xd8, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x24, 0x42, 0x4c, 0x0f, 0xac, 0x15, 0x00, 0x00, -} +func (m *UserSubject) Reset() { *m = UserSubject{} } func (m *ExemptPriorityLevelConfiguration) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/flowcontrol/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/flowcontrol/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..9d2059597a69d --- /dev/null +++ b/staging/src/k8s.io/api/flowcontrol/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,68 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} + +func (*FlowDistinguisherMethod) ProtoMessage() {} + +func (*FlowSchema) ProtoMessage() {} + +func (*FlowSchemaCondition) ProtoMessage() {} + +func (*FlowSchemaList) ProtoMessage() {} + +func (*FlowSchemaSpec) ProtoMessage() {} + +func (*FlowSchemaStatus) ProtoMessage() {} + +func (*GroupSubject) ProtoMessage() {} + +func (*LimitResponse) ProtoMessage() {} + +func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} + +func (*NonResourcePolicyRule) ProtoMessage() {} + +func (*PolicyRulesWithSubjects) ProtoMessage() {} + +func (*PriorityLevelConfiguration) ProtoMessage() {} + +func (*PriorityLevelConfigurationCondition) ProtoMessage() {} + +func (*PriorityLevelConfigurationList) ProtoMessage() {} + +func (*PriorityLevelConfigurationReference) ProtoMessage() {} + +func (*PriorityLevelConfigurationSpec) ProtoMessage() {} + +func (*PriorityLevelConfigurationStatus) ProtoMessage() {} + +func (*QueuingConfiguration) ProtoMessage() {} + +func (*ResourcePolicyRule) ProtoMessage() {} + +func (*ServiceAccountSubject) ProtoMessage() {} + +func (*Subject) ProtoMessage() {} + +func (*UserSubject) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/flowcontrol/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/flowcontrol/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..fe34dbc9b48e0 --- /dev/null +++ b/staging/src/k8s.io/api/flowcontrol/v1beta1/zz_generated.model_name.go @@ -0,0 +1,137 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExemptPriorityLevelConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.ExemptPriorityLevelConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowDistinguisherMethod) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.FlowDistinguisherMethod" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchema) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.FlowSchema" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaCondition) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.FlowSchemaCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaList) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.FlowSchemaList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaSpec) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.FlowSchemaSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaStatus) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.FlowSchemaStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GroupSubject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.GroupSubject" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LimitResponse) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.LimitResponse" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LimitedPriorityLevelConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.LimitedPriorityLevelConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NonResourcePolicyRule) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.NonResourcePolicyRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PolicyRulesWithSubjects) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.PolicyRulesWithSubjects" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationCondition) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationList) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationReference) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationSpec) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationStatus) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in QueuingConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.QueuingConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourcePolicyRule) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.ResourcePolicyRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceAccountSubject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.ServiceAccountSubject" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Subject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.Subject" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in UserSubject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta1.UserSubject" +} diff --git a/staging/src/k8s.io/api/flowcontrol/v1beta2/doc.go b/staging/src/k8s.io/api/flowcontrol/v1beta2/doc.go index 2dcad11ad9a18..fb00b5857b346 100644 --- a/staging/src/k8s.io/api/flowcontrol/v1beta2/doc.go +++ b/staging/src/k8s.io/api/flowcontrol/v1beta2/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.flowcontrol.v1beta2 // +groupName=flowcontrol.apiserver.k8s.io diff --git a/staging/src/k8s.io/api/flowcontrol/v1beta2/generated.pb.go b/staging/src/k8s.io/api/flowcontrol/v1beta2/generated.pb.go index f646446df9d4f..1d5a5d26195f2 100644 --- a/staging/src/k8s.io/api/flowcontrol/v1beta2/generated.pb.go +++ b/staging/src/k8s.io/api/flowcontrol/v1beta2/generated.pb.go @@ -24,803 +24,56 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } -func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } -func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} -func (*ExemptPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{0} -} -func (m *ExemptPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExemptPriorityLevelConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExemptPriorityLevelConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExemptPriorityLevelConfiguration.Merge(m, src) -} -func (m *ExemptPriorityLevelConfiguration) XXX_Size() int { - return m.Size() -} -func (m *ExemptPriorityLevelConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_ExemptPriorityLevelConfiguration.DiscardUnknown(m) -} +func (m *FlowSchema) Reset() { *m = FlowSchema{} } -var xxx_messageInfo_ExemptPriorityLevelConfiguration proto.InternalMessageInfo +func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } -func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } -func (*FlowDistinguisherMethod) ProtoMessage() {} -func (*FlowDistinguisherMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{1} -} -func (m *FlowDistinguisherMethod) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowDistinguisherMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowDistinguisherMethod) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowDistinguisherMethod.Merge(m, src) -} -func (m *FlowDistinguisherMethod) XXX_Size() int { - return m.Size() -} -func (m *FlowDistinguisherMethod) XXX_DiscardUnknown() { - xxx_messageInfo_FlowDistinguisherMethod.DiscardUnknown(m) -} +func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } -var xxx_messageInfo_FlowDistinguisherMethod proto.InternalMessageInfo +func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } -func (m *FlowSchema) Reset() { *m = FlowSchema{} } -func (*FlowSchema) ProtoMessage() {} -func (*FlowSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{2} -} -func (m *FlowSchema) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchema) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchema.Merge(m, src) -} -func (m *FlowSchema) XXX_Size() int { - return m.Size() -} -func (m *FlowSchema) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchema.DiscardUnknown(m) -} +func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } -var xxx_messageInfo_FlowSchema proto.InternalMessageInfo +func (m *GroupSubject) Reset() { *m = GroupSubject{} } -func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } -func (*FlowSchemaCondition) ProtoMessage() {} -func (*FlowSchemaCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{3} -} -func (m *FlowSchemaCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaCondition.Merge(m, src) -} -func (m *FlowSchemaCondition) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaCondition) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaCondition.DiscardUnknown(m) -} +func (m *LimitResponse) Reset() { *m = LimitResponse{} } -var xxx_messageInfo_FlowSchemaCondition proto.InternalMessageInfo +func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } -func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } -func (*FlowSchemaList) ProtoMessage() {} -func (*FlowSchemaList) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{4} -} -func (m *FlowSchemaList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaList) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaList.Merge(m, src) -} -func (m *FlowSchemaList) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaList) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaList.DiscardUnknown(m) -} +func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } -var xxx_messageInfo_FlowSchemaList proto.InternalMessageInfo +func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } -func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } -func (*FlowSchemaSpec) ProtoMessage() {} -func (*FlowSchemaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{5} -} -func (m *FlowSchemaSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaSpec.Merge(m, src) -} -func (m *FlowSchemaSpec) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaSpec) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaSpec.DiscardUnknown(m) -} +func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } -var xxx_messageInfo_FlowSchemaSpec proto.InternalMessageInfo +func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } -func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } -func (*FlowSchemaStatus) ProtoMessage() {} -func (*FlowSchemaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{6} -} -func (m *FlowSchemaStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaStatus.Merge(m, src) -} -func (m *FlowSchemaStatus) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaStatus) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaStatus.DiscardUnknown(m) -} +func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } -var xxx_messageInfo_FlowSchemaStatus proto.InternalMessageInfo +func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } -func (m *GroupSubject) Reset() { *m = GroupSubject{} } -func (*GroupSubject) ProtoMessage() {} -func (*GroupSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{7} -} -func (m *GroupSubject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GroupSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GroupSubject) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupSubject.Merge(m, src) -} -func (m *GroupSubject) XXX_Size() int { - return m.Size() -} -func (m *GroupSubject) XXX_DiscardUnknown() { - xxx_messageInfo_GroupSubject.DiscardUnknown(m) -} +func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } -var xxx_messageInfo_GroupSubject proto.InternalMessageInfo +func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } -func (m *LimitResponse) Reset() { *m = LimitResponse{} } -func (*LimitResponse) ProtoMessage() {} -func (*LimitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{8} -} -func (m *LimitResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LimitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LimitResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LimitResponse.Merge(m, src) -} -func (m *LimitResponse) XXX_Size() int { - return m.Size() -} -func (m *LimitResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LimitResponse.DiscardUnknown(m) -} +func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } -var xxx_messageInfo_LimitResponse proto.InternalMessageInfo +func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } -func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } -func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} -func (*LimitedPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{9} -} -func (m *LimitedPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LimitedPriorityLevelConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LimitedPriorityLevelConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_LimitedPriorityLevelConfiguration.Merge(m, src) -} -func (m *LimitedPriorityLevelConfiguration) XXX_Size() int { - return m.Size() -} -func (m *LimitedPriorityLevelConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_LimitedPriorityLevelConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_LimitedPriorityLevelConfiguration proto.InternalMessageInfo - -func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } -func (*NonResourcePolicyRule) ProtoMessage() {} -func (*NonResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{10} -} -func (m *NonResourcePolicyRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NonResourcePolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NonResourcePolicyRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_NonResourcePolicyRule.Merge(m, src) -} -func (m *NonResourcePolicyRule) XXX_Size() int { - return m.Size() -} -func (m *NonResourcePolicyRule) XXX_DiscardUnknown() { - xxx_messageInfo_NonResourcePolicyRule.DiscardUnknown(m) -} - -var xxx_messageInfo_NonResourcePolicyRule proto.InternalMessageInfo - -func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } -func (*PolicyRulesWithSubjects) ProtoMessage() {} -func (*PolicyRulesWithSubjects) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{11} -} -func (m *PolicyRulesWithSubjects) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PolicyRulesWithSubjects) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PolicyRulesWithSubjects) XXX_Merge(src proto.Message) { - xxx_messageInfo_PolicyRulesWithSubjects.Merge(m, src) -} -func (m *PolicyRulesWithSubjects) XXX_Size() int { - return m.Size() -} -func (m *PolicyRulesWithSubjects) XXX_DiscardUnknown() { - xxx_messageInfo_PolicyRulesWithSubjects.DiscardUnknown(m) -} +func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } -var xxx_messageInfo_PolicyRulesWithSubjects proto.InternalMessageInfo +func (m *Subject) Reset() { *m = Subject{} } -func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } -func (*PriorityLevelConfiguration) ProtoMessage() {} -func (*PriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{12} -} -func (m *PriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfiguration.Merge(m, src) -} -func (m *PriorityLevelConfiguration) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfiguration proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } -func (*PriorityLevelConfigurationCondition) ProtoMessage() {} -func (*PriorityLevelConfigurationCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{13} -} -func (m *PriorityLevelConfigurationCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationCondition.Merge(m, src) -} -func (m *PriorityLevelConfigurationCondition) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationCondition) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationCondition proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } -func (*PriorityLevelConfigurationList) ProtoMessage() {} -func (*PriorityLevelConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{14} -} -func (m *PriorityLevelConfigurationList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationList.Merge(m, src) -} -func (m *PriorityLevelConfigurationList) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationList) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationList.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationList proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } -func (*PriorityLevelConfigurationReference) ProtoMessage() {} -func (*PriorityLevelConfigurationReference) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{15} -} -func (m *PriorityLevelConfigurationReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationReference.Merge(m, src) -} -func (m *PriorityLevelConfigurationReference) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationReference) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationReference.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationReference proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } -func (*PriorityLevelConfigurationSpec) ProtoMessage() {} -func (*PriorityLevelConfigurationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{16} -} -func (m *PriorityLevelConfigurationSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationSpec.Merge(m, src) -} -func (m *PriorityLevelConfigurationSpec) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationSpec) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationSpec proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } -func (*PriorityLevelConfigurationStatus) ProtoMessage() {} -func (*PriorityLevelConfigurationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{17} -} -func (m *PriorityLevelConfigurationStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationStatus.Merge(m, src) -} -func (m *PriorityLevelConfigurationStatus) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationStatus proto.InternalMessageInfo - -func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } -func (*QueuingConfiguration) ProtoMessage() {} -func (*QueuingConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{18} -} -func (m *QueuingConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueuingConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *QueuingConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueuingConfiguration.Merge(m, src) -} -func (m *QueuingConfiguration) XXX_Size() int { - return m.Size() -} -func (m *QueuingConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_QueuingConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_QueuingConfiguration proto.InternalMessageInfo - -func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } -func (*ResourcePolicyRule) ProtoMessage() {} -func (*ResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{19} -} -func (m *ResourcePolicyRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourcePolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourcePolicyRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourcePolicyRule.Merge(m, src) -} -func (m *ResourcePolicyRule) XXX_Size() int { - return m.Size() -} -func (m *ResourcePolicyRule) XXX_DiscardUnknown() { - xxx_messageInfo_ResourcePolicyRule.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourcePolicyRule proto.InternalMessageInfo - -func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } -func (*ServiceAccountSubject) ProtoMessage() {} -func (*ServiceAccountSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{20} -} -func (m *ServiceAccountSubject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceAccountSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceAccountSubject) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceAccountSubject.Merge(m, src) -} -func (m *ServiceAccountSubject) XXX_Size() int { - return m.Size() -} -func (m *ServiceAccountSubject) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceAccountSubject.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceAccountSubject proto.InternalMessageInfo - -func (m *Subject) Reset() { *m = Subject{} } -func (*Subject) ProtoMessage() {} -func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{21} -} -func (m *Subject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Subject) XXX_Merge(src proto.Message) { - xxx_messageInfo_Subject.Merge(m, src) -} -func (m *Subject) XXX_Size() int { - return m.Size() -} -func (m *Subject) XXX_DiscardUnknown() { - xxx_messageInfo_Subject.DiscardUnknown(m) -} - -var xxx_messageInfo_Subject proto.InternalMessageInfo - -func (m *UserSubject) Reset() { *m = UserSubject{} } -func (*UserSubject) ProtoMessage() {} -func (*UserSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_2e620af2eea53237, []int{22} -} -func (m *UserSubject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *UserSubject) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserSubject.Merge(m, src) -} -func (m *UserSubject) XXX_Size() int { - return m.Size() -} -func (m *UserSubject) XXX_DiscardUnknown() { - xxx_messageInfo_UserSubject.DiscardUnknown(m) -} - -var xxx_messageInfo_UserSubject proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ExemptPriorityLevelConfiguration)(nil), "k8s.io.api.flowcontrol.v1beta2.ExemptPriorityLevelConfiguration") - proto.RegisterType((*FlowDistinguisherMethod)(nil), "k8s.io.api.flowcontrol.v1beta2.FlowDistinguisherMethod") - proto.RegisterType((*FlowSchema)(nil), "k8s.io.api.flowcontrol.v1beta2.FlowSchema") - proto.RegisterType((*FlowSchemaCondition)(nil), "k8s.io.api.flowcontrol.v1beta2.FlowSchemaCondition") - proto.RegisterType((*FlowSchemaList)(nil), "k8s.io.api.flowcontrol.v1beta2.FlowSchemaList") - proto.RegisterType((*FlowSchemaSpec)(nil), "k8s.io.api.flowcontrol.v1beta2.FlowSchemaSpec") - proto.RegisterType((*FlowSchemaStatus)(nil), "k8s.io.api.flowcontrol.v1beta2.FlowSchemaStatus") - proto.RegisterType((*GroupSubject)(nil), "k8s.io.api.flowcontrol.v1beta2.GroupSubject") - proto.RegisterType((*LimitResponse)(nil), "k8s.io.api.flowcontrol.v1beta2.LimitResponse") - proto.RegisterType((*LimitedPriorityLevelConfiguration)(nil), "k8s.io.api.flowcontrol.v1beta2.LimitedPriorityLevelConfiguration") - proto.RegisterType((*NonResourcePolicyRule)(nil), "k8s.io.api.flowcontrol.v1beta2.NonResourcePolicyRule") - proto.RegisterType((*PolicyRulesWithSubjects)(nil), "k8s.io.api.flowcontrol.v1beta2.PolicyRulesWithSubjects") - proto.RegisterType((*PriorityLevelConfiguration)(nil), "k8s.io.api.flowcontrol.v1beta2.PriorityLevelConfiguration") - proto.RegisterType((*PriorityLevelConfigurationCondition)(nil), "k8s.io.api.flowcontrol.v1beta2.PriorityLevelConfigurationCondition") - proto.RegisterType((*PriorityLevelConfigurationList)(nil), "k8s.io.api.flowcontrol.v1beta2.PriorityLevelConfigurationList") - proto.RegisterType((*PriorityLevelConfigurationReference)(nil), "k8s.io.api.flowcontrol.v1beta2.PriorityLevelConfigurationReference") - proto.RegisterType((*PriorityLevelConfigurationSpec)(nil), "k8s.io.api.flowcontrol.v1beta2.PriorityLevelConfigurationSpec") - proto.RegisterType((*PriorityLevelConfigurationStatus)(nil), "k8s.io.api.flowcontrol.v1beta2.PriorityLevelConfigurationStatus") - proto.RegisterType((*QueuingConfiguration)(nil), "k8s.io.api.flowcontrol.v1beta2.QueuingConfiguration") - proto.RegisterType((*ResourcePolicyRule)(nil), "k8s.io.api.flowcontrol.v1beta2.ResourcePolicyRule") - proto.RegisterType((*ServiceAccountSubject)(nil), "k8s.io.api.flowcontrol.v1beta2.ServiceAccountSubject") - proto.RegisterType((*Subject)(nil), "k8s.io.api.flowcontrol.v1beta2.Subject") - proto.RegisterType((*UserSubject)(nil), "k8s.io.api.flowcontrol.v1beta2.UserSubject") -} - -func init() { - proto.RegisterFile("k8s.io/api/flowcontrol/v1beta2/generated.proto", fileDescriptor_2e620af2eea53237) -} - -var fileDescriptor_2e620af2eea53237 = []byte{ - // 1602 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x73, 0xdb, 0xd4, - 0x16, 0x8f, 0x1c, 0x3b, 0x89, 0x4f, 0x3e, 0x7b, 0xd3, 0x4c, 0xfc, 0xd2, 0x37, 0x76, 0xaa, 0x37, - 0xf3, 0xfa, 0x1e, 0x6d, 0xe5, 0x36, 0xb4, 0xb4, 0xc0, 0xf0, 0x11, 0xa5, 0xa5, 0x94, 0x26, 0x69, - 0x7a, 0xd3, 0x42, 0xa7, 0x74, 0x86, 0x2a, 0xf2, 0x8d, 0xad, 0xc6, 0xfa, 0xa8, 0xae, 0x94, 0x10, - 0xba, 0x61, 0xf8, 0x0b, 0x58, 0xc3, 0x92, 0x05, 0x2b, 0x36, 0x6c, 0x59, 0xb0, 0xa4, 0xc3, 0xaa, - 0xcb, 0xae, 0x0c, 0x35, 0x2b, 0xfe, 0x03, 0xe8, 0x0c, 0x33, 0xcc, 0xbd, 0xba, 0x92, 0x2c, 0xdb, - 0xb2, 0x3c, 0xed, 0x4c, 0x57, 0xec, 0xa2, 0x73, 0x7f, 0xe7, 0x77, 0xee, 0x39, 0xf7, 0x7c, 0x39, - 0xa0, 0xec, 0x5d, 0xa4, 0x8a, 0x61, 0x57, 0x35, 0xc7, 0xa8, 0xee, 0x36, 0xed, 0x03, 0xdd, 0xb6, - 0x3c, 0xd7, 0x6e, 0x56, 0xf7, 0xcf, 0xee, 0x10, 0x4f, 0x5b, 0xa9, 0xd6, 0x89, 0x45, 0x5c, 0xcd, - 0x23, 0x35, 0xc5, 0x71, 0x6d, 0xcf, 0x46, 0xe5, 0x00, 0xaf, 0x68, 0x8e, 0xa1, 0x74, 0xe0, 0x15, - 0x81, 0x5f, 0x3a, 0x5d, 0x37, 0xbc, 0x86, 0xbf, 0xa3, 0xe8, 0xb6, 0x59, 0xad, 0xdb, 0x75, 0xbb, - 0xca, 0xd5, 0x76, 0xfc, 0x5d, 0xfe, 0xc5, 0x3f, 0xf8, 0x5f, 0x01, 0xdd, 0xd2, 0xb9, 0xd8, 0xbc, - 0xa9, 0xe9, 0x0d, 0xc3, 0x22, 0xee, 0x61, 0xd5, 0xd9, 0xab, 0x33, 0x01, 0xad, 0x9a, 0xc4, 0xd3, - 0xaa, 0xfb, 0x67, 0xbb, 0x2f, 0xb1, 0x54, 0x4d, 0xd3, 0x72, 0x7d, 0xcb, 0x33, 0x4c, 0xd2, 0xa3, - 0xf0, 0x5a, 0x96, 0x02, 0xd5, 0x1b, 0xc4, 0xd4, 0xba, 0xf5, 0xe4, 0x1f, 0x24, 0x58, 0xbe, 0xfc, - 0x29, 0x31, 0x1d, 0x6f, 0xcb, 0x35, 0x6c, 0xd7, 0xf0, 0x0e, 0xd7, 0xc9, 0x3e, 0x69, 0xae, 0xd9, - 0xd6, 0xae, 0x51, 0xf7, 0x5d, 0xcd, 0x33, 0x6c, 0x0b, 0xdd, 0x86, 0x92, 0x65, 0x9b, 0x86, 0xa5, - 0x31, 0xb9, 0xee, 0xbb, 0x2e, 0xb1, 0xf4, 0xc3, 0xed, 0x86, 0xe6, 0x12, 0x5a, 0x92, 0x96, 0xa5, - 0xff, 0x15, 0xd4, 0x7f, 0xb7, 0x5b, 0x95, 0xd2, 0x66, 0x0a, 0x06, 0xa7, 0x6a, 0xa3, 0xb7, 0x60, - 0xb6, 0x49, 0xac, 0x9a, 0xb6, 0xd3, 0x24, 0x5b, 0xc4, 0xd5, 0x89, 0xe5, 0x95, 0x72, 0x9c, 0x70, - 0xbe, 0xdd, 0xaa, 0xcc, 0xae, 0x27, 0x8f, 0x70, 0x37, 0x56, 0xbe, 0x03, 0x8b, 0xef, 0x35, 0xed, - 0x83, 0x4b, 0x06, 0xf5, 0x0c, 0xab, 0xee, 0x1b, 0xb4, 0x41, 0xdc, 0x0d, 0xe2, 0x35, 0xec, 0x1a, - 0x7a, 0x07, 0xf2, 0xde, 0xa1, 0x43, 0xf8, 0xfd, 0x8a, 0xea, 0xc9, 0x47, 0xad, 0xca, 0x48, 0xbb, - 0x55, 0xc9, 0xdf, 0x3c, 0x74, 0xc8, 0xb3, 0x56, 0xe5, 0x58, 0x8a, 0x1a, 0x3b, 0xc6, 0x5c, 0x51, - 0xfe, 0x2a, 0x07, 0xc0, 0x50, 0xdb, 0x3c, 0x70, 0xe8, 0x1e, 0x4c, 0xb0, 0xc7, 0xaa, 0x69, 0x9e, - 0xc6, 0x39, 0x27, 0x57, 0xce, 0x28, 0x71, 0xa6, 0x44, 0x31, 0x57, 0x9c, 0xbd, 0x3a, 0x13, 0x50, - 0x85, 0xa1, 0x95, 0xfd, 0xb3, 0xca, 0xf5, 0x9d, 0xfb, 0x44, 0xf7, 0x36, 0x88, 0xa7, 0xa9, 0x48, - 0xdc, 0x02, 0x62, 0x19, 0x8e, 0x58, 0xd1, 0x16, 0xe4, 0xa9, 0x43, 0x74, 0x1e, 0x80, 0xc9, 0x15, - 0x45, 0x19, 0x9c, 0x87, 0x4a, 0x7c, 0xb7, 0x6d, 0x87, 0xe8, 0xea, 0x54, 0xe8, 0x21, 0xfb, 0xc2, - 0x9c, 0x09, 0xdd, 0x86, 0x31, 0xea, 0x69, 0x9e, 0x4f, 0x4b, 0xa3, 0x3d, 0x37, 0xce, 0xe2, 0xe4, - 0x7a, 0xea, 0x8c, 0x60, 0x1d, 0x0b, 0xbe, 0xb1, 0xe0, 0x93, 0x9f, 0xe4, 0x60, 0x3e, 0x06, 0xaf, - 0xd9, 0x56, 0xcd, 0xe0, 0x99, 0xf2, 0x66, 0x22, 0xea, 0x27, 0xba, 0xa2, 0xbe, 0xd8, 0x47, 0x25, - 0x8e, 0x38, 0x7a, 0x3d, 0xba, 0x6e, 0x8e, 0xab, 0x1f, 0x4f, 0x1a, 0x7f, 0xd6, 0xaa, 0xcc, 0x46, - 0x6a, 0xc9, 0xfb, 0xa0, 0x7d, 0x40, 0x4d, 0x8d, 0x7a, 0x37, 0x5d, 0xcd, 0xa2, 0x01, 0xad, 0x61, - 0x12, 0xe1, 0xf5, 0x2b, 0xc3, 0xbd, 0x13, 0xd3, 0x50, 0x97, 0x84, 0x49, 0xb4, 0xde, 0xc3, 0x86, - 0xfb, 0x58, 0x40, 0xff, 0x85, 0x31, 0x97, 0x68, 0xd4, 0xb6, 0x4a, 0x79, 0x7e, 0xe5, 0x28, 0x5e, - 0x98, 0x4b, 0xb1, 0x38, 0x45, 0xff, 0x87, 0x71, 0x93, 0x50, 0xaa, 0xd5, 0x49, 0xa9, 0xc0, 0x81, - 0xb3, 0x02, 0x38, 0xbe, 0x11, 0x88, 0x71, 0x78, 0x2e, 0xff, 0x28, 0xc1, 0x4c, 0x1c, 0xa7, 0x75, - 0x83, 0x7a, 0xe8, 0x6e, 0x4f, 0xee, 0x29, 0xc3, 0xf9, 0xc4, 0xb4, 0x79, 0xe6, 0xcd, 0x09, 0x73, - 0x13, 0xa1, 0xa4, 0x23, 0xef, 0xae, 0x43, 0xc1, 0xf0, 0x88, 0xc9, 0xa2, 0x3e, 0xda, 0x15, 0xae, - 0x8c, 0x24, 0x51, 0xa7, 0x05, 0x6d, 0xe1, 0x2a, 0x23, 0xc0, 0x01, 0x8f, 0xfc, 0xfb, 0x68, 0xa7, - 0x07, 0x2c, 0x1f, 0xd1, 0xb7, 0x12, 0x2c, 0x39, 0xa9, 0x0d, 0x46, 0x38, 0xb5, 0x96, 0x65, 0x39, - 0xbd, 0x45, 0x61, 0xb2, 0x4b, 0x58, 0x5f, 0x21, 0xaa, 0x2c, 0xae, 0xb4, 0x34, 0x00, 0x3c, 0xe0, - 0x2a, 0xe8, 0x03, 0x40, 0xa6, 0xe6, 0xb1, 0x88, 0xd6, 0xb7, 0x5c, 0xa2, 0x93, 0x1a, 0x63, 0x15, - 0x4d, 0x29, 0xca, 0x8e, 0x8d, 0x1e, 0x04, 0xee, 0xa3, 0x85, 0xbe, 0x90, 0x60, 0xbe, 0xd6, 0xdb, - 0x64, 0x44, 0x5e, 0x5e, 0x18, 0x26, 0xd0, 0x7d, 0x7a, 0x94, 0xba, 0xd8, 0x6e, 0x55, 0xe6, 0xfb, - 0x1c, 0xe0, 0x7e, 0xc6, 0xd0, 0x5d, 0x28, 0xb8, 0x7e, 0x93, 0xd0, 0x52, 0x9e, 0x3f, 0x6f, 0xa6, - 0xd5, 0x2d, 0xbb, 0x69, 0xe8, 0x87, 0x98, 0xa9, 0x7c, 0x64, 0x78, 0x8d, 0x6d, 0x9f, 0xf7, 0x2a, - 0x1a, 0xbf, 0x35, 0x3f, 0xc2, 0x01, 0xa9, 0xfc, 0x10, 0xe6, 0xba, 0x9b, 0x06, 0xaa, 0x03, 0xe8, - 0x61, 0x9d, 0xb2, 0x01, 0xc1, 0xcc, 0xbe, 0x3a, 0x7c, 0x56, 0x45, 0x35, 0x1e, 0xf7, 0xcb, 0x48, - 0x44, 0x71, 0x07, 0xb5, 0x7c, 0x06, 0xa6, 0xae, 0xb8, 0xb6, 0xef, 0x88, 0x3b, 0xa2, 0x65, 0xc8, - 0x5b, 0x9a, 0x19, 0x76, 0x9f, 0xa8, 0x23, 0x6e, 0x6a, 0x26, 0xc1, 0xfc, 0x44, 0xfe, 0x46, 0x82, - 0xe9, 0x75, 0xc3, 0x34, 0x3c, 0x4c, 0xa8, 0x63, 0x5b, 0x94, 0xa0, 0xf3, 0x89, 0x8e, 0x75, 0xbc, - 0xab, 0x63, 0x1d, 0x49, 0x80, 0x3b, 0x7a, 0xd5, 0xc7, 0x30, 0xfe, 0xc0, 0x27, 0xbe, 0x61, 0xd5, - 0x45, 0xbf, 0x3e, 0x97, 0xe5, 0xe0, 0x8d, 0x00, 0x9e, 0xc8, 0x36, 0x75, 0x92, 0xb5, 0x00, 0x71, - 0x82, 0x43, 0x46, 0xf9, 0xaf, 0x1c, 0x1c, 0xe7, 0x86, 0x49, 0x6d, 0xc0, 0x54, 0xbe, 0x0b, 0x25, - 0x8d, 0x52, 0xdf, 0x25, 0xb5, 0xb4, 0xa9, 0xbc, 0x2c, 0xbc, 0x29, 0xad, 0xa6, 0xe0, 0x70, 0x2a, - 0x03, 0xba, 0x0f, 0xd3, 0xcd, 0x4e, 0xdf, 0x85, 0x9b, 0xa7, 0xb3, 0xdc, 0x4c, 0x04, 0x4c, 0x5d, - 0x10, 0x37, 0x48, 0x06, 0x1d, 0x27, 0xa9, 0xfb, 0x6d, 0x01, 0xa3, 0xc3, 0x6f, 0x01, 0xe8, 0x3a, - 0x2c, 0xec, 0xd8, 0xae, 0x6b, 0x1f, 0x18, 0x56, 0x9d, 0xdb, 0x09, 0x49, 0xf2, 0x9c, 0xe4, 0x5f, - 0xed, 0x56, 0x65, 0x41, 0xed, 0x07, 0xc0, 0xfd, 0xf5, 0xe4, 0x03, 0x58, 0xd8, 0x64, 0x3d, 0x85, - 0xda, 0xbe, 0xab, 0x93, 0xb8, 0x20, 0x50, 0x05, 0x0a, 0xfb, 0xc4, 0xdd, 0x09, 0x92, 0xba, 0xa8, - 0x16, 0x59, 0x39, 0x7c, 0xc8, 0x04, 0x38, 0x90, 0x33, 0x4f, 0xac, 0x58, 0xf3, 0x16, 0x5e, 0xa7, - 0xa5, 0x31, 0x0e, 0xe5, 0x9e, 0x6c, 0x26, 0x8f, 0x70, 0x37, 0x56, 0x6e, 0xe5, 0x60, 0x31, 0xa5, - 0xfe, 0xd0, 0x2d, 0x98, 0xa0, 0xe2, 0x6f, 0x51, 0x53, 0x27, 0xb2, 0xde, 0x42, 0xe8, 0xc6, 0xdd, - 0x3f, 0x24, 0xc3, 0x11, 0x15, 0xb2, 0x61, 0xda, 0x15, 0x57, 0xe0, 0x36, 0xc5, 0x14, 0x58, 0xc9, - 0xe2, 0xee, 0x8d, 0x4e, 0xfc, 0xd8, 0xb8, 0x93, 0x10, 0x27, 0xf9, 0xd1, 0x43, 0x98, 0xeb, 0x70, - 0x3b, 0xb0, 0x39, 0xca, 0x6d, 0x9e, 0xcf, 0xb2, 0xd9, 0xf7, 0x51, 0xd4, 0x92, 0x30, 0x3b, 0xb7, - 0xd9, 0x45, 0x8b, 0x7b, 0x0c, 0xc9, 0x3f, 0xe7, 0x60, 0xc0, 0x60, 0x78, 0x09, 0x4b, 0xde, 0xbd, - 0xc4, 0x92, 0xf7, 0xf6, 0xf3, 0x4f, 0xbc, 0xd4, 0xa5, 0xaf, 0xd1, 0xb5, 0xf4, 0xbd, 0xfb, 0x02, - 0x36, 0x06, 0x2f, 0x81, 0x7f, 0xe4, 0xe0, 0x3f, 0xe9, 0xca, 0xf1, 0x52, 0x78, 0x2d, 0xd1, 0x62, - 0x2f, 0x74, 0xb5, 0xd8, 0x13, 0x43, 0x50, 0xfc, 0xb3, 0x24, 0x76, 0x2d, 0x89, 0xbf, 0x48, 0x50, - 0x4e, 0x8f, 0xdb, 0x4b, 0x58, 0x1a, 0x3f, 0x49, 0x2e, 0x8d, 0x6f, 0x3c, 0x7f, 0x92, 0xa5, 0x2c, - 0x91, 0x57, 0x06, 0xe5, 0x56, 0xb4, 0xee, 0x0d, 0x31, 0xf2, 0xbf, 0xcb, 0x0d, 0x0a, 0x15, 0xdf, - 0x4e, 0x33, 0x7e, 0xb5, 0x24, 0xb4, 0x2f, 0x5b, 0x6c, 0xf4, 0x98, 0x6c, 0x7a, 0x04, 0x09, 0xd9, - 0x80, 0xf1, 0x66, 0x30, 0xab, 0x45, 0x51, 0xaf, 0x0e, 0x35, 0x22, 0x07, 0x8d, 0xf6, 0x60, 0x2d, - 0x10, 0x30, 0x1c, 0xd2, 0xa3, 0x1a, 0x8c, 0x11, 0xfe, 0x53, 0x7d, 0xd8, 0xca, 0xce, 0xfa, 0x61, - 0xaf, 0x02, 0xcb, 0xc2, 0x00, 0x85, 0x05, 0xb7, 0xfc, 0xb5, 0x04, 0xcb, 0x59, 0x2d, 0x01, 0x1d, - 0xf4, 0x59, 0xf1, 0x5e, 0x60, 0x7d, 0x1f, 0x7e, 0xe5, 0xfb, 0x5e, 0x82, 0xa3, 0xfd, 0x36, 0x29, - 0x56, 0x64, 0x6c, 0x7d, 0x8a, 0x76, 0x9f, 0xa8, 0xc8, 0x6e, 0x70, 0x29, 0x16, 0xa7, 0xe8, 0x14, - 0x4c, 0x34, 0x34, 0xab, 0xb6, 0x6d, 0x7c, 0x16, 0x6e, 0xf5, 0x51, 0x9a, 0xbf, 0x2f, 0xe4, 0x38, - 0x42, 0xa0, 0x4b, 0x30, 0xc7, 0xf5, 0xd6, 0x89, 0x55, 0xf7, 0x1a, 0xfc, 0x45, 0xc4, 0x6a, 0x12, - 0x4d, 0x9d, 0x1b, 0x5d, 0xe7, 0xb8, 0x47, 0x43, 0xfe, 0x53, 0x02, 0xf4, 0x3c, 0xdb, 0xc4, 0x49, - 0x28, 0x6a, 0x8e, 0xc1, 0x57, 0xdc, 0xa0, 0xd0, 0x8a, 0xea, 0x74, 0xbb, 0x55, 0x29, 0xae, 0x6e, - 0x5d, 0x0d, 0x84, 0x38, 0x3e, 0x67, 0xe0, 0x70, 0xd0, 0x06, 0x03, 0x55, 0x80, 0x43, 0xc3, 0x14, - 0xc7, 0xe7, 0xe8, 0x22, 0x4c, 0xe9, 0x4d, 0x9f, 0x7a, 0xc4, 0xdd, 0xd6, 0x6d, 0x87, 0xf0, 0xc6, - 0x34, 0xa1, 0x1e, 0x15, 0x3e, 0x4d, 0xad, 0x75, 0x9c, 0xe1, 0x04, 0x12, 0x29, 0x00, 0xac, 0xac, - 0xa8, 0xa3, 0x31, 0x3b, 0x05, 0x6e, 0x67, 0x86, 0x3d, 0xd8, 0x66, 0x24, 0xc5, 0x1d, 0x08, 0xf9, - 0x3e, 0x2c, 0x6c, 0x13, 0x77, 0xdf, 0xd0, 0xc9, 0xaa, 0xae, 0xdb, 0xbe, 0xe5, 0x85, 0xcb, 0x7a, - 0x15, 0x8a, 0x11, 0x4c, 0x54, 0xde, 0x11, 0x61, 0xbf, 0x18, 0x71, 0xe1, 0x18, 0x13, 0x95, 0x7a, - 0x2e, 0xb5, 0xd4, 0x7f, 0xca, 0xc1, 0x78, 0x4c, 0x9f, 0xdf, 0x33, 0xac, 0x9a, 0x60, 0x3e, 0x16, - 0xa2, 0xaf, 0x19, 0x56, 0xed, 0x59, 0xab, 0x32, 0x29, 0x60, 0xec, 0x13, 0x73, 0x20, 0xba, 0x0a, - 0x79, 0x9f, 0x12, 0x57, 0x14, 0xf1, 0xc9, 0xac, 0x64, 0xbe, 0x45, 0x89, 0x1b, 0xee, 0x57, 0x13, - 0x8c, 0x99, 0x09, 0x30, 0xa7, 0x40, 0x1b, 0x50, 0xa8, 0xb3, 0x47, 0x11, 0x75, 0x7a, 0x2a, 0x8b, - 0xab, 0xf3, 0x47, 0x4c, 0x90, 0x06, 0x5c, 0x82, 0x03, 0x16, 0xf4, 0x00, 0x66, 0x68, 0x22, 0x84, - 0xfc, 0xb9, 0x86, 0xd8, 0x97, 0xfa, 0x06, 0x5e, 0x45, 0xed, 0x56, 0x65, 0x26, 0x79, 0x84, 0xbb, - 0x0c, 0xc8, 0x55, 0x98, 0xec, 0x70, 0x30, 0xbb, 0xcb, 0xaa, 0x97, 0x1e, 0x3d, 0x2d, 0x8f, 0x3c, - 0x7e, 0x5a, 0x1e, 0x79, 0xf2, 0xb4, 0x3c, 0xf2, 0x79, 0xbb, 0x2c, 0x3d, 0x6a, 0x97, 0xa5, 0xc7, - 0xed, 0xb2, 0xf4, 0xa4, 0x5d, 0x96, 0x7e, 0x6d, 0x97, 0xa5, 0x2f, 0x7f, 0x2b, 0x8f, 0xdc, 0x29, - 0x0f, 0xfe, 0x5f, 0xec, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe3, 0xd5, 0xd0, 0x62, 0xac, 0x15, - 0x00, 0x00, -} +func (m *UserSubject) Reset() { *m = UserSubject{} } func (m *ExemptPriorityLevelConfiguration) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/flowcontrol/v1beta2/generated.protomessage.pb.go b/staging/src/k8s.io/api/flowcontrol/v1beta2/generated.protomessage.pb.go new file mode 100644 index 0000000000000..672834e9fa6ae --- /dev/null +++ b/staging/src/k8s.io/api/flowcontrol/v1beta2/generated.protomessage.pb.go @@ -0,0 +1,68 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta2 + +func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} + +func (*FlowDistinguisherMethod) ProtoMessage() {} + +func (*FlowSchema) ProtoMessage() {} + +func (*FlowSchemaCondition) ProtoMessage() {} + +func (*FlowSchemaList) ProtoMessage() {} + +func (*FlowSchemaSpec) ProtoMessage() {} + +func (*FlowSchemaStatus) ProtoMessage() {} + +func (*GroupSubject) ProtoMessage() {} + +func (*LimitResponse) ProtoMessage() {} + +func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} + +func (*NonResourcePolicyRule) ProtoMessage() {} + +func (*PolicyRulesWithSubjects) ProtoMessage() {} + +func (*PriorityLevelConfiguration) ProtoMessage() {} + +func (*PriorityLevelConfigurationCondition) ProtoMessage() {} + +func (*PriorityLevelConfigurationList) ProtoMessage() {} + +func (*PriorityLevelConfigurationReference) ProtoMessage() {} + +func (*PriorityLevelConfigurationSpec) ProtoMessage() {} + +func (*PriorityLevelConfigurationStatus) ProtoMessage() {} + +func (*QueuingConfiguration) ProtoMessage() {} + +func (*ResourcePolicyRule) ProtoMessage() {} + +func (*ServiceAccountSubject) ProtoMessage() {} + +func (*Subject) ProtoMessage() {} + +func (*UserSubject) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/flowcontrol/v1beta2/zz_generated.model_name.go b/staging/src/k8s.io/api/flowcontrol/v1beta2/zz_generated.model_name.go new file mode 100644 index 0000000000000..eb25256d26873 --- /dev/null +++ b/staging/src/k8s.io/api/flowcontrol/v1beta2/zz_generated.model_name.go @@ -0,0 +1,137 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta2 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExemptPriorityLevelConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.ExemptPriorityLevelConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowDistinguisherMethod) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.FlowDistinguisherMethod" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchema) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.FlowSchema" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaCondition) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.FlowSchemaCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaList) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.FlowSchemaList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaSpec) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.FlowSchemaSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaStatus) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.FlowSchemaStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GroupSubject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.GroupSubject" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LimitResponse) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.LimitResponse" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LimitedPriorityLevelConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.LimitedPriorityLevelConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NonResourcePolicyRule) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.NonResourcePolicyRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PolicyRulesWithSubjects) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.PolicyRulesWithSubjects" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationCondition) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationList) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationReference) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationSpec) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationStatus) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in QueuingConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.QueuingConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourcePolicyRule) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.ResourcePolicyRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceAccountSubject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.ServiceAccountSubject" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Subject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.Subject" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in UserSubject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta2.UserSubject" +} diff --git a/staging/src/k8s.io/api/flowcontrol/v1beta3/doc.go b/staging/src/k8s.io/api/flowcontrol/v1beta3/doc.go index 95f4430d38362..ad57ab2bc8bf6 100644 --- a/staging/src/k8s.io/api/flowcontrol/v1beta3/doc.go +++ b/staging/src/k8s.io/api/flowcontrol/v1beta3/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.flowcontrol.v1beta3 // +groupName=flowcontrol.apiserver.k8s.io diff --git a/staging/src/k8s.io/api/flowcontrol/v1beta3/generated.pb.go b/staging/src/k8s.io/api/flowcontrol/v1beta3/generated.pb.go index e0a3fc1e180d2..2d6d94af1fd8e 100644 --- a/staging/src/k8s.io/api/flowcontrol/v1beta3/generated.pb.go +++ b/staging/src/k8s.io/api/flowcontrol/v1beta3/generated.pb.go @@ -24,802 +24,56 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } -func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } -func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} -func (*ExemptPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{0} -} -func (m *ExemptPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExemptPriorityLevelConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExemptPriorityLevelConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExemptPriorityLevelConfiguration.Merge(m, src) -} -func (m *ExemptPriorityLevelConfiguration) XXX_Size() int { - return m.Size() -} -func (m *ExemptPriorityLevelConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_ExemptPriorityLevelConfiguration.DiscardUnknown(m) -} +func (m *FlowSchema) Reset() { *m = FlowSchema{} } -var xxx_messageInfo_ExemptPriorityLevelConfiguration proto.InternalMessageInfo +func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } -func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } -func (*FlowDistinguisherMethod) ProtoMessage() {} -func (*FlowDistinguisherMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{1} -} -func (m *FlowDistinguisherMethod) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowDistinguisherMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowDistinguisherMethod) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowDistinguisherMethod.Merge(m, src) -} -func (m *FlowDistinguisherMethod) XXX_Size() int { - return m.Size() -} -func (m *FlowDistinguisherMethod) XXX_DiscardUnknown() { - xxx_messageInfo_FlowDistinguisherMethod.DiscardUnknown(m) -} +func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } -var xxx_messageInfo_FlowDistinguisherMethod proto.InternalMessageInfo +func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } -func (m *FlowSchema) Reset() { *m = FlowSchema{} } -func (*FlowSchema) ProtoMessage() {} -func (*FlowSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{2} -} -func (m *FlowSchema) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchema) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchema.Merge(m, src) -} -func (m *FlowSchema) XXX_Size() int { - return m.Size() -} -func (m *FlowSchema) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchema.DiscardUnknown(m) -} +func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } -var xxx_messageInfo_FlowSchema proto.InternalMessageInfo +func (m *GroupSubject) Reset() { *m = GroupSubject{} } -func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } -func (*FlowSchemaCondition) ProtoMessage() {} -func (*FlowSchemaCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{3} -} -func (m *FlowSchemaCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaCondition.Merge(m, src) -} -func (m *FlowSchemaCondition) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaCondition) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaCondition.DiscardUnknown(m) -} +func (m *LimitResponse) Reset() { *m = LimitResponse{} } -var xxx_messageInfo_FlowSchemaCondition proto.InternalMessageInfo +func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } -func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } -func (*FlowSchemaList) ProtoMessage() {} -func (*FlowSchemaList) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{4} -} -func (m *FlowSchemaList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaList) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaList.Merge(m, src) -} -func (m *FlowSchemaList) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaList) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaList.DiscardUnknown(m) -} +func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } -var xxx_messageInfo_FlowSchemaList proto.InternalMessageInfo +func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } -func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } -func (*FlowSchemaSpec) ProtoMessage() {} -func (*FlowSchemaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{5} -} -func (m *FlowSchemaSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaSpec.Merge(m, src) -} -func (m *FlowSchemaSpec) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaSpec) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaSpec.DiscardUnknown(m) -} +func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } -var xxx_messageInfo_FlowSchemaSpec proto.InternalMessageInfo +func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } -func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } -func (*FlowSchemaStatus) ProtoMessage() {} -func (*FlowSchemaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{6} -} -func (m *FlowSchemaStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlowSchemaStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FlowSchemaStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlowSchemaStatus.Merge(m, src) -} -func (m *FlowSchemaStatus) XXX_Size() int { - return m.Size() -} -func (m *FlowSchemaStatus) XXX_DiscardUnknown() { - xxx_messageInfo_FlowSchemaStatus.DiscardUnknown(m) -} +func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } -var xxx_messageInfo_FlowSchemaStatus proto.InternalMessageInfo +func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } -func (m *GroupSubject) Reset() { *m = GroupSubject{} } -func (*GroupSubject) ProtoMessage() {} -func (*GroupSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{7} -} -func (m *GroupSubject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GroupSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GroupSubject) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupSubject.Merge(m, src) -} -func (m *GroupSubject) XXX_Size() int { - return m.Size() -} -func (m *GroupSubject) XXX_DiscardUnknown() { - xxx_messageInfo_GroupSubject.DiscardUnknown(m) -} +func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } -var xxx_messageInfo_GroupSubject proto.InternalMessageInfo +func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } -func (m *LimitResponse) Reset() { *m = LimitResponse{} } -func (*LimitResponse) ProtoMessage() {} -func (*LimitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{8} -} -func (m *LimitResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LimitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LimitResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LimitResponse.Merge(m, src) -} -func (m *LimitResponse) XXX_Size() int { - return m.Size() -} -func (m *LimitResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LimitResponse.DiscardUnknown(m) -} +func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } -var xxx_messageInfo_LimitResponse proto.InternalMessageInfo +func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } -func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } -func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} -func (*LimitedPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{9} -} -func (m *LimitedPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LimitedPriorityLevelConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LimitedPriorityLevelConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_LimitedPriorityLevelConfiguration.Merge(m, src) -} -func (m *LimitedPriorityLevelConfiguration) XXX_Size() int { - return m.Size() -} -func (m *LimitedPriorityLevelConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_LimitedPriorityLevelConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_LimitedPriorityLevelConfiguration proto.InternalMessageInfo - -func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } -func (*NonResourcePolicyRule) ProtoMessage() {} -func (*NonResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{10} -} -func (m *NonResourcePolicyRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NonResourcePolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NonResourcePolicyRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_NonResourcePolicyRule.Merge(m, src) -} -func (m *NonResourcePolicyRule) XXX_Size() int { - return m.Size() -} -func (m *NonResourcePolicyRule) XXX_DiscardUnknown() { - xxx_messageInfo_NonResourcePolicyRule.DiscardUnknown(m) -} - -var xxx_messageInfo_NonResourcePolicyRule proto.InternalMessageInfo - -func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } -func (*PolicyRulesWithSubjects) ProtoMessage() {} -func (*PolicyRulesWithSubjects) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{11} -} -func (m *PolicyRulesWithSubjects) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PolicyRulesWithSubjects) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PolicyRulesWithSubjects) XXX_Merge(src proto.Message) { - xxx_messageInfo_PolicyRulesWithSubjects.Merge(m, src) -} -func (m *PolicyRulesWithSubjects) XXX_Size() int { - return m.Size() -} -func (m *PolicyRulesWithSubjects) XXX_DiscardUnknown() { - xxx_messageInfo_PolicyRulesWithSubjects.DiscardUnknown(m) -} +func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } -var xxx_messageInfo_PolicyRulesWithSubjects proto.InternalMessageInfo +func (m *Subject) Reset() { *m = Subject{} } -func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } -func (*PriorityLevelConfiguration) ProtoMessage() {} -func (*PriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{12} -} -func (m *PriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfiguration.Merge(m, src) -} -func (m *PriorityLevelConfiguration) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfiguration proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } -func (*PriorityLevelConfigurationCondition) ProtoMessage() {} -func (*PriorityLevelConfigurationCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{13} -} -func (m *PriorityLevelConfigurationCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationCondition.Merge(m, src) -} -func (m *PriorityLevelConfigurationCondition) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationCondition) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationCondition proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } -func (*PriorityLevelConfigurationList) ProtoMessage() {} -func (*PriorityLevelConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{14} -} -func (m *PriorityLevelConfigurationList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationList.Merge(m, src) -} -func (m *PriorityLevelConfigurationList) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationList) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationList.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationList proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } -func (*PriorityLevelConfigurationReference) ProtoMessage() {} -func (*PriorityLevelConfigurationReference) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{15} -} -func (m *PriorityLevelConfigurationReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationReference.Merge(m, src) -} -func (m *PriorityLevelConfigurationReference) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationReference) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationReference.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationReference proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } -func (*PriorityLevelConfigurationSpec) ProtoMessage() {} -func (*PriorityLevelConfigurationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{16} -} -func (m *PriorityLevelConfigurationSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationSpec.Merge(m, src) -} -func (m *PriorityLevelConfigurationSpec) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationSpec) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationSpec proto.InternalMessageInfo - -func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } -func (*PriorityLevelConfigurationStatus) ProtoMessage() {} -func (*PriorityLevelConfigurationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{17} -} -func (m *PriorityLevelConfigurationStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityLevelConfigurationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityLevelConfigurationStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityLevelConfigurationStatus.Merge(m, src) -} -func (m *PriorityLevelConfigurationStatus) XXX_Size() int { - return m.Size() -} -func (m *PriorityLevelConfigurationStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityLevelConfigurationStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityLevelConfigurationStatus proto.InternalMessageInfo - -func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } -func (*QueuingConfiguration) ProtoMessage() {} -func (*QueuingConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{18} -} -func (m *QueuingConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueuingConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *QueuingConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueuingConfiguration.Merge(m, src) -} -func (m *QueuingConfiguration) XXX_Size() int { - return m.Size() -} -func (m *QueuingConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_QueuingConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_QueuingConfiguration proto.InternalMessageInfo - -func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } -func (*ResourcePolicyRule) ProtoMessage() {} -func (*ResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{19} -} -func (m *ResourcePolicyRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourcePolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourcePolicyRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourcePolicyRule.Merge(m, src) -} -func (m *ResourcePolicyRule) XXX_Size() int { - return m.Size() -} -func (m *ResourcePolicyRule) XXX_DiscardUnknown() { - xxx_messageInfo_ResourcePolicyRule.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourcePolicyRule proto.InternalMessageInfo - -func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } -func (*ServiceAccountSubject) ProtoMessage() {} -func (*ServiceAccountSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{20} -} -func (m *ServiceAccountSubject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceAccountSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceAccountSubject) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceAccountSubject.Merge(m, src) -} -func (m *ServiceAccountSubject) XXX_Size() int { - return m.Size() -} -func (m *ServiceAccountSubject) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceAccountSubject.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceAccountSubject proto.InternalMessageInfo - -func (m *Subject) Reset() { *m = Subject{} } -func (*Subject) ProtoMessage() {} -func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{21} -} -func (m *Subject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Subject) XXX_Merge(src proto.Message) { - xxx_messageInfo_Subject.Merge(m, src) -} -func (m *Subject) XXX_Size() int { - return m.Size() -} -func (m *Subject) XXX_DiscardUnknown() { - xxx_messageInfo_Subject.DiscardUnknown(m) -} - -var xxx_messageInfo_Subject proto.InternalMessageInfo - -func (m *UserSubject) Reset() { *m = UserSubject{} } -func (*UserSubject) ProtoMessage() {} -func (*UserSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_52ab6629c083d251, []int{22} -} -func (m *UserSubject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *UserSubject) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserSubject.Merge(m, src) -} -func (m *UserSubject) XXX_Size() int { - return m.Size() -} -func (m *UserSubject) XXX_DiscardUnknown() { - xxx_messageInfo_UserSubject.DiscardUnknown(m) -} - -var xxx_messageInfo_UserSubject proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ExemptPriorityLevelConfiguration)(nil), "k8s.io.api.flowcontrol.v1beta3.ExemptPriorityLevelConfiguration") - proto.RegisterType((*FlowDistinguisherMethod)(nil), "k8s.io.api.flowcontrol.v1beta3.FlowDistinguisherMethod") - proto.RegisterType((*FlowSchema)(nil), "k8s.io.api.flowcontrol.v1beta3.FlowSchema") - proto.RegisterType((*FlowSchemaCondition)(nil), "k8s.io.api.flowcontrol.v1beta3.FlowSchemaCondition") - proto.RegisterType((*FlowSchemaList)(nil), "k8s.io.api.flowcontrol.v1beta3.FlowSchemaList") - proto.RegisterType((*FlowSchemaSpec)(nil), "k8s.io.api.flowcontrol.v1beta3.FlowSchemaSpec") - proto.RegisterType((*FlowSchemaStatus)(nil), "k8s.io.api.flowcontrol.v1beta3.FlowSchemaStatus") - proto.RegisterType((*GroupSubject)(nil), "k8s.io.api.flowcontrol.v1beta3.GroupSubject") - proto.RegisterType((*LimitResponse)(nil), "k8s.io.api.flowcontrol.v1beta3.LimitResponse") - proto.RegisterType((*LimitedPriorityLevelConfiguration)(nil), "k8s.io.api.flowcontrol.v1beta3.LimitedPriorityLevelConfiguration") - proto.RegisterType((*NonResourcePolicyRule)(nil), "k8s.io.api.flowcontrol.v1beta3.NonResourcePolicyRule") - proto.RegisterType((*PolicyRulesWithSubjects)(nil), "k8s.io.api.flowcontrol.v1beta3.PolicyRulesWithSubjects") - proto.RegisterType((*PriorityLevelConfiguration)(nil), "k8s.io.api.flowcontrol.v1beta3.PriorityLevelConfiguration") - proto.RegisterType((*PriorityLevelConfigurationCondition)(nil), "k8s.io.api.flowcontrol.v1beta3.PriorityLevelConfigurationCondition") - proto.RegisterType((*PriorityLevelConfigurationList)(nil), "k8s.io.api.flowcontrol.v1beta3.PriorityLevelConfigurationList") - proto.RegisterType((*PriorityLevelConfigurationReference)(nil), "k8s.io.api.flowcontrol.v1beta3.PriorityLevelConfigurationReference") - proto.RegisterType((*PriorityLevelConfigurationSpec)(nil), "k8s.io.api.flowcontrol.v1beta3.PriorityLevelConfigurationSpec") - proto.RegisterType((*PriorityLevelConfigurationStatus)(nil), "k8s.io.api.flowcontrol.v1beta3.PriorityLevelConfigurationStatus") - proto.RegisterType((*QueuingConfiguration)(nil), "k8s.io.api.flowcontrol.v1beta3.QueuingConfiguration") - proto.RegisterType((*ResourcePolicyRule)(nil), "k8s.io.api.flowcontrol.v1beta3.ResourcePolicyRule") - proto.RegisterType((*ServiceAccountSubject)(nil), "k8s.io.api.flowcontrol.v1beta3.ServiceAccountSubject") - proto.RegisterType((*Subject)(nil), "k8s.io.api.flowcontrol.v1beta3.Subject") - proto.RegisterType((*UserSubject)(nil), "k8s.io.api.flowcontrol.v1beta3.UserSubject") -} - -func init() { - proto.RegisterFile("k8s.io/api/flowcontrol/v1beta3/generated.proto", fileDescriptor_52ab6629c083d251) -} - -var fileDescriptor_52ab6629c083d251 = []byte{ - // 1589 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcb, 0x6f, 0xdc, 0x54, - 0x17, 0x8f, 0x27, 0x33, 0x49, 0xe6, 0xe4, 0xd9, 0x9b, 0x46, 0x99, 0x2f, 0xfd, 0x34, 0x93, 0xfa, - 0x93, 0xbe, 0x02, 0x6d, 0x3d, 0x7d, 0xd2, 0x02, 0xe2, 0x51, 0xa7, 0xa5, 0x94, 0x26, 0x69, 0x7a, - 0xd3, 0x42, 0x55, 0x2a, 0x51, 0xc7, 0x73, 0xe3, 0x71, 0x33, 0x7e, 0xd4, 0xd7, 0x4e, 0x08, 0xdd, - 0x20, 0xfe, 0x02, 0xd6, 0xb0, 0x64, 0xc1, 0x8a, 0x0d, 0x5b, 0x16, 0x2c, 0xa9, 0x58, 0x75, 0xd9, - 0xd5, 0x40, 0x87, 0x15, 0xff, 0x01, 0x54, 0x42, 0x42, 0xf7, 0xfa, 0xda, 0x1e, 0xcf, 0xcb, 0xa3, - 0x54, 0xea, 0x8a, 0x5d, 0x7c, 0xee, 0x39, 0xbf, 0x73, 0xcf, 0xb9, 0xe7, 0xf1, 0x9b, 0x80, 0xb2, - 0x73, 0x91, 0x2a, 0xa6, 0x53, 0xd5, 0x5c, 0xb3, 0xba, 0xdd, 0x70, 0xf6, 0x74, 0xc7, 0xf6, 0x3d, - 0xa7, 0x51, 0xdd, 0x3d, 0xbd, 0x45, 0x7c, 0xed, 0x6c, 0xd5, 0x20, 0x36, 0xf1, 0x34, 0x9f, 0xd4, - 0x14, 0xd7, 0x73, 0x7c, 0x07, 0x95, 0x43, 0x7d, 0x45, 0x73, 0x4d, 0xa5, 0x4d, 0x5f, 0x11, 0xfa, - 0x4b, 0x27, 0x0d, 0xd3, 0xaf, 0x07, 0x5b, 0x8a, 0xee, 0x58, 0x55, 0xc3, 0x31, 0x9c, 0x2a, 0x37, - 0xdb, 0x0a, 0xb6, 0xf9, 0x17, 0xff, 0xe0, 0x7f, 0x85, 0x70, 0x4b, 0xe7, 0x12, 0xf7, 0x96, 0xa6, - 0xd7, 0x4d, 0x9b, 0x78, 0xfb, 0x55, 0x77, 0xc7, 0x60, 0x02, 0x5a, 0xb5, 0x88, 0xaf, 0x55, 0x77, - 0x4f, 0x77, 0x5e, 0x62, 0xa9, 0xda, 0xcf, 0xca, 0x0b, 0x6c, 0xdf, 0xb4, 0x48, 0x97, 0xc1, 0xeb, - 0x59, 0x06, 0x54, 0xaf, 0x13, 0x4b, 0xeb, 0xb4, 0x93, 0x7f, 0x94, 0x60, 0xf9, 0xca, 0x67, 0xc4, - 0x72, 0xfd, 0x0d, 0xcf, 0x74, 0x3c, 0xd3, 0xdf, 0x5f, 0x25, 0xbb, 0xa4, 0xb1, 0xe2, 0xd8, 0xdb, - 0xa6, 0x11, 0x78, 0x9a, 0x6f, 0x3a, 0x36, 0xba, 0x03, 0x25, 0xdb, 0xb1, 0x4c, 0x5b, 0x63, 0x72, - 0x3d, 0xf0, 0x3c, 0x62, 0xeb, 0xfb, 0x9b, 0x75, 0xcd, 0x23, 0xb4, 0x24, 0x2d, 0x4b, 0xaf, 0x14, - 0xd4, 0xff, 0xb6, 0x9a, 0x95, 0xd2, 0x7a, 0x1f, 0x1d, 0xdc, 0xd7, 0x1a, 0xbd, 0x0d, 0xb3, 0x0d, - 0x62, 0xd7, 0xb4, 0xad, 0x06, 0xd9, 0x20, 0x9e, 0x4e, 0x6c, 0xbf, 0x94, 0xe3, 0x80, 0xf3, 0xad, - 0x66, 0x65, 0x76, 0x35, 0x7d, 0x84, 0x3b, 0x75, 0xe5, 0xbb, 0xb0, 0xf8, 0x7e, 0xc3, 0xd9, 0xbb, - 0x6c, 0x52, 0xdf, 0xb4, 0x8d, 0xc0, 0xa4, 0x75, 0xe2, 0xad, 0x11, 0xbf, 0xee, 0xd4, 0xd0, 0xbb, - 0x90, 0xf7, 0xf7, 0x5d, 0xc2, 0xef, 0x57, 0x54, 0x8f, 0x3f, 0x6e, 0x56, 0x46, 0x5a, 0xcd, 0x4a, - 0xfe, 0xd6, 0xbe, 0x4b, 0x9e, 0x37, 0x2b, 0x47, 0xfa, 0x98, 0xb1, 0x63, 0xcc, 0x0d, 0xe5, 0xaf, - 0x73, 0x00, 0x4c, 0x6b, 0x93, 0x27, 0x0e, 0xdd, 0x87, 0x09, 0xf6, 0x58, 0x35, 0xcd, 0xd7, 0x38, - 0xe6, 0xe4, 0x99, 0x53, 0x4a, 0x52, 0x29, 0x71, 0xce, 0x15, 0x77, 0xc7, 0x60, 0x02, 0xaa, 0x30, - 0x6d, 0x65, 0xf7, 0xb4, 0x72, 0x63, 0xeb, 0x01, 0xd1, 0xfd, 0x35, 0xe2, 0x6b, 0x2a, 0x12, 0xb7, - 0x80, 0x44, 0x86, 0x63, 0x54, 0xb4, 0x01, 0x79, 0xea, 0x12, 0x9d, 0x27, 0x60, 0xf2, 0x8c, 0xa2, - 0x0c, 0xae, 0x43, 0x25, 0xb9, 0xdb, 0xa6, 0x4b, 0x74, 0x75, 0x2a, 0x8a, 0x90, 0x7d, 0x61, 0x8e, - 0x84, 0xee, 0xc0, 0x18, 0xf5, 0x35, 0x3f, 0xa0, 0xa5, 0xd1, 0xae, 0x1b, 0x67, 0x61, 0x72, 0x3b, - 0x75, 0x46, 0xa0, 0x8e, 0x85, 0xdf, 0x58, 0xe0, 0xc9, 0x4f, 0x73, 0x30, 0x9f, 0x28, 0xaf, 0x38, - 0x76, 0xcd, 0xe4, 0x95, 0xf2, 0x56, 0x2a, 0xeb, 0xc7, 0x3a, 0xb2, 0xbe, 0xd8, 0xc3, 0x24, 0xc9, - 0x38, 0x7a, 0x23, 0xbe, 0x6e, 0x8e, 0x9b, 0x1f, 0x4d, 0x3b, 0x7f, 0xde, 0xac, 0xcc, 0xc6, 0x66, - 0xe9, 0xfb, 0xa0, 0x5d, 0x40, 0x0d, 0x8d, 0xfa, 0xb7, 0x3c, 0xcd, 0xa6, 0x21, 0xac, 0x69, 0x11, - 0x11, 0xf5, 0x6b, 0xc3, 0xbd, 0x13, 0xb3, 0x50, 0x97, 0x84, 0x4b, 0xb4, 0xda, 0x85, 0x86, 0x7b, - 0x78, 0x40, 0xff, 0x87, 0x31, 0x8f, 0x68, 0xd4, 0xb1, 0x4b, 0x79, 0x7e, 0xe5, 0x38, 0x5f, 0x98, - 0x4b, 0xb1, 0x38, 0x45, 0xaf, 0xc2, 0xb8, 0x45, 0x28, 0xd5, 0x0c, 0x52, 0x2a, 0x70, 0xc5, 0x59, - 0xa1, 0x38, 0xbe, 0x16, 0x8a, 0x71, 0x74, 0x2e, 0xff, 0x24, 0xc1, 0x4c, 0x92, 0xa7, 0x55, 0x93, - 0xfa, 0xe8, 0x5e, 0x57, 0xed, 0x29, 0xc3, 0xc5, 0xc4, 0xac, 0x79, 0xe5, 0xcd, 0x09, 0x77, 0x13, - 0x91, 0xa4, 0xad, 0xee, 0x6e, 0x40, 0xc1, 0xf4, 0x89, 0xc5, 0xb2, 0x3e, 0xda, 0x91, 0xae, 0x8c, - 0x22, 0x51, 0xa7, 0x05, 0x6c, 0xe1, 0x1a, 0x03, 0xc0, 0x21, 0x8e, 0xfc, 0xc7, 0x68, 0x7b, 0x04, - 0xac, 0x1e, 0xd1, 0x77, 0x12, 0x2c, 0xb9, 0x7d, 0x07, 0x8c, 0x08, 0x6a, 0x25, 0xcb, 0x73, 0xff, - 0x11, 0x85, 0xc9, 0x36, 0x61, 0x73, 0x85, 0xa8, 0xb2, 0xb8, 0xd2, 0xd2, 0x00, 0xe5, 0x01, 0x57, - 0x41, 0x1f, 0x02, 0xb2, 0x34, 0x9f, 0x65, 0xd4, 0xd8, 0xf0, 0x88, 0x4e, 0x6a, 0x0c, 0x55, 0x0c, - 0xa5, 0xb8, 0x3a, 0xd6, 0xba, 0x34, 0x70, 0x0f, 0x2b, 0xf4, 0xa5, 0x04, 0xf3, 0xb5, 0xee, 0x21, - 0x23, 0xea, 0xf2, 0xc2, 0x30, 0x89, 0xee, 0x31, 0xa3, 0xd4, 0xc5, 0x56, 0xb3, 0x32, 0xdf, 0xe3, - 0x00, 0xf7, 0x72, 0x86, 0xee, 0x41, 0xc1, 0x0b, 0x1a, 0x84, 0x96, 0xf2, 0xfc, 0x79, 0x33, 0xbd, - 0x6e, 0x38, 0x0d, 0x53, 0xdf, 0xc7, 0xcc, 0xe4, 0x63, 0xd3, 0xaf, 0x6f, 0x06, 0x7c, 0x56, 0xd1, - 0xe4, 0xad, 0xf9, 0x11, 0x0e, 0x41, 0xe5, 0x47, 0x30, 0xd7, 0x39, 0x34, 0x90, 0x01, 0xa0, 0x47, - 0x7d, 0xca, 0x16, 0x04, 0x73, 0x7b, 0x76, 0xf8, 0xaa, 0x8a, 0x7b, 0x3c, 0x99, 0x97, 0xb1, 0x88, - 0xe2, 0x36, 0x68, 0xf9, 0x14, 0x4c, 0x5d, 0xf5, 0x9c, 0xc0, 0x15, 0x77, 0x44, 0xcb, 0x90, 0xb7, - 0x35, 0x2b, 0x9a, 0x3e, 0xf1, 0x44, 0x5c, 0xd7, 0x2c, 0x82, 0xf9, 0x89, 0xfc, 0xad, 0x04, 0xd3, - 0xab, 0xa6, 0x65, 0xfa, 0x98, 0x50, 0xd7, 0xb1, 0x29, 0x41, 0xe7, 0x53, 0x13, 0xeb, 0x68, 0xc7, - 0xc4, 0x3a, 0x94, 0x52, 0x6e, 0x9b, 0x55, 0x9f, 0xc0, 0xf8, 0xc3, 0x80, 0x04, 0xa6, 0x6d, 0x88, - 0x79, 0x7d, 0x2e, 0x2b, 0xc0, 0x9b, 0xa1, 0x7a, 0xaa, 0xda, 0xd4, 0x49, 0x36, 0x02, 0xc4, 0x09, - 0x8e, 0x10, 0xe5, 0xbf, 0x73, 0x70, 0x94, 0x3b, 0x26, 0xb5, 0x01, 0x5b, 0xf9, 0x5e, 0xe6, 0x56, - 0x5e, 0x16, 0xd1, 0x1c, 0x64, 0x33, 0x3f, 0x80, 0xe9, 0x46, 0x7b, 0xec, 0x22, 0xcc, 0x93, 0x59, - 0x61, 0xa6, 0x12, 0xa6, 0x2e, 0x88, 0x1b, 0xa4, 0x93, 0x8e, 0xd3, 0xd0, 0xbd, 0x58, 0xc0, 0xe8, - 0xf0, 0x2c, 0x00, 0xdd, 0x80, 0x85, 0x2d, 0xc7, 0xf3, 0x9c, 0x3d, 0xd3, 0x36, 0xb8, 0x9f, 0x08, - 0x24, 0xcf, 0x41, 0xfe, 0xd3, 0x6a, 0x56, 0x16, 0xd4, 0x5e, 0x0a, 0xb8, 0xb7, 0x9d, 0xbc, 0x07, - 0x0b, 0xeb, 0x6c, 0xa6, 0x50, 0x27, 0xf0, 0x74, 0x92, 0x34, 0x04, 0xaa, 0x40, 0x61, 0x97, 0x78, - 0x5b, 0x61, 0x51, 0x17, 0xd5, 0x22, 0x6b, 0x87, 0x8f, 0x98, 0x00, 0x87, 0x72, 0x16, 0x89, 0x9d, - 0x58, 0xde, 0xc6, 0xab, 0xb4, 0x34, 0xc6, 0x55, 0x79, 0x24, 0xeb, 0xe9, 0x23, 0xdc, 0xa9, 0x2b, - 0x37, 0x73, 0xb0, 0xd8, 0xa7, 0xff, 0xd0, 0x6d, 0x98, 0xa0, 0xe2, 0x6f, 0xd1, 0x53, 0xc7, 0xb2, - 0xde, 0x42, 0xd8, 0x26, 0xd3, 0x3f, 0x02, 0xc3, 0x31, 0x14, 0x72, 0x60, 0xda, 0x13, 0x57, 0xe0, - 0x3e, 0xc5, 0x16, 0x38, 0x93, 0x85, 0xdd, 0x9d, 0x9d, 0xe4, 0xb1, 0x71, 0x3b, 0x20, 0x4e, 0xe3, - 0xa3, 0x47, 0x30, 0xd7, 0x16, 0x76, 0xe8, 0x73, 0x94, 0xfb, 0x3c, 0x9f, 0xe5, 0xb3, 0xe7, 0xa3, - 0xa8, 0x25, 0xe1, 0x76, 0x6e, 0xbd, 0x03, 0x16, 0x77, 0x39, 0x92, 0x7f, 0xc9, 0xc1, 0x80, 0xc5, - 0xf0, 0x12, 0x48, 0xde, 0xfd, 0x14, 0xc9, 0x7b, 0xe7, 0xe0, 0x1b, 0xaf, 0x2f, 0xe9, 0xab, 0x77, - 0x90, 0xbe, 0xf7, 0x5e, 0xc0, 0xc7, 0x60, 0x12, 0xf8, 0x67, 0x0e, 0xfe, 0xd7, 0xdf, 0x38, 0x21, - 0x85, 0xd7, 0x53, 0x23, 0xf6, 0x42, 0xc7, 0x88, 0x3d, 0x36, 0x04, 0xc4, 0xbf, 0x24, 0xb1, 0x83, - 0x24, 0xfe, 0x2a, 0x41, 0xb9, 0x7f, 0xde, 0x5e, 0x02, 0x69, 0xfc, 0x34, 0x4d, 0x1a, 0xdf, 0x3c, - 0x78, 0x91, 0xf5, 0x21, 0x91, 0x57, 0x07, 0xd5, 0x56, 0x4c, 0xf7, 0x86, 0x58, 0xf9, 0xdf, 0xe7, - 0x06, 0xa5, 0x8a, 0xb3, 0xd3, 0x8c, 0x5f, 0x2d, 0x29, 0xeb, 0x2b, 0x36, 0x5b, 0x3d, 0x16, 0xdb, - 0x1e, 0x61, 0x41, 0xd6, 0x61, 0xbc, 0x11, 0xee, 0x6a, 0xd1, 0xd4, 0x97, 0x86, 0x5a, 0x91, 0x83, - 0x56, 0x7b, 0x48, 0x0b, 0x84, 0x1a, 0x8e, 0xe0, 0x51, 0x0d, 0xc6, 0x08, 0xff, 0xa9, 0x3e, 0x6c, - 0x67, 0x67, 0xfd, 0xb0, 0x57, 0x81, 0x55, 0x61, 0xa8, 0x85, 0x05, 0xb6, 0xfc, 0x8d, 0x04, 0xcb, - 0x59, 0x23, 0x01, 0xed, 0xf5, 0xa0, 0x78, 0x2f, 0x40, 0xdf, 0x87, 0xa7, 0x7c, 0x3f, 0x48, 0x70, - 0xb8, 0x17, 0x93, 0x62, 0x4d, 0xc6, 0xe8, 0x53, 0xcc, 0x7d, 0xe2, 0x26, 0xbb, 0xc9, 0xa5, 0x58, - 0x9c, 0xa2, 0x13, 0x30, 0x51, 0xd7, 0xec, 0xda, 0xa6, 0xf9, 0x79, 0xc4, 0xea, 0xe3, 0x32, 0xff, - 0x40, 0xc8, 0x71, 0xac, 0x81, 0x2e, 0xc3, 0x1c, 0xb7, 0x5b, 0x25, 0xb6, 0xe1, 0xd7, 0xf9, 0x8b, - 0x08, 0x6a, 0x12, 0x6f, 0x9d, 0x9b, 0x1d, 0xe7, 0xb8, 0xcb, 0x42, 0xfe, 0x4b, 0x02, 0x74, 0x10, - 0x36, 0x71, 0x1c, 0x8a, 0x9a, 0x6b, 0x72, 0x8a, 0x1b, 0x36, 0x5a, 0x51, 0x9d, 0x6e, 0x35, 0x2b, - 0xc5, 0x4b, 0x1b, 0xd7, 0x42, 0x21, 0x4e, 0xce, 0x99, 0x72, 0xb4, 0x68, 0xc3, 0x85, 0x2a, 0x94, - 0x23, 0xc7, 0x14, 0x27, 0xe7, 0xe8, 0x22, 0x4c, 0xe9, 0x8d, 0x80, 0xfa, 0xc4, 0xdb, 0xd4, 0x1d, - 0x97, 0xf0, 0xc1, 0x34, 0xa1, 0x1e, 0x16, 0x31, 0x4d, 0xad, 0xb4, 0x9d, 0xe1, 0x94, 0x26, 0x52, - 0x00, 0x58, 0x5b, 0x51, 0x57, 0x63, 0x7e, 0x0a, 0xdc, 0xcf, 0x0c, 0x7b, 0xb0, 0xf5, 0x58, 0x8a, - 0xdb, 0x34, 0xe4, 0x07, 0xb0, 0xb0, 0x49, 0xbc, 0x5d, 0x53, 0x27, 0x97, 0x74, 0xdd, 0x09, 0x6c, - 0x3f, 0x22, 0xeb, 0x55, 0x28, 0xc6, 0x6a, 0xa2, 0xf3, 0x0e, 0x09, 0xff, 0xc5, 0x18, 0x0b, 0x27, - 0x3a, 0x71, 0xab, 0xe7, 0xfa, 0xb6, 0xfa, 0xcf, 0x39, 0x18, 0x4f, 0xe0, 0xf3, 0x3b, 0xa6, 0x5d, - 0x13, 0xc8, 0x47, 0x22, 0xed, 0xeb, 0xa6, 0x5d, 0x7b, 0xde, 0xac, 0x4c, 0x0a, 0x35, 0xf6, 0x89, - 0xb9, 0x22, 0xba, 0x06, 0xf9, 0x80, 0x12, 0x4f, 0x34, 0xf1, 0xf1, 0xac, 0x62, 0xbe, 0x4d, 0x89, - 0x17, 0xf1, 0xab, 0x09, 0x86, 0xcc, 0x04, 0x98, 0x43, 0xa0, 0x35, 0x28, 0x18, 0xec, 0x51, 0x44, - 0x9f, 0x9e, 0xc8, 0xc2, 0x6a, 0xff, 0x11, 0x13, 0x96, 0x01, 0x97, 0xe0, 0x10, 0x05, 0x3d, 0x84, - 0x19, 0x9a, 0x4a, 0x21, 0x7f, 0xae, 0x21, 0xf8, 0x52, 0xcf, 0xc4, 0xab, 0xa8, 0xd5, 0xac, 0xcc, - 0xa4, 0x8f, 0x70, 0x87, 0x03, 0xb9, 0x0a, 0x93, 0x6d, 0x01, 0x66, 0x4f, 0x59, 0xf5, 0xf2, 0xe3, - 0x67, 0xe5, 0x91, 0x27, 0xcf, 0xca, 0x23, 0x4f, 0x9f, 0x95, 0x47, 0xbe, 0x68, 0x95, 0xa5, 0xc7, - 0xad, 0xb2, 0xf4, 0xa4, 0x55, 0x96, 0x9e, 0xb6, 0xca, 0xd2, 0x6f, 0xad, 0xb2, 0xf4, 0xd5, 0xef, - 0xe5, 0x91, 0xbb, 0xe5, 0xc1, 0xff, 0x8b, 0xfd, 0x27, 0x00, 0x00, 0xff, 0xff, 0x03, 0x5d, 0xec, - 0x01, 0xac, 0x15, 0x00, 0x00, -} +func (m *UserSubject) Reset() { *m = UserSubject{} } func (m *ExemptPriorityLevelConfiguration) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/flowcontrol/v1beta3/generated.protomessage.pb.go b/staging/src/k8s.io/api/flowcontrol/v1beta3/generated.protomessage.pb.go new file mode 100644 index 0000000000000..20407c045c02b --- /dev/null +++ b/staging/src/k8s.io/api/flowcontrol/v1beta3/generated.protomessage.pb.go @@ -0,0 +1,68 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta3 + +func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} + +func (*FlowDistinguisherMethod) ProtoMessage() {} + +func (*FlowSchema) ProtoMessage() {} + +func (*FlowSchemaCondition) ProtoMessage() {} + +func (*FlowSchemaList) ProtoMessage() {} + +func (*FlowSchemaSpec) ProtoMessage() {} + +func (*FlowSchemaStatus) ProtoMessage() {} + +func (*GroupSubject) ProtoMessage() {} + +func (*LimitResponse) ProtoMessage() {} + +func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} + +func (*NonResourcePolicyRule) ProtoMessage() {} + +func (*PolicyRulesWithSubjects) ProtoMessage() {} + +func (*PriorityLevelConfiguration) ProtoMessage() {} + +func (*PriorityLevelConfigurationCondition) ProtoMessage() {} + +func (*PriorityLevelConfigurationList) ProtoMessage() {} + +func (*PriorityLevelConfigurationReference) ProtoMessage() {} + +func (*PriorityLevelConfigurationSpec) ProtoMessage() {} + +func (*PriorityLevelConfigurationStatus) ProtoMessage() {} + +func (*QueuingConfiguration) ProtoMessage() {} + +func (*ResourcePolicyRule) ProtoMessage() {} + +func (*ServiceAccountSubject) ProtoMessage() {} + +func (*Subject) ProtoMessage() {} + +func (*UserSubject) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/flowcontrol/v1beta3/zz_generated.model_name.go b/staging/src/k8s.io/api/flowcontrol/v1beta3/zz_generated.model_name.go new file mode 100644 index 0000000000000..0aae062783752 --- /dev/null +++ b/staging/src/k8s.io/api/flowcontrol/v1beta3/zz_generated.model_name.go @@ -0,0 +1,137 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta3 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExemptPriorityLevelConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.ExemptPriorityLevelConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowDistinguisherMethod) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.FlowDistinguisherMethod" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchema) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.FlowSchema" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaCondition) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.FlowSchemaCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaList) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.FlowSchemaList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaSpec) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.FlowSchemaSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FlowSchemaStatus) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.FlowSchemaStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GroupSubject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.GroupSubject" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LimitResponse) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.LimitResponse" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LimitedPriorityLevelConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.LimitedPriorityLevelConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NonResourcePolicyRule) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.NonResourcePolicyRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PolicyRulesWithSubjects) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.PolicyRulesWithSubjects" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationCondition) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationList) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationReference) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationSpec) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityLevelConfigurationStatus) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in QueuingConfiguration) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.QueuingConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourcePolicyRule) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.ResourcePolicyRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceAccountSubject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.ServiceAccountSubject" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Subject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.Subject" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in UserSubject) OpenAPIModelName() string { + return "io.k8s.api.flowcontrol.v1beta3.UserSubject" +} diff --git a/staging/src/k8s.io/api/go.mod b/staging/src/k8s.io/api/go.mod index e325d5d833dff..750518bc00967 100644 --- a/staging/src/k8s.io/api/go.mod +++ b/staging/src/k8s.io/api/go.mod @@ -2,34 +2,32 @@ module k8s.io/api -go 1.24.0 +go 1.25.0 -godebug default=go1.24 +godebug default=go1.25 -require ( - github.com/gogo/protobuf v1.3.2 - k8s.io/apimachinery v0.0.0 -) +require k8s.io/apimachinery v0.0.0 require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/logr v1.4.3 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect - github.com/spf13/pflag v1.0.6 // indirect + github.com/spf13/pflag v1.0.9 // indirect github.com/x448/float16 v0.8.4 // indirect go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/net v0.38.0 // indirect - golang.org/x/text v0.23.0 // indirect + golang.org/x/net v0.43.0 // indirect + golang.org/x/text v0.28.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/inf.v0 v0.9.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect - sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect sigs.k8s.io/yaml v1.6.0 // indirect diff --git a/staging/src/k8s.io/api/go.sum b/staging/src/k8s.io/api/go.sum index 9808f7f9bca5d..fbf688be263ee 100644 --- a/staging/src/k8s.io/api/go.sum +++ b/staging/src/k8s.io/api/go.sum @@ -1,27 +1,27 @@ +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -37,82 +37,59 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= -github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= +golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= +golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools/go/expect v0.1.0-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= diff --git a/staging/src/k8s.io/api/imagepolicy/v1alpha1/doc.go b/staging/src/k8s.io/api/imagepolicy/v1alpha1/doc.go index f5fbbdbf0c3e7..7e7a980c6c8aa 100644 --- a/staging/src/k8s.io/api/imagepolicy/v1alpha1/doc.go +++ b/staging/src/k8s.io/api/imagepolicy/v1alpha1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:openapi-model-package=io.k8s.api.imagepolicy.v1alpha1 // +groupName=imagepolicy.k8s.io diff --git a/staging/src/k8s.io/api/imagepolicy/v1alpha1/generated.pb.go b/staging/src/k8s.io/api/imagepolicy/v1alpha1/generated.pb.go index 57732a51648e8..c8e53c7fa599f 100644 --- a/staging/src/k8s.io/api/imagepolicy/v1alpha1/generated.pb.go +++ b/staging/src/k8s.io/api/imagepolicy/v1alpha1/generated.pb.go @@ -23,193 +23,20 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ImageReview) Reset() { *m = ImageReview{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ImageReviewContainerSpec) Reset() { *m = ImageReviewContainerSpec{} } -func (m *ImageReview) Reset() { *m = ImageReview{} } -func (*ImageReview) ProtoMessage() {} -func (*ImageReview) Descriptor() ([]byte, []int) { - return fileDescriptor_7620d1538838ac6f, []int{0} -} -func (m *ImageReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImageReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ImageReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImageReview.Merge(m, src) -} -func (m *ImageReview) XXX_Size() int { - return m.Size() -} -func (m *ImageReview) XXX_DiscardUnknown() { - xxx_messageInfo_ImageReview.DiscardUnknown(m) -} +func (m *ImageReviewSpec) Reset() { *m = ImageReviewSpec{} } -var xxx_messageInfo_ImageReview proto.InternalMessageInfo - -func (m *ImageReviewContainerSpec) Reset() { *m = ImageReviewContainerSpec{} } -func (*ImageReviewContainerSpec) ProtoMessage() {} -func (*ImageReviewContainerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_7620d1538838ac6f, []int{1} -} -func (m *ImageReviewContainerSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImageReviewContainerSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ImageReviewContainerSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImageReviewContainerSpec.Merge(m, src) -} -func (m *ImageReviewContainerSpec) XXX_Size() int { - return m.Size() -} -func (m *ImageReviewContainerSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ImageReviewContainerSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ImageReviewContainerSpec proto.InternalMessageInfo - -func (m *ImageReviewSpec) Reset() { *m = ImageReviewSpec{} } -func (*ImageReviewSpec) ProtoMessage() {} -func (*ImageReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_7620d1538838ac6f, []int{2} -} -func (m *ImageReviewSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImageReviewSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ImageReviewSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImageReviewSpec.Merge(m, src) -} -func (m *ImageReviewSpec) XXX_Size() int { - return m.Size() -} -func (m *ImageReviewSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ImageReviewSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ImageReviewSpec proto.InternalMessageInfo - -func (m *ImageReviewStatus) Reset() { *m = ImageReviewStatus{} } -func (*ImageReviewStatus) ProtoMessage() {} -func (*ImageReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_7620d1538838ac6f, []int{3} -} -func (m *ImageReviewStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImageReviewStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ImageReviewStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImageReviewStatus.Merge(m, src) -} -func (m *ImageReviewStatus) XXX_Size() int { - return m.Size() -} -func (m *ImageReviewStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ImageReviewStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ImageReviewStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ImageReview)(nil), "k8s.io.api.imagepolicy.v1alpha1.ImageReview") - proto.RegisterType((*ImageReviewContainerSpec)(nil), "k8s.io.api.imagepolicy.v1alpha1.ImageReviewContainerSpec") - proto.RegisterType((*ImageReviewSpec)(nil), "k8s.io.api.imagepolicy.v1alpha1.ImageReviewSpec") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.imagepolicy.v1alpha1.ImageReviewSpec.AnnotationsEntry") - proto.RegisterType((*ImageReviewStatus)(nil), "k8s.io.api.imagepolicy.v1alpha1.ImageReviewStatus") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.imagepolicy.v1alpha1.ImageReviewStatus.AuditAnnotationsEntry") -} - -func init() { - proto.RegisterFile("k8s.io/api/imagepolicy/v1alpha1/generated.proto", fileDescriptor_7620d1538838ac6f) -} - -var fileDescriptor_7620d1538838ac6f = []byte{ - // 593 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x4f, 0x6f, 0xd3, 0x30, - 0x18, 0xc6, 0x9b, 0x74, 0xff, 0xea, 0x02, 0xeb, 0x0c, 0x48, 0x51, 0x0f, 0xe9, 0x54, 0x24, 0x34, - 0x0e, 0xd8, 0xb4, 0x42, 0x68, 0x70, 0x00, 0x35, 0xd3, 0x24, 0x38, 0x00, 0x92, 0xb9, 0xed, 0x84, - 0x9b, 0x9a, 0xd4, 0xb4, 0x89, 0xa3, 0xd8, 0xe9, 0xe8, 0x8d, 0x4f, 0x80, 0xf8, 0x06, 0x7c, 0x11, - 0x3e, 0x40, 0x8f, 0x3b, 0xee, 0x34, 0xd1, 0x70, 0xe4, 0x4b, 0xa0, 0x38, 0x69, 0x13, 0xda, 0xa1, - 0xa9, 0xb7, 0xbc, 0xef, 0xeb, 0xe7, 0xf7, 0x3e, 0x79, 0x62, 0x05, 0xe0, 0xd1, 0xb1, 0x44, 0x5c, - 0x60, 0x1a, 0x72, 0xcc, 0x7d, 0xea, 0xb1, 0x50, 0x8c, 0xb9, 0x3b, 0xc5, 0x93, 0x0e, 0x1d, 0x87, - 0x43, 0xda, 0xc1, 0x1e, 0x0b, 0x58, 0x44, 0x15, 0x1b, 0xa0, 0x30, 0x12, 0x4a, 0xc0, 0x56, 0x26, - 0x40, 0x34, 0xe4, 0xa8, 0x24, 0x40, 0x0b, 0x41, 0xf3, 0xb1, 0xc7, 0xd5, 0x30, 0xee, 0x23, 0x57, - 0xf8, 0xd8, 0x13, 0x9e, 0xc0, 0x5a, 0xd7, 0x8f, 0x3f, 0xe9, 0x4a, 0x17, 0xfa, 0x29, 0xe3, 0x35, - 0x9f, 0x16, 0x06, 0x7c, 0xea, 0x0e, 0x79, 0xc0, 0xa2, 0x29, 0x0e, 0x47, 0x5e, 0xda, 0x90, 0xd8, - 0x67, 0x8a, 0xe2, 0xc9, 0x9a, 0x8b, 0x26, 0xfe, 0x9f, 0x2a, 0x8a, 0x03, 0xc5, 0x7d, 0xb6, 0x26, - 0x78, 0x76, 0x93, 0x40, 0xba, 0x43, 0xe6, 0xd3, 0x55, 0x5d, 0xfb, 0x87, 0x09, 0xea, 0x6f, 0xd2, - 0xd7, 0x24, 0x6c, 0xc2, 0xd9, 0x39, 0xfc, 0x08, 0xf6, 0x52, 0x4f, 0x03, 0xaa, 0xa8, 0x65, 0x1c, - 0x1a, 0x47, 0xf5, 0xee, 0x13, 0x54, 0x24, 0xb2, 0x44, 0xa3, 0x70, 0xe4, 0xa5, 0x0d, 0x89, 0xd2, - 0xd3, 0x68, 0xd2, 0x41, 0xef, 0xfb, 0x9f, 0x99, 0xab, 0xde, 0x32, 0x45, 0x1d, 0x38, 0xbb, 0x6a, - 0x55, 0x92, 0xab, 0x16, 0x28, 0x7a, 0x64, 0x49, 0x85, 0x04, 0x6c, 0xc9, 0x90, 0xb9, 0x96, 0xb9, - 0x46, 0xbf, 0x36, 0x6f, 0x54, 0x72, 0xf7, 0x21, 0x64, 0xae, 0x73, 0x2b, 0xa7, 0x6f, 0xa5, 0x15, - 0xd1, 0x2c, 0x78, 0x06, 0x76, 0xa4, 0xa2, 0x2a, 0x96, 0x56, 0x55, 0x53, 0xbb, 0x1b, 0x51, 0xb5, - 0xd2, 0xb9, 0x93, 0x73, 0x77, 0xb2, 0x9a, 0xe4, 0xc4, 0xf6, 0x2b, 0x60, 0x95, 0x0e, 0x9f, 0x88, - 0x40, 0xd1, 0x34, 0x82, 0x74, 0x3b, 0x7c, 0x00, 0xb6, 0x35, 0x5d, 0x47, 0x55, 0x73, 0x6e, 0xe7, - 0x88, 0xed, 0x4c, 0x90, 0xcd, 0xda, 0x7f, 0x4c, 0xb0, 0xbf, 0xf2, 0x12, 0xd0, 0x07, 0xc0, 0x5d, - 0x90, 0xa4, 0x65, 0x1c, 0x56, 0x8f, 0xea, 0xdd, 0xe7, 0x9b, 0x98, 0xfe, 0xc7, 0x47, 0x91, 0xf8, - 0xb2, 0x2d, 0x49, 0x69, 0x01, 0xfc, 0x02, 0xea, 0x34, 0x08, 0x84, 0xa2, 0x8a, 0x8b, 0x40, 0x5a, - 0xa6, 0xde, 0xd7, 0xdb, 0x34, 0x7a, 0xd4, 0x2b, 0x18, 0xa7, 0x81, 0x8a, 0xa6, 0xce, 0xdd, 0x7c, - 0x6f, 0xbd, 0x34, 0x21, 0xe5, 0x55, 0x10, 0x83, 0x5a, 0x40, 0x7d, 0x26, 0x43, 0xea, 0x32, 0xfd, - 0x71, 0x6a, 0xce, 0x41, 0x2e, 0xaa, 0xbd, 0x5b, 0x0c, 0x48, 0x71, 0xa6, 0xf9, 0x12, 0x34, 0x56, - 0xd7, 0xc0, 0x06, 0xa8, 0x8e, 0xd8, 0x34, 0x0b, 0x99, 0xa4, 0x8f, 0xf0, 0x1e, 0xd8, 0x9e, 0xd0, - 0x71, 0xcc, 0xf4, 0x2d, 0xaa, 0x91, 0xac, 0x78, 0x61, 0x1e, 0x1b, 0xed, 0x9f, 0x26, 0x38, 0x58, - 0xfb, 0xb8, 0xf0, 0x11, 0xd8, 0xa5, 0xe3, 0xb1, 0x38, 0x67, 0x03, 0x4d, 0xd9, 0x73, 0xf6, 0x73, - 0x13, 0xbb, 0xbd, 0xac, 0x4d, 0x16, 0x73, 0xf8, 0x10, 0xec, 0x44, 0x8c, 0x4a, 0x11, 0x64, 0xec, - 0xe2, 0x5e, 0x10, 0xdd, 0x25, 0xf9, 0x14, 0x7e, 0x33, 0x40, 0x83, 0xc6, 0x03, 0xae, 0x4a, 0x76, - 0xad, 0xaa, 0x4e, 0xf6, 0xf5, 0xe6, 0xd7, 0x0f, 0xf5, 0x56, 0x50, 0x59, 0xc0, 0x56, 0xbe, 0xbc, - 0xb1, 0x3a, 0x26, 0x6b, 0xbb, 0x9b, 0x27, 0xe0, 0xfe, 0xb5, 0x90, 0x4d, 0xe2, 0x73, 0x4e, 0x67, - 0x73, 0xbb, 0x72, 0x31, 0xb7, 0x2b, 0x97, 0x73, 0xbb, 0xf2, 0x35, 0xb1, 0x8d, 0x59, 0x62, 0x1b, - 0x17, 0x89, 0x6d, 0x5c, 0x26, 0xb6, 0xf1, 0x2b, 0xb1, 0x8d, 0xef, 0xbf, 0xed, 0xca, 0x59, 0xeb, - 0x86, 0xbf, 0xea, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x59, 0x86, 0x92, 0x15, 0x77, 0x05, 0x00, - 0x00, -} +func (m *ImageReviewStatus) Reset() { *m = ImageReviewStatus{} } func (m *ImageReview) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -322,7 +149,7 @@ func (m *ImageReviewSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Annotations { keysForAnnotations = append(keysForAnnotations, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + sort.Strings(keysForAnnotations) for iNdEx := len(keysForAnnotations) - 1; iNdEx >= 0; iNdEx-- { v := m.Annotations[string(keysForAnnotations[iNdEx])] baseI := i @@ -383,7 +210,7 @@ func (m *ImageReviewStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.AuditAnnotations { keysForAuditAnnotations = append(keysForAuditAnnotations, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAuditAnnotations) + sort.Strings(keysForAuditAnnotations) for iNdEx := len(keysForAuditAnnotations) - 1; iNdEx >= 0; iNdEx-- { v := m.AuditAnnotations[string(keysForAuditAnnotations[iNdEx])] baseI := i @@ -541,7 +368,7 @@ func (this *ImageReviewSpec) String() string { for k := range this.Annotations { keysForAnnotations = append(keysForAnnotations, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + sort.Strings(keysForAnnotations) mapStringForAnnotations := "map[string]string{" for _, k := range keysForAnnotations { mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) @@ -563,7 +390,7 @@ func (this *ImageReviewStatus) String() string { for k := range this.AuditAnnotations { keysForAuditAnnotations = append(keysForAuditAnnotations, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAuditAnnotations) + sort.Strings(keysForAuditAnnotations) mapStringForAuditAnnotations := "map[string]string{" for _, k := range keysForAuditAnnotations { mapStringForAuditAnnotations += fmt.Sprintf("%v: %v,", k, this.AuditAnnotations[k]) diff --git a/staging/src/k8s.io/api/imagepolicy/v1alpha1/generated.protomessage.pb.go b/staging/src/k8s.io/api/imagepolicy/v1alpha1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..215f52a377347 --- /dev/null +++ b/staging/src/k8s.io/api/imagepolicy/v1alpha1/generated.protomessage.pb.go @@ -0,0 +1,30 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1alpha1 + +func (*ImageReview) ProtoMessage() {} + +func (*ImageReviewContainerSpec) ProtoMessage() {} + +func (*ImageReviewSpec) ProtoMessage() {} + +func (*ImageReviewStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/imagepolicy/v1alpha1/zz_generated.model_name.go b/staging/src/k8s.io/api/imagepolicy/v1alpha1/zz_generated.model_name.go new file mode 100644 index 0000000000000..e21c127a748e5 --- /dev/null +++ b/staging/src/k8s.io/api/imagepolicy/v1alpha1/zz_generated.model_name.go @@ -0,0 +1,42 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1alpha1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ImageReview) OpenAPIModelName() string { + return "io.k8s.api.imagepolicy.v1alpha1.ImageReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ImageReviewContainerSpec) OpenAPIModelName() string { + return "io.k8s.api.imagepolicy.v1alpha1.ImageReviewContainerSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ImageReviewSpec) OpenAPIModelName() string { + return "io.k8s.api.imagepolicy.v1alpha1.ImageReviewSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ImageReviewStatus) OpenAPIModelName() string { + return "io.k8s.api.imagepolicy.v1alpha1.ImageReviewStatus" +} diff --git a/staging/src/k8s.io/api/networking/v1/doc.go b/staging/src/k8s.io/api/networking/v1/doc.go index e2093b7df6737..42da00e2480f3 100644 --- a/staging/src/k8s.io/api/networking/v1/doc.go +++ b/staging/src/k8s.io/api/networking/v1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.networking.v1 + // +groupName=networking.k8s.io package v1 diff --git a/staging/src/k8s.io/api/networking/v1/generated.pb.go b/staging/src/k8s.io/api/networking/v1/generated.pb.go index 062382b633ac9..ee5429f135bef 100644 --- a/staging/src/k8s.io/api/networking/v1/generated.pb.go +++ b/staging/src/k8s.io/api/networking/v1/generated.pb.go @@ -24,12 +24,10 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" k8s_io_api_core_v1 "k8s.io/api/core/v1" v11 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -37,1160 +35,75 @@ import ( intstr "k8s.io/apimachinery/pkg/util/intstr" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} } -func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } -func (*HTTPIngressPath) ProtoMessage() {} -func (*HTTPIngressPath) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{0} -} -func (m *HTTPIngressPath) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPIngressPath) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HTTPIngressPath) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPIngressPath.Merge(m, src) -} -func (m *HTTPIngressPath) XXX_Size() int { - return m.Size() -} -func (m *HTTPIngressPath) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPIngressPath.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPIngressPath proto.InternalMessageInfo - -func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} } -func (*HTTPIngressRuleValue) ProtoMessage() {} -func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{1} -} -func (m *HTTPIngressRuleValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPIngressRuleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HTTPIngressRuleValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPIngressRuleValue.Merge(m, src) -} -func (m *HTTPIngressRuleValue) XXX_Size() int { - return m.Size() -} -func (m *HTTPIngressRuleValue) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPIngressRuleValue.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPIngressRuleValue proto.InternalMessageInfo - -func (m *IPAddress) Reset() { *m = IPAddress{} } -func (*IPAddress) ProtoMessage() {} -func (*IPAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{2} -} -func (m *IPAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IPAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IPAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_IPAddress.Merge(m, src) -} -func (m *IPAddress) XXX_Size() int { - return m.Size() -} -func (m *IPAddress) XXX_DiscardUnknown() { - xxx_messageInfo_IPAddress.DiscardUnknown(m) -} - -var xxx_messageInfo_IPAddress proto.InternalMessageInfo - -func (m *IPAddressList) Reset() { *m = IPAddressList{} } -func (*IPAddressList) ProtoMessage() {} -func (*IPAddressList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{3} -} -func (m *IPAddressList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IPAddressList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IPAddressList) XXX_Merge(src proto.Message) { - xxx_messageInfo_IPAddressList.Merge(m, src) -} -func (m *IPAddressList) XXX_Size() int { - return m.Size() -} -func (m *IPAddressList) XXX_DiscardUnknown() { - xxx_messageInfo_IPAddressList.DiscardUnknown(m) -} - -var xxx_messageInfo_IPAddressList proto.InternalMessageInfo - -func (m *IPAddressSpec) Reset() { *m = IPAddressSpec{} } -func (*IPAddressSpec) ProtoMessage() {} -func (*IPAddressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{4} -} -func (m *IPAddressSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IPAddressSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IPAddressSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_IPAddressSpec.Merge(m, src) -} -func (m *IPAddressSpec) XXX_Size() int { - return m.Size() -} -func (m *IPAddressSpec) XXX_DiscardUnknown() { - xxx_messageInfo_IPAddressSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_IPAddressSpec proto.InternalMessageInfo - -func (m *IPBlock) Reset() { *m = IPBlock{} } -func (*IPBlock) ProtoMessage() {} -func (*IPBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{5} -} -func (m *IPBlock) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IPBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IPBlock) XXX_Merge(src proto.Message) { - xxx_messageInfo_IPBlock.Merge(m, src) -} -func (m *IPBlock) XXX_Size() int { - return m.Size() -} -func (m *IPBlock) XXX_DiscardUnknown() { - xxx_messageInfo_IPBlock.DiscardUnknown(m) -} - -var xxx_messageInfo_IPBlock proto.InternalMessageInfo - -func (m *Ingress) Reset() { *m = Ingress{} } -func (*Ingress) ProtoMessage() {} -func (*Ingress) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{6} -} -func (m *Ingress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Ingress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Ingress) XXX_Merge(src proto.Message) { - xxx_messageInfo_Ingress.Merge(m, src) -} -func (m *Ingress) XXX_Size() int { - return m.Size() -} -func (m *Ingress) XXX_DiscardUnknown() { - xxx_messageInfo_Ingress.DiscardUnknown(m) -} - -var xxx_messageInfo_Ingress proto.InternalMessageInfo - -func (m *IngressBackend) Reset() { *m = IngressBackend{} } -func (*IngressBackend) ProtoMessage() {} -func (*IngressBackend) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{7} -} -func (m *IngressBackend) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressBackend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressBackend) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressBackend.Merge(m, src) -} -func (m *IngressBackend) XXX_Size() int { - return m.Size() -} -func (m *IngressBackend) XXX_DiscardUnknown() { - xxx_messageInfo_IngressBackend.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressBackend proto.InternalMessageInfo - -func (m *IngressClass) Reset() { *m = IngressClass{} } -func (*IngressClass) ProtoMessage() {} -func (*IngressClass) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{8} -} -func (m *IngressClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressClass.Merge(m, src) -} -func (m *IngressClass) XXX_Size() int { - return m.Size() -} -func (m *IngressClass) XXX_DiscardUnknown() { - xxx_messageInfo_IngressClass.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressClass proto.InternalMessageInfo - -func (m *IngressClassList) Reset() { *m = IngressClassList{} } -func (*IngressClassList) ProtoMessage() {} -func (*IngressClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{9} -} -func (m *IngressClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressClassList.Merge(m, src) -} -func (m *IngressClassList) XXX_Size() int { - return m.Size() -} -func (m *IngressClassList) XXX_DiscardUnknown() { - xxx_messageInfo_IngressClassList.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressClassList proto.InternalMessageInfo - -func (m *IngressClassParametersReference) Reset() { *m = IngressClassParametersReference{} } -func (*IngressClassParametersReference) ProtoMessage() {} -func (*IngressClassParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{10} -} -func (m *IngressClassParametersReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressClassParametersReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressClassParametersReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressClassParametersReference.Merge(m, src) -} -func (m *IngressClassParametersReference) XXX_Size() int { - return m.Size() -} -func (m *IngressClassParametersReference) XXX_DiscardUnknown() { - xxx_messageInfo_IngressClassParametersReference.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressClassParametersReference proto.InternalMessageInfo - -func (m *IngressClassSpec) Reset() { *m = IngressClassSpec{} } -func (*IngressClassSpec) ProtoMessage() {} -func (*IngressClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{11} -} -func (m *IngressClassSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressClassSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressClassSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressClassSpec.Merge(m, src) -} -func (m *IngressClassSpec) XXX_Size() int { - return m.Size() -} -func (m *IngressClassSpec) XXX_DiscardUnknown() { - xxx_messageInfo_IngressClassSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressClassSpec proto.InternalMessageInfo - -func (m *IngressList) Reset() { *m = IngressList{} } -func (*IngressList) ProtoMessage() {} -func (*IngressList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{12} -} -func (m *IngressList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressList) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressList.Merge(m, src) -} -func (m *IngressList) XXX_Size() int { - return m.Size() -} -func (m *IngressList) XXX_DiscardUnknown() { - xxx_messageInfo_IngressList.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressList proto.InternalMessageInfo - -func (m *IngressLoadBalancerIngress) Reset() { *m = IngressLoadBalancerIngress{} } -func (*IngressLoadBalancerIngress) ProtoMessage() {} -func (*IngressLoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{13} -} -func (m *IngressLoadBalancerIngress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressLoadBalancerIngress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressLoadBalancerIngress) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressLoadBalancerIngress.Merge(m, src) -} -func (m *IngressLoadBalancerIngress) XXX_Size() int { - return m.Size() -} -func (m *IngressLoadBalancerIngress) XXX_DiscardUnknown() { - xxx_messageInfo_IngressLoadBalancerIngress.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressLoadBalancerIngress proto.InternalMessageInfo - -func (m *IngressLoadBalancerStatus) Reset() { *m = IngressLoadBalancerStatus{} } -func (*IngressLoadBalancerStatus) ProtoMessage() {} -func (*IngressLoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{14} -} -func (m *IngressLoadBalancerStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressLoadBalancerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressLoadBalancerStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressLoadBalancerStatus.Merge(m, src) -} -func (m *IngressLoadBalancerStatus) XXX_Size() int { - return m.Size() -} -func (m *IngressLoadBalancerStatus) XXX_DiscardUnknown() { - xxx_messageInfo_IngressLoadBalancerStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressLoadBalancerStatus proto.InternalMessageInfo - -func (m *IngressPortStatus) Reset() { *m = IngressPortStatus{} } -func (*IngressPortStatus) ProtoMessage() {} -func (*IngressPortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{15} -} -func (m *IngressPortStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressPortStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressPortStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressPortStatus.Merge(m, src) -} -func (m *IngressPortStatus) XXX_Size() int { - return m.Size() -} -func (m *IngressPortStatus) XXX_DiscardUnknown() { - xxx_messageInfo_IngressPortStatus.DiscardUnknown(m) -} +func (m *IPAddress) Reset() { *m = IPAddress{} } -var xxx_messageInfo_IngressPortStatus proto.InternalMessageInfo +func (m *IPAddressList) Reset() { *m = IPAddressList{} } -func (m *IngressRule) Reset() { *m = IngressRule{} } -func (*IngressRule) ProtoMessage() {} -func (*IngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{16} -} -func (m *IngressRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressRule.Merge(m, src) -} -func (m *IngressRule) XXX_Size() int { - return m.Size() -} -func (m *IngressRule) XXX_DiscardUnknown() { - xxx_messageInfo_IngressRule.DiscardUnknown(m) -} +func (m *IPAddressSpec) Reset() { *m = IPAddressSpec{} } -var xxx_messageInfo_IngressRule proto.InternalMessageInfo +func (m *IPBlock) Reset() { *m = IPBlock{} } -func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } -func (*IngressRuleValue) ProtoMessage() {} -func (*IngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{17} -} -func (m *IngressRuleValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressRuleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressRuleValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressRuleValue.Merge(m, src) -} -func (m *IngressRuleValue) XXX_Size() int { - return m.Size() -} -func (m *IngressRuleValue) XXX_DiscardUnknown() { - xxx_messageInfo_IngressRuleValue.DiscardUnknown(m) -} +func (m *Ingress) Reset() { *m = Ingress{} } -var xxx_messageInfo_IngressRuleValue proto.InternalMessageInfo +func (m *IngressBackend) Reset() { *m = IngressBackend{} } -func (m *IngressServiceBackend) Reset() { *m = IngressServiceBackend{} } -func (*IngressServiceBackend) ProtoMessage() {} -func (*IngressServiceBackend) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{18} -} -func (m *IngressServiceBackend) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressServiceBackend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressServiceBackend) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressServiceBackend.Merge(m, src) -} -func (m *IngressServiceBackend) XXX_Size() int { - return m.Size() -} -func (m *IngressServiceBackend) XXX_DiscardUnknown() { - xxx_messageInfo_IngressServiceBackend.DiscardUnknown(m) -} +func (m *IngressClass) Reset() { *m = IngressClass{} } -var xxx_messageInfo_IngressServiceBackend proto.InternalMessageInfo +func (m *IngressClassList) Reset() { *m = IngressClassList{} } -func (m *IngressSpec) Reset() { *m = IngressSpec{} } -func (*IngressSpec) ProtoMessage() {} -func (*IngressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{19} -} -func (m *IngressSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressSpec.Merge(m, src) -} -func (m *IngressSpec) XXX_Size() int { - return m.Size() -} -func (m *IngressSpec) XXX_DiscardUnknown() { - xxx_messageInfo_IngressSpec.DiscardUnknown(m) -} +func (m *IngressClassParametersReference) Reset() { *m = IngressClassParametersReference{} } -var xxx_messageInfo_IngressSpec proto.InternalMessageInfo +func (m *IngressClassSpec) Reset() { *m = IngressClassSpec{} } -func (m *IngressStatus) Reset() { *m = IngressStatus{} } -func (*IngressStatus) ProtoMessage() {} -func (*IngressStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{20} -} -func (m *IngressStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressStatus.Merge(m, src) -} -func (m *IngressStatus) XXX_Size() int { - return m.Size() -} -func (m *IngressStatus) XXX_DiscardUnknown() { - xxx_messageInfo_IngressStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressStatus proto.InternalMessageInfo - -func (m *IngressTLS) Reset() { *m = IngressTLS{} } -func (*IngressTLS) ProtoMessage() {} -func (*IngressTLS) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{21} -} -func (m *IngressTLS) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressTLS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressTLS) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressTLS.Merge(m, src) -} -func (m *IngressTLS) XXX_Size() int { - return m.Size() -} -func (m *IngressTLS) XXX_DiscardUnknown() { - xxx_messageInfo_IngressTLS.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressTLS proto.InternalMessageInfo +func (m *IngressList) Reset() { *m = IngressList{} } -func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } -func (*NetworkPolicy) ProtoMessage() {} -func (*NetworkPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{22} -} -func (m *NetworkPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicy.Merge(m, src) -} -func (m *NetworkPolicy) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicy.DiscardUnknown(m) -} +func (m *IngressLoadBalancerIngress) Reset() { *m = IngressLoadBalancerIngress{} } -var xxx_messageInfo_NetworkPolicy proto.InternalMessageInfo - -func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } -func (*NetworkPolicyEgressRule) ProtoMessage() {} -func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{23} -} -func (m *NetworkPolicyEgressRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyEgressRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyEgressRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyEgressRule.Merge(m, src) -} -func (m *NetworkPolicyEgressRule) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyEgressRule) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyEgressRule.DiscardUnknown(m) -} - -var xxx_messageInfo_NetworkPolicyEgressRule proto.InternalMessageInfo - -func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} } -func (*NetworkPolicyIngressRule) ProtoMessage() {} -func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{24} -} -func (m *NetworkPolicyIngressRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyIngressRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyIngressRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyIngressRule.Merge(m, src) -} -func (m *NetworkPolicyIngressRule) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyIngressRule) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyIngressRule.DiscardUnknown(m) -} +func (m *IngressLoadBalancerStatus) Reset() { *m = IngressLoadBalancerStatus{} } -var xxx_messageInfo_NetworkPolicyIngressRule proto.InternalMessageInfo +func (m *IngressPortStatus) Reset() { *m = IngressPortStatus{} } -func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} } -func (*NetworkPolicyList) ProtoMessage() {} -func (*NetworkPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{25} -} -func (m *NetworkPolicyList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyList) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyList.Merge(m, src) -} -func (m *NetworkPolicyList) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyList) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyList.DiscardUnknown(m) -} +func (m *IngressRule) Reset() { *m = IngressRule{} } -var xxx_messageInfo_NetworkPolicyList proto.InternalMessageInfo +func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } -func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} } -func (*NetworkPolicyPeer) ProtoMessage() {} -func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{26} -} -func (m *NetworkPolicyPeer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyPeer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyPeer) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyPeer.Merge(m, src) -} -func (m *NetworkPolicyPeer) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyPeer) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyPeer.DiscardUnknown(m) -} +func (m *IngressServiceBackend) Reset() { *m = IngressServiceBackend{} } -var xxx_messageInfo_NetworkPolicyPeer proto.InternalMessageInfo +func (m *IngressSpec) Reset() { *m = IngressSpec{} } -func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} } -func (*NetworkPolicyPort) ProtoMessage() {} -func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{27} -} -func (m *NetworkPolicyPort) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyPort) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyPort.Merge(m, src) -} -func (m *NetworkPolicyPort) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyPort) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyPort.DiscardUnknown(m) -} +func (m *IngressStatus) Reset() { *m = IngressStatus{} } -var xxx_messageInfo_NetworkPolicyPort proto.InternalMessageInfo +func (m *IngressTLS) Reset() { *m = IngressTLS{} } -func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} } -func (*NetworkPolicySpec) ProtoMessage() {} -func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{28} -} -func (m *NetworkPolicySpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicySpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicySpec.Merge(m, src) -} -func (m *NetworkPolicySpec) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicySpec) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicySpec.DiscardUnknown(m) -} +func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } -var xxx_messageInfo_NetworkPolicySpec proto.InternalMessageInfo +func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } -func (m *ParentReference) Reset() { *m = ParentReference{} } -func (*ParentReference) ProtoMessage() {} -func (*ParentReference) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{29} -} -func (m *ParentReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParentReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ParentReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParentReference.Merge(m, src) -} -func (m *ParentReference) XXX_Size() int { - return m.Size() -} -func (m *ParentReference) XXX_DiscardUnknown() { - xxx_messageInfo_ParentReference.DiscardUnknown(m) -} +func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} } -var xxx_messageInfo_ParentReference proto.InternalMessageInfo +func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} } -func (m *ServiceBackendPort) Reset() { *m = ServiceBackendPort{} } -func (*ServiceBackendPort) ProtoMessage() {} -func (*ServiceBackendPort) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{30} -} -func (m *ServiceBackendPort) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceBackendPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceBackendPort) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceBackendPort.Merge(m, src) -} -func (m *ServiceBackendPort) XXX_Size() int { - return m.Size() -} -func (m *ServiceBackendPort) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceBackendPort.DiscardUnknown(m) -} +func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} } -var xxx_messageInfo_ServiceBackendPort proto.InternalMessageInfo +func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} } -func (m *ServiceCIDR) Reset() { *m = ServiceCIDR{} } -func (*ServiceCIDR) ProtoMessage() {} -func (*ServiceCIDR) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{31} -} -func (m *ServiceCIDR) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceCIDR) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceCIDR) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceCIDR.Merge(m, src) -} -func (m *ServiceCIDR) XXX_Size() int { - return m.Size() -} -func (m *ServiceCIDR) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceCIDR.DiscardUnknown(m) -} +func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} } -var xxx_messageInfo_ServiceCIDR proto.InternalMessageInfo +func (m *ParentReference) Reset() { *m = ParentReference{} } -func (m *ServiceCIDRList) Reset() { *m = ServiceCIDRList{} } -func (*ServiceCIDRList) ProtoMessage() {} -func (*ServiceCIDRList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{32} -} -func (m *ServiceCIDRList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceCIDRList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceCIDRList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceCIDRList.Merge(m, src) -} -func (m *ServiceCIDRList) XXX_Size() int { - return m.Size() -} -func (m *ServiceCIDRList) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceCIDRList.DiscardUnknown(m) -} +func (m *ServiceBackendPort) Reset() { *m = ServiceBackendPort{} } -var xxx_messageInfo_ServiceCIDRList proto.InternalMessageInfo +func (m *ServiceCIDR) Reset() { *m = ServiceCIDR{} } -func (m *ServiceCIDRSpec) Reset() { *m = ServiceCIDRSpec{} } -func (*ServiceCIDRSpec) ProtoMessage() {} -func (*ServiceCIDRSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{33} -} -func (m *ServiceCIDRSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceCIDRSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceCIDRSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceCIDRSpec.Merge(m, src) -} -func (m *ServiceCIDRSpec) XXX_Size() int { - return m.Size() -} -func (m *ServiceCIDRSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceCIDRSpec.DiscardUnknown(m) -} +func (m *ServiceCIDRList) Reset() { *m = ServiceCIDRList{} } -var xxx_messageInfo_ServiceCIDRSpec proto.InternalMessageInfo +func (m *ServiceCIDRSpec) Reset() { *m = ServiceCIDRSpec{} } -func (m *ServiceCIDRStatus) Reset() { *m = ServiceCIDRStatus{} } -func (*ServiceCIDRStatus) ProtoMessage() {} -func (*ServiceCIDRStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{34} -} -func (m *ServiceCIDRStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceCIDRStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceCIDRStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceCIDRStatus.Merge(m, src) -} -func (m *ServiceCIDRStatus) XXX_Size() int { - return m.Size() -} -func (m *ServiceCIDRStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceCIDRStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceCIDRStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*HTTPIngressPath)(nil), "k8s.io.api.networking.v1.HTTPIngressPath") - proto.RegisterType((*HTTPIngressRuleValue)(nil), "k8s.io.api.networking.v1.HTTPIngressRuleValue") - proto.RegisterType((*IPAddress)(nil), "k8s.io.api.networking.v1.IPAddress") - proto.RegisterType((*IPAddressList)(nil), "k8s.io.api.networking.v1.IPAddressList") - proto.RegisterType((*IPAddressSpec)(nil), "k8s.io.api.networking.v1.IPAddressSpec") - proto.RegisterType((*IPBlock)(nil), "k8s.io.api.networking.v1.IPBlock") - proto.RegisterType((*Ingress)(nil), "k8s.io.api.networking.v1.Ingress") - proto.RegisterType((*IngressBackend)(nil), "k8s.io.api.networking.v1.IngressBackend") - proto.RegisterType((*IngressClass)(nil), "k8s.io.api.networking.v1.IngressClass") - proto.RegisterType((*IngressClassList)(nil), "k8s.io.api.networking.v1.IngressClassList") - proto.RegisterType((*IngressClassParametersReference)(nil), "k8s.io.api.networking.v1.IngressClassParametersReference") - proto.RegisterType((*IngressClassSpec)(nil), "k8s.io.api.networking.v1.IngressClassSpec") - proto.RegisterType((*IngressList)(nil), "k8s.io.api.networking.v1.IngressList") - proto.RegisterType((*IngressLoadBalancerIngress)(nil), "k8s.io.api.networking.v1.IngressLoadBalancerIngress") - proto.RegisterType((*IngressLoadBalancerStatus)(nil), "k8s.io.api.networking.v1.IngressLoadBalancerStatus") - proto.RegisterType((*IngressPortStatus)(nil), "k8s.io.api.networking.v1.IngressPortStatus") - proto.RegisterType((*IngressRule)(nil), "k8s.io.api.networking.v1.IngressRule") - proto.RegisterType((*IngressRuleValue)(nil), "k8s.io.api.networking.v1.IngressRuleValue") - proto.RegisterType((*IngressServiceBackend)(nil), "k8s.io.api.networking.v1.IngressServiceBackend") - proto.RegisterType((*IngressSpec)(nil), "k8s.io.api.networking.v1.IngressSpec") - proto.RegisterType((*IngressStatus)(nil), "k8s.io.api.networking.v1.IngressStatus") - proto.RegisterType((*IngressTLS)(nil), "k8s.io.api.networking.v1.IngressTLS") - proto.RegisterType((*NetworkPolicy)(nil), "k8s.io.api.networking.v1.NetworkPolicy") - proto.RegisterType((*NetworkPolicyEgressRule)(nil), "k8s.io.api.networking.v1.NetworkPolicyEgressRule") - proto.RegisterType((*NetworkPolicyIngressRule)(nil), "k8s.io.api.networking.v1.NetworkPolicyIngressRule") - proto.RegisterType((*NetworkPolicyList)(nil), "k8s.io.api.networking.v1.NetworkPolicyList") - proto.RegisterType((*NetworkPolicyPeer)(nil), "k8s.io.api.networking.v1.NetworkPolicyPeer") - proto.RegisterType((*NetworkPolicyPort)(nil), "k8s.io.api.networking.v1.NetworkPolicyPort") - proto.RegisterType((*NetworkPolicySpec)(nil), "k8s.io.api.networking.v1.NetworkPolicySpec") - proto.RegisterType((*ParentReference)(nil), "k8s.io.api.networking.v1.ParentReference") - proto.RegisterType((*ServiceBackendPort)(nil), "k8s.io.api.networking.v1.ServiceBackendPort") - proto.RegisterType((*ServiceCIDR)(nil), "k8s.io.api.networking.v1.ServiceCIDR") - proto.RegisterType((*ServiceCIDRList)(nil), "k8s.io.api.networking.v1.ServiceCIDRList") - proto.RegisterType((*ServiceCIDRSpec)(nil), "k8s.io.api.networking.v1.ServiceCIDRSpec") - proto.RegisterType((*ServiceCIDRStatus)(nil), "k8s.io.api.networking.v1.ServiceCIDRStatus") -} - -func init() { - proto.RegisterFile("k8s.io/api/networking/v1/generated.proto", fileDescriptor_2c41434372fec1d7) -} - -var fileDescriptor_2c41434372fec1d7 = []byte{ - // 1884 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0xcd, 0x8f, 0x1b, 0x49, - 0x15, 0x9f, 0xf6, 0x8c, 0x67, 0xec, 0xe7, 0xf9, 0xc8, 0x14, 0x59, 0x61, 0x06, 0x61, 0x87, 0x5e, - 0xb2, 0x3b, 0x4b, 0x76, 0x6d, 0x32, 0x1b, 0x21, 0xb8, 0x00, 0xdb, 0x93, 0x6c, 0xe2, 0xcd, 0xc4, - 0xb1, 0xca, 0x56, 0x10, 0x88, 0x8f, 0xed, 0x69, 0xd7, 0x78, 0x7a, 0xa7, 0xdd, 0xd5, 0xaa, 0x2e, - 0x87, 0x44, 0x42, 0x88, 0x0b, 0x07, 0x6e, 0xf0, 0x27, 0x20, 0xfe, 0x02, 0x04, 0xd2, 0xae, 0xb4, - 0x82, 0x85, 0x0b, 0xca, 0x71, 0x25, 0x2e, 0x7b, 0xc1, 0x22, 0xe6, 0xbf, 0xc8, 0x09, 0xd5, 0x47, - 0x7f, 0xd9, 0xee, 0xb1, 0x89, 0x22, 0x9f, 0xc6, 0xfd, 0xde, 0xab, 0xdf, 0x7b, 0xf5, 0xea, 0x7d, - 0x55, 0x0d, 0x1c, 0x5e, 0x7c, 0x27, 0x6c, 0xb8, 0xb4, 0x69, 0x07, 0x6e, 0xd3, 0x27, 0xfc, 0x17, - 0x94, 0x5d, 0xb8, 0xfe, 0xa0, 0xf9, 0xf8, 0x66, 0x73, 0x40, 0x7c, 0xc2, 0x6c, 0x4e, 0xfa, 0x8d, - 0x80, 0x51, 0x4e, 0x51, 0x55, 0x49, 0x36, 0xec, 0xc0, 0x6d, 0x24, 0x92, 0x8d, 0xc7, 0x37, 0x0f, - 0xde, 0x19, 0xb8, 0xfc, 0x7c, 0x74, 0xda, 0x70, 0xe8, 0xb0, 0x39, 0xa0, 0x03, 0xda, 0x94, 0x0b, - 0x4e, 0x47, 0x67, 0xf2, 0x4b, 0x7e, 0xc8, 0x5f, 0x0a, 0xe8, 0xc0, 0x4c, 0xa9, 0x74, 0x28, 0x23, - 0x73, 0x94, 0x1d, 0xdc, 0x4a, 0x64, 0x86, 0xb6, 0x73, 0xee, 0xfa, 0x84, 0x3d, 0x6d, 0x06, 0x17, - 0x03, 0x41, 0x08, 0x9b, 0x43, 0xc2, 0xed, 0x79, 0xab, 0x9a, 0x79, 0xab, 0xd8, 0xc8, 0xe7, 0xee, - 0x90, 0xcc, 0x2c, 0xf8, 0xf6, 0xa2, 0x05, 0xa1, 0x73, 0x4e, 0x86, 0xf6, 0xcc, 0xba, 0x77, 0xf3, - 0xd6, 0x8d, 0xb8, 0xeb, 0x35, 0x5d, 0x9f, 0x87, 0x9c, 0x4d, 0x2f, 0x32, 0xff, 0x66, 0xc0, 0xde, - 0xbd, 0x5e, 0xaf, 0xd3, 0xf2, 0x07, 0x8c, 0x84, 0x61, 0xc7, 0xe6, 0xe7, 0xe8, 0x1a, 0x6c, 0x04, - 0x36, 0x3f, 0xaf, 0x1a, 0xd7, 0x8c, 0xc3, 0xb2, 0xb5, 0xfd, 0x6c, 0x5c, 0x5f, 0x9b, 0x8c, 0xeb, - 0x1b, 0x82, 0x87, 0x25, 0x07, 0xdd, 0x82, 0x92, 0xf8, 0xdb, 0x7b, 0x1a, 0x90, 0xea, 0xba, 0x94, - 0xaa, 0x4e, 0xc6, 0xf5, 0x52, 0x47, 0xd3, 0x5e, 0xa4, 0x7e, 0xe3, 0x58, 0x12, 0x75, 0x61, 0xeb, - 0xd4, 0x76, 0x2e, 0x88, 0xdf, 0xaf, 0x16, 0xae, 0x19, 0x87, 0x95, 0xa3, 0xc3, 0x46, 0xde, 0xf1, - 0x35, 0xb4, 0x3d, 0x96, 0x92, 0xb7, 0xf6, 0xb4, 0x11, 0x5b, 0x9a, 0x80, 0x23, 0x24, 0xf3, 0x0c, - 0xae, 0xa6, 0xec, 0xc7, 0x23, 0x8f, 0x3c, 0xb2, 0xbd, 0x11, 0x41, 0x6d, 0x28, 0x0a, 0xc5, 0x61, - 0xd5, 0xb8, 0xb6, 0x7e, 0x58, 0x39, 0x7a, 0x2b, 0x5f, 0xd5, 0xd4, 0xf6, 0xad, 0x1d, 0xad, 0xab, - 0x28, 0xbe, 0x42, 0xac, 0x60, 0xcc, 0x4f, 0x0c, 0x28, 0xb7, 0x3a, 0xef, 0xf5, 0xfb, 0x42, 0x0e, - 0x7d, 0x08, 0x25, 0x71, 0xde, 0x7d, 0x9b, 0xdb, 0xd2, 0x4d, 0x95, 0xa3, 0x6f, 0xa5, 0x14, 0xc4, - 0xee, 0x6f, 0x04, 0x17, 0x03, 0x41, 0x08, 0x1b, 0x42, 0x5a, 0x28, 0x7b, 0x78, 0xfa, 0x11, 0x71, - 0xf8, 0x03, 0xc2, 0x6d, 0x0b, 0x69, 0x3d, 0x90, 0xd0, 0x70, 0x8c, 0x8a, 0x5a, 0xb0, 0x11, 0x06, - 0xc4, 0xd1, 0x9e, 0x7a, 0xf3, 0x12, 0x4f, 0x45, 0x46, 0x75, 0x03, 0xe2, 0x24, 0xa7, 0x25, 0xbe, - 0xb0, 0x84, 0x30, 0x3f, 0x36, 0x60, 0x27, 0x96, 0x3a, 0x71, 0x43, 0x8e, 0x7e, 0x32, 0x63, 0x7e, - 0x63, 0x39, 0xf3, 0xc5, 0x6a, 0x69, 0xfc, 0x15, 0xad, 0xa7, 0x14, 0x51, 0x52, 0xa6, 0xdf, 0x83, - 0xa2, 0xcb, 0xc9, 0x30, 0xac, 0x16, 0xa4, 0xeb, 0x5f, 0x5f, 0xc2, 0xf6, 0xc4, 0xe9, 0x2d, 0xb1, - 0x12, 0x2b, 0x00, 0x73, 0x90, 0x32, 0x5c, 0x6c, 0x08, 0x3d, 0x82, 0x72, 0x60, 0x33, 0xe2, 0x73, - 0x4c, 0xce, 0xb4, 0xe5, 0x97, 0x9c, 0x6c, 0x27, 0x12, 0x25, 0x8c, 0xf8, 0x0e, 0xb1, 0x76, 0x26, - 0xe3, 0x7a, 0x39, 0x26, 0xe2, 0x04, 0xca, 0x7c, 0x08, 0x5b, 0xad, 0x8e, 0xe5, 0x51, 0xe7, 0x42, - 0x44, 0xbf, 0xe3, 0xf6, 0xd9, 0x74, 0xf4, 0x1f, 0xb7, 0x6e, 0x63, 0x2c, 0x39, 0xc8, 0x84, 0x4d, - 0xf2, 0xc4, 0x21, 0x01, 0x97, 0x1b, 0x2c, 0x5b, 0x30, 0x19, 0xd7, 0x37, 0xef, 0x48, 0x0a, 0xd6, - 0x1c, 0xf3, 0x37, 0x05, 0xd8, 0xd2, 0x41, 0xb5, 0x82, 0x60, 0xb9, 0x9b, 0x09, 0x96, 0xeb, 0x0b, - 0xd3, 0x2a, 0x2f, 0x54, 0xd0, 0x43, 0xd8, 0x0c, 0xb9, 0xcd, 0x47, 0xa1, 0x4c, 0xeb, 0xcb, 0xe3, - 0x4e, 0x43, 0x49, 0x71, 0x6b, 0x57, 0x83, 0x6d, 0xaa, 0x6f, 0xac, 0x61, 0xcc, 0x7f, 0x18, 0xb0, - 0x9b, 0xcd, 0x65, 0xf4, 0x08, 0xb6, 0x42, 0xc2, 0x1e, 0xbb, 0x0e, 0xa9, 0x6e, 0x48, 0x25, 0xcd, - 0xc5, 0x4a, 0x94, 0x7c, 0x54, 0x0d, 0x2a, 0xa2, 0x12, 0x68, 0x1a, 0x8e, 0xc0, 0xd0, 0x0f, 0xa1, - 0xc4, 0x48, 0x48, 0x47, 0xcc, 0x21, 0xda, 0xfa, 0x77, 0xd2, 0xc0, 0xa2, 0xaa, 0x0b, 0x48, 0x51, - 0x8a, 0xfa, 0x27, 0xd4, 0xb1, 0x3d, 0xe5, 0xca, 0x24, 0x3c, 0xb6, 0x45, 0x3c, 0x63, 0x0d, 0x81, - 0x63, 0x30, 0x51, 0x23, 0xb7, 0xb5, 0x21, 0xc7, 0x9e, 0xbd, 0x92, 0x03, 0x3d, 0xc9, 0x1c, 0xe8, - 0x37, 0x17, 0x3a, 0x48, 0xda, 0x95, 0x5b, 0x00, 0xfe, 0x6a, 0xc0, 0x95, 0xb4, 0xe0, 0x0a, 0x6a, - 0xc0, 0xfd, 0x6c, 0x0d, 0x78, 0x63, 0xb9, 0x1d, 0xe4, 0x94, 0x81, 0x7f, 0x1b, 0x50, 0x4f, 0x8b, - 0x75, 0x6c, 0x66, 0x0f, 0x09, 0x27, 0x2c, 0x8c, 0x0f, 0x0f, 0x1d, 0x42, 0xc9, 0xee, 0xb4, 0xee, - 0x32, 0x3a, 0x0a, 0xa2, 0xd4, 0x15, 0xa6, 0xbd, 0xa7, 0x69, 0x38, 0xe6, 0x8a, 0x04, 0xbf, 0x70, - 0x75, 0x0f, 0x4a, 0x25, 0xf8, 0x7d, 0xd7, 0xef, 0x63, 0xc9, 0x11, 0x12, 0xbe, 0x3d, 0x8c, 0x5a, - 0x5b, 0x2c, 0xd1, 0xb6, 0x87, 0x04, 0x4b, 0x0e, 0xaa, 0x43, 0x31, 0x74, 0x68, 0xa0, 0x22, 0xb8, - 0x6c, 0x95, 0x85, 0xc9, 0x5d, 0x41, 0xc0, 0x8a, 0x8e, 0x6e, 0x40, 0x59, 0x08, 0x86, 0x81, 0xed, - 0x90, 0x6a, 0x51, 0x0a, 0xc9, 0xea, 0xd3, 0x8e, 0x88, 0x38, 0xe1, 0x9b, 0x7f, 0x9a, 0x3a, 0x1f, - 0x59, 0xea, 0x8e, 0x00, 0x1c, 0xea, 0x73, 0x46, 0x3d, 0x8f, 0x44, 0xd5, 0x28, 0x0e, 0x9a, 0xe3, - 0x98, 0x83, 0x53, 0x52, 0xc8, 0x05, 0x08, 0x62, 0xdf, 0xe8, 0xe0, 0xf9, 0xee, 0x72, 0xae, 0x9f, - 0xe3, 0x53, 0x6b, 0x57, 0xa8, 0x4a, 0x31, 0x52, 0xe0, 0xe6, 0x9f, 0x0d, 0xa8, 0xe8, 0xf5, 0x2b, - 0x08, 0xa7, 0xf7, 0xb3, 0xe1, 0xf4, 0xf5, 0xc5, 0x83, 0xc3, 0xfc, 0x48, 0xfa, 0xc4, 0x80, 0x83, - 0xc8, 0x6a, 0x6a, 0xf7, 0x2d, 0xdb, 0xb3, 0x7d, 0x87, 0xb0, 0xa8, 0x52, 0x1f, 0x40, 0xc1, 0x8d, - 0xc2, 0x07, 0x34, 0x40, 0xa1, 0xd5, 0xc1, 0x05, 0x37, 0x40, 0x6f, 0x43, 0xe9, 0x9c, 0x86, 0x5c, - 0x06, 0x86, 0x0a, 0x9d, 0xd8, 0xe0, 0x7b, 0x9a, 0x8e, 0x63, 0x09, 0xd4, 0x81, 0x62, 0x40, 0x19, - 0x0f, 0xab, 0x1b, 0xd2, 0xe0, 0x1b, 0x0b, 0x0d, 0xee, 0x50, 0xc6, 0x75, 0x2d, 0x4d, 0x06, 0x10, - 0x81, 0x80, 0x15, 0x90, 0xf9, 0x4b, 0xf8, 0xca, 0x1c, 0xcb, 0xd5, 0x12, 0xf4, 0x73, 0xd8, 0x72, - 0x15, 0x53, 0xcf, 0x3b, 0xb7, 0x16, 0x2a, 0x9c, 0xb3, 0xff, 0x64, 0xcc, 0x8a, 0xc6, 0xa9, 0x08, - 0xd5, 0xfc, 0xa3, 0x01, 0xfb, 0x33, 0x96, 0xca, 0x49, 0x91, 0x32, 0x2e, 0x3d, 0x56, 0x4c, 0x4d, - 0x8a, 0x94, 0x71, 0x2c, 0x39, 0xe8, 0x3e, 0x94, 0xe4, 0xa0, 0xe9, 0x50, 0x4f, 0x7b, 0xad, 0x19, - 0x79, 0xad, 0xa3, 0xe9, 0x2f, 0xc6, 0xf5, 0xaf, 0xce, 0x4e, 0xdf, 0x8d, 0x88, 0x8d, 0x63, 0x00, - 0x91, 0x75, 0x84, 0x31, 0xca, 0x74, 0x62, 0xca, 0xac, 0xbb, 0x23, 0x08, 0x58, 0xd1, 0xcd, 0x3f, - 0x24, 0x41, 0x29, 0x26, 0x41, 0x61, 0x9f, 0x38, 0x91, 0xe9, 0x5e, 0x2e, 0xce, 0x0b, 0x4b, 0x0e, - 0x0a, 0xe0, 0x8a, 0x3b, 0x35, 0x3a, 0x2e, 0x5d, 0x74, 0xe3, 0x15, 0x56, 0x55, 0x23, 0x5f, 0x99, - 0xe6, 0xe0, 0x19, 0x74, 0xf3, 0x43, 0x98, 0x91, 0x12, 0xe5, 0xfe, 0x9c, 0xf3, 0x60, 0x4e, 0xe2, - 0xe4, 0xcf, 0xaa, 0x89, 0xf6, 0x92, 0xdc, 0x53, 0xaf, 0xd7, 0xc1, 0x12, 0xc5, 0xfc, 0xad, 0x01, - 0xaf, 0xcd, 0x6d, 0x9c, 0x71, 0x61, 0x33, 0x72, 0x0b, 0x5b, 0x5b, 0x9f, 0xa8, 0xf2, 0xc1, 0xdb, - 0xf9, 0x96, 0x64, 0x91, 0xc5, 0x89, 0xcf, 0x3b, 0x7f, 0xf3, 0x9f, 0x85, 0xf8, 0x44, 0x64, 0x55, - 0xfb, 0x41, 0xec, 0x6f, 0x59, 0x75, 0x84, 0x66, 0x5d, 0x43, 0xaf, 0xa6, 0xfc, 0x17, 0xf3, 0xf0, - 0x8c, 0x34, 0xea, 0xc3, 0x6e, 0x9f, 0x9c, 0xd9, 0x23, 0x8f, 0x6b, 0xdd, 0xda, 0x6b, 0xcb, 0x5f, - 0x26, 0xd0, 0x64, 0x5c, 0xdf, 0xbd, 0x9d, 0xc1, 0xc0, 0x53, 0x98, 0xe8, 0x18, 0xd6, 0xb9, 0x17, - 0x95, 0x9b, 0x6f, 0x2c, 0x84, 0xee, 0x9d, 0x74, 0xad, 0x8a, 0xde, 0xfe, 0x7a, 0xef, 0xa4, 0x8b, - 0xc5, 0x6a, 0xf4, 0x01, 0x14, 0xd9, 0xc8, 0x23, 0x62, 0x98, 0x5a, 0x5f, 0x6a, 0x2e, 0x13, 0x67, - 0x9a, 0xa4, 0xbf, 0xf8, 0x0a, 0xb1, 0x82, 0x30, 0x7f, 0x05, 0x3b, 0x99, 0x89, 0x0b, 0x0d, 0x61, - 0xdb, 0x4b, 0xa5, 0xb0, 0xf6, 0xc2, 0xbb, 0xff, 0x57, 0xde, 0xeb, 0x82, 0x73, 0x55, 0x6b, 0xdc, - 0x4e, 0xf3, 0x70, 0x06, 0xde, 0xb4, 0x01, 0x92, 0xbd, 0x8a, 0x4c, 0x14, 0xe9, 0xa3, 0xaa, 0x8d, - 0xce, 0x44, 0x91, 0x55, 0x21, 0x56, 0x74, 0xd1, 0xbd, 0x42, 0xe2, 0x30, 0xc2, 0xdb, 0x49, 0xbd, - 0x8c, 0xbb, 0x57, 0x37, 0xe6, 0xe0, 0x94, 0x94, 0xf9, 0x77, 0x03, 0x76, 0xda, 0xca, 0xe4, 0x0e, - 0xf5, 0x5c, 0xe7, 0xe9, 0x0a, 0x06, 0xad, 0x07, 0x99, 0x41, 0xeb, 0x92, 0x32, 0x9d, 0x31, 0x2c, - 0x77, 0xd2, 0xfa, 0x8b, 0x01, 0x5f, 0xce, 0x48, 0xde, 0x49, 0x8a, 0x51, 0xdc, 0x12, 0x8c, 0x45, - 0x2d, 0x21, 0x83, 0x20, 0x53, 0x6b, 0x6e, 0x4b, 0x40, 0x77, 0xa1, 0xc0, 0xa9, 0x8e, 0xd1, 0xa5, - 0xe1, 0x08, 0x61, 0x49, 0x6f, 0xeb, 0x51, 0x5c, 0xe0, 0xd4, 0xfc, 0xd4, 0x80, 0x6a, 0x46, 0x2a, - 0x5d, 0x44, 0x5f, 0xbd, 0xdd, 0x0f, 0x60, 0xe3, 0x8c, 0xd1, 0xe1, 0xcb, 0x58, 0x1e, 0x3b, 0xfd, - 0x7d, 0x46, 0x87, 0x58, 0xc2, 0x98, 0x9f, 0x19, 0xb0, 0x9f, 0x91, 0x5c, 0xc1, 0x40, 0x72, 0x92, - 0x1d, 0x48, 0xde, 0x5c, 0x72, 0x0f, 0x39, 0x63, 0xc9, 0x67, 0x85, 0xa9, 0x1d, 0x88, 0xbd, 0xa2, - 0x33, 0xa8, 0x04, 0xb4, 0xdf, 0x25, 0x1e, 0x71, 0x38, 0x9d, 0x97, 0xe0, 0x97, 0x6d, 0xc2, 0x3e, - 0x25, 0x5e, 0xb4, 0xd4, 0xda, 0x9b, 0x8c, 0xeb, 0x95, 0x4e, 0x82, 0x85, 0xd3, 0xc0, 0xe8, 0x09, - 0xec, 0xc7, 0xb3, 0x68, 0xac, 0xad, 0xf0, 0xf2, 0xda, 0x5e, 0x9b, 0x8c, 0xeb, 0xfb, 0xed, 0x69, - 0x44, 0x3c, 0xab, 0x04, 0xdd, 0x83, 0x2d, 0x37, 0x90, 0xd7, 0x6e, 0x7d, 0x63, 0xbb, 0x6c, 0xb0, - 0x53, 0xf7, 0x73, 0x75, 0xf9, 0xd3, 0x1f, 0x38, 0x5a, 0x6e, 0xfe, 0x6b, 0x3a, 0x06, 0x44, 0xc0, - 0xa1, 0xbb, 0xa9, 0xe9, 0x43, 0xf5, 0xbc, 0x1b, 0x2f, 0x37, 0x79, 0x64, 0xdb, 0x62, 0x7e, 0x11, - 0x1a, 0x71, 0xd7, 0x6b, 0xa8, 0xa7, 0xb6, 0x46, 0xcb, 0xe7, 0x0f, 0x59, 0x97, 0x33, 0xd7, 0x1f, - 0xa8, 0x16, 0x9d, 0x1a, 0x8b, 0xae, 0xc3, 0x96, 0xee, 0x9a, 0x72, 0xe3, 0x45, 0xb5, 0xab, 0x3b, - 0x8a, 0x84, 0x23, 0x9e, 0xf9, 0x62, 0x3a, 0x2e, 0x64, 0x0f, 0xfd, 0xe8, 0x95, 0xc5, 0xc5, 0x97, - 0x74, 0x34, 0xe6, 0xc7, 0xc6, 0x4f, 0x93, 0xc1, 0x52, 0x45, 0xfa, 0xd1, 0x92, 0x91, 0x9e, 0xee, - 0x68, 0xb9, 0x63, 0x25, 0xfa, 0x11, 0x6c, 0x12, 0x85, 0xae, 0x5a, 0xe4, 0xcd, 0x25, 0xd1, 0x93, - 0xb2, 0x9a, 0xbc, 0x3c, 0x68, 0x9a, 0x06, 0x44, 0xdf, 0x17, 0x5e, 0x12, 0xb2, 0xe2, 0xc2, 0xaf, - 0xe6, 0xf0, 0xb2, 0xf5, 0x35, 0xb5, 0xd9, 0x98, 0xfc, 0x42, 0x5c, 0x70, 0xe2, 0x4f, 0x9c, 0x5e, - 0x61, 0x7e, 0x6c, 0xc0, 0xde, 0xd4, 0x0b, 0x12, 0x7a, 0x1d, 0x8a, 0x83, 0xd4, 0x15, 0x33, 0xce, - 0x66, 0x75, 0xc7, 0x54, 0x3c, 0x71, 0x53, 0x88, 0x1f, 0x22, 0xa6, 0x6e, 0x0a, 0xb3, 0xaf, 0x0b, - 0xa8, 0x99, 0xbe, 0x29, 0xaa, 0xc1, 0x76, 0x5f, 0x8b, 0xcf, 0xbd, 0x2d, 0xc6, 0x43, 0xdc, 0x46, - 0xde, 0x10, 0x67, 0xfe, 0x0c, 0xd0, 0xec, 0x78, 0xb6, 0xc4, 0xf0, 0xf7, 0x06, 0x6c, 0xfa, 0xa3, - 0xe1, 0x29, 0x51, 0xd9, 0x5f, 0x4c, 0x5c, 0xdb, 0x96, 0x54, 0xac, 0xb9, 0xe6, 0xef, 0x0b, 0x50, - 0xd1, 0x0a, 0x8e, 0x5b, 0xb7, 0xf1, 0x0a, 0xda, 0xf4, 0xfd, 0x4c, 0x9b, 0x7e, 0x6b, 0xe1, 0x58, - 0x2a, 0xcc, 0xca, 0x7d, 0xe4, 0xea, 0x4e, 0x3d, 0x72, 0xdd, 0x58, 0x0e, 0xee, 0xf2, 0x87, 0xae, - 0x4f, 0x0d, 0xd8, 0x4b, 0x49, 0xaf, 0xa0, 0x05, 0x7d, 0x90, 0x6d, 0x41, 0xd7, 0x97, 0xda, 0x45, - 0x4e, 0x03, 0x3a, 0xca, 0x18, 0x2f, 0xab, 0x4c, 0x1d, 0x8a, 0x8e, 0xdb, 0x67, 0x99, 0x11, 0x4f, - 0x30, 0x43, 0xac, 0xe8, 0xe6, 0x13, 0xd8, 0x9f, 0x71, 0x0f, 0x72, 0xe4, 0xab, 0x45, 0xdf, 0xe5, - 0x2e, 0xf5, 0xa3, 0x89, 0xa1, 0xb9, 0xdc, 0xa6, 0x8f, 0xa3, 0x75, 0x99, 0x67, 0x0e, 0x0d, 0x85, - 0x53, 0xb0, 0xd6, 0xf7, 0x9e, 0x3d, 0xaf, 0xad, 0x7d, 0xfe, 0xbc, 0xb6, 0xf6, 0xc5, 0xf3, 0xda, - 0xda, 0xaf, 0x27, 0x35, 0xe3, 0xd9, 0xa4, 0x66, 0x7c, 0x3e, 0xa9, 0x19, 0x5f, 0x4c, 0x6a, 0xc6, - 0x7f, 0x26, 0x35, 0xe3, 0x77, 0xff, 0xad, 0xad, 0xfd, 0xb8, 0x9a, 0xf7, 0x5f, 0xa4, 0xff, 0x05, - 0x00, 0x00, 0xff, 0xff, 0xb5, 0x6b, 0x8c, 0x52, 0x60, 0x1a, 0x00, 0x00, -} +func (m *ServiceCIDRStatus) Reset() { *m = ServiceCIDRStatus{} } func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/networking/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/networking/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..54918d47e709b --- /dev/null +++ b/staging/src/k8s.io/api/networking/v1/generated.protomessage.pb.go @@ -0,0 +1,92 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*HTTPIngressPath) ProtoMessage() {} + +func (*HTTPIngressRuleValue) ProtoMessage() {} + +func (*IPAddress) ProtoMessage() {} + +func (*IPAddressList) ProtoMessage() {} + +func (*IPAddressSpec) ProtoMessage() {} + +func (*IPBlock) ProtoMessage() {} + +func (*Ingress) ProtoMessage() {} + +func (*IngressBackend) ProtoMessage() {} + +func (*IngressClass) ProtoMessage() {} + +func (*IngressClassList) ProtoMessage() {} + +func (*IngressClassParametersReference) ProtoMessage() {} + +func (*IngressClassSpec) ProtoMessage() {} + +func (*IngressList) ProtoMessage() {} + +func (*IngressLoadBalancerIngress) ProtoMessage() {} + +func (*IngressLoadBalancerStatus) ProtoMessage() {} + +func (*IngressPortStatus) ProtoMessage() {} + +func (*IngressRule) ProtoMessage() {} + +func (*IngressRuleValue) ProtoMessage() {} + +func (*IngressServiceBackend) ProtoMessage() {} + +func (*IngressSpec) ProtoMessage() {} + +func (*IngressStatus) ProtoMessage() {} + +func (*IngressTLS) ProtoMessage() {} + +func (*NetworkPolicy) ProtoMessage() {} + +func (*NetworkPolicyEgressRule) ProtoMessage() {} + +func (*NetworkPolicyIngressRule) ProtoMessage() {} + +func (*NetworkPolicyList) ProtoMessage() {} + +func (*NetworkPolicyPeer) ProtoMessage() {} + +func (*NetworkPolicyPort) ProtoMessage() {} + +func (*NetworkPolicySpec) ProtoMessage() {} + +func (*ParentReference) ProtoMessage() {} + +func (*ServiceBackendPort) ProtoMessage() {} + +func (*ServiceCIDR) ProtoMessage() {} + +func (*ServiceCIDRList) ProtoMessage() {} + +func (*ServiceCIDRSpec) ProtoMessage() {} + +func (*ServiceCIDRStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/networking/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/networking/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..c57789594a90b --- /dev/null +++ b/staging/src/k8s.io/api/networking/v1/zz_generated.model_name.go @@ -0,0 +1,197 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HTTPIngressPath) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.HTTPIngressPath" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HTTPIngressRuleValue) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.HTTPIngressRuleValue" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IPAddress) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IPAddress" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IPAddressList) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IPAddressList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IPAddressSpec) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IPAddressSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IPBlock) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IPBlock" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Ingress) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.Ingress" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressBackend) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IngressBackend" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressClass) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IngressClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressClassList) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IngressClassList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressClassParametersReference) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IngressClassParametersReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressClassSpec) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IngressClassSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressList) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IngressList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressLoadBalancerIngress) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IngressLoadBalancerIngress" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressLoadBalancerStatus) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IngressLoadBalancerStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressPortStatus) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IngressPortStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressRule) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IngressRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressRuleValue) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IngressRuleValue" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressServiceBackend) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IngressServiceBackend" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressSpec) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IngressSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressStatus) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IngressStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressTLS) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.IngressTLS" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkPolicy) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.NetworkPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkPolicyEgressRule) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.NetworkPolicyEgressRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkPolicyIngressRule) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.NetworkPolicyIngressRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkPolicyList) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.NetworkPolicyList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkPolicyPeer) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.NetworkPolicyPeer" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkPolicyPort) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.NetworkPolicyPort" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkPolicySpec) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.NetworkPolicySpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ParentReference) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.ParentReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceBackendPort) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.ServiceBackendPort" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceCIDR) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.ServiceCIDR" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceCIDRList) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.ServiceCIDRList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceCIDRSpec) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.ServiceCIDRSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceCIDRStatus) OpenAPIModelName() string { + return "io.k8s.api.networking.v1.ServiceCIDRStatus" +} diff --git a/staging/src/k8s.io/api/networking/v1beta1/doc.go b/staging/src/k8s.io/api/networking/v1beta1/doc.go index c5a03e04e8ae1..6ec15316621b9 100644 --- a/staging/src/k8s.io/api/networking/v1beta1/doc.go +++ b/staging/src/k8s.io/api/networking/v1beta1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.networking.v1beta1 + // +groupName=networking.k8s.io package v1beta1 diff --git a/staging/src/k8s.io/api/networking/v1beta1/generated.pb.go b/staging/src/k8s.io/api/networking/v1beta1/generated.pb.go index a924725f28447..fb3b9f6a1d3fc 100644 --- a/staging/src/k8s.io/api/networking/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/networking/v1beta1/generated.pb.go @@ -24,855 +24,64 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" k8s_io_api_core_v1 "k8s.io/api/core/v1" v11 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} } -func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } -func (*HTTPIngressPath) ProtoMessage() {} -func (*HTTPIngressPath) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{0} -} -func (m *HTTPIngressPath) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPIngressPath) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HTTPIngressPath) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPIngressPath.Merge(m, src) -} -func (m *HTTPIngressPath) XXX_Size() int { - return m.Size() -} -func (m *HTTPIngressPath) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPIngressPath.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPIngressPath proto.InternalMessageInfo - -func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} } -func (*HTTPIngressRuleValue) ProtoMessage() {} -func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{1} -} -func (m *HTTPIngressRuleValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPIngressRuleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HTTPIngressRuleValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPIngressRuleValue.Merge(m, src) -} -func (m *HTTPIngressRuleValue) XXX_Size() int { - return m.Size() -} -func (m *HTTPIngressRuleValue) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPIngressRuleValue.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPIngressRuleValue proto.InternalMessageInfo - -func (m *IPAddress) Reset() { *m = IPAddress{} } -func (*IPAddress) ProtoMessage() {} -func (*IPAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{2} -} -func (m *IPAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IPAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IPAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_IPAddress.Merge(m, src) -} -func (m *IPAddress) XXX_Size() int { - return m.Size() -} -func (m *IPAddress) XXX_DiscardUnknown() { - xxx_messageInfo_IPAddress.DiscardUnknown(m) -} - -var xxx_messageInfo_IPAddress proto.InternalMessageInfo - -func (m *IPAddressList) Reset() { *m = IPAddressList{} } -func (*IPAddressList) ProtoMessage() {} -func (*IPAddressList) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{3} -} -func (m *IPAddressList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IPAddressList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IPAddressList) XXX_Merge(src proto.Message) { - xxx_messageInfo_IPAddressList.Merge(m, src) -} -func (m *IPAddressList) XXX_Size() int { - return m.Size() -} -func (m *IPAddressList) XXX_DiscardUnknown() { - xxx_messageInfo_IPAddressList.DiscardUnknown(m) -} - -var xxx_messageInfo_IPAddressList proto.InternalMessageInfo - -func (m *IPAddressSpec) Reset() { *m = IPAddressSpec{} } -func (*IPAddressSpec) ProtoMessage() {} -func (*IPAddressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{4} -} -func (m *IPAddressSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IPAddressSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IPAddressSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_IPAddressSpec.Merge(m, src) -} -func (m *IPAddressSpec) XXX_Size() int { - return m.Size() -} -func (m *IPAddressSpec) XXX_DiscardUnknown() { - xxx_messageInfo_IPAddressSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_IPAddressSpec proto.InternalMessageInfo - -func (m *Ingress) Reset() { *m = Ingress{} } -func (*Ingress) ProtoMessage() {} -func (*Ingress) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{5} -} -func (m *Ingress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Ingress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Ingress) XXX_Merge(src proto.Message) { - xxx_messageInfo_Ingress.Merge(m, src) -} -func (m *Ingress) XXX_Size() int { - return m.Size() -} -func (m *Ingress) XXX_DiscardUnknown() { - xxx_messageInfo_Ingress.DiscardUnknown(m) -} - -var xxx_messageInfo_Ingress proto.InternalMessageInfo - -func (m *IngressBackend) Reset() { *m = IngressBackend{} } -func (*IngressBackend) ProtoMessage() {} -func (*IngressBackend) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{6} -} -func (m *IngressBackend) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressBackend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressBackend) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressBackend.Merge(m, src) -} -func (m *IngressBackend) XXX_Size() int { - return m.Size() -} -func (m *IngressBackend) XXX_DiscardUnknown() { - xxx_messageInfo_IngressBackend.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressBackend proto.InternalMessageInfo - -func (m *IngressClass) Reset() { *m = IngressClass{} } -func (*IngressClass) ProtoMessage() {} -func (*IngressClass) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{7} -} -func (m *IngressClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressClass.Merge(m, src) -} -func (m *IngressClass) XXX_Size() int { - return m.Size() -} -func (m *IngressClass) XXX_DiscardUnknown() { - xxx_messageInfo_IngressClass.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressClass proto.InternalMessageInfo - -func (m *IngressClassList) Reset() { *m = IngressClassList{} } -func (*IngressClassList) ProtoMessage() {} -func (*IngressClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{8} -} -func (m *IngressClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressClassList.Merge(m, src) -} -func (m *IngressClassList) XXX_Size() int { - return m.Size() -} -func (m *IngressClassList) XXX_DiscardUnknown() { - xxx_messageInfo_IngressClassList.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressClassList proto.InternalMessageInfo - -func (m *IngressClassParametersReference) Reset() { *m = IngressClassParametersReference{} } -func (*IngressClassParametersReference) ProtoMessage() {} -func (*IngressClassParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{9} -} -func (m *IngressClassParametersReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressClassParametersReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressClassParametersReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressClassParametersReference.Merge(m, src) -} -func (m *IngressClassParametersReference) XXX_Size() int { - return m.Size() -} -func (m *IngressClassParametersReference) XXX_DiscardUnknown() { - xxx_messageInfo_IngressClassParametersReference.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressClassParametersReference proto.InternalMessageInfo - -func (m *IngressClassSpec) Reset() { *m = IngressClassSpec{} } -func (*IngressClassSpec) ProtoMessage() {} -func (*IngressClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{10} -} -func (m *IngressClassSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressClassSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressClassSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressClassSpec.Merge(m, src) -} -func (m *IngressClassSpec) XXX_Size() int { - return m.Size() -} -func (m *IngressClassSpec) XXX_DiscardUnknown() { - xxx_messageInfo_IngressClassSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressClassSpec proto.InternalMessageInfo - -func (m *IngressList) Reset() { *m = IngressList{} } -func (*IngressList) ProtoMessage() {} -func (*IngressList) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{11} -} -func (m *IngressList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressList) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressList.Merge(m, src) -} -func (m *IngressList) XXX_Size() int { - return m.Size() -} -func (m *IngressList) XXX_DiscardUnknown() { - xxx_messageInfo_IngressList.DiscardUnknown(m) -} +func (m *IPAddress) Reset() { *m = IPAddress{} } -var xxx_messageInfo_IngressList proto.InternalMessageInfo - -func (m *IngressLoadBalancerIngress) Reset() { *m = IngressLoadBalancerIngress{} } -func (*IngressLoadBalancerIngress) ProtoMessage() {} -func (*IngressLoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{12} -} -func (m *IngressLoadBalancerIngress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressLoadBalancerIngress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressLoadBalancerIngress) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressLoadBalancerIngress.Merge(m, src) -} -func (m *IngressLoadBalancerIngress) XXX_Size() int { - return m.Size() -} -func (m *IngressLoadBalancerIngress) XXX_DiscardUnknown() { - xxx_messageInfo_IngressLoadBalancerIngress.DiscardUnknown(m) -} +func (m *IPAddressList) Reset() { *m = IPAddressList{} } -var xxx_messageInfo_IngressLoadBalancerIngress proto.InternalMessageInfo - -func (m *IngressLoadBalancerStatus) Reset() { *m = IngressLoadBalancerStatus{} } -func (*IngressLoadBalancerStatus) ProtoMessage() {} -func (*IngressLoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{13} -} -func (m *IngressLoadBalancerStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressLoadBalancerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressLoadBalancerStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressLoadBalancerStatus.Merge(m, src) -} -func (m *IngressLoadBalancerStatus) XXX_Size() int { - return m.Size() -} -func (m *IngressLoadBalancerStatus) XXX_DiscardUnknown() { - xxx_messageInfo_IngressLoadBalancerStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressLoadBalancerStatus proto.InternalMessageInfo - -func (m *IngressPortStatus) Reset() { *m = IngressPortStatus{} } -func (*IngressPortStatus) ProtoMessage() {} -func (*IngressPortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{14} -} -func (m *IngressPortStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressPortStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressPortStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressPortStatus.Merge(m, src) -} -func (m *IngressPortStatus) XXX_Size() int { - return m.Size() -} -func (m *IngressPortStatus) XXX_DiscardUnknown() { - xxx_messageInfo_IngressPortStatus.DiscardUnknown(m) -} +func (m *IPAddressSpec) Reset() { *m = IPAddressSpec{} } -var xxx_messageInfo_IngressPortStatus proto.InternalMessageInfo +func (m *Ingress) Reset() { *m = Ingress{} } -func (m *IngressRule) Reset() { *m = IngressRule{} } -func (*IngressRule) ProtoMessage() {} -func (*IngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{15} -} -func (m *IngressRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressRule.Merge(m, src) -} -func (m *IngressRule) XXX_Size() int { - return m.Size() -} -func (m *IngressRule) XXX_DiscardUnknown() { - xxx_messageInfo_IngressRule.DiscardUnknown(m) -} +func (m *IngressBackend) Reset() { *m = IngressBackend{} } -var xxx_messageInfo_IngressRule proto.InternalMessageInfo +func (m *IngressClass) Reset() { *m = IngressClass{} } -func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } -func (*IngressRuleValue) ProtoMessage() {} -func (*IngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{16} -} -func (m *IngressRuleValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressRuleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressRuleValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressRuleValue.Merge(m, src) -} -func (m *IngressRuleValue) XXX_Size() int { - return m.Size() -} -func (m *IngressRuleValue) XXX_DiscardUnknown() { - xxx_messageInfo_IngressRuleValue.DiscardUnknown(m) -} +func (m *IngressClassList) Reset() { *m = IngressClassList{} } -var xxx_messageInfo_IngressRuleValue proto.InternalMessageInfo +func (m *IngressClassParametersReference) Reset() { *m = IngressClassParametersReference{} } -func (m *IngressSpec) Reset() { *m = IngressSpec{} } -func (*IngressSpec) ProtoMessage() {} -func (*IngressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{17} -} -func (m *IngressSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressSpec.Merge(m, src) -} -func (m *IngressSpec) XXX_Size() int { - return m.Size() -} -func (m *IngressSpec) XXX_DiscardUnknown() { - xxx_messageInfo_IngressSpec.DiscardUnknown(m) -} +func (m *IngressClassSpec) Reset() { *m = IngressClassSpec{} } -var xxx_messageInfo_IngressSpec proto.InternalMessageInfo +func (m *IngressList) Reset() { *m = IngressList{} } -func (m *IngressStatus) Reset() { *m = IngressStatus{} } -func (*IngressStatus) ProtoMessage() {} -func (*IngressStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{18} -} -func (m *IngressStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressStatus.Merge(m, src) -} -func (m *IngressStatus) XXX_Size() int { - return m.Size() -} -func (m *IngressStatus) XXX_DiscardUnknown() { - xxx_messageInfo_IngressStatus.DiscardUnknown(m) -} +func (m *IngressLoadBalancerIngress) Reset() { *m = IngressLoadBalancerIngress{} } -var xxx_messageInfo_IngressStatus proto.InternalMessageInfo +func (m *IngressLoadBalancerStatus) Reset() { *m = IngressLoadBalancerStatus{} } -func (m *IngressTLS) Reset() { *m = IngressTLS{} } -func (*IngressTLS) ProtoMessage() {} -func (*IngressTLS) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{19} -} -func (m *IngressTLS) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IngressTLS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IngressTLS) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressTLS.Merge(m, src) -} -func (m *IngressTLS) XXX_Size() int { - return m.Size() -} -func (m *IngressTLS) XXX_DiscardUnknown() { - xxx_messageInfo_IngressTLS.DiscardUnknown(m) -} +func (m *IngressPortStatus) Reset() { *m = IngressPortStatus{} } -var xxx_messageInfo_IngressTLS proto.InternalMessageInfo +func (m *IngressRule) Reset() { *m = IngressRule{} } -func (m *ParentReference) Reset() { *m = ParentReference{} } -func (*ParentReference) ProtoMessage() {} -func (*ParentReference) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{20} -} -func (m *ParentReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParentReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ParentReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParentReference.Merge(m, src) -} -func (m *ParentReference) XXX_Size() int { - return m.Size() -} -func (m *ParentReference) XXX_DiscardUnknown() { - xxx_messageInfo_ParentReference.DiscardUnknown(m) -} +func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } -var xxx_messageInfo_ParentReference proto.InternalMessageInfo +func (m *IngressSpec) Reset() { *m = IngressSpec{} } -func (m *ServiceCIDR) Reset() { *m = ServiceCIDR{} } -func (*ServiceCIDR) ProtoMessage() {} -func (*ServiceCIDR) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{21} -} -func (m *ServiceCIDR) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceCIDR) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceCIDR) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceCIDR.Merge(m, src) -} -func (m *ServiceCIDR) XXX_Size() int { - return m.Size() -} -func (m *ServiceCIDR) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceCIDR.DiscardUnknown(m) -} +func (m *IngressStatus) Reset() { *m = IngressStatus{} } -var xxx_messageInfo_ServiceCIDR proto.InternalMessageInfo +func (m *IngressTLS) Reset() { *m = IngressTLS{} } -func (m *ServiceCIDRList) Reset() { *m = ServiceCIDRList{} } -func (*ServiceCIDRList) ProtoMessage() {} -func (*ServiceCIDRList) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{22} -} -func (m *ServiceCIDRList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceCIDRList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceCIDRList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceCIDRList.Merge(m, src) -} -func (m *ServiceCIDRList) XXX_Size() int { - return m.Size() -} -func (m *ServiceCIDRList) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceCIDRList.DiscardUnknown(m) -} +func (m *ParentReference) Reset() { *m = ParentReference{} } -var xxx_messageInfo_ServiceCIDRList proto.InternalMessageInfo +func (m *ServiceCIDR) Reset() { *m = ServiceCIDR{} } -func (m *ServiceCIDRSpec) Reset() { *m = ServiceCIDRSpec{} } -func (*ServiceCIDRSpec) ProtoMessage() {} -func (*ServiceCIDRSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{23} -} -func (m *ServiceCIDRSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceCIDRSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceCIDRSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceCIDRSpec.Merge(m, src) -} -func (m *ServiceCIDRSpec) XXX_Size() int { - return m.Size() -} -func (m *ServiceCIDRSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceCIDRSpec.DiscardUnknown(m) -} +func (m *ServiceCIDRList) Reset() { *m = ServiceCIDRList{} } -var xxx_messageInfo_ServiceCIDRSpec proto.InternalMessageInfo +func (m *ServiceCIDRSpec) Reset() { *m = ServiceCIDRSpec{} } -func (m *ServiceCIDRStatus) Reset() { *m = ServiceCIDRStatus{} } -func (*ServiceCIDRStatus) ProtoMessage() {} -func (*ServiceCIDRStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{24} -} -func (m *ServiceCIDRStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceCIDRStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceCIDRStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceCIDRStatus.Merge(m, src) -} -func (m *ServiceCIDRStatus) XXX_Size() int { - return m.Size() -} -func (m *ServiceCIDRStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceCIDRStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceCIDRStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*HTTPIngressPath)(nil), "k8s.io.api.networking.v1beta1.HTTPIngressPath") - proto.RegisterType((*HTTPIngressRuleValue)(nil), "k8s.io.api.networking.v1beta1.HTTPIngressRuleValue") - proto.RegisterType((*IPAddress)(nil), "k8s.io.api.networking.v1beta1.IPAddress") - proto.RegisterType((*IPAddressList)(nil), "k8s.io.api.networking.v1beta1.IPAddressList") - proto.RegisterType((*IPAddressSpec)(nil), "k8s.io.api.networking.v1beta1.IPAddressSpec") - proto.RegisterType((*Ingress)(nil), "k8s.io.api.networking.v1beta1.Ingress") - proto.RegisterType((*IngressBackend)(nil), "k8s.io.api.networking.v1beta1.IngressBackend") - proto.RegisterType((*IngressClass)(nil), "k8s.io.api.networking.v1beta1.IngressClass") - proto.RegisterType((*IngressClassList)(nil), "k8s.io.api.networking.v1beta1.IngressClassList") - proto.RegisterType((*IngressClassParametersReference)(nil), "k8s.io.api.networking.v1beta1.IngressClassParametersReference") - proto.RegisterType((*IngressClassSpec)(nil), "k8s.io.api.networking.v1beta1.IngressClassSpec") - proto.RegisterType((*IngressList)(nil), "k8s.io.api.networking.v1beta1.IngressList") - proto.RegisterType((*IngressLoadBalancerIngress)(nil), "k8s.io.api.networking.v1beta1.IngressLoadBalancerIngress") - proto.RegisterType((*IngressLoadBalancerStatus)(nil), "k8s.io.api.networking.v1beta1.IngressLoadBalancerStatus") - proto.RegisterType((*IngressPortStatus)(nil), "k8s.io.api.networking.v1beta1.IngressPortStatus") - proto.RegisterType((*IngressRule)(nil), "k8s.io.api.networking.v1beta1.IngressRule") - proto.RegisterType((*IngressRuleValue)(nil), "k8s.io.api.networking.v1beta1.IngressRuleValue") - proto.RegisterType((*IngressSpec)(nil), "k8s.io.api.networking.v1beta1.IngressSpec") - proto.RegisterType((*IngressStatus)(nil), "k8s.io.api.networking.v1beta1.IngressStatus") - proto.RegisterType((*IngressTLS)(nil), "k8s.io.api.networking.v1beta1.IngressTLS") - proto.RegisterType((*ParentReference)(nil), "k8s.io.api.networking.v1beta1.ParentReference") - proto.RegisterType((*ServiceCIDR)(nil), "k8s.io.api.networking.v1beta1.ServiceCIDR") - proto.RegisterType((*ServiceCIDRList)(nil), "k8s.io.api.networking.v1beta1.ServiceCIDRList") - proto.RegisterType((*ServiceCIDRSpec)(nil), "k8s.io.api.networking.v1beta1.ServiceCIDRSpec") - proto.RegisterType((*ServiceCIDRStatus)(nil), "k8s.io.api.networking.v1beta1.ServiceCIDRStatus") -} - -func init() { - proto.RegisterFile("k8s.io/api/networking/v1beta1/generated.proto", fileDescriptor_9497719c79c89d2d) -} - -var fileDescriptor_9497719c79c89d2d = []byte{ - // 1457 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcb, 0x6f, 0x1b, 0xc5, - 0x1f, 0xcf, 0x3a, 0x71, 0xe3, 0x8c, 0xd3, 0x26, 0x9d, 0x5f, 0x0f, 0xfe, 0x05, 0xd5, 0x8e, 0x16, - 0x09, 0x85, 0x3e, 0x76, 0xdb, 0xb4, 0xa0, 0x72, 0x41, 0xd4, 0x01, 0x51, 0xab, 0x69, 0xb2, 0x8c, - 0x0d, 0x54, 0xc0, 0x81, 0xc9, 0x7a, 0x6a, 0x2f, 0x5e, 0xef, 0xae, 0x66, 0xc7, 0x81, 0xde, 0x40, - 0x9c, 0x38, 0xc1, 0x9d, 0x23, 0x12, 0x7f, 0x02, 0x70, 0xa0, 0x52, 0x05, 0x97, 0x1e, 0x7b, 0xec, - 0x85, 0x88, 0x9a, 0xff, 0xa2, 0x27, 0xf4, 0x9d, 0x9d, 0x7d, 0xf9, 0xd1, 0x6c, 0x38, 0xe4, 0x54, - 0xef, 0xf7, 0x3d, 0xdf, 0xe7, 0xa7, 0x41, 0x57, 0x07, 0xb7, 0x42, 0xc3, 0xf1, 0x4d, 0x1a, 0x38, - 0xa6, 0xc7, 0xc4, 0x97, 0x3e, 0x1f, 0x38, 0x5e, 0xcf, 0x3c, 0xbc, 0x7e, 0xc0, 0x04, 0xbd, 0x6e, - 0xf6, 0x98, 0xc7, 0x38, 0x15, 0xac, 0x6b, 0x04, 0xdc, 0x17, 0x3e, 0xbe, 0x18, 0x89, 0x1b, 0x34, - 0x70, 0x8c, 0x54, 0xdc, 0x50, 0xe2, 0x1b, 0x57, 0x7b, 0x8e, 0xe8, 0x8f, 0x0e, 0x0c, 0xdb, 0x1f, - 0x9a, 0x3d, 0xbf, 0xe7, 0x9b, 0x52, 0xeb, 0x60, 0xf4, 0x40, 0x7e, 0xc9, 0x0f, 0xf9, 0x2b, 0xb2, - 0xb6, 0xa1, 0x67, 0x9c, 0xdb, 0x3e, 0x67, 0xe6, 0xe1, 0x94, 0xc7, 0x8d, 0x9b, 0xa9, 0xcc, 0x90, - 0xda, 0x7d, 0xc7, 0x63, 0xfc, 0xa1, 0x19, 0x0c, 0x7a, 0x40, 0x08, 0xcd, 0x21, 0x13, 0x74, 0x96, - 0x96, 0x39, 0x4f, 0x8b, 0x8f, 0x3c, 0xe1, 0x0c, 0xd9, 0x94, 0xc2, 0x9b, 0xc7, 0x29, 0x84, 0x76, - 0x9f, 0x0d, 0xe9, 0x94, 0xde, 0x8d, 0x79, 0x7a, 0x23, 0xe1, 0xb8, 0xa6, 0xe3, 0x89, 0x50, 0xf0, - 0x49, 0x25, 0xfd, 0x4f, 0x0d, 0xad, 0xdd, 0xe9, 0x74, 0xac, 0x96, 0xd7, 0xe3, 0x2c, 0x0c, 0x2d, - 0x2a, 0xfa, 0x78, 0x13, 0x2d, 0x05, 0x54, 0xf4, 0x6b, 0xda, 0xa6, 0xb6, 0xb5, 0xd2, 0x5c, 0x7d, - 0x72, 0xd4, 0x58, 0x18, 0x1f, 0x35, 0x96, 0x80, 0x47, 0x24, 0x07, 0xdf, 0x44, 0x15, 0xf8, 0xb7, - 0xf3, 0x30, 0x60, 0xb5, 0x45, 0x29, 0x55, 0x1b, 0x1f, 0x35, 0x2a, 0x96, 0xa2, 0xbd, 0xc8, 0xfc, - 0x26, 0x89, 0x24, 0xbe, 0x8f, 0x96, 0x0f, 0xa8, 0x3d, 0x60, 0x5e, 0xb7, 0x56, 0xda, 0xd4, 0xb6, - 0xaa, 0xdb, 0x57, 0x8d, 0x97, 0xd6, 0xd0, 0x50, 0x41, 0x35, 0x23, 0xa5, 0xe6, 0x9a, 0x8a, 0x64, - 0x59, 0x11, 0x48, 0x6c, 0x4e, 0x1f, 0xa0, 0x0b, 0x99, 0x47, 0x90, 0x91, 0xcb, 0x3e, 0xa2, 0xee, - 0x88, 0xe1, 0x36, 0x2a, 0x83, 0xf7, 0xb0, 0xa6, 0x6d, 0x2e, 0x6e, 0x55, 0xb7, 0x8d, 0x63, 0xfc, - 0x4d, 0x24, 0xa2, 0x79, 0x56, 0x39, 0x2c, 0xc3, 0x57, 0x48, 0x22, 0x5b, 0xfa, 0x23, 0x0d, 0xad, - 0xb4, 0xac, 0xdb, 0xdd, 0x2e, 0xc8, 0xe1, 0xcf, 0x51, 0x05, 0x2a, 0xdf, 0xa5, 0x82, 0xca, 0x84, - 0x55, 0xb7, 0xaf, 0x65, 0xbc, 0x24, 0x85, 0x30, 0x82, 0x41, 0x0f, 0x08, 0xa1, 0x01, 0xd2, 0xc6, - 0xe1, 0x75, 0x63, 0xff, 0xe0, 0x0b, 0x66, 0x8b, 0x7b, 0x4c, 0xd0, 0x26, 0x56, 0x7e, 0x50, 0x4a, - 0x23, 0x89, 0x55, 0xbc, 0x87, 0x96, 0xc2, 0x80, 0xd9, 0x2a, 0x67, 0x57, 0x8e, 0xcb, 0x59, 0x1c, - 0x59, 0x3b, 0x60, 0x76, 0x5a, 0x3c, 0xf8, 0x22, 0xd2, 0x8e, 0xfe, 0xbb, 0x86, 0xce, 0x26, 0x52, - 0xbb, 0x4e, 0x28, 0xf0, 0x67, 0x53, 0x6f, 0x30, 0x8a, 0xbd, 0x01, 0xb4, 0xe5, 0x0b, 0xd6, 0x95, - 0x9f, 0x4a, 0x4c, 0xc9, 0xc4, 0x7f, 0x0f, 0x95, 0x1d, 0xc1, 0x86, 0x61, 0xad, 0x24, 0x8b, 0xb0, - 0x55, 0xf4, 0x01, 0x69, 0xfa, 0x5b, 0xa0, 0x4e, 0x22, 0x2b, 0xba, 0x9b, 0x89, 0x1e, 0x5e, 0x85, - 0x3f, 0x45, 0x2b, 0x01, 0xe5, 0xcc, 0x13, 0x84, 0x3d, 0x98, 0x11, 0xfe, 0x2c, 0x1f, 0x56, 0x2c, - 0xcf, 0x38, 0xf3, 0x6c, 0xd6, 0x3c, 0x3b, 0x3e, 0x6a, 0xac, 0x24, 0x44, 0x92, 0xda, 0xd3, 0xbf, - 0x2f, 0xa1, 0x65, 0xd5, 0x12, 0xa7, 0x50, 0xea, 0xdd, 0x5c, 0xa9, 0x2f, 0x15, 0x1b, 0x8f, 0x79, - 0x85, 0xc6, 0x1d, 0x74, 0x26, 0x14, 0x54, 0x8c, 0x42, 0x39, 0xa3, 0x05, 0x5a, 0x47, 0xd9, 0x93, - 0x3a, 0xcd, 0x73, 0xca, 0xe2, 0x99, 0xe8, 0x9b, 0x28, 0x5b, 0xfa, 0x77, 0x25, 0x74, 0x2e, 0x3f, - 0x98, 0xf8, 0x0d, 0x54, 0x0d, 0x19, 0x3f, 0x74, 0x6c, 0xb6, 0x47, 0x87, 0x4c, 0xed, 0x8d, 0xff, - 0x29, 0xfd, 0x6a, 0x3b, 0x65, 0x91, 0xac, 0x1c, 0xee, 0x25, 0x6a, 0x96, 0xcf, 0x85, 0x7a, 0xf4, - 0xfc, 0x94, 0xc2, 0x1a, 0x33, 0xa2, 0x35, 0x66, 0xb4, 0x3c, 0xb1, 0xcf, 0xdb, 0x82, 0x3b, 0x5e, - 0x6f, 0xca, 0x11, 0x18, 0x23, 0x59, 0xcb, 0xf8, 0x63, 0x54, 0xe1, 0x2c, 0xf4, 0x47, 0xdc, 0x66, - 0x2a, 0x15, 0xb9, 0xcd, 0x03, 0xfb, 0x1e, 0xca, 0x04, 0x4b, 0xaa, 0xbb, 0xeb, 0xdb, 0xd4, 0x8d, - 0x8a, 0x93, 0xf6, 0xc7, 0x2a, 0xb4, 0x36, 0x51, 0x26, 0x48, 0x62, 0x0c, 0xb6, 0xe7, 0xaa, 0xca, - 0xc5, 0x8e, 0x4b, 0x4f, 0xa5, 0x45, 0x3e, 0xc8, 0xb5, 0x88, 0x59, 0xac, 0xa4, 0x32, 0xb8, 0xb9, - 0x0b, 0xe1, 0x0f, 0x0d, 0xad, 0x67, 0x05, 0x4f, 0x61, 0x27, 0x58, 0xf9, 0x9d, 0x70, 0xf9, 0x04, - 0xcf, 0x98, 0xb3, 0x16, 0xfe, 0xd2, 0x50, 0x23, 0x2b, 0x66, 0x51, 0x4e, 0x87, 0x4c, 0x30, 0x1e, - 0x26, 0x65, 0xc4, 0x5b, 0xa8, 0x42, 0xad, 0xd6, 0xfb, 0xdc, 0x1f, 0x05, 0xf1, 0x71, 0x83, 0xf8, - 0x6e, 0x2b, 0x1a, 0x49, 0xb8, 0x70, 0x02, 0x07, 0x8e, 0xba, 0x53, 0x99, 0x13, 0x78, 0xd7, 0xf1, - 0xba, 0x44, 0x72, 0x40, 0xc2, 0x83, 0x66, 0x5f, 0xcc, 0x4b, 0xc8, 0x2e, 0x97, 0x1c, 0xdc, 0x40, - 0xe5, 0xd0, 0xf6, 0x03, 0x56, 0x5b, 0x92, 0x22, 0x2b, 0x10, 0x72, 0x1b, 0x08, 0x24, 0xa2, 0xe3, - 0xcb, 0x68, 0x05, 0x04, 0xc3, 0x80, 0xda, 0xac, 0x56, 0x96, 0x42, 0x72, 0x11, 0xed, 0xc5, 0x44, - 0x92, 0xf2, 0xf5, 0x5f, 0x26, 0x8a, 0x24, 0x57, 0xdf, 0x36, 0x42, 0xb6, 0xef, 0x09, 0xee, 0xbb, - 0x2e, 0xe3, 0xea, 0x49, 0x49, 0xfb, 0xec, 0x24, 0x1c, 0x92, 0x91, 0xc2, 0x1e, 0x42, 0x41, 0x92, - 0x1b, 0xd5, 0x46, 0x6f, 0x9f, 0x20, 0xff, 0x33, 0x12, 0xdb, 0x3c, 0x07, 0xfe, 0x32, 0x8c, 0x8c, - 0x07, 0xfd, 0x37, 0x0d, 0x55, 0x95, 0xfe, 0x29, 0x34, 0xd6, 0xdd, 0x7c, 0x63, 0xbd, 0x56, 0x10, - 0x61, 0xcc, 0xee, 0xa9, 0x47, 0x1a, 0xda, 0x88, 0x43, 0xf7, 0x69, 0xb7, 0x49, 0x5d, 0xea, 0xd9, - 0x8c, 0xc7, 0xf7, 0x60, 0x03, 0x95, 0x9c, 0xb8, 0x91, 0x90, 0x32, 0x50, 0x6a, 0x59, 0xa4, 0xe4, - 0x04, 0xf8, 0x0a, 0xaa, 0xf4, 0xfd, 0x50, 0xc8, 0x16, 0x89, 0x9a, 0x28, 0x89, 0xfa, 0x8e, 0xa2, - 0x93, 0x44, 0x02, 0x7f, 0x88, 0xca, 0x81, 0xcf, 0x45, 0x58, 0x5b, 0x92, 0x51, 0x5f, 0x2b, 0x16, - 0x35, 0xec, 0x36, 0xb5, 0xac, 0x53, 0xa4, 0x02, 0x66, 0x48, 0x64, 0x4d, 0xff, 0x46, 0x43, 0xff, - 0x9f, 0x11, 0x7f, 0xa4, 0x83, 0xbb, 0x68, 0xd9, 0x89, 0x98, 0x0a, 0x1e, 0xbd, 0x55, 0xcc, 0xed, - 0x8c, 0x54, 0xa4, 0xd0, 0x2c, 0x86, 0x60, 0xb1, 0x69, 0xfd, 0x27, 0x0d, 0x9d, 0x9f, 0x8a, 0x57, - 0x42, 0x4c, 0xd8, 0xf9, 0x90, 0xbc, 0x72, 0x06, 0x62, 0xc2, 0xea, 0x96, 0x1c, 0x7c, 0x17, 0x55, - 0x24, 0x42, 0xb5, 0x7d, 0x57, 0x25, 0xd0, 0x8c, 0x13, 0x68, 0x29, 0xfa, 0x8b, 0xa3, 0xc6, 0x2b, - 0xd3, 0xb0, 0xdd, 0x88, 0xd9, 0x24, 0x31, 0x00, 0xa3, 0xc8, 0x38, 0xf7, 0xb9, 0x9a, 0x56, 0x39, - 0x8a, 0xef, 0x01, 0x81, 0x44, 0x74, 0xfd, 0xe7, 0xb4, 0x49, 0x01, 0x3d, 0x42, 0x7c, 0x50, 0x9c, - 0x49, 0x08, 0x0c, 0xa5, 0x23, 0x92, 0x83, 0x47, 0x68, 0xdd, 0x99, 0x80, 0x9b, 0x27, 0xdb, 0xc9, - 0x89, 0x5a, 0xb3, 0xa6, 0xcc, 0xaf, 0x4f, 0x72, 0xc8, 0x94, 0x0b, 0x9d, 0xa1, 0x29, 0x29, 0x38, - 0x09, 0x7d, 0x21, 0x02, 0x35, 0x4d, 0x37, 0x8a, 0x83, 0xdc, 0x34, 0x84, 0x8a, 0x7c, 0x5d, 0xa7, - 0x63, 0x11, 0x69, 0x4a, 0x7f, 0x5c, 0x4a, 0xf2, 0x21, 0x17, 0xcd, 0x3b, 0xc9, 0x6b, 0xe5, 0x0e, - 0x90, 0x67, 0x3e, 0x5a, 0x6b, 0x17, 0x32, 0x81, 0x27, 0x3c, 0x32, 0x25, 0x8d, 0x3b, 0x29, 0xf8, - 0xd7, 0xfe, 0x0b, 0xf8, 0xaf, 0xce, 0x02, 0xfe, 0xf8, 0x0e, 0x5a, 0x14, 0x6e, 0x3c, 0xec, 0xaf, - 0x17, 0xb3, 0xd8, 0xd9, 0x6d, 0x37, 0xab, 0x2a, 0xe5, 0x8b, 0x9d, 0xdd, 0x36, 0x01, 0x13, 0x78, - 0x1f, 0x95, 0xf9, 0xc8, 0x65, 0x80, 0x95, 0x16, 0x8b, 0x63, 0x2f, 0xc8, 0x60, 0x3a, 0x7c, 0xf0, - 0x15, 0x92, 0xc8, 0x8e, 0xfe, 0x2d, 0xc0, 0xec, 0x2c, 0xa2, 0xc2, 0x1c, 0xad, 0xba, 0x99, 0xd9, - 0x51, 0x79, 0xb8, 0x75, 0xf2, 0xa9, 0x53, 0x43, 0x7f, 0x41, 0xf9, 0x5d, 0xcd, 0xf2, 0x48, 0xce, - 0x87, 0x4e, 0x11, 0x4a, 0x9f, 0x0d, 0x73, 0x00, 0xcd, 0x1b, 0x0d, 0xbc, 0x9a, 0x03, 0xe8, 0xe9, - 0x90, 0x44, 0x74, 0x38, 0x28, 0x21, 0xb3, 0x39, 0x13, 0x7b, 0xe9, 0xe2, 0x4a, 0x0e, 0x4a, 0x3b, - 0xe1, 0x90, 0x8c, 0x94, 0xfe, 0xab, 0x86, 0xd6, 0x26, 0x00, 0x35, 0x7e, 0x15, 0x95, 0x7b, 0x99, - 0x33, 0x9b, 0x64, 0x28, 0xba, 0xb3, 0x11, 0x0f, 0x76, 0x64, 0x02, 0xcb, 0x26, 0x76, 0xe4, 0x34, - 0xd6, 0xc2, 0x66, 0xf6, 0x5a, 0x46, 0x73, 0x7c, 0x5e, 0x89, 0xcf, 0xbc, 0x98, 0xc9, 0x85, 0x5e, - 0x9a, 0x77, 0xa1, 0xf5, 0x1f, 0x4b, 0x28, 0x06, 0x8d, 0x3b, 0xad, 0x77, 0xc9, 0x29, 0xa0, 0x37, - 0x2b, 0x87, 0xde, 0x8e, 0xfb, 0x6f, 0x4a, 0x26, 0xb6, 0xb9, 0x20, 0xff, 0xfe, 0x04, 0xc8, 0xbf, - 0x76, 0x02, 0x9b, 0x2f, 0x07, 0xfa, 0x8f, 0x35, 0xb4, 0x96, 0x91, 0x3e, 0x85, 0xe3, 0xbd, 0x9f, - 0x3f, 0xde, 0x97, 0x8a, 0x3f, 0x65, 0xce, 0x01, 0xdf, 0xce, 0xbd, 0x40, 0x6e, 0xb2, 0x06, 0x2a, - 0xdb, 0x4e, 0x97, 0xe7, 0x46, 0x00, 0x98, 0x21, 0x89, 0xe8, 0xfa, 0x57, 0xe8, 0xfc, 0x54, 0x8e, - 0xb0, 0x2d, 0x81, 0x56, 0xd7, 0x11, 0x8e, 0xef, 0xc5, 0xe7, 0xd2, 0x2c, 0xf6, 0xf2, 0x9d, 0x58, - 0x2f, 0x87, 0xcc, 0x94, 0x29, 0x92, 0x31, 0xdb, 0xdc, 0x79, 0xf2, 0xbc, 0xbe, 0xf0, 0xf4, 0x79, - 0x7d, 0xe1, 0xd9, 0xf3, 0xfa, 0xc2, 0xd7, 0xe3, 0xba, 0xf6, 0x64, 0x5c, 0xd7, 0x9e, 0x8e, 0xeb, - 0xda, 0xb3, 0x71, 0x5d, 0xfb, 0x7b, 0x5c, 0xd7, 0x7e, 0xf8, 0xa7, 0xbe, 0xf0, 0xc9, 0xc5, 0x97, - 0xfe, 0x99, 0xec, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xc2, 0xa4, 0xff, 0x46, 0x13, 0x00, - 0x00, -} +func (m *ServiceCIDRStatus) Reset() { *m = ServiceCIDRStatus{} } func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/networking/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/networking/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..abd29cba981b3 --- /dev/null +++ b/staging/src/k8s.io/api/networking/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,72 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*HTTPIngressPath) ProtoMessage() {} + +func (*HTTPIngressRuleValue) ProtoMessage() {} + +func (*IPAddress) ProtoMessage() {} + +func (*IPAddressList) ProtoMessage() {} + +func (*IPAddressSpec) ProtoMessage() {} + +func (*Ingress) ProtoMessage() {} + +func (*IngressBackend) ProtoMessage() {} + +func (*IngressClass) ProtoMessage() {} + +func (*IngressClassList) ProtoMessage() {} + +func (*IngressClassParametersReference) ProtoMessage() {} + +func (*IngressClassSpec) ProtoMessage() {} + +func (*IngressList) ProtoMessage() {} + +func (*IngressLoadBalancerIngress) ProtoMessage() {} + +func (*IngressLoadBalancerStatus) ProtoMessage() {} + +func (*IngressPortStatus) ProtoMessage() {} + +func (*IngressRule) ProtoMessage() {} + +func (*IngressRuleValue) ProtoMessage() {} + +func (*IngressSpec) ProtoMessage() {} + +func (*IngressStatus) ProtoMessage() {} + +func (*IngressTLS) ProtoMessage() {} + +func (*ParentReference) ProtoMessage() {} + +func (*ServiceCIDR) ProtoMessage() {} + +func (*ServiceCIDRList) ProtoMessage() {} + +func (*ServiceCIDRSpec) ProtoMessage() {} + +func (*ServiceCIDRStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/networking/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/networking/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..08bdb27a5efb7 --- /dev/null +++ b/staging/src/k8s.io/api/networking/v1beta1/zz_generated.model_name.go @@ -0,0 +1,147 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HTTPIngressPath) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.HTTPIngressPath" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in HTTPIngressRuleValue) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.HTTPIngressRuleValue" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IPAddress) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IPAddress" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IPAddressList) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IPAddressList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IPAddressSpec) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IPAddressSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Ingress) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.Ingress" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressBackend) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IngressBackend" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressClass) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IngressClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressClassList) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IngressClassList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressClassParametersReference) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IngressClassParametersReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressClassSpec) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IngressClassSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressList) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IngressList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressLoadBalancerIngress) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IngressLoadBalancerIngress" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressLoadBalancerStatus) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IngressLoadBalancerStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressPortStatus) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IngressPortStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressRule) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IngressRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressRuleValue) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IngressRuleValue" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressSpec) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IngressSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressStatus) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IngressStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressTLS) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.IngressTLS" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ParentReference) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.ParentReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceCIDR) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.ServiceCIDR" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceCIDRList) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.ServiceCIDRList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceCIDRSpec) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.ServiceCIDRSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceCIDRStatus) OpenAPIModelName() string { + return "io.k8s.api.networking.v1beta1.ServiceCIDRStatus" +} diff --git a/staging/src/k8s.io/api/node/v1/doc.go b/staging/src/k8s.io/api/node/v1/doc.go index 3239af7039920..3f8bfbc01422e 100644 --- a/staging/src/k8s.io/api/node/v1/doc.go +++ b/staging/src/k8s.io/api/node/v1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.node.v1 + // +groupName=node.k8s.io package v1 diff --git a/staging/src/k8s.io/api/node/v1/generated.pb.go b/staging/src/k8s.io/api/node/v1/generated.pb.go index 4c304f55f9c28..6fcb8ad0e7aa3 100644 --- a/staging/src/k8s.io/api/node/v1/generated.pb.go +++ b/staging/src/k8s.io/api/node/v1/generated.pb.go @@ -23,200 +23,25 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" k8s_io_api_core_v1 "k8s.io/api/core/v1" v11 "k8s.io/api/core/v1" k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource" resource "k8s.io/apimachinery/pkg/api/resource" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *Overhead) Reset() { *m = Overhead{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *RuntimeClass) Reset() { *m = RuntimeClass{} } -func (m *Overhead) Reset() { *m = Overhead{} } -func (*Overhead) ProtoMessage() {} -func (*Overhead) Descriptor() ([]byte, []int) { - return fileDescriptor_9007436710e7565b, []int{0} -} -func (m *Overhead) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Overhead) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Overhead) XXX_Merge(src proto.Message) { - xxx_messageInfo_Overhead.Merge(m, src) -} -func (m *Overhead) XXX_Size() int { - return m.Size() -} -func (m *Overhead) XXX_DiscardUnknown() { - xxx_messageInfo_Overhead.DiscardUnknown(m) -} - -var xxx_messageInfo_Overhead proto.InternalMessageInfo - -func (m *RuntimeClass) Reset() { *m = RuntimeClass{} } -func (*RuntimeClass) ProtoMessage() {} -func (*RuntimeClass) Descriptor() ([]byte, []int) { - return fileDescriptor_9007436710e7565b, []int{1} -} -func (m *RuntimeClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RuntimeClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RuntimeClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_RuntimeClass.Merge(m, src) -} -func (m *RuntimeClass) XXX_Size() int { - return m.Size() -} -func (m *RuntimeClass) XXX_DiscardUnknown() { - xxx_messageInfo_RuntimeClass.DiscardUnknown(m) -} - -var xxx_messageInfo_RuntimeClass proto.InternalMessageInfo - -func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} } -func (*RuntimeClassList) ProtoMessage() {} -func (*RuntimeClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_9007436710e7565b, []int{2} -} -func (m *RuntimeClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RuntimeClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RuntimeClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_RuntimeClassList.Merge(m, src) -} -func (m *RuntimeClassList) XXX_Size() int { - return m.Size() -} -func (m *RuntimeClassList) XXX_DiscardUnknown() { - xxx_messageInfo_RuntimeClassList.DiscardUnknown(m) -} - -var xxx_messageInfo_RuntimeClassList proto.InternalMessageInfo - -func (m *Scheduling) Reset() { *m = Scheduling{} } -func (*Scheduling) ProtoMessage() {} -func (*Scheduling) Descriptor() ([]byte, []int) { - return fileDescriptor_9007436710e7565b, []int{3} -} -func (m *Scheduling) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Scheduling) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Scheduling) XXX_Merge(src proto.Message) { - xxx_messageInfo_Scheduling.Merge(m, src) -} -func (m *Scheduling) XXX_Size() int { - return m.Size() -} -func (m *Scheduling) XXX_DiscardUnknown() { - xxx_messageInfo_Scheduling.DiscardUnknown(m) -} +func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} } -var xxx_messageInfo_Scheduling proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Overhead)(nil), "k8s.io.api.node.v1.Overhead") - proto.RegisterMapType((k8s_io_api_core_v1.ResourceList)(nil), "k8s.io.api.node.v1.Overhead.PodFixedEntry") - proto.RegisterType((*RuntimeClass)(nil), "k8s.io.api.node.v1.RuntimeClass") - proto.RegisterType((*RuntimeClassList)(nil), "k8s.io.api.node.v1.RuntimeClassList") - proto.RegisterType((*Scheduling)(nil), "k8s.io.api.node.v1.Scheduling") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.node.v1.Scheduling.NodeSelectorEntry") -} - -func init() { - proto.RegisterFile("k8s.io/api/node/v1/generated.proto", fileDescriptor_9007436710e7565b) -} - -var fileDescriptor_9007436710e7565b = []byte{ - // 643 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x6f, 0xd3, 0x4e, - 0x10, 0xcd, 0xa6, 0xbf, 0xaa, 0xe9, 0x26, 0xfd, 0x51, 0x96, 0x1e, 0xa2, 0x08, 0x39, 0x51, 0x4e, - 0x05, 0xa9, 0xeb, 0xb6, 0x42, 0xa8, 0xe2, 0x82, 0x64, 0x68, 0x05, 0x12, 0x14, 0x70, 0xe1, 0x82, - 0x38, 0xb0, 0xb5, 0x17, 0x67, 0x9b, 0xd8, 0x1b, 0xd9, 0xeb, 0x88, 0xdc, 0x10, 0x17, 0x24, 0x4e, - 0xfd, 0x2e, 0x1c, 0xf8, 0x0a, 0x15, 0xa7, 0x1e, 0x7b, 0x6a, 0xa9, 0xf9, 0x16, 0x9c, 0xd0, 0xae, - 0xff, 0x64, 0x83, 0x43, 0x28, 0x37, 0xef, 0xec, 0x7b, 0x6f, 0x66, 0xde, 0xec, 0x18, 0x76, 0xfb, - 0x3b, 0x11, 0x66, 0xdc, 0x24, 0x43, 0x66, 0x06, 0xdc, 0xa5, 0xe6, 0x68, 0xcb, 0xf4, 0x68, 0x40, - 0x43, 0x22, 0xa8, 0x8b, 0x87, 0x21, 0x17, 0x1c, 0xa1, 0x14, 0x83, 0xc9, 0x90, 0x61, 0x89, 0xc1, - 0xa3, 0xad, 0xd6, 0x86, 0xc7, 0x44, 0x2f, 0x3e, 0xc4, 0x0e, 0xf7, 0x4d, 0x8f, 0x7b, 0xdc, 0x54, - 0xd0, 0xc3, 0xf8, 0x9d, 0x3a, 0xa9, 0x83, 0xfa, 0x4a, 0x25, 0x5a, 0x7a, 0x1a, 0x87, 0x87, 0xb3, - 0xd2, 0xb4, 0xee, 0x4c, 0x30, 0x3e, 0x71, 0x7a, 0x2c, 0xa0, 0xe1, 0xd8, 0x1c, 0xf6, 0x3d, 0x45, - 0x0a, 0x69, 0xc4, 0xe3, 0xd0, 0xa1, 0xff, 0xc4, 0x8a, 0x4c, 0x9f, 0x0a, 0x32, 0x2b, 0x97, 0xf9, - 0x27, 0x56, 0x18, 0x07, 0x82, 0xf9, 0xe5, 0x34, 0x77, 0xff, 0x46, 0x88, 0x9c, 0x1e, 0xf5, 0xc9, - 0xef, 0xbc, 0xee, 0xb7, 0x2a, 0xac, 0x3d, 0x1b, 0xd1, 0xb0, 0x47, 0x89, 0x8b, 0x4e, 0x01, 0xac, - 0x0d, 0xb9, 0xbb, 0xc7, 0xde, 0x53, 0xb7, 0x09, 0x3a, 0x0b, 0xeb, 0xf5, 0xed, 0xdb, 0xb8, 0x6c, - 0x2e, 0xce, 0x09, 0xf8, 0x79, 0x06, 0xde, 0x0d, 0x44, 0x38, 0xb6, 0x3e, 0x81, 0x93, 0xf3, 0x76, - 0x25, 0x39, 0x6f, 0xd7, 0xf2, 0xf8, 0xcf, 0xf3, 0x76, 0xbb, 0xec, 0x2c, 0xb6, 0x33, 0xb3, 0x9e, - 0xb0, 0x48, 0x7c, 0xbc, 0x98, 0x0b, 0xd9, 0x27, 0x3e, 0xfd, 0x7c, 0xd1, 0xde, 0xb8, 0x8a, 0xf7, - 0xf8, 0x45, 0x4c, 0x02, 0xc1, 0xc4, 0xd8, 0x2e, 0xba, 0x68, 0xf5, 0xe1, 0xca, 0x54, 0x91, 0x68, - 0x15, 0x2e, 0xf4, 0xe9, 0xb8, 0x09, 0x3a, 0x60, 0x7d, 0xd9, 0x96, 0x9f, 0xe8, 0x21, 0x5c, 0x1c, - 0x91, 0x41, 0x4c, 0x9b, 0xd5, 0x0e, 0x58, 0xaf, 0x6f, 0x63, 0xad, 0xe3, 0x22, 0x17, 0x1e, 0xf6, - 0x3d, 0x65, 0x41, 0x39, 0x57, 0x4a, 0xbe, 0x57, 0xdd, 0x01, 0xdd, 0x2f, 0x55, 0xd8, 0xb0, 0x53, - 0xbf, 0x1f, 0x0c, 0x48, 0x14, 0xa1, 0xb7, 0xb0, 0x26, 0x27, 0xec, 0x12, 0x41, 0x54, 0xc6, 0xfa, - 0xf6, 0xe6, 0x3c, 0xf5, 0x08, 0x4b, 0xb4, 0x72, 0xf8, 0xf0, 0x88, 0x3a, 0xe2, 0x29, 0x15, 0xc4, - 0x42, 0x99, 0xa9, 0x70, 0x12, 0xb3, 0x0b, 0x55, 0x74, 0x0b, 0x2e, 0xf5, 0x48, 0xe0, 0x0e, 0x68, - 0xa8, 0xca, 0x5f, 0xb6, 0xae, 0x65, 0xf0, 0xa5, 0x47, 0x69, 0xd8, 0xce, 0xef, 0xd1, 0x1e, 0xac, - 0xf1, 0x6c, 0x70, 0xcd, 0x05, 0x55, 0xcc, 0xcd, 0x79, 0xc3, 0xb5, 0x1a, 0x72, 0x92, 0xf9, 0xc9, - 0x2e, 0xb8, 0x68, 0x1f, 0x42, 0xf9, 0x98, 0xdc, 0x78, 0xc0, 0x02, 0xaf, 0xf9, 0x9f, 0x52, 0x32, - 0x66, 0x29, 0x1d, 0x14, 0x28, 0xeb, 0x7f, 0xd9, 0xc0, 0xe4, 0x6c, 0x6b, 0x0a, 0xdd, 0xaf, 0x00, - 0xae, 0xea, 0xae, 0xc9, 0x57, 0x81, 0xde, 0x94, 0x9c, 0xc3, 0x57, 0x73, 0x4e, 0xb2, 0x95, 0x6f, - 0xab, 0xf9, 0x63, 0xcc, 0x23, 0x9a, 0x6b, 0xbb, 0x70, 0x91, 0x09, 0xea, 0x47, 0xcd, 0xaa, 0x7a, - 0xe4, 0x9d, 0x59, 0xd5, 0xeb, 0x25, 0x59, 0x2b, 0x99, 0xd8, 0xe2, 0x63, 0x49, 0xb3, 0x53, 0x76, - 0xf7, 0xb8, 0x0a, 0xb5, 0xa6, 0xd0, 0x11, 0x6c, 0x48, 0xf2, 0x01, 0x1d, 0x50, 0x47, 0xf0, 0x30, - 0xdb, 0xa0, 0xcd, 0xf9, 0xd6, 0xe0, 0x7d, 0x8d, 0x92, 0xee, 0xd1, 0x5a, 0x96, 0xac, 0xa1, 0x5f, - 0xd9, 0x53, 0xda, 0xe8, 0x15, 0xac, 0x0b, 0x3e, 0x90, 0xab, 0xcc, 0x78, 0x90, 0xf7, 0x31, 0x35, - 0x05, 0xb9, 0x49, 0x32, 0xd5, 0xcb, 0x02, 0x66, 0xdd, 0xc8, 0x84, 0xeb, 0x93, 0x58, 0x64, 0xeb, - 0x3a, 0xad, 0xfb, 0xf0, 0x7a, 0xa9, 0x9e, 0x19, 0x2b, 0xb3, 0xa6, 0xaf, 0xcc, 0xb2, 0xb6, 0x02, - 0xd6, 0xce, 0xc9, 0xa5, 0x51, 0x39, 0xbd, 0x34, 0x2a, 0x67, 0x97, 0x46, 0xe5, 0x43, 0x62, 0x80, - 0x93, 0xc4, 0x00, 0xa7, 0x89, 0x01, 0xce, 0x12, 0x03, 0x7c, 0x4f, 0x0c, 0x70, 0xfc, 0xc3, 0xa8, - 0xbc, 0x46, 0xe5, 0xbf, 0xfa, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd3, 0x3f, 0x9c, 0xd0, 0xea, - 0x05, 0x00, 0x00, -} +func (m *Scheduling) Reset() { *m = Scheduling{} } func (m *Overhead) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -243,7 +68,7 @@ func (m *Overhead) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.PodFixed { keysForPodFixed = append(keysForPodFixed, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForPodFixed) + sort.Strings(keysForPodFixed) for iNdEx := len(keysForPodFixed) - 1; iNdEx >= 0; iNdEx-- { v := m.PodFixed[k8s_io_api_core_v1.ResourceName(keysForPodFixed[iNdEx])] baseI := i @@ -418,7 +243,7 @@ func (m *Scheduling) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.NodeSelector { keysForNodeSelector = append(keysForNodeSelector, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector) + sort.Strings(keysForNodeSelector) for iNdEx := len(keysForNodeSelector) - 1; iNdEx >= 0; iNdEx-- { v := m.NodeSelector[string(keysForNodeSelector[iNdEx])] baseI := i @@ -544,7 +369,7 @@ func (this *Overhead) String() string { for k := range this.PodFixed { keysForPodFixed = append(keysForPodFixed, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForPodFixed) + sort.Strings(keysForPodFixed) mapStringForPodFixed := "k8s_io_api_core_v1.ResourceList{" for _, k := range keysForPodFixed { mapStringForPodFixed += fmt.Sprintf("%v: %v,", k, this.PodFixed[k8s_io_api_core_v1.ResourceName(k)]) @@ -598,7 +423,7 @@ func (this *Scheduling) String() string { for k := range this.NodeSelector { keysForNodeSelector = append(keysForNodeSelector, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector) + sort.Strings(keysForNodeSelector) mapStringForNodeSelector := "map[string]string{" for _, k := range keysForNodeSelector { mapStringForNodeSelector += fmt.Sprintf("%v: %v,", k, this.NodeSelector[k]) diff --git a/staging/src/k8s.io/api/node/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/node/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..97072dfa1eb5e --- /dev/null +++ b/staging/src/k8s.io/api/node/v1/generated.protomessage.pb.go @@ -0,0 +1,30 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*Overhead) ProtoMessage() {} + +func (*RuntimeClass) ProtoMessage() {} + +func (*RuntimeClassList) ProtoMessage() {} + +func (*Scheduling) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/node/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/node/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..68ca99f77ad9b --- /dev/null +++ b/staging/src/k8s.io/api/node/v1/zz_generated.model_name.go @@ -0,0 +1,42 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Overhead) OpenAPIModelName() string { + return "io.k8s.api.node.v1.Overhead" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RuntimeClass) OpenAPIModelName() string { + return "io.k8s.api.node.v1.RuntimeClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RuntimeClassList) OpenAPIModelName() string { + return "io.k8s.api.node.v1.RuntimeClassList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Scheduling) OpenAPIModelName() string { + return "io.k8s.api.node.v1.Scheduling" +} diff --git a/staging/src/k8s.io/api/node/v1alpha1/doc.go b/staging/src/k8s.io/api/node/v1alpha1/doc.go index 2f3d46ac20567..9774572876514 100644 --- a/staging/src/k8s.io/api/node/v1alpha1/doc.go +++ b/staging/src/k8s.io/api/node/v1alpha1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:openapi-model-package=io.k8s.api.node.v1alpha1 // +groupName=node.k8s.io diff --git a/staging/src/k8s.io/api/node/v1alpha1/generated.pb.go b/staging/src/k8s.io/api/node/v1alpha1/generated.pb.go index 16ac696433f1c..f25af72ee1f7f 100644 --- a/staging/src/k8s.io/api/node/v1alpha1/generated.pb.go +++ b/staging/src/k8s.io/api/node/v1alpha1/generated.pb.go @@ -23,231 +23,27 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" k8s_io_api_core_v1 "k8s.io/api/core/v1" v11 "k8s.io/api/core/v1" k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource" resource "k8s.io/apimachinery/pkg/api/resource" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *Overhead) Reset() { *m = Overhead{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *RuntimeClass) Reset() { *m = RuntimeClass{} } -func (m *Overhead) Reset() { *m = Overhead{} } -func (*Overhead) ProtoMessage() {} -func (*Overhead) Descriptor() ([]byte, []int) { - return fileDescriptor_a8fee97bf5273e47, []int{0} -} -func (m *Overhead) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Overhead) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Overhead) XXX_Merge(src proto.Message) { - xxx_messageInfo_Overhead.Merge(m, src) -} -func (m *Overhead) XXX_Size() int { - return m.Size() -} -func (m *Overhead) XXX_DiscardUnknown() { - xxx_messageInfo_Overhead.DiscardUnknown(m) -} - -var xxx_messageInfo_Overhead proto.InternalMessageInfo - -func (m *RuntimeClass) Reset() { *m = RuntimeClass{} } -func (*RuntimeClass) ProtoMessage() {} -func (*RuntimeClass) Descriptor() ([]byte, []int) { - return fileDescriptor_a8fee97bf5273e47, []int{1} -} -func (m *RuntimeClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RuntimeClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RuntimeClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_RuntimeClass.Merge(m, src) -} -func (m *RuntimeClass) XXX_Size() int { - return m.Size() -} -func (m *RuntimeClass) XXX_DiscardUnknown() { - xxx_messageInfo_RuntimeClass.DiscardUnknown(m) -} - -var xxx_messageInfo_RuntimeClass proto.InternalMessageInfo - -func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} } -func (*RuntimeClassList) ProtoMessage() {} -func (*RuntimeClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_a8fee97bf5273e47, []int{2} -} -func (m *RuntimeClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RuntimeClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RuntimeClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_RuntimeClassList.Merge(m, src) -} -func (m *RuntimeClassList) XXX_Size() int { - return m.Size() -} -func (m *RuntimeClassList) XXX_DiscardUnknown() { - xxx_messageInfo_RuntimeClassList.DiscardUnknown(m) -} +func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} } -var xxx_messageInfo_RuntimeClassList proto.InternalMessageInfo +func (m *RuntimeClassSpec) Reset() { *m = RuntimeClassSpec{} } -func (m *RuntimeClassSpec) Reset() { *m = RuntimeClassSpec{} } -func (*RuntimeClassSpec) ProtoMessage() {} -func (*RuntimeClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_a8fee97bf5273e47, []int{3} -} -func (m *RuntimeClassSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RuntimeClassSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RuntimeClassSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_RuntimeClassSpec.Merge(m, src) -} -func (m *RuntimeClassSpec) XXX_Size() int { - return m.Size() -} -func (m *RuntimeClassSpec) XXX_DiscardUnknown() { - xxx_messageInfo_RuntimeClassSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_RuntimeClassSpec proto.InternalMessageInfo - -func (m *Scheduling) Reset() { *m = Scheduling{} } -func (*Scheduling) ProtoMessage() {} -func (*Scheduling) Descriptor() ([]byte, []int) { - return fileDescriptor_a8fee97bf5273e47, []int{4} -} -func (m *Scheduling) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Scheduling) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Scheduling) XXX_Merge(src proto.Message) { - xxx_messageInfo_Scheduling.Merge(m, src) -} -func (m *Scheduling) XXX_Size() int { - return m.Size() -} -func (m *Scheduling) XXX_DiscardUnknown() { - xxx_messageInfo_Scheduling.DiscardUnknown(m) -} - -var xxx_messageInfo_Scheduling proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Overhead)(nil), "k8s.io.api.node.v1alpha1.Overhead") - proto.RegisterMapType((k8s_io_api_core_v1.ResourceList)(nil), "k8s.io.api.node.v1alpha1.Overhead.PodFixedEntry") - proto.RegisterType((*RuntimeClass)(nil), "k8s.io.api.node.v1alpha1.RuntimeClass") - proto.RegisterType((*RuntimeClassList)(nil), "k8s.io.api.node.v1alpha1.RuntimeClassList") - proto.RegisterType((*RuntimeClassSpec)(nil), "k8s.io.api.node.v1alpha1.RuntimeClassSpec") - proto.RegisterType((*Scheduling)(nil), "k8s.io.api.node.v1alpha1.Scheduling") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.node.v1alpha1.Scheduling.NodeSelectorEntry") -} - -func init() { - proto.RegisterFile("k8s.io/api/node/v1alpha1/generated.proto", fileDescriptor_a8fee97bf5273e47) -} - -var fileDescriptor_a8fee97bf5273e47 = []byte{ - // 683 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x3d, 0x6f, 0xd3, 0x4c, - 0x1c, 0xcf, 0xa5, 0xad, 0x94, 0x5e, 0xd2, 0xaa, 0x8f, 0x9f, 0x0a, 0x45, 0x19, 0x9c, 0xca, 0x42, - 0x28, 0x42, 0xea, 0x99, 0x56, 0xa8, 0xaa, 0x18, 0x8a, 0x64, 0x5e, 0x04, 0xa2, 0xb4, 0x70, 0x2d, - 0x0b, 0x62, 0xe0, 0x6a, 0x1f, 0x8e, 0x89, 0xed, 0xb3, 0xec, 0x73, 0x44, 0x36, 0xc4, 0x82, 0xc4, - 0xc4, 0xc4, 0xb7, 0x81, 0xb9, 0x63, 0x27, 0xd4, 0xa9, 0xa5, 0xe1, 0x3b, 0x30, 0x30, 0xa1, 0xb3, - 0xcf, 0xc9, 0x25, 0x69, 0x68, 0xd8, 0x7c, 0x77, 0xbf, 0x97, 0xff, 0x6b, 0x02, 0x5b, 0x9d, 0xed, - 0x04, 0x79, 0xcc, 0x24, 0x91, 0x67, 0x86, 0xcc, 0xa1, 0x66, 0x77, 0x83, 0xf8, 0x51, 0x9b, 0x6c, - 0x98, 0x2e, 0x0d, 0x69, 0x4c, 0x38, 0x75, 0x50, 0x14, 0x33, 0xce, 0xb4, 0x7a, 0x8e, 0x44, 0x24, - 0xf2, 0x90, 0x40, 0xa2, 0x02, 0xd9, 0x58, 0x77, 0x3d, 0xde, 0x4e, 0x8f, 0x90, 0xcd, 0x02, 0xd3, - 0x65, 0x2e, 0x33, 0x33, 0xc2, 0x51, 0xfa, 0x26, 0x3b, 0x65, 0x87, 0xec, 0x2b, 0x17, 0x6a, 0x18, - 0x8a, 0xa5, 0xcd, 0x62, 0x61, 0x39, 0x6e, 0xd6, 0xb8, 0x3d, 0xc4, 0x04, 0xc4, 0x6e, 0x7b, 0x21, - 0x8d, 0x7b, 0x66, 0xd4, 0x71, 0x33, 0x52, 0x4c, 0x13, 0x96, 0xc6, 0x36, 0xfd, 0x27, 0x56, 0x62, - 0x06, 0x94, 0x93, 0xcb, 0xbc, 0xcc, 0x69, 0xac, 0x38, 0x0d, 0xb9, 0x17, 0x4c, 0xda, 0x6c, 0x5d, - 0x45, 0x48, 0xec, 0x36, 0x0d, 0xc8, 0x38, 0xcf, 0x38, 0x29, 0xc3, 0xca, 0x7e, 0x97, 0xc6, 0x6d, - 0x4a, 0x1c, 0xed, 0x3b, 0x80, 0x95, 0x88, 0x39, 0x0f, 0xbd, 0x77, 0xd4, 0xa9, 0x83, 0xb5, 0xb9, - 0x56, 0x75, 0xf3, 0x16, 0x9a, 0x56, 0x62, 0x54, 0xd0, 0xd0, 0x33, 0x49, 0x79, 0x10, 0xf2, 0xb8, - 0x67, 0x7d, 0x04, 0xc7, 0x67, 0xcd, 0x52, 0xff, 0xac, 0x59, 0x29, 0xee, 0x7f, 0x9f, 0x35, 0x9b, - 0x93, 0xf5, 0x45, 0x58, 0x96, 0x6c, 0xd7, 0x4b, 0xf8, 0x87, 0xf3, 0xbf, 0x42, 0xf6, 0x48, 0x40, - 0x3f, 0x9d, 0x37, 0xd7, 0x67, 0xe9, 0x00, 0x7a, 0x9e, 0x92, 0x90, 0x7b, 0xbc, 0x87, 0x07, 0xb9, - 0x34, 0x3a, 0x70, 0x69, 0x24, 0x48, 0x6d, 0x05, 0xce, 0x75, 0x68, 0xaf, 0x0e, 0xd6, 0x40, 0x6b, - 0x11, 0x8b, 0x4f, 0xed, 0x3e, 0x5c, 0xe8, 0x12, 0x3f, 0xa5, 0xf5, 0xf2, 0x1a, 0x68, 0x55, 0x37, - 0x91, 0x92, 0xf7, 0xc0, 0x0b, 0x45, 0x1d, 0x37, 0x2b, 0xc4, 0xa4, 0x57, 0x4e, 0xbe, 0x53, 0xde, - 0x06, 0xc6, 0x37, 0x00, 0x6b, 0x38, 0xaf, 0xfa, 0x3d, 0x9f, 0x24, 0x89, 0xf6, 0x1a, 0x56, 0x44, - 0x9f, 0x1d, 0xc2, 0x49, 0xe6, 0x38, 0x5a, 0xd5, 0x09, 0xf5, 0x04, 0x09, 0x34, 0xea, 0x6e, 0xa0, - 0xfd, 0xa3, 0xb7, 0xd4, 0xe6, 0x4f, 0x29, 0x27, 0x96, 0x26, 0x8b, 0x0a, 0x87, 0x77, 0x78, 0xa0, - 0xaa, 0xed, 0xc2, 0xf9, 0x24, 0xa2, 0xb6, 0x8c, 0xfd, 0xe6, 0xf4, 0x9e, 0xa9, 0x71, 0x1d, 0x44, - 0xd4, 0xb6, 0x6a, 0x52, 0x77, 0x5e, 0x9c, 0x70, 0xa6, 0x62, 0x7c, 0x05, 0x70, 0x45, 0x05, 0x8a, - 0x06, 0x69, 0xaf, 0x26, 0x92, 0x40, 0xb3, 0x25, 0x21, 0xd8, 0x59, 0x0a, 0x2b, 0xc5, 0x5c, 0x14, - 0x37, 0x4a, 0x02, 0x4f, 0xe0, 0x82, 0xc7, 0x69, 0x90, 0xd4, 0xcb, 0xd9, 0xd4, 0xdd, 0x98, 0x2d, - 0x03, 0x6b, 0x49, 0x4a, 0x2e, 0x3c, 0x16, 0x64, 0x9c, 0x6b, 0x18, 0xbf, 0xc6, 0xe2, 0x17, 0xa9, - 0x69, 0x3b, 0x70, 0x59, 0xae, 0xc2, 0x23, 0x12, 0x3a, 0x3e, 0x8d, 0xf3, 0xe6, 0x5b, 0xd7, 0xa4, - 0xc4, 0x32, 0x1e, 0x79, 0xc5, 0x63, 0x68, 0x6d, 0x17, 0x56, 0x98, 0x1c, 0x78, 0x59, 0x66, 0xe3, - 0xea, 0xd5, 0xb0, 0x6a, 0x22, 0xdf, 0xe2, 0x84, 0x07, 0x0a, 0xda, 0x21, 0x84, 0x62, 0x21, 0x9d, - 0xd4, 0xf7, 0x42, 0xb7, 0x3e, 0x97, 0xe9, 0x5d, 0x9f, 0xae, 0x77, 0x30, 0xc0, 0x5a, 0xcb, 0x62, - 0x08, 0x86, 0x67, 0xac, 0xe8, 0x18, 0x5f, 0xca, 0x50, 0x79, 0xd2, 0x22, 0x58, 0x13, 0x32, 0x07, - 0xd4, 0xa7, 0x36, 0x67, 0xb1, 0xdc, 0xe8, 0xad, 0x59, 0x6c, 0xd0, 0x9e, 0x42, 0xcc, 0xf7, 0x7a, - 0x55, 0x16, 0xaa, 0xa6, 0x3e, 0xe1, 0x11, 0x07, 0xed, 0x05, 0xac, 0x72, 0xe6, 0x8b, 0x1f, 0x18, - 0x8f, 0x85, 0x45, 0x33, 0x75, 0xd5, 0x50, 0x6c, 0xb6, 0x98, 0x8a, 0xc3, 0x01, 0xcc, 0xfa, 0x5f, - 0x0a, 0x57, 0x87, 0x77, 0x09, 0x56, 0x75, 0x1a, 0x77, 0xe1, 0x7f, 0x13, 0xf1, 0x5c, 0xb2, 0xc2, - 0xab, 0xea, 0x0a, 0x2f, 0x2a, 0x2b, 0x69, 0xed, 0x1c, 0x5f, 0xe8, 0xa5, 0x93, 0x0b, 0xbd, 0x74, - 0x7a, 0xa1, 0x97, 0xde, 0xf7, 0x75, 0x70, 0xdc, 0xd7, 0xc1, 0x49, 0x5f, 0x07, 0xa7, 0x7d, 0x1d, - 0xfc, 0xe8, 0xeb, 0xe0, 0xf3, 0x4f, 0xbd, 0xf4, 0xb2, 0x3e, 0xed, 0x7f, 0xe7, 0x4f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xa7, 0x9b, 0x7f, 0x45, 0x92, 0x06, 0x00, 0x00, -} +func (m *Scheduling) Reset() { *m = Scheduling{} } func (m *Overhead) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -274,7 +70,7 @@ func (m *Overhead) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.PodFixed { keysForPodFixed = append(keysForPodFixed, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForPodFixed) + sort.Strings(keysForPodFixed) for iNdEx := len(keysForPodFixed) - 1; iNdEx >= 0; iNdEx-- { v := m.PodFixed[k8s_io_api_core_v1.ResourceName(keysForPodFixed[iNdEx])] baseI := i @@ -482,7 +278,7 @@ func (m *Scheduling) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.NodeSelector { keysForNodeSelector = append(keysForNodeSelector, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector) + sort.Strings(keysForNodeSelector) for iNdEx := len(keysForNodeSelector) - 1; iNdEx >= 0; iNdEx-- { v := m.NodeSelector[string(keysForNodeSelector[iNdEx])] baseI := i @@ -619,7 +415,7 @@ func (this *Overhead) String() string { for k := range this.PodFixed { keysForPodFixed = append(keysForPodFixed, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForPodFixed) + sort.Strings(keysForPodFixed) mapStringForPodFixed := "k8s_io_api_core_v1.ResourceList{" for _, k := range keysForPodFixed { mapStringForPodFixed += fmt.Sprintf("%v: %v,", k, this.PodFixed[k8s_io_api_core_v1.ResourceName(k)]) @@ -683,7 +479,7 @@ func (this *Scheduling) String() string { for k := range this.NodeSelector { keysForNodeSelector = append(keysForNodeSelector, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector) + sort.Strings(keysForNodeSelector) mapStringForNodeSelector := "map[string]string{" for _, k := range keysForNodeSelector { mapStringForNodeSelector += fmt.Sprintf("%v: %v,", k, this.NodeSelector[k]) diff --git a/staging/src/k8s.io/api/node/v1alpha1/generated.protomessage.pb.go b/staging/src/k8s.io/api/node/v1alpha1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..acd3b604ee370 --- /dev/null +++ b/staging/src/k8s.io/api/node/v1alpha1/generated.protomessage.pb.go @@ -0,0 +1,32 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1alpha1 + +func (*Overhead) ProtoMessage() {} + +func (*RuntimeClass) ProtoMessage() {} + +func (*RuntimeClassList) ProtoMessage() {} + +func (*RuntimeClassSpec) ProtoMessage() {} + +func (*Scheduling) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/node/v1alpha1/zz_generated.model_name.go b/staging/src/k8s.io/api/node/v1alpha1/zz_generated.model_name.go new file mode 100644 index 0000000000000..444825deff1a3 --- /dev/null +++ b/staging/src/k8s.io/api/node/v1alpha1/zz_generated.model_name.go @@ -0,0 +1,47 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1alpha1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Overhead) OpenAPIModelName() string { + return "io.k8s.api.node.v1alpha1.Overhead" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RuntimeClass) OpenAPIModelName() string { + return "io.k8s.api.node.v1alpha1.RuntimeClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RuntimeClassList) OpenAPIModelName() string { + return "io.k8s.api.node.v1alpha1.RuntimeClassList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RuntimeClassSpec) OpenAPIModelName() string { + return "io.k8s.api.node.v1alpha1.RuntimeClassSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Scheduling) OpenAPIModelName() string { + return "io.k8s.api.node.v1alpha1.Scheduling" +} diff --git a/staging/src/k8s.io/api/node/v1beta1/doc.go b/staging/src/k8s.io/api/node/v1beta1/doc.go index 7b47c8df6661b..2cf0f4a124e4d 100644 --- a/staging/src/k8s.io/api/node/v1beta1/doc.go +++ b/staging/src/k8s.io/api/node/v1beta1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.node.v1beta1 // +groupName=node.k8s.io diff --git a/staging/src/k8s.io/api/node/v1beta1/generated.pb.go b/staging/src/k8s.io/api/node/v1beta1/generated.pb.go index 537961c259a9f..c97b8fc059190 100644 --- a/staging/src/k8s.io/api/node/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/node/v1beta1/generated.pb.go @@ -23,200 +23,25 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" k8s_io_api_core_v1 "k8s.io/api/core/v1" v11 "k8s.io/api/core/v1" k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource" resource "k8s.io/apimachinery/pkg/api/resource" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *Overhead) Reset() { *m = Overhead{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *RuntimeClass) Reset() { *m = RuntimeClass{} } -func (m *Overhead) Reset() { *m = Overhead{} } -func (*Overhead) ProtoMessage() {} -func (*Overhead) Descriptor() ([]byte, []int) { - return fileDescriptor_73bb62abe8438af4, []int{0} -} -func (m *Overhead) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Overhead) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Overhead) XXX_Merge(src proto.Message) { - xxx_messageInfo_Overhead.Merge(m, src) -} -func (m *Overhead) XXX_Size() int { - return m.Size() -} -func (m *Overhead) XXX_DiscardUnknown() { - xxx_messageInfo_Overhead.DiscardUnknown(m) -} - -var xxx_messageInfo_Overhead proto.InternalMessageInfo - -func (m *RuntimeClass) Reset() { *m = RuntimeClass{} } -func (*RuntimeClass) ProtoMessage() {} -func (*RuntimeClass) Descriptor() ([]byte, []int) { - return fileDescriptor_73bb62abe8438af4, []int{1} -} -func (m *RuntimeClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RuntimeClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RuntimeClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_RuntimeClass.Merge(m, src) -} -func (m *RuntimeClass) XXX_Size() int { - return m.Size() -} -func (m *RuntimeClass) XXX_DiscardUnknown() { - xxx_messageInfo_RuntimeClass.DiscardUnknown(m) -} - -var xxx_messageInfo_RuntimeClass proto.InternalMessageInfo - -func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} } -func (*RuntimeClassList) ProtoMessage() {} -func (*RuntimeClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_73bb62abe8438af4, []int{2} -} -func (m *RuntimeClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RuntimeClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RuntimeClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_RuntimeClassList.Merge(m, src) -} -func (m *RuntimeClassList) XXX_Size() int { - return m.Size() -} -func (m *RuntimeClassList) XXX_DiscardUnknown() { - xxx_messageInfo_RuntimeClassList.DiscardUnknown(m) -} - -var xxx_messageInfo_RuntimeClassList proto.InternalMessageInfo - -func (m *Scheduling) Reset() { *m = Scheduling{} } -func (*Scheduling) ProtoMessage() {} -func (*Scheduling) Descriptor() ([]byte, []int) { - return fileDescriptor_73bb62abe8438af4, []int{3} -} -func (m *Scheduling) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Scheduling) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Scheduling) XXX_Merge(src proto.Message) { - xxx_messageInfo_Scheduling.Merge(m, src) -} -func (m *Scheduling) XXX_Size() int { - return m.Size() -} -func (m *Scheduling) XXX_DiscardUnknown() { - xxx_messageInfo_Scheduling.DiscardUnknown(m) -} +func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} } -var xxx_messageInfo_Scheduling proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Overhead)(nil), "k8s.io.api.node.v1beta1.Overhead") - proto.RegisterMapType((k8s_io_api_core_v1.ResourceList)(nil), "k8s.io.api.node.v1beta1.Overhead.PodFixedEntry") - proto.RegisterType((*RuntimeClass)(nil), "k8s.io.api.node.v1beta1.RuntimeClass") - proto.RegisterType((*RuntimeClassList)(nil), "k8s.io.api.node.v1beta1.RuntimeClassList") - proto.RegisterType((*Scheduling)(nil), "k8s.io.api.node.v1beta1.Scheduling") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.node.v1beta1.Scheduling.NodeSelectorEntry") -} - -func init() { - proto.RegisterFile("k8s.io/api/node/v1beta1/generated.proto", fileDescriptor_73bb62abe8438af4) -} - -var fileDescriptor_73bb62abe8438af4 = []byte{ - // 654 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xbb, 0x6f, 0x13, 0x31, - 0x18, 0x8f, 0x53, 0xaa, 0xa6, 0x4e, 0x0a, 0xc5, 0x54, 0x6a, 0x94, 0xe1, 0x52, 0x82, 0x10, 0x65, - 0xa8, 0x8f, 0x56, 0x80, 0x2a, 0x24, 0x84, 0x74, 0x3c, 0xc4, 0xb3, 0x85, 0x2b, 0x2c, 0x88, 0x01, - 0xe7, 0xce, 0x5c, 0x4c, 0x72, 0xe7, 0xe8, 0xce, 0x17, 0x91, 0x0d, 0xb1, 0x20, 0x31, 0xb1, 0xf0, - 0xdf, 0xc0, 0xde, 0x8d, 0x2e, 0x48, 0x9d, 0x5a, 0x1a, 0xfe, 0x0b, 0x26, 0x64, 0xdf, 0x23, 0x6e, - 0xd3, 0xb4, 0x61, 0x8b, 0x7d, 0xbf, 0xc7, 0xf7, 0xfd, 0x3e, 0x7f, 0x81, 0x57, 0xda, 0xeb, 0x11, - 0x66, 0xdc, 0x24, 0x5d, 0x66, 0x06, 0xdc, 0xa5, 0x66, 0x6f, 0xb5, 0x49, 0x05, 0x59, 0x35, 0x3d, - 0x1a, 0xd0, 0x90, 0x08, 0xea, 0xe2, 0x6e, 0xc8, 0x05, 0x47, 0x8b, 0x09, 0x10, 0x93, 0x2e, 0xc3, - 0x12, 0x88, 0x53, 0x60, 0x6d, 0xc5, 0x63, 0xa2, 0x15, 0x37, 0xb1, 0xc3, 0x7d, 0xd3, 0xe3, 0x1e, - 0x37, 0x15, 0xbe, 0x19, 0xbf, 0x53, 0x27, 0x75, 0x50, 0xbf, 0x12, 0x9d, 0x5a, 0x43, 0x33, 0x74, - 0x78, 0x28, 0x0d, 0x8f, 0x7a, 0xd5, 0xae, 0x0f, 0x31, 0x3e, 0x71, 0x5a, 0x2c, 0xa0, 0x61, 0xdf, - 0xec, 0xb6, 0x3d, 0x45, 0x0a, 0x69, 0xc4, 0xe3, 0xd0, 0xa1, 0xff, 0xc5, 0x8a, 0x4c, 0x9f, 0x0a, - 0x72, 0x9c, 0x97, 0x39, 0x8e, 0x15, 0xc6, 0x81, 0x60, 0xfe, 0xa8, 0xcd, 0xcd, 0xd3, 0x08, 0x91, - 0xd3, 0xa2, 0x3e, 0x39, 0xca, 0x6b, 0xfc, 0x2c, 0xc2, 0xd2, 0x66, 0x8f, 0x86, 0x2d, 0x4a, 0x5c, - 0xf4, 0x0b, 0xc0, 0x52, 0x97, 0xbb, 0x0f, 0xd8, 0x07, 0xea, 0x56, 0xc1, 0xd2, 0xd4, 0x72, 0x79, - 0xcd, 0xc4, 0x63, 0x12, 0xc6, 0x19, 0x0b, 0x3f, 0x4f, 0x19, 0xf7, 0x03, 0x11, 0xf6, 0xad, 0xcf, - 0x60, 0x7b, 0xaf, 0x5e, 0x18, 0xec, 0xd5, 0x4b, 0xd9, 0xfd, 0xdf, 0xbd, 0x7a, 0x7d, 0x34, 0x5e, - 0x6c, 0xa7, 0x89, 0x3d, 0x65, 0x91, 0xf8, 0xb4, 0x7f, 0x22, 0x64, 0x83, 0xf8, 0xf4, 0xcb, 0x7e, - 0x7d, 0x65, 0x92, 0x01, 0xe0, 0x17, 0x31, 0x09, 0x04, 0x13, 0x7d, 0x3b, 0x6f, 0xa5, 0xd6, 0x86, - 0x73, 0x87, 0x8a, 0x44, 0xf3, 0x70, 0xaa, 0x4d, 0xfb, 0x55, 0xb0, 0x04, 0x96, 0x67, 0x6d, 0xf9, - 0x13, 0xdd, 0x83, 0xd3, 0x3d, 0xd2, 0x89, 0x69, 0xb5, 0xb8, 0x04, 0x96, 0xcb, 0x6b, 0x58, 0x6b, - 0x3b, 0xf7, 0xc2, 0xdd, 0xb6, 0xa7, 0x72, 0x18, 0xf5, 0x4a, 0xc8, 0xb7, 0x8a, 0xeb, 0xa0, 0xf1, - 0xa3, 0x08, 0x2b, 0x76, 0x12, 0xfa, 0xdd, 0x0e, 0x89, 0x22, 0xf4, 0x16, 0x96, 0xe4, 0x98, 0x5d, - 0x22, 0x88, 0x72, 0x2c, 0xaf, 0x5d, 0x3b, 0x49, 0x3d, 0xc2, 0x12, 0x8d, 0x7b, 0xab, 0x78, 0xb3, - 0xf9, 0x9e, 0x3a, 0xe2, 0x19, 0x15, 0xc4, 0x42, 0x69, 0xa8, 0x70, 0x78, 0x67, 0xe7, 0xaa, 0xe8, - 0x2a, 0x9c, 0x69, 0x91, 0xc0, 0xed, 0xd0, 0x50, 0x95, 0x3f, 0x6b, 0x9d, 0x4b, 0xe1, 0x33, 0x0f, - 0x93, 0x6b, 0x3b, 0xfb, 0x8e, 0x9e, 0xc0, 0x12, 0x4f, 0x07, 0x57, 0x9d, 0x52, 0xc5, 0x5c, 0x3c, - 0x75, 0xc2, 0x56, 0x45, 0x8e, 0x33, 0x3b, 0xd9, 0xb9, 0x00, 0xda, 0x82, 0x50, 0x3e, 0x2b, 0x37, - 0xee, 0xb0, 0xc0, 0xab, 0x9e, 0x51, 0x72, 0x97, 0xc6, 0xca, 0x6d, 0xe5, 0x50, 0xeb, 0xac, 0x6c, - 0x65, 0x78, 0xb6, 0x35, 0x99, 0xc6, 0x77, 0x00, 0xe7, 0xf5, 0xfc, 0xe4, 0xfb, 0x40, 0x6f, 0x46, - 0x32, 0xc4, 0x93, 0x65, 0x28, 0xd9, 0x2a, 0xc1, 0xf9, 0xec, 0x59, 0x66, 0x37, 0x5a, 0x7e, 0x8f, - 0xe1, 0x34, 0x13, 0xd4, 0x8f, 0xaa, 0x45, 0xf5, 0xe6, 0x2f, 0x8f, 0x6d, 0x41, 0xaf, 0xcb, 0x9a, - 0x4b, 0x15, 0xa7, 0x1f, 0x49, 0xae, 0x9d, 0x48, 0x34, 0xbe, 0x15, 0xa1, 0xd6, 0x19, 0xe2, 0xb0, - 0x22, 0x15, 0xb6, 0x68, 0x87, 0x3a, 0x82, 0x87, 0xe9, 0x56, 0xdd, 0x98, 0x20, 0x24, 0xbc, 0xa1, - 0xf1, 0x92, 0xdd, 0x5a, 0x48, 0x1d, 0x2b, 0xfa, 0x27, 0xfb, 0x90, 0x01, 0x7a, 0x05, 0xcb, 0x82, - 0x77, 0xe4, 0x8e, 0x33, 0x1e, 0x64, 0x1d, 0x19, 0xba, 0x9f, 0xdc, 0x2e, 0x19, 0xcd, 0xcb, 0x1c, - 0x66, 0x5d, 0x48, 0x85, 0xcb, 0xc3, 0xbb, 0xc8, 0xd6, 0x75, 0x6a, 0x77, 0xe0, 0xf9, 0x91, 0x7a, - 0x8e, 0x59, 0xa3, 0x05, 0x7d, 0x8d, 0x66, 0xb5, 0xb5, 0xb0, 0x6e, 0x6f, 0x1f, 0x18, 0x85, 0x9d, - 0x03, 0xa3, 0xb0, 0x7b, 0x60, 0x14, 0x3e, 0x0e, 0x0c, 0xb0, 0x3d, 0x30, 0xc0, 0xce, 0xc0, 0x00, - 0xbb, 0x03, 0x03, 0xfc, 0x1e, 0x18, 0xe0, 0xeb, 0x1f, 0xa3, 0xf0, 0x7a, 0x71, 0xcc, 0x1f, 0xff, - 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x67, 0x22, 0x03, 0x12, 0x06, 0x00, 0x00, -} +func (m *Scheduling) Reset() { *m = Scheduling{} } func (m *Overhead) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -243,7 +68,7 @@ func (m *Overhead) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.PodFixed { keysForPodFixed = append(keysForPodFixed, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForPodFixed) + sort.Strings(keysForPodFixed) for iNdEx := len(keysForPodFixed) - 1; iNdEx >= 0; iNdEx-- { v := m.PodFixed[k8s_io_api_core_v1.ResourceName(keysForPodFixed[iNdEx])] baseI := i @@ -418,7 +243,7 @@ func (m *Scheduling) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.NodeSelector { keysForNodeSelector = append(keysForNodeSelector, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector) + sort.Strings(keysForNodeSelector) for iNdEx := len(keysForNodeSelector) - 1; iNdEx >= 0; iNdEx-- { v := m.NodeSelector[string(keysForNodeSelector[iNdEx])] baseI := i @@ -544,7 +369,7 @@ func (this *Overhead) String() string { for k := range this.PodFixed { keysForPodFixed = append(keysForPodFixed, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForPodFixed) + sort.Strings(keysForPodFixed) mapStringForPodFixed := "k8s_io_api_core_v1.ResourceList{" for _, k := range keysForPodFixed { mapStringForPodFixed += fmt.Sprintf("%v: %v,", k, this.PodFixed[k8s_io_api_core_v1.ResourceName(k)]) @@ -598,7 +423,7 @@ func (this *Scheduling) String() string { for k := range this.NodeSelector { keysForNodeSelector = append(keysForNodeSelector, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector) + sort.Strings(keysForNodeSelector) mapStringForNodeSelector := "map[string]string{" for _, k := range keysForNodeSelector { mapStringForNodeSelector += fmt.Sprintf("%v: %v,", k, this.NodeSelector[k]) diff --git a/staging/src/k8s.io/api/node/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/node/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..dfe8e29d95492 --- /dev/null +++ b/staging/src/k8s.io/api/node/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,30 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*Overhead) ProtoMessage() {} + +func (*RuntimeClass) ProtoMessage() {} + +func (*RuntimeClassList) ProtoMessage() {} + +func (*Scheduling) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/node/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/node/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..06d7c803e5378 --- /dev/null +++ b/staging/src/k8s.io/api/node/v1beta1/zz_generated.model_name.go @@ -0,0 +1,42 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Overhead) OpenAPIModelName() string { + return "io.k8s.api.node.v1beta1.Overhead" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RuntimeClass) OpenAPIModelName() string { + return "io.k8s.api.node.v1beta1.RuntimeClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RuntimeClassList) OpenAPIModelName() string { + return "io.k8s.api.node.v1beta1.RuntimeClassList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Scheduling) OpenAPIModelName() string { + return "io.k8s.api.node.v1beta1.Scheduling" +} diff --git a/staging/src/k8s.io/api/openapi_models_test.go b/staging/src/k8s.io/api/openapi_models_test.go new file mode 100644 index 0000000000000..aeeae938927ce --- /dev/null +++ b/staging/src/k8s.io/api/openapi_models_test.go @@ -0,0 +1,77 @@ +/* +Copyright 2025 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 api + +import ( + "reflect" + "strings" + "testing" + + "k8s.io/apimachinery/pkg/runtime" +) + +func TestOpenAPIDefinitionNames(t *testing.T) { + scheme := runtime.NewScheme() + for _, builder := range groups { + if err := builder.AddToScheme(scheme); err != nil { + t.Fatalf("unexpected error adding to scheme: %v", err) + } + } + + kinds := scheme.AllKnownTypes() + for gvk := range kinds { + if gvk.Version == runtime.APIVersionInternal { + continue + } + t.Run(gvk.String(), func(t *testing.T) { + example, err := scheme.New(gvk) + if err != nil { + t.Fatalf("unexpected error creating example: %v", err) + } + + namer, ok := example.(OpenAPIModelNamer) + if !ok { + t.Fatalf("type %v does not implement OpenAPICanonicalTypeName\n", gvk) + } + lookupName := namer.OpenAPIModelName() + + rtype := reflect.TypeOf(example).Elem() + reflectName := ToRESTFriendlyName(rtype.PkgPath() + "." + rtype.Name()) + + if lookupName != reflectName { + t.Errorf("expected %v, got %v", reflectName, lookupName) + } + }) + } +} + +type OpenAPIModelNamer interface { + OpenAPIModelName() string +} + +func ToRESTFriendlyName(name string) string { + nameParts := strings.Split(name, "/") + // Reverse first part. e.g., io.k8s... instead of k8s.io... + if len(nameParts) > 0 && strings.Contains(nameParts[0], ".") { + parts := strings.Split(nameParts[0], ".") + for i, j := 0, len(parts)-1; i < j; i, j = i+1, j-1 { + parts[i], parts[j] = parts[j], parts[i] + } + nameParts[0] = strings.Join(parts, ".") + } + return strings.Join(nameParts, ".") +} diff --git a/staging/src/k8s.io/api/policy/v1/doc.go b/staging/src/k8s.io/api/policy/v1/doc.go index ff47e7fd49233..9b5314bc0bdcd 100644 --- a/staging/src/k8s.io/api/policy/v1/doc.go +++ b/staging/src/k8s.io/api/policy/v1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.policy.v1 // Package policy is for any kind of policy object. Suitable examples, even if // they aren't all here, are PodDisruptionBudget, diff --git a/staging/src/k8s.io/api/policy/v1/generated.pb.go b/staging/src/k8s.io/api/policy/v1/generated.pb.go index dd61b7266c47d..1d3e0e339e07d 100644 --- a/staging/src/k8s.io/api/policy/v1/generated.pb.go +++ b/staging/src/k8s.io/api/policy/v1/generated.pb.go @@ -23,12 +23,10 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -36,226 +34,15 @@ import ( intstr "k8s.io/apimachinery/pkg/util/intstr" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *Eviction) Reset() { *m = Eviction{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} } -func (m *Eviction) Reset() { *m = Eviction{} } -func (*Eviction) ProtoMessage() {} -func (*Eviction) Descriptor() ([]byte, []int) { - return fileDescriptor_204bc6fa48ff56f7, []int{0} -} -func (m *Eviction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Eviction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Eviction) XXX_Merge(src proto.Message) { - xxx_messageInfo_Eviction.Merge(m, src) -} -func (m *Eviction) XXX_Size() int { - return m.Size() -} -func (m *Eviction) XXX_DiscardUnknown() { - xxx_messageInfo_Eviction.DiscardUnknown(m) -} - -var xxx_messageInfo_Eviction proto.InternalMessageInfo - -func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} } -func (*PodDisruptionBudget) ProtoMessage() {} -func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { - return fileDescriptor_204bc6fa48ff56f7, []int{1} -} -func (m *PodDisruptionBudget) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodDisruptionBudget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodDisruptionBudget) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodDisruptionBudget.Merge(m, src) -} -func (m *PodDisruptionBudget) XXX_Size() int { - return m.Size() -} -func (m *PodDisruptionBudget) XXX_DiscardUnknown() { - xxx_messageInfo_PodDisruptionBudget.DiscardUnknown(m) -} - -var xxx_messageInfo_PodDisruptionBudget proto.InternalMessageInfo - -func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } -func (*PodDisruptionBudgetList) ProtoMessage() {} -func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { - return fileDescriptor_204bc6fa48ff56f7, []int{2} -} -func (m *PodDisruptionBudgetList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodDisruptionBudgetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodDisruptionBudgetList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodDisruptionBudgetList.Merge(m, src) -} -func (m *PodDisruptionBudgetList) XXX_Size() int { - return m.Size() -} -func (m *PodDisruptionBudgetList) XXX_DiscardUnknown() { - xxx_messageInfo_PodDisruptionBudgetList.DiscardUnknown(m) -} +func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } -var xxx_messageInfo_PodDisruptionBudgetList proto.InternalMessageInfo +func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } -func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } -func (*PodDisruptionBudgetSpec) ProtoMessage() {} -func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_204bc6fa48ff56f7, []int{3} -} -func (m *PodDisruptionBudgetSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodDisruptionBudgetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodDisruptionBudgetSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodDisruptionBudgetSpec.Merge(m, src) -} -func (m *PodDisruptionBudgetSpec) XXX_Size() int { - return m.Size() -} -func (m *PodDisruptionBudgetSpec) XXX_DiscardUnknown() { - xxx_messageInfo_PodDisruptionBudgetSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_PodDisruptionBudgetSpec proto.InternalMessageInfo - -func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} } -func (*PodDisruptionBudgetStatus) ProtoMessage() {} -func (*PodDisruptionBudgetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_204bc6fa48ff56f7, []int{4} -} -func (m *PodDisruptionBudgetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodDisruptionBudgetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodDisruptionBudgetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodDisruptionBudgetStatus.Merge(m, src) -} -func (m *PodDisruptionBudgetStatus) XXX_Size() int { - return m.Size() -} -func (m *PodDisruptionBudgetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PodDisruptionBudgetStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PodDisruptionBudgetStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Eviction)(nil), "k8s.io.api.policy.v1.Eviction") - proto.RegisterType((*PodDisruptionBudget)(nil), "k8s.io.api.policy.v1.PodDisruptionBudget") - proto.RegisterType((*PodDisruptionBudgetList)(nil), "k8s.io.api.policy.v1.PodDisruptionBudgetList") - proto.RegisterType((*PodDisruptionBudgetSpec)(nil), "k8s.io.api.policy.v1.PodDisruptionBudgetSpec") - proto.RegisterType((*PodDisruptionBudgetStatus)(nil), "k8s.io.api.policy.v1.PodDisruptionBudgetStatus") - proto.RegisterMapType((map[string]v1.Time)(nil), "k8s.io.api.policy.v1.PodDisruptionBudgetStatus.DisruptedPodsEntry") -} - -func init() { - proto.RegisterFile("k8s.io/api/policy/v1/generated.proto", fileDescriptor_204bc6fa48ff56f7) -} - -var fileDescriptor_204bc6fa48ff56f7 = []byte{ - // 840 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4d, 0x8f, 0xdb, 0x44, - 0x18, 0xc7, 0xe3, 0xcd, 0x66, 0xd9, 0x4e, 0x93, 0x68, 0x19, 0x16, 0x58, 0x72, 0x70, 0xaa, 0x88, - 0xc3, 0x82, 0xd4, 0x31, 0xdb, 0x22, 0xb4, 0xea, 0x01, 0xb5, 0x6e, 0x56, 0x50, 0xd4, 0x25, 0xab, - 0xd9, 0x56, 0x48, 0x08, 0x24, 0x26, 0xf6, 0xd3, 0x64, 0x58, 0xdb, 0x63, 0x79, 0xc6, 0xa1, 0x39, - 0xd1, 0x8f, 0xc0, 0x57, 0xe0, 0xa3, 0x70, 0x62, 0x8f, 0xe5, 0x56, 0x71, 0x88, 0x58, 0xf3, 0x2d, - 0x38, 0x21, 0x8f, 0x9d, 0x17, 0x27, 0x0e, 0xcd, 0x72, 0xe8, 0xcd, 0xf3, 0xcc, 0xf3, 0xff, 0x3d, - 0xf3, 0xbc, 0xcc, 0x24, 0xe8, 0xc3, 0x8b, 0x63, 0x49, 0xb8, 0xb0, 0x58, 0xc8, 0xad, 0x50, 0x78, - 0xdc, 0x19, 0x5b, 0xa3, 0x23, 0x6b, 0x00, 0x01, 0x44, 0x4c, 0x81, 0x4b, 0xc2, 0x48, 0x28, 0x81, - 0xf7, 0x33, 0x2f, 0xc2, 0x42, 0x4e, 0x32, 0x2f, 0x32, 0x3a, 0x6a, 0xdd, 0x1e, 0x70, 0x35, 0x8c, - 0xfb, 0xc4, 0x11, 0xbe, 0x35, 0x10, 0x03, 0x61, 0x69, 0xe7, 0x7e, 0xfc, 0x4c, 0xaf, 0xf4, 0x42, - 0x7f, 0x65, 0x90, 0xd6, 0xa7, 0xf3, 0x50, 0x3e, 0x73, 0x86, 0x3c, 0x80, 0x68, 0x6c, 0x85, 0x17, - 0x83, 0xd4, 0x20, 0x2d, 0x1f, 0x14, 0x2b, 0x09, 0xdd, 0xb2, 0xd6, 0xa9, 0xa2, 0x38, 0x50, 0xdc, - 0x87, 0x15, 0xc1, 0x67, 0xaf, 0x13, 0x48, 0x67, 0x08, 0x3e, 0x5b, 0xd1, 0xdd, 0x5d, 0xa7, 0x8b, - 0x15, 0xf7, 0x2c, 0x1e, 0x28, 0xa9, 0xa2, 0x65, 0x51, 0xe7, 0x4f, 0x03, 0xed, 0x9e, 0x8c, 0xb8, - 0xa3, 0xb8, 0x08, 0xf0, 0x0f, 0x68, 0x37, 0xcd, 0xc2, 0x65, 0x8a, 0x1d, 0x18, 0xb7, 0x8c, 0xc3, - 0x9b, 0x77, 0x3e, 0x21, 0xf3, 0xc2, 0xcd, 0xa0, 0x24, 0xbc, 0x18, 0xa4, 0x06, 0x49, 0x52, 0x6f, - 0x32, 0x3a, 0x22, 0xbd, 0xfe, 0x8f, 0xe0, 0xa8, 0x53, 0x50, 0xcc, 0xc6, 0x97, 0x93, 0x76, 0x25, - 0x99, 0xb4, 0xd1, 0xdc, 0x46, 0x67, 0x54, 0xec, 0xa1, 0x86, 0x0b, 0x1e, 0x28, 0xe8, 0x85, 0x69, - 0x44, 0x79, 0xb0, 0xa5, 0xc3, 0xdc, 0xdd, 0x2c, 0x4c, 0x77, 0x51, 0x6a, 0xbf, 0x9d, 0x4c, 0xda, - 0x8d, 0x82, 0x89, 0x16, 0xe1, 0x9d, 0x5f, 0xb7, 0xd0, 0x3b, 0x67, 0xc2, 0xed, 0x72, 0x19, 0xc5, - 0xda, 0x64, 0xc7, 0xee, 0x00, 0xd4, 0x1b, 0xc8, 0xb3, 0x87, 0xb6, 0x65, 0x08, 0x4e, 0x9e, 0xde, - 0x6d, 0x52, 0x36, 0x7e, 0xa4, 0xe4, 0x68, 0xe7, 0x21, 0x38, 0x76, 0x3d, 0x47, 0x6f, 0xa7, 0x2b, - 0xaa, 0x41, 0xf8, 0x1b, 0xb4, 0x23, 0x15, 0x53, 0xb1, 0x3c, 0xa8, 0x6a, 0xa4, 0xb5, 0x39, 0x52, - 0xcb, 0xec, 0x66, 0x0e, 0xdd, 0xc9, 0xd6, 0x34, 0xc7, 0x75, 0x7e, 0x37, 0xd0, 0xfb, 0x25, 0xaa, - 0xc7, 0x5c, 0x2a, 0xfc, 0xdd, 0x4a, 0x9d, 0xc8, 0x66, 0x75, 0x4a, 0xd5, 0xba, 0x4a, 0x7b, 0x79, - 0xd4, 0xdd, 0xa9, 0x65, 0xa1, 0x46, 0x5f, 0xa3, 0x1a, 0x57, 0xe0, 0xa7, 0x33, 0x50, 0x3d, 0xbc, - 0x79, 0xe7, 0xa3, 0x8d, 0x33, 0xb2, 0x1b, 0x39, 0xb5, 0xf6, 0x28, 0xd5, 0xd3, 0x0c, 0xd3, 0xf9, - 0xa3, 0x5a, 0x9a, 0x49, 0x5a, 0x44, 0xfc, 0x0c, 0xd5, 0x7d, 0x1e, 0x3c, 0x18, 0x31, 0xee, 0xb1, - 0xbe, 0x07, 0xaf, 0xed, 0x7a, 0x7a, 0x65, 0x48, 0x76, 0x65, 0xc8, 0xa3, 0x40, 0xf5, 0xa2, 0x73, - 0x15, 0xf1, 0x60, 0x60, 0xef, 0x25, 0x93, 0x76, 0xfd, 0x74, 0x81, 0x44, 0x0b, 0x5c, 0xfc, 0x3d, - 0xda, 0x95, 0xe0, 0x81, 0xa3, 0x44, 0x74, 0xbd, 0xd1, 0x7e, 0xcc, 0xfa, 0xe0, 0x9d, 0xe7, 0x52, - 0xbb, 0x9e, 0x96, 0x6c, 0xba, 0xa2, 0x33, 0x24, 0xf6, 0x50, 0xd3, 0x67, 0xcf, 0x9f, 0x06, 0x6c, - 0x96, 0x48, 0xf5, 0x7f, 0x26, 0x82, 0x93, 0x49, 0xbb, 0x79, 0x5a, 0x60, 0xd1, 0x25, 0x36, 0x7e, - 0x61, 0xa0, 0x56, 0x1c, 0x0c, 0x81, 0x79, 0x6a, 0x38, 0x3e, 0x13, 0xee, 0xf4, 0x9d, 0x38, 0xd3, - 0xcd, 0x39, 0xd8, 0xbe, 0x65, 0x1c, 0xde, 0xb0, 0xef, 0x27, 0x93, 0x76, 0xeb, 0xe9, 0x5a, 0xaf, - 0x7f, 0x26, 0x6d, 0x73, 0xfd, 0xee, 0x93, 0x71, 0x08, 0xf4, 0x3f, 0x62, 0x74, 0x7e, 0xab, 0xa1, - 0x0f, 0xd6, 0xce, 0x34, 0xfe, 0x0a, 0x61, 0xd1, 0x97, 0x10, 0x8d, 0xc0, 0xfd, 0x22, 0x7b, 0xd7, - 0xb8, 0x08, 0x74, 0x6f, 0xab, 0x76, 0x2b, 0x9f, 0x11, 0xdc, 0x5b, 0xf1, 0xa0, 0x25, 0x2a, 0xfc, - 0x33, 0x6a, 0xb8, 0x59, 0x14, 0x70, 0xcf, 0x84, 0x3b, 0x9d, 0x4a, 0xfb, 0x9a, 0xf7, 0x8c, 0x74, - 0x17, 0x21, 0x27, 0x81, 0x8a, 0xc6, 0xf6, 0xbb, 0xf9, 0x51, 0x1a, 0x85, 0x3d, 0x5a, 0x8c, 0x97, - 0x26, 0xe3, 0xce, 0x90, 0xf2, 0x81, 0xe7, 0x89, 0x9f, 0xc0, 0xd5, 0xfd, 0xad, 0xcd, 0x93, 0xe9, - 0xae, 0x78, 0xd0, 0x12, 0x15, 0xfe, 0x1c, 0x35, 0x9d, 0x38, 0x8a, 0x20, 0x50, 0x5f, 0x66, 0x95, - 0xd5, 0xcd, 0xaa, 0xd9, 0xef, 0xe5, 0x9c, 0xe6, 0xc3, 0xc2, 0x2e, 0x5d, 0xf2, 0x4e, 0xf5, 0x2e, - 0x48, 0x1e, 0x81, 0x3b, 0xd5, 0xd7, 0x8a, 0xfa, 0x6e, 0x61, 0x97, 0x2e, 0x79, 0xe3, 0x63, 0x54, - 0x87, 0xe7, 0x21, 0x38, 0xd3, 0x5a, 0xee, 0x68, 0xf5, 0x7e, 0xae, 0xae, 0x9f, 0x2c, 0xec, 0xd1, - 0x82, 0x27, 0x76, 0x10, 0x72, 0x44, 0xe0, 0xf2, 0xec, 0xd7, 0xe1, 0x2d, 0xdd, 0x03, 0x6b, 0xb3, - 0x2b, 0xf4, 0x70, 0xaa, 0x9b, 0xbf, 0xcd, 0x33, 0x93, 0xa4, 0x0b, 0xd8, 0x96, 0x87, 0xf0, 0x6a, - 0x9b, 0xf0, 0x1e, 0xaa, 0x5e, 0xc0, 0x58, 0x8f, 0xcf, 0x0d, 0x9a, 0x7e, 0xe2, 0xfb, 0xa8, 0x36, - 0x62, 0x5e, 0x0c, 0xf9, 0x55, 0xfe, 0x78, 0xb3, 0x73, 0x3c, 0xe1, 0x3e, 0xd0, 0x4c, 0x78, 0x6f, - 0xeb, 0xd8, 0xb0, 0xef, 0x5d, 0x5e, 0x99, 0x95, 0x97, 0x57, 0x66, 0xe5, 0xd5, 0x95, 0x59, 0x79, - 0x91, 0x98, 0xc6, 0x65, 0x62, 0x1a, 0x2f, 0x13, 0xd3, 0x78, 0x95, 0x98, 0xc6, 0x5f, 0x89, 0x69, - 0xfc, 0xf2, 0xb7, 0x59, 0xf9, 0x76, 0xbf, 0xec, 0x7f, 0xcc, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x0f, 0x42, 0xd2, 0x33, 0xde, 0x08, 0x00, 0x00, -} +func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} } func (m *Eviction) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -519,7 +306,7 @@ func (m *PodDisruptionBudgetStatus) MarshalToSizedBuffer(dAtA []byte) (int, erro for k := range m.DisruptedPods { keysForDisruptedPods = append(keysForDisruptedPods, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods) + sort.Strings(keysForDisruptedPods) for iNdEx := len(keysForDisruptedPods) - 1; iNdEx >= 0; iNdEx-- { v := m.DisruptedPods[string(keysForDisruptedPods[iNdEx])] baseI := i @@ -732,7 +519,7 @@ func (this *PodDisruptionBudgetStatus) String() string { for k := range this.DisruptedPods { keysForDisruptedPods = append(keysForDisruptedPods, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods) + sort.Strings(keysForDisruptedPods) mapStringForDisruptedPods := "map[string]v1.Time{" for _, k := range keysForDisruptedPods { mapStringForDisruptedPods += fmt.Sprintf("%v: %v,", k, this.DisruptedPods[k]) diff --git a/staging/src/k8s.io/api/policy/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/policy/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..2ede21763990b --- /dev/null +++ b/staging/src/k8s.io/api/policy/v1/generated.protomessage.pb.go @@ -0,0 +1,32 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*Eviction) ProtoMessage() {} + +func (*PodDisruptionBudget) ProtoMessage() {} + +func (*PodDisruptionBudgetList) ProtoMessage() {} + +func (*PodDisruptionBudgetSpec) ProtoMessage() {} + +func (*PodDisruptionBudgetStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/policy/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/policy/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..238348e58fb3c --- /dev/null +++ b/staging/src/k8s.io/api/policy/v1/zz_generated.model_name.go @@ -0,0 +1,47 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Eviction) OpenAPIModelName() string { + return "io.k8s.api.policy.v1.Eviction" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodDisruptionBudget) OpenAPIModelName() string { + return "io.k8s.api.policy.v1.PodDisruptionBudget" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodDisruptionBudgetList) OpenAPIModelName() string { + return "io.k8s.api.policy.v1.PodDisruptionBudgetList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodDisruptionBudgetSpec) OpenAPIModelName() string { + return "io.k8s.api.policy.v1.PodDisruptionBudgetSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodDisruptionBudgetStatus) OpenAPIModelName() string { + return "io.k8s.api.policy.v1.PodDisruptionBudgetStatus" +} diff --git a/staging/src/k8s.io/api/policy/v1beta1/doc.go b/staging/src/k8s.io/api/policy/v1beta1/doc.go index 777106c6002e2..3888e9216f8a1 100644 --- a/staging/src/k8s.io/api/policy/v1beta1/doc.go +++ b/staging/src/k8s.io/api/policy/v1beta1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.policy.v1beta1 // Package policy is for any kind of policy object. Suitable examples, even if // they aren't all here, are PodDisruptionBudget, diff --git a/staging/src/k8s.io/api/policy/v1beta1/generated.pb.go b/staging/src/k8s.io/api/policy/v1beta1/generated.pb.go index c3845e994e501..84979dc3f4b40 100644 --- a/staging/src/k8s.io/api/policy/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/policy/v1beta1/generated.pb.go @@ -23,12 +23,10 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -36,226 +34,15 @@ import ( intstr "k8s.io/apimachinery/pkg/util/intstr" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *Eviction) Reset() { *m = Eviction{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} } -func (m *Eviction) Reset() { *m = Eviction{} } -func (*Eviction) ProtoMessage() {} -func (*Eviction) Descriptor() ([]byte, []int) { - return fileDescriptor_68b366237812cc96, []int{0} -} -func (m *Eviction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Eviction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Eviction) XXX_Merge(src proto.Message) { - xxx_messageInfo_Eviction.Merge(m, src) -} -func (m *Eviction) XXX_Size() int { - return m.Size() -} -func (m *Eviction) XXX_DiscardUnknown() { - xxx_messageInfo_Eviction.DiscardUnknown(m) -} - -var xxx_messageInfo_Eviction proto.InternalMessageInfo - -func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} } -func (*PodDisruptionBudget) ProtoMessage() {} -func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { - return fileDescriptor_68b366237812cc96, []int{1} -} -func (m *PodDisruptionBudget) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodDisruptionBudget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodDisruptionBudget) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodDisruptionBudget.Merge(m, src) -} -func (m *PodDisruptionBudget) XXX_Size() int { - return m.Size() -} -func (m *PodDisruptionBudget) XXX_DiscardUnknown() { - xxx_messageInfo_PodDisruptionBudget.DiscardUnknown(m) -} - -var xxx_messageInfo_PodDisruptionBudget proto.InternalMessageInfo - -func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } -func (*PodDisruptionBudgetList) ProtoMessage() {} -func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { - return fileDescriptor_68b366237812cc96, []int{2} -} -func (m *PodDisruptionBudgetList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodDisruptionBudgetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodDisruptionBudgetList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodDisruptionBudgetList.Merge(m, src) -} -func (m *PodDisruptionBudgetList) XXX_Size() int { - return m.Size() -} -func (m *PodDisruptionBudgetList) XXX_DiscardUnknown() { - xxx_messageInfo_PodDisruptionBudgetList.DiscardUnknown(m) -} +func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } -var xxx_messageInfo_PodDisruptionBudgetList proto.InternalMessageInfo +func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } -func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } -func (*PodDisruptionBudgetSpec) ProtoMessage() {} -func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_68b366237812cc96, []int{3} -} -func (m *PodDisruptionBudgetSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodDisruptionBudgetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodDisruptionBudgetSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodDisruptionBudgetSpec.Merge(m, src) -} -func (m *PodDisruptionBudgetSpec) XXX_Size() int { - return m.Size() -} -func (m *PodDisruptionBudgetSpec) XXX_DiscardUnknown() { - xxx_messageInfo_PodDisruptionBudgetSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_PodDisruptionBudgetSpec proto.InternalMessageInfo - -func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} } -func (*PodDisruptionBudgetStatus) ProtoMessage() {} -func (*PodDisruptionBudgetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_68b366237812cc96, []int{4} -} -func (m *PodDisruptionBudgetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodDisruptionBudgetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodDisruptionBudgetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodDisruptionBudgetStatus.Merge(m, src) -} -func (m *PodDisruptionBudgetStatus) XXX_Size() int { - return m.Size() -} -func (m *PodDisruptionBudgetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PodDisruptionBudgetStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PodDisruptionBudgetStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Eviction)(nil), "k8s.io.api.policy.v1beta1.Eviction") - proto.RegisterType((*PodDisruptionBudget)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudget") - proto.RegisterType((*PodDisruptionBudgetList)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudgetList") - proto.RegisterType((*PodDisruptionBudgetSpec)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudgetSpec") - proto.RegisterType((*PodDisruptionBudgetStatus)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudgetStatus") - proto.RegisterMapType((map[string]v1.Time)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudgetStatus.DisruptedPodsEntry") -} - -func init() { - proto.RegisterFile("k8s.io/api/policy/v1beta1/generated.proto", fileDescriptor_68b366237812cc96) -} - -var fileDescriptor_68b366237812cc96 = []byte{ - // 843 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4d, 0x8f, 0xdb, 0x44, - 0x18, 0xc7, 0xe3, 0xcd, 0x66, 0xd9, 0x0e, 0x49, 0xb4, 0x0c, 0x6f, 0xbb, 0x39, 0x38, 0x55, 0x4e, - 0x05, 0x89, 0x31, 0xdb, 0x56, 0x68, 0xc5, 0x01, 0x5a, 0x37, 0xab, 0x52, 0xd4, 0xd5, 0xae, 0x26, - 0xdb, 0x0b, 0x2a, 0x12, 0x13, 0xfb, 0xa9, 0x33, 0xc4, 0xf6, 0x58, 0x9e, 0x71, 0x68, 0x6e, 0x3d, - 0xf0, 0x01, 0xf8, 0x1e, 0x7c, 0x10, 0xf6, 0xc0, 0xa1, 0xdc, 0x2a, 0x0e, 0x11, 0x6b, 0xbe, 0x05, - 0x27, 0xe4, 0xb1, 0xf3, 0xe2, 0xbc, 0xd0, 0xb4, 0x07, 0x6e, 0x9e, 0x67, 0x9e, 0xff, 0xef, 0x99, - 0xe7, 0x65, 0x26, 0x41, 0x9f, 0x0c, 0x4f, 0x24, 0xe1, 0xc2, 0x62, 0x11, 0xb7, 0x22, 0xe1, 0x73, - 0x67, 0x6c, 0x8d, 0x8e, 0xfb, 0xa0, 0xd8, 0xb1, 0xe5, 0x41, 0x08, 0x31, 0x53, 0xe0, 0x92, 0x28, - 0x16, 0x4a, 0xe0, 0xa3, 0xdc, 0x95, 0xb0, 0x88, 0x93, 0xdc, 0x95, 0x14, 0xae, 0xad, 0xcf, 0x3c, - 0xae, 0x06, 0x49, 0x9f, 0x38, 0x22, 0xb0, 0x3c, 0xe1, 0x09, 0x4b, 0x2b, 0xfa, 0xc9, 0x33, 0xbd, - 0xd2, 0x0b, 0xfd, 0x95, 0x93, 0x5a, 0x77, 0xe7, 0x41, 0x03, 0xe6, 0x0c, 0x78, 0x08, 0xf1, 0xd8, - 0x8a, 0x86, 0x5e, 0x66, 0x90, 0x56, 0x00, 0x8a, 0x59, 0xa3, 0x95, 0xf8, 0x2d, 0x6b, 0x93, 0x2a, - 0x4e, 0x42, 0xc5, 0x03, 0x58, 0x11, 0x7c, 0xf1, 0x3a, 0x81, 0x74, 0x06, 0x10, 0xb0, 0x15, 0xdd, - 0x9d, 0x4d, 0xba, 0x44, 0x71, 0xdf, 0xe2, 0xa1, 0x92, 0x2a, 0x5e, 0x16, 0x75, 0xfe, 0x34, 0xd0, - 0xfe, 0xe9, 0x88, 0x3b, 0x8a, 0x8b, 0x10, 0xff, 0x80, 0xf6, 0xb3, 0x2c, 0x5c, 0xa6, 0xd8, 0xa1, - 0x71, 0xd3, 0xb8, 0xf5, 0xee, 0xed, 0xcf, 0xc9, 0xbc, 0x7a, 0x33, 0x28, 0x89, 0x86, 0x5e, 0x66, - 0x90, 0x24, 0xf3, 0x26, 0xa3, 0x63, 0x72, 0xde, 0xff, 0x11, 0x1c, 0x75, 0x06, 0x8a, 0xd9, 0xf8, - 0x6a, 0xd2, 0xae, 0xa4, 0x93, 0x36, 0x9a, 0xdb, 0xe8, 0x8c, 0x8a, 0x7d, 0xd4, 0x70, 0xc1, 0x07, - 0x05, 0xe7, 0x51, 0x16, 0x51, 0x1e, 0xee, 0xe8, 0x30, 0x77, 0xb6, 0x0b, 0xd3, 0x5d, 0x94, 0xda, - 0xef, 0xa5, 0x93, 0x76, 0xa3, 0x64, 0xa2, 0x65, 0x78, 0xe7, 0xd7, 0x1d, 0xf4, 0xfe, 0x85, 0x70, - 0xbb, 0x5c, 0xc6, 0x89, 0x36, 0xd9, 0x89, 0xeb, 0x81, 0xfa, 0x1f, 0xf2, 0xbc, 0x44, 0xbb, 0x32, - 0x02, 0xa7, 0x48, 0xef, 0x36, 0xd9, 0x38, 0x83, 0x64, 0xcd, 0xf9, 0x7a, 0x11, 0x38, 0x76, 0xbd, - 0xe0, 0xef, 0x66, 0x2b, 0xaa, 0x69, 0xf8, 0x29, 0xda, 0x93, 0x8a, 0xa9, 0x44, 0x1e, 0x56, 0x35, - 0xf7, 0xee, 0x1b, 0x72, 0xb5, 0xd6, 0x6e, 0x16, 0xe4, 0xbd, 0x7c, 0x4d, 0x0b, 0x66, 0xe7, 0x77, - 0x03, 0x7d, 0xbc, 0x46, 0xf5, 0x98, 0x4b, 0x85, 0x9f, 0xae, 0x54, 0x8c, 0x6c, 0x57, 0xb1, 0x4c, - 0xad, 0xeb, 0x75, 0x50, 0x44, 0xdd, 0x9f, 0x5a, 0x16, 0xaa, 0xd5, 0x43, 0x35, 0xae, 0x20, 0xc8, - 0xa6, 0xa1, 0xba, 0x84, 0xde, 0x22, 0x2d, 0xbb, 0x51, 0xa0, 0x6b, 0x8f, 0x32, 0x08, 0xcd, 0x59, - 0x9d, 0x3f, 0xaa, 0x6b, 0xd3, 0xc9, 0xca, 0x89, 0x9f, 0xa1, 0x7a, 0xc0, 0xc3, 0xfb, 0x23, 0xc6, - 0x7d, 0xd6, 0xf7, 0xe1, 0xb5, 0x43, 0x90, 0xdd, 0x20, 0x92, 0xdf, 0x20, 0xf2, 0x28, 0x54, 0xe7, - 0x71, 0x4f, 0xc5, 0x3c, 0xf4, 0xec, 0x83, 0x74, 0xd2, 0xae, 0x9f, 0x2d, 0x90, 0x68, 0x89, 0x8b, - 0xbf, 0x47, 0xfb, 0x12, 0x7c, 0x70, 0x94, 0x88, 0xdf, 0x6c, 0xd2, 0x1f, 0xb3, 0x3e, 0xf8, 0xbd, - 0x42, 0x6a, 0xd7, 0xb3, 0xba, 0x4d, 0x57, 0x74, 0x86, 0xc4, 0x3e, 0x6a, 0x06, 0xec, 0xf9, 0x93, - 0x90, 0xcd, 0x12, 0xa9, 0xbe, 0x65, 0x22, 0x38, 0x9d, 0xb4, 0x9b, 0x67, 0x25, 0x16, 0x5d, 0x62, - 0xe3, 0x17, 0x06, 0x6a, 0x25, 0xe1, 0x00, 0x98, 0xaf, 0x06, 0xe3, 0x0b, 0xe1, 0x4e, 0x9f, 0x8d, - 0x0b, 0xdd, 0xa1, 0xc3, 0xdd, 0x9b, 0xc6, 0xad, 0x1b, 0xf6, 0xbd, 0x74, 0xd2, 0x6e, 0x3d, 0xd9, - 0xe8, 0xf5, 0xcf, 0xa4, 0x6d, 0x6e, 0xde, 0xbd, 0x1c, 0x47, 0x40, 0xff, 0x23, 0x46, 0xe7, 0xb7, - 0x1a, 0x3a, 0xda, 0x38, 0xd8, 0xf8, 0x5b, 0x84, 0x45, 0x5f, 0x42, 0x3c, 0x02, 0xf7, 0x61, 0xfe, - 0xcc, 0x71, 0x11, 0xea, 0xde, 0x56, 0xed, 0x56, 0x31, 0x23, 0xf8, 0x7c, 0xc5, 0x83, 0xae, 0x51, - 0xe1, 0x9f, 0x0d, 0xd4, 0x70, 0xf3, 0x30, 0xe0, 0x5e, 0x08, 0x77, 0x3a, 0x9b, 0x0f, 0xdf, 0xe6, - 0xca, 0x91, 0xee, 0x22, 0xe9, 0x34, 0x54, 0xf1, 0xd8, 0xfe, 0xb0, 0x38, 0x50, 0xa3, 0xb4, 0x47, - 0xcb, 0x41, 0xb3, 0x94, 0xdc, 0x19, 0x52, 0xde, 0xf7, 0x7d, 0xf1, 0x13, 0xb8, 0xba, 0xcb, 0xb5, - 0x79, 0x4a, 0xdd, 0x15, 0x0f, 0xba, 0x46, 0x85, 0xbf, 0x42, 0x4d, 0x27, 0x89, 0x63, 0x08, 0xd5, - 0x37, 0x79, 0x7d, 0x75, 0xcb, 0x6a, 0xf6, 0x47, 0x05, 0xa7, 0xf9, 0xa0, 0xb4, 0x4b, 0x97, 0xbc, - 0x33, 0xbd, 0x0b, 0x92, 0xc7, 0xe0, 0x4e, 0xf5, 0xb5, 0xb2, 0xbe, 0x5b, 0xda, 0xa5, 0x4b, 0xde, - 0xf8, 0x04, 0xd5, 0xe1, 0x79, 0x04, 0xce, 0xb4, 0xa0, 0x7b, 0x5a, 0xfd, 0x41, 0xa1, 0xae, 0x9f, - 0x2e, 0xec, 0xd1, 0x92, 0x27, 0x76, 0x10, 0x72, 0x44, 0xe8, 0xf2, 0xfc, 0x27, 0xe3, 0x1d, 0xdd, - 0x08, 0x6b, 0xbb, 0x8b, 0xf4, 0x60, 0xaa, 0x9b, 0x3f, 0xd8, 0x33, 0x93, 0xa4, 0x0b, 0xd8, 0x96, - 0x8f, 0xf0, 0x6a, 0x9b, 0xf0, 0x01, 0xaa, 0x0e, 0x61, 0xac, 0x87, 0xe8, 0x06, 0xcd, 0x3e, 0xf1, - 0x3d, 0x54, 0x1b, 0x31, 0x3f, 0x81, 0xe2, 0x42, 0x7f, 0xba, 0xdd, 0x39, 0x2e, 0x79, 0x00, 0x34, - 0x17, 0x7e, 0xb9, 0x73, 0x62, 0xd8, 0x5f, 0x5f, 0x5d, 0x9b, 0x95, 0x97, 0xd7, 0x66, 0xe5, 0xd5, - 0xb5, 0x59, 0x79, 0x91, 0x9a, 0xc6, 0x55, 0x6a, 0x1a, 0x2f, 0x53, 0xd3, 0x78, 0x95, 0x9a, 0xc6, - 0x5f, 0xa9, 0x69, 0xfc, 0xf2, 0xb7, 0x59, 0xf9, 0xee, 0x68, 0xe3, 0xdf, 0x9c, 0x7f, 0x03, 0x00, - 0x00, 0xff, 0xff, 0x3c, 0xbe, 0x15, 0xfb, 0x02, 0x09, 0x00, 0x00, -} +func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} } func (m *Eviction) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -519,7 +306,7 @@ func (m *PodDisruptionBudgetStatus) MarshalToSizedBuffer(dAtA []byte) (int, erro for k := range m.DisruptedPods { keysForDisruptedPods = append(keysForDisruptedPods, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods) + sort.Strings(keysForDisruptedPods) for iNdEx := len(keysForDisruptedPods) - 1; iNdEx >= 0; iNdEx-- { v := m.DisruptedPods[string(keysForDisruptedPods[iNdEx])] baseI := i @@ -732,7 +519,7 @@ func (this *PodDisruptionBudgetStatus) String() string { for k := range this.DisruptedPods { keysForDisruptedPods = append(keysForDisruptedPods, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods) + sort.Strings(keysForDisruptedPods) mapStringForDisruptedPods := "map[string]v1.Time{" for _, k := range keysForDisruptedPods { mapStringForDisruptedPods += fmt.Sprintf("%v: %v,", k, this.DisruptedPods[k]) diff --git a/staging/src/k8s.io/api/policy/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/policy/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..01e0847fceab2 --- /dev/null +++ b/staging/src/k8s.io/api/policy/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,32 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*Eviction) ProtoMessage() {} + +func (*PodDisruptionBudget) ProtoMessage() {} + +func (*PodDisruptionBudgetList) ProtoMessage() {} + +func (*PodDisruptionBudgetSpec) ProtoMessage() {} + +func (*PodDisruptionBudgetStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/policy/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/policy/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..236493b121aa3 --- /dev/null +++ b/staging/src/k8s.io/api/policy/v1beta1/zz_generated.model_name.go @@ -0,0 +1,47 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Eviction) OpenAPIModelName() string { + return "io.k8s.api.policy.v1beta1.Eviction" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodDisruptionBudget) OpenAPIModelName() string { + return "io.k8s.api.policy.v1beta1.PodDisruptionBudget" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodDisruptionBudgetList) OpenAPIModelName() string { + return "io.k8s.api.policy.v1beta1.PodDisruptionBudgetList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodDisruptionBudgetSpec) OpenAPIModelName() string { + return "io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PodDisruptionBudgetStatus) OpenAPIModelName() string { + return "io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus" +} diff --git a/staging/src/k8s.io/api/rbac/v1/doc.go b/staging/src/k8s.io/api/rbac/v1/doc.go index 408546274b016..f120f5d3a2308 100644 --- a/staging/src/k8s.io/api/rbac/v1/doc.go +++ b/staging/src/k8s.io/api/rbac/v1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.rbac.v1 + // +groupName=rbac.authorization.k8s.io package v1 diff --git a/staging/src/k8s.io/api/rbac/v1/generated.pb.go b/staging/src/k8s.io/api/rbac/v1/generated.pb.go index 112d18fb0651f..ed31ec959a2ea 100644 --- a/staging/src/k8s.io/api/rbac/v1/generated.pb.go +++ b/staging/src/k8s.io/api/rbac/v1/generated.pb.go @@ -24,434 +24,36 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *AggregationRule) Reset() { *m = AggregationRule{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ClusterRole) Reset() { *m = ClusterRole{} } -func (m *AggregationRule) Reset() { *m = AggregationRule{} } -func (*AggregationRule) ProtoMessage() {} -func (*AggregationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_c8ba2e7dd472de66, []int{0} -} -func (m *AggregationRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AggregationRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AggregationRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_AggregationRule.Merge(m, src) -} -func (m *AggregationRule) XXX_Size() int { - return m.Size() -} -func (m *AggregationRule) XXX_DiscardUnknown() { - xxx_messageInfo_AggregationRule.DiscardUnknown(m) -} - -var xxx_messageInfo_AggregationRule proto.InternalMessageInfo - -func (m *ClusterRole) Reset() { *m = ClusterRole{} } -func (*ClusterRole) ProtoMessage() {} -func (*ClusterRole) Descriptor() ([]byte, []int) { - return fileDescriptor_c8ba2e7dd472de66, []int{1} -} -func (m *ClusterRole) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterRole) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterRole.Merge(m, src) -} -func (m *ClusterRole) XXX_Size() int { - return m.Size() -} -func (m *ClusterRole) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterRole.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterRole proto.InternalMessageInfo - -func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } -func (*ClusterRoleBinding) ProtoMessage() {} -func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_c8ba2e7dd472de66, []int{2} -} -func (m *ClusterRoleBinding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterRoleBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterRoleBinding) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterRoleBinding.Merge(m, src) -} -func (m *ClusterRoleBinding) XXX_Size() int { - return m.Size() -} -func (m *ClusterRoleBinding) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterRoleBinding.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterRoleBinding proto.InternalMessageInfo - -func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } -func (*ClusterRoleBindingList) ProtoMessage() {} -func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_c8ba2e7dd472de66, []int{3} -} -func (m *ClusterRoleBindingList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterRoleBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterRoleBindingList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterRoleBindingList.Merge(m, src) -} -func (m *ClusterRoleBindingList) XXX_Size() int { - return m.Size() -} -func (m *ClusterRoleBindingList) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterRoleBindingList.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterRoleBindingList proto.InternalMessageInfo - -func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } -func (*ClusterRoleList) ProtoMessage() {} -func (*ClusterRoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_c8ba2e7dd472de66, []int{4} -} -func (m *ClusterRoleList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterRoleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterRoleList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterRoleList.Merge(m, src) -} -func (m *ClusterRoleList) XXX_Size() int { - return m.Size() -} -func (m *ClusterRoleList) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterRoleList.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterRoleList proto.InternalMessageInfo - -func (m *PolicyRule) Reset() { *m = PolicyRule{} } -func (*PolicyRule) ProtoMessage() {} -func (*PolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_c8ba2e7dd472de66, []int{5} -} -func (m *PolicyRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PolicyRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_PolicyRule.Merge(m, src) -} -func (m *PolicyRule) XXX_Size() int { - return m.Size() -} -func (m *PolicyRule) XXX_DiscardUnknown() { - xxx_messageInfo_PolicyRule.DiscardUnknown(m) -} +func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } -var xxx_messageInfo_PolicyRule proto.InternalMessageInfo +func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } -func (m *Role) Reset() { *m = Role{} } -func (*Role) ProtoMessage() {} -func (*Role) Descriptor() ([]byte, []int) { - return fileDescriptor_c8ba2e7dd472de66, []int{6} -} -func (m *Role) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Role) XXX_Merge(src proto.Message) { - xxx_messageInfo_Role.Merge(m, src) -} -func (m *Role) XXX_Size() int { - return m.Size() -} -func (m *Role) XXX_DiscardUnknown() { - xxx_messageInfo_Role.DiscardUnknown(m) -} +func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } -var xxx_messageInfo_Role proto.InternalMessageInfo +func (m *PolicyRule) Reset() { *m = PolicyRule{} } -func (m *RoleBinding) Reset() { *m = RoleBinding{} } -func (*RoleBinding) ProtoMessage() {} -func (*RoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_c8ba2e7dd472de66, []int{7} -} -func (m *RoleBinding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RoleBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RoleBinding) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoleBinding.Merge(m, src) -} -func (m *RoleBinding) XXX_Size() int { - return m.Size() -} -func (m *RoleBinding) XXX_DiscardUnknown() { - xxx_messageInfo_RoleBinding.DiscardUnknown(m) -} +func (m *Role) Reset() { *m = Role{} } -var xxx_messageInfo_RoleBinding proto.InternalMessageInfo +func (m *RoleBinding) Reset() { *m = RoleBinding{} } -func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } -func (*RoleBindingList) ProtoMessage() {} -func (*RoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_c8ba2e7dd472de66, []int{8} -} -func (m *RoleBindingList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RoleBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RoleBindingList) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoleBindingList.Merge(m, src) -} -func (m *RoleBindingList) XXX_Size() int { - return m.Size() -} -func (m *RoleBindingList) XXX_DiscardUnknown() { - xxx_messageInfo_RoleBindingList.DiscardUnknown(m) -} +func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } -var xxx_messageInfo_RoleBindingList proto.InternalMessageInfo +func (m *RoleList) Reset() { *m = RoleList{} } -func (m *RoleList) Reset() { *m = RoleList{} } -func (*RoleList) ProtoMessage() {} -func (*RoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_c8ba2e7dd472de66, []int{9} -} -func (m *RoleList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RoleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RoleList) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoleList.Merge(m, src) -} -func (m *RoleList) XXX_Size() int { - return m.Size() -} -func (m *RoleList) XXX_DiscardUnknown() { - xxx_messageInfo_RoleList.DiscardUnknown(m) -} - -var xxx_messageInfo_RoleList proto.InternalMessageInfo +func (m *RoleRef) Reset() { *m = RoleRef{} } -func (m *RoleRef) Reset() { *m = RoleRef{} } -func (*RoleRef) ProtoMessage() {} -func (*RoleRef) Descriptor() ([]byte, []int) { - return fileDescriptor_c8ba2e7dd472de66, []int{10} -} -func (m *RoleRef) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RoleRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RoleRef) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoleRef.Merge(m, src) -} -func (m *RoleRef) XXX_Size() int { - return m.Size() -} -func (m *RoleRef) XXX_DiscardUnknown() { - xxx_messageInfo_RoleRef.DiscardUnknown(m) -} - -var xxx_messageInfo_RoleRef proto.InternalMessageInfo - -func (m *Subject) Reset() { *m = Subject{} } -func (*Subject) ProtoMessage() {} -func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_c8ba2e7dd472de66, []int{11} -} -func (m *Subject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Subject) XXX_Merge(src proto.Message) { - xxx_messageInfo_Subject.Merge(m, src) -} -func (m *Subject) XXX_Size() int { - return m.Size() -} -func (m *Subject) XXX_DiscardUnknown() { - xxx_messageInfo_Subject.DiscardUnknown(m) -} - -var xxx_messageInfo_Subject proto.InternalMessageInfo - -func init() { - proto.RegisterType((*AggregationRule)(nil), "k8s.io.api.rbac.v1.AggregationRule") - proto.RegisterType((*ClusterRole)(nil), "k8s.io.api.rbac.v1.ClusterRole") - proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.api.rbac.v1.ClusterRoleBinding") - proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.api.rbac.v1.ClusterRoleBindingList") - proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.api.rbac.v1.ClusterRoleList") - proto.RegisterType((*PolicyRule)(nil), "k8s.io.api.rbac.v1.PolicyRule") - proto.RegisterType((*Role)(nil), "k8s.io.api.rbac.v1.Role") - proto.RegisterType((*RoleBinding)(nil), "k8s.io.api.rbac.v1.RoleBinding") - proto.RegisterType((*RoleBindingList)(nil), "k8s.io.api.rbac.v1.RoleBindingList") - proto.RegisterType((*RoleList)(nil), "k8s.io.api.rbac.v1.RoleList") - proto.RegisterType((*RoleRef)(nil), "k8s.io.api.rbac.v1.RoleRef") - proto.RegisterType((*Subject)(nil), "k8s.io.api.rbac.v1.Subject") -} - -func init() { - proto.RegisterFile("k8s.io/api/rbac/v1/generated.proto", fileDescriptor_c8ba2e7dd472de66) -} - -var fileDescriptor_c8ba2e7dd472de66 = []byte{ - // 790 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0x4d, 0x6f, 0xd3, 0x4a, - 0x14, 0xcd, 0xa4, 0x89, 0x1a, 0x4f, 0x5e, 0x94, 0xd7, 0x79, 0xd5, 0x93, 0xd5, 0xf7, 0xe4, 0x54, - 0x46, 0x42, 0x95, 0x00, 0x9b, 0x16, 0x04, 0xdd, 0x74, 0x51, 0x17, 0x81, 0xaa, 0x96, 0x52, 0x4d, - 0x05, 0x0b, 0xc4, 0x82, 0x89, 0x33, 0x75, 0x87, 0xf8, 0x4b, 0x1e, 0x3b, 0x52, 0xc5, 0x06, 0x21, - 0xb1, 0x60, 0xc7, 0x12, 0x7e, 0x01, 0x1b, 0x58, 0xf2, 0x0b, 0xd8, 0x74, 0xd9, 0x65, 0x57, 0x11, - 0x35, 0x3f, 0x04, 0xe4, 0xaf, 0x38, 0x1f, 0x2e, 0xcd, 0x2a, 0x12, 0x62, 0x95, 0xcc, 0xbd, 0xe7, - 0x9e, 0x7b, 0xe6, 0xd8, 0xf7, 0x26, 0x50, 0xee, 0xae, 0x73, 0x85, 0x39, 0x2a, 0x71, 0x99, 0xea, - 0xb5, 0x89, 0xae, 0xf6, 0x56, 0x55, 0x83, 0xda, 0xd4, 0x23, 0x3e, 0xed, 0x28, 0xae, 0xe7, 0xf8, - 0x0e, 0x42, 0x09, 0x46, 0x21, 0x2e, 0x53, 0x22, 0x8c, 0xd2, 0x5b, 0x5d, 0xba, 0x61, 0x30, 0xff, - 0x28, 0x68, 0x2b, 0xba, 0x63, 0xa9, 0x86, 0x63, 0x38, 0x6a, 0x0c, 0x6d, 0x07, 0x87, 0xf1, 0x29, - 0x3e, 0xc4, 0xdf, 0x12, 0x8a, 0xa5, 0xdb, 0x79, 0x1b, 0x8b, 0xe8, 0x47, 0xcc, 0xa6, 0xde, 0xb1, - 0xea, 0x76, 0x8d, 0x28, 0xc0, 0x55, 0x8b, 0xfa, 0xa4, 0xa0, 0xf1, 0x92, 0x7a, 0x51, 0x95, 0x17, - 0xd8, 0x3e, 0xb3, 0xe8, 0x44, 0xc1, 0x9d, 0xcb, 0x0a, 0xb8, 0x7e, 0x44, 0x2d, 0x32, 0x5e, 0x27, - 0x7f, 0x00, 0xb0, 0xb9, 0x69, 0x18, 0x1e, 0x35, 0x88, 0xcf, 0x1c, 0x1b, 0x07, 0x26, 0x45, 0x6f, - 0x00, 0x5c, 0xd4, 0xcd, 0x80, 0xfb, 0xd4, 0xc3, 0x8e, 0x49, 0x0f, 0xa8, 0x49, 0x75, 0xdf, 0xf1, - 0xb8, 0x08, 0x96, 0xe7, 0x56, 0xea, 0x6b, 0xb7, 0x94, 0xdc, 0x95, 0x41, 0x2f, 0xc5, 0xed, 0x1a, - 0x51, 0x80, 0x2b, 0xd1, 0x95, 0x94, 0xde, 0xaa, 0xb2, 0x4b, 0xda, 0xd4, 0xcc, 0x6a, 0xb5, 0xff, - 0x4f, 0xfa, 0xad, 0x52, 0xd8, 0x6f, 0x2d, 0x6e, 0x15, 0x10, 0xe3, 0xc2, 0x76, 0xf2, 0xfb, 0x32, - 0xac, 0x0f, 0xc1, 0xd1, 0x73, 0x58, 0x8b, 0xc8, 0x3b, 0xc4, 0x27, 0x22, 0x58, 0x06, 0x2b, 0xf5, - 0xb5, 0x9b, 0xd3, 0x49, 0x79, 0xd4, 0x7e, 0x41, 0x75, 0xff, 0x21, 0xf5, 0x89, 0x86, 0x52, 0x1d, - 0x30, 0x8f, 0xe1, 0x01, 0x2b, 0xda, 0x82, 0x55, 0x2f, 0x30, 0x29, 0x17, 0xcb, 0xf1, 0x4d, 0x25, - 0x65, 0xf2, 0xf9, 0x2b, 0xfb, 0x8e, 0xc9, 0xf4, 0xe3, 0xc8, 0x28, 0xad, 0x91, 0x92, 0x55, 0xa3, - 0x13, 0xc7, 0x49, 0x2d, 0x6a, 0xc3, 0x26, 0x19, 0x75, 0x54, 0x9c, 0x8b, 0xd5, 0x5e, 0x29, 0xa2, - 0x1b, 0x33, 0x5f, 0xfb, 0x27, 0xec, 0xb7, 0xc6, 0x9f, 0x08, 0x1e, 0x27, 0x94, 0xdf, 0x96, 0x21, - 0x1a, 0xb2, 0x46, 0x63, 0x76, 0x87, 0xd9, 0xc6, 0x0c, 0x1c, 0xda, 0x86, 0x35, 0x1e, 0xc4, 0x89, - 0xcc, 0xa4, 0xff, 0x8a, 0x6e, 0x75, 0x90, 0x60, 0xb4, 0xbf, 0x53, 0xb2, 0x5a, 0x1a, 0xe0, 0x78, - 0x50, 0x8e, 0xee, 0xc3, 0x79, 0xcf, 0x31, 0x29, 0xa6, 0x87, 0xa9, 0x3f, 0x85, 0x4c, 0x38, 0x81, - 0x68, 0xcd, 0x94, 0x69, 0x3e, 0x0d, 0xe0, 0xac, 0x58, 0xfe, 0x0a, 0xe0, 0xbf, 0x93, 0x5e, 0xec, - 0x32, 0xee, 0xa3, 0x67, 0x13, 0x7e, 0x28, 0x53, 0xbe, 0xbc, 0x8c, 0x27, 0x6e, 0x0c, 0x2e, 0x90, - 0x45, 0x86, 0xbc, 0xd8, 0x81, 0x55, 0xe6, 0x53, 0x2b, 0x33, 0xe2, 0x6a, 0x91, 0xfc, 0x49, 0x61, - 0xf9, 0x5b, 0xb3, 0x1d, 0x15, 0xe3, 0x84, 0x43, 0xfe, 0x02, 0x60, 0x73, 0x08, 0x3c, 0x03, 0xf9, - 0xf7, 0x46, 0xe5, 0xb7, 0x2e, 0x93, 0x5f, 0xac, 0xfb, 0x07, 0x80, 0x30, 0x1f, 0x09, 0xd4, 0x82, - 0xd5, 0x1e, 0xf5, 0xda, 0xc9, 0xae, 0x10, 0x34, 0x21, 0xc2, 0x3f, 0x89, 0x02, 0x38, 0x89, 0xa3, - 0x6b, 0x50, 0x20, 0x2e, 0x7b, 0xe0, 0x39, 0x81, 0x9b, 0x74, 0x16, 0xb4, 0x46, 0xd8, 0x6f, 0x09, - 0x9b, 0xfb, 0xdb, 0x49, 0x10, 0xe7, 0xf9, 0x08, 0xec, 0x51, 0xee, 0x04, 0x9e, 0x4e, 0xb9, 0x38, - 0x97, 0x83, 0x71, 0x16, 0xc4, 0x79, 0x1e, 0xdd, 0x85, 0x8d, 0xec, 0xb0, 0x47, 0x2c, 0xca, 0xc5, - 0x4a, 0x5c, 0xb0, 0x10, 0xf6, 0x5b, 0x0d, 0x3c, 0x9c, 0xc0, 0xa3, 0x38, 0xb4, 0x01, 0x9b, 0xb6, - 0x63, 0x67, 0x90, 0xc7, 0x78, 0x97, 0x8b, 0xd5, 0xb8, 0x34, 0x9e, 0xc5, 0xbd, 0xd1, 0x14, 0x1e, - 0xc7, 0xca, 0x9f, 0x01, 0xac, 0xfc, 0x46, 0xfb, 0x49, 0x7e, 0x5d, 0x86, 0xf5, 0x3f, 0x7e, 0x69, - 0x44, 0xe3, 0x36, 0xdb, 0x6d, 0x31, 0xcd, 0xb8, 0x5d, 0xbe, 0x26, 0x3e, 0x02, 0x58, 0x9b, 0xd1, - 0x7e, 0xd8, 0x18, 0x15, 0x2c, 0x5e, 0x28, 0xb8, 0x58, 0xe9, 0x4b, 0x98, 0xb9, 0x8e, 0xae, 0xc3, - 0x5a, 0x36, 0xd3, 0xb1, 0x4e, 0x21, 0xef, 0x9b, 0x8d, 0x3d, 0x1e, 0x20, 0xd0, 0x32, 0xac, 0x74, - 0x99, 0xdd, 0x11, 0xcb, 0x31, 0xf2, 0xaf, 0x14, 0x59, 0xd9, 0x61, 0x76, 0x07, 0xc7, 0x99, 0x08, - 0x61, 0x13, 0x2b, 0xf9, 0x59, 0x1d, 0x42, 0x44, 0xd3, 0x8c, 0xe3, 0x8c, 0xfc, 0x09, 0xc0, 0xf9, - 0xf4, 0xed, 0x19, 0xf0, 0x81, 0x0b, 0xf9, 0x86, 0xf5, 0x95, 0xa7, 0xd1, 0xf7, 0xeb, 0xee, 0x48, - 0x85, 0x42, 0xf4, 0xc9, 0x5d, 0xa2, 0x53, 0xb1, 0x12, 0xc3, 0x16, 0x52, 0x98, 0xb0, 0x97, 0x25, - 0x70, 0x8e, 0xd1, 0xd6, 0x4f, 0xce, 0xa5, 0xd2, 0xe9, 0xb9, 0x54, 0x3a, 0x3b, 0x97, 0x4a, 0xaf, - 0x42, 0x09, 0x9c, 0x84, 0x12, 0x38, 0x0d, 0x25, 0x70, 0x16, 0x4a, 0xe0, 0x5b, 0x28, 0x81, 0x77, - 0xdf, 0xa5, 0xd2, 0x53, 0x34, 0xf9, 0x8f, 0xf5, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x67, 0xff, - 0x5a, 0x4f, 0xc6, 0x0a, 0x00, 0x00, -} +func (m *Subject) Reset() { *m = Subject{} } func (m *AggregationRule) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/rbac/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/rbac/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..6e29e012fa59a --- /dev/null +++ b/staging/src/k8s.io/api/rbac/v1/generated.protomessage.pb.go @@ -0,0 +1,46 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*AggregationRule) ProtoMessage() {} + +func (*ClusterRole) ProtoMessage() {} + +func (*ClusterRoleBinding) ProtoMessage() {} + +func (*ClusterRoleBindingList) ProtoMessage() {} + +func (*ClusterRoleList) ProtoMessage() {} + +func (*PolicyRule) ProtoMessage() {} + +func (*Role) ProtoMessage() {} + +func (*RoleBinding) ProtoMessage() {} + +func (*RoleBindingList) ProtoMessage() {} + +func (*RoleList) ProtoMessage() {} + +func (*RoleRef) ProtoMessage() {} + +func (*Subject) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/rbac/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/rbac/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..94da8174c578b --- /dev/null +++ b/staging/src/k8s.io/api/rbac/v1/zz_generated.model_name.go @@ -0,0 +1,82 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AggregationRule) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1.AggregationRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterRole) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1.ClusterRole" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterRoleBinding) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1.ClusterRoleBinding" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterRoleBindingList) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1.ClusterRoleBindingList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterRoleList) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1.ClusterRoleList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PolicyRule) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1.PolicyRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Role) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1.Role" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RoleBinding) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1.RoleBinding" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RoleBindingList) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1.RoleBindingList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RoleList) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1.RoleList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RoleRef) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1.RoleRef" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Subject) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1.Subject" +} diff --git a/staging/src/k8s.io/api/rbac/v1alpha1/doc.go b/staging/src/k8s.io/api/rbac/v1alpha1/doc.go index 70d3c0e97185e..079b791b15ef2 100644 --- a/staging/src/k8s.io/api/rbac/v1alpha1/doc.go +++ b/staging/src/k8s.io/api/rbac/v1alpha1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:openapi-model-package=io.k8s.api.rbac.v1alpha1 // +groupName=rbac.authorization.k8s.io diff --git a/staging/src/k8s.io/api/rbac/v1alpha1/generated.pb.go b/staging/src/k8s.io/api/rbac/v1alpha1/generated.pb.go index ee3c7bfcc0cfa..f2ed252b6d116 100644 --- a/staging/src/k8s.io/api/rbac/v1alpha1/generated.pb.go +++ b/staging/src/k8s.io/api/rbac/v1alpha1/generated.pb.go @@ -24,436 +24,36 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *AggregationRule) Reset() { *m = AggregationRule{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ClusterRole) Reset() { *m = ClusterRole{} } -func (m *AggregationRule) Reset() { *m = AggregationRule{} } -func (*AggregationRule) ProtoMessage() {} -func (*AggregationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_758889dfd9a88fa6, []int{0} -} -func (m *AggregationRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AggregationRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AggregationRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_AggregationRule.Merge(m, src) -} -func (m *AggregationRule) XXX_Size() int { - return m.Size() -} -func (m *AggregationRule) XXX_DiscardUnknown() { - xxx_messageInfo_AggregationRule.DiscardUnknown(m) -} - -var xxx_messageInfo_AggregationRule proto.InternalMessageInfo - -func (m *ClusterRole) Reset() { *m = ClusterRole{} } -func (*ClusterRole) ProtoMessage() {} -func (*ClusterRole) Descriptor() ([]byte, []int) { - return fileDescriptor_758889dfd9a88fa6, []int{1} -} -func (m *ClusterRole) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterRole) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterRole.Merge(m, src) -} -func (m *ClusterRole) XXX_Size() int { - return m.Size() -} -func (m *ClusterRole) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterRole.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterRole proto.InternalMessageInfo - -func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } -func (*ClusterRoleBinding) ProtoMessage() {} -func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_758889dfd9a88fa6, []int{2} -} -func (m *ClusterRoleBinding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterRoleBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterRoleBinding) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterRoleBinding.Merge(m, src) -} -func (m *ClusterRoleBinding) XXX_Size() int { - return m.Size() -} -func (m *ClusterRoleBinding) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterRoleBinding.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterRoleBinding proto.InternalMessageInfo - -func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } -func (*ClusterRoleBindingList) ProtoMessage() {} -func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_758889dfd9a88fa6, []int{3} -} -func (m *ClusterRoleBindingList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterRoleBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterRoleBindingList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterRoleBindingList.Merge(m, src) -} -func (m *ClusterRoleBindingList) XXX_Size() int { - return m.Size() -} -func (m *ClusterRoleBindingList) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterRoleBindingList.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterRoleBindingList proto.InternalMessageInfo - -func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } -func (*ClusterRoleList) ProtoMessage() {} -func (*ClusterRoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_758889dfd9a88fa6, []int{4} -} -func (m *ClusterRoleList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterRoleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterRoleList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterRoleList.Merge(m, src) -} -func (m *ClusterRoleList) XXX_Size() int { - return m.Size() -} -func (m *ClusterRoleList) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterRoleList.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterRoleList proto.InternalMessageInfo - -func (m *PolicyRule) Reset() { *m = PolicyRule{} } -func (*PolicyRule) ProtoMessage() {} -func (*PolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_758889dfd9a88fa6, []int{5} -} -func (m *PolicyRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PolicyRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_PolicyRule.Merge(m, src) -} -func (m *PolicyRule) XXX_Size() int { - return m.Size() -} -func (m *PolicyRule) XXX_DiscardUnknown() { - xxx_messageInfo_PolicyRule.DiscardUnknown(m) -} +func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } -var xxx_messageInfo_PolicyRule proto.InternalMessageInfo +func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } -func (m *Role) Reset() { *m = Role{} } -func (*Role) ProtoMessage() {} -func (*Role) Descriptor() ([]byte, []int) { - return fileDescriptor_758889dfd9a88fa6, []int{6} -} -func (m *Role) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Role) XXX_Merge(src proto.Message) { - xxx_messageInfo_Role.Merge(m, src) -} -func (m *Role) XXX_Size() int { - return m.Size() -} -func (m *Role) XXX_DiscardUnknown() { - xxx_messageInfo_Role.DiscardUnknown(m) -} +func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } -var xxx_messageInfo_Role proto.InternalMessageInfo +func (m *PolicyRule) Reset() { *m = PolicyRule{} } -func (m *RoleBinding) Reset() { *m = RoleBinding{} } -func (*RoleBinding) ProtoMessage() {} -func (*RoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_758889dfd9a88fa6, []int{7} -} -func (m *RoleBinding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RoleBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RoleBinding) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoleBinding.Merge(m, src) -} -func (m *RoleBinding) XXX_Size() int { - return m.Size() -} -func (m *RoleBinding) XXX_DiscardUnknown() { - xxx_messageInfo_RoleBinding.DiscardUnknown(m) -} +func (m *Role) Reset() { *m = Role{} } -var xxx_messageInfo_RoleBinding proto.InternalMessageInfo +func (m *RoleBinding) Reset() { *m = RoleBinding{} } -func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } -func (*RoleBindingList) ProtoMessage() {} -func (*RoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_758889dfd9a88fa6, []int{8} -} -func (m *RoleBindingList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RoleBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RoleBindingList) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoleBindingList.Merge(m, src) -} -func (m *RoleBindingList) XXX_Size() int { - return m.Size() -} -func (m *RoleBindingList) XXX_DiscardUnknown() { - xxx_messageInfo_RoleBindingList.DiscardUnknown(m) -} +func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } -var xxx_messageInfo_RoleBindingList proto.InternalMessageInfo +func (m *RoleList) Reset() { *m = RoleList{} } -func (m *RoleList) Reset() { *m = RoleList{} } -func (*RoleList) ProtoMessage() {} -func (*RoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_758889dfd9a88fa6, []int{9} -} -func (m *RoleList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RoleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RoleList) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoleList.Merge(m, src) -} -func (m *RoleList) XXX_Size() int { - return m.Size() -} -func (m *RoleList) XXX_DiscardUnknown() { - xxx_messageInfo_RoleList.DiscardUnknown(m) -} - -var xxx_messageInfo_RoleList proto.InternalMessageInfo +func (m *RoleRef) Reset() { *m = RoleRef{} } -func (m *RoleRef) Reset() { *m = RoleRef{} } -func (*RoleRef) ProtoMessage() {} -func (*RoleRef) Descriptor() ([]byte, []int) { - return fileDescriptor_758889dfd9a88fa6, []int{10} -} -func (m *RoleRef) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RoleRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RoleRef) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoleRef.Merge(m, src) -} -func (m *RoleRef) XXX_Size() int { - return m.Size() -} -func (m *RoleRef) XXX_DiscardUnknown() { - xxx_messageInfo_RoleRef.DiscardUnknown(m) -} - -var xxx_messageInfo_RoleRef proto.InternalMessageInfo - -func (m *Subject) Reset() { *m = Subject{} } -func (*Subject) ProtoMessage() {} -func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_758889dfd9a88fa6, []int{11} -} -func (m *Subject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Subject) XXX_Merge(src proto.Message) { - xxx_messageInfo_Subject.Merge(m, src) -} -func (m *Subject) XXX_Size() int { - return m.Size() -} -func (m *Subject) XXX_DiscardUnknown() { - xxx_messageInfo_Subject.DiscardUnknown(m) -} - -var xxx_messageInfo_Subject proto.InternalMessageInfo - -func init() { - proto.RegisterType((*AggregationRule)(nil), "k8s.io.api.rbac.v1alpha1.AggregationRule") - proto.RegisterType((*ClusterRole)(nil), "k8s.io.api.rbac.v1alpha1.ClusterRole") - proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.api.rbac.v1alpha1.ClusterRoleBinding") - proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.api.rbac.v1alpha1.ClusterRoleBindingList") - proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.api.rbac.v1alpha1.ClusterRoleList") - proto.RegisterType((*PolicyRule)(nil), "k8s.io.api.rbac.v1alpha1.PolicyRule") - proto.RegisterType((*Role)(nil), "k8s.io.api.rbac.v1alpha1.Role") - proto.RegisterType((*RoleBinding)(nil), "k8s.io.api.rbac.v1alpha1.RoleBinding") - proto.RegisterType((*RoleBindingList)(nil), "k8s.io.api.rbac.v1alpha1.RoleBindingList") - proto.RegisterType((*RoleList)(nil), "k8s.io.api.rbac.v1alpha1.RoleList") - proto.RegisterType((*RoleRef)(nil), "k8s.io.api.rbac.v1alpha1.RoleRef") - proto.RegisterType((*Subject)(nil), "k8s.io.api.rbac.v1alpha1.Subject") -} - -func init() { - proto.RegisterFile("k8s.io/api/rbac/v1alpha1/generated.proto", fileDescriptor_758889dfd9a88fa6) -} - -var fileDescriptor_758889dfd9a88fa6 = []byte{ - // 819 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0xce, 0xa4, 0x09, 0x4d, 0x26, 0x44, 0xa1, 0x43, 0x85, 0xac, 0x0a, 0x39, 0xc5, 0x02, 0xa9, - 0x88, 0x62, 0xd3, 0x82, 0x80, 0x0b, 0x48, 0x75, 0x0f, 0x28, 0x10, 0xda, 0x32, 0x15, 0x3d, 0x20, - 0x0e, 0x4c, 0x9c, 0xa9, 0x33, 0xc4, 0xbf, 0xe4, 0xb1, 0x23, 0x55, 0x5c, 0xb8, 0x70, 0x45, 0x5c, - 0x38, 0x70, 0xe7, 0xca, 0x85, 0x3d, 0xee, 0x3f, 0xd0, 0xbd, 0xf5, 0xd8, 0x53, 0xb4, 0xf5, 0xfe, - 0x21, 0xbb, 0xf2, 0xd8, 0x8e, 0x9d, 0x5f, 0x9b, 0x9c, 0x22, 0xad, 0xb4, 0xa7, 0x64, 0xde, 0xfb, - 0xde, 0xf7, 0xde, 0xfb, 0x66, 0xde, 0x4b, 0xe0, 0xc1, 0xf0, 0x4b, 0xae, 0x32, 0x57, 0x23, 0x1e, - 0xd3, 0xfc, 0x1e, 0x31, 0xb4, 0xd1, 0x11, 0xb1, 0xbc, 0x01, 0x39, 0xd2, 0x4c, 0xea, 0x50, 0x9f, - 0x04, 0xb4, 0xaf, 0x7a, 0xbe, 0x1b, 0xb8, 0x48, 0x4a, 0x90, 0x2a, 0xf1, 0x98, 0x1a, 0x23, 0xd5, - 0x0c, 0xb9, 0xf7, 0xb1, 0xc9, 0x82, 0x41, 0xd8, 0x53, 0x0d, 0xd7, 0xd6, 0x4c, 0xd7, 0x74, 0x35, - 0x11, 0xd0, 0x0b, 0xaf, 0xc5, 0x49, 0x1c, 0xc4, 0xb7, 0x84, 0x68, 0xef, 0xb3, 0x3c, 0xa5, 0x4d, - 0x8c, 0x01, 0x73, 0xa8, 0x7f, 0xa3, 0x79, 0x43, 0x33, 0x36, 0x70, 0xcd, 0xa6, 0x01, 0xd1, 0x46, - 0x73, 0xe9, 0xf7, 0xb4, 0x65, 0x51, 0x7e, 0xe8, 0x04, 0xcc, 0xa6, 0x73, 0x01, 0x9f, 0xaf, 0x0a, - 0xe0, 0xc6, 0x80, 0xda, 0x64, 0x36, 0x4e, 0xf9, 0x07, 0xc0, 0xd6, 0x89, 0x69, 0xfa, 0xd4, 0x24, - 0x01, 0x73, 0x1d, 0x1c, 0x5a, 0x14, 0xfd, 0x01, 0xe0, 0xae, 0x61, 0x85, 0x3c, 0xa0, 0x3e, 0x76, - 0x2d, 0x7a, 0x49, 0x2d, 0x6a, 0x04, 0xae, 0xcf, 0x25, 0xb0, 0xbf, 0x75, 0xd0, 0x38, 0xfe, 0x54, - 0xcd, 0xb5, 0x99, 0xe4, 0x52, 0xbd, 0xa1, 0x19, 0x1b, 0xb8, 0x1a, 0xb7, 0xa4, 0x8e, 0x8e, 0xd4, - 0x2e, 0xe9, 0x51, 0x2b, 0x8b, 0xd5, 0xdf, 0xbd, 0x1d, 0xb7, 0x4b, 0xd1, 0xb8, 0xbd, 0x7b, 0xba, - 0x80, 0x18, 0x2f, 0x4c, 0xa7, 0xfc, 0x5b, 0x86, 0x8d, 0x02, 0x1c, 0xfd, 0x02, 0x6b, 0x31, 0x79, - 0x9f, 0x04, 0x44, 0x02, 0xfb, 0xe0, 0xa0, 0x71, 0xfc, 0xc9, 0x7a, 0xa5, 0x9c, 0xf7, 0x7e, 0xa5, - 0x46, 0xf0, 0x3d, 0x0d, 0x88, 0x8e, 0xd2, 0x3a, 0x60, 0x6e, 0xc3, 0x13, 0x56, 0xd4, 0x81, 0x55, - 0x3f, 0xb4, 0x28, 0x97, 0xca, 0xa2, 0xd3, 0xf7, 0xd5, 0x65, 0xaf, 0x40, 0xbd, 0x70, 0x2d, 0x66, - 0xdc, 0xc4, 0x72, 0xe9, 0xcd, 0x94, 0xb2, 0x1a, 0x9f, 0x38, 0x4e, 0x18, 0xd0, 0x00, 0xb6, 0xc8, - 0xb4, 0xae, 0xd2, 0x96, 0xa8, 0xf9, 0xc3, 0xe5, 0xa4, 0x33, 0x17, 0xa1, 0xbf, 0x1d, 0x8d, 0xdb, - 0xb3, 0xb7, 0x83, 0x67, 0x69, 0x95, 0xbf, 0xcb, 0x10, 0x15, 0x64, 0xd2, 0x99, 0xd3, 0x67, 0x8e, - 0xb9, 0x01, 0xb5, 0xce, 0x61, 0x8d, 0x87, 0xc2, 0x91, 0x09, 0xf6, 0xde, 0xf2, 0xde, 0x2e, 0x13, - 0xa4, 0xfe, 0x56, 0x4a, 0x59, 0x4b, 0x0d, 0x1c, 0x4f, 0x48, 0x50, 0x17, 0x6e, 0xfb, 0xae, 0x45, - 0x31, 0xbd, 0x4e, 0xb5, 0x7a, 0x09, 0x1f, 0x4e, 0x80, 0x7a, 0x2b, 0xe5, 0xdb, 0x4e, 0x0d, 0x38, - 0xa3, 0x50, 0x9e, 0x00, 0xf8, 0xce, 0xbc, 0x2e, 0x5d, 0xc6, 0x03, 0xf4, 0xf3, 0x9c, 0x36, 0xea, - 0x9a, 0x8f, 0x9a, 0xf1, 0x44, 0x99, 0x49, 0x1b, 0x99, 0xa5, 0xa0, 0xcb, 0x0f, 0xb0, 0xca, 0x02, - 0x6a, 0x67, 0xa2, 0x1c, 0x2e, 0x6f, 0x62, 0xbe, 0xbc, 0xfc, 0x35, 0x75, 0x62, 0x0a, 0x9c, 0x30, - 0x29, 0x8f, 0x01, 0x6c, 0x15, 0xc0, 0x1b, 0x68, 0xe2, 0xdb, 0xe9, 0x26, 0x3e, 0x58, 0xaf, 0x89, - 0xc5, 0xd5, 0x3f, 0x07, 0x10, 0xe6, 0x03, 0x83, 0xda, 0xb0, 0x3a, 0xa2, 0x7e, 0x2f, 0xd9, 0x27, - 0x75, 0xbd, 0x1e, 0xe3, 0xaf, 0x62, 0x03, 0x4e, 0xec, 0xe8, 0x23, 0x58, 0x27, 0x1e, 0xfb, 0xc6, - 0x77, 0x43, 0x8f, 0x4b, 0x5b, 0x02, 0xd4, 0x8c, 0xc6, 0xed, 0xfa, 0xc9, 0x45, 0x27, 0x31, 0xe2, - 0xdc, 0x1f, 0x83, 0x7d, 0xca, 0xdd, 0xd0, 0x37, 0x28, 0x97, 0x2a, 0x39, 0x18, 0x67, 0x46, 0x9c, - 0xfb, 0xd1, 0x17, 0xb0, 0x99, 0x1d, 0xce, 0x88, 0x4d, 0xb9, 0x54, 0x15, 0x01, 0x3b, 0xd1, 0xb8, - 0xdd, 0xc4, 0x45, 0x07, 0x9e, 0xc6, 0xa1, 0xaf, 0x60, 0xcb, 0x71, 0x9d, 0x0c, 0xf2, 0x23, 0xee, - 0x72, 0xe9, 0x0d, 0x11, 0x2a, 0x66, 0xf4, 0x6c, 0xda, 0x85, 0x67, 0xb1, 0xca, 0x23, 0x00, 0x2b, - 0xaf, 0xdc, 0x0e, 0x53, 0xfe, 0x2c, 0xc3, 0xc6, 0xeb, 0x95, 0x52, 0x58, 0x29, 0xf1, 0x18, 0x6e, - 0x76, 0x97, 0xac, 0x3f, 0x86, 0xab, 0x97, 0xc8, 0x7f, 0x00, 0xd6, 0x36, 0xb4, 0x3d, 0x4e, 0xa7, - 0xcb, 0x96, 0x57, 0x94, 0xbd, 0xb8, 0xde, 0xdf, 0x60, 0x76, 0x03, 0xe8, 0x10, 0xd6, 0xb2, 0x89, - 0x17, 0xd5, 0xd6, 0xf3, 0xec, 0xd9, 0x52, 0xc0, 0x13, 0x04, 0xda, 0x87, 0x95, 0x21, 0x73, 0xfa, - 0x52, 0x59, 0x20, 0xdf, 0x4c, 0x91, 0x95, 0xef, 0x98, 0xd3, 0xc7, 0xc2, 0x13, 0x23, 0x1c, 0x62, - 0x27, 0x3f, 0xc9, 0x05, 0x44, 0x3c, 0xeb, 0x58, 0x78, 0x94, 0xff, 0x01, 0xdc, 0x4e, 0xdf, 0xd3, - 0x84, 0x0f, 0x2c, 0xe5, 0x3b, 0x86, 0x90, 0x78, 0xec, 0x8a, 0xfa, 0x9c, 0xb9, 0x4e, 0x9a, 0x77, - 0xf2, 0xd2, 0x4f, 0x2e, 0x3a, 0xa9, 0x07, 0x17, 0x50, 0xab, 0x6b, 0x40, 0x1a, 0xac, 0xc7, 0x9f, - 0xdc, 0x23, 0x06, 0x95, 0x2a, 0x02, 0xb6, 0x93, 0xc2, 0xea, 0x67, 0x99, 0x03, 0xe7, 0x18, 0xfd, - 0xeb, 0xdb, 0x07, 0xb9, 0x74, 0xf7, 0x20, 0x97, 0xee, 0x1f, 0xe4, 0xd2, 0xef, 0x91, 0x0c, 0x6e, - 0x23, 0x19, 0xdc, 0x45, 0x32, 0xb8, 0x8f, 0x64, 0xf0, 0x34, 0x92, 0xc1, 0x5f, 0xcf, 0xe4, 0xd2, - 0x4f, 0xd2, 0xb2, 0x7f, 0xc1, 0x2f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x02, 0x55, 0xe5, 0x20, - 0x0b, 0x00, 0x00, -} +func (m *Subject) Reset() { *m = Subject{} } func (m *AggregationRule) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/rbac/v1alpha1/generated.protomessage.pb.go b/staging/src/k8s.io/api/rbac/v1alpha1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..20f8d575ea1ea --- /dev/null +++ b/staging/src/k8s.io/api/rbac/v1alpha1/generated.protomessage.pb.go @@ -0,0 +1,46 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1alpha1 + +func (*AggregationRule) ProtoMessage() {} + +func (*ClusterRole) ProtoMessage() {} + +func (*ClusterRoleBinding) ProtoMessage() {} + +func (*ClusterRoleBindingList) ProtoMessage() {} + +func (*ClusterRoleList) ProtoMessage() {} + +func (*PolicyRule) ProtoMessage() {} + +func (*Role) ProtoMessage() {} + +func (*RoleBinding) ProtoMessage() {} + +func (*RoleBindingList) ProtoMessage() {} + +func (*RoleList) ProtoMessage() {} + +func (*RoleRef) ProtoMessage() {} + +func (*Subject) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/rbac/v1alpha1/zz_generated.model_name.go b/staging/src/k8s.io/api/rbac/v1alpha1/zz_generated.model_name.go new file mode 100644 index 0000000000000..5d9ca16c8b554 --- /dev/null +++ b/staging/src/k8s.io/api/rbac/v1alpha1/zz_generated.model_name.go @@ -0,0 +1,82 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1alpha1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AggregationRule) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1alpha1.AggregationRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterRole) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1alpha1.ClusterRole" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterRoleBinding) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1alpha1.ClusterRoleBinding" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterRoleBindingList) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1alpha1.ClusterRoleBindingList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterRoleList) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1alpha1.ClusterRoleList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PolicyRule) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1alpha1.PolicyRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Role) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1alpha1.Role" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RoleBinding) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1alpha1.RoleBinding" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RoleBindingList) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1alpha1.RoleBindingList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RoleList) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1alpha1.RoleList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RoleRef) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1alpha1.RoleRef" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Subject) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1alpha1.Subject" +} diff --git a/staging/src/k8s.io/api/rbac/v1beta1/doc.go b/staging/src/k8s.io/api/rbac/v1beta1/doc.go index 504a58d8bfa0f..b1890610fa744 100644 --- a/staging/src/k8s.io/api/rbac/v1beta1/doc.go +++ b/staging/src/k8s.io/api/rbac/v1beta1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.rbac.v1beta1 // +groupName=rbac.authorization.k8s.io diff --git a/staging/src/k8s.io/api/rbac/v1beta1/generated.pb.go b/staging/src/k8s.io/api/rbac/v1beta1/generated.pb.go index 9052d7e8dbbcf..0980b011980f7 100644 --- a/staging/src/k8s.io/api/rbac/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/rbac/v1beta1/generated.pb.go @@ -24,434 +24,36 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *AggregationRule) Reset() { *m = AggregationRule{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ClusterRole) Reset() { *m = ClusterRole{} } -func (m *AggregationRule) Reset() { *m = AggregationRule{} } -func (*AggregationRule) ProtoMessage() {} -func (*AggregationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_c5bc2d145acd4e45, []int{0} -} -func (m *AggregationRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AggregationRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AggregationRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_AggregationRule.Merge(m, src) -} -func (m *AggregationRule) XXX_Size() int { - return m.Size() -} -func (m *AggregationRule) XXX_DiscardUnknown() { - xxx_messageInfo_AggregationRule.DiscardUnknown(m) -} - -var xxx_messageInfo_AggregationRule proto.InternalMessageInfo - -func (m *ClusterRole) Reset() { *m = ClusterRole{} } -func (*ClusterRole) ProtoMessage() {} -func (*ClusterRole) Descriptor() ([]byte, []int) { - return fileDescriptor_c5bc2d145acd4e45, []int{1} -} -func (m *ClusterRole) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterRole) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterRole.Merge(m, src) -} -func (m *ClusterRole) XXX_Size() int { - return m.Size() -} -func (m *ClusterRole) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterRole.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterRole proto.InternalMessageInfo - -func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } -func (*ClusterRoleBinding) ProtoMessage() {} -func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_c5bc2d145acd4e45, []int{2} -} -func (m *ClusterRoleBinding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterRoleBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterRoleBinding) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterRoleBinding.Merge(m, src) -} -func (m *ClusterRoleBinding) XXX_Size() int { - return m.Size() -} -func (m *ClusterRoleBinding) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterRoleBinding.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterRoleBinding proto.InternalMessageInfo - -func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } -func (*ClusterRoleBindingList) ProtoMessage() {} -func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_c5bc2d145acd4e45, []int{3} -} -func (m *ClusterRoleBindingList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterRoleBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterRoleBindingList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterRoleBindingList.Merge(m, src) -} -func (m *ClusterRoleBindingList) XXX_Size() int { - return m.Size() -} -func (m *ClusterRoleBindingList) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterRoleBindingList.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterRoleBindingList proto.InternalMessageInfo - -func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } -func (*ClusterRoleList) ProtoMessage() {} -func (*ClusterRoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_c5bc2d145acd4e45, []int{4} -} -func (m *ClusterRoleList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterRoleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterRoleList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterRoleList.Merge(m, src) -} -func (m *ClusterRoleList) XXX_Size() int { - return m.Size() -} -func (m *ClusterRoleList) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterRoleList.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterRoleList proto.InternalMessageInfo - -func (m *PolicyRule) Reset() { *m = PolicyRule{} } -func (*PolicyRule) ProtoMessage() {} -func (*PolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_c5bc2d145acd4e45, []int{5} -} -func (m *PolicyRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PolicyRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_PolicyRule.Merge(m, src) -} -func (m *PolicyRule) XXX_Size() int { - return m.Size() -} -func (m *PolicyRule) XXX_DiscardUnknown() { - xxx_messageInfo_PolicyRule.DiscardUnknown(m) -} +func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } -var xxx_messageInfo_PolicyRule proto.InternalMessageInfo +func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } -func (m *Role) Reset() { *m = Role{} } -func (*Role) ProtoMessage() {} -func (*Role) Descriptor() ([]byte, []int) { - return fileDescriptor_c5bc2d145acd4e45, []int{6} -} -func (m *Role) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Role) XXX_Merge(src proto.Message) { - xxx_messageInfo_Role.Merge(m, src) -} -func (m *Role) XXX_Size() int { - return m.Size() -} -func (m *Role) XXX_DiscardUnknown() { - xxx_messageInfo_Role.DiscardUnknown(m) -} +func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } -var xxx_messageInfo_Role proto.InternalMessageInfo +func (m *PolicyRule) Reset() { *m = PolicyRule{} } -func (m *RoleBinding) Reset() { *m = RoleBinding{} } -func (*RoleBinding) ProtoMessage() {} -func (*RoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_c5bc2d145acd4e45, []int{7} -} -func (m *RoleBinding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RoleBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RoleBinding) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoleBinding.Merge(m, src) -} -func (m *RoleBinding) XXX_Size() int { - return m.Size() -} -func (m *RoleBinding) XXX_DiscardUnknown() { - xxx_messageInfo_RoleBinding.DiscardUnknown(m) -} +func (m *Role) Reset() { *m = Role{} } -var xxx_messageInfo_RoleBinding proto.InternalMessageInfo +func (m *RoleBinding) Reset() { *m = RoleBinding{} } -func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } -func (*RoleBindingList) ProtoMessage() {} -func (*RoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_c5bc2d145acd4e45, []int{8} -} -func (m *RoleBindingList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RoleBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RoleBindingList) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoleBindingList.Merge(m, src) -} -func (m *RoleBindingList) XXX_Size() int { - return m.Size() -} -func (m *RoleBindingList) XXX_DiscardUnknown() { - xxx_messageInfo_RoleBindingList.DiscardUnknown(m) -} +func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } -var xxx_messageInfo_RoleBindingList proto.InternalMessageInfo +func (m *RoleList) Reset() { *m = RoleList{} } -func (m *RoleList) Reset() { *m = RoleList{} } -func (*RoleList) ProtoMessage() {} -func (*RoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_c5bc2d145acd4e45, []int{9} -} -func (m *RoleList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RoleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RoleList) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoleList.Merge(m, src) -} -func (m *RoleList) XXX_Size() int { - return m.Size() -} -func (m *RoleList) XXX_DiscardUnknown() { - xxx_messageInfo_RoleList.DiscardUnknown(m) -} - -var xxx_messageInfo_RoleList proto.InternalMessageInfo +func (m *RoleRef) Reset() { *m = RoleRef{} } -func (m *RoleRef) Reset() { *m = RoleRef{} } -func (*RoleRef) ProtoMessage() {} -func (*RoleRef) Descriptor() ([]byte, []int) { - return fileDescriptor_c5bc2d145acd4e45, []int{10} -} -func (m *RoleRef) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RoleRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RoleRef) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoleRef.Merge(m, src) -} -func (m *RoleRef) XXX_Size() int { - return m.Size() -} -func (m *RoleRef) XXX_DiscardUnknown() { - xxx_messageInfo_RoleRef.DiscardUnknown(m) -} - -var xxx_messageInfo_RoleRef proto.InternalMessageInfo - -func (m *Subject) Reset() { *m = Subject{} } -func (*Subject) ProtoMessage() {} -func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_c5bc2d145acd4e45, []int{11} -} -func (m *Subject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Subject) XXX_Merge(src proto.Message) { - xxx_messageInfo_Subject.Merge(m, src) -} -func (m *Subject) XXX_Size() int { - return m.Size() -} -func (m *Subject) XXX_DiscardUnknown() { - xxx_messageInfo_Subject.DiscardUnknown(m) -} - -var xxx_messageInfo_Subject proto.InternalMessageInfo - -func init() { - proto.RegisterType((*AggregationRule)(nil), "k8s.io.api.rbac.v1beta1.AggregationRule") - proto.RegisterType((*ClusterRole)(nil), "k8s.io.api.rbac.v1beta1.ClusterRole") - proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.api.rbac.v1beta1.ClusterRoleBinding") - proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.api.rbac.v1beta1.ClusterRoleBindingList") - proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.api.rbac.v1beta1.ClusterRoleList") - proto.RegisterType((*PolicyRule)(nil), "k8s.io.api.rbac.v1beta1.PolicyRule") - proto.RegisterType((*Role)(nil), "k8s.io.api.rbac.v1beta1.Role") - proto.RegisterType((*RoleBinding)(nil), "k8s.io.api.rbac.v1beta1.RoleBinding") - proto.RegisterType((*RoleBindingList)(nil), "k8s.io.api.rbac.v1beta1.RoleBindingList") - proto.RegisterType((*RoleList)(nil), "k8s.io.api.rbac.v1beta1.RoleList") - proto.RegisterType((*RoleRef)(nil), "k8s.io.api.rbac.v1beta1.RoleRef") - proto.RegisterType((*Subject)(nil), "k8s.io.api.rbac.v1beta1.Subject") -} - -func init() { - proto.RegisterFile("k8s.io/api/rbac/v1beta1/generated.proto", fileDescriptor_c5bc2d145acd4e45) -} - -var fileDescriptor_c5bc2d145acd4e45 = []byte{ - // 800 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x3b, 0x6f, 0xe3, 0x46, - 0x10, 0xd6, 0xca, 0x12, 0x2c, 0xae, 0x22, 0x28, 0xde, 0x18, 0x31, 0x61, 0x24, 0x94, 0xa0, 0x04, - 0x88, 0x01, 0x27, 0x64, 0xec, 0x04, 0x49, 0x1a, 0x17, 0x66, 0x8a, 0xc4, 0xb0, 0xa3, 0x18, 0x6b, - 0x24, 0x45, 0x90, 0x22, 0x2b, 0x6a, 0x4d, 0x6f, 0xc4, 0x17, 0xb8, 0xa4, 0x00, 0x23, 0x4d, 0x9a, - 0xeb, 0xae, 0x38, 0xe0, 0xaa, 0x6b, 0xaf, 0xbe, 0xea, 0xca, 0xfb, 0x05, 0x2a, 0x5d, 0xba, 0x12, - 0xce, 0xbc, 0x1f, 0x72, 0x87, 0xe5, 0x43, 0xd4, 0x8b, 0xb6, 0x2a, 0x01, 0x07, 0x5c, 0x25, 0xed, - 0xcc, 0x37, 0xdf, 0xcc, 0x7c, 0xbb, 0x33, 0x12, 0xfc, 0x6a, 0xf0, 0x13, 0x57, 0x99, 0xab, 0x11, - 0x8f, 0x69, 0x7e, 0x8f, 0x18, 0xda, 0xf0, 0xa0, 0x47, 0x03, 0x72, 0xa0, 0x99, 0xd4, 0xa1, 0x3e, - 0x09, 0x68, 0x5f, 0xf5, 0x7c, 0x37, 0x70, 0xd1, 0x4e, 0x02, 0x54, 0x89, 0xc7, 0x54, 0x01, 0x54, - 0x53, 0xe0, 0xee, 0x37, 0x26, 0x0b, 0xae, 0xc2, 0x9e, 0x6a, 0xb8, 0xb6, 0x66, 0xba, 0xa6, 0xab, - 0xc5, 0xf8, 0x5e, 0x78, 0x19, 0x9f, 0xe2, 0x43, 0xfc, 0x2d, 0xe1, 0xd9, 0xfd, 0x3e, 0x4f, 0x68, - 0x13, 0xe3, 0x8a, 0x39, 0xd4, 0xbf, 0xd6, 0xbc, 0x81, 0x29, 0x0c, 0x5c, 0xb3, 0x69, 0x40, 0xb4, - 0xe1, 0x42, 0xf6, 0x5d, 0xad, 0x28, 0xca, 0x0f, 0x9d, 0x80, 0xd9, 0x74, 0x21, 0xe0, 0x87, 0x87, - 0x02, 0xb8, 0x71, 0x45, 0x6d, 0x32, 0x1f, 0xd7, 0x79, 0x06, 0x60, 0xf3, 0xd8, 0x34, 0x7d, 0x6a, - 0x92, 0x80, 0xb9, 0x0e, 0x0e, 0x2d, 0x8a, 0x1e, 0x01, 0xb8, 0x6d, 0x58, 0x21, 0x0f, 0xa8, 0x8f, - 0x5d, 0x8b, 0x5e, 0x50, 0x8b, 0x1a, 0x81, 0xeb, 0x73, 0x19, 0xb4, 0x37, 0xf6, 0xea, 0x87, 0xdf, - 0xa9, 0xb9, 0x34, 0x93, 0x5c, 0xaa, 0x37, 0x30, 0x85, 0x81, 0xab, 0xa2, 0x25, 0x75, 0x78, 0xa0, - 0x9e, 0x91, 0x1e, 0xb5, 0xb2, 0x58, 0xfd, 0xb3, 0xd1, 0xb8, 0x55, 0x8a, 0xc6, 0xad, 0xed, 0x9f, - 0x97, 0x10, 0xe3, 0xa5, 0xe9, 0x3a, 0xcf, 0xcb, 0xb0, 0x3e, 0x05, 0x47, 0xff, 0xc0, 0x9a, 0x20, - 0xef, 0x93, 0x80, 0xc8, 0xa0, 0x0d, 0xf6, 0xea, 0x87, 0xdf, 0xae, 0x56, 0xca, 0xef, 0xbd, 0x7f, - 0xa9, 0x11, 0xfc, 0x46, 0x03, 0xa2, 0xa3, 0xb4, 0x0e, 0x98, 0xdb, 0xf0, 0x84, 0x15, 0xfd, 0x0a, - 0xab, 0x7e, 0x68, 0x51, 0x2e, 0x97, 0xe3, 0x4e, 0xbf, 0x50, 0x0b, 0x1e, 0x81, 0x7a, 0xee, 0x5a, - 0xcc, 0xb8, 0x16, 0x6a, 0xe9, 0x8d, 0x94, 0xb1, 0x2a, 0x4e, 0x1c, 0x27, 0x04, 0xc8, 0x84, 0x4d, - 0x32, 0x2b, 0xab, 0xbc, 0x11, 0x97, 0xbc, 0x57, 0xc8, 0x39, 0x77, 0x0d, 0xfa, 0x27, 0xd1, 0xb8, - 0x35, 0x7f, 0x37, 0x78, 0x9e, 0xb5, 0xf3, 0xb4, 0x0c, 0xd1, 0x94, 0x48, 0x3a, 0x73, 0xfa, 0xcc, - 0x31, 0xd7, 0xa0, 0x55, 0x17, 0xd6, 0x78, 0x18, 0x3b, 0x32, 0xb9, 0xda, 0x85, 0xad, 0x5d, 0x24, - 0x40, 0xfd, 0xe3, 0x94, 0xb1, 0x96, 0x1a, 0x38, 0x9e, 0x70, 0xa0, 0x53, 0xb8, 0xe9, 0xbb, 0x16, - 0xc5, 0xf4, 0x32, 0x55, 0xaa, 0x98, 0x0e, 0x27, 0x38, 0xbd, 0x99, 0xd2, 0x6d, 0xa6, 0x06, 0x9c, - 0x31, 0x74, 0x46, 0x00, 0x7e, 0xba, 0xa8, 0xca, 0x19, 0xe3, 0x01, 0xfa, 0x7b, 0x41, 0x19, 0x75, - 0xc5, 0x07, 0xcd, 0x78, 0xa2, 0xcb, 0xa4, 0x8b, 0xcc, 0x32, 0xa5, 0xca, 0x39, 0xac, 0xb2, 0x80, - 0xda, 0x99, 0x24, 0xfb, 0x85, 0x3d, 0x2c, 0x56, 0x97, 0xbf, 0xa4, 0x13, 0xc1, 0x80, 0x13, 0xa2, - 0xce, 0x2b, 0x00, 0x9b, 0x53, 0xe0, 0x35, 0xf4, 0x70, 0x32, 0xdb, 0xc3, 0x97, 0x2b, 0xf5, 0xb0, - 0xbc, 0xf8, 0xb7, 0x00, 0xc2, 0x7c, 0x56, 0x50, 0x0b, 0x56, 0x87, 0xd4, 0xef, 0x25, 0x9b, 0x44, - 0xd2, 0x25, 0x81, 0xff, 0x53, 0x18, 0x70, 0x62, 0x47, 0xfb, 0x50, 0x22, 0x1e, 0xfb, 0xc5, 0x77, - 0x43, 0x2f, 0x49, 0x2f, 0xe9, 0x8d, 0x68, 0xdc, 0x92, 0x8e, 0xcf, 0x4f, 0x12, 0x23, 0xce, 0xfd, - 0x02, 0xec, 0x53, 0xee, 0x86, 0xbe, 0x41, 0xb9, 0xbc, 0x91, 0x83, 0x71, 0x66, 0xc4, 0xb9, 0x1f, - 0xfd, 0x08, 0x1b, 0xd9, 0xa1, 0x4b, 0x6c, 0xca, 0xe5, 0x4a, 0x1c, 0xb0, 0x15, 0x8d, 0x5b, 0x0d, - 0x3c, 0xed, 0xc0, 0xb3, 0x38, 0x74, 0x04, 0x9b, 0x8e, 0xeb, 0x64, 0x90, 0x3f, 0xf0, 0x19, 0x97, - 0xab, 0x71, 0x68, 0x3c, 0x9f, 0xdd, 0x59, 0x17, 0x9e, 0xc7, 0x76, 0x5e, 0x02, 0x58, 0x79, 0xdf, - 0xb6, 0x57, 0xe7, 0x71, 0x19, 0xd6, 0x3f, 0x6c, 0x93, 0xc9, 0x36, 0x11, 0x23, 0xb8, 0xde, 0x35, - 0xb2, 0xf2, 0x08, 0x3e, 0xbc, 0x3f, 0x5e, 0x00, 0x58, 0x5b, 0xd3, 0xe2, 0xd0, 0x67, 0xab, 0xfe, - 0xfc, 0xfe, 0xaa, 0x97, 0x97, 0xfb, 0x1f, 0xcc, 0xf4, 0x47, 0x5f, 0xc3, 0x5a, 0x36, 0xec, 0x71, - 0xb1, 0x52, 0x9e, 0x3c, 0xdb, 0x07, 0x78, 0x82, 0x40, 0x6d, 0x58, 0x19, 0x30, 0xa7, 0x2f, 0x97, - 0x63, 0xe4, 0x47, 0x29, 0xb2, 0x72, 0xca, 0x9c, 0x3e, 0x8e, 0x3d, 0x02, 0xe1, 0x10, 0x3b, 0xf9, - 0x21, 0x9e, 0x42, 0x88, 0x31, 0xc7, 0xb1, 0x47, 0x68, 0xb5, 0x99, 0x3e, 0xa6, 0x09, 0x1f, 0x28, - 0xe4, 0x9b, 0xae, 0xaf, 0xbc, 0x4a, 0x7d, 0xf7, 0x67, 0x47, 0x1a, 0x94, 0xc4, 0x27, 0xf7, 0x88, - 0x41, 0xe5, 0x4a, 0x0c, 0xdb, 0x4a, 0x61, 0x52, 0x37, 0x73, 0xe0, 0x1c, 0xa3, 0x1f, 0x8d, 0xee, - 0x94, 0xd2, 0xcd, 0x9d, 0x52, 0xba, 0xbd, 0x53, 0x4a, 0xff, 0x47, 0x0a, 0x18, 0x45, 0x0a, 0xb8, - 0x89, 0x14, 0x70, 0x1b, 0x29, 0xe0, 0x75, 0xa4, 0x80, 0x27, 0x6f, 0x94, 0xd2, 0x5f, 0x3b, 0x05, - 0x7f, 0x79, 0xdf, 0x05, 0x00, 0x00, 0xff, 0xff, 0x75, 0xfb, 0x5a, 0x79, 0x0c, 0x0b, 0x00, 0x00, -} +func (m *Subject) Reset() { *m = Subject{} } func (m *AggregationRule) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/rbac/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/rbac/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..b29896836740c --- /dev/null +++ b/staging/src/k8s.io/api/rbac/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,46 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*AggregationRule) ProtoMessage() {} + +func (*ClusterRole) ProtoMessage() {} + +func (*ClusterRoleBinding) ProtoMessage() {} + +func (*ClusterRoleBindingList) ProtoMessage() {} + +func (*ClusterRoleList) ProtoMessage() {} + +func (*PolicyRule) ProtoMessage() {} + +func (*Role) ProtoMessage() {} + +func (*RoleBinding) ProtoMessage() {} + +func (*RoleBindingList) ProtoMessage() {} + +func (*RoleList) ProtoMessage() {} + +func (*RoleRef) ProtoMessage() {} + +func (*Subject) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/rbac/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/rbac/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..073ba67b40b23 --- /dev/null +++ b/staging/src/k8s.io/api/rbac/v1beta1/zz_generated.model_name.go @@ -0,0 +1,82 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AggregationRule) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1beta1.AggregationRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterRole) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1beta1.ClusterRole" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterRoleBinding) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1beta1.ClusterRoleBinding" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterRoleBindingList) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1beta1.ClusterRoleBindingList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ClusterRoleList) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1beta1.ClusterRoleList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PolicyRule) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1beta1.PolicyRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Role) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1beta1.Role" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RoleBinding) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1beta1.RoleBinding" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RoleBindingList) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1beta1.RoleBindingList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RoleList) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1beta1.RoleList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RoleRef) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1beta1.RoleRef" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Subject) OpenAPIModelName() string { + return "io.k8s.api.rbac.v1beta1.Subject" +} diff --git a/staging/src/k8s.io/api/resource/v1/doc.go b/staging/src/k8s.io/api/resource/v1/doc.go index c94ca75ddc334..645c1cb53f4ee 100644 --- a/staging/src/k8s.io/api/resource/v1/doc.go +++ b/staging/src/k8s.io/api/resource/v1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.resource.v1 // +groupName=resource.k8s.io // Package v1 is the v1 version of the resource API. diff --git a/staging/src/k8s.io/api/resource/v1/generated.pb.go b/staging/src/k8s.io/api/resource/v1/generated.pb.go index 5695e2c7e04f4..e690204905ae8 100644 --- a/staging/src/k8s.io/api/resource/v1/generated.pb.go +++ b/staging/src/k8s.io/api/resource/v1/generated.pb.go @@ -23,15 +23,13 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v11 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -39,1470 +37,91 @@ import ( k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *AllocatedDeviceStatus) Reset() { *m = AllocatedDeviceStatus{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *AllocationResult) Reset() { *m = AllocationResult{} } -func (m *AllocatedDeviceStatus) Reset() { *m = AllocatedDeviceStatus{} } -func (*AllocatedDeviceStatus) ProtoMessage() {} -func (*AllocatedDeviceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{0} -} -func (m *AllocatedDeviceStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AllocatedDeviceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AllocatedDeviceStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllocatedDeviceStatus.Merge(m, src) -} -func (m *AllocatedDeviceStatus) XXX_Size() int { - return m.Size() -} -func (m *AllocatedDeviceStatus) XXX_DiscardUnknown() { - xxx_messageInfo_AllocatedDeviceStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_AllocatedDeviceStatus proto.InternalMessageInfo - -func (m *AllocationResult) Reset() { *m = AllocationResult{} } -func (*AllocationResult) ProtoMessage() {} -func (*AllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{1} -} -func (m *AllocationResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AllocationResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllocationResult.Merge(m, src) -} -func (m *AllocationResult) XXX_Size() int { - return m.Size() -} -func (m *AllocationResult) XXX_DiscardUnknown() { - xxx_messageInfo_AllocationResult.DiscardUnknown(m) -} - -var xxx_messageInfo_AllocationResult proto.InternalMessageInfo - -func (m *CELDeviceSelector) Reset() { *m = CELDeviceSelector{} } -func (*CELDeviceSelector) ProtoMessage() {} -func (*CELDeviceSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{2} -} -func (m *CELDeviceSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CELDeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CELDeviceSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_CELDeviceSelector.Merge(m, src) -} -func (m *CELDeviceSelector) XXX_Size() int { - return m.Size() -} -func (m *CELDeviceSelector) XXX_DiscardUnknown() { - xxx_messageInfo_CELDeviceSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_CELDeviceSelector proto.InternalMessageInfo - -func (m *CapacityRequestPolicy) Reset() { *m = CapacityRequestPolicy{} } -func (*CapacityRequestPolicy) ProtoMessage() {} -func (*CapacityRequestPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{3} -} -func (m *CapacityRequestPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CapacityRequestPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CapacityRequestPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_CapacityRequestPolicy.Merge(m, src) -} -func (m *CapacityRequestPolicy) XXX_Size() int { - return m.Size() -} -func (m *CapacityRequestPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_CapacityRequestPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_CapacityRequestPolicy proto.InternalMessageInfo - -func (m *CapacityRequestPolicyRange) Reset() { *m = CapacityRequestPolicyRange{} } -func (*CapacityRequestPolicyRange) ProtoMessage() {} -func (*CapacityRequestPolicyRange) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{4} -} -func (m *CapacityRequestPolicyRange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CapacityRequestPolicyRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CapacityRequestPolicyRange) XXX_Merge(src proto.Message) { - xxx_messageInfo_CapacityRequestPolicyRange.Merge(m, src) -} -func (m *CapacityRequestPolicyRange) XXX_Size() int { - return m.Size() -} -func (m *CapacityRequestPolicyRange) XXX_DiscardUnknown() { - xxx_messageInfo_CapacityRequestPolicyRange.DiscardUnknown(m) -} - -var xxx_messageInfo_CapacityRequestPolicyRange proto.InternalMessageInfo - -func (m *CapacityRequirements) Reset() { *m = CapacityRequirements{} } -func (*CapacityRequirements) ProtoMessage() {} -func (*CapacityRequirements) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{5} -} -func (m *CapacityRequirements) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CapacityRequirements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CapacityRequirements) XXX_Merge(src proto.Message) { - xxx_messageInfo_CapacityRequirements.Merge(m, src) -} -func (m *CapacityRequirements) XXX_Size() int { - return m.Size() -} -func (m *CapacityRequirements) XXX_DiscardUnknown() { - xxx_messageInfo_CapacityRequirements.DiscardUnknown(m) -} - -var xxx_messageInfo_CapacityRequirements proto.InternalMessageInfo - -func (m *Counter) Reset() { *m = Counter{} } -func (*Counter) ProtoMessage() {} -func (*Counter) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{6} -} -func (m *Counter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Counter) XXX_Merge(src proto.Message) { - xxx_messageInfo_Counter.Merge(m, src) -} -func (m *Counter) XXX_Size() int { - return m.Size() -} -func (m *Counter) XXX_DiscardUnknown() { - xxx_messageInfo_Counter.DiscardUnknown(m) -} - -var xxx_messageInfo_Counter proto.InternalMessageInfo - -func (m *CounterSet) Reset() { *m = CounterSet{} } -func (*CounterSet) ProtoMessage() {} -func (*CounterSet) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{7} -} -func (m *CounterSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CounterSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CounterSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_CounterSet.Merge(m, src) -} -func (m *CounterSet) XXX_Size() int { - return m.Size() -} -func (m *CounterSet) XXX_DiscardUnknown() { - xxx_messageInfo_CounterSet.DiscardUnknown(m) -} - -var xxx_messageInfo_CounterSet proto.InternalMessageInfo - -func (m *Device) Reset() { *m = Device{} } -func (*Device) ProtoMessage() {} -func (*Device) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{8} -} -func (m *Device) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Device) XXX_Merge(src proto.Message) { - xxx_messageInfo_Device.Merge(m, src) -} -func (m *Device) XXX_Size() int { - return m.Size() -} -func (m *Device) XXX_DiscardUnknown() { - xxx_messageInfo_Device.DiscardUnknown(m) -} - -var xxx_messageInfo_Device proto.InternalMessageInfo - -func (m *DeviceAllocationConfiguration) Reset() { *m = DeviceAllocationConfiguration{} } -func (*DeviceAllocationConfiguration) ProtoMessage() {} -func (*DeviceAllocationConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{9} -} -func (m *DeviceAllocationConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceAllocationConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceAllocationConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceAllocationConfiguration.Merge(m, src) -} -func (m *DeviceAllocationConfiguration) XXX_Size() int { - return m.Size() -} -func (m *DeviceAllocationConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceAllocationConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceAllocationConfiguration proto.InternalMessageInfo - -func (m *DeviceAllocationResult) Reset() { *m = DeviceAllocationResult{} } -func (*DeviceAllocationResult) ProtoMessage() {} -func (*DeviceAllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{10} -} -func (m *DeviceAllocationResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceAllocationResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceAllocationResult.Merge(m, src) -} -func (m *DeviceAllocationResult) XXX_Size() int { - return m.Size() -} -func (m *DeviceAllocationResult) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceAllocationResult.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceAllocationResult proto.InternalMessageInfo - -func (m *DeviceAttribute) Reset() { *m = DeviceAttribute{} } -func (*DeviceAttribute) ProtoMessage() {} -func (*DeviceAttribute) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{11} -} -func (m *DeviceAttribute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceAttribute) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceAttribute.Merge(m, src) -} -func (m *DeviceAttribute) XXX_Size() int { - return m.Size() -} -func (m *DeviceAttribute) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceAttribute.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceAttribute proto.InternalMessageInfo - -func (m *DeviceCapacity) Reset() { *m = DeviceCapacity{} } -func (*DeviceCapacity) ProtoMessage() {} -func (*DeviceCapacity) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{12} -} -func (m *DeviceCapacity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceCapacity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceCapacity) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceCapacity.Merge(m, src) -} -func (m *DeviceCapacity) XXX_Size() int { - return m.Size() -} -func (m *DeviceCapacity) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceCapacity.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceCapacity proto.InternalMessageInfo - -func (m *DeviceClaim) Reset() { *m = DeviceClaim{} } -func (*DeviceClaim) ProtoMessage() {} -func (*DeviceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{13} -} -func (m *DeviceClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClaim.Merge(m, src) -} -func (m *DeviceClaim) XXX_Size() int { - return m.Size() -} -func (m *DeviceClaim) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClaim.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClaim proto.InternalMessageInfo - -func (m *DeviceClaimConfiguration) Reset() { *m = DeviceClaimConfiguration{} } -func (*DeviceClaimConfiguration) ProtoMessage() {} -func (*DeviceClaimConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{14} -} -func (m *DeviceClaimConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClaimConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClaimConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClaimConfiguration.Merge(m, src) -} -func (m *DeviceClaimConfiguration) XXX_Size() int { - return m.Size() -} -func (m *DeviceClaimConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClaimConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClaimConfiguration proto.InternalMessageInfo - -func (m *DeviceClass) Reset() { *m = DeviceClass{} } -func (*DeviceClass) ProtoMessage() {} -func (*DeviceClass) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{15} -} -func (m *DeviceClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClass.Merge(m, src) -} -func (m *DeviceClass) XXX_Size() int { - return m.Size() -} -func (m *DeviceClass) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClass.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClass proto.InternalMessageInfo - -func (m *DeviceClassConfiguration) Reset() { *m = DeviceClassConfiguration{} } -func (*DeviceClassConfiguration) ProtoMessage() {} -func (*DeviceClassConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{16} -} -func (m *DeviceClassConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClassConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClassConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClassConfiguration.Merge(m, src) -} -func (m *DeviceClassConfiguration) XXX_Size() int { - return m.Size() -} -func (m *DeviceClassConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClassConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClassConfiguration proto.InternalMessageInfo - -func (m *DeviceClassList) Reset() { *m = DeviceClassList{} } -func (*DeviceClassList) ProtoMessage() {} -func (*DeviceClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{17} -} -func (m *DeviceClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClassList.Merge(m, src) -} -func (m *DeviceClassList) XXX_Size() int { - return m.Size() -} -func (m *DeviceClassList) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClassList.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClassList proto.InternalMessageInfo - -func (m *DeviceClassSpec) Reset() { *m = DeviceClassSpec{} } -func (*DeviceClassSpec) ProtoMessage() {} -func (*DeviceClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{18} -} -func (m *DeviceClassSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClassSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClassSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClassSpec.Merge(m, src) -} -func (m *DeviceClassSpec) XXX_Size() int { - return m.Size() -} -func (m *DeviceClassSpec) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClassSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClassSpec proto.InternalMessageInfo - -func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} } -func (*DeviceConfiguration) ProtoMessage() {} -func (*DeviceConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{19} -} -func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceConfiguration.Merge(m, src) -} -func (m *DeviceConfiguration) XXX_Size() int { - return m.Size() -} -func (m *DeviceConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceConfiguration.DiscardUnknown(m) -} +func (m *CELDeviceSelector) Reset() { *m = CELDeviceSelector{} } -var xxx_messageInfo_DeviceConfiguration proto.InternalMessageInfo +func (m *CapacityRequestPolicy) Reset() { *m = CapacityRequestPolicy{} } -func (m *DeviceConstraint) Reset() { *m = DeviceConstraint{} } -func (*DeviceConstraint) ProtoMessage() {} -func (*DeviceConstraint) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{20} -} -func (m *DeviceConstraint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceConstraint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceConstraint) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceConstraint.Merge(m, src) -} -func (m *DeviceConstraint) XXX_Size() int { - return m.Size() -} -func (m *DeviceConstraint) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceConstraint.DiscardUnknown(m) -} +func (m *CapacityRequestPolicyRange) Reset() { *m = CapacityRequestPolicyRange{} } -var xxx_messageInfo_DeviceConstraint proto.InternalMessageInfo +func (m *CapacityRequirements) Reset() { *m = CapacityRequirements{} } -func (m *DeviceCounterConsumption) Reset() { *m = DeviceCounterConsumption{} } -func (*DeviceCounterConsumption) ProtoMessage() {} -func (*DeviceCounterConsumption) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{21} -} -func (m *DeviceCounterConsumption) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceCounterConsumption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceCounterConsumption) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceCounterConsumption.Merge(m, src) -} -func (m *DeviceCounterConsumption) XXX_Size() int { - return m.Size() -} -func (m *DeviceCounterConsumption) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceCounterConsumption.DiscardUnknown(m) -} +func (m *Counter) Reset() { *m = Counter{} } -var xxx_messageInfo_DeviceCounterConsumption proto.InternalMessageInfo +func (m *CounterSet) Reset() { *m = CounterSet{} } -func (m *DeviceRequest) Reset() { *m = DeviceRequest{} } -func (*DeviceRequest) ProtoMessage() {} -func (*DeviceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{22} -} -func (m *DeviceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceRequest.Merge(m, src) -} -func (m *DeviceRequest) XXX_Size() int { - return m.Size() -} -func (m *DeviceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceRequest.DiscardUnknown(m) -} +func (m *Device) Reset() { *m = Device{} } -var xxx_messageInfo_DeviceRequest proto.InternalMessageInfo +func (m *DeviceAllocationConfiguration) Reset() { *m = DeviceAllocationConfiguration{} } -func (m *DeviceRequestAllocationResult) Reset() { *m = DeviceRequestAllocationResult{} } -func (*DeviceRequestAllocationResult) ProtoMessage() {} -func (*DeviceRequestAllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{23} -} -func (m *DeviceRequestAllocationResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceRequestAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceRequestAllocationResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceRequestAllocationResult.Merge(m, src) -} -func (m *DeviceRequestAllocationResult) XXX_Size() int { - return m.Size() -} -func (m *DeviceRequestAllocationResult) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceRequestAllocationResult.DiscardUnknown(m) -} +func (m *DeviceAllocationResult) Reset() { *m = DeviceAllocationResult{} } -var xxx_messageInfo_DeviceRequestAllocationResult proto.InternalMessageInfo +func (m *DeviceAttribute) Reset() { *m = DeviceAttribute{} } -func (m *DeviceSelector) Reset() { *m = DeviceSelector{} } -func (*DeviceSelector) ProtoMessage() {} -func (*DeviceSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{24} -} -func (m *DeviceSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceSelector.Merge(m, src) -} -func (m *DeviceSelector) XXX_Size() int { - return m.Size() -} -func (m *DeviceSelector) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceSelector.DiscardUnknown(m) -} +func (m *DeviceCapacity) Reset() { *m = DeviceCapacity{} } -var xxx_messageInfo_DeviceSelector proto.InternalMessageInfo +func (m *DeviceClaim) Reset() { *m = DeviceClaim{} } -func (m *DeviceSubRequest) Reset() { *m = DeviceSubRequest{} } -func (*DeviceSubRequest) ProtoMessage() {} -func (*DeviceSubRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{25} -} -func (m *DeviceSubRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceSubRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceSubRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceSubRequest.Merge(m, src) -} -func (m *DeviceSubRequest) XXX_Size() int { - return m.Size() -} -func (m *DeviceSubRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceSubRequest.DiscardUnknown(m) -} +func (m *DeviceClaimConfiguration) Reset() { *m = DeviceClaimConfiguration{} } -var xxx_messageInfo_DeviceSubRequest proto.InternalMessageInfo +func (m *DeviceClass) Reset() { *m = DeviceClass{} } -func (m *DeviceTaint) Reset() { *m = DeviceTaint{} } -func (*DeviceTaint) ProtoMessage() {} -func (*DeviceTaint) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{26} -} -func (m *DeviceTaint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceTaint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceTaint) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceTaint.Merge(m, src) -} -func (m *DeviceTaint) XXX_Size() int { - return m.Size() -} -func (m *DeviceTaint) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceTaint.DiscardUnknown(m) -} +func (m *DeviceClassConfiguration) Reset() { *m = DeviceClassConfiguration{} } -var xxx_messageInfo_DeviceTaint proto.InternalMessageInfo +func (m *DeviceClassList) Reset() { *m = DeviceClassList{} } -func (m *DeviceToleration) Reset() { *m = DeviceToleration{} } -func (*DeviceToleration) ProtoMessage() {} -func (*DeviceToleration) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{27} -} -func (m *DeviceToleration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceToleration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceToleration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceToleration.Merge(m, src) -} -func (m *DeviceToleration) XXX_Size() int { - return m.Size() -} -func (m *DeviceToleration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceToleration.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceToleration proto.InternalMessageInfo - -func (m *ExactDeviceRequest) Reset() { *m = ExactDeviceRequest{} } -func (*ExactDeviceRequest) ProtoMessage() {} -func (*ExactDeviceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{28} -} -func (m *ExactDeviceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExactDeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExactDeviceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExactDeviceRequest.Merge(m, src) -} -func (m *ExactDeviceRequest) XXX_Size() int { - return m.Size() -} -func (m *ExactDeviceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExactDeviceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ExactDeviceRequest proto.InternalMessageInfo - -func (m *NetworkDeviceData) Reset() { *m = NetworkDeviceData{} } -func (*NetworkDeviceData) ProtoMessage() {} -func (*NetworkDeviceData) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{29} -} -func (m *NetworkDeviceData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkDeviceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkDeviceData) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkDeviceData.Merge(m, src) -} -func (m *NetworkDeviceData) XXX_Size() int { - return m.Size() -} -func (m *NetworkDeviceData) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkDeviceData.DiscardUnknown(m) -} - -var xxx_messageInfo_NetworkDeviceData proto.InternalMessageInfo - -func (m *OpaqueDeviceConfiguration) Reset() { *m = OpaqueDeviceConfiguration{} } -func (*OpaqueDeviceConfiguration) ProtoMessage() {} -func (*OpaqueDeviceConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{30} -} -func (m *OpaqueDeviceConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OpaqueDeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *OpaqueDeviceConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_OpaqueDeviceConfiguration.Merge(m, src) -} -func (m *OpaqueDeviceConfiguration) XXX_Size() int { - return m.Size() -} -func (m *OpaqueDeviceConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_OpaqueDeviceConfiguration.DiscardUnknown(m) -} +func (m *DeviceClassSpec) Reset() { *m = DeviceClassSpec{} } -var xxx_messageInfo_OpaqueDeviceConfiguration proto.InternalMessageInfo +func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} } -func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } -func (*ResourceClaim) ProtoMessage() {} -func (*ResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{31} -} -func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaim.Merge(m, src) -} -func (m *ResourceClaim) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaim) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaim.DiscardUnknown(m) -} +func (m *DeviceConstraint) Reset() { *m = DeviceConstraint{} } -var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo +func (m *DeviceCounterConsumption) Reset() { *m = DeviceCounterConsumption{} } -func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } -func (*ResourceClaimConsumerReference) ProtoMessage() {} -func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{32} -} -func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimConsumerReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimConsumerReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimConsumerReference.Merge(m, src) -} -func (m *ResourceClaimConsumerReference) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimConsumerReference) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimConsumerReference.DiscardUnknown(m) -} +func (m *DeviceRequest) Reset() { *m = DeviceRequest{} } -var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo +func (m *DeviceRequestAllocationResult) Reset() { *m = DeviceRequestAllocationResult{} } -func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } -func (*ResourceClaimList) ProtoMessage() {} -func (*ResourceClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{33} -} -func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimList.Merge(m, src) -} -func (m *ResourceClaimList) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimList) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimList.DiscardUnknown(m) -} +func (m *DeviceSelector) Reset() { *m = DeviceSelector{} } -var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo +func (m *DeviceSubRequest) Reset() { *m = DeviceSubRequest{} } -func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } -func (*ResourceClaimSpec) ProtoMessage() {} -func (*ResourceClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{34} -} -func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimSpec.Merge(m, src) -} -func (m *ResourceClaimSpec) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimSpec.DiscardUnknown(m) -} +func (m *DeviceTaint) Reset() { *m = DeviceTaint{} } -var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo +func (m *DeviceToleration) Reset() { *m = DeviceToleration{} } -func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } -func (*ResourceClaimStatus) ProtoMessage() {} -func (*ResourceClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{35} -} -func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimStatus.Merge(m, src) -} -func (m *ResourceClaimStatus) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimStatus.DiscardUnknown(m) -} +func (m *ExactDeviceRequest) Reset() { *m = ExactDeviceRequest{} } -var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo +func (m *NetworkDeviceData) Reset() { *m = NetworkDeviceData{} } -func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } -func (*ResourceClaimTemplate) ProtoMessage() {} -func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{36} -} -func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimTemplate) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimTemplate.Merge(m, src) -} -func (m *ResourceClaimTemplate) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimTemplate) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimTemplate.DiscardUnknown(m) -} +func (m *OpaqueDeviceConfiguration) Reset() { *m = OpaqueDeviceConfiguration{} } -var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo +func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } -func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } -func (*ResourceClaimTemplateList) ProtoMessage() {} -func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{37} -} -func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimTemplateList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimTemplateList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimTemplateList.Merge(m, src) -} -func (m *ResourceClaimTemplateList) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimTemplateList) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimTemplateList.DiscardUnknown(m) -} +func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } -var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo +func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } -func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } -func (*ResourceClaimTemplateSpec) ProtoMessage() {} -func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{38} -} -func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimTemplateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimTemplateSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimTemplateSpec.Merge(m, src) -} -func (m *ResourceClaimTemplateSpec) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimTemplateSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimTemplateSpec.DiscardUnknown(m) -} +func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } -var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo +func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } -func (m *ResourcePool) Reset() { *m = ResourcePool{} } -func (*ResourcePool) ProtoMessage() {} -func (*ResourcePool) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{39} -} -func (m *ResourcePool) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourcePool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourcePool) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourcePool.Merge(m, src) -} -func (m *ResourcePool) XXX_Size() int { - return m.Size() -} -func (m *ResourcePool) XXX_DiscardUnknown() { - xxx_messageInfo_ResourcePool.DiscardUnknown(m) -} +func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } -var xxx_messageInfo_ResourcePool proto.InternalMessageInfo +func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } -func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } -func (*ResourceSlice) ProtoMessage() {} -func (*ResourceSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{40} -} -func (m *ResourceSlice) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceSlice) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceSlice.Merge(m, src) -} -func (m *ResourceSlice) XXX_Size() int { - return m.Size() -} -func (m *ResourceSlice) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceSlice.DiscardUnknown(m) -} +func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } -var xxx_messageInfo_ResourceSlice proto.InternalMessageInfo +func (m *ResourcePool) Reset() { *m = ResourcePool{} } -func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } -func (*ResourceSliceList) ProtoMessage() {} -func (*ResourceSliceList) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{41} -} -func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceSliceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceSliceList.Merge(m, src) -} -func (m *ResourceSliceList) XXX_Size() int { - return m.Size() -} -func (m *ResourceSliceList) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceSliceList.DiscardUnknown(m) -} +func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } -var xxx_messageInfo_ResourceSliceList proto.InternalMessageInfo +func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } -func (m *ResourceSliceSpec) Reset() { *m = ResourceSliceSpec{} } -func (*ResourceSliceSpec) ProtoMessage() {} -func (*ResourceSliceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_f4fc532aec02d243, []int{42} -} -func (m *ResourceSliceSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceSliceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceSliceSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceSliceSpec.Merge(m, src) -} -func (m *ResourceSliceSpec) XXX_Size() int { - return m.Size() -} -func (m *ResourceSliceSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceSliceSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceSliceSpec proto.InternalMessageInfo - -func init() { - proto.RegisterType((*AllocatedDeviceStatus)(nil), "k8s.io.api.resource.v1.AllocatedDeviceStatus") - proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1.AllocationResult") - proto.RegisterType((*CELDeviceSelector)(nil), "k8s.io.api.resource.v1.CELDeviceSelector") - proto.RegisterType((*CapacityRequestPolicy)(nil), "k8s.io.api.resource.v1.CapacityRequestPolicy") - proto.RegisterType((*CapacityRequestPolicyRange)(nil), "k8s.io.api.resource.v1.CapacityRequestPolicyRange") - proto.RegisterType((*CapacityRequirements)(nil), "k8s.io.api.resource.v1.CapacityRequirements") - proto.RegisterMapType((map[QualifiedName]resource.Quantity)(nil), "k8s.io.api.resource.v1.CapacityRequirements.RequestsEntry") - proto.RegisterType((*Counter)(nil), "k8s.io.api.resource.v1.Counter") - proto.RegisterType((*CounterSet)(nil), "k8s.io.api.resource.v1.CounterSet") - proto.RegisterMapType((map[string]Counter)(nil), "k8s.io.api.resource.v1.CounterSet.CountersEntry") - proto.RegisterType((*Device)(nil), "k8s.io.api.resource.v1.Device") - proto.RegisterMapType((map[QualifiedName]DeviceAttribute)(nil), "k8s.io.api.resource.v1.Device.AttributesEntry") - proto.RegisterMapType((map[QualifiedName]DeviceCapacity)(nil), "k8s.io.api.resource.v1.Device.CapacityEntry") - proto.RegisterType((*DeviceAllocationConfiguration)(nil), "k8s.io.api.resource.v1.DeviceAllocationConfiguration") - proto.RegisterType((*DeviceAllocationResult)(nil), "k8s.io.api.resource.v1.DeviceAllocationResult") - proto.RegisterType((*DeviceAttribute)(nil), "k8s.io.api.resource.v1.DeviceAttribute") - proto.RegisterType((*DeviceCapacity)(nil), "k8s.io.api.resource.v1.DeviceCapacity") - proto.RegisterType((*DeviceClaim)(nil), "k8s.io.api.resource.v1.DeviceClaim") - proto.RegisterType((*DeviceClaimConfiguration)(nil), "k8s.io.api.resource.v1.DeviceClaimConfiguration") - proto.RegisterType((*DeviceClass)(nil), "k8s.io.api.resource.v1.DeviceClass") - proto.RegisterType((*DeviceClassConfiguration)(nil), "k8s.io.api.resource.v1.DeviceClassConfiguration") - proto.RegisterType((*DeviceClassList)(nil), "k8s.io.api.resource.v1.DeviceClassList") - proto.RegisterType((*DeviceClassSpec)(nil), "k8s.io.api.resource.v1.DeviceClassSpec") - proto.RegisterType((*DeviceConfiguration)(nil), "k8s.io.api.resource.v1.DeviceConfiguration") - proto.RegisterType((*DeviceConstraint)(nil), "k8s.io.api.resource.v1.DeviceConstraint") - proto.RegisterType((*DeviceCounterConsumption)(nil), "k8s.io.api.resource.v1.DeviceCounterConsumption") - proto.RegisterMapType((map[string]Counter)(nil), "k8s.io.api.resource.v1.DeviceCounterConsumption.CountersEntry") - proto.RegisterType((*DeviceRequest)(nil), "k8s.io.api.resource.v1.DeviceRequest") - proto.RegisterType((*DeviceRequestAllocationResult)(nil), "k8s.io.api.resource.v1.DeviceRequestAllocationResult") - proto.RegisterMapType((map[QualifiedName]resource.Quantity)(nil), "k8s.io.api.resource.v1.DeviceRequestAllocationResult.ConsumedCapacityEntry") - proto.RegisterType((*DeviceSelector)(nil), "k8s.io.api.resource.v1.DeviceSelector") - proto.RegisterType((*DeviceSubRequest)(nil), "k8s.io.api.resource.v1.DeviceSubRequest") - proto.RegisterType((*DeviceTaint)(nil), "k8s.io.api.resource.v1.DeviceTaint") - proto.RegisterType((*DeviceToleration)(nil), "k8s.io.api.resource.v1.DeviceToleration") - proto.RegisterType((*ExactDeviceRequest)(nil), "k8s.io.api.resource.v1.ExactDeviceRequest") - proto.RegisterType((*NetworkDeviceData)(nil), "k8s.io.api.resource.v1.NetworkDeviceData") - proto.RegisterType((*OpaqueDeviceConfiguration)(nil), "k8s.io.api.resource.v1.OpaqueDeviceConfiguration") - proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1.ResourceClaim") - proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1.ResourceClaimConsumerReference") - proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1.ResourceClaimList") - proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1.ResourceClaimSpec") - proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1.ResourceClaimStatus") - proto.RegisterType((*ResourceClaimTemplate)(nil), "k8s.io.api.resource.v1.ResourceClaimTemplate") - proto.RegisterType((*ResourceClaimTemplateList)(nil), "k8s.io.api.resource.v1.ResourceClaimTemplateList") - proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1.ResourceClaimTemplateSpec") - proto.RegisterType((*ResourcePool)(nil), "k8s.io.api.resource.v1.ResourcePool") - proto.RegisterType((*ResourceSlice)(nil), "k8s.io.api.resource.v1.ResourceSlice") - proto.RegisterType((*ResourceSliceList)(nil), "k8s.io.api.resource.v1.ResourceSliceList") - proto.RegisterType((*ResourceSliceSpec)(nil), "k8s.io.api.resource.v1.ResourceSliceSpec") -} - -func init() { - proto.RegisterFile("k8s.io/api/resource/v1/generated.proto", fileDescriptor_f4fc532aec02d243) -} - -var fileDescriptor_f4fc532aec02d243 = []byte{ - // 3028 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5b, 0x4d, 0x6c, 0x24, 0x47, - 0xf5, 0x77, 0xcf, 0xcc, 0x8e, 0xc7, 0x6f, 0x6c, 0xaf, 0x5d, 0xbb, 0xeb, 0x4c, 0xfc, 0xff, 0xc7, - 0xe3, 0xf4, 0x92, 0xc4, 0x49, 0x76, 0xc7, 0x6b, 0x8b, 0x44, 0x51, 0x12, 0x10, 0x1e, 0xdb, 0x9b, - 0x38, 0xfb, 0x11, 0xa7, 0xc6, 0x6b, 0x36, 0x28, 0x84, 0xb4, 0x7b, 0xca, 0x76, 0xe3, 0x9e, 0xee, - 0x49, 0x77, 0x8d, 0x77, 0xcd, 0x29, 0xe2, 0x00, 0x57, 0x04, 0x12, 0x02, 0x24, 0x24, 0x94, 0x03, - 0x12, 0x17, 0x84, 0x38, 0x11, 0x04, 0x28, 0xc7, 0x08, 0x29, 0x28, 0x17, 0xa4, 0x20, 0xa1, 0x81, - 0x1d, 0x4e, 0x48, 0x08, 0x89, 0x0b, 0x07, 0x1f, 0x10, 0xaa, 0xea, 0xaa, 0xfe, 0x9a, 0x6e, 0x4f, - 0xdb, 0x59, 0xaf, 0x96, 0x9b, 0xe7, 0xd5, 0x7b, 0xbf, 0xaa, 0x7a, 0xf5, 0xbe, 0xea, 0x75, 0x19, - 0x9e, 0xdc, 0x7b, 0xc1, 0xad, 0x19, 0xf6, 0xbc, 0xd6, 0x36, 0xe6, 0x1d, 0xe2, 0xda, 0x1d, 0x47, - 0x27, 0xf3, 0xfb, 0x0b, 0xf3, 0x3b, 0xc4, 0x22, 0x8e, 0x46, 0x49, 0xb3, 0xd6, 0x76, 0x6c, 0x6a, - 0xa3, 0x29, 0x8f, 0xaf, 0xa6, 0xb5, 0x8d, 0x9a, 0xe4, 0xab, 0xed, 0x2f, 0x4c, 0x5f, 0xde, 0x31, - 0xe8, 0x6e, 0x67, 0xab, 0xa6, 0xdb, 0xad, 0xf9, 0x1d, 0x7b, 0xc7, 0x9e, 0xe7, 0xec, 0x5b, 0x9d, - 0x6d, 0xfe, 0x8b, 0xff, 0xe0, 0x7f, 0x79, 0x30, 0xd3, 0x6a, 0x68, 0x3a, 0xdd, 0x76, 0x92, 0xa6, - 0x9a, 0xfe, 0x7c, 0xc0, 0xd3, 0xd2, 0xf4, 0x5d, 0xc3, 0x22, 0xce, 0xc1, 0x7c, 0x7b, 0x6f, 0x27, - 0xba, 0xc6, 0xe3, 0x48, 0xb9, 0xf3, 0x2d, 0x42, 0xb5, 0xa4, 0xb9, 0xe6, 0xd3, 0xa4, 0x9c, 0x8e, - 0x45, 0x8d, 0x56, 0xff, 0x34, 0xcf, 0x0f, 0x12, 0x70, 0xf5, 0x5d, 0xd2, 0xd2, 0xe2, 0x72, 0xea, - 0x87, 0x79, 0xb8, 0xb0, 0x64, 0x9a, 0xb6, 0xce, 0x68, 0x2b, 0x64, 0xdf, 0xd0, 0x49, 0x83, 0x6a, - 0xb4, 0xe3, 0xa2, 0x27, 0xa1, 0xd8, 0x74, 0x8c, 0x7d, 0xe2, 0x54, 0x94, 0x59, 0x65, 0x6e, 0xa4, - 0x3e, 0xfe, 0x51, 0xb7, 0x3a, 0xd4, 0xeb, 0x56, 0x8b, 0x2b, 0x9c, 0x8a, 0xc5, 0x28, 0x9a, 0x85, - 0x42, 0xdb, 0xb6, 0xcd, 0x4a, 0x8e, 0x73, 0x8d, 0x0a, 0xae, 0xc2, 0xba, 0x6d, 0x9b, 0x98, 0x8f, - 0x70, 0x24, 0x8e, 0x5c, 0xc9, 0xc7, 0x90, 0x38, 0x15, 0x8b, 0x51, 0xf4, 0x04, 0x0c, 0xbb, 0xbb, - 0x9a, 0x43, 0xd6, 0x56, 0x2a, 0xc3, 0x9c, 0xb1, 0xdc, 0xeb, 0x56, 0x87, 0x1b, 0x1e, 0x09, 0xcb, - 0x31, 0xa4, 0x03, 0xe8, 0xb6, 0xd5, 0x34, 0xa8, 0x61, 0x5b, 0x6e, 0xa5, 0x30, 0x9b, 0x9f, 0x2b, - 0x2f, 0xce, 0xd7, 0x02, 0x3b, 0xf0, 0xf7, 0x5f, 0x6b, 0xef, 0xed, 0x30, 0x82, 0x5b, 0x63, 0x6a, - 0xae, 0xed, 0x2f, 0xd4, 0x96, 0xa5, 0x5c, 0x1d, 0x89, 0x35, 0x80, 0x4f, 0x72, 0x71, 0x08, 0x16, - 0x5d, 0x83, 0x42, 0x53, 0xa3, 0x5a, 0xe5, 0xcc, 0xac, 0x32, 0x57, 0x5e, 0xbc, 0x9c, 0x0a, 0x2f, - 0xd4, 0x5b, 0xc3, 0xda, 0x9d, 0xd5, 0xbb, 0x94, 0x58, 0x2e, 0x03, 0x2f, 0x31, 0x05, 0xac, 0x68, - 0x54, 0xc3, 0x1c, 0x04, 0xbd, 0x05, 0x65, 0x8b, 0xd0, 0x3b, 0xb6, 0xb3, 0xc7, 0x88, 0x95, 0x22, - 0xc7, 0x7c, 0xba, 0x96, 0x6c, 0xba, 0xb5, 0x9b, 0x82, 0x95, 0x2b, 0x85, 0x09, 0xd4, 0xcf, 0xf6, - 0xba, 0xd5, 0xf2, 0xcd, 0x00, 0x01, 0x87, 0xe1, 0xd4, 0xdf, 0xe4, 0x60, 0x42, 0x1c, 0xa1, 0x61, - 0x5b, 0x98, 0xb8, 0x1d, 0x93, 0xa2, 0x37, 0x61, 0xd8, 0xd3, 0xaa, 0xcb, 0x8f, 0xaf, 0xbc, 0x58, - 0x4b, 0x9b, 0xce, 0x9b, 0x27, 0x0e, 0x50, 0x3f, 0x2b, 0x14, 0x34, 0xec, 0x8d, 0xbb, 0x58, 0xe2, - 0xa1, 0x4d, 0x18, 0xb5, 0xec, 0x26, 0x69, 0x10, 0x93, 0xe8, 0xd4, 0x76, 0xf8, 0xa1, 0x96, 0x17, - 0x67, 0xc3, 0xf8, 0xcc, 0x85, 0xf8, 0x56, 0x42, 0x7c, 0xf5, 0x89, 0x5e, 0xb7, 0x3a, 0x1a, 0xa6, - 0xe0, 0x08, 0x0e, 0xea, 0xc0, 0x39, 0xcd, 0x5f, 0xc5, 0x86, 0xd1, 0x22, 0x2e, 0xd5, 0x5a, 0x6d, - 0x71, 0x02, 0xcf, 0x64, 0x3b, 0x60, 0x26, 0x56, 0x7f, 0xa4, 0xd7, 0xad, 0x9e, 0x5b, 0xea, 0x87, - 0xc2, 0x49, 0xf8, 0xea, 0x2b, 0x30, 0xb9, 0xbc, 0x7a, 0x5d, 0x98, 0xbe, 0x5c, 0xcb, 0x22, 0x00, - 0xb9, 0xdb, 0x76, 0x88, 0xcb, 0xce, 0x53, 0x38, 0x80, 0x6f, 0x32, 0xab, 0xfe, 0x08, 0x0e, 0x71, - 0xa9, 0x1f, 0xe4, 0xe0, 0xc2, 0xb2, 0xd6, 0xd6, 0x74, 0x83, 0x1e, 0x60, 0xf2, 0x6e, 0x87, 0xb8, - 0x74, 0xdd, 0x36, 0x0d, 0xfd, 0x00, 0xdd, 0x62, 0x87, 0xb1, 0xad, 0x75, 0x4c, 0x9a, 0x70, 0x18, - 0x7d, 0xbb, 0x09, 0x4e, 0xe7, 0x8d, 0x8e, 0x66, 0x51, 0x83, 0x1e, 0x78, 0x8e, 0xb0, 0xe2, 0x41, - 0x60, 0x89, 0x85, 0x08, 0x94, 0xf7, 0x35, 0xd3, 0x68, 0x6e, 0x6a, 0x66, 0x87, 0xb8, 0x95, 0x3c, - 0xf7, 0x84, 0xe3, 0x42, 0x9f, 0x13, 0xbb, 0x2a, 0x6f, 0x06, 0x50, 0x38, 0x8c, 0x8b, 0xb6, 0x00, - 0xf8, 0x4f, 0xac, 0x59, 0x3b, 0xa4, 0x52, 0xe0, 0x1b, 0x58, 0x4c, 0xb3, 0xa6, 0x44, 0x05, 0x70, - 0xc9, 0xfa, 0x38, 0xd3, 0xdd, 0xa6, 0x8f, 0x84, 0x43, 0xa8, 0xea, 0x7b, 0x39, 0x98, 0x4e, 0x17, - 0x45, 0x6b, 0x90, 0x6f, 0x19, 0xd6, 0x09, 0x95, 0x37, 0xdc, 0xeb, 0x56, 0xf3, 0x37, 0x0c, 0x0b, - 0x33, 0x0c, 0x0e, 0xa5, 0xdd, 0xe5, 0xd1, 0xea, 0xa4, 0x50, 0xda, 0x5d, 0xcc, 0x30, 0xd0, 0x75, - 0x28, 0xb8, 0x94, 0xb4, 0x85, 0x03, 0x1c, 0x17, 0x8b, 0x07, 0x89, 0x06, 0x25, 0x6d, 0xcc, 0x51, - 0xd4, 0xff, 0x28, 0x70, 0x3e, 0xac, 0x02, 0xc3, 0x21, 0x2d, 0x62, 0x51, 0x17, 0x1d, 0x40, 0xc9, - 0xf1, 0x54, 0xc2, 0x7c, 0x99, 0x9d, 0xf1, 0x8b, 0x59, 0xb4, 0x2f, 0xe5, 0x6b, 0x42, 0x9f, 0xee, - 0xaa, 0x45, 0x9d, 0x83, 0xfa, 0xe3, 0xe2, 0xbc, 0x4b, 0x92, 0xfc, 0xcd, 0xbf, 0x54, 0xc7, 0xde, - 0xe8, 0x68, 0xa6, 0xb1, 0x6d, 0x90, 0xe6, 0x4d, 0xad, 0x45, 0xb0, 0x3f, 0xdd, 0xf4, 0x1e, 0x8c, - 0x45, 0xa4, 0xd1, 0x04, 0xe4, 0xf7, 0xc8, 0x81, 0xe7, 0x10, 0x98, 0xfd, 0x89, 0x56, 0xe0, 0xcc, - 0x3e, 0xb3, 0x93, 0x93, 0x69, 0x14, 0x7b, 0xc2, 0x2f, 0xe6, 0x5e, 0x50, 0xd4, 0xb7, 0x61, 0x78, - 0xd9, 0xee, 0x58, 0x94, 0x38, 0xa8, 0x21, 0x41, 0x4f, 0x76, 0xe2, 0x63, 0x62, 0x8f, 0x67, 0xb8, - 0x05, 0x8b, 0x39, 0xd4, 0x7f, 0x28, 0x00, 0x62, 0x82, 0x06, 0xa1, 0x2c, 0x6f, 0x59, 0x5a, 0x8b, - 0x08, 0xe7, 0xf6, 0xf3, 0x16, 0xd7, 0x00, 0x1f, 0x41, 0x6f, 0x43, 0x49, 0xf7, 0xf8, 0xdd, 0x4a, - 0x8e, 0x2b, 0xfe, 0x4a, 0xaa, 0xe2, 0x7d, 0x5c, 0xf9, 0xa7, 0x50, 0xf7, 0x84, 0x54, 0xb7, 0x24, - 0x63, 0x1f, 0x73, 0xfa, 0x2d, 0x18, 0x8b, 0x30, 0x27, 0x68, 0xf7, 0xb9, 0xa8, 0x76, 0xab, 0x03, - 0xe6, 0x0f, 0xab, 0xf3, 0xdf, 0x25, 0x10, 0x09, 0x36, 0xc3, 0x56, 0x5d, 0x00, 0x8d, 0x52, 0xc7, - 0xd8, 0xea, 0x50, 0x22, 0x37, 0x3b, 0x20, 0x63, 0xd4, 0x96, 0x7c, 0x01, 0x6f, 0xab, 0x17, 0x65, - 0x7c, 0x0c, 0x06, 0xfa, 0x6d, 0x2b, 0x34, 0x0d, 0xda, 0x83, 0x92, 0x2e, 0x0c, 0x56, 0x04, 0xaf, - 0x4b, 0x03, 0xa6, 0x94, 0xf6, 0x1d, 0x33, 0x65, 0x49, 0x4e, 0x30, 0x65, 0x39, 0x01, 0xda, 0x87, - 0x09, 0xdd, 0xb6, 0xdc, 0x4e, 0x8b, 0xb8, 0x52, 0xe9, 0xa2, 0x76, 0xb8, 0x72, 0xf4, 0xa4, 0x82, - 0x7b, 0x99, 0x0b, 0xb7, 0x79, 0xf1, 0x50, 0x11, 0x13, 0x4f, 0x2c, 0xc7, 0x10, 0x71, 0xdf, 0x1c, - 0x68, 0x0e, 0x4a, 0x2c, 0xcb, 0xb1, 0xd5, 0xf0, 0x54, 0x36, 0x52, 0x1f, 0x65, 0x4b, 0xbe, 0x29, - 0x68, 0xd8, 0x1f, 0xed, 0xcb, 0xab, 0xc5, 0xfb, 0x94, 0x57, 0xe7, 0xa0, 0xa4, 0x99, 0x26, 0x63, - 0x70, 0x79, 0x5d, 0x55, 0xf2, 0x56, 0xb0, 0x24, 0x68, 0xd8, 0x1f, 0x45, 0xd7, 0xa0, 0x48, 0x35, - 0xc3, 0xa2, 0x6e, 0xa5, 0xc4, 0x35, 0x73, 0xf1, 0x68, 0xcd, 0x6c, 0x30, 0xde, 0xa0, 0x9a, 0xe3, - 0x3f, 0x5d, 0x2c, 0x20, 0xd0, 0x02, 0x94, 0xb7, 0x0c, 0xab, 0xe9, 0x6e, 0xd8, 0x0c, 0xbc, 0x32, - 0xc2, 0x67, 0xe6, 0x95, 0x4c, 0x3d, 0x20, 0xe3, 0x30, 0x0f, 0x5a, 0x86, 0x49, 0xf6, 0xd3, 0xb0, - 0x76, 0x82, 0xaa, 0xac, 0x02, 0xb3, 0xf9, 0xb9, 0x91, 0xfa, 0x85, 0x5e, 0xb7, 0x3a, 0x59, 0x8f, - 0x0f, 0xe2, 0x7e, 0x7e, 0x74, 0x1b, 0x2a, 0x82, 0x78, 0x55, 0x33, 0xcc, 0x8e, 0x43, 0x42, 0x58, - 0x65, 0x8e, 0xf5, 0xff, 0xbd, 0x6e, 0xb5, 0x52, 0x4f, 0xe1, 0xc1, 0xa9, 0xd2, 0x0c, 0x99, 0x15, - 0x10, 0x77, 0x6e, 0x74, 0x4c, 0x6a, 0xb4, 0xcd, 0x50, 0xcd, 0xe4, 0x56, 0x46, 0xf9, 0xf6, 0x38, - 0xf2, 0x52, 0x0a, 0x0f, 0x4e, 0x95, 0x9e, 0xde, 0x86, 0xb3, 0x31, 0x6f, 0x4a, 0x88, 0x05, 0x5f, - 0x88, 0xc6, 0x82, 0xa7, 0x06, 0x14, 0x74, 0x12, 0x2f, 0x14, 0x13, 0xa6, 0x75, 0x18, 0x8b, 0xb8, - 0x50, 0xc2, 0x2c, 0x2f, 0x47, 0x67, 0x79, 0x72, 0x80, 0x73, 0xc8, 0x84, 0x13, 0x0a, 0x3c, 0xdf, - 0xce, 0xc1, 0x63, 0xf1, 0xa2, 0x72, 0xd9, 0xb6, 0xb6, 0x8d, 0x9d, 0x8e, 0xc3, 0x7f, 0xa0, 0x2f, - 0x41, 0xd1, 0x03, 0x12, 0x11, 0x69, 0x4e, 0x9a, 0x50, 0x83, 0x53, 0x0f, 0xbb, 0xd5, 0xa9, 0xb8, - 0xa8, 0x37, 0x82, 0x85, 0x1c, 0xb3, 0x69, 0x3f, 0x27, 0xe6, 0xf8, 0xa1, 0x8e, 0x86, 0x73, 0x5a, - 0x90, 0xc2, 0xd0, 0x37, 0xe0, 0x5c, 0x53, 0xf8, 0x71, 0x68, 0x09, 0x22, 0x67, 0x3f, 0x3b, 0xc8, - 0xf5, 0x43, 0x22, 0xf5, 0xff, 0x13, 0xab, 0x3c, 0x97, 0x30, 0x88, 0x93, 0x26, 0x51, 0xff, 0xa4, - 0xc0, 0x54, 0x72, 0x79, 0x8d, 0xde, 0x81, 0x61, 0x87, 0xff, 0x25, 0x73, 0xfa, 0x73, 0x47, 0x2f, - 0x45, 0xec, 0x2c, 0xbd, 0x4c, 0xf7, 0x7e, 0xbb, 0x58, 0xc2, 0xa2, 0xaf, 0x42, 0x51, 0xe7, 0xab, - 0x11, 0xe1, 0xfc, 0xb9, 0xac, 0x17, 0x80, 0xe8, 0xae, 0x7d, 0xf7, 0xf6, 0xc8, 0x58, 0x80, 0xaa, - 0x3f, 0x53, 0xe0, 0x6c, 0xcc, 0xd2, 0xd0, 0x0c, 0xe4, 0x0d, 0x8b, 0x72, 0xcb, 0xc9, 0x7b, 0x07, - 0xb2, 0x66, 0x51, 0x2f, 0x07, 0xb3, 0x01, 0xf4, 0x38, 0x14, 0xb6, 0xd8, 0x55, 0x31, 0xcf, 0x9d, - 0x65, 0xac, 0xd7, 0xad, 0x8e, 0xd4, 0x6d, 0xdb, 0xf4, 0x38, 0xf8, 0x10, 0x7a, 0x0a, 0x8a, 0x2e, - 0x75, 0x0c, 0x6b, 0x87, 0x17, 0x9a, 0x23, 0x5e, 0xc0, 0x68, 0x70, 0x8a, 0xc7, 0x26, 0x86, 0xd1, - 0x33, 0x30, 0xbc, 0x4f, 0x1c, 0x5e, 0x9e, 0x7b, 0x61, 0x95, 0x87, 0xc1, 0x4d, 0x8f, 0xe4, 0xb1, - 0x4a, 0x06, 0xf5, 0x63, 0x05, 0xc6, 0xa3, 0xf6, 0x7a, 0x2a, 0x15, 0x06, 0xda, 0x86, 0x31, 0x27, - 0x5c, 0xbc, 0x0a, 0x1f, 0xba, 0x7c, 0xac, 0x62, 0xb9, 0x3e, 0xd9, 0xeb, 0x56, 0xc7, 0xa2, 0x45, - 0x70, 0x14, 0x56, 0xfd, 0x71, 0x0e, 0xca, 0x62, 0x3f, 0xa6, 0x66, 0xb4, 0x50, 0xa3, 0xaf, 0x42, - 0x7c, 0x22, 0x93, 0x35, 0x05, 0xd5, 0x49, 0x82, 0xe3, 0x7c, 0x0d, 0xca, 0x2c, 0x99, 0x51, 0xc7, - 0xcb, 0x08, 0x9e, 0x11, 0xcd, 0x0d, 0x74, 0x18, 0x21, 0x10, 0xdc, 0x2b, 0x02, 0x9a, 0x8b, 0xc3, - 0x88, 0xe8, 0xb6, 0x6f, 0xa0, 0xf9, 0x4c, 0x79, 0x98, 0x6d, 0x35, 0x9b, 0x6d, 0x7e, 0xa8, 0x40, - 0x25, 0x4d, 0x28, 0x12, 0x3a, 0x94, 0x93, 0x84, 0x8e, 0xdc, 0x83, 0x08, 0x1d, 0xbf, 0x56, 0x42, - 0x47, 0xec, 0xba, 0xe8, 0x1d, 0x28, 0xb1, 0x3b, 0x2e, 0xef, 0x49, 0x78, 0x26, 0x7b, 0x25, 0xdb, - 0x8d, 0xf8, 0xf5, 0xad, 0xaf, 0x13, 0x9d, 0xde, 0x20, 0x54, 0x0b, 0x2e, 0xb0, 0x01, 0x0d, 0xfb, - 0xa8, 0x68, 0x0d, 0x0a, 0x6e, 0x9b, 0xe8, 0xd9, 0xb2, 0x0b, 0x5f, 0x54, 0xa3, 0x4d, 0xf4, 0xa0, - 0x9a, 0x64, 0xbf, 0x30, 0x87, 0x50, 0xbf, 0x1f, 0xd6, 0xbf, 0xeb, 0x46, 0xf5, 0x9f, 0xa2, 0x55, - 0xe5, 0x41, 0x68, 0xf5, 0x03, 0x3f, 0x68, 0xf1, 0x85, 0x5d, 0x37, 0x5c, 0x8a, 0xde, 0xea, 0xd3, - 0x6c, 0x2d, 0x9b, 0x66, 0x99, 0x34, 0xd7, 0xab, 0xef, 0x45, 0x92, 0x12, 0xd2, 0xea, 0xab, 0x70, - 0xc6, 0xa0, 0xa4, 0x25, 0xfd, 0xe7, 0x62, 0x06, 0xb5, 0x06, 0xc1, 0x65, 0x8d, 0x49, 0x62, 0x0f, - 0x40, 0xfd, 0x6e, 0x2e, 0xb2, 0x76, 0xa6, 0x6e, 0xf4, 0x65, 0x18, 0x71, 0x45, 0x99, 0x27, 0x3d, - 0x7f, 0x40, 0xc2, 0xf6, 0xab, 0xc6, 0x49, 0x31, 0xc9, 0x88, 0xa4, 0xb8, 0x38, 0xc0, 0x0a, 0xf9, - 0x66, 0x2e, 0xa3, 0x6f, 0xc6, 0x8e, 0x39, 0xcd, 0x37, 0xd1, 0x75, 0x38, 0x4f, 0xee, 0x52, 0x62, - 0x35, 0x49, 0x13, 0x0b, 0x1c, 0x5e, 0x1b, 0x7b, 0xe1, 0xbe, 0xd2, 0xeb, 0x56, 0xcf, 0xaf, 0x26, - 0x8c, 0xe3, 0x44, 0x29, 0xd5, 0x84, 0xa4, 0xc3, 0x47, 0xb7, 0xa0, 0x68, 0xb7, 0xb5, 0x77, 0xfd, - 0xf0, 0xbe, 0x90, 0xb6, 0xfc, 0xd7, 0x39, 0x57, 0x92, 0x71, 0x01, 0x5b, 0xbb, 0x37, 0x8c, 0x05, - 0x98, 0xfa, 0x77, 0x05, 0x26, 0xe2, 0x81, 0xee, 0x18, 0xf1, 0x64, 0x1d, 0xc6, 0x5b, 0x1a, 0xd5, - 0x77, 0xfd, 0x84, 0x29, 0x7a, 0xa6, 0x73, 0xbd, 0x6e, 0x75, 0xfc, 0x46, 0x64, 0xe4, 0xb0, 0x5b, - 0x45, 0x57, 0x3b, 0xa6, 0x79, 0x10, 0xbd, 0xce, 0xc4, 0xe4, 0xd1, 0x9b, 0x30, 0xd9, 0x34, 0x5c, - 0x6a, 0x58, 0x3a, 0x0d, 0x40, 0xbd, 0x26, 0xeb, 0xb3, 0xac, 0x60, 0x5e, 0x89, 0x0f, 0xa6, 0xe0, - 0xf6, 0xa3, 0xa8, 0x3f, 0xca, 0xf9, 0x3e, 0xdc, 0x77, 0x01, 0x42, 0x8b, 0x00, 0xba, 0x7f, 0xe3, - 0x8d, 0xb7, 0xc7, 0x82, 0xbb, 0x30, 0x0e, 0x71, 0x21, 0xb3, 0xef, 0x36, 0xfd, 0xc5, 0xe3, 0x5e, - 0xbc, 0x1e, 0x9a, 0xbb, 0xf5, 0x3f, 0x15, 0x18, 0x8b, 0x64, 0xd2, 0x0c, 0x57, 0xec, 0x37, 0x60, - 0x98, 0xdc, 0xd5, 0x74, 0x6a, 0xca, 0xb2, 0xe0, 0x99, 0xb4, 0x09, 0x57, 0x19, 0x5b, 0x34, 0x51, - 0xf3, 0x06, 0xe0, 0xaa, 0x27, 0x8e, 0x25, 0x0e, 0xda, 0x85, 0xf1, 0x6d, 0xc3, 0x71, 0xe9, 0xd2, - 0xbe, 0x66, 0x98, 0xda, 0x96, 0x49, 0x44, 0x26, 0x1d, 0x90, 0xa5, 0x1b, 0x9d, 0x2d, 0x89, 0x3b, - 0x25, 0x16, 0x3a, 0x7e, 0x35, 0x82, 0x83, 0x63, 0xb8, 0xea, 0x1f, 0x8b, 0xb2, 0xa6, 0x4f, 0x29, - 0x44, 0xd1, 0xd3, 0xac, 0xa0, 0xe5, 0x43, 0x42, 0x07, 0xa1, 0xca, 0x94, 0x93, 0xb1, 0x1c, 0x0f, - 0x7d, 0x59, 0xc8, 0x65, 0xfa, 0xb2, 0x90, 0xcf, 0xf0, 0x65, 0xa1, 0x70, 0xe4, 0x97, 0x85, 0x05, - 0x28, 0x6b, 0xcd, 0x96, 0x61, 0x2d, 0xe9, 0x3a, 0x71, 0x5d, 0x5e, 0x30, 0x8a, 0xbb, 0xe8, 0x52, - 0x40, 0xc6, 0x61, 0x1e, 0x56, 0xfe, 0x50, 0xdb, 0x24, 0x8e, 0xb8, 0xdf, 0x15, 0xb3, 0x28, 0x76, - 0xc3, 0x17, 0x08, 0xca, 0x9f, 0x80, 0xe6, 0xe2, 0x30, 0x62, 0xf2, 0x65, 0x77, 0xf8, 0x3e, 0x5e, - 0x76, 0x4b, 0x9f, 0xe9, 0xb2, 0xfb, 0x5a, 0xf0, 0x31, 0x66, 0x84, 0xeb, 0xf6, 0x4a, 0xe8, 0x63, - 0xcc, 0x61, 0xb7, 0xfa, 0x78, 0xda, 0x07, 0x27, 0x7a, 0xd0, 0x26, 0x6e, 0xed, 0x56, 0xf8, 0x8b, - 0xcd, 0xfb, 0x8a, 0xdf, 0x7c, 0x69, 0xca, 0x9a, 0x97, 0xdf, 0xeb, 0xcb, 0x8b, 0xd7, 0x4e, 0x74, - 0xed, 0xa9, 0x2d, 0xc7, 0xd0, 0xbc, 0x80, 0xf0, 0x74, 0xac, 0x2f, 0xd3, 0x4c, 0x6f, 0x0c, 0xf5, - 0xad, 0x67, 0xda, 0x85, 0x0b, 0x89, 0xa8, 0xa7, 0xda, 0xf3, 0xdc, 0x94, 0x17, 0x13, 0xbf, 0x5b, - 0xb3, 0x02, 0x79, 0x9d, 0x98, 0x22, 0x6f, 0xa5, 0x7e, 0x23, 0xea, 0xfb, 0x62, 0xe1, 0xb5, 0xa6, - 0x97, 0x57, 0xaf, 0x63, 0x26, 0xae, 0x7e, 0xab, 0x20, 0x33, 0x55, 0xe0, 0xec, 0x19, 0x62, 0xd4, - 0x12, 0x9c, 0x6d, 0x06, 0x09, 0x9d, 0xe7, 0x65, 0xcf, 0x45, 0x1f, 0x11, 0xcc, 0xe1, 0x0a, 0x84, - 0xcb, 0xc5, 0xf9, 0xa3, 0x25, 0x49, 0xfe, 0x3e, 0x96, 0x24, 0x9b, 0x30, 0x1e, 0x7c, 0xbe, 0xb9, - 0x61, 0x37, 0xa5, 0xcf, 0xd7, 0x64, 0x08, 0x5b, 0x8a, 0x8c, 0x1e, 0x76, 0xab, 0xe7, 0xe3, 0x37, - 0x5b, 0x46, 0xc7, 0x31, 0x14, 0x74, 0x11, 0xce, 0xf0, 0xac, 0xc1, 0xa3, 0x42, 0x3e, 0x28, 0xbe, - 0x78, 0xd8, 0xc7, 0xde, 0xd8, 0xe9, 0x47, 0x83, 0xcd, 0x50, 0x2f, 0x74, 0x98, 0x9f, 0xfd, 0xa5, - 0xe3, 0x34, 0xf9, 0xbd, 0x9a, 0xc3, 0x1f, 0xf1, 0xb1, 0xd4, 0x7f, 0xf9, 0xf7, 0x08, 0xde, 0x9e, - 0x43, 0x8f, 0x85, 0x8c, 0xb9, 0x5e, 0x16, 0xcb, 0xca, 0x5f, 0x23, 0x07, 0x9e, 0x65, 0x5f, 0x0c, - 0x5b, 0xf6, 0x48, 0xca, 0x35, 0xf7, 0x25, 0x28, 0x92, 0xed, 0x6d, 0xa2, 0x53, 0x11, 0x99, 0x65, - 0xe3, 0xb7, 0xb8, 0xca, 0xa9, 0x87, 0xac, 0xf0, 0x08, 0xa6, 0xf4, 0x88, 0x58, 0x88, 0x30, 0xfb, - 0xa0, 0x46, 0x8b, 0x2c, 0x35, 0x9b, 0xa4, 0x29, 0x3e, 0x26, 0x1d, 0xe7, 0xdb, 0x1e, 0x6f, 0x1a, - 0x6c, 0x48, 0x00, 0x1c, 0x60, 0xbd, 0x58, 0xfa, 0xc1, 0x4f, 0xaa, 0x43, 0xef, 0xfd, 0x79, 0x76, - 0x48, 0x7d, 0x3f, 0x27, 0x8d, 0x3f, 0x50, 0xf7, 0xa0, 0x8d, 0xbf, 0x0a, 0x25, 0xbb, 0xcd, 0x78, - 0x6d, 0x99, 0x95, 0x2e, 0xc9, 0xea, 0xe2, 0x75, 0x41, 0x3f, 0xec, 0x56, 0x2b, 0x71, 0x58, 0x39, - 0x86, 0x7d, 0xe9, 0x40, 0x85, 0xf9, 0x4c, 0x2a, 0x2c, 0x1c, 0x5f, 0x85, 0xcb, 0x30, 0x19, 0x98, - 0x4e, 0x83, 0xe8, 0xb6, 0xd5, 0x74, 0x85, 0xf5, 0xf2, 0xcc, 0xb1, 0x11, 0x1f, 0xc4, 0xfd, 0xfc, - 0xea, 0x0f, 0x0b, 0x80, 0xfa, 0x0b, 0x8d, 0xa4, 0x08, 0xa0, 0x7c, 0x96, 0x08, 0x90, 0x3b, 0xd5, - 0x08, 0x90, 0xbf, 0xbf, 0x11, 0xa0, 0x70, 0x44, 0x04, 0x78, 0x18, 0x4b, 0x88, 0xd3, 0x0a, 0x1a, - 0x3f, 0x57, 0x60, 0xb2, 0xef, 0x15, 0x02, 0x7a, 0x09, 0xc6, 0x0c, 0x56, 0x08, 0x6f, 0x6b, 0xe2, - 0xca, 0xe6, 0x19, 0xc6, 0x05, 0xb1, 0xcc, 0xb1, 0xb5, 0xf0, 0x20, 0x8e, 0xf2, 0xa2, 0x47, 0x21, - 0x6f, 0xb4, 0x65, 0xaf, 0x96, 0xe7, 0xaa, 0xb5, 0x75, 0x17, 0x33, 0x1a, 0x33, 0xb9, 0x5d, 0xcd, - 0x69, 0xde, 0xd1, 0x1c, 0xe6, 0xc9, 0x0e, 0xd3, 0x6e, 0x3e, 0x6a, 0x72, 0xaf, 0x46, 0x87, 0x71, - 0x9c, 0x5f, 0xfd, 0xa9, 0x02, 0x8f, 0xa6, 0x5e, 0xe5, 0x32, 0xbf, 0x64, 0xd1, 0x00, 0xda, 0x9a, - 0xa3, 0xb5, 0x88, 0xb8, 0xa3, 0x9c, 0xe0, 0xe5, 0x87, 0x7f, 0x09, 0x5a, 0xf7, 0x81, 0x70, 0x08, - 0x54, 0xfd, 0x5e, 0x0e, 0xc6, 0xe4, 0x05, 0xd6, 0xeb, 0xdd, 0x9d, 0x7e, 0x63, 0xe7, 0x5a, 0xa4, - 0xb1, 0x93, 0x5a, 0x52, 0x44, 0x96, 0x95, 0xd6, 0xda, 0x41, 0x0d, 0x28, 0xba, 0xfc, 0x7d, 0xd0, - 0xa0, 0x0e, 0x7a, 0x14, 0x8e, 0x8b, 0x04, 0x8a, 0xf7, 0x7e, 0x63, 0x01, 0xa5, 0xf6, 0x14, 0x98, - 0x89, 0xf0, 0x8b, 0x42, 0xcc, 0xc1, 0x64, 0x9b, 0x38, 0xc4, 0xd2, 0x09, 0xba, 0x04, 0x25, 0xad, - 0x6d, 0xbc, 0xe2, 0xd8, 0x9d, 0xb6, 0x38, 0x45, 0xff, 0xf6, 0xb7, 0xb4, 0xbe, 0xc6, 0xe9, 0xd8, - 0xe7, 0x60, 0xdc, 0x72, 0x2d, 0xc2, 0x96, 0x42, 0x9d, 0x4e, 0x8f, 0x8e, 0x7d, 0x0e, 0xbf, 0x2e, - 0x2a, 0xa4, 0xd6, 0x45, 0x75, 0xc8, 0x77, 0x8c, 0xa6, 0x68, 0x34, 0x5f, 0x91, 0xc9, 0xe3, 0x56, - 0xd6, 0x42, 0x98, 0x09, 0xab, 0xbf, 0x55, 0x60, 0x32, 0xb2, 0xc9, 0x07, 0xd0, 0x7d, 0x7a, 0x2d, - 0xda, 0x7d, 0x7a, 0x22, 0xd3, 0x61, 0xa5, 0xf4, 0x9f, 0xf4, 0xd8, 0xf2, 0x79, 0x03, 0xea, 0x66, - 0xfc, 0x99, 0xd1, 0xc5, 0x0c, 0x4d, 0xdc, 0xf4, 0xb7, 0x45, 0xea, 0xaf, 0x72, 0x70, 0x2e, 0xc1, - 0x72, 0xd0, 0x6d, 0x80, 0x20, 0x68, 0x8b, 0xa9, 0x52, 0x23, 0x69, 0xdf, 0x47, 0x12, 0xfe, 0xf2, - 0x24, 0x44, 0x0d, 0x61, 0xa1, 0x16, 0x94, 0x1d, 0xe2, 0x12, 0x67, 0x9f, 0x34, 0xaf, 0xf2, 0xdc, - 0xcf, 0x14, 0xf5, 0x7c, 0x26, 0x45, 0xf5, 0x59, 0x69, 0x10, 0xb2, 0x71, 0x00, 0x89, 0xc3, 0xf8, - 0xe8, 0x76, 0xa0, 0x30, 0xef, 0xeb, 0xf3, 0xe5, 0x01, 0xbb, 0x88, 0xbe, 0xca, 0x3b, 0x42, 0x75, - 0x7f, 0x50, 0xe0, 0x42, 0x64, 0x79, 0x1b, 0xa4, 0xd5, 0x36, 0x35, 0x4a, 0x1e, 0x40, 0x88, 0x69, - 0x44, 0x42, 0xcc, 0x42, 0x26, 0xed, 0xc9, 0xe5, 0xa5, 0x76, 0x91, 0x3f, 0x56, 0xe0, 0xd1, 0x44, - 0x89, 0x07, 0xe0, 0x38, 0x38, 0xea, 0x38, 0x97, 0x8f, 0xb5, 0xa3, 0x14, 0x07, 0xfa, 0x7d, 0xda, - 0x7e, 0xb8, 0x27, 0xfd, 0x6f, 0xe5, 0x01, 0xf5, 0x17, 0x0a, 0x8c, 0x4a, 0xce, 0x75, 0xdb, 0x36, - 0x33, 0x5c, 0x2e, 0x17, 0x01, 0xc4, 0xeb, 0x53, 0xf9, 0x15, 0x25, 0x1f, 0xac, 0xf8, 0x15, 0x7f, - 0x04, 0x87, 0xb8, 0xd0, 0x6b, 0x80, 0xe4, 0xda, 0x1a, 0xa6, 0xec, 0x09, 0xf2, 0x90, 0x9e, 0xaf, - 0x4f, 0x0b, 0x59, 0x84, 0xfb, 0x38, 0x70, 0x82, 0x94, 0xfa, 0x3b, 0x25, 0xc8, 0xbd, 0x9c, 0xfc, - 0xf0, 0xe9, 0x9c, 0x2f, 0x2b, 0x55, 0xe7, 0xe1, 0x0c, 0xc2, 0x39, 0x1f, 0xc2, 0x0c, 0xc2, 0xd7, - 0x95, 0xe2, 0x00, 0xbf, 0x2c, 0xc4, 0xd6, 0xcf, 0x0d, 0x3f, 0x6b, 0x75, 0x76, 0x35, 0xf4, 0xce, - 0xb8, 0xbc, 0xf8, 0xb9, 0x41, 0x0b, 0x61, 0x46, 0x99, 0xd8, 0x33, 0x0c, 0x3f, 0xc8, 0xc9, 0x1f, - 0xeb, 0x41, 0x4e, 0xe1, 0x14, 0x1e, 0xe4, 0x9c, 0x39, 0xf2, 0x41, 0xce, 0x5a, 0x90, 0x2d, 0xbc, - 0xdb, 0xc3, 0xcc, 0xd1, 0xe9, 0xf5, 0x88, 0x57, 0xbb, 0x18, 0xa6, 0xda, 0xc4, 0xf1, 0xc8, 0xc1, - 0xda, 0x98, 0x27, 0x7a, 0x6f, 0x82, 0xa6, 0x7b, 0xdd, 0xea, 0xd4, 0x7a, 0x22, 0x07, 0x4e, 0x91, - 0x44, 0x5b, 0x30, 0xce, 0x5b, 0x7c, 0x4d, 0xff, 0x45, 0x95, 0xf7, 0x6e, 0x48, 0x1d, 0xfc, 0x4c, - 0x2e, 0xe8, 0x3c, 0x37, 0x22, 0x08, 0x38, 0x86, 0x58, 0x7f, 0xf9, 0xa3, 0x7b, 0x33, 0x43, 0x9f, - 0xdc, 0x9b, 0x19, 0xfa, 0xf4, 0xde, 0xcc, 0xd0, 0x7b, 0xbd, 0x19, 0xe5, 0xa3, 0xde, 0x8c, 0xf2, - 0x49, 0x6f, 0x46, 0xf9, 0xb4, 0x37, 0xa3, 0xfc, 0xb5, 0x37, 0xa3, 0x7c, 0xe7, 0x6f, 0x33, 0x43, - 0x5f, 0x99, 0x4a, 0xfe, 0x77, 0x81, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x0d, 0x0c, 0xec, 0x16, - 0x47, 0x30, 0x00, 0x00, -} +func (m *ResourceSliceSpec) Reset() { *m = ResourceSliceSpec{} } func (m *AllocatedDeviceStatus) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -1817,7 +436,7 @@ func (m *CapacityRequirements) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Requests { keysForRequests = append(keysForRequests, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForRequests) + sort.Strings(keysForRequests) for iNdEx := len(keysForRequests) - 1; iNdEx >= 0; iNdEx-- { v := m.Requests[QualifiedName(keysForRequests[iNdEx])] baseI := i @@ -1902,7 +521,7 @@ func (m *CounterSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Counters { keysForCounters = append(keysForCounters, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) + sort.Strings(keysForCounters) for iNdEx := len(keysForCounters) - 1; iNdEx >= 0; iNdEx-- { v := m.Counters[string(keysForCounters[iNdEx])] baseI := i @@ -2054,7 +673,7 @@ func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Capacity { keysForCapacity = append(keysForCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + sort.Strings(keysForCapacity) for iNdEx := len(keysForCapacity) - 1; iNdEx >= 0; iNdEx-- { v := m.Capacity[QualifiedName(keysForCapacity[iNdEx])] baseI := i @@ -2083,7 +702,7 @@ func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Attributes { keysForAttributes = append(keysForAttributes, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes) + sort.Strings(keysForAttributes) for iNdEx := len(keysForAttributes) - 1; iNdEx >= 0; iNdEx-- { v := m.Attributes[QualifiedName(keysForAttributes[iNdEx])] baseI := i @@ -2704,7 +1323,7 @@ func (m *DeviceCounterConsumption) MarshalToSizedBuffer(dAtA []byte) (int, error for k := range m.Counters { keysForCounters = append(keysForCounters, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) + sort.Strings(keysForCounters) for iNdEx := len(keysForCounters) - 1; iNdEx >= 0; iNdEx-- { v := m.Counters[string(keysForCounters[iNdEx])] baseI := i @@ -2815,7 +1434,7 @@ func (m *DeviceRequestAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, for k := range m.ConsumedCapacity { keysForConsumedCapacity = append(keysForConsumedCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForConsumedCapacity) + sort.Strings(keysForConsumedCapacity) for iNdEx := len(keysForConsumedCapacity) - 1; iNdEx >= 0; iNdEx-- { v := m.ConsumedCapacity[QualifiedName(keysForConsumedCapacity[iNdEx])] baseI := i @@ -4890,7 +3509,7 @@ func (this *CapacityRequirements) String() string { for k := range this.Requests { keysForRequests = append(keysForRequests, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForRequests) + sort.Strings(keysForRequests) mapStringForRequests := "map[QualifiedName]resource.Quantity{" for _, k := range keysForRequests { mapStringForRequests += fmt.Sprintf("%v: %v,", k, this.Requests[QualifiedName(k)]) @@ -4920,7 +3539,7 @@ func (this *CounterSet) String() string { for k := range this.Counters { keysForCounters = append(keysForCounters, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) + sort.Strings(keysForCounters) mapStringForCounters := "map[string]Counter{" for _, k := range keysForCounters { mapStringForCounters += fmt.Sprintf("%v: %v,", k, this.Counters[k]) @@ -4951,7 +3570,7 @@ func (this *Device) String() string { for k := range this.Attributes { keysForAttributes = append(keysForAttributes, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes) + sort.Strings(keysForAttributes) mapStringForAttributes := "map[QualifiedName]DeviceAttribute{" for _, k := range keysForAttributes { mapStringForAttributes += fmt.Sprintf("%v: %v,", k, this.Attributes[QualifiedName(k)]) @@ -4961,7 +3580,7 @@ func (this *Device) String() string { for k := range this.Capacity { keysForCapacity = append(keysForCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + sort.Strings(keysForCapacity) mapStringForCapacity := "map[QualifiedName]DeviceCapacity{" for _, k := range keysForCapacity { mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[QualifiedName(k)]) @@ -5168,7 +3787,7 @@ func (this *DeviceCounterConsumption) String() string { for k := range this.Counters { keysForCounters = append(keysForCounters, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) + sort.Strings(keysForCounters) mapStringForCounters := "map[string]Counter{" for _, k := range keysForCounters { mapStringForCounters += fmt.Sprintf("%v: %v,", k, this.Counters[k]) @@ -5211,7 +3830,7 @@ func (this *DeviceRequestAllocationResult) String() string { for k := range this.ConsumedCapacity { keysForConsumedCapacity = append(keysForConsumedCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForConsumedCapacity) + sort.Strings(keysForConsumedCapacity) mapStringForConsumedCapacity := "map[QualifiedName]resource.Quantity{" for _, k := range keysForConsumedCapacity { mapStringForConsumedCapacity += fmt.Sprintf("%v: %v,", k, this.ConsumedCapacity[QualifiedName(k)]) diff --git a/staging/src/k8s.io/api/resource/v1/generated.proto b/staging/src/k8s.io/api/resource/v1/generated.proto index 816a430c26b86..cb92c0e8aaf6a 100644 --- a/staging/src/k8s.io/api/resource/v1/generated.proto +++ b/staging/src/k8s.io/api/resource/v1/generated.proto @@ -41,7 +41,7 @@ message AllocatedDeviceStatus { // needed on a node. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required optional string driver = 1; @@ -65,6 +65,8 @@ message AllocatedDeviceStatus { // // +optional // +featureGate=DRAConsumableCapacity + // +k8s:optional + // +k8s:format=k8s-uuid optional string shareID = 7; // Conditions contains the latest observation of the device's state. @@ -560,6 +562,7 @@ message DeviceClaim { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated DeviceRequest requests = 1; // These constraints must be satisfied by the set of devices that get @@ -567,6 +570,7 @@ message DeviceClaim { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated DeviceConstraint constraints = 2; // This field holds configuration for multiple potential drivers which @@ -575,6 +579,7 @@ message DeviceClaim { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated DeviceClaimConfiguration config = 3; } @@ -589,6 +594,7 @@ message DeviceClaimConfiguration { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated string requests = 1; optional DeviceConfiguration deviceConfiguration = 2; @@ -639,6 +645,8 @@ message DeviceClassSpec { // // +optional // +listType=atomic + // +k8s:optional + // +k8s:maxItems=32 repeated DeviceSelector selectors = 1; // Config defines configuration parameters that apply to each device that is claimed via this class. @@ -649,6 +657,8 @@ message DeviceClassSpec { // // +optional // +listType=atomic + // +k8s:optional + // +k8s:maxItems=32 repeated DeviceClassConfiguration config = 2; // ExtendedResourceName is the extended resource name for the devices of this class. @@ -674,6 +684,7 @@ message DeviceConfiguration { // // +optional // +oneOf=ConfigurationType + // +k8s:optional optional OpaqueDeviceConfiguration opaque = 1; } @@ -691,6 +702,7 @@ message DeviceConstraint { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated string requests = 1; // MatchAttribute requires that all devices in question have this @@ -773,6 +785,7 @@ message DeviceRequest { // // +optional // +oneOf=deviceRequestType + // +k8s:optional optional ExactDeviceRequest exactly = 2; // FirstAvailable contains subrequests, of which exactly one will be @@ -793,6 +806,7 @@ message DeviceRequest { // +oneOf=deviceRequestType // +listType=atomic // +featureGate=DRAPrioritizedList + // +k8s:maxItems=8 repeated DeviceSubRequest firstAvailable = 3; } @@ -814,7 +828,7 @@ message DeviceRequestAllocationResult { // needed on a node. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required optional string driver = 2; @@ -826,6 +840,8 @@ message DeviceRequestAllocationResult { // DNS sub-domains separated by slashes. // // +required + // +k8s:required + // +k8s:format=k8s-resource-pool-name optional string pool = 3; // Device references one device instance via its name in the driver's @@ -888,6 +904,8 @@ message DeviceRequestAllocationResult { // // +optional // +featureGate=DRAConsumableCapacity + // +k8s:optional + // +k8s:format=k8s-uuid optional string shareID = 9; // ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. @@ -953,6 +971,7 @@ message DeviceSubRequest { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated DeviceSelector selectors = 3; // AllocationMode and its related fields define how devices are allocated @@ -1065,6 +1084,8 @@ message DeviceToleration { // Must be a label name. // // +optional + // +k8s:optional + // +k8s:format=k8s-label-key optional string key = 1; // Operator represents a key's relationship to the value. @@ -1124,6 +1145,7 @@ message ExactDeviceRequest { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated DeviceSelector selectors = 2; // AllocationMode and its related fields define how devices are allocated @@ -1251,9 +1273,11 @@ message OpaqueDeviceConfiguration { // to decide whether it needs to validate them. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required + // +k8s:required + // +k8s:format=k8s-long-name-caseless optional string driver = 1; // Parameters can contain arbitrary data. It is the responsibility of @@ -1282,6 +1306,7 @@ message ResourceClaim { // Spec describes what is being requested and how to configure it. // The spec is immutable. + // +k8s:immutable optional ResourceClaimSpec spec = 2; // Status describes whether the claim is ready to use and what has been allocated. @@ -1336,6 +1361,7 @@ message ResourceClaimStatus { // Allocation is set once the claim has been allocated successfully. // // +optional + // +k8s:optional optional AllocationResult allocation = 1; // ReservedFor indicates which entities are currently allowed to use @@ -1363,6 +1389,9 @@ message ResourceClaimStatus { // +listMapKey=uid // +patchStrategy=merge // +patchMergeKey=uid + // +k8s:optional + // +k8s:listType=map + // +k8s:listMapKey=uid repeated ResourceClaimConsumerReference reservedFor = 2; // Devices contains the status of each device allocated for this @@ -1370,6 +1399,7 @@ message ResourceClaimStatus { // information. Entries are owned by their respective drivers. // // +optional + // +k8s:optional // +listType=map // +listMapKey=driver // +listMapKey=device @@ -1509,7 +1539,8 @@ message ResourceSliceSpec { // objects with a certain driver name. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. This field is immutable. + // vendor of the driver. It should use only lower case characters. + // This field is immutable. // // +required optional string driver = 1; diff --git a/staging/src/k8s.io/api/resource/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/resource/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..97035a9360571 --- /dev/null +++ b/staging/src/k8s.io/api/resource/v1/generated.protomessage.pb.go @@ -0,0 +1,108 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*AllocatedDeviceStatus) ProtoMessage() {} + +func (*AllocationResult) ProtoMessage() {} + +func (*CELDeviceSelector) ProtoMessage() {} + +func (*CapacityRequestPolicy) ProtoMessage() {} + +func (*CapacityRequestPolicyRange) ProtoMessage() {} + +func (*CapacityRequirements) ProtoMessage() {} + +func (*Counter) ProtoMessage() {} + +func (*CounterSet) ProtoMessage() {} + +func (*Device) ProtoMessage() {} + +func (*DeviceAllocationConfiguration) ProtoMessage() {} + +func (*DeviceAllocationResult) ProtoMessage() {} + +func (*DeviceAttribute) ProtoMessage() {} + +func (*DeviceCapacity) ProtoMessage() {} + +func (*DeviceClaim) ProtoMessage() {} + +func (*DeviceClaimConfiguration) ProtoMessage() {} + +func (*DeviceClass) ProtoMessage() {} + +func (*DeviceClassConfiguration) ProtoMessage() {} + +func (*DeviceClassList) ProtoMessage() {} + +func (*DeviceClassSpec) ProtoMessage() {} + +func (*DeviceConfiguration) ProtoMessage() {} + +func (*DeviceConstraint) ProtoMessage() {} + +func (*DeviceCounterConsumption) ProtoMessage() {} + +func (*DeviceRequest) ProtoMessage() {} + +func (*DeviceRequestAllocationResult) ProtoMessage() {} + +func (*DeviceSelector) ProtoMessage() {} + +func (*DeviceSubRequest) ProtoMessage() {} + +func (*DeviceTaint) ProtoMessage() {} + +func (*DeviceToleration) ProtoMessage() {} + +func (*ExactDeviceRequest) ProtoMessage() {} + +func (*NetworkDeviceData) ProtoMessage() {} + +func (*OpaqueDeviceConfiguration) ProtoMessage() {} + +func (*ResourceClaim) ProtoMessage() {} + +func (*ResourceClaimConsumerReference) ProtoMessage() {} + +func (*ResourceClaimList) ProtoMessage() {} + +func (*ResourceClaimSpec) ProtoMessage() {} + +func (*ResourceClaimStatus) ProtoMessage() {} + +func (*ResourceClaimTemplate) ProtoMessage() {} + +func (*ResourceClaimTemplateList) ProtoMessage() {} + +func (*ResourceClaimTemplateSpec) ProtoMessage() {} + +func (*ResourcePool) ProtoMessage() {} + +func (*ResourceSlice) ProtoMessage() {} + +func (*ResourceSliceList) ProtoMessage() {} + +func (*ResourceSliceSpec) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/resource/v1/types.go b/staging/src/k8s.io/api/resource/v1/types.go index f29504444fff1..cbc9db48756f0 100644 --- a/staging/src/k8s.io/api/resource/v1/types.go +++ b/staging/src/k8s.io/api/resource/v1/types.go @@ -101,7 +101,8 @@ type ResourceSliceSpec struct { // objects with a certain driver name. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. This field is immutable. + // vendor of the driver. It should use only lower case characters. + // This field is immutable. // // +required Driver string `json:"driver" protobuf:"bytes,1,name=driver"` @@ -678,6 +679,7 @@ type ResourceSliceList struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.34 +// +k8s:supportsSubresource=/status // ResourceClaim describes a request for access to resources in the cluster, // for use by workloads. For example, if a workload needs an accelerator device @@ -695,6 +697,7 @@ type ResourceClaim struct { // Spec describes what is being requested and how to configure it. // The spec is immutable. + // +k8s:immutable Spec ResourceClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"` // Status describes whether the claim is ready to use and what has been allocated. @@ -722,6 +725,7 @@ type DeviceClaim struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Requests []DeviceRequest `json:"requests" protobuf:"bytes,1,name=requests"` // These constraints must be satisfied by the set of devices that get @@ -729,6 +733,7 @@ type DeviceClaim struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Constraints []DeviceConstraint `json:"constraints,omitempty" protobuf:"bytes,2,opt,name=constraints"` // This field holds configuration for multiple potential drivers which @@ -737,6 +742,7 @@ type DeviceClaim struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Config []DeviceClaimConfiguration `json:"config,omitempty" protobuf:"bytes,3,opt,name=config"` // Potential future extension, ignored by older schedulers. This is @@ -787,6 +793,7 @@ type DeviceRequest struct { // // +optional // +oneOf=deviceRequestType + // +k8s:optional Exactly *ExactDeviceRequest `json:"exactly,omitempty" protobuf:"bytes,2,name=exactly"` // FirstAvailable contains subrequests, of which exactly one will be @@ -807,6 +814,7 @@ type DeviceRequest struct { // +oneOf=deviceRequestType // +listType=atomic // +featureGate=DRAPrioritizedList + // +k8s:maxItems=8 FirstAvailable []DeviceSubRequest `json:"firstAvailable,omitempty" protobuf:"bytes,3,name=firstAvailable"` } @@ -834,6 +842,7 @@ type ExactDeviceRequest struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,2,name=selectors"` // AllocationMode and its related fields define how devices are allocated @@ -960,6 +969,7 @@ type DeviceSubRequest struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,3,name=selectors"` // AllocationMode and its related fields define how devices are allocated @@ -1066,6 +1076,7 @@ const ( DeviceTolerationsMaxLength = 16 ) +// +enum type DeviceAllocationMode string // Valid [DeviceRequest.CountMode] values. @@ -1184,6 +1195,7 @@ type DeviceConstraint struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"` // MatchAttribute requires that all devices in question have this @@ -1241,6 +1253,7 @@ type DeviceClaimConfiguration struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"` DeviceConfiguration `json:",inline" protobuf:"bytes,2,name=deviceConfiguration"` @@ -1254,6 +1267,7 @@ type DeviceConfiguration struct { // // +optional // +oneOf=ConfigurationType + // +k8s:optional Opaque *OpaqueDeviceConfiguration `json:"opaque,omitempty" protobuf:"bytes,1,opt,name=opaque"` } @@ -1267,9 +1281,11 @@ type OpaqueDeviceConfiguration struct { // to decide whether it needs to validate them. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required + // +k8s:required + // +k8s:format=k8s-long-name-caseless Driver string `json:"driver" protobuf:"bytes,1,name=driver"` // Parameters can contain arbitrary data. It is the responsibility of @@ -1295,6 +1311,8 @@ type DeviceToleration struct { // Must be a label name. // // +optional + // +k8s:optional + // +k8s:format=k8s-label-key Key string `json:"key,omitempty" protobuf:"bytes,1,opt,name=key"` // Operator represents a key's relationship to the value. @@ -1346,6 +1364,7 @@ type ResourceClaimStatus struct { // Allocation is set once the claim has been allocated successfully. // // +optional + // +k8s:optional Allocation *AllocationResult `json:"allocation,omitempty" protobuf:"bytes,1,opt,name=allocation"` // ReservedFor indicates which entities are currently allowed to use @@ -1373,6 +1392,9 @@ type ResourceClaimStatus struct { // +listMapKey=uid // +patchStrategy=merge // +patchMergeKey=uid + // +k8s:optional + // +k8s:listType=map + // +k8s:listMapKey=uid ReservedFor []ResourceClaimConsumerReference `json:"reservedFor,omitempty" protobuf:"bytes,2,opt,name=reservedFor" patchStrategy:"merge" patchMergeKey:"uid"` // DeallocationRequested is tombstoned since Kubernetes 1.32 where @@ -1385,6 +1407,7 @@ type ResourceClaimStatus struct { // information. Entries are owned by their respective drivers. // // +optional + // +k8s:optional // +listType=map // +listMapKey=driver // +listMapKey=device @@ -1490,7 +1513,7 @@ type DeviceRequestAllocationResult struct { // needed on a node. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required Driver string `json:"driver" protobuf:"bytes,2,name=driver"` @@ -1502,6 +1525,8 @@ type DeviceRequestAllocationResult struct { // DNS sub-domains separated by slashes. // // +required + // +k8s:required + // +k8s:format=k8s-resource-pool-name Pool string `json:"pool" protobuf:"bytes,3,name=pool"` // Device references one device instance via its name in the driver's @@ -1564,6 +1589,8 @@ type DeviceRequestAllocationResult struct { // // +optional // +featureGate=DRAConsumableCapacity + // +k8s:optional + // +k8s:format=k8s-uuid ShareID *types.UID `json:"shareID,omitempty" protobuf:"bytes,9,opt,name=shareID"` // ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. @@ -1661,6 +1688,8 @@ type DeviceClassSpec struct { // // +optional // +listType=atomic + // +k8s:optional + // +k8s:maxItems=32 Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,1,opt,name=selectors"` // Config defines configuration parameters that apply to each device that is claimed via this class. @@ -1671,6 +1700,8 @@ type DeviceClassSpec struct { // // +optional // +listType=atomic + // +k8s:optional + // +k8s:maxItems=32 Config []DeviceClassConfiguration `json:"config,omitempty" protobuf:"bytes,2,opt,name=config"` // SuitableNodes is tombstoned since Kubernetes 1.32 where @@ -1791,7 +1822,7 @@ type AllocatedDeviceStatus struct { // needed on a node. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required Driver string `json:"driver" protobuf:"bytes,1,rep,name=driver"` @@ -1815,6 +1846,8 @@ type AllocatedDeviceStatus struct { // // +optional // +featureGate=DRAConsumableCapacity + // +k8s:optional + // +k8s:format=k8s-uuid ShareID *string `json:"shareID,omitempty" protobuf:"bytes,7,opt,name=shareID"` // Conditions contains the latest observation of the device's state. diff --git a/staging/src/k8s.io/api/resource/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/resource/v1/types_swagger_doc_generated.go index bf81ced64ce66..c37f64393fef0 100644 --- a/staging/src/k8s.io/api/resource/v1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/resource/v1/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AllocatedDeviceStatus = map[string]string{ "": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.\n\nThe combination of Driver, Pool, Device, and ShareID must match the corresponding key in Status.Allocation.Devices.", - "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", "shareID": "ShareID uniquely identifies an individual allocation share of the device.", @@ -277,7 +277,7 @@ func (DeviceRequest) SwaggerDoc() map[string]string { var map_DeviceRequestAllocationResult = map[string]string{ "": "DeviceRequestAllocationResult contains the allocation result for one request.", "request": "Request is the name of the request in the claim which caused this device to be allocated. If it references a subrequest in the firstAvailable list on a DeviceRequest, this field must include both the name of the main request and the subrequest using the format
/.\n\nMultiple devices may have been allocated per request.", - "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", "adminAccess": "AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.", @@ -369,7 +369,7 @@ func (NetworkDeviceData) SwaggerDoc() map[string]string { var map_OpaqueDeviceConfiguration = map[string]string{ "": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", - "driver": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "driver": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "parameters": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", } @@ -493,7 +493,7 @@ func (ResourceSliceList) SwaggerDoc() map[string]string { var map_ResourceSliceSpec = map[string]string{ "": "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.", - "driver": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + "driver": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. This field is immutable.", "pool": "Pool describes the pool that this ResourceSlice belongs to.", "nodeName": "NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.\n\nThis field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. This field is immutable.", "nodeSelector": "NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.\n\nMust use exactly one term.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.", diff --git a/staging/src/k8s.io/api/resource/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/resource/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..c0de4f9e9db2e --- /dev/null +++ b/staging/src/k8s.io/api/resource/v1/zz_generated.model_name.go @@ -0,0 +1,237 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AllocatedDeviceStatus) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.AllocatedDeviceStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AllocationResult) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.AllocationResult" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CELDeviceSelector) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.CELDeviceSelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CapacityRequestPolicy) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.CapacityRequestPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CapacityRequestPolicyRange) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.CapacityRequestPolicyRange" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CapacityRequirements) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.CapacityRequirements" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Counter) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.Counter" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CounterSet) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.CounterSet" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Device) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.Device" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceAllocationConfiguration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceAllocationConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceAllocationResult) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceAllocationResult" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceAttribute) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceAttribute" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceCapacity) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceCapacity" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClaim) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceClaim" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClaimConfiguration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceClaimConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClass) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClassConfiguration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceClassConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClassList) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceClassList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClassSpec) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceClassSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceConfiguration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceConstraint) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceConstraint" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceCounterConsumption) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceCounterConsumption" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceRequest) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceRequestAllocationResult) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceRequestAllocationResult" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceSelector) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceSelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceSubRequest) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceSubRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceTaint) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceTaint" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceToleration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.DeviceToleration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExactDeviceRequest) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.ExactDeviceRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkDeviceData) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.NetworkDeviceData" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in OpaqueDeviceConfiguration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.OpaqueDeviceConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaim) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.ResourceClaim" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimConsumerReference) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.ResourceClaimConsumerReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimList) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.ResourceClaimList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimSpec) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.ResourceClaimSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimStatus) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.ResourceClaimStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimTemplate) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.ResourceClaimTemplate" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimTemplateList) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.ResourceClaimTemplateList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimTemplateSpec) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.ResourceClaimTemplateSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourcePool) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.ResourcePool" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceSlice) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.ResourceSlice" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceSliceList) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.ResourceSliceList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceSliceSpec) OpenAPIModelName() string { + return "io.k8s.api.resource.v1.ResourceSliceSpec" +} diff --git a/staging/src/k8s.io/api/resource/v1alpha3/doc.go b/staging/src/k8s.io/api/resource/v1alpha3/doc.go index 82e64f1d00ca7..b6bfd79c36966 100644 --- a/staging/src/k8s.io/api/resource/v1alpha3/doc.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.resource.v1alpha3 + // +groupName=resource.k8s.io // Package v1alpha3 is the v1alpha3 version of the resource API. diff --git a/staging/src/k8s.io/api/resource/v1alpha3/generated.pb.go b/staging/src/k8s.io/api/resource/v1alpha3/generated.pb.go index dc37717ef72eb..826af237b9844 100644 --- a/staging/src/k8s.io/api/resource/v1alpha3/generated.pb.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/generated.pb.go @@ -24,284 +24,26 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *CELDeviceSelector) Reset() { *m = CELDeviceSelector{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *DeviceSelector) Reset() { *m = DeviceSelector{} } -func (m *CELDeviceSelector) Reset() { *m = CELDeviceSelector{} } -func (*CELDeviceSelector) ProtoMessage() {} -func (*CELDeviceSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{0} -} -func (m *CELDeviceSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CELDeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CELDeviceSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_CELDeviceSelector.Merge(m, src) -} -func (m *CELDeviceSelector) XXX_Size() int { - return m.Size() -} -func (m *CELDeviceSelector) XXX_DiscardUnknown() { - xxx_messageInfo_CELDeviceSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_CELDeviceSelector proto.InternalMessageInfo - -func (m *DeviceSelector) Reset() { *m = DeviceSelector{} } -func (*DeviceSelector) ProtoMessage() {} -func (*DeviceSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{1} -} -func (m *DeviceSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceSelector.Merge(m, src) -} -func (m *DeviceSelector) XXX_Size() int { - return m.Size() -} -func (m *DeviceSelector) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceSelector proto.InternalMessageInfo - -func (m *DeviceTaint) Reset() { *m = DeviceTaint{} } -func (*DeviceTaint) ProtoMessage() {} -func (*DeviceTaint) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{2} -} -func (m *DeviceTaint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceTaint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceTaint) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceTaint.Merge(m, src) -} -func (m *DeviceTaint) XXX_Size() int { - return m.Size() -} -func (m *DeviceTaint) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceTaint.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceTaint proto.InternalMessageInfo - -func (m *DeviceTaintRule) Reset() { *m = DeviceTaintRule{} } -func (*DeviceTaintRule) ProtoMessage() {} -func (*DeviceTaintRule) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{3} -} -func (m *DeviceTaintRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceTaintRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceTaintRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceTaintRule.Merge(m, src) -} -func (m *DeviceTaintRule) XXX_Size() int { - return m.Size() -} -func (m *DeviceTaintRule) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceTaintRule.DiscardUnknown(m) -} +func (m *DeviceTaint) Reset() { *m = DeviceTaint{} } -var xxx_messageInfo_DeviceTaintRule proto.InternalMessageInfo +func (m *DeviceTaintRule) Reset() { *m = DeviceTaintRule{} } -func (m *DeviceTaintRuleList) Reset() { *m = DeviceTaintRuleList{} } -func (*DeviceTaintRuleList) ProtoMessage() {} -func (*DeviceTaintRuleList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{4} -} -func (m *DeviceTaintRuleList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceTaintRuleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceTaintRuleList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceTaintRuleList.Merge(m, src) -} -func (m *DeviceTaintRuleList) XXX_Size() int { - return m.Size() -} -func (m *DeviceTaintRuleList) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceTaintRuleList.DiscardUnknown(m) -} +func (m *DeviceTaintRuleList) Reset() { *m = DeviceTaintRuleList{} } -var xxx_messageInfo_DeviceTaintRuleList proto.InternalMessageInfo +func (m *DeviceTaintRuleSpec) Reset() { *m = DeviceTaintRuleSpec{} } -func (m *DeviceTaintRuleSpec) Reset() { *m = DeviceTaintRuleSpec{} } -func (*DeviceTaintRuleSpec) ProtoMessage() {} -func (*DeviceTaintRuleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{5} -} -func (m *DeviceTaintRuleSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceTaintRuleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceTaintRuleSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceTaintRuleSpec.Merge(m, src) -} -func (m *DeviceTaintRuleSpec) XXX_Size() int { - return m.Size() -} -func (m *DeviceTaintRuleSpec) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceTaintRuleSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceTaintRuleSpec proto.InternalMessageInfo - -func (m *DeviceTaintSelector) Reset() { *m = DeviceTaintSelector{} } -func (*DeviceTaintSelector) ProtoMessage() {} -func (*DeviceTaintSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{6} -} -func (m *DeviceTaintSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceTaintSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceTaintSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceTaintSelector.Merge(m, src) -} -func (m *DeviceTaintSelector) XXX_Size() int { - return m.Size() -} -func (m *DeviceTaintSelector) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceTaintSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceTaintSelector proto.InternalMessageInfo - -func init() { - proto.RegisterType((*CELDeviceSelector)(nil), "k8s.io.api.resource.v1alpha3.CELDeviceSelector") - proto.RegisterType((*DeviceSelector)(nil), "k8s.io.api.resource.v1alpha3.DeviceSelector") - proto.RegisterType((*DeviceTaint)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaint") - proto.RegisterType((*DeviceTaintRule)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintRule") - proto.RegisterType((*DeviceTaintRuleList)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintRuleList") - proto.RegisterType((*DeviceTaintRuleSpec)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintRuleSpec") - proto.RegisterType((*DeviceTaintSelector)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintSelector") -} - -func init() { - proto.RegisterFile("k8s.io/api/resource/v1alpha3/generated.proto", fileDescriptor_66649ee9bbcd89d2) -} - -var fileDescriptor_66649ee9bbcd89d2 = []byte{ - // 716 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0x8e, 0x9b, 0xa4, 0x24, 0x17, 0xda, 0xd2, 0xeb, 0x12, 0x55, 0xc5, 0xae, 0xdc, 0xa5, 0xa0, - 0xd6, 0x26, 0x01, 0x21, 0x04, 0x62, 0x20, 0x6d, 0x84, 0x80, 0x52, 0xd0, 0xb5, 0x02, 0x09, 0x15, - 0x89, 0xab, 0xf3, 0x9a, 0x98, 0xd8, 0xb1, 0xe5, 0x73, 0x22, 0xba, 0xf5, 0x4f, 0x60, 0x84, 0x8d, - 0xff, 0x86, 0x8c, 0x1d, 0x18, 0x3a, 0xa0, 0x88, 0x9a, 0xbf, 0x80, 0x95, 0x09, 0xdd, 0xf9, 0x12, - 0xa7, 0x8e, 0x28, 0x61, 0x8b, 0xbf, 0xfb, 0xde, 0xf7, 0xde, 0xf7, 0x7e, 0x28, 0x68, 0xa3, 0x7d, - 0x8f, 0x19, 0xb6, 0x67, 0x52, 0xdf, 0x36, 0x03, 0x60, 0x5e, 0x37, 0xb0, 0xc0, 0xec, 0x55, 0xa8, - 0xe3, 0xb7, 0xe8, 0x6d, 0xb3, 0x09, 0x1d, 0x08, 0x68, 0x08, 0x0d, 0xc3, 0x0f, 0xbc, 0xd0, 0xc3, - 0x2b, 0x31, 0xdb, 0xa0, 0xbe, 0x6d, 0x0c, 0xd9, 0xc6, 0x90, 0xbd, 0xbc, 0xd9, 0xb4, 0xc3, 0x56, - 0xf7, 0xd0, 0xb0, 0x3c, 0xd7, 0x6c, 0x7a, 0x4d, 0xcf, 0x14, 0x41, 0x87, 0xdd, 0x23, 0xf1, 0x25, - 0x3e, 0xc4, 0xaf, 0x58, 0x6c, 0xf9, 0x4e, 0x92, 0xda, 0xa5, 0x56, 0xcb, 0xee, 0x40, 0x70, 0x6c, - 0xfa, 0xed, 0x26, 0x07, 0x98, 0xe9, 0x42, 0x48, 0xcd, 0x5e, 0x25, 0x5d, 0xc2, 0xb2, 0xf9, 0xb7, - 0xa8, 0xa0, 0xdb, 0x09, 0x6d, 0x17, 0x26, 0x02, 0xee, 0xfe, 0x2b, 0x80, 0x59, 0x2d, 0x70, 0x69, - 0x3a, 0x4e, 0x7f, 0x8c, 0x16, 0xb7, 0xea, 0x3b, 0xdb, 0xd0, 0xb3, 0x2d, 0xd8, 0x03, 0x07, 0xac, - 0xd0, 0x0b, 0x70, 0x15, 0x21, 0xf8, 0xe0, 0x07, 0xc0, 0x98, 0xed, 0x75, 0xca, 0xca, 0xaa, 0xb2, - 0x5e, 0xac, 0xe1, 0xfe, 0x40, 0xcb, 0x44, 0x03, 0x0d, 0xd5, 0x47, 0x2f, 0x64, 0x8c, 0xa5, 0x1f, - 0xa0, 0xf9, 0x94, 0xca, 0x53, 0x94, 0xb5, 0xc0, 0x11, 0xe1, 0xa5, 0xaa, 0x69, 0x5c, 0xd6, 0x54, - 0x63, 0xa2, 0x86, 0xda, 0x95, 0x68, 0xa0, 0x65, 0xb7, 0xea, 0x3b, 0x84, 0x8b, 0xe8, 0xbf, 0x14, - 0x54, 0x8a, 0x09, 0xfb, 0xd4, 0xee, 0x84, 0xf8, 0x3a, 0xca, 0xb6, 0xe1, 0x58, 0x96, 0x56, 0x92, - 0xa5, 0x65, 0x9f, 0xc1, 0x31, 0xe1, 0x38, 0x5e, 0x43, 0xf9, 0x1e, 0x75, 0xba, 0x50, 0x9e, 0x11, - 0x84, 0x39, 0x49, 0xc8, 0xbf, 0xe2, 0x20, 0x89, 0xdf, 0xf0, 0x03, 0x34, 0x0b, 0x47, 0x47, 0x60, - 0x85, 0xe5, 0xac, 0x60, 0xad, 0x49, 0xd6, 0x6c, 0x5d, 0xa0, 0xbf, 0x07, 0xda, 0xe2, 0x58, 0xca, - 0x18, 0x24, 0x32, 0x04, 0xbf, 0x46, 0x45, 0xde, 0xd6, 0x47, 0x8d, 0x06, 0x34, 0xca, 0x39, 0x61, - 0xf1, 0xe6, 0x98, 0xc5, 0xd1, 0x0c, 0x0c, 0xbf, 0xdd, 0xe4, 0x00, 0x33, 0xf8, 0xa8, 0x8d, 0x5e, - 0xc5, 0xd8, 0xb7, 0x5d, 0xa8, 0xcd, 0x45, 0x03, 0xad, 0xb8, 0x3f, 0x14, 0x20, 0x89, 0xd6, 0xfd, - 0xc2, 0xa7, 0x2f, 0x5a, 0xe6, 0xe4, 0xfb, 0x6a, 0x46, 0xef, 0x2b, 0x68, 0x61, 0xac, 0x00, 0xd2, - 0x75, 0x00, 0xbf, 0x43, 0x05, 0xae, 0xd3, 0xa0, 0x21, 0x95, 0x8d, 0xbd, 0x35, 0x5d, 0xd6, 0x17, - 0x87, 0xef, 0xc1, 0x0a, 0x9f, 0x43, 0x48, 0x93, 0x49, 0x26, 0x18, 0x19, 0xa9, 0xe2, 0x3d, 0x94, - 0x63, 0x3e, 0x58, 0xa2, 0x73, 0xa5, 0x6a, 0xe5, 0xf2, 0xb1, 0xa5, 0xca, 0xdb, 0xf3, 0xc1, 0xaa, - 0x5d, 0x95, 0xf2, 0x39, 0xfe, 0x45, 0x84, 0x98, 0xfe, 0x55, 0x41, 0x4b, 0x29, 0xee, 0x8e, 0xcd, - 0x42, 0x7c, 0x30, 0x61, 0xc7, 0x98, 0xce, 0x0e, 0x8f, 0x16, 0x66, 0xae, 0xc9, 0x6c, 0x85, 0x21, - 0x32, 0x66, 0x85, 0xa0, 0xbc, 0x1d, 0x82, 0xcb, 0xca, 0x33, 0xab, 0xd9, 0xf5, 0x52, 0x75, 0xf3, - 0xbf, 0xbc, 0x24, 0x4b, 0xf3, 0x84, 0x6b, 0x90, 0x58, 0x4a, 0xff, 0x36, 0xe9, 0x84, 0xfb, 0xc4, - 0x2e, 0x9a, 0x6f, 0x5c, 0x58, 0x60, 0xe9, 0x67, 0xfa, 0x06, 0x8e, 0x36, 0x1f, 0x47, 0x03, 0x2d, - 0x75, 0x4b, 0x24, 0x25, 0x8e, 0x77, 0x51, 0x3e, 0xe4, 0x41, 0x72, 0x4c, 0x37, 0xa6, 0xce, 0x92, - 0xd8, 0x8a, 0xeb, 0x8f, 0x65, 0xf4, 0xcf, 0x33, 0x17, 0x6c, 0x8d, 0xf2, 0x3c, 0x44, 0x0b, 0x71, - 0xe6, 0x2d, 0x87, 0x32, 0xb6, 0x4b, 0x5d, 0x90, 0x37, 0xb7, 0x14, 0x0d, 0x34, 0xb9, 0x9d, 0xa3, - 0x27, 0x92, 0xe6, 0x62, 0x1d, 0xcd, 0x36, 0x02, 0xbb, 0x07, 0x81, 0x3c, 0x44, 0xc4, 0xcf, 0x6b, - 0x5b, 0x20, 0x44, 0xbe, 0xe0, 0x15, 0x94, 0xf3, 0x3d, 0xcf, 0x91, 0x47, 0x58, 0xe0, 0x9b, 0xf3, - 0xd2, 0xf3, 0x1c, 0x22, 0x50, 0xa1, 0x20, 0x44, 0xc5, 0x91, 0x0d, 0x15, 0x04, 0x42, 0xe4, 0x0b, - 0x7e, 0x8b, 0x8a, 0x4c, 0x16, 0xcc, 0xca, 0x79, 0x31, 0xeb, 0x8d, 0x69, 0x1a, 0x32, 0xea, 0xf8, - 0xa2, 0xec, 0x49, 0x71, 0x88, 0x30, 0x92, 0x28, 0xd6, 0x6a, 0xfd, 0x73, 0x35, 0x73, 0x7a, 0xae, - 0x66, 0xce, 0xce, 0xd5, 0xcc, 0x49, 0xa4, 0x2a, 0xfd, 0x48, 0x55, 0x4e, 0x23, 0x55, 0x39, 0x8b, - 0x54, 0xe5, 0x47, 0xa4, 0x2a, 0x1f, 0x7f, 0xaa, 0x99, 0x37, 0x2b, 0x97, 0xfd, 0xc5, 0xfc, 0x09, - 0x00, 0x00, 0xff, 0xff, 0x7e, 0xb1, 0x06, 0x7b, 0x81, 0x06, 0x00, 0x00, -} +func (m *DeviceTaintSelector) Reset() { *m = DeviceTaintSelector{} } func (m *CELDeviceSelector) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/resource/v1alpha3/generated.protomessage.pb.go b/staging/src/k8s.io/api/resource/v1alpha3/generated.protomessage.pb.go new file mode 100644 index 0000000000000..2c6196bb8629e --- /dev/null +++ b/staging/src/k8s.io/api/resource/v1alpha3/generated.protomessage.pb.go @@ -0,0 +1,36 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1alpha3 + +func (*CELDeviceSelector) ProtoMessage() {} + +func (*DeviceSelector) ProtoMessage() {} + +func (*DeviceTaint) ProtoMessage() {} + +func (*DeviceTaintRule) ProtoMessage() {} + +func (*DeviceTaintRuleList) ProtoMessage() {} + +func (*DeviceTaintRuleSpec) ProtoMessage() {} + +func (*DeviceTaintSelector) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/resource/v1alpha3/zz_generated.model_name.go b/staging/src/k8s.io/api/resource/v1alpha3/zz_generated.model_name.go new file mode 100644 index 0000000000000..fecb50dd70ae8 --- /dev/null +++ b/staging/src/k8s.io/api/resource/v1alpha3/zz_generated.model_name.go @@ -0,0 +1,57 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1alpha3 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CELDeviceSelector) OpenAPIModelName() string { + return "io.k8s.api.resource.v1alpha3.CELDeviceSelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceSelector) OpenAPIModelName() string { + return "io.k8s.api.resource.v1alpha3.DeviceSelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceTaint) OpenAPIModelName() string { + return "io.k8s.api.resource.v1alpha3.DeviceTaint" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceTaintRule) OpenAPIModelName() string { + return "io.k8s.api.resource.v1alpha3.DeviceTaintRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceTaintRuleList) OpenAPIModelName() string { + return "io.k8s.api.resource.v1alpha3.DeviceTaintRuleList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceTaintRuleSpec) OpenAPIModelName() string { + return "io.k8s.api.resource.v1alpha3.DeviceTaintRuleSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceTaintSelector) OpenAPIModelName() string { + return "io.k8s.api.resource.v1alpha3.DeviceTaintSelector" +} diff --git a/staging/src/k8s.io/api/resource/v1beta1/doc.go b/staging/src/k8s.io/api/resource/v1beta1/doc.go index 1e08b69a17560..290c7bacff929 100644 --- a/staging/src/k8s.io/api/resource/v1beta1/doc.go +++ b/staging/src/k8s.io/api/resource/v1beta1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.resource.v1beta1 + // +groupName=resource.k8s.io // Package v1beta1 is the v1beta1 version of the resource API. diff --git a/staging/src/k8s.io/api/resource/v1beta1/generated.pb.go b/staging/src/k8s.io/api/resource/v1beta1/generated.pb.go index c1f9ab09ed366..1ac7de8a8fcf7 100644 --- a/staging/src/k8s.io/api/resource/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/resource/v1beta1/generated.pb.go @@ -23,15 +23,13 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v11 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -39,1470 +37,91 @@ import ( k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *AllocatedDeviceStatus) Reset() { *m = AllocatedDeviceStatus{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *AllocationResult) Reset() { *m = AllocationResult{} } -func (m *AllocatedDeviceStatus) Reset() { *m = AllocatedDeviceStatus{} } -func (*AllocatedDeviceStatus) ProtoMessage() {} -func (*AllocatedDeviceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{0} -} -func (m *AllocatedDeviceStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AllocatedDeviceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AllocatedDeviceStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllocatedDeviceStatus.Merge(m, src) -} -func (m *AllocatedDeviceStatus) XXX_Size() int { - return m.Size() -} -func (m *AllocatedDeviceStatus) XXX_DiscardUnknown() { - xxx_messageInfo_AllocatedDeviceStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_AllocatedDeviceStatus proto.InternalMessageInfo - -func (m *AllocationResult) Reset() { *m = AllocationResult{} } -func (*AllocationResult) ProtoMessage() {} -func (*AllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{1} -} -func (m *AllocationResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AllocationResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllocationResult.Merge(m, src) -} -func (m *AllocationResult) XXX_Size() int { - return m.Size() -} -func (m *AllocationResult) XXX_DiscardUnknown() { - xxx_messageInfo_AllocationResult.DiscardUnknown(m) -} - -var xxx_messageInfo_AllocationResult proto.InternalMessageInfo - -func (m *BasicDevice) Reset() { *m = BasicDevice{} } -func (*BasicDevice) ProtoMessage() {} -func (*BasicDevice) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{2} -} -func (m *BasicDevice) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BasicDevice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *BasicDevice) XXX_Merge(src proto.Message) { - xxx_messageInfo_BasicDevice.Merge(m, src) -} -func (m *BasicDevice) XXX_Size() int { - return m.Size() -} -func (m *BasicDevice) XXX_DiscardUnknown() { - xxx_messageInfo_BasicDevice.DiscardUnknown(m) -} - -var xxx_messageInfo_BasicDevice proto.InternalMessageInfo - -func (m *CELDeviceSelector) Reset() { *m = CELDeviceSelector{} } -func (*CELDeviceSelector) ProtoMessage() {} -func (*CELDeviceSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{3} -} -func (m *CELDeviceSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CELDeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CELDeviceSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_CELDeviceSelector.Merge(m, src) -} -func (m *CELDeviceSelector) XXX_Size() int { - return m.Size() -} -func (m *CELDeviceSelector) XXX_DiscardUnknown() { - xxx_messageInfo_CELDeviceSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_CELDeviceSelector proto.InternalMessageInfo - -func (m *CapacityRequestPolicy) Reset() { *m = CapacityRequestPolicy{} } -func (*CapacityRequestPolicy) ProtoMessage() {} -func (*CapacityRequestPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{4} -} -func (m *CapacityRequestPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CapacityRequestPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CapacityRequestPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_CapacityRequestPolicy.Merge(m, src) -} -func (m *CapacityRequestPolicy) XXX_Size() int { - return m.Size() -} -func (m *CapacityRequestPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_CapacityRequestPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_CapacityRequestPolicy proto.InternalMessageInfo - -func (m *CapacityRequestPolicyRange) Reset() { *m = CapacityRequestPolicyRange{} } -func (*CapacityRequestPolicyRange) ProtoMessage() {} -func (*CapacityRequestPolicyRange) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{5} -} -func (m *CapacityRequestPolicyRange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CapacityRequestPolicyRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CapacityRequestPolicyRange) XXX_Merge(src proto.Message) { - xxx_messageInfo_CapacityRequestPolicyRange.Merge(m, src) -} -func (m *CapacityRequestPolicyRange) XXX_Size() int { - return m.Size() -} -func (m *CapacityRequestPolicyRange) XXX_DiscardUnknown() { - xxx_messageInfo_CapacityRequestPolicyRange.DiscardUnknown(m) -} - -var xxx_messageInfo_CapacityRequestPolicyRange proto.InternalMessageInfo - -func (m *CapacityRequirements) Reset() { *m = CapacityRequirements{} } -func (*CapacityRequirements) ProtoMessage() {} -func (*CapacityRequirements) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{6} -} -func (m *CapacityRequirements) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CapacityRequirements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CapacityRequirements) XXX_Merge(src proto.Message) { - xxx_messageInfo_CapacityRequirements.Merge(m, src) -} -func (m *CapacityRequirements) XXX_Size() int { - return m.Size() -} -func (m *CapacityRequirements) XXX_DiscardUnknown() { - xxx_messageInfo_CapacityRequirements.DiscardUnknown(m) -} - -var xxx_messageInfo_CapacityRequirements proto.InternalMessageInfo - -func (m *Counter) Reset() { *m = Counter{} } -func (*Counter) ProtoMessage() {} -func (*Counter) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{7} -} -func (m *Counter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Counter) XXX_Merge(src proto.Message) { - xxx_messageInfo_Counter.Merge(m, src) -} -func (m *Counter) XXX_Size() int { - return m.Size() -} -func (m *Counter) XXX_DiscardUnknown() { - xxx_messageInfo_Counter.DiscardUnknown(m) -} - -var xxx_messageInfo_Counter proto.InternalMessageInfo - -func (m *CounterSet) Reset() { *m = CounterSet{} } -func (*CounterSet) ProtoMessage() {} -func (*CounterSet) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{8} -} -func (m *CounterSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CounterSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CounterSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_CounterSet.Merge(m, src) -} -func (m *CounterSet) XXX_Size() int { - return m.Size() -} -func (m *CounterSet) XXX_DiscardUnknown() { - xxx_messageInfo_CounterSet.DiscardUnknown(m) -} - -var xxx_messageInfo_CounterSet proto.InternalMessageInfo - -func (m *Device) Reset() { *m = Device{} } -func (*Device) ProtoMessage() {} -func (*Device) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{9} -} -func (m *Device) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Device) XXX_Merge(src proto.Message) { - xxx_messageInfo_Device.Merge(m, src) -} -func (m *Device) XXX_Size() int { - return m.Size() -} -func (m *Device) XXX_DiscardUnknown() { - xxx_messageInfo_Device.DiscardUnknown(m) -} - -var xxx_messageInfo_Device proto.InternalMessageInfo - -func (m *DeviceAllocationConfiguration) Reset() { *m = DeviceAllocationConfiguration{} } -func (*DeviceAllocationConfiguration) ProtoMessage() {} -func (*DeviceAllocationConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{10} -} -func (m *DeviceAllocationConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceAllocationConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceAllocationConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceAllocationConfiguration.Merge(m, src) -} -func (m *DeviceAllocationConfiguration) XXX_Size() int { - return m.Size() -} -func (m *DeviceAllocationConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceAllocationConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceAllocationConfiguration proto.InternalMessageInfo - -func (m *DeviceAllocationResult) Reset() { *m = DeviceAllocationResult{} } -func (*DeviceAllocationResult) ProtoMessage() {} -func (*DeviceAllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{11} -} -func (m *DeviceAllocationResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceAllocationResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceAllocationResult.Merge(m, src) -} -func (m *DeviceAllocationResult) XXX_Size() int { - return m.Size() -} -func (m *DeviceAllocationResult) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceAllocationResult.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceAllocationResult proto.InternalMessageInfo - -func (m *DeviceAttribute) Reset() { *m = DeviceAttribute{} } -func (*DeviceAttribute) ProtoMessage() {} -func (*DeviceAttribute) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{12} -} -func (m *DeviceAttribute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceAttribute) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceAttribute.Merge(m, src) -} -func (m *DeviceAttribute) XXX_Size() int { - return m.Size() -} -func (m *DeviceAttribute) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceAttribute.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceAttribute proto.InternalMessageInfo - -func (m *DeviceCapacity) Reset() { *m = DeviceCapacity{} } -func (*DeviceCapacity) ProtoMessage() {} -func (*DeviceCapacity) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{13} -} -func (m *DeviceCapacity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceCapacity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceCapacity) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceCapacity.Merge(m, src) -} -func (m *DeviceCapacity) XXX_Size() int { - return m.Size() -} -func (m *DeviceCapacity) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceCapacity.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceCapacity proto.InternalMessageInfo - -func (m *DeviceClaim) Reset() { *m = DeviceClaim{} } -func (*DeviceClaim) ProtoMessage() {} -func (*DeviceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{14} -} -func (m *DeviceClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClaim.Merge(m, src) -} -func (m *DeviceClaim) XXX_Size() int { - return m.Size() -} -func (m *DeviceClaim) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClaim.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClaim proto.InternalMessageInfo - -func (m *DeviceClaimConfiguration) Reset() { *m = DeviceClaimConfiguration{} } -func (*DeviceClaimConfiguration) ProtoMessage() {} -func (*DeviceClaimConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{15} -} -func (m *DeviceClaimConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClaimConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClaimConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClaimConfiguration.Merge(m, src) -} -func (m *DeviceClaimConfiguration) XXX_Size() int { - return m.Size() -} -func (m *DeviceClaimConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClaimConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClaimConfiguration proto.InternalMessageInfo - -func (m *DeviceClass) Reset() { *m = DeviceClass{} } -func (*DeviceClass) ProtoMessage() {} -func (*DeviceClass) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{16} -} -func (m *DeviceClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClass.Merge(m, src) -} -func (m *DeviceClass) XXX_Size() int { - return m.Size() -} -func (m *DeviceClass) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClass.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClass proto.InternalMessageInfo - -func (m *DeviceClassConfiguration) Reset() { *m = DeviceClassConfiguration{} } -func (*DeviceClassConfiguration) ProtoMessage() {} -func (*DeviceClassConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{17} -} -func (m *DeviceClassConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClassConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClassConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClassConfiguration.Merge(m, src) -} -func (m *DeviceClassConfiguration) XXX_Size() int { - return m.Size() -} -func (m *DeviceClassConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClassConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClassConfiguration proto.InternalMessageInfo - -func (m *DeviceClassList) Reset() { *m = DeviceClassList{} } -func (*DeviceClassList) ProtoMessage() {} -func (*DeviceClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{18} -} -func (m *DeviceClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClassList.Merge(m, src) -} -func (m *DeviceClassList) XXX_Size() int { - return m.Size() -} -func (m *DeviceClassList) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClassList.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClassList proto.InternalMessageInfo - -func (m *DeviceClassSpec) Reset() { *m = DeviceClassSpec{} } -func (*DeviceClassSpec) ProtoMessage() {} -func (*DeviceClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{19} -} -func (m *DeviceClassSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClassSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClassSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClassSpec.Merge(m, src) -} -func (m *DeviceClassSpec) XXX_Size() int { - return m.Size() -} -func (m *DeviceClassSpec) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClassSpec.DiscardUnknown(m) -} +func (m *BasicDevice) Reset() { *m = BasicDevice{} } -var xxx_messageInfo_DeviceClassSpec proto.InternalMessageInfo +func (m *CELDeviceSelector) Reset() { *m = CELDeviceSelector{} } -func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} } -func (*DeviceConfiguration) ProtoMessage() {} -func (*DeviceConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{20} -} -func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceConfiguration.Merge(m, src) -} -func (m *DeviceConfiguration) XXX_Size() int { - return m.Size() -} -func (m *DeviceConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceConfiguration.DiscardUnknown(m) -} +func (m *CapacityRequestPolicy) Reset() { *m = CapacityRequestPolicy{} } -var xxx_messageInfo_DeviceConfiguration proto.InternalMessageInfo +func (m *CapacityRequestPolicyRange) Reset() { *m = CapacityRequestPolicyRange{} } -func (m *DeviceConstraint) Reset() { *m = DeviceConstraint{} } -func (*DeviceConstraint) ProtoMessage() {} -func (*DeviceConstraint) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{21} -} -func (m *DeviceConstraint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceConstraint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceConstraint) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceConstraint.Merge(m, src) -} -func (m *DeviceConstraint) XXX_Size() int { - return m.Size() -} -func (m *DeviceConstraint) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceConstraint.DiscardUnknown(m) -} +func (m *CapacityRequirements) Reset() { *m = CapacityRequirements{} } -var xxx_messageInfo_DeviceConstraint proto.InternalMessageInfo +func (m *Counter) Reset() { *m = Counter{} } -func (m *DeviceCounterConsumption) Reset() { *m = DeviceCounterConsumption{} } -func (*DeviceCounterConsumption) ProtoMessage() {} -func (*DeviceCounterConsumption) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{22} -} -func (m *DeviceCounterConsumption) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceCounterConsumption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceCounterConsumption) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceCounterConsumption.Merge(m, src) -} -func (m *DeviceCounterConsumption) XXX_Size() int { - return m.Size() -} -func (m *DeviceCounterConsumption) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceCounterConsumption.DiscardUnknown(m) -} +func (m *CounterSet) Reset() { *m = CounterSet{} } -var xxx_messageInfo_DeviceCounterConsumption proto.InternalMessageInfo +func (m *Device) Reset() { *m = Device{} } -func (m *DeviceRequest) Reset() { *m = DeviceRequest{} } -func (*DeviceRequest) ProtoMessage() {} -func (*DeviceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{23} -} -func (m *DeviceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceRequest.Merge(m, src) -} -func (m *DeviceRequest) XXX_Size() int { - return m.Size() -} -func (m *DeviceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceRequest.DiscardUnknown(m) -} +func (m *DeviceAllocationConfiguration) Reset() { *m = DeviceAllocationConfiguration{} } -var xxx_messageInfo_DeviceRequest proto.InternalMessageInfo +func (m *DeviceAllocationResult) Reset() { *m = DeviceAllocationResult{} } -func (m *DeviceRequestAllocationResult) Reset() { *m = DeviceRequestAllocationResult{} } -func (*DeviceRequestAllocationResult) ProtoMessage() {} -func (*DeviceRequestAllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{24} -} -func (m *DeviceRequestAllocationResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceRequestAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceRequestAllocationResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceRequestAllocationResult.Merge(m, src) -} -func (m *DeviceRequestAllocationResult) XXX_Size() int { - return m.Size() -} -func (m *DeviceRequestAllocationResult) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceRequestAllocationResult.DiscardUnknown(m) -} +func (m *DeviceAttribute) Reset() { *m = DeviceAttribute{} } -var xxx_messageInfo_DeviceRequestAllocationResult proto.InternalMessageInfo +func (m *DeviceCapacity) Reset() { *m = DeviceCapacity{} } -func (m *DeviceSelector) Reset() { *m = DeviceSelector{} } -func (*DeviceSelector) ProtoMessage() {} -func (*DeviceSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{25} -} -func (m *DeviceSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceSelector.Merge(m, src) -} -func (m *DeviceSelector) XXX_Size() int { - return m.Size() -} -func (m *DeviceSelector) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceSelector.DiscardUnknown(m) -} +func (m *DeviceClaim) Reset() { *m = DeviceClaim{} } -var xxx_messageInfo_DeviceSelector proto.InternalMessageInfo +func (m *DeviceClaimConfiguration) Reset() { *m = DeviceClaimConfiguration{} } -func (m *DeviceSubRequest) Reset() { *m = DeviceSubRequest{} } -func (*DeviceSubRequest) ProtoMessage() {} -func (*DeviceSubRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{26} -} -func (m *DeviceSubRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceSubRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceSubRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceSubRequest.Merge(m, src) -} -func (m *DeviceSubRequest) XXX_Size() int { - return m.Size() -} -func (m *DeviceSubRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceSubRequest.DiscardUnknown(m) -} +func (m *DeviceClass) Reset() { *m = DeviceClass{} } -var xxx_messageInfo_DeviceSubRequest proto.InternalMessageInfo +func (m *DeviceClassConfiguration) Reset() { *m = DeviceClassConfiguration{} } -func (m *DeviceTaint) Reset() { *m = DeviceTaint{} } -func (*DeviceTaint) ProtoMessage() {} -func (*DeviceTaint) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{27} -} -func (m *DeviceTaint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceTaint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceTaint) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceTaint.Merge(m, src) -} -func (m *DeviceTaint) XXX_Size() int { - return m.Size() -} -func (m *DeviceTaint) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceTaint.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceTaint proto.InternalMessageInfo - -func (m *DeviceToleration) Reset() { *m = DeviceToleration{} } -func (*DeviceToleration) ProtoMessage() {} -func (*DeviceToleration) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{28} -} -func (m *DeviceToleration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceToleration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceToleration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceToleration.Merge(m, src) -} -func (m *DeviceToleration) XXX_Size() int { - return m.Size() -} -func (m *DeviceToleration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceToleration.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceToleration proto.InternalMessageInfo - -func (m *NetworkDeviceData) Reset() { *m = NetworkDeviceData{} } -func (*NetworkDeviceData) ProtoMessage() {} -func (*NetworkDeviceData) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{29} -} -func (m *NetworkDeviceData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkDeviceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkDeviceData) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkDeviceData.Merge(m, src) -} -func (m *NetworkDeviceData) XXX_Size() int { - return m.Size() -} -func (m *NetworkDeviceData) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkDeviceData.DiscardUnknown(m) -} - -var xxx_messageInfo_NetworkDeviceData proto.InternalMessageInfo - -func (m *OpaqueDeviceConfiguration) Reset() { *m = OpaqueDeviceConfiguration{} } -func (*OpaqueDeviceConfiguration) ProtoMessage() {} -func (*OpaqueDeviceConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{30} -} -func (m *OpaqueDeviceConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OpaqueDeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *OpaqueDeviceConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_OpaqueDeviceConfiguration.Merge(m, src) -} -func (m *OpaqueDeviceConfiguration) XXX_Size() int { - return m.Size() -} -func (m *OpaqueDeviceConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_OpaqueDeviceConfiguration.DiscardUnknown(m) -} +func (m *DeviceClassList) Reset() { *m = DeviceClassList{} } -var xxx_messageInfo_OpaqueDeviceConfiguration proto.InternalMessageInfo +func (m *DeviceClassSpec) Reset() { *m = DeviceClassSpec{} } -func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } -func (*ResourceClaim) ProtoMessage() {} -func (*ResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{31} -} -func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaim.Merge(m, src) -} -func (m *ResourceClaim) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaim) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaim.DiscardUnknown(m) -} +func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} } -var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo +func (m *DeviceConstraint) Reset() { *m = DeviceConstraint{} } -func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } -func (*ResourceClaimConsumerReference) ProtoMessage() {} -func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{32} -} -func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimConsumerReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimConsumerReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimConsumerReference.Merge(m, src) -} -func (m *ResourceClaimConsumerReference) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimConsumerReference) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimConsumerReference.DiscardUnknown(m) -} +func (m *DeviceCounterConsumption) Reset() { *m = DeviceCounterConsumption{} } -var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo +func (m *DeviceRequest) Reset() { *m = DeviceRequest{} } -func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } -func (*ResourceClaimList) ProtoMessage() {} -func (*ResourceClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{33} -} -func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimList.Merge(m, src) -} -func (m *ResourceClaimList) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimList) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimList.DiscardUnknown(m) -} +func (m *DeviceRequestAllocationResult) Reset() { *m = DeviceRequestAllocationResult{} } -var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo +func (m *DeviceSelector) Reset() { *m = DeviceSelector{} } -func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } -func (*ResourceClaimSpec) ProtoMessage() {} -func (*ResourceClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{34} -} -func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimSpec.Merge(m, src) -} -func (m *ResourceClaimSpec) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimSpec.DiscardUnknown(m) -} +func (m *DeviceSubRequest) Reset() { *m = DeviceSubRequest{} } -var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo +func (m *DeviceTaint) Reset() { *m = DeviceTaint{} } -func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } -func (*ResourceClaimStatus) ProtoMessage() {} -func (*ResourceClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{35} -} -func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimStatus.Merge(m, src) -} -func (m *ResourceClaimStatus) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimStatus.DiscardUnknown(m) -} +func (m *DeviceToleration) Reset() { *m = DeviceToleration{} } -var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo +func (m *NetworkDeviceData) Reset() { *m = NetworkDeviceData{} } -func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } -func (*ResourceClaimTemplate) ProtoMessage() {} -func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{36} -} -func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimTemplate) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimTemplate.Merge(m, src) -} -func (m *ResourceClaimTemplate) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimTemplate) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimTemplate.DiscardUnknown(m) -} +func (m *OpaqueDeviceConfiguration) Reset() { *m = OpaqueDeviceConfiguration{} } -var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo +func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } -func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } -func (*ResourceClaimTemplateList) ProtoMessage() {} -func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{37} -} -func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimTemplateList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimTemplateList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimTemplateList.Merge(m, src) -} -func (m *ResourceClaimTemplateList) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimTemplateList) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimTemplateList.DiscardUnknown(m) -} +func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } -var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo +func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } -func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } -func (*ResourceClaimTemplateSpec) ProtoMessage() {} -func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{38} -} -func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimTemplateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimTemplateSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimTemplateSpec.Merge(m, src) -} -func (m *ResourceClaimTemplateSpec) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimTemplateSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimTemplateSpec.DiscardUnknown(m) -} +func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } -var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo +func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } -func (m *ResourcePool) Reset() { *m = ResourcePool{} } -func (*ResourcePool) ProtoMessage() {} -func (*ResourcePool) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{39} -} -func (m *ResourcePool) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourcePool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourcePool) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourcePool.Merge(m, src) -} -func (m *ResourcePool) XXX_Size() int { - return m.Size() -} -func (m *ResourcePool) XXX_DiscardUnknown() { - xxx_messageInfo_ResourcePool.DiscardUnknown(m) -} +func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } -var xxx_messageInfo_ResourcePool proto.InternalMessageInfo +func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } -func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } -func (*ResourceSlice) ProtoMessage() {} -func (*ResourceSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{40} -} -func (m *ResourceSlice) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceSlice) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceSlice.Merge(m, src) -} -func (m *ResourceSlice) XXX_Size() int { - return m.Size() -} -func (m *ResourceSlice) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceSlice.DiscardUnknown(m) -} +func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } -var xxx_messageInfo_ResourceSlice proto.InternalMessageInfo +func (m *ResourcePool) Reset() { *m = ResourcePool{} } -func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } -func (*ResourceSliceList) ProtoMessage() {} -func (*ResourceSliceList) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{41} -} -func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceSliceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceSliceList.Merge(m, src) -} -func (m *ResourceSliceList) XXX_Size() int { - return m.Size() -} -func (m *ResourceSliceList) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceSliceList.DiscardUnknown(m) -} +func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } -var xxx_messageInfo_ResourceSliceList proto.InternalMessageInfo +func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } -func (m *ResourceSliceSpec) Reset() { *m = ResourceSliceSpec{} } -func (*ResourceSliceSpec) ProtoMessage() {} -func (*ResourceSliceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_ba331e3ec6484c27, []int{42} -} -func (m *ResourceSliceSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceSliceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceSliceSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceSliceSpec.Merge(m, src) -} -func (m *ResourceSliceSpec) XXX_Size() int { - return m.Size() -} -func (m *ResourceSliceSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceSliceSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceSliceSpec proto.InternalMessageInfo - -func init() { - proto.RegisterType((*AllocatedDeviceStatus)(nil), "k8s.io.api.resource.v1beta1.AllocatedDeviceStatus") - proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1beta1.AllocationResult") - proto.RegisterType((*BasicDevice)(nil), "k8s.io.api.resource.v1beta1.BasicDevice") - proto.RegisterMapType((map[QualifiedName]DeviceAttribute)(nil), "k8s.io.api.resource.v1beta1.BasicDevice.AttributesEntry") - proto.RegisterMapType((map[QualifiedName]DeviceCapacity)(nil), "k8s.io.api.resource.v1beta1.BasicDevice.CapacityEntry") - proto.RegisterType((*CELDeviceSelector)(nil), "k8s.io.api.resource.v1beta1.CELDeviceSelector") - proto.RegisterType((*CapacityRequestPolicy)(nil), "k8s.io.api.resource.v1beta1.CapacityRequestPolicy") - proto.RegisterType((*CapacityRequestPolicyRange)(nil), "k8s.io.api.resource.v1beta1.CapacityRequestPolicyRange") - proto.RegisterType((*CapacityRequirements)(nil), "k8s.io.api.resource.v1beta1.CapacityRequirements") - proto.RegisterMapType((map[QualifiedName]resource.Quantity)(nil), "k8s.io.api.resource.v1beta1.CapacityRequirements.RequestsEntry") - proto.RegisterType((*Counter)(nil), "k8s.io.api.resource.v1beta1.Counter") - proto.RegisterType((*CounterSet)(nil), "k8s.io.api.resource.v1beta1.CounterSet") - proto.RegisterMapType((map[string]Counter)(nil), "k8s.io.api.resource.v1beta1.CounterSet.CountersEntry") - proto.RegisterType((*Device)(nil), "k8s.io.api.resource.v1beta1.Device") - proto.RegisterType((*DeviceAllocationConfiguration)(nil), "k8s.io.api.resource.v1beta1.DeviceAllocationConfiguration") - proto.RegisterType((*DeviceAllocationResult)(nil), "k8s.io.api.resource.v1beta1.DeviceAllocationResult") - proto.RegisterType((*DeviceAttribute)(nil), "k8s.io.api.resource.v1beta1.DeviceAttribute") - proto.RegisterType((*DeviceCapacity)(nil), "k8s.io.api.resource.v1beta1.DeviceCapacity") - proto.RegisterType((*DeviceClaim)(nil), "k8s.io.api.resource.v1beta1.DeviceClaim") - proto.RegisterType((*DeviceClaimConfiguration)(nil), "k8s.io.api.resource.v1beta1.DeviceClaimConfiguration") - proto.RegisterType((*DeviceClass)(nil), "k8s.io.api.resource.v1beta1.DeviceClass") - proto.RegisterType((*DeviceClassConfiguration)(nil), "k8s.io.api.resource.v1beta1.DeviceClassConfiguration") - proto.RegisterType((*DeviceClassList)(nil), "k8s.io.api.resource.v1beta1.DeviceClassList") - proto.RegisterType((*DeviceClassSpec)(nil), "k8s.io.api.resource.v1beta1.DeviceClassSpec") - proto.RegisterType((*DeviceConfiguration)(nil), "k8s.io.api.resource.v1beta1.DeviceConfiguration") - proto.RegisterType((*DeviceConstraint)(nil), "k8s.io.api.resource.v1beta1.DeviceConstraint") - proto.RegisterType((*DeviceCounterConsumption)(nil), "k8s.io.api.resource.v1beta1.DeviceCounterConsumption") - proto.RegisterMapType((map[string]Counter)(nil), "k8s.io.api.resource.v1beta1.DeviceCounterConsumption.CountersEntry") - proto.RegisterType((*DeviceRequest)(nil), "k8s.io.api.resource.v1beta1.DeviceRequest") - proto.RegisterType((*DeviceRequestAllocationResult)(nil), "k8s.io.api.resource.v1beta1.DeviceRequestAllocationResult") - proto.RegisterMapType((map[QualifiedName]resource.Quantity)(nil), "k8s.io.api.resource.v1beta1.DeviceRequestAllocationResult.ConsumedCapacityEntry") - proto.RegisterType((*DeviceSelector)(nil), "k8s.io.api.resource.v1beta1.DeviceSelector") - proto.RegisterType((*DeviceSubRequest)(nil), "k8s.io.api.resource.v1beta1.DeviceSubRequest") - proto.RegisterType((*DeviceTaint)(nil), "k8s.io.api.resource.v1beta1.DeviceTaint") - proto.RegisterType((*DeviceToleration)(nil), "k8s.io.api.resource.v1beta1.DeviceToleration") - proto.RegisterType((*NetworkDeviceData)(nil), "k8s.io.api.resource.v1beta1.NetworkDeviceData") - proto.RegisterType((*OpaqueDeviceConfiguration)(nil), "k8s.io.api.resource.v1beta1.OpaqueDeviceConfiguration") - proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1beta1.ResourceClaim") - proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1beta1.ResourceClaimConsumerReference") - proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1beta1.ResourceClaimList") - proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1beta1.ResourceClaimSpec") - proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1beta1.ResourceClaimStatus") - proto.RegisterType((*ResourceClaimTemplate)(nil), "k8s.io.api.resource.v1beta1.ResourceClaimTemplate") - proto.RegisterType((*ResourceClaimTemplateList)(nil), "k8s.io.api.resource.v1beta1.ResourceClaimTemplateList") - proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1beta1.ResourceClaimTemplateSpec") - proto.RegisterType((*ResourcePool)(nil), "k8s.io.api.resource.v1beta1.ResourcePool") - proto.RegisterType((*ResourceSlice)(nil), "k8s.io.api.resource.v1beta1.ResourceSlice") - proto.RegisterType((*ResourceSliceList)(nil), "k8s.io.api.resource.v1beta1.ResourceSliceList") - proto.RegisterType((*ResourceSliceSpec)(nil), "k8s.io.api.resource.v1beta1.ResourceSliceSpec") -} - -func init() { - proto.RegisterFile("k8s.io/api/resource/v1beta1/generated.proto", fileDescriptor_ba331e3ec6484c27) -} - -var fileDescriptor_ba331e3ec6484c27 = []byte{ - // 3039 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0x4d, 0x6c, 0x24, 0x47, - 0xf5, 0x77, 0xcf, 0x8c, 0x3d, 0xe3, 0x37, 0x6b, 0xaf, 0x5d, 0xfb, 0x91, 0x89, 0xf3, 0x8f, 0xc7, - 0xe9, 0xfd, 0x43, 0x9c, 0xcd, 0x66, 0x9c, 0x1d, 0x20, 0x44, 0x9b, 0x03, 0xcc, 0xd8, 0xde, 0xc4, - 0xc9, 0xae, 0xd7, 0xa9, 0x71, 0x36, 0x4b, 0xbe, 0x44, 0xbb, 0xbb, 0x6c, 0x37, 0xee, 0xe9, 0x9e, - 0xed, 0xee, 0xf1, 0xae, 0x85, 0x80, 0x00, 0x57, 0x0e, 0x5c, 0x90, 0x90, 0x00, 0x09, 0x21, 0x04, - 0x42, 0x42, 0x88, 0x03, 0xe7, 0x20, 0x40, 0x11, 0xe1, 0x44, 0x14, 0x2e, 0x39, 0xa0, 0x09, 0x99, - 0x9c, 0x38, 0x72, 0xe1, 0xb0, 0x27, 0x54, 0xd5, 0x55, 0xdd, 0xd5, 0x3d, 0xd3, 0x93, 0x1e, 0x67, - 0x77, 0x15, 0x24, 0x6e, 0x9e, 0x57, 0xef, 0xfd, 0xaa, 0xea, 0xd5, 0xfb, 0xaa, 0xd7, 0x65, 0x78, - 0xfc, 0xe0, 0x69, 0xaf, 0x66, 0x3a, 0x2b, 0x5a, 0xc7, 0x5c, 0x71, 0x89, 0xe7, 0x74, 0x5d, 0x9d, - 0xac, 0x1c, 0x5e, 0xdc, 0x21, 0xbe, 0x76, 0x71, 0x65, 0x8f, 0xd8, 0xc4, 0xd5, 0x7c, 0x62, 0xd4, - 0x3a, 0xae, 0xe3, 0x3b, 0xe8, 0xa1, 0x80, 0xb9, 0xa6, 0x75, 0xcc, 0x9a, 0x60, 0xae, 0x71, 0xe6, - 0x85, 0x27, 0xf6, 0x4c, 0x7f, 0xbf, 0xbb, 0x53, 0xd3, 0x9d, 0xf6, 0xca, 0x9e, 0xb3, 0xe7, 0xac, - 0x30, 0x99, 0x9d, 0xee, 0x2e, 0xfb, 0xc5, 0x7e, 0xb0, 0xbf, 0x02, 0xac, 0x05, 0x55, 0x9a, 0x58, - 0x77, 0x5c, 0x3a, 0x69, 0x72, 0xbe, 0x85, 0xcf, 0x47, 0x3c, 0x6d, 0x4d, 0xdf, 0x37, 0x6d, 0xe2, - 0x1e, 0xad, 0x74, 0x0e, 0xf6, 0xe2, 0xab, 0x1d, 0x47, 0xca, 0x5b, 0x69, 0x13, 0x5f, 0x1b, 0x36, - 0xd7, 0x4a, 0x9a, 0x94, 0xdb, 0xb5, 0x7d, 0xb3, 0x3d, 0x38, 0xcd, 0x53, 0x1f, 0x27, 0xe0, 0xe9, - 0xfb, 0xa4, 0xad, 0x25, 0xe5, 0xd4, 0xb7, 0xf3, 0x70, 0xa6, 0x61, 0x59, 0x8e, 0x4e, 0x69, 0x6b, - 0xe4, 0xd0, 0xd4, 0x49, 0xcb, 0xd7, 0xfc, 0xae, 0x87, 0x3e, 0x0b, 0x53, 0x86, 0x6b, 0x1e, 0x12, - 0xb7, 0xa2, 0x2c, 0x29, 0xcb, 0xd3, 0xcd, 0xd9, 0x77, 0x7a, 0xd5, 0x89, 0x7e, 0xaf, 0x3a, 0xb5, - 0xc6, 0xa8, 0x98, 0x8f, 0xa2, 0x25, 0x28, 0x74, 0x1c, 0xc7, 0xaa, 0xe4, 0x18, 0xd7, 0x09, 0xce, - 0x55, 0xd8, 0x72, 0x1c, 0x0b, 0xb3, 0x11, 0x86, 0xc4, 0x90, 0x2b, 0xf9, 0x04, 0x12, 0xa3, 0x62, - 0x3e, 0x8a, 0x3e, 0x03, 0x45, 0x6f, 0x5f, 0x73, 0xc9, 0xc6, 0x5a, 0xa5, 0xc8, 0x18, 0xcb, 0xfd, - 0x5e, 0xb5, 0xd8, 0x0a, 0x48, 0x58, 0x8c, 0x21, 0x1d, 0x40, 0x77, 0x6c, 0xc3, 0xf4, 0x4d, 0xc7, - 0xf6, 0x2a, 0x85, 0xa5, 0xfc, 0x72, 0xb9, 0xbe, 0x52, 0x8b, 0x8c, 0x21, 0xdc, 0x7f, 0xad, 0x73, - 0xb0, 0x47, 0x09, 0x5e, 0x8d, 0xaa, 0xb9, 0x76, 0x78, 0xb1, 0xb6, 0x2a, 0xe4, 0x9a, 0x88, 0xaf, - 0x01, 0x42, 0x92, 0x87, 0x25, 0x58, 0xf4, 0x02, 0x14, 0x0c, 0xcd, 0xd7, 0x2a, 0x93, 0x4b, 0xca, - 0x72, 0xb9, 0xfe, 0x44, 0x2a, 0x3c, 0x57, 0x6f, 0x0d, 0x6b, 0xb7, 0xd6, 0x6f, 0xfb, 0xc4, 0xf6, - 0x28, 0x78, 0x89, 0x2a, 0x60, 0x4d, 0xf3, 0x35, 0xcc, 0x40, 0x90, 0x06, 0x65, 0x9b, 0xf8, 0xb7, - 0x1c, 0xf7, 0x80, 0x12, 0x2b, 0x53, 0x0c, 0xb3, 0x56, 0x1b, 0x61, 0xbf, 0xb5, 0x4d, 0xce, 0xcf, - 0x34, 0x43, 0xa5, 0x9a, 0x27, 0xfb, 0xbd, 0x6a, 0x79, 0x33, 0x82, 0xc1, 0x32, 0xa6, 0xfa, 0x87, - 0x1c, 0xcc, 0xf1, 0x73, 0x34, 0x1d, 0x1b, 0x13, 0xaf, 0x6b, 0xf9, 0xe8, 0x0d, 0x28, 0x06, 0xaa, - 0xf5, 0xd8, 0x19, 0x96, 0xeb, 0x9f, 0x1b, 0x39, 0x67, 0x30, 0x59, 0x12, 0xa5, 0x79, 0x92, 0xab, - 0xaa, 0x18, 0x8c, 0x7b, 0x58, 0x80, 0xa2, 0xeb, 0x70, 0xc2, 0x76, 0x0c, 0xd2, 0x22, 0x16, 0xd1, - 0x7d, 0xc7, 0x65, 0xc7, 0x5b, 0xae, 0x2f, 0xc9, 0x93, 0x50, 0x67, 0xa2, 0x9a, 0xdf, 0x94, 0xf8, - 0x9a, 0x73, 0xfd, 0x5e, 0xf5, 0x84, 0x4c, 0xc1, 0x31, 0x1c, 0xd4, 0x85, 0x53, 0x5a, 0xb8, 0x8a, - 0x6d, 0xb3, 0x4d, 0x3c, 0x5f, 0x6b, 0x77, 0xf8, 0x59, 0x9c, 0xcf, 0x76, 0xd4, 0x54, 0xac, 0xf9, - 0x40, 0xbf, 0x57, 0x3d, 0xd5, 0x18, 0x84, 0xc2, 0xc3, 0xf0, 0xd5, 0x6f, 0x4f, 0x43, 0xb9, 0xa9, - 0x79, 0xa6, 0x1e, 0x6c, 0x14, 0x7d, 0x03, 0x40, 0xf3, 0x7d, 0xd7, 0xdc, 0xe9, 0xfa, 0x4c, 0x83, - 0xd4, 0xd0, 0x9e, 0x1e, 0xa9, 0x41, 0x49, 0xba, 0xd6, 0x08, 0x45, 0xd7, 0x6d, 0xdf, 0x3d, 0x6a, - 0x9e, 0x13, 0x16, 0x17, 0x0d, 0x7c, 0xe7, 0x83, 0xea, 0xcc, 0x8b, 0x5d, 0xcd, 0x32, 0x77, 0x4d, - 0x62, 0x6c, 0x6a, 0x6d, 0x82, 0xa5, 0x09, 0x51, 0x17, 0x4a, 0xba, 0xd6, 0xd1, 0x74, 0xd3, 0x3f, - 0xaa, 0xe4, 0xd8, 0xe4, 0x4f, 0x65, 0x9e, 0x7c, 0x95, 0x0b, 0x06, 0x53, 0x3f, 0xc2, 0xa7, 0x2e, - 0x09, 0xf2, 0xe0, 0xc4, 0xe1, 0x54, 0xe8, 0xeb, 0x30, 0xa7, 0x3b, 0xb6, 0xd7, 0x6d, 0x13, 0x6f, - 0xd5, 0xe9, 0xda, 0x3e, 0x71, 0xbd, 0x4a, 0x9e, 0x4d, 0xff, 0x85, 0x0c, 0xd6, 0xc3, 0x45, 0x56, - 0x19, 0x42, 0x87, 0xb9, 0x5a, 0x85, 0xcf, 0x3e, 0xb7, 0x9a, 0x80, 0xc5, 0x03, 0x13, 0xa1, 0x65, - 0x28, 0x51, 0x4b, 0xa0, 0x4b, 0xaa, 0x14, 0x82, 0x80, 0x42, 0xd7, 0xbd, 0xc9, 0x69, 0x38, 0x1c, - 0x1d, 0xb0, 0xbd, 0xc9, 0xbb, 0x64, 0x7b, 0xcb, 0x50, 0xd2, 0x2c, 0x8b, 0x32, 0x78, 0xcc, 0x51, - 0x4b, 0xc1, 0x0a, 0x1a, 0x9c, 0x86, 0xc3, 0x51, 0xb4, 0x05, 0x53, 0xbe, 0x66, 0xda, 0xbe, 0x57, - 0x29, 0x32, 0xf5, 0x2c, 0x67, 0x50, 0xcf, 0x36, 0x15, 0x88, 0x02, 0x20, 0xfb, 0xe9, 0x61, 0x8e, - 0x83, 0x2e, 0x42, 0x79, 0xc7, 0xb4, 0x0d, 0x6f, 0xdb, 0xa1, 0x33, 0x54, 0x4a, 0x6c, 0x7a, 0xe6, - 0xf7, 0xcd, 0x88, 0x8c, 0x65, 0x1e, 0xb4, 0x0a, 0xf3, 0xf4, 0xa7, 0x69, 0xef, 0x45, 0x81, 0xac, - 0x32, 0xbd, 0x94, 0x5f, 0x9e, 0x6e, 0x9e, 0xe9, 0xf7, 0xaa, 0xf3, 0xcd, 0xe4, 0x20, 0x1e, 0xe4, - 0x47, 0x37, 0xa0, 0xc2, 0x89, 0x97, 0x35, 0xd3, 0xea, 0xba, 0x44, 0xc2, 0x02, 0x86, 0xf5, 0x7f, - 0xfd, 0x5e, 0xb5, 0xd2, 0x4c, 0xe1, 0xc1, 0xa9, 0xd2, 0x14, 0x99, 0x7a, 0xda, 0xad, 0xab, 0x5d, - 0xcb, 0x37, 0x3b, 0x96, 0x14, 0x5c, 0xbc, 0x4a, 0x99, 0x6d, 0x8f, 0x21, 0x37, 0x52, 0x78, 0x70, - 0xaa, 0xf4, 0xc2, 0x01, 0x9c, 0x4c, 0x78, 0x18, 0x9a, 0x83, 0xfc, 0x01, 0x39, 0x0a, 0xd2, 0x15, - 0xa6, 0x7f, 0xa2, 0x26, 0x4c, 0x1e, 0x6a, 0x56, 0x97, 0xb0, 0xe4, 0x54, 0xae, 0x5f, 0xc8, 0x12, - 0xfe, 0x04, 0x28, 0x0e, 0x44, 0x2f, 0xe5, 0x9e, 0x56, 0x16, 0xf6, 0x61, 0x26, 0xe6, 0x51, 0x43, - 0xa6, 0x6a, 0xc4, 0xa7, 0x7a, 0x3c, 0x8b, 0xaf, 0x70, 0x48, 0x69, 0x26, 0xf5, 0x59, 0x98, 0x5f, - 0x5d, 0xbf, 0xc2, 0x13, 0xb1, 0xb0, 0xc9, 0x3a, 0x00, 0xb9, 0xdd, 0x71, 0x89, 0x47, 0xb3, 0x0b, - 0x4f, 0xc7, 0x61, 0x02, 0x5b, 0x0f, 0x47, 0xb0, 0xc4, 0xa5, 0xbe, 0x95, 0x83, 0x33, 0xe1, 0x04, - 0xe4, 0x66, 0x97, 0x78, 0xfe, 0x96, 0x63, 0x99, 0xfa, 0x11, 0x7a, 0x89, 0x66, 0x85, 0x5d, 0xad, - 0x6b, 0xf9, 0x3c, 0x2b, 0xd4, 0x46, 0x45, 0xd4, 0x68, 0xf1, 0x2f, 0x76, 0x35, 0xdb, 0x37, 0xfd, - 0xa3, 0x20, 0x2d, 0xaf, 0x05, 0x10, 0x58, 0x60, 0x21, 0x02, 0xe5, 0x43, 0xcd, 0x32, 0x8d, 0xeb, - 0x74, 0x2f, 0x22, 0x64, 0x8c, 0x0b, 0x7d, 0x8a, 0xef, 0xaa, 0x7c, 0x3d, 0x82, 0xc2, 0x32, 0x2e, - 0xda, 0x03, 0x60, 0x3f, 0xb1, 0x66, 0xef, 0x05, 0x31, 0xa2, 0x5c, 0xff, 0xe2, 0x48, 0x65, 0x0f, - 0xd5, 0x02, 0x13, 0x6f, 0xce, 0x52, 0x05, 0x5e, 0x0f, 0xe1, 0xb0, 0x04, 0xad, 0xbe, 0x99, 0x83, - 0x85, 0x74, 0x51, 0xb4, 0x01, 0xf9, 0xb6, 0x69, 0x1f, 0x53, 0x83, 0xc5, 0x7e, 0xaf, 0x9a, 0xbf, - 0x6a, 0xda, 0x98, 0x62, 0x30, 0x28, 0xed, 0x36, 0x37, 0x9c, 0xe3, 0x41, 0x69, 0xb7, 0x31, 0xc5, - 0x40, 0x57, 0xa0, 0xe0, 0xf9, 0xa4, 0xc3, 0x33, 0xf1, 0xb8, 0x58, 0xac, 0x6e, 0x69, 0xf9, 0xa4, - 0x83, 0x19, 0x8a, 0xfa, 0xdd, 0x1c, 0x9c, 0x96, 0x55, 0x60, 0xba, 0xa4, 0x4d, 0x68, 0xa0, 0xfa, - 0x26, 0x94, 0xdc, 0x40, 0x25, 0x22, 0x2f, 0x7e, 0x29, 0xf3, 0x11, 0x08, 0x90, 0x1a, 0x57, 0xaa, - 0x97, 0xc8, 0x51, 0x82, 0x3c, 0x24, 0x47, 0x89, 0x39, 0x17, 0x0e, 0x60, 0x26, 0x26, 0x3d, 0xc4, - 0x1f, 0xd7, 0xe2, 0xfe, 0x38, 0xa6, 0x2a, 0x64, 0x97, 0x7c, 0x03, 0x8a, 0x3c, 0x3f, 0xa1, 0x96, - 0x00, 0x3d, 0xde, 0xb1, 0xcf, 0xf0, 0x3d, 0x4e, 0x32, 0x5b, 0xe6, 0x73, 0xa8, 0xff, 0x56, 0x00, - 0xf8, 0x04, 0x2d, 0xe2, 0xd3, 0x7a, 0xda, 0xa6, 0xe9, 0x4f, 0x89, 0xd7, 0xd3, 0x4c, 0x03, 0x6c, - 0x04, 0xe9, 0x50, 0xd2, 0x45, 0x66, 0xce, 0x65, 0xc8, 0xcc, 0x11, 0xb8, 0xf8, 0x93, 0xeb, 0x7c, - 0x2e, 0xac, 0x0b, 0x44, 0x46, 0x0e, 0x81, 0x17, 0x34, 0x98, 0x89, 0x31, 0x0f, 0x51, 0xf1, 0xa5, - 0xb8, 0x8a, 0xff, 0x3f, 0xcb, 0x22, 0x64, 0xc5, 0x76, 0x81, 0xdf, 0x00, 0x32, 0xec, 0x79, 0x03, - 0x26, 0x77, 0x68, 0x7d, 0xc3, 0xe7, 0x5a, 0xce, 0x5a, 0x09, 0x35, 0xa7, 0xa9, 0xbe, 0x19, 0x01, - 0x07, 0x08, 0xea, 0xf7, 0x72, 0xf0, 0x70, 0xb2, 0xd4, 0x5d, 0x75, 0xec, 0x5d, 0x73, 0xaf, 0xeb, - 0xb2, 0x1f, 0xe8, 0xcb, 0x30, 0x15, 0x20, 0xf2, 0x05, 0x2d, 0x8b, 0x7c, 0xdd, 0x62, 0xd4, 0x3b, - 0xbd, 0xea, 0xd9, 0xa4, 0x68, 0x30, 0x82, 0xb9, 0x1c, 0xad, 0x22, 0x42, 0x07, 0xc9, 0xb1, 0x0c, - 0x7a, 0x42, 0xb6, 0xed, 0xc8, 0x94, 0xd1, 0xb7, 0xe0, 0x94, 0xc1, 0x2b, 0x27, 0x69, 0x09, 0xdc, - 0x81, 0x9f, 0xcc, 0x54, 0x71, 0x49, 0x72, 0xcd, 0x87, 0xf8, 0x52, 0x4f, 0x0d, 0x19, 0xc4, 0xc3, - 0x66, 0x52, 0x3f, 0x52, 0xe0, 0xec, 0xf0, 0xca, 0x1f, 0x11, 0x28, 0xba, 0xec, 0x2f, 0xe1, 0xe5, - 0x97, 0x32, 0xac, 0x87, 0xef, 0x31, 0xfd, 0x1a, 0x11, 0xfc, 0xf6, 0xb0, 0xc0, 0x46, 0x3b, 0x30, - 0xa5, 0xb3, 0x25, 0x71, 0x6b, 0xbe, 0x34, 0xd6, 0x2d, 0x25, 0xbe, 0xff, 0xb0, 0xb4, 0x0a, 0xc8, - 0x98, 0x23, 0xab, 0xbf, 0x52, 0xe0, 0x64, 0x22, 0xc1, 0xa3, 0x45, 0xc8, 0x9b, 0xb6, 0xcf, 0x2c, - 0x2a, 0x1f, 0x9c, 0xcf, 0x86, 0xed, 0x07, 0xae, 0x49, 0x07, 0xd0, 0x23, 0x50, 0xd8, 0xa1, 0x37, - 0xdb, 0x3c, 0x2b, 0x54, 0x66, 0xfa, 0xbd, 0xea, 0x74, 0xd3, 0x71, 0xac, 0x80, 0x83, 0x0d, 0xa1, - 0x47, 0x61, 0xca, 0xf3, 0x5d, 0xd3, 0xde, 0xe3, 0xd5, 0x2a, 0x2b, 0xd6, 0x5a, 0x8c, 0x12, 0xb0, - 0xf1, 0x61, 0x74, 0x1e, 0x8a, 0x87, 0xc4, 0x65, 0xf9, 0x7b, 0x92, 0x71, 0xb2, 0x3a, 0xf4, 0x7a, - 0x40, 0x0a, 0x58, 0x05, 0x83, 0xfa, 0x9e, 0x02, 0xb3, 0xf1, 0x0a, 0xe1, 0x9e, 0x04, 0x1e, 0x74, - 0x00, 0x33, 0xae, 0x9c, 0xd8, 0xb8, 0x6f, 0xd5, 0xc7, 0xcf, 0xa6, 0xcd, 0xf9, 0x7e, 0xaf, 0x3a, - 0x13, 0xcf, 0x92, 0x71, 0x6c, 0xf5, 0xd7, 0x39, 0x28, 0xf3, 0x4d, 0x59, 0x9a, 0xd9, 0x46, 0x37, - 0x06, 0x52, 0xc8, 0xf9, 0xec, 0xc6, 0x15, 0x45, 0xae, 0x21, 0x1e, 0x65, 0x40, 0x99, 0xde, 0x2b, - 0x7c, 0x37, 0x28, 0xce, 0x03, 0x9b, 0x7a, 0x22, 0x9b, 0x27, 0x71, 0xa9, 0xa8, 0x0e, 0x89, 0x68, - 0x1e, 0x96, 0x61, 0xd1, 0xeb, 0xa1, 0xd1, 0x8e, 0x71, 0x39, 0xa2, 0x3b, 0xcf, 0x66, 0xaf, 0x6f, - 0x2b, 0x50, 0x49, 0x13, 0x8a, 0x45, 0x17, 0xe5, 0x38, 0xd1, 0x25, 0x77, 0xdf, 0xa2, 0xcb, 0xef, - 0x15, 0xe9, 0xd8, 0x3d, 0x0f, 0x7d, 0x15, 0x4a, 0xf4, 0x86, 0xce, 0x7a, 0x2b, 0xca, 0xc0, 0x2a, - 0x46, 0xdc, 0xe7, 0xaf, 0xed, 0x7c, 0x8d, 0xe8, 0xfe, 0x55, 0xe2, 0x6b, 0x51, 0xe9, 0x1b, 0xd1, - 0x70, 0x88, 0x8a, 0x36, 0xa1, 0xe0, 0x75, 0x88, 0x3e, 0x46, 0xc9, 0xcf, 0x56, 0xd6, 0xea, 0x10, - 0x3d, 0xca, 0x3c, 0xf4, 0x17, 0x66, 0x38, 0xea, 0x8f, 0xe4, 0x93, 0xf0, 0xbc, 0xf8, 0x49, 0xa4, - 0xe8, 0x57, 0xb9, 0x6f, 0xfa, 0x7d, 0x2b, 0x8c, 0x6b, 0x6c, 0x75, 0x57, 0x4c, 0xcf, 0x47, 0xaf, - 0x0d, 0xe8, 0xb8, 0x96, 0x4d, 0xc7, 0x54, 0x9a, 0x69, 0x38, 0x74, 0x2f, 0x41, 0x91, 0xf4, 0x7b, - 0x15, 0x26, 0x4d, 0x9f, 0xb4, 0x85, 0x63, 0x2d, 0x67, 0x55, 0x70, 0x14, 0x84, 0x36, 0xa8, 0x38, - 0x0e, 0x50, 0xd4, 0x1f, 0xe7, 0x62, 0x1b, 0xa0, 0x8a, 0x47, 0xaf, 0xc1, 0xb4, 0xc7, 0xef, 0x3e, - 0x22, 0x38, 0x64, 0xb9, 0x4f, 0x85, 0x77, 0xfc, 0x79, 0x3e, 0xd3, 0xb4, 0xa0, 0x78, 0x38, 0x02, - 0x94, 0x3c, 0x37, 0x37, 0x8e, 0xe7, 0x26, 0x8e, 0x3e, 0xcd, 0x73, 0xd1, 0x15, 0x38, 0x4d, 0x6e, - 0xfb, 0xc4, 0x36, 0x88, 0x81, 0x39, 0x98, 0xd4, 0xce, 0xa8, 0xf4, 0x7b, 0xd5, 0xd3, 0xeb, 0x43, - 0xc6, 0xf1, 0x50, 0x29, 0xf5, 0x26, 0x0c, 0xb3, 0x05, 0xf4, 0x0a, 0x4c, 0x39, 0x1d, 0xed, 0x66, - 0x98, 0x10, 0x46, 0x77, 0x86, 0xae, 0x31, 0xd6, 0x61, 0x06, 0x07, 0x74, 0x03, 0xc1, 0x30, 0xe6, - 0x88, 0xea, 0x3f, 0x15, 0x98, 0x4b, 0x06, 0xc4, 0x31, 0x42, 0xce, 0x16, 0xcc, 0xb6, 0x35, 0x5f, - 0xdf, 0x0f, 0xf3, 0x2c, 0xef, 0x0c, 0x2f, 0xf7, 0x7b, 0xd5, 0xd9, 0xab, 0xb1, 0x91, 0x3b, 0xbd, - 0x2a, 0xba, 0xdc, 0xb5, 0xac, 0xa3, 0x78, 0x9d, 0x9f, 0x90, 0x47, 0x5f, 0x81, 0x79, 0xc3, 0xf4, - 0x7c, 0xd3, 0xd6, 0xfd, 0x08, 0x34, 0x68, 0x25, 0x3f, 0xde, 0xef, 0x55, 0xe7, 0xd7, 0x92, 0x83, - 0x29, 0xb8, 0x83, 0x28, 0xea, 0xcf, 0x73, 0xa1, 0x73, 0x0f, 0x34, 0xae, 0xe8, 0xb5, 0x5b, 0x0f, - 0x4b, 0xe7, 0xe4, 0xb5, 0x3b, 0x2a, 0xaa, 0xb1, 0xc4, 0x85, 0x6e, 0x0e, 0xd4, 0xe6, 0xab, 0xc7, - 0xea, 0x9a, 0x7d, 0xba, 0x2a, 0xf5, 0xdf, 0x4d, 0xc2, 0x4c, 0x2c, 0x01, 0x67, 0xa8, 0xd8, 0x1b, - 0x70, 0xd2, 0x88, 0x7c, 0x87, 0xb9, 0x40, 0x60, 0x08, 0x0f, 0x70, 0x66, 0xd9, 0xed, 0x99, 0x5c, - 0x92, 0x3f, 0x1e, 0x07, 0xf2, 0x77, 0x3b, 0x0e, 0x5c, 0x87, 0xd9, 0xa8, 0x0b, 0x7c, 0xd5, 0x31, - 0x84, 0x8b, 0xd6, 0xb8, 0xd4, 0x6c, 0x23, 0x36, 0x7a, 0xa7, 0x57, 0x3d, 0x9d, 0xac, 0x3d, 0x29, - 0x1d, 0x27, 0x50, 0xd0, 0x39, 0x98, 0x64, 0x67, 0xc3, 0x0a, 0xbd, 0x7c, 0x14, 0xf6, 0x98, 0x5e, - 0x71, 0x30, 0x86, 0x2e, 0x42, 0x59, 0x33, 0xda, 0xa6, 0xdd, 0xd0, 0x75, 0xe2, 0x89, 0x4e, 0x23, - 0xab, 0x1e, 0x1b, 0x11, 0x19, 0xcb, 0x3c, 0xa8, 0x0d, 0xb3, 0xbb, 0xa6, 0xeb, 0xf9, 0x8d, 0x43, - 0xcd, 0xb4, 0xb4, 0x1d, 0x8b, 0xf0, 0xbe, 0x63, 0x96, 0xd2, 0xa6, 0xd5, 0xdd, 0x11, 0xa5, 0xd3, - 0x59, 0xb1, 0xbd, 0xcb, 0x31, 0x30, 0x9c, 0x00, 0xa7, 0x65, 0x94, 0xef, 0x58, 0xc4, 0xe5, 0xdd, - 0xba, 0x52, 0xe6, 0xb9, 0xb6, 0x43, 0xa9, 0xa8, 0x8c, 0x8a, 0x68, 0x1e, 0x96, 0x61, 0xd1, 0xab, - 0x52, 0x93, 0x7b, 0x9a, 0x19, 0xe7, 0xc5, 0xb1, 0x3b, 0x09, 0x41, 0x28, 0x0a, 0x47, 0x42, 0x40, - 0xf5, 0x83, 0x29, 0x71, 0xd3, 0x4b, 0xb9, 0x94, 0xa0, 0xc7, 0xe8, 0x0d, 0x87, 0x0d, 0x71, 0x4b, - 0x96, 0x6e, 0x29, 0x8c, 0x8c, 0xc5, 0xb8, 0xf4, 0x3d, 0x2c, 0x97, 0xe9, 0x7b, 0x58, 0x3e, 0xc3, - 0xf7, 0xb0, 0xc2, 0xc8, 0xef, 0x61, 0x09, 0x1b, 0x99, 0xcc, 0x60, 0x23, 0x89, 0x43, 0x9b, 0xba, - 0x37, 0x87, 0x36, 0xb4, 0xe9, 0x5c, 0xbc, 0x8b, 0x4d, 0xe7, 0xd2, 0x27, 0x6a, 0x3a, 0x3f, 0x1f, - 0x7d, 0x47, 0x9c, 0x66, 0x0a, 0x7e, 0x52, 0xfa, 0x8e, 0x78, 0xa7, 0x57, 0x7d, 0x24, 0xed, 0x5b, - 0xa9, 0x7f, 0xd4, 0x21, 0x5e, 0xed, 0x25, 0xf9, 0x63, 0xe3, 0x2f, 0x95, 0xf0, 0x73, 0x88, 0x21, - 0x2c, 0x8c, 0xf5, 0xc4, 0xcb, 0xf5, 0xad, 0xe3, 0x5f, 0x86, 0x6b, 0xab, 0x09, 0xc8, 0x20, 0xca, - 0x3f, 0x96, 0xf8, 0x52, 0x62, 0xa4, 0x7f, 0xaf, 0x19, 0x58, 0xd4, 0x82, 0x07, 0x67, 0x86, 0xa2, - 0xde, 0xd3, 0xde, 0xd8, 0xab, 0xe2, 0xa6, 0x1a, 0xf6, 0xaa, 0x37, 0x20, 0xaf, 0x13, 0x6b, 0x48, - 0xdd, 0x39, 0xc4, 0x97, 0x93, 0x8d, 0xee, 0xa0, 0x99, 0xb9, 0xba, 0x7e, 0x05, 0x53, 0x0c, 0xf5, - 0x07, 0x05, 0x51, 0x88, 0x44, 0xe1, 0xeb, 0x7f, 0x89, 0xe7, 0x13, 0x26, 0x9e, 0x44, 0x84, 0x28, - 0xde, 0xfb, 0xb0, 0x5e, 0xba, 0xdb, 0x61, 0xfd, 0x5f, 0xe1, 0x9d, 0x92, 0x7d, 0x3f, 0x43, 0x0f, - 0x4b, 0x06, 0xde, 0x2c, 0xf3, 0xb5, 0xe5, 0x5f, 0x20, 0x47, 0x81, 0xb5, 0x9f, 0x93, 0xad, 0x7d, - 0x3a, 0xa5, 0x17, 0xf2, 0x0c, 0x4c, 0x91, 0xdd, 0x5d, 0xa2, 0xfb, 0x3c, 0x6e, 0x8b, 0xaf, 0xb5, - 0x53, 0xeb, 0x8c, 0x7a, 0x87, 0x96, 0x99, 0xd1, 0x94, 0x01, 0x11, 0x73, 0x11, 0xf4, 0x32, 0x4c, - 0xfb, 0x66, 0x9b, 0x34, 0x0c, 0x83, 0x18, 0xfc, 0x93, 0xc4, 0x38, 0x5f, 0xa9, 0x59, 0x67, 0x69, - 0x5b, 0x00, 0xe0, 0x08, 0xeb, 0x52, 0xe9, 0x87, 0x3f, 0xad, 0x4e, 0xbc, 0xf9, 0xf7, 0xa5, 0x09, - 0xf5, 0x67, 0x39, 0xe1, 0x0b, 0x91, 0xce, 0x3f, 0x6e, 0xe3, 0xcf, 0x41, 0xc9, 0xe9, 0x50, 0x5e, - 0x47, 0xe4, 0xac, 0x0b, 0xa2, 0x8c, 0xbc, 0xc6, 0xe9, 0x77, 0x7a, 0xd5, 0x4a, 0x12, 0x56, 0x8c, - 0xe1, 0x50, 0x3a, 0x52, 0x61, 0x3e, 0x93, 0x0a, 0x0b, 0xe3, 0xab, 0x70, 0x15, 0xe6, 0x23, 0xfb, - 0x69, 0x11, 0xdd, 0xb1, 0x0d, 0x8f, 0xdb, 0x31, 0x4b, 0x29, 0xdb, 0xc9, 0x41, 0x3c, 0xc8, 0xaf, - 0xfe, 0x46, 0x81, 0xf9, 0x81, 0x87, 0x13, 0xe8, 0x19, 0x98, 0x31, 0x69, 0x41, 0xbb, 0xab, 0xf1, - 0x9b, 0x58, 0xa0, 0xaf, 0x33, 0x7c, 0x79, 0x33, 0x1b, 0xf2, 0x20, 0x8e, 0xf3, 0xa2, 0x07, 0x21, - 0x6f, 0x76, 0x44, 0x0f, 0x97, 0x85, 0xa7, 0x8d, 0x2d, 0x0f, 0x53, 0x1a, 0x8d, 0x33, 0xfb, 0x9a, - 0x6b, 0xdc, 0xd2, 0x5c, 0x7a, 0x5a, 0x2e, 0x4d, 0xd1, 0xf9, 0x78, 0x9c, 0x79, 0x2e, 0x3e, 0x8c, - 0x93, 0xfc, 0xea, 0x2f, 0x14, 0x78, 0x30, 0xf5, 0x72, 0x96, 0xf9, 0x05, 0x8e, 0x06, 0xd0, 0xd1, - 0x5c, 0xad, 0x4d, 0xf8, 0xad, 0xe3, 0x18, 0x2f, 0x56, 0xc2, 0x6b, 0xcd, 0x56, 0x08, 0x84, 0x25, - 0x50, 0xf5, 0x27, 0x39, 0x98, 0x11, 0xf7, 0xd2, 0xa0, 0x7f, 0x77, 0xef, 0x1b, 0x39, 0x5b, 0xb1, - 0x46, 0xce, 0xe8, 0x54, 0x12, 0x5b, 0x5b, 0x5a, 0x2b, 0x07, 0xdd, 0x80, 0x29, 0x8f, 0x3d, 0x6e, - 0xca, 0xd4, 0x5e, 0x8f, 0x63, 0x32, 0xb9, 0xe8, 0x08, 0x82, 0xdf, 0x98, 0xe3, 0xa9, 0x7d, 0x05, - 0x16, 0x63, 0xfc, 0x3c, 0x15, 0xbb, 0x98, 0xec, 0x12, 0x97, 0xd8, 0x3a, 0x41, 0x17, 0xa0, 0xa4, - 0x75, 0xcc, 0x67, 0x5d, 0xa7, 0xdb, 0xe1, 0xe7, 0x19, 0x5e, 0xea, 0x1a, 0x5b, 0x1b, 0x8c, 0x8e, - 0x43, 0x0e, 0xca, 0x2d, 0x16, 0xc4, 0xad, 0x4a, 0x6a, 0x79, 0x06, 0x74, 0x1c, 0x72, 0x84, 0x49, - 0xb1, 0x90, 0x9a, 0x14, 0x9b, 0x90, 0xef, 0x9a, 0x06, 0xef, 0x3d, 0x3f, 0x29, 0x42, 0xc5, 0x4b, - 0x59, 0xeb, 0x21, 0x2a, 0xac, 0xfe, 0x51, 0x81, 0xf9, 0xd8, 0x26, 0xef, 0x43, 0xb7, 0xe9, 0x5a, - 0xbc, 0xdb, 0x74, 0x3e, 0xfb, 0x89, 0xa5, 0xf4, 0x9b, 0xf6, 0x13, 0x7b, 0x60, 0x0d, 0xa7, 0x56, - 0xf2, 0xa1, 0xd4, 0x72, 0xd6, 0x6e, 0x6e, 0xfa, 0xeb, 0x28, 0xf5, 0xcf, 0x39, 0x38, 0x35, 0xc4, - 0x86, 0xd0, 0xeb, 0x00, 0x51, 0xe2, 0xe6, 0xf3, 0x8d, 0x4e, 0xc0, 0x03, 0xdf, 0x52, 0xd8, 0x77, - 0x6b, 0x89, 0x2a, 0x01, 0x22, 0x17, 0xca, 0x2e, 0xf1, 0x88, 0x7b, 0x48, 0x8c, 0xcb, 0x2c, 0xf0, - 0x53, 0xbd, 0x3d, 0x93, 0x5d, 0x6f, 0x03, 0x96, 0x1b, 0xa5, 0x7b, 0x1c, 0xe1, 0x62, 0x79, 0x12, - 0xf4, 0x7a, 0xa4, 0xbf, 0xe0, 0x3d, 0x5e, 0x3d, 0xcb, 0x7e, 0xe2, 0x0f, 0x0e, 0x47, 0x68, 0xf2, - 0x6f, 0x0a, 0x9c, 0x89, 0xad, 0x71, 0x9b, 0xb4, 0x3b, 0x96, 0xe6, 0x93, 0xfb, 0x10, 0x85, 0x6e, - 0xc4, 0xa2, 0xd0, 0x53, 0xd9, 0xf5, 0x28, 0xd6, 0x98, 0xda, 0x58, 0x7e, 0x4f, 0x81, 0x07, 0x87, - 0x4a, 0xdc, 0x07, 0xb7, 0x7a, 0x39, 0xee, 0x56, 0xf5, 0xf1, 0xb7, 0x95, 0xe2, 0x5e, 0x7f, 0x4d, - 0xdb, 0x14, 0xf3, 0xb3, 0xff, 0xc2, 0xa4, 0xa1, 0xfe, 0x56, 0x81, 0x13, 0x82, 0x93, 0x5e, 0xe2, - 0x33, 0xdc, 0x40, 0xea, 0x00, 0xfc, 0x9d, 0xad, 0xf8, 0xd8, 0x92, 0x8f, 0x96, 0xfd, 0x6c, 0x38, - 0x82, 0x25, 0x2e, 0xf4, 0x3c, 0x20, 0xb1, 0xc0, 0x96, 0x25, 0x5a, 0x82, 0x2c, 0xf4, 0xe7, 0x9b, - 0x0b, 0x5c, 0x16, 0xe1, 0x01, 0x0e, 0x3c, 0x44, 0x4a, 0xfd, 0x93, 0x12, 0x65, 0x6b, 0x46, 0xfe, - 0x94, 0x2a, 0x9e, 0xad, 0x2d, 0x55, 0xf1, 0x72, 0xba, 0x61, 0x9c, 0x9f, 0xd6, 0x74, 0xc3, 0x16, - 0x97, 0xe2, 0x0f, 0x7f, 0x29, 0x24, 0x36, 0xc1, 0xfc, 0x20, 0x6b, 0x65, 0xf7, 0x82, 0xf4, 0xb6, - 0xba, 0x5c, 0x7f, 0x2c, 0xd3, 0x6a, 0xa8, 0x8d, 0x0e, 0x6d, 0x3b, 0x5d, 0x90, 0xde, 0x56, 0x26, - 0x4a, 0x8a, 0x0c, 0xef, 0x2b, 0x0b, 0x77, 0xe9, 0x7d, 0xe5, 0x05, 0xe9, 0x7d, 0x65, 0xd0, 0xd1, - 0x8a, 0xca, 0xa0, 0xc1, 0x37, 0x96, 0x9b, 0x51, 0x62, 0x09, 0x7a, 0x59, 0xe7, 0x32, 0x24, 0xe6, - 0x11, 0x2f, 0x96, 0x31, 0x9c, 0xed, 0x10, 0x37, 0x20, 0x47, 0x8b, 0xa4, 0x5e, 0x5a, 0x64, 0x6b, - 0x59, 0xe8, 0xf7, 0xaa, 0x67, 0xb7, 0x86, 0x72, 0xe0, 0x14, 0x49, 0xb4, 0x07, 0xb3, 0xac, 0x5b, - 0x64, 0x84, 0xcf, 0x65, 0x83, 0x5e, 0xe9, 0xa3, 0x19, 0x1f, 0xe5, 0x44, 0x1d, 0xd9, 0x56, 0x0c, - 0x06, 0x27, 0x60, 0x9b, 0x8d, 0x77, 0x3e, 0x5c, 0x9c, 0x78, 0xf7, 0xc3, 0xc5, 0x89, 0xf7, 0x3f, - 0x5c, 0x9c, 0x78, 0xb3, 0xbf, 0xa8, 0xbc, 0xd3, 0x5f, 0x54, 0xde, 0xed, 0x2f, 0x2a, 0xef, 0xf7, - 0x17, 0x95, 0x7f, 0xf4, 0x17, 0x95, 0xef, 0x7f, 0xb4, 0x38, 0xf1, 0xca, 0x43, 0x23, 0xfe, 0x87, - 0xe2, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x31, 0x43, 0xa8, 0x61, 0x31, 0x00, 0x00, -} +func (m *ResourceSliceSpec) Reset() { *m = ResourceSliceSpec{} } func (m *AllocatedDeviceStatus) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -1764,7 +383,7 @@ func (m *BasicDevice) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Capacity { keysForCapacity = append(keysForCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + sort.Strings(keysForCapacity) for iNdEx := len(keysForCapacity) - 1; iNdEx >= 0; iNdEx-- { v := m.Capacity[QualifiedName(keysForCapacity[iNdEx])] baseI := i @@ -1793,7 +412,7 @@ func (m *BasicDevice) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Attributes { keysForAttributes = append(keysForAttributes, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes) + sort.Strings(keysForAttributes) for iNdEx := len(keysForAttributes) - 1; iNdEx >= 0; iNdEx-- { v := m.Attributes[QualifiedName(keysForAttributes[iNdEx])] baseI := i @@ -1993,7 +612,7 @@ func (m *CapacityRequirements) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Requests { keysForRequests = append(keysForRequests, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForRequests) + sort.Strings(keysForRequests) for iNdEx := len(keysForRequests) - 1; iNdEx >= 0; iNdEx-- { v := m.Requests[QualifiedName(keysForRequests[iNdEx])] baseI := i @@ -2078,7 +697,7 @@ func (m *CounterSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Counters { keysForCounters = append(keysForCounters, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) + sort.Strings(keysForCounters) for iNdEx := len(keysForCounters) - 1; iNdEx >= 0; iNdEx-- { v := m.Counters[string(keysForCounters[iNdEx])] baseI := i @@ -2739,7 +1358,7 @@ func (m *DeviceCounterConsumption) MarshalToSizedBuffer(dAtA []byte) (int, error for k := range m.Counters { keysForCounters = append(keysForCounters, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) + sort.Strings(keysForCounters) for iNdEx := len(keysForCounters) - 1; iNdEx >= 0; iNdEx-- { v := m.Counters[string(keysForCounters[iNdEx])] baseI := i @@ -2901,7 +1520,7 @@ func (m *DeviceRequestAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, for k := range m.ConsumedCapacity { keysForConsumedCapacity = append(keysForConsumedCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForConsumedCapacity) + sort.Strings(keysForConsumedCapacity) for iNdEx := len(keysForConsumedCapacity) - 1; iNdEx >= 0; iNdEx-- { v := m.ConsumedCapacity[QualifiedName(keysForConsumedCapacity[iNdEx])] baseI := i @@ -4853,7 +3472,7 @@ func (this *BasicDevice) String() string { for k := range this.Attributes { keysForAttributes = append(keysForAttributes, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes) + sort.Strings(keysForAttributes) mapStringForAttributes := "map[QualifiedName]DeviceAttribute{" for _, k := range keysForAttributes { mapStringForAttributes += fmt.Sprintf("%v: %v,", k, this.Attributes[QualifiedName(k)]) @@ -4863,7 +3482,7 @@ func (this *BasicDevice) String() string { for k := range this.Capacity { keysForCapacity = append(keysForCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + sort.Strings(keysForCapacity) mapStringForCapacity := "map[QualifiedName]DeviceCapacity{" for _, k := range keysForCapacity { mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[QualifiedName(k)]) @@ -4932,7 +3551,7 @@ func (this *CapacityRequirements) String() string { for k := range this.Requests { keysForRequests = append(keysForRequests, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForRequests) + sort.Strings(keysForRequests) mapStringForRequests := "map[QualifiedName]resource.Quantity{" for _, k := range keysForRequests { mapStringForRequests += fmt.Sprintf("%v: %v,", k, this.Requests[QualifiedName(k)]) @@ -4962,7 +3581,7 @@ func (this *CounterSet) String() string { for k := range this.Counters { keysForCounters = append(keysForCounters, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) + sort.Strings(keysForCounters) mapStringForCounters := "map[string]Counter{" for _, k := range keysForCounters { mapStringForCounters += fmt.Sprintf("%v: %v,", k, this.Counters[k]) @@ -5170,7 +3789,7 @@ func (this *DeviceCounterConsumption) String() string { for k := range this.Counters { keysForCounters = append(keysForCounters, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) + sort.Strings(keysForCounters) mapStringForCounters := "map[string]Counter{" for _, k := range keysForCounters { mapStringForCounters += fmt.Sprintf("%v: %v,", k, this.Counters[k]) @@ -5229,7 +3848,7 @@ func (this *DeviceRequestAllocationResult) String() string { for k := range this.ConsumedCapacity { keysForConsumedCapacity = append(keysForConsumedCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForConsumedCapacity) + sort.Strings(keysForConsumedCapacity) mapStringForConsumedCapacity := "map[QualifiedName]resource.Quantity{" for _, k := range keysForConsumedCapacity { mapStringForConsumedCapacity += fmt.Sprintf("%v: %v,", k, this.ConsumedCapacity[QualifiedName(k)]) diff --git a/staging/src/k8s.io/api/resource/v1beta1/generated.proto b/staging/src/k8s.io/api/resource/v1beta1/generated.proto index 6ce65b4d81278..8c353e7b46847 100644 --- a/staging/src/k8s.io/api/resource/v1beta1/generated.proto +++ b/staging/src/k8s.io/api/resource/v1beta1/generated.proto @@ -41,7 +41,7 @@ message AllocatedDeviceStatus { // needed on a node. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required optional string driver = 1; @@ -65,6 +65,8 @@ message AllocatedDeviceStatus { // // +optional // +featureGate=DRAConsumableCapacity + // +k8s:optional + // +k8s:format=k8s-uuid optional string shareID = 7; // Conditions contains the latest observation of the device's state. @@ -568,6 +570,7 @@ message DeviceClaim { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated DeviceRequest requests = 1; // These constraints must be satisfied by the set of devices that get @@ -575,6 +578,7 @@ message DeviceClaim { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated DeviceConstraint constraints = 2; // This field holds configuration for multiple potential drivers which @@ -583,6 +587,7 @@ message DeviceClaim { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated DeviceClaimConfiguration config = 3; } @@ -597,6 +602,7 @@ message DeviceClaimConfiguration { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated string requests = 1; optional DeviceConfiguration deviceConfiguration = 2; @@ -647,6 +653,8 @@ message DeviceClassSpec { // // +optional // +listType=atomic + // +k8s:optional + // +k8s:maxItems=32 repeated DeviceSelector selectors = 1; // Config defines configuration parameters that apply to each device that is claimed via this class. @@ -657,6 +665,8 @@ message DeviceClassSpec { // // +optional // +listType=atomic + // +k8s:optional + // +k8s:maxItems=32 repeated DeviceClassConfiguration config = 2; // ExtendedResourceName is the extended resource name for the devices of this class. @@ -682,6 +692,7 @@ message DeviceConfiguration { // // +optional // +oneOf=ConfigurationType + // +k8s:optional optional OpaqueDeviceConfiguration opaque = 1; } @@ -699,6 +710,7 @@ message DeviceConstraint { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated string requests = 1; // MatchAttribute requires that all devices in question have this @@ -797,6 +809,7 @@ message DeviceRequest { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated DeviceSelector selectors = 3; // AllocationMode and its related fields define how devices are allocated @@ -871,6 +884,7 @@ message DeviceRequest { // +oneOf=deviceRequestType // +listType=atomic // +featureGate=DRAPrioritizedList + // +k8s:maxItems=8 repeated DeviceSubRequest firstAvailable = 7; // If specified, the request's tolerations. @@ -935,7 +949,7 @@ message DeviceRequestAllocationResult { // needed on a node. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required optional string driver = 2; @@ -947,6 +961,8 @@ message DeviceRequestAllocationResult { // DNS sub-domains separated by slashes. // // +required + // +k8s:required + // +k8s:format=k8s-resource-pool-name optional string pool = 3; // Device references one device instance via its name in the driver's @@ -978,6 +994,7 @@ message DeviceRequestAllocationResult { // +optional // +listType=atomic // +featureGate=DRADeviceTaints + // +k8s:maxItems=16 repeated DeviceToleration tolerations = 6; // BindingConditions contains a copy of the BindingConditions @@ -1009,6 +1026,8 @@ message DeviceRequestAllocationResult { // // +optional // +featureGate=DRAConsumableCapacity + // +k8s:optional + // +k8s:format=k8s-uuid optional string shareID = 9; // ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. @@ -1075,6 +1094,7 @@ message DeviceSubRequest { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated DeviceSelector selectors = 3; // AllocationMode and its related fields define how devices are allocated @@ -1187,6 +1207,8 @@ message DeviceToleration { // Must be a label name. // // +optional + // +k8s:optional + // +k8s:format=k8s-label-key optional string key = 1; // Operator represents a key's relationship to the value. @@ -1265,9 +1287,11 @@ message OpaqueDeviceConfiguration { // to decide whether it needs to validate them. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required + // +k8s:required + // +k8s:format=k8s-long-name-caseless optional string driver = 1; // Parameters can contain arbitrary data. It is the responsibility of @@ -1296,6 +1320,7 @@ message ResourceClaim { // Spec describes what is being requested and how to configure it. // The spec is immutable. + // +k8s:immutable optional ResourceClaimSpec spec = 2; // Status describes whether the claim is ready to use and what has been allocated. @@ -1350,6 +1375,7 @@ message ResourceClaimStatus { // Allocation is set once the claim has been allocated successfully. // // +optional + // +k8s:optional optional AllocationResult allocation = 1; // ReservedFor indicates which entities are currently allowed to use @@ -1377,6 +1403,9 @@ message ResourceClaimStatus { // +listMapKey=uid // +patchStrategy=merge // +patchMergeKey=uid + // +k8s:optional + // +k8s:listType=map + // +k8s:listMapKey=uid repeated ResourceClaimConsumerReference reservedFor = 2; // Devices contains the status of each device allocated for this @@ -1384,6 +1413,7 @@ message ResourceClaimStatus { // information. Entries are owned by their respective drivers. // // +optional + // +k8s:optional // +listType=map // +listMapKey=driver // +listMapKey=device @@ -1523,7 +1553,8 @@ message ResourceSliceSpec { // objects with a certain driver name. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. This field is immutable. + // vendor of the driver. It should use only lower case characters. + // This field is immutable. // // +required optional string driver = 1; diff --git a/staging/src/k8s.io/api/resource/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/resource/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..e47160fb83872 --- /dev/null +++ b/staging/src/k8s.io/api/resource/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,108 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*AllocatedDeviceStatus) ProtoMessage() {} + +func (*AllocationResult) ProtoMessage() {} + +func (*BasicDevice) ProtoMessage() {} + +func (*CELDeviceSelector) ProtoMessage() {} + +func (*CapacityRequestPolicy) ProtoMessage() {} + +func (*CapacityRequestPolicyRange) ProtoMessage() {} + +func (*CapacityRequirements) ProtoMessage() {} + +func (*Counter) ProtoMessage() {} + +func (*CounterSet) ProtoMessage() {} + +func (*Device) ProtoMessage() {} + +func (*DeviceAllocationConfiguration) ProtoMessage() {} + +func (*DeviceAllocationResult) ProtoMessage() {} + +func (*DeviceAttribute) ProtoMessage() {} + +func (*DeviceCapacity) ProtoMessage() {} + +func (*DeviceClaim) ProtoMessage() {} + +func (*DeviceClaimConfiguration) ProtoMessage() {} + +func (*DeviceClass) ProtoMessage() {} + +func (*DeviceClassConfiguration) ProtoMessage() {} + +func (*DeviceClassList) ProtoMessage() {} + +func (*DeviceClassSpec) ProtoMessage() {} + +func (*DeviceConfiguration) ProtoMessage() {} + +func (*DeviceConstraint) ProtoMessage() {} + +func (*DeviceCounterConsumption) ProtoMessage() {} + +func (*DeviceRequest) ProtoMessage() {} + +func (*DeviceRequestAllocationResult) ProtoMessage() {} + +func (*DeviceSelector) ProtoMessage() {} + +func (*DeviceSubRequest) ProtoMessage() {} + +func (*DeviceTaint) ProtoMessage() {} + +func (*DeviceToleration) ProtoMessage() {} + +func (*NetworkDeviceData) ProtoMessage() {} + +func (*OpaqueDeviceConfiguration) ProtoMessage() {} + +func (*ResourceClaim) ProtoMessage() {} + +func (*ResourceClaimConsumerReference) ProtoMessage() {} + +func (*ResourceClaimList) ProtoMessage() {} + +func (*ResourceClaimSpec) ProtoMessage() {} + +func (*ResourceClaimStatus) ProtoMessage() {} + +func (*ResourceClaimTemplate) ProtoMessage() {} + +func (*ResourceClaimTemplateList) ProtoMessage() {} + +func (*ResourceClaimTemplateSpec) ProtoMessage() {} + +func (*ResourcePool) ProtoMessage() {} + +func (*ResourceSlice) ProtoMessage() {} + +func (*ResourceSliceList) ProtoMessage() {} + +func (*ResourceSliceSpec) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/resource/v1beta1/types.go b/staging/src/k8s.io/api/resource/v1beta1/types.go index 27967f38ec11a..c78ed9cf4241b 100644 --- a/staging/src/k8s.io/api/resource/v1beta1/types.go +++ b/staging/src/k8s.io/api/resource/v1beta1/types.go @@ -101,7 +101,8 @@ type ResourceSliceSpec struct { // objects with a certain driver name. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. This field is immutable. + // vendor of the driver. It should use only lower case characters. + // This field is immutable. // // +required Driver string `json:"driver" protobuf:"bytes,1,name=driver"` @@ -682,6 +683,7 @@ type ResourceSliceList struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.32 +// +k8s:supportsSubresource=/status // ResourceClaim describes a request for access to resources in the cluster, // for use by workloads. For example, if a workload needs an accelerator device @@ -699,6 +701,7 @@ type ResourceClaim struct { // Spec describes what is being requested and how to configure it. // The spec is immutable. + // +k8s:immutable Spec ResourceClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"` // Status describes whether the claim is ready to use and what has been allocated. @@ -726,6 +729,7 @@ type DeviceClaim struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Requests []DeviceRequest `json:"requests" protobuf:"bytes,1,name=requests"` // These constraints must be satisfied by the set of devices that get @@ -733,6 +737,7 @@ type DeviceClaim struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Constraints []DeviceConstraint `json:"constraints,omitempty" protobuf:"bytes,2,opt,name=constraints"` // This field holds configuration for multiple potential drivers which @@ -741,6 +746,7 @@ type DeviceClaim struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Config []DeviceClaimConfiguration `json:"config,omitempty" protobuf:"bytes,3,opt,name=config"` // Potential future extension, ignored by older schedulers. This is @@ -807,6 +813,7 @@ type DeviceRequest struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,3,name=selectors"` // AllocationMode and its related fields define how devices are allocated @@ -881,6 +888,7 @@ type DeviceRequest struct { // +oneOf=deviceRequestType // +listType=atomic // +featureGate=DRAPrioritizedList + // +k8s:maxItems=8 FirstAvailable []DeviceSubRequest `json:"firstAvailable,omitempty" protobuf:"bytes,7,name=firstAvailable"` // If specified, the request's tolerations. @@ -968,6 +976,7 @@ type DeviceSubRequest struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,3,name=selectors"` // AllocationMode and its related fields define how devices are allocated @@ -1074,6 +1083,7 @@ const ( DeviceTolerationsMaxLength = 16 ) +// +enum type DeviceAllocationMode string // Valid [DeviceRequest.CountMode] values. @@ -1192,6 +1202,7 @@ type DeviceConstraint struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"` // MatchAttribute requires that all devices in question have this @@ -1249,6 +1260,7 @@ type DeviceClaimConfiguration struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"` DeviceConfiguration `json:",inline" protobuf:"bytes,2,name=deviceConfiguration"` @@ -1262,6 +1274,7 @@ type DeviceConfiguration struct { // // +optional // +oneOf=ConfigurationType + // +k8s:optional Opaque *OpaqueDeviceConfiguration `json:"opaque,omitempty" protobuf:"bytes,1,opt,name=opaque"` } @@ -1275,9 +1288,11 @@ type OpaqueDeviceConfiguration struct { // to decide whether it needs to validate them. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required + // +k8s:required + // +k8s:format=k8s-long-name-caseless Driver string `json:"driver" protobuf:"bytes,1,name=driver"` // Parameters can contain arbitrary data. It is the responsibility of @@ -1303,6 +1318,8 @@ type DeviceToleration struct { // Must be a label name. // // +optional + // +k8s:optional + // +k8s:format=k8s-label-key Key string `json:"key,omitempty" protobuf:"bytes,1,opt,name=key"` // Operator represents a key's relationship to the value. @@ -1354,6 +1371,7 @@ type ResourceClaimStatus struct { // Allocation is set once the claim has been allocated successfully. // // +optional + // +k8s:optional Allocation *AllocationResult `json:"allocation,omitempty" protobuf:"bytes,1,opt,name=allocation"` // ReservedFor indicates which entities are currently allowed to use @@ -1381,6 +1399,9 @@ type ResourceClaimStatus struct { // +listMapKey=uid // +patchStrategy=merge // +patchMergeKey=uid + // +k8s:optional + // +k8s:listType=map + // +k8s:listMapKey=uid ReservedFor []ResourceClaimConsumerReference `json:"reservedFor,omitempty" protobuf:"bytes,2,opt,name=reservedFor" patchStrategy:"merge" patchMergeKey:"uid"` // DeallocationRequested is tombstoned since Kubernetes 1.32 where @@ -1393,6 +1414,7 @@ type ResourceClaimStatus struct { // information. Entries are owned by their respective drivers. // // +optional + // +k8s:optional // +listType=map // +listMapKey=driver // +listMapKey=device @@ -1498,7 +1520,7 @@ type DeviceRequestAllocationResult struct { // needed on a node. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required Driver string `json:"driver" protobuf:"bytes,2,name=driver"` @@ -1510,6 +1532,8 @@ type DeviceRequestAllocationResult struct { // DNS sub-domains separated by slashes. // // +required + // +k8s:required + // +k8s:format=k8s-resource-pool-name Pool string `json:"pool" protobuf:"bytes,3,name=pool"` // Device references one device instance via its name in the driver's @@ -1541,6 +1565,7 @@ type DeviceRequestAllocationResult struct { // +optional // +listType=atomic // +featureGate=DRADeviceTaints + // +k8s:maxItems=16 Tolerations []DeviceToleration `json:"tolerations,omitempty" protobuf:"bytes,6,opt,name=tolerations"` // BindingConditions contains a copy of the BindingConditions @@ -1572,6 +1597,8 @@ type DeviceRequestAllocationResult struct { // // +optional // +featureGate=DRAConsumableCapacity + // +k8s:optional + // +k8s:format=k8s-uuid ShareID *types.UID `json:"shareID,omitempty" protobuf:"bytes,9,opt,name=shareID"` // ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. @@ -1669,6 +1696,8 @@ type DeviceClassSpec struct { // // +optional // +listType=atomic + // +k8s:optional + // +k8s:maxItems=32 Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,1,opt,name=selectors"` // Config defines configuration parameters that apply to each device that is claimed via this class. @@ -1679,6 +1708,8 @@ type DeviceClassSpec struct { // // +optional // +listType=atomic + // +k8s:optional + // +k8s:maxItems=32 Config []DeviceClassConfiguration `json:"config,omitempty" protobuf:"bytes,2,opt,name=config"` // SuitableNodes is tombstoned since Kubernetes 1.32 where @@ -1799,7 +1830,7 @@ type AllocatedDeviceStatus struct { // needed on a node. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required Driver string `json:"driver" protobuf:"bytes,1,rep,name=driver"` @@ -1823,6 +1854,8 @@ type AllocatedDeviceStatus struct { // // +optional // +featureGate=DRAConsumableCapacity + // +k8s:optional + // +k8s:format=k8s-uuid ShareID *string `json:"shareID,omitempty" protobuf:"bytes,7,opt,name=shareID"` // Conditions contains the latest observation of the device's state. diff --git a/staging/src/k8s.io/api/resource/v1beta1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/resource/v1beta1/types_swagger_doc_generated.go index 473fbb9503132..bfddc82d9d612 100644 --- a/staging/src/k8s.io/api/resource/v1beta1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/resource/v1beta1/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v1beta1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AllocatedDeviceStatus = map[string]string{ "": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.\n\nThe combination of Driver, Pool, Device, and ShareID must match the corresponding key in Status.Allocation.Devices.", - "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", "shareID": "ShareID uniquely identifies an individual allocation share of the device.", @@ -292,7 +292,7 @@ func (DeviceRequest) SwaggerDoc() map[string]string { var map_DeviceRequestAllocationResult = map[string]string{ "": "DeviceRequestAllocationResult contains the allocation result for one request.", "request": "Request is the name of the request in the claim which caused this device to be allocated. If it references a subrequest in the firstAvailable list on a DeviceRequest, this field must include both the name of the main request and the subrequest using the format
/.\n\nMultiple devices may have been allocated per request.", - "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", "adminAccess": "AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.", @@ -369,7 +369,7 @@ func (NetworkDeviceData) SwaggerDoc() map[string]string { var map_OpaqueDeviceConfiguration = map[string]string{ "": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", - "driver": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "driver": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "parameters": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", } @@ -493,7 +493,7 @@ func (ResourceSliceList) SwaggerDoc() map[string]string { var map_ResourceSliceSpec = map[string]string{ "": "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.", - "driver": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + "driver": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. This field is immutable.", "pool": "Pool describes the pool that this ResourceSlice belongs to.", "nodeName": "NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.\n\nThis field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. This field is immutable.", "nodeSelector": "NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.\n\nMust use exactly one term.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.", diff --git a/staging/src/k8s.io/api/resource/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/resource/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..0d4983d34e016 --- /dev/null +++ b/staging/src/k8s.io/api/resource/v1beta1/zz_generated.model_name.go @@ -0,0 +1,237 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AllocatedDeviceStatus) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.AllocatedDeviceStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AllocationResult) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.AllocationResult" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in BasicDevice) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.BasicDevice" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CELDeviceSelector) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.CELDeviceSelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CapacityRequestPolicy) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.CapacityRequestPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CapacityRequestPolicyRange) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.CapacityRequestPolicyRange" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CapacityRequirements) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.CapacityRequirements" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Counter) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.Counter" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CounterSet) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.CounterSet" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Device) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.Device" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceAllocationConfiguration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceAllocationConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceAllocationResult) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceAllocationResult" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceAttribute) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceAttribute" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceCapacity) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceCapacity" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClaim) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceClaim" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClaimConfiguration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceClaimConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClass) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClassConfiguration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceClassConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClassList) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceClassList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClassSpec) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceClassSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceConfiguration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceConstraint) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceConstraint" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceCounterConsumption) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceCounterConsumption" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceRequest) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceRequestAllocationResult) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceRequestAllocationResult" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceSelector) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceSelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceSubRequest) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceSubRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceTaint) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceTaint" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceToleration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.DeviceToleration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkDeviceData) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.NetworkDeviceData" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in OpaqueDeviceConfiguration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaim) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.ResourceClaim" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimConsumerReference) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.ResourceClaimConsumerReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimList) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.ResourceClaimList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimSpec) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.ResourceClaimSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimStatus) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.ResourceClaimStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimTemplate) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.ResourceClaimTemplate" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimTemplateList) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.ResourceClaimTemplateList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimTemplateSpec) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.ResourceClaimTemplateSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourcePool) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.ResourcePool" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceSlice) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.ResourceSlice" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceSliceList) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.ResourceSliceList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceSliceSpec) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta1.ResourceSliceSpec" +} diff --git a/staging/src/k8s.io/api/resource/v1beta2/doc.go b/staging/src/k8s.io/api/resource/v1beta2/doc.go index 365113ae4e174..4570270a27b12 100644 --- a/staging/src/k8s.io/api/resource/v1beta2/doc.go +++ b/staging/src/k8s.io/api/resource/v1beta2/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.resource.v1beta2 + // +groupName=resource.k8s.io // Package v1beta2 is the v1beta2 version of the resource API. diff --git a/staging/src/k8s.io/api/resource/v1beta2/generated.pb.go b/staging/src/k8s.io/api/resource/v1beta2/generated.pb.go index f512f41d6d0d1..5a36e6d2b5dfc 100644 --- a/staging/src/k8s.io/api/resource/v1beta2/generated.pb.go +++ b/staging/src/k8s.io/api/resource/v1beta2/generated.pb.go @@ -23,15 +23,13 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v11 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -39,1470 +37,91 @@ import ( k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *AllocatedDeviceStatus) Reset() { *m = AllocatedDeviceStatus{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *AllocationResult) Reset() { *m = AllocationResult{} } -func (m *AllocatedDeviceStatus) Reset() { *m = AllocatedDeviceStatus{} } -func (*AllocatedDeviceStatus) ProtoMessage() {} -func (*AllocatedDeviceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{0} -} -func (m *AllocatedDeviceStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AllocatedDeviceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AllocatedDeviceStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllocatedDeviceStatus.Merge(m, src) -} -func (m *AllocatedDeviceStatus) XXX_Size() int { - return m.Size() -} -func (m *AllocatedDeviceStatus) XXX_DiscardUnknown() { - xxx_messageInfo_AllocatedDeviceStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_AllocatedDeviceStatus proto.InternalMessageInfo - -func (m *AllocationResult) Reset() { *m = AllocationResult{} } -func (*AllocationResult) ProtoMessage() {} -func (*AllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{1} -} -func (m *AllocationResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AllocationResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllocationResult.Merge(m, src) -} -func (m *AllocationResult) XXX_Size() int { - return m.Size() -} -func (m *AllocationResult) XXX_DiscardUnknown() { - xxx_messageInfo_AllocationResult.DiscardUnknown(m) -} - -var xxx_messageInfo_AllocationResult proto.InternalMessageInfo - -func (m *CELDeviceSelector) Reset() { *m = CELDeviceSelector{} } -func (*CELDeviceSelector) ProtoMessage() {} -func (*CELDeviceSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{2} -} -func (m *CELDeviceSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CELDeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CELDeviceSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_CELDeviceSelector.Merge(m, src) -} -func (m *CELDeviceSelector) XXX_Size() int { - return m.Size() -} -func (m *CELDeviceSelector) XXX_DiscardUnknown() { - xxx_messageInfo_CELDeviceSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_CELDeviceSelector proto.InternalMessageInfo - -func (m *CapacityRequestPolicy) Reset() { *m = CapacityRequestPolicy{} } -func (*CapacityRequestPolicy) ProtoMessage() {} -func (*CapacityRequestPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{3} -} -func (m *CapacityRequestPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CapacityRequestPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CapacityRequestPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_CapacityRequestPolicy.Merge(m, src) -} -func (m *CapacityRequestPolicy) XXX_Size() int { - return m.Size() -} -func (m *CapacityRequestPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_CapacityRequestPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_CapacityRequestPolicy proto.InternalMessageInfo - -func (m *CapacityRequestPolicyRange) Reset() { *m = CapacityRequestPolicyRange{} } -func (*CapacityRequestPolicyRange) ProtoMessage() {} -func (*CapacityRequestPolicyRange) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{4} -} -func (m *CapacityRequestPolicyRange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CapacityRequestPolicyRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CapacityRequestPolicyRange) XXX_Merge(src proto.Message) { - xxx_messageInfo_CapacityRequestPolicyRange.Merge(m, src) -} -func (m *CapacityRequestPolicyRange) XXX_Size() int { - return m.Size() -} -func (m *CapacityRequestPolicyRange) XXX_DiscardUnknown() { - xxx_messageInfo_CapacityRequestPolicyRange.DiscardUnknown(m) -} - -var xxx_messageInfo_CapacityRequestPolicyRange proto.InternalMessageInfo - -func (m *CapacityRequirements) Reset() { *m = CapacityRequirements{} } -func (*CapacityRequirements) ProtoMessage() {} -func (*CapacityRequirements) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{5} -} -func (m *CapacityRequirements) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CapacityRequirements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CapacityRequirements) XXX_Merge(src proto.Message) { - xxx_messageInfo_CapacityRequirements.Merge(m, src) -} -func (m *CapacityRequirements) XXX_Size() int { - return m.Size() -} -func (m *CapacityRequirements) XXX_DiscardUnknown() { - xxx_messageInfo_CapacityRequirements.DiscardUnknown(m) -} - -var xxx_messageInfo_CapacityRequirements proto.InternalMessageInfo - -func (m *Counter) Reset() { *m = Counter{} } -func (*Counter) ProtoMessage() {} -func (*Counter) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{6} -} -func (m *Counter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Counter) XXX_Merge(src proto.Message) { - xxx_messageInfo_Counter.Merge(m, src) -} -func (m *Counter) XXX_Size() int { - return m.Size() -} -func (m *Counter) XXX_DiscardUnknown() { - xxx_messageInfo_Counter.DiscardUnknown(m) -} - -var xxx_messageInfo_Counter proto.InternalMessageInfo - -func (m *CounterSet) Reset() { *m = CounterSet{} } -func (*CounterSet) ProtoMessage() {} -func (*CounterSet) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{7} -} -func (m *CounterSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CounterSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CounterSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_CounterSet.Merge(m, src) -} -func (m *CounterSet) XXX_Size() int { - return m.Size() -} -func (m *CounterSet) XXX_DiscardUnknown() { - xxx_messageInfo_CounterSet.DiscardUnknown(m) -} - -var xxx_messageInfo_CounterSet proto.InternalMessageInfo - -func (m *Device) Reset() { *m = Device{} } -func (*Device) ProtoMessage() {} -func (*Device) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{8} -} -func (m *Device) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Device) XXX_Merge(src proto.Message) { - xxx_messageInfo_Device.Merge(m, src) -} -func (m *Device) XXX_Size() int { - return m.Size() -} -func (m *Device) XXX_DiscardUnknown() { - xxx_messageInfo_Device.DiscardUnknown(m) -} - -var xxx_messageInfo_Device proto.InternalMessageInfo - -func (m *DeviceAllocationConfiguration) Reset() { *m = DeviceAllocationConfiguration{} } -func (*DeviceAllocationConfiguration) ProtoMessage() {} -func (*DeviceAllocationConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{9} -} -func (m *DeviceAllocationConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceAllocationConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceAllocationConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceAllocationConfiguration.Merge(m, src) -} -func (m *DeviceAllocationConfiguration) XXX_Size() int { - return m.Size() -} -func (m *DeviceAllocationConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceAllocationConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceAllocationConfiguration proto.InternalMessageInfo - -func (m *DeviceAllocationResult) Reset() { *m = DeviceAllocationResult{} } -func (*DeviceAllocationResult) ProtoMessage() {} -func (*DeviceAllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{10} -} -func (m *DeviceAllocationResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceAllocationResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceAllocationResult.Merge(m, src) -} -func (m *DeviceAllocationResult) XXX_Size() int { - return m.Size() -} -func (m *DeviceAllocationResult) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceAllocationResult.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceAllocationResult proto.InternalMessageInfo - -func (m *DeviceAttribute) Reset() { *m = DeviceAttribute{} } -func (*DeviceAttribute) ProtoMessage() {} -func (*DeviceAttribute) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{11} -} -func (m *DeviceAttribute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceAttribute) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceAttribute.Merge(m, src) -} -func (m *DeviceAttribute) XXX_Size() int { - return m.Size() -} -func (m *DeviceAttribute) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceAttribute.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceAttribute proto.InternalMessageInfo - -func (m *DeviceCapacity) Reset() { *m = DeviceCapacity{} } -func (*DeviceCapacity) ProtoMessage() {} -func (*DeviceCapacity) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{12} -} -func (m *DeviceCapacity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceCapacity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceCapacity) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceCapacity.Merge(m, src) -} -func (m *DeviceCapacity) XXX_Size() int { - return m.Size() -} -func (m *DeviceCapacity) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceCapacity.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceCapacity proto.InternalMessageInfo - -func (m *DeviceClaim) Reset() { *m = DeviceClaim{} } -func (*DeviceClaim) ProtoMessage() {} -func (*DeviceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{13} -} -func (m *DeviceClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClaim.Merge(m, src) -} -func (m *DeviceClaim) XXX_Size() int { - return m.Size() -} -func (m *DeviceClaim) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClaim.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClaim proto.InternalMessageInfo - -func (m *DeviceClaimConfiguration) Reset() { *m = DeviceClaimConfiguration{} } -func (*DeviceClaimConfiguration) ProtoMessage() {} -func (*DeviceClaimConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{14} -} -func (m *DeviceClaimConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClaimConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClaimConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClaimConfiguration.Merge(m, src) -} -func (m *DeviceClaimConfiguration) XXX_Size() int { - return m.Size() -} -func (m *DeviceClaimConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClaimConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClaimConfiguration proto.InternalMessageInfo - -func (m *DeviceClass) Reset() { *m = DeviceClass{} } -func (*DeviceClass) ProtoMessage() {} -func (*DeviceClass) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{15} -} -func (m *DeviceClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClass.Merge(m, src) -} -func (m *DeviceClass) XXX_Size() int { - return m.Size() -} -func (m *DeviceClass) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClass.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClass proto.InternalMessageInfo - -func (m *DeviceClassConfiguration) Reset() { *m = DeviceClassConfiguration{} } -func (*DeviceClassConfiguration) ProtoMessage() {} -func (*DeviceClassConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{16} -} -func (m *DeviceClassConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClassConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClassConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClassConfiguration.Merge(m, src) -} -func (m *DeviceClassConfiguration) XXX_Size() int { - return m.Size() -} -func (m *DeviceClassConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClassConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClassConfiguration proto.InternalMessageInfo - -func (m *DeviceClassList) Reset() { *m = DeviceClassList{} } -func (*DeviceClassList) ProtoMessage() {} -func (*DeviceClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{17} -} -func (m *DeviceClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClassList.Merge(m, src) -} -func (m *DeviceClassList) XXX_Size() int { - return m.Size() -} -func (m *DeviceClassList) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClassList.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClassList proto.InternalMessageInfo - -func (m *DeviceClassSpec) Reset() { *m = DeviceClassSpec{} } -func (*DeviceClassSpec) ProtoMessage() {} -func (*DeviceClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{18} -} -func (m *DeviceClassSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceClassSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceClassSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceClassSpec.Merge(m, src) -} -func (m *DeviceClassSpec) XXX_Size() int { - return m.Size() -} -func (m *DeviceClassSpec) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceClassSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceClassSpec proto.InternalMessageInfo - -func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} } -func (*DeviceConfiguration) ProtoMessage() {} -func (*DeviceConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{19} -} -func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceConfiguration.Merge(m, src) -} -func (m *DeviceConfiguration) XXX_Size() int { - return m.Size() -} -func (m *DeviceConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceConfiguration.DiscardUnknown(m) -} +func (m *CELDeviceSelector) Reset() { *m = CELDeviceSelector{} } -var xxx_messageInfo_DeviceConfiguration proto.InternalMessageInfo +func (m *CapacityRequestPolicy) Reset() { *m = CapacityRequestPolicy{} } -func (m *DeviceConstraint) Reset() { *m = DeviceConstraint{} } -func (*DeviceConstraint) ProtoMessage() {} -func (*DeviceConstraint) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{20} -} -func (m *DeviceConstraint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceConstraint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceConstraint) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceConstraint.Merge(m, src) -} -func (m *DeviceConstraint) XXX_Size() int { - return m.Size() -} -func (m *DeviceConstraint) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceConstraint.DiscardUnknown(m) -} +func (m *CapacityRequestPolicyRange) Reset() { *m = CapacityRequestPolicyRange{} } -var xxx_messageInfo_DeviceConstraint proto.InternalMessageInfo +func (m *CapacityRequirements) Reset() { *m = CapacityRequirements{} } -func (m *DeviceCounterConsumption) Reset() { *m = DeviceCounterConsumption{} } -func (*DeviceCounterConsumption) ProtoMessage() {} -func (*DeviceCounterConsumption) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{21} -} -func (m *DeviceCounterConsumption) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceCounterConsumption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceCounterConsumption) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceCounterConsumption.Merge(m, src) -} -func (m *DeviceCounterConsumption) XXX_Size() int { - return m.Size() -} -func (m *DeviceCounterConsumption) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceCounterConsumption.DiscardUnknown(m) -} +func (m *Counter) Reset() { *m = Counter{} } -var xxx_messageInfo_DeviceCounterConsumption proto.InternalMessageInfo +func (m *CounterSet) Reset() { *m = CounterSet{} } -func (m *DeviceRequest) Reset() { *m = DeviceRequest{} } -func (*DeviceRequest) ProtoMessage() {} -func (*DeviceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{22} -} -func (m *DeviceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceRequest.Merge(m, src) -} -func (m *DeviceRequest) XXX_Size() int { - return m.Size() -} -func (m *DeviceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceRequest.DiscardUnknown(m) -} +func (m *Device) Reset() { *m = Device{} } -var xxx_messageInfo_DeviceRequest proto.InternalMessageInfo +func (m *DeviceAllocationConfiguration) Reset() { *m = DeviceAllocationConfiguration{} } -func (m *DeviceRequestAllocationResult) Reset() { *m = DeviceRequestAllocationResult{} } -func (*DeviceRequestAllocationResult) ProtoMessage() {} -func (*DeviceRequestAllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{23} -} -func (m *DeviceRequestAllocationResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceRequestAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceRequestAllocationResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceRequestAllocationResult.Merge(m, src) -} -func (m *DeviceRequestAllocationResult) XXX_Size() int { - return m.Size() -} -func (m *DeviceRequestAllocationResult) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceRequestAllocationResult.DiscardUnknown(m) -} +func (m *DeviceAllocationResult) Reset() { *m = DeviceAllocationResult{} } -var xxx_messageInfo_DeviceRequestAllocationResult proto.InternalMessageInfo +func (m *DeviceAttribute) Reset() { *m = DeviceAttribute{} } -func (m *DeviceSelector) Reset() { *m = DeviceSelector{} } -func (*DeviceSelector) ProtoMessage() {} -func (*DeviceSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{24} -} -func (m *DeviceSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceSelector.Merge(m, src) -} -func (m *DeviceSelector) XXX_Size() int { - return m.Size() -} -func (m *DeviceSelector) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceSelector.DiscardUnknown(m) -} +func (m *DeviceCapacity) Reset() { *m = DeviceCapacity{} } -var xxx_messageInfo_DeviceSelector proto.InternalMessageInfo +func (m *DeviceClaim) Reset() { *m = DeviceClaim{} } -func (m *DeviceSubRequest) Reset() { *m = DeviceSubRequest{} } -func (*DeviceSubRequest) ProtoMessage() {} -func (*DeviceSubRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{25} -} -func (m *DeviceSubRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceSubRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceSubRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceSubRequest.Merge(m, src) -} -func (m *DeviceSubRequest) XXX_Size() int { - return m.Size() -} -func (m *DeviceSubRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceSubRequest.DiscardUnknown(m) -} +func (m *DeviceClaimConfiguration) Reset() { *m = DeviceClaimConfiguration{} } -var xxx_messageInfo_DeviceSubRequest proto.InternalMessageInfo +func (m *DeviceClass) Reset() { *m = DeviceClass{} } -func (m *DeviceTaint) Reset() { *m = DeviceTaint{} } -func (*DeviceTaint) ProtoMessage() {} -func (*DeviceTaint) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{26} -} -func (m *DeviceTaint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceTaint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceTaint) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceTaint.Merge(m, src) -} -func (m *DeviceTaint) XXX_Size() int { - return m.Size() -} -func (m *DeviceTaint) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceTaint.DiscardUnknown(m) -} +func (m *DeviceClassConfiguration) Reset() { *m = DeviceClassConfiguration{} } -var xxx_messageInfo_DeviceTaint proto.InternalMessageInfo +func (m *DeviceClassList) Reset() { *m = DeviceClassList{} } -func (m *DeviceToleration) Reset() { *m = DeviceToleration{} } -func (*DeviceToleration) ProtoMessage() {} -func (*DeviceToleration) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{27} -} -func (m *DeviceToleration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceToleration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceToleration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceToleration.Merge(m, src) -} -func (m *DeviceToleration) XXX_Size() int { - return m.Size() -} -func (m *DeviceToleration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceToleration.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceToleration proto.InternalMessageInfo - -func (m *ExactDeviceRequest) Reset() { *m = ExactDeviceRequest{} } -func (*ExactDeviceRequest) ProtoMessage() {} -func (*ExactDeviceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{28} -} -func (m *ExactDeviceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExactDeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExactDeviceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExactDeviceRequest.Merge(m, src) -} -func (m *ExactDeviceRequest) XXX_Size() int { - return m.Size() -} -func (m *ExactDeviceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExactDeviceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ExactDeviceRequest proto.InternalMessageInfo - -func (m *NetworkDeviceData) Reset() { *m = NetworkDeviceData{} } -func (*NetworkDeviceData) ProtoMessage() {} -func (*NetworkDeviceData) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{29} -} -func (m *NetworkDeviceData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkDeviceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkDeviceData) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkDeviceData.Merge(m, src) -} -func (m *NetworkDeviceData) XXX_Size() int { - return m.Size() -} -func (m *NetworkDeviceData) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkDeviceData.DiscardUnknown(m) -} - -var xxx_messageInfo_NetworkDeviceData proto.InternalMessageInfo - -func (m *OpaqueDeviceConfiguration) Reset() { *m = OpaqueDeviceConfiguration{} } -func (*OpaqueDeviceConfiguration) ProtoMessage() {} -func (*OpaqueDeviceConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{30} -} -func (m *OpaqueDeviceConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OpaqueDeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *OpaqueDeviceConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_OpaqueDeviceConfiguration.Merge(m, src) -} -func (m *OpaqueDeviceConfiguration) XXX_Size() int { - return m.Size() -} -func (m *OpaqueDeviceConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_OpaqueDeviceConfiguration.DiscardUnknown(m) -} +func (m *DeviceClassSpec) Reset() { *m = DeviceClassSpec{} } -var xxx_messageInfo_OpaqueDeviceConfiguration proto.InternalMessageInfo +func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} } -func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } -func (*ResourceClaim) ProtoMessage() {} -func (*ResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{31} -} -func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaim.Merge(m, src) -} -func (m *ResourceClaim) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaim) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaim.DiscardUnknown(m) -} +func (m *DeviceConstraint) Reset() { *m = DeviceConstraint{} } -var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo +func (m *DeviceCounterConsumption) Reset() { *m = DeviceCounterConsumption{} } -func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } -func (*ResourceClaimConsumerReference) ProtoMessage() {} -func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{32} -} -func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimConsumerReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimConsumerReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimConsumerReference.Merge(m, src) -} -func (m *ResourceClaimConsumerReference) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimConsumerReference) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimConsumerReference.DiscardUnknown(m) -} +func (m *DeviceRequest) Reset() { *m = DeviceRequest{} } -var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo +func (m *DeviceRequestAllocationResult) Reset() { *m = DeviceRequestAllocationResult{} } -func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } -func (*ResourceClaimList) ProtoMessage() {} -func (*ResourceClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{33} -} -func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimList.Merge(m, src) -} -func (m *ResourceClaimList) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimList) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimList.DiscardUnknown(m) -} +func (m *DeviceSelector) Reset() { *m = DeviceSelector{} } -var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo +func (m *DeviceSubRequest) Reset() { *m = DeviceSubRequest{} } -func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } -func (*ResourceClaimSpec) ProtoMessage() {} -func (*ResourceClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{34} -} -func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimSpec.Merge(m, src) -} -func (m *ResourceClaimSpec) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimSpec.DiscardUnknown(m) -} +func (m *DeviceTaint) Reset() { *m = DeviceTaint{} } -var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo +func (m *DeviceToleration) Reset() { *m = DeviceToleration{} } -func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } -func (*ResourceClaimStatus) ProtoMessage() {} -func (*ResourceClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{35} -} -func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimStatus.Merge(m, src) -} -func (m *ResourceClaimStatus) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimStatus.DiscardUnknown(m) -} +func (m *ExactDeviceRequest) Reset() { *m = ExactDeviceRequest{} } -var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo +func (m *NetworkDeviceData) Reset() { *m = NetworkDeviceData{} } -func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } -func (*ResourceClaimTemplate) ProtoMessage() {} -func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{36} -} -func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimTemplate) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimTemplate.Merge(m, src) -} -func (m *ResourceClaimTemplate) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimTemplate) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimTemplate.DiscardUnknown(m) -} +func (m *OpaqueDeviceConfiguration) Reset() { *m = OpaqueDeviceConfiguration{} } -var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo +func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } -func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } -func (*ResourceClaimTemplateList) ProtoMessage() {} -func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{37} -} -func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimTemplateList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimTemplateList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimTemplateList.Merge(m, src) -} -func (m *ResourceClaimTemplateList) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimTemplateList) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimTemplateList.DiscardUnknown(m) -} +func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } -var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo +func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } -func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } -func (*ResourceClaimTemplateSpec) ProtoMessage() {} -func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{38} -} -func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimTemplateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimTemplateSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimTemplateSpec.Merge(m, src) -} -func (m *ResourceClaimTemplateSpec) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimTemplateSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimTemplateSpec.DiscardUnknown(m) -} +func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } -var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo +func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } -func (m *ResourcePool) Reset() { *m = ResourcePool{} } -func (*ResourcePool) ProtoMessage() {} -func (*ResourcePool) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{39} -} -func (m *ResourcePool) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourcePool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourcePool) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourcePool.Merge(m, src) -} -func (m *ResourcePool) XXX_Size() int { - return m.Size() -} -func (m *ResourcePool) XXX_DiscardUnknown() { - xxx_messageInfo_ResourcePool.DiscardUnknown(m) -} +func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } -var xxx_messageInfo_ResourcePool proto.InternalMessageInfo +func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } -func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } -func (*ResourceSlice) ProtoMessage() {} -func (*ResourceSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{40} -} -func (m *ResourceSlice) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceSlice) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceSlice.Merge(m, src) -} -func (m *ResourceSlice) XXX_Size() int { - return m.Size() -} -func (m *ResourceSlice) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceSlice.DiscardUnknown(m) -} +func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } -var xxx_messageInfo_ResourceSlice proto.InternalMessageInfo +func (m *ResourcePool) Reset() { *m = ResourcePool{} } -func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } -func (*ResourceSliceList) ProtoMessage() {} -func (*ResourceSliceList) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{41} -} -func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceSliceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceSliceList.Merge(m, src) -} -func (m *ResourceSliceList) XXX_Size() int { - return m.Size() -} -func (m *ResourceSliceList) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceSliceList.DiscardUnknown(m) -} +func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } -var xxx_messageInfo_ResourceSliceList proto.InternalMessageInfo +func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } -func (m *ResourceSliceSpec) Reset() { *m = ResourceSliceSpec{} } -func (*ResourceSliceSpec) ProtoMessage() {} -func (*ResourceSliceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_57f2e1d27c072d6e, []int{42} -} -func (m *ResourceSliceSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceSliceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceSliceSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceSliceSpec.Merge(m, src) -} -func (m *ResourceSliceSpec) XXX_Size() int { - return m.Size() -} -func (m *ResourceSliceSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceSliceSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceSliceSpec proto.InternalMessageInfo - -func init() { - proto.RegisterType((*AllocatedDeviceStatus)(nil), "k8s.io.api.resource.v1beta2.AllocatedDeviceStatus") - proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1beta2.AllocationResult") - proto.RegisterType((*CELDeviceSelector)(nil), "k8s.io.api.resource.v1beta2.CELDeviceSelector") - proto.RegisterType((*CapacityRequestPolicy)(nil), "k8s.io.api.resource.v1beta2.CapacityRequestPolicy") - proto.RegisterType((*CapacityRequestPolicyRange)(nil), "k8s.io.api.resource.v1beta2.CapacityRequestPolicyRange") - proto.RegisterType((*CapacityRequirements)(nil), "k8s.io.api.resource.v1beta2.CapacityRequirements") - proto.RegisterMapType((map[QualifiedName]resource.Quantity)(nil), "k8s.io.api.resource.v1beta2.CapacityRequirements.RequestsEntry") - proto.RegisterType((*Counter)(nil), "k8s.io.api.resource.v1beta2.Counter") - proto.RegisterType((*CounterSet)(nil), "k8s.io.api.resource.v1beta2.CounterSet") - proto.RegisterMapType((map[string]Counter)(nil), "k8s.io.api.resource.v1beta2.CounterSet.CountersEntry") - proto.RegisterType((*Device)(nil), "k8s.io.api.resource.v1beta2.Device") - proto.RegisterMapType((map[QualifiedName]DeviceAttribute)(nil), "k8s.io.api.resource.v1beta2.Device.AttributesEntry") - proto.RegisterMapType((map[QualifiedName]DeviceCapacity)(nil), "k8s.io.api.resource.v1beta2.Device.CapacityEntry") - proto.RegisterType((*DeviceAllocationConfiguration)(nil), "k8s.io.api.resource.v1beta2.DeviceAllocationConfiguration") - proto.RegisterType((*DeviceAllocationResult)(nil), "k8s.io.api.resource.v1beta2.DeviceAllocationResult") - proto.RegisterType((*DeviceAttribute)(nil), "k8s.io.api.resource.v1beta2.DeviceAttribute") - proto.RegisterType((*DeviceCapacity)(nil), "k8s.io.api.resource.v1beta2.DeviceCapacity") - proto.RegisterType((*DeviceClaim)(nil), "k8s.io.api.resource.v1beta2.DeviceClaim") - proto.RegisterType((*DeviceClaimConfiguration)(nil), "k8s.io.api.resource.v1beta2.DeviceClaimConfiguration") - proto.RegisterType((*DeviceClass)(nil), "k8s.io.api.resource.v1beta2.DeviceClass") - proto.RegisterType((*DeviceClassConfiguration)(nil), "k8s.io.api.resource.v1beta2.DeviceClassConfiguration") - proto.RegisterType((*DeviceClassList)(nil), "k8s.io.api.resource.v1beta2.DeviceClassList") - proto.RegisterType((*DeviceClassSpec)(nil), "k8s.io.api.resource.v1beta2.DeviceClassSpec") - proto.RegisterType((*DeviceConfiguration)(nil), "k8s.io.api.resource.v1beta2.DeviceConfiguration") - proto.RegisterType((*DeviceConstraint)(nil), "k8s.io.api.resource.v1beta2.DeviceConstraint") - proto.RegisterType((*DeviceCounterConsumption)(nil), "k8s.io.api.resource.v1beta2.DeviceCounterConsumption") - proto.RegisterMapType((map[string]Counter)(nil), "k8s.io.api.resource.v1beta2.DeviceCounterConsumption.CountersEntry") - proto.RegisterType((*DeviceRequest)(nil), "k8s.io.api.resource.v1beta2.DeviceRequest") - proto.RegisterType((*DeviceRequestAllocationResult)(nil), "k8s.io.api.resource.v1beta2.DeviceRequestAllocationResult") - proto.RegisterMapType((map[QualifiedName]resource.Quantity)(nil), "k8s.io.api.resource.v1beta2.DeviceRequestAllocationResult.ConsumedCapacityEntry") - proto.RegisterType((*DeviceSelector)(nil), "k8s.io.api.resource.v1beta2.DeviceSelector") - proto.RegisterType((*DeviceSubRequest)(nil), "k8s.io.api.resource.v1beta2.DeviceSubRequest") - proto.RegisterType((*DeviceTaint)(nil), "k8s.io.api.resource.v1beta2.DeviceTaint") - proto.RegisterType((*DeviceToleration)(nil), "k8s.io.api.resource.v1beta2.DeviceToleration") - proto.RegisterType((*ExactDeviceRequest)(nil), "k8s.io.api.resource.v1beta2.ExactDeviceRequest") - proto.RegisterType((*NetworkDeviceData)(nil), "k8s.io.api.resource.v1beta2.NetworkDeviceData") - proto.RegisterType((*OpaqueDeviceConfiguration)(nil), "k8s.io.api.resource.v1beta2.OpaqueDeviceConfiguration") - proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1beta2.ResourceClaim") - proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1beta2.ResourceClaimConsumerReference") - proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1beta2.ResourceClaimList") - proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1beta2.ResourceClaimSpec") - proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1beta2.ResourceClaimStatus") - proto.RegisterType((*ResourceClaimTemplate)(nil), "k8s.io.api.resource.v1beta2.ResourceClaimTemplate") - proto.RegisterType((*ResourceClaimTemplateList)(nil), "k8s.io.api.resource.v1beta2.ResourceClaimTemplateList") - proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1beta2.ResourceClaimTemplateSpec") - proto.RegisterType((*ResourcePool)(nil), "k8s.io.api.resource.v1beta2.ResourcePool") - proto.RegisterType((*ResourceSlice)(nil), "k8s.io.api.resource.v1beta2.ResourceSlice") - proto.RegisterType((*ResourceSliceList)(nil), "k8s.io.api.resource.v1beta2.ResourceSliceList") - proto.RegisterType((*ResourceSliceSpec)(nil), "k8s.io.api.resource.v1beta2.ResourceSliceSpec") -} - -func init() { - proto.RegisterFile("k8s.io/api/resource/v1beta2/generated.proto", fileDescriptor_57f2e1d27c072d6e) -} - -var fileDescriptor_57f2e1d27c072d6e = []byte{ - // 3037 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5b, 0xcf, 0x6f, 0x24, 0x47, - 0xf5, 0x77, 0xcf, 0xcc, 0x8e, 0xc7, 0x6f, 0x6c, 0xaf, 0x5d, 0xfb, 0x23, 0x13, 0xe7, 0x1b, 0x8f, - 0xd3, 0xfb, 0x85, 0x38, 0x9b, 0x64, 0x9c, 0x35, 0x24, 0x44, 0x9b, 0x03, 0xcc, 0xd8, 0xde, 0xc4, - 0xc9, 0xae, 0xd7, 0xa9, 0x71, 0x9c, 0x25, 0xbf, 0x44, 0xbb, 0xbb, 0x6c, 0x37, 0xee, 0xe9, 0x9e, - 0xed, 0xae, 0xf1, 0xda, 0x42, 0x82, 0x08, 0xae, 0x1c, 0x38, 0x80, 0x84, 0x04, 0x48, 0x08, 0x21, - 0x7e, 0x48, 0x08, 0xf1, 0x17, 0x04, 0x05, 0x14, 0x91, 0x1b, 0x51, 0xb8, 0xe4, 0x80, 0x26, 0x64, - 0x72, 0xe2, 0xc8, 0x05, 0xa1, 0x3d, 0xa1, 0xaa, 0xae, 0xea, 0x5f, 0x33, 0x3d, 0xe9, 0x71, 0x76, - 0x57, 0xcb, 0xcd, 0xf3, 0xea, 0xbd, 0x4f, 0x55, 0xbd, 0x7a, 0xbf, 0xea, 0x75, 0x19, 0x1e, 0x3f, - 0x78, 0xd6, 0xab, 0x99, 0xce, 0x92, 0xd6, 0x36, 0x97, 0x5c, 0xe2, 0x39, 0x1d, 0x57, 0x27, 0x4b, - 0x87, 0x97, 0x76, 0x08, 0xd5, 0x96, 0x97, 0xf6, 0x88, 0x4d, 0x5c, 0x8d, 0x12, 0xa3, 0xd6, 0x76, - 0x1d, 0xea, 0xa0, 0x87, 0x7c, 0xe6, 0x9a, 0xd6, 0x36, 0x6b, 0x92, 0xb9, 0x26, 0x98, 0xe7, 0x9e, - 0xdc, 0x33, 0xe9, 0x7e, 0x67, 0xa7, 0xa6, 0x3b, 0xad, 0xa5, 0x3d, 0x67, 0xcf, 0x59, 0xe2, 0x32, - 0x3b, 0x9d, 0x5d, 0xfe, 0x8b, 0xff, 0xe0, 0x7f, 0xf9, 0x58, 0x73, 0x6a, 0x64, 0x62, 0xdd, 0x71, - 0xd9, 0xa4, 0xc9, 0xf9, 0xe6, 0xbe, 0x1c, 0xf2, 0xb4, 0x34, 0x7d, 0xdf, 0xb4, 0x89, 0x7b, 0xbc, - 0xd4, 0x3e, 0xd8, 0x8b, 0xaf, 0x76, 0x14, 0x29, 0x6f, 0xa9, 0x45, 0xa8, 0x36, 0x68, 0xae, 0xa5, - 0x34, 0x29, 0xb7, 0x63, 0x53, 0xb3, 0xd5, 0x3f, 0xcd, 0x33, 0x9f, 0x25, 0xe0, 0xe9, 0xfb, 0xa4, - 0xa5, 0x25, 0xe5, 0xd4, 0xf7, 0xf2, 0x70, 0xae, 0x6e, 0x59, 0x8e, 0xce, 0x68, 0xab, 0xe4, 0xd0, - 0xd4, 0x49, 0x93, 0x6a, 0xb4, 0xe3, 0xa1, 0x2f, 0x42, 0xd1, 0x70, 0xcd, 0x43, 0xe2, 0x56, 0x94, - 0x05, 0x65, 0x71, 0xa2, 0x31, 0xfd, 0x7e, 0xb7, 0x3a, 0xd6, 0xeb, 0x56, 0x8b, 0xab, 0x9c, 0x8a, - 0xc5, 0x28, 0x5a, 0x80, 0x42, 0xdb, 0x71, 0xac, 0x4a, 0x8e, 0x73, 0x4d, 0x0a, 0xae, 0xc2, 0xa6, - 0xe3, 0x58, 0x98, 0x8f, 0x70, 0x24, 0x8e, 0x5c, 0xc9, 0x27, 0x90, 0x38, 0x15, 0x8b, 0x51, 0xf4, - 0x05, 0x18, 0xf7, 0xf6, 0x35, 0x97, 0xac, 0xaf, 0x56, 0xc6, 0x39, 0x63, 0xb9, 0xd7, 0xad, 0x8e, - 0x37, 0x7d, 0x12, 0x96, 0x63, 0x48, 0x07, 0xd0, 0x1d, 0xdb, 0x30, 0xa9, 0xe9, 0xd8, 0x5e, 0xa5, - 0xb0, 0x90, 0x5f, 0x2c, 0x2f, 0x2f, 0xd5, 0x42, 0x63, 0x08, 0xf6, 0x5f, 0x6b, 0x1f, 0xec, 0x31, - 0x82, 0x57, 0x63, 0x6a, 0xae, 0x1d, 0x5e, 0xaa, 0xad, 0x48, 0xb9, 0x06, 0x12, 0x6b, 0x80, 0x80, - 0xe4, 0xe1, 0x08, 0x2c, 0x7a, 0x09, 0x0a, 0x86, 0x46, 0xb5, 0xca, 0xa9, 0x05, 0x65, 0xb1, 0xbc, - 0xfc, 0x64, 0x2a, 0xbc, 0x50, 0x6f, 0x0d, 0x6b, 0xb7, 0xd6, 0x8e, 0x28, 0xb1, 0x3d, 0x06, 0x5e, - 0x62, 0x0a, 0x58, 0xd5, 0xa8, 0x86, 0x39, 0x08, 0xd2, 0xa0, 0x6c, 0x13, 0x7a, 0xcb, 0x71, 0x0f, - 0x18, 0xb1, 0x52, 0xe4, 0x98, 0xb5, 0xda, 0x10, 0xfb, 0xad, 0x6d, 0x08, 0x7e, 0xae, 0x19, 0x26, - 0xd5, 0x38, 0xdd, 0xeb, 0x56, 0xcb, 0x1b, 0x21, 0x0c, 0x8e, 0x62, 0xaa, 0xef, 0xe6, 0x60, 0x46, - 0x9c, 0xa3, 0xe9, 0xd8, 0x98, 0x78, 0x1d, 0x8b, 0xa2, 0xb7, 0x60, 0xdc, 0x57, 0xad, 0xc7, 0xcf, - 0xb0, 0xbc, 0xfc, 0xa5, 0xa1, 0x73, 0xfa, 0x93, 0x25, 0x51, 0x1a, 0xa7, 0x85, 0xaa, 0xc6, 0xfd, - 0x71, 0x0f, 0x4b, 0x50, 0xb4, 0x0d, 0x93, 0xb6, 0x63, 0x90, 0x26, 0xb1, 0x88, 0x4e, 0x1d, 0x97, - 0x1f, 0x6f, 0x79, 0x79, 0x21, 0x3a, 0x09, 0x73, 0x26, 0xa6, 0xf9, 0x8d, 0x08, 0x5f, 0x63, 0xa6, - 0xd7, 0xad, 0x4e, 0x46, 0x29, 0x38, 0x86, 0x83, 0x3a, 0x70, 0x46, 0x0b, 0x56, 0xb1, 0x65, 0xb6, - 0x88, 0x47, 0xb5, 0x56, 0x5b, 0x9c, 0xc5, 0xc5, 0x6c, 0x47, 0xcd, 0xc4, 0x1a, 0x0f, 0xf4, 0xba, - 0xd5, 0x33, 0xf5, 0x7e, 0x28, 0x3c, 0x08, 0x5f, 0x7d, 0x1e, 0x66, 0x57, 0xd6, 0xae, 0x0a, 0x27, - 0x90, 0x6b, 0x59, 0x06, 0x20, 0x47, 0x6d, 0x97, 0x78, 0xec, 0x64, 0x85, 0x2b, 0x04, 0xc6, 0xb3, - 0x16, 0x8c, 0xe0, 0x08, 0x97, 0xfa, 0x4e, 0x0e, 0xce, 0xad, 0x68, 0x6d, 0x4d, 0x37, 0xe9, 0x31, - 0x26, 0x37, 0x3b, 0xc4, 0xa3, 0x9b, 0x8e, 0x65, 0xea, 0xc7, 0xe8, 0x15, 0x76, 0x22, 0xbb, 0x5a, - 0xc7, 0xa2, 0xe2, 0x44, 0x6a, 0xc3, 0x76, 0x13, 0x1e, 0xd1, 0xcb, 0x1d, 0xcd, 0xa6, 0x26, 0x3d, - 0xf6, 0x5d, 0x62, 0xd5, 0x87, 0xc0, 0x12, 0x0b, 0x11, 0x28, 0x1f, 0x6a, 0x96, 0x69, 0x6c, 0x6b, - 0x56, 0x87, 0x78, 0x95, 0x3c, 0xf7, 0x89, 0x51, 0xa1, 0xcf, 0x88, 0x5d, 0x95, 0xb7, 0x43, 0x28, - 0x1c, 0xc5, 0x45, 0x7b, 0x00, 0xfc, 0x27, 0xd6, 0xec, 0x3d, 0x52, 0x29, 0xf0, 0x0d, 0x7c, 0x65, - 0xa8, 0x49, 0x0d, 0xd4, 0x02, 0x17, 0x6f, 0x4c, 0x33, 0x05, 0x6e, 0x07, 0x70, 0x38, 0x02, 0xad, - 0xbe, 0x9d, 0x83, 0xb9, 0x74, 0x51, 0xb4, 0x0e, 0xf9, 0x96, 0x69, 0x9f, 0x50, 0x83, 0xe3, 0xbd, - 0x6e, 0x35, 0x7f, 0xcd, 0xb4, 0x31, 0xc3, 0xe0, 0x50, 0xda, 0x11, 0x0f, 0x5e, 0x27, 0x85, 0xd2, - 0x8e, 0x30, 0xc3, 0x40, 0x57, 0xa1, 0xe0, 0x51, 0xd2, 0x16, 0x5e, 0x30, 0x2a, 0x16, 0x8f, 0x19, - 0x4d, 0x4a, 0xda, 0x98, 0xa3, 0xa8, 0xdf, 0xcb, 0xc1, 0xd9, 0xa8, 0x0a, 0x4c, 0x97, 0xb4, 0x88, - 0x4d, 0x3d, 0xf4, 0x6d, 0x28, 0xb9, 0xbe, 0x4a, 0x98, 0x57, 0xb3, 0x83, 0xfe, 0x6a, 0xe6, 0x23, - 0x90, 0x20, 0x35, 0xa1, 0x54, 0x6f, 0xcd, 0xa6, 0xee, 0x71, 0xe3, 0x11, 0x71, 0xf2, 0x25, 0x49, - 0xfe, 0xee, 0xc7, 0xd5, 0xa9, 0x97, 0x3b, 0x9a, 0x65, 0xee, 0x9a, 0xc4, 0xd8, 0xd0, 0x5a, 0x04, - 0x07, 0x73, 0xce, 0x1d, 0xc0, 0x54, 0x4c, 0x1a, 0xcd, 0x40, 0xfe, 0x80, 0x1c, 0xfb, 0xae, 0x81, - 0xd9, 0x9f, 0x68, 0x15, 0x4e, 0x1d, 0x32, 0x8b, 0x39, 0x99, 0x5a, 0xb1, 0x2f, 0x7c, 0x39, 0xf7, - 0xac, 0xa2, 0xbe, 0x05, 0xe3, 0x2b, 0x4e, 0xc7, 0xa6, 0xc4, 0x45, 0x4d, 0x09, 0x7a, 0xb2, 0x63, - 0x9f, 0x12, 0x7b, 0x3c, 0xc5, 0x6d, 0x59, 0xcc, 0xa1, 0xfe, 0x5b, 0x01, 0x10, 0x13, 0x34, 0x09, - 0x65, 0xb9, 0xcc, 0xd6, 0x5a, 0x44, 0xb8, 0x79, 0x90, 0xcb, 0xb8, 0x06, 0xf8, 0x08, 0xd2, 0xa1, - 0xa4, 0xfb, 0xfc, 0x5e, 0x25, 0xc7, 0xb5, 0xff, 0xf4, 0x70, 0xed, 0x07, 0xe0, 0xf2, 0x4f, 0xa1, - 0xf3, 0x19, 0xa9, 0x73, 0x49, 0xc6, 0x01, 0xf0, 0x9c, 0x06, 0x53, 0x31, 0xe6, 0x01, 0x2a, 0xbe, - 0x1c, 0x57, 0xf1, 0xff, 0x67, 0x59, 0x44, 0x54, 0xb1, 0x3f, 0x9c, 0x00, 0x91, 0x7e, 0x33, 0x6c, - 0xfa, 0x08, 0x40, 0xa3, 0xd4, 0x35, 0x77, 0x3a, 0x94, 0xc8, 0x6d, 0x67, 0x49, 0x25, 0xb5, 0x7a, - 0x20, 0xe5, 0x6f, 0xfa, 0x82, 0x0c, 0x9c, 0xe1, 0x40, 0xbf, 0xa9, 0x45, 0xe6, 0x42, 0x6d, 0x28, - 0xe9, 0xc2, 0x7e, 0x45, 0x54, 0xbb, 0x94, 0x65, 0x5e, 0x69, 0xf3, 0x09, 0xf3, 0x96, 0xe4, 0x01, - 0xe6, 0x2d, 0x67, 0x41, 0xdf, 0x82, 0x19, 0xdd, 0xb1, 0xbd, 0x4e, 0x8b, 0x78, 0xf2, 0x0c, 0x44, - 0x8d, 0xf1, 0x74, 0x86, 0x99, 0x85, 0xc8, 0x0a, 0x47, 0x68, 0xf3, 0x4a, 0xa3, 0x22, 0x66, 0x9f, - 0x59, 0x49, 0xc0, 0xe2, 0xbe, 0x89, 0xd0, 0x22, 0x94, 0x58, 0x22, 0x64, 0x4b, 0xe2, 0xd9, 0x6e, - 0xa2, 0x31, 0xc9, 0xd6, 0xbd, 0x21, 0x68, 0x38, 0x18, 0xed, 0x4b, 0xbd, 0xc5, 0x3b, 0x94, 0x7a, - 0x17, 0xa1, 0xa4, 0x59, 0x16, 0x63, 0xf0, 0x78, 0x11, 0x56, 0xf2, 0x57, 0x50, 0x17, 0x34, 0x1c, - 0x8c, 0xa2, 0x4d, 0x28, 0x52, 0xcd, 0xb4, 0xa9, 0x57, 0x29, 0x71, 0xf5, 0x2c, 0x66, 0x50, 0xcf, - 0x16, 0x13, 0x08, 0xeb, 0x3f, 0xfe, 0xd3, 0xc3, 0x02, 0x07, 0x5d, 0x82, 0xf2, 0x8e, 0x69, 0x1b, - 0xde, 0x96, 0xc3, 0x66, 0xa8, 0x4c, 0xf0, 0xe9, 0x79, 0xd9, 0xd3, 0x08, 0xc9, 0x38, 0xca, 0x83, - 0x56, 0x60, 0x96, 0xfd, 0x34, 0xed, 0xbd, 0xb0, 0x8e, 0xab, 0xc0, 0x42, 0x7e, 0x71, 0xa2, 0x71, - 0xae, 0xd7, 0xad, 0xce, 0x36, 0x92, 0x83, 0xb8, 0x9f, 0x1f, 0xdd, 0x80, 0x8a, 0x20, 0x5e, 0xd1, - 0x4c, 0xab, 0xe3, 0x92, 0x08, 0x56, 0x99, 0x63, 0xfd, 0x5f, 0xaf, 0x5b, 0xad, 0x34, 0x52, 0x78, - 0x70, 0xaa, 0x34, 0x43, 0x66, 0x85, 0xc6, 0xad, 0x6b, 0x1d, 0x8b, 0x9a, 0x6d, 0x2b, 0x52, 0x5b, - 0x79, 0x95, 0x49, 0xbe, 0x3d, 0x8e, 0x5c, 0x4f, 0xe1, 0xc1, 0xa9, 0xd2, 0x73, 0x07, 0x70, 0x3a, - 0xe1, 0x5c, 0x03, 0x82, 0x44, 0x23, 0x1e, 0x24, 0x9e, 0xc8, 0x52, 0xfd, 0x49, 0xd0, 0x48, 0xb0, - 0x98, 0xdb, 0x87, 0xa9, 0x98, 0x47, 0x0d, 0x98, 0xaa, 0x1e, 0x9f, 0xea, 0xf1, 0x2c, 0xbe, 0x22, - 0x13, 0x53, 0x24, 0x2c, 0x7d, 0x3f, 0x07, 0x0f, 0x27, 0xcb, 0xd0, 0x15, 0xc7, 0xde, 0x35, 0xf7, - 0x3a, 0x2e, 0xff, 0x81, 0xbe, 0x06, 0x45, 0x1f, 0x4d, 0xc4, 0xab, 0x45, 0x69, 0x4c, 0x4d, 0x4e, - 0xbd, 0xdd, 0xad, 0x9e, 0x4f, 0x8a, 0xfa, 0x23, 0x58, 0xc8, 0x31, 0x13, 0x0f, 0x12, 0x68, 0x8e, - 0x1f, 0xef, 0x64, 0x34, 0xf7, 0x85, 0xa9, 0x0e, 0x7d, 0x07, 0xce, 0x18, 0xc2, 0xad, 0x23, 0x4b, - 0x10, 0x09, 0xfe, 0xa9, 0x4c, 0xe1, 0x20, 0x22, 0xd7, 0x78, 0x48, 0x2c, 0xf5, 0xcc, 0x80, 0x41, - 0x3c, 0x68, 0x26, 0xf5, 0x53, 0x05, 0xce, 0x0f, 0xae, 0xca, 0x11, 0x81, 0x71, 0x97, 0xff, 0x25, - 0xab, 0x80, 0xcb, 0x19, 0xd6, 0x23, 0xf6, 0x98, 0x5e, 0xe2, 0xfb, 0xbf, 0x3d, 0x2c, 0xb1, 0xd1, - 0x0e, 0x14, 0x75, 0xbe, 0x24, 0x11, 0xf6, 0x2f, 0x8f, 0x74, 0x83, 0x88, 0xef, 0x3f, 0xf0, 0x7b, - 0x9f, 0x8c, 0x05, 0xb2, 0xfa, 0x5b, 0x05, 0x4e, 0x27, 0xac, 0x0f, 0xcd, 0x43, 0xde, 0xb4, 0x29, - 0xb7, 0xa6, 0xbc, 0x7f, 0x3e, 0xeb, 0x36, 0xf5, 0x53, 0x37, 0x1b, 0x40, 0x8f, 0x40, 0x61, 0x87, - 0xdd, 0x3a, 0xf3, 0xdc, 0x8b, 0xa6, 0x7a, 0xdd, 0xea, 0x44, 0xc3, 0x71, 0x2c, 0x9f, 0x83, 0x0f, - 0xa1, 0x47, 0xa1, 0xe8, 0x51, 0xd7, 0xb4, 0xf7, 0x78, 0xa5, 0x3a, 0xe1, 0x47, 0x92, 0x26, 0xa7, - 0xf8, 0x6c, 0x62, 0x18, 0x5d, 0x84, 0xf1, 0x43, 0xe2, 0xf2, 0xfa, 0xde, 0x0f, 0xba, 0x3c, 0x48, - 0x6e, 0xfb, 0x24, 0x9f, 0x55, 0x32, 0xa8, 0x1f, 0x2a, 0x30, 0x1d, 0x37, 0xdf, 0xbb, 0x52, 0x98, - 0xa0, 0x03, 0x98, 0x72, 0xa3, 0x85, 0xaf, 0xf0, 0xab, 0xe5, 0xd1, 0xab, 0xed, 0xc6, 0x6c, 0xaf, - 0x5b, 0x9d, 0x8a, 0x57, 0xd1, 0x71, 0x6c, 0xf5, 0x77, 0x39, 0x28, 0x8b, 0x4d, 0x59, 0x9a, 0xd9, - 0x42, 0x37, 0xfa, 0x4a, 0xcc, 0x8b, 0xd9, 0x8d, 0x2b, 0xac, 0x6c, 0x06, 0x78, 0x94, 0x01, 0x65, - 0x96, 0xf4, 0xa8, 0xeb, 0x67, 0x0e, 0xdf, 0xa6, 0x9e, 0xcc, 0xe6, 0x49, 0x42, 0x2a, 0xbc, 0xa7, - 0x84, 0x34, 0x0f, 0x47, 0x61, 0xd1, 0x9b, 0x81, 0xd1, 0xe6, 0xb3, 0x67, 0x6e, 0xb6, 0xf3, 0x6c, - 0xf6, 0xfa, 0x9e, 0x02, 0x95, 0x34, 0xa1, 0x58, 0x74, 0x51, 0x4e, 0x12, 0x5d, 0x72, 0xf7, 0x2c, - 0xba, 0xfc, 0x51, 0x89, 0x1c, 0xbb, 0xe7, 0xa1, 0x6f, 0x40, 0x89, 0xdd, 0x9e, 0x79, 0xdf, 0x43, - 0xe9, 0x5b, 0xc5, 0x90, 0xbb, 0xf6, 0xf5, 0x9d, 0x6f, 0x12, 0x9d, 0x5e, 0x23, 0x54, 0x0b, 0xaf, - 0xc6, 0x21, 0x0d, 0x07, 0xa8, 0x68, 0x03, 0x0a, 0x5e, 0x9b, 0xe8, 0x23, 0xe4, 0x23, 0xbe, 0xb2, - 0x66, 0x9b, 0xe8, 0x61, 0x61, 0xca, 0x7e, 0x61, 0x8e, 0xa3, 0xfe, 0x24, 0x7a, 0x12, 0x9e, 0x17, - 0x3f, 0x89, 0x14, 0xfd, 0x2a, 0xf7, 0x4c, 0xbf, 0xef, 0x04, 0x71, 0x8d, 0xaf, 0xee, 0xaa, 0xe9, - 0x51, 0xf4, 0x46, 0x9f, 0x8e, 0x6b, 0xd9, 0x74, 0xcc, 0xa4, 0xb9, 0x86, 0x03, 0xf7, 0x92, 0x94, - 0x88, 0x7e, 0xaf, 0xc1, 0x29, 0x93, 0x92, 0x96, 0x74, 0xac, 0xc5, 0xac, 0x0a, 0x0e, 0x83, 0xd0, - 0x3a, 0x13, 0xc7, 0x3e, 0x8a, 0xfa, 0xd3, 0x5c, 0x6c, 0x03, 0x4c, 0xf1, 0xe8, 0x0d, 0x98, 0xf0, - 0x44, 0xb1, 0x28, 0x83, 0x43, 0x96, 0x64, 0x1f, 0x14, 0xa0, 0xb3, 0x62, 0xa6, 0x09, 0x49, 0xf1, - 0x70, 0x08, 0x18, 0xf1, 0xdc, 0xdc, 0x28, 0x9e, 0x9b, 0x38, 0xfa, 0x34, 0xcf, 0x45, 0x57, 0xe1, - 0x2c, 0x39, 0xa2, 0xc4, 0x36, 0x88, 0x81, 0x05, 0x18, 0xaf, 0xb5, 0xfd, 0x04, 0x51, 0xe9, 0x75, - 0xab, 0x67, 0xd7, 0x06, 0x8c, 0xe3, 0x81, 0x52, 0xea, 0x4d, 0x18, 0x64, 0x0b, 0xe8, 0x35, 0x28, - 0x3a, 0x6d, 0xed, 0x66, 0x90, 0x10, 0x9e, 0x19, 0xba, 0x87, 0xeb, 0x9c, 0x75, 0x90, 0xc1, 0x01, - 0xdb, 0x80, 0x3f, 0x8c, 0x05, 0xa2, 0xfa, 0x4f, 0x05, 0x66, 0x92, 0x01, 0x71, 0x84, 0x90, 0xb3, - 0x09, 0xd3, 0x2d, 0x8d, 0xea, 0xfb, 0x41, 0x9e, 0x15, 0x5d, 0xdb, 0xc5, 0x5e, 0xb7, 0x3a, 0x7d, - 0x2d, 0x36, 0x72, 0xbb, 0x5b, 0x45, 0x57, 0x3a, 0x96, 0x75, 0x1c, 0xbf, 0x28, 0x25, 0xe4, 0xd1, - 0xd7, 0x61, 0xd6, 0x30, 0x3d, 0x6a, 0xda, 0x3a, 0x0d, 0x41, 0xfd, 0x36, 0xef, 0xe3, 0xac, 0x00, - 0x5f, 0x4d, 0x0e, 0xa6, 0xe0, 0xf6, 0xa3, 0xa8, 0xbf, 0xcc, 0x05, 0xce, 0xdd, 0x77, 0xab, 0x42, - 0xcb, 0x00, 0x7a, 0x70, 0xb5, 0x4e, 0xb6, 0xe5, 0xc2, 0x4b, 0x37, 0x8e, 0x70, 0xa1, 0x9b, 0x7d, - 0x77, 0xf7, 0x95, 0x13, 0x5d, 0xe9, 0xee, 0xaf, 0x9b, 0xfc, 0x7f, 0x14, 0x98, 0x8a, 0x25, 0xe0, - 0x0c, 0x17, 0xfa, 0x6d, 0x18, 0x27, 0x47, 0x9a, 0x4e, 0x2d, 0x59, 0x57, 0x2c, 0x0d, 0x9d, 0x75, - 0x8d, 0xf1, 0xc6, 0x93, 0x3c, 0xef, 0x43, 0xae, 0xf9, 0x18, 0x58, 0x82, 0xa1, 0x16, 0x4c, 0xef, - 0x9a, 0xae, 0x47, 0xeb, 0x87, 0x9a, 0x69, 0x69, 0x3b, 0x16, 0x11, 0x09, 0x38, 0x4b, 0x86, 0x6f, - 0x76, 0x76, 0x24, 0xf8, 0x79, 0xb1, 0xe4, 0xe9, 0x2b, 0x31, 0x30, 0x9c, 0x00, 0x57, 0x3f, 0x2e, - 0xca, 0xdb, 0x42, 0x4a, 0x61, 0x8b, 0x1e, 0x63, 0x55, 0x32, 0x1f, 0x12, 0xda, 0x88, 0x54, 0xba, - 0x9c, 0x8c, 0xe5, 0x78, 0xe4, 0x7b, 0x47, 0x2e, 0xd3, 0xf7, 0x8e, 0x7c, 0x86, 0xef, 0x1d, 0x85, - 0xa1, 0xdf, 0x3b, 0x2e, 0x41, 0x59, 0x33, 0x5a, 0xa6, 0x5d, 0xd7, 0x75, 0xe2, 0x79, 0xbc, 0xf6, - 0x14, 0xf7, 0xdd, 0x7a, 0x48, 0xc6, 0x51, 0x1e, 0x56, 0x3f, 0x51, 0xc7, 0x22, 0xae, 0xb8, 0x43, - 0x16, 0x33, 0x6b, 0x77, 0x2b, 0x90, 0x0a, 0xeb, 0xa7, 0x90, 0xe6, 0xe1, 0x28, 0xec, 0xe0, 0x5b, - 0xf5, 0xf8, 0x1d, 0xbc, 0x55, 0x97, 0x3e, 0xd7, 0xad, 0xfa, 0xc5, 0xf0, 0x3b, 0xd1, 0x04, 0x57, - 0xf0, 0x53, 0x91, 0xef, 0x44, 0xb7, 0xbb, 0xd5, 0x47, 0xd2, 0xbe, 0x85, 0xd1, 0xe3, 0x36, 0xf1, - 0x6a, 0xaf, 0x44, 0x3f, 0x26, 0xfd, 0x5a, 0x09, 0xfa, 0x3d, 0x86, 0x2c, 0x9f, 0x79, 0x03, 0xa1, - 0xbc, 0xbc, 0x79, 0xf2, 0x0b, 0x55, 0x6d, 0x25, 0x01, 0xe9, 0x47, 0x8a, 0xc7, 0x12, 0xad, 0x20, - 0x23, 0xbd, 0x21, 0xd5, 0xb7, 0xa8, 0x39, 0x0f, 0xce, 0x0d, 0x44, 0xbd, 0xab, 0xfd, 0xd7, 0xd7, - 0xe5, 0x6d, 0x27, 0x68, 0x10, 0xad, 0x43, 0x5e, 0x27, 0xd6, 0x80, 0xda, 0x65, 0x40, 0xb0, 0x4a, - 0x7e, 0x4c, 0xf1, 0x1b, 0xe6, 0x2b, 0x6b, 0x57, 0x31, 0xc3, 0x50, 0x7f, 0x54, 0x90, 0xc9, 0x2c, - 0xf4, 0xfd, 0x0c, 0xc1, 0xab, 0x0e, 0xa7, 0x8d, 0x30, 0xf1, 0xf3, 0xfc, 0xed, 0x7b, 0xec, 0x03, - 0x82, 0x39, 0x5a, 0xb3, 0x70, 0xb9, 0x24, 0x7f, 0xbc, 0x88, 0xc9, 0xdf, 0xe9, 0x22, 0x66, 0x1b, - 0xa6, 0xc3, 0xcf, 0x4b, 0xd7, 0x1c, 0x43, 0xc6, 0x81, 0x9a, 0x0c, 0x6b, 0xf5, 0xd8, 0xe8, 0xed, - 0x6e, 0xf5, 0x6c, 0xf2, 0xe2, 0xcc, 0xe8, 0x38, 0x81, 0x82, 0x2e, 0xc0, 0x29, 0x9e, 0x58, 0x78, - 0xa4, 0xc8, 0x87, 0x35, 0x1b, 0x4f, 0x0a, 0xd8, 0x1f, 0xbb, 0x47, 0x11, 0xe2, 0xf5, 0x48, 0x5f, - 0x76, 0x9c, 0x9b, 0xc2, 0xa5, 0x91, 0x3f, 0x42, 0xf8, 0x55, 0x4a, 0x30, 0x12, 0x00, 0xaa, 0xff, - 0x0a, 0xee, 0x25, 0xbc, 0x41, 0x88, 0x1e, 0x8e, 0x18, 0x78, 0xa3, 0x2c, 0xd6, 0x96, 0x7f, 0x89, - 0x1c, 0xfb, 0xd6, 0x7e, 0x21, 0x6a, 0xed, 0x13, 0x29, 0xf7, 0xe9, 0xe7, 0xa0, 0x48, 0x76, 0x77, - 0x89, 0x4e, 0x45, 0xdc, 0x96, 0x9d, 0xe8, 0xe2, 0x1a, 0xa7, 0xde, 0x66, 0xa5, 0x4a, 0x38, 0xa5, - 0x4f, 0xc4, 0x42, 0x04, 0xbd, 0x0a, 0x13, 0xd4, 0x6c, 0x91, 0xba, 0x61, 0x10, 0x43, 0x7c, 0xf6, - 0x1a, 0xe5, 0x2b, 0x24, 0xef, 0x4e, 0x6c, 0x49, 0x00, 0x1c, 0x62, 0x5d, 0x2e, 0xfd, 0xf8, 0xe7, - 0xd5, 0xb1, 0xb7, 0xff, 0xbe, 0x30, 0xa6, 0xfe, 0x22, 0x27, 0x7d, 0x21, 0xd4, 0xf9, 0x67, 0x6d, - 0xfc, 0x05, 0x28, 0x39, 0x6d, 0xc6, 0xeb, 0xc8, 0x9c, 0xf5, 0x84, 0x2c, 0x45, 0xae, 0x0b, 0xfa, - 0xed, 0x6e, 0xb5, 0x92, 0x84, 0x95, 0x63, 0x38, 0x90, 0x0e, 0x55, 0x98, 0xcf, 0xa4, 0xc2, 0xc2, - 0xe8, 0x2a, 0x5c, 0x81, 0xd9, 0xd0, 0x7e, 0x9a, 0x44, 0x77, 0x6c, 0xc3, 0x13, 0x76, 0xcc, 0x53, - 0xca, 0x56, 0x72, 0x10, 0xf7, 0xf3, 0xab, 0xbf, 0x29, 0x00, 0xea, 0xaf, 0x45, 0x06, 0x05, 0x04, - 0xe5, 0xf3, 0x04, 0x84, 0xdc, 0xdd, 0x0f, 0x08, 0xf9, 0x3b, 0x1b, 0x10, 0x0a, 0x43, 0x02, 0xc2, - 0x7d, 0x5b, 0x65, 0xdc, 0xd5, 0x18, 0xf2, 0x7b, 0x05, 0x66, 0xfb, 0xde, 0x50, 0xa0, 0xe7, 0x60, - 0xca, 0x64, 0xf5, 0xf3, 0xae, 0x26, 0x2e, 0x7e, 0xbe, 0x9d, 0x9c, 0x13, 0x6b, 0x9d, 0x5a, 0x8f, - 0x0e, 0xe2, 0x38, 0x2f, 0x7a, 0x10, 0xf2, 0x66, 0x5b, 0xb6, 0x8c, 0x79, 0x26, 0x5b, 0xdf, 0xf4, - 0x30, 0xa3, 0x31, 0x0b, 0xdc, 0xd7, 0x5c, 0xe3, 0x96, 0xe6, 0x32, 0xc7, 0x76, 0x99, 0x9e, 0xf3, - 0x71, 0x0b, 0x7c, 0x21, 0x3e, 0x8c, 0x93, 0xfc, 0xea, 0xaf, 0x14, 0x78, 0x30, 0xf5, 0x2e, 0x98, - 0xf9, 0x31, 0x8e, 0x06, 0xd0, 0xd6, 0x5c, 0xad, 0x45, 0xc4, 0x25, 0xe7, 0x04, 0x8f, 0x57, 0x82, - 0x5b, 0xd4, 0x66, 0x00, 0x84, 0x23, 0xa0, 0xea, 0xcf, 0x72, 0x30, 0x25, 0xaf, 0xc1, 0x7e, 0xbb, - 0xf0, 0xee, 0xf7, 0x8d, 0x36, 0x63, 0x7d, 0xa3, 0xe1, 0x55, 0x47, 0x6c, 0x6d, 0x69, 0x9d, 0x23, - 0x74, 0x03, 0x8a, 0x1e, 0x7f, 0xe7, 0x94, 0xa9, 0x9b, 0x1f, 0xc7, 0xe4, 0x72, 0xe1, 0x11, 0xf8, - 0xbf, 0xb1, 0xc0, 0x53, 0x7b, 0x0a, 0xcc, 0xc7, 0xf8, 0x45, 0xd5, 0xe6, 0x62, 0xb2, 0x4b, 0x5c, - 0x62, 0xeb, 0x04, 0x3d, 0x01, 0x25, 0xad, 0x6d, 0x3e, 0xef, 0x3a, 0x9d, 0xb6, 0x38, 0xcf, 0xe0, - 0x0e, 0x59, 0xdf, 0x5c, 0xe7, 0x74, 0x1c, 0x70, 0x30, 0x6e, 0xb9, 0x20, 0x61, 0x55, 0x91, 0x0e, - 0xab, 0x4f, 0xc7, 0x01, 0x47, 0x50, 0x3f, 0x15, 0x52, 0xeb, 0xa7, 0x06, 0xe4, 0x3b, 0xa6, 0x21, - 0x5a, 0xdd, 0x4f, 0xc9, 0xac, 0xf2, 0x4a, 0xd6, 0xd2, 0x99, 0x09, 0xab, 0x7f, 0x52, 0x60, 0x36, - 0xb6, 0xc9, 0x7b, 0xd0, 0xdc, 0xba, 0x1e, 0x6f, 0x6e, 0x5d, 0xcc, 0x7e, 0x62, 0x29, 0xed, 0xad, - 0xfd, 0xc4, 0x1e, 0x78, 0x7f, 0xab, 0x99, 0x7c, 0x33, 0xb5, 0x98, 0xb5, 0x79, 0x9c, 0xfe, 0x50, - 0x4a, 0xfd, 0x4b, 0x0e, 0xce, 0x0c, 0xb0, 0x21, 0xf4, 0x26, 0x40, 0x18, 0xd2, 0xc5, 0x7c, 0xc3, - 0xe3, 0x6c, 0xdf, 0xa7, 0x1b, 0xfe, 0x8c, 0x26, 0x42, 0x8d, 0x00, 0x22, 0x17, 0xca, 0x2e, 0xf1, - 0x88, 0x7b, 0x48, 0x8c, 0x2b, 0xbc, 0x46, 0x60, 0x7a, 0x7b, 0x2e, 0xbb, 0xde, 0xfa, 0x2c, 0x37, - 0x8c, 0xea, 0x38, 0xc4, 0xc5, 0xd1, 0x49, 0xd0, 0x9b, 0xa1, 0xfe, 0xfc, 0xcf, 0xe6, 0xcb, 0x59, - 0xf6, 0x13, 0x7f, 0x7b, 0x38, 0x44, 0x93, 0x7f, 0x53, 0xe0, 0x5c, 0x6c, 0x8d, 0x5b, 0xa4, 0xd5, - 0xb6, 0x34, 0x4a, 0xee, 0x41, 0x14, 0xba, 0x11, 0x8b, 0x42, 0xcf, 0x64, 0xd7, 0xa3, 0x5c, 0x63, - 0x6a, 0x1f, 0xfb, 0x43, 0x05, 0x1e, 0x1c, 0x28, 0x71, 0x0f, 0xdc, 0xea, 0xd5, 0xb8, 0x5b, 0x2d, - 0x8f, 0xbe, 0xad, 0x14, 0xf7, 0xfa, 0x6b, 0xda, 0xa6, 0xb8, 0x9f, 0xfd, 0x0f, 0x26, 0x0d, 0xf5, - 0x0f, 0x0a, 0x4c, 0x4a, 0xce, 0x4d, 0xc7, 0xb1, 0x32, 0x5c, 0x56, 0x97, 0x01, 0xc4, 0x93, 0x5b, - 0xf9, 0x6d, 0x27, 0x1f, 0x2e, 0xfb, 0xf9, 0x60, 0x04, 0x47, 0xb8, 0xd0, 0x8b, 0x80, 0xe4, 0x02, - 0x9b, 0x96, 0xec, 0x40, 0xf2, 0xd0, 0x9f, 0x6f, 0xcc, 0x09, 0x59, 0x84, 0xfb, 0x38, 0xf0, 0x00, - 0x29, 0xf5, 0xcf, 0x4a, 0x98, 0xad, 0x39, 0xf9, 0x3e, 0x55, 0x3c, 0x5f, 0x5b, 0xaa, 0xe2, 0xa3, - 0xe9, 0x86, 0x73, 0xde, 0xaf, 0xe9, 0x86, 0x2f, 0x2e, 0xc5, 0x1f, 0xde, 0x2d, 0x24, 0x36, 0xc1, - 0xfd, 0x20, 0x6b, 0x65, 0xf7, 0x52, 0xe4, 0x99, 0x75, 0x79, 0xf9, 0xb1, 0x4c, 0xab, 0x61, 0x36, - 0x3a, 0xb0, 0x43, 0x19, 0x7d, 0x67, 0x94, 0x1f, 0xe9, 0x9d, 0x51, 0xe1, 0x2e, 0xbc, 0x33, 0x3a, - 0x35, 0xf4, 0x9d, 0xd1, 0x46, 0x98, 0x50, 0xfc, 0x8b, 0xc8, 0x85, 0x0c, 0x09, 0x79, 0xc8, 0xa3, - 0x65, 0x0c, 0xe7, 0xdb, 0xc4, 0xf5, 0xc9, 0xe1, 0x02, 0x99, 0x77, 0xfa, 0xef, 0x9d, 0xe6, 0x7a, - 0xdd, 0xea, 0xf9, 0xcd, 0x81, 0x1c, 0x38, 0x45, 0x12, 0xed, 0xc1, 0x34, 0x6f, 0x28, 0x1a, 0xc1, - 0x93, 0x31, 0xff, 0x4d, 0xd4, 0xa3, 0x19, 0xdf, 0x06, 0x86, 0x1d, 0xef, 0x66, 0x0c, 0x06, 0x27, - 0x60, 0x1b, 0xf5, 0xf7, 0x3f, 0x99, 0x1f, 0xfb, 0xe0, 0x93, 0xf9, 0xb1, 0x8f, 0x3e, 0x99, 0x1f, - 0x7b, 0xbb, 0x37, 0xaf, 0xbc, 0xdf, 0x9b, 0x57, 0x3e, 0xe8, 0xcd, 0x2b, 0x1f, 0xf5, 0xe6, 0x95, - 0x7f, 0xf4, 0xe6, 0x95, 0x1f, 0x7c, 0x3a, 0x3f, 0xf6, 0xda, 0x43, 0x43, 0xfe, 0x8d, 0xe2, 0xbf, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x60, 0x24, 0x5a, 0x50, 0x64, 0x31, 0x00, 0x00, -} +func (m *ResourceSliceSpec) Reset() { *m = ResourceSliceSpec{} } func (m *AllocatedDeviceStatus) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -1817,7 +436,7 @@ func (m *CapacityRequirements) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Requests { keysForRequests = append(keysForRequests, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForRequests) + sort.Strings(keysForRequests) for iNdEx := len(keysForRequests) - 1; iNdEx >= 0; iNdEx-- { v := m.Requests[QualifiedName(keysForRequests[iNdEx])] baseI := i @@ -1902,7 +521,7 @@ func (m *CounterSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Counters { keysForCounters = append(keysForCounters, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) + sort.Strings(keysForCounters) for iNdEx := len(keysForCounters) - 1; iNdEx >= 0; iNdEx-- { v := m.Counters[string(keysForCounters[iNdEx])] baseI := i @@ -2054,7 +673,7 @@ func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Capacity { keysForCapacity = append(keysForCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + sort.Strings(keysForCapacity) for iNdEx := len(keysForCapacity) - 1; iNdEx >= 0; iNdEx-- { v := m.Capacity[QualifiedName(keysForCapacity[iNdEx])] baseI := i @@ -2083,7 +702,7 @@ func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Attributes { keysForAttributes = append(keysForAttributes, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes) + sort.Strings(keysForAttributes) for iNdEx := len(keysForAttributes) - 1; iNdEx >= 0; iNdEx-- { v := m.Attributes[QualifiedName(keysForAttributes[iNdEx])] baseI := i @@ -2704,7 +1323,7 @@ func (m *DeviceCounterConsumption) MarshalToSizedBuffer(dAtA []byte) (int, error for k := range m.Counters { keysForCounters = append(keysForCounters, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) + sort.Strings(keysForCounters) for iNdEx := len(keysForCounters) - 1; iNdEx >= 0; iNdEx-- { v := m.Counters[string(keysForCounters[iNdEx])] baseI := i @@ -2815,7 +1434,7 @@ func (m *DeviceRequestAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, for k := range m.ConsumedCapacity { keysForConsumedCapacity = append(keysForConsumedCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForConsumedCapacity) + sort.Strings(keysForConsumedCapacity) for iNdEx := len(keysForConsumedCapacity) - 1; iNdEx >= 0; iNdEx-- { v := m.ConsumedCapacity[QualifiedName(keysForConsumedCapacity[iNdEx])] baseI := i @@ -4890,7 +3509,7 @@ func (this *CapacityRequirements) String() string { for k := range this.Requests { keysForRequests = append(keysForRequests, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForRequests) + sort.Strings(keysForRequests) mapStringForRequests := "map[QualifiedName]resource.Quantity{" for _, k := range keysForRequests { mapStringForRequests += fmt.Sprintf("%v: %v,", k, this.Requests[QualifiedName(k)]) @@ -4920,7 +3539,7 @@ func (this *CounterSet) String() string { for k := range this.Counters { keysForCounters = append(keysForCounters, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) + sort.Strings(keysForCounters) mapStringForCounters := "map[string]Counter{" for _, k := range keysForCounters { mapStringForCounters += fmt.Sprintf("%v: %v,", k, this.Counters[k]) @@ -4951,7 +3570,7 @@ func (this *Device) String() string { for k := range this.Attributes { keysForAttributes = append(keysForAttributes, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes) + sort.Strings(keysForAttributes) mapStringForAttributes := "map[QualifiedName]DeviceAttribute{" for _, k := range keysForAttributes { mapStringForAttributes += fmt.Sprintf("%v: %v,", k, this.Attributes[QualifiedName(k)]) @@ -4961,7 +3580,7 @@ func (this *Device) String() string { for k := range this.Capacity { keysForCapacity = append(keysForCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + sort.Strings(keysForCapacity) mapStringForCapacity := "map[QualifiedName]DeviceCapacity{" for _, k := range keysForCapacity { mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[QualifiedName(k)]) @@ -5168,7 +3787,7 @@ func (this *DeviceCounterConsumption) String() string { for k := range this.Counters { keysForCounters = append(keysForCounters, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) + sort.Strings(keysForCounters) mapStringForCounters := "map[string]Counter{" for _, k := range keysForCounters { mapStringForCounters += fmt.Sprintf("%v: %v,", k, this.Counters[k]) @@ -5211,7 +3830,7 @@ func (this *DeviceRequestAllocationResult) String() string { for k := range this.ConsumedCapacity { keysForConsumedCapacity = append(keysForConsumedCapacity, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForConsumedCapacity) + sort.Strings(keysForConsumedCapacity) mapStringForConsumedCapacity := "map[QualifiedName]resource.Quantity{" for _, k := range keysForConsumedCapacity { mapStringForConsumedCapacity += fmt.Sprintf("%v: %v,", k, this.ConsumedCapacity[QualifiedName(k)]) diff --git a/staging/src/k8s.io/api/resource/v1beta2/generated.proto b/staging/src/k8s.io/api/resource/v1beta2/generated.proto index 213a5615a7bea..b866078c4fbce 100644 --- a/staging/src/k8s.io/api/resource/v1beta2/generated.proto +++ b/staging/src/k8s.io/api/resource/v1beta2/generated.proto @@ -41,7 +41,7 @@ message AllocatedDeviceStatus { // needed on a node. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required optional string driver = 1; @@ -65,6 +65,8 @@ message AllocatedDeviceStatus { // // +optional // +featureGate=DRAConsumableCapacity + // +k8s:optional + // +k8s:format=k8s-uuid optional string shareID = 7; // Conditions contains the latest observation of the device's state. @@ -560,6 +562,7 @@ message DeviceClaim { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated DeviceRequest requests = 1; // These constraints must be satisfied by the set of devices that get @@ -567,6 +570,7 @@ message DeviceClaim { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated DeviceConstraint constraints = 2; // This field holds configuration for multiple potential drivers which @@ -575,6 +579,7 @@ message DeviceClaim { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated DeviceClaimConfiguration config = 3; } @@ -589,6 +594,7 @@ message DeviceClaimConfiguration { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated string requests = 1; optional DeviceConfiguration deviceConfiguration = 2; @@ -639,6 +645,8 @@ message DeviceClassSpec { // // +optional // +listType=atomic + // +k8s:optional + // +k8s:maxItems=32 repeated DeviceSelector selectors = 1; // Config defines configuration parameters that apply to each device that is claimed via this class. @@ -649,6 +657,8 @@ message DeviceClassSpec { // // +optional // +listType=atomic + // +k8s:optional + // +k8s:maxItems=32 repeated DeviceClassConfiguration config = 2; // ExtendedResourceName is the extended resource name for the devices of this class. @@ -674,6 +684,7 @@ message DeviceConfiguration { // // +optional // +oneOf=ConfigurationType + // +k8s:optional optional OpaqueDeviceConfiguration opaque = 1; } @@ -691,6 +702,7 @@ message DeviceConstraint { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated string requests = 1; // MatchAttribute requires that all devices in question have this @@ -773,6 +785,7 @@ message DeviceRequest { // // +optional // +oneOf=deviceRequestType + // +k8s:optional optional ExactDeviceRequest exactly = 2; // FirstAvailable contains subrequests, of which exactly one will be @@ -793,6 +806,7 @@ message DeviceRequest { // +oneOf=deviceRequestType // +listType=atomic // +featureGate=DRAPrioritizedList + // +k8s:maxItems=8 repeated DeviceSubRequest firstAvailable = 3; } @@ -814,7 +828,7 @@ message DeviceRequestAllocationResult { // needed on a node. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required optional string driver = 2; @@ -826,6 +840,8 @@ message DeviceRequestAllocationResult { // DNS sub-domains separated by slashes. // // +required + // +k8s:required + // +k8s:format=k8s-resource-pool-name optional string pool = 3; // Device references one device instance via its name in the driver's @@ -888,6 +904,8 @@ message DeviceRequestAllocationResult { // // +optional // +featureGate=DRAConsumableCapacity + // +k8s:optional + // +k8s:format=k8s-uuid optional string shareID = 9; // ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. @@ -953,6 +971,7 @@ message DeviceSubRequest { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated DeviceSelector selectors = 3; // AllocationMode and its related fields define how devices are allocated @@ -1065,6 +1084,8 @@ message DeviceToleration { // Must be a label name. // // +optional + // +k8s:optional + // +k8s:format=k8s-label-key optional string key = 1; // Operator represents a key's relationship to the value. @@ -1124,6 +1145,7 @@ message ExactDeviceRequest { // // +optional // +listType=atomic + // +k8s:maxItems=32 repeated DeviceSelector selectors = 2; // AllocationMode and its related fields define how devices are allocated @@ -1251,9 +1273,11 @@ message OpaqueDeviceConfiguration { // to decide whether it needs to validate them. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required + // +k8s:required + // +k8s:format=k8s-long-name-caseless optional string driver = 1; // Parameters can contain arbitrary data. It is the responsibility of @@ -1282,6 +1306,7 @@ message ResourceClaim { // Spec describes what is being requested and how to configure it. // The spec is immutable. + // +k8s:immutable optional ResourceClaimSpec spec = 2; // Status describes whether the claim is ready to use and what has been allocated. @@ -1336,6 +1361,7 @@ message ResourceClaimStatus { // Allocation is set once the claim has been allocated successfully. // // +optional + // +k8s:optional optional AllocationResult allocation = 1; // ReservedFor indicates which entities are currently allowed to use @@ -1363,6 +1389,9 @@ message ResourceClaimStatus { // +listMapKey=uid // +patchStrategy=merge // +patchMergeKey=uid + // +k8s:optional + // +k8s:listType=map + // +k8s:listMapKey=uid repeated ResourceClaimConsumerReference reservedFor = 2; // Devices contains the status of each device allocated for this @@ -1370,6 +1399,7 @@ message ResourceClaimStatus { // information. Entries are owned by their respective drivers. // // +optional + // +k8s:optional // +listType=map // +listMapKey=driver // +listMapKey=device @@ -1509,7 +1539,8 @@ message ResourceSliceSpec { // objects with a certain driver name. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. This field is immutable. + // vendor of the driver. It should use only lower case characters. + // This field is immutable. // // +required optional string driver = 1; diff --git a/staging/src/k8s.io/api/resource/v1beta2/generated.protomessage.pb.go b/staging/src/k8s.io/api/resource/v1beta2/generated.protomessage.pb.go new file mode 100644 index 0000000000000..b6417d18c240f --- /dev/null +++ b/staging/src/k8s.io/api/resource/v1beta2/generated.protomessage.pb.go @@ -0,0 +1,108 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta2 + +func (*AllocatedDeviceStatus) ProtoMessage() {} + +func (*AllocationResult) ProtoMessage() {} + +func (*CELDeviceSelector) ProtoMessage() {} + +func (*CapacityRequestPolicy) ProtoMessage() {} + +func (*CapacityRequestPolicyRange) ProtoMessage() {} + +func (*CapacityRequirements) ProtoMessage() {} + +func (*Counter) ProtoMessage() {} + +func (*CounterSet) ProtoMessage() {} + +func (*Device) ProtoMessage() {} + +func (*DeviceAllocationConfiguration) ProtoMessage() {} + +func (*DeviceAllocationResult) ProtoMessage() {} + +func (*DeviceAttribute) ProtoMessage() {} + +func (*DeviceCapacity) ProtoMessage() {} + +func (*DeviceClaim) ProtoMessage() {} + +func (*DeviceClaimConfiguration) ProtoMessage() {} + +func (*DeviceClass) ProtoMessage() {} + +func (*DeviceClassConfiguration) ProtoMessage() {} + +func (*DeviceClassList) ProtoMessage() {} + +func (*DeviceClassSpec) ProtoMessage() {} + +func (*DeviceConfiguration) ProtoMessage() {} + +func (*DeviceConstraint) ProtoMessage() {} + +func (*DeviceCounterConsumption) ProtoMessage() {} + +func (*DeviceRequest) ProtoMessage() {} + +func (*DeviceRequestAllocationResult) ProtoMessage() {} + +func (*DeviceSelector) ProtoMessage() {} + +func (*DeviceSubRequest) ProtoMessage() {} + +func (*DeviceTaint) ProtoMessage() {} + +func (*DeviceToleration) ProtoMessage() {} + +func (*ExactDeviceRequest) ProtoMessage() {} + +func (*NetworkDeviceData) ProtoMessage() {} + +func (*OpaqueDeviceConfiguration) ProtoMessage() {} + +func (*ResourceClaim) ProtoMessage() {} + +func (*ResourceClaimConsumerReference) ProtoMessage() {} + +func (*ResourceClaimList) ProtoMessage() {} + +func (*ResourceClaimSpec) ProtoMessage() {} + +func (*ResourceClaimStatus) ProtoMessage() {} + +func (*ResourceClaimTemplate) ProtoMessage() {} + +func (*ResourceClaimTemplateList) ProtoMessage() {} + +func (*ResourceClaimTemplateSpec) ProtoMessage() {} + +func (*ResourcePool) ProtoMessage() {} + +func (*ResourceSlice) ProtoMessage() {} + +func (*ResourceSliceList) ProtoMessage() {} + +func (*ResourceSliceSpec) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/resource/v1beta2/types.go b/staging/src/k8s.io/api/resource/v1beta2/types.go index 9fa98abdf2d21..8809ec53ecbe4 100644 --- a/staging/src/k8s.io/api/resource/v1beta2/types.go +++ b/staging/src/k8s.io/api/resource/v1beta2/types.go @@ -101,7 +101,8 @@ type ResourceSliceSpec struct { // objects with a certain driver name. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. This field is immutable. + // vendor of the driver. It should use only lower case characters. + // This field is immutable. // // +required Driver string `json:"driver" protobuf:"bytes,1,name=driver"` @@ -678,6 +679,7 @@ type ResourceSliceList struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.33 +// +k8s:supportsSubresource=/status // ResourceClaim describes a request for access to resources in the cluster, // for use by workloads. For example, if a workload needs an accelerator device @@ -695,6 +697,7 @@ type ResourceClaim struct { // Spec describes what is being requested and how to configure it. // The spec is immutable. + // +k8s:immutable Spec ResourceClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"` // Status describes whether the claim is ready to use and what has been allocated. @@ -722,6 +725,7 @@ type DeviceClaim struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Requests []DeviceRequest `json:"requests" protobuf:"bytes,1,name=requests"` // These constraints must be satisfied by the set of devices that get @@ -729,6 +733,7 @@ type DeviceClaim struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Constraints []DeviceConstraint `json:"constraints,omitempty" protobuf:"bytes,2,opt,name=constraints"` // This field holds configuration for multiple potential drivers which @@ -737,6 +742,7 @@ type DeviceClaim struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Config []DeviceClaimConfiguration `json:"config,omitempty" protobuf:"bytes,3,opt,name=config"` // Potential future extension, ignored by older schedulers. This is @@ -787,6 +793,7 @@ type DeviceRequest struct { // // +optional // +oneOf=deviceRequestType + // +k8s:optional Exactly *ExactDeviceRequest `json:"exactly,omitempty" protobuf:"bytes,2,name=exactly"` // FirstAvailable contains subrequests, of which exactly one will be @@ -807,6 +814,7 @@ type DeviceRequest struct { // +oneOf=deviceRequestType // +listType=atomic // +featureGate=DRAPrioritizedList + // +k8s:maxItems=8 FirstAvailable []DeviceSubRequest `json:"firstAvailable,omitempty" protobuf:"bytes,3,name=firstAvailable"` } @@ -834,6 +842,7 @@ type ExactDeviceRequest struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,2,name=selectors"` // AllocationMode and its related fields define how devices are allocated @@ -960,6 +969,7 @@ type DeviceSubRequest struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,3,name=selectors"` // AllocationMode and its related fields define how devices are allocated @@ -1066,6 +1076,7 @@ const ( DeviceTolerationsMaxLength = 16 ) +// +enum type DeviceAllocationMode string // Valid [DeviceRequest.CountMode] values. @@ -1184,6 +1195,7 @@ type DeviceConstraint struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"` // MatchAttribute requires that all devices in question have this @@ -1241,6 +1253,7 @@ type DeviceClaimConfiguration struct { // // +optional // +listType=atomic + // +k8s:maxItems=32 Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"` DeviceConfiguration `json:",inline" protobuf:"bytes,2,name=deviceConfiguration"` @@ -1254,6 +1267,7 @@ type DeviceConfiguration struct { // // +optional // +oneOf=ConfigurationType + // +k8s:optional Opaque *OpaqueDeviceConfiguration `json:"opaque,omitempty" protobuf:"bytes,1,opt,name=opaque"` } @@ -1267,9 +1281,11 @@ type OpaqueDeviceConfiguration struct { // to decide whether it needs to validate them. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required + // +k8s:required + // +k8s:format=k8s-long-name-caseless Driver string `json:"driver" protobuf:"bytes,1,name=driver"` // Parameters can contain arbitrary data. It is the responsibility of @@ -1295,6 +1311,8 @@ type DeviceToleration struct { // Must be a label name. // // +optional + // +k8s:optional + // +k8s:format=k8s-label-key Key string `json:"key,omitempty" protobuf:"bytes,1,opt,name=key"` // Operator represents a key's relationship to the value. @@ -1346,6 +1364,7 @@ type ResourceClaimStatus struct { // Allocation is set once the claim has been allocated successfully. // // +optional + // +k8s:optional Allocation *AllocationResult `json:"allocation,omitempty" protobuf:"bytes,1,opt,name=allocation"` // ReservedFor indicates which entities are currently allowed to use @@ -1373,6 +1392,9 @@ type ResourceClaimStatus struct { // +listMapKey=uid // +patchStrategy=merge // +patchMergeKey=uid + // +k8s:optional + // +k8s:listType=map + // +k8s:listMapKey=uid ReservedFor []ResourceClaimConsumerReference `json:"reservedFor,omitempty" protobuf:"bytes,2,opt,name=reservedFor" patchStrategy:"merge" patchMergeKey:"uid"` // DeallocationRequested is tombstoned since Kubernetes 1.32 where @@ -1385,6 +1407,7 @@ type ResourceClaimStatus struct { // information. Entries are owned by their respective drivers. // // +optional + // +k8s:optional // +listType=map // +listMapKey=driver // +listMapKey=device @@ -1490,7 +1513,7 @@ type DeviceRequestAllocationResult struct { // needed on a node. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required Driver string `json:"driver" protobuf:"bytes,2,name=driver"` @@ -1502,6 +1525,8 @@ type DeviceRequestAllocationResult struct { // DNS sub-domains separated by slashes. // // +required + // +k8s:required + // +k8s:format=k8s-resource-pool-name Pool string `json:"pool" protobuf:"bytes,3,name=pool"` // Device references one device instance via its name in the driver's @@ -1564,6 +1589,8 @@ type DeviceRequestAllocationResult struct { // // +optional // +featureGate=DRAConsumableCapacity + // +k8s:optional + // +k8s:format=k8s-uuid ShareID *types.UID `json:"shareID,omitempty" protobuf:"bytes,9,opt,name=shareID"` // ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. @@ -1661,6 +1688,8 @@ type DeviceClassSpec struct { // // +optional // +listType=atomic + // +k8s:optional + // +k8s:maxItems=32 Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,1,opt,name=selectors"` // Config defines configuration parameters that apply to each device that is claimed via this class. @@ -1671,6 +1700,8 @@ type DeviceClassSpec struct { // // +optional // +listType=atomic + // +k8s:optional + // +k8s:maxItems=32 Config []DeviceClassConfiguration `json:"config,omitempty" protobuf:"bytes,2,opt,name=config"` // SuitableNodes is tombstoned since Kubernetes 1.32 where @@ -1791,7 +1822,7 @@ type AllocatedDeviceStatus struct { // needed on a node. // // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. + // vendor of the driver. It should use only lower case characters. // // +required Driver string `json:"driver" protobuf:"bytes,1,rep,name=driver"` @@ -1815,6 +1846,8 @@ type AllocatedDeviceStatus struct { // // +optional // +featureGate=DRAConsumableCapacity + // +k8s:optional + // +k8s:format=k8s-uuid ShareID *string `json:"shareID,omitempty" protobuf:"bytes,7,opt,name=shareID"` // Conditions contains the latest observation of the device's state. diff --git a/staging/src/k8s.io/api/resource/v1beta2/types_swagger_doc_generated.go b/staging/src/k8s.io/api/resource/v1beta2/types_swagger_doc_generated.go index c390ad21d96ad..1b2ac954b0a97 100644 --- a/staging/src/k8s.io/api/resource/v1beta2/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/resource/v1beta2/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v1beta2 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AllocatedDeviceStatus = map[string]string{ "": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.\n\nThe combination of Driver, Pool, Device, and ShareID must match the corresponding key in Status.Allocation.Devices.", - "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", "shareID": "ShareID uniquely identifies an individual allocation share of the device.", @@ -277,7 +277,7 @@ func (DeviceRequest) SwaggerDoc() map[string]string { var map_DeviceRequestAllocationResult = map[string]string{ "": "DeviceRequestAllocationResult contains the allocation result for one request.", "request": "Request is the name of the request in the claim which caused this device to be allocated. If it references a subrequest in the firstAvailable list on a DeviceRequest, this field must include both the name of the main request and the subrequest using the format
/.\n\nMultiple devices may have been allocated per request.", - "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", "adminAccess": "AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.", @@ -369,7 +369,7 @@ func (NetworkDeviceData) SwaggerDoc() map[string]string { var map_OpaqueDeviceConfiguration = map[string]string{ "": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", - "driver": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "driver": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters.", "parameters": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", } @@ -493,7 +493,7 @@ func (ResourceSliceList) SwaggerDoc() map[string]string { var map_ResourceSliceSpec = map[string]string{ "": "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.", - "driver": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + "driver": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. This field is immutable.", "pool": "Pool describes the pool that this ResourceSlice belongs to.", "nodeName": "NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.\n\nThis field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. This field is immutable.", "nodeSelector": "NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.\n\nMust use exactly one term.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.", diff --git a/staging/src/k8s.io/api/resource/v1beta2/zz_generated.model_name.go b/staging/src/k8s.io/api/resource/v1beta2/zz_generated.model_name.go new file mode 100644 index 0000000000000..0518ff73ce919 --- /dev/null +++ b/staging/src/k8s.io/api/resource/v1beta2/zz_generated.model_name.go @@ -0,0 +1,237 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta2 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AllocatedDeviceStatus) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.AllocatedDeviceStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in AllocationResult) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.AllocationResult" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CELDeviceSelector) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.CELDeviceSelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CapacityRequestPolicy) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.CapacityRequestPolicy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CapacityRequestPolicyRange) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.CapacityRequestPolicyRange" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CapacityRequirements) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.CapacityRequirements" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Counter) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.Counter" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CounterSet) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.CounterSet" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Device) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.Device" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceAllocationConfiguration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceAllocationConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceAllocationResult) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceAllocationResult" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceAttribute) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceAttribute" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceCapacity) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceCapacity" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClaim) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceClaim" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClaimConfiguration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceClaimConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClass) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClassConfiguration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceClassConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClassList) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceClassList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceClassSpec) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceClassSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceConfiguration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceConstraint) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceConstraint" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceCounterConsumption) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceCounterConsumption" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceRequest) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceRequestAllocationResult) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceRequestAllocationResult" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceSelector) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceSelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceSubRequest) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceSubRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceTaint) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceTaint" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeviceToleration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.DeviceToleration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExactDeviceRequest) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.ExactDeviceRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NetworkDeviceData) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.NetworkDeviceData" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in OpaqueDeviceConfiguration) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.OpaqueDeviceConfiguration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaim) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.ResourceClaim" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimConsumerReference) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.ResourceClaimConsumerReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimList) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.ResourceClaimList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimSpec) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.ResourceClaimSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimStatus) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.ResourceClaimStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimTemplate) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.ResourceClaimTemplate" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimTemplateList) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.ResourceClaimTemplateList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceClaimTemplateSpec) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.ResourceClaimTemplateSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourcePool) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.ResourcePool" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceSlice) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.ResourceSlice" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceSliceList) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.ResourceSliceList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ResourceSliceSpec) OpenAPIModelName() string { + return "io.k8s.api.resource.v1beta2.ResourceSliceSpec" +} diff --git a/staging/src/k8s.io/api/scheduling/v1/doc.go b/staging/src/k8s.io/api/scheduling/v1/doc.go index c587bee9ea53b..8fee2e90bb616 100644 --- a/staging/src/k8s.io/api/scheduling/v1/doc.go +++ b/staging/src/k8s.io/api/scheduling/v1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.scheduling.v1 + // +groupName=scheduling.k8s.io package v1 diff --git a/staging/src/k8s.io/api/scheduling/v1/generated.pb.go b/staging/src/k8s.io/api/scheduling/v1/generated.pb.go index 6fef1a9379abc..752e559eafb33 100644 --- a/staging/src/k8s.io/api/scheduling/v1/generated.pb.go +++ b/staging/src/k8s.io/api/scheduling/v1/generated.pb.go @@ -24,125 +24,16 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - k8s_io_api_core_v1 "k8s.io/api/core/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *PriorityClass) Reset() { *m = PriorityClass{} } -func (m *PriorityClass) Reset() { *m = PriorityClass{} } -func (*PriorityClass) ProtoMessage() {} -func (*PriorityClass) Descriptor() ([]byte, []int) { - return fileDescriptor_3f12bd05064e996e, []int{0} -} -func (m *PriorityClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityClass.Merge(m, src) -} -func (m *PriorityClass) XXX_Size() int { - return m.Size() -} -func (m *PriorityClass) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityClass.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityClass proto.InternalMessageInfo - -func (m *PriorityClassList) Reset() { *m = PriorityClassList{} } -func (*PriorityClassList) ProtoMessage() {} -func (*PriorityClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_3f12bd05064e996e, []int{1} -} -func (m *PriorityClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityClassList.Merge(m, src) -} -func (m *PriorityClassList) XXX_Size() int { - return m.Size() -} -func (m *PriorityClassList) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityClassList.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityClassList proto.InternalMessageInfo - -func init() { - proto.RegisterType((*PriorityClass)(nil), "k8s.io.api.scheduling.v1.PriorityClass") - proto.RegisterType((*PriorityClassList)(nil), "k8s.io.api.scheduling.v1.PriorityClassList") -} - -func init() { - proto.RegisterFile("k8s.io/api/scheduling/v1/generated.proto", fileDescriptor_3f12bd05064e996e) -} - -var fileDescriptor_3f12bd05064e996e = []byte{ - // 476 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x3f, 0x8f, 0xd3, 0x30, - 0x18, 0xc6, 0xe3, 0x1e, 0x91, 0x8a, 0xab, 0x4a, 0x25, 0x08, 0x29, 0xea, 0xe0, 0x46, 0xbd, 0x81, - 0x2c, 0xd8, 0xf4, 0x04, 0x08, 0xe9, 0x24, 0x86, 0x70, 0x12, 0x42, 0x3a, 0x44, 0x95, 0x81, 0x01, - 0x31, 0xe0, 0xa6, 0x3e, 0xd7, 0x34, 0x89, 0x23, 0xdb, 0xa9, 0xd4, 0x8d, 0x8f, 0xc0, 0x37, 0x62, - 0xed, 0x78, 0xe3, 0x4d, 0x15, 0x0d, 0x1f, 0x81, 0x8d, 0x09, 0x25, 0x2d, 0x97, 0xfe, 0xb9, 0x0a, - 0xb6, 0xbc, 0xef, 0xfb, 0xfc, 0x1e, 0xdb, 0x4f, 0x6c, 0xe8, 0x4f, 0x5f, 0x6a, 0x2c, 0x24, 0xa1, - 0x99, 0x20, 0x3a, 0x9a, 0xb0, 0x71, 0x1e, 0x8b, 0x94, 0x93, 0xd9, 0x80, 0x70, 0x96, 0x32, 0x45, - 0x0d, 0x1b, 0xe3, 0x4c, 0x49, 0x23, 0x1d, 0x77, 0xad, 0xc4, 0x34, 0x13, 0xb8, 0x56, 0xe2, 0xd9, - 0xa0, 0xfb, 0x84, 0x0b, 0x33, 0xc9, 0x47, 0x38, 0x92, 0x09, 0xe1, 0x92, 0x4b, 0x52, 0x01, 0xa3, - 0xfc, 0xaa, 0xaa, 0xaa, 0xa2, 0xfa, 0x5a, 0x1b, 0x75, 0xfb, 0x5b, 0x4b, 0x46, 0x52, 0xb1, 0x3b, - 0x16, 0xeb, 0x3e, 0xab, 0x35, 0x09, 0x8d, 0x26, 0x22, 0x65, 0x6a, 0x4e, 0xb2, 0x29, 0x2f, 0x1b, - 0x9a, 0x24, 0xcc, 0xd0, 0xbb, 0x28, 0x72, 0x8c, 0x52, 0x79, 0x6a, 0x44, 0xc2, 0x0e, 0x80, 0x17, - 0xff, 0x02, 0xca, 0x83, 0x26, 0x74, 0x9f, 0xeb, 0xff, 0x6a, 0xc0, 0xf6, 0x50, 0x09, 0xa9, 0x84, - 0x99, 0xbf, 0x8e, 0xa9, 0xd6, 0xce, 0x67, 0xd8, 0x2c, 0x77, 0x35, 0xa6, 0x86, 0xba, 0xc0, 0x03, - 0x7e, 0xeb, 0xec, 0x29, 0xae, 0x03, 0xbb, 0x35, 0xc7, 0xd9, 0x94, 0x97, 0x0d, 0x8d, 0x4b, 0x35, - 0x9e, 0x0d, 0xf0, 0xfb, 0xd1, 0x17, 0x16, 0x99, 0x77, 0xcc, 0xd0, 0xc0, 0x59, 0x2c, 0x7b, 0x56, - 0xb1, 0xec, 0xc1, 0xba, 0x17, 0xde, 0xba, 0x3a, 0xa7, 0xd0, 0x9e, 0xd1, 0x38, 0x67, 0x6e, 0xc3, - 0x03, 0xbe, 0x1d, 0xb4, 0x37, 0x62, 0xfb, 0x43, 0xd9, 0x0c, 0xd7, 0x33, 0xe7, 0x1c, 0xb6, 0x79, - 0x2c, 0x47, 0x34, 0xbe, 0x60, 0x57, 0x34, 0x8f, 0x8d, 0x7b, 0xe2, 0x01, 0xbf, 0x19, 0x3c, 0xda, - 0x88, 0xdb, 0x6f, 0xb6, 0x87, 0xe1, 0xae, 0xd6, 0x79, 0x0e, 0x5b, 0x63, 0xa6, 0x23, 0x25, 0x32, - 0x23, 0x64, 0xea, 0xde, 0xf3, 0x80, 0x7f, 0x3f, 0x78, 0xb8, 0x41, 0x5b, 0x17, 0xf5, 0x28, 0xdc, - 0xd6, 0x39, 0x1c, 0x76, 0x32, 0xc5, 0x58, 0x52, 0x55, 0x43, 0x19, 0x8b, 0x68, 0xee, 0xda, 0x15, - 0x7b, 0x5e, 0x2c, 0x7b, 0x9d, 0xe1, 0xde, 0xec, 0xf7, 0xb2, 0x77, 0x7a, 0x78, 0x03, 0xf0, 0xbe, - 0x2c, 0x3c, 0x30, 0xed, 0x7f, 0x07, 0xf0, 0xc1, 0x4e, 0xea, 0x97, 0x42, 0x1b, 0xe7, 0xd3, 0x41, - 0xf2, 0xf8, 0xff, 0x92, 0x2f, 0xe9, 0x2a, 0xf7, 0xce, 0xe6, 0x88, 0xcd, 0xbf, 0x9d, 0xad, 0xd4, - 0x2f, 0xa1, 0x2d, 0x0c, 0x4b, 0xb4, 0xdb, 0xf0, 0x4e, 0xfc, 0xd6, 0xd9, 0x63, 0x7c, 0xec, 0x15, - 0xe0, 0x9d, 0x9d, 0xd5, 0xbf, 0xe7, 0x6d, 0x49, 0x87, 0x6b, 0x93, 0xe0, 0xd5, 0x62, 0x85, 0xac, - 0xeb, 0x15, 0xb2, 0x6e, 0x56, 0xc8, 0xfa, 0x5a, 0x20, 0xb0, 0x28, 0x10, 0xb8, 0x2e, 0x10, 0xb8, - 0x29, 0x10, 0xf8, 0x51, 0x20, 0xf0, 0xed, 0x27, 0xb2, 0x3e, 0xba, 0xc7, 0xde, 0xe4, 0x9f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x9a, 0x3d, 0x5f, 0x2e, 0xae, 0x03, 0x00, 0x00, -} +func (m *PriorityClassList) Reset() { *m = PriorityClassList{} } func (m *PriorityClass) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/scheduling/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/scheduling/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..261d4903e7b25 --- /dev/null +++ b/staging/src/k8s.io/api/scheduling/v1/generated.protomessage.pb.go @@ -0,0 +1,26 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*PriorityClass) ProtoMessage() {} + +func (*PriorityClassList) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/scheduling/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/scheduling/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..a5cc1d1120e20 --- /dev/null +++ b/staging/src/k8s.io/api/scheduling/v1/zz_generated.model_name.go @@ -0,0 +1,32 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityClass) OpenAPIModelName() string { + return "io.k8s.api.scheduling.v1.PriorityClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityClassList) OpenAPIModelName() string { + return "io.k8s.api.scheduling.v1.PriorityClassList" +} diff --git a/staging/src/k8s.io/api/scheduling/v1alpha1/doc.go b/staging/src/k8s.io/api/scheduling/v1alpha1/doc.go index 476ab6f66c1ce..2b6182e86488f 100644 --- a/staging/src/k8s.io/api/scheduling/v1alpha1/doc.go +++ b/staging/src/k8s.io/api/scheduling/v1alpha1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:openapi-model-package=io.k8s.api.scheduling.v1alpha1 // +groupName=scheduling.k8s.io diff --git a/staging/src/k8s.io/api/scheduling/v1alpha1/generated.pb.go b/staging/src/k8s.io/api/scheduling/v1alpha1/generated.pb.go index 83e504b5a33a0..732a44169a97d 100644 --- a/staging/src/k8s.io/api/scheduling/v1alpha1/generated.pb.go +++ b/staging/src/k8s.io/api/scheduling/v1alpha1/generated.pb.go @@ -24,125 +24,16 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - k8s_io_api_core_v1 "k8s.io/api/core/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *PriorityClass) Reset() { *m = PriorityClass{} } -func (m *PriorityClass) Reset() { *m = PriorityClass{} } -func (*PriorityClass) ProtoMessage() {} -func (*PriorityClass) Descriptor() ([]byte, []int) { - return fileDescriptor_260442fbb28d876a, []int{0} -} -func (m *PriorityClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityClass.Merge(m, src) -} -func (m *PriorityClass) XXX_Size() int { - return m.Size() -} -func (m *PriorityClass) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityClass.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityClass proto.InternalMessageInfo - -func (m *PriorityClassList) Reset() { *m = PriorityClassList{} } -func (*PriorityClassList) ProtoMessage() {} -func (*PriorityClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_260442fbb28d876a, []int{1} -} -func (m *PriorityClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityClassList.Merge(m, src) -} -func (m *PriorityClassList) XXX_Size() int { - return m.Size() -} -func (m *PriorityClassList) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityClassList.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityClassList proto.InternalMessageInfo - -func init() { - proto.RegisterType((*PriorityClass)(nil), "k8s.io.api.scheduling.v1alpha1.PriorityClass") - proto.RegisterType((*PriorityClassList)(nil), "k8s.io.api.scheduling.v1alpha1.PriorityClassList") -} - -func init() { - proto.RegisterFile("k8s.io/api/scheduling/v1alpha1/generated.proto", fileDescriptor_260442fbb28d876a) -} - -var fileDescriptor_260442fbb28d876a = []byte{ - // 480 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x8f, 0xd3, 0x30, - 0x18, 0x86, 0xeb, 0x1e, 0x91, 0x8a, 0xab, 0x4a, 0x25, 0x08, 0x29, 0xea, 0xe0, 0x46, 0xbd, 0x25, - 0xcb, 0xd9, 0xf4, 0x04, 0x08, 0xe9, 0xb6, 0x50, 0x09, 0x21, 0x81, 0xa8, 0x32, 0x30, 0x20, 0x06, - 0xdc, 0xd4, 0xe7, 0x9a, 0x26, 0x71, 0x64, 0x3b, 0x95, 0xba, 0xf1, 0x13, 0xf8, 0x53, 0x48, 0x1d, - 0x6f, 0xbc, 0xa9, 0xa2, 0xe1, 0x27, 0xb0, 0x31, 0xa1, 0xa4, 0xbd, 0x4b, 0xdb, 0xc0, 0x71, 0x5b, - 0xbe, 0xef, 0x7b, 0xde, 0xd7, 0xf6, 0x1b, 0x1b, 0xe2, 0xf9, 0x4b, 0x8d, 0x85, 0x24, 0x34, 0x15, - 0x44, 0x87, 0x33, 0x36, 0xcd, 0x22, 0x91, 0x70, 0xb2, 0x18, 0xd2, 0x28, 0x9d, 0xd1, 0x21, 0xe1, - 0x2c, 0x61, 0x8a, 0x1a, 0x36, 0xc5, 0xa9, 0x92, 0x46, 0xda, 0x68, 0xcb, 0x63, 0x9a, 0x0a, 0x5c, - 0xf1, 0xf8, 0x86, 0xef, 0x9d, 0x71, 0x61, 0x66, 0xd9, 0x04, 0x87, 0x32, 0x26, 0x5c, 0x72, 0x49, - 0x4a, 0xd9, 0x24, 0xbb, 0x2c, 0xab, 0xb2, 0x28, 0xbf, 0xb6, 0x76, 0xbd, 0xc1, 0xde, 0xf2, 0xa1, - 0x54, 0x8c, 0x2c, 0x6a, 0x4b, 0xf6, 0x9e, 0x55, 0x4c, 0x4c, 0xc3, 0x99, 0x48, 0x98, 0x5a, 0x92, - 0x74, 0xce, 0x8b, 0x86, 0x26, 0x31, 0x33, 0xf4, 0x6f, 0x2a, 0xf2, 0x2f, 0x95, 0xca, 0x12, 0x23, - 0x62, 0x56, 0x13, 0xbc, 0xf8, 0x9f, 0xa0, 0x38, 0x6e, 0x4c, 0x8f, 0x75, 0x83, 0x5f, 0x4d, 0xd8, - 0x19, 0x2b, 0x21, 0x95, 0x30, 0xcb, 0x57, 0x11, 0xd5, 0xda, 0xfe, 0x0c, 0x5b, 0xc5, 0xae, 0xa6, - 0xd4, 0x50, 0x07, 0xb8, 0xc0, 0x6b, 0x9f, 0x3f, 0xc5, 0x55, 0x6c, 0xb7, 0xe6, 0x38, 0x9d, 0xf3, - 0xa2, 0xa1, 0x71, 0x41, 0xe3, 0xc5, 0x10, 0xbf, 0x9f, 0x7c, 0x61, 0xa1, 0x79, 0xc7, 0x0c, 0xf5, - 0xed, 0xd5, 0xba, 0xdf, 0xc8, 0xd7, 0x7d, 0x58, 0xf5, 0x82, 0x5b, 0x57, 0xfb, 0x14, 0x5a, 0x0b, - 0x1a, 0x65, 0xcc, 0x69, 0xba, 0xc0, 0xb3, 0xfc, 0xce, 0x0e, 0xb6, 0x3e, 0x14, 0xcd, 0x60, 0x3b, - 0xb3, 0x2f, 0x60, 0x87, 0x47, 0x72, 0x42, 0xa3, 0x11, 0xbb, 0xa4, 0x59, 0x64, 0x9c, 0x13, 0x17, - 0x78, 0x2d, 0xff, 0xc9, 0x0e, 0xee, 0xbc, 0xde, 0x1f, 0x06, 0x87, 0xac, 0xfd, 0x1c, 0xb6, 0xa7, - 0x4c, 0x87, 0x4a, 0xa4, 0x46, 0xc8, 0xc4, 0x79, 0xe0, 0x02, 0xef, 0xa1, 0xff, 0x78, 0x27, 0x6d, - 0x8f, 0xaa, 0x51, 0xb0, 0xcf, 0xd9, 0x1c, 0x76, 0x53, 0xc5, 0x58, 0x5c, 0x56, 0x63, 0x19, 0x89, - 0x70, 0xe9, 0x58, 0xa5, 0xf6, 0x22, 0x5f, 0xf7, 0xbb, 0xe3, 0xa3, 0xd9, 0xef, 0x75, 0xff, 0xb4, - 0x7e, 0x03, 0xf0, 0x31, 0x16, 0xd4, 0x4c, 0x07, 0xdf, 0x01, 0x7c, 0x74, 0x90, 0xfa, 0x5b, 0xa1, - 0x8d, 0xfd, 0xa9, 0x96, 0x3c, 0xbe, 0x5f, 0xf2, 0x85, 0xba, 0xcc, 0xbd, 0xbb, 0x3b, 0x62, 0xeb, - 0xa6, 0xb3, 0x97, 0x7a, 0x00, 0x2d, 0x61, 0x58, 0xac, 0x9d, 0xa6, 0x7b, 0xe2, 0xb5, 0xcf, 0xcf, - 0xf0, 0xdd, 0x6f, 0x01, 0x1f, 0xec, 0xaf, 0xfa, 0x49, 0x6f, 0x0a, 0x8f, 0x60, 0x6b, 0xe5, 0x8f, - 0x56, 0x1b, 0xd4, 0xb8, 0xda, 0xa0, 0xc6, 0xf5, 0x06, 0x35, 0xbe, 0xe6, 0x08, 0xac, 0x72, 0x04, - 0xae, 0x72, 0x04, 0xae, 0x73, 0x04, 0x7e, 0xe4, 0x08, 0x7c, 0xfb, 0x89, 0x1a, 0x1f, 0xd1, 0xdd, - 0xaf, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xfe, 0x45, 0x7e, 0xc6, 0x03, 0x00, 0x00, -} +func (m *PriorityClassList) Reset() { *m = PriorityClassList{} } func (m *PriorityClass) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/scheduling/v1alpha1/generated.protomessage.pb.go b/staging/src/k8s.io/api/scheduling/v1alpha1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..f4032ded72bde --- /dev/null +++ b/staging/src/k8s.io/api/scheduling/v1alpha1/generated.protomessage.pb.go @@ -0,0 +1,26 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1alpha1 + +func (*PriorityClass) ProtoMessage() {} + +func (*PriorityClassList) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/scheduling/v1alpha1/zz_generated.model_name.go b/staging/src/k8s.io/api/scheduling/v1alpha1/zz_generated.model_name.go new file mode 100644 index 0000000000000..6d25e255f4e15 --- /dev/null +++ b/staging/src/k8s.io/api/scheduling/v1alpha1/zz_generated.model_name.go @@ -0,0 +1,32 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1alpha1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityClass) OpenAPIModelName() string { + return "io.k8s.api.scheduling.v1alpha1.PriorityClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityClassList) OpenAPIModelName() string { + return "io.k8s.api.scheduling.v1alpha1.PriorityClassList" +} diff --git a/staging/src/k8s.io/api/scheduling/v1beta1/doc.go b/staging/src/k8s.io/api/scheduling/v1beta1/doc.go index 1bc3610611670..ef4bd57d5d12d 100644 --- a/staging/src/k8s.io/api/scheduling/v1beta1/doc.go +++ b/staging/src/k8s.io/api/scheduling/v1beta1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.scheduling.v1beta1 // +groupName=scheduling.k8s.io diff --git a/staging/src/k8s.io/api/scheduling/v1beta1/generated.pb.go b/staging/src/k8s.io/api/scheduling/v1beta1/generated.pb.go index 68e8e90d1d928..cd25ded4089f6 100644 --- a/staging/src/k8s.io/api/scheduling/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/scheduling/v1beta1/generated.pb.go @@ -24,126 +24,16 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - k8s_io_api_core_v1 "k8s.io/api/core/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *PriorityClass) Reset() { *m = PriorityClass{} } -func (m *PriorityClass) Reset() { *m = PriorityClass{} } -func (*PriorityClass) ProtoMessage() {} -func (*PriorityClass) Descriptor() ([]byte, []int) { - return fileDescriptor_9edc3acf997efcf2, []int{0} -} -func (m *PriorityClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityClass.Merge(m, src) -} -func (m *PriorityClass) XXX_Size() int { - return m.Size() -} -func (m *PriorityClass) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityClass.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityClass proto.InternalMessageInfo - -func (m *PriorityClassList) Reset() { *m = PriorityClassList{} } -func (*PriorityClassList) ProtoMessage() {} -func (*PriorityClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_9edc3acf997efcf2, []int{1} -} -func (m *PriorityClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PriorityClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PriorityClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PriorityClassList.Merge(m, src) -} -func (m *PriorityClassList) XXX_Size() int { - return m.Size() -} -func (m *PriorityClassList) XXX_DiscardUnknown() { - xxx_messageInfo_PriorityClassList.DiscardUnknown(m) -} - -var xxx_messageInfo_PriorityClassList proto.InternalMessageInfo - -func init() { - proto.RegisterType((*PriorityClass)(nil), "k8s.io.api.scheduling.v1beta1.PriorityClass") - proto.RegisterType((*PriorityClassList)(nil), "k8s.io.api.scheduling.v1beta1.PriorityClassList") -} - -func init() { - proto.RegisterFile("k8s.io/api/scheduling/v1beta1/generated.proto", fileDescriptor_9edc3acf997efcf2) -} - -var fileDescriptor_9edc3acf997efcf2 = []byte{ - // 481 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x8f, 0xd3, 0x30, - 0x18, 0x86, 0xe3, 0x1e, 0x91, 0x8a, 0xab, 0x4a, 0x25, 0x08, 0x29, 0xaa, 0x74, 0x69, 0xd4, 0x5b, - 0x32, 0x70, 0x36, 0x3d, 0x01, 0x42, 0xba, 0x2d, 0x77, 0x12, 0x42, 0x02, 0x51, 0x32, 0x30, 0x20, - 0x06, 0x9c, 0xd4, 0x97, 0x9a, 0x26, 0x71, 0x64, 0x3b, 0x95, 0xba, 0xf1, 0x13, 0xf8, 0x51, 0x0c, - 0x1d, 0x6f, 0xbc, 0xa9, 0xa2, 0xe1, 0x27, 0xb0, 0x31, 0xa1, 0xa4, 0xe1, 0xd2, 0x36, 0x50, 0x6e, - 0xcb, 0xf7, 0x7d, 0xcf, 0xfb, 0xda, 0x7e, 0x63, 0xc3, 0xd3, 0xd9, 0x0b, 0x89, 0x18, 0xc7, 0x24, - 0x65, 0x58, 0x06, 0x53, 0x3a, 0xc9, 0x22, 0x96, 0x84, 0x78, 0x3e, 0xf2, 0xa9, 0x22, 0x23, 0x1c, - 0xd2, 0x84, 0x0a, 0xa2, 0xe8, 0x04, 0xa5, 0x82, 0x2b, 0x6e, 0x1c, 0x6f, 0x70, 0x44, 0x52, 0x86, - 0x6a, 0x1c, 0x55, 0x78, 0xff, 0x34, 0x64, 0x6a, 0x9a, 0xf9, 0x28, 0xe0, 0x31, 0x0e, 0x79, 0xc8, - 0x71, 0xa9, 0xf2, 0xb3, 0xab, 0xb2, 0x2a, 0x8b, 0xf2, 0x6b, 0xe3, 0xd6, 0x1f, 0x6e, 0x2d, 0x1e, - 0x70, 0x41, 0xf1, 0xbc, 0xb1, 0x62, 0xff, 0x69, 0xcd, 0xc4, 0x24, 0x98, 0xb2, 0x84, 0x8a, 0x05, - 0x4e, 0x67, 0x61, 0xd1, 0x90, 0x38, 0xa6, 0x8a, 0xfc, 0x4d, 0x85, 0xff, 0xa5, 0x12, 0x59, 0xa2, - 0x58, 0x4c, 0x1b, 0x82, 0xe7, 0xff, 0x13, 0x14, 0xa7, 0x8d, 0xc9, 0xbe, 0x6e, 0xf8, 0xb3, 0x05, - 0xbb, 0x63, 0xc1, 0xb8, 0x60, 0x6a, 0x71, 0x11, 0x11, 0x29, 0x8d, 0x4f, 0xb0, 0x5d, 0xec, 0x6a, - 0x42, 0x14, 0x31, 0x81, 0x0d, 0x9c, 0xce, 0xd9, 0x13, 0x54, 0xa7, 0x76, 0x6b, 0x8e, 0xd2, 0x59, - 0x58, 0x34, 0x24, 0x2a, 0x68, 0x34, 0x1f, 0xa1, 0xb7, 0xfe, 0x67, 0x1a, 0xa8, 0x37, 0x54, 0x11, - 0xd7, 0x58, 0xae, 0x06, 0x5a, 0xbe, 0x1a, 0xc0, 0xba, 0xe7, 0xdd, 0xba, 0x1a, 0x27, 0x50, 0x9f, - 0x93, 0x28, 0xa3, 0x66, 0xcb, 0x06, 0x8e, 0xee, 0x76, 0x2b, 0x58, 0x7f, 0x5f, 0x34, 0xbd, 0xcd, - 0xcc, 0x38, 0x87, 0xdd, 0x30, 0xe2, 0x3e, 0x89, 0x2e, 0xe9, 0x15, 0xc9, 0x22, 0x65, 0x1e, 0xd9, - 0xc0, 0x69, 0xbb, 0x8f, 0x2a, 0xb8, 0xfb, 0x72, 0x7b, 0xe8, 0xed, 0xb2, 0xc6, 0x33, 0xd8, 0x99, - 0x50, 0x19, 0x08, 0x96, 0x2a, 0xc6, 0x13, 0xf3, 0x9e, 0x0d, 0x9c, 0xfb, 0xee, 0xc3, 0x4a, 0xda, - 0xb9, 0xac, 0x47, 0xde, 0x36, 0x67, 0x84, 0xb0, 0x97, 0x0a, 0x4a, 0xe3, 0xb2, 0x1a, 0xf3, 0x88, - 0x05, 0x0b, 0x53, 0x2f, 0xb5, 0xe7, 0xf9, 0x6a, 0xd0, 0x1b, 0xef, 0xcd, 0x7e, 0xad, 0x06, 0x27, - 0xcd, 0x1b, 0x80, 0xf6, 0x31, 0xaf, 0x61, 0x3a, 0xfc, 0x06, 0xe0, 0x83, 0x9d, 0xd4, 0x5f, 0x33, - 0xa9, 0x8c, 0x8f, 0x8d, 0xe4, 0xd1, 0xdd, 0x92, 0x2f, 0xd4, 0x65, 0xee, 0xbd, 0xea, 0x88, 0xed, - 0x3f, 0x9d, 0xad, 0xd4, 0xdf, 0x41, 0x9d, 0x29, 0x1a, 0x4b, 0xb3, 0x65, 0x1f, 0x39, 0x9d, 0xb3, - 0xc7, 0xe8, 0xe0, 0x53, 0x40, 0x3b, 0xdb, 0xab, 0xff, 0xd1, 0xab, 0xc2, 0xc2, 0xdb, 0x38, 0xb9, - 0x17, 0xcb, 0xb5, 0xa5, 0x5d, 0xaf, 0x2d, 0xed, 0x66, 0x6d, 0x69, 0x5f, 0x72, 0x0b, 0x2c, 0x73, - 0x0b, 0x5c, 0xe7, 0x16, 0xb8, 0xc9, 0x2d, 0xf0, 0x3d, 0xb7, 0xc0, 0xd7, 0x1f, 0x96, 0xf6, 0xe1, - 0xf8, 0xe0, 0x13, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x04, 0x2e, 0xb0, 0xce, 0xc2, 0x03, 0x00, - 0x00, -} +func (m *PriorityClassList) Reset() { *m = PriorityClassList{} } func (m *PriorityClass) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/scheduling/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/scheduling/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..0c7339ae79ea1 --- /dev/null +++ b/staging/src/k8s.io/api/scheduling/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,26 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*PriorityClass) ProtoMessage() {} + +func (*PriorityClassList) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/scheduling/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/scheduling/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..16f40100cc24b --- /dev/null +++ b/staging/src/k8s.io/api/scheduling/v1beta1/zz_generated.model_name.go @@ -0,0 +1,32 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityClass) OpenAPIModelName() string { + return "io.k8s.api.scheduling.v1beta1.PriorityClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PriorityClassList) OpenAPIModelName() string { + return "io.k8s.api.scheduling.v1beta1.PriorityClassList" +} diff --git a/staging/src/k8s.io/api/storage/v1/doc.go b/staging/src/k8s.io/api/storage/v1/doc.go index 162a99522e59b..d344f997e0ee0 100644 --- a/staging/src/k8s.io/api/storage/v1/doc.go +++ b/staging/src/k8s.io/api/storage/v1/doc.go @@ -19,5 +19,6 @@ limitations under the License. // +groupName=storage.k8s.io // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.storage.v1 package v1 diff --git a/staging/src/k8s.io/api/storage/v1/generated.pb.go b/staging/src/k8s.io/api/storage/v1/generated.pb.go index 2b7aea92c5acb..a02d0a4a44493 100644 --- a/staging/src/k8s.io/api/storage/v1/generated.pb.go +++ b/staging/src/k8s.io/api/storage/v1/generated.pb.go @@ -23,765 +23,59 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" k8s_io_api_core_v1 "k8s.io/api/core/v1" v11 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *CSIDriver) Reset() { *m = CSIDriver{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *CSIDriverList) Reset() { *m = CSIDriverList{} } -func (m *CSIDriver) Reset() { *m = CSIDriver{} } -func (*CSIDriver) ProtoMessage() {} -func (*CSIDriver) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{0} -} -func (m *CSIDriver) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIDriver) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIDriver) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIDriver.Merge(m, src) -} -func (m *CSIDriver) XXX_Size() int { - return m.Size() -} -func (m *CSIDriver) XXX_DiscardUnknown() { - xxx_messageInfo_CSIDriver.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIDriver proto.InternalMessageInfo - -func (m *CSIDriverList) Reset() { *m = CSIDriverList{} } -func (*CSIDriverList) ProtoMessage() {} -func (*CSIDriverList) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{1} -} -func (m *CSIDriverList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIDriverList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIDriverList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIDriverList.Merge(m, src) -} -func (m *CSIDriverList) XXX_Size() int { - return m.Size() -} -func (m *CSIDriverList) XXX_DiscardUnknown() { - xxx_messageInfo_CSIDriverList.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIDriverList proto.InternalMessageInfo - -func (m *CSIDriverSpec) Reset() { *m = CSIDriverSpec{} } -func (*CSIDriverSpec) ProtoMessage() {} -func (*CSIDriverSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{2} -} -func (m *CSIDriverSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIDriverSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIDriverSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIDriverSpec.Merge(m, src) -} -func (m *CSIDriverSpec) XXX_Size() int { - return m.Size() -} -func (m *CSIDriverSpec) XXX_DiscardUnknown() { - xxx_messageInfo_CSIDriverSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIDriverSpec proto.InternalMessageInfo - -func (m *CSINode) Reset() { *m = CSINode{} } -func (*CSINode) ProtoMessage() {} -func (*CSINode) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{3} -} -func (m *CSINode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSINode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSINode) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSINode.Merge(m, src) -} -func (m *CSINode) XXX_Size() int { - return m.Size() -} -func (m *CSINode) XXX_DiscardUnknown() { - xxx_messageInfo_CSINode.DiscardUnknown(m) -} - -var xxx_messageInfo_CSINode proto.InternalMessageInfo - -func (m *CSINodeDriver) Reset() { *m = CSINodeDriver{} } -func (*CSINodeDriver) ProtoMessage() {} -func (*CSINodeDriver) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{4} -} -func (m *CSINodeDriver) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSINodeDriver) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSINodeDriver) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSINodeDriver.Merge(m, src) -} -func (m *CSINodeDriver) XXX_Size() int { - return m.Size() -} -func (m *CSINodeDriver) XXX_DiscardUnknown() { - xxx_messageInfo_CSINodeDriver.DiscardUnknown(m) -} - -var xxx_messageInfo_CSINodeDriver proto.InternalMessageInfo - -func (m *CSINodeList) Reset() { *m = CSINodeList{} } -func (*CSINodeList) ProtoMessage() {} -func (*CSINodeList) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{5} -} -func (m *CSINodeList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSINodeList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSINodeList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSINodeList.Merge(m, src) -} -func (m *CSINodeList) XXX_Size() int { - return m.Size() -} -func (m *CSINodeList) XXX_DiscardUnknown() { - xxx_messageInfo_CSINodeList.DiscardUnknown(m) -} - -var xxx_messageInfo_CSINodeList proto.InternalMessageInfo - -func (m *CSINodeSpec) Reset() { *m = CSINodeSpec{} } -func (*CSINodeSpec) ProtoMessage() {} -func (*CSINodeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{6} -} -func (m *CSINodeSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSINodeSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSINodeSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSINodeSpec.Merge(m, src) -} -func (m *CSINodeSpec) XXX_Size() int { - return m.Size() -} -func (m *CSINodeSpec) XXX_DiscardUnknown() { - xxx_messageInfo_CSINodeSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_CSINodeSpec proto.InternalMessageInfo - -func (m *CSIStorageCapacity) Reset() { *m = CSIStorageCapacity{} } -func (*CSIStorageCapacity) ProtoMessage() {} -func (*CSIStorageCapacity) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{7} -} -func (m *CSIStorageCapacity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIStorageCapacity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIStorageCapacity) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIStorageCapacity.Merge(m, src) -} -func (m *CSIStorageCapacity) XXX_Size() int { - return m.Size() -} -func (m *CSIStorageCapacity) XXX_DiscardUnknown() { - xxx_messageInfo_CSIStorageCapacity.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIStorageCapacity proto.InternalMessageInfo - -func (m *CSIStorageCapacityList) Reset() { *m = CSIStorageCapacityList{} } -func (*CSIStorageCapacityList) ProtoMessage() {} -func (*CSIStorageCapacityList) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{8} -} -func (m *CSIStorageCapacityList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIStorageCapacityList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIStorageCapacityList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIStorageCapacityList.Merge(m, src) -} -func (m *CSIStorageCapacityList) XXX_Size() int { - return m.Size() -} -func (m *CSIStorageCapacityList) XXX_DiscardUnknown() { - xxx_messageInfo_CSIStorageCapacityList.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIStorageCapacityList proto.InternalMessageInfo - -func (m *StorageClass) Reset() { *m = StorageClass{} } -func (*StorageClass) ProtoMessage() {} -func (*StorageClass) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{9} -} -func (m *StorageClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StorageClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageClass.Merge(m, src) -} -func (m *StorageClass) XXX_Size() int { - return m.Size() -} -func (m *StorageClass) XXX_DiscardUnknown() { - xxx_messageInfo_StorageClass.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageClass proto.InternalMessageInfo - -func (m *StorageClassList) Reset() { *m = StorageClassList{} } -func (*StorageClassList) ProtoMessage() {} -func (*StorageClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{10} -} -func (m *StorageClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StorageClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageClassList.Merge(m, src) -} -func (m *StorageClassList) XXX_Size() int { - return m.Size() -} -func (m *StorageClassList) XXX_DiscardUnknown() { - xxx_messageInfo_StorageClassList.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageClassList proto.InternalMessageInfo - -func (m *TokenRequest) Reset() { *m = TokenRequest{} } -func (*TokenRequest) ProtoMessage() {} -func (*TokenRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{11} -} -func (m *TokenRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TokenRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenRequest.Merge(m, src) -} -func (m *TokenRequest) XXX_Size() int { - return m.Size() -} -func (m *TokenRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TokenRequest.DiscardUnknown(m) -} +func (m *CSIDriverSpec) Reset() { *m = CSIDriverSpec{} } -var xxx_messageInfo_TokenRequest proto.InternalMessageInfo +func (m *CSINode) Reset() { *m = CSINode{} } -func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } -func (*VolumeAttachment) ProtoMessage() {} -func (*VolumeAttachment) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{12} -} -func (m *VolumeAttachment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttachment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttachment) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttachment.Merge(m, src) -} -func (m *VolumeAttachment) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttachment) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttachment.DiscardUnknown(m) -} +func (m *CSINodeDriver) Reset() { *m = CSINodeDriver{} } -var xxx_messageInfo_VolumeAttachment proto.InternalMessageInfo +func (m *CSINodeList) Reset() { *m = CSINodeList{} } -func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } -func (*VolumeAttachmentList) ProtoMessage() {} -func (*VolumeAttachmentList) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{13} -} -func (m *VolumeAttachmentList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttachmentList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttachmentList) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttachmentList.Merge(m, src) -} -func (m *VolumeAttachmentList) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttachmentList) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttachmentList.DiscardUnknown(m) -} +func (m *CSINodeSpec) Reset() { *m = CSINodeSpec{} } -var xxx_messageInfo_VolumeAttachmentList proto.InternalMessageInfo +func (m *CSIStorageCapacity) Reset() { *m = CSIStorageCapacity{} } -func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } -func (*VolumeAttachmentSource) ProtoMessage() {} -func (*VolumeAttachmentSource) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{14} -} -func (m *VolumeAttachmentSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttachmentSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttachmentSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttachmentSource.Merge(m, src) -} -func (m *VolumeAttachmentSource) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttachmentSource) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttachmentSource.DiscardUnknown(m) -} +func (m *CSIStorageCapacityList) Reset() { *m = CSIStorageCapacityList{} } -var xxx_messageInfo_VolumeAttachmentSource proto.InternalMessageInfo +func (m *StorageClass) Reset() { *m = StorageClass{} } -func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } -func (*VolumeAttachmentSpec) ProtoMessage() {} -func (*VolumeAttachmentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{15} -} -func (m *VolumeAttachmentSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttachmentSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttachmentSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttachmentSpec.Merge(m, src) -} -func (m *VolumeAttachmentSpec) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttachmentSpec) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttachmentSpec.DiscardUnknown(m) -} +func (m *StorageClassList) Reset() { *m = StorageClassList{} } -var xxx_messageInfo_VolumeAttachmentSpec proto.InternalMessageInfo +func (m *TokenRequest) Reset() { *m = TokenRequest{} } -func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } -func (*VolumeAttachmentStatus) ProtoMessage() {} -func (*VolumeAttachmentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{16} -} -func (m *VolumeAttachmentStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttachmentStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttachmentStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttachmentStatus.Merge(m, src) -} -func (m *VolumeAttachmentStatus) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttachmentStatus) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttachmentStatus.DiscardUnknown(m) -} +func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } -var xxx_messageInfo_VolumeAttachmentStatus proto.InternalMessageInfo +func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } -func (m *VolumeAttributesClass) Reset() { *m = VolumeAttributesClass{} } -func (*VolumeAttributesClass) ProtoMessage() {} -func (*VolumeAttributesClass) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{17} -} -func (m *VolumeAttributesClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttributesClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttributesClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttributesClass.Merge(m, src) -} -func (m *VolumeAttributesClass) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttributesClass) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttributesClass.DiscardUnknown(m) -} +func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } -var xxx_messageInfo_VolumeAttributesClass proto.InternalMessageInfo +func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } -func (m *VolumeAttributesClassList) Reset() { *m = VolumeAttributesClassList{} } -func (*VolumeAttributesClassList) ProtoMessage() {} -func (*VolumeAttributesClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{18} -} -func (m *VolumeAttributesClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttributesClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttributesClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttributesClassList.Merge(m, src) -} -func (m *VolumeAttributesClassList) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttributesClassList) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttributesClassList.DiscardUnknown(m) -} +func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } -var xxx_messageInfo_VolumeAttributesClassList proto.InternalMessageInfo +func (m *VolumeAttributesClass) Reset() { *m = VolumeAttributesClass{} } -func (m *VolumeError) Reset() { *m = VolumeError{} } -func (*VolumeError) ProtoMessage() {} -func (*VolumeError) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{19} -} -func (m *VolumeError) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeError) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeError.Merge(m, src) -} -func (m *VolumeError) XXX_Size() int { - return m.Size() -} -func (m *VolumeError) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeError.DiscardUnknown(m) -} +func (m *VolumeAttributesClassList) Reset() { *m = VolumeAttributesClassList{} } -var xxx_messageInfo_VolumeError proto.InternalMessageInfo +func (m *VolumeError) Reset() { *m = VolumeError{} } -func (m *VolumeNodeResources) Reset() { *m = VolumeNodeResources{} } -func (*VolumeNodeResources) ProtoMessage() {} -func (*VolumeNodeResources) Descriptor() ([]byte, []int) { - return fileDescriptor_662262cc70094b41, []int{20} -} -func (m *VolumeNodeResources) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeNodeResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeNodeResources) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeNodeResources.Merge(m, src) -} -func (m *VolumeNodeResources) XXX_Size() int { - return m.Size() -} -func (m *VolumeNodeResources) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeNodeResources.DiscardUnknown(m) -} - -var xxx_messageInfo_VolumeNodeResources proto.InternalMessageInfo - -func init() { - proto.RegisterType((*CSIDriver)(nil), "k8s.io.api.storage.v1.CSIDriver") - proto.RegisterType((*CSIDriverList)(nil), "k8s.io.api.storage.v1.CSIDriverList") - proto.RegisterType((*CSIDriverSpec)(nil), "k8s.io.api.storage.v1.CSIDriverSpec") - proto.RegisterType((*CSINode)(nil), "k8s.io.api.storage.v1.CSINode") - proto.RegisterType((*CSINodeDriver)(nil), "k8s.io.api.storage.v1.CSINodeDriver") - proto.RegisterType((*CSINodeList)(nil), "k8s.io.api.storage.v1.CSINodeList") - proto.RegisterType((*CSINodeSpec)(nil), "k8s.io.api.storage.v1.CSINodeSpec") - proto.RegisterType((*CSIStorageCapacity)(nil), "k8s.io.api.storage.v1.CSIStorageCapacity") - proto.RegisterType((*CSIStorageCapacityList)(nil), "k8s.io.api.storage.v1.CSIStorageCapacityList") - proto.RegisterType((*StorageClass)(nil), "k8s.io.api.storage.v1.StorageClass") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.storage.v1.StorageClass.ParametersEntry") - proto.RegisterType((*StorageClassList)(nil), "k8s.io.api.storage.v1.StorageClassList") - proto.RegisterType((*TokenRequest)(nil), "k8s.io.api.storage.v1.TokenRequest") - proto.RegisterType((*VolumeAttachment)(nil), "k8s.io.api.storage.v1.VolumeAttachment") - proto.RegisterType((*VolumeAttachmentList)(nil), "k8s.io.api.storage.v1.VolumeAttachmentList") - proto.RegisterType((*VolumeAttachmentSource)(nil), "k8s.io.api.storage.v1.VolumeAttachmentSource") - proto.RegisterType((*VolumeAttachmentSpec)(nil), "k8s.io.api.storage.v1.VolumeAttachmentSpec") - proto.RegisterType((*VolumeAttachmentStatus)(nil), "k8s.io.api.storage.v1.VolumeAttachmentStatus") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.storage.v1.VolumeAttachmentStatus.AttachmentMetadataEntry") - proto.RegisterType((*VolumeAttributesClass)(nil), "k8s.io.api.storage.v1.VolumeAttributesClass") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.storage.v1.VolumeAttributesClass.ParametersEntry") - proto.RegisterType((*VolumeAttributesClassList)(nil), "k8s.io.api.storage.v1.VolumeAttributesClassList") - proto.RegisterType((*VolumeError)(nil), "k8s.io.api.storage.v1.VolumeError") - proto.RegisterType((*VolumeNodeResources)(nil), "k8s.io.api.storage.v1.VolumeNodeResources") -} - -func init() { - proto.RegisterFile("k8s.io/api/storage/v1/generated.proto", fileDescriptor_662262cc70094b41) -} - -var fileDescriptor_662262cc70094b41 = []byte{ - // 1782 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0x4b, 0x73, 0x2b, 0x47, - 0x15, 0xf6, 0x58, 0x96, 0x6d, 0xb5, 0xac, 0x6b, 0xbb, 0xaf, 0x1d, 0x26, 0x5e, 0x48, 0xae, 0x49, - 0x08, 0xce, 0x6b, 0x94, 0xeb, 0x84, 0x54, 0x2a, 0x90, 0x85, 0x47, 0x56, 0x88, 0x0b, 0xcb, 0xd7, - 0x69, 0x39, 0xa9, 0x14, 0x05, 0x54, 0xda, 0x33, 0x6d, 0xb9, 0x63, 0xcd, 0x23, 0xd3, 0x3d, 0xc2, - 0x62, 0x05, 0x3f, 0x80, 0x2a, 0xd8, 0xf2, 0x2b, 0xa0, 0x80, 0x0d, 0x4b, 0x16, 0xd4, 0x85, 0x62, - 0x91, 0x62, 0x95, 0x95, 0x8a, 0x2b, 0xd6, 0xb0, 0x64, 0xe1, 0x15, 0xd5, 0x3d, 0xa3, 0x79, 0x69, - 0xe4, 0x47, 0xa5, 0x4a, 0x3b, 0xf7, 0x79, 0x7c, 0x7d, 0xba, 0xcf, 0x39, 0x5f, 0x1f, 0x8d, 0xc1, - 0xb7, 0xaf, 0xde, 0x63, 0x3a, 0x75, 0x9b, 0xd8, 0xa3, 0x4d, 0xc6, 0x5d, 0x1f, 0xf7, 0x48, 0x73, - 0xf0, 0xa4, 0xd9, 0x23, 0x0e, 0xf1, 0x31, 0x27, 0x96, 0xee, 0xf9, 0x2e, 0x77, 0xe1, 0x76, 0x68, - 0xa6, 0x63, 0x8f, 0xea, 0x91, 0x99, 0x3e, 0x78, 0xb2, 0xf3, 0x66, 0x8f, 0xf2, 0xcb, 0xe0, 0x5c, - 0x37, 0x5d, 0xbb, 0xd9, 0x73, 0x7b, 0x6e, 0x53, 0x5a, 0x9f, 0x07, 0x17, 0x72, 0x25, 0x17, 0xf2, - 0xaf, 0x10, 0x65, 0x47, 0x4b, 0x6d, 0x66, 0xba, 0x7e, 0xd1, 0x4e, 0x3b, 0xef, 0x24, 0x36, 0x36, - 0x36, 0x2f, 0xa9, 0x43, 0xfc, 0x61, 0xd3, 0xbb, 0xea, 0x49, 0x27, 0x9f, 0x30, 0x37, 0xf0, 0x4d, - 0xf2, 0x20, 0x2f, 0xd6, 0xb4, 0x09, 0xc7, 0x45, 0x7b, 0x35, 0x67, 0x79, 0xf9, 0x81, 0xc3, 0xa9, - 0x3d, 0xbd, 0xcd, 0xbb, 0x77, 0x39, 0x30, 0xf3, 0x92, 0xd8, 0x38, 0xef, 0xa7, 0xfd, 0x49, 0x01, - 0x95, 0x56, 0xf7, 0xe8, 0xd0, 0xa7, 0x03, 0xe2, 0xc3, 0xcf, 0xc1, 0xaa, 0x88, 0xc8, 0xc2, 0x1c, - 0xab, 0xca, 0xae, 0xb2, 0x57, 0xdd, 0x7f, 0x4b, 0x4f, 0xee, 0x37, 0x06, 0xd6, 0xbd, 0xab, 0x9e, - 0x10, 0x30, 0x5d, 0x58, 0xeb, 0x83, 0x27, 0xfa, 0xd3, 0xf3, 0x2f, 0x88, 0xc9, 0x3b, 0x84, 0x63, - 0x03, 0x3e, 0x1b, 0x35, 0x16, 0xc6, 0xa3, 0x06, 0x48, 0x64, 0x28, 0x46, 0x85, 0x1f, 0x82, 0x25, - 0xe6, 0x11, 0x53, 0x5d, 0x94, 0xe8, 0x2f, 0xeb, 0x85, 0xd9, 0xd3, 0xe3, 0x88, 0xba, 0x1e, 0x31, - 0x8d, 0xb5, 0x08, 0x71, 0x49, 0xac, 0x90, 0xf4, 0xd7, 0xfe, 0xa8, 0x80, 0x5a, 0x6c, 0x75, 0x4c, - 0x19, 0x87, 0x3f, 0x9e, 0x8a, 0x5d, 0xbf, 0x5f, 0xec, 0xc2, 0x5b, 0x46, 0xbe, 0x11, 0xed, 0xb3, - 0x3a, 0x91, 0xa4, 0xe2, 0x6e, 0x83, 0x32, 0xe5, 0xc4, 0x66, 0xea, 0xe2, 0x6e, 0x69, 0xaf, 0xba, - 0xbf, 0x7b, 0x57, 0xe0, 0x46, 0x2d, 0x02, 0x2b, 0x1f, 0x09, 0x37, 0x14, 0x7a, 0x6b, 0x7f, 0x2f, - 0xa7, 0xc2, 0x16, 0xc7, 0x81, 0xef, 0x83, 0x47, 0x98, 0x73, 0x6c, 0x5e, 0x22, 0xf2, 0x65, 0x40, - 0x7d, 0x62, 0xc9, 0xe0, 0x57, 0x0d, 0x38, 0x1e, 0x35, 0x1e, 0x1d, 0x64, 0x34, 0x28, 0x67, 0x29, - 0x7c, 0x3d, 0xd7, 0x3a, 0x72, 0x2e, 0xdc, 0xa7, 0x4e, 0xc7, 0x0d, 0x1c, 0x2e, 0xaf, 0x35, 0xf2, - 0x3d, 0xcd, 0x68, 0x50, 0xce, 0x12, 0x9a, 0x60, 0x6b, 0xe0, 0xf6, 0x03, 0x9b, 0x1c, 0xd3, 0x0b, - 0x62, 0x0e, 0xcd, 0x3e, 0xe9, 0xb8, 0x16, 0x61, 0x6a, 0x69, 0xb7, 0xb4, 0x57, 0x31, 0x9a, 0xe3, - 0x51, 0x63, 0xeb, 0xd3, 0x02, 0xfd, 0xcd, 0xa8, 0xf1, 0xb8, 0x40, 0x8e, 0x0a, 0xc1, 0xe0, 0x07, - 0x60, 0x3d, 0xba, 0x9c, 0x16, 0xf6, 0xb0, 0x49, 0xf9, 0x50, 0x5d, 0x92, 0x11, 0x3e, 0x1e, 0x8f, - 0x1a, 0xeb, 0xdd, 0xac, 0x0a, 0xe5, 0x6d, 0xe1, 0x47, 0xa0, 0x76, 0xc1, 0x7e, 0xe0, 0xbb, 0x81, - 0x77, 0xea, 0xf6, 0xa9, 0x39, 0x54, 0xcb, 0xbb, 0xca, 0x5e, 0xc5, 0xd0, 0xc6, 0xa3, 0x46, 0xed, - 0xc3, 0x6e, 0x4a, 0x71, 0x93, 0x17, 0xa0, 0xac, 0x23, 0xfc, 0x1c, 0xd4, 0xb8, 0x7b, 0x45, 0x1c, - 0x71, 0x75, 0x84, 0x71, 0xa6, 0x2e, 0xcb, 0x34, 0xbe, 0x34, 0x23, 0x8d, 0x67, 0x29, 0x5b, 0x63, - 0x3b, 0xca, 0x64, 0x2d, 0x2d, 0x65, 0x28, 0x0b, 0x08, 0x5b, 0x60, 0xd3, 0x0f, 0xf3, 0xc2, 0x10, - 0xf1, 0x82, 0xf3, 0x3e, 0x65, 0x97, 0xea, 0x8a, 0x3c, 0xec, 0xf6, 0x78, 0xd4, 0xd8, 0x44, 0x79, - 0x25, 0x9a, 0xb6, 0x87, 0xef, 0x80, 0x35, 0x46, 0x8e, 0xa9, 0x13, 0x5c, 0x87, 0xe9, 0x5c, 0x95, - 0xfe, 0x1b, 0xe3, 0x51, 0x63, 0xad, 0xdb, 0x4e, 0xe4, 0x28, 0x63, 0x05, 0x07, 0x40, 0x73, 0x5c, - 0x8b, 0x1c, 0xf4, 0xfb, 0xae, 0x89, 0x39, 0x3e, 0xef, 0x93, 0x4f, 0x3c, 0x0b, 0x73, 0x72, 0x4a, - 0x7c, 0xea, 0x5a, 0x5d, 0x62, 0xba, 0x8e, 0xc5, 0xd4, 0xca, 0xae, 0xb2, 0x57, 0x32, 0x5e, 0x19, - 0x8f, 0x1a, 0xda, 0xc9, 0x9d, 0xd6, 0xe8, 0x1e, 0x88, 0xda, 0xef, 0x15, 0xb0, 0xd2, 0xea, 0x1e, - 0x09, 0xb4, 0x39, 0x30, 0xc7, 0x61, 0x86, 0x39, 0xb4, 0xd9, 0x0d, 0x28, 0xe2, 0x99, 0xc9, 0x1b, - 0xff, 0x0d, 0x79, 0x43, 0xd8, 0x44, 0x9c, 0xb7, 0x0b, 0x96, 0x1c, 0x6c, 0x13, 0x19, 0x75, 0x25, - 0xf1, 0x39, 0xc1, 0x36, 0x41, 0x52, 0x03, 0x5f, 0x01, 0xcb, 0xe2, 0x36, 0x8e, 0x0e, 0xe5, 0xde, - 0x15, 0xe3, 0x51, 0x64, 0xb3, 0x7c, 0x22, 0xa5, 0x28, 0xd2, 0x8a, 0xec, 0x71, 0xd7, 0x73, 0xfb, - 0x6e, 0x6f, 0xf8, 0x43, 0x32, 0x9c, 0xb4, 0x92, 0xcc, 0xde, 0x59, 0x4a, 0x8e, 0x32, 0x56, 0xf0, - 0x27, 0xa0, 0x8a, 0x93, 0x7b, 0x96, 0xfd, 0x51, 0xdd, 0x7f, 0x6d, 0xc6, 0xf1, 0xc2, 0xd6, 0x13, - 0xfb, 0xa2, 0xe8, 0xc1, 0x61, 0xc6, 0xfa, 0x78, 0xd4, 0xa8, 0xa6, 0x52, 0x85, 0xd2, 0x78, 0xda, - 0xef, 0x14, 0x50, 0x8d, 0x0e, 0x3c, 0x07, 0x9a, 0x6c, 0x65, 0x69, 0xb2, 0x7e, 0x7b, 0x96, 0x66, - 0x90, 0xe4, 0x4f, 0xe3, 0x88, 0x25, 0x43, 0x3e, 0x05, 0x2b, 0x96, 0x4c, 0x15, 0x53, 0x15, 0x89, - 0xfa, 0xf2, 0xed, 0xa8, 0x11, 0x01, 0xaf, 0x47, 0xd8, 0x2b, 0xe1, 0x9a, 0xa1, 0x09, 0x8a, 0xf6, - 0xbf, 0x12, 0x80, 0xad, 0xee, 0x51, 0x8e, 0x7e, 0xe6, 0x50, 0xc2, 0x14, 0xac, 0x89, 0x52, 0x99, - 0x14, 0x43, 0x54, 0xca, 0x6f, 0xdf, 0xf3, 0xfe, 0xf1, 0x39, 0xe9, 0x77, 0x49, 0x9f, 0x98, 0xdc, - 0xf5, 0xc3, 0xaa, 0x3a, 0x49, 0x81, 0xa1, 0x0c, 0x34, 0x3c, 0x04, 0x1b, 0x13, 0x36, 0xed, 0x63, - 0xc6, 0x44, 0x35, 0xab, 0x25, 0x59, 0xbd, 0x6a, 0x14, 0xe2, 0x46, 0x37, 0xa7, 0x47, 0x53, 0x1e, - 0xf0, 0x33, 0xb0, 0x6a, 0xa6, 0x89, 0xfb, 0x8e, 0x62, 0xd1, 0x27, 0x53, 0x90, 0xfe, 0x71, 0x80, - 0x1d, 0x4e, 0xf9, 0xd0, 0x58, 0x13, 0x85, 0x12, 0x33, 0x7c, 0x8c, 0x06, 0x19, 0xd8, 0xb4, 0xf1, - 0x35, 0xb5, 0x03, 0x3b, 0x2c, 0xe9, 0x2e, 0xfd, 0x39, 0x91, 0xf4, 0xfe, 0xf0, 0x2d, 0x24, 0xbd, - 0x76, 0xf2, 0x60, 0x68, 0x1a, 0x5f, 0xfb, 0xab, 0x02, 0x5e, 0x98, 0x4e, 0xfc, 0x1c, 0xda, 0xe2, - 0x24, 0xdb, 0x16, 0xaf, 0xce, 0x2e, 0xe0, 0x5c, 0x6c, 0x33, 0x3a, 0xe4, 0x57, 0xcb, 0x60, 0x2d, - 0x9d, 0xbe, 0x39, 0xd4, 0xee, 0x77, 0x41, 0xd5, 0xf3, 0xdd, 0x01, 0x65, 0xd4, 0x75, 0x88, 0x1f, - 0x31, 0xe1, 0xe3, 0xc8, 0xa5, 0x7a, 0x9a, 0xa8, 0x50, 0xda, 0x0e, 0xf6, 0x00, 0xf0, 0xb0, 0x8f, - 0x6d, 0xc2, 0x45, 0xff, 0x96, 0xe4, 0xf1, 0xdf, 0x9e, 0x71, 0xfc, 0xf4, 0x89, 0xf4, 0xd3, 0xd8, - 0xab, 0xed, 0x70, 0x7f, 0x98, 0x44, 0x97, 0x28, 0x50, 0x0a, 0x1a, 0x5e, 0x81, 0x9a, 0x4f, 0xcc, - 0x3e, 0xa6, 0x76, 0x34, 0x2b, 0x2c, 0xc9, 0x08, 0xdb, 0xe2, 0xe1, 0x46, 0x69, 0xc5, 0xcd, 0xa8, - 0xf1, 0xd6, 0xf4, 0xb4, 0xaf, 0x9f, 0x12, 0x9f, 0x51, 0xc6, 0x89, 0xc3, 0xc3, 0x82, 0xc9, 0xf8, - 0xa0, 0x2c, 0xb6, 0x60, 0x7a, 0x5b, 0x3c, 0xbd, 0x4f, 0x3d, 0x4e, 0x5d, 0x87, 0xa9, 0xe5, 0x84, - 0xe9, 0x3b, 0x29, 0x39, 0xca, 0x58, 0xc1, 0x63, 0xb0, 0x25, 0x98, 0xf9, 0x67, 0xe1, 0x06, 0xed, - 0x6b, 0x0f, 0x3b, 0xe2, 0x96, 0xd4, 0x65, 0xf9, 0xca, 0xab, 0x62, 0xe4, 0x3a, 0x28, 0xd0, 0xa3, - 0x42, 0x2f, 0xf8, 0x19, 0xd8, 0x0c, 0x67, 0x2e, 0x83, 0x3a, 0x16, 0x75, 0x7a, 0x62, 0xe2, 0x92, - 0x03, 0x47, 0xc5, 0x78, 0x4d, 0x74, 0xc4, 0xa7, 0x79, 0xe5, 0x4d, 0x91, 0x10, 0x4d, 0x83, 0xc0, - 0x2f, 0xc1, 0xa6, 0xdc, 0x91, 0x58, 0x11, 0x9d, 0x50, 0xc2, 0xd4, 0x55, 0x99, 0xba, 0xbd, 0x74, - 0xea, 0xc4, 0xd5, 0x85, 0xd3, 0x52, 0x48, 0x3a, 0x13, 0x72, 0x3a, 0x23, 0xbe, 0x6d, 0xbc, 0x18, - 0xe5, 0x6b, 0xf3, 0x20, 0x0f, 0x85, 0xa6, 0xd1, 0x77, 0x3e, 0x00, 0xeb, 0xb9, 0x84, 0xc3, 0x0d, - 0x50, 0xba, 0x22, 0xc3, 0xf0, 0x59, 0x46, 0xe2, 0x4f, 0xb8, 0x05, 0xca, 0x03, 0xdc, 0x0f, 0x48, - 0x58, 0x7c, 0x28, 0x5c, 0xbc, 0xbf, 0xf8, 0x9e, 0xa2, 0xfd, 0x59, 0x01, 0x19, 0x3a, 0x9b, 0x43, - 0x4b, 0x7f, 0x94, 0x6d, 0xe9, 0x97, 0xee, 0x51, 0xd3, 0x33, 0x9a, 0xf9, 0x97, 0x0a, 0x58, 0x4b, - 0x8f, 0x96, 0xf0, 0x0d, 0xb0, 0x8a, 0x03, 0x8b, 0x12, 0xc7, 0x9c, 0x4c, 0x25, 0x71, 0x20, 0x07, - 0x91, 0x1c, 0xc5, 0x16, 0x62, 0xf0, 0x24, 0xd7, 0x1e, 0xf5, 0xb1, 0x28, 0xb2, 0xc9, 0xb0, 0xb7, - 0x28, 0x87, 0x3d, 0xc9, 0x8c, 0xed, 0xbc, 0x12, 0x4d, 0xdb, 0x6b, 0xbf, 0x5d, 0x04, 0x1b, 0x61, - 0x6d, 0x84, 0x3f, 0x39, 0x6c, 0xe2, 0xf0, 0x39, 0x90, 0x4a, 0x27, 0x33, 0xd3, 0xbd, 0x7e, 0xeb, - 0xd0, 0x93, 0x04, 0x36, 0x6b, 0xb8, 0x83, 0x9f, 0x80, 0x65, 0xc6, 0x31, 0x0f, 0x98, 0x7c, 0xea, - 0xaa, 0xfb, 0x6f, 0xde, 0x17, 0x50, 0x3a, 0x25, 0x73, 0x5d, 0xb8, 0x46, 0x11, 0x98, 0xf6, 0x17, - 0x05, 0x6c, 0xe5, 0x5d, 0xe6, 0x50, 0x61, 0xc7, 0xd9, 0x0a, 0xfb, 0xce, 0x3d, 0x0f, 0x33, 0xa3, - 0xca, 0xfe, 0xa9, 0x80, 0x17, 0xa6, 0xce, 0x2d, 0x5f, 0x52, 0xc1, 0x4b, 0x5e, 0x8e, 0xfd, 0x4e, - 0x92, 0x89, 0x58, 0xf2, 0xd2, 0x69, 0x81, 0x1e, 0x15, 0x7a, 0xc1, 0x2f, 0xc0, 0x06, 0x75, 0xfa, - 0xd4, 0x21, 0xd1, 0xc3, 0x9b, 0xe4, 0xb7, 0x90, 0x3c, 0xf2, 0xc8, 0x32, 0xb9, 0x5b, 0x62, 0x3e, - 0x39, 0xca, 0xa1, 0xa0, 0x29, 0x5c, 0xed, 0x6f, 0x05, 0x99, 0x91, 0x33, 0xa3, 0x68, 0x21, 0x29, - 0x21, 0xfe, 0x54, 0x0b, 0x45, 0x72, 0x14, 0x5b, 0xc8, 0xba, 0x91, 0x57, 0x11, 0x05, 0x7a, 0xef, - 0xba, 0x91, 0x4e, 0xa9, 0xba, 0x91, 0x6b, 0x14, 0x81, 0x89, 0x20, 0xc4, 0x4c, 0x96, 0x9a, 0xbd, - 0xe2, 0x20, 0x4e, 0x22, 0x39, 0x8a, 0x2d, 0xb4, 0xff, 0x94, 0x0a, 0x12, 0x24, 0x0b, 0x30, 0x75, - 0x9a, 0xc9, 0xd7, 0x81, 0xfc, 0x69, 0xac, 0xf8, 0x34, 0x16, 0xfc, 0x8d, 0x02, 0x20, 0x8e, 0x21, - 0x3a, 0x93, 0x02, 0x0d, 0xab, 0xa8, 0xfd, 0xa0, 0x96, 0xd0, 0x0f, 0xa6, 0x70, 0xc2, 0xd7, 0x78, - 0x27, 0xda, 0x1f, 0x4e, 0x1b, 0xa0, 0x82, 0xcd, 0xa1, 0x05, 0xaa, 0xa1, 0xb4, 0xed, 0xfb, 0xae, - 0x1f, 0xb5, 0xa7, 0x76, 0x6b, 0x2c, 0xd2, 0xd2, 0xa8, 0xcb, 0x1f, 0x37, 0x89, 0xeb, 0xcd, 0xa8, - 0x51, 0x4d, 0xe9, 0x51, 0x1a, 0x56, 0xec, 0x62, 0x91, 0x64, 0x97, 0xa5, 0x87, 0xed, 0x72, 0x48, - 0x66, 0xef, 0x92, 0x82, 0xdd, 0x69, 0x83, 0x6f, 0xcd, 0xb8, 0x96, 0x07, 0xbd, 0x59, 0xa3, 0x45, - 0xb0, 0x1d, 0xdf, 0xba, 0x4f, 0xcf, 0x03, 0x4e, 0xd8, 0xbc, 0x86, 0xb9, 0x7d, 0x00, 0xc2, 0x1f, - 0x43, 0xb2, 0x36, 0xc3, 0x59, 0x2e, 0xf6, 0x38, 0x8c, 0x35, 0x28, 0x65, 0x05, 0xbd, 0x82, 0x49, - 0xee, 0xfb, 0x77, 0x55, 0x53, 0xfa, 0x5c, 0x0f, 0x1d, 0xe9, 0xbe, 0xe9, 0x50, 0xf0, 0x0f, 0x05, - 0xbc, 0x58, 0x18, 0xc8, 0x1c, 0xb8, 0xfb, 0xe3, 0x2c, 0x77, 0xbf, 0xf1, 0x90, 0x7b, 0x9a, 0x41, - 0xe0, 0x7f, 0x50, 0x40, 0xba, 0x26, 0xe1, 0x31, 0x58, 0xe2, 0x34, 0x62, 0xe9, 0xec, 0x07, 0x83, - 0x5b, 0x82, 0x3f, 0xa3, 0x36, 0x49, 0x9e, 0x4e, 0xb1, 0x42, 0x12, 0x05, 0xbe, 0x0a, 0x56, 0x6c, - 0xc2, 0x18, 0xee, 0x4d, 0xca, 0x21, 0xfe, 0xf9, 0xdc, 0x09, 0xc5, 0x68, 0xa2, 0x87, 0xaf, 0x83, - 0x0a, 0x11, 0x11, 0xb4, 0xc4, 0xc0, 0x29, 0x3a, 0xb9, 0x6c, 0xd4, 0xc6, 0xa3, 0x46, 0xa5, 0x3d, - 0x11, 0xa2, 0x44, 0xaf, 0xbd, 0x0b, 0x1e, 0x17, 0x7c, 0xb3, 0x80, 0x0d, 0x50, 0x36, 0xe5, 0x17, - 0x2e, 0x45, 0xfa, 0x57, 0xc4, 0x69, 0x5b, 0xf2, 0xd3, 0x56, 0x28, 0x37, 0xbe, 0xf7, 0xec, 0x79, - 0x7d, 0xe1, 0xab, 0xe7, 0xf5, 0x85, 0xaf, 0x9f, 0xd7, 0x17, 0x7e, 0x31, 0xae, 0x2b, 0xcf, 0xc6, - 0x75, 0xe5, 0xab, 0x71, 0x5d, 0xf9, 0x7a, 0x5c, 0x57, 0xfe, 0x35, 0xae, 0x2b, 0xbf, 0xfe, 0x77, - 0x7d, 0xe1, 0x47, 0xdb, 0x85, 0xff, 0x23, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0a, 0xc6, - 0x28, 0xb1, 0x3b, 0x18, 0x00, 0x00, -} +func (m *VolumeNodeResources) Reset() { *m = VolumeNodeResources{} } func (m *CSIDriver) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -1355,7 +649,7 @@ func (m *StorageClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Parameters { keysForParameters = append(keysForParameters, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForParameters) + sort.Strings(keysForParameters) for iNdEx := len(keysForParameters) - 1; iNdEx >= 0; iNdEx-- { v := m.Parameters[string(keysForParameters[iNdEx])] baseI := i @@ -1706,7 +1000,7 @@ func (m *VolumeAttachmentStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) for k := range m.AttachmentMetadata { keysForAttachmentMetadata = append(keysForAttachmentMetadata, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata) + sort.Strings(keysForAttachmentMetadata) for iNdEx := len(keysForAttachmentMetadata) - 1; iNdEx >= 0; iNdEx-- { v := m.AttachmentMetadata[string(keysForAttachmentMetadata[iNdEx])] baseI := i @@ -1761,7 +1055,7 @@ func (m *VolumeAttributesClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Parameters { keysForParameters = append(keysForParameters, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForParameters) + sort.Strings(keysForParameters) for iNdEx := len(keysForParameters) - 1; iNdEx >= 0; iNdEx-- { v := m.Parameters[string(keysForParameters[iNdEx])] baseI := i @@ -2495,7 +1789,7 @@ func (this *StorageClass) String() string { for k := range this.Parameters { keysForParameters = append(keysForParameters, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForParameters) + sort.Strings(keysForParameters) mapStringForParameters := "map[string]string{" for _, k := range keysForParameters { mapStringForParameters += fmt.Sprintf("%v: %v,", k, this.Parameters[k]) @@ -2600,7 +1894,7 @@ func (this *VolumeAttachmentStatus) String() string { for k := range this.AttachmentMetadata { keysForAttachmentMetadata = append(keysForAttachmentMetadata, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata) + sort.Strings(keysForAttachmentMetadata) mapStringForAttachmentMetadata := "map[string]string{" for _, k := range keysForAttachmentMetadata { mapStringForAttachmentMetadata += fmt.Sprintf("%v: %v,", k, this.AttachmentMetadata[k]) @@ -2623,7 +1917,7 @@ func (this *VolumeAttributesClass) String() string { for k := range this.Parameters { keysForParameters = append(keysForParameters, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForParameters) + sort.Strings(keysForParameters) mapStringForParameters := "map[string]string{" for _, k := range keysForParameters { mapStringForParameters += fmt.Sprintf("%v: %v,", k, this.Parameters[k]) diff --git a/staging/src/k8s.io/api/storage/v1/generated.protomessage.pb.go b/staging/src/k8s.io/api/storage/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..370206042254e --- /dev/null +++ b/staging/src/k8s.io/api/storage/v1/generated.protomessage.pb.go @@ -0,0 +1,64 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*CSIDriver) ProtoMessage() {} + +func (*CSIDriverList) ProtoMessage() {} + +func (*CSIDriverSpec) ProtoMessage() {} + +func (*CSINode) ProtoMessage() {} + +func (*CSINodeDriver) ProtoMessage() {} + +func (*CSINodeList) ProtoMessage() {} + +func (*CSINodeSpec) ProtoMessage() {} + +func (*CSIStorageCapacity) ProtoMessage() {} + +func (*CSIStorageCapacityList) ProtoMessage() {} + +func (*StorageClass) ProtoMessage() {} + +func (*StorageClassList) ProtoMessage() {} + +func (*TokenRequest) ProtoMessage() {} + +func (*VolumeAttachment) ProtoMessage() {} + +func (*VolumeAttachmentList) ProtoMessage() {} + +func (*VolumeAttachmentSource) ProtoMessage() {} + +func (*VolumeAttachmentSpec) ProtoMessage() {} + +func (*VolumeAttachmentStatus) ProtoMessage() {} + +func (*VolumeAttributesClass) ProtoMessage() {} + +func (*VolumeAttributesClassList) ProtoMessage() {} + +func (*VolumeError) ProtoMessage() {} + +func (*VolumeNodeResources) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/storage/v1/zz_generated.model_name.go b/staging/src/k8s.io/api/storage/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..6ef6371006673 --- /dev/null +++ b/staging/src/k8s.io/api/storage/v1/zz_generated.model_name.go @@ -0,0 +1,127 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSIDriver) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.CSIDriver" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSIDriverList) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.CSIDriverList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSIDriverSpec) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.CSIDriverSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSINode) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.CSINode" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSINodeDriver) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.CSINodeDriver" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSINodeList) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.CSINodeList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSINodeSpec) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.CSINodeSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSIStorageCapacity) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.CSIStorageCapacity" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSIStorageCapacityList) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.CSIStorageCapacityList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StorageClass) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.StorageClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StorageClassList) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.StorageClassList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TokenRequest) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.TokenRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttachment) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.VolumeAttachment" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttachmentList) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.VolumeAttachmentList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttachmentSource) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.VolumeAttachmentSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttachmentSpec) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.VolumeAttachmentSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttachmentStatus) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.VolumeAttachmentStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttributesClass) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.VolumeAttributesClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttributesClassList) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.VolumeAttributesClassList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeError) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.VolumeError" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeNodeResources) OpenAPIModelName() string { + return "io.k8s.api.storage.v1.VolumeNodeResources" +} diff --git a/staging/src/k8s.io/api/storage/v1alpha1/doc.go b/staging/src/k8s.io/api/storage/v1alpha1/doc.go index 90af522ade321..18f9c9c3a2f39 100644 --- a/staging/src/k8s.io/api/storage/v1alpha1/doc.go +++ b/staging/src/k8s.io/api/storage/v1alpha1/doc.go @@ -19,5 +19,6 @@ limitations under the License. // +groupName=storage.k8s.io // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.storage.v1alpha1 package v1alpha1 diff --git a/staging/src/k8s.io/api/storage/v1alpha1/generated.pb.go b/staging/src/k8s.io/api/storage/v1alpha1/generated.pb.go index c0a2f36aafc74..ffcb6b5ae49c0 100644 --- a/staging/src/k8s.io/api/storage/v1alpha1/generated.pb.go +++ b/staging/src/k8s.io/api/storage/v1alpha1/generated.pb.go @@ -23,397 +23,36 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v11 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *CSIStorageCapacity) Reset() { *m = CSIStorageCapacity{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *CSIStorageCapacityList) Reset() { *m = CSIStorageCapacityList{} } -func (m *CSIStorageCapacity) Reset() { *m = CSIStorageCapacity{} } -func (*CSIStorageCapacity) ProtoMessage() {} -func (*CSIStorageCapacity) Descriptor() ([]byte, []int) { - return fileDescriptor_02e7952e43280c27, []int{0} -} -func (m *CSIStorageCapacity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIStorageCapacity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIStorageCapacity) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIStorageCapacity.Merge(m, src) -} -func (m *CSIStorageCapacity) XXX_Size() int { - return m.Size() -} -func (m *CSIStorageCapacity) XXX_DiscardUnknown() { - xxx_messageInfo_CSIStorageCapacity.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIStorageCapacity proto.InternalMessageInfo - -func (m *CSIStorageCapacityList) Reset() { *m = CSIStorageCapacityList{} } -func (*CSIStorageCapacityList) ProtoMessage() {} -func (*CSIStorageCapacityList) Descriptor() ([]byte, []int) { - return fileDescriptor_02e7952e43280c27, []int{1} -} -func (m *CSIStorageCapacityList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIStorageCapacityList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIStorageCapacityList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIStorageCapacityList.Merge(m, src) -} -func (m *CSIStorageCapacityList) XXX_Size() int { - return m.Size() -} -func (m *CSIStorageCapacityList) XXX_DiscardUnknown() { - xxx_messageInfo_CSIStorageCapacityList.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIStorageCapacityList proto.InternalMessageInfo - -func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } -func (*VolumeAttachment) ProtoMessage() {} -func (*VolumeAttachment) Descriptor() ([]byte, []int) { - return fileDescriptor_02e7952e43280c27, []int{2} -} -func (m *VolumeAttachment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttachment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttachment) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttachment.Merge(m, src) -} -func (m *VolumeAttachment) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttachment) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttachment.DiscardUnknown(m) -} - -var xxx_messageInfo_VolumeAttachment proto.InternalMessageInfo - -func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } -func (*VolumeAttachmentList) ProtoMessage() {} -func (*VolumeAttachmentList) Descriptor() ([]byte, []int) { - return fileDescriptor_02e7952e43280c27, []int{3} -} -func (m *VolumeAttachmentList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttachmentList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttachmentList) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttachmentList.Merge(m, src) -} -func (m *VolumeAttachmentList) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttachmentList) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttachmentList.DiscardUnknown(m) -} - -var xxx_messageInfo_VolumeAttachmentList proto.InternalMessageInfo - -func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } -func (*VolumeAttachmentSource) ProtoMessage() {} -func (*VolumeAttachmentSource) Descriptor() ([]byte, []int) { - return fileDescriptor_02e7952e43280c27, []int{4} -} -func (m *VolumeAttachmentSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttachmentSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttachmentSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttachmentSource.Merge(m, src) -} -func (m *VolumeAttachmentSource) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttachmentSource) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttachmentSource.DiscardUnknown(m) -} +func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } -var xxx_messageInfo_VolumeAttachmentSource proto.InternalMessageInfo +func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } -func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } -func (*VolumeAttachmentSpec) ProtoMessage() {} -func (*VolumeAttachmentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_02e7952e43280c27, []int{5} -} -func (m *VolumeAttachmentSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttachmentSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttachmentSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttachmentSpec.Merge(m, src) -} -func (m *VolumeAttachmentSpec) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttachmentSpec) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttachmentSpec.DiscardUnknown(m) -} +func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } -var xxx_messageInfo_VolumeAttachmentSpec proto.InternalMessageInfo +func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } -func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } -func (*VolumeAttachmentStatus) ProtoMessage() {} -func (*VolumeAttachmentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_02e7952e43280c27, []int{6} -} -func (m *VolumeAttachmentStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttachmentStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttachmentStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttachmentStatus.Merge(m, src) -} -func (m *VolumeAttachmentStatus) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttachmentStatus) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttachmentStatus.DiscardUnknown(m) -} +func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } -var xxx_messageInfo_VolumeAttachmentStatus proto.InternalMessageInfo +func (m *VolumeAttributesClass) Reset() { *m = VolumeAttributesClass{} } -func (m *VolumeAttributesClass) Reset() { *m = VolumeAttributesClass{} } -func (*VolumeAttributesClass) ProtoMessage() {} -func (*VolumeAttributesClass) Descriptor() ([]byte, []int) { - return fileDescriptor_02e7952e43280c27, []int{7} -} -func (m *VolumeAttributesClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttributesClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttributesClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttributesClass.Merge(m, src) -} -func (m *VolumeAttributesClass) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttributesClass) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttributesClass.DiscardUnknown(m) -} - -var xxx_messageInfo_VolumeAttributesClass proto.InternalMessageInfo - -func (m *VolumeAttributesClassList) Reset() { *m = VolumeAttributesClassList{} } -func (*VolumeAttributesClassList) ProtoMessage() {} -func (*VolumeAttributesClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_02e7952e43280c27, []int{8} -} -func (m *VolumeAttributesClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttributesClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttributesClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttributesClassList.Merge(m, src) -} -func (m *VolumeAttributesClassList) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttributesClassList) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttributesClassList.DiscardUnknown(m) -} - -var xxx_messageInfo_VolumeAttributesClassList proto.InternalMessageInfo +func (m *VolumeAttributesClassList) Reset() { *m = VolumeAttributesClassList{} } -func (m *VolumeError) Reset() { *m = VolumeError{} } -func (*VolumeError) ProtoMessage() {} -func (*VolumeError) Descriptor() ([]byte, []int) { - return fileDescriptor_02e7952e43280c27, []int{9} -} -func (m *VolumeError) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeError) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeError.Merge(m, src) -} -func (m *VolumeError) XXX_Size() int { - return m.Size() -} -func (m *VolumeError) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeError.DiscardUnknown(m) -} - -var xxx_messageInfo_VolumeError proto.InternalMessageInfo - -func init() { - proto.RegisterType((*CSIStorageCapacity)(nil), "k8s.io.api.storage.v1alpha1.CSIStorageCapacity") - proto.RegisterType((*CSIStorageCapacityList)(nil), "k8s.io.api.storage.v1alpha1.CSIStorageCapacityList") - proto.RegisterType((*VolumeAttachment)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttachment") - proto.RegisterType((*VolumeAttachmentList)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttachmentList") - proto.RegisterType((*VolumeAttachmentSource)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttachmentSource") - proto.RegisterType((*VolumeAttachmentSpec)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttachmentSpec") - proto.RegisterType((*VolumeAttachmentStatus)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttachmentStatus") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttachmentStatus.AttachmentMetadataEntry") - proto.RegisterType((*VolumeAttributesClass)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttributesClass") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttributesClass.ParametersEntry") - proto.RegisterType((*VolumeAttributesClassList)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttributesClassList") - proto.RegisterType((*VolumeError)(nil), "k8s.io.api.storage.v1alpha1.VolumeError") -} - -func init() { - proto.RegisterFile("k8s.io/api/storage/v1alpha1/generated.proto", fileDescriptor_02e7952e43280c27) -} - -var fileDescriptor_02e7952e43280c27 = []byte{ - // 1031 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xce, 0xfa, 0xa3, 0x75, 0xc6, 0x29, 0x75, 0x47, 0x6e, 0x31, 0xae, 0xb4, 0xae, 0x7c, 0x32, - 0x94, 0xee, 0x92, 0x80, 0x50, 0x85, 0xc4, 0xc1, 0x9b, 0xe4, 0x10, 0x91, 0x84, 0x32, 0x8e, 0x00, - 0x01, 0x07, 0xc6, 0xeb, 0xc1, 0x9e, 0xc4, 0xfb, 0xa1, 0x99, 0x59, 0x0b, 0x73, 0xe2, 0x27, 0x70, - 0xe3, 0x1f, 0xf0, 0x07, 0xf8, 0x13, 0x39, 0x20, 0x51, 0xf5, 0xd4, 0x93, 0x45, 0x16, 0x7e, 0x03, - 0x07, 0x2e, 0xa0, 0x9d, 0x1d, 0xef, 0x6e, 0xbc, 0x76, 0x70, 0x72, 0xc8, 0xcd, 0xf3, 0x7e, 0x3c, - 0xef, 0xd7, 0xf3, 0xbe, 0x9b, 0x80, 0xa7, 0x67, 0xcf, 0xb9, 0x41, 0x3d, 0x13, 0xfb, 0xd4, 0xe4, - 0xc2, 0x63, 0x78, 0x48, 0xcc, 0xc9, 0x36, 0x1e, 0xfb, 0x23, 0xbc, 0x6d, 0x0e, 0x89, 0x4b, 0x18, - 0x16, 0x64, 0x60, 0xf8, 0xcc, 0x13, 0x1e, 0x7c, 0x1c, 0x1b, 0x1b, 0xd8, 0xa7, 0x86, 0x32, 0x36, - 0xe6, 0xc6, 0xcd, 0x67, 0x43, 0x2a, 0x46, 0x41, 0xdf, 0xb0, 0x3d, 0xc7, 0x1c, 0x7a, 0x43, 0xcf, - 0x94, 0x3e, 0xfd, 0xe0, 0x3b, 0xf9, 0x92, 0x0f, 0xf9, 0x2b, 0xc6, 0x6a, 0xb6, 0x33, 0x81, 0x6d, - 0x8f, 0x45, 0x51, 0x17, 0xe3, 0x35, 0x3f, 0x48, 0x6d, 0x1c, 0x6c, 0x8f, 0xa8, 0x4b, 0xd8, 0xd4, - 0xf4, 0xcf, 0x86, 0xd2, 0x89, 0x11, 0xee, 0x05, 0xcc, 0x26, 0xd7, 0xf2, 0xe2, 0xa6, 0x43, 0x04, - 0x5e, 0x16, 0xcb, 0x5c, 0xe5, 0xc5, 0x02, 0x57, 0x50, 0x27, 0x1f, 0xe6, 0xc3, 0xff, 0x73, 0xe0, - 0xf6, 0x88, 0x38, 0x78, 0xd1, 0xaf, 0xfd, 0x77, 0x11, 0xc0, 0xdd, 0xde, 0x41, 0x2f, 0xee, 0xdf, - 0x2e, 0xf6, 0xb1, 0x4d, 0xc5, 0x14, 0x7e, 0x0b, 0x2a, 0x51, 0x6a, 0x03, 0x2c, 0x70, 0x43, 0x7b, - 0xa2, 0x75, 0xaa, 0x3b, 0xef, 0x19, 0x69, 0xbb, 0x93, 0x08, 0x86, 0x7f, 0x36, 0x8c, 0x04, 0xdc, - 0x88, 0xac, 0x8d, 0xc9, 0xb6, 0xf1, 0x69, 0xff, 0x94, 0xd8, 0xe2, 0x88, 0x08, 0x6c, 0xc1, 0xf3, - 0x59, 0x6b, 0x23, 0x9c, 0xb5, 0x40, 0x2a, 0x43, 0x09, 0x2a, 0xa4, 0x60, 0xcb, 0xf5, 0x06, 0xe4, - 0xc4, 0xf3, 0xbd, 0xb1, 0x37, 0x9c, 0x36, 0x0a, 0x32, 0xca, 0xfb, 0xeb, 0x45, 0x39, 0xc4, 0x7d, - 0x32, 0xee, 0x91, 0x31, 0xb1, 0x85, 0xc7, 0xac, 0x5a, 0x38, 0x6b, 0x6d, 0x1d, 0x67, 0xc0, 0xd0, - 0x25, 0x68, 0xb8, 0x07, 0x6a, 0x8a, 0x1f, 0xbb, 0x63, 0xcc, 0xf9, 0x31, 0x76, 0x48, 0xa3, 0xf8, - 0x44, 0xeb, 0x6c, 0x5a, 0x0d, 0x95, 0x62, 0xad, 0xb7, 0xa0, 0x47, 0x39, 0x0f, 0xf8, 0x25, 0xa8, - 0xd8, 0xaa, 0x3d, 0x8d, 0x92, 0x4c, 0xd6, 0xb8, 0x2a, 0x59, 0x63, 0xce, 0x08, 0xe3, 0xb3, 0x00, - 0xbb, 0x82, 0x8a, 0xa9, 0xb5, 0x15, 0xce, 0x5a, 0x95, 0x79, 0x8b, 0x51, 0x82, 0x06, 0x39, 0x78, - 0xe0, 0xe0, 0xef, 0xa9, 0x13, 0x38, 0x9f, 0x7b, 0xe3, 0xc0, 0x21, 0x3d, 0xfa, 0x03, 0x69, 0x94, - 0x6f, 0x14, 0xe2, 0x61, 0x38, 0x6b, 0x3d, 0x38, 0x5a, 0x04, 0x43, 0x79, 0xfc, 0xf6, 0x6f, 0x1a, - 0x78, 0x94, 0x1f, 0xfc, 0x21, 0xe5, 0x02, 0x7e, 0x93, 0x1b, 0xbe, 0xb1, 0xe6, 0x58, 0x28, 0x8f, - 0x47, 0x5f, 0x53, 0x7d, 0xad, 0xcc, 0x25, 0x99, 0xc1, 0x9f, 0x80, 0x32, 0x15, 0xc4, 0xe1, 0x8d, - 0xc2, 0x93, 0x62, 0xa7, 0xba, 0x63, 0x1a, 0x57, 0xac, 0xb1, 0x91, 0xcf, 0xd0, 0xba, 0xa7, 0xb0, - 0xcb, 0x07, 0x11, 0x0a, 0x8a, 0xc1, 0xda, 0xbf, 0x14, 0x40, 0x2d, 0xae, 0xae, 0x2b, 0x04, 0xb6, - 0x47, 0x0e, 0x71, 0xc5, 0x2d, 0xb0, 0xb8, 0x07, 0x4a, 0xdc, 0x27, 0xb6, 0x62, 0xef, 0xf6, 0x95, - 0xb5, 0x2c, 0xa6, 0xd7, 0xf3, 0x89, 0x6d, 0x6d, 0x29, 0xf8, 0x52, 0xf4, 0x42, 0x12, 0x0c, 0x7e, - 0x0d, 0xee, 0x70, 0x81, 0x45, 0xc0, 0x25, 0x4b, 0x2f, 0x2f, 0xc5, 0x1a, 0xb0, 0xd2, 0xd5, 0x7a, - 0x43, 0x01, 0xdf, 0x89, 0xdf, 0x48, 0x41, 0xb6, 0xcf, 0x35, 0x50, 0x5f, 0x74, 0xb9, 0x85, 0xa9, - 0xa3, 0xcb, 0x53, 0x7f, 0x76, 0xad, 0x92, 0x56, 0xcc, 0xfc, 0x95, 0x06, 0x1e, 0xe5, 0xaa, 0x97, - 0x0b, 0x01, 0x0f, 0x41, 0xdd, 0x27, 0x8c, 0x53, 0x2e, 0x88, 0x2b, 0x62, 0x1b, 0xb9, 0xf6, 0x5a, - 0xbc, 0xf6, 0xe1, 0xac, 0x55, 0x7f, 0xb1, 0x44, 0x8f, 0x96, 0x7a, 0xc1, 0x53, 0x50, 0xa3, 0xee, - 0x98, 0xba, 0x44, 0xed, 0x4f, 0x3a, 0xf1, 0x4e, 0xb6, 0x8e, 0xe8, 0xc3, 0x11, 0x35, 0x64, 0x11, - 0x59, 0x0e, 0xba, 0x1e, 0x9d, 0x99, 0x83, 0x05, 0x14, 0x94, 0xc3, 0x6d, 0xff, 0xbe, 0x64, 0x3e, - 0x91, 0x02, 0xbe, 0x0b, 0x2a, 0x58, 0x4a, 0x08, 0x53, 0x65, 0x24, 0xfd, 0xee, 0x2a, 0x39, 0x4a, - 0x2c, 0x24, 0x87, 0x64, 0x2b, 0x96, 0x1c, 0xd6, 0x35, 0x38, 0x24, 0x5d, 0x33, 0x1c, 0x92, 0x6f, - 0xa4, 0x20, 0xa3, 0x54, 0xa2, 0x03, 0x9b, 0x39, 0xa4, 0x49, 0x2a, 0xc7, 0x4a, 0x8e, 0x12, 0x8b, - 0xf6, 0xbf, 0xc5, 0x25, 0x63, 0x92, 0x64, 0xcc, 0xd4, 0x34, 0x90, 0x35, 0x55, 0x72, 0x35, 0x0d, - 0x92, 0x9a, 0x06, 0xf0, 0x67, 0x0d, 0x40, 0x9c, 0x40, 0x1c, 0xcd, 0xc9, 0x1a, 0x33, 0xea, 0x93, - 0x1b, 0x2c, 0x89, 0xd1, 0xcd, 0xa1, 0xed, 0xbb, 0x82, 0x4d, 0xad, 0xa6, 0xca, 0x02, 0xe6, 0x0d, - 0xd0, 0x92, 0x14, 0xe0, 0x29, 0xa8, 0xc6, 0xd2, 0x7d, 0xc6, 0x3c, 0xa6, 0xd6, 0xb6, 0xb3, 0x46, - 0x46, 0xd2, 0xde, 0xd2, 0xc3, 0x59, 0xab, 0xda, 0x4d, 0x01, 0xfe, 0x99, 0xb5, 0xaa, 0x19, 0x3d, - 0xca, 0x82, 0x47, 0xb1, 0x06, 0x24, 0x8d, 0x55, 0xba, 0x49, 0xac, 0x3d, 0xb2, 0x3a, 0x56, 0x06, - 0xbc, 0xb9, 0x0f, 0xde, 0x5c, 0xd1, 0x22, 0x58, 0x03, 0xc5, 0x33, 0x32, 0x8d, 0x99, 0x88, 0xa2, - 0x9f, 0xb0, 0x0e, 0xca, 0x13, 0x3c, 0x0e, 0x62, 0xc6, 0x6d, 0xa2, 0xf8, 0xf1, 0x51, 0xe1, 0xb9, - 0xd6, 0xfe, 0xab, 0x00, 0x1e, 0x26, 0x13, 0x60, 0xb4, 0x1f, 0x08, 0xc2, 0xe5, 0x87, 0xf5, 0x16, - 0x2e, 0xf4, 0x0e, 0x00, 0x03, 0x46, 0x27, 0x84, 0x49, 0xb6, 0xca, 0xd4, 0x52, 0x8f, 0xbd, 0x44, - 0x83, 0x32, 0x56, 0x70, 0x02, 0x80, 0x8f, 0x19, 0x76, 0x88, 0x20, 0x2c, 0x3a, 0xc2, 0x11, 0xbf, - 0xac, 0xf5, 0xf8, 0x95, 0xad, 0xce, 0x78, 0x91, 0x80, 0xc4, 0xb4, 0x4a, 0xe2, 0xa6, 0x0a, 0x94, - 0x89, 0xd4, 0xfc, 0x18, 0xdc, 0x5f, 0x70, 0xb9, 0x56, 0x9b, 0x5f, 0x69, 0xe0, 0xad, 0xa5, 0x89, - 0xdc, 0xc2, 0x7d, 0xff, 0xe2, 0xf2, 0x7d, 0xdf, 0xb9, 0x7e, 0xb7, 0x56, 0x1c, 0xf9, 0x5f, 0x35, - 0x90, 0xe5, 0x27, 0x3c, 0x04, 0xa5, 0xe8, 0xef, 0x59, 0x55, 0xc2, 0x3b, 0xeb, 0x95, 0x70, 0x42, - 0x1d, 0x92, 0x7e, 0x6a, 0xa3, 0x17, 0x92, 0x28, 0xf0, 0x6d, 0x70, 0xd7, 0x21, 0x9c, 0xe3, 0xe1, - 0x9c, 0x1a, 0xf7, 0x95, 0xd1, 0xdd, 0xa3, 0x58, 0x8c, 0xe6, 0x7a, 0xf8, 0x14, 0x6c, 0x92, 0x28, - 0x83, 0x5d, 0x6f, 0x10, 0x5f, 0xbd, 0xb2, 0x75, 0x2f, 0x9c, 0xb5, 0x36, 0xf7, 0xe7, 0x42, 0x94, - 0xea, 0xad, 0xee, 0xf9, 0x85, 0xbe, 0xf1, 0xf2, 0x42, 0xdf, 0x78, 0x7d, 0xa1, 0x6f, 0xfc, 0x18, - 0xea, 0xda, 0x79, 0xa8, 0x6b, 0x2f, 0x43, 0x5d, 0x7b, 0x1d, 0xea, 0xda, 0x1f, 0xa1, 0xae, 0xfd, - 0xf4, 0xa7, 0xbe, 0xf1, 0xd5, 0xe3, 0x2b, 0xfe, 0xdd, 0xf9, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x23, - 0x8e, 0x6a, 0x20, 0x0c, 0x0d, 0x00, 0x00, -} +func (m *VolumeError) Reset() { *m = VolumeError{} } func (m *CSIStorageCapacity) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -770,7 +409,7 @@ func (m *VolumeAttachmentStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) for k := range m.AttachmentMetadata { keysForAttachmentMetadata = append(keysForAttachmentMetadata, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata) + sort.Strings(keysForAttachmentMetadata) for iNdEx := len(keysForAttachmentMetadata) - 1; iNdEx >= 0; iNdEx-- { v := m.AttachmentMetadata[string(keysForAttachmentMetadata[iNdEx])] baseI := i @@ -825,7 +464,7 @@ func (m *VolumeAttributesClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Parameters { keysForParameters = append(keysForParameters, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForParameters) + sort.Strings(keysForParameters) for iNdEx := len(keysForParameters) - 1; iNdEx >= 0; iNdEx-- { v := m.Parameters[string(keysForParameters[iNdEx])] baseI := i @@ -1244,7 +883,7 @@ func (this *VolumeAttachmentStatus) String() string { for k := range this.AttachmentMetadata { keysForAttachmentMetadata = append(keysForAttachmentMetadata, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata) + sort.Strings(keysForAttachmentMetadata) mapStringForAttachmentMetadata := "map[string]string{" for _, k := range keysForAttachmentMetadata { mapStringForAttachmentMetadata += fmt.Sprintf("%v: %v,", k, this.AttachmentMetadata[k]) @@ -1267,7 +906,7 @@ func (this *VolumeAttributesClass) String() string { for k := range this.Parameters { keysForParameters = append(keysForParameters, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForParameters) + sort.Strings(keysForParameters) mapStringForParameters := "map[string]string{" for _, k := range keysForParameters { mapStringForParameters += fmt.Sprintf("%v: %v,", k, this.Parameters[k]) diff --git a/staging/src/k8s.io/api/storage/v1alpha1/generated.protomessage.pb.go b/staging/src/k8s.io/api/storage/v1alpha1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..d58dcac3c243f --- /dev/null +++ b/staging/src/k8s.io/api/storage/v1alpha1/generated.protomessage.pb.go @@ -0,0 +1,42 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1alpha1 + +func (*CSIStorageCapacity) ProtoMessage() {} + +func (*CSIStorageCapacityList) ProtoMessage() {} + +func (*VolumeAttachment) ProtoMessage() {} + +func (*VolumeAttachmentList) ProtoMessage() {} + +func (*VolumeAttachmentSource) ProtoMessage() {} + +func (*VolumeAttachmentSpec) ProtoMessage() {} + +func (*VolumeAttachmentStatus) ProtoMessage() {} + +func (*VolumeAttributesClass) ProtoMessage() {} + +func (*VolumeAttributesClassList) ProtoMessage() {} + +func (*VolumeError) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/storage/v1alpha1/zz_generated.model_name.go b/staging/src/k8s.io/api/storage/v1alpha1/zz_generated.model_name.go new file mode 100644 index 0000000000000..d35ce682b7d36 --- /dev/null +++ b/staging/src/k8s.io/api/storage/v1alpha1/zz_generated.model_name.go @@ -0,0 +1,72 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1alpha1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSIStorageCapacity) OpenAPIModelName() string { + return "io.k8s.api.storage.v1alpha1.CSIStorageCapacity" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSIStorageCapacityList) OpenAPIModelName() string { + return "io.k8s.api.storage.v1alpha1.CSIStorageCapacityList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttachment) OpenAPIModelName() string { + return "io.k8s.api.storage.v1alpha1.VolumeAttachment" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttachmentList) OpenAPIModelName() string { + return "io.k8s.api.storage.v1alpha1.VolumeAttachmentList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttachmentSource) OpenAPIModelName() string { + return "io.k8s.api.storage.v1alpha1.VolumeAttachmentSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttachmentSpec) OpenAPIModelName() string { + return "io.k8s.api.storage.v1alpha1.VolumeAttachmentSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttachmentStatus) OpenAPIModelName() string { + return "io.k8s.api.storage.v1alpha1.VolumeAttachmentStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttributesClass) OpenAPIModelName() string { + return "io.k8s.api.storage.v1alpha1.VolumeAttributesClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttributesClassList) OpenAPIModelName() string { + return "io.k8s.api.storage.v1alpha1.VolumeAttributesClassList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeError) OpenAPIModelName() string { + return "io.k8s.api.storage.v1alpha1.VolumeError" +} diff --git a/staging/src/k8s.io/api/storage/v1beta1/doc.go b/staging/src/k8s.io/api/storage/v1beta1/doc.go index 174482b609201..f0eac351950bf 100644 --- a/staging/src/k8s.io/api/storage/v1beta1/doc.go +++ b/staging/src/k8s.io/api/storage/v1beta1/doc.go @@ -19,5 +19,6 @@ limitations under the License. // +groupName=storage.k8s.io // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.storage.v1beta1 package v1beta1 diff --git a/staging/src/k8s.io/api/storage/v1beta1/generated.pb.go b/staging/src/k8s.io/api/storage/v1beta1/generated.pb.go index 6d75868d6e953..fbb1fe85fd1e5 100644 --- a/staging/src/k8s.io/api/storage/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/storage/v1beta1/generated.pb.go @@ -23,765 +23,59 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" k8s_io_api_core_v1 "k8s.io/api/core/v1" v11 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *CSIDriver) Reset() { *m = CSIDriver{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *CSIDriverList) Reset() { *m = CSIDriverList{} } -func (m *CSIDriver) Reset() { *m = CSIDriver{} } -func (*CSIDriver) ProtoMessage() {} -func (*CSIDriver) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{0} -} -func (m *CSIDriver) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIDriver) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIDriver) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIDriver.Merge(m, src) -} -func (m *CSIDriver) XXX_Size() int { - return m.Size() -} -func (m *CSIDriver) XXX_DiscardUnknown() { - xxx_messageInfo_CSIDriver.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIDriver proto.InternalMessageInfo - -func (m *CSIDriverList) Reset() { *m = CSIDriverList{} } -func (*CSIDriverList) ProtoMessage() {} -func (*CSIDriverList) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{1} -} -func (m *CSIDriverList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIDriverList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIDriverList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIDriverList.Merge(m, src) -} -func (m *CSIDriverList) XXX_Size() int { - return m.Size() -} -func (m *CSIDriverList) XXX_DiscardUnknown() { - xxx_messageInfo_CSIDriverList.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIDriverList proto.InternalMessageInfo - -func (m *CSIDriverSpec) Reset() { *m = CSIDriverSpec{} } -func (*CSIDriverSpec) ProtoMessage() {} -func (*CSIDriverSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{2} -} -func (m *CSIDriverSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIDriverSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIDriverSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIDriverSpec.Merge(m, src) -} -func (m *CSIDriverSpec) XXX_Size() int { - return m.Size() -} -func (m *CSIDriverSpec) XXX_DiscardUnknown() { - xxx_messageInfo_CSIDriverSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIDriverSpec proto.InternalMessageInfo - -func (m *CSINode) Reset() { *m = CSINode{} } -func (*CSINode) ProtoMessage() {} -func (*CSINode) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{3} -} -func (m *CSINode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSINode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSINode) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSINode.Merge(m, src) -} -func (m *CSINode) XXX_Size() int { - return m.Size() -} -func (m *CSINode) XXX_DiscardUnknown() { - xxx_messageInfo_CSINode.DiscardUnknown(m) -} - -var xxx_messageInfo_CSINode proto.InternalMessageInfo - -func (m *CSINodeDriver) Reset() { *m = CSINodeDriver{} } -func (*CSINodeDriver) ProtoMessage() {} -func (*CSINodeDriver) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{4} -} -func (m *CSINodeDriver) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSINodeDriver) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSINodeDriver) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSINodeDriver.Merge(m, src) -} -func (m *CSINodeDriver) XXX_Size() int { - return m.Size() -} -func (m *CSINodeDriver) XXX_DiscardUnknown() { - xxx_messageInfo_CSINodeDriver.DiscardUnknown(m) -} - -var xxx_messageInfo_CSINodeDriver proto.InternalMessageInfo - -func (m *CSINodeList) Reset() { *m = CSINodeList{} } -func (*CSINodeList) ProtoMessage() {} -func (*CSINodeList) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{5} -} -func (m *CSINodeList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSINodeList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSINodeList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSINodeList.Merge(m, src) -} -func (m *CSINodeList) XXX_Size() int { - return m.Size() -} -func (m *CSINodeList) XXX_DiscardUnknown() { - xxx_messageInfo_CSINodeList.DiscardUnknown(m) -} - -var xxx_messageInfo_CSINodeList proto.InternalMessageInfo - -func (m *CSINodeSpec) Reset() { *m = CSINodeSpec{} } -func (*CSINodeSpec) ProtoMessage() {} -func (*CSINodeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{6} -} -func (m *CSINodeSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSINodeSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSINodeSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSINodeSpec.Merge(m, src) -} -func (m *CSINodeSpec) XXX_Size() int { - return m.Size() -} -func (m *CSINodeSpec) XXX_DiscardUnknown() { - xxx_messageInfo_CSINodeSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_CSINodeSpec proto.InternalMessageInfo - -func (m *CSIStorageCapacity) Reset() { *m = CSIStorageCapacity{} } -func (*CSIStorageCapacity) ProtoMessage() {} -func (*CSIStorageCapacity) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{7} -} -func (m *CSIStorageCapacity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIStorageCapacity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIStorageCapacity) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIStorageCapacity.Merge(m, src) -} -func (m *CSIStorageCapacity) XXX_Size() int { - return m.Size() -} -func (m *CSIStorageCapacity) XXX_DiscardUnknown() { - xxx_messageInfo_CSIStorageCapacity.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIStorageCapacity proto.InternalMessageInfo - -func (m *CSIStorageCapacityList) Reset() { *m = CSIStorageCapacityList{} } -func (*CSIStorageCapacityList) ProtoMessage() {} -func (*CSIStorageCapacityList) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{8} -} -func (m *CSIStorageCapacityList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIStorageCapacityList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIStorageCapacityList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIStorageCapacityList.Merge(m, src) -} -func (m *CSIStorageCapacityList) XXX_Size() int { - return m.Size() -} -func (m *CSIStorageCapacityList) XXX_DiscardUnknown() { - xxx_messageInfo_CSIStorageCapacityList.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIStorageCapacityList proto.InternalMessageInfo - -func (m *StorageClass) Reset() { *m = StorageClass{} } -func (*StorageClass) ProtoMessage() {} -func (*StorageClass) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{9} -} -func (m *StorageClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StorageClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageClass.Merge(m, src) -} -func (m *StorageClass) XXX_Size() int { - return m.Size() -} -func (m *StorageClass) XXX_DiscardUnknown() { - xxx_messageInfo_StorageClass.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageClass proto.InternalMessageInfo - -func (m *StorageClassList) Reset() { *m = StorageClassList{} } -func (*StorageClassList) ProtoMessage() {} -func (*StorageClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{10} -} -func (m *StorageClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StorageClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageClassList.Merge(m, src) -} -func (m *StorageClassList) XXX_Size() int { - return m.Size() -} -func (m *StorageClassList) XXX_DiscardUnknown() { - xxx_messageInfo_StorageClassList.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageClassList proto.InternalMessageInfo - -func (m *TokenRequest) Reset() { *m = TokenRequest{} } -func (*TokenRequest) ProtoMessage() {} -func (*TokenRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{11} -} -func (m *TokenRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TokenRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenRequest.Merge(m, src) -} -func (m *TokenRequest) XXX_Size() int { - return m.Size() -} -func (m *TokenRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TokenRequest.DiscardUnknown(m) -} +func (m *CSIDriverSpec) Reset() { *m = CSIDriverSpec{} } -var xxx_messageInfo_TokenRequest proto.InternalMessageInfo +func (m *CSINode) Reset() { *m = CSINode{} } -func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } -func (*VolumeAttachment) ProtoMessage() {} -func (*VolumeAttachment) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{12} -} -func (m *VolumeAttachment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttachment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttachment) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttachment.Merge(m, src) -} -func (m *VolumeAttachment) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttachment) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttachment.DiscardUnknown(m) -} +func (m *CSINodeDriver) Reset() { *m = CSINodeDriver{} } -var xxx_messageInfo_VolumeAttachment proto.InternalMessageInfo +func (m *CSINodeList) Reset() { *m = CSINodeList{} } -func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } -func (*VolumeAttachmentList) ProtoMessage() {} -func (*VolumeAttachmentList) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{13} -} -func (m *VolumeAttachmentList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttachmentList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttachmentList) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttachmentList.Merge(m, src) -} -func (m *VolumeAttachmentList) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttachmentList) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttachmentList.DiscardUnknown(m) -} +func (m *CSINodeSpec) Reset() { *m = CSINodeSpec{} } -var xxx_messageInfo_VolumeAttachmentList proto.InternalMessageInfo +func (m *CSIStorageCapacity) Reset() { *m = CSIStorageCapacity{} } -func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } -func (*VolumeAttachmentSource) ProtoMessage() {} -func (*VolumeAttachmentSource) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{14} -} -func (m *VolumeAttachmentSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttachmentSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttachmentSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttachmentSource.Merge(m, src) -} -func (m *VolumeAttachmentSource) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttachmentSource) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttachmentSource.DiscardUnknown(m) -} +func (m *CSIStorageCapacityList) Reset() { *m = CSIStorageCapacityList{} } -var xxx_messageInfo_VolumeAttachmentSource proto.InternalMessageInfo +func (m *StorageClass) Reset() { *m = StorageClass{} } -func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } -func (*VolumeAttachmentSpec) ProtoMessage() {} -func (*VolumeAttachmentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{15} -} -func (m *VolumeAttachmentSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttachmentSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttachmentSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttachmentSpec.Merge(m, src) -} -func (m *VolumeAttachmentSpec) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttachmentSpec) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttachmentSpec.DiscardUnknown(m) -} +func (m *StorageClassList) Reset() { *m = StorageClassList{} } -var xxx_messageInfo_VolumeAttachmentSpec proto.InternalMessageInfo +func (m *TokenRequest) Reset() { *m = TokenRequest{} } -func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } -func (*VolumeAttachmentStatus) ProtoMessage() {} -func (*VolumeAttachmentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{16} -} -func (m *VolumeAttachmentStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttachmentStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttachmentStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttachmentStatus.Merge(m, src) -} -func (m *VolumeAttachmentStatus) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttachmentStatus) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttachmentStatus.DiscardUnknown(m) -} +func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } -var xxx_messageInfo_VolumeAttachmentStatus proto.InternalMessageInfo +func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } -func (m *VolumeAttributesClass) Reset() { *m = VolumeAttributesClass{} } -func (*VolumeAttributesClass) ProtoMessage() {} -func (*VolumeAttributesClass) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{17} -} -func (m *VolumeAttributesClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttributesClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttributesClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttributesClass.Merge(m, src) -} -func (m *VolumeAttributesClass) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttributesClass) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttributesClass.DiscardUnknown(m) -} +func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } -var xxx_messageInfo_VolumeAttributesClass proto.InternalMessageInfo +func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } -func (m *VolumeAttributesClassList) Reset() { *m = VolumeAttributesClassList{} } -func (*VolumeAttributesClassList) ProtoMessage() {} -func (*VolumeAttributesClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{18} -} -func (m *VolumeAttributesClassList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeAttributesClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeAttributesClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeAttributesClassList.Merge(m, src) -} -func (m *VolumeAttributesClassList) XXX_Size() int { - return m.Size() -} -func (m *VolumeAttributesClassList) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeAttributesClassList.DiscardUnknown(m) -} +func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } -var xxx_messageInfo_VolumeAttributesClassList proto.InternalMessageInfo +func (m *VolumeAttributesClass) Reset() { *m = VolumeAttributesClass{} } -func (m *VolumeError) Reset() { *m = VolumeError{} } -func (*VolumeError) ProtoMessage() {} -func (*VolumeError) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{19} -} -func (m *VolumeError) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeError) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeError.Merge(m, src) -} -func (m *VolumeError) XXX_Size() int { - return m.Size() -} -func (m *VolumeError) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeError.DiscardUnknown(m) -} +func (m *VolumeAttributesClassList) Reset() { *m = VolumeAttributesClassList{} } -var xxx_messageInfo_VolumeError proto.InternalMessageInfo +func (m *VolumeError) Reset() { *m = VolumeError{} } -func (m *VolumeNodeResources) Reset() { *m = VolumeNodeResources{} } -func (*VolumeNodeResources) ProtoMessage() {} -func (*VolumeNodeResources) Descriptor() ([]byte, []int) { - return fileDescriptor_73e4f72503e71065, []int{20} -} -func (m *VolumeNodeResources) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeNodeResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeNodeResources) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeNodeResources.Merge(m, src) -} -func (m *VolumeNodeResources) XXX_Size() int { - return m.Size() -} -func (m *VolumeNodeResources) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeNodeResources.DiscardUnknown(m) -} - -var xxx_messageInfo_VolumeNodeResources proto.InternalMessageInfo - -func init() { - proto.RegisterType((*CSIDriver)(nil), "k8s.io.api.storage.v1beta1.CSIDriver") - proto.RegisterType((*CSIDriverList)(nil), "k8s.io.api.storage.v1beta1.CSIDriverList") - proto.RegisterType((*CSIDriverSpec)(nil), "k8s.io.api.storage.v1beta1.CSIDriverSpec") - proto.RegisterType((*CSINode)(nil), "k8s.io.api.storage.v1beta1.CSINode") - proto.RegisterType((*CSINodeDriver)(nil), "k8s.io.api.storage.v1beta1.CSINodeDriver") - proto.RegisterType((*CSINodeList)(nil), "k8s.io.api.storage.v1beta1.CSINodeList") - proto.RegisterType((*CSINodeSpec)(nil), "k8s.io.api.storage.v1beta1.CSINodeSpec") - proto.RegisterType((*CSIStorageCapacity)(nil), "k8s.io.api.storage.v1beta1.CSIStorageCapacity") - proto.RegisterType((*CSIStorageCapacityList)(nil), "k8s.io.api.storage.v1beta1.CSIStorageCapacityList") - proto.RegisterType((*StorageClass)(nil), "k8s.io.api.storage.v1beta1.StorageClass") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.storage.v1beta1.StorageClass.ParametersEntry") - proto.RegisterType((*StorageClassList)(nil), "k8s.io.api.storage.v1beta1.StorageClassList") - proto.RegisterType((*TokenRequest)(nil), "k8s.io.api.storage.v1beta1.TokenRequest") - proto.RegisterType((*VolumeAttachment)(nil), "k8s.io.api.storage.v1beta1.VolumeAttachment") - proto.RegisterType((*VolumeAttachmentList)(nil), "k8s.io.api.storage.v1beta1.VolumeAttachmentList") - proto.RegisterType((*VolumeAttachmentSource)(nil), "k8s.io.api.storage.v1beta1.VolumeAttachmentSource") - proto.RegisterType((*VolumeAttachmentSpec)(nil), "k8s.io.api.storage.v1beta1.VolumeAttachmentSpec") - proto.RegisterType((*VolumeAttachmentStatus)(nil), "k8s.io.api.storage.v1beta1.VolumeAttachmentStatus") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.storage.v1beta1.VolumeAttachmentStatus.AttachmentMetadataEntry") - proto.RegisterType((*VolumeAttributesClass)(nil), "k8s.io.api.storage.v1beta1.VolumeAttributesClass") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.storage.v1beta1.VolumeAttributesClass.ParametersEntry") - proto.RegisterType((*VolumeAttributesClassList)(nil), "k8s.io.api.storage.v1beta1.VolumeAttributesClassList") - proto.RegisterType((*VolumeError)(nil), "k8s.io.api.storage.v1beta1.VolumeError") - proto.RegisterType((*VolumeNodeResources)(nil), "k8s.io.api.storage.v1beta1.VolumeNodeResources") -} - -func init() { - proto.RegisterFile("k8s.io/api/storage/v1beta1/generated.proto", fileDescriptor_73e4f72503e71065) -} - -var fileDescriptor_73e4f72503e71065 = []byte{ - // 1787 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0x4f, 0x6f, 0x24, 0x47, - 0x15, 0x77, 0x7b, 0xfc, 0x6f, 0x6a, 0xec, 0xb5, 0x5d, 0xeb, 0x0d, 0x13, 0x1f, 0x66, 0xac, 0x46, - 0x24, 0xde, 0x25, 0xf4, 0xec, 0x9a, 0x10, 0xad, 0x22, 0x45, 0xc2, 0x6d, 0x1b, 0xe2, 0xc4, 0xf6, - 0x3a, 0x35, 0x66, 0x15, 0x45, 0x1c, 0xa8, 0xe9, 0xae, 0x1d, 0x57, 0x3c, 0xfd, 0x27, 0x5d, 0xd5, - 0xc6, 0xc3, 0x09, 0xbe, 0x01, 0xe2, 0xc0, 0x27, 0xe0, 0x1b, 0x20, 0x90, 0xe0, 0xc2, 0x91, 0x95, - 0x90, 0x20, 0x70, 0xca, 0x69, 0xc4, 0x4e, 0x3e, 0x02, 0x12, 0x07, 0x8b, 0x03, 0xaa, 0xea, 0x9a, - 0xfe, 0x3f, 0xeb, 0x19, 0x90, 0xe6, 0xe6, 0x7a, 0x7f, 0x7e, 0xf5, 0xaa, 0xde, 0x7b, 0xbf, 0x7a, - 0x3d, 0x06, 0x8f, 0xae, 0x9e, 0x32, 0x83, 0x7a, 0x2d, 0xec, 0xd3, 0x16, 0xe3, 0x5e, 0x80, 0xbb, - 0xa4, 0x75, 0xfd, 0xa4, 0x43, 0x38, 0x7e, 0xd2, 0xea, 0x12, 0x97, 0x04, 0x98, 0x13, 0xdb, 0xf0, - 0x03, 0x8f, 0x7b, 0x70, 0x3b, 0xb2, 0x35, 0xb0, 0x4f, 0x0d, 0x65, 0x6b, 0x28, 0xdb, 0xed, 0xef, - 0x74, 0x29, 0xbf, 0x0c, 0x3b, 0x86, 0xe5, 0x39, 0xad, 0xae, 0xd7, 0xf5, 0x5a, 0xd2, 0xa5, 0x13, - 0xbe, 0x90, 0x2b, 0xb9, 0x90, 0x7f, 0x45, 0x50, 0xdb, 0x7a, 0x6a, 0x5b, 0xcb, 0x0b, 0xc4, 0x9e, - 0xf9, 0xed, 0xb6, 0xdf, 0x4d, 0x6c, 0x1c, 0x6c, 0x5d, 0x52, 0x97, 0x04, 0xfd, 0x96, 0x7f, 0xd5, - 0x95, 0x4e, 0x01, 0x61, 0x5e, 0x18, 0x58, 0x64, 0x2a, 0x2f, 0xd6, 0x72, 0x08, 0xc7, 0x65, 0x7b, - 0xb5, 0xc6, 0x79, 0x05, 0xa1, 0xcb, 0xa9, 0x53, 0xdc, 0xe6, 0xbd, 0xbb, 0x1c, 0x98, 0x75, 0x49, - 0x1c, 0x9c, 0xf7, 0xd3, 0xff, 0xa8, 0x81, 0xea, 0x41, 0xfb, 0xf8, 0x30, 0xa0, 0xd7, 0x24, 0x80, - 0x3f, 0x01, 0x2b, 0x22, 0x22, 0x1b, 0x73, 0x5c, 0xd7, 0x76, 0xb4, 0xdd, 0xda, 0xde, 0x63, 0x23, - 0xb9, 0xe4, 0x18, 0xd8, 0xf0, 0xaf, 0xba, 0x42, 0xc0, 0x0c, 0x61, 0x6d, 0x5c, 0x3f, 0x31, 0x9e, - 0x75, 0x3e, 0x27, 0x16, 0x3f, 0x25, 0x1c, 0x9b, 0xf0, 0xe5, 0xa0, 0x39, 0x37, 0x1c, 0x34, 0x41, - 0x22, 0x43, 0x31, 0x2a, 0xfc, 0x18, 0x2c, 0x30, 0x9f, 0x58, 0xf5, 0x79, 0x89, 0xfe, 0xd0, 0x18, - 0x9f, 0x42, 0x23, 0x0e, 0xab, 0xed, 0x13, 0xcb, 0x5c, 0x55, 0xb0, 0x0b, 0x62, 0x85, 0x24, 0x88, - 0xfe, 0x07, 0x0d, 0xac, 0xc5, 0x56, 0x27, 0x94, 0x71, 0xf8, 0xe3, 0xc2, 0x01, 0x8c, 0xc9, 0x0e, - 0x20, 0xbc, 0x65, 0xf8, 0x1b, 0x6a, 0x9f, 0x95, 0x91, 0x24, 0x15, 0xfc, 0x47, 0x60, 0x91, 0x72, - 0xe2, 0xb0, 0xfa, 0xfc, 0x4e, 0x65, 0xb7, 0xb6, 0xf7, 0xad, 0x89, 0xa2, 0x37, 0xd7, 0x14, 0xe2, - 0xe2, 0xb1, 0xf0, 0x45, 0x11, 0x84, 0xfe, 0xb7, 0xc5, 0x54, 0xec, 0xe2, 0x4c, 0xf0, 0x7d, 0x70, - 0x0f, 0x73, 0x8e, 0xad, 0x4b, 0x44, 0xbe, 0x08, 0x69, 0x40, 0x6c, 0x79, 0x82, 0x15, 0x13, 0x0e, - 0x07, 0xcd, 0x7b, 0xfb, 0x19, 0x0d, 0xca, 0x59, 0x0a, 0x5f, 0xdf, 0xb3, 0x8f, 0xdd, 0x17, 0xde, - 0x33, 0xf7, 0xd4, 0x0b, 0x5d, 0x2e, 0x2f, 0x58, 0xf9, 0x9e, 0x67, 0x34, 0x28, 0x67, 0x09, 0x2d, - 0xb0, 0x75, 0xed, 0xf5, 0x42, 0x87, 0x9c, 0xd0, 0x17, 0xc4, 0xea, 0x5b, 0x3d, 0x72, 0xea, 0xd9, - 0x84, 0xd5, 0x2b, 0x3b, 0x95, 0xdd, 0xaa, 0xd9, 0x1a, 0x0e, 0x9a, 0x5b, 0xcf, 0x4b, 0xf4, 0xb7, - 0x83, 0xe6, 0xfd, 0x12, 0x39, 0x2a, 0x05, 0x83, 0x1f, 0x80, 0x75, 0x75, 0x43, 0x07, 0xd8, 0xc7, - 0x16, 0xe5, 0xfd, 0xfa, 0x82, 0x8c, 0xf0, 0xfe, 0x70, 0xd0, 0x5c, 0x6f, 0x67, 0x55, 0x28, 0x6f, - 0x0b, 0x3f, 0x04, 0x6b, 0x2f, 0xd8, 0x0f, 0x03, 0x2f, 0xf4, 0xcf, 0xbd, 0x1e, 0xb5, 0xfa, 0xf5, - 0xc5, 0x1d, 0x6d, 0xb7, 0x6a, 0xea, 0xc3, 0x41, 0x73, 0xed, 0x07, 0xed, 0x94, 0xe2, 0x36, 0x2f, - 0x40, 0x59, 0x47, 0x48, 0xc0, 0x1a, 0xf7, 0xae, 0x88, 0x2b, 0xae, 0x8e, 0x30, 0xce, 0xea, 0x4b, - 0x32, 0x97, 0xbb, 0xaf, 0xcb, 0xe5, 0x45, 0xca, 0xc1, 0x7c, 0xa0, 0xd2, 0xb9, 0x96, 0x96, 0x32, - 0x94, 0x45, 0x85, 0x07, 0x60, 0x33, 0x88, 0x92, 0xc3, 0x10, 0xf1, 0xc3, 0x4e, 0x8f, 0xb2, 0xcb, - 0xfa, 0xb2, 0x3c, 0xf1, 0x83, 0xe1, 0xa0, 0xb9, 0x89, 0xf2, 0x4a, 0x54, 0xb4, 0x87, 0xef, 0x82, - 0x55, 0x46, 0x4e, 0xa8, 0x1b, 0xde, 0x44, 0x39, 0x5d, 0x91, 0xfe, 0x1b, 0xc3, 0x41, 0x73, 0xb5, - 0x7d, 0x94, 0xc8, 0x51, 0xc6, 0x0a, 0x5e, 0x03, 0xdd, 0xf5, 0x6c, 0xb2, 0xdf, 0xeb, 0x79, 0x16, - 0xe6, 0xb8, 0xd3, 0x23, 0x3f, 0xf2, 0x6d, 0xcc, 0xc9, 0x39, 0x09, 0xa8, 0x67, 0xb7, 0x89, 0xe5, - 0xb9, 0x36, 0xab, 0x57, 0x77, 0xb4, 0xdd, 0x8a, 0xf9, 0xd6, 0x70, 0xd0, 0xd4, 0xcf, 0xee, 0xb4, - 0x46, 0x13, 0x20, 0xea, 0xbf, 0xd7, 0xc0, 0xf2, 0x41, 0xfb, 0x58, 0xa0, 0xcd, 0x80, 0x48, 0x8e, - 0x33, 0x44, 0xf2, 0xf6, 0x1d, 0xad, 0x28, 0x82, 0x1a, 0x4b, 0x23, 0xff, 0x8a, 0x68, 0x44, 0xd8, - 0x28, 0x1e, 0xdc, 0x01, 0x0b, 0x2e, 0x76, 0x88, 0x0c, 0xbd, 0x9a, 0xf8, 0x9c, 0x61, 0x87, 0x20, - 0xa9, 0x81, 0x6f, 0x81, 0x25, 0x71, 0x25, 0xc7, 0x87, 0x32, 0x80, 0xaa, 0x79, 0x4f, 0xd9, 0x2c, - 0x9d, 0x49, 0x29, 0x52, 0x5a, 0x91, 0x42, 0xee, 0xf9, 0x5e, 0xcf, 0xeb, 0xf6, 0x3f, 0x26, 0xfd, - 0x51, 0x53, 0xc9, 0x14, 0x5e, 0xa4, 0xe4, 0x28, 0x63, 0x05, 0x3b, 0xa0, 0x86, 0x93, 0xcb, 0x96, - 0x9d, 0x52, 0xdb, 0x6b, 0xbd, 0xee, 0x8c, 0x51, 0x27, 0x8a, 0xcd, 0x91, 0x7a, 0x89, 0x98, 0xb9, - 0x3e, 0x1c, 0x34, 0x6b, 0xa9, 0xa4, 0xa1, 0x34, 0xa8, 0xfe, 0x3b, 0x0d, 0xd4, 0xd4, 0xa9, 0x67, - 0x40, 0x9d, 0x1f, 0x66, 0xa9, 0xf3, 0x9b, 0x13, 0xe4, 0x6b, 0x0c, 0x71, 0x5a, 0x71, 0xd8, 0x92, - 0x35, 0x2f, 0xc0, 0xb2, 0x2d, 0x93, 0xc6, 0xea, 0x9a, 0x84, 0x7e, 0x38, 0x01, 0xb4, 0x62, 0xe6, - 0x75, 0xb5, 0xc1, 0x72, 0xb4, 0x66, 0x68, 0x04, 0xa5, 0xff, 0xbb, 0x02, 0xe0, 0x41, 0xfb, 0x38, - 0xc7, 0x4b, 0x33, 0x28, 0x6b, 0x0a, 0x56, 0x45, 0xe5, 0x8c, 0x6a, 0x43, 0x95, 0xf7, 0x77, 0x27, - 0xcc, 0x04, 0xee, 0x90, 0x5e, 0x9b, 0xf4, 0x88, 0xc5, 0xbd, 0x20, 0x2a, 0xb2, 0xb3, 0x14, 0x18, - 0xca, 0x40, 0xc3, 0x43, 0xb0, 0x31, 0xa2, 0xd9, 0x1e, 0x66, 0x4c, 0x14, 0x77, 0xbd, 0x22, 0x8b, - 0xb9, 0xae, 0x42, 0xdc, 0x68, 0xe7, 0xf4, 0xa8, 0xe0, 0x01, 0x3f, 0x05, 0x2b, 0x56, 0x9a, 0xd1, - 0xef, 0x28, 0x1b, 0x63, 0x34, 0x28, 0x19, 0x9f, 0x84, 0xd8, 0xe5, 0x94, 0xf7, 0xcd, 0x55, 0x51, - 0x32, 0x31, 0xf5, 0xc7, 0x68, 0x90, 0x81, 0x4d, 0x07, 0xdf, 0x50, 0x27, 0x74, 0xa2, 0xe2, 0x6e, - 0xd3, 0x9f, 0x11, 0xc9, 0xfb, 0xd3, 0x6f, 0x21, 0x29, 0xf7, 0x34, 0x0f, 0x86, 0x8a, 0xf8, 0xfa, - 0x5f, 0x34, 0xf0, 0x46, 0x31, 0xf1, 0x33, 0x68, 0x90, 0x76, 0xb6, 0x41, 0x8c, 0x3b, 0xaa, 0x38, - 0x17, 0xe0, 0x98, 0x5e, 0xf9, 0xd5, 0x12, 0x58, 0x4d, 0xe7, 0x70, 0x06, 0x05, 0xfc, 0x3d, 0x50, - 0xf3, 0x03, 0xef, 0x9a, 0x32, 0xea, 0xb9, 0x24, 0x50, 0xec, 0x78, 0x5f, 0xb9, 0xd4, 0xce, 0x13, - 0x15, 0x4a, 0xdb, 0xc1, 0x1e, 0x00, 0x3e, 0x0e, 0xb0, 0x43, 0xb8, 0xe8, 0xe4, 0x8a, 0xbc, 0x83, - 0xa7, 0xaf, 0xbb, 0x83, 0xf4, 0xb1, 0x8c, 0xf3, 0xd8, 0xf5, 0xc8, 0xe5, 0x41, 0x3f, 0x09, 0x31, - 0x51, 0xa0, 0x14, 0x3e, 0xbc, 0x02, 0x6b, 0x01, 0xb1, 0x7a, 0x98, 0x3a, 0x6a, 0x9c, 0x58, 0x90, - 0x61, 0x1e, 0x89, 0x67, 0x1d, 0xa5, 0x15, 0xb7, 0x83, 0xe6, 0xe3, 0xe2, 0xa7, 0x81, 0x71, 0x4e, - 0x02, 0x46, 0x19, 0x27, 0x2e, 0x8f, 0x4a, 0x27, 0xe3, 0x83, 0xb2, 0xd8, 0xe2, 0x09, 0x70, 0xc4, - 0xc3, 0xfc, 0xcc, 0xe7, 0xd4, 0x73, 0x59, 0x7d, 0x31, 0x79, 0x02, 0x4e, 0x53, 0x72, 0x94, 0xb1, - 0x82, 0x27, 0x60, 0x4b, 0xb0, 0xf5, 0x4f, 0xa3, 0x0d, 0x8e, 0x6e, 0x7c, 0xec, 0x8a, 0xab, 0xaa, - 0x2f, 0xc9, 0x19, 0xa0, 0x2e, 0xa6, 0xb2, 0xfd, 0x12, 0x3d, 0x2a, 0xf5, 0x82, 0x9f, 0x82, 0xcd, - 0x68, 0x2c, 0x33, 0xa9, 0x6b, 0x53, 0xb7, 0x2b, 0x86, 0x32, 0x39, 0x8e, 0x54, 0xcd, 0x47, 0xa2, - 0x37, 0x9e, 0xe7, 0x95, 0xb7, 0x65, 0x42, 0x54, 0x04, 0x81, 0x5f, 0x80, 0x4d, 0xb9, 0x23, 0xb1, - 0x15, 0xb1, 0x50, 0xc2, 0xea, 0x2b, 0xc5, 0x99, 0x4a, 0x5c, 0x9d, 0x28, 0xa4, 0x11, 0xfd, 0x8c, - 0x68, 0xea, 0x82, 0x04, 0x8e, 0xf9, 0xa6, 0xca, 0xd7, 0xe6, 0x7e, 0x1e, 0x0a, 0x15, 0xd1, 0xb7, - 0x3f, 0x00, 0xeb, 0xb9, 0x84, 0xc3, 0x0d, 0x50, 0xb9, 0x22, 0xfd, 0xe8, 0xbd, 0x46, 0xe2, 0x4f, - 0xb8, 0x05, 0x16, 0xaf, 0x71, 0x2f, 0x24, 0x51, 0x05, 0xa2, 0x68, 0xf1, 0xfe, 0xfc, 0x53, 0x4d, - 0xff, 0x93, 0x06, 0x32, 0xc4, 0x36, 0x83, 0xe6, 0x3e, 0xcd, 0x36, 0xf7, 0xee, 0xa4, 0x85, 0x3d, - 0xa6, 0xad, 0x7f, 0xa1, 0x81, 0xd5, 0xf4, 0xf4, 0x09, 0xdf, 0x01, 0x2b, 0x38, 0xb4, 0x29, 0x71, - 0xad, 0xd1, 0xcc, 0x12, 0x47, 0xb3, 0xaf, 0xe4, 0x28, 0xb6, 0x10, 0xb3, 0x29, 0xb9, 0xf1, 0x69, - 0x80, 0x45, 0xa5, 0x8d, 0xe6, 0xc1, 0x79, 0x39, 0x0f, 0x4a, 0xa2, 0x3c, 0xca, 0x2b, 0x51, 0xd1, - 0x5e, 0xff, 0xcd, 0x3c, 0xd8, 0x88, 0x0a, 0x24, 0xfa, 0x34, 0x71, 0x88, 0xcb, 0x67, 0x40, 0x2f, - 0x28, 0x33, 0xf6, 0x3d, 0xbe, 0x7b, 0x24, 0x4a, 0xa2, 0x1b, 0x37, 0xff, 0xc1, 0xcf, 0xc0, 0x12, - 0xe3, 0x98, 0x87, 0x4c, 0x3e, 0x7f, 0xb5, 0xbd, 0xbd, 0xa9, 0x50, 0xa5, 0x67, 0x32, 0xff, 0x45, - 0x6b, 0xa4, 0x10, 0xf5, 0x3f, 0x6b, 0x60, 0x2b, 0xef, 0x32, 0x83, 0x82, 0xfb, 0x24, 0x5b, 0x70, - 0xef, 0x4c, 0x73, 0xa2, 0x31, 0x45, 0xf7, 0x0f, 0x0d, 0xbc, 0x51, 0x38, 0xbc, 0x7c, 0x67, 0x05, - 0x57, 0xf9, 0x39, 0x46, 0x3c, 0x4b, 0xc6, 0x67, 0xc9, 0x55, 0xe7, 0x25, 0x7a, 0x54, 0xea, 0x05, - 0x3f, 0x07, 0x1b, 0xd4, 0xed, 0x51, 0x97, 0xa8, 0x67, 0x39, 0x49, 0x77, 0x29, 0xa1, 0xe4, 0x91, - 0x65, 0x9a, 0xb7, 0xc4, 0xf4, 0x72, 0x9c, 0x43, 0x41, 0x05, 0x5c, 0xfd, 0xaf, 0x25, 0xe9, 0x91, - 0x63, 0xa5, 0xe8, 0x28, 0x29, 0x21, 0x41, 0xa1, 0xa3, 0x94, 0x1c, 0xc5, 0x16, 0xb2, 0x82, 0xe4, - 0x55, 0xa8, 0x40, 0xa7, 0xab, 0x20, 0xe9, 0x99, 0xaa, 0x20, 0xb9, 0x46, 0x0a, 0x51, 0x44, 0x22, - 0xc6, 0xb6, 0xd4, 0x78, 0x16, 0x47, 0x72, 0xa6, 0xe4, 0x28, 0xb6, 0xd0, 0xff, 0x53, 0x29, 0xc9, - 0x92, 0x2c, 0xc5, 0xd4, 0x91, 0x46, 0xbf, 0x2c, 0xe4, 0x8f, 0x64, 0xc7, 0x47, 0xb2, 0xe1, 0xaf, - 0x35, 0x00, 0x71, 0x0c, 0x71, 0x3a, 0x2a, 0xd5, 0xa8, 0x9e, 0x3e, 0x9a, 0xbe, 0x43, 0x8c, 0xfd, - 0x02, 0x58, 0xf4, 0x56, 0x6f, 0xab, 0x20, 0x60, 0xd1, 0x00, 0x95, 0x44, 0x00, 0x29, 0xa8, 0x45, - 0xd2, 0xa3, 0x20, 0xf0, 0x02, 0xd5, 0xb2, 0x6f, 0xdf, 0x1d, 0x90, 0x34, 0x37, 0x1b, 0xf2, 0x9b, - 0x28, 0xf1, 0xbf, 0x1d, 0x34, 0x6b, 0x29, 0x3d, 0x4a, 0x63, 0x8b, 0xad, 0x6c, 0x92, 0x6c, 0xb5, - 0xf0, 0x3f, 0x6c, 0x75, 0x48, 0xc6, 0x6f, 0x95, 0xc2, 0xde, 0x3e, 0x02, 0xdf, 0x18, 0x73, 0x41, - 0x53, 0xbd, 0x6d, 0x5f, 0xcf, 0x83, 0x07, 0xf1, 0xfd, 0x07, 0xb4, 0x13, 0x72, 0xc2, 0x66, 0x35, - 0xf9, 0xed, 0x01, 0x10, 0x7d, 0x3e, 0xc9, 0x52, 0x8d, 0x06, 0xbf, 0xd8, 0xe3, 0x30, 0xd6, 0xa0, - 0x94, 0x15, 0x0c, 0x4b, 0xc6, 0xbe, 0xfd, 0x89, 0x8a, 0x2b, 0x7d, 0xb8, 0x69, 0xe7, 0xbf, 0xff, - 0x77, 0x82, 0xf8, 0xbb, 0x06, 0xde, 0x2c, 0x0d, 0x64, 0x06, 0xcc, 0xfe, 0x3c, 0xcb, 0xec, 0x4f, - 0xa6, 0xbe, 0xac, 0x31, 0xf4, 0xfe, 0x5b, 0x0d, 0xa4, 0xab, 0x13, 0x9e, 0x80, 0x05, 0x4e, 0x15, - 0x87, 0xd7, 0xf6, 0x1e, 0x4d, 0x76, 0x82, 0x0b, 0xea, 0x90, 0xe4, 0x89, 0x15, 0x2b, 0x24, 0x51, - 0xe0, 0x43, 0xb0, 0xec, 0x10, 0xc6, 0x70, 0x77, 0x54, 0x18, 0xf1, 0xa7, 0xf7, 0x69, 0x24, 0x46, - 0x23, 0x3d, 0xfc, 0x36, 0xa8, 0x12, 0x11, 0xc1, 0x81, 0x18, 0x51, 0x45, 0x77, 0x2f, 0x9a, 0x6b, - 0xc3, 0x41, 0xb3, 0x7a, 0x34, 0x12, 0xa2, 0x44, 0xaf, 0xbf, 0x07, 0xee, 0x97, 0xfc, 0xf2, 0x01, - 0x9b, 0x60, 0xd1, 0x92, 0xbf, 0x98, 0x69, 0xd2, 0xbf, 0x2a, 0x4e, 0x7b, 0x20, 0x7f, 0x2a, 0x8b, - 0xe4, 0xe6, 0xf7, 0x5f, 0xbe, 0x6a, 0xcc, 0x7d, 0xf9, 0xaa, 0x31, 0xf7, 0xd5, 0xab, 0xc6, 0xdc, - 0xcf, 0x87, 0x0d, 0xed, 0xe5, 0xb0, 0xa1, 0x7d, 0x39, 0x6c, 0x68, 0x5f, 0x0d, 0x1b, 0xda, 0x3f, - 0x87, 0x0d, 0xed, 0x97, 0x5f, 0x37, 0xe6, 0x3e, 0xdb, 0x1e, 0xff, 0xcf, 0x88, 0xff, 0x06, 0x00, - 0x00, 0xff, 0xff, 0x4a, 0x00, 0x2b, 0x10, 0xa9, 0x18, 0x00, 0x00, -} +func (m *VolumeNodeResources) Reset() { *m = VolumeNodeResources{} } func (m *CSIDriver) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -1355,7 +649,7 @@ func (m *StorageClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Parameters { keysForParameters = append(keysForParameters, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForParameters) + sort.Strings(keysForParameters) for iNdEx := len(keysForParameters) - 1; iNdEx >= 0; iNdEx-- { v := m.Parameters[string(keysForParameters[iNdEx])] baseI := i @@ -1706,7 +1000,7 @@ func (m *VolumeAttachmentStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) for k := range m.AttachmentMetadata { keysForAttachmentMetadata = append(keysForAttachmentMetadata, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata) + sort.Strings(keysForAttachmentMetadata) for iNdEx := len(keysForAttachmentMetadata) - 1; iNdEx >= 0; iNdEx-- { v := m.AttachmentMetadata[string(keysForAttachmentMetadata[iNdEx])] baseI := i @@ -1761,7 +1055,7 @@ func (m *VolumeAttributesClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Parameters { keysForParameters = append(keysForParameters, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForParameters) + sort.Strings(keysForParameters) for iNdEx := len(keysForParameters) - 1; iNdEx >= 0; iNdEx-- { v := m.Parameters[string(keysForParameters[iNdEx])] baseI := i @@ -2495,7 +1789,7 @@ func (this *StorageClass) String() string { for k := range this.Parameters { keysForParameters = append(keysForParameters, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForParameters) + sort.Strings(keysForParameters) mapStringForParameters := "map[string]string{" for _, k := range keysForParameters { mapStringForParameters += fmt.Sprintf("%v: %v,", k, this.Parameters[k]) @@ -2600,7 +1894,7 @@ func (this *VolumeAttachmentStatus) String() string { for k := range this.AttachmentMetadata { keysForAttachmentMetadata = append(keysForAttachmentMetadata, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata) + sort.Strings(keysForAttachmentMetadata) mapStringForAttachmentMetadata := "map[string]string{" for _, k := range keysForAttachmentMetadata { mapStringForAttachmentMetadata += fmt.Sprintf("%v: %v,", k, this.AttachmentMetadata[k]) @@ -2623,7 +1917,7 @@ func (this *VolumeAttributesClass) String() string { for k := range this.Parameters { keysForParameters = append(keysForParameters, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForParameters) + sort.Strings(keysForParameters) mapStringForParameters := "map[string]string{" for _, k := range keysForParameters { mapStringForParameters += fmt.Sprintf("%v: %v,", k, this.Parameters[k]) diff --git a/staging/src/k8s.io/api/storage/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/api/storage/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..a288b7fb6a0a2 --- /dev/null +++ b/staging/src/k8s.io/api/storage/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,64 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*CSIDriver) ProtoMessage() {} + +func (*CSIDriverList) ProtoMessage() {} + +func (*CSIDriverSpec) ProtoMessage() {} + +func (*CSINode) ProtoMessage() {} + +func (*CSINodeDriver) ProtoMessage() {} + +func (*CSINodeList) ProtoMessage() {} + +func (*CSINodeSpec) ProtoMessage() {} + +func (*CSIStorageCapacity) ProtoMessage() {} + +func (*CSIStorageCapacityList) ProtoMessage() {} + +func (*StorageClass) ProtoMessage() {} + +func (*StorageClassList) ProtoMessage() {} + +func (*TokenRequest) ProtoMessage() {} + +func (*VolumeAttachment) ProtoMessage() {} + +func (*VolumeAttachmentList) ProtoMessage() {} + +func (*VolumeAttachmentSource) ProtoMessage() {} + +func (*VolumeAttachmentSpec) ProtoMessage() {} + +func (*VolumeAttachmentStatus) ProtoMessage() {} + +func (*VolumeAttributesClass) ProtoMessage() {} + +func (*VolumeAttributesClassList) ProtoMessage() {} + +func (*VolumeError) ProtoMessage() {} + +func (*VolumeNodeResources) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/storage/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/api/storage/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..8453d86b22afb --- /dev/null +++ b/staging/src/k8s.io/api/storage/v1beta1/zz_generated.model_name.go @@ -0,0 +1,127 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSIDriver) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.CSIDriver" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSIDriverList) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.CSIDriverList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSIDriverSpec) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.CSIDriverSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSINode) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.CSINode" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSINodeDriver) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.CSINodeDriver" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSINodeList) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.CSINodeList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSINodeSpec) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.CSINodeSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSIStorageCapacity) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.CSIStorageCapacity" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CSIStorageCapacityList) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.CSIStorageCapacityList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StorageClass) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.StorageClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StorageClassList) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.StorageClassList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TokenRequest) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.TokenRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttachment) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.VolumeAttachment" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttachmentList) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.VolumeAttachmentList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttachmentSource) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.VolumeAttachmentSource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttachmentSpec) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.VolumeAttachmentSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttachmentStatus) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.VolumeAttachmentStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttributesClass) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.VolumeAttributesClass" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeAttributesClassList) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.VolumeAttributesClassList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeError) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.VolumeError" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in VolumeNodeResources) OpenAPIModelName() string { + return "io.k8s.api.storage.v1beta1.VolumeNodeResources" +} diff --git a/staging/src/k8s.io/api/storagemigration/v1alpha1/doc.go b/staging/src/k8s.io/api/storagemigration/v1alpha1/doc.go index df8f3a65d450f..4a1723d12a4c2 100644 --- a/staging/src/k8s.io/api/storagemigration/v1alpha1/doc.go +++ b/staging/src/k8s.io/api/storagemigration/v1alpha1/doc.go @@ -18,6 +18,8 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.api.storagemigration.v1alpha1 + // +groupName=storagemigration.k8s.io package v1alpha1 diff --git a/staging/src/k8s.io/api/storagemigration/v1alpha1/generated.pb.go b/staging/src/k8s.io/api/storagemigration/v1alpha1/generated.pb.go index ed57f34b59ebe..86f05efea5869 100644 --- a/staging/src/k8s.io/api/storagemigration/v1alpha1/generated.pb.go +++ b/staging/src/k8s.io/api/storagemigration/v1alpha1/generated.pb.go @@ -24,256 +24,24 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - k8s_io_api_core_v1 "k8s.io/api/core/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *MigrationCondition) Reset() { *m = MigrationCondition{} } -func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } -func (*GroupVersionResource) ProtoMessage() {} -func (*GroupVersionResource) Descriptor() ([]byte, []int) { - return fileDescriptor_0117377a57b172b9, []int{0} -} -func (m *GroupVersionResource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GroupVersionResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GroupVersionResource) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupVersionResource.Merge(m, src) -} -func (m *GroupVersionResource) XXX_Size() int { - return m.Size() -} -func (m *GroupVersionResource) XXX_DiscardUnknown() { - xxx_messageInfo_GroupVersionResource.DiscardUnknown(m) -} +func (m *StorageVersionMigration) Reset() { *m = StorageVersionMigration{} } -var xxx_messageInfo_GroupVersionResource proto.InternalMessageInfo +func (m *StorageVersionMigrationList) Reset() { *m = StorageVersionMigrationList{} } -func (m *MigrationCondition) Reset() { *m = MigrationCondition{} } -func (*MigrationCondition) ProtoMessage() {} -func (*MigrationCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_0117377a57b172b9, []int{1} -} -func (m *MigrationCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MigrationCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *MigrationCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_MigrationCondition.Merge(m, src) -} -func (m *MigrationCondition) XXX_Size() int { - return m.Size() -} -func (m *MigrationCondition) XXX_DiscardUnknown() { - xxx_messageInfo_MigrationCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_MigrationCondition proto.InternalMessageInfo +func (m *StorageVersionMigrationSpec) Reset() { *m = StorageVersionMigrationSpec{} } -func (m *StorageVersionMigration) Reset() { *m = StorageVersionMigration{} } -func (*StorageVersionMigration) ProtoMessage() {} -func (*StorageVersionMigration) Descriptor() ([]byte, []int) { - return fileDescriptor_0117377a57b172b9, []int{2} -} -func (m *StorageVersionMigration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageVersionMigration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StorageVersionMigration) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageVersionMigration.Merge(m, src) -} -func (m *StorageVersionMigration) XXX_Size() int { - return m.Size() -} -func (m *StorageVersionMigration) XXX_DiscardUnknown() { - xxx_messageInfo_StorageVersionMigration.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageVersionMigration proto.InternalMessageInfo - -func (m *StorageVersionMigrationList) Reset() { *m = StorageVersionMigrationList{} } -func (*StorageVersionMigrationList) ProtoMessage() {} -func (*StorageVersionMigrationList) Descriptor() ([]byte, []int) { - return fileDescriptor_0117377a57b172b9, []int{3} -} -func (m *StorageVersionMigrationList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageVersionMigrationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StorageVersionMigrationList) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageVersionMigrationList.Merge(m, src) -} -func (m *StorageVersionMigrationList) XXX_Size() int { - return m.Size() -} -func (m *StorageVersionMigrationList) XXX_DiscardUnknown() { - xxx_messageInfo_StorageVersionMigrationList.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageVersionMigrationList proto.InternalMessageInfo - -func (m *StorageVersionMigrationSpec) Reset() { *m = StorageVersionMigrationSpec{} } -func (*StorageVersionMigrationSpec) ProtoMessage() {} -func (*StorageVersionMigrationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_0117377a57b172b9, []int{4} -} -func (m *StorageVersionMigrationSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageVersionMigrationSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StorageVersionMigrationSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageVersionMigrationSpec.Merge(m, src) -} -func (m *StorageVersionMigrationSpec) XXX_Size() int { - return m.Size() -} -func (m *StorageVersionMigrationSpec) XXX_DiscardUnknown() { - xxx_messageInfo_StorageVersionMigrationSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageVersionMigrationSpec proto.InternalMessageInfo - -func (m *StorageVersionMigrationStatus) Reset() { *m = StorageVersionMigrationStatus{} } -func (*StorageVersionMigrationStatus) ProtoMessage() {} -func (*StorageVersionMigrationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_0117377a57b172b9, []int{5} -} -func (m *StorageVersionMigrationStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageVersionMigrationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StorageVersionMigrationStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageVersionMigrationStatus.Merge(m, src) -} -func (m *StorageVersionMigrationStatus) XXX_Size() int { - return m.Size() -} -func (m *StorageVersionMigrationStatus) XXX_DiscardUnknown() { - xxx_messageInfo_StorageVersionMigrationStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageVersionMigrationStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*GroupVersionResource)(nil), "k8s.io.api.storagemigration.v1alpha1.GroupVersionResource") - proto.RegisterType((*MigrationCondition)(nil), "k8s.io.api.storagemigration.v1alpha1.MigrationCondition") - proto.RegisterType((*StorageVersionMigration)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigration") - proto.RegisterType((*StorageVersionMigrationList)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigrationList") - proto.RegisterType((*StorageVersionMigrationSpec)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigrationSpec") - proto.RegisterType((*StorageVersionMigrationStatus)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigrationStatus") -} - -func init() { - proto.RegisterFile("k8s.io/api/storagemigration/v1alpha1/generated.proto", fileDescriptor_0117377a57b172b9) -} - -var fileDescriptor_0117377a57b172b9 = []byte{ - // 719 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x4f, 0x13, 0x4f, - 0x14, 0xef, 0x42, 0x0b, 0x7c, 0xa7, 0x5f, 0xc0, 0x4c, 0x14, 0x1a, 0x8c, 0x5b, 0x53, 0x09, 0x41, - 0xa3, 0xb3, 0xd2, 0x10, 0x43, 0x30, 0x1e, 0x28, 0x07, 0xa3, 0x81, 0x98, 0x0c, 0xc8, 0xc1, 0x78, - 0x70, 0xba, 0x1d, 0xb7, 0x43, 0xd9, 0x9d, 0xcd, 0xce, 0x6c, 0x13, 0x6e, 0xfe, 0x09, 0x1e, 0xfc, - 0x93, 0x3c, 0x70, 0x31, 0xe1, 0xc8, 0xc5, 0x2a, 0xf5, 0xbf, 0xe0, 0x64, 0x66, 0x76, 0x76, 0xfb, - 0x8b, 0x62, 0x13, 0x6e, 0x3b, 0xef, 0xbd, 0xcf, 0x67, 0xde, 0x7b, 0x9f, 0x79, 0x6f, 0xc1, 0x66, - 0x6b, 0x4b, 0x20, 0xc6, 0x1d, 0x12, 0x32, 0x47, 0x48, 0x1e, 0x11, 0x8f, 0xfa, 0xcc, 0x8b, 0x88, - 0x64, 0x3c, 0x70, 0xda, 0x1b, 0xe4, 0x24, 0x6c, 0x92, 0x0d, 0xc7, 0xa3, 0x01, 0x8d, 0x88, 0xa4, - 0x0d, 0x14, 0x46, 0x5c, 0x72, 0xb8, 0x9a, 0xa0, 0x10, 0x09, 0x19, 0x1a, 0x46, 0xa1, 0x14, 0xb5, - 0xf2, 0xcc, 0x63, 0xb2, 0x19, 0xd7, 0x91, 0xcb, 0x7d, 0xc7, 0xe3, 0x1e, 0x77, 0x34, 0xb8, 0x1e, - 0x7f, 0xd6, 0x27, 0x7d, 0xd0, 0x5f, 0x09, 0xe9, 0x4a, 0xa5, 0x2f, 0x15, 0x97, 0x47, 0xd4, 0x69, - 0x8f, 0x5c, 0xbc, 0xd2, 0x97, 0xae, 0x4f, 0xdc, 0x26, 0x0b, 0x68, 0x74, 0xea, 0x84, 0x2d, 0x4f, - 0x19, 0x84, 0xe3, 0x53, 0x49, 0xae, 0x43, 0x39, 0xe3, 0x50, 0x51, 0x1c, 0x48, 0xe6, 0xd3, 0x11, - 0xc0, 0x8b, 0x7f, 0x01, 0x84, 0xdb, 0xa4, 0x3e, 0x19, 0xc6, 0x55, 0xbe, 0x59, 0xe0, 0xee, 0xeb, - 0x88, 0xc7, 0xe1, 0x11, 0x8d, 0x04, 0xe3, 0x01, 0xa6, 0x82, 0xc7, 0x91, 0x4b, 0xe1, 0x23, 0x50, - 0xf0, 0x94, 0xbd, 0x64, 0x3d, 0xb4, 0xd6, 0xff, 0xab, 0xcd, 0x9f, 0x75, 0xca, 0xb9, 0x6e, 0xa7, - 0x5c, 0xd0, 0xc1, 0x38, 0xf1, 0xc1, 0xc7, 0x60, 0xb6, 0x9d, 0xe0, 0x4a, 0x53, 0x3a, 0x6c, 0xd1, - 0x84, 0xcd, 0xa6, 0x74, 0xa9, 0x1f, 0x3e, 0x05, 0x73, 0x91, 0xe1, 0x2e, 0x4d, 0xeb, 0xd8, 0x3b, - 0x26, 0x76, 0x2e, 0xbd, 0x13, 0x67, 0x11, 0x95, 0x9f, 0x53, 0x00, 0xee, 0xa7, 0xfa, 0xec, 0xf2, - 0xa0, 0xc1, 0xd4, 0x07, 0xdc, 0x06, 0x79, 0x79, 0x1a, 0x52, 0x93, 0xd3, 0x9a, 0x21, 0xc8, 0x1f, - 0x9e, 0x86, 0xf4, 0xaa, 0x53, 0x5e, 0x1a, 0x45, 0x28, 0x0f, 0xd6, 0x18, 0xb8, 0x07, 0x66, 0x84, - 0x24, 0x32, 0x16, 0x26, 0xd5, 0x4d, 0x83, 0x9e, 0x39, 0xd0, 0xd6, 0xab, 0x4e, 0xf9, 0x1a, 0x39, - 0x51, 0xc6, 0x94, 0x44, 0x61, 0xc3, 0x01, 0x8f, 0xc1, 0xc2, 0x09, 0x11, 0xf2, 0x7d, 0xd8, 0x20, - 0x92, 0x1e, 0x32, 0x3f, 0x29, 0xaa, 0x58, 0x7d, 0x82, 0x7a, 0x0f, 0x2d, 0x13, 0x02, 0x85, 0x2d, - 0x4f, 0x19, 0x04, 0x52, 0x7a, 0xa3, 0xf6, 0x06, 0x52, 0x88, 0xda, 0x92, 0xc9, 0x60, 0x61, 0x6f, - 0x80, 0x09, 0x0f, 0x31, 0xc3, 0x35, 0x30, 0x13, 0x51, 0x22, 0x78, 0x50, 0xca, 0xeb, 0xcc, 0x17, - 0xd2, 0xcc, 0xb1, 0xb6, 0x62, 0xe3, 0x55, 0x6a, 0xf8, 0x54, 0x08, 0xe2, 0xd1, 0x52, 0x61, 0x50, - 0x8d, 0xfd, 0xc4, 0x8c, 0x53, 0x7f, 0xe5, 0xc7, 0x14, 0x58, 0x3e, 0x48, 0xc6, 0xc0, 0x28, 0x95, - 0xf5, 0x0e, 0x7e, 0x02, 0x73, 0x2a, 0xcd, 0x06, 0x91, 0x44, 0x37, 0xba, 0x58, 0x7d, 0x3e, 0x59, - 0x51, 0xef, 0xea, 0xc7, 0xd4, 0x95, 0xfb, 0x54, 0x92, 0x1a, 0x34, 0x37, 0x83, 0x9e, 0x0d, 0x67, - 0xac, 0xd0, 0x05, 0x79, 0x11, 0x52, 0x57, 0x0b, 0x51, 0xac, 0xee, 0xa0, 0x49, 0x66, 0x13, 0x8d, - 0x49, 0xf7, 0x20, 0xa4, 0x6e, 0xed, 0xff, 0xf4, 0x25, 0xa8, 0x13, 0xd6, 0xe4, 0xb0, 0x95, 0xe9, - 0x9d, 0x28, 0xb3, 0x7b, 0xbb, 0x6b, 0x34, 0x55, 0xaf, 0xf5, 0x83, 0xcf, 0xa1, 0xf2, 0xcb, 0x02, - 0xf7, 0xc7, 0x20, 0xf7, 0x98, 0x90, 0xf0, 0xe3, 0x48, 0x4f, 0xd1, 0x64, 0x3d, 0x55, 0x68, 0xdd, - 0xd1, 0x6c, 0x5a, 0x52, 0x4b, 0x5f, 0x3f, 0xeb, 0xa0, 0xc0, 0x24, 0xf5, 0xd5, 0xcb, 0x9e, 0x5e, - 0x2f, 0x56, 0x5f, 0xdd, 0xaa, 0xd2, 0xde, 0xa8, 0xbf, 0x51, 0x9c, 0x38, 0xa1, 0xae, 0x7c, 0x1f, - 0x5f, 0xa1, 0x6a, 0x3a, 0x6c, 0xf6, 0xcd, 0x77, 0x52, 0xe1, 0xf6, 0x64, 0x69, 0x5c, 0xb7, 0x7d, - 0x6e, 0xda, 0x0d, 0xf0, 0x25, 0x98, 0x77, 0x79, 0x20, 0x59, 0x10, 0xd3, 0x43, 0xde, 0xa2, 0xe9, - 0xea, 0xb9, 0x67, 0x20, 0xf3, 0xbb, 0xfd, 0x4e, 0x3c, 0x18, 0x5b, 0x39, 0xb7, 0xc0, 0x83, 0x1b, - 0x25, 0x86, 0x27, 0x00, 0xb8, 0xe9, 0xd0, 0x8b, 0x92, 0xa5, 0x3b, 0xba, 0x35, 0x59, 0x29, 0xa3, - 0xfb, 0xa7, 0x37, 0x08, 0x99, 0x49, 0xe0, 0x3e, 0x7e, 0xb8, 0x03, 0x16, 0xd3, 0xc2, 0x8e, 0x06, - 0x36, 0xe9, 0xb2, 0x01, 0x2e, 0xe2, 0x41, 0x37, 0x1e, 0x8e, 0xaf, 0xbd, 0x3d, 0xbb, 0xb4, 0x73, - 0xe7, 0x97, 0x76, 0xee, 0xe2, 0xd2, 0xce, 0x7d, 0xe9, 0xda, 0xd6, 0x59, 0xd7, 0xb6, 0xce, 0xbb, - 0xb6, 0x75, 0xd1, 0xb5, 0xad, 0xdf, 0x5d, 0xdb, 0xfa, 0xfa, 0xc7, 0xce, 0x7d, 0x58, 0x9d, 0xe4, - 0xb7, 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0x01, 0xc1, 0xb1, 0xd8, 0x5d, 0x07, 0x00, 0x00, -} +func (m *StorageVersionMigrationStatus) Reset() { *m = StorageVersionMigrationStatus{} } func (m *GroupVersionResource) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/api/storagemigration/v1alpha1/generated.protomessage.pb.go b/staging/src/k8s.io/api/storagemigration/v1alpha1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..433aae16a419b --- /dev/null +++ b/staging/src/k8s.io/api/storagemigration/v1alpha1/generated.protomessage.pb.go @@ -0,0 +1,34 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1alpha1 + +func (*GroupVersionResource) ProtoMessage() {} + +func (*MigrationCondition) ProtoMessage() {} + +func (*StorageVersionMigration) ProtoMessage() {} + +func (*StorageVersionMigrationList) ProtoMessage() {} + +func (*StorageVersionMigrationSpec) ProtoMessage() {} + +func (*StorageVersionMigrationStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/api/storagemigration/v1alpha1/zz_generated.model_name.go b/staging/src/k8s.io/api/storagemigration/v1alpha1/zz_generated.model_name.go new file mode 100644 index 0000000000000..9ca924ed0419a --- /dev/null +++ b/staging/src/k8s.io/api/storagemigration/v1alpha1/zz_generated.model_name.go @@ -0,0 +1,52 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1alpha1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GroupVersionResource) OpenAPIModelName() string { + return "io.k8s.api.storagemigration.v1alpha1.GroupVersionResource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MigrationCondition) OpenAPIModelName() string { + return "io.k8s.api.storagemigration.v1alpha1.MigrationCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StorageVersionMigration) OpenAPIModelName() string { + return "io.k8s.api.storagemigration.v1alpha1.StorageVersionMigration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StorageVersionMigrationList) OpenAPIModelName() string { + return "io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StorageVersionMigrationSpec) OpenAPIModelName() string { + return "io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StorageVersionMigrationStatus) OpenAPIModelName() string { + return "io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationStatus" +} diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Pod.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Pod.after_roundtrip.pb deleted file mode 100644 index 3cfdaa73be3c2..0000000000000 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Pod.after_roundtrip.pb and /dev/null differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodStatusResult.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodStatusResult.after_roundtrip.pb deleted file mode 100644 index 13be65b0a5e2b..0000000000000 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodStatusResult.after_roundtrip.pb and /dev/null differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceSlice.pb b/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceSlice.pb deleted file mode 100644 index 3f467050c4462..0000000000000 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceSlice.pb and /dev/null differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admission.k8s.io.v1.AdmissionReview.json b/staging/src/k8s.io/api/testdata/v1.34.0/admission.k8s.io.v1.AdmissionReview.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admission.k8s.io.v1.AdmissionReview.json rename to staging/src/k8s.io/api/testdata/v1.34.0/admission.k8s.io.v1.AdmissionReview.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admission.k8s.io.v1.AdmissionReview.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admission.k8s.io.v1.AdmissionReview.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admission.k8s.io.v1.AdmissionReview.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/admission.k8s.io.v1.AdmissionReview.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admission.k8s.io.v1.AdmissionReview.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admission.k8s.io.v1.AdmissionReview.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admission.k8s.io.v1.AdmissionReview.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/admission.k8s.io.v1.AdmissionReview.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admission.k8s.io.v1beta1.AdmissionReview.json b/staging/src/k8s.io/api/testdata/v1.34.0/admission.k8s.io.v1beta1.AdmissionReview.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admission.k8s.io.v1beta1.AdmissionReview.json rename to staging/src/k8s.io/api/testdata/v1.34.0/admission.k8s.io.v1beta1.AdmissionReview.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admission.k8s.io.v1beta1.AdmissionReview.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admission.k8s.io.v1beta1.AdmissionReview.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admission.k8s.io.v1beta1.AdmissionReview.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/admission.k8s.io.v1beta1.AdmissionReview.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admission.k8s.io.v1beta1.AdmissionReview.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admission.k8s.io.v1beta1.AdmissionReview.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admission.k8s.io.v1beta1.AdmissionReview.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/admission.k8s.io.v1beta1.AdmissionReview.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.MutatingWebhookConfiguration.json b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.MutatingWebhookConfiguration.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.MutatingWebhookConfiguration.json rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.MutatingWebhookConfiguration.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.MutatingWebhookConfiguration.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.MutatingWebhookConfiguration.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.MutatingWebhookConfiguration.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.MutatingWebhookConfiguration.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.MutatingWebhookConfiguration.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.MutatingWebhookConfiguration.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.MutatingWebhookConfiguration.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.MutatingWebhookConfiguration.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicy.json b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicy.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicy.json rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicy.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicy.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicy.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicy.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicy.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicy.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicy.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicy.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicy.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicyBinding.json b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicyBinding.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicyBinding.json rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicyBinding.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicyBinding.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicyBinding.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicyBinding.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicyBinding.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicyBinding.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicyBinding.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicyBinding.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingAdmissionPolicyBinding.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingWebhookConfiguration.json b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingWebhookConfiguration.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingWebhookConfiguration.json rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingWebhookConfiguration.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingWebhookConfiguration.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingWebhookConfiguration.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingWebhookConfiguration.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingWebhookConfiguration.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingWebhookConfiguration.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingWebhookConfiguration.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1.ValidatingWebhookConfiguration.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1.ValidatingWebhookConfiguration.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicy.json b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicy.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicy.json rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicy.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicy.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicy.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicy.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicy.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicy.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicy.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicy.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicy.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicyBinding.json b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicyBinding.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicyBinding.json rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicyBinding.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicyBinding.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicyBinding.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicyBinding.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicyBinding.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicyBinding.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicyBinding.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicyBinding.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.MutatingAdmissionPolicyBinding.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicy.json b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicy.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicy.json rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicy.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicy.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicy.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicy.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicy.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicy.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicy.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicy.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicy.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicyBinding.json b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicyBinding.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicyBinding.json rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicyBinding.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicyBinding.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicyBinding.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicyBinding.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicyBinding.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicyBinding.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicyBinding.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicyBinding.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1alpha1.ValidatingAdmissionPolicyBinding.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicy.json b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicy.json new file mode 100644 index 0000000000000..937fa114f5ffa --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicy.json @@ -0,0 +1,148 @@ +{ + "kind": "MutatingAdmissionPolicy", + "apiVersion": "admissionregistration.k8s.io/v1beta1", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "spec": { + "paramKind": { + "apiVersion": "apiVersionValue", + "kind": "kindValue" + }, + "matchConstraints": { + "namespaceSelector": { + "matchLabels": { + "matchLabelsKey": "matchLabelsValue" + }, + "matchExpressions": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ] + }, + "objectSelector": { + "matchLabels": { + "matchLabelsKey": "matchLabelsValue" + }, + "matchExpressions": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ] + }, + "resourceRules": [ + { + "resourceNames": [ + "resourceNamesValue" + ], + "operations": [ + "operationsValue" + ], + "apiGroups": [ + "apiGroupsValue" + ], + "apiVersions": [ + "apiVersionsValue" + ], + "resources": [ + "resourcesValue" + ], + "scope": "scopeValue" + } + ], + "excludeResourceRules": [ + { + "resourceNames": [ + "resourceNamesValue" + ], + "operations": [ + "operationsValue" + ], + "apiGroups": [ + "apiGroupsValue" + ], + "apiVersions": [ + "apiVersionsValue" + ], + "resources": [ + "resourcesValue" + ], + "scope": "scopeValue" + } + ], + "matchPolicy": "matchPolicyValue" + }, + "variables": [ + { + "name": "nameValue", + "expression": "expressionValue" + } + ], + "mutations": [ + { + "patchType": "patchTypeValue", + "applyConfiguration": { + "expression": "expressionValue" + }, + "jsonPatch": { + "expression": "expressionValue" + } + } + ], + "failurePolicy": "failurePolicyValue", + "matchConditions": [ + { + "name": "nameValue", + "expression": "expressionValue" + } + ], + "reinvocationPolicy": "reinvocationPolicyValue" + } +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicy.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicy.pb new file mode 100644 index 0000000000000..34793ae99580c Binary files /dev/null and b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicy.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicy.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicy.yaml new file mode 100644 index 0000000000000..c32d9a29a5f11 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicy.yaml @@ -0,0 +1,94 @@ +apiVersion: admissionregistration.k8s.io/v1beta1 +kind: MutatingAdmissionPolicy +metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue +spec: + failurePolicy: failurePolicyValue + matchConditions: + - expression: expressionValue + name: nameValue + matchConstraints: + excludeResourceRules: + - apiGroups: + - apiGroupsValue + apiVersions: + - apiVersionsValue + operations: + - operationsValue + resourceNames: + - resourceNamesValue + resources: + - resourcesValue + scope: scopeValue + matchPolicy: matchPolicyValue + namespaceSelector: + matchExpressions: + - key: keyValue + operator: operatorValue + values: + - valuesValue + matchLabels: + matchLabelsKey: matchLabelsValue + objectSelector: + matchExpressions: + - key: keyValue + operator: operatorValue + values: + - valuesValue + matchLabels: + matchLabelsKey: matchLabelsValue + resourceRules: + - apiGroups: + - apiGroupsValue + apiVersions: + - apiVersionsValue + operations: + - operationsValue + resourceNames: + - resourceNamesValue + resources: + - resourcesValue + scope: scopeValue + mutations: + - applyConfiguration: + expression: expressionValue + jsonPatch: + expression: expressionValue + patchType: patchTypeValue + paramKind: + apiVersion: apiVersionValue + kind: kindValue + reinvocationPolicy: reinvocationPolicyValue + variables: + - expression: expressionValue + name: nameValue diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicyBinding.json b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicyBinding.json new file mode 100644 index 0000000000000..70fb8eb402dcd --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicyBinding.json @@ -0,0 +1,139 @@ +{ + "kind": "MutatingAdmissionPolicyBinding", + "apiVersion": "admissionregistration.k8s.io/v1beta1", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "spec": { + "policyName": "policyNameValue", + "paramRef": { + "name": "nameValue", + "namespace": "namespaceValue", + "selector": { + "matchLabels": { + "matchLabelsKey": "matchLabelsValue" + }, + "matchExpressions": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ] + }, + "parameterNotFoundAction": "parameterNotFoundActionValue" + }, + "matchResources": { + "namespaceSelector": { + "matchLabels": { + "matchLabelsKey": "matchLabelsValue" + }, + "matchExpressions": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ] + }, + "objectSelector": { + "matchLabels": { + "matchLabelsKey": "matchLabelsValue" + }, + "matchExpressions": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ] + }, + "resourceRules": [ + { + "resourceNames": [ + "resourceNamesValue" + ], + "operations": [ + "operationsValue" + ], + "apiGroups": [ + "apiGroupsValue" + ], + "apiVersions": [ + "apiVersionsValue" + ], + "resources": [ + "resourcesValue" + ], + "scope": "scopeValue" + } + ], + "excludeResourceRules": [ + { + "resourceNames": [ + "resourceNamesValue" + ], + "operations": [ + "operationsValue" + ], + "apiGroups": [ + "apiGroupsValue" + ], + "apiVersions": [ + "apiVersionsValue" + ], + "resources": [ + "resourcesValue" + ], + "scope": "scopeValue" + } + ], + "matchPolicy": "matchPolicyValue" + } + } +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicyBinding.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicyBinding.pb new file mode 100644 index 0000000000000..2297f5ce744dd Binary files /dev/null and b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicyBinding.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicyBinding.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicyBinding.yaml new file mode 100644 index 0000000000000..e14c99958938b --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingAdmissionPolicyBinding.yaml @@ -0,0 +1,90 @@ +apiVersion: admissionregistration.k8s.io/v1beta1 +kind: MutatingAdmissionPolicyBinding +metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue +spec: + matchResources: + excludeResourceRules: + - apiGroups: + - apiGroupsValue + apiVersions: + - apiVersionsValue + operations: + - operationsValue + resourceNames: + - resourceNamesValue + resources: + - resourcesValue + scope: scopeValue + matchPolicy: matchPolicyValue + namespaceSelector: + matchExpressions: + - key: keyValue + operator: operatorValue + values: + - valuesValue + matchLabels: + matchLabelsKey: matchLabelsValue + objectSelector: + matchExpressions: + - key: keyValue + operator: operatorValue + values: + - valuesValue + matchLabels: + matchLabelsKey: matchLabelsValue + resourceRules: + - apiGroups: + - apiGroupsValue + apiVersions: + - apiVersionsValue + operations: + - operationsValue + resourceNames: + - resourceNamesValue + resources: + - resourcesValue + scope: scopeValue + paramRef: + name: nameValue + namespace: namespaceValue + parameterNotFoundAction: parameterNotFoundActionValue + selector: + matchExpressions: + - key: keyValue + operator: operatorValue + values: + - valuesValue + matchLabels: + matchLabelsKey: matchLabelsValue + policyName: policyNameValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.MutatingWebhookConfiguration.json b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingWebhookConfiguration.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.MutatingWebhookConfiguration.json rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingWebhookConfiguration.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.MutatingWebhookConfiguration.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingWebhookConfiguration.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.MutatingWebhookConfiguration.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingWebhookConfiguration.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.MutatingWebhookConfiguration.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingWebhookConfiguration.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.MutatingWebhookConfiguration.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.MutatingWebhookConfiguration.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicy.json b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicy.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicy.json rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicy.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicy.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicy.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicy.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicy.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicy.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicy.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicy.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicy.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicyBinding.json b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicyBinding.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicyBinding.json rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicyBinding.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicyBinding.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicyBinding.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicyBinding.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicyBinding.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicyBinding.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicyBinding.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicyBinding.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingAdmissionPolicyBinding.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingWebhookConfiguration.json b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingWebhookConfiguration.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingWebhookConfiguration.json rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingWebhookConfiguration.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingWebhookConfiguration.pb b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingWebhookConfiguration.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingWebhookConfiguration.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingWebhookConfiguration.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingWebhookConfiguration.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingWebhookConfiguration.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/admissionregistration.k8s.io.v1beta1.ValidatingWebhookConfiguration.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/admissionregistration.k8s.io.v1beta1.ValidatingWebhookConfiguration.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apidiscovery.k8s.io.v2.APIGroupDiscovery.json b/staging/src/k8s.io/api/testdata/v1.34.0/apidiscovery.k8s.io.v2.APIGroupDiscovery.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apidiscovery.k8s.io.v2.APIGroupDiscovery.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apidiscovery.k8s.io.v2.APIGroupDiscovery.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apidiscovery.k8s.io.v2.APIGroupDiscovery.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apidiscovery.k8s.io.v2.APIGroupDiscovery.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apidiscovery.k8s.io.v2.APIGroupDiscovery.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apidiscovery.k8s.io.v2.APIGroupDiscovery.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apidiscovery.k8s.io.v2.APIGroupDiscovery.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apidiscovery.k8s.io.v2.APIGroupDiscovery.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apidiscovery.k8s.io.v2.APIGroupDiscovery.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apidiscovery.k8s.io.v2.APIGroupDiscovery.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apidiscovery.k8s.io.v2beta1.APIGroupDiscovery.json b/staging/src/k8s.io/api/testdata/v1.34.0/apidiscovery.k8s.io.v2beta1.APIGroupDiscovery.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apidiscovery.k8s.io.v2beta1.APIGroupDiscovery.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apidiscovery.k8s.io.v2beta1.APIGroupDiscovery.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apidiscovery.k8s.io.v2beta1.APIGroupDiscovery.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apidiscovery.k8s.io.v2beta1.APIGroupDiscovery.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apidiscovery.k8s.io.v2beta1.APIGroupDiscovery.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apidiscovery.k8s.io.v2beta1.APIGroupDiscovery.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apidiscovery.k8s.io.v2beta1.APIGroupDiscovery.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apidiscovery.k8s.io.v2beta1.APIGroupDiscovery.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apidiscovery.k8s.io.v2beta1.APIGroupDiscovery.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apidiscovery.k8s.io.v2beta1.APIGroupDiscovery.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.ControllerRevision.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.ControllerRevision.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.ControllerRevision.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.ControllerRevision.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.ControllerRevision.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.ControllerRevision.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.ControllerRevision.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.ControllerRevision.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.ControllerRevision.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.ControllerRevision.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.ControllerRevision.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.ControllerRevision.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.DaemonSet.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.DaemonSet.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.DaemonSet.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.DaemonSet.json index 433aa5674064c..6d0dcb9035de6 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.DaemonSet.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.DaemonSet.json @@ -360,6 +360,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -554,6 +562,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -579,6 +593,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -747,7 +772,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -850,6 +876,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -875,6 +907,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1043,7 +1086,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1146,6 +1190,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1171,6 +1221,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1339,7 +1400,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1780,7 +1842,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } }, "updateStrategy": { diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.DaemonSet.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.DaemonSet.pb similarity index 84% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.DaemonSet.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.DaemonSet.pb index b9aaa8c0cfdd7..5ce7c1d6fa7b3 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.DaemonSet.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.DaemonSet.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.DaemonSet.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.DaemonSet.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.DaemonSet.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.DaemonSet.yaml index cf27e24793bd0..1180b32af982e 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.DaemonSet.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.DaemonSet.yaml @@ -224,6 +224,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -277,6 +282,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -344,6 +350,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -440,6 +452,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -493,6 +510,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -560,6 +578,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -640,6 +664,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -658,6 +683,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -711,6 +741,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -778,6 +809,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1162,6 +1199,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.Deployment.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.Deployment.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.Deployment.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.Deployment.json index 6e68ee719130f..d2a93e6cc9a91 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.Deployment.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.Deployment.json @@ -361,6 +361,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -555,6 +563,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -580,6 +594,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -748,7 +773,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -851,6 +877,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -876,6 +908,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1044,7 +1087,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1147,6 +1191,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1172,6 +1222,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1340,7 +1401,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1781,7 +1843,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } }, "strategy": { @@ -1803,6 +1866,7 @@ "readyReplicas": 7, "availableReplicas": 4, "unavailableReplicas": 5, + "terminatingReplicas": 9, "conditions": [ { "type": "typeValue", diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.Deployment.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.Deployment.pb similarity index 83% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.Deployment.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.Deployment.pb index e51e1c32335c3..1cde4fc61f19b 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.Deployment.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.Deployment.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.Deployment.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.Deployment.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.Deployment.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.Deployment.yaml index 8952251956633..558ece9a5a776 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.Deployment.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.Deployment.yaml @@ -232,6 +232,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -285,6 +290,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -352,6 +358,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -448,6 +460,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -501,6 +518,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -568,6 +586,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -648,6 +672,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -666,6 +691,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -719,6 +749,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -786,6 +817,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1170,6 +1207,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue @@ -1244,5 +1288,6 @@ status: observedGeneration: 1 readyReplicas: 7 replicas: 2 + terminatingReplicas: 9 unavailableReplicas: 5 updatedReplicas: 3 diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.ReplicaSet.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.ReplicaSet.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.ReplicaSet.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.ReplicaSet.json index a9dfb08a3224d..6b2ef0f61af3e 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.ReplicaSet.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.ReplicaSet.json @@ -362,6 +362,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -556,6 +564,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -581,6 +595,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -749,7 +774,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -852,6 +878,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -877,6 +909,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1045,7 +1088,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1148,6 +1192,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1173,6 +1223,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1341,7 +1402,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1782,7 +1844,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } } }, @@ -1791,6 +1854,7 @@ "fullyLabeledReplicas": 2, "readyReplicas": 4, "availableReplicas": 5, + "terminatingReplicas": 7, "observedGeneration": 3, "conditions": [ { diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.ReplicaSet.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.ReplicaSet.pb similarity index 83% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.ReplicaSet.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.ReplicaSet.pb index a5ff7dd066d0d..21dce4311f643 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.ReplicaSet.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.ReplicaSet.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.ReplicaSet.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.ReplicaSet.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.ReplicaSet.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.ReplicaSet.yaml index 42fba0088fda1..9939c9cdd25e5 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.ReplicaSet.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.ReplicaSet.yaml @@ -224,6 +224,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -277,6 +282,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -344,6 +350,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -440,6 +452,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -493,6 +510,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -560,6 +578,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -640,6 +664,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -658,6 +683,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -711,6 +741,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -778,6 +809,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1162,6 +1199,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue @@ -1235,3 +1279,4 @@ status: observedGeneration: 3 readyReplicas: 4 replicas: 1 + terminatingReplicas: 7 diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.StatefulSet.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.StatefulSet.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.StatefulSet.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.StatefulSet.json index d72a8ead26141..0158c869ecf35 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.StatefulSet.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.StatefulSet.json @@ -361,6 +361,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -555,6 +563,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -580,6 +594,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -748,7 +773,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -851,6 +877,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -876,6 +908,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1044,7 +1087,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1147,6 +1191,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1172,6 +1222,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1340,7 +1401,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1781,7 +1843,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } }, "volumeClaimTemplates": [ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.StatefulSet.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.StatefulSet.pb similarity index 85% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.StatefulSet.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.StatefulSet.pb index 070fc0a6c6e28..080ea19af8787 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.StatefulSet.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.StatefulSet.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.StatefulSet.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.StatefulSet.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.StatefulSet.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.StatefulSet.yaml index ce0f847f4c9ab..052f5013f71b6 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1.StatefulSet.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1.StatefulSet.yaml @@ -232,6 +232,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -285,6 +290,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -352,6 +358,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -448,6 +460,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -501,6 +518,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -568,6 +586,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -648,6 +672,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -666,6 +691,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -719,6 +749,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -786,6 +817,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1170,6 +1207,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.ControllerRevision.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.ControllerRevision.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.ControllerRevision.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.ControllerRevision.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.ControllerRevision.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.ControllerRevision.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.ControllerRevision.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.ControllerRevision.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.ControllerRevision.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.ControllerRevision.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.ControllerRevision.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.ControllerRevision.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.Deployment.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.Deployment.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.Deployment.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.Deployment.json index 715007f246f94..44a1fa56abcab 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.Deployment.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.Deployment.json @@ -361,6 +361,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -555,6 +563,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -580,6 +594,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -748,7 +773,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -851,6 +877,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -876,6 +908,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1044,7 +1087,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1147,6 +1191,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1172,6 +1222,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1340,7 +1401,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1781,7 +1843,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } }, "strategy": { @@ -1806,6 +1869,7 @@ "readyReplicas": 7, "availableReplicas": 4, "unavailableReplicas": 5, + "terminatingReplicas": 9, "conditions": [ { "type": "typeValue", diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.Deployment.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.Deployment.pb similarity index 83% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.Deployment.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.Deployment.pb index 4ea65f9027edb..45a8516719012 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.Deployment.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.Deployment.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.Deployment.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.Deployment.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.Deployment.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.Deployment.yaml index 10b6d3d87cf1a..69f5ebcbe91ab 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.Deployment.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.Deployment.yaml @@ -234,6 +234,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -287,6 +292,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -354,6 +360,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -450,6 +462,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -503,6 +520,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -570,6 +588,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -650,6 +674,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -668,6 +693,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -721,6 +751,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -788,6 +819,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1172,6 +1209,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue @@ -1246,5 +1290,6 @@ status: observedGeneration: 1 readyReplicas: 7 replicas: 2 + terminatingReplicas: 9 unavailableReplicas: 5 updatedReplicas: 3 diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.DeploymentRollback.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.DeploymentRollback.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.DeploymentRollback.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.DeploymentRollback.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.DeploymentRollback.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.DeploymentRollback.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.DeploymentRollback.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.DeploymentRollback.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.DeploymentRollback.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.DeploymentRollback.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.DeploymentRollback.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.DeploymentRollback.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.Scale.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.Scale.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.Scale.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.Scale.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.Scale.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.Scale.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.Scale.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.Scale.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.Scale.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.Scale.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.Scale.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.Scale.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.StatefulSet.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.StatefulSet.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.StatefulSet.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.StatefulSet.json index 78802d9ddc496..2952aff2de268 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.StatefulSet.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.StatefulSet.json @@ -361,6 +361,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -555,6 +563,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -580,6 +594,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -748,7 +773,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -851,6 +877,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -876,6 +908,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1044,7 +1087,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1147,6 +1191,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1172,6 +1222,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1340,7 +1401,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1781,7 +1843,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } }, "volumeClaimTemplates": [ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.StatefulSet.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.StatefulSet.pb similarity index 85% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.StatefulSet.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.StatefulSet.pb index 6525f9a3d8b05..f531b98d8331c 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.StatefulSet.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.StatefulSet.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.StatefulSet.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.StatefulSet.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.StatefulSet.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.StatefulSet.yaml index aa3096aeec20e..6362cf5a04a50 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta1.StatefulSet.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta1.StatefulSet.yaml @@ -232,6 +232,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -285,6 +290,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -352,6 +358,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -448,6 +460,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -501,6 +518,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -568,6 +586,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -648,6 +672,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -666,6 +691,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -719,6 +749,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -786,6 +817,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1170,6 +1207,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.ControllerRevision.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.ControllerRevision.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.ControllerRevision.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.ControllerRevision.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.ControllerRevision.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.ControllerRevision.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.ControllerRevision.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.ControllerRevision.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.ControllerRevision.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.ControllerRevision.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.ControllerRevision.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.ControllerRevision.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.DaemonSet.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.DaemonSet.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.DaemonSet.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.DaemonSet.json index 4e74dd3716dbe..f018c09bb142a 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.DaemonSet.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.DaemonSet.json @@ -360,6 +360,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -554,6 +562,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -579,6 +593,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -747,7 +772,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -850,6 +876,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -875,6 +907,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1043,7 +1086,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1146,6 +1190,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1171,6 +1221,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1339,7 +1400,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1780,7 +1842,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } }, "updateStrategy": { diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.DaemonSet.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.DaemonSet.pb similarity index 84% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.DaemonSet.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.DaemonSet.pb index f7f0a63e26c58..666b353abfba8 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.DaemonSet.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.DaemonSet.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.DaemonSet.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.DaemonSet.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.DaemonSet.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.DaemonSet.yaml index 040450a2f10f8..2481149fcade6 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.DaemonSet.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.DaemonSet.yaml @@ -224,6 +224,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -277,6 +282,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -344,6 +350,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -440,6 +452,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -493,6 +510,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -560,6 +578,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -640,6 +664,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -658,6 +683,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -711,6 +741,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -778,6 +809,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1162,6 +1199,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.Deployment.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.Deployment.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.Deployment.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.Deployment.json index 4b0e0e3e50278..cf90eceac494b 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.Deployment.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.Deployment.json @@ -361,6 +361,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -555,6 +563,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -580,6 +594,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -748,7 +773,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -851,6 +877,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -876,6 +908,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1044,7 +1087,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1147,6 +1191,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1172,6 +1222,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1340,7 +1401,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1781,7 +1843,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } }, "strategy": { @@ -1803,6 +1866,7 @@ "readyReplicas": 7, "availableReplicas": 4, "unavailableReplicas": 5, + "terminatingReplicas": 9, "conditions": [ { "type": "typeValue", diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.Deployment.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.Deployment.pb similarity index 83% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.Deployment.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.Deployment.pb index f46ae2c4c8d34..4dcc3e56a9c63 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.Deployment.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.Deployment.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.Deployment.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.Deployment.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.Deployment.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.Deployment.yaml index 0ae783fea37cd..8eba35a2b83c8 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.Deployment.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.Deployment.yaml @@ -232,6 +232,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -285,6 +290,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -352,6 +358,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -448,6 +460,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -501,6 +518,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -568,6 +586,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -648,6 +672,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -666,6 +691,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -719,6 +749,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -786,6 +817,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1170,6 +1207,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue @@ -1244,5 +1288,6 @@ status: observedGeneration: 1 readyReplicas: 7 replicas: 2 + terminatingReplicas: 9 unavailableReplicas: 5 updatedReplicas: 3 diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.ReplicaSet.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.ReplicaSet.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.ReplicaSet.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.ReplicaSet.json index ccd899cc25962..53d19e86b0b5a 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.ReplicaSet.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.ReplicaSet.json @@ -362,6 +362,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -556,6 +564,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -581,6 +595,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -749,7 +774,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -852,6 +878,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -877,6 +909,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1045,7 +1088,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1148,6 +1192,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1173,6 +1223,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1341,7 +1402,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1782,7 +1844,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } } }, @@ -1791,6 +1854,7 @@ "fullyLabeledReplicas": 2, "readyReplicas": 4, "availableReplicas": 5, + "terminatingReplicas": 7, "observedGeneration": 3, "conditions": [ { diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.ReplicaSet.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.ReplicaSet.pb similarity index 83% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.ReplicaSet.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.ReplicaSet.pb index b069aa0705ace..8d1be4d0b5630 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.ReplicaSet.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.ReplicaSet.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.ReplicaSet.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.ReplicaSet.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.ReplicaSet.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.ReplicaSet.yaml index 4e4211c1da7d4..1cf516f35cc9b 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.ReplicaSet.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.ReplicaSet.yaml @@ -224,6 +224,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -277,6 +282,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -344,6 +350,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -440,6 +452,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -493,6 +510,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -560,6 +578,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -640,6 +664,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -658,6 +683,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -711,6 +741,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -778,6 +809,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1162,6 +1199,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue @@ -1235,3 +1279,4 @@ status: observedGeneration: 3 readyReplicas: 4 replicas: 1 + terminatingReplicas: 7 diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.Scale.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.Scale.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.Scale.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.Scale.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.Scale.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.Scale.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.Scale.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.Scale.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.Scale.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.Scale.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.Scale.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.Scale.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.StatefulSet.json b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.StatefulSet.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.StatefulSet.json rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.StatefulSet.json index d3f43b082b407..f281b75d16364 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.StatefulSet.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.StatefulSet.json @@ -361,6 +361,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -555,6 +563,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -580,6 +594,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -748,7 +773,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -851,6 +877,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -876,6 +908,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1044,7 +1087,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1147,6 +1191,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1172,6 +1222,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1340,7 +1401,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1781,7 +1843,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } }, "volumeClaimTemplates": [ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.StatefulSet.pb b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.StatefulSet.pb similarity index 85% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.StatefulSet.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.StatefulSet.pb index f4bd66e9e7267..840dcc0a21f43 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.StatefulSet.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.StatefulSet.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.StatefulSet.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.StatefulSet.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.StatefulSet.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.StatefulSet.yaml index 9f6105ed55b80..726b114d7a2ff 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/apps.v1beta2.StatefulSet.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/apps.v1beta2.StatefulSet.yaml @@ -232,6 +232,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -285,6 +290,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -352,6 +358,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -448,6 +460,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -501,6 +518,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -568,6 +586,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -648,6 +672,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -666,6 +691,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -719,6 +749,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -786,6 +817,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1170,6 +1207,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.SelfSubjectReview.json b/staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.SelfSubjectReview.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.SelfSubjectReview.json rename to staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.SelfSubjectReview.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.SelfSubjectReview.pb b/staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.SelfSubjectReview.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.SelfSubjectReview.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.SelfSubjectReview.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.SelfSubjectReview.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.SelfSubjectReview.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.SelfSubjectReview.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.SelfSubjectReview.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.TokenRequest.json b/staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.TokenRequest.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.TokenRequest.json rename to staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.TokenRequest.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.TokenRequest.pb b/staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.TokenRequest.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.TokenRequest.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.TokenRequest.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.TokenRequest.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.TokenRequest.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.TokenRequest.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.TokenRequest.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.TokenReview.json b/staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.TokenReview.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.TokenReview.json rename to staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.TokenReview.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.TokenReview.pb b/staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.TokenReview.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.TokenReview.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.TokenReview.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.TokenReview.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.TokenReview.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1.TokenReview.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1.TokenReview.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1beta1.SelfSubjectReview.json b/staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1beta1.SelfSubjectReview.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1beta1.SelfSubjectReview.json rename to staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1beta1.SelfSubjectReview.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1beta1.SelfSubjectReview.pb b/staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1beta1.SelfSubjectReview.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1beta1.SelfSubjectReview.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1beta1.SelfSubjectReview.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1beta1.SelfSubjectReview.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1beta1.SelfSubjectReview.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1beta1.SelfSubjectReview.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1beta1.SelfSubjectReview.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1beta1.TokenReview.json b/staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1beta1.TokenReview.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1beta1.TokenReview.json rename to staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1beta1.TokenReview.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1beta1.TokenReview.pb b/staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1beta1.TokenReview.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1beta1.TokenReview.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1beta1.TokenReview.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1beta1.TokenReview.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1beta1.TokenReview.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authentication.k8s.io.v1beta1.TokenReview.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/authentication.k8s.io.v1beta1.TokenReview.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.LocalSubjectAccessReview.json b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.LocalSubjectAccessReview.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.LocalSubjectAccessReview.json rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.LocalSubjectAccessReview.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.LocalSubjectAccessReview.pb b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.LocalSubjectAccessReview.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.LocalSubjectAccessReview.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.LocalSubjectAccessReview.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.LocalSubjectAccessReview.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.LocalSubjectAccessReview.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.LocalSubjectAccessReview.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.LocalSubjectAccessReview.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SelfSubjectAccessReview.json b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SelfSubjectAccessReview.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SelfSubjectAccessReview.json rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SelfSubjectAccessReview.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SelfSubjectAccessReview.pb b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SelfSubjectAccessReview.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SelfSubjectAccessReview.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SelfSubjectAccessReview.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SelfSubjectAccessReview.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SelfSubjectAccessReview.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SelfSubjectAccessReview.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SelfSubjectAccessReview.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SelfSubjectRulesReview.json b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SelfSubjectRulesReview.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SelfSubjectRulesReview.json rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SelfSubjectRulesReview.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SelfSubjectRulesReview.pb b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SelfSubjectRulesReview.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SelfSubjectRulesReview.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SelfSubjectRulesReview.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SelfSubjectRulesReview.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SelfSubjectRulesReview.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SelfSubjectRulesReview.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SelfSubjectRulesReview.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SubjectAccessReview.json b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SubjectAccessReview.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SubjectAccessReview.json rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SubjectAccessReview.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SubjectAccessReview.pb b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SubjectAccessReview.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SubjectAccessReview.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SubjectAccessReview.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SubjectAccessReview.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SubjectAccessReview.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1.SubjectAccessReview.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1.SubjectAccessReview.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.LocalSubjectAccessReview.json b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.LocalSubjectAccessReview.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.LocalSubjectAccessReview.json rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.LocalSubjectAccessReview.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.LocalSubjectAccessReview.pb b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.LocalSubjectAccessReview.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.LocalSubjectAccessReview.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.LocalSubjectAccessReview.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.LocalSubjectAccessReview.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.LocalSubjectAccessReview.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.LocalSubjectAccessReview.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.LocalSubjectAccessReview.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SelfSubjectAccessReview.json b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SelfSubjectAccessReview.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SelfSubjectAccessReview.json rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SelfSubjectAccessReview.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SelfSubjectAccessReview.pb b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SelfSubjectAccessReview.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SelfSubjectAccessReview.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SelfSubjectAccessReview.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SelfSubjectAccessReview.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SelfSubjectAccessReview.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SelfSubjectAccessReview.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SelfSubjectAccessReview.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SelfSubjectRulesReview.json b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SelfSubjectRulesReview.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SelfSubjectRulesReview.json rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SelfSubjectRulesReview.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SelfSubjectRulesReview.pb b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SelfSubjectRulesReview.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SelfSubjectRulesReview.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SelfSubjectRulesReview.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SelfSubjectRulesReview.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SelfSubjectRulesReview.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SelfSubjectRulesReview.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SelfSubjectRulesReview.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SubjectAccessReview.json b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SubjectAccessReview.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SubjectAccessReview.json rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SubjectAccessReview.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SubjectAccessReview.pb b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SubjectAccessReview.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SubjectAccessReview.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SubjectAccessReview.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SubjectAccessReview.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SubjectAccessReview.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/authorization.k8s.io.v1beta1.SubjectAccessReview.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/authorization.k8s.io.v1beta1.SubjectAccessReview.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v1.HorizontalPodAutoscaler.json b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v1.HorizontalPodAutoscaler.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v1.HorizontalPodAutoscaler.json rename to staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v1.HorizontalPodAutoscaler.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v1.HorizontalPodAutoscaler.pb b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v1.HorizontalPodAutoscaler.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v1.HorizontalPodAutoscaler.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v1.HorizontalPodAutoscaler.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v1.HorizontalPodAutoscaler.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v1.HorizontalPodAutoscaler.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v1.HorizontalPodAutoscaler.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v1.HorizontalPodAutoscaler.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v1.Scale.json b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v1.Scale.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v1.Scale.json rename to staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v1.Scale.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v1.Scale.pb b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v1.Scale.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v1.Scale.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v1.Scale.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v1.Scale.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v1.Scale.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v1.Scale.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v1.Scale.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2.HorizontalPodAutoscaler.json b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2.HorizontalPodAutoscaler.json similarity index 99% rename from staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2.HorizontalPodAutoscaler.json rename to staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2.HorizontalPodAutoscaler.json index f03e36623e879..4bc9fceaf70fd 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2.HorizontalPodAutoscaler.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2.HorizontalPodAutoscaler.json @@ -165,7 +165,8 @@ "value": 2, "periodSeconds": 3 } - ] + ], + "tolerance": "0" }, "scaleDown": { "stabilizationWindowSeconds": 3, @@ -176,7 +177,8 @@ "value": 2, "periodSeconds": 3 } - ] + ], + "tolerance": "0" } } }, diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2.HorizontalPodAutoscaler.pb b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2.HorizontalPodAutoscaler.pb similarity index 89% rename from staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2.HorizontalPodAutoscaler.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2.HorizontalPodAutoscaler.pb index 3d1507519883e..0d57f89ae3c65 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2.HorizontalPodAutoscaler.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2.HorizontalPodAutoscaler.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2.HorizontalPodAutoscaler.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2.HorizontalPodAutoscaler.yaml similarity index 99% rename from staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2.HorizontalPodAutoscaler.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2.HorizontalPodAutoscaler.yaml index 78ce5ba9136a3..463936eeba013 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2.HorizontalPodAutoscaler.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2.HorizontalPodAutoscaler.yaml @@ -41,6 +41,7 @@ spec: value: 2 selectPolicy: selectPolicyValue stabilizationWindowSeconds: 3 + tolerance: "0" scaleUp: policies: - periodSeconds: 3 @@ -48,6 +49,7 @@ spec: value: 2 selectPolicy: selectPolicyValue stabilizationWindowSeconds: 3 + tolerance: "0" maxReplicas: 3 metrics: - containerResource: diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2beta1.HorizontalPodAutoscaler.json b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2beta1.HorizontalPodAutoscaler.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2beta1.HorizontalPodAutoscaler.json rename to staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2beta1.HorizontalPodAutoscaler.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2beta1.HorizontalPodAutoscaler.pb b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2beta1.HorizontalPodAutoscaler.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2beta1.HorizontalPodAutoscaler.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2beta1.HorizontalPodAutoscaler.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2beta1.HorizontalPodAutoscaler.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2beta1.HorizontalPodAutoscaler.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2beta1.HorizontalPodAutoscaler.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2beta1.HorizontalPodAutoscaler.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2beta2.HorizontalPodAutoscaler.json b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2beta2.HorizontalPodAutoscaler.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2beta2.HorizontalPodAutoscaler.json rename to staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2beta2.HorizontalPodAutoscaler.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2beta2.HorizontalPodAutoscaler.pb b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2beta2.HorizontalPodAutoscaler.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2beta2.HorizontalPodAutoscaler.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2beta2.HorizontalPodAutoscaler.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2beta2.HorizontalPodAutoscaler.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2beta2.HorizontalPodAutoscaler.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/autoscaling.v2beta2.HorizontalPodAutoscaler.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/autoscaling.v2beta2.HorizontalPodAutoscaler.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.CronJob.json b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.CronJob.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.CronJob.json rename to staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.CronJob.json index cb46e57e4455c..f6aafb1835bea 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.CronJob.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.CronJob.json @@ -444,6 +444,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -638,6 +646,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -663,6 +677,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -831,7 +856,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -934,6 +960,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -959,6 +991,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1127,7 +1170,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1230,6 +1274,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1255,6 +1305,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1423,7 +1484,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1864,7 +1926,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } }, "ttlSecondsAfterFinished": 8, diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.CronJob.pb b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.CronJob.pb similarity index 84% rename from staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.CronJob.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.CronJob.pb index ff6c0f89782c1..4889e68bcc8f3 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.CronJob.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.CronJob.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.CronJob.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.CronJob.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.CronJob.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.CronJob.yaml index 773dce02c6676..cf1b872a50c8b 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.CronJob.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.CronJob.yaml @@ -284,6 +284,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -337,6 +342,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -404,6 +410,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -500,6 +512,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -553,6 +570,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -620,6 +638,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -700,6 +724,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -718,6 +743,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -771,6 +801,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -838,6 +869,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1222,6 +1259,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.Job.json b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.Job.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.Job.json rename to staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.Job.json index ce6f5c104110d..8996a2246df45 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.Job.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.Job.json @@ -395,6 +395,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -589,6 +597,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -614,6 +628,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -782,7 +807,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -885,6 +911,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -910,6 +942,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1078,7 +1121,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1181,6 +1225,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1206,6 +1256,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1374,7 +1435,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1815,7 +1877,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } }, "ttlSecondsAfterFinished": 8, diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.Job.pb b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.Job.pb similarity index 84% rename from staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.Job.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.Job.pb index 0ea948f1f7279..5395e9eddb5ce 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.Job.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.Job.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.Job.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.Job.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.Job.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.Job.yaml index b5c1219e2b08a..301e24af34f5d 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1.Job.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1.Job.yaml @@ -248,6 +248,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -301,6 +306,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -368,6 +374,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -464,6 +476,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -517,6 +534,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -584,6 +602,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -664,6 +688,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -682,6 +707,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -735,6 +765,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -802,6 +833,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1186,6 +1223,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1beta1.CronJob.json b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1beta1.CronJob.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/batch.v1beta1.CronJob.json rename to staging/src/k8s.io/api/testdata/v1.34.0/batch.v1beta1.CronJob.json index 4b1b0704bbb9d..dc6ace974dce6 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1beta1.CronJob.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1beta1.CronJob.json @@ -444,6 +444,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -638,6 +646,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -663,6 +677,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -831,7 +856,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -934,6 +960,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -959,6 +991,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1127,7 +1170,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1230,6 +1274,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1255,6 +1305,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1423,7 +1484,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1864,7 +1926,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } }, "ttlSecondsAfterFinished": 8, diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1beta1.CronJob.pb b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1beta1.CronJob.pb similarity index 84% rename from staging/src/k8s.io/api/testdata/v1.32.0/batch.v1beta1.CronJob.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/batch.v1beta1.CronJob.pb index abe891dbe0f49..a6776263a4dc2 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1beta1.CronJob.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1beta1.CronJob.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1beta1.CronJob.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1beta1.CronJob.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/batch.v1beta1.CronJob.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/batch.v1beta1.CronJob.yaml index 2a6e4e78b6e74..90eb8120b3ff8 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/batch.v1beta1.CronJob.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/batch.v1beta1.CronJob.yaml @@ -284,6 +284,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -337,6 +342,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -404,6 +410,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -500,6 +512,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -553,6 +570,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -620,6 +638,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -700,6 +724,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -718,6 +743,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -771,6 +801,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -838,6 +869,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1222,6 +1259,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1.CertificateSigningRequest.json b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1.CertificateSigningRequest.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1.CertificateSigningRequest.json rename to staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1.CertificateSigningRequest.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1.CertificateSigningRequest.pb b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1.CertificateSigningRequest.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1.CertificateSigningRequest.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1.CertificateSigningRequest.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1.CertificateSigningRequest.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1.CertificateSigningRequest.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1.CertificateSigningRequest.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1.CertificateSigningRequest.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1alpha1.ClusterTrustBundle.json b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1alpha1.ClusterTrustBundle.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1alpha1.ClusterTrustBundle.json rename to staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1alpha1.ClusterTrustBundle.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1alpha1.ClusterTrustBundle.pb b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1alpha1.ClusterTrustBundle.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1alpha1.ClusterTrustBundle.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1alpha1.ClusterTrustBundle.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1alpha1.ClusterTrustBundle.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1alpha1.ClusterTrustBundle.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1alpha1.ClusterTrustBundle.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1alpha1.ClusterTrustBundle.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1alpha1.PodCertificateRequest.json b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1alpha1.PodCertificateRequest.json new file mode 100644 index 0000000000000..e81b1b5b5d2ed --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1alpha1.PodCertificateRequest.json @@ -0,0 +1,74 @@ +{ + "kind": "PodCertificateRequest", + "apiVersion": "certificates.k8s.io/v1alpha1", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "spec": { + "signerName": "signerNameValue", + "podName": "podNameValue", + "podUID": "podUIDValue", + "serviceAccountName": "serviceAccountNameValue", + "serviceAccountUID": "serviceAccountUIDValue", + "nodeName": "nodeNameValue", + "nodeUID": "nodeUIDValue", + "maxExpirationSeconds": 8, + "pkixPublicKey": "CQ==", + "proofOfPossession": "Cg==" + }, + "status": { + "conditions": [ + { + "type": "typeValue", + "status": "statusValue", + "observedGeneration": 3, + "lastTransitionTime": "2004-01-01T01:01:01Z", + "reason": "reasonValue", + "message": "messageValue" + } + ], + "certificateChain": "certificateChainValue", + "notBefore": "2004-01-01T01:01:01Z", + "beginRefreshAt": "2005-01-01T01:01:01Z", + "notAfter": "2006-01-01T01:01:01Z" + } +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceSlice.pb b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1alpha1.PodCertificateRequest.pb similarity index 50% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceSlice.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1alpha1.PodCertificateRequest.pb index 9a36629f9a87a..12a02aa6a0e46 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceSlice.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1alpha1.PodCertificateRequest.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1alpha1.PodCertificateRequest.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1alpha1.PodCertificateRequest.yaml new file mode 100644 index 0000000000000..8df2871a64ec2 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1alpha1.PodCertificateRequest.yaml @@ -0,0 +1,57 @@ +apiVersion: certificates.k8s.io/v1alpha1 +kind: PodCertificateRequest +metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue +spec: + maxExpirationSeconds: 8 + nodeName: nodeNameValue + nodeUID: nodeUIDValue + pkixPublicKey: CQ== + podName: podNameValue + podUID: podUIDValue + proofOfPossession: Cg== + serviceAccountName: serviceAccountNameValue + serviceAccountUID: serviceAccountUIDValue + signerName: signerNameValue +status: + beginRefreshAt: "2005-01-01T01:01:01Z" + certificateChain: certificateChainValue + conditions: + - lastTransitionTime: "2004-01-01T01:01:01Z" + message: messageValue + observedGeneration: 3 + reason: reasonValue + status: statusValue + type: typeValue + notAfter: "2006-01-01T01:01:01Z" + notBefore: "2004-01-01T01:01:01Z" diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1beta1.CertificateSigningRequest.json b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1beta1.CertificateSigningRequest.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1beta1.CertificateSigningRequest.json rename to staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1beta1.CertificateSigningRequest.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1beta1.CertificateSigningRequest.pb b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1beta1.CertificateSigningRequest.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1beta1.CertificateSigningRequest.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1beta1.CertificateSigningRequest.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1beta1.CertificateSigningRequest.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1beta1.CertificateSigningRequest.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/certificates.k8s.io.v1beta1.CertificateSigningRequest.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1beta1.CertificateSigningRequest.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1beta1.ClusterTrustBundle.json b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1beta1.ClusterTrustBundle.json new file mode 100644 index 0000000000000..d578d21e89adb --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1beta1.ClusterTrustBundle.json @@ -0,0 +1,50 @@ +{ + "kind": "ClusterTrustBundle", + "apiVersion": "certificates.k8s.io/v1beta1", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "spec": { + "signerName": "signerNameValue", + "trustBundle": "trustBundleValue" + } +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1beta1.ClusterTrustBundle.pb b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1beta1.ClusterTrustBundle.pb new file mode 100644 index 0000000000000..1b405ba9d8824 Binary files /dev/null and b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1beta1.ClusterTrustBundle.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1beta1.ClusterTrustBundle.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1beta1.ClusterTrustBundle.yaml new file mode 100644 index 0000000000000..8102689219020 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/certificates.k8s.io.v1beta1.ClusterTrustBundle.yaml @@ -0,0 +1,37 @@ +apiVersion: certificates.k8s.io/v1beta1 +kind: ClusterTrustBundle +metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue +spec: + signerName: signerNameValue + trustBundle: trustBundleValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1.Lease.json b/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1.Lease.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1.Lease.json rename to staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1.Lease.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1.Lease.pb b/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1.Lease.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1.Lease.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1.Lease.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1.Lease.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1.Lease.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1.Lease.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1.Lease.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1alpha2.LeaseCandidate.json b/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1alpha2.LeaseCandidate.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1alpha2.LeaseCandidate.json rename to staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1alpha2.LeaseCandidate.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1alpha2.LeaseCandidate.pb b/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1alpha2.LeaseCandidate.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1alpha2.LeaseCandidate.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1alpha2.LeaseCandidate.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1alpha2.LeaseCandidate.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1alpha2.LeaseCandidate.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1alpha2.LeaseCandidate.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1alpha2.LeaseCandidate.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1beta1.Lease.json b/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1beta1.Lease.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1beta1.Lease.json rename to staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1beta1.Lease.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1beta1.Lease.pb b/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1beta1.Lease.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1beta1.Lease.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1beta1.Lease.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1beta1.Lease.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1beta1.Lease.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/coordination.k8s.io.v1beta1.Lease.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1beta1.Lease.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1beta1.LeaseCandidate.json b/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1beta1.LeaseCandidate.json new file mode 100644 index 0000000000000..42baac728a09c --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1beta1.LeaseCandidate.json @@ -0,0 +1,54 @@ +{ + "kind": "LeaseCandidate", + "apiVersion": "coordination.k8s.io/v1beta1", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "spec": { + "leaseName": "leaseNameValue", + "pingTime": "2002-01-01T01:01:01.000002Z", + "renewTime": "2003-01-01T01:01:01.000003Z", + "binaryVersion": "binaryVersionValue", + "emulationVersion": "emulationVersionValue", + "strategy": "strategyValue" + } +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1beta1.LeaseCandidate.pb b/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1beta1.LeaseCandidate.pb new file mode 100644 index 0000000000000..a72e9476af735 Binary files /dev/null and b/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1beta1.LeaseCandidate.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1beta1.LeaseCandidate.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1beta1.LeaseCandidate.yaml new file mode 100644 index 0000000000000..bc2e58690dcee --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/coordination.k8s.io.v1beta1.LeaseCandidate.yaml @@ -0,0 +1,41 @@ +apiVersion: coordination.k8s.io/v1beta1 +kind: LeaseCandidate +metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue +spec: + binaryVersion: binaryVersionValue + emulationVersion: emulationVersionValue + leaseName: leaseNameValue + pingTime: "2002-01-01T01:01:01.000002Z" + renewTime: "2003-01-01T01:01:01.000003Z" + strategy: strategyValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.APIGroup.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.APIGroup.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.APIGroup.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.APIGroup.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.APIGroup.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.APIGroup.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.APIGroup.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.APIGroup.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.APIGroup.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.APIGroup.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.APIGroup.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.APIGroup.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.APIVersions.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.APIVersions.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.APIVersions.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.APIVersions.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.APIVersions.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.APIVersions.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.APIVersions.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.APIVersions.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.APIVersions.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.APIVersions.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.APIVersions.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.APIVersions.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Binding.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Binding.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Binding.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Binding.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Binding.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Binding.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Binding.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Binding.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Binding.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Binding.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Binding.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Binding.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ComponentStatus.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ComponentStatus.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ComponentStatus.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ComponentStatus.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ComponentStatus.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ComponentStatus.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ComponentStatus.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ComponentStatus.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ComponentStatus.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ComponentStatus.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ComponentStatus.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ComponentStatus.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ConfigMap.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ConfigMap.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ConfigMap.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ConfigMap.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ConfigMap.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ConfigMap.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ConfigMap.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ConfigMap.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ConfigMap.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ConfigMap.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ConfigMap.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ConfigMap.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.CreateOptions.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.CreateOptions.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.CreateOptions.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.CreateOptions.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.CreateOptions.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.CreateOptions.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.CreateOptions.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.CreateOptions.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.CreateOptions.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.CreateOptions.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.CreateOptions.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.CreateOptions.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.DeleteOptions.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.DeleteOptions.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.DeleteOptions.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.DeleteOptions.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.DeleteOptions.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.DeleteOptions.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.DeleteOptions.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.DeleteOptions.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.DeleteOptions.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.DeleteOptions.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.DeleteOptions.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.DeleteOptions.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Endpoints.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Endpoints.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Endpoints.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Endpoints.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Endpoints.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Endpoints.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Endpoints.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Endpoints.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Endpoints.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Endpoints.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Endpoints.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Endpoints.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Event.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Event.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Event.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Event.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Event.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Event.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Event.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Event.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Event.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Event.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Event.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Event.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.GetOptions.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.GetOptions.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.GetOptions.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.GetOptions.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.GetOptions.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.GetOptions.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.GetOptions.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.GetOptions.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.GetOptions.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.GetOptions.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.GetOptions.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.GetOptions.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.LimitRange.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.LimitRange.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.LimitRange.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.LimitRange.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.LimitRange.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.LimitRange.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.LimitRange.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.LimitRange.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.LimitRange.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.LimitRange.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.LimitRange.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.LimitRange.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ListOptions.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ListOptions.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ListOptions.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ListOptions.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ListOptions.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ListOptions.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ListOptions.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ListOptions.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ListOptions.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ListOptions.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ListOptions.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ListOptions.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Namespace.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Namespace.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Namespace.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Namespace.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Namespace.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Namespace.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Namespace.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Namespace.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Namespace.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Namespace.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Namespace.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Namespace.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Node.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Node.json similarity index 97% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Node.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Node.json index fcdcb34979e84..81dae37e4c40d 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Node.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Node.json @@ -108,7 +108,10 @@ "kubeletVersion": "kubeletVersionValue", "kubeProxyVersion": "kubeProxyVersionValue", "operatingSystem": "operatingSystemValue", - "architecture": "architectureValue" + "architecture": "architectureValue", + "swap": { + "capacity": 1 + } }, "images": [ { diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Node.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Node.pb similarity index 95% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Node.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Node.pb index 27820021d0baf..86cc18929fa4a 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Node.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Node.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Node.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Node.yaml similarity index 99% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Node.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Node.yaml index 1d10847dfe8bb..0d2da7a4bb9ef 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Node.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Node.yaml @@ -108,6 +108,8 @@ status: machineID: machineIDValue operatingSystem: operatingSystemValue osImage: osImageValue + swap: + capacity: 1 systemUUID: systemUUIDValue phase: phaseValue runtimeHandlers: diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.NodeProxyOptions.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.NodeProxyOptions.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.NodeProxyOptions.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.NodeProxyOptions.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.NodeProxyOptions.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.NodeProxyOptions.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.NodeProxyOptions.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.NodeProxyOptions.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.NodeProxyOptions.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.NodeProxyOptions.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.NodeProxyOptions.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.NodeProxyOptions.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PatchOptions.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PatchOptions.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PatchOptions.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PatchOptions.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PatchOptions.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PatchOptions.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PatchOptions.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PatchOptions.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PatchOptions.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PatchOptions.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PatchOptions.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PatchOptions.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PersistentVolume.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PersistentVolume.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PersistentVolume.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PersistentVolume.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PersistentVolume.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PersistentVolume.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PersistentVolume.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PersistentVolume.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PersistentVolume.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PersistentVolume.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PersistentVolume.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PersistentVolume.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PersistentVolumeClaim.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PersistentVolumeClaim.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PersistentVolumeClaim.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PersistentVolumeClaim.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PersistentVolumeClaim.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PersistentVolumeClaim.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PersistentVolumeClaim.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PersistentVolumeClaim.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PersistentVolumeClaim.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PersistentVolumeClaim.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PersistentVolumeClaim.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PersistentVolumeClaim.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Pod.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Pod.json similarity index 95% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Pod.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Pod.json index aedd4a22dc09d..2badc35f477a5 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Pod.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Pod.json @@ -302,6 +302,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -496,6 +504,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -521,6 +535,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -689,7 +714,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -792,6 +818,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -817,6 +849,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -985,7 +1028,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1088,6 +1132,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1113,6 +1163,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1281,7 +1342,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1722,13 +1784,16 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" }, "status": { + "observedGeneration": 17, "phase": "phaseValue", "conditions": [ { "type": "typeValue", + "observedGeneration": 7, "status": "statusValue", "lastProbeTime": "2003-01-01T01:01:01Z", "lastTransitionTime": "2004-01-01T01:01:01Z", @@ -1841,7 +1906,8 @@ } ] } - ] + ], + "stopSignal": "stopSignalValue" } ], "containerStatuses": [ @@ -1933,7 +1999,8 @@ } ] } - ] + ], + "stopSignal": "stopSignalValue" } ], "qosClass": "qosClassValue", @@ -2026,7 +2093,8 @@ } ] } - ] + ], + "stopSignal": "stopSignalValue" } ], "resize": "resizeValue", @@ -2035,6 +2103,16 @@ "name": "nameValue", "resourceClaimName": "resourceClaimNameValue" } - ] + ], + "extendedResourceClaimStatus": { + "requestMappings": [ + { + "containerName": "containerNameValue", + "resourceName": "resourceNameValue", + "requestName": "requestNameValue" + } + ], + "resourceClaimName": "resourceClaimNameValue" + } } } \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Pod.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Pod.pb similarity index 83% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Pod.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Pod.pb index 9b44310ba3474..41e3958fcc61d 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Pod.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Pod.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Pod.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Pod.yaml similarity index 95% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Pod.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Pod.yaml index 31532e145a2f8..36d9a59473971 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Pod.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Pod.yaml @@ -180,6 +180,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -233,6 +238,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -300,6 +306,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -396,6 +408,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -449,6 +466,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -516,6 +534,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -596,6 +620,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -614,6 +639,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -667,6 +697,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -734,6 +765,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1118,6 +1155,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue @@ -1184,6 +1228,7 @@ status: - lastProbeTime: "2003-01-01T01:01:01Z" lastTransitionTime: "2004-01-01T01:01:01Z" message: messageValue + observedGeneration: 7 reason: reasonValue status: statusValue type: typeValue @@ -1238,6 +1283,7 @@ status: waiting: message: messageValue reason: reasonValue + stopSignal: stopSignalValue user: linux: gid: 2 @@ -1300,6 +1346,7 @@ status: waiting: message: messageValue reason: reasonValue + stopSignal: stopSignalValue user: linux: gid: 2 @@ -1311,6 +1358,12 @@ status: name: nameValue readOnly: true recursiveReadOnly: recursiveReadOnlyValue + extendedResourceClaimStatus: + requestMappings: + - containerName: containerNameValue + requestName: requestNameValue + resourceName: resourceNameValue + resourceClaimName: resourceClaimNameValue hostIP: hostIPValue hostIPs: - ip: ipValue @@ -1365,6 +1418,7 @@ status: waiting: message: messageValue reason: reasonValue + stopSignal: stopSignalValue user: linux: gid: 2 @@ -1378,6 +1432,7 @@ status: recursiveReadOnly: recursiveReadOnlyValue message: messageValue nominatedNodeName: nominatedNodeNameValue + observedGeneration: 17 phase: phaseValue podIP: podIPValue podIPs: diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodAttachOptions.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodAttachOptions.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodAttachOptions.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodAttachOptions.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodAttachOptions.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodAttachOptions.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodAttachOptions.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodAttachOptions.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodAttachOptions.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodAttachOptions.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodAttachOptions.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodAttachOptions.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodExecOptions.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodExecOptions.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodExecOptions.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodExecOptions.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodExecOptions.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodExecOptions.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodExecOptions.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodExecOptions.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodExecOptions.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodExecOptions.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodExecOptions.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodExecOptions.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodLogOptions.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodLogOptions.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodLogOptions.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodLogOptions.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodLogOptions.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodLogOptions.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodLogOptions.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodLogOptions.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodLogOptions.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodLogOptions.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodLogOptions.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodLogOptions.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodPortForwardOptions.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodPortForwardOptions.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodPortForwardOptions.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodPortForwardOptions.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodPortForwardOptions.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodPortForwardOptions.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodPortForwardOptions.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodPortForwardOptions.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodPortForwardOptions.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodPortForwardOptions.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodPortForwardOptions.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodPortForwardOptions.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodProxyOptions.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodProxyOptions.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodProxyOptions.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodProxyOptions.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodProxyOptions.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodProxyOptions.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodProxyOptions.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodProxyOptions.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodProxyOptions.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodProxyOptions.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodProxyOptions.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodProxyOptions.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodStatusResult.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodStatusResult.json similarity index 94% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodStatusResult.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodStatusResult.json index 7b09b5176d9d0..e65f3718c292c 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodStatusResult.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodStatusResult.json @@ -44,10 +44,12 @@ ] }, "status": { + "observedGeneration": 17, "phase": "phaseValue", "conditions": [ { "type": "typeValue", + "observedGeneration": 7, "status": "statusValue", "lastProbeTime": "2003-01-01T01:01:01Z", "lastTransitionTime": "2004-01-01T01:01:01Z", @@ -160,7 +162,8 @@ } ] } - ] + ], + "stopSignal": "stopSignalValue" } ], "containerStatuses": [ @@ -252,7 +255,8 @@ } ] } - ] + ], + "stopSignal": "stopSignalValue" } ], "qosClass": "qosClassValue", @@ -345,7 +349,8 @@ } ] } - ] + ], + "stopSignal": "stopSignalValue" } ], "resize": "resizeValue", @@ -354,6 +359,16 @@ "name": "nameValue", "resourceClaimName": "resourceClaimNameValue" } - ] + ], + "extendedResourceClaimStatus": { + "requestMappings": [ + { + "containerName": "containerNameValue", + "resourceName": "resourceNameValue", + "requestName": "requestNameValue" + } + ], + "resourceClaimName": "resourceClaimNameValue" + } } } \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodStatusResult.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodStatusResult.pb similarity index 80% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodStatusResult.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodStatusResult.pb index 53312203d77e9..82f5a5c5c5c73 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodStatusResult.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodStatusResult.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodStatusResult.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodStatusResult.yaml similarity index 94% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodStatusResult.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodStatusResult.yaml index 2bd9570b69464..96fbedba0809f 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodStatusResult.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodStatusResult.yaml @@ -37,6 +37,7 @@ status: - lastProbeTime: "2003-01-01T01:01:01Z" lastTransitionTime: "2004-01-01T01:01:01Z" message: messageValue + observedGeneration: 7 reason: reasonValue status: statusValue type: typeValue @@ -91,6 +92,7 @@ status: waiting: message: messageValue reason: reasonValue + stopSignal: stopSignalValue user: linux: gid: 2 @@ -153,6 +155,7 @@ status: waiting: message: messageValue reason: reasonValue + stopSignal: stopSignalValue user: linux: gid: 2 @@ -164,6 +167,12 @@ status: name: nameValue readOnly: true recursiveReadOnly: recursiveReadOnlyValue + extendedResourceClaimStatus: + requestMappings: + - containerName: containerNameValue + requestName: requestNameValue + resourceName: resourceNameValue + resourceClaimName: resourceClaimNameValue hostIP: hostIPValue hostIPs: - ip: ipValue @@ -218,6 +227,7 @@ status: waiting: message: messageValue reason: reasonValue + stopSignal: stopSignalValue user: linux: gid: 2 @@ -231,6 +241,7 @@ status: recursiveReadOnly: recursiveReadOnlyValue message: messageValue nominatedNodeName: nominatedNodeNameValue + observedGeneration: 17 phase: phaseValue podIP: podIPValue podIPs: diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodTemplate.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodTemplate.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodTemplate.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodTemplate.json index 7ab8ec402b795..b665fdd23c209 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodTemplate.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodTemplate.json @@ -345,6 +345,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -539,6 +547,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -564,6 +578,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -732,7 +757,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -835,6 +861,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -860,6 +892,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1028,7 +1071,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1131,6 +1175,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1156,6 +1206,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1324,7 +1385,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1765,7 +1827,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } } } \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodTemplate.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodTemplate.pb similarity index 84% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodTemplate.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodTemplate.pb index 8efa534315afd..eac7bca891351 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodTemplate.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodTemplate.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodTemplate.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodTemplate.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodTemplate.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodTemplate.yaml index 8c3494faa7aa3..5edb7f29b6de3 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.PodTemplate.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.PodTemplate.yaml @@ -213,6 +213,11 @@ template: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -266,6 +271,7 @@ template: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -333,6 +339,12 @@ template: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -429,6 +441,11 @@ template: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -482,6 +499,7 @@ template: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -549,6 +567,12 @@ template: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -629,6 +653,7 @@ template: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -647,6 +672,11 @@ template: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -700,6 +730,7 @@ template: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -767,6 +798,12 @@ template: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1151,6 +1188,13 @@ template: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.RangeAllocation.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.RangeAllocation.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.RangeAllocation.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.RangeAllocation.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.RangeAllocation.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.RangeAllocation.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.RangeAllocation.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.RangeAllocation.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.RangeAllocation.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.RangeAllocation.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.RangeAllocation.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.RangeAllocation.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ReplicationController.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ReplicationController.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ReplicationController.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ReplicationController.json index e267b1ef2cde9..09d3e9f2331dc 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ReplicationController.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ReplicationController.json @@ -351,6 +351,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -545,6 +553,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -570,6 +584,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -738,7 +763,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -841,6 +867,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -866,6 +898,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1034,7 +1077,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1137,6 +1181,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1162,6 +1212,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1330,7 +1391,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1771,7 +1833,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } } }, diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ReplicationController.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ReplicationController.pb similarity index 84% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ReplicationController.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ReplicationController.pb index 1610a0c31d2fc..9476529df60e5 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ReplicationController.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ReplicationController.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ReplicationController.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ReplicationController.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ReplicationController.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ReplicationController.yaml index ffa315e641d14..205da180c964d 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ReplicationController.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ReplicationController.yaml @@ -218,6 +218,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -271,6 +276,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -338,6 +344,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -434,6 +446,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -487,6 +504,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -554,6 +572,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -634,6 +658,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -652,6 +677,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -705,6 +735,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -772,6 +803,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1156,6 +1193,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ResourceQuota.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ResourceQuota.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ResourceQuota.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ResourceQuota.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ResourceQuota.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ResourceQuota.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ResourceQuota.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ResourceQuota.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ResourceQuota.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ResourceQuota.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ResourceQuota.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ResourceQuota.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Secret.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Secret.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Secret.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Secret.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Secret.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Secret.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Secret.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Secret.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Secret.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Secret.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Secret.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Secret.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.SerializedReference.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.SerializedReference.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.SerializedReference.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.SerializedReference.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.SerializedReference.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.SerializedReference.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.SerializedReference.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.SerializedReference.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.SerializedReference.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.SerializedReference.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.SerializedReference.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.SerializedReference.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Service.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Service.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Service.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Service.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Service.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Service.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Service.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Service.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Service.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Service.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Service.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Service.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ServiceAccount.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ServiceAccount.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ServiceAccount.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ServiceAccount.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ServiceAccount.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ServiceAccount.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ServiceAccount.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ServiceAccount.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ServiceAccount.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ServiceAccount.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ServiceAccount.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ServiceAccount.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ServiceProxyOptions.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ServiceProxyOptions.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ServiceProxyOptions.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ServiceProxyOptions.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ServiceProxyOptions.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ServiceProxyOptions.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ServiceProxyOptions.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ServiceProxyOptions.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ServiceProxyOptions.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ServiceProxyOptions.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.ServiceProxyOptions.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.ServiceProxyOptions.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Status.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Status.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Status.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Status.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Status.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Status.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Status.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Status.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Status.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Status.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.Status.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.Status.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.UpdateOptions.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.UpdateOptions.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.UpdateOptions.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.UpdateOptions.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.UpdateOptions.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.UpdateOptions.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.UpdateOptions.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.UpdateOptions.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.UpdateOptions.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.UpdateOptions.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.UpdateOptions.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.UpdateOptions.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.WatchEvent.json b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.WatchEvent.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.WatchEvent.json rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.WatchEvent.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.WatchEvent.pb b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.WatchEvent.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.WatchEvent.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.WatchEvent.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/core.v1.WatchEvent.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/core.v1.WatchEvent.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/core.v1.WatchEvent.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/core.v1.WatchEvent.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1.EndpointSlice.json b/staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1.EndpointSlice.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1.EndpointSlice.json rename to staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1.EndpointSlice.json index 37944092e1821..640c6842a9df1 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1.EndpointSlice.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1.EndpointSlice.json @@ -74,6 +74,11 @@ { "name": "nameValue" } + ], + "forNodes": [ + { + "name": "nameValue" + } ] } } diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1.EndpointSlice.pb b/staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1.EndpointSlice.pb similarity index 87% rename from staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1.EndpointSlice.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1.EndpointSlice.pb index 6ba3d21b3b52d..a4ff78a321415 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1.EndpointSlice.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1.EndpointSlice.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1.EndpointSlice.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1.EndpointSlice.yaml similarity index 97% rename from staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1.EndpointSlice.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1.EndpointSlice.yaml index 4f396707cd47b..db95f61cad5a6 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1.EndpointSlice.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1.EndpointSlice.yaml @@ -10,6 +10,8 @@ endpoints: deprecatedTopology: deprecatedTopologyKey: deprecatedTopologyValue hints: + forNodes: + - name: nameValue forZones: - name: nameValue hostname: hostnameValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1beta1.EndpointSlice.json b/staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1beta1.EndpointSlice.json similarity index 95% rename from staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1beta1.EndpointSlice.json rename to staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1beta1.EndpointSlice.json index 50d012652ca7d..87dac1aa951d6 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1beta1.EndpointSlice.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1beta1.EndpointSlice.json @@ -73,6 +73,11 @@ { "name": "nameValue" } + ], + "forNodes": [ + { + "name": "nameValue" + } ] } } diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1beta1.EndpointSlice.pb b/staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1beta1.EndpointSlice.pb similarity index 81% rename from staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1beta1.EndpointSlice.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1beta1.EndpointSlice.pb index 0dc5eec875879..0bb8fa81af94f 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1beta1.EndpointSlice.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1beta1.EndpointSlice.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1beta1.EndpointSlice.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1beta1.EndpointSlice.yaml similarity index 97% rename from staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1beta1.EndpointSlice.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1beta1.EndpointSlice.yaml index c9d67a57feade..f5901ad8e4811 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/discovery.k8s.io.v1beta1.EndpointSlice.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/discovery.k8s.io.v1beta1.EndpointSlice.yaml @@ -8,6 +8,8 @@ endpoints: serving: true terminating: true hints: + forNodes: + - name: nameValue forZones: - name: nameValue hostname: hostnameValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/events.k8s.io.v1.Event.json b/staging/src/k8s.io/api/testdata/v1.34.0/events.k8s.io.v1.Event.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/events.k8s.io.v1.Event.json rename to staging/src/k8s.io/api/testdata/v1.34.0/events.k8s.io.v1.Event.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/events.k8s.io.v1.Event.pb b/staging/src/k8s.io/api/testdata/v1.34.0/events.k8s.io.v1.Event.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/events.k8s.io.v1.Event.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/events.k8s.io.v1.Event.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/events.k8s.io.v1.Event.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/events.k8s.io.v1.Event.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/events.k8s.io.v1.Event.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/events.k8s.io.v1.Event.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/events.k8s.io.v1beta1.Event.json b/staging/src/k8s.io/api/testdata/v1.34.0/events.k8s.io.v1beta1.Event.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/events.k8s.io.v1beta1.Event.json rename to staging/src/k8s.io/api/testdata/v1.34.0/events.k8s.io.v1beta1.Event.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/events.k8s.io.v1beta1.Event.pb b/staging/src/k8s.io/api/testdata/v1.34.0/events.k8s.io.v1beta1.Event.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/events.k8s.io.v1beta1.Event.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/events.k8s.io.v1beta1.Event.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/events.k8s.io.v1beta1.Event.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/events.k8s.io.v1beta1.Event.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/events.k8s.io.v1beta1.Event.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/events.k8s.io.v1beta1.Event.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.DaemonSet.json b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.DaemonSet.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.DaemonSet.json rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.DaemonSet.json index df154fa098ff1..93d20033ba04e 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.DaemonSet.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.DaemonSet.json @@ -360,6 +360,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -554,6 +562,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -579,6 +593,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -747,7 +772,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -850,6 +876,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -875,6 +907,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1043,7 +1086,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1146,6 +1190,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1171,6 +1221,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1339,7 +1400,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1780,7 +1842,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } }, "updateStrategy": { diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.DaemonSet.pb b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.DaemonSet.pb similarity index 84% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.DaemonSet.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.DaemonSet.pb index 2155f9e55ecce..fc8e2a557a213 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.DaemonSet.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.DaemonSet.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.DaemonSet.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.DaemonSet.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.DaemonSet.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.DaemonSet.yaml index ca7ee89373608..7bdf4a9a41d51 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.DaemonSet.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.DaemonSet.yaml @@ -224,6 +224,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -277,6 +282,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -344,6 +350,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -440,6 +452,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -493,6 +510,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -560,6 +578,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -640,6 +664,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -658,6 +683,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -711,6 +741,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -778,6 +809,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1162,6 +1199,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Deployment.json b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Deployment.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Deployment.json rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Deployment.json index 5a6cbb46e2376..b352d70c394b1 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Deployment.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Deployment.json @@ -361,6 +361,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -555,6 +563,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -580,6 +594,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -748,7 +773,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -851,6 +877,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -876,6 +908,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1044,7 +1087,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1147,6 +1191,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1172,6 +1222,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1340,7 +1401,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1781,7 +1843,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } }, "strategy": { @@ -1806,6 +1869,7 @@ "readyReplicas": 7, "availableReplicas": 4, "unavailableReplicas": 5, + "terminatingReplicas": 9, "conditions": [ { "type": "typeValue", diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Deployment.pb b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Deployment.pb similarity index 83% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Deployment.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Deployment.pb index 480fc47fdb99f..cebc6f20c5ac0 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Deployment.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Deployment.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Deployment.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Deployment.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Deployment.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Deployment.yaml index b3f5eb3209aa2..7a42f9927a7d3 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Deployment.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Deployment.yaml @@ -234,6 +234,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -287,6 +292,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -354,6 +360,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -450,6 +462,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -503,6 +520,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -570,6 +588,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -650,6 +674,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -668,6 +693,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -721,6 +751,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -788,6 +819,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1172,6 +1209,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue @@ -1246,5 +1290,6 @@ status: observedGeneration: 1 readyReplicas: 7 replicas: 2 + terminatingReplicas: 9 unavailableReplicas: 5 updatedReplicas: 3 diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.DeploymentRollback.json b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.DeploymentRollback.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.DeploymentRollback.json rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.DeploymentRollback.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.DeploymentRollback.pb b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.DeploymentRollback.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.DeploymentRollback.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.DeploymentRollback.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.DeploymentRollback.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.DeploymentRollback.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.DeploymentRollback.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.DeploymentRollback.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Ingress.json b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Ingress.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Ingress.json rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Ingress.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Ingress.pb b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Ingress.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Ingress.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Ingress.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Ingress.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Ingress.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Ingress.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Ingress.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.NetworkPolicy.json b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.NetworkPolicy.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.NetworkPolicy.json rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.NetworkPolicy.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.NetworkPolicy.pb b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.NetworkPolicy.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.NetworkPolicy.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.NetworkPolicy.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.NetworkPolicy.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.NetworkPolicy.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.NetworkPolicy.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.NetworkPolicy.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.ReplicaSet.json b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.ReplicaSet.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.ReplicaSet.json rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.ReplicaSet.json index 32e8468ec422f..7a31a72303124 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.ReplicaSet.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.ReplicaSet.json @@ -362,6 +362,14 @@ }, "optional": true, "path": "pathValue" + }, + "podCertificate": { + "signerName": "signerNameValue", + "keyType": "keyTypeValue", + "maxExpirationSeconds": 3, + "credentialBundlePath": "credentialBundlePathValue", + "keyPath": "keyPathValue", + "certificateChainPath": "certificateChainPathValue" } } ], @@ -556,6 +564,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -581,6 +595,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -749,7 +774,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -852,6 +878,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -877,6 +909,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1045,7 +1088,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1148,6 +1192,12 @@ "name": "nameValue", "key": "keyValue", "optional": true + }, + "fileKeyRef": { + "volumeName": "volumeNameValue", + "path": "pathValue", + "key": "keyValue", + "optional": true } } } @@ -1173,6 +1223,17 @@ } ], "restartPolicy": "restartPolicyValue", + "restartPolicyRules": [ + { + "action": "actionValue", + "exitCodes": { + "operator": "operatorValue", + "values": [ + 2 + ] + } + } + ], "volumeMounts": [ { "name": "nameValue", @@ -1341,7 +1402,8 @@ "sleep": { "seconds": 1 } - } + }, + "stopSignal": "stopSignalValue" }, "terminationMessagePath": "terminationMessagePathValue", "terminationMessagePolicy": "terminationMessagePolicyValue", @@ -1782,7 +1844,8 @@ "request": "requestValue" } ] - } + }, + "hostnameOverride": "hostnameOverrideValue" } } }, @@ -1791,6 +1854,7 @@ "fullyLabeledReplicas": 2, "readyReplicas": 4, "availableReplicas": 5, + "terminatingReplicas": 7, "observedGeneration": 3, "conditions": [ { diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.ReplicaSet.pb b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.ReplicaSet.pb similarity index 83% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.ReplicaSet.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.ReplicaSet.pb index 1e4a88f2df508..89749c919c7dc 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.ReplicaSet.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.ReplicaSet.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.ReplicaSet.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.ReplicaSet.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.ReplicaSet.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.ReplicaSet.yaml index 75188bb3f4a5c..1bd12ba887a88 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.ReplicaSet.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.ReplicaSet.yaml @@ -224,6 +224,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -277,6 +282,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -344,6 +350,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -440,6 +452,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -493,6 +510,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -560,6 +578,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -640,6 +664,7 @@ spec: hostPID: true hostUsers: true hostname: hostnameValue + hostnameOverride: hostnameOverrideValue imagePullSecrets: - name: nameValue initContainers: @@ -658,6 +683,11 @@ spec: fieldRef: apiVersion: apiVersionValue fieldPath: fieldPathValue + fileKeyRef: + key: keyValue + optional: true + path: pathValue + volumeName: volumeNameValue resourceFieldRef: containerName: containerNameValue divisor: "0" @@ -711,6 +741,7 @@ spec: tcpSocket: host: hostValue port: portValue + stopSignal: stopSignalValue livenessProbe: exec: command: @@ -778,6 +809,12 @@ spec: requests: requestsKey: "0" restartPolicy: restartPolicyValue + restartPolicyRules: + - action: actionValue + exitCodes: + operator: operatorValue + values: + - 2 securityContext: allowPrivilegeEscalation: true appArmorProfile: @@ -1162,6 +1199,13 @@ spec: containerName: containerNameValue divisor: "0" resource: resourceValue + podCertificate: + certificateChainPath: certificateChainPathValue + credentialBundlePath: credentialBundlePathValue + keyPath: keyPathValue + keyType: keyTypeValue + maxExpirationSeconds: 3 + signerName: signerNameValue secret: items: - key: keyValue @@ -1235,3 +1279,4 @@ status: observedGeneration: 3 readyReplicas: 4 replicas: 1 + terminatingReplicas: 7 diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Scale.json b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Scale.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Scale.json rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Scale.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Scale.pb b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Scale.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Scale.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Scale.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Scale.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Scale.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/extensions.v1beta1.Scale.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/extensions.v1beta1.Scale.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1.FlowSchema.json b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1.FlowSchema.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1.FlowSchema.json rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1.FlowSchema.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1.FlowSchema.pb b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1.FlowSchema.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1.FlowSchema.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1.FlowSchema.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1.FlowSchema.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1.FlowSchema.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1.FlowSchema.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1.FlowSchema.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1.PriorityLevelConfiguration.json b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1.PriorityLevelConfiguration.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1.PriorityLevelConfiguration.json rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1.PriorityLevelConfiguration.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1.PriorityLevelConfiguration.pb b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1.PriorityLevelConfiguration.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1.PriorityLevelConfiguration.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1.PriorityLevelConfiguration.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1.PriorityLevelConfiguration.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1.PriorityLevelConfiguration.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1.PriorityLevelConfiguration.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1.PriorityLevelConfiguration.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta1.FlowSchema.json b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta1.FlowSchema.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta1.FlowSchema.json rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta1.FlowSchema.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta1.FlowSchema.pb b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta1.FlowSchema.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta1.FlowSchema.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta1.FlowSchema.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta1.FlowSchema.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta1.FlowSchema.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta1.FlowSchema.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta1.FlowSchema.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta1.PriorityLevelConfiguration.json b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta1.PriorityLevelConfiguration.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta1.PriorityLevelConfiguration.json rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta1.PriorityLevelConfiguration.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta1.PriorityLevelConfiguration.pb b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta1.PriorityLevelConfiguration.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta1.PriorityLevelConfiguration.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta1.PriorityLevelConfiguration.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta1.PriorityLevelConfiguration.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta1.PriorityLevelConfiguration.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta1.PriorityLevelConfiguration.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta1.PriorityLevelConfiguration.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta2.FlowSchema.json b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta2.FlowSchema.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta2.FlowSchema.json rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta2.FlowSchema.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta2.FlowSchema.pb b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta2.FlowSchema.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta2.FlowSchema.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta2.FlowSchema.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta2.FlowSchema.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta2.FlowSchema.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta2.FlowSchema.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta2.FlowSchema.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta2.PriorityLevelConfiguration.json b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta2.PriorityLevelConfiguration.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta2.PriorityLevelConfiguration.json rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta2.PriorityLevelConfiguration.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta2.PriorityLevelConfiguration.pb b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta2.PriorityLevelConfiguration.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta2.PriorityLevelConfiguration.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta2.PriorityLevelConfiguration.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta2.PriorityLevelConfiguration.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta2.PriorityLevelConfiguration.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta2.PriorityLevelConfiguration.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta2.PriorityLevelConfiguration.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta3.FlowSchema.json b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta3.FlowSchema.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta3.FlowSchema.json rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta3.FlowSchema.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta3.FlowSchema.pb b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta3.FlowSchema.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta3.FlowSchema.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta3.FlowSchema.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta3.FlowSchema.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta3.FlowSchema.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta3.FlowSchema.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta3.FlowSchema.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta3.PriorityLevelConfiguration.json b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta3.PriorityLevelConfiguration.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta3.PriorityLevelConfiguration.json rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta3.PriorityLevelConfiguration.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta3.PriorityLevelConfiguration.pb b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta3.PriorityLevelConfiguration.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta3.PriorityLevelConfiguration.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta3.PriorityLevelConfiguration.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta3.PriorityLevelConfiguration.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta3.PriorityLevelConfiguration.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/flowcontrol.apiserver.k8s.io.v1beta3.PriorityLevelConfiguration.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/flowcontrol.apiserver.k8s.io.v1beta3.PriorityLevelConfiguration.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/imagepolicy.k8s.io.v1alpha1.ImageReview.json b/staging/src/k8s.io/api/testdata/v1.34.0/imagepolicy.k8s.io.v1alpha1.ImageReview.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/imagepolicy.k8s.io.v1alpha1.ImageReview.json rename to staging/src/k8s.io/api/testdata/v1.34.0/imagepolicy.k8s.io.v1alpha1.ImageReview.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/imagepolicy.k8s.io.v1alpha1.ImageReview.pb b/staging/src/k8s.io/api/testdata/v1.34.0/imagepolicy.k8s.io.v1alpha1.ImageReview.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/imagepolicy.k8s.io.v1alpha1.ImageReview.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/imagepolicy.k8s.io.v1alpha1.ImageReview.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/imagepolicy.k8s.io.v1alpha1.ImageReview.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/imagepolicy.k8s.io.v1alpha1.ImageReview.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/imagepolicy.k8s.io.v1alpha1.ImageReview.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/imagepolicy.k8s.io.v1alpha1.ImageReview.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/internal.apiserver.k8s.io.v1alpha1.StorageVersion.json b/staging/src/k8s.io/api/testdata/v1.34.0/internal.apiserver.k8s.io.v1alpha1.StorageVersion.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/internal.apiserver.k8s.io.v1alpha1.StorageVersion.json rename to staging/src/k8s.io/api/testdata/v1.34.0/internal.apiserver.k8s.io.v1alpha1.StorageVersion.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/internal.apiserver.k8s.io.v1alpha1.StorageVersion.pb b/staging/src/k8s.io/api/testdata/v1.34.0/internal.apiserver.k8s.io.v1alpha1.StorageVersion.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/internal.apiserver.k8s.io.v1alpha1.StorageVersion.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/internal.apiserver.k8s.io.v1alpha1.StorageVersion.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/internal.apiserver.k8s.io.v1alpha1.StorageVersion.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/internal.apiserver.k8s.io.v1alpha1.StorageVersion.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/internal.apiserver.k8s.io.v1alpha1.StorageVersion.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/internal.apiserver.k8s.io.v1alpha1.StorageVersion.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.IPAddress.json b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.IPAddress.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.IPAddress.json rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.IPAddress.json index c5f84c6f50690..f1c898e3afbf4 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.IPAddress.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.IPAddress.json @@ -1,6 +1,6 @@ { "kind": "IPAddress", - "apiVersion": "networking.k8s.io/v1alpha1", + "apiVersion": "networking.k8s.io/v1", "metadata": { "name": "nameValue", "generateName": "generateNameValue", diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.IPAddress.pb b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.IPAddress.pb similarity index 90% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.IPAddress.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.IPAddress.pb index 7fceacd6bcacc..786612311229d 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.IPAddress.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.IPAddress.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.IPAddress.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.IPAddress.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.IPAddress.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.IPAddress.yaml index 0bf2b17cb87f6..29c5e6908803b 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.IPAddress.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.IPAddress.yaml @@ -1,4 +1,4 @@ -apiVersion: networking.k8s.io/v1alpha1 +apiVersion: networking.k8s.io/v1 kind: IPAddress metadata: annotations: diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.Ingress.json b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.Ingress.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.Ingress.json rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.Ingress.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.Ingress.pb b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.Ingress.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.Ingress.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.Ingress.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.Ingress.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.Ingress.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.Ingress.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.Ingress.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.IngressClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.IngressClass.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.IngressClass.json rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.IngressClass.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.IngressClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.IngressClass.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.IngressClass.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.IngressClass.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.IngressClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.IngressClass.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.IngressClass.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.IngressClass.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.NetworkPolicy.json b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.NetworkPolicy.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.NetworkPolicy.json rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.NetworkPolicy.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.NetworkPolicy.pb b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.NetworkPolicy.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.NetworkPolicy.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.NetworkPolicy.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.NetworkPolicy.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.NetworkPolicy.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1.NetworkPolicy.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.NetworkPolicy.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.ServiceCIDR.json b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.ServiceCIDR.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.ServiceCIDR.json rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.ServiceCIDR.json index cd77b39a0f77b..929b8afb43e5f 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.ServiceCIDR.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.ServiceCIDR.json @@ -1,6 +1,6 @@ { "kind": "ServiceCIDR", - "apiVersion": "networking.k8s.io/v1alpha1", + "apiVersion": "networking.k8s.io/v1", "metadata": { "name": "nameValue", "generateName": "generateNameValue", diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.ServiceCIDR.pb b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.ServiceCIDR.pb similarity index 90% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.ServiceCIDR.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.ServiceCIDR.pb index 970393e6fae7b..c221a66e3ec36 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.ServiceCIDR.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.ServiceCIDR.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.ServiceCIDR.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.ServiceCIDR.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.ServiceCIDR.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.ServiceCIDR.yaml index 4bf6b492dc712..347f5763d2167 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1alpha1.ServiceCIDR.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1.ServiceCIDR.yaml @@ -1,4 +1,4 @@ -apiVersion: networking.k8s.io/v1alpha1 +apiVersion: networking.k8s.io/v1 kind: ServiceCIDR metadata: annotations: diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.IPAddress.json b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.IPAddress.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.IPAddress.json rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.IPAddress.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.IPAddress.pb b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.IPAddress.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.IPAddress.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.IPAddress.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.IPAddress.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.IPAddress.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.IPAddress.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.IPAddress.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.Ingress.json b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.Ingress.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.Ingress.json rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.Ingress.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.Ingress.pb b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.Ingress.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.Ingress.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.Ingress.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.Ingress.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.Ingress.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.Ingress.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.Ingress.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.IngressClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.IngressClass.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.IngressClass.json rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.IngressClass.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.IngressClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.IngressClass.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.IngressClass.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.IngressClass.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.IngressClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.IngressClass.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.IngressClass.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.IngressClass.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.ServiceCIDR.json b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.ServiceCIDR.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.ServiceCIDR.json rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.ServiceCIDR.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.ServiceCIDR.pb b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.ServiceCIDR.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.ServiceCIDR.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.ServiceCIDR.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.ServiceCIDR.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.ServiceCIDR.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/networking.k8s.io.v1beta1.ServiceCIDR.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/networking.k8s.io.v1beta1.ServiceCIDR.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1.RuntimeClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1.RuntimeClass.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1.RuntimeClass.json rename to staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1.RuntimeClass.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1.RuntimeClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1.RuntimeClass.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1.RuntimeClass.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1.RuntimeClass.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1.RuntimeClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1.RuntimeClass.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1.RuntimeClass.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1.RuntimeClass.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1alpha1.RuntimeClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1alpha1.RuntimeClass.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1alpha1.RuntimeClass.json rename to staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1alpha1.RuntimeClass.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1alpha1.RuntimeClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1alpha1.RuntimeClass.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1alpha1.RuntimeClass.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1alpha1.RuntimeClass.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1alpha1.RuntimeClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1alpha1.RuntimeClass.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1alpha1.RuntimeClass.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1alpha1.RuntimeClass.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1beta1.RuntimeClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1beta1.RuntimeClass.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1beta1.RuntimeClass.json rename to staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1beta1.RuntimeClass.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1beta1.RuntimeClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1beta1.RuntimeClass.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1beta1.RuntimeClass.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1beta1.RuntimeClass.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1beta1.RuntimeClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1beta1.RuntimeClass.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/node.k8s.io.v1beta1.RuntimeClass.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/node.k8s.io.v1beta1.RuntimeClass.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/policy.v1.Eviction.json b/staging/src/k8s.io/api/testdata/v1.34.0/policy.v1.Eviction.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/policy.v1.Eviction.json rename to staging/src/k8s.io/api/testdata/v1.34.0/policy.v1.Eviction.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/policy.v1.Eviction.pb b/staging/src/k8s.io/api/testdata/v1.34.0/policy.v1.Eviction.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/policy.v1.Eviction.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/policy.v1.Eviction.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/policy.v1.Eviction.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/policy.v1.Eviction.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/policy.v1.Eviction.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/policy.v1.Eviction.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/policy.v1.PodDisruptionBudget.json b/staging/src/k8s.io/api/testdata/v1.34.0/policy.v1.PodDisruptionBudget.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/policy.v1.PodDisruptionBudget.json rename to staging/src/k8s.io/api/testdata/v1.34.0/policy.v1.PodDisruptionBudget.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/policy.v1.PodDisruptionBudget.pb b/staging/src/k8s.io/api/testdata/v1.34.0/policy.v1.PodDisruptionBudget.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/policy.v1.PodDisruptionBudget.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/policy.v1.PodDisruptionBudget.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/policy.v1.PodDisruptionBudget.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/policy.v1.PodDisruptionBudget.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/policy.v1.PodDisruptionBudget.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/policy.v1.PodDisruptionBudget.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/policy.v1beta1.Eviction.json b/staging/src/k8s.io/api/testdata/v1.34.0/policy.v1beta1.Eviction.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/policy.v1beta1.Eviction.json rename to staging/src/k8s.io/api/testdata/v1.34.0/policy.v1beta1.Eviction.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/policy.v1beta1.Eviction.pb b/staging/src/k8s.io/api/testdata/v1.34.0/policy.v1beta1.Eviction.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/policy.v1beta1.Eviction.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/policy.v1beta1.Eviction.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/policy.v1beta1.Eviction.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/policy.v1beta1.Eviction.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/policy.v1beta1.Eviction.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/policy.v1beta1.Eviction.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/policy.v1beta1.PodDisruptionBudget.json b/staging/src/k8s.io/api/testdata/v1.34.0/policy.v1beta1.PodDisruptionBudget.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/policy.v1beta1.PodDisruptionBudget.json rename to staging/src/k8s.io/api/testdata/v1.34.0/policy.v1beta1.PodDisruptionBudget.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/policy.v1beta1.PodDisruptionBudget.pb b/staging/src/k8s.io/api/testdata/v1.34.0/policy.v1beta1.PodDisruptionBudget.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/policy.v1beta1.PodDisruptionBudget.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/policy.v1beta1.PodDisruptionBudget.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/policy.v1beta1.PodDisruptionBudget.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/policy.v1beta1.PodDisruptionBudget.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/policy.v1beta1.PodDisruptionBudget.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/policy.v1beta1.PodDisruptionBudget.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.ClusterRole.json b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.ClusterRole.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.ClusterRole.json rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.ClusterRole.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.ClusterRole.pb b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.ClusterRole.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.ClusterRole.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.ClusterRole.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.ClusterRole.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.ClusterRole.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.ClusterRole.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.ClusterRole.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.ClusterRoleBinding.json b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.ClusterRoleBinding.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.ClusterRoleBinding.json rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.ClusterRoleBinding.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.ClusterRoleBinding.pb b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.ClusterRoleBinding.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.ClusterRoleBinding.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.ClusterRoleBinding.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.ClusterRoleBinding.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.ClusterRoleBinding.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.ClusterRoleBinding.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.ClusterRoleBinding.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.Role.json b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.Role.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.Role.json rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.Role.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.Role.pb b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.Role.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.Role.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.Role.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.Role.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.Role.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.Role.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.Role.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.RoleBinding.json b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.RoleBinding.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.RoleBinding.json rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.RoleBinding.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.RoleBinding.pb b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.RoleBinding.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.RoleBinding.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.RoleBinding.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.RoleBinding.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.RoleBinding.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1.RoleBinding.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1.RoleBinding.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.ClusterRole.json b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.ClusterRole.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.ClusterRole.json rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.ClusterRole.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.ClusterRole.pb b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.ClusterRole.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.ClusterRole.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.ClusterRole.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.ClusterRole.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.ClusterRole.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.ClusterRole.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.ClusterRole.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.ClusterRoleBinding.json b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.ClusterRoleBinding.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.ClusterRoleBinding.json rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.ClusterRoleBinding.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.ClusterRoleBinding.pb b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.ClusterRoleBinding.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.ClusterRoleBinding.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.ClusterRoleBinding.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.ClusterRoleBinding.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.ClusterRoleBinding.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.ClusterRoleBinding.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.ClusterRoleBinding.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.Role.json b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.Role.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.Role.json rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.Role.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.Role.pb b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.Role.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.Role.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.Role.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.Role.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.Role.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.Role.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.Role.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.RoleBinding.json b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.RoleBinding.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.RoleBinding.json rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.RoleBinding.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.RoleBinding.pb b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.RoleBinding.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.RoleBinding.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.RoleBinding.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.RoleBinding.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.RoleBinding.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1alpha1.RoleBinding.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1alpha1.RoleBinding.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.ClusterRole.json b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.ClusterRole.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.ClusterRole.json rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.ClusterRole.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.ClusterRole.pb b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.ClusterRole.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.ClusterRole.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.ClusterRole.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.ClusterRole.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.ClusterRole.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.ClusterRole.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.ClusterRole.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.ClusterRoleBinding.json b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.ClusterRoleBinding.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.ClusterRoleBinding.json rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.ClusterRoleBinding.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.ClusterRoleBinding.pb b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.ClusterRoleBinding.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.ClusterRoleBinding.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.ClusterRoleBinding.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.ClusterRoleBinding.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.ClusterRoleBinding.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.ClusterRoleBinding.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.ClusterRoleBinding.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.Role.json b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.Role.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.Role.json rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.Role.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.Role.pb b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.Role.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.Role.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.Role.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.Role.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.Role.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.Role.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.Role.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.RoleBinding.json b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.RoleBinding.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.RoleBinding.json rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.RoleBinding.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.RoleBinding.pb b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.RoleBinding.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.RoleBinding.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.RoleBinding.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.RoleBinding.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.RoleBinding.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/rbac.authorization.k8s.io.v1beta1.RoleBinding.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/rbac.authorization.k8s.io.v1beta1.RoleBinding.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.DeviceClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.DeviceClass.json similarity index 94% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.DeviceClass.json rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.DeviceClass.json index cc837baa17313..8fd86ddef7314 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.DeviceClass.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.DeviceClass.json @@ -1,6 +1,6 @@ { "kind": "DeviceClass", - "apiVersion": "resource.k8s.io/v1alpha3", + "apiVersion": "resource.k8s.io/v1", "metadata": { "name": "nameValue", "generateName": "generateNameValue", @@ -67,6 +67,7 @@ } } } - ] + ], + "extendedResourceName": "extendedResourceNameValue" } } \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.DeviceClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.DeviceClass.pb similarity index 77% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.DeviceClass.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.DeviceClass.pb index 1ed35bed01c1d..1b1c76ceaf6c1 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.DeviceClass.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.DeviceClass.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.DeviceClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.DeviceClass.yaml similarity index 93% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.DeviceClass.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.DeviceClass.yaml index 9f786dc430e8b..36f958f33d22c 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.DeviceClass.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.DeviceClass.yaml @@ -1,4 +1,4 @@ -apiVersion: resource.k8s.io/v1alpha3 +apiVersion: resource.k8s.io/v1 kind: DeviceClass metadata: annotations: @@ -43,6 +43,7 @@ spec: replicas: 1 status: available: 1 + extendedResourceName: extendedResourceNameValue selectors: - cel: expression: expressionValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaim.json b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaim.json similarity index 63% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaim.json rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaim.json index f61f244ae7e43..a67a53104130e 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaim.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaim.json @@ -1,6 +1,6 @@ { "kind": "ResourceClaim", - "apiVersion": "resource.k8s.io/v1alpha3", + "apiVersion": "resource.k8s.io/v1", "metadata": { "name": "nameValue", "generateName": "generateNameValue", @@ -48,17 +48,62 @@ "requests": [ { "name": "nameValue", - "deviceClassName": "deviceClassNameValue", - "selectors": [ + "exactly": { + "deviceClassName": "deviceClassNameValue", + "selectors": [ + { + "cel": { + "expression": "expressionValue" + } + } + ], + "allocationMode": "allocationModeValue", + "count": 4, + "adminAccess": true, + "tolerations": [ + { + "key": "keyValue", + "operator": "operatorValue", + "value": "valueValue", + "effect": "effectValue", + "tolerationSeconds": 5 + } + ], + "capacity": { + "requests": { + "requestsKey": "0" + } + } + }, + "firstAvailable": [ { - "cel": { - "expression": "expressionValue" + "name": "nameValue", + "deviceClassName": "deviceClassNameValue", + "selectors": [ + { + "cel": { + "expression": "expressionValue" + } + } + ], + "allocationMode": "allocationModeValue", + "count": 5, + "tolerations": [ + { + "key": "keyValue", + "operator": "operatorValue", + "value": "valueValue", + "effect": "effectValue", + "tolerationSeconds": 5 + } + ], + "capacity": { + "requests": { + "requestsKey": "0" + } } } - ], - "allocationMode": "allocationModeValue", - "count": 5, - "adminAccess": true + ] } ], "constraints": [ @@ -66,7 +111,8 @@ "requests": [ "requestsValue" ], - "matchAttribute": "matchAttributeValue" + "matchAttribute": "matchAttributeValue", + "distinctAttribute": "distinctAttributeValue" } ], "config": [ @@ -100,7 +146,26 @@ "driver": "driverValue", "pool": "poolValue", "device": "deviceValue", - "adminAccess": true + "adminAccess": true, + "tolerations": [ + { + "key": "keyValue", + "operator": "operatorValue", + "value": "valueValue", + "effect": "effectValue", + "tolerationSeconds": 5 + } + ], + "bindingConditions": [ + "bindingConditionsValue" + ], + "bindingFailureConditions": [ + "bindingFailureConditionsValue" + ], + "shareID": "shareIDValue", + "consumedCapacity": { + "consumedCapacityKey": "0" + } } ], "config": [ @@ -148,7 +213,8 @@ ] } ] - } + }, + "allocationTimestamp": "2005-01-01T01:01:01Z" }, "reservedFor": [ { @@ -163,6 +229,7 @@ "driver": "driverValue", "pool": "poolValue", "device": "deviceValue", + "shareID": "shareIDValue", "conditions": [ { "type": "typeValue", diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaim.pb b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaim.pb similarity index 50% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaim.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaim.pb index 30923fd8e35ce..4a5f34d71c5cd 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaim.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaim.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaim.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaim.yaml similarity index 63% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaim.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaim.yaml index bc7855856b182..db448e861fdeb 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaim.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaim.yaml @@ -1,4 +1,4 @@ -apiVersion: resource.k8s.io/v1alpha3 +apiVersion: resource.k8s.io/v1 kind: ResourceClaim metadata: annotations: @@ -47,20 +47,49 @@ spec: requests: - requestsValue constraints: - - matchAttribute: matchAttributeValue + - distinctAttribute: distinctAttributeValue + matchAttribute: matchAttributeValue requests: - requestsValue requests: - - adminAccess: true - allocationMode: allocationModeValue - count: 5 - deviceClassName: deviceClassNameValue + - exactly: + adminAccess: true + allocationMode: allocationModeValue + capacity: + requests: + requestsKey: "0" + count: 4 + deviceClassName: deviceClassNameValue + selectors: + - cel: + expression: expressionValue + tolerations: + - effect: effectValue + key: keyValue + operator: operatorValue + tolerationSeconds: 5 + value: valueValue + firstAvailable: + - allocationMode: allocationModeValue + capacity: + requests: + requestsKey: "0" + count: 5 + deviceClassName: deviceClassNameValue + name: nameValue + selectors: + - cel: + expression: expressionValue + tolerations: + - effect: effectValue + key: keyValue + operator: operatorValue + tolerationSeconds: 5 + value: valueValue name: nameValue - selectors: - - cel: - expression: expressionValue status: allocation: + allocationTimestamp: "2005-01-01T01:01:01Z" devices: config: - opaque: @@ -77,10 +106,23 @@ status: source: sourceValue results: - adminAccess: true + bindingConditions: + - bindingConditionsValue + bindingFailureConditions: + - bindingFailureConditionsValue + consumedCapacity: + consumedCapacityKey: "0" device: deviceValue driver: driverValue pool: poolValue request: requestValue + shareID: shareIDValue + tolerations: + - effect: effectValue + key: keyValue + operator: operatorValue + tolerationSeconds: 5 + value: valueValue nodeSelector: nodeSelectorTerms: - matchExpressions: @@ -116,6 +158,7 @@ status: ips: - ipsValue pool: poolValue + shareID: shareIDValue reservedFor: - apiGroup: apiGroupValue name: nameValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaimTemplate.json b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaimTemplate.json similarity index 63% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaimTemplate.json rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaimTemplate.json index 0669af6df4672..c7f2c88974e2c 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaimTemplate.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaimTemplate.json @@ -1,6 +1,6 @@ { "kind": "ResourceClaimTemplate", - "apiVersion": "resource.k8s.io/v1alpha3", + "apiVersion": "resource.k8s.io/v1", "metadata": { "name": "nameValue", "generateName": "generateNameValue", @@ -91,17 +91,62 @@ "requests": [ { "name": "nameValue", - "deviceClassName": "deviceClassNameValue", - "selectors": [ + "exactly": { + "deviceClassName": "deviceClassNameValue", + "selectors": [ + { + "cel": { + "expression": "expressionValue" + } + } + ], + "allocationMode": "allocationModeValue", + "count": 4, + "adminAccess": true, + "tolerations": [ + { + "key": "keyValue", + "operator": "operatorValue", + "value": "valueValue", + "effect": "effectValue", + "tolerationSeconds": 5 + } + ], + "capacity": { + "requests": { + "requestsKey": "0" + } + } + }, + "firstAvailable": [ { - "cel": { - "expression": "expressionValue" + "name": "nameValue", + "deviceClassName": "deviceClassNameValue", + "selectors": [ + { + "cel": { + "expression": "expressionValue" + } + } + ], + "allocationMode": "allocationModeValue", + "count": 5, + "tolerations": [ + { + "key": "keyValue", + "operator": "operatorValue", + "value": "valueValue", + "effect": "effectValue", + "tolerationSeconds": 5 + } + ], + "capacity": { + "requests": { + "requestsKey": "0" + } } } - ], - "allocationMode": "allocationModeValue", - "count": 5, - "adminAccess": true + ] } ], "constraints": [ @@ -109,7 +154,8 @@ "requests": [ "requestsValue" ], - "matchAttribute": "matchAttributeValue" + "matchAttribute": "matchAttributeValue", + "distinctAttribute": "distinctAttributeValue" } ], "config": [ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaimTemplate.pb b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaimTemplate.pb similarity index 65% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaimTemplate.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaimTemplate.pb index fab18a8e9e5f8..db1f0ee449c48 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaimTemplate.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaimTemplate.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaimTemplate.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaimTemplate.yaml similarity index 65% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaimTemplate.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaimTemplate.yaml index b0e5939dd5fe9..a29821f1c1c08 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceClaimTemplate.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceClaimTemplate.yaml @@ -1,4 +1,4 @@ -apiVersion: resource.k8s.io/v1alpha3 +apiVersion: resource.k8s.io/v1 kind: ResourceClaimTemplate metadata: annotations: @@ -80,15 +80,43 @@ spec: requests: - requestsValue constraints: - - matchAttribute: matchAttributeValue + - distinctAttribute: distinctAttributeValue + matchAttribute: matchAttributeValue requests: - requestsValue requests: - - adminAccess: true - allocationMode: allocationModeValue - count: 5 - deviceClassName: deviceClassNameValue + - exactly: + adminAccess: true + allocationMode: allocationModeValue + capacity: + requests: + requestsKey: "0" + count: 4 + deviceClassName: deviceClassNameValue + selectors: + - cel: + expression: expressionValue + tolerations: + - effect: effectValue + key: keyValue + operator: operatorValue + tolerationSeconds: 5 + value: valueValue + firstAvailable: + - allocationMode: allocationModeValue + capacity: + requests: + requestsKey: "0" + count: 5 + deviceClassName: deviceClassNameValue + name: nameValue + selectors: + - cel: + expression: expressionValue + tolerations: + - effect: effectValue + key: keyValue + operator: operatorValue + tolerationSeconds: 5 + value: valueValue name: nameValue - selectors: - - cel: - expression: expressionValue diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceSlice.json b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceSlice.json new file mode 100644 index 0000000000000..71a2a34646581 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceSlice.json @@ -0,0 +1,172 @@ +{ + "kind": "ResourceSlice", + "apiVersion": "resource.k8s.io/v1", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "spec": { + "driver": "driverValue", + "pool": { + "name": "nameValue", + "generation": 2, + "resourceSliceCount": 3 + }, + "nodeName": "nodeNameValue", + "nodeSelector": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ], + "matchFields": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ] + } + ] + }, + "allNodes": true, + "devices": [ + { + "name": "nameValue", + "attributes": { + "attributesKey": { + "int": 2, + "bool": true, + "string": "stringValue", + "version": "versionValue" + } + }, + "capacity": { + "capacityKey": { + "value": "0", + "requestPolicy": { + "default": "0", + "validValues": [ + "0" + ], + "validRange": { + "min": "0", + "max": "0", + "step": "0" + } + } + } + }, + "consumesCounters": [ + { + "counterSet": "counterSetValue", + "counters": { + "countersKey": { + "value": "0" + } + } + } + ], + "nodeName": "nodeNameValue", + "nodeSelector": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ], + "matchFields": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ] + } + ] + }, + "allNodes": true, + "taints": [ + { + "key": "keyValue", + "value": "valueValue", + "effect": "effectValue", + "timeAdded": "2004-01-01T01:01:01Z" + } + ], + "bindsToNode": true, + "bindingConditions": [ + "bindingConditionsValue" + ], + "bindingFailureConditions": [ + "bindingFailureConditionsValue" + ], + "allowMultipleAllocations": true + } + ], + "perDeviceNodeSelection": true, + "sharedCounters": [ + { + "name": "nameValue", + "counters": { + "countersKey": { + "value": "0" + } + } + } + ] + } +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceSlice.pb b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceSlice.pb new file mode 100644 index 0000000000000..3dcb6b97c1e2c Binary files /dev/null and b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceSlice.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceSlice.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceSlice.yaml new file mode 100644 index 0000000000000..f39b9ce2a3055 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1.ResourceSlice.yaml @@ -0,0 +1,109 @@ +apiVersion: resource.k8s.io/v1 +kind: ResourceSlice +metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue +spec: + allNodes: true + devices: + - allNodes: true + allowMultipleAllocations: true + attributes: + attributesKey: + bool: true + int: 2 + string: stringValue + version: versionValue + bindingConditions: + - bindingConditionsValue + bindingFailureConditions: + - bindingFailureConditionsValue + bindsToNode: true + capacity: + capacityKey: + requestPolicy: + default: "0" + validRange: + max: "0" + min: "0" + step: "0" + validValues: + - "0" + value: "0" + consumesCounters: + - counterSet: counterSetValue + counters: + countersKey: + value: "0" + name: nameValue + nodeName: nodeNameValue + nodeSelector: + nodeSelectorTerms: + - matchExpressions: + - key: keyValue + operator: operatorValue + values: + - valuesValue + matchFields: + - key: keyValue + operator: operatorValue + values: + - valuesValue + taints: + - effect: effectValue + key: keyValue + timeAdded: "2004-01-01T01:01:01Z" + value: valueValue + driver: driverValue + nodeName: nodeNameValue + nodeSelector: + nodeSelectorTerms: + - matchExpressions: + - key: keyValue + operator: operatorValue + values: + - valuesValue + matchFields: + - key: keyValue + operator: operatorValue + values: + - valuesValue + perDeviceNodeSelection: true + pool: + generation: 2 + name: nameValue + resourceSliceCount: 3 + sharedCounters: + - counters: + countersKey: + value: "0" + name: nameValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceSlice.json b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1alpha3.DeviceTaintRule.json similarity index 53% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceSlice.json rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1alpha3.DeviceTaintRule.json index a3a916ae36352..84ad149568007 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceSlice.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1alpha3.DeviceTaintRule.json @@ -1,5 +1,5 @@ { - "kind": "ResourceSlice", + "kind": "DeviceTaintRule", "apiVersion": "resource.k8s.io/v1alpha3", "metadata": { "name": "nameValue", @@ -44,55 +44,24 @@ ] }, "spec": { - "driver": "driverValue", - "pool": { - "name": "nameValue", - "generation": 2, - "resourceSliceCount": 3 - }, - "nodeName": "nodeNameValue", - "nodeSelector": { - "nodeSelectorTerms": [ + "deviceSelector": { + "deviceClassName": "deviceClassNameValue", + "driver": "driverValue", + "pool": "poolValue", + "device": "deviceValue", + "selectors": [ { - "matchExpressions": [ - { - "key": "keyValue", - "operator": "operatorValue", - "values": [ - "valuesValue" - ] - } - ], - "matchFields": [ - { - "key": "keyValue", - "operator": "operatorValue", - "values": [ - "valuesValue" - ] - } - ] + "cel": { + "expression": "expressionValue" + } } ] }, - "allNodes": true, - "devices": [ - { - "name": "nameValue", - "basic": { - "attributes": { - "attributesKey": { - "int": 2, - "bool": true, - "string": "stringValue", - "version": "versionValue" - } - }, - "capacity": { - "capacityKey": "0" - } - } - } - ] + "taint": { + "key": "keyValue", + "value": "valueValue", + "effect": "effectValue", + "timeAdded": "2004-01-01T01:01:01Z" + } } } \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1alpha3.DeviceTaintRule.pb b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1alpha3.DeviceTaintRule.pb new file mode 100644 index 0000000000000..60244465bfcc2 Binary files /dev/null and b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1alpha3.DeviceTaintRule.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceSlice.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1alpha3.DeviceTaintRule.yaml similarity index 56% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceSlice.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1alpha3.DeviceTaintRule.yaml index 93d7f2e117023..8d06614b992c9 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1alpha3.ResourceSlice.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1alpha3.DeviceTaintRule.yaml @@ -1,5 +1,5 @@ apiVersion: resource.k8s.io/v1alpha3 -kind: ResourceSlice +kind: DeviceTaintRule metadata: annotations: annotationsKey: annotationsValue @@ -33,33 +33,16 @@ metadata: selfLink: selfLinkValue uid: uidValue spec: - allNodes: true - devices: - - basic: - attributes: - attributesKey: - bool: true - int: 2 - string: stringValue - version: versionValue - capacity: - capacityKey: "0" - name: nameValue - driver: driverValue - nodeName: nodeNameValue - nodeSelector: - nodeSelectorTerms: - - matchExpressions: - - key: keyValue - operator: operatorValue - values: - - valuesValue - matchFields: - - key: keyValue - operator: operatorValue - values: - - valuesValue - pool: - generation: 2 - name: nameValue - resourceSliceCount: 3 + deviceSelector: + device: deviceValue + deviceClassName: deviceClassNameValue + driver: driverValue + pool: poolValue + selectors: + - cel: + expression: expressionValue + taint: + effect: effectValue + key: keyValue + timeAdded: "2004-01-01T01:01:01Z" + value: valueValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.DeviceClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.DeviceClass.json similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.DeviceClass.json rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.DeviceClass.json index 2b6e04b3b9cbe..82ed74a32c393 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.DeviceClass.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.DeviceClass.json @@ -67,6 +67,7 @@ } } } - ] + ], + "extendedResourceName": "extendedResourceNameValue" } } \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.DeviceClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.DeviceClass.pb similarity index 77% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.DeviceClass.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.DeviceClass.pb index be0ebc6f8afa0..a60344d077565 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.DeviceClass.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.DeviceClass.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.DeviceClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.DeviceClass.yaml similarity index 95% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.DeviceClass.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.DeviceClass.yaml index 8cbd63240cc0c..9390e676b428b 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.DeviceClass.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.DeviceClass.yaml @@ -43,6 +43,7 @@ spec: replicas: 1 status: available: 1 + extendedResourceName: extendedResourceNameValue selectors: - cel: expression: expressionValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaim.json b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaim.json similarity index 68% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaim.json rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaim.json index f0f993218bc02..74e5b53ce8a6c 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaim.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaim.json @@ -58,7 +58,50 @@ ], "allocationMode": "allocationModeValue", "count": 5, - "adminAccess": true + "adminAccess": true, + "firstAvailable": [ + { + "name": "nameValue", + "deviceClassName": "deviceClassNameValue", + "selectors": [ + { + "cel": { + "expression": "expressionValue" + } + } + ], + "allocationMode": "allocationModeValue", + "count": 5, + "tolerations": [ + { + "key": "keyValue", + "operator": "operatorValue", + "value": "valueValue", + "effect": "effectValue", + "tolerationSeconds": 5 + } + ], + "capacity": { + "requests": { + "requestsKey": "0" + } + } + } + ], + "tolerations": [ + { + "key": "keyValue", + "operator": "operatorValue", + "value": "valueValue", + "effect": "effectValue", + "tolerationSeconds": 5 + } + ], + "capacity": { + "requests": { + "requestsKey": "0" + } + } } ], "constraints": [ @@ -66,7 +109,8 @@ "requests": [ "requestsValue" ], - "matchAttribute": "matchAttributeValue" + "matchAttribute": "matchAttributeValue", + "distinctAttribute": "distinctAttributeValue" } ], "config": [ @@ -100,7 +144,26 @@ "driver": "driverValue", "pool": "poolValue", "device": "deviceValue", - "adminAccess": true + "adminAccess": true, + "tolerations": [ + { + "key": "keyValue", + "operator": "operatorValue", + "value": "valueValue", + "effect": "effectValue", + "tolerationSeconds": 5 + } + ], + "bindingConditions": [ + "bindingConditionsValue" + ], + "bindingFailureConditions": [ + "bindingFailureConditionsValue" + ], + "shareID": "shareIDValue", + "consumedCapacity": { + "consumedCapacityKey": "0" + } } ], "config": [ @@ -148,7 +211,8 @@ ] } ] - } + }, + "allocationTimestamp": "2005-01-01T01:01:01Z" }, "reservedFor": [ { @@ -163,6 +227,7 @@ "driver": "driverValue", "pool": "poolValue", "device": "deviceValue", + "shareID": "shareIDValue", "conditions": [ { "type": "typeValue", diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaim.pb b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaim.pb similarity index 50% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaim.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaim.pb index 9265e325d91c2..8a0697d2ab34a 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaim.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaim.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaim.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaim.yaml similarity index 69% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaim.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaim.yaml index 71d30617a5631..ccb2b63c3622d 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaim.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaim.yaml @@ -47,20 +47,48 @@ spec: requests: - requestsValue constraints: - - matchAttribute: matchAttributeValue + - distinctAttribute: distinctAttributeValue + matchAttribute: matchAttributeValue requests: - requestsValue requests: - adminAccess: true allocationMode: allocationModeValue + capacity: + requests: + requestsKey: "0" count: 5 deviceClassName: deviceClassNameValue + firstAvailable: + - allocationMode: allocationModeValue + capacity: + requests: + requestsKey: "0" + count: 5 + deviceClassName: deviceClassNameValue + name: nameValue + selectors: + - cel: + expression: expressionValue + tolerations: + - effect: effectValue + key: keyValue + operator: operatorValue + tolerationSeconds: 5 + value: valueValue name: nameValue selectors: - cel: expression: expressionValue + tolerations: + - effect: effectValue + key: keyValue + operator: operatorValue + tolerationSeconds: 5 + value: valueValue status: allocation: + allocationTimestamp: "2005-01-01T01:01:01Z" devices: config: - opaque: @@ -77,10 +105,23 @@ status: source: sourceValue results: - adminAccess: true + bindingConditions: + - bindingConditionsValue + bindingFailureConditions: + - bindingFailureConditionsValue + consumedCapacity: + consumedCapacityKey: "0" device: deviceValue driver: driverValue pool: poolValue request: requestValue + shareID: shareIDValue + tolerations: + - effect: effectValue + key: keyValue + operator: operatorValue + tolerationSeconds: 5 + value: valueValue nodeSelector: nodeSelectorTerms: - matchExpressions: @@ -116,6 +157,7 @@ status: ips: - ipsValue pool: poolValue + shareID: shareIDValue reservedFor: - apiGroup: apiGroupValue name: nameValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.json b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.json similarity index 70% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.json rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.json index 9342cb4faa037..9f40b834f072d 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.json @@ -101,7 +101,50 @@ ], "allocationMode": "allocationModeValue", "count": 5, - "adminAccess": true + "adminAccess": true, + "firstAvailable": [ + { + "name": "nameValue", + "deviceClassName": "deviceClassNameValue", + "selectors": [ + { + "cel": { + "expression": "expressionValue" + } + } + ], + "allocationMode": "allocationModeValue", + "count": 5, + "tolerations": [ + { + "key": "keyValue", + "operator": "operatorValue", + "value": "valueValue", + "effect": "effectValue", + "tolerationSeconds": 5 + } + ], + "capacity": { + "requests": { + "requestsKey": "0" + } + } + } + ], + "tolerations": [ + { + "key": "keyValue", + "operator": "operatorValue", + "value": "valueValue", + "effect": "effectValue", + "tolerationSeconds": 5 + } + ], + "capacity": { + "requests": { + "requestsKey": "0" + } + } } ], "constraints": [ @@ -109,7 +152,8 @@ "requests": [ "requestsValue" ], - "matchAttribute": "matchAttributeValue" + "matchAttribute": "matchAttributeValue", + "distinctAttribute": "distinctAttributeValue" } ], "config": [ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.pb b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.pb similarity index 65% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.pb index af0631e6030b6..344bd3899f378 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.yaml similarity index 74% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.yaml index 3d2209315d1a1..ca60241548004 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceClaimTemplate.yaml @@ -80,15 +80,42 @@ spec: requests: - requestsValue constraints: - - matchAttribute: matchAttributeValue + - distinctAttribute: distinctAttributeValue + matchAttribute: matchAttributeValue requests: - requestsValue requests: - adminAccess: true allocationMode: allocationModeValue + capacity: + requests: + requestsKey: "0" count: 5 deviceClassName: deviceClassNameValue + firstAvailable: + - allocationMode: allocationModeValue + capacity: + requests: + requestsKey: "0" + count: 5 + deviceClassName: deviceClassNameValue + name: nameValue + selectors: + - cel: + expression: expressionValue + tolerations: + - effect: effectValue + key: keyValue + operator: operatorValue + tolerationSeconds: 5 + value: valueValue name: nameValue selectors: - cel: expression: expressionValue + tolerations: + - effect: effectValue + key: keyValue + operator: operatorValue + tolerationSeconds: 5 + value: valueValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceSlice.json b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceSlice.json similarity index 53% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceSlice.json rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceSlice.json index 06b650026d802..eb2879fa0a4d2 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceSlice.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceSlice.json @@ -90,8 +90,82 @@ }, "capacity": { "capacityKey": { - "value": "0" + "value": "0", + "requestPolicy": { + "default": "0", + "validValues": [ + "0" + ], + "validRange": { + "min": "0", + "max": "0", + "step": "0" + } + } } + }, + "consumesCounters": [ + { + "counterSet": "counterSetValue", + "counters": { + "countersKey": { + "value": "0" + } + } + } + ], + "nodeName": "nodeNameValue", + "nodeSelector": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ], + "matchFields": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ] + } + ] + }, + "allNodes": true, + "taints": [ + { + "key": "keyValue", + "value": "valueValue", + "effect": "effectValue", + "timeAdded": "2004-01-01T01:01:01Z" + } + ], + "bindsToNode": true, + "bindingConditions": [ + "bindingConditionsValue" + ], + "bindingFailureConditions": [ + "bindingFailureConditionsValue" + ], + "allowMultipleAllocations": true + } + } + ], + "perDeviceNodeSelection": true, + "sharedCounters": [ + { + "name": "nameValue", + "counters": { + "countersKey": { + "value": "0" } } } diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceSlice.pb b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceSlice.pb new file mode 100644 index 0000000000000..248a5d59e7555 Binary files /dev/null and b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceSlice.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceSlice.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceSlice.yaml similarity index 57% rename from staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceSlice.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceSlice.yaml index f4515c37df694..dea39fec6203a 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/resource.k8s.io.v1beta1.ResourceSlice.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta1.ResourceSlice.yaml @@ -36,15 +36,53 @@ spec: allNodes: true devices: - basic: + allNodes: true + allowMultipleAllocations: true attributes: attributesKey: bool: true int: 2 string: stringValue version: versionValue + bindingConditions: + - bindingConditionsValue + bindingFailureConditions: + - bindingFailureConditionsValue + bindsToNode: true capacity: capacityKey: + requestPolicy: + default: "0" + validRange: + max: "0" + min: "0" + step: "0" + validValues: + - "0" value: "0" + consumesCounters: + - counterSet: counterSetValue + counters: + countersKey: + value: "0" + nodeName: nodeNameValue + nodeSelector: + nodeSelectorTerms: + - matchExpressions: + - key: keyValue + operator: operatorValue + values: + - valuesValue + matchFields: + - key: keyValue + operator: operatorValue + values: + - valuesValue + taints: + - effect: effectValue + key: keyValue + timeAdded: "2004-01-01T01:01:01Z" + value: valueValue name: nameValue driver: driverValue nodeName: nodeNameValue @@ -60,7 +98,13 @@ spec: operator: operatorValue values: - valuesValue + perDeviceNodeSelection: true pool: generation: 2 name: nameValue resourceSliceCount: 3 + sharedCounters: + - counters: + countersKey: + value: "0" + name: nameValue diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.DeviceClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.DeviceClass.json new file mode 100644 index 0000000000000..2cc62c50c4a3e --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.DeviceClass.json @@ -0,0 +1,73 @@ +{ + "kind": "DeviceClass", + "apiVersion": "resource.k8s.io/v1beta2", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "spec": { + "selectors": [ + { + "cel": { + "expression": "expressionValue" + } + } + ], + "config": [ + { + "opaque": { + "driver": "driverValue", + "parameters": { + "apiVersion": "example.com/v1", + "kind": "CustomType", + "spec": { + "replicas": 1 + }, + "status": { + "available": 1 + } + } + } + } + ], + "extendedResourceName": "extendedResourceNameValue" + } +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.DeviceClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.DeviceClass.pb new file mode 100644 index 0000000000000..0ca74192a08e8 Binary files /dev/null and b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.DeviceClass.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.DeviceClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.DeviceClass.yaml new file mode 100644 index 0000000000000..c307342cacc09 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.DeviceClass.yaml @@ -0,0 +1,49 @@ +apiVersion: resource.k8s.io/v1beta2 +kind: DeviceClass +metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue +spec: + config: + - opaque: + driver: driverValue + parameters: + apiVersion: example.com/v1 + kind: CustomType + spec: + replicas: 1 + status: + available: 1 + extendedResourceName: extendedResourceNameValue + selectors: + - cel: + expression: expressionValue diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaim.json b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaim.json new file mode 100644 index 0000000000000..4036029512f2f --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaim.json @@ -0,0 +1,263 @@ +{ + "kind": "ResourceClaim", + "apiVersion": "resource.k8s.io/v1beta2", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "spec": { + "devices": { + "requests": [ + { + "name": "nameValue", + "exactly": { + "deviceClassName": "deviceClassNameValue", + "selectors": [ + { + "cel": { + "expression": "expressionValue" + } + } + ], + "allocationMode": "allocationModeValue", + "count": 4, + "adminAccess": true, + "tolerations": [ + { + "key": "keyValue", + "operator": "operatorValue", + "value": "valueValue", + "effect": "effectValue", + "tolerationSeconds": 5 + } + ], + "capacity": { + "requests": { + "requestsKey": "0" + } + } + }, + "firstAvailable": [ + { + "name": "nameValue", + "deviceClassName": "deviceClassNameValue", + "selectors": [ + { + "cel": { + "expression": "expressionValue" + } + } + ], + "allocationMode": "allocationModeValue", + "count": 5, + "tolerations": [ + { + "key": "keyValue", + "operator": "operatorValue", + "value": "valueValue", + "effect": "effectValue", + "tolerationSeconds": 5 + } + ], + "capacity": { + "requests": { + "requestsKey": "0" + } + } + } + ] + } + ], + "constraints": [ + { + "requests": [ + "requestsValue" + ], + "matchAttribute": "matchAttributeValue", + "distinctAttribute": "distinctAttributeValue" + } + ], + "config": [ + { + "requests": [ + "requestsValue" + ], + "opaque": { + "driver": "driverValue", + "parameters": { + "apiVersion": "example.com/v1", + "kind": "CustomType", + "spec": { + "replicas": 1 + }, + "status": { + "available": 1 + } + } + } + } + ] + } + }, + "status": { + "allocation": { + "devices": { + "results": [ + { + "request": "requestValue", + "driver": "driverValue", + "pool": "poolValue", + "device": "deviceValue", + "adminAccess": true, + "tolerations": [ + { + "key": "keyValue", + "operator": "operatorValue", + "value": "valueValue", + "effect": "effectValue", + "tolerationSeconds": 5 + } + ], + "bindingConditions": [ + "bindingConditionsValue" + ], + "bindingFailureConditions": [ + "bindingFailureConditionsValue" + ], + "shareID": "shareIDValue", + "consumedCapacity": { + "consumedCapacityKey": "0" + } + } + ], + "config": [ + { + "source": "sourceValue", + "requests": [ + "requestsValue" + ], + "opaque": { + "driver": "driverValue", + "parameters": { + "apiVersion": "example.com/v1", + "kind": "CustomType", + "spec": { + "replicas": 1 + }, + "status": { + "available": 1 + } + } + } + } + ] + }, + "nodeSelector": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ], + "matchFields": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ] + } + ] + }, + "allocationTimestamp": "2005-01-01T01:01:01Z" + }, + "reservedFor": [ + { + "apiGroup": "apiGroupValue", + "resource": "resourceValue", + "name": "nameValue", + "uid": "uidValue" + } + ], + "devices": [ + { + "driver": "driverValue", + "pool": "poolValue", + "device": "deviceValue", + "shareID": "shareIDValue", + "conditions": [ + { + "type": "typeValue", + "status": "statusValue", + "observedGeneration": 3, + "lastTransitionTime": "2004-01-01T01:01:01Z", + "reason": "reasonValue", + "message": "messageValue" + } + ], + "data": { + "apiVersion": "example.com/v1", + "kind": "CustomType", + "spec": { + "replicas": 1 + }, + "status": { + "available": 1 + } + }, + "networkData": { + "interfaceName": "interfaceNameValue", + "ips": [ + "ipsValue" + ], + "hardwareAddress": "hardwareAddressValue" + } + } + ] + } +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaim.pb b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaim.pb new file mode 100644 index 0000000000000..6dcae3edcf99b Binary files /dev/null and b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaim.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaim.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaim.yaml new file mode 100644 index 0000000000000..3dc7772bfb3f2 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaim.yaml @@ -0,0 +1,166 @@ +apiVersion: resource.k8s.io/v1beta2 +kind: ResourceClaim +metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue +spec: + devices: + config: + - opaque: + driver: driverValue + parameters: + apiVersion: example.com/v1 + kind: CustomType + spec: + replicas: 1 + status: + available: 1 + requests: + - requestsValue + constraints: + - distinctAttribute: distinctAttributeValue + matchAttribute: matchAttributeValue + requests: + - requestsValue + requests: + - exactly: + adminAccess: true + allocationMode: allocationModeValue + capacity: + requests: + requestsKey: "0" + count: 4 + deviceClassName: deviceClassNameValue + selectors: + - cel: + expression: expressionValue + tolerations: + - effect: effectValue + key: keyValue + operator: operatorValue + tolerationSeconds: 5 + value: valueValue + firstAvailable: + - allocationMode: allocationModeValue + capacity: + requests: + requestsKey: "0" + count: 5 + deviceClassName: deviceClassNameValue + name: nameValue + selectors: + - cel: + expression: expressionValue + tolerations: + - effect: effectValue + key: keyValue + operator: operatorValue + tolerationSeconds: 5 + value: valueValue + name: nameValue +status: + allocation: + allocationTimestamp: "2005-01-01T01:01:01Z" + devices: + config: + - opaque: + driver: driverValue + parameters: + apiVersion: example.com/v1 + kind: CustomType + spec: + replicas: 1 + status: + available: 1 + requests: + - requestsValue + source: sourceValue + results: + - adminAccess: true + bindingConditions: + - bindingConditionsValue + bindingFailureConditions: + - bindingFailureConditionsValue + consumedCapacity: + consumedCapacityKey: "0" + device: deviceValue + driver: driverValue + pool: poolValue + request: requestValue + shareID: shareIDValue + tolerations: + - effect: effectValue + key: keyValue + operator: operatorValue + tolerationSeconds: 5 + value: valueValue + nodeSelector: + nodeSelectorTerms: + - matchExpressions: + - key: keyValue + operator: operatorValue + values: + - valuesValue + matchFields: + - key: keyValue + operator: operatorValue + values: + - valuesValue + devices: + - conditions: + - lastTransitionTime: "2004-01-01T01:01:01Z" + message: messageValue + observedGeneration: 3 + reason: reasonValue + status: statusValue + type: typeValue + data: + apiVersion: example.com/v1 + kind: CustomType + spec: + replicas: 1 + status: + available: 1 + device: deviceValue + driver: driverValue + networkData: + hardwareAddress: hardwareAddressValue + interfaceName: interfaceNameValue + ips: + - ipsValue + pool: poolValue + shareID: shareIDValue + reservedFor: + - apiGroup: apiGroupValue + name: nameValue + resource: resourceValue + uid: uidValue diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaimTemplate.json b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaimTemplate.json new file mode 100644 index 0000000000000..9633ebb2c7d32 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaimTemplate.json @@ -0,0 +1,184 @@ +{ + "kind": "ResourceClaimTemplate", + "apiVersion": "resource.k8s.io/v1beta2", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "spec": { + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "spec": { + "devices": { + "requests": [ + { + "name": "nameValue", + "exactly": { + "deviceClassName": "deviceClassNameValue", + "selectors": [ + { + "cel": { + "expression": "expressionValue" + } + } + ], + "allocationMode": "allocationModeValue", + "count": 4, + "adminAccess": true, + "tolerations": [ + { + "key": "keyValue", + "operator": "operatorValue", + "value": "valueValue", + "effect": "effectValue", + "tolerationSeconds": 5 + } + ], + "capacity": { + "requests": { + "requestsKey": "0" + } + } + }, + "firstAvailable": [ + { + "name": "nameValue", + "deviceClassName": "deviceClassNameValue", + "selectors": [ + { + "cel": { + "expression": "expressionValue" + } + } + ], + "allocationMode": "allocationModeValue", + "count": 5, + "tolerations": [ + { + "key": "keyValue", + "operator": "operatorValue", + "value": "valueValue", + "effect": "effectValue", + "tolerationSeconds": 5 + } + ], + "capacity": { + "requests": { + "requestsKey": "0" + } + } + } + ] + } + ], + "constraints": [ + { + "requests": [ + "requestsValue" + ], + "matchAttribute": "matchAttributeValue", + "distinctAttribute": "distinctAttributeValue" + } + ], + "config": [ + { + "requests": [ + "requestsValue" + ], + "opaque": { + "driver": "driverValue", + "parameters": { + "apiVersion": "example.com/v1", + "kind": "CustomType", + "spec": { + "replicas": 1 + }, + "status": { + "available": 1 + } + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaimTemplate.pb b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaimTemplate.pb new file mode 100644 index 0000000000000..1fff455fdeb5d Binary files /dev/null and b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaimTemplate.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaimTemplate.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaimTemplate.yaml new file mode 100644 index 0000000000000..1cc17c3612370 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceClaimTemplate.yaml @@ -0,0 +1,122 @@ +apiVersion: resource.k8s.io/v1beta2 +kind: ResourceClaimTemplate +metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue +spec: + metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue + spec: + devices: + config: + - opaque: + driver: driverValue + parameters: + apiVersion: example.com/v1 + kind: CustomType + spec: + replicas: 1 + status: + available: 1 + requests: + - requestsValue + constraints: + - distinctAttribute: distinctAttributeValue + matchAttribute: matchAttributeValue + requests: + - requestsValue + requests: + - exactly: + adminAccess: true + allocationMode: allocationModeValue + capacity: + requests: + requestsKey: "0" + count: 4 + deviceClassName: deviceClassNameValue + selectors: + - cel: + expression: expressionValue + tolerations: + - effect: effectValue + key: keyValue + operator: operatorValue + tolerationSeconds: 5 + value: valueValue + firstAvailable: + - allocationMode: allocationModeValue + capacity: + requests: + requestsKey: "0" + count: 5 + deviceClassName: deviceClassNameValue + name: nameValue + selectors: + - cel: + expression: expressionValue + tolerations: + - effect: effectValue + key: keyValue + operator: operatorValue + tolerationSeconds: 5 + value: valueValue + name: nameValue diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceSlice.json b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceSlice.json new file mode 100644 index 0000000000000..4d80e7cfe726a --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceSlice.json @@ -0,0 +1,172 @@ +{ + "kind": "ResourceSlice", + "apiVersion": "resource.k8s.io/v1beta2", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "spec": { + "driver": "driverValue", + "pool": { + "name": "nameValue", + "generation": 2, + "resourceSliceCount": 3 + }, + "nodeName": "nodeNameValue", + "nodeSelector": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ], + "matchFields": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ] + } + ] + }, + "allNodes": true, + "devices": [ + { + "name": "nameValue", + "attributes": { + "attributesKey": { + "int": 2, + "bool": true, + "string": "stringValue", + "version": "versionValue" + } + }, + "capacity": { + "capacityKey": { + "value": "0", + "requestPolicy": { + "default": "0", + "validValues": [ + "0" + ], + "validRange": { + "min": "0", + "max": "0", + "step": "0" + } + } + } + }, + "consumesCounters": [ + { + "counterSet": "counterSetValue", + "counters": { + "countersKey": { + "value": "0" + } + } + } + ], + "nodeName": "nodeNameValue", + "nodeSelector": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ], + "matchFields": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ] + } + ] + }, + "allNodes": true, + "taints": [ + { + "key": "keyValue", + "value": "valueValue", + "effect": "effectValue", + "timeAdded": "2004-01-01T01:01:01Z" + } + ], + "bindsToNode": true, + "bindingConditions": [ + "bindingConditionsValue" + ], + "bindingFailureConditions": [ + "bindingFailureConditionsValue" + ], + "allowMultipleAllocations": true + } + ], + "perDeviceNodeSelection": true, + "sharedCounters": [ + { + "name": "nameValue", + "counters": { + "countersKey": { + "value": "0" + } + } + } + ] + } +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceSlice.pb b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceSlice.pb new file mode 100644 index 0000000000000..a81ae25142726 Binary files /dev/null and b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceSlice.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceSlice.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceSlice.yaml new file mode 100644 index 0000000000000..73881c40d3cb4 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/resource.k8s.io.v1beta2.ResourceSlice.yaml @@ -0,0 +1,109 @@ +apiVersion: resource.k8s.io/v1beta2 +kind: ResourceSlice +metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue +spec: + allNodes: true + devices: + - allNodes: true + allowMultipleAllocations: true + attributes: + attributesKey: + bool: true + int: 2 + string: stringValue + version: versionValue + bindingConditions: + - bindingConditionsValue + bindingFailureConditions: + - bindingFailureConditionsValue + bindsToNode: true + capacity: + capacityKey: + requestPolicy: + default: "0" + validRange: + max: "0" + min: "0" + step: "0" + validValues: + - "0" + value: "0" + consumesCounters: + - counterSet: counterSetValue + counters: + countersKey: + value: "0" + name: nameValue + nodeName: nodeNameValue + nodeSelector: + nodeSelectorTerms: + - matchExpressions: + - key: keyValue + operator: operatorValue + values: + - valuesValue + matchFields: + - key: keyValue + operator: operatorValue + values: + - valuesValue + taints: + - effect: effectValue + key: keyValue + timeAdded: "2004-01-01T01:01:01Z" + value: valueValue + driver: driverValue + nodeName: nodeNameValue + nodeSelector: + nodeSelectorTerms: + - matchExpressions: + - key: keyValue + operator: operatorValue + values: + - valuesValue + matchFields: + - key: keyValue + operator: operatorValue + values: + - valuesValue + perDeviceNodeSelection: true + pool: + generation: 2 + name: nameValue + resourceSliceCount: 3 + sharedCounters: + - counters: + countersKey: + value: "0" + name: nameValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1.PriorityClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1.PriorityClass.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1.PriorityClass.json rename to staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1.PriorityClass.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1.PriorityClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1.PriorityClass.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1.PriorityClass.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1.PriorityClass.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1.PriorityClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1.PriorityClass.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1.PriorityClass.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1.PriorityClass.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1alpha1.PriorityClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1alpha1.PriorityClass.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1alpha1.PriorityClass.json rename to staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1alpha1.PriorityClass.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1alpha1.PriorityClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1alpha1.PriorityClass.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1alpha1.PriorityClass.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1alpha1.PriorityClass.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1alpha1.PriorityClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1alpha1.PriorityClass.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1alpha1.PriorityClass.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1alpha1.PriorityClass.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1beta1.PriorityClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1beta1.PriorityClass.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1beta1.PriorityClass.json rename to staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1beta1.PriorityClass.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1beta1.PriorityClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1beta1.PriorityClass.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1beta1.PriorityClass.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1beta1.PriorityClass.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1beta1.PriorityClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1beta1.PriorityClass.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/scheduling.k8s.io.v1beta1.PriorityClass.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/scheduling.k8s.io.v1beta1.PriorityClass.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSIDriver.json b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSIDriver.json similarity index 95% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSIDriver.json rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSIDriver.json index 3acd8ccac4da0..84efb979be320 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSIDriver.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSIDriver.json @@ -58,6 +58,7 @@ } ], "requiresRepublish": true, - "seLinuxMount": true + "seLinuxMount": true, + "nodeAllocatableUpdatePeriodSeconds": 9 } } \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSIDriver.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSIDriver.pb similarity index 74% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSIDriver.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSIDriver.pb index 6b6621c28b86b..07aeaa7f75626 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSIDriver.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSIDriver.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSIDriver.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSIDriver.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSIDriver.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSIDriver.yaml index b787db002e069..748c7614a9e8f 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSIDriver.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSIDriver.yaml @@ -35,6 +35,7 @@ metadata: spec: attachRequired: true fsGroupPolicy: fsGroupPolicyValue + nodeAllocatableUpdatePeriodSeconds: 9 podInfoOnMount: true requiresRepublish: true seLinuxMount: true diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSINode.json b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSINode.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSINode.json rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSINode.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSINode.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSINode.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSINode.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSINode.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSINode.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSINode.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSINode.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSINode.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSIStorageCapacity.json b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSIStorageCapacity.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSIStorageCapacity.json rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSIStorageCapacity.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSIStorageCapacity.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSIStorageCapacity.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSIStorageCapacity.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSIStorageCapacity.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSIStorageCapacity.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSIStorageCapacity.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.CSIStorageCapacity.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.CSIStorageCapacity.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.StorageClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.StorageClass.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.StorageClass.json rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.StorageClass.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.StorageClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.StorageClass.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.StorageClass.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.StorageClass.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.StorageClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.StorageClass.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.StorageClass.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.StorageClass.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.VolumeAttachment.json b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttachment.json similarity index 98% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.VolumeAttachment.json rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttachment.json index 8589231efb9d6..2ae5ba4606e64 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.VolumeAttachment.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttachment.json @@ -316,11 +316,13 @@ }, "attachError": { "time": "2001-01-01T01:01:01Z", - "message": "messageValue" + "message": "messageValue", + "errorCode": 3 }, "detachError": { "time": "2001-01-01T01:01:01Z", - "message": "messageValue" + "message": "messageValue", + "errorCode": 3 } } } \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.VolumeAttachment.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttachment.pb similarity index 93% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.VolumeAttachment.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttachment.pb index e167dcd124957..3bd058574449f 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.VolumeAttachment.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttachment.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.VolumeAttachment.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttachment.yaml similarity index 99% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.VolumeAttachment.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttachment.yaml index 29acbbfe569b6..8e6f6f227aa61 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1.VolumeAttachment.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttachment.yaml @@ -239,11 +239,13 @@ spec: persistentVolumeName: persistentVolumeNameValue status: attachError: + errorCode: 3 message: messageValue time: "2001-01-01T01:01:01Z" attached: true attachmentMetadata: attachmentMetadataKey: attachmentMetadataValue detachError: + errorCode: 3 message: messageValue time: "2001-01-01T01:01:01Z" diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttributesClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttributesClass.json new file mode 100644 index 0000000000000..b2ac8688bd4f2 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttributesClass.json @@ -0,0 +1,50 @@ +{ + "kind": "VolumeAttributesClass", + "apiVersion": "storage.k8s.io/v1", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "driverName": "driverNameValue", + "parameters": { + "parametersKey": "parametersValue" + } +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttributesClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttributesClass.pb new file mode 100644 index 0000000000000..8e8ab76b9d9a6 Binary files /dev/null and b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttributesClass.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttributesClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttributesClass.yaml new file mode 100644 index 0000000000000..95e68ff5861e9 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1.VolumeAttributesClass.yaml @@ -0,0 +1,37 @@ +apiVersion: storage.k8s.io/v1 +driverName: driverNameValue +kind: VolumeAttributesClass +metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue +parameters: + parametersKey: parametersValue diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.CSIStorageCapacity.json b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.CSIStorageCapacity.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.CSIStorageCapacity.json rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.CSIStorageCapacity.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.CSIStorageCapacity.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.CSIStorageCapacity.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.CSIStorageCapacity.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.CSIStorageCapacity.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.CSIStorageCapacity.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.CSIStorageCapacity.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.CSIStorageCapacity.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.CSIStorageCapacity.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.VolumeAttachment.json b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.VolumeAttachment.json similarity index 98% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.VolumeAttachment.json rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.VolumeAttachment.json index 6bcf594d03390..473d4f31a3419 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.VolumeAttachment.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.VolumeAttachment.json @@ -316,11 +316,13 @@ }, "attachError": { "time": "2001-01-01T01:01:01Z", - "message": "messageValue" + "message": "messageValue", + "errorCode": 3 }, "detachError": { "time": "2001-01-01T01:01:01Z", - "message": "messageValue" + "message": "messageValue", + "errorCode": 3 } } } \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.VolumeAttachment.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.VolumeAttachment.pb similarity index 93% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.VolumeAttachment.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.VolumeAttachment.pb index 33c4c310e8dff..2dac24f387414 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.VolumeAttachment.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.VolumeAttachment.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.VolumeAttachment.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.VolumeAttachment.yaml similarity index 99% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.VolumeAttachment.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.VolumeAttachment.yaml index fc8fa35579bc9..22a9ab208d9e8 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.VolumeAttachment.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.VolumeAttachment.yaml @@ -239,11 +239,13 @@ spec: persistentVolumeName: persistentVolumeNameValue status: attachError: + errorCode: 3 message: messageValue time: "2001-01-01T01:01:01Z" attached: true attachmentMetadata: attachmentMetadataKey: attachmentMetadataValue detachError: + errorCode: 3 message: messageValue time: "2001-01-01T01:01:01Z" diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.VolumeAttributesClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.VolumeAttributesClass.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.VolumeAttributesClass.json rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.VolumeAttributesClass.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.VolumeAttributesClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.VolumeAttributesClass.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.VolumeAttributesClass.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.VolumeAttributesClass.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.VolumeAttributesClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.VolumeAttributesClass.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1alpha1.VolumeAttributesClass.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1alpha1.VolumeAttributesClass.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSIDriver.json b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSIDriver.json similarity index 95% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSIDriver.json rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSIDriver.json index f3d7b2be85553..0953f5e354d9c 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSIDriver.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSIDriver.json @@ -58,6 +58,7 @@ } ], "requiresRepublish": true, - "seLinuxMount": true + "seLinuxMount": true, + "nodeAllocatableUpdatePeriodSeconds": 9 } } \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSIDriver.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSIDriver.pb similarity index 73% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSIDriver.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSIDriver.pb index 17b4b4a0a4635..7cd87c4455469 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSIDriver.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSIDriver.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSIDriver.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSIDriver.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSIDriver.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSIDriver.yaml index 5fd85ceaaebe6..82e08fa9fc081 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSIDriver.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSIDriver.yaml @@ -35,6 +35,7 @@ metadata: spec: attachRequired: true fsGroupPolicy: fsGroupPolicyValue + nodeAllocatableUpdatePeriodSeconds: 9 podInfoOnMount: true requiresRepublish: true seLinuxMount: true diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSINode.json b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSINode.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSINode.json rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSINode.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSINode.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSINode.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSINode.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSINode.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSINode.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSINode.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSINode.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSINode.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSIStorageCapacity.json b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSIStorageCapacity.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSIStorageCapacity.json rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSIStorageCapacity.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSIStorageCapacity.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSIStorageCapacity.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSIStorageCapacity.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSIStorageCapacity.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSIStorageCapacity.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSIStorageCapacity.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.CSIStorageCapacity.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.CSIStorageCapacity.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.StorageClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.StorageClass.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.StorageClass.json rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.StorageClass.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.StorageClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.StorageClass.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.StorageClass.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.StorageClass.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.StorageClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.StorageClass.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.StorageClass.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.StorageClass.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.VolumeAttachment.json b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.VolumeAttachment.json similarity index 98% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.VolumeAttachment.json rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.VolumeAttachment.json index b1fe6b3049436..b153d0b643784 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.VolumeAttachment.json +++ b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.VolumeAttachment.json @@ -316,11 +316,13 @@ }, "attachError": { "time": "2001-01-01T01:01:01Z", - "message": "messageValue" + "message": "messageValue", + "errorCode": 3 }, "detachError": { "time": "2001-01-01T01:01:01Z", - "message": "messageValue" + "message": "messageValue", + "errorCode": 3 } } } \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.VolumeAttachment.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.VolumeAttachment.pb similarity index 93% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.VolumeAttachment.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.VolumeAttachment.pb index bfd4e9e47d94a..2f900531c59a7 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.VolumeAttachment.pb and b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.VolumeAttachment.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.VolumeAttachment.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.VolumeAttachment.yaml similarity index 99% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.VolumeAttachment.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.VolumeAttachment.yaml index d9ca40ad39858..f4cf507f6e4c0 100644 --- a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.VolumeAttachment.yaml +++ b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.VolumeAttachment.yaml @@ -239,11 +239,13 @@ spec: persistentVolumeName: persistentVolumeNameValue status: attachError: + errorCode: 3 message: messageValue time: "2001-01-01T01:01:01Z" attached: true attachmentMetadata: attachmentMetadataKey: attachmentMetadataValue detachError: + errorCode: 3 message: messageValue time: "2001-01-01T01:01:01Z" diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.VolumeAttributesClass.json b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.VolumeAttributesClass.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.VolumeAttributesClass.json rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.VolumeAttributesClass.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.VolumeAttributesClass.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.VolumeAttributesClass.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.VolumeAttributesClass.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.VolumeAttributesClass.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.VolumeAttributesClass.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.VolumeAttributesClass.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storage.k8s.io.v1beta1.VolumeAttributesClass.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/storage.k8s.io.v1beta1.VolumeAttributesClass.yaml diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storagemigration.k8s.io.v1alpha1.StorageVersionMigration.json b/staging/src/k8s.io/api/testdata/v1.34.0/storagemigration.k8s.io.v1alpha1.StorageVersionMigration.json similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storagemigration.k8s.io.v1alpha1.StorageVersionMigration.json rename to staging/src/k8s.io/api/testdata/v1.34.0/storagemigration.k8s.io.v1alpha1.StorageVersionMigration.json diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storagemigration.k8s.io.v1alpha1.StorageVersionMigration.pb b/staging/src/k8s.io/api/testdata/v1.34.0/storagemigration.k8s.io.v1alpha1.StorageVersionMigration.pb similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storagemigration.k8s.io.v1alpha1.StorageVersionMigration.pb rename to staging/src/k8s.io/api/testdata/v1.34.0/storagemigration.k8s.io.v1alpha1.StorageVersionMigration.pb diff --git a/staging/src/k8s.io/api/testdata/v1.32.0/storagemigration.k8s.io.v1alpha1.StorageVersionMigration.yaml b/staging/src/k8s.io/api/testdata/v1.34.0/storagemigration.k8s.io.v1alpha1.StorageVersionMigration.yaml similarity index 100% rename from staging/src/k8s.io/api/testdata/v1.32.0/storagemigration.k8s.io.v1alpha1.StorageVersionMigration.yaml rename to staging/src/k8s.io/api/testdata/v1.34.0/storagemigration.k8s.io.v1alpha1.StorageVersionMigration.yaml diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/applyconfiguration/cr/v1/example.go b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/applyconfiguration/cr/v1/example.go index f6be3de7327cd..4d85b1b7abfe9 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/applyconfiguration/cr/v1/example.go +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/applyconfiguration/cr/v1/example.go @@ -26,6 +26,8 @@ import ( // ExampleApplyConfiguration represents a declarative configuration of the Example type for use // with apply. +// +// Example is a specification for an Example resource type ExampleApplyConfiguration struct { metav1.TypeMetaApplyConfiguration `json:",inline"` *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` @@ -43,6 +45,7 @@ func Example(name, namespace string) *ExampleApplyConfiguration { b.WithAPIVersion("cr.example.apiextensions.k8s.io/v1") return b } + func (b ExampleApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/applyconfiguration/cr/v1/examplespec.go b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/applyconfiguration/cr/v1/examplespec.go index 5335ff4f3b486..88b8b462b1da1 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/applyconfiguration/cr/v1/examplespec.go +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/applyconfiguration/cr/v1/examplespec.go @@ -20,6 +20,8 @@ package v1 // ExampleSpecApplyConfiguration represents a declarative configuration of the ExampleSpec type for use // with apply. +// +// ExampleSpec is the spec for an Example resource type ExampleSpecApplyConfiguration struct { Foo *string `json:"foo,omitempty"` Bar *bool `json:"bar,omitempty"` diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/applyconfiguration/cr/v1/examplestatus.go b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/applyconfiguration/cr/v1/examplestatus.go index 8ed38736a5334..886548d2edf42 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/applyconfiguration/cr/v1/examplestatus.go +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/applyconfiguration/cr/v1/examplestatus.go @@ -24,6 +24,8 @@ import ( // ExampleStatusApplyConfiguration represents a declarative configuration of the ExampleStatus type for use // with apply. +// +// ExampleStatus is the status for an Example resource type ExampleStatusApplyConfiguration struct { State *crv1.ExampleState `json:"state,omitempty"` Message *string `json:"message,omitempty"` diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/clientset_generated.go b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/clientset_generated.go index a15f7acf4f99c..8b5c9e3365a05 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -36,7 +36,7 @@ import ( // without applying any field management, validations and/or defaults. It shouldn't be considered a replacement // for a real clientset and is mostly useful in simple unit tests. // -// DEPRECATED: NewClientset replaces this with support for field management, which significantly improves +// Deprecated: NewClientset replaces this with support for field management, which significantly improves // server side apply testing. NewClientset is only available when apply configurations are generated (e.g. // via --with-applyconfig). func NewSimpleClientset(objects ...runtime.Object) *Clientset { @@ -52,8 +52,8 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { cs.AddReactor("*", "*", testing.ObjectReaction(o)) cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { var opts metav1.ListOptions - if watchActcion, ok := action.(testing.WatchActionImpl); ok { - opts = watchActcion.ListOptions + if watchAction, ok := action.(testing.WatchActionImpl); ok { + opts = watchAction.ListOptions } gvr := action.GetResource() ns := action.GetNamespace() diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/factory.go b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/factory.go index 4ee8e863aa1d3..1fe528901b30a 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/factory.go +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/factory.go @@ -97,6 +97,7 @@ func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Dur // NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. // Listers obtained via this SharedInformerFactory will be subject to the same filters // as specified here. +// // Deprecated: Please use NewSharedInformerFactoryWithOptions instead func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) @@ -204,7 +205,7 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal // // It is typically used like this: // -// ctx, cancel := context.Background() +// ctx, cancel := context.WithCancel(context.Background()) // defer cancel() // factory := NewSharedInformerFactory(client, resyncPeriod) // defer factory.WaitForStop() // Returns immediately if nothing was started. diff --git a/staging/src/k8s.io/apiextensions-apiserver/go.mod b/staging/src/k8s.io/apiextensions-apiserver/go.mod index 428e0361470a3..e9412db5d5775 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/go.mod +++ b/staging/src/k8s.io/apiextensions-apiserver/go.mod @@ -2,30 +2,30 @@ module k8s.io/apiextensions-apiserver -go 1.24.0 +go 1.25.0 -godebug default=go1.24 +godebug default=go1.25 require ( github.com/emicklei/go-restful/v3 v3.12.2 github.com/fxamacker/cbor/v2 v2.9.0 - github.com/gogo/protobuf v1.3.2 github.com/google/cel-go v0.26.0 github.com/google/gnostic-models v0.7.0 github.com/google/go-cmp v0.7.0 github.com/google/uuid v1.6.0 - github.com/spf13/cobra v1.9.1 - github.com/spf13/pflag v1.0.6 - github.com/stretchr/testify v1.10.0 + github.com/spf13/cobra v1.10.0 + github.com/spf13/pflag v1.0.9 + github.com/stretchr/testify v1.11.1 go.etcd.io/etcd/client/pkg/v3 v3.6.4 go.etcd.io/etcd/client/v3 v3.6.4 - go.opentelemetry.io/otel v1.35.0 - go.opentelemetry.io/otel/trace v1.35.0 + go.opentelemetry.io/otel v1.36.0 + go.opentelemetry.io/otel/trace v1.36.0 go.yaml.in/yaml/v2 v2.4.2 - golang.org/x/sync v0.12.0 - google.golang.org/grpc v1.72.1 - google.golang.org/protobuf v1.36.5 - gopkg.in/evanphx/json-patch.v4 v4.12.0 + golang.org/x/sync v0.16.0 + golang.org/x/text v0.28.0 + google.golang.org/grpc v1.72.2 + google.golang.org/protobuf v1.36.8 + gopkg.in/evanphx/json-patch.v4 v4.13.0 k8s.io/api v0.0.0 k8s.io/apimachinery v0.0.0 k8s.io/apiserver v0.0.0 @@ -33,9 +33,9 @@ require ( k8s.io/code-generator v0.0.0 k8s.io/component-base v0.0.0 k8s.io/klog/v2 v2.130.1 - k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b + k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 - sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 sigs.k8s.io/randfill v1.0.0 sigs.k8s.io/structured-merge-diff/v6 v6.3.0 sigs.k8s.io/yaml v1.6.0 @@ -55,11 +55,12 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.23.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.2.2 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/btree v1.1.3 // indirect @@ -79,12 +80,11 @@ require ( github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.22.0 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.62.0 // indirect - github.com/prometheus/procfs v0.15.1 // indirect + github.com/prometheus/client_golang v1.23.2 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.66.1 // indirect + github.com/prometheus/procfs v0.16.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect @@ -98,31 +98,30 @@ require ( go.etcd.io/raft/v3 v3.6.0 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect - go.opentelemetry.io/otel/metric v1.35.0 // indirect - go.opentelemetry.io/otel/sdk v1.34.0 // indirect + go.opentelemetry.io/otel/metric v1.36.0 // indirect + go.opentelemetry.io/otel/sdk v1.36.0 // indirect go.opentelemetry.io/proto/otlp v1.5.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/crypto v0.36.0 // indirect + golang.org/x/crypto v0.41.0 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/mod v0.21.0 // indirect - golang.org/x/net v0.38.0 // indirect - golang.org/x/oauth2 v0.27.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/term v0.30.0 // indirect - golang.org/x/text v0.23.0 // indirect + golang.org/x/mod v0.27.0 // indirect + golang.org/x/net v0.43.0 // indirect + golang.org/x/oauth2 v0.30.0 // indirect + golang.org/x/sys v0.35.0 // indirect + golang.org/x/term v0.34.0 // indirect golang.org/x/time v0.9.0 // indirect - golang.org/x/tools v0.26.0 // indirect + golang.org/x/tools v0.36.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f // indirect + k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b // indirect k8s.io/kms v0.0.0 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect ) diff --git a/staging/src/k8s.io/apiextensions-apiserver/go.sum b/staging/src/k8s.io/apiextensions-apiserver/go.sum index 15ff7d213248c..43cb20bb61eac 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/go.sum +++ b/staging/src/k8s.io/apiextensions-apiserver/go.sum @@ -52,8 +52,8 @@ github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sa github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= @@ -148,20 +148,18 @@ github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= -github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= -github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= -github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs= +github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= +github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= @@ -171,10 +169,11 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= -github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= -github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/cobra v1.10.0 h1:a5/WeUlSDCvV5a45ljW2ZFtV0bTDpkfSAj3uqB6Sc+0= +github.com/spf13/cobra v1.10.0/go.mod h1:9dhySC7dnTtEiqzmqfkLj47BslqLCUPMXjG2lj/NgoE= +github.com/spf13/pflag v1.0.8/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= @@ -189,8 +188,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= @@ -222,22 +221,22 @@ go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a go.opentelemetry.io/contrib/detectors/gcp v1.34.0/go.mod h1:cV4BMFcscUR/ckqLkbfQmF0PRsq8w/lMGzdbCSveBHo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q= -go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= -go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= +go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= +go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE= -go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= -go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= -go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= -go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= -go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= -go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= +go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= +go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= +go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= +go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= +go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= +go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= +go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -253,29 +252,29 @@ go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= -golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= +golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= +golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= -golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M= -golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= +golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= +golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -284,63 +283,66 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= +golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/telemetry v0.0.0-20250807160809-1a19826ec488/go.mod h1:fGb/2+tgXXjhjHsTNdVEEMZNWA0quBnfrO+AfoDSAKw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= -golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= +golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= +golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= +golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= +golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= -google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA= -google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a h1:v2PbRU4K3llS09c7zodFpNePeamkAwG3mPrAery9VeE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.72.2 h1:TdbGzwb82ty4OusHWepvFWGLgIbNo1/SUynEN0ssqv8= +google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= -gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/go-jose/go-jose.v2 v2.6.3/go.mod h1:zzZDPkNNw/c9IE7Z9jr11mBZQhKQTMzoEEIoEdZlFBI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f h1:SLb+kxmzfA87x4E4brQzB33VBbT2+x7Zq9ROIHmGn9Q= -k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b h1:gMplByicHV/TJBizHd9aVEsTYoJBnnUAT5MHlTkbjhQ= +k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b/go.mod h1:CgujABENc3KuTrcsdpGmrrASjtQsWCT7R99mEV4U/fM= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= diff --git a/staging/src/k8s.io/apiextensions-apiserver/hack/update-codegen.sh b/staging/src/k8s.io/apiextensions-apiserver/hack/update-codegen.sh index 93a25e2dc72e9..c60bcdefd7ee5 100755 --- a/staging/src/k8s.io/apiextensions-apiserver/hack/update-codegen.sh +++ b/staging/src/k8s.io/apiextensions-apiserver/hack/update-codegen.sh @@ -41,6 +41,7 @@ kube::codegen::gen_openapi \ --output-dir "${SCRIPT_ROOT}/pkg/generated/openapi" \ --output-pkg "${THIS_PKG}/pkg/generated/openapi" \ --report-filename "${report_filename:-"/dev/null"}" \ + --output-model-name-file "zz_generated.model_name.go" \ ${update_report:+"${update_report}"} \ --boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \ "${SCRIPT_ROOT}/pkg" diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/doc.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/doc.go index 39e70bb035a82..ed2a855d1ae21 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/doc.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/doc.go @@ -20,6 +20,8 @@ limitations under the License. // +k8s:defaulter-gen=TypeMeta // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1 + // +groupName=apiextensions.k8s.io // Package v1 is the v1 version of the API. diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go index 8e081e4b1c516..7d5c6b0678d52 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go @@ -24,9 +24,8 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" runtime "k8s.io/apimachinery/pkg/runtime" math "math" @@ -37,1012 +36,59 @@ import ( k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ConversionRequest) Reset() { *m = ConversionRequest{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ConversionResponse) Reset() { *m = ConversionResponse{} } -func (m *ConversionRequest) Reset() { *m = ConversionRequest{} } -func (*ConversionRequest) ProtoMessage() {} -func (*ConversionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{0} -} -func (m *ConversionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConversionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConversionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConversionRequest.Merge(m, src) -} -func (m *ConversionRequest) XXX_Size() int { - return m.Size() -} -func (m *ConversionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ConversionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ConversionRequest proto.InternalMessageInfo - -func (m *ConversionResponse) Reset() { *m = ConversionResponse{} } -func (*ConversionResponse) ProtoMessage() {} -func (*ConversionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{1} -} -func (m *ConversionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConversionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConversionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConversionResponse.Merge(m, src) -} -func (m *ConversionResponse) XXX_Size() int { - return m.Size() -} -func (m *ConversionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ConversionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ConversionResponse proto.InternalMessageInfo - -func (m *ConversionReview) Reset() { *m = ConversionReview{} } -func (*ConversionReview) ProtoMessage() {} -func (*ConversionReview) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{2} -} -func (m *ConversionReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConversionReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConversionReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConversionReview.Merge(m, src) -} -func (m *ConversionReview) XXX_Size() int { - return m.Size() -} -func (m *ConversionReview) XXX_DiscardUnknown() { - xxx_messageInfo_ConversionReview.DiscardUnknown(m) -} - -var xxx_messageInfo_ConversionReview proto.InternalMessageInfo - -func (m *CustomResourceColumnDefinition) Reset() { *m = CustomResourceColumnDefinition{} } -func (*CustomResourceColumnDefinition) ProtoMessage() {} -func (*CustomResourceColumnDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{3} -} -func (m *CustomResourceColumnDefinition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceColumnDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceColumnDefinition) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceColumnDefinition.Merge(m, src) -} -func (m *CustomResourceColumnDefinition) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceColumnDefinition) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceColumnDefinition.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceColumnDefinition proto.InternalMessageInfo - -func (m *CustomResourceConversion) Reset() { *m = CustomResourceConversion{} } -func (*CustomResourceConversion) ProtoMessage() {} -func (*CustomResourceConversion) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{4} -} -func (m *CustomResourceConversion) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceConversion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceConversion) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceConversion.Merge(m, src) -} -func (m *CustomResourceConversion) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceConversion) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceConversion.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceConversion proto.InternalMessageInfo - -func (m *CustomResourceDefinition) Reset() { *m = CustomResourceDefinition{} } -func (*CustomResourceDefinition) ProtoMessage() {} -func (*CustomResourceDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{5} -} -func (m *CustomResourceDefinition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinition) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinition.Merge(m, src) -} -func (m *CustomResourceDefinition) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinition) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinition.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceDefinition proto.InternalMessageInfo - -func (m *CustomResourceDefinitionCondition) Reset() { *m = CustomResourceDefinitionCondition{} } -func (*CustomResourceDefinitionCondition) ProtoMessage() {} -func (*CustomResourceDefinitionCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{6} -} -func (m *CustomResourceDefinitionCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinitionCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinitionCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinitionCondition.Merge(m, src) -} -func (m *CustomResourceDefinitionCondition) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinitionCondition) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinitionCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceDefinitionCondition proto.InternalMessageInfo - -func (m *CustomResourceDefinitionList) Reset() { *m = CustomResourceDefinitionList{} } -func (*CustomResourceDefinitionList) ProtoMessage() {} -func (*CustomResourceDefinitionList) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{7} -} -func (m *CustomResourceDefinitionList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinitionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinitionList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinitionList.Merge(m, src) -} -func (m *CustomResourceDefinitionList) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinitionList) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinitionList.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceDefinitionList proto.InternalMessageInfo - -func (m *CustomResourceDefinitionNames) Reset() { *m = CustomResourceDefinitionNames{} } -func (*CustomResourceDefinitionNames) ProtoMessage() {} -func (*CustomResourceDefinitionNames) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{8} -} -func (m *CustomResourceDefinitionNames) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinitionNames) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinitionNames) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinitionNames.Merge(m, src) -} -func (m *CustomResourceDefinitionNames) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinitionNames) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinitionNames.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceDefinitionNames proto.InternalMessageInfo - -func (m *CustomResourceDefinitionSpec) Reset() { *m = CustomResourceDefinitionSpec{} } -func (*CustomResourceDefinitionSpec) ProtoMessage() {} -func (*CustomResourceDefinitionSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{9} -} -func (m *CustomResourceDefinitionSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinitionSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinitionSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinitionSpec.Merge(m, src) -} -func (m *CustomResourceDefinitionSpec) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinitionSpec) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinitionSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceDefinitionSpec proto.InternalMessageInfo - -func (m *CustomResourceDefinitionStatus) Reset() { *m = CustomResourceDefinitionStatus{} } -func (*CustomResourceDefinitionStatus) ProtoMessage() {} -func (*CustomResourceDefinitionStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{10} -} -func (m *CustomResourceDefinitionStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinitionStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinitionStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinitionStatus.Merge(m, src) -} -func (m *CustomResourceDefinitionStatus) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinitionStatus) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinitionStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceDefinitionStatus proto.InternalMessageInfo - -func (m *CustomResourceDefinitionVersion) Reset() { *m = CustomResourceDefinitionVersion{} } -func (*CustomResourceDefinitionVersion) ProtoMessage() {} -func (*CustomResourceDefinitionVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{11} -} -func (m *CustomResourceDefinitionVersion) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinitionVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinitionVersion) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinitionVersion.Merge(m, src) -} -func (m *CustomResourceDefinitionVersion) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinitionVersion) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinitionVersion.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceDefinitionVersion proto.InternalMessageInfo - -func (m *CustomResourceSubresourceScale) Reset() { *m = CustomResourceSubresourceScale{} } -func (*CustomResourceSubresourceScale) ProtoMessage() {} -func (*CustomResourceSubresourceScale) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{12} -} -func (m *CustomResourceSubresourceScale) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceSubresourceScale) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceSubresourceScale) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceSubresourceScale.Merge(m, src) -} -func (m *CustomResourceSubresourceScale) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceSubresourceScale) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceSubresourceScale.DiscardUnknown(m) -} +func (m *ConversionReview) Reset() { *m = ConversionReview{} } -var xxx_messageInfo_CustomResourceSubresourceScale proto.InternalMessageInfo +func (m *CustomResourceColumnDefinition) Reset() { *m = CustomResourceColumnDefinition{} } -func (m *CustomResourceSubresourceStatus) Reset() { *m = CustomResourceSubresourceStatus{} } -func (*CustomResourceSubresourceStatus) ProtoMessage() {} -func (*CustomResourceSubresourceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{13} -} -func (m *CustomResourceSubresourceStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceSubresourceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceSubresourceStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceSubresourceStatus.Merge(m, src) -} -func (m *CustomResourceSubresourceStatus) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceSubresourceStatus) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceSubresourceStatus.DiscardUnknown(m) -} +func (m *CustomResourceConversion) Reset() { *m = CustomResourceConversion{} } -var xxx_messageInfo_CustomResourceSubresourceStatus proto.InternalMessageInfo +func (m *CustomResourceDefinition) Reset() { *m = CustomResourceDefinition{} } -func (m *CustomResourceSubresources) Reset() { *m = CustomResourceSubresources{} } -func (*CustomResourceSubresources) ProtoMessage() {} -func (*CustomResourceSubresources) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{14} -} -func (m *CustomResourceSubresources) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceSubresources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceSubresources) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceSubresources.Merge(m, src) -} -func (m *CustomResourceSubresources) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceSubresources) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceSubresources.DiscardUnknown(m) -} +func (m *CustomResourceDefinitionCondition) Reset() { *m = CustomResourceDefinitionCondition{} } -var xxx_messageInfo_CustomResourceSubresources proto.InternalMessageInfo +func (m *CustomResourceDefinitionList) Reset() { *m = CustomResourceDefinitionList{} } -func (m *CustomResourceValidation) Reset() { *m = CustomResourceValidation{} } -func (*CustomResourceValidation) ProtoMessage() {} -func (*CustomResourceValidation) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{15} -} -func (m *CustomResourceValidation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceValidation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceValidation) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceValidation.Merge(m, src) -} -func (m *CustomResourceValidation) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceValidation) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceValidation.DiscardUnknown(m) -} +func (m *CustomResourceDefinitionNames) Reset() { *m = CustomResourceDefinitionNames{} } -var xxx_messageInfo_CustomResourceValidation proto.InternalMessageInfo +func (m *CustomResourceDefinitionSpec) Reset() { *m = CustomResourceDefinitionSpec{} } -func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} } -func (*ExternalDocumentation) ProtoMessage() {} -func (*ExternalDocumentation) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{16} -} -func (m *ExternalDocumentation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExternalDocumentation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExternalDocumentation) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExternalDocumentation.Merge(m, src) -} -func (m *ExternalDocumentation) XXX_Size() int { - return m.Size() -} -func (m *ExternalDocumentation) XXX_DiscardUnknown() { - xxx_messageInfo_ExternalDocumentation.DiscardUnknown(m) -} +func (m *CustomResourceDefinitionStatus) Reset() { *m = CustomResourceDefinitionStatus{} } -var xxx_messageInfo_ExternalDocumentation proto.InternalMessageInfo +func (m *CustomResourceDefinitionVersion) Reset() { *m = CustomResourceDefinitionVersion{} } -func (m *JSON) Reset() { *m = JSON{} } -func (*JSON) ProtoMessage() {} -func (*JSON) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{17} -} -func (m *JSON) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSON) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JSON) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSON.Merge(m, src) -} -func (m *JSON) XXX_Size() int { - return m.Size() -} -func (m *JSON) XXX_DiscardUnknown() { - xxx_messageInfo_JSON.DiscardUnknown(m) -} - -var xxx_messageInfo_JSON proto.InternalMessageInfo - -func (m *JSONSchemaProps) Reset() { *m = JSONSchemaProps{} } -func (*JSONSchemaProps) ProtoMessage() {} -func (*JSONSchemaProps) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{18} -} -func (m *JSONSchemaProps) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONSchemaProps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JSONSchemaProps) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONSchemaProps.Merge(m, src) -} -func (m *JSONSchemaProps) XXX_Size() int { - return m.Size() -} -func (m *JSONSchemaProps) XXX_DiscardUnknown() { - xxx_messageInfo_JSONSchemaProps.DiscardUnknown(m) -} - -var xxx_messageInfo_JSONSchemaProps proto.InternalMessageInfo - -func (m *JSONSchemaPropsOrArray) Reset() { *m = JSONSchemaPropsOrArray{} } -func (*JSONSchemaPropsOrArray) ProtoMessage() {} -func (*JSONSchemaPropsOrArray) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{19} -} -func (m *JSONSchemaPropsOrArray) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONSchemaPropsOrArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JSONSchemaPropsOrArray) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONSchemaPropsOrArray.Merge(m, src) -} -func (m *JSONSchemaPropsOrArray) XXX_Size() int { - return m.Size() -} -func (m *JSONSchemaPropsOrArray) XXX_DiscardUnknown() { - xxx_messageInfo_JSONSchemaPropsOrArray.DiscardUnknown(m) -} +func (m *CustomResourceSubresourceScale) Reset() { *m = CustomResourceSubresourceScale{} } -var xxx_messageInfo_JSONSchemaPropsOrArray proto.InternalMessageInfo +func (m *CustomResourceSubresourceStatus) Reset() { *m = CustomResourceSubresourceStatus{} } -func (m *JSONSchemaPropsOrBool) Reset() { *m = JSONSchemaPropsOrBool{} } -func (*JSONSchemaPropsOrBool) ProtoMessage() {} -func (*JSONSchemaPropsOrBool) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{20} -} -func (m *JSONSchemaPropsOrBool) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONSchemaPropsOrBool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JSONSchemaPropsOrBool) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONSchemaPropsOrBool.Merge(m, src) -} -func (m *JSONSchemaPropsOrBool) XXX_Size() int { - return m.Size() -} -func (m *JSONSchemaPropsOrBool) XXX_DiscardUnknown() { - xxx_messageInfo_JSONSchemaPropsOrBool.DiscardUnknown(m) -} +func (m *CustomResourceSubresources) Reset() { *m = CustomResourceSubresources{} } -var xxx_messageInfo_JSONSchemaPropsOrBool proto.InternalMessageInfo +func (m *CustomResourceValidation) Reset() { *m = CustomResourceValidation{} } -func (m *JSONSchemaPropsOrStringArray) Reset() { *m = JSONSchemaPropsOrStringArray{} } -func (*JSONSchemaPropsOrStringArray) ProtoMessage() {} -func (*JSONSchemaPropsOrStringArray) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{21} -} -func (m *JSONSchemaPropsOrStringArray) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONSchemaPropsOrStringArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JSONSchemaPropsOrStringArray) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONSchemaPropsOrStringArray.Merge(m, src) -} -func (m *JSONSchemaPropsOrStringArray) XXX_Size() int { - return m.Size() -} -func (m *JSONSchemaPropsOrStringArray) XXX_DiscardUnknown() { - xxx_messageInfo_JSONSchemaPropsOrStringArray.DiscardUnknown(m) -} +func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} } -var xxx_messageInfo_JSONSchemaPropsOrStringArray proto.InternalMessageInfo +func (m *JSON) Reset() { *m = JSON{} } -func (m *SelectableField) Reset() { *m = SelectableField{} } -func (*SelectableField) ProtoMessage() {} -func (*SelectableField) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{22} -} -func (m *SelectableField) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelectableField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelectableField) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelectableField.Merge(m, src) -} -func (m *SelectableField) XXX_Size() int { - return m.Size() -} -func (m *SelectableField) XXX_DiscardUnknown() { - xxx_messageInfo_SelectableField.DiscardUnknown(m) -} +func (m *JSONSchemaProps) Reset() { *m = JSONSchemaProps{} } -var xxx_messageInfo_SelectableField proto.InternalMessageInfo +func (m *JSONSchemaPropsOrArray) Reset() { *m = JSONSchemaPropsOrArray{} } -func (m *ServiceReference) Reset() { *m = ServiceReference{} } -func (*ServiceReference) ProtoMessage() {} -func (*ServiceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{23} -} -func (m *ServiceReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceReference.Merge(m, src) -} -func (m *ServiceReference) XXX_Size() int { - return m.Size() -} -func (m *ServiceReference) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceReference.DiscardUnknown(m) -} +func (m *JSONSchemaPropsOrBool) Reset() { *m = JSONSchemaPropsOrBool{} } -var xxx_messageInfo_ServiceReference proto.InternalMessageInfo +func (m *JSONSchemaPropsOrStringArray) Reset() { *m = JSONSchemaPropsOrStringArray{} } -func (m *ValidationRule) Reset() { *m = ValidationRule{} } -func (*ValidationRule) ProtoMessage() {} -func (*ValidationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{24} -} -func (m *ValidationRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidationRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidationRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidationRule.Merge(m, src) -} -func (m *ValidationRule) XXX_Size() int { - return m.Size() -} -func (m *ValidationRule) XXX_DiscardUnknown() { - xxx_messageInfo_ValidationRule.DiscardUnknown(m) -} +func (m *SelectableField) Reset() { *m = SelectableField{} } -var xxx_messageInfo_ValidationRule proto.InternalMessageInfo +func (m *ServiceReference) Reset() { *m = ServiceReference{} } -func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } -func (*WebhookClientConfig) ProtoMessage() {} -func (*WebhookClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{25} -} -func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WebhookClientConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *WebhookClientConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_WebhookClientConfig.Merge(m, src) -} -func (m *WebhookClientConfig) XXX_Size() int { - return m.Size() -} -func (m *WebhookClientConfig) XXX_DiscardUnknown() { - xxx_messageInfo_WebhookClientConfig.DiscardUnknown(m) -} +func (m *ValidationRule) Reset() { *m = ValidationRule{} } -var xxx_messageInfo_WebhookClientConfig proto.InternalMessageInfo +func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } -func (m *WebhookConversion) Reset() { *m = WebhookConversion{} } -func (*WebhookConversion) ProtoMessage() {} -func (*WebhookConversion) Descriptor() ([]byte, []int) { - return fileDescriptor_c5e101a0235c8c62, []int{26} -} -func (m *WebhookConversion) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WebhookConversion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *WebhookConversion) XXX_Merge(src proto.Message) { - xxx_messageInfo_WebhookConversion.Merge(m, src) -} -func (m *WebhookConversion) XXX_Size() int { - return m.Size() -} -func (m *WebhookConversion) XXX_DiscardUnknown() { - xxx_messageInfo_WebhookConversion.DiscardUnknown(m) -} - -var xxx_messageInfo_WebhookConversion proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ConversionRequest)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ConversionRequest") - proto.RegisterType((*ConversionResponse)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ConversionResponse") - proto.RegisterType((*ConversionReview)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ConversionReview") - proto.RegisterType((*CustomResourceColumnDefinition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceColumnDefinition") - proto.RegisterType((*CustomResourceConversion)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion") - proto.RegisterType((*CustomResourceDefinition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition") - proto.RegisterType((*CustomResourceDefinitionCondition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionCondition") - proto.RegisterType((*CustomResourceDefinitionList)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList") - proto.RegisterType((*CustomResourceDefinitionNames)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames") - proto.RegisterType((*CustomResourceDefinitionSpec)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec") - proto.RegisterType((*CustomResourceDefinitionStatus)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionStatus") - proto.RegisterType((*CustomResourceDefinitionVersion)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion") - proto.RegisterType((*CustomResourceSubresourceScale)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale") - proto.RegisterType((*CustomResourceSubresourceStatus)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceStatus") - proto.RegisterType((*CustomResourceSubresources)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources") - proto.RegisterType((*CustomResourceValidation)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation") - proto.RegisterType((*ExternalDocumentation)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation") - proto.RegisterType((*JSON)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSON") - proto.RegisterType((*JSONSchemaProps)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps") - proto.RegisterMapType((JSONSchemaDefinitions)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.DefinitionsEntry") - proto.RegisterMapType((JSONSchemaDependencies)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.DependenciesEntry") - proto.RegisterMapType((map[string]JSONSchemaProps)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.PatternPropertiesEntry") - proto.RegisterMapType((map[string]JSONSchemaProps)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.PropertiesEntry") - proto.RegisterType((*JSONSchemaPropsOrArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray") - proto.RegisterType((*JSONSchemaPropsOrBool)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrBool") - proto.RegisterType((*JSONSchemaPropsOrStringArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrStringArray") - proto.RegisterType((*SelectableField)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.SelectableField") - proto.RegisterType((*ServiceReference)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ServiceReference") - proto.RegisterType((*ValidationRule)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ValidationRule") - proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.WebhookClientConfig") - proto.RegisterType((*WebhookConversion)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.WebhookConversion") -} - -func init() { - proto.RegisterFile("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto", fileDescriptor_c5e101a0235c8c62) -} - -var fileDescriptor_c5e101a0235c8c62 = []byte{ - // 3166 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0xdb, 0x6f, 0x1b, 0xc7, - 0xd5, 0xf7, 0x52, 0x37, 0x6a, 0x24, 0x59, 0xd2, 0xd8, 0xd2, 0xb7, 0x56, 0x6c, 0x51, 0xa6, 0xbf, - 0xf8, 0x53, 0x12, 0x87, 0x4a, 0xf4, 0x25, 0x8d, 0x9b, 0x5e, 0x02, 0x51, 0x92, 0x13, 0xc5, 0x92, - 0x25, 0x0c, 0x6d, 0x47, 0x49, 0x8a, 0x26, 0x2b, 0xee, 0x90, 0xda, 0x68, 0xb9, 0xbb, 0x9e, 0xd9, - 0xd5, 0x05, 0x68, 0x81, 0xa0, 0x45, 0xd0, 0x36, 0x40, 0x9b, 0x3e, 0x14, 0xe9, 0x53, 0x51, 0x14, - 0x45, 0x1e, 0xda, 0x87, 0xf6, 0xad, 0xfd, 0x17, 0xf2, 0x52, 0x20, 0x40, 0x81, 0x22, 0x40, 0x01, - 0xa2, 0x61, 0xff, 0x81, 0x02, 0x6d, 0x51, 0x54, 0x0f, 0x45, 0x31, 0x97, 0x9d, 0x9d, 0x5d, 0x92, - 0xb6, 0x61, 0x51, 0xc9, 0x1b, 0x79, 0xce, 0x99, 0xf3, 0x3b, 0x73, 0xe6, 0xcc, 0x99, 0x33, 0x67, - 0x07, 0xbc, 0xb2, 0x77, 0x9d, 0x96, 0x1c, 0x7f, 0xc1, 0x0a, 0x1c, 0x7c, 0x18, 0x62, 0x8f, 0x3a, - 0xbe, 0x47, 0x9f, 0xb6, 0x02, 0x87, 0x62, 0xb2, 0x8f, 0xc9, 0x42, 0xb0, 0x57, 0x67, 0x3c, 0x9a, - 0x16, 0x58, 0xd8, 0x7f, 0x76, 0xa1, 0x8e, 0x3d, 0x4c, 0xac, 0x10, 0xdb, 0xa5, 0x80, 0xf8, 0xa1, - 0x0f, 0xaf, 0x0b, 0x4d, 0xa5, 0x94, 0xe0, 0x5b, 0x4a, 0x53, 0x29, 0xd8, 0xab, 0x33, 0x1e, 0x4d, - 0x0b, 0x94, 0xf6, 0x9f, 0x9d, 0x79, 0xba, 0xee, 0x84, 0xbb, 0xd1, 0x4e, 0xa9, 0xea, 0x37, 0x16, - 0xea, 0x7e, 0xdd, 0x5f, 0xe0, 0x0a, 0x77, 0xa2, 0x1a, 0xff, 0xc7, 0xff, 0xf0, 0x5f, 0x02, 0x68, - 0xe6, 0xb9, 0xc4, 0xe4, 0x86, 0x55, 0xdd, 0x75, 0x3c, 0x4c, 0x8e, 0x12, 0x3b, 0x1b, 0x38, 0xb4, - 0x3a, 0x98, 0x37, 0xb3, 0xd0, 0x6d, 0x14, 0x89, 0xbc, 0xd0, 0x69, 0xe0, 0xb6, 0x01, 0x5f, 0x7a, - 0xd0, 0x00, 0x5a, 0xdd, 0xc5, 0x0d, 0x2b, 0x3b, 0xae, 0x78, 0x6c, 0x80, 0xc9, 0x65, 0xdf, 0xdb, - 0xc7, 0x84, 0x4d, 0x10, 0xe1, 0x7b, 0x11, 0xa6, 0x21, 0x2c, 0x83, 0xbe, 0xc8, 0xb1, 0x4d, 0x63, - 0xce, 0x98, 0x1f, 0x2e, 0x3f, 0xf3, 0x71, 0xb3, 0x70, 0xa6, 0xd5, 0x2c, 0xf4, 0xdd, 0x59, 0x5b, - 0x39, 0x6e, 0x16, 0x2e, 0x77, 0x43, 0x0a, 0x8f, 0x02, 0x4c, 0x4b, 0x77, 0xd6, 0x56, 0x10, 0x1b, - 0x0c, 0x5f, 0x06, 0x93, 0x36, 0xa6, 0x0e, 0xc1, 0xf6, 0xd2, 0xd6, 0xda, 0x5d, 0xa1, 0xdf, 0xcc, - 0x71, 0x8d, 0x17, 0xa4, 0xc6, 0xc9, 0x95, 0xac, 0x00, 0x6a, 0x1f, 0x03, 0xb7, 0xc1, 0x90, 0xbf, - 0xf3, 0x0e, 0xae, 0x86, 0xd4, 0xec, 0x9b, 0xeb, 0x9b, 0x1f, 0x59, 0x7c, 0xba, 0x94, 0x2c, 0x9e, - 0x32, 0x81, 0xaf, 0x98, 0x9c, 0x6c, 0x09, 0x59, 0x07, 0xab, 0xf1, 0xa2, 0x95, 0xc7, 0x25, 0xda, - 0xd0, 0xa6, 0xd0, 0x82, 0x62, 0x75, 0xc5, 0x5f, 0xe6, 0x00, 0xd4, 0x27, 0x4f, 0x03, 0xdf, 0xa3, - 0xb8, 0x27, 0xb3, 0xa7, 0x60, 0xa2, 0xca, 0x35, 0x87, 0xd8, 0x96, 0xb8, 0x66, 0xee, 0x51, 0xac, - 0x37, 0x25, 0xfe, 0xc4, 0x72, 0x46, 0x1d, 0x6a, 0x03, 0x80, 0xb7, 0xc1, 0x20, 0xc1, 0x34, 0x72, - 0x43, 0xb3, 0x6f, 0xce, 0x98, 0x1f, 0x59, 0xbc, 0xd6, 0x15, 0x8a, 0x87, 0x36, 0x0b, 0xbe, 0xd2, - 0xfe, 0xb3, 0xa5, 0x4a, 0x68, 0x85, 0x11, 0x2d, 0x9f, 0x95, 0x48, 0x83, 0x88, 0xeb, 0x40, 0x52, - 0x57, 0xf1, 0x3f, 0x06, 0x98, 0xd0, 0xbd, 0xb4, 0xef, 0xe0, 0x03, 0x48, 0xc0, 0x10, 0x11, 0xc1, - 0xc2, 0xfd, 0x34, 0xb2, 0x78, 0xb3, 0xf4, 0xa8, 0x3b, 0xaa, 0xd4, 0x16, 0x7f, 0xe5, 0x11, 0xb6, - 0x5c, 0xf2, 0x0f, 0x8a, 0x81, 0xe0, 0x3e, 0xc8, 0x13, 0xb9, 0x46, 0x3c, 0x90, 0x46, 0x16, 0xd7, - 0x7b, 0x03, 0x2a, 0x74, 0x96, 0x47, 0x5b, 0xcd, 0x42, 0x3e, 0xfe, 0x87, 0x14, 0x56, 0xf1, 0xe7, - 0x39, 0x30, 0xbb, 0x1c, 0xd1, 0xd0, 0x6f, 0x20, 0x4c, 0xfd, 0x88, 0x54, 0xf1, 0xb2, 0xef, 0x46, - 0x0d, 0x6f, 0x05, 0xd7, 0x1c, 0xcf, 0x09, 0x59, 0x8c, 0xce, 0x81, 0x7e, 0xcf, 0x6a, 0x60, 0x19, - 0x33, 0xa3, 0xd2, 0x93, 0xfd, 0xb7, 0xac, 0x06, 0x46, 0x9c, 0xc3, 0x24, 0x58, 0x88, 0xc8, 0x1d, - 0xa0, 0x24, 0x6e, 0x1f, 0x05, 0x18, 0x71, 0x0e, 0xbc, 0x0a, 0x06, 0x6b, 0x3e, 0x69, 0x58, 0x62, - 0xf5, 0x86, 0x93, 0xf5, 0xb8, 0xc1, 0xa9, 0x48, 0x72, 0xe1, 0xf3, 0x60, 0xc4, 0xc6, 0xb4, 0x4a, - 0x9c, 0x80, 0x41, 0x9b, 0xfd, 0x5c, 0xf8, 0x9c, 0x14, 0x1e, 0x59, 0x49, 0x58, 0x48, 0x97, 0x83, - 0xd7, 0x40, 0x3e, 0x20, 0x8e, 0x4f, 0x9c, 0xf0, 0xc8, 0x1c, 0x98, 0x33, 0xe6, 0x07, 0xca, 0x13, - 0x72, 0x4c, 0x7e, 0x4b, 0xd2, 0x91, 0x92, 0x60, 0xd2, 0xef, 0x50, 0xdf, 0xdb, 0xb2, 0xc2, 0x5d, - 0x73, 0x90, 0x23, 0x28, 0xe9, 0x57, 0x2b, 0x9b, 0xb7, 0x18, 0x1d, 0x29, 0x89, 0xe2, 0x9f, 0x0c, - 0x60, 0x66, 0x3d, 0x14, 0xbb, 0x17, 0xde, 0x00, 0x79, 0x1a, 0xb2, 0x9c, 0x53, 0x3f, 0x92, 0xfe, - 0x79, 0x32, 0x56, 0x55, 0x91, 0xf4, 0xe3, 0x66, 0x61, 0x3a, 0x19, 0x11, 0x53, 0xb9, 0x6f, 0xd4, - 0x58, 0x16, 0x72, 0x07, 0x78, 0x67, 0xd7, 0xf7, 0xf7, 0xe4, 0xea, 0x9f, 0x20, 0xe4, 0x5e, 0x13, - 0x8a, 0x12, 0x4c, 0x11, 0x72, 0x92, 0x8c, 0x62, 0xa0, 0xe2, 0xbf, 0x73, 0xd9, 0x89, 0x69, 0x8b, - 0xfe, 0x36, 0xc8, 0xb3, 0x2d, 0x64, 0x5b, 0xa1, 0x25, 0x37, 0xc1, 0x33, 0x0f, 0xb7, 0xe1, 0xc4, - 0x7e, 0xdd, 0xc0, 0xa1, 0x55, 0x86, 0xd2, 0x15, 0x20, 0xa1, 0x21, 0xa5, 0x15, 0x1e, 0x82, 0x7e, - 0x1a, 0xe0, 0xaa, 0x9c, 0xef, 0xdd, 0x13, 0x44, 0x7b, 0x97, 0x39, 0x54, 0x02, 0x5c, 0x4d, 0x82, - 0x91, 0xfd, 0x43, 0x1c, 0x11, 0xbe, 0x6b, 0x80, 0x41, 0xca, 0xf3, 0x82, 0xcc, 0x25, 0xdb, 0xa7, - 0x00, 0x9e, 0xc9, 0x3b, 0xe2, 0x3f, 0x92, 0xb8, 0xc5, 0x7f, 0xe4, 0xc0, 0xe5, 0x6e, 0x43, 0x97, - 0x7d, 0xcf, 0x16, 0x8b, 0xb0, 0x26, 0xf7, 0x95, 0x88, 0xac, 0xe7, 0xf5, 0x7d, 0x75, 0xdc, 0x2c, - 0x3c, 0xfe, 0x40, 0x05, 0xda, 0x06, 0xfc, 0xb2, 0x9a, 0xb2, 0xd8, 0xa4, 0x97, 0xd3, 0x86, 0x1d, - 0x37, 0x0b, 0xe3, 0x6a, 0x58, 0xda, 0x56, 0xb8, 0x0f, 0xa0, 0x6b, 0xd1, 0xf0, 0x36, 0xb1, 0x3c, - 0x2a, 0xd4, 0x3a, 0x0d, 0x2c, 0x3d, 0xf7, 0xe4, 0xc3, 0x05, 0x05, 0x1b, 0x51, 0x9e, 0x91, 0x90, - 0x70, 0xbd, 0x4d, 0x1b, 0xea, 0x80, 0xc0, 0x72, 0x06, 0xc1, 0x16, 0x55, 0x69, 0x40, 0xcb, 0xe1, - 0x8c, 0x8a, 0x24, 0x17, 0x3e, 0x01, 0x86, 0x1a, 0x98, 0x52, 0xab, 0x8e, 0xf9, 0xde, 0x1f, 0x4e, - 0x0e, 0xc5, 0x0d, 0x41, 0x46, 0x31, 0xbf, 0xf8, 0x4f, 0x03, 0x5c, 0xec, 0xe6, 0xb5, 0x75, 0x87, - 0x86, 0xf0, 0x1b, 0x6d, 0x61, 0x5f, 0x7a, 0xb8, 0x19, 0xb2, 0xd1, 0x3c, 0xe8, 0x55, 0x2a, 0x89, - 0x29, 0x5a, 0xc8, 0x1f, 0x80, 0x01, 0x27, 0xc4, 0x8d, 0xf8, 0xb4, 0x44, 0xbd, 0x0f, 0xbb, 0xf2, - 0x98, 0x84, 0x1f, 0x58, 0x63, 0x40, 0x48, 0xe0, 0x15, 0x3f, 0xca, 0x81, 0x4b, 0xdd, 0x86, 0xb0, - 0x3c, 0x4e, 0x99, 0xb3, 0x03, 0x37, 0x22, 0x96, 0x2b, 0x83, 0x4d, 0x39, 0x7b, 0x8b, 0x53, 0x91, - 0xe4, 0xb2, 0xdc, 0x49, 0x1d, 0xaf, 0x1e, 0xb9, 0x16, 0x91, 0x91, 0xa4, 0x26, 0x5c, 0x91, 0x74, - 0xa4, 0x24, 0x60, 0x09, 0x00, 0xba, 0xeb, 0x93, 0x90, 0x63, 0xf0, 0x0a, 0x67, 0xb8, 0x7c, 0x96, - 0x65, 0x84, 0x8a, 0xa2, 0x22, 0x4d, 0x82, 0x1d, 0x24, 0x7b, 0x8e, 0x67, 0xcb, 0x05, 0x57, 0x7b, - 0xf7, 0xa6, 0xe3, 0xd9, 0x88, 0x73, 0x18, 0xbe, 0xeb, 0xd0, 0x90, 0x51, 0xe4, 0x6a, 0xa7, 0x1c, - 0xce, 0x25, 0x95, 0x04, 0xc3, 0xaf, 0xb2, 0x04, 0xeb, 0x13, 0x07, 0x53, 0x73, 0x30, 0xc1, 0x5f, - 0x56, 0x54, 0xa4, 0x49, 0x14, 0xff, 0xdc, 0xdf, 0x3d, 0x3e, 0x58, 0x02, 0x81, 0x57, 0xc0, 0x40, - 0x9d, 0xf8, 0x51, 0x20, 0xbd, 0xa4, 0xbc, 0xfd, 0x32, 0x23, 0x22, 0xc1, 0x83, 0xdf, 0x02, 0x03, - 0x9e, 0x9c, 0x30, 0x8b, 0xa0, 0xd7, 0x7a, 0xbf, 0xcc, 0xdc, 0x5b, 0x09, 0xba, 0x70, 0xa4, 0x00, - 0x85, 0xcf, 0x81, 0x01, 0x5a, 0xf5, 0x03, 0x2c, 0x9d, 0x38, 0x1b, 0x0b, 0x55, 0x18, 0xf1, 0xb8, - 0x59, 0x18, 0x8b, 0xd5, 0x71, 0x02, 0x12, 0xc2, 0xf0, 0x7b, 0x06, 0xc8, 0xcb, 0xe3, 0x82, 0x9a, - 0x43, 0x3c, 0x3c, 0x5f, 0xef, 0xbd, 0xdd, 0xb2, 0xec, 0x4d, 0xd6, 0x4c, 0x12, 0x28, 0x52, 0xe0, - 0xf0, 0x3b, 0x06, 0x00, 0x55, 0x75, 0x76, 0x99, 0xc3, 0xdc, 0x87, 0x3d, 0xdb, 0x2a, 0xda, 0xa9, - 0x28, 0x02, 0x21, 0x29, 0x95, 0x34, 0x54, 0x58, 0x01, 0x53, 0x01, 0xc1, 0x5c, 0xf7, 0x1d, 0x6f, - 0xcf, 0xf3, 0x0f, 0xbc, 0x1b, 0x0e, 0x76, 0x6d, 0x6a, 0x82, 0x39, 0x63, 0x3e, 0x5f, 0xbe, 0x24, - 0xed, 0x9f, 0xda, 0xea, 0x24, 0x84, 0x3a, 0x8f, 0x2d, 0xbe, 0xd7, 0x97, 0xad, 0xb5, 0xb2, 0xe7, - 0x05, 0xfc, 0x40, 0x4c, 0x5e, 0xe4, 0x61, 0x6a, 0x1a, 0x7c, 0x21, 0xde, 0xec, 0xfd, 0x42, 0xa8, - 0x5c, 0x9f, 0x1c, 0xd2, 0x8a, 0x44, 0x91, 0x66, 0x02, 0xfc, 0x89, 0x01, 0xc6, 0xac, 0x6a, 0x15, - 0x07, 0x21, 0xb6, 0xc5, 0x36, 0xce, 0x9d, 0x6e, 0x54, 0x4f, 0x49, 0x83, 0xc6, 0x96, 0x74, 0x54, - 0x94, 0x36, 0x02, 0xbe, 0x08, 0xce, 0xd2, 0xd0, 0x27, 0xd8, 0x8e, 0x23, 0x48, 0x66, 0x17, 0xd8, - 0x6a, 0x16, 0xce, 0x56, 0x52, 0x1c, 0x94, 0x91, 0x2c, 0xb6, 0x06, 0x41, 0xe1, 0x01, 0x11, 0xfa, - 0x10, 0x45, 0xef, 0x55, 0x30, 0xc8, 0x67, 0x6a, 0x73, 0x87, 0xe4, 0xb5, 0xa3, 0x9e, 0x53, 0x91, - 0xe4, 0xb2, 0xe3, 0x89, 0xe1, 0xb3, 0xe3, 0xa9, 0x8f, 0x0b, 0xaa, 0xe3, 0xa9, 0x22, 0xc8, 0x28, - 0xe6, 0xc3, 0x45, 0x00, 0x6c, 0x1c, 0x10, 0xcc, 0x32, 0x92, 0x6d, 0x0e, 0x71, 0x69, 0xb5, 0x3e, - 0x2b, 0x8a, 0x83, 0x34, 0x29, 0x78, 0x03, 0xc0, 0xf8, 0x9f, 0xe3, 0x7b, 0xaf, 0x59, 0xc4, 0x73, - 0xbc, 0xba, 0x99, 0xe7, 0x66, 0x4f, 0xb3, 0xd3, 0x76, 0xa5, 0x8d, 0x8b, 0x3a, 0x8c, 0x80, 0xfb, - 0x60, 0x50, 0x5c, 0xa3, 0x79, 0xde, 0xe8, 0xe1, 0x8e, 0xbb, 0x6b, 0xb9, 0x8e, 0xcd, 0xa1, 0xca, - 0x80, 0xbb, 0x87, 0xa3, 0x20, 0x89, 0x06, 0xdf, 0x37, 0xc0, 0x28, 0x8d, 0x76, 0x88, 0x94, 0xa6, - 0x3c, 0xab, 0x8f, 0x2c, 0xde, 0xee, 0x15, 0x7c, 0x45, 0xd3, 0x5d, 0x9e, 0x68, 0x35, 0x0b, 0xa3, - 0x3a, 0x05, 0xa5, 0xb0, 0xe1, 0xef, 0x0c, 0x60, 0x5a, 0xb6, 0x08, 0x7d, 0xcb, 0xdd, 0x22, 0x8e, - 0x17, 0x62, 0x22, 0x2e, 0x44, 0xe2, 0xf8, 0xe8, 0x61, 0xad, 0x98, 0xbd, 0x67, 0x95, 0xe7, 0xe4, - 0x4a, 0x9b, 0x4b, 0x5d, 0x2c, 0x40, 0x5d, 0x6d, 0x63, 0x79, 0x63, 0x82, 0x62, 0x17, 0x57, 0x43, - 0x6b, 0xc7, 0xc5, 0x32, 0x57, 0x0d, 0x73, 0x83, 0xd7, 0x1e, 0xdd, 0xe0, 0x4a, 0x5a, 0x63, 0x72, - 0x5f, 0xcf, 0x30, 0x28, 0x6a, 0x03, 0x2f, 0xfe, 0xcb, 0xc8, 0x26, 0x3b, 0xcd, 0xef, 0x95, 0xaa, - 0xe5, 0x62, 0xb8, 0x02, 0x26, 0x58, 0x3d, 0x8e, 0x70, 0xe0, 0x3a, 0x55, 0x8b, 0xf2, 0xfb, 0x98, - 0xd8, 0x6f, 0x09, 0x50, 0x86, 0x8f, 0xda, 0x46, 0xc0, 0x57, 0x01, 0x14, 0x85, 0x6a, 0x4a, 0x8f, - 0xa8, 0x4d, 0x54, 0xc9, 0x59, 0x69, 0x93, 0x40, 0x1d, 0x46, 0xc1, 0x65, 0x30, 0xe9, 0x5a, 0x3b, - 0xd8, 0x15, 0xf3, 0xf3, 0x09, 0x57, 0x25, 0x6e, 0xac, 0x53, 0xad, 0x66, 0x61, 0x72, 0x3d, 0xcb, - 0x44, 0xed, 0xf2, 0xc5, 0xcb, 0xd9, 0xec, 0xa2, 0x4f, 0x5c, 0x94, 0xff, 0x1f, 0xe6, 0xc0, 0x4c, - 0xf7, 0x30, 0x85, 0xdf, 0x56, 0xc5, 0xba, 0xa8, 0x41, 0x5f, 0x3f, 0x85, 0xcd, 0x20, 0x2f, 0x28, - 0xa0, 0xfd, 0x72, 0x02, 0x8f, 0x58, 0x05, 0x61, 0xb9, 0x71, 0x23, 0x62, 0xfb, 0x34, 0xd0, 0x99, - 0xfe, 0xf2, 0xb0, 0xa8, 0x4b, 0x2c, 0x97, 0x97, 0x21, 0x96, 0x8b, 0x8b, 0x1f, 0xb5, 0x5d, 0xb6, - 0x93, 0xf4, 0x01, 0xbf, 0x6f, 0x80, 0x71, 0x3f, 0xc0, 0xde, 0xd2, 0xd6, 0xda, 0xdd, 0xff, 0x17, - 0x69, 0x44, 0x3a, 0xe8, 0x04, 0x31, 0xce, 0x6e, 0xfc, 0x42, 0xd7, 0x16, 0xf1, 0x03, 0x5a, 0x3e, - 0xd7, 0x6a, 0x16, 0xc6, 0x37, 0xd3, 0x28, 0x28, 0x0b, 0x5b, 0x6c, 0x80, 0xa9, 0xd5, 0xc3, 0x10, - 0x13, 0xcf, 0x72, 0x57, 0xfc, 0x6a, 0xd4, 0xc0, 0x5e, 0x28, 0x6c, 0xcc, 0x34, 0x30, 0x8c, 0x87, - 0x6c, 0x60, 0x5c, 0x02, 0x7d, 0x11, 0x71, 0x65, 0xd4, 0x8e, 0xa8, 0xb6, 0x1c, 0x5a, 0x47, 0x8c, - 0x5e, 0xbc, 0x0c, 0xfa, 0x99, 0x9d, 0xf0, 0x02, 0xe8, 0x23, 0xd6, 0x01, 0xd7, 0x3a, 0x5a, 0x1e, - 0x62, 0x22, 0xc8, 0x3a, 0x40, 0x8c, 0x56, 0xfc, 0xdb, 0x1c, 0x18, 0xcf, 0xcc, 0x05, 0xce, 0x80, - 0x9c, 0xea, 0xf5, 0x01, 0xa9, 0x34, 0xb7, 0xb6, 0x82, 0x72, 0x8e, 0x0d, 0x5f, 0x50, 0xf9, 0x5e, - 0x80, 0x16, 0xd4, 0xf1, 0xc5, 0xa9, 0xac, 0x50, 0x4c, 0xd4, 0x31, 0x43, 0xe2, 0x84, 0xcd, 0x6c, - 0xc0, 0x35, 0xb9, 0x2b, 0x84, 0x0d, 0xb8, 0x86, 0x18, 0xed, 0x51, 0xbb, 0x37, 0x71, 0xfb, 0x68, - 0xe0, 0x21, 0xda, 0x47, 0x83, 0xf7, 0x6d, 0x1f, 0x5d, 0x01, 0x03, 0xa1, 0x13, 0xba, 0x98, 0x9f, - 0x9d, 0x5a, 0x79, 0x7e, 0x9b, 0x11, 0x91, 0xe0, 0x41, 0x0c, 0x86, 0x6c, 0x5c, 0xb3, 0x22, 0x37, - 0xe4, 0xc7, 0xe4, 0xc8, 0xe2, 0xd7, 0x4f, 0x16, 0x3d, 0xa2, 0xbd, 0xb2, 0x22, 0x54, 0xa2, 0x58, - 0x37, 0x7c, 0x1c, 0x0c, 0x35, 0xac, 0x43, 0xa7, 0x11, 0x35, 0x78, 0x0d, 0x6b, 0x08, 0xb1, 0x0d, - 0x41, 0x42, 0x31, 0x8f, 0x25, 0x41, 0x7c, 0x58, 0x75, 0x23, 0xea, 0xec, 0x63, 0xc9, 0x94, 0x45, - 0xa6, 0x4a, 0x82, 0xab, 0x19, 0x3e, 0x6a, 0x1b, 0xc1, 0xc1, 0x1c, 0x8f, 0x0f, 0x1e, 0xd1, 0xc0, - 0x04, 0x09, 0xc5, 0xbc, 0x34, 0x98, 0x94, 0x1f, 0xed, 0x06, 0x26, 0x07, 0xb7, 0x8d, 0x80, 0x4f, - 0x81, 0xe1, 0x86, 0x75, 0xb8, 0x8e, 0xbd, 0x7a, 0xb8, 0x6b, 0x8e, 0xcd, 0x19, 0xf3, 0x7d, 0xe5, - 0xb1, 0x56, 0xb3, 0x30, 0xbc, 0x11, 0x13, 0x51, 0xc2, 0xe7, 0xc2, 0x8e, 0x27, 0x85, 0xcf, 0x6a, - 0xc2, 0x31, 0x11, 0x25, 0x7c, 0x56, 0x2b, 0x05, 0x56, 0xc8, 0xf6, 0x95, 0x39, 0x9e, 0xbe, 0xca, - 0x6f, 0x09, 0x32, 0x8a, 0xf9, 0x70, 0x1e, 0xe4, 0x1b, 0xd6, 0x21, 0xbf, 0xe5, 0x9a, 0x13, 0x5c, - 0x2d, 0x6f, 0x71, 0x6e, 0x48, 0x1a, 0x52, 0x5c, 0x2e, 0xe9, 0x78, 0x42, 0x72, 0x52, 0x93, 0x94, - 0x34, 0xa4, 0xb8, 0x2c, 0x7e, 0x23, 0xcf, 0xb9, 0x17, 0x61, 0x21, 0x0c, 0xb9, 0x67, 0x54, 0xfc, - 0xde, 0x49, 0x58, 0x48, 0x97, 0x63, 0xb7, 0xcc, 0x46, 0xe4, 0x86, 0x4e, 0xe0, 0xe2, 0xcd, 0x9a, - 0x79, 0x8e, 0xfb, 0x9f, 0x5f, 0x2e, 0x36, 0x14, 0x15, 0x69, 0x12, 0xf0, 0x6d, 0xd0, 0x8f, 0xbd, - 0xa8, 0x61, 0x9e, 0xe7, 0xe7, 0xf3, 0x49, 0xa3, 0x4f, 0xed, 0x97, 0x55, 0x2f, 0x6a, 0x20, 0xae, - 0x19, 0xbe, 0x00, 0xc6, 0x1a, 0xd6, 0x21, 0x4b, 0x02, 0x98, 0x84, 0xec, 0xea, 0x3b, 0xc5, 0xe7, - 0x3d, 0xc9, 0xca, 0xea, 0x0d, 0x9d, 0x81, 0xd2, 0x72, 0x7c, 0xa0, 0xe3, 0x69, 0x03, 0xa7, 0xb5, - 0x81, 0x3a, 0x03, 0xa5, 0xe5, 0x98, 0x93, 0x09, 0xbe, 0x17, 0x39, 0x04, 0xdb, 0xe6, 0xff, 0xf0, - 0x4a, 0x5c, 0x76, 0x9c, 0x05, 0x0d, 0x29, 0x2e, 0xbc, 0x17, 0x37, 0x41, 0x4c, 0xbe, 0xf9, 0xb6, - 0x7a, 0x96, 0xba, 0x37, 0xc9, 0x12, 0x21, 0xd6, 0x91, 0x38, 0x55, 0xf4, 0xf6, 0x07, 0xf4, 0xc0, - 0x80, 0xe5, 0xba, 0x9b, 0x35, 0xf3, 0xc2, 0x49, 0x2b, 0xa2, 0xec, 0x69, 0xa1, 0x32, 0xcc, 0x12, - 0xd3, 0x8f, 0x04, 0x0c, 0xc3, 0xf3, 0x3d, 0x16, 0x0b, 0x33, 0xa7, 0x86, 0xb7, 0xc9, 0xf4, 0x23, - 0x01, 0xc3, 0xe7, 0xe7, 0x1d, 0x6d, 0xd6, 0xcc, 0xc7, 0x4e, 0x6f, 0x7e, 0x4c, 0x3f, 0x12, 0x30, - 0xd0, 0x06, 0x7d, 0x9e, 0x1f, 0x9a, 0x17, 0x7b, 0x7d, 0xf6, 0xf2, 0xd3, 0xe4, 0x96, 0x1f, 0x22, - 0xa6, 0x1e, 0xfe, 0xd0, 0x00, 0x20, 0x48, 0x22, 0xf1, 0xd2, 0x49, 0x9b, 0x12, 0x19, 0xb4, 0x52, - 0x12, 0xbd, 0xab, 0x5e, 0x48, 0x8e, 0x92, 0x9b, 0x96, 0x16, 0xe5, 0x9a, 0x01, 0xf0, 0x67, 0x06, - 0x38, 0xaf, 0x17, 0xe0, 0xca, 0xb2, 0x59, 0xee, 0x87, 0xcd, 0x1e, 0x06, 0x72, 0xd9, 0xf7, 0xdd, - 0xb2, 0xd9, 0x6a, 0x16, 0xce, 0x2f, 0x75, 0x00, 0x44, 0x1d, 0xcd, 0x80, 0xbf, 0x32, 0xc0, 0xa4, - 0xcc, 0x8e, 0x9a, 0x71, 0x05, 0xee, 0xb6, 0xb7, 0x7b, 0xe8, 0xb6, 0x2c, 0x84, 0xf0, 0x9e, 0xfa, - 0xee, 0xd9, 0xc6, 0x47, 0xed, 0x56, 0xc1, 0xdf, 0x1a, 0x60, 0xd4, 0xc6, 0x01, 0xf6, 0x6c, 0xec, - 0x55, 0x99, 0x99, 0x73, 0x27, 0xed, 0x74, 0x64, 0xcd, 0x5c, 0xd1, 0xb4, 0x0b, 0x0b, 0x4b, 0xd2, - 0xc2, 0x51, 0x9d, 0x75, 0xdc, 0x2c, 0x4c, 0x27, 0x43, 0x75, 0x0e, 0x4a, 0x19, 0x08, 0x7f, 0x64, - 0x80, 0xf1, 0xc4, 0xed, 0xe2, 0x80, 0xb8, 0x7c, 0x3a, 0x0b, 0xcf, 0x4b, 0xd0, 0xa5, 0x34, 0x16, - 0xca, 0x82, 0xc3, 0x5f, 0x1b, 0xac, 0xda, 0x8a, 0x6f, 0x8f, 0xd4, 0x2c, 0x72, 0x0f, 0xbe, 0xd1, - 0x4b, 0x0f, 0x2a, 0xe5, 0xc2, 0x81, 0xd7, 0x92, 0x4a, 0x4e, 0x71, 0x8e, 0x9b, 0x85, 0x29, 0xdd, - 0x7f, 0x8a, 0x81, 0x74, 0xe3, 0xe0, 0x7b, 0x06, 0x18, 0xc5, 0x49, 0xc1, 0x4c, 0xcd, 0x2b, 0x27, - 0x75, 0x5d, 0xc7, 0xf2, 0x5b, 0x5c, 0xf0, 0x35, 0x16, 0x45, 0x29, 0x58, 0x56, 0xfb, 0xe1, 0x43, - 0xab, 0x11, 0xb8, 0xd8, 0xfc, 0xdf, 0xde, 0xd5, 0x7e, 0xab, 0x42, 0x25, 0x8a, 0x75, 0xc3, 0x6b, - 0x20, 0xef, 0x45, 0xae, 0xcb, 0xae, 0xc3, 0xe6, 0xe3, 0xbc, 0x8a, 0x50, 0x1d, 0xcf, 0x5b, 0x92, - 0x8e, 0x94, 0x04, 0xac, 0x81, 0xb9, 0xc3, 0x9b, 0xd1, 0x0e, 0x26, 0x1e, 0x0e, 0x31, 0xed, 0xd8, - 0x52, 0x34, 0xaf, 0x72, 0x2d, 0x33, 0xad, 0x66, 0x61, 0x7a, 0xbb, 0x73, 0xd3, 0xf1, 0x81, 0x3a, - 0xe0, 0x9b, 0xe0, 0x31, 0x4d, 0x66, 0xb5, 0xb1, 0x83, 0x6d, 0x1b, 0xdb, 0xf1, 0x45, 0xcb, 0xfc, - 0x3f, 0x0e, 0xa1, 0xf6, 0xf1, 0x76, 0x56, 0x00, 0xdd, 0x6f, 0x34, 0x5c, 0x07, 0xd3, 0x1a, 0x7b, - 0xcd, 0x0b, 0x37, 0x49, 0x25, 0x24, 0x8e, 0x57, 0x37, 0xe7, 0xb9, 0xde, 0xf3, 0xf1, 0xee, 0xdb, - 0xd6, 0x78, 0xa8, 0xcb, 0x18, 0xf8, 0x4a, 0x4a, 0x1b, 0xff, 0x94, 0x62, 0x05, 0x37, 0xf1, 0x11, - 0x35, 0x9f, 0xe0, 0xc5, 0x05, 0x5f, 0xe7, 0x6d, 0x8d, 0x8e, 0xba, 0xc8, 0xc3, 0x97, 0xc0, 0xb9, - 0x0c, 0x87, 0xdd, 0x2b, 0xcc, 0x27, 0xc5, 0x05, 0x81, 0x55, 0xa2, 0xdb, 0x31, 0x11, 0x75, 0x92, - 0x84, 0x5f, 0x05, 0x50, 0x23, 0x6f, 0x58, 0x01, 0x1f, 0xff, 0x94, 0xb8, 0xab, 0xb0, 0x15, 0xdd, - 0x96, 0x34, 0xd4, 0x41, 0x0e, 0x7e, 0x68, 0xa4, 0x66, 0x92, 0xdc, 0x66, 0xa9, 0x79, 0x8d, 0x6f, - 0xd8, 0x57, 0x1e, 0x3d, 0x00, 0x13, 0x65, 0x28, 0x72, 0xb1, 0xe6, 0x61, 0x0d, 0x05, 0x75, 0x41, - 0x9f, 0x61, 0x97, 0xe9, 0x4c, 0x0e, 0x87, 0x13, 0xa0, 0x6f, 0x0f, 0xcb, 0x0f, 0xd9, 0x88, 0xfd, - 0x84, 0x6f, 0x81, 0x81, 0x7d, 0xcb, 0x8d, 0xe2, 0x56, 0x40, 0xef, 0xce, 0x7a, 0x24, 0xf4, 0xbe, - 0x98, 0xbb, 0x6e, 0xcc, 0x7c, 0x60, 0x80, 0xe9, 0xce, 0xa7, 0xca, 0x17, 0x65, 0xd1, 0x4f, 0x0d, - 0x30, 0xd9, 0x76, 0x80, 0x74, 0x30, 0xc6, 0x4d, 0x1b, 0x73, 0xb7, 0x87, 0x27, 0x81, 0xd8, 0x08, - 0xbc, 0xa2, 0xd5, 0x2d, 0xfb, 0x81, 0x01, 0x26, 0xb2, 0x89, 0xf9, 0x0b, 0xf2, 0x52, 0xf1, 0xfd, - 0x1c, 0x98, 0xee, 0x5c, 0x83, 0xc3, 0x86, 0xea, 0x2e, 0xf4, 0xbc, 0x41, 0xd3, 0xa9, 0x89, 0xfc, - 0xae, 0x01, 0x46, 0xde, 0x51, 0x72, 0xf1, 0xf7, 0xd5, 0x5e, 0x76, 0x85, 0xe2, 0xa3, 0x2f, 0x61, - 0x50, 0xa4, 0x43, 0x16, 0x7f, 0x63, 0x80, 0xa9, 0x8e, 0xc7, 0x39, 0xbc, 0x0a, 0x06, 0x2d, 0xd7, - 0xf5, 0x0f, 0x44, 0x37, 0x4f, 0xfb, 0x50, 0xb0, 0xc4, 0xa9, 0x48, 0x72, 0x35, 0x9f, 0xe5, 0x3e, - 0x07, 0x9f, 0x15, 0x7f, 0x6f, 0x80, 0x8b, 0xf7, 0x8b, 0xba, 0xcf, 0x7b, 0x0d, 0xe7, 0x41, 0x5e, - 0x16, 0xdb, 0x47, 0x7c, 0xfd, 0x64, 0x76, 0x95, 0x19, 0x81, 0xbf, 0xdf, 0x11, 0xbf, 0x8a, 0x2f, - 0x81, 0xf1, 0x4c, 0x03, 0x3a, 0xf5, 0xa4, 0xc7, 0x78, 0xe0, 0x93, 0x9e, 0x5f, 0x18, 0x60, 0xa2, - 0x82, 0xc9, 0xbe, 0x53, 0xc5, 0x08, 0xd7, 0x30, 0xc1, 0x5e, 0x15, 0xc3, 0x05, 0x30, 0xcc, 0x3f, - 0xa0, 0x06, 0x56, 0x35, 0xfe, 0xec, 0x33, 0x29, 0x75, 0x0c, 0xdf, 0x8a, 0x19, 0x28, 0x91, 0x51, - 0x9f, 0x88, 0x72, 0x5d, 0x3f, 0x11, 0x5d, 0x04, 0xfd, 0x41, 0xd2, 0x41, 0xce, 0x33, 0x2e, 0xb7, - 0x84, 0x53, 0x39, 0xd7, 0x27, 0x21, 0x6f, 0x93, 0x0d, 0x48, 0xae, 0x4f, 0x42, 0xc4, 0xa9, 0xc5, - 0x3f, 0xe6, 0xc0, 0xd9, 0x74, 0x82, 0x67, 0x80, 0x24, 0x72, 0xdb, 0xbe, 0x49, 0x31, 0x1e, 0xe2, - 0x1c, 0xfd, 0x29, 0x44, 0xee, 0xfe, 0x4f, 0x21, 0xe0, 0xcb, 0x60, 0x52, 0xfe, 0x5c, 0x3d, 0x0c, - 0x08, 0xa6, 0xfc, 0x63, 0x6b, 0x5f, 0xfa, 0x09, 0xe3, 0x46, 0x56, 0x00, 0xb5, 0x8f, 0x81, 0x5f, - 0xc9, 0x3c, 0xd3, 0xb8, 0x92, 0x3c, 0xd1, 0x60, 0xc5, 0x21, 0x5f, 0x9f, 0xbb, 0x2c, 0x67, 0xac, - 0x12, 0xe2, 0x93, 0xcc, 0xdb, 0x8d, 0x05, 0x30, 0x5c, 0x63, 0x02, 0x7c, 0xe1, 0x06, 0xd2, 0x4e, - 0xbf, 0x11, 0x33, 0x50, 0x22, 0x03, 0xbf, 0x06, 0xc6, 0xfd, 0x40, 0x94, 0xc1, 0x9b, 0xae, 0x5d, - 0xc1, 0x6e, 0x8d, 0xb7, 0x04, 0xf3, 0x71, 0xdf, 0x36, 0xc5, 0x42, 0x59, 0xd9, 0xe2, 0x1f, 0x0c, - 0x70, 0x2e, 0x7e, 0x1f, 0xe5, 0x3a, 0xd8, 0x0b, 0x97, 0x7d, 0xaf, 0xe6, 0xd4, 0xe1, 0x05, 0xd1, - 0x7f, 0xd5, 0x9a, 0x9a, 0x71, 0xef, 0x15, 0xde, 0x03, 0x43, 0x54, 0xc4, 0x8a, 0xdc, 0x07, 0xaf, - 0x9e, 0xe4, 0x83, 0x4a, 0x3a, 0xe8, 0x44, 0xf9, 0x18, 0x53, 0x63, 0x1c, 0xb6, 0x15, 0xaa, 0x56, - 0x39, 0xf2, 0x6c, 0xd9, 0x83, 0x1f, 0x15, 0x5b, 0x61, 0x79, 0x49, 0xd0, 0x90, 0xe2, 0x16, 0xff, - 0x6e, 0x80, 0xc9, 0xb6, 0xf7, 0x5e, 0xf0, 0xbb, 0x06, 0x18, 0xad, 0x6a, 0xd3, 0x93, 0x09, 0x65, - 0xe3, 0xe4, 0x6f, 0xca, 0x34, 0xa5, 0xa2, 0x06, 0xd3, 0x29, 0x28, 0x05, 0x0a, 0xb7, 0x81, 0x59, - 0xcd, 0x3c, 0xad, 0xcc, 0x7c, 0xac, 0xbd, 0xd8, 0x6a, 0x16, 0xcc, 0xe5, 0x2e, 0x32, 0xa8, 0xeb, - 0xe8, 0xf2, 0x37, 0x3f, 0xfe, 0x6c, 0xf6, 0xcc, 0x27, 0x9f, 0xcd, 0x9e, 0xf9, 0xf4, 0xb3, 0xd9, - 0x33, 0xef, 0xb6, 0x66, 0x8d, 0x8f, 0x5b, 0xb3, 0xc6, 0x27, 0xad, 0x59, 0xe3, 0xd3, 0xd6, 0xac, - 0xf1, 0x97, 0xd6, 0xac, 0xf1, 0xe3, 0xbf, 0xce, 0x9e, 0x79, 0xe3, 0xfa, 0xa3, 0x3e, 0xa8, 0xfe, - 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x1c, 0x7a, 0x10, 0x8b, 0x2d, 0x00, 0x00, -} +func (m *WebhookConversion) Reset() { *m = WebhookConversion{} } func (m *ConversionRequest) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -2087,7 +1133,7 @@ func (m *JSONSchemaProps) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Definitions { keysForDefinitions = append(keysForDefinitions, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDefinitions) + sort.Strings(keysForDefinitions) for iNdEx := len(keysForDefinitions) - 1; iNdEx >= 0; iNdEx-- { v := m.Definitions[string(keysForDefinitions[iNdEx])] baseI := i @@ -2132,7 +1178,7 @@ func (m *JSONSchemaProps) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Dependencies { keysForDependencies = append(keysForDependencies, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDependencies) + sort.Strings(keysForDependencies) for iNdEx := len(keysForDependencies) - 1; iNdEx >= 0; iNdEx-- { v := m.Dependencies[string(keysForDependencies[iNdEx])] baseI := i @@ -2163,7 +1209,7 @@ func (m *JSONSchemaProps) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.PatternProperties { keysForPatternProperties = append(keysForPatternProperties, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForPatternProperties) + sort.Strings(keysForPatternProperties) for iNdEx := len(keysForPatternProperties) - 1; iNdEx >= 0; iNdEx-- { v := m.PatternProperties[string(keysForPatternProperties[iNdEx])] baseI := i @@ -2208,7 +1254,7 @@ func (m *JSONSchemaProps) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Properties { keysForProperties = append(keysForProperties, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForProperties) + sort.Strings(keysForProperties) for iNdEx := len(keysForProperties) - 1; iNdEx >= 0; iNdEx-- { v := m.Properties[string(keysForProperties[iNdEx])] baseI := i @@ -3809,7 +2855,7 @@ func (this *JSONSchemaProps) String() string { for k := range this.Properties { keysForProperties = append(keysForProperties, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForProperties) + sort.Strings(keysForProperties) mapStringForProperties := "map[string]JSONSchemaProps{" for _, k := range keysForProperties { mapStringForProperties += fmt.Sprintf("%v: %v,", k, this.Properties[k]) @@ -3819,7 +2865,7 @@ func (this *JSONSchemaProps) String() string { for k := range this.PatternProperties { keysForPatternProperties = append(keysForPatternProperties, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForPatternProperties) + sort.Strings(keysForPatternProperties) mapStringForPatternProperties := "map[string]JSONSchemaProps{" for _, k := range keysForPatternProperties { mapStringForPatternProperties += fmt.Sprintf("%v: %v,", k, this.PatternProperties[k]) @@ -3829,7 +2875,7 @@ func (this *JSONSchemaProps) String() string { for k := range this.Dependencies { keysForDependencies = append(keysForDependencies, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDependencies) + sort.Strings(keysForDependencies) mapStringForDependencies := "JSONSchemaDependencies{" for _, k := range keysForDependencies { mapStringForDependencies += fmt.Sprintf("%v: %v,", k, this.Dependencies[k]) @@ -3839,7 +2885,7 @@ func (this *JSONSchemaProps) String() string { for k := range this.Definitions { keysForDefinitions = append(keysForDefinitions, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDefinitions) + sort.Strings(keysForDefinitions) mapStringForDefinitions := "JSONSchemaDefinitions{" for _, k := range keysForDefinitions { mapStringForDefinitions += fmt.Sprintf("%v: %v,", k, this.Definitions[k]) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.protomessage.pb.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..7dc6ed2bc584b --- /dev/null +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.protomessage.pb.go @@ -0,0 +1,76 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*ConversionRequest) ProtoMessage() {} + +func (*ConversionResponse) ProtoMessage() {} + +func (*ConversionReview) ProtoMessage() {} + +func (*CustomResourceColumnDefinition) ProtoMessage() {} + +func (*CustomResourceConversion) ProtoMessage() {} + +func (*CustomResourceDefinition) ProtoMessage() {} + +func (*CustomResourceDefinitionCondition) ProtoMessage() {} + +func (*CustomResourceDefinitionList) ProtoMessage() {} + +func (*CustomResourceDefinitionNames) ProtoMessage() {} + +func (*CustomResourceDefinitionSpec) ProtoMessage() {} + +func (*CustomResourceDefinitionStatus) ProtoMessage() {} + +func (*CustomResourceDefinitionVersion) ProtoMessage() {} + +func (*CustomResourceSubresourceScale) ProtoMessage() {} + +func (*CustomResourceSubresourceStatus) ProtoMessage() {} + +func (*CustomResourceSubresources) ProtoMessage() {} + +func (*CustomResourceValidation) ProtoMessage() {} + +func (*ExternalDocumentation) ProtoMessage() {} + +func (*JSON) ProtoMessage() {} + +func (*JSONSchemaProps) ProtoMessage() {} + +func (*JSONSchemaPropsOrArray) ProtoMessage() {} + +func (*JSONSchemaPropsOrBool) ProtoMessage() {} + +func (*JSONSchemaPropsOrStringArray) ProtoMessage() {} + +func (*SelectableField) ProtoMessage() {} + +func (*ServiceReference) ProtoMessage() {} + +func (*ValidationRule) ProtoMessage() {} + +func (*WebhookClientConfig) ProtoMessage() {} + +func (*WebhookConversion) ProtoMessage() {} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.model_name.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..285fdd9fad271 --- /dev/null +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.model_name.go @@ -0,0 +1,157 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ConversionRequest) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ConversionRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ConversionResponse) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ConversionResponse" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ConversionReview) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ConversionReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceColumnDefinition) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceColumnDefinition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceConversion) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceDefinition) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceDefinitionCondition) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceDefinitionList) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceDefinitionNames) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceDefinitionSpec) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceDefinitionStatus) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceDefinitionVersion) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceSubresourceScale) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceSubresourceStatus) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceSubresources) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceValidation) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExternalDocumentation) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JSON) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JSONSchemaProps) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JSONSchemaPropsOrArray) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JSONSchemaPropsOrBool) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrBool" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JSONSchemaPropsOrStringArray) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrStringArray" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelectableField) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.SelectableField" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceReference) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ServiceReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidationRule) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ValidationRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in WebhookClientConfig) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.WebhookClientConfig" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in WebhookConversion) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.WebhookConversion" +} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/doc.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/doc.go index 6ddea3e0140d5..ccf0a36a4a861 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/doc.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/doc.go @@ -20,6 +20,8 @@ limitations under the License. // +k8s:defaulter-gen=TypeMeta // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true +// +k8s:openapi-model-package=io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1 + // +groupName=apiextensions.k8s.io // Package v1beta1 is the v1beta1 version of the API. diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go index 32e58324071ec..5f4c00f280614 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go @@ -24,9 +24,8 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" runtime "k8s.io/apimachinery/pkg/runtime" math "math" @@ -37,986 +36,57 @@ import ( k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *ConversionRequest) Reset() { *m = ConversionRequest{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ConversionResponse) Reset() { *m = ConversionResponse{} } -func (m *ConversionRequest) Reset() { *m = ConversionRequest{} } -func (*ConversionRequest) ProtoMessage() {} -func (*ConversionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{0} -} -func (m *ConversionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConversionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConversionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConversionRequest.Merge(m, src) -} -func (m *ConversionRequest) XXX_Size() int { - return m.Size() -} -func (m *ConversionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ConversionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ConversionRequest proto.InternalMessageInfo - -func (m *ConversionResponse) Reset() { *m = ConversionResponse{} } -func (*ConversionResponse) ProtoMessage() {} -func (*ConversionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{1} -} -func (m *ConversionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConversionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConversionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConversionResponse.Merge(m, src) -} -func (m *ConversionResponse) XXX_Size() int { - return m.Size() -} -func (m *ConversionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ConversionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ConversionResponse proto.InternalMessageInfo - -func (m *ConversionReview) Reset() { *m = ConversionReview{} } -func (*ConversionReview) ProtoMessage() {} -func (*ConversionReview) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{2} -} -func (m *ConversionReview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConversionReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConversionReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConversionReview.Merge(m, src) -} -func (m *ConversionReview) XXX_Size() int { - return m.Size() -} -func (m *ConversionReview) XXX_DiscardUnknown() { - xxx_messageInfo_ConversionReview.DiscardUnknown(m) -} - -var xxx_messageInfo_ConversionReview proto.InternalMessageInfo - -func (m *CustomResourceColumnDefinition) Reset() { *m = CustomResourceColumnDefinition{} } -func (*CustomResourceColumnDefinition) ProtoMessage() {} -func (*CustomResourceColumnDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{3} -} -func (m *CustomResourceColumnDefinition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceColumnDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceColumnDefinition) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceColumnDefinition.Merge(m, src) -} -func (m *CustomResourceColumnDefinition) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceColumnDefinition) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceColumnDefinition.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceColumnDefinition proto.InternalMessageInfo - -func (m *CustomResourceConversion) Reset() { *m = CustomResourceConversion{} } -func (*CustomResourceConversion) ProtoMessage() {} -func (*CustomResourceConversion) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{4} -} -func (m *CustomResourceConversion) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceConversion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceConversion) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceConversion.Merge(m, src) -} -func (m *CustomResourceConversion) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceConversion) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceConversion.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceConversion proto.InternalMessageInfo - -func (m *CustomResourceDefinition) Reset() { *m = CustomResourceDefinition{} } -func (*CustomResourceDefinition) ProtoMessage() {} -func (*CustomResourceDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{5} -} -func (m *CustomResourceDefinition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinition) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinition.Merge(m, src) -} -func (m *CustomResourceDefinition) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinition) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinition.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceDefinition proto.InternalMessageInfo - -func (m *CustomResourceDefinitionCondition) Reset() { *m = CustomResourceDefinitionCondition{} } -func (*CustomResourceDefinitionCondition) ProtoMessage() {} -func (*CustomResourceDefinitionCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{6} -} -func (m *CustomResourceDefinitionCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinitionCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinitionCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinitionCondition.Merge(m, src) -} -func (m *CustomResourceDefinitionCondition) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinitionCondition) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinitionCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceDefinitionCondition proto.InternalMessageInfo - -func (m *CustomResourceDefinitionList) Reset() { *m = CustomResourceDefinitionList{} } -func (*CustomResourceDefinitionList) ProtoMessage() {} -func (*CustomResourceDefinitionList) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{7} -} -func (m *CustomResourceDefinitionList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinitionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinitionList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinitionList.Merge(m, src) -} -func (m *CustomResourceDefinitionList) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinitionList) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinitionList.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceDefinitionList proto.InternalMessageInfo - -func (m *CustomResourceDefinitionNames) Reset() { *m = CustomResourceDefinitionNames{} } -func (*CustomResourceDefinitionNames) ProtoMessage() {} -func (*CustomResourceDefinitionNames) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{8} -} -func (m *CustomResourceDefinitionNames) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinitionNames) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinitionNames) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinitionNames.Merge(m, src) -} -func (m *CustomResourceDefinitionNames) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinitionNames) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinitionNames.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceDefinitionNames proto.InternalMessageInfo - -func (m *CustomResourceDefinitionSpec) Reset() { *m = CustomResourceDefinitionSpec{} } -func (*CustomResourceDefinitionSpec) ProtoMessage() {} -func (*CustomResourceDefinitionSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{9} -} -func (m *CustomResourceDefinitionSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinitionSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinitionSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinitionSpec.Merge(m, src) -} -func (m *CustomResourceDefinitionSpec) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinitionSpec) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinitionSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceDefinitionSpec proto.InternalMessageInfo - -func (m *CustomResourceDefinitionStatus) Reset() { *m = CustomResourceDefinitionStatus{} } -func (*CustomResourceDefinitionStatus) ProtoMessage() {} -func (*CustomResourceDefinitionStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{10} -} -func (m *CustomResourceDefinitionStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinitionStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinitionStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinitionStatus.Merge(m, src) -} -func (m *CustomResourceDefinitionStatus) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinitionStatus) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinitionStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceDefinitionStatus proto.InternalMessageInfo - -func (m *CustomResourceDefinitionVersion) Reset() { *m = CustomResourceDefinitionVersion{} } -func (*CustomResourceDefinitionVersion) ProtoMessage() {} -func (*CustomResourceDefinitionVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{11} -} -func (m *CustomResourceDefinitionVersion) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinitionVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinitionVersion) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinitionVersion.Merge(m, src) -} -func (m *CustomResourceDefinitionVersion) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinitionVersion) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinitionVersion.DiscardUnknown(m) -} +func (m *ConversionReview) Reset() { *m = ConversionReview{} } -var xxx_messageInfo_CustomResourceDefinitionVersion proto.InternalMessageInfo +func (m *CustomResourceColumnDefinition) Reset() { *m = CustomResourceColumnDefinition{} } -func (m *CustomResourceSubresourceScale) Reset() { *m = CustomResourceSubresourceScale{} } -func (*CustomResourceSubresourceScale) ProtoMessage() {} -func (*CustomResourceSubresourceScale) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{12} -} -func (m *CustomResourceSubresourceScale) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceSubresourceScale) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceSubresourceScale) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceSubresourceScale.Merge(m, src) -} -func (m *CustomResourceSubresourceScale) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceSubresourceScale) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceSubresourceScale.DiscardUnknown(m) -} +func (m *CustomResourceConversion) Reset() { *m = CustomResourceConversion{} } -var xxx_messageInfo_CustomResourceSubresourceScale proto.InternalMessageInfo +func (m *CustomResourceDefinition) Reset() { *m = CustomResourceDefinition{} } -func (m *CustomResourceSubresourceStatus) Reset() { *m = CustomResourceSubresourceStatus{} } -func (*CustomResourceSubresourceStatus) ProtoMessage() {} -func (*CustomResourceSubresourceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{13} -} -func (m *CustomResourceSubresourceStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceSubresourceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceSubresourceStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceSubresourceStatus.Merge(m, src) -} -func (m *CustomResourceSubresourceStatus) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceSubresourceStatus) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceSubresourceStatus.DiscardUnknown(m) -} +func (m *CustomResourceDefinitionCondition) Reset() { *m = CustomResourceDefinitionCondition{} } -var xxx_messageInfo_CustomResourceSubresourceStatus proto.InternalMessageInfo +func (m *CustomResourceDefinitionList) Reset() { *m = CustomResourceDefinitionList{} } -func (m *CustomResourceSubresources) Reset() { *m = CustomResourceSubresources{} } -func (*CustomResourceSubresources) ProtoMessage() {} -func (*CustomResourceSubresources) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{14} -} -func (m *CustomResourceSubresources) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceSubresources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceSubresources) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceSubresources.Merge(m, src) -} -func (m *CustomResourceSubresources) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceSubresources) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceSubresources.DiscardUnknown(m) -} +func (m *CustomResourceDefinitionNames) Reset() { *m = CustomResourceDefinitionNames{} } -var xxx_messageInfo_CustomResourceSubresources proto.InternalMessageInfo +func (m *CustomResourceDefinitionSpec) Reset() { *m = CustomResourceDefinitionSpec{} } -func (m *CustomResourceValidation) Reset() { *m = CustomResourceValidation{} } -func (*CustomResourceValidation) ProtoMessage() {} -func (*CustomResourceValidation) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{15} -} -func (m *CustomResourceValidation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceValidation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceValidation) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceValidation.Merge(m, src) -} -func (m *CustomResourceValidation) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceValidation) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceValidation.DiscardUnknown(m) -} +func (m *CustomResourceDefinitionStatus) Reset() { *m = CustomResourceDefinitionStatus{} } -var xxx_messageInfo_CustomResourceValidation proto.InternalMessageInfo +func (m *CustomResourceDefinitionVersion) Reset() { *m = CustomResourceDefinitionVersion{} } -func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} } -func (*ExternalDocumentation) ProtoMessage() {} -func (*ExternalDocumentation) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{16} -} -func (m *ExternalDocumentation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExternalDocumentation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ExternalDocumentation) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExternalDocumentation.Merge(m, src) -} -func (m *ExternalDocumentation) XXX_Size() int { - return m.Size() -} -func (m *ExternalDocumentation) XXX_DiscardUnknown() { - xxx_messageInfo_ExternalDocumentation.DiscardUnknown(m) -} +func (m *CustomResourceSubresourceScale) Reset() { *m = CustomResourceSubresourceScale{} } -var xxx_messageInfo_ExternalDocumentation proto.InternalMessageInfo +func (m *CustomResourceSubresourceStatus) Reset() { *m = CustomResourceSubresourceStatus{} } -func (m *JSON) Reset() { *m = JSON{} } -func (*JSON) ProtoMessage() {} -func (*JSON) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{17} -} -func (m *JSON) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSON) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JSON) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSON.Merge(m, src) -} -func (m *JSON) XXX_Size() int { - return m.Size() -} -func (m *JSON) XXX_DiscardUnknown() { - xxx_messageInfo_JSON.DiscardUnknown(m) -} +func (m *CustomResourceSubresources) Reset() { *m = CustomResourceSubresources{} } -var xxx_messageInfo_JSON proto.InternalMessageInfo +func (m *CustomResourceValidation) Reset() { *m = CustomResourceValidation{} } -func (m *JSONSchemaProps) Reset() { *m = JSONSchemaProps{} } -func (*JSONSchemaProps) ProtoMessage() {} -func (*JSONSchemaProps) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{18} -} -func (m *JSONSchemaProps) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONSchemaProps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JSONSchemaProps) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONSchemaProps.Merge(m, src) -} -func (m *JSONSchemaProps) XXX_Size() int { - return m.Size() -} -func (m *JSONSchemaProps) XXX_DiscardUnknown() { - xxx_messageInfo_JSONSchemaProps.DiscardUnknown(m) -} +func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} } -var xxx_messageInfo_JSONSchemaProps proto.InternalMessageInfo +func (m *JSON) Reset() { *m = JSON{} } -func (m *JSONSchemaPropsOrArray) Reset() { *m = JSONSchemaPropsOrArray{} } -func (*JSONSchemaPropsOrArray) ProtoMessage() {} -func (*JSONSchemaPropsOrArray) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{19} -} -func (m *JSONSchemaPropsOrArray) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONSchemaPropsOrArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JSONSchemaPropsOrArray) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONSchemaPropsOrArray.Merge(m, src) -} -func (m *JSONSchemaPropsOrArray) XXX_Size() int { - return m.Size() -} -func (m *JSONSchemaPropsOrArray) XXX_DiscardUnknown() { - xxx_messageInfo_JSONSchemaPropsOrArray.DiscardUnknown(m) -} - -var xxx_messageInfo_JSONSchemaPropsOrArray proto.InternalMessageInfo - -func (m *JSONSchemaPropsOrBool) Reset() { *m = JSONSchemaPropsOrBool{} } -func (*JSONSchemaPropsOrBool) ProtoMessage() {} -func (*JSONSchemaPropsOrBool) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{20} -} -func (m *JSONSchemaPropsOrBool) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONSchemaPropsOrBool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JSONSchemaPropsOrBool) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONSchemaPropsOrBool.Merge(m, src) -} -func (m *JSONSchemaPropsOrBool) XXX_Size() int { - return m.Size() -} -func (m *JSONSchemaPropsOrBool) XXX_DiscardUnknown() { - xxx_messageInfo_JSONSchemaPropsOrBool.DiscardUnknown(m) -} - -var xxx_messageInfo_JSONSchemaPropsOrBool proto.InternalMessageInfo - -func (m *JSONSchemaPropsOrStringArray) Reset() { *m = JSONSchemaPropsOrStringArray{} } -func (*JSONSchemaPropsOrStringArray) ProtoMessage() {} -func (*JSONSchemaPropsOrStringArray) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{21} -} -func (m *JSONSchemaPropsOrStringArray) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JSONSchemaPropsOrStringArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *JSONSchemaPropsOrStringArray) XXX_Merge(src proto.Message) { - xxx_messageInfo_JSONSchemaPropsOrStringArray.Merge(m, src) -} -func (m *JSONSchemaPropsOrStringArray) XXX_Size() int { - return m.Size() -} -func (m *JSONSchemaPropsOrStringArray) XXX_DiscardUnknown() { - xxx_messageInfo_JSONSchemaPropsOrStringArray.DiscardUnknown(m) -} +func (m *JSONSchemaProps) Reset() { *m = JSONSchemaProps{} } -var xxx_messageInfo_JSONSchemaPropsOrStringArray proto.InternalMessageInfo - -func (m *SelectableField) Reset() { *m = SelectableField{} } -func (*SelectableField) ProtoMessage() {} -func (*SelectableField) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{22} -} -func (m *SelectableField) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SelectableField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SelectableField) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelectableField.Merge(m, src) -} -func (m *SelectableField) XXX_Size() int { - return m.Size() -} -func (m *SelectableField) XXX_DiscardUnknown() { - xxx_messageInfo_SelectableField.DiscardUnknown(m) -} +func (m *JSONSchemaPropsOrArray) Reset() { *m = JSONSchemaPropsOrArray{} } -var xxx_messageInfo_SelectableField proto.InternalMessageInfo +func (m *JSONSchemaPropsOrBool) Reset() { *m = JSONSchemaPropsOrBool{} } -func (m *ServiceReference) Reset() { *m = ServiceReference{} } -func (*ServiceReference) ProtoMessage() {} -func (*ServiceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{23} -} -func (m *ServiceReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceReference.Merge(m, src) -} -func (m *ServiceReference) XXX_Size() int { - return m.Size() -} -func (m *ServiceReference) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceReference.DiscardUnknown(m) -} +func (m *JSONSchemaPropsOrStringArray) Reset() { *m = JSONSchemaPropsOrStringArray{} } -var xxx_messageInfo_ServiceReference proto.InternalMessageInfo +func (m *SelectableField) Reset() { *m = SelectableField{} } -func (m *ValidationRule) Reset() { *m = ValidationRule{} } -func (*ValidationRule) ProtoMessage() {} -func (*ValidationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{24} -} -func (m *ValidationRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidationRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ValidationRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidationRule.Merge(m, src) -} -func (m *ValidationRule) XXX_Size() int { - return m.Size() -} -func (m *ValidationRule) XXX_DiscardUnknown() { - xxx_messageInfo_ValidationRule.DiscardUnknown(m) -} +func (m *ServiceReference) Reset() { *m = ServiceReference{} } -var xxx_messageInfo_ValidationRule proto.InternalMessageInfo +func (m *ValidationRule) Reset() { *m = ValidationRule{} } -func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } -func (*WebhookClientConfig) ProtoMessage() {} -func (*WebhookClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_3623d6c0bd238430, []int{25} -} -func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WebhookClientConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *WebhookClientConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_WebhookClientConfig.Merge(m, src) -} -func (m *WebhookClientConfig) XXX_Size() int { - return m.Size() -} -func (m *WebhookClientConfig) XXX_DiscardUnknown() { - xxx_messageInfo_WebhookClientConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_WebhookClientConfig proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ConversionRequest)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ConversionRequest") - proto.RegisterType((*ConversionResponse)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ConversionResponse") - proto.RegisterType((*ConversionReview)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ConversionReview") - proto.RegisterType((*CustomResourceColumnDefinition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceColumnDefinition") - proto.RegisterType((*CustomResourceConversion)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceConversion") - proto.RegisterType((*CustomResourceDefinition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition") - proto.RegisterType((*CustomResourceDefinitionCondition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionCondition") - proto.RegisterType((*CustomResourceDefinitionList)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionList") - proto.RegisterType((*CustomResourceDefinitionNames)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames") - proto.RegisterType((*CustomResourceDefinitionSpec)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec") - proto.RegisterType((*CustomResourceDefinitionStatus)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus") - proto.RegisterType((*CustomResourceDefinitionVersion)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionVersion") - proto.RegisterType((*CustomResourceSubresourceScale)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceScale") - proto.RegisterType((*CustomResourceSubresourceStatus)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceStatus") - proto.RegisterType((*CustomResourceSubresources)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresources") - proto.RegisterType((*CustomResourceValidation)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceValidation") - proto.RegisterType((*ExternalDocumentation)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ExternalDocumentation") - proto.RegisterType((*JSON)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSON") - proto.RegisterType((*JSONSchemaProps)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps") - proto.RegisterMapType((JSONSchemaDefinitions)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps.DefinitionsEntry") - proto.RegisterMapType((JSONSchemaDependencies)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps.DependenciesEntry") - proto.RegisterMapType((map[string]JSONSchemaProps)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps.PatternPropertiesEntry") - proto.RegisterMapType((map[string]JSONSchemaProps)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps.PropertiesEntry") - proto.RegisterType((*JSONSchemaPropsOrArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray") - proto.RegisterType((*JSONSchemaPropsOrBool)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool") - proto.RegisterType((*JSONSchemaPropsOrStringArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrStringArray") - proto.RegisterType((*SelectableField)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.SelectableField") - proto.RegisterType((*ServiceReference)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ServiceReference") - proto.RegisterType((*ValidationRule)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ValidationRule") - proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.WebhookClientConfig") -} - -func init() { - proto.RegisterFile("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto", fileDescriptor_3623d6c0bd238430) -} - -var fileDescriptor_3623d6c0bd238430 = []byte{ - // 3214 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5b, 0xcf, 0x73, 0x1c, 0x57, - 0xf1, 0xf7, 0xac, 0xb4, 0xd2, 0xaa, 0x25, 0x5b, 0xd2, 0xb3, 0xa5, 0x8c, 0x15, 0x47, 0x2b, 0xaf, - 0xbf, 0xf1, 0x57, 0x49, 0x9c, 0x55, 0xe2, 0x6f, 0xf2, 0x4d, 0x08, 0xa4, 0x52, 0x5a, 0x49, 0x0e, - 0x4a, 0x2c, 0x4b, 0xbc, 0xb5, 0x1d, 0x41, 0x7e, 0x8e, 0x76, 0x9e, 0xd6, 0x63, 0xcf, 0xce, 0x8c, - 0xe7, 0xcd, 0xac, 0xa4, 0x0a, 0x50, 0x40, 0x2a, 0x05, 0x45, 0x01, 0xa1, 0x48, 0x2e, 0x14, 0x70, - 0x08, 0x14, 0x17, 0x0e, 0x70, 0x80, 0x1b, 0xfc, 0x01, 0x39, 0xa6, 0x80, 0x43, 0x0e, 0xd4, 0x16, - 0x59, 0xfe, 0x05, 0x0a, 0xaa, 0x74, 0xa2, 0xde, 0x8f, 0x99, 0x79, 0x33, 0xbb, 0x6b, 0xbb, 0xa2, - 0xdd, 0xb8, 0xb8, 0x69, 0xbb, 0xfb, 0xf5, 0xa7, 0xa7, 0x5f, 0xbf, 0xee, 0x7e, 0x3d, 0x23, 0xd8, - 0xb8, 0xf5, 0x2c, 0x2d, 0x5b, 0xee, 0x92, 0xe1, 0x59, 0x64, 0x3f, 0x20, 0x0e, 0xb5, 0x5c, 0x87, - 0x3e, 0x6e, 0x78, 0x16, 0x25, 0x7e, 0x93, 0xf8, 0x4b, 0xde, 0xad, 0x3a, 0xe3, 0xd1, 0xb4, 0xc0, - 0x52, 0xf3, 0xc9, 0x1d, 0x12, 0x18, 0x4f, 0x2e, 0xd5, 0x89, 0x43, 0x7c, 0x23, 0x20, 0x66, 0xd9, - 0xf3, 0xdd, 0xc0, 0x45, 0xcf, 0x0b, 0x75, 0xe5, 0x94, 0xf4, 0x9b, 0xb1, 0xba, 0xb2, 0x77, 0xab, - 0xce, 0x78, 0x34, 0x2d, 0x50, 0x96, 0xea, 0xe6, 0x1e, 0xaf, 0x5b, 0xc1, 0x8d, 0x70, 0xa7, 0x5c, - 0x73, 0x1b, 0x4b, 0x75, 0xb7, 0xee, 0x2e, 0x71, 0xad, 0x3b, 0xe1, 0x2e, 0xff, 0xc5, 0x7f, 0xf0, - 0xbf, 0x04, 0xda, 0xdc, 0x53, 0x89, 0xf1, 0x0d, 0xa3, 0x76, 0xc3, 0x72, 0x88, 0x7f, 0x90, 0x58, - 0xdc, 0x20, 0x81, 0xb1, 0xd4, 0xec, 0xb0, 0x71, 0x6e, 0xa9, 0xd7, 0x2a, 0x3f, 0x74, 0x02, 0xab, - 0x41, 0x3a, 0x16, 0xfc, 0xff, 0xdd, 0x16, 0xd0, 0xda, 0x0d, 0xd2, 0x30, 0xb2, 0xeb, 0x4a, 0x87, - 0x1a, 0x4c, 0xaf, 0xb8, 0x4e, 0x93, 0xf8, 0xec, 0x29, 0x31, 0xb9, 0x1d, 0x12, 0x1a, 0xa0, 0x0a, - 0x0c, 0x85, 0x96, 0xa9, 0x6b, 0x0b, 0xda, 0xe2, 0x58, 0xe5, 0x89, 0x8f, 0x5a, 0xc5, 0x63, 0xed, - 0x56, 0x71, 0xe8, 0xda, 0xfa, 0xea, 0x61, 0xab, 0x78, 0xb6, 0x17, 0x52, 0x70, 0xe0, 0x11, 0x5a, - 0xbe, 0xb6, 0xbe, 0x8a, 0xd9, 0x62, 0xf4, 0x22, 0x4c, 0x9b, 0x84, 0x5a, 0x3e, 0x31, 0x97, 0xb7, - 0xd6, 0xaf, 0x0b, 0xfd, 0x7a, 0x8e, 0x6b, 0x3c, 0x2d, 0x35, 0x4e, 0xaf, 0x66, 0x05, 0x70, 0xe7, - 0x1a, 0xb4, 0x0d, 0xa3, 0xee, 0xce, 0x4d, 0x52, 0x0b, 0xa8, 0x3e, 0xb4, 0x30, 0xb4, 0x38, 0x7e, - 0xf1, 0xf1, 0x72, 0xb2, 0x83, 0xb1, 0x09, 0x7c, 0xdb, 0xe4, 0xc3, 0x96, 0xb1, 0xb1, 0xb7, 0x16, - 0xed, 0x5c, 0x65, 0x52, 0xa2, 0x8d, 0x6e, 0x0a, 0x2d, 0x38, 0x52, 0x57, 0xfa, 0x55, 0x0e, 0x90, - 0xfa, 0xf0, 0xd4, 0x73, 0x1d, 0x4a, 0xfa, 0xf2, 0xf4, 0x14, 0xa6, 0x6a, 0x5c, 0x73, 0x40, 0x4c, - 0x89, 0xab, 0xe7, 0x3e, 0x8b, 0xf5, 0xba, 0xc4, 0x9f, 0x5a, 0xc9, 0xa8, 0xc3, 0x1d, 0x00, 0xe8, - 0x2a, 0x8c, 0xf8, 0x84, 0x86, 0x76, 0xa0, 0x0f, 0x2d, 0x68, 0x8b, 0xe3, 0x17, 0x2f, 0xf4, 0x84, - 0xe2, 0xf1, 0xcd, 0x82, 0xaf, 0xdc, 0x7c, 0xb2, 0x5c, 0x0d, 0x8c, 0x20, 0xa4, 0x95, 0x13, 0x12, - 0x69, 0x04, 0x73, 0x1d, 0x58, 0xea, 0x2a, 0x7d, 0x2f, 0x07, 0x53, 0xaa, 0x97, 0x9a, 0x16, 0xd9, - 0x43, 0x7b, 0x30, 0xea, 0x8b, 0x60, 0xe1, 0x7e, 0x1a, 0xbf, 0xb8, 0x55, 0x3e, 0xd2, 0xb1, 0x2a, - 0x77, 0x04, 0x61, 0x65, 0x9c, 0xed, 0x99, 0xfc, 0x81, 0x23, 0x34, 0xf4, 0x36, 0x14, 0x7c, 0xb9, - 0x51, 0x3c, 0x9a, 0xc6, 0x2f, 0x7e, 0xa5, 0x8f, 0xc8, 0x42, 0x71, 0x65, 0xa2, 0xdd, 0x2a, 0x16, - 0xa2, 0x5f, 0x38, 0x06, 0x2c, 0xbd, 0x9f, 0x83, 0xf9, 0x95, 0x90, 0x06, 0x6e, 0x03, 0x13, 0xea, - 0x86, 0x7e, 0x8d, 0xac, 0xb8, 0x76, 0xd8, 0x70, 0x56, 0xc9, 0xae, 0xe5, 0x58, 0x01, 0x8b, 0xd6, - 0x05, 0x18, 0x76, 0x8c, 0x06, 0x91, 0xd1, 0x33, 0x21, 0x7d, 0x3a, 0x7c, 0xc5, 0x68, 0x10, 0xcc, - 0x39, 0x4c, 0x82, 0x05, 0x8b, 0x3c, 0x0b, 0xb1, 0xc4, 0xd5, 0x03, 0x8f, 0x60, 0xce, 0x41, 0xe7, - 0x61, 0x64, 0xd7, 0xf5, 0x1b, 0x86, 0xd8, 0xc7, 0xb1, 0x64, 0x67, 0x2e, 0x71, 0x2a, 0x96, 0x5c, - 0xf4, 0x34, 0x8c, 0x9b, 0x84, 0xd6, 0x7c, 0xcb, 0x63, 0xd0, 0xfa, 0x30, 0x17, 0x3e, 0x29, 0x85, - 0xc7, 0x57, 0x13, 0x16, 0x56, 0xe5, 0xd0, 0x05, 0x28, 0x78, 0xbe, 0xe5, 0xfa, 0x56, 0x70, 0xa0, - 0xe7, 0x17, 0xb4, 0xc5, 0x7c, 0x65, 0x4a, 0xae, 0x29, 0x6c, 0x49, 0x3a, 0x8e, 0x25, 0xd0, 0x02, - 0x14, 0x5e, 0xaa, 0x6e, 0x5e, 0xd9, 0x32, 0x82, 0x1b, 0xfa, 0x08, 0x47, 0x18, 0x66, 0xd2, 0x38, - 0xa6, 0x96, 0xfe, 0x96, 0x03, 0x3d, 0xeb, 0x95, 0xc8, 0xa5, 0xe8, 0x12, 0x14, 0x68, 0xc0, 0x32, - 0x4e, 0xfd, 0x40, 0xfa, 0xe4, 0xd1, 0x08, 0xac, 0x2a, 0xe9, 0x87, 0xad, 0xe2, 0x6c, 0xb2, 0x22, - 0xa2, 0x72, 0x7f, 0xc4, 0x6b, 0xd1, 0x2f, 0x34, 0x38, 0xb9, 0x47, 0x76, 0x6e, 0xb8, 0xee, 0xad, - 0x15, 0xdb, 0x22, 0x4e, 0xb0, 0xe2, 0x3a, 0xbb, 0x56, 0x5d, 0xc6, 0x00, 0x3e, 0x62, 0x0c, 0xbc, - 0xd2, 0xa9, 0xb9, 0xf2, 0x40, 0xbb, 0x55, 0x3c, 0xd9, 0x85, 0x81, 0xbb, 0xd9, 0x81, 0xb6, 0x41, - 0xaf, 0x65, 0x0e, 0x89, 0x4c, 0x60, 0x22, 0x6d, 0x8d, 0x55, 0xce, 0xb4, 0x5b, 0x45, 0x7d, 0xa5, - 0x87, 0x0c, 0xee, 0xb9, 0xba, 0xf4, 0xce, 0x50, 0xd6, 0xbd, 0x4a, 0xb8, 0xbd, 0x05, 0x05, 0x76, - 0x8c, 0x4d, 0x23, 0x30, 0xe4, 0x41, 0x7c, 0xe2, 0xde, 0x0e, 0xbd, 0xc8, 0x19, 0x1b, 0x24, 0x30, - 0x2a, 0x48, 0x6e, 0x08, 0x24, 0x34, 0x1c, 0x6b, 0x45, 0xdf, 0x80, 0x61, 0xea, 0x91, 0x9a, 0x74, - 0xf4, 0xab, 0x47, 0x3d, 0x6c, 0x3d, 0x1e, 0xa4, 0xea, 0x91, 0x5a, 0x72, 0x16, 0xd8, 0x2f, 0xcc, - 0x61, 0xd1, 0xbb, 0x1a, 0x8c, 0x50, 0x9e, 0xa0, 0x64, 0x52, 0x7b, 0x7d, 0x50, 0x16, 0x64, 0xb2, - 0xa0, 0xf8, 0x8d, 0x25, 0x78, 0xe9, 0x9f, 0x39, 0x38, 0xdb, 0x6b, 0xe9, 0x8a, 0xeb, 0x98, 0x62, - 0x3b, 0xd6, 0xe5, 0xd9, 0x16, 0x91, 0xfe, 0xb4, 0x7a, 0xb6, 0x0f, 0x5b, 0xc5, 0x87, 0xef, 0xaa, - 0x40, 0x49, 0x02, 0x5f, 0x88, 0x9f, 0x5b, 0x24, 0x8a, 0xb3, 0x69, 0xc3, 0x0e, 0x5b, 0xc5, 0xc9, - 0x78, 0x59, 0xda, 0x56, 0xd4, 0x04, 0x64, 0x1b, 0x34, 0xb8, 0xea, 0x1b, 0x0e, 0x15, 0x6a, 0xad, - 0x06, 0x91, 0xee, 0x7b, 0xf4, 0xde, 0xc2, 0x83, 0xad, 0xa8, 0xcc, 0x49, 0x48, 0x74, 0xb9, 0x43, - 0x1b, 0xee, 0x82, 0xc0, 0xf2, 0x96, 0x4f, 0x0c, 0x1a, 0xa7, 0x22, 0xa5, 0xa2, 0x30, 0x2a, 0x96, - 0x5c, 0xf4, 0x08, 0x8c, 0x36, 0x08, 0xa5, 0x46, 0x9d, 0xf0, 0xfc, 0x33, 0x96, 0x94, 0xe8, 0x0d, - 0x41, 0xc6, 0x11, 0x9f, 0xf5, 0x27, 0x67, 0x7a, 0x79, 0xed, 0xb2, 0x45, 0x03, 0xf4, 0x5a, 0xc7, - 0x01, 0x28, 0xdf, 0xdb, 0x13, 0xb2, 0xd5, 0x3c, 0xfc, 0xe3, 0xe4, 0x17, 0x51, 0x94, 0xe0, 0xff, - 0x3a, 0xe4, 0xad, 0x80, 0x34, 0xa2, 0xda, 0xfd, 0xca, 0x80, 0x62, 0xaf, 0x72, 0x5c, 0xda, 0x90, - 0x5f, 0x67, 0x68, 0x58, 0x80, 0x96, 0x7e, 0x9d, 0x83, 0x87, 0x7a, 0x2d, 0x61, 0x05, 0x85, 0x32, - 0x8f, 0x7b, 0x76, 0xe8, 0x1b, 0xb6, 0x8c, 0xb8, 0xd8, 0xe3, 0x5b, 0x9c, 0x8a, 0x25, 0x97, 0xa5, - 0x7c, 0x6a, 0x39, 0xf5, 0xd0, 0x36, 0x7c, 0x19, 0x4e, 0xf1, 0x53, 0x57, 0x25, 0x1d, 0xc7, 0x12, - 0xa8, 0x0c, 0x40, 0x6f, 0xb8, 0x7e, 0xc0, 0x31, 0x64, 0xf6, 0x3a, 0xc1, 0x12, 0x44, 0x35, 0xa6, - 0x62, 0x45, 0x82, 0x55, 0xb4, 0x5b, 0x96, 0x63, 0xca, 0x5d, 0x8f, 0x4f, 0xf1, 0xcb, 0x96, 0x63, - 0x62, 0xce, 0x61, 0xf8, 0xb6, 0x45, 0x03, 0x46, 0x91, 0x5b, 0x9e, 0xf2, 0x3a, 0x97, 0x8c, 0x25, - 0x18, 0x7e, 0x8d, 0x65, 0x7d, 0xd7, 0xb7, 0x08, 0xd5, 0x47, 0x12, 0xfc, 0x95, 0x98, 0x8a, 0x15, - 0x89, 0xd2, 0x3b, 0xd0, 0x3b, 0x48, 0x58, 0x2a, 0x41, 0xe7, 0x20, 0x5f, 0xf7, 0xdd, 0xd0, 0x93, - 0x5e, 0x8a, 0xbd, 0xfd, 0x22, 0x23, 0x62, 0xc1, 0x63, 0x51, 0xd9, 0x4c, 0xb5, 0xa9, 0x71, 0x54, - 0x46, 0xcd, 0x69, 0xc4, 0x47, 0xdf, 0xd6, 0x20, 0xef, 0x48, 0xe7, 0xb0, 0x90, 0x7b, 0x6d, 0x40, - 0x71, 0xc1, 0xdd, 0x9b, 0x98, 0x2b, 0x3c, 0x2f, 0x90, 0xd1, 0x53, 0x90, 0xa7, 0x35, 0xd7, 0x23, - 0xd2, 0xeb, 0xf3, 0x91, 0x50, 0x95, 0x11, 0x0f, 0x5b, 0xc5, 0xe3, 0x91, 0x3a, 0x4e, 0xc0, 0x42, - 0x18, 0x7d, 0x57, 0x03, 0x68, 0x1a, 0xb6, 0x65, 0x1a, 0xbc, 0x65, 0xc8, 0x73, 0xf3, 0xfb, 0x1b, - 0xd6, 0xd7, 0x63, 0xf5, 0x62, 0xd3, 0x92, 0xdf, 0x58, 0x81, 0x46, 0xef, 0x69, 0x30, 0x41, 0xc3, - 0x1d, 0x5f, 0xae, 0xa2, 0xbc, 0xb9, 0x18, 0xbf, 0xf8, 0xd5, 0xbe, 0xda, 0x52, 0x55, 0x00, 0x2a, - 0x53, 0xed, 0x56, 0x71, 0x42, 0xa5, 0xe0, 0x94, 0x01, 0xe8, 0x07, 0x1a, 0x14, 0x9a, 0x51, 0xcd, - 0x1e, 0xe5, 0x07, 0xfe, 0x8d, 0x01, 0x6d, 0xac, 0x8c, 0xa8, 0xe4, 0x14, 0xc4, 0x7d, 0x40, 0x6c, - 0x01, 0xfa, 0xa3, 0x06, 0xba, 0x61, 0x8a, 0x04, 0x6f, 0xd8, 0x5b, 0xbe, 0xe5, 0x04, 0xc4, 0x17, - 0xfd, 0x26, 0xd5, 0x0b, 0xdc, 0xbc, 0xfe, 0xd6, 0xc2, 0x6c, 0x2f, 0x5b, 0x59, 0x90, 0xd6, 0xe9, - 0xcb, 0x3d, 0xcc, 0xc0, 0x3d, 0x0d, 0x44, 0x1f, 0x68, 0x30, 0x45, 0x89, 0x4d, 0x6a, 0x81, 0xb1, - 0x63, 0x93, 0x4b, 0x16, 0xb1, 0x4d, 0xaa, 0x8f, 0x73, 0xab, 0xaf, 0x1c, 0xd1, 0xea, 0x6a, 0x5a, - 0x6d, 0x72, 0x45, 0xca, 0x30, 0x28, 0xee, 0xb0, 0x80, 0xc7, 0x7f, 0xd2, 0x69, 0xe9, 0x63, 0x03, - 0x88, 0xff, 0xa4, 0xc5, 0x93, 0x49, 0x2b, 0x69, 0xec, 0x14, 0x68, 0xb4, 0x09, 0x33, 0x9e, 0x4f, - 0x38, 0xc0, 0x35, 0xe7, 0x96, 0xe3, 0xee, 0x39, 0xd2, 0x49, 0xb0, 0xa0, 0x2d, 0x16, 0x2a, 0xa7, - 0xdb, 0xad, 0xe2, 0xcc, 0x56, 0x37, 0x01, 0xdc, 0x7d, 0x5d, 0xe9, 0xbd, 0xa1, 0xec, 0xe5, 0x24, - 0xdb, 0xdc, 0xb0, 0x4d, 0x61, 0x26, 0x88, 0x2d, 0xa3, 0xba, 0xc6, 0xb7, 0xe3, 0xad, 0x01, 0xc5, - 0x78, 0xdc, 0x9d, 0x24, 0x0d, 0x66, 0x4c, 0xa2, 0x58, 0xb1, 0x03, 0xfd, 0x54, 0x83, 0xe3, 0x46, - 0xad, 0x46, 0xbc, 0x80, 0x98, 0xa2, 0xe6, 0xe4, 0x3e, 0x87, 0xb4, 0x3a, 0x23, 0xad, 0x3a, 0xbe, - 0xac, 0x42, 0xe3, 0xb4, 0x25, 0xe8, 0x39, 0x38, 0x41, 0x03, 0xd7, 0x27, 0x66, 0xa6, 0x9b, 0x47, - 0xed, 0x56, 0xf1, 0x44, 0x35, 0xc5, 0xc1, 0x19, 0xc9, 0xd2, 0xbf, 0x46, 0xa0, 0x78, 0x97, 0x0c, - 0x70, 0x0f, 0xf7, 0xc5, 0xf3, 0x30, 0xc2, 0x1f, 0xd7, 0xe4, 0x5e, 0x29, 0x28, 0x1d, 0x2a, 0xa7, - 0x62, 0xc9, 0x65, 0xf5, 0x8b, 0xe1, 0xb3, 0xae, 0x6a, 0x88, 0x0b, 0xc6, 0xf5, 0xab, 0x2a, 0xc8, - 0x38, 0xe2, 0xa3, 0x8b, 0x00, 0x26, 0xf1, 0x7c, 0xc2, 0x6a, 0xa8, 0xa9, 0x8f, 0x72, 0xe9, 0x78, - 0x93, 0x56, 0x63, 0x0e, 0x56, 0xa4, 0xd0, 0x25, 0x40, 0xd1, 0x2f, 0xcb, 0x75, 0x5e, 0x31, 0x7c, - 0xc7, 0x72, 0xea, 0x7a, 0x81, 0x9b, 0x3d, 0xcb, 0x9a, 0xc4, 0xd5, 0x0e, 0x2e, 0xee, 0xb2, 0x02, - 0xbd, 0x0d, 0x23, 0x62, 0x16, 0xc5, 0x0b, 0xd7, 0x00, 0x8b, 0x0f, 0x70, 0x1f, 0x71, 0x28, 0x2c, - 0x21, 0x3b, 0x8b, 0x4e, 0xfe, 0x7e, 0x17, 0x9d, 0x3b, 0x66, 0xf9, 0x91, 0xff, 0xca, 0x2c, 0x3f, - 0x76, 0xbf, 0xb3, 0x7c, 0xe9, 0xdf, 0x5a, 0x36, 0x15, 0x2a, 0x3b, 0x50, 0xad, 0x19, 0x36, 0x41, - 0xab, 0x30, 0xc5, 0xee, 0x97, 0x98, 0x78, 0xb6, 0x55, 0x33, 0x28, 0x1f, 0x6f, 0x88, 0x33, 0x98, - 0x00, 0x65, 0xf8, 0xb8, 0x63, 0x05, 0x7a, 0x09, 0x90, 0xb8, 0x73, 0xa5, 0xf4, 0x88, 0xf6, 0x31, - 0xbe, 0x3d, 0x55, 0x3b, 0x24, 0x70, 0x97, 0x55, 0x68, 0x05, 0xa6, 0x6d, 0x63, 0x87, 0xd8, 0xe2, - 0xf9, 0x5c, 0x9f, 0xab, 0x12, 0x03, 0xa0, 0x99, 0x76, 0xab, 0x38, 0x7d, 0x39, 0xcb, 0xc4, 0x9d, - 0xf2, 0xa5, 0xb3, 0xd9, 0x8c, 0xa3, 0x3e, 0xb8, 0xb8, 0xc9, 0x7e, 0x98, 0x83, 0xb9, 0xde, 0x01, - 0x8b, 0xbe, 0x93, 0x5c, 0xb8, 0xc5, 0x7d, 0xea, 0x8d, 0x41, 0x1d, 0x0e, 0x79, 0xe3, 0x86, 0xce, - 0xdb, 0x36, 0xfa, 0x26, 0x6b, 0x6e, 0x0d, 0x3b, 0x1a, 0xf1, 0xbd, 0x3e, 0x30, 0x13, 0x18, 0x48, - 0x65, 0x4c, 0xf4, 0xcd, 0x86, 0xcd, 0xdb, 0x64, 0xc3, 0x26, 0xa5, 0xdf, 0x68, 0xd9, 0x99, 0x4b, - 0x92, 0x58, 0xd0, 0x0f, 0x35, 0x98, 0x74, 0x3d, 0xe2, 0x2c, 0x6f, 0xad, 0x5f, 0xff, 0x3f, 0x91, - 0x60, 0xa4, 0xab, 0x8e, 0x1a, 0xf3, 0x2f, 0x55, 0x37, 0xaf, 0x08, 0x85, 0x5b, 0xbe, 0xeb, 0xd1, - 0xca, 0xc9, 0x76, 0xab, 0x38, 0xb9, 0x99, 0x86, 0xc2, 0x59, 0xec, 0x52, 0x03, 0x66, 0xd6, 0xf6, - 0x03, 0xe2, 0x3b, 0x86, 0xbd, 0xea, 0xd6, 0xc2, 0x06, 0x71, 0x02, 0x61, 0x68, 0x66, 0x3e, 0xa8, - 0xdd, 0xe3, 0x7c, 0xf0, 0x21, 0x18, 0x0a, 0x7d, 0x5b, 0x46, 0xf1, 0x78, 0x3c, 0xff, 0xc6, 0x97, - 0x31, 0xa3, 0x97, 0xce, 0xc2, 0x30, 0xb3, 0x13, 0x9d, 0x86, 0x21, 0xdf, 0xd8, 0xe3, 0x5a, 0x27, - 0x2a, 0xa3, 0x4c, 0x04, 0x1b, 0x7b, 0x98, 0xd1, 0x4a, 0x7f, 0x3d, 0x0b, 0x93, 0x99, 0x67, 0x41, - 0x73, 0x90, 0x8b, 0x87, 0xea, 0x20, 0x95, 0xe6, 0xd6, 0x57, 0x71, 0xce, 0x32, 0xd1, 0x33, 0x71, - 0x4d, 0x10, 0xa0, 0xc5, 0xb8, 0xc4, 0x71, 0x2a, 0xbb, 0xcd, 0x24, 0xea, 0x98, 0x21, 0x51, 0x3e, - 0x67, 0x36, 0x90, 0x5d, 0x79, 0x4a, 0x84, 0x0d, 0x64, 0x17, 0x33, 0xda, 0x67, 0x1d, 0x8e, 0x46, - 0xd3, 0xd9, 0xfc, 0x3d, 0x4c, 0x67, 0x47, 0xee, 0x38, 0x9d, 0x3d, 0x07, 0xf9, 0xc0, 0x0a, 0x6c, - 0xc2, 0xeb, 0xab, 0x72, 0xe9, 0xbc, 0xca, 0x88, 0x58, 0xf0, 0xd0, 0x4d, 0x18, 0x35, 0xc9, 0xae, - 0x11, 0xda, 0x01, 0x2f, 0xa5, 0xe3, 0x17, 0x57, 0xfa, 0x10, 0x42, 0x62, 0x74, 0xbe, 0x2a, 0xf4, - 0xe2, 0x08, 0x00, 0x3d, 0x0c, 0xa3, 0x0d, 0x63, 0xdf, 0x6a, 0x84, 0x0d, 0xde, 0xf7, 0x6a, 0x42, - 0x6c, 0x43, 0x90, 0x70, 0xc4, 0x63, 0x99, 0x91, 0xec, 0xd7, 0xec, 0x90, 0x5a, 0x4d, 0x22, 0x99, - 0xb2, 0x27, 0x8d, 0x33, 0xe3, 0x5a, 0x86, 0x8f, 0x3b, 0x56, 0x70, 0x30, 0xcb, 0xe1, 0x8b, 0xc7, - 0x15, 0x30, 0x41, 0xc2, 0x11, 0x2f, 0x0d, 0x26, 0xe5, 0x27, 0x7a, 0x81, 0xc9, 0xc5, 0x1d, 0x2b, - 0xd0, 0x63, 0x30, 0xd6, 0x30, 0xf6, 0x2f, 0x13, 0xa7, 0x1e, 0xdc, 0xd0, 0x8f, 0x2f, 0x68, 0x8b, - 0x43, 0x95, 0xe3, 0xed, 0x56, 0x71, 0x6c, 0x23, 0x22, 0xe2, 0x84, 0xcf, 0x85, 0x2d, 0x47, 0x0a, - 0x9f, 0x50, 0x84, 0x23, 0x22, 0x4e, 0xf8, 0xac, 0xa9, 0xf2, 0x8c, 0x80, 0x1d, 0x2e, 0x7d, 0x32, - 0x3d, 0x14, 0xd8, 0x12, 0x64, 0x1c, 0xf1, 0xd1, 0x22, 0x14, 0x1a, 0xc6, 0x3e, 0x1f, 0xe0, 0xe8, - 0x53, 0x5c, 0x2d, 0x7f, 0x8d, 0xb0, 0x21, 0x69, 0x38, 0xe6, 0x72, 0x49, 0xcb, 0x11, 0x92, 0xd3, - 0x8a, 0xa4, 0xa4, 0xe1, 0x98, 0xcb, 0x82, 0x38, 0x74, 0xac, 0xdb, 0x21, 0x11, 0xc2, 0x88, 0x7b, - 0x26, 0x0e, 0xe2, 0x6b, 0x09, 0x0b, 0xab, 0x72, 0xa8, 0x0c, 0xd0, 0x08, 0xed, 0xc0, 0xf2, 0x6c, - 0xb2, 0xb9, 0xab, 0x9f, 0xe4, 0xfe, 0xe7, 0x77, 0x91, 0x8d, 0x98, 0x8a, 0x15, 0x09, 0x44, 0x60, - 0x98, 0x38, 0x61, 0x43, 0x3f, 0xc5, 0x2b, 0x77, 0x5f, 0x42, 0x30, 0x3e, 0x39, 0x6b, 0x4e, 0xd8, - 0xc0, 0x5c, 0x3d, 0x7a, 0x06, 0x8e, 0x37, 0x8c, 0x7d, 0x96, 0x0e, 0x88, 0x1f, 0x58, 0x84, 0xea, - 0x33, 0xfc, 0xe1, 0xa7, 0x59, 0x13, 0xbe, 0xa1, 0x32, 0x70, 0x5a, 0x8e, 0x2f, 0xb4, 0x1c, 0x65, - 0xe1, 0xac, 0xb2, 0x50, 0x65, 0xe0, 0xb4, 0x1c, 0xf3, 0xb4, 0x4f, 0x6e, 0x87, 0x96, 0x4f, 0x4c, - 0xfd, 0x01, 0xde, 0xb7, 0xcb, 0x57, 0x3b, 0x82, 0x86, 0x63, 0x2e, 0x6a, 0x46, 0x93, 0x3e, 0x9d, - 0x1f, 0xc3, 0x6b, 0xfd, 0xcd, 0xe4, 0x9b, 0xfe, 0xb2, 0xef, 0x1b, 0x07, 0xa2, 0xd2, 0xa8, 0x33, - 0x3e, 0x44, 0x21, 0x6f, 0xd8, 0xf6, 0xe6, 0xae, 0x7e, 0xba, 0x2f, 0x5d, 0x53, 0xb6, 0x82, 0xc4, - 0x59, 0x67, 0x99, 0x81, 0x60, 0x81, 0xc5, 0x40, 0x5d, 0x87, 0x85, 0xc6, 0xdc, 0x60, 0x41, 0x37, - 0x19, 0x08, 0x16, 0x58, 0xfc, 0x49, 0x9d, 0x83, 0xcd, 0x5d, 0xfd, 0xc1, 0x01, 0x3f, 0x29, 0x03, - 0xc1, 0x02, 0x0b, 0x59, 0x30, 0xe4, 0xb8, 0x81, 0x7e, 0x66, 0x20, 0xe5, 0x99, 0x17, 0x9c, 0x2b, - 0x6e, 0x80, 0x19, 0x06, 0xfa, 0x89, 0x06, 0xe0, 0x25, 0x21, 0xfa, 0x50, 0x5f, 0x06, 0x48, 0x19, - 0xc8, 0x72, 0x12, 0xdb, 0x6b, 0x4e, 0xe0, 0x1f, 0x24, 0xb7, 0x36, 0xe5, 0x0c, 0x28, 0x56, 0xa0, - 0x5f, 0x6a, 0x70, 0x4a, 0xed, 0xde, 0x63, 0xf3, 0xe6, 0xb9, 0x47, 0xae, 0xf6, 0x3b, 0xcc, 0x2b, - 0xae, 0x6b, 0x57, 0xf4, 0x76, 0xab, 0x78, 0x6a, 0xb9, 0x0b, 0x2a, 0xee, 0x6a, 0x0b, 0xfa, 0xad, - 0x06, 0xd3, 0x32, 0x8b, 0x2a, 0x16, 0x16, 0xb9, 0x03, 0x49, 0xbf, 0x1d, 0x98, 0xc5, 0x11, 0x7e, - 0x8c, 0x3f, 0x49, 0xe8, 0xe0, 0xe3, 0x4e, 0xd3, 0xd0, 0x1f, 0x34, 0x98, 0x30, 0x89, 0x47, 0x1c, - 0x93, 0x38, 0x35, 0x66, 0xeb, 0x42, 0x5f, 0x26, 0x29, 0x59, 0x5b, 0x57, 0x15, 0x08, 0x61, 0x66, - 0x59, 0x9a, 0x39, 0xa1, 0xb2, 0x0e, 0x5b, 0xc5, 0xd9, 0x64, 0xa9, 0xca, 0xc1, 0x29, 0x2b, 0xd1, - 0xfb, 0x1a, 0x4c, 0x26, 0x1b, 0x20, 0x4a, 0xca, 0xd9, 0x01, 0xc6, 0x01, 0x6f, 0x5f, 0x97, 0xd3, - 0x80, 0x38, 0x6b, 0x01, 0xfa, 0x9d, 0xc6, 0x3a, 0xb5, 0xe8, 0x3a, 0x4a, 0xf5, 0x12, 0xf7, 0xe5, - 0x9b, 0x7d, 0xf7, 0x65, 0x8c, 0x20, 0x5c, 0x79, 0x21, 0x69, 0x05, 0x63, 0xce, 0x61, 0xab, 0x38, - 0xa3, 0x7a, 0x32, 0x66, 0x60, 0xd5, 0x42, 0xf4, 0x7d, 0x0d, 0x26, 0x48, 0xd2, 0x71, 0x53, 0xfd, - 0x5c, 0x5f, 0x9c, 0xd8, 0xb5, 0x89, 0x17, 0x03, 0x04, 0x85, 0x45, 0x71, 0x0a, 0x9b, 0x75, 0x90, - 0x64, 0xdf, 0x68, 0x78, 0x36, 0xd1, 0xff, 0xa7, 0xcf, 0x1d, 0xe4, 0x9a, 0xd0, 0x8b, 0x23, 0x00, - 0x74, 0x01, 0x0a, 0x4e, 0x68, 0xdb, 0xec, 0xa6, 0xad, 0x3f, 0xcc, 0x7b, 0x91, 0x78, 0x80, 0x7d, - 0x45, 0xd2, 0x71, 0x2c, 0x81, 0x76, 0x61, 0x61, 0xff, 0xe5, 0x70, 0x87, 0xf8, 0x0e, 0x09, 0x08, - 0xed, 0x3a, 0xcb, 0xd4, 0xcf, 0x73, 0x2d, 0x73, 0xed, 0x56, 0x71, 0x76, 0xbb, 0xfb, 0xb4, 0xf3, - 0xae, 0x3a, 0xd0, 0xab, 0xf0, 0xa0, 0x22, 0xb3, 0xd6, 0xd8, 0x21, 0xa6, 0x49, 0xcc, 0xe8, 0xe2, - 0xa6, 0xff, 0xaf, 0x98, 0xa7, 0x46, 0x07, 0x7c, 0x3b, 0x2b, 0x80, 0xef, 0xb4, 0x1a, 0x5d, 0x86, - 0x59, 0x85, 0xbd, 0xee, 0x04, 0x9b, 0x7e, 0x35, 0xf0, 0x2d, 0xa7, 0xae, 0x2f, 0x72, 0xbd, 0xa7, - 0xa2, 0x13, 0xb9, 0xad, 0xf0, 0x70, 0x8f, 0x35, 0xe8, 0xcb, 0x29, 0x6d, 0xfc, 0x85, 0xa3, 0xe1, - 0xbd, 0x4c, 0x0e, 0xa8, 0xfe, 0x08, 0xef, 0x4e, 0xf8, 0x66, 0x6f, 0x2b, 0x74, 0xdc, 0x43, 0x1e, - 0xbd, 0x00, 0x27, 0x33, 0x1c, 0x76, 0x45, 0xd1, 0x1f, 0x15, 0x77, 0x0d, 0xd6, 0xcf, 0x6e, 0x47, - 0x44, 0xdc, 0x4d, 0x12, 0x7d, 0x09, 0x90, 0x42, 0xde, 0x30, 0x3c, 0xbe, 0xfe, 0x31, 0x71, 0xed, - 0x61, 0x3b, 0xba, 0x2d, 0x69, 0xb8, 0x8b, 0x1c, 0xfa, 0x99, 0x96, 0x7a, 0x92, 0xe4, 0x76, 0x4c, - 0xf5, 0x0b, 0xfc, 0xfc, 0x6e, 0x1c, 0x31, 0x0a, 0x95, 0xb7, 0x46, 0xa1, 0x4d, 0x14, 0x37, 0x2b, - 0x50, 0xb8, 0x87, 0x09, 0x73, 0xec, 0x86, 0x9e, 0xc9, 0xf0, 0x68, 0x0a, 0x86, 0x6e, 0x11, 0xf9, - 0x0d, 0x0a, 0x66, 0x7f, 0x22, 0x13, 0xf2, 0x4d, 0xc3, 0x0e, 0xa3, 0x21, 0x43, 0x9f, 0xbb, 0x03, - 0x2c, 0x94, 0x3f, 0x97, 0x7b, 0x56, 0x9b, 0xfb, 0x40, 0x83, 0xd9, 0xee, 0x85, 0xe7, 0xbe, 0x9a, - 0xf5, 0x73, 0x0d, 0xa6, 0x3b, 0x6a, 0x4c, 0x17, 0x8b, 0x6e, 0xa7, 0x2d, 0x7a, 0xb5, 0xdf, 0xc5, - 0x42, 0x1c, 0x0e, 0xde, 0x21, 0xab, 0xe6, 0xfd, 0x48, 0x83, 0xa9, 0x6c, 0xda, 0xbe, 0x9f, 0xfe, - 0x2a, 0x7d, 0x90, 0x83, 0xd9, 0xee, 0x8d, 0x3d, 0xf2, 0xe3, 0x09, 0xc6, 0x60, 0x26, 0x41, 0xdd, - 0x86, 0xd9, 0xef, 0x6a, 0x30, 0x7e, 0x33, 0x96, 0x8b, 0xbe, 0x51, 0xe8, 0xfb, 0x0c, 0x2a, 0xaa, - 0x93, 0x09, 0x83, 0x62, 0x15, 0xb7, 0xf4, 0x7b, 0x0d, 0x66, 0xba, 0x36, 0x00, 0xe8, 0x3c, 0x8c, - 0x18, 0xb6, 0xed, 0xee, 0x89, 0x51, 0xa2, 0xf2, 0xea, 0x62, 0x99, 0x53, 0xb1, 0xe4, 0x2a, 0xde, - 0xcb, 0x7d, 0x5e, 0xde, 0x2b, 0xfd, 0x49, 0x83, 0x33, 0x77, 0x8a, 0xc4, 0xfb, 0xb2, 0xa5, 0x8b, - 0x50, 0x90, 0xcd, 0xfb, 0x01, 0xdf, 0x4e, 0x99, 0x8a, 0x65, 0xd2, 0xe0, 0x9f, 0xe5, 0x89, 0xbf, - 0x4a, 0x2f, 0xc0, 0x64, 0x66, 0x10, 0xce, 0xaa, 0xf3, 0x4d, 0xea, 0x3a, 0xca, 0x28, 0x3b, 0xae, - 0xce, 0xd1, 0xb7, 0x7a, 0x38, 0x96, 0x28, 0x7d, 0xa8, 0xc1, 0x54, 0x95, 0xf8, 0x4d, 0xab, 0x46, - 0x30, 0xd9, 0x25, 0x3e, 0x71, 0x6a, 0x04, 0x2d, 0xc1, 0x18, 0xff, 0xba, 0xc0, 0x33, 0x6a, 0xd1, - 0x2b, 0xa9, 0x69, 0xa9, 0x63, 0xec, 0x4a, 0xc4, 0xc0, 0x89, 0x4c, 0xfc, 0xfa, 0x2a, 0xd7, 0xf3, - 0xf5, 0xd5, 0x19, 0x18, 0xf6, 0x92, 0x49, 0x76, 0x81, 0x71, 0xb9, 0x25, 0x9c, 0xca, 0xb9, 0xae, - 0x1f, 0xf0, 0xf1, 0x5c, 0x5e, 0x72, 0x5d, 0x3f, 0xc0, 0x9c, 0x5a, 0xfa, 0x4b, 0x0e, 0x4e, 0xa4, - 0x0b, 0x01, 0x03, 0xf4, 0x43, 0xbb, 0xe3, 0x7d, 0x19, 0xe3, 0x61, 0xce, 0x51, 0xbf, 0x2e, 0xca, - 0xdd, 0xf9, 0xeb, 0x22, 0xf4, 0x22, 0x4c, 0xcb, 0x3f, 0xd7, 0xf6, 0x3d, 0x9f, 0x50, 0xfe, 0x4e, - 0x78, 0x28, 0xfd, 0x8d, 0xf2, 0x46, 0x56, 0x00, 0x77, 0xae, 0x41, 0x5f, 0xcc, 0x7c, 0xf9, 0x74, - 0x2e, 0xf9, 0xea, 0x89, 0xf5, 0x94, 0x7c, 0x7f, 0xae, 0xb3, 0x3c, 0xb2, 0xe6, 0xfb, 0xae, 0x9f, - 0xf9, 0x1c, 0x6a, 0x09, 0xc6, 0x76, 0x99, 0x00, 0xdf, 0xb8, 0x7c, 0xda, 0xe9, 0x97, 0x22, 0x06, - 0x4e, 0x64, 0xd0, 0xf3, 0x30, 0xe9, 0x7a, 0xa2, 0x85, 0xde, 0xb4, 0xcd, 0x2a, 0xb1, 0x77, 0xf9, - 0x28, 0xb2, 0x10, 0xcd, 0x8b, 0x53, 0x2c, 0x9c, 0x95, 0x2d, 0xfd, 0x59, 0x83, 0x6e, 0xdf, 0x35, - 0xa2, 0xd3, 0x62, 0xee, 0xab, 0x0c, 0x53, 0xa3, 0x99, 0x2f, 0x6a, 0xc2, 0x28, 0x15, 0xb1, 0x22, - 0x0f, 0xc3, 0xe6, 0x91, 0xdf, 0xee, 0xa4, 0x23, 0x4f, 0x34, 0x9c, 0x11, 0x35, 0x02, 0x63, 0xe7, - 0xa1, 0x66, 0x54, 0x42, 0xc7, 0x94, 0xaf, 0x02, 0x26, 0xc4, 0x79, 0x58, 0x59, 0x16, 0x34, 0x1c, - 0x73, 0x2b, 0xb5, 0x8f, 0x3e, 0x9d, 0x3f, 0xf6, 0xf1, 0xa7, 0xf3, 0xc7, 0x3e, 0xf9, 0x74, 0xfe, - 0xd8, 0xb7, 0xda, 0xf3, 0xda, 0x47, 0xed, 0x79, 0xed, 0xe3, 0xf6, 0xbc, 0xf6, 0x49, 0x7b, 0x5e, - 0xfb, 0x7b, 0x7b, 0x5e, 0xfb, 0xf1, 0x3f, 0xe6, 0x8f, 0x7d, 0xed, 0xf9, 0x23, 0xfd, 0x2b, 0xc1, - 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xdf, 0xe3, 0x03, 0xa1, 0x8a, 0x30, 0x00, 0x00, -} +func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } func (m *ConversionRequest) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -2129,7 +1199,7 @@ func (m *JSONSchemaProps) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Definitions { keysForDefinitions = append(keysForDefinitions, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDefinitions) + sort.Strings(keysForDefinitions) for iNdEx := len(keysForDefinitions) - 1; iNdEx >= 0; iNdEx-- { v := m.Definitions[string(keysForDefinitions[iNdEx])] baseI := i @@ -2174,7 +1244,7 @@ func (m *JSONSchemaProps) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Dependencies { keysForDependencies = append(keysForDependencies, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDependencies) + sort.Strings(keysForDependencies) for iNdEx := len(keysForDependencies) - 1; iNdEx >= 0; iNdEx-- { v := m.Dependencies[string(keysForDependencies[iNdEx])] baseI := i @@ -2205,7 +1275,7 @@ func (m *JSONSchemaProps) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.PatternProperties { keysForPatternProperties = append(keysForPatternProperties, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForPatternProperties) + sort.Strings(keysForPatternProperties) for iNdEx := len(keysForPatternProperties) - 1; iNdEx >= 0; iNdEx-- { v := m.PatternProperties[string(keysForPatternProperties[iNdEx])] baseI := i @@ -2250,7 +1320,7 @@ func (m *JSONSchemaProps) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Properties { keysForProperties = append(keysForProperties, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForProperties) + sort.Strings(keysForProperties) for iNdEx := len(keysForProperties) - 1; iNdEx >= 0; iNdEx-- { v := m.Properties[string(keysForProperties[iNdEx])] baseI := i @@ -3834,7 +2904,7 @@ func (this *JSONSchemaProps) String() string { for k := range this.Properties { keysForProperties = append(keysForProperties, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForProperties) + sort.Strings(keysForProperties) mapStringForProperties := "map[string]JSONSchemaProps{" for _, k := range keysForProperties { mapStringForProperties += fmt.Sprintf("%v: %v,", k, this.Properties[k]) @@ -3844,7 +2914,7 @@ func (this *JSONSchemaProps) String() string { for k := range this.PatternProperties { keysForPatternProperties = append(keysForPatternProperties, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForPatternProperties) + sort.Strings(keysForPatternProperties) mapStringForPatternProperties := "map[string]JSONSchemaProps{" for _, k := range keysForPatternProperties { mapStringForPatternProperties += fmt.Sprintf("%v: %v,", k, this.PatternProperties[k]) @@ -3854,7 +2924,7 @@ func (this *JSONSchemaProps) String() string { for k := range this.Dependencies { keysForDependencies = append(keysForDependencies, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDependencies) + sort.Strings(keysForDependencies) mapStringForDependencies := "JSONSchemaDependencies{" for _, k := range keysForDependencies { mapStringForDependencies += fmt.Sprintf("%v: %v,", k, this.Dependencies[k]) @@ -3864,7 +2934,7 @@ func (this *JSONSchemaProps) String() string { for k := range this.Definitions { keysForDefinitions = append(keysForDefinitions, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForDefinitions) + sort.Strings(keysForDefinitions) mapStringForDefinitions := "JSONSchemaDefinitions{" for _, k := range keysForDefinitions { mapStringForDefinitions += fmt.Sprintf("%v: %v,", k, this.Definitions[k]) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..997d32f31e1e4 --- /dev/null +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,74 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*ConversionRequest) ProtoMessage() {} + +func (*ConversionResponse) ProtoMessage() {} + +func (*ConversionReview) ProtoMessage() {} + +func (*CustomResourceColumnDefinition) ProtoMessage() {} + +func (*CustomResourceConversion) ProtoMessage() {} + +func (*CustomResourceDefinition) ProtoMessage() {} + +func (*CustomResourceDefinitionCondition) ProtoMessage() {} + +func (*CustomResourceDefinitionList) ProtoMessage() {} + +func (*CustomResourceDefinitionNames) ProtoMessage() {} + +func (*CustomResourceDefinitionSpec) ProtoMessage() {} + +func (*CustomResourceDefinitionStatus) ProtoMessage() {} + +func (*CustomResourceDefinitionVersion) ProtoMessage() {} + +func (*CustomResourceSubresourceScale) ProtoMessage() {} + +func (*CustomResourceSubresourceStatus) ProtoMessage() {} + +func (*CustomResourceSubresources) ProtoMessage() {} + +func (*CustomResourceValidation) ProtoMessage() {} + +func (*ExternalDocumentation) ProtoMessage() {} + +func (*JSON) ProtoMessage() {} + +func (*JSONSchemaProps) ProtoMessage() {} + +func (*JSONSchemaPropsOrArray) ProtoMessage() {} + +func (*JSONSchemaPropsOrBool) ProtoMessage() {} + +func (*JSONSchemaPropsOrStringArray) ProtoMessage() {} + +func (*SelectableField) ProtoMessage() {} + +func (*ServiceReference) ProtoMessage() {} + +func (*ValidationRule) ProtoMessage() {} + +func (*WebhookClientConfig) ProtoMessage() {} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..b346b010978d8 --- /dev/null +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.model_name.go @@ -0,0 +1,152 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ConversionRequest) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ConversionRequest" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ConversionResponse) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ConversionResponse" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ConversionReview) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ConversionReview" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceColumnDefinition) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceColumnDefinition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceConversion) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceConversion" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceDefinition) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceDefinitionCondition) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceDefinitionList) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceDefinitionNames) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceDefinitionSpec) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceDefinitionStatus) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceDefinitionVersion) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionVersion" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceSubresourceScale) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceScale" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceSubresourceStatus) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceSubresources) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresources" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CustomResourceValidation) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceValidation" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ExternalDocumentation) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ExternalDocumentation" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JSON) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JSONSchemaProps) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JSONSchemaPropsOrArray) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JSONSchemaPropsOrBool) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in JSONSchemaPropsOrStringArray) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrStringArray" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SelectableField) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.SelectableField" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServiceReference) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ServiceReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ValidationRule) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ValidationRule" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in WebhookClientConfig) OpenAPIModelName() string { + return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.WebhookClientConfig" +} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go index 18cd5a8c2464b..bc6458f65f539 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go @@ -145,6 +145,10 @@ type validationOptions struct { // allowInvalidCABundle allows an invalid conversion webhook CABundle on update only if the existing CABundle is invalid. // An invalid CABundle is also permitted on create and before a CRD is in an Established=True condition. allowInvalidCABundle bool + + // allowTooManySelectableFields allows more than the MaxSelectableFields on update only if the existing + // selectable field count is more than the max selectable fields and the selectable fields are unchanged. + allowTooManySelectableFields map[string]bool } type preexistingExpressions struct { @@ -238,8 +242,9 @@ func ValidateCustomResourceDefinitionUpdate(ctx context.Context, obj, oldObj *ap preexistingExpressions: findPreexistingExpressions(&oldObj.Spec), versionsWithUnchangedSchemas: findVersionsWithUnchangedSchemas(obj, oldObj), // strictCost is always true to enforce cost limits. - celEnvironmentSet: environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), true), - allowInvalidCABundle: allowInvalidCABundle(oldObj), + celEnvironmentSet: environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), true), + allowInvalidCABundle: allowInvalidCABundle(oldObj), + allowTooManySelectableFields: findTooManySelectableFieldsAllowed(obj, oldObj), } return validateCustomResourceDefinitionUpdate(ctx, obj, oldObj, opts) } @@ -310,7 +315,7 @@ func validateCustomResourceDefinitionVersion(ctx context.Context, version *apiex if err != nil { allErrs = append(allErrs, field.Invalid(fldPath.Child("schema.openAPIV3Schema"), "", err.Error())) } - allErrs = append(allErrs, ValidateCustomResourceSelectableFields(version.SelectableFields, schema, fldPath.Child("selectableFields"))...) + allErrs = append(allErrs, ValidateCustomResourceSelectableFields(version.SelectableFields, schema, fldPath.Child("selectableFields"), opts, version.Name)...) } } return allErrs @@ -484,7 +489,7 @@ func validateCustomResourceDefinitionSpec(ctx context.Context, spec *apiextensio allErrs = append(allErrs, field.Invalid(fldPath.Child("schema.openAPIV3Schema"), "", err.Error())) } - allErrs = append(allErrs, ValidateCustomResourceSelectableFields(spec.SelectableFields, schema, fldPath.Child("selectableFields"))...) + allErrs = append(allErrs, ValidateCustomResourceSelectableFields(spec.SelectableFields, schema, fldPath.Child("selectableFields"), opts, "")...) } } @@ -565,6 +570,34 @@ func allowInvalidCABundle(oldCRD *apiextensions.CustomResourceDefinition) bool { return len(webhook.ValidateCABundle(field.NewPath("caBundle"), oldConversion.WebhookClientConfig.CABundle)) > 0 } +// findTooManySelectableFieldsAllowed returns a struct indicating which selectable field sets are allowed to be invalid. +// A set of selectable fields is allowed to be invalid if the existing custom resource definition has more +// selectable fields than MaxSelectableFields and the selectable fields are unchanged. +func findTooManySelectableFieldsAllowed(obj *apiextensions.CustomResourceDefinition, oldCRD *apiextensions.CustomResourceDefinition) map[string]bool { + result := map[string]bool{} + + if len(oldCRD.Spec.SelectableFields) > MaxSelectableFields && apiequality.Semantic.DeepEqual(obj.Spec.SelectableFields, oldCRD.Spec.SelectableFields) { + result[""] = true + } + + oldVersions := make(map[string]*apiextensions.CustomResourceDefinitionVersion, len(oldCRD.Spec.Versions)) + for _, v := range oldCRD.Spec.Versions { + oldVersions[v.Name] = &v // +k8s:verify-mutation:reason=clone + } + + for _, v := range obj.Spec.Versions { + oldV, ok := oldVersions[v.Name] + if !ok { + continue + } + if len(oldV.SelectableFields) > MaxSelectableFields && apiequality.Semantic.DeepEqual(v.SelectableFields, oldV.SelectableFields) { + result[v.Name] = true + } + } + + return result +} + // hasValidConversionReviewVersion return true if there is a valid version or if the list is empty. func hasValidConversionReviewVersionOrEmpty(versions []string) bool { if len(versions) < 1 { @@ -813,7 +846,7 @@ func ValidateCustomResourceColumnDefinition(col *apiextensions.CustomResourceCol return allErrs } -func ValidateCustomResourceSelectableFields(selectableFields []apiextensions.SelectableField, schema *structuralschema.Structural, fldPath *field.Path) (allErrs field.ErrorList) { +func ValidateCustomResourceSelectableFields(selectableFields []apiextensions.SelectableField, schema *structuralschema.Structural, fldPath *field.Path, opts validationOptions, version string) (allErrs field.ErrorList) { uniqueSelectableFields := sets.New[string]() for i, selectableField := range selectableFields { indexFldPath := fldPath.Index(i) @@ -840,7 +873,7 @@ func ValidateCustomResourceSelectableFields(selectableFields []apiextensions.Sel } } uniqueSelectableFieldCount := uniqueSelectableFields.Len() - if uniqueSelectableFieldCount > MaxSelectableFields { + if uniqueSelectableFieldCount > MaxSelectableFields && !opts.allowTooManySelectableFields[version] { allErrs = append(allErrs, field.TooMany(fldPath, uniqueSelectableFieldCount, MaxSelectableFields)) } return allErrs diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation_test.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation_test.go index 97b00926ae427..7f795d7522923 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation_test.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation_test.go @@ -121,9 +121,10 @@ func TestValidateCustomResourceDefinition(t *testing.T) { }, } tests := []struct { - name string - resource *apiextensions.CustomResourceDefinition - errors []validationMatch + name string + resource *apiextensions.CustomResourceDefinition + oldResource *apiextensions.CustomResourceDefinition + errors []validationMatch }{ { name: "invalid types disallowed", @@ -5069,6 +5070,14 @@ func TestValidateFieldPath(t *testing.T) { } func TestValidateCustomResourceDefinitionUpdate(t *testing.T) { + singleVersionList := []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version", + Served: true, + Storage: true, + }, + } + tests := []struct { name string old *apiextensions.CustomResourceDefinition @@ -7773,6 +7782,350 @@ func TestValidateCustomResourceDefinitionUpdate(t *testing.T) { forbidden("spec", "versions[1]", "schema", "openAPIV3Schema", "properties[f]", "x-kubernetes-validations[0]", "messageExpression"), }, }, + { + name: "ratcheting: too many selectableFields are not allowed if existing CRD has different selectableFields", + old: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "plural.group.com"}, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Version: "version", + Versions: []apiextensions.CustomResourceDefinitionVersion{ + {Name: "version", Served: true, Storage: true, + Schema: &apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Type: "object", + Properties: map[string]apiextensions.JSONSchemaProps{ + "a1": {Type: "string"}, "a2": {Type: "string"}, "a3": {Type: "string"}, + "a4": {Type: "string"}, "a5": {Type: "string"}, "a6": {Type: "string"}, + "a7": {Type: "string"}, "a8": {Type: "string"}, "different": {Type: "string"}, + }, + Required: []string{"a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "different"}, + }, + }, + SelectableFields: []apiextensions.SelectableField{ + {JSONPath: ".a1"}, {JSONPath: ".a2"}, {JSONPath: ".a3"}, + {JSONPath: ".a4"}, {JSONPath: ".a5"}, {JSONPath: ".a6"}, + {JSONPath: ".a7"}, {JSONPath: ".a8"}, {JSONPath: ".different"}, + }, + }, + {Name: "version2", Served: true, Storage: false, + Schema: &apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Type: "object", + Properties: map[string]apiextensions.JSONSchemaProps{"foo": {Type: "integer"}}, + }, + }, + }, + }, + Scope: apiextensions.NamespaceScoped, + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "Plural", + ListKind: "PluralList", + }, + PreserveUnknownFields: ptr.To(false), + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + StoredVersions: []string{"version"}, + }, + }, + resource: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "plural.group.com", ResourceVersion: "1"}, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Version: "version", + Versions: []apiextensions.CustomResourceDefinitionVersion{ + {Name: "version", Served: true, Storage: true, + Schema: &apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Type: "object", + Properties: map[string]apiextensions.JSONSchemaProps{ + "a1": {Type: "string"}, "a2": {Type: "string"}, "a3": {Type: "string"}, + "a4": {Type: "string"}, "a5": {Type: "string"}, "a6": {Type: "string"}, + "a7": {Type: "string"}, "a8": {Type: "string"}, "a9": {Type: "string"}, + }, + Required: []string{"a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9"}, + }, + }, + SelectableFields: []apiextensions.SelectableField{ + {JSONPath: ".a1"}, {JSONPath: ".a2"}, {JSONPath: ".a3"}, + {JSONPath: ".a4"}, {JSONPath: ".a5"}, {JSONPath: ".a6"}, + {JSONPath: ".a7"}, {JSONPath: ".a8"}, {JSONPath: ".a9"}, + }, + }, + {Name: "version2", Served: true, Storage: false, + Schema: &apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Type: "object", + Properties: map[string]apiextensions.JSONSchemaProps{"foo": {Type: "integer"}}, + }, + }, + }, + }, + Scope: apiextensions.NamespaceScoped, + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "Plural", + ListKind: "PluralList", + }, + PreserveUnknownFields: ptr.To(false), + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + StoredVersions: []string{"version"}, + }, + }, + errors: []validationMatch{ + tooMany("spec", "versions[0]", "selectableFields"), + }, + }, + { + name: "ratcheting: too many selectableFields are allowed if existing CRD has same selectableFields", + old: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "plural.group.com"}, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Version: "version", + Versions: []apiextensions.CustomResourceDefinitionVersion{ + {Name: "version", Served: true, Storage: true, + Schema: &apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Type: "object", + Properties: map[string]apiextensions.JSONSchemaProps{ + "a1": {Type: "string"}, "a2": {Type: "string"}, "a3": {Type: "string"}, + "a4": {Type: "string"}, "a5": {Type: "string"}, "a6": {Type: "string"}, + "a7": {Type: "string"}, "a8": {Type: "string"}, "a9": {Type: "string"}, + }, + Required: []string{"a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9"}, + }, + }, + SelectableFields: []apiextensions.SelectableField{ + {JSONPath: ".a1"}, {JSONPath: ".a2"}, {JSONPath: ".a3"}, + {JSONPath: ".a4"}, {JSONPath: ".a5"}, {JSONPath: ".a6"}, + {JSONPath: ".a7"}, {JSONPath: ".a8"}, {JSONPath: ".a9"}, + }, + }, + {Name: "version2", Served: true, Storage: false, + Schema: &apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Type: "object", + Properties: map[string]apiextensions.JSONSchemaProps{"foo": {Type: "integer"}}, + }, + }, + }, + }, + Scope: apiextensions.NamespaceScoped, + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "Plural", + ListKind: "PluralList", + }, + PreserveUnknownFields: ptr.To(false), + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + StoredVersions: []string{"version"}, + }, + }, + resource: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "plural.group.com", ResourceVersion: "1"}, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Version: "version", + Versions: []apiextensions.CustomResourceDefinitionVersion{ + {Name: "version", Served: true, Storage: true, + Schema: &apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Type: "object", + Properties: map[string]apiextensions.JSONSchemaProps{ + "a1": {Type: "string"}, "a2": {Type: "string"}, "a3": {Type: "string"}, + "a4": {Type: "string"}, "a5": {Type: "string"}, "a6": {Type: "string"}, + "a7": {Type: "string"}, "a8": {Type: "string"}, "a9": {Type: "string"}, + }, + Required: []string{"a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9"}, + }, + }, + SelectableFields: []apiextensions.SelectableField{ + {JSONPath: ".a1"}, {JSONPath: ".a2"}, {JSONPath: ".a3"}, + {JSONPath: ".a4"}, {JSONPath: ".a5"}, {JSONPath: ".a6"}, + {JSONPath: ".a7"}, {JSONPath: ".a8"}, {JSONPath: ".a9"}, + }, + }, + {Name: "version2", Served: true, Storage: false, + Schema: &apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Type: "object", + Properties: map[string]apiextensions.JSONSchemaProps{"foo": {Type: "integer"}}, + }, + }, + }, + }, + Scope: apiextensions.NamespaceScoped, + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "Plural", + ListKind: "PluralList", + }, + PreserveUnknownFields: ptr.To(false), + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + StoredVersions: []string{"version"}, + }, + }, + errors: []validationMatch{}, + }, + { + name: "ratcheting: top level schema: too many selectableFields are not allowed if existing CRD has different selectableFields", + old: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "plural.group.com"}, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Version: "version", + Versions: singleVersionList, + Validation: &apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Type: "object", + Properties: map[string]apiextensions.JSONSchemaProps{ + "a1": {Type: "string"}, "a2": {Type: "string"}, "a3": {Type: "string"}, + "a4": {Type: "string"}, "a5": {Type: "string"}, "a6": {Type: "string"}, + "a7": {Type: "string"}, "a8": {Type: "string"}, "different": {Type: "string"}, + }, + Required: []string{"a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "different"}, + }, + }, + SelectableFields: []apiextensions.SelectableField{ + {JSONPath: ".a1"}, {JSONPath: ".a2"}, {JSONPath: ".a3"}, + {JSONPath: ".a4"}, {JSONPath: ".a5"}, {JSONPath: ".a6"}, + {JSONPath: ".a7"}, {JSONPath: ".a8"}, {JSONPath: ".different"}, + }, + Scope: apiextensions.NamespaceScoped, + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "Plural", + ListKind: "PluralList", + }, + PreserveUnknownFields: ptr.To(false), + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + StoredVersions: []string{"version"}, + }, + }, + resource: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "plural.group.com", ResourceVersion: "1"}, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Version: "version", + Versions: singleVersionList, + Validation: &apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Type: "object", + Properties: map[string]apiextensions.JSONSchemaProps{ + "a1": {Type: "string"}, "a2": {Type: "string"}, "a3": {Type: "string"}, + "a4": {Type: "string"}, "a5": {Type: "string"}, "a6": {Type: "string"}, + "a7": {Type: "string"}, "a8": {Type: "string"}, "a9": {Type: "string"}, + }, + Required: []string{"a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9"}, + }, + }, + SelectableFields: []apiextensions.SelectableField{ + {JSONPath: ".a1"}, {JSONPath: ".a2"}, {JSONPath: ".a3"}, + {JSONPath: ".a4"}, {JSONPath: ".a5"}, {JSONPath: ".a6"}, + {JSONPath: ".a7"}, {JSONPath: ".a8"}, {JSONPath: ".a9"}, + }, + Scope: apiextensions.NamespaceScoped, + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "Plural", + ListKind: "PluralList", + }, + PreserveUnknownFields: ptr.To(false), + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + StoredVersions: []string{"version"}, + }, + }, + errors: []validationMatch{ + tooMany("spec", "selectableFields"), + }, + }, + { + name: "ratcheting: top level schema: too many selectableFields are allowed if existing CRD has same selectableFields", + old: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "plural.group.com"}, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Version: "version", + Versions: singleVersionList, + Validation: &apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Type: "object", + Properties: map[string]apiextensions.JSONSchemaProps{ + "a1": {Type: "string"}, "a2": {Type: "string"}, "a3": {Type: "string"}, + "a4": {Type: "string"}, "a5": {Type: "string"}, "a6": {Type: "string"}, + "a7": {Type: "string"}, "a8": {Type: "string"}, "a9": {Type: "string"}, + }, + Required: []string{"a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9"}, + }, + }, + SelectableFields: []apiextensions.SelectableField{ + {JSONPath: ".a1"}, {JSONPath: ".a2"}, {JSONPath: ".a3"}, + {JSONPath: ".a4"}, {JSONPath: ".a5"}, {JSONPath: ".a6"}, + {JSONPath: ".a7"}, {JSONPath: ".a8"}, {JSONPath: ".a9"}, + }, + Scope: apiextensions.NamespaceScoped, + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "Plural", + ListKind: "PluralList", + }, + PreserveUnknownFields: ptr.To(false), + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + StoredVersions: []string{"version"}, + }, + }, + resource: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "plural.group.com", ResourceVersion: "1"}, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Version: "version", + Versions: singleVersionList, + Validation: &apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Type: "object", + Properties: map[string]apiextensions.JSONSchemaProps{ + "a1": {Type: "string"}, "a2": {Type: "string"}, "a3": {Type: "string"}, + "a4": {Type: "string"}, "a5": {Type: "string"}, "a6": {Type: "string"}, + "a7": {Type: "string"}, "a8": {Type: "string"}, "a9": {Type: "string"}, + }, + Required: []string{"a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9"}, + }, + }, + SelectableFields: []apiextensions.SelectableField{ + {JSONPath: ".a1"}, {JSONPath: ".a2"}, {JSONPath: ".a3"}, + {JSONPath: ".a4"}, {JSONPath: ".a5"}, {JSONPath: ".a6"}, + {JSONPath: ".a7"}, {JSONPath: ".a8"}, {JSONPath: ".a9"}, + }, + Scope: apiextensions.NamespaceScoped, + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "Plural", + ListKind: "PluralList", + }, + PreserveUnknownFields: ptr.To(false), + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + StoredVersions: []string{"version"}, + }, + }, + errors: []validationMatch{}, + }, } for _, tc := range tests { diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/openapi_models_test.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/openapi_models_test.go new file mode 100644 index 0000000000000..d30671b1195bc --- /dev/null +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/openapi_models_test.go @@ -0,0 +1,60 @@ +/* +Copyright 2025 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 api + +import ( + "reflect" + "testing" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/kube-openapi/pkg/util" +) + +func TestOpenAPIDefinitionNames(t *testing.T) { + scheme := runtime.NewScheme() + for _, builder := range groups { + if err := builder.AddToScheme(scheme); err != nil { + t.Fatalf("unexpected error adding to scheme: %v", err) + } + } + + kinds := scheme.AllKnownTypes() + for gvk := range kinds { + if gvk.Version == runtime.APIVersionInternal { + continue + } + t.Run(gvk.String(), func(t *testing.T) { + example, err := scheme.New(gvk) + if err != nil { + t.Fatalf("unexpected error creating example: %v", err) + } + + namer, ok := example.(util.OpenAPIModelNamer) + if !ok { + t.Fatalf("type %v does not implement OpenAPICanonicalTypeName\n", gvk) + } + lookupName := namer.OpenAPIModelName() + + rtype := reflect.TypeOf(example).Elem() + reflectName := util.ToRESTFriendlyName(rtype.PkgPath() + "." + rtype.Name()) + + if lookupName != reflectName { + t.Errorf("expected %v, got %v", reflectName, lookupName) + } + }) + } +} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go index 1a730d3310cdd..e27495de54e2a 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go @@ -242,10 +242,10 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) } } - go namingController.Run(hookContext.Done()) - go establishingController.Run(hookContext.Done()) - go nonStructuralSchemaController.Run(5, hookContext.Done()) - go apiApprovalController.Run(5, hookContext.Done()) + go namingController.RunWithContext(hookContext) + go establishingController.RunWithContext(hookContext) + go nonStructuralSchemaController.RunWithContext(5, hookContext) + go apiApprovalController.RunWithContext(5, hookContext) go finalizingController.Run(5, hookContext.Done()) discoverySyncedCh := make(chan struct{}) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go index d003bfa34f875..77f717528e388 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go @@ -724,7 +724,58 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd replicasPathInCustomResource[schema.GroupVersion{Group: crd.Spec.Group, Version: v.Name}.String()] = path } + // ensure accepted names are valid + if len(crd.Status.AcceptedNames.Plural) == 0 { + utilruntime.HandleError(fmt.Errorf("CustomResourceDefinition %s has unexpected empty status.acceptedNames.plural", crd.Name)) + return nil, fmt.Errorf("the server could not properly serve the resource") + } + if len(crd.Status.AcceptedNames.Singular) == 0 { + utilruntime.HandleError(fmt.Errorf("CustomResourceDefinition %s has unexpected empty status.acceptedNames.singular", crd.Name)) + return nil, fmt.Errorf("the server could not properly serve the resource") + } + if len(crd.Status.AcceptedNames.Kind) == 0 { + utilruntime.HandleError(fmt.Errorf("CustomResourceDefinition %s has unexpected empty status.acceptedNames.kind", crd.Name)) + return nil, fmt.Errorf("the server could not properly serve the kind") + } + if len(crd.Status.AcceptedNames.ListKind) == 0 { + utilruntime.HandleError(fmt.Errorf("CustomResourceDefinition %s has unexpected empty status.acceptedNames.listKind", crd.Name)) + return nil, fmt.Errorf("the server could not properly serve the list kind") + } + + var ( + versionToResource = map[string]schema.GroupVersionResource{} + versionToSingularResource = map[string]schema.GroupVersionResource{} + versionToKind = map[string]schema.GroupVersionKind{} + versionToSubresources = map[string]*apiextensionsv1.CustomResourceSubresources{} + ) + for _, v := range crd.Spec.Versions { + versionToResource[v.Name] = schema.GroupVersionResource{Group: crd.Spec.Group, Version: v.Name, Resource: crd.Status.AcceptedNames.Plural} + versionToSingularResource[v.Name] = schema.GroupVersionResource{Group: crd.Spec.Group, Version: v.Name, Resource: crd.Status.AcceptedNames.Singular} + versionToKind[v.Name] = schema.GroupVersionKind{Group: crd.Spec.Group, Version: v.Name, Kind: crd.Status.AcceptedNames.Kind} + versionToSubresources[v.Name], err = apiextensionshelpers.GetSubresourcesForVersion(crd, v.Name) + if err != nil { + utilruntime.HandleError(err) + return nil, fmt.Errorf("the server could not properly serve the CR subresources") + } + + // Register equivalent kinds + equivalentResourceRegistry.RegisterKindFor(versionToResource[v.Name], "", versionToKind[v.Name]) + if versionToSubresources[v.Name] != nil { + if versionToSubresources[v.Name].Status != nil { + equivalentResourceRegistry.RegisterKindFor(versionToResource[v.Name], "status", versionToKind[v.Name]) + } + if versionToSubresources[v.Name].Scale != nil { + equivalentResourceRegistry.RegisterKindFor(versionToResource[v.Name], "scale", autoscalingv1.SchemeGroupVersion.WithKind("Scale")) + } + } + } + for _, v := range crd.Spec.Versions { + // Do not construct storage if version is neither served nor stored + if !v.Storage && !v.Served { + continue + } + // In addition to Unstructured objects (Custom Resources), we also may sometimes need to // decode unversioned Options objects, so we delegate to parameterScheme for such types. parameterScheme := runtime.NewScheme() @@ -735,22 +786,9 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd ) parameterCodec := runtime.NewParameterCodec(parameterScheme) - resource := schema.GroupVersionResource{Group: crd.Spec.Group, Version: v.Name, Resource: crd.Status.AcceptedNames.Plural} - if len(resource.Resource) == 0 { - utilruntime.HandleError(fmt.Errorf("CustomResourceDefinition %s has unexpected empty status.acceptedNames.plural", crd.Name)) - return nil, fmt.Errorf("the server could not properly serve the resource") - } - singularResource := schema.GroupVersionResource{Group: crd.Spec.Group, Version: v.Name, Resource: crd.Status.AcceptedNames.Singular} - if len(singularResource.Resource) == 0 { - utilruntime.HandleError(fmt.Errorf("CustomResourceDefinition %s has unexpected empty status.acceptedNames.singular", crd.Name)) - return nil, fmt.Errorf("the server could not properly serve the resource") - } - kind := schema.GroupVersionKind{Group: crd.Spec.Group, Version: v.Name, Kind: crd.Status.AcceptedNames.Kind} - if len(kind.Kind) == 0 { - utilruntime.HandleError(fmt.Errorf("CustomResourceDefinition %s has unexpected empty status.acceptedNames.kind", crd.Name)) - return nil, fmt.Errorf("the server could not properly serve the kind") - } - equivalentResourceRegistry.RegisterKindFor(resource, "", kind) + singularResource := versionToSingularResource[v.Name] + resource := versionToResource[v.Name] + kind := versionToKind[v.Name] typer := newUnstructuredObjectTyper(parameterScheme) creator := unstructuredCreator{} @@ -776,13 +814,9 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd var statusSpec *apiextensionsinternal.CustomResourceSubresourceStatus var statusValidator apiservervalidation.SchemaValidator - subresources, err := apiextensionshelpers.GetSubresourcesForVersion(crd, v.Name) - if err != nil { - utilruntime.HandleError(err) - return nil, fmt.Errorf("the server could not properly serve the CR subresources") - } + subresources := versionToSubresources[v.Name] + if subresources != nil && subresources.Status != nil { - equivalentResourceRegistry.RegisterKindFor(resource, "status", kind) statusSpec = &apiextensionsinternal.CustomResourceSubresourceStatus{} if err := apiextensionsv1.Convert_v1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus(subresources.Status, statusSpec, nil); err != nil { return nil, fmt.Errorf("failed converting CRD status subresource to internal version: %v", err) @@ -800,7 +834,6 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd var scaleSpec *apiextensionsinternal.CustomResourceSubresourceScale if subresources != nil && subresources.Scale != nil { - equivalentResourceRegistry.RegisterKindFor(resource, "scale", autoscalingv1.SchemeGroupVersion.WithKind("Scale")) scaleSpec = &apiextensionsinternal.CustomResourceSubresourceScale{} if err := apiextensionsv1.Convert_v1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale(subresources.Scale, scaleSpec, nil); err != nil { return nil, fmt.Errorf("failed converting CRD status subresource to internal version: %v", err) @@ -818,10 +851,6 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd } listKind := schema.GroupVersionKind{Group: crd.Spec.Group, Version: v.Name, Kind: crd.Status.AcceptedNames.ListKind} - if len(listKind.Kind) == 0 { - utilruntime.HandleError(fmt.Errorf("CustomResourceDefinition %s has unexpected empty status.acceptedNames.listKind", crd.Name)) - return nil, fmt.Errorf("the server could not properly serve the list kind") - } storages[v.Name], err = customresource.NewStorage( resource.GroupResource(), diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation.go index 575fd5e2e9a57..e418e613cf968 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation.go @@ -451,42 +451,54 @@ func (s *Validator) validateExpressions(ctx context.Context, fldPath *field.Path } continue } - if evalResult != types.True { - currentFldPath := fldPath - if len(compiled.NormalizedRuleFieldPath) > 0 { - currentFldPath = currentFldPath.Child(compiled.NormalizedRuleFieldPath) - } - addErr := func(e *field.Error) { - if !compiled.UsesOldSelf && correlation.shouldRatchetError() { - warning.AddWarning(ctx, "", e.Error()) - } else { - errs = append(errs, e) - } + if evalResult == types.True { + continue + } + + // Prepare a field error describing why the expression evaluated to False. + // Its detail may come from another expression that might fail to evaluate or exceed the budget. + + currentFldPath := fldPath + if len(compiled.NormalizedRuleFieldPath) > 0 { + currentFldPath = currentFldPath.Child(compiled.NormalizedRuleFieldPath) + } + + addErr := func(e *field.Error) { + if !compiled.UsesOldSelf && correlation.shouldRatchetError() { + warning.AddWarning(ctx, "", e.Error()) + } else { + errs = append(errs, e) } + } - if compiled.MessageExpression != nil { - messageExpression, newRemainingBudget, msgErr := evalMessageExpression(ctx, compiled.MessageExpression, rule.MessageExpression, activation, remainingBudget) - if msgErr != nil { - if msgErr.Type == cel.ErrorTypeInternal { - addErr(field.InternalError(currentFldPath, msgErr)) - return errs, -1 - } else if msgErr.Type == cel.ErrorTypeInvalid { - addErr(field.Invalid(currentFldPath, sts.Type, msgErr.Error())) - return errs, -1 - } else { - klog.V(2).ErrorS(msgErr, "messageExpression evaluation failed") - addErr(fieldErrorForReason(currentFldPath, sts.Type, ruleMessageOrDefault(rule), rule.Reason)) - remainingBudget = newRemainingBudget - } - } else { - addErr(fieldErrorForReason(currentFldPath, sts.Type, messageExpression, rule.Reason)) - remainingBudget = newRemainingBudget - } + detail, ok := "", false + if compiled.MessageExpression != nil { + messageExpression, newRemainingBudget, msgErr := evalMessageExpression(ctx, compiled.MessageExpression, rule.MessageExpression, activation, remainingBudget) + if msgErr == nil { + detail, ok = messageExpression, true + remainingBudget = newRemainingBudget + } else if msgErr.Type == cel.ErrorTypeInternal { + addErr(field.InternalError(currentFldPath, msgErr)) + return errs, -1 + } else if msgErr.Type == cel.ErrorTypeInvalid { + addErr(field.Invalid(currentFldPath, sts.Type, msgErr.Error())) + return errs, -1 } else { - addErr(fieldErrorForReason(currentFldPath, sts.Type, ruleMessageOrDefault(rule), rule.Reason)) + klog.V(2).ErrorS(msgErr, "messageExpression evaluation failed") + remainingBudget = newRemainingBudget } } + if !ok { + detail = ruleMessageOrDefault(rule) + } + + value := obj + if sts.Type == "object" || sts.Type == "array" { + value = field.OmitValueType{} + } + + addErr(fieldErrorForReason(currentFldPath, value, detail, rule.Reason)) } return errs, remainingBudget } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go index ea82e9a4fb086..006db6f149ef9 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go @@ -2363,7 +2363,7 @@ func TestValidationExpressionsAtSchemaLevels(t *testing.T) { schema: objectTypePtr(map[string]schema.Structural{ "f/2": withRule(objectType(map[string]schema.Structural{"m": integerType}), "self.m == 2"), }), - errors: []string{"Invalid value: \"object\": failed rule: self.m == 2"}, + errors: []string{"Invalid value: failed rule: self.m == 2"}, }, // unescapable field names that are not accessed by the CEL rule are allowed and should not impact CEL rule validation {name: "invalid rule under unescapable field name", @@ -2397,7 +2397,7 @@ func TestValidationExpressionsAtSchemaLevels(t *testing.T) { schema: objectTypePtr(map[string]schema.Structural{ "a@b": withRule(objectType(map[string]schema.Structural{"m": integerType}), "self.m == 2"), }), - errors: []string{"Invalid value: \"object\": failed rule: self.m == 2"}, + errors: []string{"Invalid value: failed rule: self.m == 2"}, }, {name: "matchExpressions - 'values' must be specified when 'operator' is 'In' or 'NotIn'", obj: map[string]interface{}{ @@ -2696,8 +2696,8 @@ func TestValidationExpressionsAtSchemaLevels(t *testing.T) { }, }, errors: []string{ - `root.myProperty[key]: Invalid value: "string": must be value2 or not value`, - `root.myProperty[key2]: Invalid value: "string": len must be 5`, + `root.myProperty[key]: Invalid value: "value": must be value2 or not value`, + `root.myProperty[key2]: Invalid value: "value2": len must be 5`, }, schema: &schema.Structural{ Generic: schema.Generic{ @@ -2742,8 +2742,8 @@ func TestValidationExpressionsAtSchemaLevels(t *testing.T) { "key2": "value2", }, errors: []string{ - `root.key: Invalid value: "string": must be value2 or not value`, - `root.key2: Invalid value: "string": len must be 5`, + `root.key: Invalid value: "value": must be value2 or not value`, + `root.key2: Invalid value: "value2": len must be 5`, }, schema: &schema.Structural{ Generic: schema.Generic{ @@ -3924,7 +3924,7 @@ func TestRatcheting(t *testing.T) { type: string x-kubernetes-validations: - rule: self == "bar" - message: "gotta be baz" + message: "gotta be bar" `), oldObj: mustUnstructured(` foo: baz @@ -3933,7 +3933,7 @@ func TestRatcheting(t *testing.T) { foo: baz `), warnings: []string{ - `root.foo: Invalid value: "string": gotta be baz`, + `root.foo: Invalid value: "baz": gotta be bar`, }, }, { @@ -3960,7 +3960,7 @@ func TestRatcheting(t *testing.T) { - bar: bar `), warnings: []string{ - `root[0].bar: Invalid value: "string": gotta be baz`, + `root[0].bar: Invalid value: "bar": gotta be baz`, }, }, { @@ -3986,7 +3986,7 @@ func TestRatcheting(t *testing.T) { - 2 `), warnings: []string{ - `root[1]: Invalid value: "number": gotta be odd`, + `root[1]: Invalid value: 2: gotta be odd`, }, }, { @@ -4020,7 +4020,7 @@ func TestRatcheting(t *testing.T) { - 2 `), warnings: []string{ - `root.setArray[2]: Invalid value: "number": gotta be odd`, + `root.setArray[2]: Invalid value: 2: gotta be odd`, }, }, { @@ -4055,8 +4055,8 @@ func TestRatcheting(t *testing.T) { value: baz `), warnings: []string{ - `root[0].value: Invalid value: "string": gotta be baz`, - `root[1].value: Invalid value: "string": gotta be baz`, + `root[0].value: Invalid value: "notbaz": gotta be baz`, + `root[1].value: Invalid value: "notbaz": gotta be baz`, }, }, { @@ -4089,7 +4089,7 @@ func TestRatcheting(t *testing.T) { value: notbaz `), warnings: []string{ - `root[1].value: Invalid value: "string": gotta be baz`, + `root[1].value: Invalid value: "notbaz": gotta be baz`, }, }, { @@ -4131,8 +4131,8 @@ func TestRatcheting(t *testing.T) { bar: notbaz `), warnings: []string{ - `root.mapField.foo: Invalid value: "string": gotta be baz`, - `root.mapField.mapField.bar: Invalid value: "string": gotta be nested baz`, + `root.mapField.foo: Invalid value: "notbaz": gotta be baz`, + `root.mapField.mapField.bar: Invalid value: "notbaz": gotta be nested baz`, }, }, { @@ -4182,11 +4182,11 @@ func TestRatcheting(t *testing.T) { `), errors: []string{ // Didn't get ratcheted because we changed its value from baz to notbaz - `root.mapField.foo: Invalid value: "string": gotta be baz`, + `root.mapField.foo: Invalid value: "notbaz": gotta be baz`, }, warnings: []string{ // Ratcheted because its value remained the same, even though it is invalid - `root.mapField.mapField.bar: Invalid value: "string": gotta be baz`, + `root.mapField.mapField.bar: Invalid value: "notbaz": gotta be baz`, }, }, { @@ -4219,7 +4219,7 @@ func TestRatcheting(t *testing.T) { - bar: bar `), warnings: []string{ - `root.atomicArray[0].bar: Invalid value: "string": gotta be baz`, + `root.atomicArray[0].bar: Invalid value: "bar": gotta be baz`, }, }, { @@ -4247,7 +4247,7 @@ func TestRatcheting(t *testing.T) { - bar: baz `), errors: []string{ - `root[0].bar: Invalid value: "string": gotta be baz`, + `root[0].bar: Invalid value: "bar": gotta be baz`, }, }, { @@ -4268,7 +4268,7 @@ func TestRatcheting(t *testing.T) { foo: bar `), errors: []string{ - `root.foo: Invalid value: "string": gotta be baz`, + `root.foo: Invalid value: "bar": gotta be baz`, }, }, { @@ -4295,7 +4295,7 @@ func TestRatcheting(t *testing.T) { bar: invalid `), errors: []string{ - `root.foo: Invalid value: "object": gotta be baz`, + `root.foo: Invalid value: gotta be baz`, }, }, { @@ -4351,8 +4351,8 @@ func TestRatcheting(t *testing.T) { kind: Baz `), errors: []string{ - `root.apiVersion: Invalid value: "string": failed rule: self == "v1"`, - `root.kind: Invalid value: "string": failed rule: self == "Pod"`, + `root.apiVersion: Invalid value: "v2": failed rule: self == "v1"`, + `root.kind: Invalid value: "Baz": failed rule: self == "Pod"`, }, }, { @@ -4420,12 +4420,12 @@ func TestRatcheting(t *testing.T) { otherField: newValue3 `), warnings: []string{ - `root.subField.apiVersion: Invalid value: "string": failed rule: self == "v1"`, - `root.subField.kind: Invalid value: "string": failed rule: self == "Pod"`, - `root.list[0].apiVersion: Invalid value: "string": failed rule: self == "v1"`, - `root.list[0].kind: Invalid value: "string": failed rule: self == "Pod"`, - `root.list[1].apiVersion: Invalid value: "string": failed rule: self == "v1"`, - `root.list[1].kind: Invalid value: "string": failed rule: self == "Pod"`, + `root.subField.apiVersion: Invalid value: "v2": failed rule: self == "v1"`, + `root.subField.kind: Invalid value: "Baz": failed rule: self == "Pod"`, + `root.list[0].apiVersion: Invalid value: "v2": failed rule: self == "v1"`, + `root.list[0].kind: Invalid value: "Baz": failed rule: self == "Pod"`, + `root.list[1].apiVersion: Invalid value: "v3": failed rule: self == "v1"`, + `root.list[1].kind: Invalid value: "Bar": failed rule: self == "Pod"`, }, }, } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/formats.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/formats.go index c11f1c627a741..5c0397909b656 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/formats.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/formats.go @@ -113,9 +113,11 @@ func GetUnrecognizedFormats(schema *spec.Schema, compatibilityVersion *version.V return unrecognizedFormats } - normalized := strings.ReplaceAll(schema.Format, "-", "") // go-openapi default format name normalization - if !supportedFormatsAtVersion(compatibilityVersion).supported.Has(normalized) { - unrecognizedFormats = append(unrecognizedFormats, schema.Format) + if len(schema.Type) == 1 && schema.Type[0] == "string" { + normalized := strings.ReplaceAll(schema.Format, "-", "") // go-openapi default format name normalization + if !supportedFormatsAtVersion(compatibilityVersion).supported.Has(normalized) { + unrecognizedFormats = append(unrecognizedFormats, schema.Format) + } } return unrecognizedFormats diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/formats_test.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/formats_test.go index 7558444b21853..b4a0e08d7412f 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/formats_test.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/formats_test.go @@ -148,58 +148,76 @@ func TestGetUnrecognizedFormats(t *testing.T) { }{ { name: "empty format", - schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: ""}}, + schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "", Type: []string{"string"}}}, compatibilityVersion: version.MajorMinor(1, 0), expectedFormats: []string{}, }, { name: "recognized format at version 1.0", - schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "email"}}, + schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "email", Type: []string{"string"}}}, compatibilityVersion: version.MajorMinor(1, 0), expectedFormats: []string{}, }, { name: "unrecognized format at version 1.0", - schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "unknown-format"}}, + schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "unknown-format", Type: []string{"string"}}}, compatibilityVersion: version.MajorMinor(1, 0), expectedFormats: []string{"unknown-format"}, }, { name: "recognized format with normalization", - schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "k8s-short-name"}}, + schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "k8s-short-name", Type: []string{"string"}}}, compatibilityVersion: version.MajorMinor(1, 34), expectedFormats: []string{}, }, { name: "unrecognized format with normalization", - schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "k8s-long-name"}}, + schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "k8s-long-name", Type: []string{"string"}}}, compatibilityVersion: version.MajorMinor(1, 33), expectedFormats: []string{"k8s-long-name"}, }, { name: "format introduced in later version", - schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "k8s-short-name"}}, + schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "k8s-short-name", Type: []string{"string"}}}, compatibilityVersion: version.MajorMinor(1, 0), expectedFormats: []string{"k8s-short-name"}, }, { name: "format with dash normalization", - schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "k8sshortname"}}, + schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "k8sshortname", Type: []string{"string"}}}, compatibilityVersion: version.MajorMinor(1, 34), expectedFormats: []string{}, }, { name: "recognized format at exact version", - schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "uuid"}}, + schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "uuid", Type: []string{"string"}}}, compatibilityVersion: version.MajorMinor(1, 0), expectedFormats: []string{}, }, { name: "recognized format at higher version", - schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "email"}}, + schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "email", Type: []string{"string"}}}, compatibilityVersion: version.MajorMinor(1, 35), expectedFormats: []string{}, }, + { + name: "unrecognized format for integer type is not reported", + schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "unknown-format", Type: []string{"integer"}}}, + compatibilityVersion: version.MajorMinor(1, 0), + expectedFormats: []string{}, + }, + { + name: "unrecognized format for string,null type is not reported", + schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "unknown-format", Type: []string{"string", "null"}}}, + compatibilityVersion: version.MajorMinor(1, 0), + expectedFormats: []string{}, + }, + { + name: "unrecognized format for no type is not reported", + schema: &spec.Schema{SchemaProps: spec.SchemaProps{Format: "unknown-format"}}, + compatibilityVersion: version.MajorMinor(1, 0), + expectedFormats: []string{}, + }, } for _, tc := range testCases { diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation_test.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation_test.go index a35496b00f1a1..ff324c270533b 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation_test.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation_test.go @@ -463,7 +463,7 @@ func TestValidateCustomResource(t *testing.T) { object: map[string]interface{}{"field": "y"}, oldObject: map[string]interface{}{"field": "x"}, expectErrs: []string{ - `field: Invalid value: "string": failed rule: self == oldSelf`, + `field: Invalid value: "y": failed rule: self == oldSelf`, }}, }, }, @@ -511,7 +511,7 @@ func TestValidateCustomResource(t *testing.T) { object: map[string]interface{}{"field": []interface{}{map[string]interface{}{"k1": "a", "k2": "b", "v1": 0.9}}}, oldObject: map[string]interface{}{"field": []interface{}{map[string]interface{}{"k1": "a", "k2": "b", "v1": 1.0}}}, expectErrs: []string{ - `field[0].v1: Invalid value: "number": failed rule: self >= oldSelf`, + `field[0].v1: Invalid value: 0.9: failed rule: self >= oldSelf`, }}, }, }, @@ -550,7 +550,7 @@ func TestValidateCustomResource(t *testing.T) { { object: map[string]interface{}{"field": []interface{}{map[string]interface{}{"x": "y"}}}, expectErrs: []string{ - `field[0].x: Invalid value: "string": failed rule: self == 'x'`, + `field[0].x: Invalid value: "y": failed rule: self == 'x'`, }}, }, }, diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcecolumndefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcecolumndefinition.go index eb77daba353e8..3c14acfc2ef7d 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcecolumndefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcecolumndefinition.go @@ -20,13 +20,27 @@ package v1 // CustomResourceColumnDefinitionApplyConfiguration represents a declarative configuration of the CustomResourceColumnDefinition type for use // with apply. +// +// CustomResourceColumnDefinition specifies a column for server side printing. type CustomResourceColumnDefinitionApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Format *string `json:"format,omitempty"` + // name is a human readable name for the column. + Name *string `json:"name,omitempty"` + // type is an OpenAPI type definition for this column. + // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. + Type *string `json:"type,omitempty"` + // format is an optional OpenAPI type definition for this column. The 'name' format is applied + // to the primary identifier column to assist in clients identifying column is the resource name. + // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. + Format *string `json:"format,omitempty"` + // description is a human readable description of this column. Description *string `json:"description,omitempty"` - Priority *int32 `json:"priority,omitempty"` - JSONPath *string `json:"jsonPath,omitempty"` + // priority is an integer defining the relative importance of this column compared to others. Lower + // numbers are considered higher priority. Columns that may be omitted in limited space scenarios + // should be given a priority greater than 0. + Priority *int32 `json:"priority,omitempty"` + // jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against + // each custom resource to produce the value for this column. + JSONPath *string `json:"jsonPath,omitempty"` } // CustomResourceColumnDefinitionApplyConfiguration constructs a declarative configuration of the CustomResourceColumnDefinition type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourceconversion.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourceconversion.go index 25e43cc00c3c8..f2d1853366be2 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourceconversion.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourceconversion.go @@ -24,9 +24,16 @@ import ( // CustomResourceConversionApplyConfiguration represents a declarative configuration of the CustomResourceConversion type for use // with apply. +// +// CustomResourceConversion describes how to convert different versions of a CR. type CustomResourceConversionApplyConfiguration struct { + // strategy specifies how custom resources are converted between versions. Allowed values are: + // - `"None"`: The converter only change the apiVersion and would not touch any other field in the custom resource. + // - `"Webhook"`: API Server will call to an external webhook to do the conversion. Additional information + // is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set. Strategy *apiextensionsv1.ConversionStrategyType `json:"strategy,omitempty"` - Webhook *WebhookConversionApplyConfiguration `json:"webhook,omitempty"` + // webhook describes how to call the conversion webhook. Required when `strategy` is set to `"Webhook"`. + Webhook *WebhookConversionApplyConfiguration `json:"webhook,omitempty"` } // CustomResourceConversionApplyConfiguration constructs a declarative configuration of the CustomResourceConversion type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinition.go index 742af4ad81130..4884c25237279 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinition.go @@ -26,11 +26,18 @@ import ( // CustomResourceDefinitionApplyConfiguration represents a declarative configuration of the CustomResourceDefinition type for use // with apply. +// +// CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format +// <.spec.name>.<.spec.group>. type CustomResourceDefinitionApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *CustomResourceDefinitionSpecApplyConfiguration `json:"spec,omitempty"` - Status *CustomResourceDefinitionStatusApplyConfiguration `json:"status,omitempty"` + // spec describes how the user wants the resources to appear + Spec *CustomResourceDefinitionSpecApplyConfiguration `json:"spec,omitempty"` + // status indicates the actual state of the CustomResourceDefinition + Status *CustomResourceDefinitionStatusApplyConfiguration `json:"status,omitempty"` } // CustomResourceDefinition constructs a declarative configuration of the CustomResourceDefinition type for use with @@ -42,6 +49,7 @@ func CustomResourceDefinition(name string) *CustomResourceDefinitionApplyConfigu b.WithAPIVersion("apiextensions.k8s.io/v1") return b } + func (b CustomResourceDefinitionApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitioncondition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitioncondition.go index 228120520c590..7456525ac8af2 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitioncondition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitioncondition.go @@ -25,12 +25,20 @@ import ( // CustomResourceDefinitionConditionApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionCondition type for use // with apply. +// +// CustomResourceDefinitionCondition contains details for the current condition of this pod. type CustomResourceDefinitionConditionApplyConfiguration struct { - Type *apiextensionsv1.CustomResourceDefinitionConditionType `json:"type,omitempty"` - Status *apiextensionsv1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // type is the type of the condition. Types include Established, NamesAccepted and Terminating. + Type *apiextensionsv1.CustomResourceDefinitionConditionType `json:"type,omitempty"` + // status is the status of the condition. + // Can be True, False, Unknown. + Status *apiextensionsv1.ConditionStatus `json:"status,omitempty"` + // lastTransitionTime last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // reason is a unique, one-word, CamelCase reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // message is a human-readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // CustomResourceDefinitionConditionApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionCondition type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionnames.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionnames.go index ca0c02f0e0964..d6558eec85753 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionnames.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionnames.go @@ -20,12 +20,28 @@ package v1 // CustomResourceDefinitionNamesApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionNames type for use // with apply. +// +// CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition type CustomResourceDefinitionNamesApplyConfiguration struct { - Plural *string `json:"plural,omitempty"` - Singular *string `json:"singular,omitempty"` + // plural is the plural name of the resource to serve. + // The custom resources are served under `/apis///.../`. + // Must match the name of the CustomResourceDefinition (in the form `.`). + // Must be all lowercase. + Plural *string `json:"plural,omitempty"` + // singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`. + Singular *string `json:"singular,omitempty"` + // shortNames are short names for the resource, exposed in API discovery documents, + // and used by clients to support invocations like `kubectl get `. + // It must be all lowercase. ShortNames []string `json:"shortNames,omitempty"` - Kind *string `json:"kind,omitempty"` - ListKind *string `json:"listKind,omitempty"` + // kind is the serialized kind of the resource. It is normally CamelCase and singular. + // Custom resource instances will use this value as the `kind` attribute in API calls. + Kind *string `json:"kind,omitempty"` + // listKind is the serialized kind of the list for this resource. Defaults to "`kind`List". + ListKind *string `json:"listKind,omitempty"` + // categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). + // This is published in API discovery documents, and used by clients to support invocations like + // `kubectl get all`. Categories []string `json:"categories,omitempty"` } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionspec.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionspec.go index 9d0573f44be23..b33a8241846d2 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionspec.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionspec.go @@ -24,13 +24,35 @@ import ( // CustomResourceDefinitionSpecApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionSpec type for use // with apply. +// +// CustomResourceDefinitionSpec describes how a user wants their resource to appear type CustomResourceDefinitionSpecApplyConfiguration struct { - Group *string `json:"group,omitempty"` - Names *CustomResourceDefinitionNamesApplyConfiguration `json:"names,omitempty"` - Scope *apiextensionsv1.ResourceScope `json:"scope,omitempty"` - Versions []CustomResourceDefinitionVersionApplyConfiguration `json:"versions,omitempty"` - Conversion *CustomResourceConversionApplyConfiguration `json:"conversion,omitempty"` - PreserveUnknownFields *bool `json:"preserveUnknownFields,omitempty"` + // group is the API group of the defined custom resource. + // The custom resources are served under `/apis//...`. + // Must match the name of the CustomResourceDefinition (in the form `.`). + Group *string `json:"group,omitempty"` + // names specify the resource and kind names for the custom resource. + Names *CustomResourceDefinitionNamesApplyConfiguration `json:"names,omitempty"` + // scope indicates whether the defined custom resource is cluster- or namespace-scoped. + // Allowed values are `Cluster` and `Namespaced`. + Scope *apiextensionsv1.ResourceScope `json:"scope,omitempty"` + // versions is the list of all API versions of the defined custom resource. + // Version names are used to compute the order in which served versions are listed in API discovery. + // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered + // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), + // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first + // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing + // major version, then minor version. An example sorted list of versions: + // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. + Versions []CustomResourceDefinitionVersionApplyConfiguration `json:"versions,omitempty"` + // conversion defines conversion settings for the CRD. + Conversion *CustomResourceConversionApplyConfiguration `json:"conversion,omitempty"` + // preserveUnknownFields indicates that object fields which are not specified + // in the OpenAPI schema should be preserved when persisting to storage. + // apiVersion, kind, metadata and known fields inside metadata are always preserved. + // This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. + // See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning for details. + PreserveUnknownFields *bool `json:"preserveUnknownFields,omitempty"` } // CustomResourceDefinitionSpecApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionSpec type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionstatus.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionstatus.go index 4fd09be5a0e1e..915c6d645bb27 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionstatus.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionstatus.go @@ -20,10 +20,21 @@ package v1 // CustomResourceDefinitionStatusApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionStatus type for use // with apply. +// +// CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition type CustomResourceDefinitionStatusApplyConfiguration struct { - Conditions []CustomResourceDefinitionConditionApplyConfiguration `json:"conditions,omitempty"` - AcceptedNames *CustomResourceDefinitionNamesApplyConfiguration `json:"acceptedNames,omitempty"` - StoredVersions []string `json:"storedVersions,omitempty"` + // conditions indicate state for particular aspects of a CustomResourceDefinition + Conditions []CustomResourceDefinitionConditionApplyConfiguration `json:"conditions,omitempty"` + // acceptedNames are the names that are actually being used to serve discovery. + // They may be different than the names in spec. + AcceptedNames *CustomResourceDefinitionNamesApplyConfiguration `json:"acceptedNames,omitempty"` + // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these + // versions allows a migration path for stored versions in etcd. The field is mutable + // so a migration controller can finish a migration to another version (ensuring + // no old objects are left in storage), and then remove the rest of the + // versions from this list. + // Versions may not be removed from `spec.versions` while they exist in this list. + StoredVersions []string `json:"storedVersions,omitempty"` } // CustomResourceDefinitionStatusApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionStatus type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go index f96ba88f467db..0362753e81c47 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go @@ -20,16 +20,38 @@ package v1 // CustomResourceDefinitionVersionApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionVersion type for use // with apply. +// +// CustomResourceDefinitionVersion describes a version for CRD. type CustomResourceDefinitionVersionApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Served *bool `json:"served,omitempty"` - Storage *bool `json:"storage,omitempty"` - Deprecated *bool `json:"deprecated,omitempty"` - DeprecationWarning *string `json:"deprecationWarning,omitempty"` - Schema *CustomResourceValidationApplyConfiguration `json:"schema,omitempty"` - Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` + // name is the version name, e.g. “v1”, “v2beta1”, etc. + // The custom resources are served under this version at `/apis///...` if `served` is true. + Name *string `json:"name,omitempty"` + // served is a flag enabling/disabling this version from being served via REST APIs + Served *bool `json:"served,omitempty"` + // storage indicates this version should be used when persisting custom resources to storage. + // There must be exactly one version with storage=true. + Storage *bool `json:"storage,omitempty"` + // deprecated indicates this version of the custom resource API is deprecated. + // When set to true, API requests to this version receive a warning header in the server response. + // Defaults to false. + Deprecated *bool `json:"deprecated,omitempty"` + // deprecationWarning overrides the default warning returned to API clients. + // May only be set when `deprecated` is true. + // The default warning indicates this version is deprecated and recommends use + // of the newest served version of equal or greater stability, if one exists. + DeprecationWarning *string `json:"deprecationWarning,omitempty"` + // schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource. + Schema *CustomResourceValidationApplyConfiguration `json:"schema,omitempty"` + // subresources specify what subresources this version of the defined custom resource have. + Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` + // additionalPrinterColumns specifies additional columns returned in Table output. + // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. + // If no columns are specified, a single column displaying the age of the custom resource is used. AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` - SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` + // selectableFields specifies paths to fields that may be used as field selectors. + // A maximum of 8 selectable fields are allowed. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` } // CustomResourceDefinitionVersionApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionVersion type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresources.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresources.go index f8d5be3c7f3e8..77307d9af039c 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresources.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresources.go @@ -24,9 +24,16 @@ import ( // CustomResourceSubresourcesApplyConfiguration represents a declarative configuration of the CustomResourceSubresources type for use // with apply. +// +// CustomResourceSubresources defines the status and scale subresources for CustomResources. type CustomResourceSubresourcesApplyConfiguration struct { - Status *apiextensionsv1.CustomResourceSubresourceStatus `json:"status,omitempty"` - Scale *CustomResourceSubresourceScaleApplyConfiguration `json:"scale,omitempty"` + // status indicates the custom resource should serve a `/status` subresource. + // When enabled: + // 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. + // 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object. + Status *apiextensionsv1.CustomResourceSubresourceStatus `json:"status,omitempty"` + // scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object. + Scale *CustomResourceSubresourceScaleApplyConfiguration `json:"scale,omitempty"` } // CustomResourceSubresourcesApplyConfiguration constructs a declarative configuration of the CustomResourceSubresources type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresourcescale.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresourcescale.go index 7859675fdd18e..61743e236a024 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresourcescale.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresourcescale.go @@ -20,10 +20,30 @@ package v1 // CustomResourceSubresourceScaleApplyConfiguration represents a declarative configuration of the CustomResourceSubresourceScale type for use // with apply. +// +// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. type CustomResourceSubresourceScaleApplyConfiguration struct { - SpecReplicasPath *string `json:"specReplicasPath,omitempty"` + // specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. + // Only JSON paths without the array notation are allowed. + // Must be a JSON Path under `.spec`. + // If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET. + SpecReplicasPath *string `json:"specReplicasPath,omitempty"` + // statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. + // Only JSON paths without the array notation are allowed. + // Must be a JSON Path under `.status`. + // If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource + // will default to 0. StatusReplicasPath *string `json:"statusReplicasPath,omitempty"` - LabelSelectorPath *string `json:"labelSelectorPath,omitempty"` + // labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. + // Only JSON paths without the array notation are allowed. + // Must be a JSON Path under `.status` or `.spec`. + // Must be set to work with HorizontalPodAutoscaler. + // The field pointed by this JSON path must be a string field (not a complex selector struct) + // which contains a serialized label selector in string form. + // More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource + // If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` + // subresource will default to the empty string. + LabelSelectorPath *string `json:"labelSelectorPath,omitempty"` } // CustomResourceSubresourceScaleApplyConfiguration constructs a declarative configuration of the CustomResourceSubresourceScale type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcevalidation.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcevalidation.go index 6a8cf17d55107..459ea7e69d7d9 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcevalidation.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcevalidation.go @@ -20,7 +20,10 @@ package v1 // CustomResourceValidationApplyConfiguration represents a declarative configuration of the CustomResourceValidation type for use // with apply. +// +// CustomResourceValidation is a list of validation methods for CustomResources. type CustomResourceValidationApplyConfiguration struct { + // openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning. OpenAPIV3Schema *JSONSchemaPropsApplyConfiguration `json:"openAPIV3Schema,omitempty"` } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/externaldocumentation.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/externaldocumentation.go index 761a957a02578..907f2ae7e3193 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/externaldocumentation.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/externaldocumentation.go @@ -20,6 +20,8 @@ package v1 // ExternalDocumentationApplyConfiguration represents a declarative configuration of the ExternalDocumentation type for use // with apply. +// +// ExternalDocumentation allows referencing an external resource for extended documentation. type ExternalDocumentationApplyConfiguration struct { Description *string `json:"description,omitempty"` URL *string `json:"url,omitempty"` diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/jsonschemaprops.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/jsonschemaprops.go index d6595ce1d5e3c..8441405281d27 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/jsonschemaprops.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/jsonschemaprops.go @@ -24,51 +24,142 @@ import ( // JSONSchemaPropsApplyConfiguration represents a declarative configuration of the JSONSchemaProps type for use // with apply. +// +// JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). type JSONSchemaPropsApplyConfiguration struct { - ID *string `json:"id,omitempty"` - Schema *apiextensionsv1.JSONSchemaURL `json:"$schema,omitempty"` - Ref *string `json:"$ref,omitempty"` - Description *string `json:"description,omitempty"` - Type *string `json:"type,omitempty"` - Format *string `json:"format,omitempty"` - Title *string `json:"title,omitempty"` - Default *apiextensionsv1.JSON `json:"default,omitempty"` - Maximum *float64 `json:"maximum,omitempty"` - ExclusiveMaximum *bool `json:"exclusiveMaximum,omitempty"` - Minimum *float64 `json:"minimum,omitempty"` - ExclusiveMinimum *bool `json:"exclusiveMinimum,omitempty"` - MaxLength *int64 `json:"maxLength,omitempty"` - MinLength *int64 `json:"minLength,omitempty"` - Pattern *string `json:"pattern,omitempty"` - MaxItems *int64 `json:"maxItems,omitempty"` - MinItems *int64 `json:"minItems,omitempty"` - UniqueItems *bool `json:"uniqueItems,omitempty"` - MultipleOf *float64 `json:"multipleOf,omitempty"` - Enum []apiextensionsv1.JSON `json:"enum,omitempty"` - MaxProperties *int64 `json:"maxProperties,omitempty"` - MinProperties *int64 `json:"minProperties,omitempty"` - Required []string `json:"required,omitempty"` - Items *apiextensionsv1.JSONSchemaPropsOrArray `json:"items,omitempty"` - AllOf []JSONSchemaPropsApplyConfiguration `json:"allOf,omitempty"` - OneOf []JSONSchemaPropsApplyConfiguration `json:"oneOf,omitempty"` - AnyOf []JSONSchemaPropsApplyConfiguration `json:"anyOf,omitempty"` - Not *JSONSchemaPropsApplyConfiguration `json:"not,omitempty"` - Properties map[string]JSONSchemaPropsApplyConfiguration `json:"properties,omitempty"` - AdditionalProperties *apiextensionsv1.JSONSchemaPropsOrBool `json:"additionalProperties,omitempty"` - PatternProperties map[string]JSONSchemaPropsApplyConfiguration `json:"patternProperties,omitempty"` - Dependencies *apiextensionsv1.JSONSchemaDependencies `json:"dependencies,omitempty"` - AdditionalItems *apiextensionsv1.JSONSchemaPropsOrBool `json:"additionalItems,omitempty"` - Definitions *apiextensionsv1.JSONSchemaDefinitions `json:"definitions,omitempty"` - ExternalDocs *ExternalDocumentationApplyConfiguration `json:"externalDocs,omitempty"` - Example *apiextensionsv1.JSON `json:"example,omitempty"` - Nullable *bool `json:"nullable,omitempty"` - XPreserveUnknownFields *bool `json:"x-kubernetes-preserve-unknown-fields,omitempty"` - XEmbeddedResource *bool `json:"x-kubernetes-embedded-resource,omitempty"` - XIntOrString *bool `json:"x-kubernetes-int-or-string,omitempty"` - XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty"` - XListType *string `json:"x-kubernetes-list-type,omitempty"` - XMapType *string `json:"x-kubernetes-map-type,omitempty"` - XValidations *apiextensionsv1.ValidationRules `json:"x-kubernetes-validations,omitempty"` + ID *string `json:"id,omitempty"` + Schema *apiextensionsv1.JSONSchemaURL `json:"$schema,omitempty"` + Ref *string `json:"$ref,omitempty"` + Description *string `json:"description,omitempty"` + Type *string `json:"type,omitempty"` + // format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated: + // + // - bsonobjectid: a bson object ID, i.e. a 24 characters hex string + // - uri: an URI as parsed by Golang net/url.ParseRequestURI + // - email: an email address as parsed by Golang net/mail.ParseAddress + // - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. + // - ipv4: an IPv4 IP as parsed by Golang net.ParseIP + // - ipv6: an IPv6 IP as parsed by Golang net.ParseIP + // - cidr: a CIDR as parsed by Golang net.ParseCIDR + // - mac: a MAC address as parsed by Golang net.ParseMAC + // - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ + // - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ + // - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ + // - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ + // - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041" + // - isbn10: an ISBN10 number string like "0321751043" + // - isbn13: an ISBN13 number string like "978-0321751041" + // - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in + // - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ + // - hexcolor: an hexadecimal color code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ + // - rgbcolor: an RGB color code like rgb like "rgb(255,255,2559" + // - byte: base64 encoded binary data + // - password: any kind of string + // - date: a date string like "2006-01-02" as defined by full-date in RFC3339 + // - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format + // - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339. + Format *string `json:"format,omitempty"` + Title *string `json:"title,omitempty"` + // default is a default value for undefined object fields. + // Defaulting is a beta feature under the CustomResourceDefaulting feature gate. + // Defaulting requires spec.preserveUnknownFields to be false. + Default *apiextensionsv1.JSON `json:"default,omitempty"` + Maximum *float64 `json:"maximum,omitempty"` + ExclusiveMaximum *bool `json:"exclusiveMaximum,omitempty"` + Minimum *float64 `json:"minimum,omitempty"` + ExclusiveMinimum *bool `json:"exclusiveMinimum,omitempty"` + MaxLength *int64 `json:"maxLength,omitempty"` + MinLength *int64 `json:"minLength,omitempty"` + Pattern *string `json:"pattern,omitempty"` + MaxItems *int64 `json:"maxItems,omitempty"` + MinItems *int64 `json:"minItems,omitempty"` + UniqueItems *bool `json:"uniqueItems,omitempty"` + MultipleOf *float64 `json:"multipleOf,omitempty"` + Enum []apiextensionsv1.JSON `json:"enum,omitempty"` + MaxProperties *int64 `json:"maxProperties,omitempty"` + MinProperties *int64 `json:"minProperties,omitempty"` + Required []string `json:"required,omitempty"` + Items *apiextensionsv1.JSONSchemaPropsOrArray `json:"items,omitempty"` + AllOf []JSONSchemaPropsApplyConfiguration `json:"allOf,omitempty"` + OneOf []JSONSchemaPropsApplyConfiguration `json:"oneOf,omitempty"` + AnyOf []JSONSchemaPropsApplyConfiguration `json:"anyOf,omitempty"` + Not *JSONSchemaPropsApplyConfiguration `json:"not,omitempty"` + Properties map[string]JSONSchemaPropsApplyConfiguration `json:"properties,omitempty"` + AdditionalProperties *apiextensionsv1.JSONSchemaPropsOrBool `json:"additionalProperties,omitempty"` + PatternProperties map[string]JSONSchemaPropsApplyConfiguration `json:"patternProperties,omitempty"` + Dependencies *apiextensionsv1.JSONSchemaDependencies `json:"dependencies,omitempty"` + AdditionalItems *apiextensionsv1.JSONSchemaPropsOrBool `json:"additionalItems,omitempty"` + Definitions *apiextensionsv1.JSONSchemaDefinitions `json:"definitions,omitempty"` + ExternalDocs *ExternalDocumentationApplyConfiguration `json:"externalDocs,omitempty"` + Example *apiextensionsv1.JSON `json:"example,omitempty"` + Nullable *bool `json:"nullable,omitempty"` + // x-kubernetes-preserve-unknown-fields stops the API server + // decoding step from pruning fields which are not specified + // in the validation schema. This affects fields recursively, + // but switches back to normal pruning behaviour if nested + // properties or additionalProperties are specified in the schema. + // This can either be true or undefined. False is forbidden. + XPreserveUnknownFields *bool `json:"x-kubernetes-preserve-unknown-fields,omitempty"` + // x-kubernetes-embedded-resource defines that the value is an + // embedded Kubernetes runtime.Object, with TypeMeta and + // ObjectMeta. The type must be object. It is allowed to further + // restrict the embedded object. kind, apiVersion and metadata + // are validated automatically. x-kubernetes-preserve-unknown-fields + // is allowed to be true, but does not have to be if the object + // is fully specified (up to kind, apiVersion, metadata). + XEmbeddedResource *bool `json:"x-kubernetes-embedded-resource,omitempty"` + // x-kubernetes-int-or-string specifies that this value is + // either an integer or a string. If this is true, an empty + // type is allowed and type as child of anyOf is permitted + // if following one of the following patterns: + // + // 1) anyOf: + // - type: integer + // - type: string + // 2) allOf: + // - anyOf: + // - type: integer + // - type: string + // - ... zero or more + XIntOrString *bool `json:"x-kubernetes-int-or-string,omitempty"` + // x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used + // as the index of the map. + // + // This tag MUST only be used on lists that have the "x-kubernetes-list-type" + // extension set to "map". Also, the values specified for this attribute must + // be a scalar typed field of the child structure (no nesting is supported). + // + // The properties specified must either be required or have a default value, + // to ensure those properties are present for all list items. + XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty"` + // x-kubernetes-list-type annotates an array to further describe its topology. + // This extension must only be used on lists and may have 3 possible values: + // + // 1) `atomic`: the list is treated as a single entity, like a scalar. + // Atomic lists will be entirely replaced when updated. This extension + // may be used on any type of list (struct, scalar, ...). + // 2) `set`: + // Sets are lists that must not have multiple items with the same value. Each + // value must be a scalar, an object with x-kubernetes-map-type `atomic` or an + // array with x-kubernetes-list-type `atomic`. + // 3) `map`: + // These lists are like maps in that their elements have a non-index key + // used to identify them. Order is preserved upon merge. The map tag + // must only be used on a list with elements of type object. + // Defaults to atomic for arrays. + XListType *string `json:"x-kubernetes-list-type,omitempty"` + // x-kubernetes-map-type annotates an object to further describe its topology. + // This extension must only be used when type is object and may have 2 possible values: + // + // 1) `granular`: + // These maps are actual maps (key-value pairs) and each fields are independent + // from each other (they can each be manipulated by separate actors). This is + // the default behaviour for all maps. + // 2) `atomic`: the list is treated as a single entity, like a scalar. + // Atomic maps will be entirely replaced when updated. + XMapType *string `json:"x-kubernetes-map-type,omitempty"` + // x-kubernetes-validations describes a list of validation rules written in the CEL expression language. + XValidations *apiextensionsv1.ValidationRules `json:"x-kubernetes-validations,omitempty"` } // JSONSchemaPropsApplyConfiguration constructs a declarative configuration of the JSONSchemaProps type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go index 33f655a764867..b1edc643fd37d 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go @@ -20,7 +20,17 @@ package v1 // SelectableFieldApplyConfiguration represents a declarative configuration of the SelectableField type for use // with apply. +// +// SelectableField specifies the JSON path of a field that may be used with field selectors. type SelectableFieldApplyConfiguration struct { + // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a + // field selector value. + // Only JSON paths without the array notation are allowed. + // Must point to a field of type string, boolean or integer. Types with enum values + // and strings with formats are allowed. + // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. + // Must not point to metdata fields. + // Required. JSONPath *string `json:"jsonPath,omitempty"` } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/servicereference.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/servicereference.go index 239780664df53..215bc3a14e130 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/servicereference.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/servicereference.go @@ -20,11 +20,21 @@ package v1 // ServiceReferenceApplyConfiguration represents a declarative configuration of the ServiceReference type for use // with apply. +// +// ServiceReference holds a reference to Service.legacy.k8s.io type ServiceReferenceApplyConfiguration struct { + // namespace is the namespace of the service. + // Required Namespace *string `json:"namespace,omitempty"` - Name *string `json:"name,omitempty"` - Path *string `json:"path,omitempty"` - Port *int32 `json:"port,omitempty"` + // name is the name of the service. + // Required + Name *string `json:"name,omitempty"` + // path is an optional URL path at which the webhook will be contacted. + Path *string `json:"path,omitempty"` + // port is an optional service port at which the webhook will be contacted. + // `port` should be a valid port number (1-65535, inclusive). + // Defaults to 443 for backward compatibility. + Port *int32 `json:"port,omitempty"` } // ServiceReferenceApplyConfiguration constructs a declarative configuration of the ServiceReference type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/validationrule.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/validationrule.go index 5ee4149284817..4f2278bf22057 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/validationrule.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/validationrule.go @@ -24,13 +24,121 @@ import ( // ValidationRuleApplyConfiguration represents a declarative configuration of the ValidationRule type for use // with apply. +// +// ValidationRule describes a validation rule written in the CEL expression language. type ValidationRuleApplyConfiguration struct { - Rule *string `json:"rule,omitempty"` - Message *string `json:"message,omitempty"` - MessageExpression *string `json:"messageExpression,omitempty"` - Reason *apiextensionsv1.FieldValueErrorReason `json:"reason,omitempty"` - FieldPath *string `json:"fieldPath,omitempty"` - OptionalOldSelf *bool `json:"optionalOldSelf,omitempty"` + // Rule represents the expression which will be evaluated by CEL. + // ref: https://github.com/google/cel-spec + // The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. + // The `self` variable in the CEL expression is bound to the scoped value. + // Example: + // - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual <= self.spec.maxDesired"} + // + // If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable + // via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as + // absent fields in CEL expressions. + // If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map + // are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map + // are accessible via CEL macros and functions such as `self.all(...)`. + // If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and + // functions. + // If the Rule is scoped to a scalar, `self` is bound to the scalar value. + // Examples: + // - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority < 10"} + // - Rule scoped to a list of integers: {"rule": "self.values.all(value, value >= 0 && value < 100)"} + // - Rule scoped to a string value: {"rule": "self.startsWith('kube')"} + // + // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the + // object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible. + // + // Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL + // expressions. This includes: + // - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. + // - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as: + // - A schema with no type and x-kubernetes-preserve-unknown-fields set to true + // - An array where the items schema is of an "unknown type" + // - An object where the additionalProperties schema is of an "unknown type" + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Accessible property names are escaped according to the following rules when accessed in the expression: + // - '__' escapes to '__underscores__' + // - '.' escapes to '__dot__' + // - '-' escapes to '__dash__' + // - '/' escapes to '__slash__' + // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: + // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", + // "import", "let", "loop", "package", "namespace", "return". + // Examples: + // - Rule accessing a property named "namespace": {"rule": "self.__namespace__ > 0"} + // - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop > 0"} + // - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d > 0"} + // + // Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. + // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: + // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and + // non-intersecting elements in `Y` are appended, retaining their partial order. + // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values + // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with + // non-intersecting keys are appended, retaining their partial order. + // + // If `rule` makes use of the `oldSelf` variable it is implicitly a + // `transition rule`. + // + // By default, the `oldSelf` variable is the same type as `self`. + // When `optionalOldSelf` is true, the `oldSelf` variable is a CEL optional + // variable whose value() is the same type as `self`. + // See the documentation for the `optionalOldSelf` field for details. + // + // Transition rules by default are applied only on UPDATE requests and are + // skipped if an old value could not be found. You can opt a transition + // rule into unconditional evaluation by setting `optionalOldSelf` to true. + Rule *string `json:"rule,omitempty"` + // Message represents the message displayed when validation fails. The message is required if the Rule contains + // line breaks. The message must not contain line breaks. + // If unset, the message is "failed rule: {Rule}". + // e.g. "must be a URL with the host matching spec.host" + Message *string `json:"message,omitempty"` + // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. + // Since messageExpression is used as a failure message, it must evaluate to a string. + // If both message and messageExpression are present on a rule, then messageExpression will be used if validation + // fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced + // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string + // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and + // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. + // messageExpression has access to all the same variables as the rule; the only difference is the return type. + // Example: + // "x must be less than max ("+string(self.max)+")" + MessageExpression *string `json:"messageExpression,omitempty"` + // reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. + // The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. + // The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". + // If not set, default to use "FieldValueInvalid". + // All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. + Reason *apiextensionsv1.FieldValueErrorReason `json:"reason,omitempty"` + // fieldPath represents the field path returned when the validation fails. + // It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. + // e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` + // If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` + // It does not support list numeric index. + // It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. + // Numeric index of array is not supported. + // For field name which contains special characters, use `['specialName']` to refer the field name. + // e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` + FieldPath *string `json:"fieldPath,omitempty"` + // optionalOldSelf is used to opt a transition rule into evaluation + // even when the object is first created, or if the old object is + // missing the value. + // + // When enabled `oldSelf` will be a CEL optional whose value will be + // `None` if there is no old value, or when the object is initially created. + // + // You may check for presence of oldSelf using `oldSelf.hasValue()` and + // unwrap it after checking using `oldSelf.value()`. Check the CEL + // documentation for Optional types for more information: + // https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes + // + // May not be set unless `oldSelf` is used in `rule`. + OptionalOldSelf *bool `json:"optionalOldSelf,omitempty"` } // ValidationRuleApplyConfiguration constructs a declarative configuration of the ValidationRule type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookclientconfig.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookclientconfig.go index 77f2227b95ce0..c984e1dc8e796 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookclientconfig.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookclientconfig.go @@ -20,10 +20,43 @@ package v1 // WebhookClientConfigApplyConfiguration represents a declarative configuration of the WebhookClientConfig type for use // with apply. +// +// WebhookClientConfig contains the information to make a TLS connection with the webhook. type WebhookClientConfigApplyConfiguration struct { - URL *string `json:"url,omitempty"` - Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"` - CABundle []byte `json:"caBundle,omitempty"` + // url gives the location of the webhook, in standard URL form + // (`scheme://host:port/path`). Exactly one of `url` or `service` + // must be specified. + // + // The `host` should not refer to a service running in the cluster; use + // the `service` field instead. The host might be resolved via external + // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve + // in-cluster DNS as that would be a layering violation). `host` may + // also be an IP address. + // + // Please note that using `localhost` or `127.0.0.1` as a `host` is + // risky unless you take great care to run this webhook on all hosts + // which run an apiserver which might need to make calls to this + // webhook. Such installs are likely to be non-portable, i.e., not easy + // to turn up in a new cluster. + // + // The scheme must be "https"; the URL must begin with "https://". + // + // A path is optional, and if present may be any string permissible in + // a URL. You may use the path to pass an arbitrary string to the + // webhook, for example, a cluster identifier. + // + // Attempting to use a user or basic auth e.g. "user:password@" is not + // allowed. Fragments ("#...") and query parameters ("?...") are not + // allowed, either. + URL *string `json:"url,omitempty"` + // service is a reference to the service for this webhook. Either + // service or url must be specified. + // + // If the webhook is running within the cluster, then you should use `service`. + Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"` + // caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. + // If unspecified, system trust roots on the apiserver are used. + CABundle []byte `json:"caBundle,omitempty"` } // WebhookClientConfigApplyConfiguration constructs a declarative configuration of the WebhookClientConfig type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookconversion.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookconversion.go index 884fbc5fa859c..6daf74eac0c44 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookconversion.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookconversion.go @@ -20,9 +20,18 @@ package v1 // WebhookConversionApplyConfiguration represents a declarative configuration of the WebhookConversion type for use // with apply. +// +// WebhookConversion describes how to call a conversion webhook type WebhookConversionApplyConfiguration struct { - ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"` - ConversionReviewVersions []string `json:"conversionReviewVersions,omitempty"` + // clientConfig is the instructions for how to call the webhook if strategy is `Webhook`. + ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"` + // conversionReviewVersions is an ordered list of preferred `ConversionReview` + // versions the Webhook expects. The API server will use the first version in + // the list which it supports. If none of the versions specified in this list + // are supported by API server, conversion will fail for the custom resource. + // If a persisted Webhook configuration specifies allowed versions and does not + // include any versions known to the API Server, calls to the webhook will fail. + ConversionReviewVersions []string `json:"conversionReviewVersions,omitempty"` } // WebhookConversionApplyConfiguration constructs a declarative configuration of the WebhookConversion type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcecolumndefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcecolumndefinition.go index 9ee2318d1a500..ea6f783babc8c 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcecolumndefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcecolumndefinition.go @@ -20,13 +20,27 @@ package v1beta1 // CustomResourceColumnDefinitionApplyConfiguration represents a declarative configuration of the CustomResourceColumnDefinition type for use // with apply. +// +// CustomResourceColumnDefinition specifies a column for server side printing. type CustomResourceColumnDefinitionApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Format *string `json:"format,omitempty"` + // name is a human readable name for the column. + Name *string `json:"name,omitempty"` + // type is an OpenAPI type definition for this column. + // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. + Type *string `json:"type,omitempty"` + // format is an optional OpenAPI type definition for this column. The 'name' format is applied + // to the primary identifier column to assist in clients identifying column is the resource name. + // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. + Format *string `json:"format,omitempty"` + // description is a human readable description of this column. Description *string `json:"description,omitempty"` - Priority *int32 `json:"priority,omitempty"` - JSONPath *string `json:"JSONPath,omitempty"` + // priority is an integer defining the relative importance of this column compared to others. Lower + // numbers are considered higher priority. Columns that may be omitted in limited space scenarios + // should be given a priority greater than 0. + Priority *int32 `json:"priority,omitempty"` + // JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against + // each custom resource to produce the value for this column. + JSONPath *string `json:"JSONPath,omitempty"` } // CustomResourceColumnDefinitionApplyConfiguration constructs a declarative configuration of the CustomResourceColumnDefinition type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourceconversion.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourceconversion.go index f652c96d52592..8cc99f2eb15d4 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourceconversion.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourceconversion.go @@ -24,10 +24,25 @@ import ( // CustomResourceConversionApplyConfiguration represents a declarative configuration of the CustomResourceConversion type for use // with apply. +// +// CustomResourceConversion describes how to convert different versions of a CR. type CustomResourceConversionApplyConfiguration struct { - Strategy *apiextensionsv1beta1.ConversionStrategyType `json:"strategy,omitempty"` - WebhookClientConfig *WebhookClientConfigApplyConfiguration `json:"webhookClientConfig,omitempty"` - ConversionReviewVersions []string `json:"conversionReviewVersions,omitempty"` + // strategy specifies how custom resources are converted between versions. Allowed values are: + // - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. + // - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information + // is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set. + Strategy *apiextensionsv1beta1.ConversionStrategyType `json:"strategy,omitempty"` + // webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`. + // Required when `strategy` is set to `Webhook`. + WebhookClientConfig *WebhookClientConfigApplyConfiguration `json:"webhookClientConfig,omitempty"` + // conversionReviewVersions is an ordered list of preferred `ConversionReview` + // versions the Webhook expects. The API server will use the first version in + // the list which it supports. If none of the versions specified in this list + // are supported by API server, conversion will fail for the custom resource. + // If a persisted Webhook configuration specifies allowed versions and does not + // include any versions known to the API Server, calls to the webhook will fail. + // Defaults to `["v1beta1"]`. + ConversionReviewVersions []string `json:"conversionReviewVersions,omitempty"` } // CustomResourceConversionApplyConfiguration constructs a declarative configuration of the CustomResourceConversion type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinition.go index 8df22620d6a82..4838dafcb6d2c 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinition.go @@ -26,11 +26,19 @@ import ( // CustomResourceDefinitionApplyConfiguration represents a declarative configuration of the CustomResourceDefinition type for use // with apply. +// +// CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format +// <.spec.name>.<.spec.group>. +// Deprecated in v1.16, planned for removal in v1.22. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead. type CustomResourceDefinitionApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *CustomResourceDefinitionSpecApplyConfiguration `json:"spec,omitempty"` - Status *CustomResourceDefinitionStatusApplyConfiguration `json:"status,omitempty"` + // spec describes how the user wants the resources to appear + Spec *CustomResourceDefinitionSpecApplyConfiguration `json:"spec,omitempty"` + // status indicates the actual state of the CustomResourceDefinition + Status *CustomResourceDefinitionStatusApplyConfiguration `json:"status,omitempty"` } // CustomResourceDefinition constructs a declarative configuration of the CustomResourceDefinition type for use with @@ -42,6 +50,7 @@ func CustomResourceDefinition(name string) *CustomResourceDefinitionApplyConfigu b.WithAPIVersion("apiextensions.k8s.io/v1beta1") return b } + func (b CustomResourceDefinitionApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitioncondition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitioncondition.go index 4d19e1b5b6a85..78255099cc15b 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitioncondition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitioncondition.go @@ -25,12 +25,20 @@ import ( // CustomResourceDefinitionConditionApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionCondition type for use // with apply. +// +// CustomResourceDefinitionCondition contains details for the current condition of this pod. type CustomResourceDefinitionConditionApplyConfiguration struct { - Type *apiextensionsv1beta1.CustomResourceDefinitionConditionType `json:"type,omitempty"` - Status *apiextensionsv1beta1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // type is the type of the condition. Types include Established, NamesAccepted and Terminating. + Type *apiextensionsv1beta1.CustomResourceDefinitionConditionType `json:"type,omitempty"` + // status is the status of the condition. + // Can be True, False, Unknown. + Status *apiextensionsv1beta1.ConditionStatus `json:"status,omitempty"` + // lastTransitionTime last time the condition transitioned from one status to another. + LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` + // reason is a unique, one-word, CamelCase reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // message is a human-readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // CustomResourceDefinitionConditionApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionCondition type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionnames.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionnames.go index 44b49bcbbeb0a..4ad23b7b291ff 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionnames.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionnames.go @@ -20,12 +20,28 @@ package v1beta1 // CustomResourceDefinitionNamesApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionNames type for use // with apply. +// +// CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition type CustomResourceDefinitionNamesApplyConfiguration struct { - Plural *string `json:"plural,omitempty"` - Singular *string `json:"singular,omitempty"` + // plural is the plural name of the resource to serve. + // The custom resources are served under `/apis///.../`. + // Must match the name of the CustomResourceDefinition (in the form `.`). + // Must be all lowercase. + Plural *string `json:"plural,omitempty"` + // singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`. + Singular *string `json:"singular,omitempty"` + // shortNames are short names for the resource, exposed in API discovery documents, + // and used by clients to support invocations like `kubectl get `. + // It must be all lowercase. ShortNames []string `json:"shortNames,omitempty"` - Kind *string `json:"kind,omitempty"` - ListKind *string `json:"listKind,omitempty"` + // kind is the serialized kind of the resource. It is normally CamelCase and singular. + // Custom resource instances will use this value as the `kind` attribute in API calls. + Kind *string `json:"kind,omitempty"` + // listKind is the serialized kind of the list for this resource. Defaults to "`kind`List". + ListKind *string `json:"listKind,omitempty"` + // categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). + // This is published in API discovery documents, and used by clients to support invocations like + // `kubectl get all`. Categories []string `json:"categories,omitempty"` } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go index 5046882ae10fb..12e24ba2faef6 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go @@ -24,18 +24,63 @@ import ( // CustomResourceDefinitionSpecApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionSpec type for use // with apply. +// +// CustomResourceDefinitionSpec describes how a user wants their resource to appear type CustomResourceDefinitionSpecApplyConfiguration struct { - Group *string `json:"group,omitempty"` - Version *string `json:"version,omitempty"` - Names *CustomResourceDefinitionNamesApplyConfiguration `json:"names,omitempty"` - Scope *apiextensionsv1beta1.ResourceScope `json:"scope,omitempty"` - Validation *CustomResourceValidationApplyConfiguration `json:"validation,omitempty"` - Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` - Versions []CustomResourceDefinitionVersionApplyConfiguration `json:"versions,omitempty"` - AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` - SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` - Conversion *CustomResourceConversionApplyConfiguration `json:"conversion,omitempty"` - PreserveUnknownFields *bool `json:"preserveUnknownFields,omitempty"` + // group is the API group of the defined custom resource. + // The custom resources are served under `/apis//...`. + // Must match the name of the CustomResourceDefinition (in the form `.`). + Group *string `json:"group,omitempty"` + // version is the API version of the defined custom resource. + // The custom resources are served under `/apis///...`. + // Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. + // Optional if `versions` is specified. + // Deprecated: use `versions` instead. + Version *string `json:"version,omitempty"` + // names specify the resource and kind names for the custom resource. + Names *CustomResourceDefinitionNamesApplyConfiguration `json:"names,omitempty"` + // scope indicates whether the defined custom resource is cluster- or namespace-scoped. + // Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`. + Scope *apiextensionsv1beta1.ResourceScope `json:"scope,omitempty"` + // validation describes the schema used for validation and pruning of the custom resource. + // If present, this validation schema is used to validate all versions. + // Top-level and per-version schemas are mutually exclusive. + Validation *CustomResourceValidationApplyConfiguration `json:"validation,omitempty"` + // subresources specify what subresources the defined custom resource has. + // If present, this field configures subresources for all versions. + // Top-level and per-version subresources are mutually exclusive. + Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` + // versions is the list of all API versions of the defined custom resource. + // Optional if `version` is specified. + // The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. + // Version names are used to compute the order in which served versions are listed in API discovery. + // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered + // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), + // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first + // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing + // major version, then minor version. An example sorted list of versions: + // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. + Versions []CustomResourceDefinitionVersionApplyConfiguration `json:"versions,omitempty"` + // additionalPrinterColumns specifies additional columns returned in Table output. + // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. + // If present, this field configures columns for all versions. + // Top-level and per-version columns are mutually exclusive. + // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. + AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` + // selectableFields specifies paths to fields that may be used as field selectors. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` + // conversion defines conversion settings for the CRD. + Conversion *CustomResourceConversionApplyConfiguration `json:"conversion,omitempty"` + // preserveUnknownFields indicates that object fields which are not specified + // in the OpenAPI schema should be preserved when persisting to storage. + // apiVersion, kind, metadata and known fields inside metadata are always preserved. + // If false, schemas must be defined for all versions. + // Defaults to true in v1beta for backwards compatibility. + // Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified + // in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. + // See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning for details. + PreserveUnknownFields *bool `json:"preserveUnknownFields,omitempty"` } // CustomResourceDefinitionSpecApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionSpec type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionstatus.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionstatus.go index 2c9c5e23c1a8b..9ef63d03b74d6 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionstatus.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionstatus.go @@ -20,10 +20,21 @@ package v1beta1 // CustomResourceDefinitionStatusApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionStatus type for use // with apply. +// +// CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition type CustomResourceDefinitionStatusApplyConfiguration struct { - Conditions []CustomResourceDefinitionConditionApplyConfiguration `json:"conditions,omitempty"` - AcceptedNames *CustomResourceDefinitionNamesApplyConfiguration `json:"acceptedNames,omitempty"` - StoredVersions []string `json:"storedVersions,omitempty"` + // conditions indicate state for particular aspects of a CustomResourceDefinition + Conditions []CustomResourceDefinitionConditionApplyConfiguration `json:"conditions,omitempty"` + // acceptedNames are the names that are actually being used to serve discovery. + // They may be different than the names in spec. + AcceptedNames *CustomResourceDefinitionNamesApplyConfiguration `json:"acceptedNames,omitempty"` + // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these + // versions allows a migration path for stored versions in etcd. The field is mutable + // so a migration controller can finish a migration to another version (ensuring + // no old objects are left in storage), and then remove the rest of the + // versions from this list. + // Versions may not be removed from `spec.versions` while they exist in this list. + StoredVersions []string `json:"storedVersions,omitempty"` } // CustomResourceDefinitionStatusApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionStatus type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go index 19ac26b039ab4..f26bfd4a660fb 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go @@ -20,16 +20,43 @@ package v1beta1 // CustomResourceDefinitionVersionApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionVersion type for use // with apply. +// +// CustomResourceDefinitionVersion describes a version for CRD. type CustomResourceDefinitionVersionApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Served *bool `json:"served,omitempty"` - Storage *bool `json:"storage,omitempty"` - Deprecated *bool `json:"deprecated,omitempty"` - DeprecationWarning *string `json:"deprecationWarning,omitempty"` - Schema *CustomResourceValidationApplyConfiguration `json:"schema,omitempty"` - Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` + // name is the version name, e.g. “v1”, “v2beta1”, etc. + // The custom resources are served under this version at `/apis///...` if `served` is true. + Name *string `json:"name,omitempty"` + // served is a flag enabling/disabling this version from being served via REST APIs + Served *bool `json:"served,omitempty"` + // storage indicates this version should be used when persisting custom resources to storage. + // There must be exactly one version with storage=true. + Storage *bool `json:"storage,omitempty"` + // deprecated indicates this version of the custom resource API is deprecated. + // When set to true, API requests to this version receive a warning header in the server response. + // Defaults to false. + Deprecated *bool `json:"deprecated,omitempty"` + // deprecationWarning overrides the default warning returned to API clients. + // May only be set when `deprecated` is true. + // The default warning indicates this version is deprecated and recommends use + // of the newest served version of equal or greater stability, if one exists. + DeprecationWarning *string `json:"deprecationWarning,omitempty"` + // schema describes the schema used for validation and pruning of this version of the custom resource. + // Top-level and per-version schemas are mutually exclusive. + // Per-version schemas must not all be set to identical values (top-level validation schema should be used instead). + Schema *CustomResourceValidationApplyConfiguration `json:"schema,omitempty"` + // subresources specify what subresources this version of the defined custom resource have. + // Top-level and per-version subresources are mutually exclusive. + // Per-version subresources must not all be set to identical values (top-level subresources should be used instead). + Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` + // additionalPrinterColumns specifies additional columns returned in Table output. + // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. + // Top-level and per-version columns are mutually exclusive. + // Per-version columns must not all be set to identical values (top-level columns should be used instead). + // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` - SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` + // selectableFields specifies paths to fields that may be used as field selectors. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` } // CustomResourceDefinitionVersionApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionVersion type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresources.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresources.go index 3ee82a0377c8d..6b92eb1fcddc6 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresources.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresources.go @@ -24,9 +24,16 @@ import ( // CustomResourceSubresourcesApplyConfiguration represents a declarative configuration of the CustomResourceSubresources type for use // with apply. +// +// CustomResourceSubresources defines the status and scale subresources for CustomResources. type CustomResourceSubresourcesApplyConfiguration struct { + // status indicates the custom resource should serve a `/status` subresource. + // When enabled: + // 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. + // 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object. Status *apiextensionsv1beta1.CustomResourceSubresourceStatus `json:"status,omitempty"` - Scale *CustomResourceSubresourceScaleApplyConfiguration `json:"scale,omitempty"` + // scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object. + Scale *CustomResourceSubresourceScaleApplyConfiguration `json:"scale,omitempty"` } // CustomResourceSubresourcesApplyConfiguration constructs a declarative configuration of the CustomResourceSubresources type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresourcescale.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresourcescale.go index b94d0e6685f74..4141699c4df87 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresourcescale.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresourcescale.go @@ -20,10 +20,30 @@ package v1beta1 // CustomResourceSubresourceScaleApplyConfiguration represents a declarative configuration of the CustomResourceSubresourceScale type for use // with apply. +// +// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. type CustomResourceSubresourceScaleApplyConfiguration struct { - SpecReplicasPath *string `json:"specReplicasPath,omitempty"` + // specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. + // Only JSON paths without the array notation are allowed. + // Must be a JSON Path under `.spec`. + // If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET. + SpecReplicasPath *string `json:"specReplicasPath,omitempty"` + // statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. + // Only JSON paths without the array notation are allowed. + // Must be a JSON Path under `.status`. + // If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource + // will default to 0. StatusReplicasPath *string `json:"statusReplicasPath,omitempty"` - LabelSelectorPath *string `json:"labelSelectorPath,omitempty"` + // labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. + // Only JSON paths without the array notation are allowed. + // Must be a JSON Path under `.status` or `.spec`. + // Must be set to work with HorizontalPodAutoscaler. + // The field pointed by this JSON path must be a string field (not a complex selector struct) + // which contains a serialized label selector in string form. + // More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource + // If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` + // subresource will default to the empty string. + LabelSelectorPath *string `json:"labelSelectorPath,omitempty"` } // CustomResourceSubresourceScaleApplyConfiguration constructs a declarative configuration of the CustomResourceSubresourceScale type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcevalidation.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcevalidation.go index a5cf3c096b654..64007c709a062 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcevalidation.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcevalidation.go @@ -20,7 +20,10 @@ package v1beta1 // CustomResourceValidationApplyConfiguration represents a declarative configuration of the CustomResourceValidation type for use // with apply. +// +// CustomResourceValidation is a list of validation methods for CustomResources. type CustomResourceValidationApplyConfiguration struct { + // openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning. OpenAPIV3Schema *JSONSchemaPropsApplyConfiguration `json:"openAPIV3Schema,omitempty"` } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/externaldocumentation.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/externaldocumentation.go index 5140d66ceb98d..42f7ace15f32e 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/externaldocumentation.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/externaldocumentation.go @@ -20,6 +20,8 @@ package v1beta1 // ExternalDocumentationApplyConfiguration represents a declarative configuration of the ExternalDocumentation type for use // with apply. +// +// ExternalDocumentation allows referencing an external resource for extended documentation. type ExternalDocumentationApplyConfiguration struct { Description *string `json:"description,omitempty"` URL *string `json:"url,omitempty"` diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/jsonschemaprops.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/jsonschemaprops.go index b90b9281c8d44..4997d47e6095b 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/jsonschemaprops.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/jsonschemaprops.go @@ -24,51 +24,142 @@ import ( // JSONSchemaPropsApplyConfiguration represents a declarative configuration of the JSONSchemaProps type for use // with apply. +// +// JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). type JSONSchemaPropsApplyConfiguration struct { - ID *string `json:"id,omitempty"` - Schema *apiextensionsv1beta1.JSONSchemaURL `json:"$schema,omitempty"` - Ref *string `json:"$ref,omitempty"` - Description *string `json:"description,omitempty"` - Type *string `json:"type,omitempty"` - Format *string `json:"format,omitempty"` - Title *string `json:"title,omitempty"` - Default *apiextensionsv1beta1.JSON `json:"default,omitempty"` - Maximum *float64 `json:"maximum,omitempty"` - ExclusiveMaximum *bool `json:"exclusiveMaximum,omitempty"` - Minimum *float64 `json:"minimum,omitempty"` - ExclusiveMinimum *bool `json:"exclusiveMinimum,omitempty"` - MaxLength *int64 `json:"maxLength,omitempty"` - MinLength *int64 `json:"minLength,omitempty"` - Pattern *string `json:"pattern,omitempty"` - MaxItems *int64 `json:"maxItems,omitempty"` - MinItems *int64 `json:"minItems,omitempty"` - UniqueItems *bool `json:"uniqueItems,omitempty"` - MultipleOf *float64 `json:"multipleOf,omitempty"` - Enum []apiextensionsv1beta1.JSON `json:"enum,omitempty"` - MaxProperties *int64 `json:"maxProperties,omitempty"` - MinProperties *int64 `json:"minProperties,omitempty"` - Required []string `json:"required,omitempty"` - Items *apiextensionsv1beta1.JSONSchemaPropsOrArray `json:"items,omitempty"` - AllOf []JSONSchemaPropsApplyConfiguration `json:"allOf,omitempty"` - OneOf []JSONSchemaPropsApplyConfiguration `json:"oneOf,omitempty"` - AnyOf []JSONSchemaPropsApplyConfiguration `json:"anyOf,omitempty"` - Not *JSONSchemaPropsApplyConfiguration `json:"not,omitempty"` - Properties map[string]JSONSchemaPropsApplyConfiguration `json:"properties,omitempty"` - AdditionalProperties *apiextensionsv1beta1.JSONSchemaPropsOrBool `json:"additionalProperties,omitempty"` - PatternProperties map[string]JSONSchemaPropsApplyConfiguration `json:"patternProperties,omitempty"` - Dependencies *apiextensionsv1beta1.JSONSchemaDependencies `json:"dependencies,omitempty"` - AdditionalItems *apiextensionsv1beta1.JSONSchemaPropsOrBool `json:"additionalItems,omitempty"` - Definitions *apiextensionsv1beta1.JSONSchemaDefinitions `json:"definitions,omitempty"` - ExternalDocs *ExternalDocumentationApplyConfiguration `json:"externalDocs,omitempty"` - Example *apiextensionsv1beta1.JSON `json:"example,omitempty"` - Nullable *bool `json:"nullable,omitempty"` - XPreserveUnknownFields *bool `json:"x-kubernetes-preserve-unknown-fields,omitempty"` - XEmbeddedResource *bool `json:"x-kubernetes-embedded-resource,omitempty"` - XIntOrString *bool `json:"x-kubernetes-int-or-string,omitempty"` - XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty"` - XListType *string `json:"x-kubernetes-list-type,omitempty"` - XMapType *string `json:"x-kubernetes-map-type,omitempty"` - XValidations *apiextensionsv1beta1.ValidationRules `json:"x-kubernetes-validations,omitempty"` + ID *string `json:"id,omitempty"` + Schema *apiextensionsv1beta1.JSONSchemaURL `json:"$schema,omitempty"` + Ref *string `json:"$ref,omitempty"` + Description *string `json:"description,omitempty"` + Type *string `json:"type,omitempty"` + // format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated: + // + // - bsonobjectid: a bson object ID, i.e. a 24 characters hex string + // - uri: an URI as parsed by Golang net/url.ParseRequestURI + // - email: an email address as parsed by Golang net/mail.ParseAddress + // - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. + // - ipv4: an IPv4 IP as parsed by Golang net.ParseIP + // - ipv6: an IPv6 IP as parsed by Golang net.ParseIP + // - cidr: a CIDR as parsed by Golang net.ParseCIDR + // - mac: a MAC address as parsed by Golang net.ParseMAC + // - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ + // - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ + // - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ + // - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ + // - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041" + // - isbn10: an ISBN10 number string like "0321751043" + // - isbn13: an ISBN13 number string like "978-0321751041" + // - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in + // - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ + // - hexcolor: an hexadecimal color code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ + // - rgbcolor: an RGB color code like rgb like "rgb(255,255,2559" + // - byte: base64 encoded binary data + // - password: any kind of string + // - date: a date string like "2006-01-02" as defined by full-date in RFC3339 + // - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format + // - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339. + Format *string `json:"format,omitempty"` + Title *string `json:"title,omitempty"` + // default is a default value for undefined object fields. + // Defaulting is a beta feature under the CustomResourceDefaulting feature gate. + // CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API. + Default *apiextensionsv1beta1.JSON `json:"default,omitempty"` + Maximum *float64 `json:"maximum,omitempty"` + ExclusiveMaximum *bool `json:"exclusiveMaximum,omitempty"` + Minimum *float64 `json:"minimum,omitempty"` + ExclusiveMinimum *bool `json:"exclusiveMinimum,omitempty"` + MaxLength *int64 `json:"maxLength,omitempty"` + MinLength *int64 `json:"minLength,omitempty"` + Pattern *string `json:"pattern,omitempty"` + MaxItems *int64 `json:"maxItems,omitempty"` + MinItems *int64 `json:"minItems,omitempty"` + UniqueItems *bool `json:"uniqueItems,omitempty"` + MultipleOf *float64 `json:"multipleOf,omitempty"` + Enum []apiextensionsv1beta1.JSON `json:"enum,omitempty"` + MaxProperties *int64 `json:"maxProperties,omitempty"` + MinProperties *int64 `json:"minProperties,omitempty"` + Required []string `json:"required,omitempty"` + Items *apiextensionsv1beta1.JSONSchemaPropsOrArray `json:"items,omitempty"` + AllOf []JSONSchemaPropsApplyConfiguration `json:"allOf,omitempty"` + OneOf []JSONSchemaPropsApplyConfiguration `json:"oneOf,omitempty"` + AnyOf []JSONSchemaPropsApplyConfiguration `json:"anyOf,omitempty"` + Not *JSONSchemaPropsApplyConfiguration `json:"not,omitempty"` + Properties map[string]JSONSchemaPropsApplyConfiguration `json:"properties,omitempty"` + AdditionalProperties *apiextensionsv1beta1.JSONSchemaPropsOrBool `json:"additionalProperties,omitempty"` + PatternProperties map[string]JSONSchemaPropsApplyConfiguration `json:"patternProperties,omitempty"` + Dependencies *apiextensionsv1beta1.JSONSchemaDependencies `json:"dependencies,omitempty"` + AdditionalItems *apiextensionsv1beta1.JSONSchemaPropsOrBool `json:"additionalItems,omitempty"` + Definitions *apiextensionsv1beta1.JSONSchemaDefinitions `json:"definitions,omitempty"` + ExternalDocs *ExternalDocumentationApplyConfiguration `json:"externalDocs,omitempty"` + Example *apiextensionsv1beta1.JSON `json:"example,omitempty"` + Nullable *bool `json:"nullable,omitempty"` + // x-kubernetes-preserve-unknown-fields stops the API server + // decoding step from pruning fields which are not specified + // in the validation schema. This affects fields recursively, + // but switches back to normal pruning behaviour if nested + // properties or additionalProperties are specified in the schema. + // This can either be true or undefined. False is forbidden. + XPreserveUnknownFields *bool `json:"x-kubernetes-preserve-unknown-fields,omitempty"` + // x-kubernetes-embedded-resource defines that the value is an + // embedded Kubernetes runtime.Object, with TypeMeta and + // ObjectMeta. The type must be object. It is allowed to further + // restrict the embedded object. kind, apiVersion and metadata + // are validated automatically. x-kubernetes-preserve-unknown-fields + // is allowed to be true, but does not have to be if the object + // is fully specified (up to kind, apiVersion, metadata). + XEmbeddedResource *bool `json:"x-kubernetes-embedded-resource,omitempty"` + // x-kubernetes-int-or-string specifies that this value is + // either an integer or a string. If this is true, an empty + // type is allowed and type as child of anyOf is permitted + // if following one of the following patterns: + // + // 1) anyOf: + // - type: integer + // - type: string + // 2) allOf: + // - anyOf: + // - type: integer + // - type: string + // - ... zero or more + XIntOrString *bool `json:"x-kubernetes-int-or-string,omitempty"` + // x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used + // as the index of the map. + // + // This tag MUST only be used on lists that have the "x-kubernetes-list-type" + // extension set to "map". Also, the values specified for this attribute must + // be a scalar typed field of the child structure (no nesting is supported). + // + // The properties specified must either be required or have a default value, + // to ensure those properties are present for all list items. + XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty"` + // x-kubernetes-list-type annotates an array to further describe its topology. + // This extension must only be used on lists and may have 3 possible values: + // + // 1) `atomic`: the list is treated as a single entity, like a scalar. + // Atomic lists will be entirely replaced when updated. This extension + // may be used on any type of list (struct, scalar, ...). + // 2) `set`: + // Sets are lists that must not have multiple items with the same value. Each + // value must be a scalar, an object with x-kubernetes-map-type `atomic` or an + // array with x-kubernetes-list-type `atomic`. + // 3) `map`: + // These lists are like maps in that their elements have a non-index key + // used to identify them. Order is preserved upon merge. The map tag + // must only be used on a list with elements of type object. + // Defaults to atomic for arrays. + XListType *string `json:"x-kubernetes-list-type,omitempty"` + // x-kubernetes-map-type annotates an object to further describe its topology. + // This extension must only be used when type is object and may have 2 possible values: + // + // 1) `granular`: + // These maps are actual maps (key-value pairs) and each fields are independent + // from each other (they can each be manipulated by separate actors). This is + // the default behaviour for all maps. + // 2) `atomic`: the list is treated as a single entity, like a scalar. + // Atomic maps will be entirely replaced when updated. + XMapType *string `json:"x-kubernetes-map-type,omitempty"` + // x-kubernetes-validations describes a list of validation rules written in the CEL expression language. + XValidations *apiextensionsv1beta1.ValidationRules `json:"x-kubernetes-validations,omitempty"` } // JSONSchemaPropsApplyConfiguration constructs a declarative configuration of the JSONSchemaProps type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go index 1a372e6fafdcd..a216cd886d998 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go @@ -20,7 +20,17 @@ package v1beta1 // SelectableFieldApplyConfiguration represents a declarative configuration of the SelectableField type for use // with apply. +// +// SelectableField specifies the JSON path of a field that may be used with field selectors. type SelectableFieldApplyConfiguration struct { + // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a + // field selector value. + // Only JSON paths without the array notation are allowed. + // Must point to a field of type string, boolean or integer. Types with enum values + // and strings with formats are allowed. + // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. + // Must not point to metdata fields. + // Required. JSONPath *string `json:"jsonPath,omitempty"` } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/servicereference.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/servicereference.go index 70cc6b5b27198..2d2ef35f69e96 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/servicereference.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/servicereference.go @@ -20,11 +20,21 @@ package v1beta1 // ServiceReferenceApplyConfiguration represents a declarative configuration of the ServiceReference type for use // with apply. +// +// ServiceReference holds a reference to Service.legacy.k8s.io type ServiceReferenceApplyConfiguration struct { + // namespace is the namespace of the service. + // Required Namespace *string `json:"namespace,omitempty"` - Name *string `json:"name,omitempty"` - Path *string `json:"path,omitempty"` - Port *int32 `json:"port,omitempty"` + // name is the name of the service. + // Required + Name *string `json:"name,omitempty"` + // path is an optional URL path at which the webhook will be contacted. + Path *string `json:"path,omitempty"` + // port is an optional service port at which the webhook will be contacted. + // `port` should be a valid port number (1-65535, inclusive). + // Defaults to 443 for backward compatibility. + Port *int32 `json:"port,omitempty"` } // ServiceReferenceApplyConfiguration constructs a declarative configuration of the ServiceReference type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/validationrule.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/validationrule.go index c9b3da89ba581..4e1c108fa0b86 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/validationrule.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/validationrule.go @@ -24,13 +24,121 @@ import ( // ValidationRuleApplyConfiguration represents a declarative configuration of the ValidationRule type for use // with apply. +// +// ValidationRule describes a validation rule written in the CEL expression language. type ValidationRuleApplyConfiguration struct { - Rule *string `json:"rule,omitempty"` - Message *string `json:"message,omitempty"` - MessageExpression *string `json:"messageExpression,omitempty"` - Reason *apiextensionsv1beta1.FieldValueErrorReason `json:"reason,omitempty"` - FieldPath *string `json:"fieldPath,omitempty"` - OptionalOldSelf *bool `json:"optionalOldSelf,omitempty"` + // Rule represents the expression which will be evaluated by CEL. + // ref: https://github.com/google/cel-spec + // The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. + // The `self` variable in the CEL expression is bound to the scoped value. + // Example: + // - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual <= self.spec.maxDesired"} + // + // If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable + // via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as + // absent fields in CEL expressions. + // If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map + // are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map + // are accessible via CEL macros and functions such as `self.all(...)`. + // If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and + // functions. + // If the Rule is scoped to a scalar, `self` is bound to the scalar value. + // Examples: + // - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority < 10"} + // - Rule scoped to a list of integers: {"rule": "self.values.all(value, value >= 0 && value < 100)"} + // - Rule scoped to a string value: {"rule": "self.startsWith('kube')"} + // + // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the + // object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible. + // + // Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL + // expressions. This includes: + // - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. + // - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as: + // - A schema with no type and x-kubernetes-preserve-unknown-fields set to true + // - An array where the items schema is of an "unknown type" + // - An object where the additionalProperties schema is of an "unknown type" + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Accessible property names are escaped according to the following rules when accessed in the expression: + // - '__' escapes to '__underscores__' + // - '.' escapes to '__dot__' + // - '-' escapes to '__dash__' + // - '/' escapes to '__slash__' + // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: + // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", + // "import", "let", "loop", "package", "namespace", "return". + // Examples: + // - Rule accessing a property named "namespace": {"rule": "self.__namespace__ > 0"} + // - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop > 0"} + // - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d > 0"} + // + // Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. + // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: + // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and + // non-intersecting elements in `Y` are appended, retaining their partial order. + // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values + // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with + // non-intersecting keys are appended, retaining their partial order. + // + // If `rule` makes use of the `oldSelf` variable it is implicitly a + // `transition rule`. + // + // By default, the `oldSelf` variable is the same type as `self`. + // When `optionalOldSelf` is true, the `oldSelf` variable is a CEL optional + // variable whose value() is the same type as `self`. + // See the documentation for the `optionalOldSelf` field for details. + // + // Transition rules by default are applied only on UPDATE requests and are + // skipped if an old value could not be found. You can opt a transition + // rule into unconditional evaluation by setting `optionalOldSelf` to true. + Rule *string `json:"rule,omitempty"` + // Message represents the message displayed when validation fails. The message is required if the Rule contains + // line breaks. The message must not contain line breaks. + // If unset, the message is "failed rule: {Rule}". + // e.g. "must be a URL with the host matching spec.host" + Message *string `json:"message,omitempty"` + // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. + // Since messageExpression is used as a failure message, it must evaluate to a string. + // If both message and messageExpression are present on a rule, then messageExpression will be used if validation + // fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced + // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string + // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and + // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. + // messageExpression has access to all the same variables as the rule; the only difference is the return type. + // Example: + // "x must be less than max ("+string(self.max)+")" + MessageExpression *string `json:"messageExpression,omitempty"` + // reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. + // The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. + // The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". + // If not set, default to use "FieldValueInvalid". + // All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. + Reason *apiextensionsv1beta1.FieldValueErrorReason `json:"reason,omitempty"` + // fieldPath represents the field path returned when the validation fails. + // It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. + // e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` + // If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` + // It does not support list numeric index. + // It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. + // Numeric index of array is not supported. + // For field name which contains special characters, use `['specialName']` to refer the field name. + // e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` + FieldPath *string `json:"fieldPath,omitempty"` + // optionalOldSelf is used to opt a transition rule into evaluation + // even when the object is first created, or if the old object is + // missing the value. + // + // When enabled `oldSelf` will be a CEL optional whose value will be + // `None` if there is no old value, or when the object is initially created. + // + // You may check for presence of oldSelf using `oldSelf.hasValue()` and + // unwrap it after checking using `oldSelf.value()`. Check the CEL + // documentation for Optional types for more information: + // https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes + // + // May not be set unless `oldSelf` is used in `rule`. + OptionalOldSelf *bool `json:"optionalOldSelf,omitempty"` } // ValidationRuleApplyConfiguration constructs a declarative configuration of the ValidationRule type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/webhookclientconfig.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/webhookclientconfig.go index 76ff71b4aec3f..67b7fcb09d952 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/webhookclientconfig.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/webhookclientconfig.go @@ -20,10 +20,43 @@ package v1beta1 // WebhookClientConfigApplyConfiguration represents a declarative configuration of the WebhookClientConfig type for use // with apply. +// +// WebhookClientConfig contains the information to make a TLS connection with the webhook. type WebhookClientConfigApplyConfiguration struct { - URL *string `json:"url,omitempty"` - Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"` - CABundle []byte `json:"caBundle,omitempty"` + // url gives the location of the webhook, in standard URL form + // (`scheme://host:port/path`). Exactly one of `url` or `service` + // must be specified. + // + // The `host` should not refer to a service running in the cluster; use + // the `service` field instead. The host might be resolved via external + // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve + // in-cluster DNS as that would be a layering violation). `host` may + // also be an IP address. + // + // Please note that using `localhost` or `127.0.0.1` as a `host` is + // risky unless you take great care to run this webhook on all hosts + // which run an apiserver which might need to make calls to this + // webhook. Such installs are likely to be non-portable, i.e., not easy + // to turn up in a new cluster. + // + // The scheme must be "https"; the URL must begin with "https://". + // + // A path is optional, and if present may be any string permissible in + // a URL. You may use the path to pass an arbitrary string to the + // webhook, for example, a cluster identifier. + // + // Attempting to use a user or basic auth e.g. "user:password@" is not + // allowed. Fragments ("#...") and query parameters ("?...") are not + // allowed, either. + URL *string `json:"url,omitempty"` + // service is a reference to the service for this webhook. Either + // service or url must be specified. + // + // If the webhook is running within the cluster, then you should use `service`. + Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"` + // caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. + // If unspecified, system trust roots on the apiserver are used. + CABundle []byte `json:"caBundle,omitempty"` } // WebhookClientConfigApplyConfiguration constructs a declarative configuration of the WebhookClientConfig type for use with diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/clientset_generated.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/clientset_generated.go index 0ac62fa71a464..1b38b880bc8b1 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/clientset_generated.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/clientset_generated.go @@ -38,7 +38,7 @@ import ( // without applying any field management, validations and/or defaults. It shouldn't be considered a replacement // for a real clientset and is mostly useful in simple unit tests. // -// DEPRECATED: NewClientset replaces this with support for field management, which significantly improves +// Deprecated: NewClientset replaces this with support for field management, which significantly improves // server side apply testing. NewClientset is only available when apply configurations are generated (e.g. // via --with-applyconfig). func NewSimpleClientset(objects ...runtime.Object) *Clientset { @@ -54,8 +54,8 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { cs.AddReactor("*", "*", testing.ObjectReaction(o)) cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { var opts metav1.ListOptions - if watchActcion, ok := action.(testing.WatchActionImpl); ok { - opts = watchActcion.ListOptions + if watchAction, ok := action.(testing.WatchActionImpl); ok { + opts = watchAction.ListOptions } gvr := action.GetResource() ns := action.GetNamespace() diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/factory.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/factory.go index a22336a31f64c..e8d6e5b2644f2 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/factory.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/factory.go @@ -97,6 +97,7 @@ func NewSharedInformerFactory(client clientset.Interface, defaultResync time.Dur // NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. // Listers obtained via this SharedInformerFactory will be subject to the same filters // as specified here. +// // Deprecated: Please use NewSharedInformerFactoryWithOptions instead func NewFilteredSharedInformerFactory(client clientset.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) @@ -204,7 +205,7 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal // // It is typically used like this: // -// ctx, cancel := context.Background() +// ctx, cancel := context.WithCancel(context.Background()) // defer cancel() // factory := NewSharedInformerFactory(client, resyncPeriod) // defer factory.WaitForStop() // Returns immediately if nothing was started. diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/apiapproval/apiapproval_controller.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/apiapproval/apiapproval_controller.go index ac1d46e4db85a..6ea0d74d0f83f 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/apiapproval/apiapproval_controller.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/apiapproval/apiapproval_controller.go @@ -44,7 +44,7 @@ type KubernetesAPIApprovalPolicyConformantConditionController struct { crdSynced cache.InformerSynced // To allow injection for testing. - syncFn func(key string) error + syncFn func(ctx context.Context, key string) error queue workqueue.TypedRateLimitingInterface[string] @@ -127,7 +127,7 @@ func calculateCondition(crd *apiextensionsv1.CustomResourceDefinition) *apiexten } } -func (c *KubernetesAPIApprovalPolicyConformantConditionController) sync(key string) error { +func (c *KubernetesAPIApprovalPolicyConformantConditionController) sync(ctx context.Context, key string) error { inCustomResourceDefinition, err := c.crdLister.Get(key) if apierrors.IsNotFound(err) { return nil @@ -163,7 +163,7 @@ func (c *KubernetesAPIApprovalPolicyConformantConditionController) sync(key stri crd := inCustomResourceDefinition.DeepCopy() apihelpers.SetCRDCondition(crd, *cond) - _, err = c.crdClient.CustomResourceDefinitions().UpdateStatus(context.TODO(), crd, metav1.UpdateOptions{}) + _, err = c.crdClient.CustomResourceDefinitions().UpdateStatus(ctx, crd, metav1.UpdateOptions{}) if apierrors.IsNotFound(err) || apierrors.IsConflict(err) { // deleted or changed in the meantime, we'll get called again return nil @@ -183,37 +183,44 @@ func (c *KubernetesAPIApprovalPolicyConformantConditionController) sync(key stri // Run starts the controller. func (c *KubernetesAPIApprovalPolicyConformantConditionController) Run(workers int, stopCh <-chan struct{}) { + c.RunWithContext(workers, wait.ContextForChannel(stopCh)) +} + +// RunWithContext starts the controller with a context. +// +//logcheck:context // RunWithContext should be used instead of Run in code which supports contextual logging. +func (c *KubernetesAPIApprovalPolicyConformantConditionController) RunWithContext(workers int, ctx context.Context) { defer utilruntime.HandleCrash() defer c.queue.ShutDown() klog.Infof("Starting KubernetesAPIApprovalPolicyConformantConditionController") defer klog.Infof("Shutting down KubernetesAPIApprovalPolicyConformantConditionController") - if !cache.WaitForCacheSync(stopCh, c.crdSynced) { + if !cache.WaitForCacheSync(ctx.Done(), c.crdSynced) { return } for i := 0; i < workers; i++ { - go wait.Until(c.runWorker, time.Second, stopCh) + go wait.UntilWithContext(ctx, c.runWorker, time.Second) } - <-stopCh + <-ctx.Done() } -func (c *KubernetesAPIApprovalPolicyConformantConditionController) runWorker() { - for c.processNextWorkItem() { +func (c *KubernetesAPIApprovalPolicyConformantConditionController) runWorker(ctx context.Context) { + for c.processNextWorkItem(ctx) { } } // processNextWorkItem deals with one key off the queue. It returns false when it's time to quit. -func (c *KubernetesAPIApprovalPolicyConformantConditionController) processNextWorkItem() bool { +func (c *KubernetesAPIApprovalPolicyConformantConditionController) processNextWorkItem(ctx context.Context) bool { key, quit := c.queue.Get() if quit { return false } defer c.queue.Done(key) - err := c.syncFn(key) + err := c.syncFn(ctx, key) if err == nil { c.queue.Forget(key) return true diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go index 65eb247e5601d..917309b73c4a0 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go @@ -45,7 +45,7 @@ type EstablishingController struct { crdSynced cache.InformerSynced // To allow injection for testing. - syncFn func(key string) error + syncFn func(ctx context.Context, key string) error queue workqueue.TypedRateLimitingInterface[string] } @@ -73,39 +73,45 @@ func (ec *EstablishingController) QueueCRD(key string, timeout time.Duration) { ec.queue.AddAfter(key, timeout) } -// Run starts the EstablishingController. -func (ec *EstablishingController) Run(stopCh <-chan struct{}) { +// RunWithContext starts the EstablishingController. +func (ec *EstablishingController) RunWithContext(ctx context.Context) { defer utilruntime.HandleCrash() defer ec.queue.ShutDown() - klog.Info("Starting EstablishingController") - defer klog.Info("Shutting down EstablishingController") + logger := klog.FromContext(ctx) + logger.V(2).Info("Starting EstablishingController") + defer logger.V(2).Info("Shutting down EstablishingController") - if !cache.WaitForCacheSync(stopCh, ec.crdSynced) { + if !cache.WaitForCacheSync(ctx.Done(), ec.crdSynced) { return } - // only start one worker thread since its a slow moving API - go wait.Until(ec.runWorker, time.Second, stopCh) + // only start one worker thread since the EstablishingController is not a bottleneck + go wait.UntilWithContext(ctx, ec.runWorker, time.Second) + + <-ctx.Done() +} - <-stopCh +//logcheck:context // RunWithContext should be used instead of Run in code which supports contextual logging. +func (ec *EstablishingController) Run(stopCh <-chan struct{}) { + ec.RunWithContext(wait.ContextForChannel(stopCh)) } -func (ec *EstablishingController) runWorker() { - for ec.processNextWorkItem() { +func (ec *EstablishingController) runWorker(ctx context.Context) { + for ec.processNextWorkItem(ctx) { } } // processNextWorkItem deals with one key off the queue. // It returns false when it's time to quit. -func (ec *EstablishingController) processNextWorkItem() bool { +func (ec *EstablishingController) processNextWorkItem(ctx context.Context) bool { key, quit := ec.queue.Get() if quit { return false } defer ec.queue.Done(key) - err := ec.syncFn(key) + err := ec.syncFn(ctx, key) if err == nil { ec.queue.Forget(key) return true @@ -118,7 +124,7 @@ func (ec *EstablishingController) processNextWorkItem() bool { } // sync is used to turn CRDs into the Established state. -func (ec *EstablishingController) sync(key string) error { +func (ec *EstablishingController) sync(ctx context.Context, key string) error { cachedCRD, err := ec.crdLister.Get(key) if apierrors.IsNotFound(err) { return nil @@ -158,7 +164,7 @@ func (ec *EstablishingController) sync(key string) error { } // Update server with new CRD condition. - _, err = ec.crdClient.CustomResourceDefinitions().UpdateStatus(context.TODO(), crd, metav1.UpdateOptions{}) + _, err = ec.crdClient.CustomResourceDefinitions().UpdateStatus(ctx, crd, metav1.UpdateOptions{}) if apierrors.IsNotFound(err) || apierrors.IsConflict(err) { // deleted or changed in the meantime, we'll get called again return nil diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/nonstructuralschema/nonstructuralschema_controller.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/nonstructuralschema/nonstructuralschema_controller.go index 55e467d9c0549..57eb1686a5d08 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/nonstructuralschema/nonstructuralschema_controller.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/nonstructuralschema/nonstructuralschema_controller.go @@ -48,7 +48,7 @@ type ConditionController struct { crdSynced cache.InformerSynced // To allow injection for testing. - syncFn func(key string) error + syncFn func(ctx context.Context, key string) error queue workqueue.TypedRateLimitingInterface[string] @@ -132,7 +132,7 @@ func calculateCondition(in *apiextensionsv1.CustomResourceDefinition) *apiextens return cond } -func (c *ConditionController) sync(key string) error { +func (c *ConditionController) sync(ctx context.Context, key string) error { inCustomResourceDefinition, err := c.crdLister.Get(key) if apierrors.IsNotFound(err) { return nil @@ -169,7 +169,7 @@ func (c *ConditionController) sync(key string) error { apiextensionshelpers.SetCRDCondition(crd, *cond) } - _, err = c.crdClient.CustomResourceDefinitions().UpdateStatus(context.TODO(), crd, metav1.UpdateOptions{}) + _, err = c.crdClient.CustomResourceDefinitions().UpdateStatus(ctx, crd, metav1.UpdateOptions{}) if apierrors.IsNotFound(err) || apierrors.IsConflict(err) { // deleted or changed in the meantime, we'll get called again return nil @@ -188,38 +188,45 @@ func (c *ConditionController) sync(key string) error { } // Run starts the controller. +// +//logcheck:context // RunWithContext should be used instead of Run in code which supports contextual logging. func (c *ConditionController) Run(workers int, stopCh <-chan struct{}) { + c.RunWithContext(workers, wait.ContextForChannel(stopCh)) +} + +// RunWithContext is a context-aware version of Run. +func (c *ConditionController) RunWithContext(workers int, ctx context.Context) { defer utilruntime.HandleCrash() defer c.queue.ShutDown() klog.Infof("Starting NonStructuralSchemaConditionController") defer klog.Infof("Shutting down NonStructuralSchemaConditionController") - if !cache.WaitForCacheSync(stopCh, c.crdSynced) { + if !cache.WaitForCacheSync(ctx.Done(), c.crdSynced) { return } for i := 0; i < workers; i++ { - go wait.Until(c.runWorker, time.Second, stopCh) + go wait.UntilWithContext(ctx, c.runWorker, time.Second) } - <-stopCh + <-ctx.Done() } -func (c *ConditionController) runWorker() { - for c.processNextWorkItem() { +func (c *ConditionController) runWorker(ctx context.Context) { + for c.processNextWorkItem(ctx) { } } // processNextWorkItem deals with one key off the queue. It returns false when it's time to quit. -func (c *ConditionController) processNextWorkItem() bool { +func (c *ConditionController) processNextWorkItem(ctx context.Context) bool { key, quit := c.queue.Get() if quit { return false } defer c.queue.Done(key) - err := c.syncFn(key) + err := c.syncFn(ctx, key) if err == nil { c.queue.Forget(key) return true diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder.go index 51cde0cac154d..f598be356ba0f 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder.go @@ -19,11 +19,15 @@ package builder import ( "fmt" "net/http" + "slices" "strings" "sync" "github.com/emicklei/go-restful/v3" + "golang.org/x/text/cases" + "golang.org/x/text/language" + v1 "k8s.io/api/autoscaling/v1" apiextensionshelpers "k8s.io/apiextensions-apiserver/pkg/apihelpers" apiextensionsinternal "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" @@ -55,8 +59,8 @@ const ( objectMetaSchemaRef = "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" listMetaSchemaRef = "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - typeMetaType = "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta" - objectMetaType = "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta" + typeMetaType = "io.k8s.apimachinery.pkg.apis.meta.v1.TypeMeta" + objectMetaType = "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" definitionPrefix = "#/definitions/" v3DefinitionPrefix = "#/components/schemas/" @@ -223,7 +227,7 @@ type CRDCanonicalTypeNamer struct { // OpenAPICanonicalTypeName returns canonical type name for given CRD func (c *CRDCanonicalTypeNamer) OpenAPICanonicalTypeName() string { - return fmt.Sprintf("%s/%s.%s", c.group, c.version, c.kind) + return gvkToModelName(c.group, c.version, c.kind) } // builder contains validation schema and basic naming information for a CRD in @@ -314,7 +318,7 @@ func (b *builder) buildRoute(root, path, httpMethod, actionVerb, operationVerb s To(func(req *restful.Request, res *restful.Response) {}). Doc(b.descriptionFor(path, operationVerb)). Param(b.ws.QueryParameter("pretty", "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).")). - Operation(operationVerb+namespaced+b.kind+strings.Title(subresource(path))). + Operation(operationVerb+namespaced+b.kind+cases.Title(language.English).String(subresource(path))). Metadata(endpoints.RouteMetaGVK, metav1.GroupVersionKind{ Group: b.group, Version: b.version, @@ -381,7 +385,11 @@ func (b *builder) buildKubeNative(crd *apiextensionsv1.CustomResourceDefinition, // and forbid anything outside of apiVersion, kind and metadata. We have to fix kubectl to stop doing this, e.g. by // adding additionalProperties=true support to explicitly allow additional fields. // TODO: fix kubectl to understand additionalProperties=true - if schema == nil || (opts.V2 && (schema.XPreserveUnknownFields || crdPreserveUnknownFields)) { + if schema == nil { + ret = &spec.Schema{ + SchemaProps: spec.SchemaProps{Type: []string{"object"}}, + } + } else if opts.V2 && (schema.XPreserveUnknownFields || crdPreserveUnknownFields) { ret = &spec.Schema{ SchemaProps: spec.SchemaProps{Type: []string{"object"}}, } @@ -495,7 +503,7 @@ func addTypeMetaProperties(s *spec.Schema, v2 bool) { // buildListSchema builds the list kind schema for the CRD func (b *builder) buildListSchema(crd *apiextensionsv1.CustomResourceDefinition, opts Options) *spec.Schema { - name := definitionPrefix + util.ToRESTFriendlyName(fmt.Sprintf("%s/%s/%s", b.group, b.version, b.kind)) + name := definitionPrefix + gvkToModelName(b.group, b.version, b.kind) doc := fmt.Sprintf("List of %s. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md", b.plural) s := new(spec.Schema). Typed("object", ""). @@ -520,6 +528,13 @@ func (b *builder) buildListSchema(crd *apiextensionsv1.CustomResourceDefinition, return s } +func gvkToModelName(g, v, k string) string { + groupParts := strings.Split(g, ".") + slices.Reverse(groupParts) + g = strings.Join(groupParts, ".") + return fmt.Sprintf("%s.%s.%s", g, v, k) +} + // getOpenAPIConfig builds config which wires up generated definitions for kube-openapi to consume func (b *builder) getOpenAPIConfig() *common.Config { return &common.Config{ @@ -544,11 +559,11 @@ func (b *builder) getOpenAPIConfig() *common.Config { }, GetDefinitions: func(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { def := utilopenapi.GetOpenAPIDefinitionsWithoutDisabledFeatures(generatedopenapi.GetOpenAPIDefinitions)(ref) - def[fmt.Sprintf("%s/%s.%s", b.group, b.version, b.kind)] = common.OpenAPIDefinition{ + def[gvkToModelName(b.group, b.version, b.kind)] = common.OpenAPIDefinition{ Schema: *b.schema, Dependencies: []string{objectMetaType}, } - def[fmt.Sprintf("%s/%s.%s", b.group, b.version, b.listKind)] = common.OpenAPIDefinition{ + def[gvkToModelName(b.group, b.version, b.listKind)] = common.OpenAPIDefinition{ Schema: *b.listSchema, } return def @@ -578,11 +593,11 @@ func (b *builder) getOpenAPIV3Config() *common.OpenAPIV3Config { }, GetDefinitions: func(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { def := utilopenapi.GetOpenAPIDefinitionsWithoutDisabledFeatures(generatedopenapi.GetOpenAPIDefinitions)(ref) - def[fmt.Sprintf("%s/%s.%s", b.group, b.version, b.kind)] = common.OpenAPIDefinition{ + def[gvkToModelName(b.group, b.version, b.kind)] = common.OpenAPIDefinition{ Schema: *b.schema, Dependencies: []string{objectMetaType}, } - def[fmt.Sprintf("%s/%s.%s", b.group, b.version, b.listKind)] = common.OpenAPIDefinition{ + def[gvkToModelName(b.group, b.version, b.listKind)] = common.OpenAPIDefinition{ Schema: *b.listSchema, } return def diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder_test.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder_test.go index 5dbc35b0c6db6..d662600a5cd2f 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder_test.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder_test.go @@ -656,7 +656,7 @@ func TestGetDefinitionRefPrefix(t *testing.T) { // the first call to getDefinition // ManagedFieldsEntry's Time field is known to use arefs - managedFieldsTypePath := "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry" + managedFieldsTypePath := "io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry" v2Ref := getDefinition(managedFieldsTypePath, true).SchemaProps.Properties["time"].SchemaProps.Ref v3Ref := getDefinition(managedFieldsTypePath, false).SchemaProps.Properties["time"].SchemaProps.Ref diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller_test.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller_test.go index e3204c766977f..76f288ace8b15 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller_test.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller_test.go @@ -414,12 +414,14 @@ func (t *testEnv) fetchOpenAPIOrDie() *spec.Swagger { } func (t *testEnv) expectPath(swagger *spec.Swagger, path string) { + t.t.Helper() if _, ok := swagger.Paths.Paths[path]; !ok { t.t.Errorf("Expected path %s to exist in OpenAPI", path) } } func (t *testEnv) expectNoPath(swagger *spec.Swagger, path string) { + t.t.Helper() if _, ok := swagger.Paths.Paths[path]; ok { t.t.Errorf("Expected path %s to not exist in OpenAPI", path) } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go index ba448a150cf73..518237c3ebb2d 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go @@ -56,7 +56,7 @@ type NamingConditionController struct { crdMutationCache cache.MutationCache // To allow injection for testing. - syncFn func(key string) error + syncFn func(ctx context.Context, key string) error queue workqueue.TypedRateLimitingInterface[string] } @@ -239,7 +239,7 @@ func equalToAcceptedOrFresh(requestedName, acceptedName string, usedNames sets.S return fmt.Errorf("%q is already in use", requestedName) } -func (c *NamingConditionController) sync(key string) error { +func (c *NamingConditionController) sync(ctx context.Context, key string) error { inCustomResourceDefinition, err := c.crdLister.Get(key) if apierrors.IsNotFound(err) { // CRD was deleted and has freed its names. @@ -271,7 +271,7 @@ func (c *NamingConditionController) sync(key string) error { apiextensionshelpers.SetCRDCondition(crd, namingCondition) apiextensionshelpers.SetCRDCondition(crd, establishedCondition) - updatedObj, err := c.crdClient.CustomResourceDefinitions().UpdateStatus(context.TODO(), crd, metav1.UpdateOptions{}) + updatedObj, err := c.crdClient.CustomResourceDefinitions().UpdateStatus(ctx, crd, metav1.UpdateOptions{}) if apierrors.IsNotFound(err) || apierrors.IsConflict(err) { // deleted or changed in the meantime, we'll get called again return nil @@ -292,37 +292,43 @@ func (c *NamingConditionController) sync(key string) error { return nil } +//logcheck:context // RunWithContext should be used instead of Run in code which supports contextual logging. func (c *NamingConditionController) Run(stopCh <-chan struct{}) { + c.RunWithContext(wait.ContextForChannel(stopCh)) +} + +// RunWithContext is a context-aware version of Run. +func (c *NamingConditionController) RunWithContext(ctx context.Context) { defer utilruntime.HandleCrash() defer c.queue.ShutDown() klog.Info("Starting NamingConditionController") defer klog.Info("Shutting down NamingConditionController") - if !cache.WaitForCacheSync(stopCh, c.crdSynced) { + if !cache.WaitForCacheSync(ctx.Done(), c.crdSynced) { return } // only start one worker thread since its a slow moving API and the naming conflict resolution bits aren't thread-safe - go wait.Until(c.runWorker, time.Second, stopCh) + go wait.UntilWithContext(ctx, c.runWorker, time.Second) - <-stopCh + <-ctx.Done() } -func (c *NamingConditionController) runWorker() { - for c.processNextWorkItem() { +func (c *NamingConditionController) runWorker(ctx context.Context) { + for c.processNextWorkItem(ctx) { } } // processNextWorkItem deals with one key off the queue. It returns false when it's time to quit. -func (c *NamingConditionController) processNextWorkItem() bool { +func (c *NamingConditionController) processNextWorkItem(ctx context.Context) bool { key, quit := c.queue.Get() if quit { return false } defer c.queue.Done(key) - err := c.syncFn(key) + err := c.syncFn(ctx, key) if err == nil { c.queue.Forget(key) return true diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/generated/openapi/zz_generated.openapi.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/generated/openapi/zz_generated.openapi.go index d6467e8229213..35a52e962043b 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/generated/openapi/zz_generated.openapi.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/generated/openapi/zz_generated.openapi.go @@ -22,142 +22,147 @@ limitations under the License. package openapi import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + v1 "k8s.io/api/autoscaling/v1" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" v1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + resource "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + version "k8s.io/apimachinery/pkg/version" common "k8s.io/kube-openapi/pkg/common" spec "k8s.io/kube-openapi/pkg/validation/spec" ) func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "k8s.io/api/autoscaling/v1.ContainerResourceMetricSource": schema_k8sio_api_autoscaling_v1_ContainerResourceMetricSource(ref), - "k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus": schema_k8sio_api_autoscaling_v1_ContainerResourceMetricStatus(ref), - "k8s.io/api/autoscaling/v1.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref), - "k8s.io/api/autoscaling/v1.ExternalMetricSource": schema_k8sio_api_autoscaling_v1_ExternalMetricSource(ref), - "k8s.io/api/autoscaling/v1.ExternalMetricStatus": schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref), - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref), - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerCondition": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref), - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerList": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref), - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref), - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref), - "k8s.io/api/autoscaling/v1.MetricSpec": schema_k8sio_api_autoscaling_v1_MetricSpec(ref), - "k8s.io/api/autoscaling/v1.MetricStatus": schema_k8sio_api_autoscaling_v1_MetricStatus(ref), - "k8s.io/api/autoscaling/v1.ObjectMetricSource": schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref), - "k8s.io/api/autoscaling/v1.ObjectMetricStatus": schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref), - "k8s.io/api/autoscaling/v1.PodsMetricSource": schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref), - "k8s.io/api/autoscaling/v1.PodsMetricStatus": schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref), - "k8s.io/api/autoscaling/v1.ResourceMetricSource": schema_k8sio_api_autoscaling_v1_ResourceMetricSource(ref), - "k8s.io/api/autoscaling/v1.ResourceMetricStatus": schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref), - "k8s.io/api/autoscaling/v1.Scale": schema_k8sio_api_autoscaling_v1_Scale(ref), - "k8s.io/api/autoscaling/v1.ScaleSpec": schema_k8sio_api_autoscaling_v1_ScaleSpec(ref), - "k8s.io/api/autoscaling/v1.ScaleStatus": schema_k8sio_api_autoscaling_v1_ScaleStatus(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest": schema_pkg_apis_apiextensions_v1_ConversionRequest(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse": schema_pkg_apis_apiextensions_v1_ConversionResponse(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionReview": schema_pkg_apis_apiextensions_v1_ConversionReview(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition": schema_pkg_apis_apiextensions_v1_CustomResourceColumnDefinition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion": schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition": schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionList": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionNames(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale": schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceScale(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus": schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceStatus(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources": schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation": schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation": schema_pkg_apis_apiextensions_v1_ExternalDocumentation(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON": schema_pkg_apis_apiextensions_v1_JSON(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps": schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrArray(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.SelectableField": schema_pkg_apis_apiextensions_v1_SelectableField(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference": schema_pkg_apis_apiextensions_v1_ServiceReference(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ValidationRule": schema_pkg_apis_apiextensions_v1_ValidationRule(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig": schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion": schema_pkg_apis_apiextensions_v1_WebhookConversion(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest": schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse": schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionReview": schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition": schema_pkg_apis_apiextensions_v1beta1_CustomResourceColumnDefinition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion": schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionList": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionNames(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceScale(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceStatus(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation": schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation": schema_pkg_apis_apiextensions_v1beta1_ExternalDocumentation(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON": schema_pkg_apis_apiextensions_v1beta1_JSON(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrArray(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.SelectableField": schema_pkg_apis_apiextensions_v1beta1_SelectableField(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference": schema_pkg_apis_apiextensions_v1beta1_ServiceReference(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ValidationRule": schema_pkg_apis_apiextensions_v1beta1_ValidationRule(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig": schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ApplyOptions": schema_pkg_apis_meta_v1_ApplyOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition": schema_pkg_apis_meta_v1_Condition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldSelectorRequirement": schema_pkg_apis_meta_v1_FieldSelectorRequirement(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": schema_pkg_apis_meta_v1_GroupResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": schema_pkg_apis_meta_v1_GroupVersion(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": schema_pkg_apis_meta_v1_GroupVersionKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": schema_pkg_apis_meta_v1_GroupVersionResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": schema_pkg_apis_meta_v1_InternalEvent(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": schema_pkg_apis_meta_v1_LabelSelector(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.List": schema_pkg_apis_meta_v1_List(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": schema_pkg_apis_meta_v1_ListMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": schema_pkg_apis_meta_v1_ListOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": schema_pkg_apis_meta_v1_MicroTime(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": schema_pkg_apis_meta_v1_ObjectMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": schema_pkg_apis_meta_v1_OwnerReference(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": schema_pkg_apis_meta_v1_Patch(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions": schema_pkg_apis_meta_v1_PatchOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": schema_pkg_apis_meta_v1_Preconditions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": schema_pkg_apis_meta_v1_RootPaths(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Status": schema_pkg_apis_meta_v1_Status(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": schema_pkg_apis_meta_v1_StatusCause(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": schema_pkg_apis_meta_v1_StatusDetails(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Table": schema_pkg_apis_meta_v1_Table(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions": schema_pkg_apis_meta_v1_TableOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow": schema_pkg_apis_meta_v1_TableRow(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition": schema_pkg_apis_meta_v1_TableRowCondition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Time": schema_pkg_apis_meta_v1_Time(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": schema_pkg_apis_meta_v1_Timestamp(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": schema_pkg_apis_meta_v1_TypeMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions": schema_pkg_apis_meta_v1_UpdateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": schema_pkg_apis_meta_v1_WatchEvent(ref), - "k8s.io/apimachinery/pkg/runtime.RawExtension": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), - "k8s.io/apimachinery/pkg/runtime.TypeMeta": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), - "k8s.io/apimachinery/pkg/runtime.Unknown": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), - "k8s.io/apimachinery/pkg/version.Info": schema_k8sio_apimachinery_pkg_version_Info(ref), + v1.ContainerResourceMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ContainerResourceMetricSource(ref), + v1.ContainerResourceMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ContainerResourceMetricStatus(ref), + v1.CrossVersionObjectReference{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref), + v1.ExternalMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ExternalMetricSource(ref), + v1.ExternalMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref), + v1.HorizontalPodAutoscaler{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref), + v1.HorizontalPodAutoscalerCondition{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref), + v1.HorizontalPodAutoscalerList{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref), + v1.HorizontalPodAutoscalerSpec{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref), + v1.HorizontalPodAutoscalerStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref), + v1.MetricSpec{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_MetricSpec(ref), + v1.MetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_MetricStatus(ref), + v1.ObjectMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref), + v1.ObjectMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref), + v1.PodsMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref), + v1.PodsMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref), + v1.ResourceMetricSource{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ResourceMetricSource(ref), + v1.ResourceMetricStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref), + v1.Scale{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_Scale(ref), + v1.ScaleSpec{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ScaleSpec(ref), + v1.ScaleStatus{}.OpenAPIModelName(): schema_k8sio_api_autoscaling_v1_ScaleStatus(ref), + apiextensionsv1.ConversionRequest{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_ConversionRequest(ref), + apiextensionsv1.ConversionResponse{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_ConversionResponse(ref), + apiextensionsv1.ConversionReview{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_ConversionReview(ref), + apiextensionsv1.CustomResourceColumnDefinition{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceColumnDefinition(ref), + apiextensionsv1.CustomResourceConversion{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref), + apiextensionsv1.CustomResourceDefinition{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref), + apiextensionsv1.CustomResourceDefinitionCondition{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref), + apiextensionsv1.CustomResourceDefinitionList{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref), + apiextensionsv1.CustomResourceDefinitionNames{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionNames(ref), + apiextensionsv1.CustomResourceDefinitionSpec{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref), + apiextensionsv1.CustomResourceDefinitionStatus{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref), + apiextensionsv1.CustomResourceDefinitionVersion{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref), + apiextensionsv1.CustomResourceSubresourceScale{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceScale(ref), + apiextensionsv1.CustomResourceSubresourceStatus{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceStatus(ref), + apiextensionsv1.CustomResourceSubresources{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref), + apiextensionsv1.CustomResourceValidation{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref), + apiextensionsv1.ExternalDocumentation{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_ExternalDocumentation(ref), + apiextensionsv1.JSON{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_JSON(ref), + apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref), + apiextensionsv1.JSONSchemaPropsOrArray{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrArray(ref), + apiextensionsv1.JSONSchemaPropsOrBool{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref), + apiextensionsv1.JSONSchemaPropsOrStringArray{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref), + apiextensionsv1.SelectableField{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_SelectableField(ref), + apiextensionsv1.ServiceReference{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_ServiceReference(ref), + apiextensionsv1.ValidationRule{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_ValidationRule(ref), + apiextensionsv1.WebhookClientConfig{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref), + apiextensionsv1.WebhookConversion{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1_WebhookConversion(ref), + v1beta1.ConversionRequest{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref), + v1beta1.ConversionResponse{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref), + v1beta1.ConversionReview{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref), + v1beta1.CustomResourceColumnDefinition{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceColumnDefinition(ref), + v1beta1.CustomResourceConversion{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref), + v1beta1.CustomResourceDefinition{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref), + v1beta1.CustomResourceDefinitionCondition{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref), + v1beta1.CustomResourceDefinitionList{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref), + v1beta1.CustomResourceDefinitionNames{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionNames(ref), + v1beta1.CustomResourceDefinitionSpec{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref), + v1beta1.CustomResourceDefinitionStatus{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref), + v1beta1.CustomResourceDefinitionVersion{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref), + v1beta1.CustomResourceSubresourceScale{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceScale(ref), + v1beta1.CustomResourceSubresourceStatus{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceStatus(ref), + v1beta1.CustomResourceSubresources{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref), + v1beta1.CustomResourceValidation{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref), + v1beta1.ExternalDocumentation{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_ExternalDocumentation(ref), + v1beta1.JSON{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_JSON(ref), + v1beta1.JSONSchemaProps{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref), + v1beta1.JSONSchemaPropsOrArray{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrArray(ref), + v1beta1.JSONSchemaPropsOrBool{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref), + v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref), + v1beta1.SelectableField{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_SelectableField(ref), + v1beta1.ServiceReference{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_ServiceReference(ref), + v1beta1.ValidationRule{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_ValidationRule(ref), + v1beta1.WebhookClientConfig{}.OpenAPIModelName(): schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref), + resource.Quantity{}.OpenAPIModelName(): schema_apimachinery_pkg_api_resource_Quantity(ref), + metav1.APIGroup{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIGroup(ref), + metav1.APIGroupList{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIGroupList(ref), + metav1.APIResource{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIResource(ref), + metav1.APIResourceList{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIResourceList(ref), + metav1.APIVersions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIVersions(ref), + metav1.ApplyOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ApplyOptions(ref), + metav1.Condition{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Condition(ref), + metav1.CreateOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_CreateOptions(ref), + metav1.DeleteOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_DeleteOptions(ref), + metav1.Duration{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Duration(ref), + metav1.FieldSelectorRequirement{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_FieldSelectorRequirement(ref), + metav1.FieldsV1{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_FieldsV1(ref), + metav1.GetOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GetOptions(ref), + metav1.GroupKind{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupKind(ref), + metav1.GroupResource{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupResource(ref), + metav1.GroupVersion{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersion(ref), + metav1.GroupVersionForDiscovery{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), + metav1.GroupVersionKind{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersionKind(ref), + metav1.GroupVersionResource{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersionResource(ref), + metav1.InternalEvent{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_InternalEvent(ref), + metav1.LabelSelector{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_LabelSelector(ref), + metav1.LabelSelectorRequirement{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), + metav1.List{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_List(ref), + metav1.ListMeta{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ListMeta(ref), + metav1.ListOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ListOptions(ref), + metav1.ManagedFieldsEntry{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), + metav1.MicroTime{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_MicroTime(ref), + metav1.ObjectMeta{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ObjectMeta(ref), + metav1.OwnerReference{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_OwnerReference(ref), + metav1.PartialObjectMetadata{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), + metav1.PartialObjectMetadataList{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), + metav1.Patch{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Patch(ref), + metav1.PatchOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_PatchOptions(ref), + metav1.Preconditions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Preconditions(ref), + metav1.RootPaths{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_RootPaths(ref), + metav1.ServerAddressByClientCIDR{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), + metav1.Status{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Status(ref), + metav1.StatusCause{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_StatusCause(ref), + metav1.StatusDetails{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_StatusDetails(ref), + metav1.Table{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Table(ref), + metav1.TableColumnDefinition{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableColumnDefinition(ref), + metav1.TableOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableOptions(ref), + metav1.TableRow{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableRow(ref), + metav1.TableRowCondition{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableRowCondition(ref), + metav1.Time{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Time(ref), + metav1.Timestamp{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Timestamp(ref), + metav1.TypeMeta{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TypeMeta(ref), + metav1.UpdateOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_UpdateOptions(ref), + metav1.WatchEvent{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_WatchEvent(ref), + runtime.RawExtension{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), + runtime.TypeMeta{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), + runtime.Unknown{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), + version.Info{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_version_Info(ref), } } @@ -186,7 +191,7 @@ func schema_k8sio_api_autoscaling_v1_ContainerResourceMetricSource(ref common.Re "targetAverageValue": { SchemaProps: spec.SchemaProps{ Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "container": { @@ -202,7 +207,7 @@ func schema_k8sio_api_autoscaling_v1_ContainerResourceMetricSource(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -231,7 +236,7 @@ func schema_k8sio_api_autoscaling_v1_ContainerResourceMetricStatus(ref common.Re "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "container": { @@ -247,7 +252,7 @@ func schema_k8sio_api_autoscaling_v1_ContainerResourceMetricStatus(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -311,19 +316,19 @@ func schema_k8sio_api_autoscaling_v1_ExternalMetricSource(ref common.ReferenceCa "metricSelector": { SchemaProps: spec.SchemaProps{ Description: "metricSelector is used to identify a specific time series within a given metric.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "targetValue": { SchemaProps: spec.SchemaProps{ Description: "targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "targetAverageValue": { SchemaProps: spec.SchemaProps{ Description: "targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -331,7 +336,7 @@ func schema_k8sio_api_autoscaling_v1_ExternalMetricSource(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -353,19 +358,19 @@ func schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref common.ReferenceCa "metricSelector": { SchemaProps: spec.SchemaProps{ Description: "metricSelector is used to identify a specific time series within a given metric.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "currentValue": { SchemaProps: spec.SchemaProps{ Description: "currentValue is the current value of the metric (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of metric averaged over autoscaled pods.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -373,7 +378,7 @@ func schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -402,28 +407,28 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec"), + Ref: ref(v1.HorizontalPodAutoscalerSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the current information about the autoscaler.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus"), + Ref: ref(v1.HorizontalPodAutoscalerStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec", "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.HorizontalPodAutoscalerSpec{}.OpenAPIModelName(), v1.HorizontalPodAutoscalerStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -453,7 +458,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref common "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the last time the condition transitioned from one status to another", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -475,7 +480,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref common }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -504,7 +509,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -515,7 +520,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler"), + Ref: ref(v1.HorizontalPodAutoscaler{}.OpenAPIModelName()), }, }, }, @@ -526,7 +531,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.HorizontalPodAutoscaler{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -541,7 +546,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.CrossVersionObjectReference"), + Ref: ref(v1.CrossVersionObjectReference{}.OpenAPIModelName()), }, }, "minReplicas": { @@ -571,7 +576,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.CrossVersionObjectReference"}, + v1.CrossVersionObjectReference{}.OpenAPIModelName()}, } } @@ -592,7 +597,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref common.Re "lastScaleTime": { SchemaProps: spec.SchemaProps{ Description: "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "currentReplicas": { @@ -623,7 +628,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -646,31 +651,31 @@ func schema_k8sio_api_autoscaling_v1_MetricSpec(ref common.ReferenceCallback) co "object": { SchemaProps: spec.SchemaProps{ Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v1.ObjectMetricSource"), + Ref: ref(v1.ObjectMetricSource{}.OpenAPIModelName()), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v1.PodsMetricSource"), + Ref: ref(v1.PodsMetricSource{}.OpenAPIModelName()), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v1.ResourceMetricSource"), + Ref: ref(v1.ResourceMetricSource{}.OpenAPIModelName()), }, }, "containerResource": { SchemaProps: spec.SchemaProps{ Description: "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v1.ContainerResourceMetricSource"), + Ref: ref(v1.ContainerResourceMetricSource{}.OpenAPIModelName()), }, }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", - Ref: ref("k8s.io/api/autoscaling/v1.ExternalMetricSource"), + Ref: ref(v1.ExternalMetricSource{}.OpenAPIModelName()), }, }, }, @@ -678,7 +683,7 @@ func schema_k8sio_api_autoscaling_v1_MetricSpec(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.ContainerResourceMetricSource", "k8s.io/api/autoscaling/v1.ExternalMetricSource", "k8s.io/api/autoscaling/v1.ObjectMetricSource", "k8s.io/api/autoscaling/v1.PodsMetricSource", "k8s.io/api/autoscaling/v1.ResourceMetricSource"}, + v1.ContainerResourceMetricSource{}.OpenAPIModelName(), v1.ExternalMetricSource{}.OpenAPIModelName(), v1.ObjectMetricSource{}.OpenAPIModelName(), v1.PodsMetricSource{}.OpenAPIModelName(), v1.ResourceMetricSource{}.OpenAPIModelName()}, } } @@ -701,31 +706,31 @@ func schema_k8sio_api_autoscaling_v1_MetricStatus(ref common.ReferenceCallback) "object": { SchemaProps: spec.SchemaProps{ Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v1.ObjectMetricStatus"), + Ref: ref(v1.ObjectMetricStatus{}.OpenAPIModelName()), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v1.PodsMetricStatus"), + Ref: ref(v1.PodsMetricStatus{}.OpenAPIModelName()), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v1.ResourceMetricStatus"), + Ref: ref(v1.ResourceMetricStatus{}.OpenAPIModelName()), }, }, "containerResource": { SchemaProps: spec.SchemaProps{ Description: "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus"), + Ref: ref(v1.ContainerResourceMetricStatus{}.OpenAPIModelName()), }, }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", - Ref: ref("k8s.io/api/autoscaling/v1.ExternalMetricStatus"), + Ref: ref(v1.ExternalMetricStatus{}.OpenAPIModelName()), }, }, }, @@ -733,7 +738,7 @@ func schema_k8sio_api_autoscaling_v1_MetricStatus(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus", "k8s.io/api/autoscaling/v1.ExternalMetricStatus", "k8s.io/api/autoscaling/v1.ObjectMetricStatus", "k8s.io/api/autoscaling/v1.PodsMetricStatus", "k8s.io/api/autoscaling/v1.ResourceMetricStatus"}, + v1.ContainerResourceMetricStatus{}.OpenAPIModelName(), v1.ExternalMetricStatus{}.OpenAPIModelName(), v1.ObjectMetricStatus{}.OpenAPIModelName(), v1.PodsMetricStatus{}.OpenAPIModelName(), v1.ResourceMetricStatus{}.OpenAPIModelName()}, } } @@ -748,7 +753,7 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "target is the described Kubernetes object.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.CrossVersionObjectReference"), + Ref: ref(v1.CrossVersionObjectReference{}.OpenAPIModelName()), }, }, "metricName": { @@ -762,19 +767,19 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref common.ReferenceCall "targetValue": { SchemaProps: spec.SchemaProps{ Description: "targetValue is the target value of the metric (as a quantity).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric. When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "averageValue": { SchemaProps: spec.SchemaProps{ Description: "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -782,7 +787,7 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + v1.CrossVersionObjectReference{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -797,7 +802,7 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "target is the described Kubernetes object.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.CrossVersionObjectReference"), + Ref: ref(v1.CrossVersionObjectReference{}.OpenAPIModelName()), }, }, "metricName": { @@ -811,19 +816,19 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref common.ReferenceCall "currentValue": { SchemaProps: spec.SchemaProps{ Description: "currentValue is the current value of the metric (as a quantity).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "averageValue": { SchemaProps: spec.SchemaProps{ Description: "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -831,7 +836,7 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + v1.CrossVersionObjectReference{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -853,13 +858,13 @@ func schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref common.ReferenceCallba "targetAverageValue": { SchemaProps: spec.SchemaProps{ Description: "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, @@ -867,7 +872,7 @@ func schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -889,13 +894,13 @@ func schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref common.ReferenceCallba "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, @@ -903,7 +908,7 @@ func schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + resource.Quantity{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -932,7 +937,7 @@ func schema_k8sio_api_autoscaling_v1_ResourceMetricSource(ref common.ReferenceCa "targetAverageValue": { SchemaProps: spec.SchemaProps{ Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -940,7 +945,7 @@ func schema_k8sio_api_autoscaling_v1_ResourceMetricSource(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -969,7 +974,7 @@ func schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref common.ReferenceCa "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -977,7 +982,7 @@ func schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -1006,28 +1011,28 @@ func schema_k8sio_api_autoscaling_v1_Scale(ref common.ReferenceCallback) common. SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.ScaleSpec"), + Ref: ref(v1.ScaleSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v1.ScaleStatus"), + Ref: ref(v1.ScaleStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.ScaleSpec", "k8s.io/api/autoscaling/v1.ScaleStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.ScaleSpec{}.OpenAPIModelName(), v1.ScaleStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -1116,7 +1121,7 @@ func schema_pkg_apis_apiextensions_v1_ConversionRequest(ref common.ReferenceCall Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -1127,7 +1132,7 @@ func schema_pkg_apis_apiextensions_v1_ConversionRequest(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -1158,7 +1163,7 @@ func schema_pkg_apis_apiextensions_v1_ConversionResponse(ref common.ReferenceCal Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -1168,7 +1173,7 @@ func schema_pkg_apis_apiextensions_v1_ConversionResponse(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "result contains the result of conversion with extra details if the conversion failed. `result.status` determines if the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` will be used to construct an error message for the end user.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + Ref: ref(metav1.Status{}.OpenAPIModelName()), }, }, }, @@ -1176,7 +1181,7 @@ func schema_pkg_apis_apiextensions_v1_ConversionResponse(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.Status{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -1204,20 +1209,20 @@ func schema_pkg_apis_apiextensions_v1_ConversionReview(ref common.ReferenceCallb "request": { SchemaProps: spec.SchemaProps{ Description: "request describes the attributes for the conversion request.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest"), + Ref: ref(apiextensionsv1.ConversionRequest{}.OpenAPIModelName()), }, }, "response": { SchemaProps: spec.SchemaProps{ Description: "response describes the attributes for the conversion response.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse"), + Ref: ref(apiextensionsv1.ConversionResponse{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse"}, + apiextensionsv1.ConversionRequest{}.OpenAPIModelName(), apiextensionsv1.ConversionResponse{}.OpenAPIModelName()}, } } @@ -1298,7 +1303,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref common.Refere "webhook": { SchemaProps: spec.SchemaProps{ Description: "webhook describes how to call the conversion webhook. Required when `strategy` is set to `\"Webhook\"`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion"), + Ref: ref(apiextensionsv1.WebhookConversion{}.OpenAPIModelName()), }, }, }, @@ -1306,7 +1311,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion"}, + apiextensionsv1.WebhookConversion{}.OpenAPIModelName()}, } } @@ -1335,21 +1340,21 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec describes how the user wants the resources to appear", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec"), + Ref: ref(apiextensionsv1.CustomResourceDefinitionSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status indicates the actual state of the CustomResourceDefinition", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus"), + Ref: ref(apiextensionsv1.CustomResourceDefinitionStatus{}.OpenAPIModelName()), }, }, }, @@ -1357,7 +1362,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + apiextensionsv1.CustomResourceDefinitionSpec{}.OpenAPIModelName(), apiextensionsv1.CustomResourceDefinitionStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -1387,7 +1392,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref comm "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -1409,7 +1414,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -1438,7 +1443,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.Re SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -1449,7 +1454,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition"), + Ref: ref(apiextensionsv1.CustomResourceDefinition{}.OpenAPIModelName()), }, }, }, @@ -1460,7 +1465,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + apiextensionsv1.CustomResourceDefinition{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -1567,7 +1572,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref common.Re SchemaProps: spec.SchemaProps{ Description: "names specify the resource and kind names for the custom resource.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"), + Ref: ref(apiextensionsv1.CustomResourceDefinitionNames{}.OpenAPIModelName()), }, }, "scope": { @@ -1591,7 +1596,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion"), + Ref: ref(apiextensionsv1.CustomResourceDefinitionVersion{}.OpenAPIModelName()), }, }, }, @@ -1600,7 +1605,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref common.Re "conversion": { SchemaProps: spec.SchemaProps{ Description: "conversion defines conversion settings for the CRD.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion"), + Ref: ref(apiextensionsv1.CustomResourceConversion{}.OpenAPIModelName()), }, }, "preserveUnknownFields": { @@ -1615,7 +1620,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion"}, + apiextensionsv1.CustomResourceConversion{}.OpenAPIModelName(), apiextensionsv1.CustomResourceDefinitionNames{}.OpenAPIModelName(), apiextensionsv1.CustomResourceDefinitionVersion{}.OpenAPIModelName()}, } } @@ -1642,7 +1647,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition"), + Ref: ref(apiextensionsv1.CustomResourceDefinitionCondition{}.OpenAPIModelName()), }, }, }, @@ -1652,7 +1657,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref common. SchemaProps: spec.SchemaProps{ Description: "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"), + Ref: ref(apiextensionsv1.CustomResourceDefinitionNames{}.OpenAPIModelName()), }, }, "storedVersions": { @@ -1679,7 +1684,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref common. }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"}, + apiextensionsv1.CustomResourceDefinitionCondition{}.OpenAPIModelName(), apiextensionsv1.CustomResourceDefinitionNames{}.OpenAPIModelName()}, } } @@ -1731,13 +1736,13 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref common "schema": { SchemaProps: spec.SchemaProps{ Description: "schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation"), + Ref: ref(apiextensionsv1.CustomResourceValidation{}.OpenAPIModelName()), }, }, "subresources": { SchemaProps: spec.SchemaProps{ Description: "subresources specify what subresources this version of the defined custom resource have.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources"), + Ref: ref(apiextensionsv1.CustomResourceSubresources{}.OpenAPIModelName()), }, }, "additionalPrinterColumns": { @@ -1753,7 +1758,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition"), + Ref: ref(apiextensionsv1.CustomResourceColumnDefinition{}.OpenAPIModelName()), }, }, }, @@ -1772,7 +1777,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.SelectableField"), + Ref: ref(apiextensionsv1.SelectableField{}.OpenAPIModelName()), }, }, }, @@ -1783,7 +1788,7 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref common }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.SelectableField"}, + apiextensionsv1.CustomResourceColumnDefinition{}.OpenAPIModelName(), apiextensionsv1.CustomResourceSubresources{}.OpenAPIModelName(), apiextensionsv1.CustomResourceValidation{}.OpenAPIModelName(), apiextensionsv1.SelectableField{}.OpenAPIModelName()}, } } @@ -1845,20 +1850,20 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref common.Refe "status": { SchemaProps: spec.SchemaProps{ Description: "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus"), + Ref: ref(apiextensionsv1.CustomResourceSubresourceStatus{}.OpenAPIModelName()), }, }, "scale": { SchemaProps: spec.SchemaProps{ Description: "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale"), + Ref: ref(apiextensionsv1.CustomResourceSubresourceScale{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus"}, + apiextensionsv1.CustomResourceSubresourceScale{}.OpenAPIModelName(), apiextensionsv1.CustomResourceSubresourceStatus{}.OpenAPIModelName()}, } } @@ -1872,14 +1877,14 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref common.Refere "openAPIV3Schema": { SchemaProps: spec.SchemaProps{ Description: "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"}, + apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()}, } } @@ -1913,8 +1918,8 @@ func schema_pkg_apis_apiextensions_v1_JSON(ref common.ReferenceCallback) common. Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.", - Type: v1.JSON{}.OpenAPISchemaType(), - Format: v1.JSON{}.OpenAPISchemaFormat(), + Type: apiextensionsv1.JSON{}.OpenAPISchemaType(), + Format: apiextensionsv1.JSON{}.OpenAPISchemaFormat(), }, }, } @@ -1973,7 +1978,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba "default": { SchemaProps: spec.SchemaProps{ Description: "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. Defaulting requires spec.preserveUnknownFields to be false.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + Ref: ref(apiextensionsv1.JSON{}.OpenAPIModelName()), }, }, "maximum": { @@ -2053,7 +2058,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + Ref: ref(apiextensionsv1.JSON{}.OpenAPIModelName()), }, }, }, @@ -2092,7 +2097,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba }, "items": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray"), + Ref: ref(apiextensionsv1.JSONSchemaPropsOrArray{}.OpenAPIModelName()), }, }, "allOf": { @@ -2107,7 +2112,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -2125,7 +2130,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -2143,7 +2148,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -2151,7 +2156,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba }, "not": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, "properties": { @@ -2162,7 +2167,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -2170,7 +2175,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba }, "additionalProperties": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool"), + Ref: ref(apiextensionsv1.JSONSchemaPropsOrBool{}.OpenAPIModelName()), }, }, "patternProperties": { @@ -2181,7 +2186,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -2194,7 +2199,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray"), + Ref: ref(apiextensionsv1.JSONSchemaPropsOrStringArray{}.OpenAPIModelName()), }, }, }, @@ -2202,7 +2207,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba }, "additionalItems": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool"), + Ref: ref(apiextensionsv1.JSONSchemaPropsOrBool{}.OpenAPIModelName()), }, }, "definitions": { @@ -2213,7 +2218,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref(apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -2221,12 +2226,12 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba }, "externalDocs": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation"), + Ref: ref(apiextensionsv1.ExternalDocumentation{}.OpenAPIModelName()), }, }, "example": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + Ref: ref(apiextensionsv1.JSON{}.OpenAPIModelName()), }, }, "nullable": { @@ -2308,7 +2313,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ValidationRule"), + Ref: ref(apiextensionsv1.ValidationRule{}.OpenAPIModelName()), }, }, }, @@ -2318,7 +2323,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ValidationRule"}, + apiextensionsv1.ExternalDocumentation{}.OpenAPIModelName(), apiextensionsv1.JSON{}.OpenAPIModelName(), apiextensionsv1.JSONSchemaProps{}.OpenAPIModelName(), apiextensionsv1.JSONSchemaPropsOrArray{}.OpenAPIModelName(), apiextensionsv1.JSONSchemaPropsOrBool{}.OpenAPIModelName(), apiextensionsv1.JSONSchemaPropsOrStringArray{}.OpenAPIModelName(), apiextensionsv1.ValidationRule{}.OpenAPIModelName()}, } } @@ -2327,8 +2332,8 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrArray(ref common.Referenc Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.", - Type: v1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), - Format: v1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), + Type: apiextensionsv1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), + Format: apiextensionsv1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), }, }, } @@ -2339,8 +2344,8 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref common.Reference Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.", - Type: v1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), - Format: v1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), + Type: apiextensionsv1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), + Format: apiextensionsv1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), }, }, } @@ -2351,8 +2356,8 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref common.Re Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.", - Type: v1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), - Format: v1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), + Type: apiextensionsv1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), + Format: apiextensionsv1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), }, }, } @@ -2499,7 +2504,7 @@ func schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref common.ReferenceCa "service": { SchemaProps: spec.SchemaProps{ Description: "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference"), + Ref: ref(apiextensionsv1.ServiceReference{}.OpenAPIModelName()), }, }, "caBundle": { @@ -2513,7 +2518,7 @@ func schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference"}, + apiextensionsv1.ServiceReference{}.OpenAPIModelName()}, } } @@ -2527,7 +2532,7 @@ func schema_pkg_apis_apiextensions_v1_WebhookConversion(ref common.ReferenceCall "clientConfig": { SchemaProps: spec.SchemaProps{ Description: "clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig"), + Ref: ref(apiextensionsv1.WebhookClientConfig{}.OpenAPIModelName()), }, }, "conversionReviewVersions": { @@ -2555,7 +2560,7 @@ func schema_pkg_apis_apiextensions_v1_WebhookConversion(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig"}, + apiextensionsv1.WebhookClientConfig{}.OpenAPIModelName()}, } } @@ -2594,7 +2599,7 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref common.Referenc Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -2605,7 +2610,7 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -2636,7 +2641,7 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref common.Referen Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -2646,7 +2651,7 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref common.Referen SchemaProps: spec.SchemaProps{ Description: "result contains the result of conversion with extra details if the conversion failed. `result.status` determines if the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` will be used to construct an error message for the end user.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + Ref: ref(metav1.Status{}.OpenAPIModelName()), }, }, }, @@ -2654,7 +2659,7 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.Status{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -2682,20 +2687,20 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref common.Reference "request": { SchemaProps: spec.SchemaProps{ Description: "request describes the attributes for the conversion request.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest"), + Ref: ref(v1beta1.ConversionRequest{}.OpenAPIModelName()), }, }, "response": { SchemaProps: spec.SchemaProps{ Description: "response describes the attributes for the conversion response.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse"), + Ref: ref(v1beta1.ConversionResponse{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse"}, + v1beta1.ConversionRequest{}.OpenAPIModelName(), v1beta1.ConversionResponse{}.OpenAPIModelName()}, } } @@ -2776,7 +2781,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref common.R "webhookClientConfig": { SchemaProps: spec.SchemaProps{ Description: "webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`. Required when `strategy` is set to `Webhook`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig"), + Ref: ref(v1beta1.WebhookClientConfig{}.OpenAPIModelName()), }, }, "conversionReviewVersions": { @@ -2804,7 +2809,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref common.R }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig"}, + v1beta1.WebhookClientConfig{}.OpenAPIModelName()}, } } @@ -2833,21 +2838,21 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref common.R SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec describes how the user wants the resources to appear", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec"), + Ref: ref(v1beta1.CustomResourceDefinitionSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status indicates the actual state of the CustomResourceDefinition", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus"), + Ref: ref(v1beta1.CustomResourceDefinitionStatus{}.OpenAPIModelName()), }, }, }, @@ -2855,7 +2860,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref common.R }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1beta1.CustomResourceDefinitionSpec{}.OpenAPIModelName(), v1beta1.CustomResourceDefinitionStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -2885,7 +2890,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -2907,7 +2912,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -2936,7 +2941,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -2947,7 +2952,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition"), + Ref: ref(v1beta1.CustomResourceDefinition{}.OpenAPIModelName()), }, }, }, @@ -2958,7 +2963,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref comm }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1beta1.CustomResourceDefinition{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -3072,7 +3077,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm SchemaProps: spec.SchemaProps{ Description: "names specify the resource and kind names for the custom resource.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"), + Ref: ref(v1beta1.CustomResourceDefinitionNames{}.OpenAPIModelName()), }, }, "scope": { @@ -3086,13 +3091,13 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm "validation": { SchemaProps: spec.SchemaProps{ Description: "validation describes the schema used for validation and pruning of the custom resource. If present, this validation schema is used to validate all versions. Top-level and per-version schemas are mutually exclusive.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"), + Ref: ref(v1beta1.CustomResourceValidation{}.OpenAPIModelName()), }, }, "subresources": { SchemaProps: spec.SchemaProps{ Description: "subresources specify what subresources the defined custom resource has. If present, this field configures subresources for all versions. Top-level and per-version subresources are mutually exclusive.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources"), + Ref: ref(v1beta1.CustomResourceSubresources{}.OpenAPIModelName()), }, }, "versions": { @@ -3108,7 +3113,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion"), + Ref: ref(v1beta1.CustomResourceDefinitionVersion{}.OpenAPIModelName()), }, }, }, @@ -3127,7 +3132,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition"), + Ref: ref(v1beta1.CustomResourceColumnDefinition{}.OpenAPIModelName()), }, }, }, @@ -3146,7 +3151,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.SelectableField"), + Ref: ref(v1beta1.SelectableField{}.OpenAPIModelName()), }, }, }, @@ -3155,7 +3160,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm "conversion": { SchemaProps: spec.SchemaProps{ Description: "conversion defines conversion settings for the CRD.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion"), + Ref: ref(v1beta1.CustomResourceConversion{}.OpenAPIModelName()), }, }, "preserveUnknownFields": { @@ -3170,7 +3175,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.SelectableField"}, + v1beta1.CustomResourceColumnDefinition{}.OpenAPIModelName(), v1beta1.CustomResourceConversion{}.OpenAPIModelName(), v1beta1.CustomResourceDefinitionNames{}.OpenAPIModelName(), v1beta1.CustomResourceDefinitionVersion{}.OpenAPIModelName(), v1beta1.CustomResourceSubresources{}.OpenAPIModelName(), v1beta1.CustomResourceValidation{}.OpenAPIModelName(), v1beta1.SelectableField{}.OpenAPIModelName()}, } } @@ -3197,7 +3202,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition"), + Ref: ref(v1beta1.CustomResourceDefinitionCondition{}.OpenAPIModelName()), }, }, }, @@ -3207,7 +3212,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref co SchemaProps: spec.SchemaProps{ Description: "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"), + Ref: ref(v1beta1.CustomResourceDefinitionNames{}.OpenAPIModelName()), }, }, "storedVersions": { @@ -3234,7 +3239,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref co }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"}, + v1beta1.CustomResourceDefinitionCondition{}.OpenAPIModelName(), v1beta1.CustomResourceDefinitionNames{}.OpenAPIModelName()}, } } @@ -3286,13 +3291,13 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref c "schema": { SchemaProps: spec.SchemaProps{ Description: "schema describes the schema used for validation and pruning of this version of the custom resource. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead).", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"), + Ref: ref(v1beta1.CustomResourceValidation{}.OpenAPIModelName()), }, }, "subresources": { SchemaProps: spec.SchemaProps{ Description: "subresources specify what subresources this version of the defined custom resource have. Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead).", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources"), + Ref: ref(v1beta1.CustomResourceSubresources{}.OpenAPIModelName()), }, }, "additionalPrinterColumns": { @@ -3308,7 +3313,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition"), + Ref: ref(v1beta1.CustomResourceColumnDefinition{}.OpenAPIModelName()), }, }, }, @@ -3327,7 +3332,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.SelectableField"), + Ref: ref(v1beta1.SelectableField{}.OpenAPIModelName()), }, }, }, @@ -3338,7 +3343,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref c }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.SelectableField"}, + v1beta1.CustomResourceColumnDefinition{}.OpenAPIModelName(), v1beta1.CustomResourceSubresources{}.OpenAPIModelName(), v1beta1.CustomResourceValidation{}.OpenAPIModelName(), v1beta1.SelectableField{}.OpenAPIModelName()}, } } @@ -3400,20 +3405,20 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref common "status": { SchemaProps: spec.SchemaProps{ Description: "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus"), + Ref: ref(v1beta1.CustomResourceSubresourceStatus{}.OpenAPIModelName()), }, }, "scale": { SchemaProps: spec.SchemaProps{ Description: "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale"), + Ref: ref(v1beta1.CustomResourceSubresourceScale{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus"}, + v1beta1.CustomResourceSubresourceScale{}.OpenAPIModelName(), v1beta1.CustomResourceSubresourceStatus{}.OpenAPIModelName()}, } } @@ -3427,14 +3432,14 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref common.R "openAPIV3Schema": { SchemaProps: spec.SchemaProps{ Description: "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(v1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"}, + v1beta1.JSONSchemaProps{}.OpenAPIModelName()}, } } @@ -3528,7 +3533,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC "default": { SchemaProps: spec.SchemaProps{ Description: "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + Ref: ref(v1beta1.JSON{}.OpenAPIModelName()), }, }, "maximum": { @@ -3608,7 +3613,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + Ref: ref(v1beta1.JSON{}.OpenAPIModelName()), }, }, }, @@ -3647,7 +3652,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, "items": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray"), + Ref: ref(v1beta1.JSONSchemaPropsOrArray{}.OpenAPIModelName()), }, }, "allOf": { @@ -3662,7 +3667,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(v1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -3680,7 +3685,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(v1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -3698,7 +3703,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(v1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -3706,7 +3711,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, "not": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(v1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, "properties": { @@ -3717,7 +3722,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(v1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -3725,7 +3730,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, "additionalProperties": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool"), + Ref: ref(v1beta1.JSONSchemaPropsOrBool{}.OpenAPIModelName()), }, }, "patternProperties": { @@ -3736,7 +3741,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(v1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -3749,7 +3754,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray"), + Ref: ref(v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPIModelName()), }, }, }, @@ -3757,7 +3762,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, "additionalItems": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool"), + Ref: ref(v1beta1.JSONSchemaPropsOrBool{}.OpenAPIModelName()), }, }, "definitions": { @@ -3768,7 +3773,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref(v1beta1.JSONSchemaProps{}.OpenAPIModelName()), }, }, }, @@ -3776,12 +3781,12 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, "externalDocs": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation"), + Ref: ref(v1beta1.ExternalDocumentation{}.OpenAPIModelName()), }, }, "example": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + Ref: ref(v1beta1.JSON{}.OpenAPIModelName()), }, }, "nullable": { @@ -3863,7 +3868,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ValidationRule"), + Ref: ref(v1beta1.ValidationRule{}.OpenAPIModelName()), }, }, }, @@ -3873,7 +3878,7 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ValidationRule"}, + v1beta1.ExternalDocumentation{}.OpenAPIModelName(), v1beta1.JSON{}.OpenAPIModelName(), v1beta1.JSONSchemaProps{}.OpenAPIModelName(), v1beta1.JSONSchemaPropsOrArray{}.OpenAPIModelName(), v1beta1.JSONSchemaPropsOrBool{}.OpenAPIModelName(), v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPIModelName(), v1beta1.ValidationRule{}.OpenAPIModelName()}, } } @@ -4054,7 +4059,7 @@ func schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref common.Refere "service": { SchemaProps: spec.SchemaProps{ Description: "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference"), + Ref: ref(v1beta1.ServiceReference{}.OpenAPIModelName()), }, }, "caBundle": { @@ -4068,7 +4073,55 @@ func schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference"}, + v1beta1.ServiceReference{}.OpenAPIModelName()}, + } +} + +func schema_apimachinery_pkg_api_resource_Quantity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.EmbedOpenAPIDefinitionIntoV2Extension(common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", + OneOf: common.GenerateOpenAPIV3OneOfSchema(resource.Quantity{}.OpenAPIV3OneOfTypes()), + Format: resource.Quantity{}.OpenAPISchemaFormat(), + }, + }, + }, common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", + Type: resource.Quantity{}.OpenAPISchemaType(), + Format: resource.Quantity{}.OpenAPISchemaFormat(), + }, + }, + }) +} + +func schema_apimachinery_pkg_api_resource_int64Amount(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster than operations on inf.Dec for values that can be represented as int64.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "value": { + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int64", + }, + }, + "scale": { + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"value", "scale"}, + }, + }, } } @@ -4114,7 +4167,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + Ref: ref(metav1.GroupVersionForDiscovery{}.OpenAPIModelName()), }, }, }, @@ -4124,7 +4177,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "preferredVersion is the version preferred by the API server, which probably is the storage version.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + Ref: ref(metav1.GroupVersionForDiscovery{}.OpenAPIModelName()), }, }, "serverAddressByClientCIDRs": { @@ -4140,7 +4193,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + Ref: ref(metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()), }, }, }, @@ -4151,7 +4204,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + metav1.GroupVersionForDiscovery{}.OpenAPIModelName(), metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()}, } } @@ -4189,7 +4242,7 @@ func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"), + Ref: ref(metav1.APIGroup{}.OpenAPIModelName()), }, }, }, @@ -4200,7 +4253,7 @@ func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"}, + metav1.APIGroup{}.OpenAPIModelName()}, } } @@ -4368,7 +4421,7 @@ func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"), + Ref: ref(metav1.APIResource{}.OpenAPIModelName()), }, }, }, @@ -4379,7 +4432,7 @@ func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"}, + metav1.APIResource{}.OpenAPIModelName()}, } } @@ -4437,7 +4490,7 @@ func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + Ref: ref(metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()), }, }, }, @@ -4448,7 +4501,7 @@ func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()}, } } @@ -4549,7 +4602,7 @@ func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.Open "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -4573,7 +4626,7 @@ func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -4669,7 +4722,7 @@ func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common. "preconditions": { SchemaProps: spec.SchemaProps{ Description: "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"), + Ref: ref(metav1.Preconditions{}.OpenAPIModelName()), }, }, "orphanDependents": { @@ -4717,7 +4770,7 @@ func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"}, + metav1.Preconditions{}.OpenAPIModelName()}, } } @@ -5029,15 +5082,12 @@ func schema_pkg_apis_meta_v1_InternalEvent(ref common.ReferenceCallback) common. "Object": { SchemaProps: spec.SchemaProps{ Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Bookmark: the object (instance of a type being watched) where\n only ResourceVersion field is set. On successful restart of watch from a\n bookmark resourceVersion, client is guaranteed to not get repeat event\n nor miss any events.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Object"), }, }, }, Required: []string{"Type", "Object"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.Object"}, } } @@ -5077,7 +5127,7 @@ func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"), + Ref: ref(metav1.LabelSelectorRequirement{}.OpenAPIModelName()), }, }, }, @@ -5092,7 +5142,7 @@ func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, + metav1.LabelSelectorRequirement{}.OpenAPIModelName()}, } } @@ -5171,7 +5221,7 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -5181,7 +5231,7 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -5192,7 +5242,7 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.ListMeta{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -5365,7 +5415,7 @@ func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) co "time": { SchemaProps: spec.SchemaProps{ Description: "Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "fieldsType": { @@ -5378,7 +5428,7 @@ func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) co "fieldsV1": { SchemaProps: spec.SchemaProps{ Description: "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1"), + Ref: ref(metav1.FieldsV1{}.OpenAPIModelName()), }, }, "subresource": { @@ -5392,7 +5442,7 @@ func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.FieldsV1{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -5467,13 +5517,13 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope "creationTimestamp": { SchemaProps: spec.SchemaProps{ Description: "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "deletionTimestamp": { SchemaProps: spec.SchemaProps{ Description: "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "deletionGracePeriodSeconds": { @@ -5533,7 +5583,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), + Ref: ref(metav1.OwnerReference{}.OpenAPIModelName()), }, }, }, @@ -5573,7 +5623,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry"), + Ref: ref(metav1.ManagedFieldsEntry{}.OpenAPIModelName()), }, }, }, @@ -5583,7 +5633,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry", "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.ManagedFieldsEntry{}.OpenAPIModelName(), metav1.OwnerReference{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -5677,14 +5727,14 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadata(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -5713,7 +5763,7 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -5724,7 +5774,7 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"), + Ref: ref(metav1.PartialObjectMetadata{}.OpenAPIModelName()), }, }, }, @@ -5735,7 +5785,7 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"}, + metav1.ListMeta{}.OpenAPIModelName(), metav1.PartialObjectMetadata{}.OpenAPIModelName()}, } } @@ -5934,7 +5984,7 @@ func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPI SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "status": { @@ -5959,14 +6009,9 @@ func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPI }, }, "details": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, SchemaProps: spec.SchemaProps{ Description: "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"), + Ref: ref(metav1.StatusDetails{}.OpenAPIModelName()), }, }, "code": { @@ -5980,7 +6025,7 @@ func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPI }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"}, + metav1.ListMeta{}.OpenAPIModelName(), metav1.StatusDetails{}.OpenAPIModelName()}, } } @@ -6066,7 +6111,7 @@ func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"), + Ref: ref(metav1.StatusCause{}.OpenAPIModelName()), }, }, }, @@ -6083,7 +6128,7 @@ func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"}, + metav1.StatusCause{}.OpenAPIModelName()}, } } @@ -6112,7 +6157,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "columnDefinitions": { @@ -6128,7 +6173,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition"), + Ref: ref(metav1.TableColumnDefinition{}.OpenAPIModelName()), }, }, }, @@ -6147,7 +6192,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"), + Ref: ref(metav1.TableRow{}.OpenAPIModelName()), }, }, }, @@ -6158,7 +6203,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"}, + metav1.ListMeta{}.OpenAPIModelName(), metav1.TableColumnDefinition{}.OpenAPIModelName(), metav1.TableRow{}.OpenAPIModelName()}, } } @@ -6289,7 +6334,7 @@ func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition"), + Ref: ref(metav1.TableRowCondition{}.OpenAPIModelName()), }, }, }, @@ -6298,7 +6343,7 @@ func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenA "object": { SchemaProps: spec.SchemaProps{ Description: "This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing. The media type of the object will always match the enclosing list - if this as a JSON table, these will be JSON encoded objects.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -6306,7 +6351,7 @@ func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.TableRowCondition{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -6501,7 +6546,7 @@ func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.Ope "object": { SchemaProps: spec.SchemaProps{ Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -6509,7 +6554,7 @@ func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go index 1705f3abcf8a8..fba3c43311b1c 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go @@ -223,7 +223,7 @@ func getUnrecognizedFormatsInSchema(schema *apiextensions.JSONSchemaProps, compa validation.SchemaHas(schema, func(s *apiextensions.JSONSchemaProps) bool { if len(s.Format) > 0 { // Convert to spec.Schema for format validation - specSchema := &spec.Schema{SchemaProps: spec.SchemaProps{Format: s.Format}} + specSchema := &spec.Schema{SchemaProps: spec.SchemaProps{Format: s.Format, Type: []string{s.Type}}} if formats := apiservervalidation.GetUnrecognizedFormats(specSchema, compatibilityVersion); len(formats) > 0 { unrecognizedFormats = append(unrecognizedFormats, formats...) } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/test/example/apiexports_test.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/test/example/apiexports_test.go index 830ce6fb71236..3dc136071391c 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/test/example/apiexports_test.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/test/example/apiexports_test.go @@ -35,7 +35,7 @@ func TestAPIExportPermissionClaimCELValidation(t *testing.T) { name: "nothing is set", current: map[string]interface{}{}, wantErrs: []string{ - "openAPIV3Schema.properties.spec.properties.permissionClaims.items: Invalid value: \"object\": either \"all\" or \"resourceSelector\" must be set", + "openAPIV3Schema.properties.spec.properties.permissionClaims.items: Invalid value: either \"all\" or \"resourceSelector\" must be set", }, }, { @@ -67,7 +67,7 @@ func TestAPIExportPermissionClaimCELValidation(t *testing.T) { }, }, wantErrs: []string{ - "openAPIV3Schema.properties.spec.properties.permissionClaims.items: Invalid value: \"object\": either \"all\" or \"resourceSelector\" must be set", + "openAPIV3Schema.properties.spec.properties.permissionClaims.items: Invalid value: either \"all\" or \"resourceSelector\" must be set", }, }, { @@ -76,7 +76,7 @@ func TestAPIExportPermissionClaimCELValidation(t *testing.T) { "resourceSelector": nil, }, wantErrs: []string{ - "openAPIV3Schema.properties.spec.properties.permissionClaims.items: Invalid value: \"object\": either \"all\" or \"resourceSelector\" must be set", + "openAPIV3Schema.properties.spec.properties.permissionClaims.items: Invalid value: either \"all\" or \"resourceSelector\" must be set", }, }, { @@ -85,7 +85,7 @@ func TestAPIExportPermissionClaimCELValidation(t *testing.T) { "resourceSelector": []interface{}{}, }, wantErrs: []string{ - "openAPIV3Schema.properties.spec.properties.permissionClaims.items: Invalid value: \"object\": either \"all\" or \"resourceSelector\" must be set", + "openAPIV3Schema.properties.spec.properties.permissionClaims.items: Invalid value: either \"all\" or \"resourceSelector\" must be set", }, }, { @@ -103,7 +103,7 @@ func TestAPIExportPermissionClaimCELValidation(t *testing.T) { "resourceSelector": nil, }, wantErrs: []string{ - "openAPIV3Schema.properties.spec.properties.permissionClaims.items: Invalid value: \"object\": either \"all\" or \"resourceSelector\" must be set", + "openAPIV3Schema.properties.spec.properties.permissionClaims.items: Invalid value: either \"all\" or \"resourceSelector\" must be set", }, }, { @@ -113,7 +113,7 @@ func TestAPIExportPermissionClaimCELValidation(t *testing.T) { "resourceSelector": []interface{}{}, }, wantErrs: []string{ - "openAPIV3Schema.properties.spec.properties.permissionClaims.items: Invalid value: \"object\": either \"all\" or \"resourceSelector\" must be set", + "openAPIV3Schema.properties.spec.properties.permissionClaims.items: Invalid value: either \"all\" or \"resourceSelector\" must be set", }, }, { @@ -166,7 +166,7 @@ func TestResourceSelectorCELValidation(t *testing.T) { "namespace": nil, }, wantErrs: []string{ - "openAPIV3Schema.properties.spec.properties.permissionClaims.items.properties.resourceSelector.items: Invalid value: \"object\": at least one field must be set", + "openAPIV3Schema.properties.spec.properties.permissionClaims.items.properties.resourceSelector.items: Invalid value: at least one field must be set", }, }, { diff --git a/staging/src/k8s.io/apiextensions-apiserver/test/integration/conversion/conversion_test.go b/staging/src/k8s.io/apiextensions-apiserver/test/integration/conversion/conversion_test.go index e24b504f7283f..16d6facab156c 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/test/integration/conversion/conversion_test.go +++ b/staging/src/k8s.io/apiextensions-apiserver/test/integration/conversion/conversion_test.go @@ -63,6 +63,112 @@ func TestWebhookConverterWithoutWatchCache(t *testing.T) { testWebhookConverter(t, false) } +// TestWebhookNotCalledForUnusedVersions tests scenario where conversion webhook could be called for +// versions that are nor served or nor stored. +// Described in detail in https://github.com/kubernetes/kubernetes/issues/129979 +func TestWebhookNotCalledForUnusedVersions(t *testing.T) { + ctx := context.Background() + + etcd3watcher.TestOnlySetFatalOnDecodeError(false) + defer etcd3watcher.TestOnlySetFatalOnDecodeError(true) + + tearDown, config, options, err := fixtures.StartDefaultServer(t, "--watch-cache=true") + if err != nil { + t.Fatal(err) + } + + apiExtensionsClient, err := clientset.NewForConfig(config) + if err != nil { + tearDown() + t.Fatal(err) + } + + dynamicClient, err := dynamic.NewForConfig(config) + if err != nil { + tearDown() + t.Fatal(err) + } + defer tearDown() + + crd := multiVersionFixture.DeepCopy() + crd.Spec.Versions[0].Storage = false + crd.Spec.Versions[3].Served = true + crd.Spec.Versions[3].Storage = true + + RESTOptionsGetter := serveroptions.NewCRDRESTOptionsGetter(*options.RecommendedOptions.Etcd, nil, nil) + restOptions, err := RESTOptionsGetter.GetRESTOptions(schema.GroupResource{Group: crd.Spec.Group, Resource: crd.Spec.Names.Plural}, nil) + if err != nil { + t.Fatal(err) + } + etcdClient, _, err := storage.GetEtcdClients(restOptions.StorageConfig.Transport) + if err != nil { + t.Fatal(err) + } + // nolint:errcheck + defer etcdClient.Close() + + etcdObjectReader := storage.NewEtcdObjectReader(etcdClient, &restOptions, crd) + ctcTearDown, ctc := newConversionTestContext(t, apiExtensionsClient, dynamicClient, etcdObjectReader, crd) + defer ctcTearDown() + + marker, err := ctc.versionedClient("marker", "v1alpha2").Create(ctx, newConversionMultiVersionFixture("marker", "marker", "v1alpha2"), metav1.CreateOptions{}) + if err != nil { + t.Fatal(err) + } + + // Update CRD to stop serving v1alpha2 version + ctc.setStorageVersion(t, "v1beta1") + ctc.setServed(t, "v1alpha2", false) + + // Clear managed fields to avoid known problem: https://github.com/kubernetes/kubernetes/issues/111937 + v1alpha1marker := newConversionMultiVersionFixture("marker", "marker", "v1alpha1") + v1alpha1marker.SetResourceVersion(marker.GetResourceVersion()) + v1alpha1marker.SetManagedFields([]metav1.ManagedFieldsEntry{{}}) + marker, err = ctc.versionedClient(marker.GetNamespace(), "v1alpha1").Update(ctx, v1alpha1marker, metav1.UpdateOptions{}) + if err != nil { + t.Fatal(err) + } + + // Setup webhook that checks that it's never called with v1alpha2 version + upCh, handler := closeOnCall(NewObjectConverterWebhookHandler(t, getUnexpectedVersionCheckConverter(t, "v1alpha2"))) + tearDown, webhookClientConfig, err := StartConversionWebhookServer(handler) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + ctc.setConversionWebhook(t, webhookClientConfig, []string{"v1alpha1", "v1beta1", "v1beta2"}) + defer ctc.removeConversionWebhook(t) + + // wait until new webhook is called the first time + if err := wait.PollUntilContextTimeout(ctx, time.Millisecond*100, wait.ForeverTestTimeout, true, func(ctx context.Context) (done bool, err error) { + _, getErr := ctc.versionedClient(marker.GetNamespace(), "v1alpha1").Get(ctx, marker.GetName(), metav1.GetOptions{}) + select { + case <-upCh: + return true, nil + default: + t.Logf("Waiting for webhook to become effective, getting marker object: %v", getErr) + return false, nil + } + }); err != nil { + t.Fatal(err) + } + + // Check that marker can be read in all served versions + for _, v := range servedVersions(ctc.crd.Spec.Versions) { + if _, err := ctc.versionedClient(marker.GetNamespace(), v.Name).Get(ctx, marker.GetName(), metav1.GetOptions{}); err != nil { + t.Fatal(err) + } + } + + // Check that it's possible to update marker via a different API versions using server-side apply + for _, v := range servedVersions(ctc.crd.Spec.Versions) { + if _, err := ctc.versionedClient(marker.GetNamespace(), v.Name).Apply(ctx, marker.GetName(), newConversionMultiVersionFixture("marker", "marker", v.Name), metav1.ApplyOptions{FieldManager: "application/apply-patch"}); err != nil { + t.Fatal(err) + } + } +} + func testWebhookConverter(t *testing.T, watchCache bool) { tests := []struct { group string @@ -247,7 +353,7 @@ func testWebhookConverter(t *testing.T, watchCache bool) { func validateStorageVersion(t *testing.T, ctc *conversionTestContext) { ns := ctc.namespace - for _, version := range ctc.crd.Spec.Versions { + for _, version := range servedVersions(ctc.crd.Spec.Versions) { t.Run(version.Name, func(t *testing.T) { name := "storageversion-" + version.Name client := ctc.versionedClient(ns, version.Name) @@ -314,7 +420,7 @@ func validateMixedStorageVersions(versions ...string) func(t *testing.T, ctc *co func validateServed(t *testing.T, ctc *conversionTestContext) { ns := ctc.namespace - for _, version := range ctc.crd.Spec.Versions { + for _, version := range servedVersions(ctc.crd.Spec.Versions) { t.Run(version.Name, func(t *testing.T) { name := "served-" + version.Name client := ctc.versionedClient(ns, version.Name) @@ -333,7 +439,7 @@ func validateServed(t *testing.T, ctc *conversionTestContext) { func validateNonTrivialConverted(t *testing.T, ctc *conversionTestContext) { ns := ctc.namespace - for _, createVersion := range ctc.crd.Spec.Versions { + for _, createVersion := range servedVersions(ctc.crd.Spec.Versions) { t.Run(fmt.Sprintf("getting objects created as %s", createVersion.Name), func(t *testing.T) { name := "converted-" + createVersion.Name client := ctc.versionedClient(ns, createVersion.Name) @@ -353,7 +459,7 @@ func validateNonTrivialConverted(t *testing.T, ctc *conversionTestContext) { } verifyMultiVersionObject(t, "v1beta1", obj) - for _, getVersion := range ctc.crd.Spec.Versions { + for _, getVersion := range servedVersions(ctc.crd.Spec.Versions) { client := ctc.versionedClient(ns, getVersion.Name) obj, err := client.Get(context.TODO(), name, metav1.GetOptions{}) if err != nil { @@ -391,7 +497,8 @@ func validateNonTrivialConvertedList(t *testing.T, ctc *conversionTestContext) { ns := ctc.namespace + "-list" names := sets.String{} - for _, createVersion := range ctc.crd.Spec.Versions { + versions := servedVersions(ctc.crd.Spec.Versions) + for _, createVersion := range versions { name := "converted-" + createVersion.Name client := ctc.versionedClient(ns, createVersion.Name) fixture := newConversionMultiVersionFixture(ns, name, createVersion.Name) @@ -405,14 +512,14 @@ func validateNonTrivialConvertedList(t *testing.T, ctc *conversionTestContext) { names.Insert(name) } - for _, listVersion := range ctc.crd.Spec.Versions { + for _, listVersion := range versions { t.Run(fmt.Sprintf("listing objects as %s", listVersion.Name), func(t *testing.T) { client := ctc.versionedClient(ns, listVersion.Name) obj, err := client.List(context.TODO(), metav1.ListOptions{}) if err != nil { t.Fatal(err) } - if len(obj.Items) != len(ctc.crd.Spec.Versions) { + if len(obj.Items) != len(versions) { t.Fatal("unexpected number of items") } foundNames := sets.String{} @@ -430,7 +537,7 @@ func validateNonTrivialConvertedList(t *testing.T, ctc *conversionTestContext) { func validateStoragePruning(t *testing.T, ctc *conversionTestContext) { ns := ctc.namespace - for _, createVersion := range ctc.crd.Spec.Versions { + for _, createVersion := range servedVersions(ctc.crd.Spec.Versions) { t.Run(fmt.Sprintf("getting objects created as %s", createVersion.Name), func(t *testing.T) { name := "storagepruning-" + createVersion.Name client := ctc.versionedClient(ns, createVersion.Name) @@ -465,7 +572,7 @@ func validateStoragePruning(t *testing.T, ctc *conversionTestContext) { t.Fatal(err) } - for _, getVersion := range ctc.crd.Spec.Versions { + for _, getVersion := range servedVersions(ctc.crd.Spec.Versions) { client := ctc.versionedClient(ns, getVersion.Name) obj, err := client.Get(context.TODO(), name, metav1.GetOptions{}) if err != nil { @@ -594,7 +701,7 @@ func validateDefaulting(t *testing.T, ctc *conversionTestContext) { ns := ctc.namespace storageVersion := "v1beta1" - for _, createVersion := range ctc.crd.Spec.Versions { + for _, createVersion := range servedVersions(ctc.crd.Spec.Versions) { t.Run(fmt.Sprintf("getting objects created as %s", createVersion.Name), func(t *testing.T) { name := "defaulting-" + createVersion.Name client := ctc.versionedClient(ns, createVersion.Name) @@ -644,7 +751,7 @@ func validateDefaulting(t *testing.T, ctc *conversionTestContext) { } // check that when reading any other version, we do not default that version, but only the (non-persisted) storage version default - for _, v := range ctc.crd.Spec.Versions { + for _, v := range servedVersions(ctc.crd.Spec.Versions) { if v.Name == createVersion.Name { // create version is persisted anyway, nothing to verify continue @@ -921,6 +1028,16 @@ func uidMutatingConverter(desiredAPIVersion string, obj runtime.RawExtension) (r return runtime.RawExtension{Raw: raw}, nil } +func getUnexpectedVersionCheckConverter(t *testing.T, version string) ObjectConverterFunc { + return func(desiredAPIVersion string, obj runtime.RawExtension) (runtime.RawExtension, error) { + if desiredAPIVersion == "stable.example.com/"+version { + t.Fatalf("webhook received unexpected version: %s", version) + } + + return nontrivialConverter(desiredAPIVersion, obj) + } +} + func newConversionTestContext(t *testing.T, apiExtensionsClient clientset.Interface, dynamicClient dynamic.Interface, etcdObjectReader *storage.EtcdObjectReader, v1CRD *apiextensionsv1.CustomResourceDefinition) (func(), *conversionTestContext) { v1CRD, err := fixtures.CreateNewV1CustomResourceDefinition(v1CRD, apiExtensionsClient, dynamicClient) if err != nil { @@ -958,7 +1075,7 @@ func (c *conversionTestContext) versionedClient(ns string, version string) dynam func (c *conversionTestContext) versionedClients(ns string) map[string]dynamic.ResourceInterface { ret := map[string]dynamic.ResourceInterface{} - for _, v := range c.crd.Spec.Versions { + for _, v := range servedVersions(c.crd.Spec.Versions) { ret[v.Name] = c.versionedClient(ns, v.Name) } return ret @@ -1129,6 +1246,7 @@ var multiVersionFixture = &apiextensionsv1.CustomResourceDefinition{ Type: "object", Properties: map[string]apiextensionsv1.JSONSchemaProps{ "v1alpha1": {Type: "boolean"}, + "v1alpha2": {Type: "boolean"}, "v1beta1": {Type: "boolean", Default: jsonPtr(true)}, "v1beta2": {Type: "boolean"}, }, @@ -1170,6 +1288,7 @@ var multiVersionFixture = &apiextensionsv1.CustomResourceDefinition{ Type: "object", Properties: map[string]apiextensionsv1.JSONSchemaProps{ "v1alpha1": {Type: "boolean", Default: jsonPtr(true)}, + "v1alpha2": {Type: "boolean"}, "v1beta1": {Type: "boolean"}, "v1beta2": {Type: "boolean"}, }, @@ -1211,6 +1330,7 @@ var multiVersionFixture = &apiextensionsv1.CustomResourceDefinition{ Type: "object", Properties: map[string]apiextensionsv1.JSONSchemaProps{ "v1alpha1": {Type: "boolean"}, + "v1alpha2": {Type: "boolean"}, "v1beta1": {Type: "boolean"}, "v1beta2": {Type: "boolean", Default: jsonPtr(true)}, }, @@ -1219,6 +1339,48 @@ var multiVersionFixture = &apiextensionsv1.CustomResourceDefinition{ }, }, }, + { + // same schema as v1beta1, but not served + Name: "v1alpha2", + Served: false, + Storage: false, + Subresources: &apiextensionsv1.CustomResourceSubresources{ + Status: &apiextensionsv1.CustomResourceSubresourceStatus{}, + Scale: &apiextensionsv1.CustomResourceSubresourceScale{ + SpecReplicasPath: ".spec.num.num1", + StatusReplicasPath: ".status.num.num2", + }, + }, + Schema: &apiextensionsv1.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{ + Type: "object", + Properties: map[string]apiextensionsv1.JSONSchemaProps{ + "content": { + Type: "object", + Properties: map[string]apiextensionsv1.JSONSchemaProps{ + "key": {Type: "string"}, + }, + }, + "num": { + Type: "object", + Properties: map[string]apiextensionsv1.JSONSchemaProps{ + "num1": {Type: "integer"}, + "num2": {Type: "integer"}, + }, + }, + "defaults": { + Type: "object", + Properties: map[string]apiextensionsv1.JSONSchemaProps{ + "v1alpha1": {Type: "boolean"}, + "v1alpha2": {Type: "boolean", Default: jsonPtr(true)}, + "v1beta1": {Type: "boolean"}, + "v1beta2": {Type: "boolean"}, + }, + }, + }, + }, + }, + }, }, }, } @@ -1244,6 +1406,14 @@ func newConversionMultiVersionFixture(namespace, name, version string) *unstruct "num1": int64(1), "num2": int64(1000000), } + case "v1alpha2": + u.Object["content"] = map[string]interface{}{ + "key": "value", + } + u.Object["num"] = map[string]interface{}{ + "num1": int64(1), + "num2": int64(1000000), + } case "v1beta1": u.Object["content"] = map[string]interface{}{ "key": "value", @@ -1337,6 +1507,16 @@ func jsonPtr(x interface{}) *apiextensionsv1.JSON { return &ret } +func servedVersions(versions []apiextensionsv1.CustomResourceDefinitionVersion) (served []apiextensionsv1.CustomResourceDefinitionVersion) { + for _, v := range versions { + if v.Served { + served = append(served, v) + } + } + + return served +} + func TestWebhookConversion_WhitespaceCABundleEtcdBypass(t *testing.T) { // Setup server and clients tearDown, config, options, err := fixtures.StartDefaultServer(t) diff --git a/staging/src/k8s.io/apimachinery/go.mod b/staging/src/k8s.io/apimachinery/go.mod index 6a2bcc47105f6..37508205791ef 100644 --- a/staging/src/k8s.io/apimachinery/go.mod +++ b/staging/src/k8s.io/apimachinery/go.mod @@ -2,38 +2,37 @@ module k8s.io/apimachinery -go 1.24.0 +go 1.25.0 -godebug default=go1.24 +godebug default=go1.25 require ( github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 github.com/davecgh/go-spew v1.1.1 github.com/fxamacker/cbor/v2 v2.9.0 - github.com/gogo/protobuf v1.3.2 github.com/google/gnostic-models v0.7.0 github.com/google/go-cmp v0.7.0 github.com/google/uuid v1.6.0 github.com/moby/spdystream v0.5.0 github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f github.com/pmezard/go-difflib v1.0.0 - github.com/spf13/pflag v1.0.6 - github.com/stretchr/testify v1.10.0 - golang.org/x/net v0.38.0 + github.com/spf13/pflag v1.0.9 + github.com/stretchr/testify v1.11.1 + golang.org/x/net v0.43.0 golang.org/x/time v0.9.0 - gopkg.in/evanphx/json-patch.v4 v4.12.0 + gopkg.in/evanphx/json-patch.v4 v4.13.0 gopkg.in/inf.v0 v0.9.1 k8s.io/klog/v2 v2.130.1 - k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b + k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 - sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 sigs.k8s.io/randfill v1.0.0 sigs.k8s.io/structured-merge-diff/v6 v6.3.0 sigs.k8s.io/yaml v1.6.0 ) require ( - github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/logr v1.4.3 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.23.0 // indirect @@ -44,12 +43,11 @@ require ( github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/onsi/ginkgo/v2 v2.21.0 // indirect github.com/onsi/gomega v1.35.1 // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/x448/float16 v0.8.4 // indirect go.yaml.in/yaml/v2 v2.4.2 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/text v0.23.0 // indirect - google.golang.org/protobuf v1.36.5 // indirect + golang.org/x/text v0.28.0 // indirect + google.golang.org/protobuf v1.36.8 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/staging/src/k8s.io/apimachinery/go.sum b/staging/src/k8s.io/apimachinery/go.sum index 93222975c8423..df32fdaca44c0 100644 --- a/staging/src/k8s.io/apimachinery/go.sum +++ b/staging/src/k8s.io/apimachinery/go.sum @@ -8,8 +8,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= @@ -20,8 +20,6 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= @@ -36,8 +34,6 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -62,14 +58,12 @@ github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= -github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -78,62 +72,38 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= +golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= +golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools/go/expect v0.1.0-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= -gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -142,12 +112,12 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= diff --git a/staging/src/k8s.io/apimachinery/pkg/api/errors/errors.go b/staging/src/k8s.io/apimachinery/pkg/api/errors/errors.go index 2c101ab39e569..7b57a9eb6cabe 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/errors/errors.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/errors/errors.go @@ -258,7 +258,8 @@ func NewApplyConflict(causes []metav1.StatusCause, message string) *StatusError } // NewGone returns an error indicating the item no longer available at the server and no forwarding address is known. -// DEPRECATED: Please use NewResourceExpired instead. +// +// Deprecated: Please use NewResourceExpired instead. func NewGone(message string) *StatusError { return &StatusError{metav1.Status{ Status: metav1.StatusFailure, diff --git a/staging/src/k8s.io/apimachinery/pkg/api/resource/generated.pb.go b/staging/src/k8s.io/apimachinery/pkg/api/resource/generated.pb.go index c3a272168e861..9e1a5c0e1fe94 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/resource/generated.pb.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/resource/generated.pb.go @@ -19,95 +19,6 @@ limitations under the License. package resource -import ( - fmt "fmt" +func (m *Quantity) Reset() { *m = Quantity{} } - math "math" - - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *Quantity) Reset() { *m = Quantity{} } -func (*Quantity) ProtoMessage() {} -func (*Quantity) Descriptor() ([]byte, []int) { - return fileDescriptor_7288c78ff45111e9, []int{0} -} -func (m *Quantity) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Quantity.Unmarshal(m, b) -} -func (m *Quantity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Quantity.Marshal(b, m, deterministic) -} -func (m *Quantity) XXX_Merge(src proto.Message) { - xxx_messageInfo_Quantity.Merge(m, src) -} -func (m *Quantity) XXX_Size() int { - return xxx_messageInfo_Quantity.Size(m) -} -func (m *Quantity) XXX_DiscardUnknown() { - xxx_messageInfo_Quantity.DiscardUnknown(m) -} - -var xxx_messageInfo_Quantity proto.InternalMessageInfo - -func (m *QuantityValue) Reset() { *m = QuantityValue{} } -func (*QuantityValue) ProtoMessage() {} -func (*QuantityValue) Descriptor() ([]byte, []int) { - return fileDescriptor_7288c78ff45111e9, []int{1} -} -func (m *QuantityValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QuantityValue.Unmarshal(m, b) -} -func (m *QuantityValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QuantityValue.Marshal(b, m, deterministic) -} -func (m *QuantityValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuantityValue.Merge(m, src) -} -func (m *QuantityValue) XXX_Size() int { - return xxx_messageInfo_QuantityValue.Size(m) -} -func (m *QuantityValue) XXX_DiscardUnknown() { - xxx_messageInfo_QuantityValue.DiscardUnknown(m) -} - -var xxx_messageInfo_QuantityValue proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Quantity)(nil), "k8s.io.apimachinery.pkg.api.resource.Quantity") - proto.RegisterType((*QuantityValue)(nil), "k8s.io.apimachinery.pkg.api.resource.QuantityValue") -} - -func init() { - proto.RegisterFile("k8s.io/apimachinery/pkg/api/resource/generated.proto", fileDescriptor_7288c78ff45111e9) -} - -var fileDescriptor_7288c78ff45111e9 = []byte{ - // 234 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xc9, 0xb6, 0x28, 0xd6, - 0xcb, 0xcc, 0xd7, 0x4f, 0x2c, 0xc8, 0xcc, 0x4d, 0x4c, 0xce, 0xc8, 0xcc, 0x4b, 0x2d, 0xaa, 0xd4, - 0x2f, 0xc8, 0x4e, 0x07, 0x09, 0xe8, 0x17, 0xa5, 0x16, 0xe7, 0x97, 0x16, 0x25, 0xa7, 0xea, 0xa7, - 0xa7, 0xe6, 0xa5, 0x16, 0x25, 0x96, 0xa4, 0xa6, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xa9, - 0x40, 0x74, 0xe9, 0x21, 0xeb, 0xd2, 0x2b, 0xc8, 0x4e, 0x07, 0x09, 0xe8, 0xc1, 0x74, 0x49, 0xe9, - 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, - 0x83, 0x35, 0x27, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0x31, 0x54, 0xc9, 0x82, 0x8b, - 0x23, 0xb0, 0x34, 0x31, 0xaf, 0x24, 0xb3, 0xa4, 0x52, 0x48, 0x8c, 0x8b, 0xad, 0xb8, 0xa4, 0x28, - 0x33, 0x2f, 0x5d, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xca, 0xb3, 0x12, 0x99, 0xb1, 0x40, - 0x9e, 0xa1, 0x63, 0xa1, 0x3c, 0xc3, 0x84, 0x85, 0xf2, 0x0c, 0x0b, 0x16, 0xca, 0x33, 0x34, 0xdc, - 0x51, 0x60, 0x50, 0xb2, 0xe5, 0xe2, 0x85, 0xe9, 0x0c, 0x4b, 0xcc, 0x29, 0x4d, 0x25, 0x4d, 0xbb, - 0x93, 0xd7, 0x89, 0x87, 0x72, 0x0c, 0x17, 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xd0, 0xf0, - 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x6f, 0x3c, 0x92, 0x63, 0x7c, - 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x28, 0x15, 0x62, 0x42, 0x0a, 0x10, 0x00, 0x00, - 0xff, 0xff, 0x50, 0x91, 0xd0, 0x9c, 0x50, 0x01, 0x00, 0x00, -} +func (m *QuantityValue) Reset() { *m = QuantityValue{} } diff --git a/staging/src/k8s.io/apimachinery/pkg/api/resource/generated.proto b/staging/src/k8s.io/apimachinery/pkg/api/resource/generated.proto index ddd0db8fbd1be..875ad8577af0b 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/resource/generated.proto +++ b/staging/src/k8s.io/apimachinery/pkg/api/resource/generated.proto @@ -93,6 +93,7 @@ option go_package = "k8s.io/apimachinery/pkg/api/resource"; // +protobuf.options.(gogoproto.goproto_stringer)=false // +k8s:deepcopy-gen=true // +k8s:openapi-gen=true +// +k8s:openapi-model-package=io.k8s.apimachinery.pkg.api.resource message Quantity { optional string string = 1; } @@ -105,6 +106,7 @@ message Quantity { // +protobuf.options.marshal=false // +protobuf.options.(gogoproto.goproto_stringer)=false // +k8s:deepcopy-gen=true +// +k8s:openapi-model-package=io.k8s.apimachinery.pkg.api.resource message QuantityValue { optional string string = 1; } diff --git a/staging/src/k8s.io/apimachinery/pkg/api/resource/generated.protomessage.pb.go b/staging/src/k8s.io/apimachinery/pkg/api/resource/generated.protomessage.pb.go new file mode 100644 index 0000000000000..712e155c3e5ed --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/api/resource/generated.protomessage.pb.go @@ -0,0 +1,26 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package resource + +func (*Quantity) ProtoMessage() {} + +func (*QuantityValue) ProtoMessage() {} diff --git a/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go b/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go index d0aada9dd753e..f3cd60060491d 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go @@ -99,6 +99,7 @@ import ( // +protobuf.options.(gogoproto.goproto_stringer)=false // +k8s:deepcopy-gen=true // +k8s:openapi-gen=true +// +k8s:openapi-model-package=io.k8s.apimachinery.pkg.api.resource type Quantity struct { // i is the quantity in int64 scaled form, if d.Dec == nil i int64Amount @@ -858,6 +859,7 @@ func (q *Quantity) SetScaled(value int64, scale Scale) { // +protobuf.options.marshal=false // +protobuf.options.(gogoproto.goproto_stringer)=false // +k8s:deepcopy-gen=true +// +k8s:openapi-model-package=io.k8s.apimachinery.pkg.api.resource type QuantityValue struct { Quantity } diff --git a/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go b/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go index 3e0cdb10d4090..364ec80da229b 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go @@ -20,12 +20,8 @@ import ( "fmt" "io" "math/bits" - - "github.com/gogo/protobuf/proto" ) -var _ proto.Sizer = &Quantity{} - func (m *Quantity) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) diff --git a/staging/src/k8s.io/apimachinery/pkg/api/resource/zz_generated.model_name.go b/staging/src/k8s.io/apimachinery/pkg/api/resource/zz_generated.model_name.go new file mode 100644 index 0000000000000..2575a2e8c88d6 --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/api/resource/zz_generated.model_name.go @@ -0,0 +1,32 @@ +//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 openapi-gen. DO NOT EDIT. + +package resource + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Quantity) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.api.resource.Quantity" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in QuantityValue) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.api.resource.QuantityValue" +} diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/content/dns.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/content/dns.go new file mode 100644 index 0000000000000..bd20720794c4c --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/content/dns.go @@ -0,0 +1,101 @@ +/* +Copyright 2025 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 content + +import ( + "regexp" +) + +const dns1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?" + +const dns1123LabelErrMsg string = "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character" + +// DNS1123LabelMaxLength is a label's max length in DNS (RFC 1123) +const DNS1123LabelMaxLength int = 63 + +var dns1123LabelRegexp = regexp.MustCompile("^" + dns1123LabelFmt + "$") + +// IsDNS1123Label tests for a string that conforms to the definition of a label in +// DNS (RFC 1123). +func IsDNS1123Label(value string) []string { + var errs []string + if len(value) > DNS1123LabelMaxLength { + errs = append(errs, MaxLenError(DNS1123LabelMaxLength)) + } + if !dns1123LabelRegexp.MatchString(value) { + if dns1123SubdomainRegexp.MatchString(value) { + // It was a valid subdomain and not a valid label. Since we + // already checked length, it must be dots. + errs = append(errs, "must not contain dots") + } else { + errs = append(errs, RegexError(dns1123LabelErrMsg, dns1123LabelFmt, "my-name", "123-abc")) + } + } + return errs +} + +const dns1123SubdomainFmt string = dns1123LabelFmt + "(\\." + dns1123LabelFmt + ")*" +const dns1123SubdomainFmtCaseless string = "(?i)" + dns1123SubdomainFmt +const dns1123SubdomainErrorMsg string = "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character" +const dns1123SubdomainCaselessErrorMsg string = "an RFC 1123 subdomain must consist of alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character" + +// DNS1123SubdomainMaxLength is a subdomain's max length in DNS (RFC 1123) +const DNS1123SubdomainMaxLength int = 253 + +var dns1123SubdomainRegexp = regexp.MustCompile("^" + dns1123SubdomainFmt + "$") +var dns1123SubdomainCaselessRegexp = regexp.MustCompile("^" + dns1123SubdomainFmtCaseless + "$") + +// IsDNS1123Subdomain tests for a string that conforms to the definition of a +// subdomain in DNS (RFC 1123) lowercase. +func IsDNS1123Subdomain(value string) []string { + return isDNS1123Subdomain(value, false) +} + +// IsDNS1123SubdomainCaseless tests for a string that conforms to the definition of a +// subdomain in DNS (RFC 1123). +// +// Deprecated: API validation should never be caseless. Caseless validation is a vector +// for bugs and failed uniqueness assumptions. For example, names like "foo.com" and +// "FOO.COM" are both accepted as valid, but they are typically not treated as equal by +// consumers (e.g. CSI and DRA driver names). This fails the "least surprise" principle and +// can cause inconsistent behaviors. +// +// Note: This allows uppercase names but is not caseless — uppercase and lowercase are +// treated as different values. Use IsDNS1123Subdomain for strict, lowercase validation +// instead. +func IsDNS1123SubdomainCaseless(value string) []string { + return isDNS1123Subdomain(value, true) +} + +func isDNS1123Subdomain(value string, caseless bool) []string { + var errs []string + if len(value) > DNS1123SubdomainMaxLength { + errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength)) + } + errorMsg := dns1123SubdomainErrorMsg + example := "example.com" + regexp := dns1123SubdomainRegexp + if caseless { + errorMsg = dns1123SubdomainCaselessErrorMsg + example = "Example.com" + regexp = dns1123SubdomainCaselessRegexp + } + if !regexp.MatchString(value) { + errs = append(errs, RegexError(errorMsg, dns1123SubdomainFmt, example)) + } + return errs +} diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/content/dns_test.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/content/dns_test.go new file mode 100644 index 0000000000000..c241d722c1e7f --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/content/dns_test.go @@ -0,0 +1,126 @@ +/* +Copyright 2025 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 content + +import ( + "strings" + "testing" +) + +func TestIsDNS1123Label(t *testing.T) { + goodValues := []string{ + "a", "ab", "abc", "a1", "a-1", "a--1--2--b", + "0", "01", "012", "1a", "1-a", "1--a--b--2", + strings.Repeat("a", 63), + } + for _, val := range goodValues { + if msgs := IsDNS1123Label(val); len(msgs) != 0 { + t.Errorf("expected true for '%s': %v", val, msgs) + } + } + + badValues := []string{ + "", "A", "ABC", "aBc", "A1", "A-1", "1-A", + "-", "a-", "-a", "1-", "-1", + "_", "a_", "_a", "a_b", "1_", "_1", "1_2", + ".", "a.", ".a", "a.b", "1.", ".1", "1.2", + " ", "a ", " a", "a b", "1 ", " 1", "1 2", + strings.Repeat("a", 64), + } + for _, val := range badValues { + if msgs := IsDNS1123Label(val); len(msgs) == 0 { + t.Errorf("expected false for '%s'", val) + } + } +} + +func TestIsDNS1123Subdomain(t *testing.T) { + goodValues := []string{ + "a", "ab", "abc", "a1", "a-1", "a--1--2--b", + "0", "01", "012", "1a", "1-a", "1--a--b--2", + "a.a", "ab.a", "abc.a", "a1.a", "a-1.a", "a--1--2--b.a", + "a.1", "ab.1", "abc.1", "a1.1", "a-1.1", "a--1--2--b.1", + "0.a", "01.a", "012.a", "1a.a", "1-a.a", "1--a--b--2", + "0.1", "01.1", "012.1", "1a.1", "1-a.1", "1--a--b--2.1", + "a.b.c.d.e", "aa.bb.cc.dd.ee", "1.2.3.4.5", "11.22.33.44.55", + strings.Repeat("a", 253), + } + for _, val := range goodValues { + if msgs := IsDNS1123Subdomain(val); len(msgs) != 0 { + t.Errorf("expected true for '%s': %v", val, msgs) + } + } + + badValues := []string{ + "", "A", "ABC", "aBc", "A1", "A-1", "1-A", + "-", "a-", "-a", "1-", "-1", + "_", "a_", "_a", "a_b", "1_", "_1", "1_2", + ".", "a.", ".a", "a..b", "1.", ".1", "1..2", + " ", "a ", " a", "a b", "1 ", " 1", "1 2", + "A.a", "aB.a", "ab.A", "A1.a", "a1.A", + "A.1", "aB.1", "A1.1", "1A.1", + "0.A", "01.A", "012.A", "1A.a", "1a.A", + "A.B.C.D.E", "AA.BB.CC.DD.EE", "a.B.c.d.e", "aa.bB.cc.dd.ee", + "a@b", "a,b", "a_b", "a;b", + "a:b", "a%b", "a?b", "a$b", + strings.Repeat("a", 254), + } + for _, val := range badValues { + if msgs := IsDNS1123Subdomain(val); len(msgs) == 0 { + t.Errorf("expected false for '%s'", val) + } + } +} + +func TestIsDNS1123SubdomainCaseless(t *testing.T) { + goodValues := []string{ + "a", "ab", "abc", "a1", "a-1", "a--1--2--b", + "0", "01", "012", "1a", "1-a", "1--a--b--2", + "a.a", "ab.a", "abc.a", "a1.a", "a-1.a", "a--1--2--b.a", + "a.1", "ab.1", "abc.1", "a1.1", "a-1.1", "a--1--2--b.1", + "0.a", "01.a", "012.a", "1a.a", "1-a.a", "1--a--b--2", + "0.1", "01.1", "012.1", "1a.1", "1-a.1", "1--a--b--2.1", + "a.b.c.d.e", "aa.bb.cc.dd.ee", "1.2.3.4.5", "11.22.33.44.55", + "A", "AB", "ABC", "A1", "A-1", + "A.A", "AB.A", "ABC.A", "A1.A", "A-1.A", + "A.B.C.D.E", "AA.BB.CC.DD.EE", + "a.B.c.d.e", "aa.bB.cc.dd.ee", + strings.Repeat("a", 253), + strings.Repeat("A", 253), + } + for _, val := range goodValues { + if msgs := IsDNS1123SubdomainCaseless(val); len(msgs) != 0 { + t.Errorf("expected true for '%s': %v", val, msgs) + } + } + + badValues := []string{ + "", + "-", "a-", "-a", "1-", "-1", + "_", "a_", "_a", "a_b", "1_", "_1", "1_2", + ".", "a.", ".a", "a..b", "1.", ".1", "1..2", + " ", "a ", " a", "a b", "1 ", " 1", "1 2", + "a@b", "a,b", "a_b", "a;b", + "a:b", "a%b", "a?b", "a$b", + strings.Repeat("a", 254), + } + for _, val := range badValues { + if msgs := IsDNS1123SubdomainCaseless(val); len(msgs) == 0 { + t.Errorf("expected false for '%s'", val) + } + } +} diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/content/errors.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/content/errors.go index 3370df48b9c13..a4a1b5574c6ef 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validate/content/errors.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/content/errors.go @@ -29,6 +29,33 @@ func MinError[T constraints.Integer](min T) string { return fmt.Sprintf("must be greater than or equal to %d", min) } +// MaxLenError returns a string explanation of a "string too long" validation +// failure. +func MaxLenError(length int) string { + return fmt.Sprintf("must be no more than %d bytes", length) +} + +// EmptyError returns a string explanation of an "empty string" validation. +func EmptyError() string { + return "must be non-empty" +} + +// RegexError returns a string explanation of a regex validation failure. +func RegexError(msg string, re string, examples ...string) string { + if len(examples) == 0 { + return msg + " (regex used for validation is '" + re + "')" + } + msg += " (e.g. " + for i := range examples { + if i > 0 { + msg += " or " + } + msg += "'" + examples[i] + "', " + } + msg += "regex used for validation is '" + re + "')" + return msg +} + // NEQError returns a string explanation of a "must not be equal to" validation failure. func NEQError[T any](disallowed T) string { format := "%v" diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/content/kube.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/content/kube.go new file mode 100644 index 0000000000000..44e82eefd33ee --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/content/kube.go @@ -0,0 +1,101 @@ +/* +Copyright 2025 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 content + +import ( + "regexp" + "strings" +) + +const labelKeyCharFmt string = "[A-Za-z0-9]" +const labelKeyExtCharFmt string = "[-A-Za-z0-9_.]" +const labelKeyFmt string = "(" + labelKeyCharFmt + labelKeyExtCharFmt + "*)?" + labelKeyCharFmt +const labelKeyErrMsg string = "must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character" +const labelKeyMaxLength int = 63 + +var labelKeyRegexp = regexp.MustCompile("^" + labelKeyFmt + "$") + +// IsQualifiedName tests whether the value passed is what Kubernetes calls a +// "qualified name", which is the same as a label key. +// +// Deprecated: use IsLabelKey instead. +var IsQualifiedName = IsLabelKey + +// IsLabelKey tests whether the value passed is a valid label key. This format +// is used to validate many fields in the Kubernetes API. +// Label keys consist of an optional prefix and a name, separated by a '/'. +// If the value is not valid, a list of error strings is returned. Otherwise, an +// empty list (or nil) is returned. +func IsLabelKey(value string) []string { + var errs []string + parts := strings.Split(value, "/") + var name string + switch len(parts) { + case 1: + name = parts[0] + case 2: + var prefix string + prefix, name = parts[0], parts[1] + if len(prefix) == 0 { + errs = append(errs, "prefix part "+EmptyError()) + } else if msgs := IsDNS1123Subdomain(prefix); len(msgs) != 0 { + errs = append(errs, prefixEach(msgs, "prefix part ")...) + } + default: + return append(errs, "a valid label key "+RegexError(labelKeyErrMsg, labelKeyFmt, "MyName", "my.name", "123-abc")+ + " with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')") + } + + if len(name) == 0 { + errs = append(errs, "name part "+EmptyError()) + } else if len(name) > labelKeyMaxLength { + errs = append(errs, "name part "+MaxLenError(labelKeyMaxLength)) + } + if !labelKeyRegexp.MatchString(name) { + errs = append(errs, "name part "+RegexError(labelKeyErrMsg, labelKeyFmt, "MyName", "my.name", "123-abc")) + } + return errs +} + +const labelValueFmt string = "(" + labelKeyFmt + ")?" +const labelValueErrMsg string = "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character" + +// LabelValueMaxLength is a label's max length +const LabelValueMaxLength int = 63 + +var labelValueRegexp = regexp.MustCompile("^" + labelValueFmt + "$") + +// IsLabelValue tests whether the value passed is a valid label value. If +// the value is not valid, a list of error strings is returned. Otherwise an +// empty list (or nil) is returned. +func IsLabelValue(value string) []string { + var errs []string + if len(value) > LabelValueMaxLength { + errs = append(errs, MaxLenError(LabelValueMaxLength)) + } + if !labelValueRegexp.MatchString(value) { + errs = append(errs, RegexError(labelValueErrMsg, labelValueFmt, "MyValue", "my_value", "12345")) + } + return errs +} + +func prefixEach(msgs []string, prefix string) []string { + for i := range msgs { + msgs[i] = prefix + msgs[i] + } + return msgs +} diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/content/kube_test.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/content/kube_test.go new file mode 100644 index 0000000000000..efa08f41712e7 --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/content/kube_test.go @@ -0,0 +1,100 @@ +/* +Copyright 2025 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 content + +import ( + "strings" + "testing" +) + +func TestIsLabelKey(t *testing.T) { + successCases := []string{ + "simple", + "now-with-dashes", + "1-starts-with-num", + "1234", + "simple/simple", + "now-with-dashes/simple", + "now-with-dashes/now-with-dashes", + "now.with.dots/simple", + "now-with.dashes-and.dots/simple", + "1-num.2-num/3-num", + "1234/5678", + "1.2.3.4/5678", + "Uppercase_Is_OK_123", + "example.com/Uppercase_Is_OK_123", + "requests.storage-foo", + strings.Repeat("a", 63), + strings.Repeat("a", 253) + "/" + strings.Repeat("b", 63), + } + for i := range successCases { + if errs := IsLabelKey(successCases[i]); len(errs) != 0 { + t.Errorf("case[%d]: %q: expected success: %v", i, successCases[i], errs) + } + } + + errorCases := []string{ + "nospecialchars%^=@", + "cantendwithadash-", + "-cantstartwithadash-", + "only/one/slash", + "Example.com/abc", + "example_com/abc", + "example.com/", + "/simple", + strings.Repeat("a", 64), + strings.Repeat("a", 254) + "/abc", + } + for i := range errorCases { + if errs := IsLabelKey(errorCases[i]); len(errs) == 0 { + t.Errorf("case[%d]: %q: expected failure", i, errorCases[i]) + } + } +} + +func TestIsLabelValue(t *testing.T) { + successCases := []string{ + "simple", + "now-with-dashes", + "1-starts-with-num", + "end-with-num-1", + "1234", // only num + strings.Repeat("a", 63), // to the limit + "", // empty value + } + for i := range successCases { + if errs := IsLabelValue(successCases[i]); len(errs) != 0 { + t.Errorf("case %s expected success: %v", successCases[i], errs) + } + } + + errorCases := []string{ + "nospecialchars%^=@", + "Tama-nui-te-rā.is.Māori.sun", + "\\backslashes\\are\\bad", + "-starts-with-dash", + "ends-with-dash-", + ".starts.with.dot", + "ends.with.dot.", + strings.Repeat("a", 64), // over the limit + } + for i := range errorCases { + if errs := IsLabelValue(errorCases[i]); len(errs) == 0 { + t.Errorf("case[%d] expected failure", i) + } + } +} diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/each.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/each.go index 3d5bd3c1e70af..c815d6d913720 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validate/each.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/each.go @@ -169,3 +169,18 @@ func SemanticDeepEqual[T any](a, b T) bool { func DirectEqual[T comparable](a, b T) bool { return a == b } + +// DirectEqualPtr is a MatchFunc that dereferences two pointers and uses the == +// operator to compare the values. If both pointers are nil, it returns true. +// If one pointer is nil and the other is not, it returns false. +// It can be used by any other function that needs to compare two pointees +// directly. +func DirectEqualPtr[T comparable](a, b *T) bool { + if a == b { + return true + } + if a == nil || b == nil { + return false + } + return *a == *b +} diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/enum.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/enum.go index fc2167a410e06..6e5bcf373b8fc 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validate/enum.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/enum.go @@ -25,16 +25,50 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ) -// Enum verifies that the specified value is one of the valid symbols. -// This is for string enums only. -func Enum[T ~string](_ context.Context, op operation.Operation, fldPath *field.Path, value, _ *T, symbols sets.Set[T]) field.ErrorList { +// Enum verifies that a given value is a member of a set of enum values. +// Exclude Rules that apply when options are enabled or disabled are also considered. +// If ANY exclude rule matches for a value, that value is excluded from the enum when validating. +func Enum[T ~string](_ context.Context, op operation.Operation, fldPath *field.Path, value, _ *T, validValues sets.Set[T], exclusions []EnumExclusion[T]) field.ErrorList { if value == nil { return nil } - if !symbols.Has(*value) { - symbolList := symbols.UnsortedList() - slices.Sort(symbolList) - return field.ErrorList{field.NotSupported[T](fldPath, *value, symbolList)} + if !validValues.Has(*value) || isExcluded(op, exclusions, *value) { + return field.ErrorList{field.NotSupported[T](fldPath, *value, supportedValues(op, validValues, exclusions))} } return nil } + +// supportedValues returns a sorted list of supported values. +// Excluded enum values are not included in the list. +func supportedValues[T ~string](op operation.Operation, values sets.Set[T], exclusions []EnumExclusion[T]) []T { + res := make([]T, 0, len(values)) + for key := range values { + if isExcluded(op, exclusions, key) { + continue + } + res = append(res, key) + } + slices.Sort(res) + return res +} + +// EnumExclusion represents a single enum exclusion rule. +type EnumExclusion[T ~string] struct { + // Value specifies the enum value to be conditionally excluded. + Value T + // ExcludeWhen determines the condition for exclusion. + // If true, the value is excluded if the option is present. + // If false, the value is excluded if the option is NOT present. + ExcludeWhen bool + // Option is the name of the feature option that controls the exclusion. + Option string +} + +func isExcluded[T ~string](op operation.Operation, exclusions []EnumExclusion[T], value T) bool { + for _, rule := range exclusions { + if rule.Value == value && rule.ExcludeWhen == op.HasOption(rule.Option) { + return true + } + } + return false +} diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/enum_test.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/enum_test.go index c392aac7cb67e..a42f00ce9201e 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validate/enum_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/enum_test.go @@ -27,38 +27,43 @@ import ( func TestEnum(t *testing.T) { cases := []struct { - value string - valid sets.Set[string] - err bool + name string + value string + valid sets.Set[string] + expectErr string }{{ - value: "a", - valid: sets.New("a", "b", "c"), - err: false, + name: "valid value", + value: "a", + valid: sets.New("a", "b", "c"), + expectErr: "", }, { - value: "x", - valid: sets.New("c", "a", "b"), - err: true, + name: "invalid value", + value: "x", + valid: sets.New("a", "b", "c"), + expectErr: `fldpath: Unsupported value: "x": supported values: "a", "b", "c"`, }} - for i, tc := range cases { - result := Enum(context.Background(), operation.Operation{}, field.NewPath("fldpath"), &tc.value, nil, tc.valid) - if len(result) > 0 && !tc.err { - t.Errorf("case %d: unexpected failure: %v", i, fmtErrs(result)) - continue - } - if len(result) == 0 && tc.err { - t.Errorf("case %d: unexpected success", i) - continue - } - if len(result) > 0 { - if len(result) > 1 { - t.Errorf("case %d: unexepected multi-error: %v", i, fmtErrs(result)) - continue - } - if want, got := `supported values: "a", "b", "c"`, result[0].Detail; got != want { - t.Errorf("case %d: wrong error, expected: %q, got: %q", i, want, got) + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + op := operation.Operation{Type: operation.Create} + errs := Enum(context.Background(), op, field.NewPath("fldpath"), &tc.value, nil, tc.valid, nil) + + if tc.expectErr == "" { + if len(errs) > 0 { + t.Fatalf("expected no error, but got: %v", errs) + } + } else { + if len(errs) == 0 { + t.Fatal("expected an error, but got none") + } + if len(errs) > 1 { + t.Fatalf("expected a single error, but got: %v", errs) + } + if errs[0].Error() != tc.expectErr { + t.Errorf("expected error %q, but got %q", tc.expectErr, errs[0].Error()) + } } - } + }) } } @@ -71,37 +76,149 @@ func TestEnumTypedef(t *testing.T) { ) cases := []struct { - value StringType - valid sets.Set[StringType] - err bool + name string + value StringType + valid sets.Set[StringType] + expectErr string }{{ - value: "foo", - valid: sets.New(NotStringFoo, NotStringBar, NotStringQux), - err: false, + name: "valid value", + value: "foo", + valid: sets.New(NotStringFoo, NotStringBar, NotStringQux), + expectErr: "", }, { - value: "x", - valid: sets.New(NotStringFoo, NotStringBar, NotStringQux), - err: true, + name: "invalid value", + value: "x", + valid: sets.New(NotStringFoo, NotStringBar, NotStringQux), + expectErr: `fldpath: Unsupported value: "x": supported values: "bar", "foo", "qux"`, }} - for i, tc := range cases { - result := Enum(context.Background(), operation.Operation{}, field.NewPath("fldpath"), &tc.value, nil, tc.valid) - if len(result) > 0 && !tc.err { - t.Errorf("case %d: unexpected failure: %v", i, fmtErrs(result)) - continue - } - if len(result) == 0 && tc.err { - t.Errorf("case %d: unexpected success", i) - continue - } - if len(result) > 0 { - if len(result) > 1 { - t.Errorf("case %d: unexepected multi-error: %v", i, fmtErrs(result)) - continue + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + op := operation.Operation{Type: operation.Create} + errs := Enum(context.Background(), op, field.NewPath("fldpath"), &tc.value, nil, tc.valid, nil) + + if tc.expectErr == "" { + if len(errs) > 0 { + t.Fatalf("expected no error, but got: %v", errs) + } + } else { + if len(errs) == 0 { + t.Fatal("expected an error, but got none") + } + if len(errs) > 1 { + t.Fatalf("expected a single error, but got: %v", errs) + } + if errs[0].Error() != tc.expectErr { + t.Errorf("expected error %q, but got %q", tc.expectErr, errs[0].Error()) + } } - if want, got := `supported values: "bar", "foo", "qux"`, result[0].Detail; got != want { - t.Errorf("case %d: wrong error, expected: %q, got: %q", i, want, got) + }) + } +} + +func TestEnumExclude(t *testing.T) { + type TestEnum string + const ( + ValueA TestEnum = "A" + ValueB TestEnum = "B" + ValueC TestEnum = "C" + ValueD TestEnum = "D" + ) + + const ( + FeatureA = "FeatureA" + FeatureB = "FeatureB" + ) + + testEnumValues := sets.New(ValueA, ValueB, ValueC, ValueD) + testEnumExclusions := []EnumExclusion[TestEnum]{ + {Value: ValueA, Option: FeatureA, ExcludeWhen: true}, + {Value: ValueB, Option: FeatureB, ExcludeWhen: false}, + {Value: ValueD, Option: FeatureA, ExcludeWhen: true}, + {Value: ValueD, Option: FeatureB, ExcludeWhen: false}, + } + + testCases := []struct { + name string + value TestEnum + opts []string + expectErr string + }{ + { + name: "no options, A is valid", + value: ValueA, + }, + { + name: "no options, B is invalid", + value: ValueB, + expectErr: `fld: Unsupported value: "B": supported values: "A", "C"`, + }, + { + name: "no options, D is invalid", + value: ValueD, + expectErr: `fld: Unsupported value: "D": supported values: "A", "C"`, + }, + { + name: "FeatureA enabled, A is invalid", + value: ValueA, + opts: []string{FeatureA}, + expectErr: `fld: Unsupported value: "A": supported values: "C"`, + }, + { + name: "FeatureA enabled, B is invalid", + value: ValueB, + opts: []string{FeatureA}, + expectErr: `fld: Unsupported value: "B": supported values: "C"`, + }, + { + name: "FeatureB enabled, A is valid", + value: ValueA, + opts: []string{FeatureB}, + }, + { + name: "FeatureB enabled, B is valid", + value: ValueB, + opts: []string{FeatureB}, + }, + { + name: "FeatureA and FeatureB enabled, A is invalid", + value: ValueA, + opts: []string{FeatureA, FeatureB}, + expectErr: `fld: Unsupported value: "A": supported values: "B", "C"`, + }, + { + name: "FeatureA and FeatureB enabled, B is valid", + value: ValueB, + opts: []string{FeatureA, FeatureB}, + }, + { + name: "FeatureA and FeatureB enabled, D is invalid", + value: ValueD, + opts: []string{FeatureA, FeatureB}, + expectErr: `fld: Unsupported value: "D": supported values: "B", "C"`, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + op := operation.Operation{Type: operation.Create, Options: tc.opts} + errs := Enum(context.Background(), op, field.NewPath("fld"), &tc.value, nil, testEnumValues, testEnumExclusions) + + if tc.expectErr == "" { + if len(errs) > 0 { + t.Fatalf("expected no error, but got: %v", errs) + } + } else { + if len(errs) == 0 { + t.Fatal("expected an error, but got none") + } + if len(errs) > 1 { + t.Fatalf("expected a single error, but got: %v", errs) + } + if errs[0].Error() != tc.expectErr { + t.Errorf("expected error %q, but got %q", tc.expectErr, errs[0].Error()) + } } - } + }) } } diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/immutable.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/immutable.go index 5a9d3da2ec240..01a879c98f630 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validate/immutable.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/immutable.go @@ -19,46 +19,22 @@ package validate import ( "context" - "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/operation" "k8s.io/apimachinery/pkg/util/validation/field" ) -// ImmutableByCompare verifies that the specified value has not changed in the -// course of an update operation. It does nothing if the old value is not -// provided. If the caller needs to compare types that are not trivially -// comparable, they should use ImmutableByReflect instead. +// Immutable verifies that the specified value has not changed in the course of +// an update operation. It does nothing if the old value is not provided. // -// Caution: structs with pointer fields satisfy comparable, but this function -// will only compare pointer values. It does not compare the pointed-to -// values. -func ImmutableByCompare[T comparable](_ context.Context, op operation.Operation, fldPath *field.Path, value, oldValue *T) field.ErrorList { +// This function unconditionally returns a validation error as it +// relies on the default ratcheting mechanism to only be called when a +// change to the field has already been detected. This avoids a redundant +// equivalence check across ratcheting and this function. +func Immutable[T any](_ context.Context, op operation.Operation, fldPath *field.Path, _, _ T) field.ErrorList { if op.Type != operation.Update { return nil } - if value == nil && oldValue == nil { - return nil - } - if value == nil || oldValue == nil || *value != *oldValue { - return field.ErrorList{ - field.Forbidden(fldPath, "field is immutable"), - } - } - return nil -} - -// ImmutableByReflect verifies that the specified value has not changed in -// the course of an update operation. It does nothing if the old value is not -// provided. Unlike ImmutableByCompare, this function can be used with types that are -// not directly comparable, at the cost of performance. -func ImmutableByReflect[T any](_ context.Context, op operation.Operation, fldPath *field.Path, value, oldValue T) field.ErrorList { - if op.Type != operation.Update { - return nil - } - if !equality.Semantic.DeepEqual(value, oldValue) { - return field.ErrorList{ - field.Forbidden(fldPath, "field is immutable"), - } + return field.ErrorList{ + field.Invalid(fldPath, nil, "field is immutable").WithOrigin("immutable"), } - return nil } diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/immutable_test.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/immutable_test.go index c9edece284275..60396b0cc647d 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validate/immutable_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/immutable_test.go @@ -25,225 +25,51 @@ import ( "k8s.io/utils/ptr" ) -type StructComparable struct { - S string - I int - B bool -} - -func TestImmutableByCompare(t *testing.T) { - structA := StructComparable{"abc", 123, true} - structA2 := structA - structB := StructComparable{"xyz", 456, false} +func TestImmutable(t *testing.T) { + // The Immutable function relies on validation ratcheting to avoid being + // called when old and new values are equivalent. This unit test only needs + // to confirm two behaviors: + // 1. The function does nothing for non-update operations (e.g., create). + // 2. The function *always* returns an error for update operations, since + // ratcheting should have prevented the call if the values were unchanged. - for _, tc := range []struct { - name string - fn func(operation.Operation, *field.Path) field.ErrorList - fail bool - }{{ - name: "nil both values", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByCompare[int](context.Background(), op, fld, nil, nil) - }, - }, { - name: "nil value", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByCompare(context.Background(), op, fld, nil, ptr.To(123)) - }, - fail: true, - }, { - name: "nil oldValue", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByCompare(context.Background(), op, fld, ptr.To(123), nil) - }, - fail: true, - }, { - name: "int", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByCompare(context.Background(), op, fld, ptr.To(123), ptr.To(123)) - }, - }, { - name: "int fail", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByCompare(context.Background(), op, fld, ptr.To(123), ptr.To(456)) - }, - fail: true, - }, { - name: "string", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByCompare(context.Background(), op, fld, ptr.To("abc"), ptr.To("abc")) - }, - }, { - name: "string fail", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByCompare(context.Background(), op, fld, ptr.To("abc"), ptr.To("xyz")) - }, - fail: true, - }, { - name: "bool", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByCompare(context.Background(), op, fld, ptr.To(true), ptr.To(true)) - }, - }, { - name: "bool fail", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByCompare(context.Background(), op, fld, ptr.To(true), ptr.To(false)) - }, - fail: true, - }, { - name: "same struct", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByCompare(context.Background(), op, fld, ptr.To(structA), ptr.To(structA)) - }, - }, { - name: "equal struct", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByCompare(context.Background(), op, fld, ptr.To(structA), ptr.To(structA2)) - }, - }, { - name: "struct fail", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByCompare(context.Background(), op, fld, ptr.To(structA), ptr.To(structB)) - }, - fail: true, - }} { - t.Run(tc.name, func(t *testing.T) { - errs := tc.fn(operation.Operation{Type: operation.Create}, field.NewPath("")) - if len(errs) != 0 { // Create should always succeed - t.Errorf("case %q (create): expected success: %v", tc.name, errs) - } - errs = tc.fn(operation.Operation{Type: operation.Update}, field.NewPath("")) - if tc.fail && len(errs) == 0 { - t.Errorf("case %q (update): expected failure", tc.name) - } else if !tc.fail && len(errs) != 0 { - t.Errorf("case %q (update): expected success: %v", tc.name, errs) - } - }) - } -} - -type StructNonComparable struct { - S string - SP *string - I int - IP *int - B bool - BP *bool - SS []string - MSS map[string]string -} - -func TestImmutableByReflect(t *testing.T) { - structA := StructNonComparable{ - S: "abc", - SP: ptr.To("abc"), - I: 123, - IP: ptr.To(123), - B: true, - BP: ptr.To(true), - SS: []string{"a", "b", "c"}, - MSS: map[string]string{"a": "b", "c": "d"}, - } - - structA2 := structA - structA2.SP = ptr.To("abc") - structA2.IP = ptr.To(123) - structA2.BP = ptr.To(true) - structA2.SS = []string{"a", "b", "c"} - structA2.MSS = map[string]string{"a": "b", "c": "d"} - - structB := StructNonComparable{ - S: "xyz", - SP: ptr.To("xyz"), - I: 456, - IP: ptr.To(456), - B: false, - BP: ptr.To(false), - SS: []string{"x", "y", "z"}, - MSS: map[string]string{"x": "X", "y": "Y"}, + type simpleStruct struct { + S string } for _, tc := range []struct { name string - fn func(operation.Operation, *field.Path) field.ErrorList - fail bool + fn func(op operation.Operation, fldPath *field.Path) field.ErrorList }{{ - name: "nil both values", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByReflect[*int](context.Background(), op, fld, nil, nil) - }, - }, { - name: "nil value", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByReflect(context.Background(), op, fld, nil, ptr.To(123)) - }, - fail: true, - }, { - name: "nil oldValue", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByReflect(context.Background(), op, fld, ptr.To(123), nil) - }, - fail: true, - }, { - name: "int", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByReflect(context.Background(), op, fld, ptr.To(123), ptr.To(123)) - }, - }, { - name: "int fail", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByReflect(context.Background(), op, fld, ptr.To(123), ptr.To(456)) - }, - fail: true, - }, { - name: "string", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByReflect(context.Background(), op, fld, ptr.To("abc"), ptr.To("abc")) - }, - }, { - name: "string fail", + name: "with primitive type", fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByReflect(context.Background(), op, fld, ptr.To("abc"), ptr.To("xyz")) + return Immutable(context.Background(), op, fld, ptr.To(123), ptr.To(456)) }, - fail: true, }, { - name: "bool", + name: "with struct type", fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByReflect(context.Background(), op, fld, ptr.To(true), ptr.To(true)) + return Immutable(context.Background(), op, fld, &simpleStruct{S: "a"}, &simpleStruct{S: "b"}) }, }, { - name: "bool fail", + name: "with nil values", fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByReflect(context.Background(), op, fld, ptr.To(true), ptr.To(false)) + // Explicitly type the nil to satisfy the generic function signature. + return Immutable[*int](context.Background(), op, fld, nil, nil) }, - fail: true, - }, { - name: "same struct", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByReflect(context.Background(), op, fld, ptr.To(structA), ptr.To(structA)) - }, - }, { - name: "equal struct", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByReflect(context.Background(), op, fld, ptr.To(structA), ptr.To(structA2)) - }, - }, { - name: "struct fail", - fn: func(op operation.Operation, fld *field.Path) field.ErrorList { - return ImmutableByReflect(context.Background(), op, fld, ptr.To(structA), ptr.To(structB)) - }, - fail: true, }} { t.Run(tc.name, func(t *testing.T) { - errs := tc.fn(operation.Operation{Type: operation.Create}, field.NewPath("")) - if len(errs) != 0 { // Create should always succeed - t.Errorf("case %q (create): expected success: %v", tc.name, errs) + // Create operations should never return an error. + errs := tc.fn(operation.Operation{Type: operation.Create}, field.NewPath("field")) + if len(errs) != 0 { + t.Errorf("expected success for create operation, but got errors: %v", errs) } - errs = tc.fn(operation.Operation{Type: operation.Update}, field.NewPath("")) - if tc.fail && len(errs) == 0 { - t.Errorf("case %q (update): expected failure", tc.name) - } else if !tc.fail && len(errs) != 0 { - t.Errorf("case %q (update): expected success: %v", tc.name, errs) + + // Update operations should always return exactly one error. + errs = tc.fn(operation.Operation{Type: operation.Update}, field.NewPath("field")) + if len(errs) == 0 { + t.Errorf("expected a failure for update operation, but got success") + } else if len(errs) > 1 { + t.Errorf("expected exactly one error for update operation, but got %d: %v", len(errs), errs) } }) } diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/item.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/item.go index 9cc61dd3de27b..aba417fa1d4c7 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validate/item.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/item.go @@ -26,16 +26,21 @@ import ( // MatchItemFn takes a pointer to an item and returns true if it matches the criteria. type MatchItemFn[T any] func(*T) bool -// SliceItem finds the first item in newList that satisfies the 'matches' predicate, -// and if found, also looks for a matching item in oldList. It then invokes -// 'itemValidator' on these items. -// The fldPath passed to itemValidator is indexed to the matched item's position in newList. -// This function processes only the *first* matching item found in newList. -// It assumes that the 'matches' predicate targets a unique identifier (primary key) and -// will match at most one element per list. -// If this assumption is violated, changes in list order can lead this function -// to have inconsistent behavior. -// This function does not validate items that were removed (present in oldList but not in newList). +// SliceItem finds the first item in newList that satisfies the match function, +// and if found, also looks for a matching item in oldList. If the value of the +// item is the same as the previous value, as per the equiv function, then no +// validation is performed. Otherwise, it invokes 'itemValidator' on these items. +// +// This function processes only the *first* matching item found in newList. It +// assumes that the match functions targets a unique identifier (primary key) +// and will match at most one element per list. If this assumption is violated, +// changes in list order can lead this function to have inconsistent behavior. +// +// The fldPath passed to itemValidator is indexed to the matched item's +// position in newList. +// +// This function does not validate items that were removed (present in oldList +// but not in newList). func SliceItem[TList ~[]TItem, TItem any]( ctx context.Context, op operation.Operation, fldPath *field.Path, newList, oldList TList, diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/limits.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/limits.go index 5f5fe83a4dfea..b6db5e08cbe6a 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validate/limits.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/limits.go @@ -25,6 +25,26 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ) +// MaxLength verifies that the specified value is not longer than max +// characters. +func MaxLength[T ~string](_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *T, max int) field.ErrorList { + if value == nil { + return nil + } + if len(*value) > max { + return field.ErrorList{field.TooLong(fldPath, *value, max).WithOrigin("maxLength")} + } + return nil +} + +// MaxItems verifies that the specified slice is not longer than max items. +func MaxItems[T any](_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ []T, max int) field.ErrorList { + if len(value) > max { + return field.ErrorList{field.TooMany(fldPath, len(value), max).WithOrigin("maxItems")} + } + return nil +} + // Minimum verifies that the specified value is greater than or equal to min. func Minimum[T constraints.Integer](_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *T, min T) field.ErrorList { if value == nil { diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/limits_test.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/limits_test.go index 60b785b758d3e..f17937c691306 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validate/limits_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/limits_test.go @@ -26,6 +26,110 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ) +func TestMaxLength(t *testing.T) { + cases := []struct { + name string + value string + max int + wantErrs field.ErrorList // regex + }{{ + name: "empty string", + value: "", + max: 0, + wantErrs: nil, + }, { + name: "zero length", + value: "0", + max: 0, + wantErrs: field.ErrorList{ + field.TooLong(field.NewPath("fldpath"), nil, 0).WithOrigin("maxLength"), + }, + }, { + name: "one character", + value: "0", + max: 1, + wantErrs: nil, + }, { + name: "two characters", + value: "01", + max: 1, + wantErrs: field.ErrorList{ + field.TooLong(field.NewPath("fldpath"), nil, 1).WithOrigin("maxLength"), + }, + }, { + value: "", + max: -1, + wantErrs: field.ErrorList{ + field.TooLong(field.NewPath("fldpath"), nil, -1).WithOrigin("maxLength"), + }, + }} + + matcher := field.ErrorMatcher{}.ByOrigin().ByDetailSubstring().ByField().ByType() + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + v := tc.value + gotErrs := MaxLength(context.Background(), operation.Operation{}, field.NewPath("fldpath"), &v, nil, tc.max) + matcher.Test(t, tc.wantErrs, gotErrs) + }) + } +} + +func TestMaxItems(t *testing.T) { + cases := []struct { + name string + items int + max int + err string // regex + }{{ + name: "0 items, max 0", + items: 0, + max: 0, + }, { + name: "1 item, max 0", + items: 1, + max: 0, + err: "fldpath: Too many.*must have at most", + }, { + name: "1 item, max 1", + items: 1, + max: 1, + }, { + name: "2 items, max 1", + items: 2, + max: 1, + err: "fldpath: Too many.*must have at most", + }, { + name: "0 items, max -1", + items: 0, + max: -1, + err: "fldpath: Too many.*too many items", + }} + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + value := make([]bool, tc.items) + result := MaxItems(context.Background(), operation.Operation{}, field.NewPath("fldpath"), value, nil, tc.max) + if len(result) > 0 && tc.err == "" { + t.Errorf("unexpected failure: %v", fmtErrs(result)) + return + } + if len(result) == 0 && tc.err != "" { + t.Errorf("unexpected success: expected %q", tc.err) + return + } + if len(result) > 0 { + if len(result) > 1 { + t.Errorf("unexepected multi-error: %v", fmtErrs(result)) + return + } + if re := regexp.MustCompile(tc.err); !re.MatchString(result[0].Error()) { + t.Errorf("wrong error\nexpected: %q\n got: %v", tc.err, fmtErrs(result)) + } + } + }) + } +} + func TestMinimum(t *testing.T) { testMinimumPositive[int](t) testMinimumNegative[int](t) diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/options.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/options.go new file mode 100644 index 0000000000000..44236550b71bb --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/options.go @@ -0,0 +1,35 @@ +/* +Copyright 2025 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 validate + +import ( + "context" + + "k8s.io/apimachinery/pkg/api/operation" + "k8s.io/apimachinery/pkg/util/validation/field" +) + +// IfOption conditionally evaluates a validation function. If the option and enabled are both true the validator +// is called. If the option and enabled are both false the validator is called. Otherwise, the validator is not called. +func IfOption[T any](ctx context.Context, op operation.Operation, fldPath *field.Path, value, oldValue *T, + optionName string, enabled bool, validator func(context.Context, operation.Operation, *field.Path, *T, *T) field.ErrorList, +) field.ErrorList { + if op.HasOption(optionName) == enabled { + return validator(ctx, op, fldPath, value, oldValue) + } + return nil +} diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/strfmt.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/strfmt.go new file mode 100644 index 0000000000000..504afecc03369 --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/strfmt.go @@ -0,0 +1,182 @@ +/* +Copyright 2025 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 validate + +import ( + "context" + "fmt" + "strings" + + "k8s.io/apimachinery/pkg/api/operation" + "k8s.io/apimachinery/pkg/api/validate/content" + "k8s.io/apimachinery/pkg/util/validation/field" +) + +const ( + uuidErrorMessage = "must be a lowercase UUID in 8-4-4-4-12 format" +) + +// ShortName verifies that the specified value is a valid "short name" +// (sometimes known as a "DNS label"). +// - must not be empty +// - must be less than 64 characters long +// - must start and end with lower-case alphanumeric characters +// - must contain only lower-case alphanumeric characters or dashes +// +// All errors returned by this function will be "invalid" type errors. If the +// caller wants better errors, it must take responsibility for checking things +// like required/optional and max-length. +func ShortName[T ~string](_ context.Context, op operation.Operation, fldPath *field.Path, value, _ *T) field.ErrorList { + if value == nil { + return nil + } + var allErrs field.ErrorList + for _, msg := range content.IsDNS1123Label((string)(*value)) { + allErrs = append(allErrs, field.Invalid(fldPath, *value, msg).WithOrigin("format=k8s-short-name")) + } + return allErrs +} + +// LongName verifies that the specified value is a valid "long name" +// (sometimes known as a "DNS subdomain"). +// - must not be empty +// - must be less than 254 characters long +// - each element must start and end with lower-case alphanumeric characters +// - each element must contain only lower-case alphanumeric characters or dashes +// +// All errors returned by this function will be "invalid" type errors. If the +// caller wants better errors, it must take responsibility for checking things +// like required/optional and max-length. +func LongName[T ~string](_ context.Context, op operation.Operation, fldPath *field.Path, value, _ *T) field.ErrorList { + if value == nil { + return nil + } + var allErrs field.ErrorList + for _, msg := range content.IsDNS1123Subdomain((string)(*value)) { + allErrs = append(allErrs, field.Invalid(fldPath, *value, msg).WithOrigin("format=k8s-long-name")) + } + return allErrs +} + +// LabelKey verifies that the specified value is a valid label key. +// A label key is composed of an optional prefix and a name, separated by a '/'. +// The name part is required and must: +// - be 63 characters or less +// - begin and end with an alphanumeric character ([a-z0-9A-Z]) +// - contain only alphanumeric characters, dashes (-), underscores (_), or dots (.) +// +// The prefix is optional and must: +// - be a DNS subdomain +// - be no more than 253 characters +func LabelKey[T ~string](_ context.Context, op operation.Operation, fldPath *field.Path, value, _ *T) field.ErrorList { + if value == nil { + return nil + } + var allErrs field.ErrorList + for _, msg := range content.IsLabelKey((string)(*value)) { + allErrs = append(allErrs, field.Invalid(fldPath, *value, msg).WithOrigin("format=k8s-label-key")) + } + return allErrs +} + +// LongNameCaseless verifies that the specified value is a valid "long name" +// (sometimes known as a "DNS subdomain"), but is case-insensitive. +// - must not be empty +// - must be less than 254 characters long +// - each element must start and end with alphanumeric characters +// - each element must contain only alphanumeric characters or dashes +// +// Deprecated: Case-insensitive names are not recommended as they can lead to ambiguity +// (e.g., 'Foo', 'FOO', and 'foo' would be allowed names for foo). Use LongName for strict, lowercase validation. +func LongNameCaseless[T ~string](_ context.Context, op operation.Operation, fldPath *field.Path, value, _ *T) field.ErrorList { + if value == nil { + return nil + } + var allErrs field.ErrorList + for _, msg := range content.IsDNS1123SubdomainCaseless((string)(*value)) { + allErrs = append(allErrs, field.Invalid(fldPath, *value, msg).WithOrigin("format=k8s-long-name-caseless")) + } + return allErrs +} + +// LabelValue verifies that the specified value is a valid label value. +// - can be empty +// - must be no more than 63 characters +// - must start and end with alphanumeric characters +// - must contain only alphanumeric characters, dashes, underscores, or dots +func LabelValue[T ~string](_ context.Context, op operation.Operation, fldPath *field.Path, value, _ *T) field.ErrorList { + if value == nil { + return nil + } + var allErrs field.ErrorList + for _, msg := range content.IsLabelValue((string)(*value)) { + allErrs = append(allErrs, field.Invalid(fldPath, *value, msg).WithOrigin("format=k8s-label-value")) + } + return allErrs +} + +// UUID verifies that the specified value is a valid UUID (RFC 4122). +// - must be 36 characters long +// - must be in the normalized form `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` +// - must use only lowercase hexadecimal characters +func UUID[T ~string](_ context.Context, op operation.Operation, fldPath *field.Path, value, _ *T) field.ErrorList { + if value == nil { + return nil + } + val := (string)(*value) + if len(val) != 36 { + return field.ErrorList{field.Invalid(fldPath, val, uuidErrorMessage).WithOrigin("format=k8s-uuid")} + } + for idx := 0; idx < len(val); idx++ { + character := val[idx] + switch idx { + case 8, 13, 18, 23: + if character != '-' { + return field.ErrorList{field.Invalid(fldPath, val, uuidErrorMessage).WithOrigin("format=k8s-uuid")} + } + default: + // should be lower case hexadecimal. + if (character < '0' || character > '9') && (character < 'a' || character > 'f') { + return field.ErrorList{field.Invalid(fldPath, val, uuidErrorMessage).WithOrigin("format=k8s-uuid")} + } + } + } + return nil +} + +// ResourcePoolName verifies that the specified value is one or more valid "long name" +// parts separated by a '/' and no longer than 253 characters. +func ResourcePoolName[T ~string](ctx context.Context, op operation.Operation, fldPath *field.Path, value, _ *T) field.ErrorList { + if value == nil { + return nil + } + val := (string)(*value) + var allErrs field.ErrorList + if len(val) > 253 { + allErrs = append(allErrs, field.TooLong(fldPath, val, 253)) + } + parts := strings.Split(val, "/") + for i, part := range parts { + if len(part) == 0 { + allErrs = append(allErrs, field.Invalid(fldPath, val, fmt.Sprintf("segment %d: must not be empty", i))) + continue + } + // Note that we are overwriting the origin from the underlying LongName validation. + allErrs = append(allErrs, LongName(ctx, op, fldPath, &part, nil).PrefixDetail(fmt.Sprintf("segment %d: ", i))...) + } + return allErrs.WithOrigin("format=k8s-resource-pool-name") +} diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/strfmt_test.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/strfmt_test.go new file mode 100644 index 0000000000000..fd89bf08b5e8d --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/strfmt_test.go @@ -0,0 +1,574 @@ +/* +Copyright 2025 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 validate + +import ( + "context" + "strings" + "testing" + + "k8s.io/apimachinery/pkg/api/operation" + "k8s.io/apimachinery/pkg/util/validation/field" +) + +func TestShortName(t *testing.T) { + ctx := context.Background() + fldPath := field.NewPath("test") + + testCases := []struct { + name string + input string + wantErrs field.ErrorList + }{{ + name: "valid", + input: "abc-123", + wantErrs: nil, + }, { + name: "invalid: empty", + input: "", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "", "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character").WithOrigin("format=k8s-short-name"), + }, + }, { + name: "invalid: too long", + input: "01234567890123456789012345678901234567890123456789012345678901234", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "01234567890123456789012345678901234567890123456789012345678901234", "must be no more than 63 bytes").WithOrigin("format=k8s-short-name"), + }, + }, { + name: "invalid: starts with dash", + input: "-abc-123", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "-abc-123", "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character").WithOrigin("format=k8s-short-name"), + }, + }, { + name: "invalid: ends with dash", + input: "abc-123-", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "abc-123-", "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character").WithOrigin("format=k8s-short-name"), + }, + }, { + name: "invalid: upper-case", + input: "ABC-123", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "ABC-123", "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character").WithOrigin("format=k8s-short-name"), + }, + }, { + name: "invalid: other chars", + input: "abc_123", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "abc_123", "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character").WithOrigin("format=k8s-short-name"), + }, + }} + + matcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin().ByDetailSubstring() + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + value := tc.input + gotErrs := ShortName(ctx, operation.Operation{}, fldPath, &value, nil) + matcher.Test(t, tc.wantErrs, gotErrs) + }) + } +} + +func TestLongName(t *testing.T) { + ctx := context.Background() + fldPath := field.NewPath("test") + + testCases := []struct { + name string + input string + wantErrs field.ErrorList + }{{ + name: "valid", + input: "a.b.c", + wantErrs: nil, + }, { + name: "invalid: empty", + input: "", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "", "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character").WithOrigin("format=k8s-long-name"), + }, + }, { + name: "invalid: too long", + input: strings.Repeat("a", 254), + wantErrs: field.ErrorList{ + field.Invalid(fldPath, strings.Repeat("a", 254), "must be no more than 253 bytes").WithOrigin("format=k8s-long-name"), + }, + }, { + name: "invalid: starts with dash", + input: "-a.b.c", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "-a.b.c", "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character").WithOrigin("format=k8s-long-name"), + }, + }, { + name: "invalid: ends with dash", + input: "a.b.c-", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "a.b.c-", "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character").WithOrigin("format=k8s-long-name"), + }, + }, { + name: "invalid: upper-case", + input: "A.b.c", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "A.b.c", "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character").WithOrigin("format=k8s-long-name"), + }, + }, { + name: "invalid: other chars", + input: "a_b.c", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "a_b.c", "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character").WithOrigin("format=k8s-long-name"), + }, + }} + + matcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin().ByDetailSubstring() + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + value := tc.input + gotErrs := LongName(ctx, operation.Operation{}, fldPath, &value, nil) + matcher.Test(t, tc.wantErrs, gotErrs) + }) + } +} + +func TestLabelKey(t *testing.T) { + ctx := context.Background() + fldPath := field.NewPath("test") + + testCases := []struct { + name string + input string + wantErrs field.ErrorList + }{{ + name: "valid key", + input: "app", + wantErrs: nil, + }, { + name: "valid key with dash", + input: "app-name", + wantErrs: nil, + }, { + name: "valid key with dot", + input: "app.name", + wantErrs: nil, + }, { + name: "valid key with underscore", + input: "app_name", + wantErrs: nil, + }, { + name: "valid key with prefix", + input: "example.com/app", + wantErrs: nil, + }, { + name: "valid key with long prefix", + input: strings.Repeat("a", 63) + "." + strings.Repeat("b", 63) + "." + strings.Repeat("c", 63) + "." + strings.Repeat("d", 55) + "/app", + wantErrs: nil, + }, { + name: "invalid: empty string", + input: "", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-label-key"), + }, + }, { + name: "invalid: starts with dash", + input: "-app", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-label-key"), + }, + }, { + name: "invalid: ends with dash", + input: "app-", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-label-key"), + }, + }, { + name: "invalid: contains invalid characters", + input: "app^", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-label-key"), + }, + }, { + name: "invalid: name too long", + input: strings.Repeat("a", 64), + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-label-key"), + }, + }, { + name: "invalid: prefix too long", + input: strings.Repeat("a", 254) + "/app", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-label-key"), + }, + }, { + name: "invalid: prefix is not a DNS subdomain", + input: "example-.com/app", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-label-key"), + }, + }, { + name: "nil value", + input: "", // This will be handled by setting value to nil in the test runner + wantErrs: nil, + }} + + matcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin() + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + var value *string + if tc.name != "nil value" { + v := tc.input + value = &v + } + gotErrs := LabelKey(ctx, operation.Operation{}, fldPath, value, nil) + matcher.Test(t, tc.wantErrs, gotErrs) + }) + } +} + +func TestK8sUUID(t *testing.T) { + ctx := context.Background() + fldPath := field.NewPath("test") + + testCases := []struct { + name string + input string + wantErrs field.ErrorList + }{{ + name: "valid uuid with hyphens", + input: "123e4567-e89b-12d3-a456-426614174000", + wantErrs: nil, + }, { + name: "invalid uuid with hyphens uppercase", + input: "123E4567-E89B-12D3-A456-426614174000", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "123E4567-E89B-12D3-A456-426614174000", "must be a lowercase UUID in 8-4-4-4-12 format").WithOrigin("format=k8s-uuid"), + }, + }, { + name: "invalid uuid with urn prefix", + input: "urn:uuid:123e4567-e89b-12d3-a456-426614174000", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "urn:uuid:123e4567-e89b-12d3-a456-426614174000", "must be a lowercase UUID in 8-4-4-4-12 format").WithOrigin("format=k8s-uuid"), + }, + }, { + name: "invalid uuid without hyphens", + input: "123e4567e89b12d3a456426614174000", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "123e4567e89b12d3a456426614174000", "must be a lowercase UUID in 8-4-4-4-12 format").WithOrigin("format=k8s-uuid"), + }, + }, { + name: "invalid: wrong length", + input: "123e4567-e89b-12d3-a456-42661417400", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "123e4567-e89b-12d3-a456-42661417400", "must be a lowercase UUID in 8-4-4-4-12 format").WithOrigin("format=k8s-uuid"), + }, + }, { + name: "invalid: wrong characters", + input: "123e4567-e89b-12d3-a456-42661417400g", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "123e4567-e89b-12d3-a456-42661417400g", "must be a lowercase UUID in 8-4-4-4-12 format").WithOrigin("format=k8s-uuid"), + }, + }, { + name: "invalid: misplaced hyphens", + input: "123e4567-e89b-12d3-a4564-26614174000", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "123e4567-e89b-12d3-a4564-26614174000", "must be a lowercase UUID in 8-4-4-4-12 format").WithOrigin("format=k8s-uuid"), + }, + }, { + name: "empty string", + input: "", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "", "must be a lowercase UUID in 8-4-4-4-12 format").WithOrigin("format=k8s-uuid"), + }, + }, { + name: "not a uuid", + input: "not-a-uuid", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "not-a-uuid", "must be a lowercase UUID in 8-4-4-4-12 format").WithOrigin("format=k8s-uuid"), + }, + }} + + matcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin().ByDetailExact() + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + value := tc.input + gotErrs := UUID(ctx, operation.Operation{}, fldPath, &value, nil) + matcher.Test(t, tc.wantErrs, gotErrs) + }) + } +} + +func TestLabelValue(t *testing.T) { + ctx := context.Background() + fldPath := field.NewPath("test") + + testCases := []struct { + name string + input string + wantErrs field.ErrorList + }{{ + name: "valid value", + input: "valid-value", + wantErrs: nil, + }, { + name: "valid value with dots", + input: "valid.value", + wantErrs: nil, + }, { + name: "valid value with underscores", + input: "valid_value", + wantErrs: nil, + }, { + name: "valid single character value", + input: "a", + wantErrs: nil, + }, { + name: "valid value with numbers", + input: "123-abc", + wantErrs: nil, + }, { + name: "valid uppercase characters", + input: "Valid-Value", + wantErrs: nil, + }, { + name: "invalid: starts with dash", + input: "-invalid-value", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-label-value"), + }, + }, { + name: "invalid: ends with dash", + input: "invalid-value-", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-label-value"), + }, + }, { + name: "invalid: starts with dot", + input: ".invalid.value", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-label-value"), + }, + }, { + name: "invalid: ends with dot", + input: "invalid.value.", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-label-value"), + }, + }, { + name: "invalid: starts with underscore", + input: "_invalid_value", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-label-value"), + }, + }, { + name: "invalid: ends with underscore", + input: "invalid_value_", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-label-value"), + }, + }, { + name: "invalid: contains special characters", + input: "invalid@value", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-label-value"), + }, + }, { + name: "invalid: too long", + input: "a" + strings.Repeat("b", 62) + "c", // 64 characters + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-label-value"), + }, + }, { + name: "valid: max length", + input: "a" + strings.Repeat("b", 61) + "c", // 63 characters + wantErrs: nil, + }, { + name: "valid: empty string", + input: "", + wantErrs: nil, + }} + + matcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin() + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + value := tc.input + gotErrs := LabelValue(ctx, operation.Operation{}, fldPath, &value, nil) + + matcher.Test(t, tc.wantErrs, gotErrs) + }) + } +} + +func TestLongNameCaseless(t *testing.T) { + ctx := context.Background() + fldPath := field.NewPath("test") + + testCases := []struct { + name string + input string + wantErrs field.ErrorList + }{{ + name: "valid", + input: "A.b.C", + wantErrs: nil, + }, { + name: "invalid: empty", + input: "", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "", "an RFC 1123 subdomain must consist of alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character").WithOrigin("format=k8s-long-name-caseless"), + }, + }, { + name: "invalid: too long", + input: strings.Repeat("a", 254), + wantErrs: field.ErrorList{ + field.Invalid(fldPath, strings.Repeat("a", 254), "must be no more than 253 bytes").WithOrigin("format=k8s-long-name-caseless"), + }, + }, { + name: "invalid: starts with dash", + input: "-A.b.C", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "-A.b.C", "an RFC 1123 subdomain must consist of alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character").WithOrigin("format=k8s-long-name-caseless"), + }, + }, + { + name: "invalid: ends with dash", + input: "A.b.C-", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "A.b.C-", "an RFC 1123 subdomain must consist of alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character").WithOrigin("format=k8s-long-name-caseless"), + }, + }, + { + name: "invalid: other chars", + input: "A_b.C", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "A_b.C", "an RFC 1123 subdomain must consist of alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character").WithOrigin("format=k8s-long-name-caseless"), + }, + }, + } + + matcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin() + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + value := tc.input + gotErrs := LongNameCaseless(ctx, operation.Operation{}, fldPath, &value, nil) + + matcher.Test(t, tc.wantErrs, gotErrs) + }) + } +} + +func TestResourcePoolName(t *testing.T) { + ctx := context.Background() + fldPath := field.NewPath("test") + + testCases := []struct { + name string + input string + wantErrs field.ErrorList + }{{ + name: "valid: single segment", + input: "a.valid.long-name", + }, { + name: "valid: two segments", + input: "a.valid.long-name/another.one", + }, { + name: "valid: multiple segments", + input: "a/b/c.d.e", + }, { + name: "valid: segments with numbers", + input: "1.2.3/4.5.6", + }, { + name: "invalid: empty string", + input: "", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, "", "segment 0: must not be empty").WithOrigin("format=k8s-resource-pool-name"), + }, + }, { + name: "invalid: leading slash", + input: "/a.b.c", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-resource-pool-name"), + }, + }, { + name: "invalid: trailing slash", + input: "a.b.c/", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-resource-pool-name"), + }, + }, { + name: "invalid: double slash", + input: "a.b.c//d.e.f", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "").WithOrigin("format=k8s-resource-pool-name"), + }, + }, { + name: "invalid: one segment has uppercase", + input: "a.valid.name/Not.Valid", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "segment 1: a lowercase RFC 1123").WithOrigin("format=k8s-resource-pool-name"), + }, + }, { + name: "invalid: one segment starts with dash", + input: "a.valid.name/-not-valid", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "segment 1: a lowercase RFC 1123").WithOrigin("format=k8s-resource-pool-name"), + }, + }, { + name: "invalid: one segment has special characters", + input: "a.valid.name/not_valid", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "segment 1: a lowercase RFC 1123").WithOrigin("format=k8s-resource-pool-name"), + }, + }, { + name: "invalid: too long", + input: "a.valid.name/" + strings.Repeat("b", 253), + wantErrs: field.ErrorList{ + field.TooLong(fldPath, nil, 253).WithOrigin("format=k8s-resource-pool-name"), + }, + }, { + name: "invalid: segment too long", + input: strings.Repeat("b", 254), + wantErrs: field.ErrorList{ + field.TooLong(fldPath, nil, 253).WithOrigin("format=k8s-resource-pool-name"), + field.Invalid(fldPath, nil, "segment 0: must be no more than 253 bytes").WithOrigin("format=k8s-resource-pool-name"), + }, + }, { + name: "invalid: multiple invalid segments", + input: "Not/Valid/Either", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "segment 0: a lowercase RFC 1123").WithOrigin("format=k8s-resource-pool-name"), + field.Invalid(fldPath, nil, "segment 1: a lowercase RFC 1123").WithOrigin("format=k8s-resource-pool-name"), + field.Invalid(fldPath, nil, "segment 2: a lowercase RFC 1123").WithOrigin("format=k8s-resource-pool-name"), + }, + }, { + name: "invalid: just a slash", + input: "/", + wantErrs: field.ErrorList{ + field.Invalid(fldPath, nil, "segment 0: must not be empty").WithOrigin("format=k8s-resource-pool-name"), + field.Invalid(fldPath, nil, "segment 1: must not be empty").WithOrigin("format=k8s-resource-pool-name"), + }, + }} + + exactMatcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin().ByDetailSubstring() + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + value := &tc.input + gotErrs := ResourcePoolName(ctx, operation.Operation{}, fldPath, value, nil) + exactMatcher.Test(t, tc.wantErrs, gotErrs) + }) + } +} diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/subfield.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/subfield.go index 844a28901bcf3..896f3c3f36970 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validate/subfield.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/subfield.go @@ -27,18 +27,25 @@ import ( // nilable value. type GetFieldFunc[Tstruct any, Tfield any] func(*Tstruct) Tfield -// Subfield validates a subfield of a struct against a validator function. -func Subfield[Tstruct any, Tfield any](ctx context.Context, op operation.Operation, fldPath *field.Path, newStruct, oldStruct *Tstruct, - fldName string, getField GetFieldFunc[Tstruct, Tfield], validator ValidateFunc[Tfield]) field.ErrorList { +// Subfield validates a subfield of a struct against a validator function. If +// the value of the subfield is the same as the previous value, as per the +// equiv function, then no validation is performed. +// +// The fldPath passed to the validator includes the subfield name. +func Subfield[Tstruct any, Tfield any]( + ctx context.Context, op operation.Operation, fldPath *field.Path, + newStruct, oldStruct *Tstruct, + fldName string, getField GetFieldFunc[Tstruct, Tfield], + equiv MatchFunc[Tfield], + validator ValidateFunc[Tfield], +) field.ErrorList { var errs field.ErrorList newVal := getField(newStruct) var oldVal Tfield if oldStruct != nil { oldVal = getField(oldStruct) } - // TODO: passing an equiv function to Subfield for direct comparison instead of - // SemanticDeepEqual if fields can be compared directly, to improve performance. - if op.Type == operation.Update && SemanticDeepEqual(newVal, oldVal) { + if op.Type == operation.Update && oldStruct != nil && equiv(newVal, oldVal) { return nil } errs = append(errs, validator(ctx, op, fldPath.Child(fldName), newVal, oldVal)...) diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/union.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/union.go index af5e933e9d397..03f45f8661dea 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validate/union.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/union.go @@ -47,11 +47,15 @@ type UnionValidationOptions struct { // // For example: // -// var UnionMembershipForABC := validate.NewUnionMembership([2]string{"a", "A"}, [2]string{"b", "B"}, [2]string{"c", "C"}) -// func ValidateABC(ctx context.Context, op operation.Operation, fldPath *field.Path, in *ABC) (errs fields.ErrorList) { +// var UnionMembershipForABC := validate.NewUnionMembership( +// validate.NewUnionMember("a"), +// validate.NewUnionMember("b"), +// validate.NewUnionMember("c"), +// ) +// func ValidateABC(ctx context.Context, op operation.Operation, fldPath *field.Path, in *ABC) (errs field.ErrorList) { // errs = append(errs, Union(ctx, op, fldPath, in, oldIn, UnionMembershipForABC, // func(in *ABC) bool { return in.A != nil }, -// func(in *ABC) bool { return in.B != ""}, +// func(in *ABC) bool { return in.B != "" }, // func(in *ABC) bool { return in.C != 0 }, // )...) // return errs @@ -77,12 +81,16 @@ func Union[T any](_ context.Context, op operation.Operation, fldPath *field.Path // // For example: // -// var UnionMembershipForABC = validate.NewDiscriminatedUnionMembership("type", [2]string{"a", "A"}, [2]string{"b", "B"}, [2]string{"c", "C"}) +// var UnionMembershipForABC = validate.NewDiscriminatedUnionMembership("type", +// validate.NewDiscriminatedUnionMember("a", "A"), +// validate.NewDiscriminatedUnionMember("b", "B"), +// validate.NewDiscriminatedUnionMember("c", "C"), +// ) // func ValidateABC(ctx context.Context, op operation.Operation, fldPath *field.Path, in *ABC) (errs field.ErrorList) { // errs = append(errs, DiscriminatedUnion(ctx, op, fldPath, in, oldIn, UnionMembershipForABC, // func(in *ABC) string { return string(in.Type) }, // func(in *ABC) bool { return in.A != nil }, -// func(in *ABC) bool { return in.B != ""}, +// func(in *ABC) bool { return in.B != "" }, // func(in *ABC) bool { return in.C != 0 }, // )...) // return errs @@ -129,35 +137,42 @@ func DiscriminatedUnion[T any, D ~string](_ context.Context, op operation.Operat return errs } -type member struct { - fieldName, discriminatorValue string +// UnionMember represents a member of a union. +type UnionMember struct { + fieldName string + discriminatorValue string +} + +// NewUnionMember returns a new UnionMember for the given field name. +func NewUnionMember(fieldName string) UnionMember { + return UnionMember{fieldName: fieldName} +} + +// NewDiscriminatedUnionMember returns a new UnionMember for the given field +// name and discriminator value. +func NewDiscriminatedUnionMember(fieldName, discriminatorValue string) UnionMember { + return UnionMember{fieldName: fieldName, discriminatorValue: discriminatorValue} } // UnionMembership represents an ordered list of field union memberships. type UnionMembership struct { discriminatorName string - members []member + members []UnionMember } // NewUnionMembership returns a new UnionMembership for the given list of members. -// -// Each member is a [2]string to provide a fieldName and discriminatorValue pair, where -// [0] identifies the field name and [1] identifies the union member Name. -// -// Field names must be unique. -func NewUnionMembership(member ...[2]string) *UnionMembership { +// Member names must be unique. +func NewUnionMembership(member ...UnionMember) *UnionMembership { return NewDiscriminatedUnionMembership("", member...) } // NewDiscriminatedUnionMembership returns a new UnionMembership for the given discriminator field and list of members. // members are provided in the same way as for NewUnionMembership. -func NewDiscriminatedUnionMembership(discriminatorFieldName string, members ...[2]string) *UnionMembership { - u := &UnionMembership{} - u.discriminatorName = discriminatorFieldName - for _, fieldName := range members { - u.members = append(u.members, member{fieldName: fieldName[0], discriminatorValue: fieldName[1]}) +func NewDiscriminatedUnionMembership(discriminatorFieldName string, members ...UnionMember) *UnionMembership { + return &UnionMembership{ + discriminatorName: discriminatorFieldName, + members: members, } - return u } // allFields returns a string listing all the field names of the member of a union for use in error reporting. diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/union_test.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/union_test.go index ab374d885228c..db9fb7231e42b 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validate/union_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/union_test.go @@ -30,31 +30,31 @@ type testMember struct{} func TestUnion(t *testing.T) { testCases := []struct { name string - fields [][2]string + fields []string fieldValues []bool expected field.ErrorList }{ { name: "one member set", - fields: [][2]string{{"a", "A"}, {"b", "B"}, {"c", "C"}, {"d", "D"}}, + fields: []string{"a", "b", "c", "d"}, fieldValues: []bool{false, false, false, true}, expected: nil, }, { name: "two members set", - fields: [][2]string{{"a", "A"}, {"b", "B"}, {"c", "C"}, {"d", "D"}}, + fields: []string{"a", "b", "c", "d"}, fieldValues: []bool{false, true, false, true}, expected: field.ErrorList{field.Invalid(nil, "{b, d}", "must specify exactly one of: `a`, `b`, `c`, `d`")}, }, { name: "all members set", - fields: [][2]string{{"a", "A"}, {"b", "B"}, {"c", "C"}, {"d", "D"}}, + fields: []string{"a", "b", "c", "d"}, fieldValues: []bool{true, true, true, true}, expected: field.ErrorList{field.Invalid(nil, "{a, b, c, d}", "must specify exactly one of: `a`, `b`, `c`, `d`")}, }, { name: "no member set", - fields: [][2]string{{"a", "A"}, {"b", "B"}, {"c", "C"}, {"d", "D"}}, + fields: []string{"a", "b", "c", "d"}, fieldValues: []bool{false, false, false, false}, expected: field.ErrorList{field.Invalid(nil, "", "must specify one of: `a`, `b`, `c`, `d`")}, }, @@ -62,6 +62,11 @@ func TestUnion(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { + members := []UnionMember{} + for _, f := range tc.fields { + members = append(members, NewUnionMember(f)) + } + // Create mock extractors that return predefined values instead of // actually extracting from the object. extractors := make([]ExtractorFn[*testMember, bool], len(tc.fieldValues)) @@ -69,7 +74,8 @@ func TestUnion(t *testing.T) { extractors[i] = func(_ *testMember) bool { return val } } - got := Union(context.Background(), operation.Operation{}, nil, &testMember{}, nil, NewUnionMembership(tc.fields...), extractors...) + got := Union(context.Background(), operation.Operation{}, nil, &testMember{}, nil, + NewUnionMembership(members...), extractors...) if !reflect.DeepEqual(got, tc.expected) { t.Errorf("got %v want %v", got, tc.expected) } @@ -126,6 +132,11 @@ func TestDiscriminatedUnion(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { + members := []UnionMember{} + for _, f := range tc.fields { + members = append(members, NewDiscriminatedUnionMember(f[0], f[1])) + } + discriminatorExtractor := func(_ *testMember) string { return tc.discriminatorValue } // Create mock extractors that return predefined values instead of @@ -135,7 +146,8 @@ func TestDiscriminatedUnion(t *testing.T) { extractors[i] = func(_ *testMember) bool { return val } } - got := DiscriminatedUnion(context.Background(), operation.Operation{}, nil, &testMember{}, nil, NewDiscriminatedUnionMembership(tc.discriminatorField, tc.fields...), discriminatorExtractor, extractors...) + got := DiscriminatedUnion(context.Background(), operation.Operation{}, nil, &testMember{}, nil, + NewDiscriminatedUnionMembership(tc.discriminatorField, members...), discriminatorExtractor, extractors...) if !reflect.DeepEqual(got, tc.expected) { t.Errorf("got %v want %v", got.ToAggregate(), tc.expected.ToAggregate()) } @@ -211,7 +223,9 @@ func TestUnionRatcheting(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - got := Union(context.Background(), operation.Operation{Type: operation.Update}, nil, tc.newStruct, tc.oldStruct, NewUnionMembership([][2]string{{"m1", "m1"}, {"m2", "m2"}}...), extractors...) + members := []UnionMember{NewUnionMember("m1"), NewUnionMember("m2")} + got := Union(context.Background(), operation.Operation{Type: operation.Update}, nil, tc.newStruct, tc.oldStruct, + NewUnionMembership(members...), extractors...) if !reflect.DeepEqual(got, tc.expected) { t.Errorf("got %v want %v", got, tc.expected) } @@ -319,7 +333,9 @@ func TestDiscriminatedUnionRatcheting(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - got := DiscriminatedUnion(context.Background(), operation.Operation{Type: operation.Update}, nil, tc.newStruct, tc.oldStruct, NewDiscriminatedUnionMembership("d", [][2]string{{"m1", "m1"}, {"m2", "m2"}}...), testDiscriminatorExtractor, testDiscriminatedExtractors...) + members := []UnionMember{NewDiscriminatedUnionMember("m1", "m1"), NewDiscriminatedUnionMember("m2", "m2")} + got := DiscriminatedUnion(context.Background(), operation.Operation{Type: operation.Update}, nil, tc.newStruct, tc.oldStruct, + NewDiscriminatedUnionMembership("d", members...), testDiscriminatorExtractor, testDiscriminatedExtractors...) if !reflect.DeepEqual(got, tc.expected) { t.Errorf("got %v want %v", got, tc.expected) } diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/zeroorone.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/zeroorone.go index 81cef54ab4755..6a5df4ca3422d 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validate/zeroorone.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/zeroorone.go @@ -31,9 +31,14 @@ import ( // // For example: // -// var ZeroOrOneOfMembershipForABC = validate.NewUnionMembership([2]string{"a", "A"}, [2]string{"b", "B"}, [2]string{"c", "C"}) +// var ZeroOrOneOfMembershipForABC = validate.NewUnionMembership( +// validate.NewUnionMember("a"), +// validate.NewUnionMember("b"), +// validate.NewUnionMember("c"), +// ) // func ValidateABC(ctx context.Context, op operation.Operation, fldPath *field.Path, in *ABC) (errs field.ErrorList) { -// errs = append(errs, ZeroOrOneOfUnion(ctx, op, fldPath, in, oldIn, UnionMembershipForABC, +// errs = append(errs, validate.ZeroOrOneOfUnion(ctx, op, fldPath, in, oldIn, +// ZeroOrOneOfMembershipForABC, // func(in *ABC) bool { return in.A != nil }, // func(in *ABC) bool { return in.B != ""}, // func(in *ABC) bool { return in.C != 0 }, diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validate/zeroorone_test.go b/staging/src/k8s.io/apimachinery/pkg/api/validate/zeroorone_test.go index b9264be050f89..7222c5cd7a2e4 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validate/zeroorone_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validate/zeroorone_test.go @@ -28,31 +28,31 @@ import ( func TestZeroOrOneOfUnion(t *testing.T) { testCases := []struct { name string - fields [][2]string + fields []string fieldValues []bool expected field.ErrorList }{ { name: "one member set", - fields: [][2]string{{"a", "A"}, {"b", "B"}, {"c", "C"}, {"d", "D"}}, + fields: []string{"a", "b", "c", "d"}, fieldValues: []bool{false, false, false, true}, expected: nil, }, { name: "two members set", - fields: [][2]string{{"a", "A"}, {"b", "B"}, {"c", "C"}, {"d", "D"}}, + fields: []string{"a", "b", "c", "d"}, fieldValues: []bool{false, true, false, true}, expected: field.ErrorList{field.Invalid(nil, "{b, d}", "must specify at most one of: `a`, `b`, `c`, `d`").WithOrigin("zeroOrOneOf")}, }, { name: "all members set", - fields: [][2]string{{"a", "A"}, {"b", "B"}, {"c", "C"}, {"d", "D"}}, + fields: []string{"a", "b", "c", "d"}, fieldValues: []bool{true, true, true, true}, expected: field.ErrorList{field.Invalid(nil, "{a, b, c, d}", "must specify at most one of: `a`, `b`, `c`, `d`").WithOrigin("zeroOrOneOf")}, }, { name: "no member set - allowed for ZeroOrOneOf", - fields: [][2]string{{"a", "A"}, {"b", "B"}, {"c", "C"}, {"d", "D"}}, + fields: []string{"a", "b", "c", "d"}, fieldValues: []bool{false, false, false, false}, expected: nil, // This is the key difference from Union }, @@ -60,6 +60,11 @@ func TestZeroOrOneOfUnion(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { + members := []UnionMember{} + for _, f := range tc.fields { + members = append(members, NewUnionMember(f)) + } + // Create mock extractors that return predefined values instead of // actually extracting from the object. extractors := make([]ExtractorFn[*testMember, bool], len(tc.fieldValues)) @@ -67,7 +72,8 @@ func TestZeroOrOneOfUnion(t *testing.T) { extractors[i] = func(_ *testMember) bool { return val } } - got := ZeroOrOneOfUnion(context.Background(), operation.Operation{}, nil, &testMember{}, nil, NewUnionMembership(tc.fields...), extractors...) + got := ZeroOrOneOfUnion(context.Background(), operation.Operation{}, nil, &testMember{}, nil, + NewUnionMembership(members...), extractors...) if !reflect.DeepEqual(got, tc.expected) { t.Errorf("got %v want %v", got, tc.expected) } @@ -136,7 +142,9 @@ func TestZeroOrOneOfUnionRatcheting(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - got := ZeroOrOneOfUnion(context.Background(), operation.Operation{Type: operation.Update}, nil, tc.newStruct, tc.oldStruct, NewUnionMembership([][2]string{{"m1", "m1"}, {"m2", "m2"}}...), extractors...) + members := []UnionMember{NewUnionMember("m1"), NewUnionMember("m2")} + got := ZeroOrOneOfUnion(context.Background(), operation.Operation{Type: operation.Update}, nil, tc.newStruct, tc.oldStruct, + NewUnionMembership(members...), extractors...) if !reflect.DeepEqual(got, tc.expected) { t.Errorf("got %v want %v", got, tc.expected) } diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validation/generic.go b/staging/src/k8s.io/apimachinery/pkg/api/validation/generic.go index f9cada1f0f1bd..35ea723a0fd7a 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validation/generic.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validation/generic.go @@ -33,6 +33,12 @@ const IsNegativeErrorMsg string = `must be greater than or equal to 0` // value that were not valid. Otherwise this returns an empty list or nil. type ValidateNameFunc func(name string, prefix bool) []string +// ValidateNameFuncWithErrors validates that the provided name is valid for a +// given resource type. +// +// This is similar to ValidateNameFunc, except that it produces an ErrorList. +type ValidateNameFuncWithErrors func(fldPath *field.Path, name string) field.ErrorList + // NameIsDNSSubdomain is a ValidateNameFunc for names that must be a DNS subdomain. func NameIsDNSSubdomain(name string, prefix bool) []string { if prefix { diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go b/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go index 7e891fdf3ebb2..839fcbc2c17b0 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go @@ -46,7 +46,7 @@ func ValidateAnnotations(annotations map[string]string, fldPath *field.Path) fie for k := range annotations { // The rule is QualifiedName except that case doesn't matter, so convert to lowercase before checking. for _, msg := range validation.IsQualifiedName(strings.ToLower(k)) { - allErrs = append(allErrs, field.Invalid(fldPath, k, msg)) + allErrs = append(allErrs, field.Invalid(fldPath, k, msg)).WithOrigin("format=k8s-label-key") } } if err := ValidateAnnotationsSize(annotations); err != nil { @@ -138,7 +138,6 @@ func ValidateImmutableField(newVal, oldVal interface{}, fldPath *field.Path) fie // ValidateObjectMeta validates an object's metadata on creation. It expects that name generation has already // been performed. -// It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before. func ValidateObjectMeta(objMeta *metav1.ObjectMeta, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList { metadata, err := meta.Accessor(objMeta) if err != nil { @@ -149,9 +148,37 @@ func ValidateObjectMeta(objMeta *metav1.ObjectMeta, requiresNamespace bool, name return ValidateObjectMetaAccessor(metadata, requiresNamespace, nameFn, fldPath) } +// objectMetaValidationOptions defines behavioral modifications for validating +// an ObjectMeta. +type objectMetaValidationOptions struct { + /* nothing here yet */ +} + +// ObjectMetaValidationOption specifies a behavioral modifier for +// ValidateObjectMetaWithOpts and ValidateObjectMetaAccessorWithOpts. +type ObjectMetaValidationOption func(opts *objectMetaValidationOptions) + +// ValidateObjectMetaWithOpts validates an object's metadata on creation. It +// expects that name generation has already been performed, so name validation +// is always executed. +// +// This is similar to ValidateObjectMeta, but uses options to buy future-safety +// and uses different signature for the name validation function. It also does +// not directly validate the generateName field, because name generation +// should have already been performed and it is the result of that generastion +// that must conform to the nameFn. +func ValidateObjectMetaWithOpts(objMeta *metav1.ObjectMeta, isNamespaced bool, nameFn ValidateNameFuncWithErrors, fldPath *field.Path, options ...ObjectMetaValidationOption) field.ErrorList { + metadata, err := meta.Accessor(objMeta) + if err != nil { + var allErrs field.ErrorList + allErrs = append(allErrs, field.InternalError(fldPath, err)) + return allErrs + } + return ValidateObjectMetaAccessorWithOpts(metadata, isNamespaced, nameFn, fldPath, options...) +} + // ValidateObjectMetaAccessor validates an object's metadata on creation. It expects that name generation has already // been performed. -// It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before. func ValidateObjectMetaAccessor(meta metav1.Object, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList { var allErrs field.ErrorList @@ -170,7 +197,57 @@ func ValidateObjectMetaAccessor(meta metav1.Object, requiresNamespace bool, name allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), meta.GetName(), msg)) } } - if requiresNamespace { + + return append(allErrs, validateObjectMetaAccessorWithOptsCommon(meta, requiresNamespace, fldPath, nil)...) +} + +// ValidateObjectMetaAccessorWithOpts validates an object's metadata on +// creation. It expects that name generation has already been performed, so +// name validation is always executed. +// +// This is similar to ValidateObjectMetaAccessor, but uses options to buy +// future-safety and uses different signature for the name validation function. +// It also does not directly validate the generateName field, because name +// generation should have already been performed and it is the result of that +// generastion that must conform to the nameFn. +func ValidateObjectMetaAccessorWithOpts(meta metav1.Object, isNamespaced bool, nameFn ValidateNameFuncWithErrors, fldPath *field.Path, options ...ObjectMetaValidationOption) field.ErrorList { + opts := objectMetaValidationOptions{} + for _, opt := range options { + opt(&opts) + } + + var allErrs field.ErrorList + + // generateName is not directly validated here. Types can have + // different rules for name generation, and the nameFn is for validating + // the post-generation data, not the input. In the past we assumed that + // name generation was always "append 5 random characters", but that's not + // NECESSARILY true. Also, the nameFn should always be considering the max + // length of the name, and it doesn't know enough about the name generation + // to do that. Also, given a bad generateName, the user will get errors + // for both the generateName and name fields. We will focus validation on + // the name field, which should give a better UX overall. + // TODO(thockin): should we do a max-length check here? e.g. 1K or 4K? + + if len(meta.GetGenerateName()) != 0 && len(meta.GetName()) == 0 { + allErrs = append(allErrs, + field.InternalError(fldPath.Child("name"), fmt.Errorf("generateName was specified (%q), but no name was generated", meta.GetGenerateName()))) + } + if len(meta.GetName()) == 0 { + allErrs = append(allErrs, field.Required(fldPath.Child("name"), "name or generateName is required")) + } else { + allErrs = append(allErrs, nameFn(fldPath.Child("name"), meta.GetName())...) + } + + return append(allErrs, validateObjectMetaAccessorWithOptsCommon(meta, isNamespaced, fldPath, &opts)...) +} + +// validateObjectMetaAccessorWithOptsCommon is a shared function for validating +// the parts of an ObjectMeta with are handled the same in both paths.. +func validateObjectMetaAccessorWithOptsCommon(meta metav1.Object, isNamespaced bool, fldPath *field.Path, _ *objectMetaValidationOptions) field.ErrorList { + var allErrs field.ErrorList + + if isNamespaced { if len(meta.GetNamespace()) == 0 { allErrs = append(allErrs, field.Required(fldPath.Child("namespace"), "")) } else { @@ -180,6 +257,7 @@ func ValidateObjectMetaAccessor(meta metav1.Object, requiresNamespace bool, name } } else { if len(meta.GetNamespace()) != 0 { + // TODO(thockin): change to "may not be specified on this type" or something allErrs = append(allErrs, field.Forbidden(fldPath.Child("namespace"), "not allowed on this type")) } } diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta_test.go b/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta_test.go index e4d50f41e1241..2edeea8fc06d4 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta_test.go @@ -30,38 +30,129 @@ import ( const ( maxLengthErrMsg = "must be no more than" namePartErrMsg = "name part must consist of" - nameErrMsg = "a qualified name must consist of" + nameErrMsg = "a valid label key must consist of" ) // Ensure custom name functions are allowed func TestValidateObjectMetaCustomName(t *testing.T) { - errs := ValidateObjectMeta( - &metav1.ObjectMeta{Name: "test", GenerateName: "foo"}, - false, - func(s string, prefix bool) []string { - if s == "test" { - return nil + testCases := []struct { + name string + input metav1.ObjectMeta + nErrs int + errStr string + }{{ + name: "valid name, empty generateName", + input: metav1.ObjectMeta{Name: "test", GenerateName: ""}, + }, { + name: "valid name and generateName", + input: metav1.ObjectMeta{Name: "test", GenerateName: "test"}, + }, { + name: "invalid name, empty generateName", + input: metav1.ObjectMeta{Name: "invalid", GenerateName: ""}, + nErrs: 1, + errStr: "wrong value", + }, { + name: "invalid name, valid generateName", + input: metav1.ObjectMeta{Name: "invalid", GenerateName: "test"}, + nErrs: 1, + errStr: "wrong value", + }, { + name: "invalid name, invalid generateName", + input: metav1.ObjectMeta{Name: "invalid", GenerateName: "invalid"}, + nErrs: 2, + errStr: "wrong value", + }} + + fn := func(s string, prefix bool) []string { + // Note: this is called on both name and generateName + if s == "test" { + return nil + } + return []string{"wrong value"} + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + errs := ValidateObjectMeta(&tc.input, false, fn, field.NewPath("field")) + + if len(errs) == 0 { + if len(tc.errStr) != 0 { + t.Fatalf("expected 1 error, got none") + } + } else { + if len(tc.errStr) == 0 { + t.Fatalf("expected no errors, got: %v", errs) + } + if len(errs) != tc.nErrs { + t.Fatalf("expected %d errors, got %d: %q", tc.nErrs, len(errs), errs) + } + if !strings.Contains(errs[0].Error(), "wrong value") { + t.Errorf("unexpected error message: %v", errs[0].Error()) + } } - return []string{"name-gen"} - }, - field.NewPath("field")) - if len(errs) != 1 { - t.Fatalf("unexpected errors: %v", errs) + }) } - if !strings.Contains(errs[0].Error(), "name-gen") { - t.Errorf("unexpected error message: %v", errs) +} + +// Ensure custom name functions work +func TestValidateObjectMetaWithOptsName(t *testing.T) { + testCases := []struct { + name string + input metav1.ObjectMeta + errStr string + }{{ + name: "valid name, empty generateName", + input: metav1.ObjectMeta{Name: "test", GenerateName: ""}, + }, { + name: "valid name and generateName", + input: metav1.ObjectMeta{Name: "test", GenerateName: "test"}, + }, { + name: "invalid name, empty generateName", + input: metav1.ObjectMeta{Name: "invalid", GenerateName: ""}, + errStr: "wrong value", + }, { + name: "invalid name, valid generateName", + input: metav1.ObjectMeta{Name: "invalid", GenerateName: "test"}, + errStr: "wrong value", + }, { + name: "invalid name, invalid generateName", + input: metav1.ObjectMeta{Name: "invalid", GenerateName: "invalid"}, + errStr: "wrong value", + }} + + fn := func(fldPath *field.Path, s string) field.ErrorList { + if s == "test" { + return nil + } + return field.ErrorList{field.Invalid(fldPath, s, "wrong value")} + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + errs := ValidateObjectMetaWithOpts(&tc.input, false, fn, field.NewPath("field")) + + if len(errs) == 0 { + if len(tc.errStr) != 0 { + t.Fatalf("expected 1 error, got none") + } + } else { + if len(tc.errStr) == 0 { + t.Fatalf("expected no errors, got: %v", errs) + } + if len(errs) != 1 { + t.Fatalf("expected 1 error, got %d: %q", len(errs), errs) + } + if !strings.Contains(errs[0].Error(), "wrong value") { + t.Errorf("unexpected error message: %v", errs[0].Error()) + } + } + }) } } // Ensure namespace names follow dns label format func TestValidateObjectMetaNamespaces(t *testing.T) { - errs := ValidateObjectMeta( + errs := validateObjectMetaAccessorWithOptsCommon( &metav1.ObjectMeta{Name: "test", Namespace: "foo.bar"}, - true, - func(s string, prefix bool) []string { - return nil - }, - field.NewPath("field")) + true, field.NewPath("field"), nil) if len(errs) != 1 { t.Fatalf("unexpected errors: %v", errs) } @@ -74,13 +165,9 @@ func TestValidateObjectMetaNamespaces(t *testing.T) { for i := range b { b[i] = letters[rand.Intn(len(letters))] } - errs = ValidateObjectMeta( + errs = validateObjectMetaAccessorWithOptsCommon( &metav1.ObjectMeta{Name: "test", Namespace: string(b)}, - true, - func(s string, prefix bool) []string { - return nil - }, - field.NewPath("field")) + true, field.NewPath("field"), nil) if len(errs) != 2 { t.Fatalf("unexpected errors: %v", errs) } @@ -195,13 +282,9 @@ func TestValidateObjectMetaOwnerReferences(t *testing.T) { } for _, tc := range testCases { - errs := ValidateObjectMeta( + errs := validateObjectMetaAccessorWithOptsCommon( &metav1.ObjectMeta{Name: "test", Namespace: "test", OwnerReferences: tc.ownerReferences}, - true, - func(s string, prefix bool) []string { - return nil - }, - field.NewPath("field")) + true, field.NewPath("field"), nil) if len(errs) != 0 && !tc.expectError { t.Errorf("unexpected error: %v in test case %v", errs, tc.description) } @@ -288,7 +371,7 @@ func TestValidateFinalizersPreventConflictingFinalizers(t *testing.T) { }, } for name, tc := range testcases { - errs := ValidateObjectMeta(&tc.ObjectMeta, false, NameIsDNSSubdomain, field.NewPath("field")) + errs := validateObjectMetaAccessorWithOptsCommon(&tc.ObjectMeta, false, field.NewPath("field"), nil) if len(errs) == 0 { if len(tc.ExpectedErr) != 0 { t.Errorf("case: %q, expected error to contain %q", name, tc.ExpectedErr) @@ -425,8 +508,8 @@ func TestObjectMetaGenerationUpdate(t *testing.T) { } } -// Ensure trailing slash is allowed in generate name -func TestValidateObjectMetaTrimsTrailingSlash(t *testing.T) { +// Ensure trailing dash is allowed in generate name +func TestValidateObjectMetaTrimsTrailingDash(t *testing.T) { errs := ValidateObjectMeta( &metav1.ObjectMeta{Name: "test", GenerateName: "foo-"}, false, diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go index 617b9a5d30f5f..31c87361f63b4 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go @@ -18,6 +18,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:openapi-gen=true // +k8s:defaulter-gen=TypeMeta +// +k8s:openapi-model-package=io.k8s.apimachinery.pkg.apis.meta.v1 // +groupName=meta.k8s.io diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go index 9ee6c05918537..f6b1a6a4e06bb 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go @@ -23,12 +23,10 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" runtime "k8s.io/apimachinery/pkg/runtime" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -37,1509 +35,95 @@ import ( k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *APIGroup) Reset() { *m = APIGroup{} } -func (*APIGroup) ProtoMessage() {} -func (*APIGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{0} -} -func (m *APIGroup) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APIGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *APIGroup) XXX_Merge(src proto.Message) { - xxx_messageInfo_APIGroup.Merge(m, src) -} -func (m *APIGroup) XXX_Size() int { - return m.Size() -} -func (m *APIGroup) XXX_DiscardUnknown() { - xxx_messageInfo_APIGroup.DiscardUnknown(m) -} - -var xxx_messageInfo_APIGroup proto.InternalMessageInfo - -func (m *APIGroupList) Reset() { *m = APIGroupList{} } -func (*APIGroupList) ProtoMessage() {} -func (*APIGroupList) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{1} -} -func (m *APIGroupList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APIGroupList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *APIGroupList) XXX_Merge(src proto.Message) { - xxx_messageInfo_APIGroupList.Merge(m, src) -} -func (m *APIGroupList) XXX_Size() int { - return m.Size() -} -func (m *APIGroupList) XXX_DiscardUnknown() { - xxx_messageInfo_APIGroupList.DiscardUnknown(m) -} - -var xxx_messageInfo_APIGroupList proto.InternalMessageInfo - -func (m *APIResource) Reset() { *m = APIResource{} } -func (*APIResource) ProtoMessage() {} -func (*APIResource) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{2} -} -func (m *APIResource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APIResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *APIResource) XXX_Merge(src proto.Message) { - xxx_messageInfo_APIResource.Merge(m, src) -} -func (m *APIResource) XXX_Size() int { - return m.Size() -} -func (m *APIResource) XXX_DiscardUnknown() { - xxx_messageInfo_APIResource.DiscardUnknown(m) -} - -var xxx_messageInfo_APIResource proto.InternalMessageInfo - -func (m *APIResourceList) Reset() { *m = APIResourceList{} } -func (*APIResourceList) ProtoMessage() {} -func (*APIResourceList) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{3} -} -func (m *APIResourceList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APIResourceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *APIResourceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_APIResourceList.Merge(m, src) -} -func (m *APIResourceList) XXX_Size() int { - return m.Size() -} -func (m *APIResourceList) XXX_DiscardUnknown() { - xxx_messageInfo_APIResourceList.DiscardUnknown(m) -} - -var xxx_messageInfo_APIResourceList proto.InternalMessageInfo - -func (m *APIVersions) Reset() { *m = APIVersions{} } -func (*APIVersions) ProtoMessage() {} -func (*APIVersions) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{4} -} -func (m *APIVersions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APIVersions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *APIVersions) XXX_Merge(src proto.Message) { - xxx_messageInfo_APIVersions.Merge(m, src) -} -func (m *APIVersions) XXX_Size() int { - return m.Size() -} -func (m *APIVersions) XXX_DiscardUnknown() { - xxx_messageInfo_APIVersions.DiscardUnknown(m) -} - -var xxx_messageInfo_APIVersions proto.InternalMessageInfo - -func (m *ApplyOptions) Reset() { *m = ApplyOptions{} } -func (*ApplyOptions) ProtoMessage() {} -func (*ApplyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{5} -} -func (m *ApplyOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ApplyOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ApplyOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_ApplyOptions.Merge(m, src) -} -func (m *ApplyOptions) XXX_Size() int { - return m.Size() -} -func (m *ApplyOptions) XXX_DiscardUnknown() { - xxx_messageInfo_ApplyOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_ApplyOptions proto.InternalMessageInfo - -func (m *Condition) Reset() { *m = Condition{} } -func (*Condition) ProtoMessage() {} -func (*Condition) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{6} -} -func (m *Condition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Condition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Condition) XXX_Merge(src proto.Message) { - xxx_messageInfo_Condition.Merge(m, src) -} -func (m *Condition) XXX_Size() int { - return m.Size() -} -func (m *Condition) XXX_DiscardUnknown() { - xxx_messageInfo_Condition.DiscardUnknown(m) -} - -var xxx_messageInfo_Condition proto.InternalMessageInfo - -func (m *CreateOptions) Reset() { *m = CreateOptions{} } -func (*CreateOptions) ProtoMessage() {} -func (*CreateOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{7} -} -func (m *CreateOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreateOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CreateOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateOptions.Merge(m, src) -} -func (m *CreateOptions) XXX_Size() int { - return m.Size() -} -func (m *CreateOptions) XXX_DiscardUnknown() { - xxx_messageInfo_CreateOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateOptions proto.InternalMessageInfo - -func (m *DeleteOptions) Reset() { *m = DeleteOptions{} } -func (*DeleteOptions) ProtoMessage() {} -func (*DeleteOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{8} -} -func (m *DeleteOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeleteOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeleteOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteOptions.Merge(m, src) -} -func (m *DeleteOptions) XXX_Size() int { - return m.Size() -} -func (m *DeleteOptions) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteOptions proto.InternalMessageInfo - -func (m *Duration) Reset() { *m = Duration{} } -func (*Duration) ProtoMessage() {} -func (*Duration) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{9} -} -func (m *Duration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Duration) XXX_Merge(src proto.Message) { - xxx_messageInfo_Duration.Merge(m, src) -} -func (m *Duration) XXX_Size() int { - return m.Size() -} -func (m *Duration) XXX_DiscardUnknown() { - xxx_messageInfo_Duration.DiscardUnknown(m) -} - -var xxx_messageInfo_Duration proto.InternalMessageInfo - -func (m *FieldSelectorRequirement) Reset() { *m = FieldSelectorRequirement{} } -func (*FieldSelectorRequirement) ProtoMessage() {} -func (*FieldSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{10} -} -func (m *FieldSelectorRequirement) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FieldSelectorRequirement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FieldSelectorRequirement) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldSelectorRequirement.Merge(m, src) -} -func (m *FieldSelectorRequirement) XXX_Size() int { - return m.Size() -} -func (m *FieldSelectorRequirement) XXX_DiscardUnknown() { - xxx_messageInfo_FieldSelectorRequirement.DiscardUnknown(m) -} - -var xxx_messageInfo_FieldSelectorRequirement proto.InternalMessageInfo - -func (m *FieldsV1) Reset() { *m = FieldsV1{} } -func (*FieldsV1) ProtoMessage() {} -func (*FieldsV1) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{11} -} -func (m *FieldsV1) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FieldsV1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *FieldsV1) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldsV1.Merge(m, src) -} -func (m *FieldsV1) XXX_Size() int { - return m.Size() -} -func (m *FieldsV1) XXX_DiscardUnknown() { - xxx_messageInfo_FieldsV1.DiscardUnknown(m) -} - -var xxx_messageInfo_FieldsV1 proto.InternalMessageInfo - -func (m *GetOptions) Reset() { *m = GetOptions{} } -func (*GetOptions) ProtoMessage() {} -func (*GetOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{12} -} -func (m *GetOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GetOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetOptions.Merge(m, src) -} -func (m *GetOptions) XXX_Size() int { - return m.Size() -} -func (m *GetOptions) XXX_DiscardUnknown() { - xxx_messageInfo_GetOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_GetOptions proto.InternalMessageInfo - -func (m *GroupKind) Reset() { *m = GroupKind{} } -func (*GroupKind) ProtoMessage() {} -func (*GroupKind) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{13} -} -func (m *GroupKind) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GroupKind) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GroupKind) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupKind.Merge(m, src) -} -func (m *GroupKind) XXX_Size() int { - return m.Size() -} -func (m *GroupKind) XXX_DiscardUnknown() { - xxx_messageInfo_GroupKind.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupKind proto.InternalMessageInfo - -func (m *GroupResource) Reset() { *m = GroupResource{} } -func (*GroupResource) ProtoMessage() {} -func (*GroupResource) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{14} -} -func (m *GroupResource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GroupResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GroupResource) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupResource.Merge(m, src) -} -func (m *GroupResource) XXX_Size() int { - return m.Size() -} -func (m *GroupResource) XXX_DiscardUnknown() { - xxx_messageInfo_GroupResource.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupResource proto.InternalMessageInfo - -func (m *GroupVersion) Reset() { *m = GroupVersion{} } -func (*GroupVersion) ProtoMessage() {} -func (*GroupVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{15} -} -func (m *GroupVersion) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GroupVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GroupVersion) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupVersion.Merge(m, src) -} -func (m *GroupVersion) XXX_Size() int { - return m.Size() -} -func (m *GroupVersion) XXX_DiscardUnknown() { - xxx_messageInfo_GroupVersion.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupVersion proto.InternalMessageInfo - -func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} } -func (*GroupVersionForDiscovery) ProtoMessage() {} -func (*GroupVersionForDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{16} -} -func (m *GroupVersionForDiscovery) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GroupVersionForDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GroupVersionForDiscovery) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupVersionForDiscovery.Merge(m, src) -} -func (m *GroupVersionForDiscovery) XXX_Size() int { - return m.Size() -} -func (m *GroupVersionForDiscovery) XXX_DiscardUnknown() { - xxx_messageInfo_GroupVersionForDiscovery.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupVersionForDiscovery proto.InternalMessageInfo - -func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} } -func (*GroupVersionKind) ProtoMessage() {} -func (*GroupVersionKind) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{17} -} -func (m *GroupVersionKind) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GroupVersionKind) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GroupVersionKind) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupVersionKind.Merge(m, src) -} -func (m *GroupVersionKind) XXX_Size() int { - return m.Size() -} -func (m *GroupVersionKind) XXX_DiscardUnknown() { - xxx_messageInfo_GroupVersionKind.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupVersionKind proto.InternalMessageInfo - -func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } -func (*GroupVersionResource) ProtoMessage() {} -func (*GroupVersionResource) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{18} -} -func (m *GroupVersionResource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GroupVersionResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GroupVersionResource) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupVersionResource.Merge(m, src) -} -func (m *GroupVersionResource) XXX_Size() int { - return m.Size() -} -func (m *GroupVersionResource) XXX_DiscardUnknown() { - xxx_messageInfo_GroupVersionResource.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupVersionResource proto.InternalMessageInfo - -func (m *LabelSelector) Reset() { *m = LabelSelector{} } -func (*LabelSelector) ProtoMessage() {} -func (*LabelSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{19} -} -func (m *LabelSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LabelSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LabelSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_LabelSelector.Merge(m, src) -} -func (m *LabelSelector) XXX_Size() int { - return m.Size() -} -func (m *LabelSelector) XXX_DiscardUnknown() { - xxx_messageInfo_LabelSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_LabelSelector proto.InternalMessageInfo - -func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} } -func (*LabelSelectorRequirement) ProtoMessage() {} -func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{20} -} -func (m *LabelSelectorRequirement) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LabelSelectorRequirement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LabelSelectorRequirement) XXX_Merge(src proto.Message) { - xxx_messageInfo_LabelSelectorRequirement.Merge(m, src) -} -func (m *LabelSelectorRequirement) XXX_Size() int { - return m.Size() -} -func (m *LabelSelectorRequirement) XXX_DiscardUnknown() { - xxx_messageInfo_LabelSelectorRequirement.DiscardUnknown(m) -} +func (m *APIGroup) Reset() { *m = APIGroup{} } -var xxx_messageInfo_LabelSelectorRequirement proto.InternalMessageInfo +func (m *APIGroupList) Reset() { *m = APIGroupList{} } -func (m *List) Reset() { *m = List{} } -func (*List) ProtoMessage() {} -func (*List) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{21} -} -func (m *List) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *List) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *List) XXX_Merge(src proto.Message) { - xxx_messageInfo_List.Merge(m, src) -} -func (m *List) XXX_Size() int { - return m.Size() -} -func (m *List) XXX_DiscardUnknown() { - xxx_messageInfo_List.DiscardUnknown(m) -} +func (m *APIResource) Reset() { *m = APIResource{} } -var xxx_messageInfo_List proto.InternalMessageInfo +func (m *APIResourceList) Reset() { *m = APIResourceList{} } -func (m *ListMeta) Reset() { *m = ListMeta{} } -func (*ListMeta) ProtoMessage() {} -func (*ListMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{22} -} -func (m *ListMeta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ListMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListMeta.Merge(m, src) -} -func (m *ListMeta) XXX_Size() int { - return m.Size() -} -func (m *ListMeta) XXX_DiscardUnknown() { - xxx_messageInfo_ListMeta.DiscardUnknown(m) -} +func (m *APIVersions) Reset() { *m = APIVersions{} } -var xxx_messageInfo_ListMeta proto.InternalMessageInfo +func (m *ApplyOptions) Reset() { *m = ApplyOptions{} } -func (m *ListOptions) Reset() { *m = ListOptions{} } -func (*ListOptions) ProtoMessage() {} -func (*ListOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{23} -} -func (m *ListOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ListOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListOptions.Merge(m, src) -} -func (m *ListOptions) XXX_Size() int { - return m.Size() -} -func (m *ListOptions) XXX_DiscardUnknown() { - xxx_messageInfo_ListOptions.DiscardUnknown(m) -} +func (m *Condition) Reset() { *m = Condition{} } -var xxx_messageInfo_ListOptions proto.InternalMessageInfo +func (m *CreateOptions) Reset() { *m = CreateOptions{} } -func (m *ManagedFieldsEntry) Reset() { *m = ManagedFieldsEntry{} } -func (*ManagedFieldsEntry) ProtoMessage() {} -func (*ManagedFieldsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{24} -} -func (m *ManagedFieldsEntry) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ManagedFieldsEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ManagedFieldsEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_ManagedFieldsEntry.Merge(m, src) -} -func (m *ManagedFieldsEntry) XXX_Size() int { - return m.Size() -} -func (m *ManagedFieldsEntry) XXX_DiscardUnknown() { - xxx_messageInfo_ManagedFieldsEntry.DiscardUnknown(m) -} +func (m *DeleteOptions) Reset() { *m = DeleteOptions{} } -var xxx_messageInfo_ManagedFieldsEntry proto.InternalMessageInfo +func (m *Duration) Reset() { *m = Duration{} } -func (m *MicroTime) Reset() { *m = MicroTime{} } -func (*MicroTime) ProtoMessage() {} -func (*MicroTime) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{25} -} -func (m *MicroTime) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MicroTime.Unmarshal(m, b) -} -func (m *MicroTime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MicroTime.Marshal(b, m, deterministic) -} -func (m *MicroTime) XXX_Merge(src proto.Message) { - xxx_messageInfo_MicroTime.Merge(m, src) -} -func (m *MicroTime) XXX_Size() int { - return xxx_messageInfo_MicroTime.Size(m) -} -func (m *MicroTime) XXX_DiscardUnknown() { - xxx_messageInfo_MicroTime.DiscardUnknown(m) -} +func (m *FieldSelectorRequirement) Reset() { *m = FieldSelectorRequirement{} } -var xxx_messageInfo_MicroTime proto.InternalMessageInfo +func (m *FieldsV1) Reset() { *m = FieldsV1{} } -func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } -func (*ObjectMeta) ProtoMessage() {} -func (*ObjectMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{26} -} -func (m *ObjectMeta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ObjectMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectMeta.Merge(m, src) -} -func (m *ObjectMeta) XXX_Size() int { - return m.Size() -} -func (m *ObjectMeta) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectMeta.DiscardUnknown(m) -} +func (m *GetOptions) Reset() { *m = GetOptions{} } -var xxx_messageInfo_ObjectMeta proto.InternalMessageInfo +func (m *GroupKind) Reset() { *m = GroupKind{} } -func (m *OwnerReference) Reset() { *m = OwnerReference{} } -func (*OwnerReference) ProtoMessage() {} -func (*OwnerReference) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{27} -} -func (m *OwnerReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OwnerReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *OwnerReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_OwnerReference.Merge(m, src) -} -func (m *OwnerReference) XXX_Size() int { - return m.Size() -} -func (m *OwnerReference) XXX_DiscardUnknown() { - xxx_messageInfo_OwnerReference.DiscardUnknown(m) -} +func (m *GroupResource) Reset() { *m = GroupResource{} } -var xxx_messageInfo_OwnerReference proto.InternalMessageInfo +func (m *GroupVersion) Reset() { *m = GroupVersion{} } -func (m *PartialObjectMetadata) Reset() { *m = PartialObjectMetadata{} } -func (*PartialObjectMetadata) ProtoMessage() {} -func (*PartialObjectMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{28} -} -func (m *PartialObjectMetadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PartialObjectMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PartialObjectMetadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_PartialObjectMetadata.Merge(m, src) -} -func (m *PartialObjectMetadata) XXX_Size() int { - return m.Size() -} -func (m *PartialObjectMetadata) XXX_DiscardUnknown() { - xxx_messageInfo_PartialObjectMetadata.DiscardUnknown(m) -} +func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} } -var xxx_messageInfo_PartialObjectMetadata proto.InternalMessageInfo +func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} } -func (m *PartialObjectMetadataList) Reset() { *m = PartialObjectMetadataList{} } -func (*PartialObjectMetadataList) ProtoMessage() {} -func (*PartialObjectMetadataList) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{29} -} -func (m *PartialObjectMetadataList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PartialObjectMetadataList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PartialObjectMetadataList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PartialObjectMetadataList.Merge(m, src) -} -func (m *PartialObjectMetadataList) XXX_Size() int { - return m.Size() -} -func (m *PartialObjectMetadataList) XXX_DiscardUnknown() { - xxx_messageInfo_PartialObjectMetadataList.DiscardUnknown(m) -} +func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } -var xxx_messageInfo_PartialObjectMetadataList proto.InternalMessageInfo +func (m *LabelSelector) Reset() { *m = LabelSelector{} } -func (m *Patch) Reset() { *m = Patch{} } -func (*Patch) ProtoMessage() {} -func (*Patch) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{30} -} -func (m *Patch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Patch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Patch) XXX_Merge(src proto.Message) { - xxx_messageInfo_Patch.Merge(m, src) -} -func (m *Patch) XXX_Size() int { - return m.Size() -} -func (m *Patch) XXX_DiscardUnknown() { - xxx_messageInfo_Patch.DiscardUnknown(m) -} +func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} } -var xxx_messageInfo_Patch proto.InternalMessageInfo +func (m *List) Reset() { *m = List{} } -func (m *PatchOptions) Reset() { *m = PatchOptions{} } -func (*PatchOptions) ProtoMessage() {} -func (*PatchOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{31} -} -func (m *PatchOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PatchOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PatchOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_PatchOptions.Merge(m, src) -} -func (m *PatchOptions) XXX_Size() int { - return m.Size() -} -func (m *PatchOptions) XXX_DiscardUnknown() { - xxx_messageInfo_PatchOptions.DiscardUnknown(m) -} +func (m *ListMeta) Reset() { *m = ListMeta{} } -var xxx_messageInfo_PatchOptions proto.InternalMessageInfo +func (m *ListOptions) Reset() { *m = ListOptions{} } -func (m *Preconditions) Reset() { *m = Preconditions{} } -func (*Preconditions) ProtoMessage() {} -func (*Preconditions) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{32} -} -func (m *Preconditions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Preconditions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Preconditions) XXX_Merge(src proto.Message) { - xxx_messageInfo_Preconditions.Merge(m, src) -} -func (m *Preconditions) XXX_Size() int { - return m.Size() -} -func (m *Preconditions) XXX_DiscardUnknown() { - xxx_messageInfo_Preconditions.DiscardUnknown(m) -} +func (m *ManagedFieldsEntry) Reset() { *m = ManagedFieldsEntry{} } -var xxx_messageInfo_Preconditions proto.InternalMessageInfo +func (m *MicroTime) Reset() { *m = MicroTime{} } -func (m *RootPaths) Reset() { *m = RootPaths{} } -func (*RootPaths) ProtoMessage() {} -func (*RootPaths) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{33} -} -func (m *RootPaths) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RootPaths) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RootPaths) XXX_Merge(src proto.Message) { - xxx_messageInfo_RootPaths.Merge(m, src) -} -func (m *RootPaths) XXX_Size() int { - return m.Size() -} -func (m *RootPaths) XXX_DiscardUnknown() { - xxx_messageInfo_RootPaths.DiscardUnknown(m) -} +func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } -var xxx_messageInfo_RootPaths proto.InternalMessageInfo +func (m *OwnerReference) Reset() { *m = OwnerReference{} } -func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } -func (*ServerAddressByClientCIDR) ProtoMessage() {} -func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{34} -} -func (m *ServerAddressByClientCIDR) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServerAddressByClientCIDR) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServerAddressByClientCIDR) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServerAddressByClientCIDR.Merge(m, src) -} -func (m *ServerAddressByClientCIDR) XXX_Size() int { - return m.Size() -} -func (m *ServerAddressByClientCIDR) XXX_DiscardUnknown() { - xxx_messageInfo_ServerAddressByClientCIDR.DiscardUnknown(m) -} +func (m *PartialObjectMetadata) Reset() { *m = PartialObjectMetadata{} } -var xxx_messageInfo_ServerAddressByClientCIDR proto.InternalMessageInfo +func (m *PartialObjectMetadataList) Reset() { *m = PartialObjectMetadataList{} } -func (m *Status) Reset() { *m = Status{} } -func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{35} -} -func (m *Status) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Status) XXX_Merge(src proto.Message) { - xxx_messageInfo_Status.Merge(m, src) -} -func (m *Status) XXX_Size() int { - return m.Size() -} -func (m *Status) XXX_DiscardUnknown() { - xxx_messageInfo_Status.DiscardUnknown(m) -} +func (m *Patch) Reset() { *m = Patch{} } -var xxx_messageInfo_Status proto.InternalMessageInfo +func (m *PatchOptions) Reset() { *m = PatchOptions{} } -func (m *StatusCause) Reset() { *m = StatusCause{} } -func (*StatusCause) ProtoMessage() {} -func (*StatusCause) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{36} -} -func (m *StatusCause) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatusCause) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatusCause) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatusCause.Merge(m, src) -} -func (m *StatusCause) XXX_Size() int { - return m.Size() -} -func (m *StatusCause) XXX_DiscardUnknown() { - xxx_messageInfo_StatusCause.DiscardUnknown(m) -} +func (m *Preconditions) Reset() { *m = Preconditions{} } -var xxx_messageInfo_StatusCause proto.InternalMessageInfo +func (m *RootPaths) Reset() { *m = RootPaths{} } -func (m *StatusDetails) Reset() { *m = StatusDetails{} } -func (*StatusDetails) ProtoMessage() {} -func (*StatusDetails) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{37} -} -func (m *StatusDetails) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatusDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *StatusDetails) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatusDetails.Merge(m, src) -} -func (m *StatusDetails) XXX_Size() int { - return m.Size() -} -func (m *StatusDetails) XXX_DiscardUnknown() { - xxx_messageInfo_StatusDetails.DiscardUnknown(m) -} +func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } -var xxx_messageInfo_StatusDetails proto.InternalMessageInfo +func (m *Status) Reset() { *m = Status{} } -func (m *TableOptions) Reset() { *m = TableOptions{} } -func (*TableOptions) ProtoMessage() {} -func (*TableOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{38} -} -func (m *TableOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TableOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TableOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_TableOptions.Merge(m, src) -} -func (m *TableOptions) XXX_Size() int { - return m.Size() -} -func (m *TableOptions) XXX_DiscardUnknown() { - xxx_messageInfo_TableOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_TableOptions proto.InternalMessageInfo - -func (m *Time) Reset() { *m = Time{} } -func (*Time) ProtoMessage() {} -func (*Time) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{39} -} -func (m *Time) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Time.Unmarshal(m, b) -} -func (m *Time) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Time.Marshal(b, m, deterministic) -} -func (m *Time) XXX_Merge(src proto.Message) { - xxx_messageInfo_Time.Merge(m, src) -} -func (m *Time) XXX_Size() int { - return xxx_messageInfo_Time.Size(m) -} -func (m *Time) XXX_DiscardUnknown() { - xxx_messageInfo_Time.DiscardUnknown(m) -} +func (m *StatusCause) Reset() { *m = StatusCause{} } -var xxx_messageInfo_Time proto.InternalMessageInfo +func (m *StatusDetails) Reset() { *m = StatusDetails{} } -func (m *Timestamp) Reset() { *m = Timestamp{} } -func (*Timestamp) ProtoMessage() {} -func (*Timestamp) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{40} -} -func (m *Timestamp) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Timestamp) XXX_Merge(src proto.Message) { - xxx_messageInfo_Timestamp.Merge(m, src) -} -func (m *Timestamp) XXX_Size() int { - return m.Size() -} -func (m *Timestamp) XXX_DiscardUnknown() { - xxx_messageInfo_Timestamp.DiscardUnknown(m) -} - -var xxx_messageInfo_Timestamp proto.InternalMessageInfo - -func (m *TypeMeta) Reset() { *m = TypeMeta{} } -func (*TypeMeta) ProtoMessage() {} -func (*TypeMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{41} -} -func (m *TypeMeta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TypeMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TypeMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_TypeMeta.Merge(m, src) -} -func (m *TypeMeta) XXX_Size() int { - return m.Size() -} -func (m *TypeMeta) XXX_DiscardUnknown() { - xxx_messageInfo_TypeMeta.DiscardUnknown(m) -} +func (m *TableOptions) Reset() { *m = TableOptions{} } -var xxx_messageInfo_TypeMeta proto.InternalMessageInfo +func (m *Time) Reset() { *m = Time{} } -func (m *UpdateOptions) Reset() { *m = UpdateOptions{} } -func (*UpdateOptions) ProtoMessage() {} -func (*UpdateOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{42} -} -func (m *UpdateOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UpdateOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *UpdateOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateOptions.Merge(m, src) -} -func (m *UpdateOptions) XXX_Size() int { - return m.Size() -} -func (m *UpdateOptions) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateOptions.DiscardUnknown(m) -} +func (m *Timestamp) Reset() { *m = Timestamp{} } -var xxx_messageInfo_UpdateOptions proto.InternalMessageInfo +func (m *TypeMeta) Reset() { *m = TypeMeta{} } -func (m *Verbs) Reset() { *m = Verbs{} } -func (*Verbs) ProtoMessage() {} -func (*Verbs) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{43} -} -func (m *Verbs) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Verbs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Verbs) XXX_Merge(src proto.Message) { - xxx_messageInfo_Verbs.Merge(m, src) -} -func (m *Verbs) XXX_Size() int { - return m.Size() -} -func (m *Verbs) XXX_DiscardUnknown() { - xxx_messageInfo_Verbs.DiscardUnknown(m) -} +func (m *UpdateOptions) Reset() { *m = UpdateOptions{} } -var xxx_messageInfo_Verbs proto.InternalMessageInfo +func (m *Verbs) Reset() { *m = Verbs{} } -func (m *WatchEvent) Reset() { *m = WatchEvent{} } -func (*WatchEvent) ProtoMessage() {} -func (*WatchEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_a8431b6e0aeeb761, []int{44} -} -func (m *WatchEvent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WatchEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *WatchEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_WatchEvent.Merge(m, src) -} -func (m *WatchEvent) XXX_Size() int { - return m.Size() -} -func (m *WatchEvent) XXX_DiscardUnknown() { - xxx_messageInfo_WatchEvent.DiscardUnknown(m) -} - -var xxx_messageInfo_WatchEvent proto.InternalMessageInfo - -func init() { - proto.RegisterType((*APIGroup)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIGroup") - proto.RegisterType((*APIGroupList)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIGroupList") - proto.RegisterType((*APIResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIResource") - proto.RegisterType((*APIResourceList)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIResourceList") - proto.RegisterType((*APIVersions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIVersions") - proto.RegisterType((*ApplyOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ApplyOptions") - proto.RegisterType((*Condition)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Condition") - proto.RegisterType((*CreateOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.CreateOptions") - proto.RegisterType((*DeleteOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions") - proto.RegisterType((*Duration)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Duration") - proto.RegisterType((*FieldSelectorRequirement)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.FieldSelectorRequirement") - proto.RegisterType((*FieldsV1)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.FieldsV1") - proto.RegisterType((*GetOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GetOptions") - proto.RegisterType((*GroupKind)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupKind") - proto.RegisterType((*GroupResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupResource") - proto.RegisterType((*GroupVersion)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersion") - proto.RegisterType((*GroupVersionForDiscovery)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery") - proto.RegisterType((*GroupVersionKind)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind") - proto.RegisterType((*GroupVersionResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource") - proto.RegisterType((*LabelSelector)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector.MatchLabelsEntry") - proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement") - proto.RegisterType((*List)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.List") - proto.RegisterType((*ListMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta") - proto.RegisterType((*ListOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ListOptions") - proto.RegisterType((*ManagedFieldsEntry)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry") - proto.RegisterType((*MicroTime)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime") - proto.RegisterType((*ObjectMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta.AnnotationsEntry") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta.LabelsEntry") - proto.RegisterType((*OwnerReference)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference") - proto.RegisterType((*PartialObjectMetadata)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.PartialObjectMetadata") - proto.RegisterType((*PartialObjectMetadataList)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.PartialObjectMetadataList") - proto.RegisterType((*Patch)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Patch") - proto.RegisterType((*PatchOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.PatchOptions") - proto.RegisterType((*Preconditions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Preconditions") - proto.RegisterType((*RootPaths)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.RootPaths") - proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR") - proto.RegisterType((*Status)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Status") - proto.RegisterType((*StatusCause)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.StatusCause") - proto.RegisterType((*StatusDetails)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.StatusDetails") - proto.RegisterType((*TableOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.TableOptions") - proto.RegisterType((*Time)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Time") - proto.RegisterType((*Timestamp)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Timestamp") - proto.RegisterType((*TypeMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta") - proto.RegisterType((*UpdateOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.UpdateOptions") - proto.RegisterType((*Verbs)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Verbs") - proto.RegisterType((*WatchEvent)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.WatchEvent") -} - -func init() { - proto.RegisterFile("k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto", fileDescriptor_a8431b6e0aeeb761) -} - -var fileDescriptor_a8431b6e0aeeb761 = []byte{ - // 2928 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x3a, 0x4d, 0x6c, 0x24, 0x47, - 0xd5, 0xee, 0xf9, 0xb1, 0x67, 0xde, 0x78, 0xfc, 0x53, 0xeb, 0xfd, 0xbe, 0x59, 0x23, 0x3c, 0x4e, - 0x27, 0x8a, 0x36, 0x90, 0x8c, 0x77, 0x97, 0x25, 0xda, 0x6c, 0x48, 0xc0, 0xe3, 0x59, 0x6f, 0x9c, - 0xac, 0x63, 0xab, 0xbc, 0xbb, 0x81, 0x10, 0xa1, 0x94, 0xa7, 0xcb, 0xe3, 0xc6, 0x3d, 0xdd, 0x93, - 0xaa, 0x1e, 0x6f, 0x06, 0x0e, 0xe4, 0x00, 0x12, 0x48, 0x28, 0x0a, 0x37, 0x4e, 0x28, 0x11, 0x9c, - 0x38, 0x21, 0x4e, 0xdc, 0x41, 0x22, 0xc7, 0x20, 0x2e, 0x91, 0x40, 0xa3, 0xac, 0x39, 0x70, 0x44, - 0x5c, 0x2d, 0x24, 0x50, 0xfd, 0xf4, 0xdf, 0xfc, 0xac, 0x7b, 0x76, 0x97, 0x88, 0xdb, 0xf4, 0xfb, - 0xaf, 0xaa, 0xf7, 0x5e, 0xbd, 0xf7, 0x6a, 0xe0, 0xea, 0xd1, 0x35, 0x5e, 0xb3, 0xbd, 0x35, 0xd2, - 0xb1, 0xdb, 0xa4, 0x79, 0x68, 0xbb, 0x94, 0xf5, 0xd6, 0x3a, 0x47, 0x2d, 0x01, 0xe0, 0x6b, 0x6d, - 0xea, 0x93, 0xb5, 0xe3, 0xcb, 0x6b, 0x2d, 0xea, 0x52, 0x46, 0x7c, 0x6a, 0xd5, 0x3a, 0xcc, 0xf3, - 0x3d, 0xf4, 0x94, 0xe2, 0xaa, 0xc5, 0xb9, 0x6a, 0x9d, 0xa3, 0x96, 0x00, 0xf0, 0x9a, 0xe0, 0xaa, - 0x1d, 0x5f, 0x5e, 0x7e, 0xae, 0x65, 0xfb, 0x87, 0xdd, 0xfd, 0x5a, 0xd3, 0x6b, 0xaf, 0xb5, 0xbc, - 0x96, 0xb7, 0x26, 0x99, 0xf7, 0xbb, 0x07, 0xf2, 0x4b, 0x7e, 0xc8, 0x5f, 0x4a, 0xe8, 0xf2, 0xda, - 0x38, 0x53, 0x58, 0xd7, 0xf5, 0xed, 0x36, 0x1d, 0xb4, 0x62, 0xf9, 0xf9, 0xb3, 0x18, 0x78, 0xf3, - 0x90, 0xb6, 0xc9, 0x20, 0x9f, 0xf9, 0xc7, 0x2c, 0x14, 0xd6, 0x77, 0xb7, 0x6e, 0x32, 0xaf, 0xdb, - 0x41, 0xab, 0x90, 0x73, 0x49, 0x9b, 0x56, 0x8c, 0x55, 0xe3, 0x62, 0xb1, 0x3e, 0xfb, 0x71, 0xbf, - 0x3a, 0x75, 0xd2, 0xaf, 0xe6, 0x5e, 0x27, 0x6d, 0x8a, 0x25, 0x06, 0x39, 0x50, 0x38, 0xa6, 0x8c, - 0xdb, 0x9e, 0xcb, 0x2b, 0x99, 0xd5, 0xec, 0xc5, 0xd2, 0x95, 0x97, 0x6b, 0x69, 0xd6, 0x5f, 0x93, - 0x0a, 0xee, 0x2a, 0xd6, 0x4d, 0x8f, 0x35, 0x6c, 0xde, 0xf4, 0x8e, 0x29, 0xeb, 0xd5, 0x17, 0xb4, - 0x96, 0x82, 0x46, 0x72, 0x1c, 0x6a, 0x40, 0x3f, 0x34, 0x60, 0xa1, 0xc3, 0xe8, 0x01, 0x65, 0x8c, - 0x5a, 0x1a, 0x5f, 0xc9, 0xae, 0x1a, 0x8f, 0x41, 0x6d, 0x45, 0xab, 0x5d, 0xd8, 0x1d, 0x90, 0x8f, - 0x87, 0x34, 0xa2, 0x5f, 0x1a, 0xb0, 0xcc, 0x29, 0x3b, 0xa6, 0x6c, 0xdd, 0xb2, 0x18, 0xe5, 0xbc, - 0xde, 0xdb, 0x70, 0x6c, 0xea, 0xfa, 0x1b, 0x5b, 0x0d, 0xcc, 0x2b, 0x39, 0xb9, 0x0f, 0x5f, 0x4f, - 0x67, 0xd0, 0xde, 0x38, 0x39, 0x75, 0x53, 0x5b, 0xb4, 0x3c, 0x96, 0x84, 0xe3, 0x07, 0x98, 0x61, - 0x1e, 0xc0, 0x6c, 0x70, 0x90, 0xb7, 0x6c, 0xee, 0xa3, 0xbb, 0x30, 0xdd, 0x12, 0x1f, 0xbc, 0x62, - 0x48, 0x03, 0x6b, 0xe9, 0x0c, 0x0c, 0x64, 0xd4, 0xe7, 0xb4, 0x3d, 0xd3, 0xf2, 0x93, 0x63, 0x2d, - 0xcd, 0xfc, 0x49, 0x0e, 0x4a, 0xeb, 0xbb, 0x5b, 0x98, 0x72, 0xaf, 0xcb, 0x9a, 0x34, 0x85, 0xd3, - 0x5c, 0x83, 0x59, 0x6e, 0xbb, 0xad, 0xae, 0x43, 0x98, 0x80, 0x56, 0xa6, 0x25, 0xe5, 0x92, 0xa6, - 0x9c, 0xdd, 0x8b, 0xe1, 0x70, 0x82, 0x12, 0x5d, 0x01, 0x10, 0x12, 0x78, 0x87, 0x34, 0xa9, 0x55, - 0xc9, 0xac, 0x1a, 0x17, 0x0b, 0x75, 0xa4, 0xf9, 0xe0, 0xf5, 0x10, 0x83, 0x63, 0x54, 0xe8, 0x49, - 0xc8, 0x4b, 0x4b, 0x2b, 0x05, 0xa9, 0xa6, 0xac, 0xc9, 0xf3, 0x72, 0x19, 0x58, 0xe1, 0xd0, 0x33, - 0x30, 0xa3, 0xbd, 0xac, 0x52, 0x94, 0x64, 0xf3, 0x9a, 0x6c, 0x26, 0x70, 0x83, 0x00, 0x2f, 0xd6, - 0x77, 0x64, 0xbb, 0x96, 0xf4, 0xbb, 0xd8, 0xfa, 0x5e, 0xb3, 0x5d, 0x0b, 0x4b, 0x0c, 0xba, 0x05, - 0xf9, 0x63, 0xca, 0xf6, 0x85, 0x27, 0x08, 0xd7, 0xfc, 0x72, 0xba, 0x8d, 0xbe, 0x2b, 0x58, 0xea, - 0x45, 0x61, 0x9a, 0xfc, 0x89, 0x95, 0x10, 0x54, 0x03, 0xe0, 0x87, 0x1e, 0xf3, 0xe5, 0xf2, 0x2a, - 0xf9, 0xd5, 0xec, 0xc5, 0x62, 0x7d, 0x4e, 0xac, 0x77, 0x2f, 0x84, 0xe2, 0x18, 0x85, 0xa0, 0x6f, - 0x12, 0x9f, 0xb6, 0x3c, 0x66, 0x53, 0x5e, 0x99, 0x89, 0xe8, 0x37, 0x42, 0x28, 0x8e, 0x51, 0xa0, - 0x57, 0x01, 0x71, 0xdf, 0x63, 0xa4, 0x45, 0xf5, 0x52, 0x5f, 0x21, 0xfc, 0xb0, 0x02, 0x72, 0x75, - 0xcb, 0x7a, 0x75, 0x68, 0x6f, 0x88, 0x02, 0x8f, 0xe0, 0x32, 0x7f, 0x6b, 0xc0, 0x7c, 0xcc, 0x17, - 0xa4, 0xdf, 0x5d, 0x83, 0xd9, 0x56, 0x2c, 0xea, 0xb4, 0x5f, 0x84, 0xa7, 0x1d, 0x8f, 0x48, 0x9c, - 0xa0, 0x44, 0x14, 0x8a, 0x4c, 0x4b, 0x0a, 0xb2, 0xcb, 0xe5, 0xd4, 0x4e, 0x1b, 0xd8, 0x10, 0x69, - 0x8a, 0x01, 0x39, 0x8e, 0x24, 0x9b, 0x7f, 0x37, 0xa4, 0x03, 0x07, 0xf9, 0x06, 0x5d, 0x8c, 0xe5, - 0x34, 0x43, 0x6e, 0xdf, 0xec, 0x98, 0x7c, 0x74, 0x46, 0x22, 0xc8, 0xfc, 0x4f, 0x24, 0x82, 0xeb, - 0x85, 0x9f, 0x7f, 0x58, 0x9d, 0x7a, 0xef, 0xaf, 0xab, 0x53, 0xe6, 0xcf, 0x0c, 0x98, 0x5d, 0xef, - 0x74, 0x9c, 0xde, 0x4e, 0xc7, 0x97, 0x0b, 0x30, 0x61, 0xda, 0x62, 0x3d, 0xdc, 0x75, 0xf5, 0x42, - 0x41, 0xc4, 0x77, 0x43, 0x42, 0xb0, 0xc6, 0x88, 0xf8, 0x39, 0xf0, 0x58, 0x93, 0xea, 0x70, 0x0b, - 0xe3, 0x67, 0x53, 0x00, 0xb1, 0xc2, 0x89, 0x43, 0x3e, 0xb0, 0xa9, 0x63, 0x6d, 0x13, 0x97, 0xb4, - 0x28, 0xd3, 0xc1, 0x11, 0x6e, 0xfd, 0x66, 0x0c, 0x87, 0x13, 0x94, 0xe6, 0xbf, 0x33, 0x50, 0xdc, - 0xf0, 0x5c, 0xcb, 0xf6, 0x75, 0x70, 0xf9, 0xbd, 0xce, 0x50, 0xf2, 0xb8, 0xdd, 0xeb, 0x50, 0x2c, - 0x31, 0xe8, 0x05, 0x98, 0xe6, 0x3e, 0xf1, 0xbb, 0x5c, 0xda, 0x53, 0xac, 0x3f, 0x11, 0xa4, 0xa5, - 0x3d, 0x09, 0x3d, 0xed, 0x57, 0xe7, 0x43, 0x71, 0x0a, 0x84, 0x35, 0x83, 0xf0, 0x74, 0x6f, 0x5f, - 0x6e, 0x94, 0x75, 0x53, 0x5d, 0x7b, 0xc1, 0xfd, 0x91, 0x8d, 0x3c, 0x7d, 0x67, 0x88, 0x02, 0x8f, - 0xe0, 0x42, 0xc7, 0x80, 0x1c, 0xc2, 0xfd, 0xdb, 0x8c, 0xb8, 0x5c, 0xea, 0xba, 0x6d, 0xb7, 0xa9, - 0x0e, 0xf8, 0x2f, 0xa5, 0x3b, 0x71, 0xc1, 0x11, 0xe9, 0xbd, 0x35, 0x24, 0x0d, 0x8f, 0xd0, 0x80, - 0x9e, 0x86, 0x69, 0x46, 0x09, 0xf7, 0xdc, 0x4a, 0x5e, 0x2e, 0x3f, 0xcc, 0xca, 0x58, 0x42, 0xb1, - 0xc6, 0x8a, 0x84, 0xd6, 0xa6, 0x9c, 0x93, 0x56, 0x90, 0x5e, 0xc3, 0x84, 0xb6, 0xad, 0xc0, 0x38, - 0xc0, 0x9b, 0xbf, 0x31, 0xa0, 0xbc, 0xc1, 0x28, 0xf1, 0xe9, 0x24, 0x6e, 0xf1, 0xd0, 0x27, 0x8e, - 0xd6, 0x61, 0x5e, 0x7e, 0xdf, 0x25, 0x8e, 0x6d, 0xa9, 0x33, 0xc8, 0x49, 0xe6, 0xff, 0xd7, 0xcc, - 0xf3, 0x9b, 0x49, 0x34, 0x1e, 0xa4, 0x37, 0x7f, 0x9d, 0x83, 0x72, 0x83, 0x3a, 0x34, 0x32, 0x79, - 0x13, 0x50, 0x8b, 0x91, 0x26, 0xdd, 0xa5, 0xcc, 0xf6, 0xac, 0x3d, 0xda, 0xf4, 0x5c, 0x8b, 0x4b, - 0x37, 0xca, 0xd6, 0xff, 0x4f, 0xec, 0xef, 0xcd, 0x21, 0x2c, 0x1e, 0xc1, 0x81, 0x1c, 0x28, 0x77, - 0x98, 0xfc, 0x2d, 0xf7, 0x5c, 0x79, 0x59, 0xe9, 0xca, 0x57, 0xd2, 0x1d, 0xe9, 0x6e, 0x9c, 0xb5, - 0xbe, 0x78, 0xd2, 0xaf, 0x96, 0x13, 0x20, 0x9c, 0x14, 0x8e, 0xbe, 0x01, 0x0b, 0x1e, 0xeb, 0x1c, - 0x12, 0xb7, 0x41, 0x3b, 0xd4, 0xb5, 0xa8, 0xeb, 0x73, 0xb9, 0x91, 0x85, 0xfa, 0x92, 0xa8, 0x45, - 0x76, 0x06, 0x70, 0x78, 0x88, 0x1a, 0xbd, 0x09, 0x8b, 0x1d, 0xe6, 0x75, 0x48, 0x4b, 0x6e, 0xcc, - 0xae, 0xe7, 0xd8, 0xcd, 0x9e, 0xde, 0xce, 0x67, 0x4f, 0xfa, 0xd5, 0xc5, 0xdd, 0x41, 0xe4, 0x69, - 0xbf, 0x7a, 0x4e, 0x6e, 0x9d, 0x80, 0x44, 0x48, 0x3c, 0x2c, 0x26, 0xe6, 0x06, 0xf9, 0xb1, 0x6e, - 0xf0, 0xa1, 0x01, 0x97, 0xec, 0x96, 0xeb, 0x31, 0x2a, 0xae, 0x08, 0x8a, 0x29, 0xb1, 0x6e, 0x30, - 0xe6, 0xb1, 0x37, 0x6c, 0xff, 0x70, 0xc3, 0xe9, 0x72, 0x9f, 0xb2, 0x3a, 0xa3, 0xe4, 0xc8, 0x76, - 0x5b, 0xbb, 0x9e, 0x4f, 0x5d, 0xdf, 0x26, 0x8e, 0xf4, 0xc8, 0x42, 0xfd, 0xea, 0x49, 0xbf, 0x7a, - 0x69, 0x6b, 0x42, 0x5e, 0x3c, 0xb1, 0x36, 0x73, 0x0b, 0x0a, 0x8d, 0xae, 0x0e, 0xdb, 0x97, 0xa0, - 0x60, 0xe9, 0xdf, 0xda, 0x39, 0x82, 0xfc, 0x11, 0xd2, 0x9c, 0xf6, 0xab, 0x65, 0x51, 0x21, 0xd7, - 0x02, 0x00, 0x0e, 0x59, 0xcc, 0x5f, 0x19, 0x50, 0x91, 0xce, 0xb9, 0x47, 0x1d, 0xda, 0xf4, 0x3d, - 0x86, 0xe9, 0x3b, 0x5d, 0x9b, 0xd1, 0x36, 0x75, 0x7d, 0xf4, 0x45, 0xc8, 0x1e, 0xd1, 0x9e, 0x4e, - 0x5d, 0x25, 0x2d, 0x36, 0xfb, 0x1a, 0xed, 0x61, 0x01, 0x47, 0x37, 0xa0, 0xe0, 0x75, 0x44, 0xfa, - 0xf0, 0x98, 0x4e, 0x5d, 0xcf, 0x04, 0xaa, 0x77, 0x34, 0xfc, 0xb4, 0x5f, 0x3d, 0x9f, 0x10, 0x1f, - 0x20, 0x70, 0xc8, 0x2a, 0x0e, 0xe5, 0x98, 0x38, 0x5d, 0x2a, 0x1c, 0x25, 0x3c, 0x94, 0xbb, 0x12, - 0x82, 0x35, 0xc6, 0x7c, 0x1a, 0x0a, 0x52, 0x0c, 0xbf, 0x7b, 0x19, 0x2d, 0x40, 0x16, 0x93, 0x7b, - 0xd2, 0xaa, 0x59, 0x2c, 0x7e, 0xc6, 0xee, 0x83, 0x1d, 0x80, 0x9b, 0xd4, 0x0f, 0x42, 0x68, 0x1d, - 0xe6, 0x83, 0x4b, 0x31, 0x79, 0x57, 0x87, 0x71, 0x89, 0x93, 0x68, 0x3c, 0x48, 0x6f, 0xbe, 0x05, - 0x45, 0x79, 0x9f, 0x8b, 0x62, 0x28, 0x2a, 0xbc, 0x8c, 0x07, 0x14, 0x5e, 0x41, 0x35, 0x95, 0x19, - 0x57, 0x4d, 0xc5, 0xcc, 0x75, 0xa0, 0xac, 0x78, 0x83, 0x52, 0x33, 0x95, 0x86, 0x67, 0xa1, 0x10, - 0x98, 0xa9, 0xb5, 0x84, 0x2d, 0x46, 0x20, 0x08, 0x87, 0x14, 0x31, 0x6d, 0x87, 0x90, 0xa8, 0x4d, - 0xd2, 0x29, 0x8b, 0xd5, 0x91, 0x99, 0x07, 0xd7, 0x91, 0x31, 0x4d, 0x3f, 0x80, 0xca, 0xb8, 0xbe, - 0xe4, 0x11, 0xaa, 0xa7, 0xf4, 0xa6, 0x98, 0xef, 0x1b, 0xb0, 0x10, 0x97, 0x94, 0xfe, 0xf8, 0xd2, - 0x2b, 0x39, 0xbb, 0x6e, 0x8e, 0xed, 0xc8, 0x2f, 0x0c, 0x58, 0x4a, 0x2c, 0x6d, 0xa2, 0x13, 0x9f, - 0xc0, 0xa8, 0xb8, 0x73, 0x64, 0x27, 0x70, 0x8e, 0x3f, 0x67, 0xa0, 0x7c, 0x8b, 0xec, 0x53, 0x27, - 0x88, 0x54, 0xf4, 0x7d, 0x28, 0xb5, 0x89, 0xdf, 0x3c, 0x94, 0xd0, 0xa0, 0xc7, 0x6a, 0xa4, 0xbb, - 0x36, 0x12, 0x92, 0x6a, 0xdb, 0x91, 0x98, 0x1b, 0xae, 0xcf, 0x7a, 0xf5, 0x73, 0xda, 0xa4, 0x52, - 0x0c, 0x83, 0xe3, 0xda, 0x64, 0x63, 0x2c, 0xbf, 0x6f, 0xbc, 0xdb, 0x11, 0x05, 0xe0, 0xe4, 0xfd, - 0x78, 0xc2, 0x84, 0x58, 0x56, 0x8b, 0x1a, 0xe3, 0xed, 0x01, 0xf9, 0x78, 0x48, 0xe3, 0xf2, 0xcb, - 0xb0, 0x30, 0x68, 0xbc, 0xc8, 0x3f, 0x61, 0x56, 0x54, 0x89, 0x70, 0x09, 0xf2, 0x32, 0x4f, 0xa9, - 0xc3, 0xc1, 0xea, 0xe3, 0x7a, 0xe6, 0x9a, 0x21, 0xd3, 0xeb, 0x38, 0x43, 0x1e, 0x53, 0x7a, 0x4d, - 0x88, 0x7f, 0xc8, 0xf4, 0xfa, 0x3b, 0x03, 0x72, 0xb2, 0xb5, 0x79, 0x0b, 0x0a, 0x62, 0xff, 0x2c, - 0xe2, 0x13, 0x69, 0x57, 0xea, 0xa6, 0x5a, 0x70, 0x6f, 0x53, 0x9f, 0x44, 0xde, 0x16, 0x40, 0x70, - 0x28, 0x11, 0x61, 0xc8, 0xdb, 0x3e, 0x6d, 0x07, 0x07, 0xf9, 0xdc, 0x58, 0xd1, 0x7a, 0xa4, 0x53, - 0xc3, 0xe4, 0xde, 0x8d, 0x77, 0x7d, 0xea, 0x8a, 0xc3, 0x88, 0x42, 0x63, 0x4b, 0xc8, 0xc0, 0x4a, - 0x94, 0xf9, 0x4f, 0x03, 0x42, 0x55, 0xc2, 0xf9, 0x39, 0x75, 0x0e, 0x6e, 0xd9, 0xee, 0x91, 0xde, - 0xd6, 0xd0, 0x9c, 0x3d, 0x0d, 0xc7, 0x21, 0xc5, 0xa8, 0xeb, 0x21, 0x33, 0xd9, 0xf5, 0x20, 0x14, - 0x36, 0x3d, 0xd7, 0xb7, 0xdd, 0xee, 0x50, 0xb4, 0x6d, 0x68, 0x38, 0x0e, 0x29, 0x44, 0x49, 0xc7, - 0x68, 0x9b, 0xd8, 0xae, 0xed, 0xb6, 0xc4, 0x22, 0x36, 0xbc, 0xae, 0xeb, 0xcb, 0xda, 0x46, 0x97, - 0x74, 0x78, 0x08, 0x8b, 0x47, 0x70, 0x98, 0xff, 0xca, 0x41, 0x49, 0xac, 0x39, 0xb8, 0xe7, 0x5e, - 0x84, 0xb2, 0x13, 0xf7, 0x02, 0xbd, 0xf6, 0xf3, 0xda, 0x94, 0x64, 0x5c, 0xe3, 0x24, 0xad, 0x60, - 0x3e, 0x88, 0xdf, 0xd0, 0x7a, 0x0f, 0x42, 0xe6, 0x64, 0x75, 0x90, 0xa4, 0x15, 0xd9, 0xeb, 0x9e, - 0x88, 0x0f, 0x5d, 0xe3, 0x85, 0x47, 0xf4, 0x86, 0x00, 0x62, 0x85, 0x43, 0xdb, 0x70, 0x8e, 0x38, - 0x8e, 0x77, 0x4f, 0x02, 0xeb, 0x9e, 0x77, 0xd4, 0x26, 0xec, 0x88, 0xcb, 0xb1, 0x44, 0xa1, 0xfe, - 0x05, 0xcd, 0x72, 0x6e, 0x7d, 0x98, 0x04, 0x8f, 0xe2, 0x1b, 0x75, 0x6c, 0xb9, 0x09, 0x8f, 0xed, - 0x10, 0x96, 0x06, 0x40, 0x32, 0xca, 0xf5, 0x8c, 0xe0, 0xaa, 0x96, 0xb3, 0x84, 0x47, 0xd0, 0x9c, - 0x8e, 0x81, 0xe3, 0x91, 0x12, 0xd1, 0x75, 0x98, 0x13, 0x9e, 0xec, 0x75, 0xfd, 0xa0, 0x82, 0xcf, - 0xcb, 0xe3, 0x46, 0x27, 0xfd, 0xea, 0xdc, 0xed, 0x04, 0x06, 0x0f, 0x50, 0x8a, 0xcd, 0x75, 0xec, - 0xb6, 0xed, 0x57, 0x66, 0x24, 0x4b, 0xb8, 0xb9, 0xb7, 0x04, 0x10, 0x2b, 0x5c, 0xc2, 0x03, 0x0b, - 0x67, 0x7a, 0xe0, 0x06, 0x2c, 0x72, 0xea, 0x5a, 0x5b, 0xae, 0x2d, 0x0a, 0xc9, 0x1b, 0xc7, 0xb2, - 0x3e, 0x2f, 0xc9, 0x83, 0x38, 0x2f, 0x8a, 0xeb, 0xbd, 0x41, 0x24, 0x1e, 0xa6, 0x37, 0xff, 0x94, - 0x05, 0xa4, 0x5a, 0x1f, 0x4b, 0x15, 0x65, 0x2a, 0x2f, 0x8a, 0x06, 0x4d, 0xb7, 0x4e, 0xc6, 0x40, - 0x83, 0xa6, 0xbb, 0xa6, 0x00, 0x8f, 0xb6, 0xa1, 0xa8, 0xf2, 0x53, 0x14, 0x73, 0x6b, 0x9a, 0xb8, - 0xb8, 0x13, 0x20, 0x4e, 0xfb, 0xd5, 0xe5, 0x84, 0x9a, 0x10, 0x23, 0x9b, 0xe7, 0x48, 0x02, 0xba, - 0x02, 0x40, 0x3a, 0x76, 0x7c, 0x7c, 0x5a, 0x8c, 0x86, 0x68, 0xd1, 0x20, 0x04, 0xc7, 0xa8, 0xd0, - 0x2b, 0x90, 0xf3, 0x1f, 0xae, 0xc1, 0x2d, 0xc8, 0xfe, 0x5d, 0xb4, 0xb3, 0x52, 0x82, 0xd0, 0x2e, - 0x83, 0x82, 0x0b, 0xb3, 0x74, 0x6f, 0x1a, 0x6a, 0xdf, 0x0c, 0x31, 0x38, 0x46, 0x85, 0xbe, 0x09, - 0x85, 0x03, 0x5d, 0xcf, 0xca, 0xd3, 0x4d, 0x9d, 0x67, 0x83, 0x2a, 0x58, 0x4d, 0x70, 0x82, 0x2f, - 0x1c, 0x4a, 0x43, 0x5f, 0x85, 0x12, 0xef, 0xee, 0x87, 0x25, 0x80, 0x72, 0x89, 0xf0, 0xbe, 0xdd, - 0x8b, 0x50, 0x38, 0x4e, 0x67, 0xbe, 0x03, 0xc5, 0x6d, 0xbb, 0xc9, 0x3c, 0xd9, 0x92, 0x3f, 0x03, - 0x33, 0x3c, 0xd1, 0x6f, 0x86, 0x27, 0x19, 0xb8, 0x6a, 0x80, 0x17, 0x3e, 0xea, 0x12, 0xd7, 0x53, - 0x5d, 0x65, 0x3e, 0xf2, 0xd1, 0xd7, 0x05, 0x10, 0x2b, 0xdc, 0xf5, 0x25, 0x51, 0x65, 0xfc, 0xf8, - 0xa3, 0xea, 0xd4, 0x07, 0x1f, 0x55, 0xa7, 0x3e, 0xfc, 0x48, 0x57, 0x1c, 0xbf, 0x07, 0x80, 0x9d, - 0xfd, 0xef, 0xd2, 0xa6, 0xca, 0xdd, 0xa9, 0xa6, 0xac, 0xc1, 0x70, 0x5f, 0x4e, 0x59, 0x33, 0x03, - 0x95, 0x63, 0x0c, 0x87, 0x13, 0x94, 0x68, 0x0d, 0x8a, 0xe1, 0xfc, 0x54, 0xfb, 0xc7, 0x62, 0xe0, - 0x6f, 0xe1, 0x90, 0x15, 0x47, 0x34, 0x89, 0x8b, 0x24, 0x77, 0xe6, 0x45, 0x52, 0x87, 0x6c, 0xd7, - 0xb6, 0xf4, 0xfc, 0xe2, 0x52, 0x70, 0x91, 0xdf, 0xd9, 0x6a, 0x9c, 0xf6, 0xab, 0x4f, 0x8c, 0x7b, - 0xb6, 0xf0, 0x7b, 0x1d, 0xca, 0x6b, 0x77, 0xb6, 0x1a, 0x58, 0x30, 0x8f, 0xca, 0x6a, 0xd3, 0x13, - 0x66, 0xb5, 0x2b, 0x00, 0xad, 0x68, 0x0a, 0xa4, 0x92, 0x46, 0xe8, 0x88, 0xb1, 0xe9, 0x4f, 0x8c, - 0x0a, 0x71, 0x58, 0x6c, 0x32, 0x4a, 0x82, 0x69, 0x0c, 0xf7, 0x49, 0x5b, 0xcd, 0x95, 0x27, 0x8b, - 0x89, 0x0b, 0x5a, 0xcd, 0xe2, 0xc6, 0xa0, 0x30, 0x3c, 0x2c, 0x1f, 0x79, 0xb0, 0x68, 0xe9, 0x86, - 0x3d, 0x52, 0x5a, 0x9c, 0x58, 0xa9, 0xcc, 0x58, 0x8d, 0x41, 0x41, 0x78, 0x58, 0x36, 0xfa, 0x0e, - 0x2c, 0x07, 0xc0, 0xe1, 0xa9, 0x89, 0xcc, 0xfa, 0xd9, 0xfa, 0xca, 0x49, 0xbf, 0xba, 0xdc, 0x18, - 0x4b, 0x85, 0x1f, 0x20, 0x01, 0x59, 0x30, 0xed, 0xa8, 0x2a, 0xb9, 0x24, 0x2b, 0x9b, 0xaf, 0xa5, - 0x5b, 0x45, 0xe4, 0xfd, 0xb5, 0x78, 0x75, 0x1c, 0x4e, 0xc0, 0x74, 0x61, 0xac, 0x65, 0xa3, 0x77, - 0xa1, 0x44, 0x5c, 0xd7, 0xf3, 0x89, 0x9a, 0xe3, 0xcc, 0x4a, 0x55, 0xeb, 0x13, 0xab, 0x5a, 0x8f, - 0x64, 0x0c, 0x54, 0xe3, 0x31, 0x0c, 0x8e, 0xab, 0x42, 0xf7, 0x60, 0xde, 0xbb, 0xe7, 0x52, 0x86, - 0xe9, 0x01, 0x65, 0xd4, 0x6d, 0x52, 0x5e, 0x29, 0x4b, 0xed, 0x57, 0x53, 0x6a, 0x4f, 0x30, 0x47, - 0x2e, 0x9d, 0x84, 0x73, 0x3c, 0xa8, 0x05, 0xd5, 0x44, 0x6e, 0x75, 0x89, 0x63, 0x7f, 0x8f, 0x32, - 0x5e, 0x99, 0x8b, 0x46, 0xff, 0x9b, 0x21, 0x14, 0xc7, 0x28, 0x50, 0x17, 0xca, 0xed, 0xf8, 0x95, - 0x51, 0x59, 0x94, 0x66, 0x5e, 0x4b, 0x67, 0xe6, 0xf0, 0xa5, 0x16, 0x95, 0x41, 0x09, 0x1c, 0x4e, - 0x6a, 0x59, 0x7e, 0x01, 0x4a, 0x0f, 0xd9, 0x21, 0x88, 0x0e, 0x63, 0xf0, 0x40, 0x26, 0xea, 0x30, - 0xfe, 0x90, 0x81, 0xb9, 0xe4, 0x36, 0x0e, 0x5c, 0x87, 0xf9, 0x54, 0xd7, 0x61, 0xd0, 0xcb, 0x1a, - 0x63, 0xdf, 0x80, 0x82, 0xfc, 0x9c, 0x1d, 0x9b, 0x9f, 0x75, 0x1a, 0xcc, 0x3d, 0x4a, 0x1a, 0xac, - 0x01, 0x88, 0x62, 0x85, 0x79, 0x8e, 0x43, 0x99, 0x1e, 0xab, 0xa9, 0xb7, 0x9e, 0x10, 0x8a, 0x63, - 0x14, 0xa2, 0xa4, 0xde, 0x77, 0xbc, 0xe6, 0x91, 0xdc, 0x82, 0x20, 0x7a, 0x65, 0xee, 0x2b, 0xa8, - 0x92, 0xba, 0x3e, 0x84, 0xc5, 0x23, 0x38, 0xcc, 0x1e, 0x9c, 0xdf, 0x25, 0x4c, 0x14, 0x39, 0x51, - 0xa4, 0xc8, 0x9e, 0xe5, 0xed, 0xa1, 0x8e, 0xe8, 0xd2, 0xa4, 0x11, 0x17, 0x6d, 0x7e, 0x04, 0x8b, - 0xba, 0x22, 0xf3, 0x2f, 0x06, 0x5c, 0x18, 0xa9, 0xfb, 0x73, 0xe8, 0xc8, 0xde, 0x4e, 0x76, 0x64, - 0x2f, 0xa6, 0x1c, 0x0a, 0x8f, 0xb2, 0x76, 0x4c, 0x7f, 0x36, 0x03, 0xf9, 0x5d, 0x51, 0x09, 0x9b, - 0x9f, 0x18, 0x30, 0x2b, 0x7f, 0x4d, 0x32, 0x93, 0xaf, 0x26, 0x9f, 0x6a, 0x8a, 0x8f, 0xef, 0x99, - 0xe6, 0x71, 0x0c, 0xed, 0xdf, 0x37, 0x20, 0x39, 0x0d, 0x47, 0x2f, 0xab, 0x10, 0x30, 0xc2, 0x71, - 0xf5, 0x84, 0xee, 0xff, 0xd2, 0xb8, 0x96, 0xf4, 0x5c, 0xaa, 0x69, 0xe5, 0xb3, 0x50, 0xc4, 0x9e, - 0xe7, 0xef, 0x12, 0xff, 0x90, 0x8b, 0xbd, 0xeb, 0x88, 0x1f, 0x7a, 0x7b, 0xe5, 0xde, 0x49, 0x0c, - 0x56, 0x70, 0xf3, 0xa7, 0x06, 0x5c, 0x18, 0xfb, 0x02, 0x27, 0xb2, 0x48, 0x33, 0xfc, 0xd2, 0x2b, - 0x0a, 0x1d, 0x39, 0xa2, 0xc3, 0x31, 0x2a, 0xd1, 0x4b, 0x26, 0x9e, 0xed, 0x06, 0x7b, 0xc9, 0x84, - 0x36, 0x9c, 0xa4, 0x35, 0xff, 0x91, 0x01, 0xfd, 0xe4, 0xf5, 0x5f, 0x76, 0xfa, 0xa7, 0x07, 0x1e, - 0xdc, 0xe6, 0x92, 0x0f, 0x6e, 0xe1, 0xeb, 0x5a, 0xec, 0xc5, 0x29, 0xfb, 0xe0, 0x17, 0x27, 0xf4, - 0x7c, 0xf8, 0x88, 0xa5, 0x7c, 0x68, 0x25, 0xf9, 0x88, 0x75, 0xda, 0xaf, 0xce, 0x6a, 0xe1, 0xc9, - 0x47, 0xad, 0x37, 0x61, 0xc6, 0xa2, 0x3e, 0xb1, 0x1d, 0xd5, 0x17, 0xa6, 0x7e, 0x96, 0x51, 0xc2, - 0x1a, 0x8a, 0xb5, 0x5e, 0x12, 0x36, 0xe9, 0x0f, 0x1c, 0x08, 0x14, 0x09, 0xbb, 0xe9, 0x59, 0xaa, - 0x23, 0xc9, 0x47, 0x09, 0x7b, 0xc3, 0xb3, 0x28, 0x96, 0x18, 0xf3, 0x03, 0x03, 0x4a, 0x4a, 0xd2, - 0x06, 0xe9, 0x72, 0x8a, 0x2e, 0x87, 0xab, 0x50, 0xc7, 0x7d, 0x21, 0xfe, 0x5a, 0x79, 0xda, 0xaf, - 0x16, 0x25, 0x99, 0x6c, 0x66, 0x46, 0xbc, 0xca, 0x65, 0xce, 0xd8, 0xa3, 0x27, 0x21, 0x2f, 0x03, - 0x48, 0x6f, 0x66, 0xf4, 0xec, 0x2a, 0x80, 0x58, 0xe1, 0xcc, 0xcf, 0x32, 0x50, 0x4e, 0x2c, 0x2e, - 0x45, 0x5f, 0x10, 0x8e, 0x50, 0x33, 0x29, 0xc6, 0xf2, 0xe3, 0xff, 0xe4, 0xa0, 0xaf, 0xaf, 0xe9, - 0x47, 0xb9, 0xbe, 0xbe, 0x05, 0xd3, 0x4d, 0xb1, 0x47, 0xc1, 0x7f, 0x66, 0x2e, 0x4f, 0x72, 0x9c, - 0x72, 0x77, 0x23, 0x6f, 0x94, 0x9f, 0x1c, 0x6b, 0x81, 0xe8, 0x26, 0x2c, 0x32, 0xea, 0xb3, 0xde, - 0xfa, 0x81, 0x4f, 0x59, 0x7c, 0x98, 0x90, 0x8f, 0xaa, 0x6f, 0x3c, 0x48, 0x80, 0x87, 0x79, 0xcc, - 0x7d, 0x98, 0xbd, 0x4d, 0xf6, 0x9d, 0xf0, 0xa1, 0x11, 0x43, 0xd9, 0x76, 0x9b, 0x4e, 0xd7, 0xa2, - 0x2a, 0xa1, 0x07, 0xd9, 0x2b, 0x08, 0xda, 0xad, 0x38, 0xf2, 0xb4, 0x5f, 0x3d, 0x97, 0x00, 0xa8, - 0x97, 0x35, 0x9c, 0x14, 0x61, 0x3a, 0x90, 0xfb, 0x1c, 0x3b, 0xc9, 0x6f, 0x43, 0x31, 0xaa, 0xf5, - 0x1f, 0xb3, 0x4a, 0xf3, 0x6d, 0x28, 0x08, 0x8f, 0x0f, 0x7a, 0xd4, 0x33, 0xaa, 0xa4, 0x64, 0xed, - 0x95, 0x49, 0x53, 0x7b, 0xc9, 0xe7, 0xea, 0x3b, 0x1d, 0xeb, 0x11, 0x9f, 0xab, 0x33, 0x8f, 0x72, - 0xf3, 0x65, 0x27, 0xbc, 0xf9, 0xae, 0x80, 0xfa, 0x4b, 0x8f, 0xb8, 0x64, 0x54, 0x01, 0x11, 0xbb, - 0x64, 0xe2, 0xf7, 0x7f, 0xec, 0x85, 0xe1, 0x47, 0x06, 0x80, 0x1c, 0xe5, 0xc9, 0x31, 0x52, 0x8a, - 0x3f, 0x46, 0xdc, 0x81, 0x69, 0x4f, 0x79, 0xa4, 0x7a, 0xb2, 0x9e, 0x70, 0x5e, 0x1c, 0x06, 0x92, - 0xf2, 0x49, 0xac, 0x85, 0xd5, 0x5f, 0xfd, 0xf8, 0xfe, 0xca, 0xd4, 0x27, 0xf7, 0x57, 0xa6, 0x3e, - 0xbd, 0xbf, 0x32, 0xf5, 0xde, 0xc9, 0x8a, 0xf1, 0xf1, 0xc9, 0x8a, 0xf1, 0xc9, 0xc9, 0x8a, 0xf1, - 0xe9, 0xc9, 0x8a, 0xf1, 0xd9, 0xc9, 0x8a, 0xf1, 0xc1, 0xdf, 0x56, 0xa6, 0xde, 0x7c, 0x2a, 0xcd, - 0x5f, 0x25, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xf8, 0xda, 0x63, 0x4c, 0x51, 0x29, 0x00, 0x00, -} +func (m *WatchEvent) Reset() { *m = WatchEvent{} } func (m *APIGroup) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -2415,7 +999,7 @@ func (m *LabelSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.MatchLabels { keysForMatchLabels = append(keysForMatchLabels, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForMatchLabels) + sort.Strings(keysForMatchLabels) for iNdEx := len(keysForMatchLabels) - 1; iNdEx >= 0; iNdEx-- { v := m.MatchLabels[string(keysForMatchLabels[iNdEx])] baseI := i @@ -2787,7 +1371,7 @@ func (m *ObjectMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Annotations { keysForAnnotations = append(keysForAnnotations, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + sort.Strings(keysForAnnotations) for iNdEx := len(keysForAnnotations) - 1; iNdEx >= 0; iNdEx-- { v := m.Annotations[string(keysForAnnotations[iNdEx])] baseI := i @@ -2811,7 +1395,7 @@ func (m *ObjectMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Labels { keysForLabels = append(keysForLabels, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + sort.Strings(keysForLabels) for iNdEx := len(keysForLabels) - 1; iNdEx >= 0; iNdEx-- { v := m.Labels[string(keysForLabels[iNdEx])] baseI := i @@ -4583,7 +3167,7 @@ func (this *LabelSelector) String() string { for k := range this.MatchLabels { keysForMatchLabels = append(keysForMatchLabels, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForMatchLabels) + sort.Strings(keysForMatchLabels) mapStringForMatchLabels := "map[string]string{" for _, k := range keysForMatchLabels { mapStringForMatchLabels += fmt.Sprintf("%v: %v,", k, this.MatchLabels[k]) @@ -4690,7 +3274,7 @@ func (this *ObjectMeta) String() string { for k := range this.Labels { keysForLabels = append(keysForLabels, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + sort.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) @@ -4700,7 +3284,7 @@ func (this *ObjectMeta) String() string { for k := range this.Annotations { keysForAnnotations = append(keysForAnnotations, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + sort.Strings(keysForAnnotations) mapStringForAnnotations := "map[string]string{" for _, k := range keysForAnnotations { mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index 865d3e7caacbd..fb21b72368683 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -1038,7 +1038,6 @@ message Status { // is not guaranteed to conform to any schema except that defined by // the reason type. // +optional - // +listType=atomic optional StatusDetails details = 5; // Suggested HTTP return code for this status, 0 if not set. @@ -1114,6 +1113,7 @@ message StatusDetails { } // TableOptions are used when a Table is requested by the caller. +// +k8s:conversion-gen:explicit-from=net/url.Values // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object message TableOptions { // includeObject decides whether to include each object along with its columnar information. diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.protomessage.pb.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..459ae1ad873d3 --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.protomessage.pb.go @@ -0,0 +1,112 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*APIGroup) ProtoMessage() {} + +func (*APIGroupList) ProtoMessage() {} + +func (*APIResource) ProtoMessage() {} + +func (*APIResourceList) ProtoMessage() {} + +func (*APIVersions) ProtoMessage() {} + +func (*ApplyOptions) ProtoMessage() {} + +func (*Condition) ProtoMessage() {} + +func (*CreateOptions) ProtoMessage() {} + +func (*DeleteOptions) ProtoMessage() {} + +func (*Duration) ProtoMessage() {} + +func (*FieldSelectorRequirement) ProtoMessage() {} + +func (*FieldsV1) ProtoMessage() {} + +func (*GetOptions) ProtoMessage() {} + +func (*GroupKind) ProtoMessage() {} + +func (*GroupResource) ProtoMessage() {} + +func (*GroupVersion) ProtoMessage() {} + +func (*GroupVersionForDiscovery) ProtoMessage() {} + +func (*GroupVersionKind) ProtoMessage() {} + +func (*GroupVersionResource) ProtoMessage() {} + +func (*LabelSelector) ProtoMessage() {} + +func (*LabelSelectorRequirement) ProtoMessage() {} + +func (*List) ProtoMessage() {} + +func (*ListMeta) ProtoMessage() {} + +func (*ListOptions) ProtoMessage() {} + +func (*ManagedFieldsEntry) ProtoMessage() {} + +func (*MicroTime) ProtoMessage() {} + +func (*ObjectMeta) ProtoMessage() {} + +func (*OwnerReference) ProtoMessage() {} + +func (*PartialObjectMetadata) ProtoMessage() {} + +func (*PartialObjectMetadataList) ProtoMessage() {} + +func (*Patch) ProtoMessage() {} + +func (*PatchOptions) ProtoMessage() {} + +func (*Preconditions) ProtoMessage() {} + +func (*RootPaths) ProtoMessage() {} + +func (*ServerAddressByClientCIDR) ProtoMessage() {} + +func (*Status) ProtoMessage() {} + +func (*StatusCause) ProtoMessage() {} + +func (*StatusDetails) ProtoMessage() {} + +func (*TableOptions) ProtoMessage() {} + +func (*Time) ProtoMessage() {} + +func (*Timestamp) ProtoMessage() {} + +func (*TypeMeta) ProtoMessage() {} + +func (*UpdateOptions) ProtoMessage() {} + +func (*Verbs) ProtoMessage() {} + +func (*WatchEvent) ProtoMessage() {} diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index 2a669062cabea..9970e877d096d 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -784,7 +784,6 @@ type Status struct { // is not guaranteed to conform to any schema except that defined by // the reason type. // +optional - // +listType=atomic Details *StatusDetails `json:"details,omitempty" protobuf:"bytes,5,opt,name=details"` // Suggested HTTP return code for this status, 0 if not set. // +optional diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go index 4dedec4b3fce5..d0ca20013adf4 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go @@ -104,7 +104,7 @@ func ValidateLabelSelectorRequirement(sr metav1.LabelSelectorRequirement, opts L func ValidateLabelName(labelName string, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} for _, msg := range validation.IsQualifiedName(labelName) { - allErrs = append(allErrs, field.Invalid(fldPath, labelName, msg).WithOrigin("labelKey")) + allErrs = append(allErrs, field.Invalid(fldPath, labelName, msg).WithOrigin("format=k8s-label-key")) } return allErrs } @@ -115,7 +115,7 @@ func ValidateLabels(labels map[string]string, fldPath *field.Path) field.ErrorLi for k, v := range labels { allErrs = append(allErrs, ValidateLabelName(k, fldPath)...) for _, msg := range validation.IsValidLabelValue(v) { - allErrs = append(allErrs, field.Invalid(fldPath, v, msg)) + allErrs = append(allErrs, field.Invalid(fldPath, v, msg).WithOrigin("format=k8s-label-value")) } } return allErrs diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation_test.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation_test.go index 5bb363d3a68d9..c1e4371a3382a 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation_test.go @@ -55,7 +55,7 @@ func TestValidateLabels(t *testing.T) { } namePartErrMsg := "name part must consist of" - nameErrMsg := "a qualified name must consist of" + nameErrMsg := "a valid label key must consist of" labelErrMsg := "a valid label must be an empty string or consist of" maxLengthErrMsg := "must be no more than" diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.model_name.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..fd6e876ece286 --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.model_name.go @@ -0,0 +1,267 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in APIGroup) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in APIGroupList) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.APIGroupList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in APIResource) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.APIResource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in APIResourceList) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in APIVersions) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.APIVersions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ApplyOptions) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.ApplyOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Condition) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.Condition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CreateOptions) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.CreateOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in DeleteOptions) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Duration) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.Duration" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FieldSelectorRequirement) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.FieldSelectorRequirement" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in FieldsV1) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GetOptions) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.GetOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GroupKind) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.GroupKind" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GroupResource) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.GroupResource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GroupVersion) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersion" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GroupVersionForDiscovery) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GroupVersionKind) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionKind" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GroupVersionResource) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionResource" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in InternalEvent) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.InternalEvent" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LabelSelector) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in LabelSelectorRequirement) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in List) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.List" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ListMeta) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ListOptions) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.ListOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ManagedFieldsEntry) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in MicroTime) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ObjectMeta) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in OwnerReference) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PartialObjectMetadata) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.PartialObjectMetadata" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PartialObjectMetadataList) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.PartialObjectMetadataList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Patch) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.Patch" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PatchOptions) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.PatchOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Preconditions) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RootPaths) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.RootPaths" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ServerAddressByClientCIDR) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Status) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.Status" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatusCause) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StatusDetails) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Table) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.Table" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TableColumnDefinition) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.TableColumnDefinition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TableOptions) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.TableOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TableRow) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.TableRow" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TableRowCondition) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.TableRowCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Time) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.Time" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Timestamp) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.Timestamp" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TypeMeta) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.TypeMeta" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in UpdateOptions) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.UpdateOptions" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in WatchEvent) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" +} diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/doc.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/doc.go index 46b0e133c37c2..159ca0573fb32 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/doc.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:openapi-gen=true // +k8s:defaulter-gen=TypeMeta +// +k8s:openapi-model-package=io.k8s.apimachinery.pkg.apis.meta.v1beta1 // +groupName=meta.k8s.io diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go index 819d936fe5bc2..3c763898e76f1 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go @@ -24,84 +24,14 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *PartialObjectMetadataList) Reset() { *m = PartialObjectMetadataList{} } -func (*PartialObjectMetadataList) ProtoMessage() {} -func (*PartialObjectMetadataList) Descriptor() ([]byte, []int) { - return fileDescriptor_39237a8d8061b52f, []int{0} -} -func (m *PartialObjectMetadataList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PartialObjectMetadataList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PartialObjectMetadataList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PartialObjectMetadataList.Merge(m, src) -} -func (m *PartialObjectMetadataList) XXX_Size() int { - return m.Size() -} -func (m *PartialObjectMetadataList) XXX_DiscardUnknown() { - xxx_messageInfo_PartialObjectMetadataList.DiscardUnknown(m) -} - -var xxx_messageInfo_PartialObjectMetadataList proto.InternalMessageInfo - -func init() { - proto.RegisterType((*PartialObjectMetadataList)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1beta1.PartialObjectMetadataList") -} - -func init() { - proto.RegisterFile("k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto", fileDescriptor_39237a8d8061b52f) -} - -var fileDescriptor_39237a8d8061b52f = []byte{ - // 303 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x4b, 0xf3, 0x30, - 0x1c, 0xc6, 0x9b, 0xf7, 0x65, 0x30, 0x3a, 0x04, 0xd9, 0x69, 0xee, 0x90, 0x0d, 0x4f, 0xdb, 0xc1, - 0x84, 0x0d, 0x11, 0xc5, 0xdb, 0x6e, 0x82, 0x32, 0xd9, 0x51, 0x3c, 0x98, 0x76, 0x31, 0x8b, 0x35, - 0x4d, 0x69, 0xfe, 0x15, 0xbc, 0xf9, 0x11, 0xfc, 0x58, 0x3d, 0xee, 0x38, 0x10, 0x86, 0x8d, 0x5f, - 0x44, 0xd2, 0x56, 0x91, 0xa1, 0xd0, 0x5b, 0x9e, 0x07, 0x7e, 0xbf, 0x3c, 0x81, 0xf8, 0x67, 0xd1, - 0xa9, 0x21, 0x52, 0x53, 0x96, 0x48, 0xc5, 0xc2, 0x95, 0x8c, 0x79, 0xfa, 0x4c, 0x93, 0x48, 0xb8, - 0xc2, 0x50, 0xc5, 0x81, 0xd1, 0xa7, 0x49, 0xc0, 0x81, 0x4d, 0xa8, 0xe0, 0x31, 0x4f, 0x19, 0xf0, - 0x25, 0x49, 0x52, 0x0d, 0xba, 0x3b, 0xae, 0x50, 0xf2, 0x13, 0x25, 0x49, 0x24, 0x5c, 0x61, 0x88, - 0x43, 0x49, 0x8d, 0xf6, 0x8f, 0x84, 0x84, 0x55, 0x16, 0x90, 0x50, 0x2b, 0x2a, 0xb4, 0xd0, 0xb4, - 0x34, 0x04, 0xd9, 0x7d, 0x99, 0xca, 0x50, 0x9e, 0x2a, 0x73, 0xff, 0xb8, 0xc9, 0xa8, 0xdd, 0x3d, - 0xfd, 0x93, 0xbf, 0xa8, 0x34, 0x8b, 0x41, 0x2a, 0x4e, 0x4d, 0xb8, 0xe2, 0x8a, 0xed, 0x72, 0x87, - 0x6f, 0xc8, 0x3f, 0xb8, 0x66, 0x29, 0x48, 0xf6, 0x38, 0x0f, 0x1e, 0x78, 0x08, 0x57, 0x1c, 0xd8, - 0x92, 0x01, 0xbb, 0x94, 0x06, 0xba, 0xb7, 0x7e, 0x5b, 0xd5, 0xb9, 0xf7, 0x6f, 0x88, 0x46, 0x9d, - 0x29, 0x21, 0x4d, 0x1e, 0x4e, 0x1c, 0xed, 0x4c, 0xb3, 0xfd, 0x7c, 0x3b, 0xf0, 0xec, 0x76, 0xd0, - 0xfe, 0x6a, 0x16, 0xdf, 0xc6, 0xee, 0x9d, 0xdf, 0x92, 0xc0, 0x95, 0xe9, 0xa1, 0xe1, 0xff, 0x51, - 0x67, 0x7a, 0xde, 0x4c, 0xfd, 0xeb, 0xda, 0xd9, 0x5e, 0x7d, 0x4f, 0xeb, 0xc2, 0x19, 0x17, 0x95, - 0x78, 0x36, 0xcf, 0x0b, 0xec, 0xad, 0x0b, 0xec, 0x6d, 0x0a, 0xec, 0xbd, 0x58, 0x8c, 0x72, 0x8b, - 0xd1, 0xda, 0x62, 0xb4, 0xb1, 0x18, 0xbd, 0x5b, 0x8c, 0x5e, 0x3f, 0xb0, 0x77, 0x33, 0x6e, 0xfc, - 0x0d, 0x3e, 0x03, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x0f, 0xd7, 0x36, 0x32, 0x02, 0x00, 0x00, -} +func (m *PartialObjectMetadataList) Reset() { *m = PartialObjectMetadataList{} } func (m *PartialObjectMetadataList) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.protomessage.pb.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..a782b1d8f05c8 --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.protomessage.pb.go @@ -0,0 +1,24 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1beta1 + +func (*PartialObjectMetadataList) ProtoMessage() {} diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go index f16170a37b2e7..68f261cc14eac 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go @@ -46,6 +46,7 @@ type ConditionStatus = v1.ConditionStatus type IncludeObjectPolicy = v1.IncludeObjectPolicy // TableOptions are used when a Table is requested by the caller. +// +k8s:conversion-gen:explicit-from=net/url.Values // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type TableOptions = v1.TableOptions diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.model_name.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.model_name.go new file mode 100644 index 0000000000000..9c3600119a533 --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.model_name.go @@ -0,0 +1,27 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PartialObjectMetadataList) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.meta.v1beta1.PartialObjectMetadataList" +} diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1/doc.go b/staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1/doc.go index c76c2b994d160..35bdf7c7cfdbe 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1/doc.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1/doc.go @@ -19,6 +19,7 @@ limitations under the License. // +k8s:conversion-gen=k8s.io/apimachinery/pkg/apis/testapigroup // +k8s:openapi-gen=false // +k8s:defaulter-gen=TypeMeta +// +k8s:openapi-model-package=io.k8s.apimachinery.pkg.apis.testapigroup.v1 // +k8s:prerelease-lifecycle-gen=true // +groupName=testapigroup.apimachinery.k8s.io diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.pb.go b/staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.pb.go index a8b7d2643fa3c..b1af782b02d8a 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.pb.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.pb.go @@ -23,283 +23,26 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *Carp) Reset() { *m = Carp{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *CarpCondition) Reset() { *m = CarpCondition{} } -func (m *Carp) Reset() { *m = Carp{} } -func (*Carp) ProtoMessage() {} -func (*Carp) Descriptor() ([]byte, []int) { - return fileDescriptor_83e19b543dd132db, []int{0} -} -func (m *Carp) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Carp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Carp) XXX_Merge(src proto.Message) { - xxx_messageInfo_Carp.Merge(m, src) -} -func (m *Carp) XXX_Size() int { - return m.Size() -} -func (m *Carp) XXX_DiscardUnknown() { - xxx_messageInfo_Carp.DiscardUnknown(m) -} - -var xxx_messageInfo_Carp proto.InternalMessageInfo - -func (m *CarpCondition) Reset() { *m = CarpCondition{} } -func (*CarpCondition) ProtoMessage() {} -func (*CarpCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83e19b543dd132db, []int{1} -} -func (m *CarpCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CarpCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CarpCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_CarpCondition.Merge(m, src) -} -func (m *CarpCondition) XXX_Size() int { - return m.Size() -} -func (m *CarpCondition) XXX_DiscardUnknown() { - xxx_messageInfo_CarpCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_CarpCondition proto.InternalMessageInfo - -func (m *CarpInfo) Reset() { *m = CarpInfo{} } -func (*CarpInfo) ProtoMessage() {} -func (*CarpInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_83e19b543dd132db, []int{2} -} -func (m *CarpInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CarpInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CarpInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_CarpInfo.Merge(m, src) -} -func (m *CarpInfo) XXX_Size() int { - return m.Size() -} -func (m *CarpInfo) XXX_DiscardUnknown() { - xxx_messageInfo_CarpInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_CarpInfo proto.InternalMessageInfo - -func (m *CarpList) Reset() { *m = CarpList{} } -func (*CarpList) ProtoMessage() {} -func (*CarpList) Descriptor() ([]byte, []int) { - return fileDescriptor_83e19b543dd132db, []int{3} -} -func (m *CarpList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CarpList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CarpList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CarpList.Merge(m, src) -} -func (m *CarpList) XXX_Size() int { - return m.Size() -} -func (m *CarpList) XXX_DiscardUnknown() { - xxx_messageInfo_CarpList.DiscardUnknown(m) -} - -var xxx_messageInfo_CarpList proto.InternalMessageInfo - -func (m *CarpSpec) Reset() { *m = CarpSpec{} } -func (*CarpSpec) ProtoMessage() {} -func (*CarpSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83e19b543dd132db, []int{4} -} -func (m *CarpSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CarpSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CarpSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_CarpSpec.Merge(m, src) -} -func (m *CarpSpec) XXX_Size() int { - return m.Size() -} -func (m *CarpSpec) XXX_DiscardUnknown() { - xxx_messageInfo_CarpSpec.DiscardUnknown(m) -} +func (m *CarpInfo) Reset() { *m = CarpInfo{} } -var xxx_messageInfo_CarpSpec proto.InternalMessageInfo +func (m *CarpList) Reset() { *m = CarpList{} } -func (m *CarpStatus) Reset() { *m = CarpStatus{} } -func (*CarpStatus) ProtoMessage() {} -func (*CarpStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83e19b543dd132db, []int{5} -} -func (m *CarpStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CarpStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CarpStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_CarpStatus.Merge(m, src) -} -func (m *CarpStatus) XXX_Size() int { - return m.Size() -} -func (m *CarpStatus) XXX_DiscardUnknown() { - xxx_messageInfo_CarpStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_CarpStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Carp)(nil), "k8s.io.apimachinery.pkg.apis.testapigroup.v1.Carp") - proto.RegisterType((*CarpCondition)(nil), "k8s.io.apimachinery.pkg.apis.testapigroup.v1.CarpCondition") - proto.RegisterType((*CarpInfo)(nil), "k8s.io.apimachinery.pkg.apis.testapigroup.v1.CarpInfo") - proto.RegisterType((*CarpList)(nil), "k8s.io.apimachinery.pkg.apis.testapigroup.v1.CarpList") - proto.RegisterType((*CarpSpec)(nil), "k8s.io.apimachinery.pkg.apis.testapigroup.v1.CarpSpec") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.apimachinery.pkg.apis.testapigroup.v1.CarpSpec.NodeSelectorEntry") - proto.RegisterType((*CarpStatus)(nil), "k8s.io.apimachinery.pkg.apis.testapigroup.v1.CarpStatus") -} - -func init() { - proto.RegisterFile("k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.proto", fileDescriptor_83e19b543dd132db) -} +func (m *CarpSpec) Reset() { *m = CarpSpec{} } -var fileDescriptor_83e19b543dd132db = []byte{ - // 1115 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x41, 0x4f, 0x1b, 0x47, - 0x14, 0x66, 0xb1, 0x0d, 0xf6, 0x80, 0x1b, 0x18, 0x82, 0xba, 0x45, 0x8a, 0x4d, 0x7c, 0x40, 0xb4, - 0xa2, 0xeb, 0x80, 0x9a, 0x88, 0x36, 0x95, 0x2a, 0x16, 0xaa, 0x42, 0x45, 0x88, 0x35, 0x46, 0x4a, - 0xd5, 0xe6, 0x90, 0xf1, 0xee, 0xb0, 0x6c, 0xf1, 0xee, 0xac, 0x66, 0xc6, 0xae, 0x7c, 0xab, 0x7a, - 0xea, 0xb1, 0x3f, 0xa2, 0x7f, 0xa1, 0x3f, 0xa0, 0x37, 0x8e, 0x39, 0xa6, 0x17, 0xab, 0xb8, 0xff, - 0x82, 0x53, 0x35, 0xb3, 0xb3, 0xeb, 0x35, 0x06, 0x27, 0xe6, 0xe6, 0x79, 0xef, 0xfb, 0xbe, 0xf7, - 0xf6, 0xcd, 0x9b, 0xf7, 0x0c, 0xbe, 0xbe, 0xd8, 0xe5, 0x96, 0x4f, 0xeb, 0x38, 0xf2, 0x03, 0xec, - 0x9c, 0xfb, 0x21, 0x61, 0xbd, 0x7a, 0x74, 0xe1, 0x49, 0x03, 0xaf, 0x0b, 0xc2, 0x05, 0x8e, 0x7c, - 0x8f, 0xd1, 0x4e, 0x54, 0xef, 0x6e, 0xd7, 0x3d, 0x12, 0x12, 0x86, 0x05, 0x71, 0xad, 0x88, 0x51, - 0x41, 0xe1, 0x56, 0xcc, 0xb6, 0xb2, 0x6c, 0x2b, 0xba, 0xf0, 0xa4, 0x81, 0x5b, 0x59, 0xb6, 0xd5, - 0xdd, 0x5e, 0xfb, 0xdc, 0xf3, 0xc5, 0x79, 0xa7, 0x65, 0x39, 0x34, 0xa8, 0x7b, 0xd4, 0xa3, 0x75, - 0x25, 0xd2, 0xea, 0x9c, 0xa9, 0x93, 0x3a, 0xa8, 0x5f, 0xb1, 0xf8, 0xda, 0x17, 0x13, 0x53, 0x0b, - 0x88, 0xc0, 0xb7, 0xa4, 0xb4, 0x56, 0xbf, 0x8b, 0xc5, 0x3a, 0xa1, 0xf0, 0x03, 0x32, 0x46, 0x78, - 0xf6, 0x3e, 0x02, 0x77, 0xce, 0x49, 0x80, 0x6f, 0xf2, 0x6a, 0x7f, 0xce, 0x82, 0xfc, 0x3e, 0x66, - 0x11, 0x7c, 0x03, 0x8a, 0x32, 0x19, 0x17, 0x0b, 0x6c, 0x1a, 0xeb, 0xc6, 0xe6, 0xc2, 0xce, 0x13, - 0x6b, 0x62, 0x5d, 0x24, 0xda, 0xea, 0x6e, 0x5b, 0x2f, 0x5b, 0x3f, 0x13, 0x47, 0xbc, 0x20, 0x02, - 0xdb, 0xf0, 0xb2, 0x5f, 0x9d, 0x19, 0xf4, 0xab, 0x60, 0x68, 0x43, 0xa9, 0x2a, 0xfc, 0x01, 0xe4, - 0x79, 0x44, 0x1c, 0x73, 0x56, 0xa9, 0x3f, 0xb3, 0xa6, 0xa9, 0xba, 0x25, 0x73, 0x6c, 0x46, 0xc4, - 0xb1, 0x17, 0x75, 0x8c, 0xbc, 0x3c, 0x21, 0xa5, 0x08, 0xdf, 0x80, 0x39, 0x2e, 0xb0, 0xe8, 0x70, - 0x33, 0xa7, 0xb4, 0x77, 0xef, 0xa1, 0xad, 0xf8, 0xf6, 0x47, 0x5a, 0x7d, 0x2e, 0x3e, 0x23, 0xad, - 0x5b, 0xfb, 0x2b, 0x07, 0xca, 0x12, 0xb6, 0x4f, 0x43, 0xd7, 0x17, 0x3e, 0x0d, 0xe1, 0x53, 0x90, - 0x17, 0xbd, 0x88, 0xa8, 0x5a, 0x95, 0xec, 0xc7, 0x49, 0x56, 0xa7, 0xbd, 0x88, 0x5c, 0xf7, 0xab, - 0xcb, 0x23, 0x60, 0x69, 0x44, 0x0a, 0x0e, 0xbf, 0x4c, 0x53, 0x9d, 0x1d, 0x21, 0xea, 0x80, 0xd7, - 0xfd, 0xea, 0x83, 0x94, 0x36, 0x9a, 0x03, 0xf4, 0x40, 0xb9, 0x8d, 0xb9, 0x68, 0x30, 0xda, 0x22, - 0xa7, 0x7e, 0x40, 0xf4, 0xc7, 0x7e, 0xf6, 0x61, 0xd7, 0x24, 0x19, 0xf6, 0xaa, 0x8e, 0x56, 0x3e, - 0xce, 0x0a, 0xa1, 0x51, 0x5d, 0xd8, 0x05, 0x50, 0x1a, 0x4e, 0x19, 0x0e, 0x79, 0x9c, 0xbf, 0x8c, - 0x96, 0x9f, 0x3a, 0xda, 0x9a, 0x8e, 0x06, 0x8f, 0xc7, 0xd4, 0xd0, 0x2d, 0x11, 0xe0, 0x06, 0x98, - 0x63, 0x04, 0x73, 0x1a, 0x9a, 0x05, 0x55, 0x9b, 0xf4, 0x32, 0x90, 0xb2, 0x22, 0xed, 0x85, 0x9f, - 0x82, 0xf9, 0x80, 0x70, 0x8e, 0x3d, 0x62, 0xce, 0x29, 0xe0, 0x03, 0x0d, 0x9c, 0x7f, 0x11, 0x9b, - 0x51, 0xe2, 0xaf, 0x71, 0x50, 0x94, 0x37, 0x71, 0x14, 0x9e, 0x51, 0xf8, 0x31, 0x30, 0xe2, 0xd6, - 0xce, 0xd9, 0x25, 0x4d, 0x30, 0xf6, 0x90, 0x81, 0xa5, 0xa3, 0xa5, 0xaf, 0x23, 0x75, 0xd8, 0xc8, - 0x68, 0xc1, 0x15, 0x60, 0x38, 0xea, 0xbb, 0x4b, 0x76, 0x41, 0x1a, 0xf7, 0x91, 0xe1, 0xc0, 0x75, - 0x90, 0x57, 0x8f, 0x24, 0xa7, 0xec, 0x69, 0x3b, 0x1e, 0x60, 0x81, 0x91, 0xf2, 0xd4, 0xfe, 0x36, - 0xe2, 0xa8, 0xc7, 0x3e, 0x17, 0xf0, 0xf5, 0xd8, 0xbb, 0xb2, 0x3e, 0xac, 0x84, 0x92, 0xad, 0x5e, - 0xd5, 0x92, 0x0e, 0x51, 0x4c, 0x2c, 0x99, 0x37, 0xf5, 0x0a, 0x14, 0x7c, 0x41, 0x02, 0xd9, 0x4d, - 0xb9, 0xcd, 0x85, 0x9d, 0x9d, 0xe9, 0x1b, 0xdf, 0x2e, 0x6b, 0xf9, 0xc2, 0x91, 0x14, 0x42, 0xb1, - 0x5e, 0xed, 0x9f, 0xf9, 0xf8, 0x1b, 0xe4, 0x2b, 0x83, 0xc7, 0xa0, 0xcc, 0x24, 0x95, 0x89, 0x06, - 0x6d, 0xfb, 0x4e, 0x4f, 0x7f, 0xfb, 0x46, 0xd2, 0x4d, 0x28, 0xeb, 0xbc, 0xbe, 0x69, 0x40, 0xa3, - 0x64, 0xe8, 0x81, 0x47, 0x82, 0xb0, 0xc0, 0x0f, 0xb1, 0xbc, 0xf9, 0xef, 0x18, 0x76, 0x48, 0x83, - 0x30, 0x9f, 0xba, 0x4d, 0xe2, 0xd0, 0xd0, 0xe5, 0xaa, 0xe2, 0x39, 0xfb, 0xf1, 0xa0, 0x5f, 0x7d, - 0x74, 0x3a, 0x09, 0x88, 0x26, 0xeb, 0xc0, 0x97, 0x60, 0x15, 0x3b, 0xc2, 0xef, 0x92, 0x03, 0x82, - 0xdd, 0xb6, 0x1f, 0x92, 0x24, 0x40, 0x41, 0x05, 0xf8, 0x64, 0xd0, 0xaf, 0xae, 0xee, 0xdd, 0x06, - 0x40, 0xb7, 0xf3, 0xe0, 0x6f, 0x06, 0x58, 0x0c, 0xa9, 0x4b, 0x9a, 0xa4, 0x4d, 0x1c, 0x41, 0x99, - 0x39, 0xaf, 0xaa, 0x7e, 0x78, 0xbf, 0x51, 0x66, 0x9d, 0x64, 0xa4, 0xbe, 0x0d, 0x05, 0xeb, 0xd9, - 0x0f, 0x75, 0x45, 0x17, 0xb3, 0x2e, 0x34, 0x12, 0x13, 0x7e, 0x0f, 0x20, 0x27, 0xac, 0xeb, 0x3b, - 0x64, 0xcf, 0x71, 0x68, 0x27, 0x14, 0x27, 0x38, 0x20, 0x66, 0x51, 0xdd, 0x48, 0xfa, 0xe2, 0x9a, - 0x63, 0x08, 0x74, 0x0b, 0x0b, 0xbe, 0x06, 0xa6, 0x4b, 0x22, 0x46, 0x1c, 0xb9, 0x11, 0x46, 0x39, - 0x66, 0x49, 0x29, 0xae, 0x6b, 0x45, 0xf3, 0xe0, 0x0e, 0x1c, 0xba, 0x53, 0x01, 0x6e, 0x81, 0xa2, - 0xcc, 0x5c, 0xe5, 0x07, 0x94, 0x5a, 0xda, 0xca, 0x27, 0xda, 0x8e, 0x52, 0x04, 0x7c, 0x0a, 0x16, - 0xce, 0x29, 0x17, 0x27, 0x44, 0xfc, 0x42, 0xd9, 0x85, 0xb9, 0xb0, 0x6e, 0x6c, 0x16, 0xed, 0x15, - 0x4d, 0x58, 0x38, 0x1c, 0xba, 0x50, 0x16, 0x27, 0x87, 0x81, 0x3c, 0x36, 0x8e, 0x0e, 0xcc, 0x45, - 0x45, 0x49, 0x87, 0xc1, 0x61, 0x6c, 0x46, 0x89, 0x3f, 0x81, 0x1e, 0x35, 0xf6, 0xcd, 0xf2, 0x38, - 0xf4, 0xa8, 0xb1, 0x8f, 0x12, 0xbf, 0x4c, 0x5d, 0xfe, 0x0c, 0x65, 0xea, 0x4b, 0xa3, 0xa9, 0x1f, - 0x6a, 0x3b, 0x4a, 0x11, 0xb0, 0x0e, 0x4a, 0xbc, 0xd3, 0x72, 0x69, 0x80, 0xfd, 0xd0, 0x5c, 0x56, - 0xf0, 0x65, 0x0d, 0x2f, 0x35, 0x13, 0x07, 0x1a, 0x62, 0xe0, 0x73, 0x50, 0x96, 0xfb, 0xd8, 0xed, - 0xb4, 0x09, 0x53, 0xe5, 0x59, 0x51, 0xa4, 0x74, 0x3c, 0x37, 0xb3, 0x4e, 0x34, 0x8a, 0x5d, 0xfb, - 0x06, 0x2c, 0x8f, 0x75, 0x0e, 0x5c, 0x02, 0xb9, 0x0b, 0xd2, 0x8b, 0xb7, 0x11, 0x92, 0x3f, 0xe1, - 0x43, 0x50, 0xe8, 0xe2, 0x76, 0x87, 0xc4, 0x93, 0x0d, 0xc5, 0x87, 0xaf, 0x66, 0x77, 0x8d, 0xda, - 0xef, 0x79, 0x00, 0x86, 0x3b, 0x0f, 0x3e, 0x01, 0x85, 0xe8, 0x1c, 0xf3, 0x64, 0x95, 0x25, 0x3d, - 0x54, 0x68, 0x48, 0xe3, 0x75, 0xbf, 0x5a, 0x92, 0x58, 0x75, 0x40, 0x31, 0x10, 0x52, 0x00, 0x9c, - 0x64, 0x49, 0x25, 0xa3, 0xe7, 0xf9, 0xf4, 0x8f, 0x20, 0x5d, 0x74, 0xc3, 0x3f, 0x0e, 0xa9, 0x89, - 0xa3, 0x4c, 0x88, 0xec, 0xc4, 0xcf, 0x4d, 0x9e, 0xf8, 0x99, 0x25, 0x92, 0x9f, 0xb8, 0x44, 0x36, - 0xc0, 0x5c, 0x7c, 0xd9, 0x37, 0x97, 0x4d, 0xdc, 0x0b, 0x48, 0x7b, 0x25, 0xce, 0x91, 0x1b, 0xa4, - 0xa1, 0x77, 0x4d, 0x8a, 0x53, 0x7b, 0xa5, 0x81, 0xb4, 0x17, 0xbe, 0x02, 0x25, 0x35, 0xe4, 0xd4, - 0xae, 0x9c, 0x9f, 0x7a, 0x57, 0x96, 0x55, 0xaf, 0x24, 0x02, 0x68, 0xa8, 0x05, 0x7f, 0x02, 0x05, - 0x3f, 0x3c, 0xa3, 0xdc, 0x2c, 0xaa, 0x3a, 0xdf, 0xe3, 0x7f, 0x93, 0xdc, 0x7e, 0x99, 0x31, 0x2f, - 0xc5, 0x50, 0xac, 0x69, 0xa3, 0xcb, 0xab, 0xca, 0xcc, 0xdb, 0xab, 0xca, 0xcc, 0xbb, 0xab, 0xca, - 0xcc, 0xaf, 0x83, 0x8a, 0x71, 0x39, 0xa8, 0x18, 0x6f, 0x07, 0x15, 0xe3, 0xdd, 0xa0, 0x62, 0xfc, - 0x3b, 0xa8, 0x18, 0x7f, 0xfc, 0x57, 0x99, 0xf9, 0x71, 0x6b, 0x9a, 0xbf, 0xd7, 0xff, 0x07, 0x00, - 0x00, 0xff, 0xff, 0xa8, 0x1e, 0x19, 0x20, 0x8d, 0x0b, 0x00, 0x00, -} +func (m *CarpStatus) Reset() { *m = CarpStatus{} } func (m *Carp) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -592,7 +335,7 @@ func (m *CarpSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.NodeSelector { keysForNodeSelector = append(keysForNodeSelector, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector) + sort.Strings(keysForNodeSelector) for iNdEx := len(keysForNodeSelector) - 1; iNdEx >= 0; iNdEx-- { v := m.NodeSelector[string(keysForNodeSelector[iNdEx])] baseI := i @@ -944,7 +687,7 @@ func (this *CarpSpec) String() string { for k := range this.NodeSelector { keysForNodeSelector = append(keysForNodeSelector, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector) + sort.Strings(keysForNodeSelector) mapStringForNodeSelector := "map[string]string{" for _, k := range keysForNodeSelector { mapStringForNodeSelector += fmt.Sprintf("%v: %v,", k, this.NodeSelector[k]) diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.protomessage.pb.go b/staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..2c3fcb5e9555d --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.protomessage.pb.go @@ -0,0 +1,34 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*Carp) ProtoMessage() {} + +func (*CarpCondition) ProtoMessage() {} + +func (*CarpInfo) ProtoMessage() {} + +func (*CarpList) ProtoMessage() {} + +func (*CarpSpec) ProtoMessage() {} + +func (*CarpStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1/zz_generated.model_name.go b/staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..38ee899cb9326 --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1/zz_generated.model_name.go @@ -0,0 +1,52 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Carp) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.testapigroup.v1.Carp" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CarpCondition) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.testapigroup.v1.CarpCondition" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CarpInfo) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.testapigroup.v1.CarpInfo" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CarpList) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.testapigroup.v1.CarpList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CarpSpec) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.testapigroup.v1.CarpSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in CarpStatus) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.apis.testapigroup.v1.CarpStatus" +} diff --git a/staging/src/k8s.io/apimachinery/pkg/labels/selector.go b/staging/src/k8s.io/apimachinery/pkg/labels/selector.go index 067bcac0a0db7..031dcd21be465 100644 --- a/staging/src/k8s.io/apimachinery/pkg/labels/selector.go +++ b/staging/src/k8s.io/apimachinery/pkg/labels/selector.go @@ -25,6 +25,7 @@ import ( "k8s.io/klog/v2" + "k8s.io/apimachinery/pkg/api/validate/content" "k8s.io/apimachinery/pkg/selection" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation" @@ -848,7 +849,6 @@ func (p *Parser) parseIdentifiersList() (sets.String, error) { return s, nil } if tok2 == CommaToken { - p.consume(Values) s.Insert("") // to handle ,, Double "" removed by StringSet } default: // it can be operator @@ -927,7 +927,7 @@ func parse(selector string, path *field.Path) (internalSelector, error) { } func validateLabelKey(k string, path *field.Path) *field.Error { - if errs := validation.IsQualifiedName(k); len(errs) != 0 { + if errs := content.IsLabelKey(k); len(errs) != 0 { return field.Invalid(path, k, strings.Join(errs, "; ")) } return nil diff --git a/staging/src/k8s.io/apimachinery/pkg/labels/selector_test.go b/staging/src/k8s.io/apimachinery/pkg/labels/selector_test.go index 91dfd51d56ca5..abe066154d17f 100644 --- a/staging/src/k8s.io/apimachinery/pkg/labels/selector_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/labels/selector_test.go @@ -636,9 +636,24 @@ func TestSetSelectorParser(t *testing.T) { {"x in (abc,)", internalSelector{ getRequirement("x", selection.In, sets.NewString("abc", ""), t), }, true, true}, + {"x in (abc,abc)", internalSelector{ + getRequirement("x", selection.In, sets.NewString("abc"), t), + }, true, true}, {"x in ()", internalSelector{ getRequirement("x", selection.In, sets.NewString(""), t), }, true, true}, + {"x in (a,,)", internalSelector{ + getRequirement("x", selection.In, sets.NewString("a", ""), t), + }, true, true}, + {"x in (a,,,)", internalSelector{ + getRequirement("x", selection.In, sets.NewString("a", ""), t), + }, true, true}, + {"x in (a,,,,,,)", internalSelector{ + getRequirement("x", selection.In, sets.NewString("a", ""), t), + }, true, true}, + {"x in (a,,a,,a,,a,,)", internalSelector{ + getRequirement("x", selection.In, sets.NewString("a", ""), t), + }, true, true}, {"x notin (abc,,def),bar,z in (),w", internalSelector{ getRequirement("bar", selection.Exists, nil, t), getRequirement("w", selection.Exists, nil, t), diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/doc.go b/staging/src/k8s.io/apimachinery/pkg/runtime/doc.go index b54429bd89c14..fd012dbc7973a 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/doc.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/doc.go @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// +k8s:openapi-model-package=io.k8s.apimachinery.pkg.runtime + // Package runtime includes helper functions for working with API objects // that follow the kubernetes API object conventions, which are: // diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/generated.pb.go b/staging/src/k8s.io/apimachinery/pkg/runtime/generated.pb.go index 2e40e140aec4b..f5e78d4b36261 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/generated.pb.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/generated.pb.go @@ -23,145 +23,16 @@ import ( fmt "fmt" io "io" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" - - proto "github.com/gogo/protobuf/proto" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *RawExtension) Reset() { *m = RawExtension{} } -func (*RawExtension) ProtoMessage() {} -func (*RawExtension) Descriptor() ([]byte, []int) { - return fileDescriptor_2e0e4b920403a48c, []int{0} -} -func (m *RawExtension) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RawExtension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RawExtension) XXX_Merge(src proto.Message) { - xxx_messageInfo_RawExtension.Merge(m, src) -} -func (m *RawExtension) XXX_Size() int { - return m.Size() -} -func (m *RawExtension) XXX_DiscardUnknown() { - xxx_messageInfo_RawExtension.DiscardUnknown(m) -} +func (m *RawExtension) Reset() { *m = RawExtension{} } -var xxx_messageInfo_RawExtension proto.InternalMessageInfo +func (m *TypeMeta) Reset() { *m = TypeMeta{} } -func (m *TypeMeta) Reset() { *m = TypeMeta{} } -func (*TypeMeta) ProtoMessage() {} -func (*TypeMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_2e0e4b920403a48c, []int{1} -} -func (m *TypeMeta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TypeMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TypeMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_TypeMeta.Merge(m, src) -} -func (m *TypeMeta) XXX_Size() int { - return m.Size() -} -func (m *TypeMeta) XXX_DiscardUnknown() { - xxx_messageInfo_TypeMeta.DiscardUnknown(m) -} - -var xxx_messageInfo_TypeMeta proto.InternalMessageInfo - -func (m *Unknown) Reset() { *m = Unknown{} } -func (*Unknown) ProtoMessage() {} -func (*Unknown) Descriptor() ([]byte, []int) { - return fileDescriptor_2e0e4b920403a48c, []int{2} -} -func (m *Unknown) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Unknown) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Unknown) XXX_Merge(src proto.Message) { - xxx_messageInfo_Unknown.Merge(m, src) -} -func (m *Unknown) XXX_Size() int { - return m.Size() -} -func (m *Unknown) XXX_DiscardUnknown() { - xxx_messageInfo_Unknown.DiscardUnknown(m) -} - -var xxx_messageInfo_Unknown proto.InternalMessageInfo - -func init() { - proto.RegisterType((*RawExtension)(nil), "k8s.io.apimachinery.pkg.runtime.RawExtension") - proto.RegisterType((*TypeMeta)(nil), "k8s.io.apimachinery.pkg.runtime.TypeMeta") - proto.RegisterType((*Unknown)(nil), "k8s.io.apimachinery.pkg.runtime.Unknown") -} - -func init() { - proto.RegisterFile("k8s.io/apimachinery/pkg/runtime/generated.proto", fileDescriptor_2e0e4b920403a48c) -} - -var fileDescriptor_2e0e4b920403a48c = []byte{ - // 365 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x4f, 0x6b, 0x22, 0x31, - 0x18, 0xc6, 0x27, 0x2a, 0xe8, 0x46, 0xc1, 0x25, 0x7b, 0xd8, 0xd9, 0x3d, 0x64, 0xc4, 0xd3, 0x7a, - 0xd8, 0x0c, 0x08, 0x85, 0x5e, 0x1d, 0xf1, 0x50, 0x4a, 0xa1, 0x84, 0xfe, 0x81, 0x9e, 0x1a, 0x67, - 0xd2, 0x31, 0x0c, 0x26, 0xc3, 0x18, 0x99, 0x7a, 0xeb, 0x47, 0xe8, 0xc7, 0xf2, 0xe8, 0xd1, 0x93, - 0xd4, 0xe9, 0x87, 0xe8, 0xb5, 0x18, 0xa3, 0xb5, 0xed, 0xc1, 0x5b, 0xde, 0xf7, 0x79, 0x7e, 0xcf, - 0xfb, 0xbe, 0x10, 0xe8, 0x27, 0xa7, 0x13, 0x22, 0x94, 0xcf, 0x52, 0x31, 0x66, 0xe1, 0x48, 0x48, - 0x9e, 0xcd, 0xfc, 0x34, 0x89, 0xfd, 0x6c, 0x2a, 0xb5, 0x18, 0x73, 0x3f, 0xe6, 0x92, 0x67, 0x4c, - 0xf3, 0x88, 0xa4, 0x99, 0xd2, 0x0a, 0x79, 0x5b, 0x80, 0x1c, 0x02, 0x24, 0x4d, 0x62, 0x62, 0x81, - 0xbf, 0xff, 0x63, 0xa1, 0x47, 0xd3, 0x21, 0x09, 0xd5, 0xd8, 0x8f, 0x55, 0xac, 0x7c, 0xc3, 0x0d, - 0xa7, 0x0f, 0xa6, 0x32, 0x85, 0x79, 0x6d, 0xf3, 0xda, 0x1d, 0xd8, 0xa0, 0x2c, 0x1f, 0x3c, 0x6a, - 0x2e, 0x27, 0x42, 0x49, 0xf4, 0x07, 0x96, 0x33, 0x96, 0xbb, 0xa0, 0x05, 0xfe, 0x35, 0x82, 0x6a, - 0xb1, 0xf2, 0xca, 0x94, 0xe5, 0x74, 0xd3, 0x6b, 0xdf, 0xc3, 0xda, 0xd5, 0x2c, 0xe5, 0x17, 0x5c, - 0x33, 0xd4, 0x85, 0x90, 0xa5, 0xe2, 0x86, 0x67, 0x1b, 0xc8, 0xb8, 0x7f, 0x04, 0x68, 0xbe, 0xf2, - 0x9c, 0x62, 0xe5, 0xc1, 0xde, 0xe5, 0x99, 0x55, 0xe8, 0x81, 0x0b, 0xb5, 0x60, 0x25, 0x11, 0x32, - 0x72, 0x4b, 0xc6, 0xdd, 0xb0, 0xee, 0xca, 0xb9, 0x90, 0x11, 0x35, 0x4a, 0xfb, 0x0d, 0xc0, 0xea, - 0xb5, 0x4c, 0xa4, 0xca, 0x25, 0xba, 0x85, 0x35, 0x6d, 0xa7, 0x99, 0xfc, 0x7a, 0xb7, 0x43, 0x8e, - 0xdc, 0x4e, 0x76, 0xeb, 0x05, 0x3f, 0x6d, 0xf8, 0x7e, 0x61, 0xba, 0x0f, 0xdb, 0x5d, 0x58, 0xfa, - 0x7e, 0x21, 0xea, 0xc1, 0x66, 0xa8, 0xa4, 0xe6, 0x52, 0x0f, 0x64, 0xa8, 0x22, 0x21, 0x63, 0xb7, - 0x6c, 0x96, 0xfd, 0x6d, 0xf3, 0x9a, 0xfd, 0xcf, 0x32, 0xfd, 0xea, 0x47, 0x27, 0xb0, 0x6e, 0x5b, - 0x9b, 0xd1, 0x6e, 0xc5, 0xe0, 0xbf, 0x2c, 0x5e, 0xef, 0x7f, 0x48, 0xf4, 0xd0, 0x17, 0x0c, 0xe6, - 0x6b, 0xec, 0x2c, 0xd6, 0xd8, 0x59, 0xae, 0xb1, 0xf3, 0x54, 0x60, 0x30, 0x2f, 0x30, 0x58, 0x14, - 0x18, 0x2c, 0x0b, 0x0c, 0x5e, 0x0a, 0x0c, 0x9e, 0x5f, 0xb1, 0x73, 0xe7, 0x1d, 0xf9, 0x2d, 0xef, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x9b, 0x09, 0xb3, 0x4f, 0x02, 0x00, 0x00, -} +func (m *Unknown) Reset() { *m = Unknown{} } func (m *RawExtension) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/generated.protomessage.pb.go b/staging/src/k8s.io/apimachinery/pkg/runtime/generated.protomessage.pb.go new file mode 100644 index 0000000000000..1716853ff17cb --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/generated.protomessage.pb.go @@ -0,0 +1,28 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package runtime + +func (*RawExtension) ProtoMessage() {} + +func (*TypeMeta) ProtoMessage() {} + +func (*Unknown) ProtoMessage() {} diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go b/staging/src/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go index 7a26d2798ed7a..ed57e08afe92a 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go @@ -18,41 +18,3 @@ limitations under the License. // source: k8s.io/apimachinery/pkg/runtime/schema/generated.proto package schema - -import ( - fmt "fmt" - - math "math" - - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func init() { - proto.RegisterFile("k8s.io/apimachinery/pkg/runtime/schema/generated.proto", fileDescriptor_25f8f0eed21c6089) -} - -var fileDescriptor_25f8f0eed21c6089 = []byte{ - // 170 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0xce, 0xa1, 0x0e, 0xc2, 0x30, - 0x10, 0xc6, 0xf1, 0xd6, 0x22, 0x91, 0x88, 0x93, 0x73, 0xdc, 0x39, 0x82, 0x46, 0xf3, 0x04, 0xb8, - 0x6e, 0x94, 0xae, 0x59, 0xba, 0x6b, 0xba, 0x4e, 0xe0, 0x78, 0x04, 0x1e, 0x6b, 0x72, 0x72, 0x92, - 0x95, 0x17, 0x21, 0x69, 0x11, 0x48, 0xdc, 0xfd, 0xc5, 0xef, 0xf2, 0x6d, 0x0e, 0xdd, 0x71, 0x40, - 0xcb, 0xa4, 0xbc, 0x75, 0xaa, 0x69, 0x6d, 0xaf, 0xc3, 0x9d, 0x7c, 0x67, 0x28, 0x8c, 0x7d, 0xb4, - 0x4e, 0xd3, 0xd0, 0xb4, 0xda, 0x29, 0x32, 0xba, 0xd7, 0x41, 0x45, 0x7d, 0x45, 0x1f, 0x38, 0xf2, - 0xb6, 0x2a, 0x0e, 0x7f, 0x1d, 0xfa, 0xce, 0xe0, 0xd7, 0x61, 0x71, 0xbb, 0xbd, 0xb1, 0xb1, 0x1d, - 0x6b, 0x6c, 0xd8, 0x91, 0x61, 0xc3, 0x94, 0x79, 0x3d, 0xde, 0x72, 0xe5, 0xc8, 0x57, 0x79, 0x7b, - 0x3a, 0x4f, 0x2b, 0x88, 0x79, 0x05, 0xb1, 0xac, 0x20, 0x1e, 0x09, 0xe4, 0x94, 0x40, 0xce, 0x09, - 0xe4, 0x92, 0x40, 0xbe, 0x12, 0xc8, 0xe7, 0x1b, 0xc4, 0xa5, 0xfa, 0x6f, 0xf4, 0x27, 0x00, 0x00, - 0xff, 0xff, 0x97, 0xb8, 0x4d, 0x1f, 0xdd, 0x00, 0x00, 0x00, -} diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/schema/generated.protomessage.pb.go b/staging/src/k8s.io/apimachinery/pkg/runtime/schema/generated.protomessage.pb.go new file mode 100644 index 0000000000000..047437377fb33 --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/schema/generated.protomessage.pb.go @@ -0,0 +1,22 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package schema diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/scheme.go b/staging/src/k8s.io/apimachinery/pkg/runtime/scheme.go index b0e22c5e30c0d..e2fbeabdd0dd7 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/scheme.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/scheme.go @@ -29,6 +29,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/kube-openapi/pkg/util" ) // Scheme defines methods for serializing and deserializing API objects, a type @@ -752,6 +753,9 @@ var internalPackages = []string{"k8s.io/apimachinery/pkg/runtime/scheme.go"} // The OpenAPI definition name is the canonical name of the type, with the group and version removed. // For example, the OpenAPI definition name of Pod is `io.k8s.api.core.v1.Pod`. // +// This respects the util.OpenAPIModelNamer interface and will return the name returned by +// OpenAPIModelName() if it is defined on the type. +// // A known type that is registered as an unstructured.Unstructured type is treated as a custom resource and // which has an OpenAPI definition name of the form `.`. // For example, the OpenAPI definition name of `group: stable.example.com, version: v1, kind: Pod` is @@ -764,6 +768,12 @@ func (s *Scheme) ToOpenAPIDefinitionName(groupVersionKind schema.GroupVersionKin if err != nil { return "", err } + + // Use a namer if provided + if namer, ok := example.(util.OpenAPIModelNamer); ok { + return namer.OpenAPIModelName(), nil + } + if _, ok := example.(Unstructured); ok { if groupVersionKind.Group == "" || groupVersionKind.Kind == "" { return "", fmt.Errorf("unable to convert GroupVersionKind with empty fields to unstructured type to an OpenAPI definition name: %v", groupVersionKind) diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/collections.go b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/collections.go index 754a80820b06c..afac03e9da4e6 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/collections.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/collections.go @@ -21,8 +21,6 @@ import ( "io" "math/bits" - "github.com/gogo/protobuf/proto" - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" @@ -98,6 +96,10 @@ type streamingListData struct { items []runtime.Object } +type sizer interface { + Size() int +} + // listSize return size of ListMeta and items to be later used for preallocations. // listMetaSize and itemSizes do not include header bytes (field identifier, size). func listSize(listMeta metav1.ListMeta, items []runtime.Object) (totalSize, listMetaSize int, itemSizes []int, err error) { @@ -107,7 +109,7 @@ func listSize(listMeta metav1.ListMeta, items []runtime.Object) (totalSize, list // Items itemSizes = make([]int, len(items)) for i, item := range items { - sizer, ok := item.(proto.Sizer) + sizer, ok := item.(sizer) if !ok { return totalSize, listMetaSize, nil, errItemsSizer } diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/collections_test.go b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/collections_test.go index c48d416b5dc53..2ff5b5ca38718 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/collections_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/collections_test.go @@ -23,7 +23,6 @@ import ( "os/exec" "testing" - "github.com/gogo/protobuf/proto" "github.com/google/go-cmp/cmp" "sigs.k8s.io/randfill" @@ -313,7 +312,6 @@ type countingSizer struct { count int } -var _ proto.Sizer = (*countingSizer)(nil) var _ runtime.ProtobufMarshaller = (*countingSizer)(nil) func (s *countingSizer) MarshalTo(data []byte) (int, error) { diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go index c66c49ac4c2d2..67a2d124745fd 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go @@ -23,8 +23,6 @@ import ( "net/http" "reflect" - "github.com/gogo/protobuf/proto" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -148,11 +146,13 @@ func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, i types, _, err := s.typer.ObjectKinds(into) switch { case runtime.IsNotRegisteredError(err): - pb, ok := into.(proto.Message) + unmarshaler, ok := into.(unmarshaler) if !ok { return nil, &actual, errNotMarshalable{reflect.TypeOf(into)} } - if err := proto.Unmarshal(unk.Raw, pb); err != nil { + // top-level unmarshal resets before delegating unmarshaling to the object + unmarshaler.Reset() + if err := unmarshaler.Unmarshal(unk.Raw); err != nil { return nil, &actual, err } return into, &actual, nil @@ -251,7 +251,7 @@ func (s *Serializer) doEncode(obj runtime.Object, w io.Writer, memAlloc runtime. _, err = w.Write(data[:prefixSize+uint64(i)]) return err - case proto.Marshaler: + case unbufferedMarshaller: // this path performs extra allocations data, err := t.Marshal() if err != nil { @@ -306,16 +306,27 @@ func copyKindDefaults(dst, src *schema.GroupVersionKind) { // bufferedMarshaller describes a more efficient marshalling interface that can avoid allocating multiple // byte buffers by pre-calculating the size of the final buffer needed. type bufferedMarshaller interface { - proto.Sizer runtime.ProtobufMarshaller } // Like bufferedMarshaller, but is able to marshal backwards, which is more efficient since it doesn't call Size() as frequently. type bufferedReverseMarshaller interface { - proto.Sizer runtime.ProtobufReverseMarshaller } +type unbufferedMarshaller interface { + Marshal() ([]byte, error) +} + +// unmarshaler is the subset of gogo Message and Unmarshaler used by unmarshal +type unmarshaler interface { + // Reset() is called on the top-level message before unmarshaling, + // and clears all existing data from the message instance. + Reset() + // Unmarshal decodes from the start of the data into the message. + Unmarshal([]byte) error +} + // estimateUnknownSize returns the expected bytes consumed by a given runtime.Unknown // object with a nil RawJSON struct and the expected size of the provided buffer. The // returned size will not be correct if RawJSOn is set on unk. @@ -381,11 +392,13 @@ func (s *RawSerializer) Decode(originalData []byte, gvk *schema.GroupVersionKind types, _, err := s.typer.ObjectKinds(into) switch { case runtime.IsNotRegisteredError(err): - pb, ok := into.(proto.Message) + unmarshaler, ok := into.(unmarshaler) if !ok { return nil, actual, errNotMarshalable{reflect.TypeOf(into)} } - if err := proto.Unmarshal(data, pb); err != nil { + // top-level unmarshal resets before delegating unmarshaling to the object + unmarshaler.Reset() + if err := unmarshaler.Unmarshal(data); err != nil { return nil, actual, err } return into, actual, nil @@ -419,11 +432,13 @@ func unmarshalToObject(typer runtime.ObjectTyper, creater runtime.ObjectCreater, return nil, actual, err } - pb, ok := obj.(proto.Message) + unmarshaler, ok := obj.(unmarshaler) if !ok { return nil, actual, errNotMarshalable{reflect.TypeOf(obj)} } - if err := proto.Unmarshal(data, pb); err != nil { + // top-level unmarshal resets before delegating unmarshaling to the object + unmarshaler.Reset() + if err := unmarshaler.Unmarshal(data); err != nil { return nil, actual, err } if actual != nil { @@ -519,7 +534,7 @@ func doEncode(obj any, w io.Writer, precomputedObjSize *int, memAlloc runtime.Me } return w.Write(data[:n]) - case proto.Marshaler: + case unbufferedMarshaller: // this path performs extra allocations data, err := t.Marshal() if err != nil { diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/types_proto.go b/staging/src/k8s.io/apimachinery/pkg/runtime/types_proto.go index 27a2064c4163e..70c4ea8c56d1c 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/types_proto.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/types_proto.go @@ -21,11 +21,21 @@ import ( "io" ) +// ProtobufReverseMarshaller can precompute size, and marshals to the start of the provided data buffer. type ProtobufMarshaller interface { + // Size returns the number of bytes a call to MarshalTo would consume. + Size() int + // MarshalTo marshals to the start of the data buffer, which must be at least as big as Size(), + // and returns the number of bytes written, which must be identical to the return value of Size(). MarshalTo(data []byte) (int, error) } +// ProtobufReverseMarshaller can precompute size, and marshals to the end of the provided data buffer. type ProtobufReverseMarshaller interface { + // Size returns the number of bytes a call to MarshalToSizedBuffer would consume. + Size() int + // MarshalToSizedBuffer marshals to the end of the data buffer, which must be at least as big as Size(), + // and returns the number of bytes written, which must be identical to the return value of Size(). MarshalToSizedBuffer(data []byte) (int, error) } diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/types_proto_test.go b/staging/src/k8s.io/apimachinery/pkg/runtime/types_proto_test.go index 39fb709426dcc..50535f041769c 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/types_proto_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/types_proto_test.go @@ -101,6 +101,10 @@ func TestNestedMarshalToWriter(t *testing.T) { type copyMarshaler []byte +func (c copyMarshaler) Size() int { + return len(c) +} + func (c copyMarshaler) MarshalTo(dest []byte) (int, error) { n := copy(dest, []byte(c)) return n, nil diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/zz_generated.model_name.go b/staging/src/k8s.io/apimachinery/pkg/runtime/zz_generated.model_name.go new file mode 100644 index 0000000000000..cf3ec4dcebba6 --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/zz_generated.model_name.go @@ -0,0 +1,92 @@ +//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 openapi-gen. DO NOT EDIT. + +package runtime + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Allocator) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.runtime.Allocator" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NegotiateError) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.runtime.NegotiateError" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NoopDecoder) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.runtime.NoopDecoder" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NoopEncoder) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.runtime.NoopEncoder" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Pair) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.runtime.Pair" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in RawExtension) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.runtime.RawExtension" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Scheme) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.runtime.Scheme" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SerializerInfo) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.runtime.SerializerInfo" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in SimpleAllocator) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.runtime.SimpleAllocator" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in StreamSerializerInfo) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.runtime.StreamSerializerInfo" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in TypeMeta) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.runtime.TypeMeta" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Unknown) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.runtime.Unknown" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in WithVersionEncoder) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.runtime.WithVersionEncoder" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in WithoutVersionDecoder) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.runtime.WithoutVersionDecoder" +} diff --git a/staging/src/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go b/staging/src/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go index 8054b98676b82..a7c8d897dc81d 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go @@ -160,19 +160,31 @@ func commaSeparatedHeaderValues(header []string) []string { // Handshake performs a subprotocol negotiation. If the client did request a // subprotocol, Handshake will select the first common value found in -// serverProtocols. If a match is found, Handshake adds a response header -// indicating the chosen subprotocol. If no match is found, HTTP forbidden is -// returned, along with a response header containing the list of protocols the -// server can accept. +// serverProtocols, otherwise it will return an error and write an HTTP BadRequest to the response. +// If a match is found, Handshake adds a response header indicating the chosen subprotocol. +// If no match is found, HTTP forbidden is returned, along with a response header containing +// the list of protocols the server can accept. func Handshake(req *http.Request, w http.ResponseWriter, serverProtocols []string) (string, error) { - clientProtocols := commaSeparatedHeaderValues(req.Header[http.CanonicalHeaderKey(HeaderProtocolVersion)]) - if len(clientProtocols) == 0 { - return "", fmt.Errorf("unable to upgrade: %s is required", HeaderProtocolVersion) - } - if len(serverProtocols) == 0 { panic(fmt.Errorf("unable to upgrade: serverProtocols is required")) } + values, ok := req.Header[http.CanonicalHeaderKey(HeaderProtocolVersion)] + if !ok { + err := fmt.Errorf("unable to upgrade: header %s does not exist in request with %d headers", HeaderProtocolVersion, len(req.Header)) + http.Error(w, err.Error(), http.StatusBadRequest) + return "", err + } + if len(values) == 0 { + err := fmt.Errorf("unable to upgrade: header %s is empty", HeaderProtocolVersion) + http.Error(w, err.Error(), http.StatusBadRequest) + return "", err + } + clientProtocols := commaSeparatedHeaderValues(values) + if len(clientProtocols) == 0 { + err := fmt.Errorf("unable to upgrade: header %s contains %s, but no valid protocols", HeaderProtocolVersion, values) + http.Error(w, err.Error(), http.StatusBadRequest) + return "", err + } negotiatedProtocol := negotiateProtocol(clientProtocols, serverProtocols) if len(negotiatedProtocol) == 0 { diff --git a/staging/src/k8s.io/apimachinery/pkg/util/httpstream/httpstream_test.go b/staging/src/k8s.io/apimachinery/pkg/util/httpstream/httpstream_test.go index f81e12b9cda5c..04cf200d57a31 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/httpstream/httpstream_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/httpstream/httpstream_test.go @@ -49,22 +49,39 @@ func (r *responseWriter) Write([]byte) (int, error) { func TestHandshake(t *testing.T) { tests := map[string]struct { - clientProtocols []string - serverProtocols []string - expectedProtocol string - expectError bool + clientProtocols []string + serverProtocols []string + expectedProtocol string + expectError bool + expectedStatusCode int }{ + "no protocol": { + clientProtocols: []string{}, + serverProtocols: []string{"a", "b"}, + expectedProtocol: "", + expectError: true, + expectedStatusCode: http.StatusBadRequest, + }, + "empty client protocol header": { + clientProtocols: []string{",, "}, + serverProtocols: []string{"a", "b"}, + expectedProtocol: "", + expectError: true, + expectedStatusCode: http.StatusBadRequest, + }, "no common protocol": { - clientProtocols: []string{"c"}, - serverProtocols: []string{"a", "b"}, - expectedProtocol: "", - expectError: true, + clientProtocols: []string{"c"}, + serverProtocols: []string{"a", "b"}, + expectedProtocol: "", + expectError: true, + expectedStatusCode: http.StatusForbidden, }, "no common protocol with comma separated list": { - clientProtocols: []string{"c, d"}, - serverProtocols: []string{"a", "b"}, - expectedProtocol: "", - expectError: true, + clientProtocols: []string{"c, d"}, + serverProtocols: []string{"a", "b"}, + expectedProtocol: "", + expectError: true, + expectedStatusCode: http.StatusForbidden, }, "common protocol": { clientProtocols: []string{"b"}, @@ -79,57 +96,72 @@ func TestHandshake(t *testing.T) { } for name, test := range tests { - req, err := http.NewRequest(http.MethodGet, "http://www.example.com/", nil) - if err != nil { - t.Fatalf("%s: error creating request: %v", name, err) - } + t.Run(name, func(t *testing.T) { + req, err := http.NewRequest(http.MethodGet, "http://www.example.com/", nil) + if err != nil { + t.Fatalf("%s: error creating request: %v", name, err) + } - for _, p := range test.clientProtocols { - req.Header.Add(HeaderProtocolVersion, p) - } + for _, p := range test.clientProtocols { + req.Header.Add(HeaderProtocolVersion, p) + } - w := newResponseWriter() - negotiated, err := Handshake(req, w, test.serverProtocols) + w := newResponseWriter() + negotiated, err := Handshake(req, w, test.serverProtocols) - // verify negotiated protocol - if e, a := test.expectedProtocol, negotiated; e != a { - t.Errorf("%s: protocol: expected %q, got %q", name, e, a) - } + // verify negotiated protocol + if e, a := test.expectedProtocol, negotiated; e != a { + t.Fatalf("%s: protocol: expected %q, got %q", name, e, a) + } - if test.expectError { - if err == nil { - t.Errorf("%s: expected error but did not get one", name) + if test.expectError { + if err == nil { + t.Fatalf("%s: expected error but did not get one", name) + } + if w.statusCode == nil { + t.Fatalf("%s: expected w.statusCode to be set", name) + } else if e, a := test.expectedStatusCode, *w.statusCode; e != a { + t.Fatalf("%s: w.statusCode: expected %d, got %d", name, e, a) + } + if test.expectedStatusCode == http.StatusForbidden { + if e, a := test.serverProtocols, w.Header()[HeaderAcceptedProtocolVersions]; !reflect.DeepEqual(e, a) { + t.Fatalf("%s: accepted server protocols: expected %v, got %v", name, e, a) + } + } + return } - if w.statusCode == nil { - t.Errorf("%s: expected w.statusCode to be set", name) - } else if e, a := http.StatusForbidden, *w.statusCode; e != a { - t.Errorf("%s: w.statusCode: expected %d, got %d", name, e, a) + if !test.expectError && err != nil { + t.Fatalf("%s: unexpected error: %v", name, err) } - if e, a := test.serverProtocols, w.Header()[HeaderAcceptedProtocolVersions]; !reflect.DeepEqual(e, a) { - t.Errorf("%s: accepted server protocols: expected %v, got %v", name, e, a) + if w.statusCode != nil { + t.Fatalf("%s: unexpected non-nil w.statusCode: %d", name, w.statusCode) } - continue - } - if !test.expectError && err != nil { - t.Errorf("%s: unexpected error: %v", name, err) - continue - } - if w.statusCode != nil { - t.Errorf("%s: unexpected non-nil w.statusCode: %d", name, w.statusCode) - } - - if len(test.expectedProtocol) == 0 { - if len(w.Header()[HeaderProtocolVersion]) > 0 { - t.Errorf("%s: unexpected protocol version response header: %s", name, w.Header()[HeaderProtocolVersion]) + + if len(test.expectedProtocol) == 0 { + if len(w.Header()[HeaderProtocolVersion]) > 0 { + t.Fatalf("%s: unexpected protocol version response header: %s", name, w.Header()[HeaderProtocolVersion]) + } + return } - continue - } - // verify response headers - if e, a := []string{test.expectedProtocol}, w.Header()[HeaderProtocolVersion]; !reflect.DeepEqual(e, a) { - t.Errorf("%s: protocol response header: expected %v, got %v", name, e, a) - } + // verify response headers + if e, a := []string{test.expectedProtocol}, w.Header()[HeaderProtocolVersion]; !reflect.DeepEqual(e, a) { + t.Fatalf("%s: protocol response header: expected %v, got %v", name, e, a) + } + }) } + + t.Run("empty server protocols should panic", func(t *testing.T) { + defer func() { + if r := recover(); r == nil { + t.Errorf("The code did not panic") + } + }() + req, _ := http.NewRequest(http.MethodGet, "http://www.example.com/", nil) + req.Header.Add(HeaderProtocolVersion, "a") + w := newResponseWriter() + _, _ = Handshake(req, w, []string{}) + }) } func TestIsUpgradeFailureError(t *testing.T) { diff --git a/staging/src/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go b/staging/src/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go index 1f2877399fc1b..5be552e1eb6c4 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go @@ -23,80 +23,10 @@ import ( fmt "fmt" io "io" - math "math" math_bits "math/bits" - - proto "github.com/gogo/protobuf/proto" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *IntOrString) Reset() { *m = IntOrString{} } -func (*IntOrString) ProtoMessage() {} -func (*IntOrString) Descriptor() ([]byte, []int) { - return fileDescriptor_771bacc35a5ec189, []int{0} -} -func (m *IntOrString) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IntOrString) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IntOrString) XXX_Merge(src proto.Message) { - xxx_messageInfo_IntOrString.Merge(m, src) -} -func (m *IntOrString) XXX_Size() int { - return m.Size() -} -func (m *IntOrString) XXX_DiscardUnknown() { - xxx_messageInfo_IntOrString.DiscardUnknown(m) -} - -var xxx_messageInfo_IntOrString proto.InternalMessageInfo - -func init() { - proto.RegisterType((*IntOrString)(nil), "k8s.io.apimachinery.pkg.util.intstr.IntOrString") -} - -func init() { - proto.RegisterFile("k8s.io/apimachinery/pkg/util/intstr/generated.proto", fileDescriptor_771bacc35a5ec189) -} - -var fileDescriptor_771bacc35a5ec189 = []byte{ - // 277 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xce, 0xb6, 0x28, 0xd6, - 0xcb, 0xcc, 0xd7, 0x4f, 0x2c, 0xc8, 0xcc, 0x4d, 0x4c, 0xce, 0xc8, 0xcc, 0x4b, 0x2d, 0xaa, 0xd4, - 0x2f, 0xc8, 0x4e, 0xd7, 0x2f, 0x2d, 0xc9, 0xcc, 0xd1, 0xcf, 0xcc, 0x2b, 0x29, 0x2e, 0x29, 0xd2, - 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, - 0x52, 0x86, 0x68, 0xd2, 0x43, 0xd6, 0xa4, 0x57, 0x90, 0x9d, 0xae, 0x07, 0xd2, 0xa4, 0x07, 0xd1, - 0x24, 0xa5, 0x9b, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9e, 0x9f, - 0x9e, 0xaf, 0x0f, 0xd6, 0x9b, 0x54, 0x9a, 0x06, 0xe6, 0x81, 0x39, 0x60, 0x16, 0xc4, 0x4c, 0xa5, - 0x89, 0x8c, 0x5c, 0xdc, 0x9e, 0x79, 0x25, 0xfe, 0x45, 0xc1, 0x25, 0x45, 0x99, 0x79, 0xe9, 0x42, - 0x1a, 0x5c, 0x2c, 0x25, 0x95, 0x05, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, 0x4e, 0x22, 0x27, - 0xee, 0xc9, 0x33, 0x3c, 0xba, 0x27, 0xcf, 0x12, 0x52, 0x59, 0x90, 0xfa, 0x0b, 0x4a, 0x07, 0x81, - 0x55, 0x08, 0xa9, 0x71, 0xb1, 0x65, 0xe6, 0x95, 0x84, 0x25, 0xe6, 0x48, 0x30, 0x29, 0x30, 0x6a, - 0xb0, 0x3a, 0xf1, 0x41, 0xd5, 0xb2, 0x79, 0x82, 0x45, 0x83, 0xa0, 0xb2, 0x20, 0x75, 0xc5, 0x25, - 0x45, 0x20, 0x75, 0xcc, 0x0a, 0x8c, 0x1a, 0x9c, 0x08, 0x75, 0xc1, 0x60, 0xd1, 0x20, 0xa8, 0xac, - 0x15, 0xc7, 0x8c, 0x05, 0xf2, 0x0c, 0x0d, 0x77, 0x14, 0x18, 0x9c, 0x3c, 0x4f, 0x3c, 0x94, 0x63, - 0xb8, 0xf0, 0x50, 0x8e, 0xe1, 0xc6, 0x43, 0x39, 0x86, 0x86, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, - 0x31, 0x5e, 0x78, 0x24, 0xc7, 0x78, 0xe3, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, - 0xcb, 0x31, 0x44, 0x29, 0x13, 0x11, 0x84, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x63, 0xa1, 0x0b, - 0x1e, 0x68, 0x01, 0x00, 0x00, -} +func (m *IntOrString) Reset() { *m = IntOrString{} } func (m *IntOrString) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/apimachinery/pkg/util/intstr/generated.proto b/staging/src/k8s.io/apimachinery/pkg/util/intstr/generated.proto index 7c63c5e45af5f..e3d26a59a589e 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/intstr/generated.proto +++ b/staging/src/k8s.io/apimachinery/pkg/util/intstr/generated.proto @@ -33,6 +33,7 @@ option go_package = "k8s.io/apimachinery/pkg/util/intstr"; // +protobuf=true // +protobuf.options.(gogoproto.goproto_stringer)=false // +k8s:openapi-gen=true +// +k8s:openapi-model-package=io.k8s.apimachinery.pkg.util.intstr message IntOrString { optional int64 type = 1; diff --git a/staging/src/k8s.io/apimachinery/pkg/util/intstr/generated.protomessage.pb.go b/staging/src/k8s.io/apimachinery/pkg/util/intstr/generated.protomessage.pb.go new file mode 100644 index 0000000000000..2853a01830047 --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/util/intstr/generated.protomessage.pb.go @@ -0,0 +1,24 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package intstr + +func (*IntOrString) ProtoMessage() {} diff --git a/staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go b/staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go index 5fd2e16c842f6..f372ae589c0f0 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go @@ -38,6 +38,7 @@ import ( // +protobuf=true // +protobuf.options.(gogoproto.goproto_stringer)=false // +k8s:openapi-gen=true +// +k8s:openapi-model-package=io.k8s.apimachinery.pkg.util.intstr type IntOrString struct { Type Type `protobuf:"varint,1,opt,name=type,casttype=Type"` IntVal int32 `protobuf:"varint,2,opt,name=intVal"` diff --git a/staging/src/k8s.io/apimachinery/pkg/util/intstr/zz_generated.model_name.go b/staging/src/k8s.io/apimachinery/pkg/util/intstr/zz_generated.model_name.go new file mode 100644 index 0000000000000..b2d6e0ae3c877 --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/util/intstr/zz_generated.model_name.go @@ -0,0 +1,27 @@ +//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 openapi-gen. DO NOT EDIT. + +package intstr + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IntOrString) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.util.intstr.IntOrString" +} diff --git a/staging/src/k8s.io/apimachinery/pkg/util/net/util_test.go b/staging/src/k8s.io/apimachinery/pkg/util/net/util_test.go index 561fe4eebe7e4..90b14a864c0a8 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/net/util_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/net/util_test.go @@ -24,7 +24,6 @@ import ( "net/http/httptest" "net/url" "os" - "sync/atomic" "syscall" "testing" "time" @@ -109,7 +108,6 @@ type tcpLB struct { t *testing.T ln net.Listener serverURL string - dials int32 } func (lb *tcpLB) handleConnection(in net.Conn, stopCh chan struct{}) { @@ -131,8 +129,7 @@ func (lb *tcpLB) serve(stopCh chan struct{}) { if err != nil { lb.t.Fatalf("failed to accept: %v", err) } - atomic.AddInt32(&lb.dials, 1) - go lb.handleConnection(conn, stopCh) + lb.handleConnection(conn, stopCh) } func newLB(t *testing.T, serverURL string) *tcpLB { @@ -162,8 +159,11 @@ func TestIsConnectionReset(t *testing.T) { } lb := newLB(t, u.Host) defer lb.ln.Close() - stopCh := make(chan struct{}) - go lb.serve(stopCh) + stopCh, stoppedCh := make(chan struct{}), make(chan struct{}) + go func() { + defer close(stoppedCh) + lb.serve(stopCh) + }() c := ts.Client() transport, ok := ts.Client().Transport.(*http.Transport) @@ -176,7 +176,6 @@ func TestIsConnectionReset(t *testing.T) { } t2.ReadIdleTimeout = time.Second t2.PingTimeout = time.Second - // Create an HTTP2 connection to reuse later resp, err := c.Get("https://" + lb.ln.Addr().String()) if err != nil { t.Fatalf("unexpected error: %+v", err) @@ -194,6 +193,7 @@ func TestIsConnectionReset(t *testing.T) { // connection. This mimics a broken TCP connection that's not properly // closed. close(stopCh) + <-stoppedCh _, err = c.Get("https://" + lb.ln.Addr().String()) if !IsHTTP2ConnectionLost(err) { t.Fatalf("expected HTTP2ConnectionLost error, got %v", err) diff --git a/staging/src/k8s.io/apimachinery/pkg/util/resourceversion/resourceversion.go b/staging/src/k8s.io/apimachinery/pkg/util/resourceversion/resourceversion.go new file mode 100644 index 0000000000000..6f672c4b46041 --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/util/resourceversion/resourceversion.go @@ -0,0 +1,85 @@ +/* +Copyright 2025 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 resourceversion + +import ( + "fmt" + "strings" +) + +type InvalidResourceVersion struct { + rv string +} + +func (i InvalidResourceVersion) Error() string { + return fmt.Sprintf("resource version is not well formed: %s", i.rv) +} + +// CompareResourceVersion runs a comparison between two ResourceVersions. This +// only has semantic meaning when the comparison is done on two objects of the +// same resource. The return values are: +// +// -1: If RV a < RV b +// 0: If RV a == RV b +// +1: If RV a > RV b +// +// The function will return an error if the resource version is not a properly +// formatted positive integer, but has no restriction on length. A properly +// formatted integer will not contain leading zeros or non integer characters. +// Zero is also considered an invalid value as it is used as a special value in +// list/watch events and will never be a live resource version. +func CompareResourceVersion(a, b string) (int, error) { + if !isWellFormed(a) { + return 0, InvalidResourceVersion{rv: a} + } + if !isWellFormed(b) { + return 0, InvalidResourceVersion{rv: b} + } + // both are well-formed integer strings with no leading zeros + aLen := len(a) + bLen := len(b) + switch { + case aLen < bLen: + // shorter is less + return -1, nil + case aLen > bLen: + // longer is greater + return 1, nil + default: + // equal-length compares lexically + return strings.Compare(a, b), nil + } +} + +func isWellFormed(s string) bool { + if len(s) == 0 { + return false + } + if s[0] == '0' { + return false + } + for i := range s { + if !isDigit(s[i]) { + return false + } + } + return true +} + +func isDigit(b byte) bool { + return b >= '0' && b <= '9' +} diff --git a/staging/src/k8s.io/apimachinery/pkg/util/resourceversion/resourceversion_test.go b/staging/src/k8s.io/apimachinery/pkg/util/resourceversion/resourceversion_test.go new file mode 100644 index 0000000000000..dd3785e9ac980 --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/util/resourceversion/resourceversion_test.go @@ -0,0 +1,162 @@ +/* +Copyright 2025 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 resourceversion + +import ( + "testing" +) + +func TestCompareResourceVersion(t *testing.T) { + testCases := []struct { + name string + a string + b string + expected int + err bool + }{ + { + name: "a less than b", + a: "100", + b: "200", + expected: -1, + }, + { + name: "a is zero, invalid", + a: "0", + b: "1", + err: true, + }, + { + name: "both zero", + a: "0", + b: "0", + err: true, + }, + { + name: "a greater than b", + a: "200", + b: "100", + expected: 1, + }, + { + name: "b is 0, invalid", + a: "1", + b: "0", + err: true, + }, + { + name: "a equal to b small", + a: "1", + b: "1", + expected: 0, + }, + { + name: "a equal to b", + a: "100", + b: "100", + expected: 0, + }, + { + name: "a shorter than b", + a: "99", + b: "100", + expected: -1, + }, + { + name: "a longer than b", + a: "100", + b: "99", + expected: 1, + }, + { + name: "a with leading zero", + a: "0100", + b: "100", + expected: 0, + err: true, + }, + { + name: "b with leading zero", + a: "100", + b: "0100", + expected: 0, + err: true, + }, + { + name: "a empty", + a: "", + b: "100", + expected: 0, + err: true, + }, + { + name: "b empty", + a: "100", + b: "", + expected: 0, + err: true, + }, + { + name: "a non-digit", + a: "100a", + b: "100", + err: true, + }, + { + name: "b non-digit", + a: "100", + b: "100a", + err: true, + }, + { + name: "large int a less than b", + a: "99999999999999999999999999999999999999999999999999", + b: "100000000000000000000000000000000000000000000000000", + expected: -1, + }, + { + name: "large int a greater than b", + a: "100000000000000000000000000000000000000000000000000", + b: "99999999999999999999999999999999999999999999999999", + expected: 1, + }, + { + name: "large int a equal to b", + a: "12345678901234567890123456789012345678901234567890", + b: "12345678901234567890123456789012345678901234567890", + expected: 0, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + actual, err := CompareResourceVersion(tc.a, tc.b) + if tc.err { + if err == nil { + t.Fatalf("expected error, but got none") + } + return + } + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if actual != tc.expected { + t.Errorf("expected %d, got %d", tc.expected, actual) + } + }) + } +} diff --git a/staging/src/k8s.io/apimachinery/pkg/util/sets/set.go b/staging/src/k8s.io/apimachinery/pkg/util/sets/set.go index cd961c8c5939c..ae3d15eb25f12 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/sets/set.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/sets/set.go @@ -18,7 +18,7 @@ package sets import ( "cmp" - "sort" + "slices" ) // Set is a set of the same type elements, implemented via map[comparable]struct{} for minimal memory consumption. @@ -188,22 +188,13 @@ func (s1 Set[T]) Equal(s2 Set[T]) bool { return len(s1) == len(s2) && s1.IsSuperset(s2) } -type sortableSliceOfGeneric[T cmp.Ordered] []T - -func (g sortableSliceOfGeneric[T]) Len() int { return len(g) } -func (g sortableSliceOfGeneric[T]) Less(i, j int) bool { return less[T](g[i], g[j]) } -func (g sortableSliceOfGeneric[T]) Swap(i, j int) { g[i], g[j] = g[j], g[i] } - // List returns the contents as a sorted T slice. // // This is a separate function and not a method because not all types supported // by Generic are ordered and only those can be sorted. func List[T cmp.Ordered](s Set[T]) []T { - res := make(sortableSliceOfGeneric[T], 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) + res := s.UnsortedList() + slices.Sort(res) return res } @@ -230,7 +221,3 @@ func (s Set[T]) PopAny() (T, bool) { func (s Set[T]) Len() int { return len(s) } - -func less[T cmp.Ordered](lhs, rhs T) bool { - return lhs < rhs -} diff --git a/staging/src/k8s.io/apimachinery/pkg/util/sets/set_generic_test.go b/staging/src/k8s.io/apimachinery/pkg/util/sets/set_generic_test.go index 53f3383def764..e439a553d0433 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/sets/set_generic_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/sets/set_generic_test.go @@ -356,3 +356,20 @@ func TestIntersection(t *testing.T) { } } } + +func BenchmarkListSmall(b *testing.B) { + s := sets.New("a", "b", "c", "d", "e", "f", "g", "h", "i", "j") + for b.Loop() { + sets.List(s) + } +} + +func BenchmarkListLarge(b *testing.B) { + s := make(sets.Set[int], 12345) + for i := range 12345 { + s.Insert(i * 7) + } + for b.Loop() { + sets.List(s) + } +} diff --git a/staging/src/k8s.io/apimachinery/pkg/util/validation/field/error_matcher.go b/staging/src/k8s.io/apimachinery/pkg/util/validation/field/error_matcher.go index afb5f1b07b309..f0264e50c7dff 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/validation/field/error_matcher.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/validation/field/error_matcher.go @@ -23,6 +23,13 @@ import ( "strings" ) +// NormalizationRule holds a pre-compiled regular expression and its replacement string +// for normalizing field paths. +type NormalizationRule struct { + Regexp *regexp.Regexp + Replacement string +} + // ErrorMatcher is a helper for comparing Error objects. type ErrorMatcher struct { // TODO(thockin): consider whether type is ever NOT required, maybe just @@ -32,22 +39,37 @@ type ErrorMatcher struct { // "want" error has a nil field, don't match on field. matchField bool // TODO(thockin): consider whether value could be assumed - if the - // "want" error has a nil value, don't match on field. + // "want" error has a nil value, don't match on value. matchValue bool matchOrigin bool matchDetail func(want, got string) bool requireOriginWhenInvalid bool + // normalizationRules holds the pre-compiled regex patterns for path normalization. + normalizationRules []NormalizationRule } // Matches returns true if the two Error objects match according to the -// configured criteria. +// configured criteria. When field normalization is configured, only the +// "got" error's field path is normalized (to bring older API versions up +// to the internal/latest format), while "want" is assumed to already be +// in the canonical internal API format. func (m ErrorMatcher) Matches(want, got *Error) bool { if m.matchType && want.Type != got.Type { return false } - if m.matchField && want.Field != got.Field { - return false + if m.matchField { + // Try direct match first (common case) + if want.Field != got.Field { + // Fields don't match, try normalization if rules are configured. + // Only normalize "got" - it may be from an older API version that + // needs to be brought up to the internal/latest format that "want" + // is already in. + if want.Field != m.normalizePath(got.Field) { + return false + } + } } + if m.matchValue && !reflect.DeepEqual(want.BadValue, got.BadValue) { return false } @@ -67,6 +89,18 @@ func (m ErrorMatcher) Matches(want, got *Error) bool { return true } +// normalizePath applies configured path normalization rules. +func (m ErrorMatcher) normalizePath(path string) string { + for _, rule := range m.normalizationRules { + normalized := rule.Regexp.ReplaceAllString(path, rule.Replacement) + if normalized != path { + // Only apply the first matching rule. + return normalized + } + } + return path +} + // Render returns a string representation of the specified Error object, // according to the criteria configured in the ErrorMatcher. func (m ErrorMatcher) Render(e *Error) string { @@ -84,7 +118,11 @@ func (m ErrorMatcher) Render(e *Error) string { } if m.matchField { comma() - buf.WriteString(fmt.Sprintf("Field=%q", e.Field)) + if normalized := m.normalizePath(e.Field); normalized != e.Field { + buf.WriteString(fmt.Sprintf("Field=%q (aka %q)", normalized, e.Field)) + } else { + buf.WriteString(fmt.Sprintf("Field=%q", e.Field)) + } } if m.matchValue { comma() @@ -125,11 +163,39 @@ func (m ErrorMatcher) ByType() ErrorMatcher { } // ByField returns a derived ErrorMatcher which also matches by field path. +// If you need to mutate the field path (e.g. to normalize across versions), +// see ByFieldNormalized. func (m ErrorMatcher) ByField() ErrorMatcher { m.matchField = true return m } +// ByFieldNormalized returns a derived ErrorMatcher which also matches by field path +// after applying normalization rules to the actual (got) error's field path. +// This allows matching field paths from older API versions against the canonical +// internal API format. +// +// The normalization rules are applied ONLY to the "got" error's field path, bringing +// older API version field paths up to the latest/internal format. The "want" error +// is assumed to always be in the internal API format (latest). +// +// The rules slice holds pre-compiled regular expressions and their replacement strings. +// +// Example: +// +// rules := []NormalizationRule{ +// { +// Regexp: regexp.MustCompile(`spec\.devices\.requests\[(\d+)\]\.allocationMode`), +// Replacement: "spec.devices.requests[$1].exactly.allocationMode", +// }, +// } +// matcher := ErrorMatcher{}.ByFieldNormalized(rules) +func (m ErrorMatcher) ByFieldNormalized(rules []NormalizationRule) ErrorMatcher { + m.matchField = true + m.normalizationRules = rules + return m +} + // ByValue returns a derived ErrorMatcher which also matches by the errant // value. func (m ErrorMatcher) ByValue() ErrorMatcher { @@ -138,6 +204,13 @@ func (m ErrorMatcher) ByValue() ErrorMatcher { } // ByOrigin returns a derived ErrorMatcher which also matches by the origin. +// When this is used and an origin is set in the error, the matcher will +// consider all expected errors with the same origin to be a match. The only +// expception to this is when it finds two errors which are exactly identical, +// which is too suspicious to ignore. This multi-matching allows tests to +// express a single expectation ("I set the X field to an invalid value, and I +// expect an error from origin Y") without having to know exactly how many +// errors might be returned, or in what order, or with what wording. func (m ErrorMatcher) ByOrigin() ErrorMatcher { m.matchOrigin = true return m @@ -184,40 +257,64 @@ func (m ErrorMatcher) ByDetailRegexp() ErrorMatcher { type TestIntf interface { Helper() Errorf(format string, args ...any) - Logf(format string, args ...any) } // Test compares two ErrorLists by the criteria configured in this matcher, and -// fails the test if they don't match. If a given "want" error matches multiple -// "got" errors, they will all be consumed. This might be OK (e.g. if there are -// multiple errors on the same field from the same origin) or it might be an -// insufficiently specific matcher, so these will be logged. +// fails the test if they don't match. The "want" errors are expected to be in +// the internal API format (latest), while "got" errors may be from any API version +// and will be normalized if field normalization rules are configured. +// +// If matching by origin is enabled and the error has a non-empty origin, a given +// "want" error can match multiple "got" errors, and they will all be consumed. +// The only exception to this is if the matcher got multiple identical (in every way, +// even those not being matched on) errors, which is likely to indicate a bug. func (m ErrorMatcher) Test(tb TestIntf, want, got ErrorList) { tb.Helper() + exactly := m.Exactly() // makes a copy + + // If we ever find an EXACT duplicate error, it's almost certainly a bug + // worth reporting. If we ever find a use-case where this is not a bug, we + // can revisit this assumption. + seen := map[string]bool{} + for _, g := range got { + key := exactly.Render(g) + if seen[key] { + tb.Errorf("exact duplicate error:\n%s", key) + } + seen[key] = true + } + remaining := got for _, w := range want { tmp := make(ErrorList, 0, len(remaining)) - n := 0 - for _, g := range remaining { + matched := false + for i, g := range remaining { if m.Matches(w, g) { - n++ + matched = true + if m.matchOrigin && w.Origin != "" { + // When origin is included in the match, we allow multiple + // matches against the same wanted error, so that tests + // can be insulated from the exact number, order, and + // wording of cases that might return more than one error. + continue + } else { + // Single-match, save the rest of the "got" errors and move + // on to the next "want" error. + tmp = append(tmp, remaining[i+1:]...) + break + } } else { tmp = append(tmp, g) } } - if n == 0 { + if !matched { tb.Errorf("expected an error matching:\n%s", m.Render(w)) - } else if n > 1 { - // This is not necessarily and error, but it's worth logging in - // case it's not what the test author intended. - tb.Logf("multiple errors matched:\n%s", m.Render(w)) } remaining = tmp } if len(remaining) > 0 { for _, e := range remaining { - exactly := m.Exactly() // makes a copy tb.Errorf("unmatched error:\n%s", exactly.Render(e)) } } diff --git a/staging/src/k8s.io/apimachinery/pkg/util/validation/field/error_matcher_test.go b/staging/src/k8s.io/apimachinery/pkg/util/validation/field/error_matcher_test.go index 4271cd6337382..45a477ce2a24b 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/validation/field/error_matcher_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/validation/field/error_matcher_test.go @@ -17,11 +17,456 @@ limitations under the License. package field import ( + "fmt" + "regexp" + "strings" "testing" ) -func TestErrorMatcherRender(t *testing.T) { - tests := []struct { +func TestErrorMatcher_Matches(t *testing.T) { + baseErr := func() *Error { + return &Error{ + Type: ErrorTypeInvalid, + Field: "field", + BadValue: "value", + Detail: "detail", + Origin: "origin", + } + } + + testCases := []struct { + name string + matcher ErrorMatcher + wantedErr func() *Error + actualErr *Error + matches bool + }{{ + name: "ByType: match", + matcher: ErrorMatcher{}.ByType(), + wantedErr: baseErr, + actualErr: &Error{Type: ErrorTypeInvalid}, + matches: true, + }, { + name: "ByType: no match", + matcher: ErrorMatcher{}.ByType(), + wantedErr: baseErr, + actualErr: &Error{Type: ErrorTypeRequired}, + matches: false, + }, { + name: "ByField: match", + matcher: ErrorMatcher{}.ByField(), + wantedErr: baseErr, + actualErr: &Error{Field: "field"}, + matches: true, + }, { + name: "ByField: no match", + matcher: ErrorMatcher{}.ByField(), + wantedErr: baseErr, + actualErr: &Error{Field: "other"}, + matches: false, + }, { + name: "ByFieldNormalized: older API to latest", + matcher: ErrorMatcher{}.ByFieldNormalized([]NormalizationRule{ + {Regexp: regexp.MustCompile(`f\[(\d+)\]\.a`), Replacement: "f[$1].x.a"}, + }), + wantedErr: func() *Error { + e := baseErr() + e.Field = "f[0].x.a" + return e + }, + actualErr: &Error{Field: "f[0].a"}, + matches: true, + }, { + name: "ByFieldNormalized: both latest format", + matcher: ErrorMatcher{}.ByFieldNormalized([]NormalizationRule{ + {Regexp: regexp.MustCompile(`f\[(\d+)\]\.a`), Replacement: "f[$1].x.a"}, + }), + wantedErr: func() *Error { + e := baseErr() + e.Field = "f[0].x.a" + return e + }, + actualErr: &Error{Field: "f[0].x.a"}, + matches: true, + }, { + name: "ByFieldNormalized: different index", + matcher: ErrorMatcher{}.ByFieldNormalized([]NormalizationRule{ + {Regexp: regexp.MustCompile(`f\[(\d+)\]\.a`), Replacement: "f[$1].x.a"}, + }), + wantedErr: func() *Error { + e := baseErr() + e.Field = "f[0].x.a" + return e + }, + actualErr: &Error{Field: "f[1].a"}, + matches: false, + }, { + name: "ByFieldNormalized: multiple patterns", + matcher: ErrorMatcher{}.ByFieldNormalized([]NormalizationRule{ + {Regexp: regexp.MustCompile(`f\[(\d+)\]\.a`), Replacement: "f[$1].x.a"}, + {Regexp: regexp.MustCompile(`f\[(\d+)\]\.b`), Replacement: "f[$1].x.b"}, + }), + wantedErr: func() *Error { + e := baseErr() + e.Field = "f[2].x.b" + return e + }, + actualErr: &Error{Field: "f[2].b"}, + matches: true, + }, { + name: "ByFieldNormalized: no normalization needed", + matcher: ErrorMatcher{}.ByFieldNormalized([]NormalizationRule{ + {Regexp: regexp.MustCompile(`f\[(\d+)\]\.a`), Replacement: "f[$1].x.a"}, + }), + wantedErr: func() *Error { + e := baseErr() + e.Field = "other.field" + return e + }, + actualErr: &Error{Field: "other.field"}, + matches: true, + }, { + name: "ByValue: match", + matcher: ErrorMatcher{}.ByValue(), + wantedErr: baseErr, + actualErr: &Error{BadValue: "value"}, + matches: true, + }, { + name: "ByValue: no match", + matcher: ErrorMatcher{}.ByValue(), + wantedErr: baseErr, + actualErr: &Error{BadValue: "other"}, + matches: false, + }, { + name: "ByOrigin: match", + matcher: ErrorMatcher{}.ByOrigin(), + wantedErr: baseErr, + actualErr: &Error{Origin: "origin"}, + matches: true, + }, { + name: "ByOrigin: no match", + matcher: ErrorMatcher{}.ByOrigin(), + wantedErr: baseErr, + actualErr: &Error{Origin: "other"}, + matches: false, + }, { + name: "ByDetailExact: match", + matcher: ErrorMatcher{}.ByDetailExact(), + wantedErr: baseErr, + actualErr: &Error{Detail: "detail"}, + matches: true, + }, { + name: "ByDetailExact: no match", + matcher: ErrorMatcher{}.ByDetailExact(), + wantedErr: baseErr, + actualErr: &Error{Detail: "other"}, + matches: false, + }, { + name: "ByDetailSubstring: match empty", + matcher: ErrorMatcher{}.ByDetailSubstring(), + wantedErr: func() *Error { + e := baseErr() + e.Detail = "" + return e + }, + actualErr: &Error{Detail: "this is the detail"}, + matches: true, + }, { + name: "ByDetailSubstring: match full", + matcher: ErrorMatcher{}.ByDetailSubstring(), + wantedErr: func() *Error { + e := baseErr() + e.Detail = "is the" + return e + }, + actualErr: &Error{Detail: "this is the detail"}, + matches: true, + }, { + name: "ByDetailSubstring: match start", + matcher: ErrorMatcher{}.ByDetailSubstring(), + wantedErr: func() *Error { + e := baseErr() + e.Detail = "this is" + return e + }, + actualErr: &Error{Detail: "this is the detail"}, + matches: true, + }, { + name: "ByDetailSubstring: match middle", + matcher: ErrorMatcher{}.ByDetailSubstring(), + wantedErr: func() *Error { + e := baseErr() + e.Detail = "is the" + return e + }, + actualErr: &Error{Detail: "this is the detail"}, + matches: true, + }, { + name: "ByDetailSubstring: match end", + matcher: ErrorMatcher{}.ByDetailSubstring(), + wantedErr: func() *Error { + e := baseErr() + e.Detail = "the detail" + return e + }, + actualErr: &Error{Detail: "this is the detail"}, + matches: true, + }, { + name: "ByDetailSubstring: no match", + matcher: ErrorMatcher{}.ByDetailSubstring(), + wantedErr: func() *Error { + e := baseErr() + e.Detail = "is not the" + return e + }, + actualErr: &Error{Detail: "this is the detail"}, + matches: false, + }, { + name: "ByDetailRegexp: match empty", + matcher: ErrorMatcher{}.ByDetailRegexp(), + wantedErr: func() *Error { + e := baseErr() + e.Detail = ".*" + return e + }, + actualErr: &Error{Detail: "this is the detail"}, + matches: true, + }, { + name: "ByDetailRegexp: match full", + matcher: ErrorMatcher{}.ByDetailRegexp(), + wantedErr: func() *Error { + e := baseErr() + e.Detail = "^this is the detail$" + return e + }, + actualErr: &Error{Detail: "this is the detail"}, + matches: true, + }, { + name: "ByDetailRegexp: match start", + matcher: ErrorMatcher{}.ByDetailRegexp(), + wantedErr: func() *Error { + e := baseErr() + e.Detail = "^this is" + return e + }, + actualErr: &Error{Detail: "this is the detail"}, + matches: true, + }, { + name: "ByDetailRegexp: match middle", + matcher: ErrorMatcher{}.ByDetailRegexp(), + wantedErr: func() *Error { + e := baseErr() + e.Detail = "is the" + return e + }, + actualErr: &Error{Detail: "this is the detail"}, + matches: true, + }, { + name: "ByDetailRegexp: match end", + matcher: ErrorMatcher{}.ByDetailRegexp(), + wantedErr: func() *Error { + e := baseErr() + e.Detail = "the detail$" + return e + }, + actualErr: &Error{Detail: "this is the detail"}, + matches: true, + }, { + name: "ByDetailRegexp: match parts", + matcher: ErrorMatcher{}.ByDetailRegexp(), + wantedErr: func() *Error { + e := baseErr() + e.Detail = "^this .* .* detail$" + return e + }, + actualErr: &Error{Detail: "this is the detail"}, + matches: true, + }, { + name: "ByDetailRegexp: no match", + matcher: ErrorMatcher{}.ByDetailRegexp(), + wantedErr: func() *Error { + e := baseErr() + e.Detail = "is not the" + return e + }, + actualErr: &Error{Detail: "this is the detail"}, + matches: false, + }, { + name: "Exactly: match", + matcher: ErrorMatcher{}.Exactly(), + wantedErr: baseErr, + actualErr: baseErr(), + matches: true, + }, { + name: "Exactly: no match (type)", + matcher: ErrorMatcher{}.Exactly(), + wantedErr: baseErr, + actualErr: &Error{Type: ErrorTypeRequired, Field: "field", BadValue: "value", Detail: "detail", Origin: "origin"}, + matches: false, + }, { + name: "RequireOriginWhenInvalid: match", + matcher: ErrorMatcher{}.ByOrigin().RequireOriginWhenInvalid(), + wantedErr: baseErr, + actualErr: &Error{Type: ErrorTypeInvalid, Origin: "origin"}, + matches: true, + }, { + name: "RequireOriginWhenInvalid: no match (missing origin)", + matcher: ErrorMatcher{}.ByOrigin().RequireOriginWhenInvalid(), + wantedErr: baseErr, + actualErr: &Error{Type: ErrorTypeInvalid}, + matches: false, + }} + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + if tc.matcher.Matches(tc.wantedErr(), tc.actualErr) != tc.matches { + t.Errorf("Matches() = %v, want %v", !tc.matches, tc.matches) + } + }) + } +} + +// fakeTestIntf is used to test the testing support. +type fakeTestIntf struct { + errs []string +} + +var _ TestIntf = &fakeTestIntf{} + +func (*fakeTestIntf) Helper() {} + +func (ft *fakeTestIntf) Errorf(format string, args ...any) { + ft.errs = append(ft.errs, fmt.Sprintf(format, args...)) +} + +func TestErrorMatcher_Test(t *testing.T) { + testCases := []struct { + name string + matcher ErrorMatcher + want ErrorList + got ErrorList + expectedErrors []string + expectedLogs []string + }{{ + name: "no origin: perfect match", + matcher: ErrorMatcher{}.ByField(), + want: ErrorList{Invalid(NewPath("f"), nil, "")}, + got: ErrorList{Invalid(NewPath("f"), "v", "d")}, + }, { + name: "no origin: got too few errors", + matcher: ErrorMatcher{}.ByField(), + want: ErrorList{Invalid(NewPath("f"), nil, "")}, + got: ErrorList{}, + expectedErrors: []string{"expected an error matching:"}, + }, { + name: "no origin: got too many errors", + matcher: ErrorMatcher{}.ByField(), + want: ErrorList{}, + got: ErrorList{Invalid(NewPath("f"), "v", "d")}, + expectedErrors: []string{"unmatched error:"}, + }, { + name: "no origin: got wrong errors", + matcher: ErrorMatcher{}.ByField(), + want: ErrorList{Invalid(NewPath("f1"), nil, "")}, + got: ErrorList{Invalid(NewPath("f2"), "v", "d")}, + expectedErrors: []string{"expected an error matching:", "unmatched error:"}, + }, { + name: "with normalization: older API to latest", + matcher: ErrorMatcher{}.ByFieldNormalized([]NormalizationRule{ + {Regexp: regexp.MustCompile(`f\[(\d+)\]\.a`), Replacement: "f[$1].x.a"}, + }), + want: ErrorList{Invalid(NewPath("f").Index(0).Child("x", "a"), nil, "")}, + got: ErrorList{Invalid(NewPath("f").Index(0).Child("a"), "v", "d")}, + }, { + name: "with normalization: both latest", + matcher: ErrorMatcher{}.ByFieldNormalized([]NormalizationRule{ + {Regexp: regexp.MustCompile(`f\[(\d+)\]\.a`), Replacement: "f[$1].x.a"}, + }), + want: ErrorList{Invalid(NewPath("f").Index(0).Child("x", "a"), nil, "")}, + got: ErrorList{Invalid(NewPath("f").Index(0).Child("x", "a"), "v", "d")}, + }, { + name: "with normalization: multiple", + matcher: ErrorMatcher{}.ByFieldNormalized([]NormalizationRule{ + {Regexp: regexp.MustCompile(`f\[(\d+)\]\.a`), Replacement: "f[$1].x.a"}, + {Regexp: regexp.MustCompile(`f\[(\d+)\]\.b`), Replacement: "f[$1].x.b"}, + }), + want: ErrorList{ + Invalid(NewPath("f").Index(0).Child("x", "a"), nil, ""), + Invalid(NewPath("f").Index(1).Child("x", "b"), nil, ""), + }, + got: ErrorList{ + Invalid(NewPath("f").Index(0).Child("a"), "v1", "d1"), + Invalid(NewPath("f").Index(1).Child("b"), "v2", "d2"), + }, + }, { + name: "with normalization: no match", + matcher: ErrorMatcher{}.ByFieldNormalized([]NormalizationRule{ + {Regexp: regexp.MustCompile(`f\[(\d+)\]\.a`), Replacement: "f[$1].x.a"}, + }), + want: ErrorList{Invalid(NewPath("f").Index(0).Child("x", "a"), nil, "")}, + got: ErrorList{Invalid(NewPath("f").Index(1).Child("a"), "v", "d")}, + expectedErrors: []string{"expected an error matching:", "unmatched error:"}, + }, { + name: "with origin: single match", + matcher: ErrorMatcher{}.ByField().ByOrigin(), + want: ErrorList{Invalid(NewPath("f"), nil, "").WithOrigin("o")}, + got: ErrorList{Invalid(NewPath("f"), "v", "d").WithOrigin("o")}, + }, { + name: "with origin: multiple matches, different details", + matcher: ErrorMatcher{}.ByField().ByOrigin(), + want: ErrorList{ + Invalid(NewPath("f1"), nil, "").WithOrigin("o"), + Invalid(NewPath("f2"), nil, "").WithOrigin("o"), + }, + got: ErrorList{ + Invalid(NewPath("f1"), "v", "d1").WithOrigin("o"), + Invalid(NewPath("f2"), "v", "d1").WithOrigin("o"), + Invalid(NewPath("f1"), "v", "d2").WithOrigin("o"), + Invalid(NewPath("f2"), "v", "d2").WithOrigin("o"), + }, + }, { + name: "with origin: multiple matches, same exact error", + matcher: ErrorMatcher{}.ByField().ByOrigin(), + want: ErrorList{ + Invalid(NewPath("f1"), nil, "").WithOrigin("o"), + Invalid(NewPath("f2"), nil, "").WithOrigin("o"), + }, + got: ErrorList{ + Invalid(NewPath("f1"), "v", "d").WithOrigin("o"), + Invalid(NewPath("f1"), "v", "d").WithOrigin("o"), + Invalid(NewPath("f2"), "v", "d").WithOrigin("o"), + Invalid(NewPath("f2"), "v", "d").WithOrigin("o"), + }, + expectedErrors: []string{"exact duplicate error:", "exact duplicate error:"}, + }} + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + fakeT := &fakeTestIntf{} + tc.matcher.Test(fakeT, tc.want, tc.got) + if want, got := len(tc.expectedErrors), len(fakeT.errs); got != want { + if got == 0 { + t.Errorf("expected %d errors, got %d", want, got) + } else { + q := make([]string, len(fakeT.errs)) + for i, err := range fakeT.errs { + q[i] = fmt.Sprintf("%q", err) + } + t.Errorf("expected %d errors, got %d:\n%s", want, got, strings.Join(q, "\n")) + } + } else { + for i := range tc.expectedErrors { + if !strings.HasPrefix(fakeT.errs[i], tc.expectedErrors[i]) { + t.Errorf("error %d: expected prefix %q, got %q", i, tc.expectedErrors[i], fakeT.errs[i]) + } + } + } + }) + } +} + +func TestErrorMatcher_Render(t *testing.T) { + testCases := []struct { name string matcher ErrorMatcher err *Error @@ -63,6 +508,30 @@ func TestErrorMatcherRender(t *testing.T) { err: Invalid(NewPath("field"), "value", "detail").WithOrigin("origin"), expected: `{Type="Invalid value", Field="field", Value="value", Origin="origin", Detail="detail"}`, }, + { + name: "with normalization: normalized", + matcher: ErrorMatcher{}.ByFieldNormalized([]NormalizationRule{ + {Regexp: regexp.MustCompile(`f\[(\d+)\]\.a`), Replacement: "f[$1].x.a"}, + }), + err: Invalid(NewPath("f").Index(0).Child("a"), "value", "detail"), + expected: `{Field="f[0].x.a" (aka "f[0].a")}`, + }, + { + name: "with normalization: no normalization", + matcher: ErrorMatcher{}.ByFieldNormalized([]NormalizationRule{ + {Regexp: regexp.MustCompile(`f\[(\d+)\]\.a`), Replacement: "f[$1].x.a"}, + }), + err: Invalid(NewPath("other", "field"), "value", "detail"), + expected: `{Field="other.field"}`, + }, + { + name: "with normalization: already normalized", + matcher: ErrorMatcher{}.ByFieldNormalized([]NormalizationRule{ + {Regexp: regexp.MustCompile(`f\[(\d+)\]\.a`), Replacement: "f[$1].x.a"}, + }), + err: Invalid(NewPath("f").Index(0).Child("x", "a"), "value", "detail"), + expected: `{Field="f[0].x.a"}`, + }, { name: "requireOriginWhenInvalid with origin", matcher: ErrorMatcher{}.ByOrigin().RequireOriginWhenInvalid(), @@ -77,11 +546,11 @@ func TestErrorMatcherRender(t *testing.T) { }, } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - result := tt.matcher.Render(tt.err) - if result != tt.expected { - t.Errorf("Render() = %v, want %v", result, tt.expected) + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + result := tc.matcher.Render(tc.err) + if result != tc.expected { + t.Errorf("Render() = %v, want %v", result, tc.expected) } }) } diff --git a/staging/src/k8s.io/apimachinery/pkg/util/validation/field/errors.go b/staging/src/k8s.io/apimachinery/pkg/util/validation/field/errors.go index f2a983aebf669..950d838682346 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/validation/field/errors.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/validation/field/errors.go @@ -341,6 +341,14 @@ func (list ErrorList) MarkCoveredByDeclarative() ErrorList { return list } +// PrefixDetail adds a prefix to the Detail for all errors in the list and returns the updated list. +func (list ErrorList) PrefixDetail(prefix string) ErrorList { + for _, err := range list { + err.Detail = prefix + err.Detail + } + return list +} + // ToAggregate converts the ErrorList into an errors.Aggregate. func (list ErrorList) ToAggregate() utilerrors.Aggregate { if len(list) == 0 { diff --git a/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go b/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go index bc4521c392bf7..8e76c31375745 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go @@ -23,51 +23,17 @@ import ( "strings" "unicode" + "k8s.io/apimachinery/pkg/api/validate/content" + "k8s.io/apimachinery/pkg/util/validation/field" ) -const qnameCharFmt string = "[A-Za-z0-9]" -const qnameExtCharFmt string = "[-A-Za-z0-9_.]" -const qualifiedNameFmt string = "(" + qnameCharFmt + qnameExtCharFmt + "*)?" + qnameCharFmt -const qualifiedNameErrMsg string = "must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character" -const qualifiedNameMaxLength int = 63 - -var qualifiedNameRegexp = regexp.MustCompile("^" + qualifiedNameFmt + "$") - // IsQualifiedName tests whether the value passed is what Kubernetes calls a // "qualified name". This is a format used in various places throughout the // system. If the value is not valid, a list of error strings is returned. // Otherwise an empty list (or nil) is returned. -func IsQualifiedName(value string) []string { - var errs []string - parts := strings.Split(value, "/") - var name string - switch len(parts) { - case 1: - name = parts[0] - case 2: - var prefix string - prefix, name = parts[0], parts[1] - if len(prefix) == 0 { - errs = append(errs, "prefix part "+EmptyError()) - } else if msgs := IsDNS1123Subdomain(prefix); len(msgs) != 0 { - errs = append(errs, prefixEach(msgs, "prefix part ")...) - } - default: - return append(errs, "a qualified name "+RegexError(qualifiedNameErrMsg, qualifiedNameFmt, "MyName", "my.name", "123-abc")+ - " with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')") - } - - if len(name) == 0 { - errs = append(errs, "name part "+EmptyError()) - } else if len(name) > qualifiedNameMaxLength { - errs = append(errs, "name part "+MaxLenError(qualifiedNameMaxLength)) - } - if !qualifiedNameRegexp.MatchString(name) { - errs = append(errs, "name part "+RegexError(qualifiedNameErrMsg, qualifiedNameFmt, "MyName", "my.name", "123-abc")) - } - return errs -} +// Deprecated: Use k8s.io/apimachinery/pkg/api/validate/content.IsQualifiedName instead. +var IsQualifiedName = content.IsLabelKey // IsFullyQualifiedName checks if the name is fully qualified. This is similar // to IsFullyQualifiedDomainName but requires a minimum of 3 segments instead of @@ -151,27 +117,15 @@ func IsDomainPrefixedPath(fldPath *field.Path, dpPath string) field.ErrorList { return allErrs } -const labelValueFmt string = "(" + qualifiedNameFmt + ")?" -const labelValueErrMsg string = "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character" - // LabelValueMaxLength is a label's max length -const LabelValueMaxLength int = 63 - -var labelValueRegexp = regexp.MustCompile("^" + labelValueFmt + "$") +// Deprecated: Use k8s.io/apimachinery/pkg/api/validate/content.LabelValueMaxLength instead. +const LabelValueMaxLength int = content.LabelValueMaxLength // IsValidLabelValue tests whether the value passed is a valid label value. If // the value is not valid, a list of error strings is returned. Otherwise an // empty list (or nil) is returned. -func IsValidLabelValue(value string) []string { - var errs []string - if len(value) > LabelValueMaxLength { - errs = append(errs, MaxLenError(LabelValueMaxLength)) - } - if !labelValueRegexp.MatchString(value) { - errs = append(errs, RegexError(labelValueErrMsg, labelValueFmt, "MyValue", "my_value", "12345")) - } - return errs -} +// Deprecated: Use k8s.io/apimachinery/pkg/api/validate/content.IsLabelValue instead. +var IsValidLabelValue = content.IsLabelValue const dns1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?" const dns1123LabelFmtWithUnderscore string = "_?[a-z0-9]([-_a-z0-9]*[a-z0-9])?" @@ -478,13 +432,6 @@ func EmptyError() string { return "must be non-empty" } -func prefixEach(msgs []string, prefix string) []string { - for i := range msgs { - msgs[i] = prefix + msgs[i] - } - return msgs -} - // InclusiveRangeError returns a string explanation of a numeric "must be // between" validation failure. func InclusiveRangeError(lo, hi int) string { diff --git a/staging/src/k8s.io/apimachinery/pkg/version/doc.go b/staging/src/k8s.io/apimachinery/pkg/version/doc.go index 5f446a4f4af52..70e3f76b23e11 100644 --- a/staging/src/k8s.io/apimachinery/pkg/version/doc.go +++ b/staging/src/k8s.io/apimachinery/pkg/version/doc.go @@ -15,6 +15,8 @@ limitations under the License. */ // +k8s:openapi-gen=true +// +k8s:openapi-model-package=io.k8s.apimachinery.pkg.version +// // Package version supplies the type for version information. package version diff --git a/staging/src/k8s.io/apimachinery/pkg/version/zz_generated.model_name.go b/staging/src/k8s.io/apimachinery/pkg/version/zz_generated.model_name.go new file mode 100644 index 0000000000000..e5a6d395ad543 --- /dev/null +++ b/staging/src/k8s.io/apimachinery/pkg/version/zz_generated.model_name.go @@ -0,0 +1,27 @@ +//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 openapi-gen. DO NOT EDIT. + +package version + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Info) OpenAPIModelName() string { + return "io.k8s.apimachinery.pkg.version.Info" +} diff --git a/staging/src/k8s.io/apiserver/ARCHITECTURE.md b/staging/src/k8s.io/apiserver/ARCHITECTURE.md new file mode 100644 index 0000000000000..e9b8af6834eb4 --- /dev/null +++ b/staging/src/k8s.io/apiserver/ARCHITECTURE.md @@ -0,0 +1,259 @@ +# apiserver Architecture + +## 1. Server Composition + +The `kube-apiserver` binary is not one server, but a **server chain** of three distinct +`GenericAPIServer` instances: the core Kubernetes API, API extensions (CRDs), and the aggregation +layer. + +This composition is managed by a layered configuration system, starting with command-line +flags parsed by `options` structs (e.g., `RecommendedOptions` in `pkg/server/options`), which +populate a `Config` object that is then used to instantiate the `GenericAPIServer` +instances. The construction of this delegation chain can be found in the `CreateServerChain` +function in `cmd/kube-apiserver/app/server.go`. + +```mermaid +graph TD + subgraph Incoming Request + direction LR + A[User/Client] --> B{/apis/apps/v1/deployments}; + end + + subgraph kube-apiserver process + direction LR + B --> C[Aggregator Server]; + C -- Not an APIService --> D[Kube API Server]; + D -- Handles Request --> E[REST Storage]; + C -- Is an APIService --> F[Proxy to Extension API Server]; + D -- Not a Core API --> G[API Extensions Server]; + G -- Handles CRD --> E; + end +``` + +1. **Aggregator Server (`kube-aggregator`):** + * **Purpose:** Handles the `apiregistration.k8s.io` API and acts as a reverse proxy for + extension API servers. This functionality was designed to allow third-party APIs to be + "aggregated" into the main Kubernetes API server seamlessly. + * **Mechanism:** It watches `APIService` objects. When a request arrives (e.g., for + `/apis/mycompany.com/v1/myresources`), it checks if an `APIService` has "claimed" + that path. If so, it uses a `ServiceResolver` to find the IP of the backing + `Service` and proxies the request. + * **Use Case:** This pattern is for programmatic, high-control extensions that require + custom business logic (e.g., non-CRUD subresources like `/logs`) or alternative + storage backends. + * **Delegation:** If no `APIService` matches, it delegates the request to the next + server in the chain. + +2. **Kube API Server (Core):** + * **Purpose:** Serves all the built-in Kubernetes APIs (`core/v1`, `apps/v1`, etc.). + * **Mechanism:** This is the main server, configured with all the core REST storage + strategies. + * **Delegation:** If a request is for a path that is not a core API (e.g., for a CRD), + it delegates the request to the next server in the chain. + +3. **API Extensions Server (`apiextensions-apiserver`):** + * **Purpose:** Handles the `apiextensions.k8s.io` API, which manages + `CustomResourceDefinition` objects (CRDs). The evolution of CRDs from a simple extension + mechanism to a feature-rich system with validation, versioning, and defaulting is + documented in a series of KEPs, starting with the graduation to GA in Kubernetes v1.16. + * **Mechanism:** When a CRD is created, this server dynamically creates and installs a + new REST storage handler for the new resource, making it immediately available. + * **Use Case:** CRDs are the most common extension pattern, offering a declarative, + schema-based way to define new resource types that are stored in etcd and require no + custom API server code. + * **Delegation:** It is the end of the chain. If it cannot handle a request, a `404 Not + Found` is returned. + +## 2. Handler Chain + +Every request flows through a standard chain of HTTP handlers (filters). The request body +is not deserialized until it has passed authentication and authorization. The default handler +chain is constructed by the `DefaultBuildHandlerChain` function in +`staging/src/k8s.io/apiserver/pkg/server/config.go`. + +```mermaid +sequenceDiagram + participant Client + participant Handler Chain + participant Authentication + participant Authorization + participant Priority and Fairness + participant Admission Control + participant REST Endpoint + + Client->>Handler Chain: Request + Handler Chain->>Authentication: Authenticate + Authentication-->>Handler Chain: User Info + Handler Chain->>Authorization: Authorize + Authorization-->>Handler Chain: Allowed/Denied + Handler Chain->>Priority and Fairness: Classify & Queue + Priority and Fairness-->>Handler Chain: Proceed + Handler Chain->>Admission Control: Mutate & Validate + Admission Control-->>Handler Chain: Object OK + Handler Chain->>REST Endpoint: Handle + REST Endpoint-->>Handler Chain: Response + Handler Chain-->>Client: Response +``` + +The handler chain consists of the following stages: + +1. **Authentication (`pkg/authentication`):** This filter identifies the user. The system is + pluggable and composed of multiple authenticators (e.g., client certs, bearer tokens, OIDC). + The identity of the user is determined by the first authenticator in the chain that successfully + identifies the user. +2. **Authorization (`pkg/authorization`):** This filter checks if the user is permitted to + perform the action. This system is also pluggable and composed of multiple authorizers + (e.g., RBAC, Node, Webhook). Each authorizer may respond with either allow, deny, or no opinion. + If the response is no opinion, the request is passed to the next authorizer in the chain. +3. **Priority and Fairness (`pkg/util/flowcontrol`):** This subsystem manages request + concurrency, classifying requests into `FlowSchema`s and `PriorityLevel`s to prevent + overload. This feature was introduced to prevent high traffic from overwhelming the API + server and to ensure that critical cluster operations are not starved. +4. **Admission Control (`pkg/admission`):** This is the primary mechanism for policy + enforcement. It is only at this stage that the request body is deserialized into an + object. It is a chain of plugins that can mutate or validate an object. The built-in Pod + Security admission controller is a key example of this, enforcing Pod Security Standards + at the namespace level. +5. **REST Endpoint Handling (`pkg/endpoints`):** The request is finally dispatched to the + appropriate REST handler, which is installed by the `APIInstaller`. + +## 3. API Group Registration + +The high-level steps for introducing an API are: + +1. **Define Types:** Create or modify the Go structs in the `types.go` file for the API group. +2. **Generate Code:** Use the code generators provided by the Kubernetes project to create the required + boilerplate methods for deep-copy, conversion, and defaulting. +3. **Implement the `Strategy`:** Write the custom business logic and validation for the + resource in its `Strategy` object. +4. **Register and Install:** Create the `APIGroupInfo` struct, bundling the `Scheme` and the + `Strategy`-configured storage, and pass it to the `GenericAPIServer`'s `InstallAPIGroup` + method. + +### The API Group Registry + +The `runtime.Scheme` acts as a central registry for an API group's type information. A single +`Scheme` object is created for each API group and is responsible for the following key +capabilities: + +* **Type Registration and Mapping:** The `Scheme`'s primary role is to map a GroupVersionKind + (GVK) to its corresponding Go type and back. This process also relies on the `deepcopy-gen` + tool to create `DeepCopy()` methods for each type, which is critical for ensuring that + objects returned from caches are never modified directly. + +* **API Conversion:** The `Scheme` stores the conversion functions that translate objects + between different API versions. These functions are typically generated by the + `conversion-gen` tool and enable the **hub-and-spoke** model. + +* **Defaulting:** The `Scheme` registers defaulting functions that populate optional fields in + an object. These are usually generated by the `defaulter-gen` tool. + +* **Declarative Validation:** The `Scheme` can store and execute code-generated validation + functions, providing a baseline level of validation. This is distinct from the primary, + handwritten business logic validation, which is handled by the `Strategy` object. + +### The `APIGroupInfo` Struct and `Strategy` Object + +With a populated `Scheme`, the API group is registered with the `GenericAPIServer` by bundling +the `Scheme` with the storage backend and versioning information into an `APIGroupInfo` struct. + +```mermaid +graph TD + subgraph Server Configuration + A[APIGroupInfo for apps v1]; + A --> B{Scheme: Knows Deployment v1}; + A --> C{Storage: deployments RESTStorage}; + A --> D{Version Priority: v1, v1beta1}; + end + + subgraph RESTStorage Implementation + C --> E[genericregistry.Store]; + E --> F[etcd client]; + E --> G[Deployment Strategy]; + end + + subgraph Server Runtime + H[GenericAPIServer] -- InstallAPIGroup --> I[APIInstaller]; + I -- Uses --> A; + I --> J{Register /apis/apps/v1/deployments}; + J --> K[HTTP Handler]; + K -- On Request --> C; + end +``` + +The registration process follows these steps: + +1. **`APIGroupInfo` Construction:** For each API group, an `APIGroupInfo` struct is created, + which contains the populated `Scheme`, a map of resources to their storage + implementations, and an ordered list of **Version Priority**. + +2. **REST Storage Instantiation:** For each resource, a `genericregistry.Store` is created. It + is configured with a resource-specific `Strategy` object that contains the core business + logic (e.g., handwritten validation). + +3. **API Group Installation:** The `GenericAPIServer`'s `InstallAPIGroup` method takes the + `APIGroupInfo` and uses an `APIInstaller` to expose the resources as HTTP endpoints. + +## 4. Watch Cache + +To handle the high volume of watch requests from controllers without overwhelming etcd, the +apiserver uses a **watch cache**. The implementation can be found in +`staging/src/k8s.io/apiserver/pkg/storage/cacher/`. + +* **Initialization:** The cacher first performs a `LIST` to get the current state of all + objects and a `ResourceVersion` for that point-in-time. It then starts a `WATCH` from + that version to ensure a consistent stream of events. +* **Serving from Cache:** Most list and watch requests are served from this in-memory cache, which + dramatically reduces the load on etcd. Consistent reads are also served from the + cache. This is achieved by first fetching the revision number of the latest write from + etcd. The server then ensures the cache is at least that recent—waiting for it to + refresh if necessary—before serving the request. +* **Fallback to Storage:** If a client request cannot be served from the + cache's buffer, the request "falls through" to the underlying etcd storage. +* **Bookmarks:** The cacher uses bookmark events to track the latest `ResourceVersion` for + unchanged objects. This prevents the cache's `ResourceVersion` from becoming too old, + which avoids the need for expensive relist operations from etcd when the objects have + not been modified. + +## 5. Conflict Resolution + +* **Optimistic Concurrency via `resourceVersion`:** Clients are expected to perform updates using a + read-modify-write workflow. The apiserver uses the `resourceVersion` field of every + object to enforce optimistic concurrency. This `resourceVersion` is not an arbitrary number; + it maps directly to etcd's globally consistent `mod_revision`. When a client submits an + update (`PUT` or `PATCH`), it must provide the `resourceVersion` of the object it based its + modifications on. If the `resourceVersion` on the server does not match the current + `mod_revision` in etcd, the server rejects the request with a `409 Conflict` error. This + forces the client to re-read the object, resolve the conflict, and resubmit with the new + `resourceVersion`. +* **Server-Side Apply:** A declarative, "intent-based" patch. The server maintains a + `managedFields` section in the object's metadata to track which "manager" (e.g., a + controller) owns each field. This allows multiple actors to manage different parts of the + same object without overwriting each other's changes. + +## 6. Discovery and OpenAPI + +Apiservers serve the `/apis` discovery endpoints and the `/openapi/v2` and `/openapi/v3` +specifications. The generation of the OpenAPI specification is a multi-stage process. + +* **`openapi-gen`**: This tool reflects on Go structs, reads godoc comments, and looks at + validation struct tags to generate a map of all API definitions. +* **`zz_generated.openapi.go`**: The output is a large Go file containing a + `GetOpenAPIDefinitions` function. +* **Runtime**: The `GenericAPIServer` calls this generated function to build the final OpenAPI + JSON spec that it serves to clients. + +## 7. Security & Observability + +* **Audit (`pkg/audit`):** The apiserver has a policy-driven event logging pipeline. The audit + policy controls what is logged and at which stage of a request. +* **Security:** + * **mTLS:** The primary authentication mechanism for system components. + * **Service Account Token Issuance:** The `kube-apiserver` acts as an OIDC provider, + issuing and validating JWTs for `ServiceAccount`s. + +## 8. Streaming Protocols + +* **Websockets:** The apiserver uses websockets to upgrade HTTP + connections for interactive, streaming protocols like `exec`, `attach`, and + `port-forward`. The `UpgradeAwareProxyHandler` manages this process. diff --git a/staging/src/k8s.io/apiserver/doc.go b/staging/src/k8s.io/apiserver/doc.go index 573d9e39b7cd5..78b4becd734e7 100644 --- a/staging/src/k8s.io/apiserver/doc.go +++ b/staging/src/k8s.io/apiserver/doc.go @@ -14,4 +14,61 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package apiserver provides the machinery for building Kubernetes-style API servers. +// +// This library is the foundation for the Kubernetes API server (`kube-apiserver`), +// and is also the primary framework for developers building custom API servers to extend +// the Kubernetes API. +// +// An extension API server is a user-provided, standalone web server that registers itself +// with the main kube-apiserver to handle specific API groups. This allows developers to +// extend Kubernetes with their own APIs that behave like core Kubernetes APIs, complete +// with typed clients, authentication, authorization, and discovery. +// +// # Key Packages +// +// The `apiserver` library is composed of several key packages: +// +// - `pkg/server`: This is the core of the library, providing the `GenericAPIServer` +// and the main machinery for building the server. +// - `pkg/admission`: This package contains the admission control framework. Developers +// can use this to build custom admission plugins that can validate or mutate +// requests to enforce custom policies. This is a common way to extend Kubernetes +// behavior without adding a full API server. +// - `pkg/authentication`: This package provides the framework for authenticating +// requests. +// - `pkg/authorization`: This package provides the framework for authorizing +// requests. +// - `pkg/endpoints`: This package contains the machinery for building the REST +// endpoints for the API server. +// - `pkg/registry`: This package provides the storage interface for the API server. +// +// # Instantiating a GenericAPIServer +// +// The `GenericAPIServer` struct is the heart of any extension server. It is responsible +// for assembling and running the HTTP serving stack. See the runnable example for a +// demonstration of how to instantiate a `GenericAPIServer`. +// +// # Building an Extension API Server (API Aggregation) +// +// The mechanism that enables extension API servers is API aggregation. The +// primary apiserver (typically the kube-apiserver) acts as a proxy, forwarding +// requests for a specific API group (e.g., /apis/myextension.io/v1) to a +// registered extension server. The apiserver is configured using +// APIService objects. +// +// For most use cases, custom resources (CustomResourceDefinitions) are the +// preferred way to extend the Kubernetes API. +// +// # Building an Admission Plugin +// +// The `pkg/admission` package provides a way to add admission policies directly +// into an apiserver. Admission plugins can be used to validate or mutate objects +// during write operations. The kube-apiserver uses admission plugins to provide +// a variety of core system capabilities. +// +// For most extension use cases dynamic admission control using policies +// (ValidatingAdmissionPolicies or MutatingAdmissionPolicies) or +// webhooks (ValidatingWebhookConfiguration and MutatingWebhookConfiguration) are the +// preferred way to extend admission control. package apiserver diff --git a/staging/src/k8s.io/apiserver/go.mod b/staging/src/k8s.io/apiserver/go.mod index 60008ff25e0eb..0d43f96da3eb3 100644 --- a/staging/src/k8s.io/apiserver/go.mod +++ b/staging/src/k8s.io/apiserver/go.mod @@ -2,9 +2,9 @@ module k8s.io/apiserver -go 1.24.0 +go 1.25.0 -godebug default=go1.24 +godebug default=go1.25 require ( github.com/blang/semver/v4 v4.0.0 @@ -12,8 +12,7 @@ require ( github.com/coreos/go-systemd/v22 v22.5.0 github.com/emicklei/go-restful/v3 v3.12.2 github.com/fsnotify/fsnotify v1.9.0 - github.com/go-logr/logr v1.4.2 - github.com/gogo/protobuf v1.3.2 + github.com/go-logr/logr v1.4.3 github.com/google/btree v1.1.3 github.com/google/cel-go v0.26.0 github.com/google/gnostic-models v0.7.0 @@ -23,29 +22,30 @@ require ( github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f - github.com/spf13/pflag v1.0.6 - github.com/stretchr/testify v1.10.0 + github.com/spf13/pflag v1.0.9 + github.com/stretchr/testify v1.11.1 go.etcd.io/etcd/api/v3 v3.6.4 go.etcd.io/etcd/client/pkg/v3 v3.6.4 go.etcd.io/etcd/client/v3 v3.6.4 go.etcd.io/etcd/server/v3 v3.6.4 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 - go.opentelemetry.io/otel v1.35.0 + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 + go.opentelemetry.io/otel v1.36.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 - go.opentelemetry.io/otel/metric v1.35.0 - go.opentelemetry.io/otel/sdk v1.34.0 - go.opentelemetry.io/otel/trace v1.35.0 + go.opentelemetry.io/otel/metric v1.36.0 + go.opentelemetry.io/otel/sdk v1.36.0 + go.opentelemetry.io/otel/trace v1.36.0 go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.36.0 - golang.org/x/net v0.38.0 - golang.org/x/sync v0.12.0 - golang.org/x/sys v0.31.0 + golang.org/x/crypto v0.41.0 + golang.org/x/net v0.43.0 + golang.org/x/sync v0.16.0 + golang.org/x/sys v0.35.0 + golang.org/x/text v0.28.0 golang.org/x/time v0.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb - google.golang.org/grpc v1.72.1 - google.golang.org/protobuf v1.36.5 - gopkg.in/evanphx/json-patch.v4 v4.12.0 + google.golang.org/grpc v1.72.2 + google.golang.org/protobuf v1.36.8 + gopkg.in/evanphx/json-patch.v4 v4.13.0 gopkg.in/go-jose/go-jose.v2 v2.6.3 gopkg.in/natefinch/lumberjack.v2 v2.2.1 k8s.io/api v0.0.0 @@ -54,10 +54,10 @@ require ( k8s.io/component-base v0.0.0 k8s.io/klog/v2 v2.130.1 k8s.io/kms v0.0.0 - k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b + k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 - sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 sigs.k8s.io/randfill v1.0.0 sigs.k8s.io/structured-merge-diff/v6 v6.3.0 sigs.k8s.io/yaml v1.6.0 @@ -79,6 +79,7 @@ require ( github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.23.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.2.2 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 // indirect @@ -93,16 +94,15 @@ require ( github.com/moby/spdystream v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pquerna/cachecontrol v0.1.0 // indirect - github.com/prometheus/client_golang v1.22.0 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.62.0 // indirect - github.com/prometheus/procfs v0.15.1 // indirect + github.com/prometheus/client_golang v1.23.2 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.66.1 // indirect + github.com/prometheus/procfs v0.16.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/soheilhy/cmux v0.1.5 // indirect - github.com/spf13/cobra v1.9.1 // indirect + github.com/spf13/cobra v1.10.0 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect github.com/x448/float16 v0.8.4 // indirect @@ -117,10 +117,9 @@ require ( go.yaml.in/yaml/v2 v2.4.2 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/oauth2 v0.27.0 // indirect - golang.org/x/term v0.30.0 // indirect - golang.org/x/text v0.23.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect + golang.org/x/oauth2 v0.30.0 // indirect + golang.org/x/term v0.34.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/staging/src/k8s.io/apiserver/go.sum b/staging/src/k8s.io/apiserver/go.sum index 238e6f082fc49..a96d5b493c5bf 100644 --- a/staging/src/k8s.io/apiserver/go.sum +++ b/staging/src/k8s.io/apiserver/go.sum @@ -53,8 +53,8 @@ github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sa github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= @@ -149,21 +149,19 @@ github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.1.0 h1:yJMy84ti9h/+OEWa752kBTKv4XC30OtVVHYv/8cTqKc= github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= -github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= -github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= -github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs= +github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= +github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= @@ -173,10 +171,11 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= -github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= -github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/cobra v1.10.0 h1:a5/WeUlSDCvV5a45ljW2ZFtV0bTDpkfSAj3uqB6Sc+0= +github.com/spf13/cobra v1.10.0/go.mod h1:9dhySC7dnTtEiqzmqfkLj47BslqLCUPMXjG2lj/NgoE= +github.com/spf13/pflag v1.0.8/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= @@ -192,8 +191,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= @@ -224,22 +223,22 @@ go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a go.opentelemetry.io/contrib/detectors/gcp v1.34.0/go.mod h1:cV4BMFcscUR/ckqLkbfQmF0PRsq8w/lMGzdbCSveBHo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q= -go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= -go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= +go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= +go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE= -go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= -go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= -go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= -go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= -go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= -go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= +go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= +go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= +go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= +go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= +go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= +go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= +go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -255,28 +254,28 @@ go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= -golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= +golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= +golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= -golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M= -golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= +golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= +golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -285,62 +284,63 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= -golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= +golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= +golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= +golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools/go/expect v0.1.0-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= -google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA= -google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a h1:v2PbRU4K3llS09c7zodFpNePeamkAwG3mPrAery9VeE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.72.2 h1:TdbGzwb82ty4OusHWepvFWGLgIbNo1/SUynEN0ssqv8= +google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= -gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/go-jose/go-jose.v2 v2.6.3 h1:nt80fvSDlhKWQgSWyHyy5CfmlQr+asih51R8PTWNKKs= gopkg.in/go-jose/go-jose.v2 v2.6.3/go.mod h1:zzZDPkNNw/c9IE7Z9jr11mBZQhKQTMzoEEIoEdZlFBI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= diff --git a/staging/src/k8s.io/apiserver/pkg/admission/initializer/initializer.go b/staging/src/k8s.io/apiserver/pkg/admission/initializer/initializer.go index 21ee8c801219b..b7880296896f2 100644 --- a/staging/src/k8s.io/apiserver/pkg/admission/initializer/initializer.go +++ b/staging/src/k8s.io/apiserver/pkg/admission/initializer/initializer.go @@ -23,6 +23,7 @@ import ( "k8s.io/client-go/dynamic" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" + "k8s.io/component-base/compatibility" "k8s.io/component-base/featuregate" ) @@ -32,6 +33,7 @@ type pluginInitializer struct { externalInformers informers.SharedInformerFactory authorizer authorizer.Authorizer featureGates featuregate.FeatureGate + effectiveVersion compatibility.EffectiveVersion stopCh <-chan struct{} restMapper meta.RESTMapper } @@ -45,6 +47,7 @@ func New( extInformers informers.SharedInformerFactory, authz authorizer.Authorizer, featureGates featuregate.FeatureGate, + effectiveVersion compatibility.EffectiveVersion, stopCh <-chan struct{}, restMapper meta.RESTMapper, ) pluginInitializer { @@ -54,6 +57,7 @@ func New( externalInformers: extInformers, authorizer: authz, featureGates: featureGates, + effectiveVersion: effectiveVersion, stopCh: stopCh, restMapper: restMapper, } @@ -68,6 +72,9 @@ func (i pluginInitializer) Initialize(plugin admission.Interface) { } // Second tell the plugin about enabled features, so it can decide whether to start informers or not + if wants, ok := plugin.(WantsEffectiveVersion); ok { + wants.InspectEffectiveVersion(i.effectiveVersion) + } if wants, ok := plugin.(WantsFeatures); ok { wants.InspectFeatureGates(i.featureGates) } diff --git a/staging/src/k8s.io/apiserver/pkg/admission/initializer/initializer_test.go b/staging/src/k8s.io/apiserver/pkg/admission/initializer/initializer_test.go index d80ce6dd431f5..d503001d650b6 100644 --- a/staging/src/k8s.io/apiserver/pkg/admission/initializer/initializer_test.go +++ b/staging/src/k8s.io/apiserver/pkg/admission/initializer/initializer_test.go @@ -34,7 +34,7 @@ import ( // TestWantsAuthorizer ensures that the authorizer is injected // when the WantsAuthorizer interface is implemented by a plugin. func TestWantsAuthorizer(t *testing.T) { - target := initializer.New(nil, nil, nil, &TestAuthorizer{}, nil, nil, nil) + target := initializer.New(nil, nil, nil, &TestAuthorizer{}, nil, nil, nil, nil) wantAuthorizerAdmission := &WantAuthorizerAdmission{} target.Initialize(wantAuthorizerAdmission) if wantAuthorizerAdmission.auth == nil { @@ -46,7 +46,7 @@ func TestWantsAuthorizer(t *testing.T) { // when the WantsExternalKubeClientSet interface is implemented by a plugin. func TestWantsExternalKubeClientSet(t *testing.T) { cs := &fake.Clientset{} - target := initializer.New(cs, nil, nil, &TestAuthorizer{}, nil, nil, nil) + target := initializer.New(cs, nil, nil, &TestAuthorizer{}, nil, nil, nil, nil) wantExternalKubeClientSet := &WantExternalKubeClientSet{} target.Initialize(wantExternalKubeClientSet) if wantExternalKubeClientSet.cs != cs { @@ -59,7 +59,7 @@ func TestWantsExternalKubeClientSet(t *testing.T) { func TestWantsExternalKubeInformerFactory(t *testing.T) { cs := &fake.Clientset{} sf := informers.NewSharedInformerFactory(cs, time.Duration(1)*time.Second) - target := initializer.New(cs, nil, sf, &TestAuthorizer{}, nil, nil, nil) + target := initializer.New(cs, nil, sf, &TestAuthorizer{}, nil, nil, nil, nil) wantExternalKubeInformerFactory := &WantExternalKubeInformerFactory{} target.Initialize(wantExternalKubeInformerFactory) if wantExternalKubeInformerFactory.sf != sf { @@ -71,7 +71,7 @@ func TestWantsExternalKubeInformerFactory(t *testing.T) { // when the WantsShutdownSignal interface is implemented by a plugin. func TestWantsShutdownNotification(t *testing.T) { stopCh := make(chan struct{}) - target := initializer.New(nil, nil, nil, &TestAuthorizer{}, nil, stopCh, nil) + target := initializer.New(nil, nil, nil, &TestAuthorizer{}, nil, nil, stopCh, nil) wantDrainedNotification := &WantDrainedNotification{} target.Initialize(wantDrainedNotification) if wantDrainedNotification.stopCh == nil { @@ -153,7 +153,7 @@ func (t *TestAuthorizer) Authorize(ctx context.Context, a authorizer.Attributes) } func TestRESTMapperAdmissionPlugin(t *testing.T) { - initializer := initializer.New(nil, nil, nil, &TestAuthorizer{}, nil, nil, &doNothingRESTMapper{}) + initializer := initializer.New(nil, nil, nil, &TestAuthorizer{}, nil, nil, nil, &doNothingRESTMapper{}) wantsRESTMapperAdmission := &WantsRESTMapperAdmissionPlugin{} initializer.Initialize(wantsRESTMapperAdmission) diff --git a/staging/src/k8s.io/apiserver/pkg/admission/initializer/interfaces.go b/staging/src/k8s.io/apiserver/pkg/admission/initializer/interfaces.go index 21202bd7920d4..a66d62dff06ba 100644 --- a/staging/src/k8s.io/apiserver/pkg/admission/initializer/interfaces.go +++ b/staging/src/k8s.io/apiserver/pkg/admission/initializer/interfaces.go @@ -26,6 +26,7 @@ import ( "k8s.io/client-go/dynamic" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" + "k8s.io/component-base/compatibility" "k8s.io/component-base/featuregate" ) @@ -73,6 +74,12 @@ type WantsFeatures interface { admission.InitializationValidator } +// WantsEffectiveVersion defines a function which passes the effective version for inspection by an admission plugin. +type WantsEffectiveVersion interface { + InspectEffectiveVersion(compatibility.EffectiveVersion) + admission.InitializationValidator +} + type WantsDynamicClient interface { SetDynamicClient(dynamic.Interface) admission.InitializationValidator diff --git a/staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission_test.go b/staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission_test.go index 22c693d2dd133..ea6a10218d64d 100644 --- a/staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission_test.go +++ b/staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission_test.go @@ -24,6 +24,7 @@ import ( "time" "github.com/google/go-cmp/cmp" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -53,7 +54,7 @@ func newHandlerForTestWithClock(c clientset.Interface, cacheClock clock.Clock) ( if err != nil { return nil, f, err } - pluginInitializer := kubeadmission.New(c, nil, f, nil, nil, nil, nil) + pluginInitializer := kubeadmission.New(c, nil, f, nil, nil, nil, nil, nil) pluginInitializer.Initialize(handler) err = admission.ValidateInitialization(handler) return handler, f, err diff --git a/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_matcher.go b/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_matcher.go index d243b0710bc95..df21466cbe412 100644 --- a/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_matcher.go +++ b/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_matcher.go @@ -45,6 +45,8 @@ type PolicyMatcher interface { GetNamespace(name string) (*corev1.Namespace, error) } +var errNilSelector = "a nil %s selector was passed, please ensure selectors are initialized properly" + type matcher struct { Matcher *matching.Matcher } @@ -66,6 +68,13 @@ func (c *matcher) DefinitionMatches(a admission.Attributes, o admission.ObjectIn if constraints == nil { return false, schema.GroupVersionResource{}, schema.GroupVersionKind{}, fmt.Errorf("policy contained no match constraints, a required field") } + if constraints.NamespaceSelector == nil { + return false, schema.GroupVersionResource{}, schema.GroupVersionKind{}, fmt.Errorf(errNilSelector, "namespace") + } + if constraints.ObjectSelector == nil { + return false, schema.GroupVersionResource{}, schema.GroupVersionKind{}, fmt.Errorf(errNilSelector, "object") + } + criteria := matchCriteria{constraints: constraints} return c.Matcher.Matches(a, o, &criteria) } @@ -76,6 +85,12 @@ func (c *matcher) BindingMatches(a admission.Attributes, o admission.ObjectInter if matchResources == nil { return true, nil } + if matchResources.NamespaceSelector == nil { + return false, fmt.Errorf(errNilSelector, "namespace") + } + if matchResources.ObjectSelector == nil { + return false, fmt.Errorf(errNilSelector, "object") + } criteria := matchCriteria{constraints: matchResources} isMatch, _, _, err := c.Matcher.Matches(a, o, &criteria) diff --git a/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_source.go b/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_source.go index ca6cdc884fc77..672e56c65a7a8 100644 --- a/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_source.go +++ b/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_source.go @@ -145,7 +145,7 @@ func (s *policySource[P, B, E]) Run(ctx context.Context) error { // Wait for initial cache sync of policies and informers before reconciling // any - if !cache.WaitForNamedCacheSync(fmt.Sprintf("%T", s), ctx.Done(), s.UpstreamHasSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, s.UpstreamHasSynced) { err := ctx.Err() if err == nil { err = fmt.Errorf("initial cache sync for %T failed", s) diff --git a/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_test_context.go b/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_test_context.go index d9a737a60ae70..4ad4c6343ac70 100644 --- a/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_test_context.go +++ b/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_test_context.go @@ -45,6 +45,7 @@ import ( "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/admission/initializer" "k8s.io/apiserver/pkg/authorization/authorizer" + "k8s.io/apiserver/pkg/util/compatibility" ) // Logger allows t.Testing and b.Testing to be passed to PolicyTestContext @@ -203,6 +204,7 @@ func NewPolicyTestContext[P, B runtime.Object, E Evaluator]( plugin.SetEnabled(true) featureGate := featuregate.NewFeatureGate() + effectiveVersion := compatibility.DefaultBuildEffectiveVersion() testContext, testCancel := context.WithCancel(context.Background()) genericInitializer := initializer.New( nativeClient, @@ -210,6 +212,7 @@ func NewPolicyTestContext[P, B runtime.Object, E Evaluator]( fakeInformerFactory, fakeAuthorizer{}, featureGate, + effectiveVersion, testContext.Done(), fakeRestMapper, ) diff --git a/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/internal/generic/controller.go b/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/internal/generic/controller.go index f08e1cc559837..a94004c272dff 100644 --- a/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/internal/generic/controller.go +++ b/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/internal/generic/controller.go @@ -174,7 +174,7 @@ func (c *controller[T]) Run(ctx context.Context) error { // Wait for initial cache list to complete before beginning to reconcile // objects. - if !cache.WaitForNamedCacheSync(c.options.Name, ctx.Done(), c.informer.HasSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.informer.HasSynced) { // ctx cancelled during cache sync. return early err := ctx.Err() if err == nil { diff --git a/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/doc.go b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/doc.go index 6c719b8472948..7e4e08af12466 100644 --- a/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/doc.go +++ b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/doc.go @@ -19,6 +19,7 @@ limitations under the License. // +k8s:conversion-gen=k8s.io/apiserver/pkg/apis/audit // +k8s:openapi-gen=true // +k8s:defaulter-gen=TypeMeta +// +k8s:openapi-model-package=io.k8s.apiserver.pkg.apis.audit.v1 // +groupName=audit.k8s.io diff --git a/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/generated.pb.go b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/generated.pb.go index 27dab8c09ba1b..27e7ab6920333 100644 --- a/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/generated.pb.go +++ b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/generated.pb.go @@ -23,14 +23,12 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v1 "k8s.io/api/authentication/v1" v11 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" @@ -38,311 +36,19 @@ import ( k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *Event) Reset() { *m = Event{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *EventList) Reset() { *m = EventList{} } -func (m *Event) Reset() { *m = Event{} } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_62937bb89ca7b6dd, []int{0} -} -func (m *Event) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(m, src) -} -func (m *Event) XXX_Size() int { - return m.Size() -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Event proto.InternalMessageInfo - -func (m *EventList) Reset() { *m = EventList{} } -func (*EventList) ProtoMessage() {} -func (*EventList) Descriptor() ([]byte, []int) { - return fileDescriptor_62937bb89ca7b6dd, []int{1} -} -func (m *EventList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EventList) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventList.Merge(m, src) -} -func (m *EventList) XXX_Size() int { - return m.Size() -} -func (m *EventList) XXX_DiscardUnknown() { - xxx_messageInfo_EventList.DiscardUnknown(m) -} - -var xxx_messageInfo_EventList proto.InternalMessageInfo - -func (m *GroupResources) Reset() { *m = GroupResources{} } -func (*GroupResources) ProtoMessage() {} -func (*GroupResources) Descriptor() ([]byte, []int) { - return fileDescriptor_62937bb89ca7b6dd, []int{2} -} -func (m *GroupResources) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GroupResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GroupResources) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupResources.Merge(m, src) -} -func (m *GroupResources) XXX_Size() int { - return m.Size() -} -func (m *GroupResources) XXX_DiscardUnknown() { - xxx_messageInfo_GroupResources.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupResources proto.InternalMessageInfo - -func (m *ObjectReference) Reset() { *m = ObjectReference{} } -func (*ObjectReference) ProtoMessage() {} -func (*ObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_62937bb89ca7b6dd, []int{3} -} -func (m *ObjectReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ObjectReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectReference.Merge(m, src) -} -func (m *ObjectReference) XXX_Size() int { - return m.Size() -} -func (m *ObjectReference) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectReference.DiscardUnknown(m) -} +func (m *GroupResources) Reset() { *m = GroupResources{} } -var xxx_messageInfo_ObjectReference proto.InternalMessageInfo +func (m *ObjectReference) Reset() { *m = ObjectReference{} } -func (m *Policy) Reset() { *m = Policy{} } -func (*Policy) ProtoMessage() {} -func (*Policy) Descriptor() ([]byte, []int) { - return fileDescriptor_62937bb89ca7b6dd, []int{4} -} -func (m *Policy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Policy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Policy) XXX_Merge(src proto.Message) { - xxx_messageInfo_Policy.Merge(m, src) -} -func (m *Policy) XXX_Size() int { - return m.Size() -} -func (m *Policy) XXX_DiscardUnknown() { - xxx_messageInfo_Policy.DiscardUnknown(m) -} +func (m *Policy) Reset() { *m = Policy{} } -var xxx_messageInfo_Policy proto.InternalMessageInfo +func (m *PolicyList) Reset() { *m = PolicyList{} } -func (m *PolicyList) Reset() { *m = PolicyList{} } -func (*PolicyList) ProtoMessage() {} -func (*PolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_62937bb89ca7b6dd, []int{5} -} -func (m *PolicyList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PolicyList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PolicyList.Merge(m, src) -} -func (m *PolicyList) XXX_Size() int { - return m.Size() -} -func (m *PolicyList) XXX_DiscardUnknown() { - xxx_messageInfo_PolicyList.DiscardUnknown(m) -} - -var xxx_messageInfo_PolicyList proto.InternalMessageInfo - -func (m *PolicyRule) Reset() { *m = PolicyRule{} } -func (*PolicyRule) ProtoMessage() {} -func (*PolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_62937bb89ca7b6dd, []int{6} -} -func (m *PolicyRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PolicyRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_PolicyRule.Merge(m, src) -} -func (m *PolicyRule) XXX_Size() int { - return m.Size() -} -func (m *PolicyRule) XXX_DiscardUnknown() { - xxx_messageInfo_PolicyRule.DiscardUnknown(m) -} - -var xxx_messageInfo_PolicyRule proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Event)(nil), "k8s.io.apiserver.pkg.apis.audit.v1.Event") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.apiserver.pkg.apis.audit.v1.Event.AnnotationsEntry") - proto.RegisterType((*EventList)(nil), "k8s.io.apiserver.pkg.apis.audit.v1.EventList") - proto.RegisterType((*GroupResources)(nil), "k8s.io.apiserver.pkg.apis.audit.v1.GroupResources") - proto.RegisterType((*ObjectReference)(nil), "k8s.io.apiserver.pkg.apis.audit.v1.ObjectReference") - proto.RegisterType((*Policy)(nil), "k8s.io.apiserver.pkg.apis.audit.v1.Policy") - proto.RegisterType((*PolicyList)(nil), "k8s.io.apiserver.pkg.apis.audit.v1.PolicyList") - proto.RegisterType((*PolicyRule)(nil), "k8s.io.apiserver.pkg.apis.audit.v1.PolicyRule") -} - -func init() { - proto.RegisterFile("k8s.io/apiserver/pkg/apis/audit/v1/generated.proto", fileDescriptor_62937bb89ca7b6dd) -} - -var fileDescriptor_62937bb89ca7b6dd = []byte{ - // 1275 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcf, 0x6f, 0x1b, 0xd5, - 0x13, 0xcf, 0xc6, 0x71, 0x63, 0x8f, 0x1b, 0xc7, 0x79, 0xed, 0xf7, 0xdb, 0x25, 0x07, 0xdb, 0x18, - 0x09, 0x05, 0x08, 0xeb, 0xd6, 0x14, 0x5a, 0x55, 0x02, 0xc9, 0xa6, 0xa5, 0xb5, 0xd4, 0xa6, 0xd1, - 0x33, 0xee, 0x01, 0x71, 0xe8, 0x7a, 0x3d, 0xb5, 0x97, 0xd8, 0xbb, 0xdb, 0x7d, 0x6f, 0x8d, 0x72, - 0xe3, 0x1f, 0x40, 0xe2, 0xce, 0x7f, 0xc1, 0x0d, 0x71, 0xe2, 0x96, 0x63, 0x8f, 0x3d, 0x59, 0xc4, - 0xf0, 0x57, 0xe4, 0x80, 0xd0, 0x7b, 0xfb, 0xf6, 0x87, 0x9d, 0x58, 0x71, 0x38, 0x70, 0xf3, 0x9b, - 0xf9, 0x7c, 0x3e, 0x33, 0x3b, 0x3b, 0x33, 0x6f, 0x0d, 0x8d, 0xa3, 0xfb, 0xcc, 0xb0, 0xdd, 0xba, - 0xe9, 0xd9, 0x0c, 0xfd, 0x09, 0xfa, 0x75, 0xef, 0x68, 0x20, 0x4f, 0x75, 0x33, 0xe8, 0xdb, 0xbc, - 0x3e, 0xb9, 0x53, 0x1f, 0xa0, 0x83, 0xbe, 0xc9, 0xb1, 0x6f, 0x78, 0xbe, 0xcb, 0x5d, 0x52, 0x0b, - 0x39, 0x46, 0xcc, 0x31, 0xbc, 0xa3, 0x81, 0x3c, 0x19, 0x92, 0x63, 0x4c, 0xee, 0xec, 0x7e, 0x3c, - 0xb0, 0xf9, 0x30, 0xe8, 0x19, 0x96, 0x3b, 0xae, 0x0f, 0xdc, 0x81, 0x5b, 0x97, 0xd4, 0x5e, 0xf0, - 0x4a, 0x9e, 0xe4, 0x41, 0xfe, 0x0a, 0x25, 0x77, 0xf7, 0x93, 0x34, 0xea, 0x66, 0xc0, 0x87, 0xe8, - 0x70, 0xdb, 0x32, 0xb9, 0xed, 0x3a, 0x17, 0x24, 0xb0, 0x7b, 0x37, 0x41, 0x8f, 0x4d, 0x6b, 0x68, - 0x3b, 0xe8, 0x1f, 0x27, 0x79, 0x8f, 0x91, 0x9b, 0x17, 0xb1, 0xea, 0xcb, 0x58, 0x7e, 0xe0, 0x70, - 0x7b, 0x8c, 0xe7, 0x08, 0x9f, 0x5d, 0x46, 0x60, 0xd6, 0x10, 0xc7, 0xe6, 0x22, 0xaf, 0xf6, 0x17, - 0x40, 0xf6, 0xd1, 0x04, 0x1d, 0x4e, 0xf6, 0x21, 0x3b, 0xc2, 0x09, 0x8e, 0x74, 0xad, 0xaa, 0xed, - 0xe5, 0x5b, 0xff, 0x3f, 0x99, 0x56, 0xd6, 0x66, 0xd3, 0x4a, 0xf6, 0xa9, 0x30, 0x9e, 0x45, 0x3f, - 0x68, 0x08, 0x22, 0x07, 0xb0, 0x29, 0xeb, 0xd7, 0x7e, 0xa8, 0xaf, 0x4b, 0xfc, 0x5d, 0x85, 0xdf, - 0x6c, 0x86, 0xe6, 0xb3, 0x69, 0xe5, 0xdd, 0x65, 0x39, 0xf1, 0x63, 0x0f, 0x99, 0xd1, 0x6d, 0x3f, - 0xa4, 0x91, 0x88, 0x88, 0xce, 0xb8, 0x39, 0x40, 0x3d, 0x33, 0x1f, 0xbd, 0x23, 0x8c, 0x67, 0xd1, - 0x0f, 0x1a, 0x82, 0x48, 0x03, 0xc0, 0xc7, 0xd7, 0x01, 0x32, 0xde, 0xa5, 0x6d, 0x7d, 0x43, 0x52, - 0x88, 0xa2, 0x00, 0x8d, 0x3d, 0x34, 0x85, 0x22, 0x55, 0xd8, 0x98, 0xa0, 0xdf, 0xd3, 0xb3, 0x12, - 0x7d, 0x5d, 0xa1, 0x37, 0x5e, 0xa0, 0xdf, 0xa3, 0xd2, 0x43, 0x9e, 0xc0, 0x46, 0xc0, 0xd0, 0xd7, - 0xaf, 0x55, 0xb5, 0xbd, 0x42, 0xe3, 0x7d, 0x23, 0x69, 0x1d, 0x63, 0xfe, 0x3d, 0x1b, 0x93, 0x3b, - 0x46, 0x97, 0xa1, 0xdf, 0x76, 0x5e, 0xb9, 0x89, 0x92, 0xb0, 0x50, 0xa9, 0x40, 0x86, 0x50, 0xb2, - 0xc7, 0x1e, 0xfa, 0xcc, 0x75, 0x44, 0xad, 0x85, 0x47, 0xdf, 0xbc, 0x92, 0xea, 0xcd, 0xd9, 0xb4, - 0x52, 0x6a, 0x2f, 0x68, 0xd0, 0x73, 0xaa, 0xe4, 0x23, 0xc8, 0x33, 0x37, 0xf0, 0x2d, 0x6c, 0x1f, - 0x32, 0x3d, 0x57, 0xcd, 0xec, 0xe5, 0x5b, 0x5b, 0xb3, 0x69, 0x25, 0xdf, 0x89, 0x8c, 0x34, 0xf1, - 0x93, 0x3a, 0xe4, 0x45, 0x7a, 0xcd, 0x01, 0x3a, 0x5c, 0x2f, 0xc9, 0x3a, 0xec, 0xa8, 0xec, 0xf3, - 0xdd, 0xc8, 0x41, 0x13, 0x0c, 0x79, 0x09, 0x79, 0xb7, 0xf7, 0x1d, 0x5a, 0x9c, 0xe2, 0x2b, 0x3d, - 0x2f, 0x1f, 0xe0, 0x13, 0xe3, 0xf2, 0x89, 0x32, 0x9e, 0x47, 0x24, 0xf4, 0xd1, 0xb1, 0x30, 0x4c, - 0x29, 0x36, 0xd2, 0x44, 0x94, 0x0c, 0xa1, 0xe8, 0x23, 0xf3, 0x5c, 0x87, 0x61, 0x87, 0x9b, 0x3c, - 0x60, 0x3a, 0xc8, 0x30, 0xfb, 0xa9, 0x30, 0x71, 0xf3, 0x24, 0x91, 0xc4, 0xdc, 0x88, 0x40, 0x21, - 0xa7, 0x45, 0x66, 0xd3, 0x4a, 0x91, 0xce, 0xe9, 0xd0, 0x05, 0x5d, 0x62, 0xc2, 0x96, 0xea, 0x86, - 0x30, 0x11, 0xbd, 0x20, 0x03, 0xed, 0x2d, 0x0d, 0xa4, 0x26, 0xc7, 0xe8, 0x3a, 0x47, 0x8e, 0xfb, - 0xbd, 0xd3, 0xda, 0x99, 0x4d, 0x2b, 0x5b, 0x34, 0x2d, 0x41, 0xe7, 0x15, 0x49, 0x3f, 0x79, 0x18, - 0x15, 0xe3, 0xfa, 0x15, 0x63, 0xcc, 0x3d, 0x88, 0x0a, 0xb2, 0xa0, 0x49, 0x7e, 0xd4, 0x40, 0x57, - 0x71, 0x29, 0x5a, 0x68, 0x4f, 0xb0, 0xff, 0xb5, 0x3d, 0x46, 0xc6, 0xcd, 0xb1, 0xa7, 0x6f, 0xc9, - 0x80, 0xf5, 0xd5, 0xaa, 0xf7, 0xcc, 0xb6, 0x7c, 0x57, 0x70, 0x5b, 0x55, 0xd5, 0x06, 0x3a, 0x5d, - 0x22, 0x4c, 0x97, 0x86, 0x24, 0x2e, 0x14, 0xe5, 0x54, 0x26, 0x49, 0x14, 0xff, 0x5d, 0x12, 0xd1, - 0xd0, 0x17, 0x3b, 0x73, 0x72, 0x74, 0x41, 0x9e, 0xbc, 0x86, 0x82, 0xe9, 0x38, 0x2e, 0x97, 0x53, - 0xc3, 0xf4, 0xed, 0x6a, 0x66, 0xaf, 0xd0, 0x78, 0xb0, 0x4a, 0x5f, 0xca, 0x4d, 0x67, 0x34, 0x13, - 0xf2, 0x23, 0x87, 0xfb, 0xc7, 0xad, 0x1b, 0x2a, 0x70, 0x21, 0xe5, 0xa1, 0xe9, 0x18, 0xbb, 0x5f, - 0x40, 0x69, 0x91, 0x45, 0x4a, 0x90, 0x39, 0xc2, 0xe3, 0x70, 0x5d, 0x52, 0xf1, 0x93, 0xdc, 0x84, - 0xec, 0xc4, 0x1c, 0x05, 0x18, 0xae, 0x44, 0x1a, 0x1e, 0x1e, 0xac, 0xdf, 0xd7, 0x6a, 0xbf, 0x6a, - 0x90, 0x97, 0xc1, 0x9f, 0xda, 0x8c, 0x93, 0x6f, 0x21, 0x27, 0x9e, 0xbe, 0x6f, 0x72, 0x53, 0xd2, - 0x0b, 0x0d, 0x63, 0xb5, 0x5a, 0x09, 0xf6, 0x33, 0xe4, 0x66, 0xab, 0xa4, 0x32, 0xce, 0x45, 0x16, - 0x1a, 0x2b, 0x92, 0x03, 0xc8, 0xda, 0x1c, 0xc7, 0x4c, 0x5f, 0x97, 0x85, 0xf9, 0x60, 0xe5, 0xc2, - 0xb4, 0xb6, 0xa2, 0xad, 0xdb, 0x16, 0x7c, 0x1a, 0xca, 0xd4, 0x7e, 0xd6, 0xa0, 0xf8, 0xd8, 0x77, - 0x03, 0x8f, 0x62, 0xb8, 0x4a, 0x18, 0x79, 0x0f, 0xb2, 0x03, 0x61, 0x51, 0x77, 0x45, 0xcc, 0x0b, - 0x61, 0xa1, 0x4f, 0xac, 0x26, 0x3f, 0x62, 0xc8, 0x5c, 0xd4, 0x6a, 0x8a, 0x65, 0x68, 0xe2, 0x27, - 0xf7, 0xc4, 0x74, 0x86, 0x87, 0x03, 0x73, 0x8c, 0x4c, 0xcf, 0x48, 0x82, 0x9a, 0xb9, 0x94, 0x83, - 0xce, 0xe3, 0x6a, 0xbf, 0x64, 0x60, 0x7b, 0x61, 0xdd, 0x90, 0x7d, 0xc8, 0x45, 0x20, 0x95, 0x61, - 0x5c, 0xaf, 0x48, 0x8b, 0xc6, 0x08, 0xb1, 0x15, 0x1d, 0x21, 0xe5, 0x99, 0x96, 0x7a, 0x73, 0xc9, - 0x56, 0x3c, 0x88, 0x1c, 0x34, 0xc1, 0x88, 0x9b, 0x44, 0x1c, 0xd4, 0x55, 0x15, 0xef, 0x7f, 0x81, - 0xa5, 0xd2, 0x43, 0x5a, 0x90, 0x09, 0xec, 0xbe, 0xba, 0x98, 0x6e, 0x2b, 0x40, 0xa6, 0xbb, 0xea, - 0xad, 0x28, 0xc8, 0xe2, 0x21, 0x4c, 0xcf, 0x96, 0x15, 0x55, 0x77, 0x56, 0xfc, 0x10, 0xcd, 0xc3, - 0x76, 0x58, 0xe9, 0x18, 0x21, 0x6e, 0x44, 0xd3, 0xb3, 0x5f, 0xa0, 0xcf, 0x6c, 0xd7, 0x91, 0x37, - 0x58, 0xea, 0x46, 0x6c, 0x1e, 0xb6, 0x95, 0x87, 0xa6, 0x50, 0xa4, 0x09, 0xdb, 0x51, 0x11, 0x22, - 0xe2, 0xa6, 0x24, 0xde, 0x52, 0xc4, 0x6d, 0x3a, 0xef, 0xa6, 0x8b, 0x78, 0xf2, 0x29, 0x14, 0x58, - 0xd0, 0x8b, 0x8b, 0x9d, 0x93, 0xf4, 0x78, 0x9c, 0x3a, 0x89, 0x8b, 0xa6, 0x71, 0xb5, 0xdf, 0xd7, - 0xe1, 0xda, 0xa1, 0x3b, 0xb2, 0xad, 0x63, 0xf2, 0xf2, 0xdc, 0x2c, 0xdc, 0x5e, 0x6d, 0x16, 0xc2, - 0x97, 0x2e, 0xa7, 0x21, 0x7e, 0xd0, 0xc4, 0x96, 0x9a, 0x87, 0x0e, 0x64, 0xfd, 0x60, 0x84, 0xd1, - 0x3c, 0x18, 0xab, 0xcc, 0x43, 0x98, 0x1c, 0x0d, 0x46, 0x98, 0x34, 0xb7, 0x38, 0x31, 0x1a, 0x6a, - 0x91, 0x7b, 0x00, 0xee, 0xd8, 0xe6, 0x72, 0x53, 0x45, 0xcd, 0x7a, 0x4b, 0xa6, 0x10, 0x5b, 0x93, - 0xaf, 0x96, 0x14, 0x94, 0x3c, 0x86, 0x1d, 0x71, 0x7a, 0x66, 0x3a, 0xe6, 0x00, 0xfb, 0x5f, 0xd9, - 0x38, 0xea, 0x33, 0xd9, 0x28, 0xb9, 0xd6, 0x3b, 0x2a, 0xd2, 0xce, 0xf3, 0x45, 0x00, 0x3d, 0xcf, - 0xa9, 0xfd, 0xa6, 0x01, 0x84, 0x69, 0xfe, 0x07, 0x3b, 0xe5, 0xf9, 0xfc, 0x4e, 0xf9, 0x70, 0xf5, - 0x1a, 0x2e, 0x59, 0x2a, 0x7f, 0x67, 0xa2, 0xec, 0x45, 0x59, 0xaf, 0xf8, 0xf1, 0x59, 0x81, 0xac, - 0xf8, 0x46, 0x89, 0xb6, 0x4a, 0x5e, 0x20, 0xc5, 0xf7, 0x0b, 0xa3, 0xa1, 0x9d, 0x18, 0x00, 0xe2, - 0x87, 0x1c, 0x8d, 0xe8, 0xed, 0x14, 0xc5, 0xdb, 0xe9, 0xc6, 0x56, 0x9a, 0x42, 0x08, 0x41, 0xf1, - 0x05, 0x28, 0x5e, 0x44, 0x2c, 0x28, 0x3e, 0x0c, 0x19, 0x0d, 0xed, 0xc4, 0x4a, 0xef, 0xb2, 0xac, - 0xac, 0x41, 0x63, 0x95, 0x1a, 0xcc, 0xef, 0xcd, 0x64, 0xaf, 0x5c, 0xb8, 0x03, 0x0d, 0x80, 0x78, - 0xc9, 0x30, 0xfd, 0x5a, 0x92, 0x75, 0xbc, 0x85, 0x18, 0x4d, 0x21, 0xc8, 0xe7, 0xb0, 0xed, 0xb8, - 0x4e, 0x24, 0xd5, 0xa5, 0x4f, 0x99, 0xbe, 0x29, 0x49, 0x37, 0xc4, 0xec, 0x1e, 0xcc, 0xbb, 0xe8, - 0x22, 0x76, 0xa1, 0x85, 0x73, 0xab, 0xb7, 0xf0, 0x97, 0x17, 0xb5, 0x70, 0x5e, 0xb6, 0xf0, 0xff, - 0x56, 0x6d, 0xdf, 0xd6, 0x93, 0x93, 0xd3, 0xf2, 0xda, 0x9b, 0xd3, 0xf2, 0xda, 0xdb, 0xd3, 0xf2, - 0xda, 0x0f, 0xb3, 0xb2, 0x76, 0x32, 0x2b, 0x6b, 0x6f, 0x66, 0x65, 0xed, 0xed, 0xac, 0xac, 0xfd, - 0x31, 0x2b, 0x6b, 0x3f, 0xfd, 0x59, 0x5e, 0xfb, 0xa6, 0x76, 0xf9, 0x5f, 0xbe, 0x7f, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x81, 0x06, 0x4f, 0x58, 0x17, 0x0e, 0x00, 0x00, -} +func (m *PolicyRule) Reset() { *m = PolicyRule{} } func (m *Event) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -376,7 +82,7 @@ func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.Annotations { keysForAnnotations = append(keysForAnnotations, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + sort.Strings(keysForAnnotations) for iNdEx := len(keysForAnnotations) - 1; iNdEx >= 0; iNdEx-- { v := m.Annotations[string(keysForAnnotations[iNdEx])] baseI := i @@ -1143,7 +849,7 @@ func (this *Event) String() string { for k := range this.Annotations { keysForAnnotations = append(keysForAnnotations, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + sort.Strings(keysForAnnotations) mapStringForAnnotations := "map[string]string{" for _, k := range keysForAnnotations { mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) diff --git a/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/generated.protomessage.pb.go b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..f2f1a056ddc63 --- /dev/null +++ b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/generated.protomessage.pb.go @@ -0,0 +1,36 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*Event) ProtoMessage() {} + +func (*EventList) ProtoMessage() {} + +func (*GroupResources) ProtoMessage() {} + +func (*ObjectReference) ProtoMessage() {} + +func (*Policy) ProtoMessage() {} + +func (*PolicyList) ProtoMessage() {} + +func (*PolicyRule) ProtoMessage() {} diff --git a/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.model_name.go b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.model_name.go new file mode 100644 index 0000000000000..ac4565d86d207 --- /dev/null +++ b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.model_name.go @@ -0,0 +1,57 @@ +//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 openapi-gen. DO NOT EDIT. + +package v1 + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Event) OpenAPIModelName() string { + return "io.k8s.apiserver.pkg.apis.audit.v1.Event" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in EventList) OpenAPIModelName() string { + return "io.k8s.apiserver.pkg.apis.audit.v1.EventList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GroupResources) OpenAPIModelName() string { + return "io.k8s.apiserver.pkg.apis.audit.v1.GroupResources" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in ObjectReference) OpenAPIModelName() string { + return "io.k8s.apiserver.pkg.apis.audit.v1.ObjectReference" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Policy) OpenAPIModelName() string { + return "io.k8s.apiserver.pkg.apis.audit.v1.Policy" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PolicyList) OpenAPIModelName() string { + return "io.k8s.apiserver.pkg.apis.audit.v1.PolicyList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in PolicyRule) OpenAPIModelName() string { + return "io.k8s.apiserver.pkg.apis.audit.v1.PolicyRule" +} diff --git a/staging/src/k8s.io/apiserver/pkg/apis/example/v1/generated.pb.go b/staging/src/k8s.io/apiserver/pkg/apis/example/v1/generated.pb.go index 494413a146b4c..15e75a3921936 100644 --- a/staging/src/k8s.io/apiserver/pkg/apis/example/v1/generated.pb.go +++ b/staging/src/k8s.io/apiserver/pkg/apis/example/v1/generated.pb.go @@ -23,249 +23,24 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *Pod) Reset() { *m = Pod{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *PodCondition) Reset() { *m = PodCondition{} } -func (m *Pod) Reset() { *m = Pod{} } -func (*Pod) ProtoMessage() {} -func (*Pod) Descriptor() ([]byte, []int) { - return fileDescriptor_c0604dbfc428ecfb, []int{0} -} -func (m *Pod) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Pod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Pod) XXX_Merge(src proto.Message) { - xxx_messageInfo_Pod.Merge(m, src) -} -func (m *Pod) XXX_Size() int { - return m.Size() -} -func (m *Pod) XXX_DiscardUnknown() { - xxx_messageInfo_Pod.DiscardUnknown(m) -} - -var xxx_messageInfo_Pod proto.InternalMessageInfo - -func (m *PodCondition) Reset() { *m = PodCondition{} } -func (*PodCondition) ProtoMessage() {} -func (*PodCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_c0604dbfc428ecfb, []int{1} -} -func (m *PodCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodCondition.Merge(m, src) -} -func (m *PodCondition) XXX_Size() int { - return m.Size() -} -func (m *PodCondition) XXX_DiscardUnknown() { - xxx_messageInfo_PodCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_PodCondition proto.InternalMessageInfo - -func (m *PodList) Reset() { *m = PodList{} } -func (*PodList) ProtoMessage() {} -func (*PodList) Descriptor() ([]byte, []int) { - return fileDescriptor_c0604dbfc428ecfb, []int{2} -} -func (m *PodList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodList.Merge(m, src) -} -func (m *PodList) XXX_Size() int { - return m.Size() -} -func (m *PodList) XXX_DiscardUnknown() { - xxx_messageInfo_PodList.DiscardUnknown(m) -} +func (m *PodList) Reset() { *m = PodList{} } -var xxx_messageInfo_PodList proto.InternalMessageInfo +func (m *PodSpec) Reset() { *m = PodSpec{} } -func (m *PodSpec) Reset() { *m = PodSpec{} } -func (*PodSpec) ProtoMessage() {} -func (*PodSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c0604dbfc428ecfb, []int{3} -} -func (m *PodSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodSpec.Merge(m, src) -} -func (m *PodSpec) XXX_Size() int { - return m.Size() -} -func (m *PodSpec) XXX_DiscardUnknown() { - xxx_messageInfo_PodSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_PodSpec proto.InternalMessageInfo - -func (m *PodStatus) Reset() { *m = PodStatus{} } -func (*PodStatus) ProtoMessage() {} -func (*PodStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c0604dbfc428ecfb, []int{4} -} -func (m *PodStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodStatus.Merge(m, src) -} -func (m *PodStatus) XXX_Size() int { - return m.Size() -} -func (m *PodStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PodStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PodStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Pod)(nil), "k8s.io.apiserver.pkg.apis.example.v1.Pod") - proto.RegisterType((*PodCondition)(nil), "k8s.io.apiserver.pkg.apis.example.v1.PodCondition") - proto.RegisterType((*PodList)(nil), "k8s.io.apiserver.pkg.apis.example.v1.PodList") - proto.RegisterType((*PodSpec)(nil), "k8s.io.apiserver.pkg.apis.example.v1.PodSpec") - proto.RegisterMapType((map[string]string)(nil), "k8s.io.apiserver.pkg.apis.example.v1.PodSpec.NodeSelectorEntry") - proto.RegisterType((*PodStatus)(nil), "k8s.io.apiserver.pkg.apis.example.v1.PodStatus") -} - -func init() { - proto.RegisterFile("k8s.io/apiserver/pkg/apis/example/v1/generated.proto", fileDescriptor_c0604dbfc428ecfb) -} - -var fileDescriptor_c0604dbfc428ecfb = []byte{ - // 1039 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcf, 0x6e, 0xdb, 0xc6, - 0x13, 0x36, 0x2d, 0xcb, 0x92, 0xd6, 0x56, 0x62, 0x6f, 0x62, 0x80, 0x31, 0x10, 0xc9, 0xd1, 0x2f, - 0x30, 0x9c, 0x1f, 0x1a, 0xb2, 0x36, 0xd2, 0x22, 0x6d, 0x0f, 0x41, 0x68, 0x17, 0xb5, 0x02, 0x47, - 0x26, 0x56, 0x06, 0x02, 0x14, 0x3d, 0x74, 0x45, 0x4e, 0x24, 0x56, 0x22, 0x97, 0x20, 0x57, 0x6a, - 0x75, 0xeb, 0x23, 0xb4, 0x0f, 0xd0, 0xa7, 0xe8, 0xa1, 0x40, 0x9f, 0xc0, 0xc7, 0x1c, 0x73, 0x12, - 0x6a, 0xf5, 0x2d, 0x7c, 0x2a, 0x76, 0xf9, 0x47, 0xa4, 0xa5, 0xba, 0xf2, 0x6d, 0x77, 0xe6, 0xfb, - 0xbe, 0x19, 0xcd, 0x0e, 0x67, 0x84, 0x5e, 0xf4, 0x5f, 0x86, 0x9a, 0xc3, 0x74, 0xea, 0x3b, 0x21, - 0x04, 0x23, 0x08, 0x74, 0xbf, 0xdf, 0x95, 0x37, 0x1d, 0x7e, 0xa2, 0xae, 0x3f, 0x00, 0x7d, 0x74, - 0xa8, 0x77, 0xc1, 0x83, 0x80, 0x72, 0xb0, 0x35, 0x3f, 0x60, 0x9c, 0xe1, 0xa7, 0x11, 0x4b, 0x4b, - 0x59, 0x9a, 0xdf, 0xef, 0xca, 0x9b, 0x16, 0xb3, 0xb4, 0xd1, 0xe1, 0xee, 0xf3, 0xae, 0xc3, 0x7b, - 0xc3, 0x8e, 0x66, 0x31, 0x57, 0xef, 0xb2, 0x2e, 0xd3, 0x25, 0xb9, 0x33, 0x7c, 0x2f, 0x6f, 0xf2, - 0x22, 0x4f, 0x91, 0xe8, 0x6e, 0x26, 0x15, 0x97, 0x5a, 0x3d, 0xc7, 0x83, 0x60, 0x3c, 0xcb, 0xc6, - 0x05, 0x4e, 0x17, 0xa4, 0xb2, 0xab, 0xff, 0x1b, 0x2b, 0x18, 0x7a, 0xdc, 0x71, 0x61, 0x8e, 0xf0, - 0xf9, 0x7f, 0x11, 0x42, 0xab, 0x07, 0x2e, 0xbd, 0xc9, 0x6b, 0xfc, 0xba, 0x8a, 0x0a, 0x26, 0xb3, - 0xf1, 0xf7, 0xa8, 0x2c, 0x72, 0xb1, 0x29, 0xa7, 0xaa, 0xb2, 0xa7, 0x1c, 0x6c, 0x1c, 0x7d, 0xaa, - 0xcd, 0xca, 0x91, 0x4a, 0xce, 0x2a, 0x22, 0xd0, 0xda, 0xe8, 0x50, 0x3b, 0xef, 0xfc, 0x00, 0x16, - 0x7f, 0x0b, 0x9c, 0x1a, 0xf8, 0x72, 0x52, 0x5f, 0x99, 0x4e, 0xea, 0x68, 0x66, 0x23, 0xa9, 0x2a, - 0x3e, 0x47, 0x6b, 0xa1, 0x0f, 0x96, 0xba, 0x2a, 0xd5, 0x9f, 0x6b, 0xcb, 0x14, 0x5b, 0x33, 0x99, - 0xdd, 0xf6, 0xc1, 0x32, 0x36, 0x63, 0xe9, 0x35, 0x71, 0x23, 0x52, 0x08, 0xbf, 0x43, 0xeb, 0x21, - 0xa7, 0x7c, 0x18, 0xaa, 0x05, 0x29, 0xa9, 0x2f, 0x2f, 0x29, 0x69, 0xc6, 0xbd, 0x58, 0x74, 0x3d, - 0xba, 0x93, 0x58, 0xae, 0xf1, 0x7b, 0x01, 0x6d, 0x9a, 0xcc, 0x3e, 0x66, 0x9e, 0xed, 0x70, 0x87, - 0x79, 0xf8, 0x05, 0x5a, 0xe3, 0x63, 0x1f, 0x64, 0x61, 0x2a, 0xc6, 0x5e, 0x92, 0xcb, 0xc5, 0xd8, - 0x87, 0xeb, 0x49, 0x7d, 0x2b, 0x8b, 0x15, 0x36, 0x22, 0xd1, 0xf8, 0x8b, 0x34, 0xbf, 0x55, 0xc9, - 0x7b, 0x92, 0x0f, 0x77, 0x3d, 0xa9, 0xdf, 0x4f, 0x69, 0xf9, 0x0c, 0x70, 0x17, 0x55, 0x07, 0x34, - 0xe4, 0x66, 0xc0, 0x3a, 0x70, 0xe1, 0xb8, 0x10, 0xff, 0xc2, 0xff, 0x2f, 0xf7, 0x24, 0x82, 0x61, - 0xec, 0xc4, 0xd1, 0xaa, 0x67, 0x59, 0x21, 0x92, 0xd7, 0xc5, 0x23, 0x84, 0x85, 0xe1, 0x22, 0xa0, - 0x5e, 0x18, 0xe5, 0x2f, 0xa2, 0xad, 0xdd, 0x39, 0xda, 0x6e, 0x1c, 0x0d, 0x9f, 0xcd, 0xa9, 0x91, - 0x05, 0x11, 0xf0, 0x3e, 0x5a, 0x0f, 0x80, 0x86, 0xcc, 0x53, 0x8b, 0xb2, 0x36, 0xe9, 0x53, 0x10, - 0x69, 0x25, 0xb1, 0x17, 0x3f, 0x43, 0x25, 0x17, 0xc2, 0x90, 0x76, 0x41, 0x5d, 0x97, 0xc0, 0xfb, - 0x31, 0xb0, 0xf4, 0x36, 0x32, 0x93, 0xc4, 0xdf, 0xf8, 0x43, 0x41, 0x25, 0x93, 0xd9, 0x67, 0x4e, - 0xc8, 0xf1, 0x77, 0x73, 0xdd, 0xac, 0x2d, 0xf7, 0x63, 0x04, 0x5b, 0xf6, 0xf2, 0x56, 0x1c, 0xa7, - 0x9c, 0x58, 0x32, 0x9d, 0xdc, 0x42, 0x45, 0x87, 0x83, 0x2b, 0xde, 0xb5, 0x70, 0xb0, 0x71, 0xf4, - 0x6c, 0xe9, 0xbe, 0x33, 0xaa, 0xb1, 0x6a, 0xb1, 0x29, 0xf8, 0x24, 0x92, 0x69, 0xfc, 0x59, 0x92, - 0x99, 0x8b, 0xd6, 0xc6, 0x67, 0xa8, 0x1a, 0x40, 0xc8, 0x69, 0xc0, 0x4d, 0x36, 0x70, 0xac, 0xb1, - 0x7c, 0xf9, 0x8a, 0xb1, 0x9f, 0xbc, 0x26, 0xc9, 0x3a, 0xaf, 0x6f, 0x1a, 0x48, 0x9e, 0x8c, 0xbb, - 0xe8, 0x31, 0x87, 0xc0, 0x75, 0x3c, 0x2a, 0x2a, 0xff, 0x4d, 0x40, 0x2d, 0x30, 0x21, 0x70, 0x98, - 0xdd, 0x06, 0x8b, 0x79, 0x76, 0x28, 0x5f, 0xba, 0x60, 0x3c, 0x99, 0x4e, 0xea, 0x8f, 0x2f, 0x6e, - 0x03, 0x92, 0xdb, 0x75, 0xf0, 0x39, 0xda, 0xa1, 0x16, 0x77, 0x46, 0x70, 0x02, 0xd4, 0x1e, 0x38, - 0x1e, 0x24, 0x01, 0x8a, 0x32, 0xc0, 0xa3, 0xe9, 0xa4, 0xbe, 0xf3, 0x7a, 0x11, 0x80, 0x2c, 0xe6, - 0xe1, 0x31, 0xda, 0xf4, 0x98, 0x0d, 0x6d, 0x18, 0x80, 0xc5, 0x59, 0xa0, 0x96, 0x64, 0xa9, 0x5f, - 0xdd, 0x69, 0x6a, 0x68, 0xad, 0x8c, 0xc2, 0xd7, 0x1e, 0x0f, 0xc6, 0xc6, 0xc3, 0xb8, 0x8e, 0x9b, - 0x59, 0x17, 0xc9, 0x85, 0xc2, 0x6f, 0x10, 0x16, 0xda, 0x8e, 0x05, 0xaf, 0x2d, 0x8b, 0x0d, 0x3d, - 0xde, 0xa2, 0x2e, 0xa8, 0x65, 0xf9, 0x0e, 0x69, 0x9f, 0xb7, 0xe7, 0x10, 0x64, 0x01, 0x0b, 0x9f, - 0xa2, 0x7b, 0x79, 0xab, 0x5a, 0xc9, 0xcd, 0x10, 0xf5, 0x04, 0xfc, 0x00, 0x2c, 0x31, 0x90, 0xf3, - 0x8a, 0xe4, 0x06, 0x0f, 0x7f, 0x82, 0xca, 0x22, 0x4b, 0x99, 0x0b, 0x92, 0x1a, 0x69, 0x8b, 0xb6, - 0x62, 0x3b, 0x49, 0x11, 0xf8, 0x33, 0xb4, 0xd1, 0x63, 0x21, 0x6f, 0x01, 0xff, 0x91, 0x05, 0x7d, - 0x75, 0x63, 0x4f, 0x39, 0x28, 0x1b, 0x0f, 0x62, 0xc2, 0xc6, 0xe9, 0xcc, 0x45, 0xb2, 0x38, 0xf1, - 0xb9, 0x89, 0xab, 0xd9, 0x3c, 0x51, 0x37, 0x25, 0x25, 0xfd, 0xdc, 0x4e, 0x23, 0x33, 0x49, 0xfc, - 0x09, 0xb4, 0x69, 0x1e, 0xab, 0xd5, 0x79, 0x68, 0xd3, 0x3c, 0x26, 0x89, 0x5f, 0xa4, 0x2e, 0x8e, - 0x9e, 0x48, 0x7d, 0x2b, 0x9f, 0xfa, 0x69, 0x6c, 0x27, 0x29, 0x02, 0xeb, 0xa8, 0x12, 0x0e, 0x3b, - 0x36, 0x73, 0xa9, 0xe3, 0xa9, 0xdb, 0x12, 0xbe, 0x1d, 0xc3, 0x2b, 0xed, 0xc4, 0x41, 0x66, 0x18, - 0xfc, 0x15, 0xaa, 0x8a, 0xe5, 0x66, 0x0f, 0x07, 0x10, 0xc8, 0x18, 0x0f, 0x24, 0x29, 0x1d, 0x80, - 0xed, 0xc4, 0x29, 0x6b, 0x94, 0xc7, 0xee, 0xbe, 0x42, 0xdb, 0x73, 0x5d, 0x82, 0xb7, 0x50, 0xa1, - 0x0f, 0xe3, 0x68, 0xdc, 0x13, 0x71, 0xc4, 0x0f, 0x51, 0x71, 0x44, 0x07, 0x43, 0x88, 0x46, 0x39, - 0x89, 0x2e, 0x5f, 0xae, 0xbe, 0x54, 0x1a, 0xbf, 0x15, 0x50, 0x25, 0x5d, 0x29, 0x58, 0x47, 0x45, - 0xbf, 0x47, 0xc3, 0x64, 0x55, 0x3c, 0x4a, 0xbe, 0x77, 0x53, 0x18, 0xaf, 0x27, 0xf5, 0xb2, 0xc9, - 0x6c, 0x79, 0x26, 0x11, 0x0e, 0xbf, 0x47, 0xc8, 0x4a, 0x96, 0x40, 0x32, 0x50, 0x8e, 0x96, 0xee, - 0xf2, 0x74, 0x7f, 0xcc, 0x76, 0x6f, 0x6a, 0x0a, 0x49, 0x46, 0x39, 0x3b, 0x48, 0x0b, 0xb7, 0x0f, - 0xd2, 0xcc, 0x6c, 0x5e, 0xbb, 0x75, 0x36, 0xef, 0xa3, 0xf5, 0xe8, 0x85, 0x6f, 0xce, 0xf0, 0xa8, - 0x01, 0x48, 0xec, 0xc5, 0xff, 0x43, 0x45, 0x9f, 0xd9, 0x4d, 0x33, 0x9e, 0xe0, 0xe9, 0x0c, 0x34, - 0x85, 0x91, 0x44, 0x3e, 0xfc, 0x0e, 0x55, 0xe4, 0xe0, 0x92, 0xfb, 0xa7, 0x74, 0xe7, 0xfd, 0x53, - 0x95, 0xdd, 0x91, 0x08, 0x90, 0x99, 0x96, 0xf1, 0xe6, 0xf2, 0xaa, 0xb6, 0xf2, 0xe1, 0xaa, 0xb6, - 0xf2, 0xf1, 0xaa, 0xb6, 0xf2, 0xf3, 0xb4, 0xa6, 0x5c, 0x4e, 0x6b, 0xca, 0x87, 0x69, 0x4d, 0xf9, - 0x38, 0xad, 0x29, 0x7f, 0x4d, 0x6b, 0xca, 0x2f, 0x7f, 0xd7, 0x56, 0xbe, 0x7d, 0xba, 0xcc, 0x1f, - 0xc6, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x77, 0xce, 0x8b, 0x57, 0x0a, 0x00, 0x00, -} +func (m *PodStatus) Reset() { *m = PodStatus{} } func (m *Pod) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -515,7 +290,7 @@ func (m *PodSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { for k := range m.NodeSelector { keysForNodeSelector = append(keysForNodeSelector, string(k)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector) + sort.Strings(keysForNodeSelector) for iNdEx := len(keysForNodeSelector) - 1; iNdEx >= 0; iNdEx-- { v := m.NodeSelector[string(keysForNodeSelector[iNdEx])] baseI := i @@ -816,7 +591,7 @@ func (this *PodSpec) String() string { for k := range this.NodeSelector { keysForNodeSelector = append(keysForNodeSelector, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector) + sort.Strings(keysForNodeSelector) mapStringForNodeSelector := "map[string]string{" for _, k := range keysForNodeSelector { mapStringForNodeSelector += fmt.Sprintf("%v: %v,", k, this.NodeSelector[k]) diff --git a/staging/src/k8s.io/apiserver/pkg/apis/example/v1/generated.protomessage.pb.go b/staging/src/k8s.io/apiserver/pkg/apis/example/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..199fc9b637a74 --- /dev/null +++ b/staging/src/k8s.io/apiserver/pkg/apis/example/v1/generated.protomessage.pb.go @@ -0,0 +1,32 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*Pod) ProtoMessage() {} + +func (*PodCondition) ProtoMessage() {} + +func (*PodList) ProtoMessage() {} + +func (*PodSpec) ProtoMessage() {} + +func (*PodStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/apiserver/pkg/apis/example2/v1/generated.pb.go b/staging/src/k8s.io/apiserver/pkg/apis/example2/v1/generated.pb.go index 69e0826a7d809..1c3fa6b21a690 100644 --- a/staging/src/k8s.io/apiserver/pkg/apis/example2/v1/generated.pb.go +++ b/staging/src/k8s.io/apiserver/pkg/apis/example2/v1/generated.pb.go @@ -24,147 +24,16 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" - - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } -func (*ReplicaSet) ProtoMessage() {} -func (*ReplicaSet) Descriptor() ([]byte, []int) { - return fileDescriptor_c0d8f6d73eb5bf83, []int{0} -} -func (m *ReplicaSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSet.Merge(m, src) -} -func (m *ReplicaSet) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSet) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSet.DiscardUnknown(m) -} +func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } -var xxx_messageInfo_ReplicaSet proto.InternalMessageInfo +func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } -func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } -func (*ReplicaSetSpec) ProtoMessage() {} -func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c0d8f6d73eb5bf83, []int{1} -} -func (m *ReplicaSetSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSetSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSetSpec.Merge(m, src) -} -func (m *ReplicaSetSpec) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSetSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSetSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ReplicaSetSpec proto.InternalMessageInfo - -func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } -func (*ReplicaSetStatus) ProtoMessage() {} -func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c0d8f6d73eb5bf83, []int{2} -} -func (m *ReplicaSetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicaSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicaSetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicaSetStatus.Merge(m, src) -} -func (m *ReplicaSetStatus) XXX_Size() int { - return m.Size() -} -func (m *ReplicaSetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicaSetStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ReplicaSetStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ReplicaSet)(nil), "k8s.io.apiserver.pkg.apis.example2.v1.ReplicaSet") - proto.RegisterType((*ReplicaSetSpec)(nil), "k8s.io.apiserver.pkg.apis.example2.v1.ReplicaSetSpec") - proto.RegisterType((*ReplicaSetStatus)(nil), "k8s.io.apiserver.pkg.apis.example2.v1.ReplicaSetStatus") -} - -func init() { - proto.RegisterFile("k8s.io/apiserver/pkg/apis/example2/v1/generated.proto", fileDescriptor_c0d8f6d73eb5bf83) -} - -var fileDescriptor_c0d8f6d73eb5bf83 = []byte{ - // 388 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xc1, 0x6a, 0xe2, 0x40, - 0x18, 0xc7, 0x13, 0xd7, 0x15, 0x99, 0x15, 0x91, 0x9c, 0xc4, 0xc3, 0xb8, 0x08, 0x82, 0x87, 0xdd, - 0x99, 0x55, 0xd6, 0xdd, 0xd2, 0x53, 0xc9, 0xb5, 0x94, 0x42, 0x3c, 0x14, 0x7a, 0x69, 0xc7, 0xf8, - 0x35, 0xa6, 0x1a, 0x33, 0x64, 0x26, 0xa1, 0xbd, 0xf5, 0x11, 0xfa, 0x18, 0x7d, 0x14, 0x8f, 0x1e, - 0x3d, 0x49, 0x4d, 0x5f, 0xa4, 0x38, 0x49, 0x13, 0xaa, 0x96, 0xda, 0x5b, 0xfe, 0x93, 0xf9, 0xfd, - 0xbe, 0x3f, 0x1f, 0x83, 0xfa, 0x93, 0x23, 0x41, 0x5c, 0x9f, 0x32, 0xee, 0x0a, 0x08, 0x22, 0x08, - 0x28, 0x9f, 0x38, 0x2a, 0x51, 0xb8, 0x63, 0x1e, 0x9f, 0x42, 0x8f, 0x46, 0x5d, 0xea, 0xc0, 0x0c, - 0x02, 0x26, 0x61, 0x44, 0x78, 0xe0, 0x4b, 0xdf, 0x68, 0x27, 0x18, 0xc9, 0x30, 0xc2, 0x27, 0x8e, - 0x4a, 0xe4, 0x0d, 0x23, 0x51, 0xb7, 0xf1, 0xdb, 0x71, 0xe5, 0x38, 0x1c, 0x12, 0xdb, 0xf7, 0xa8, - 0xe3, 0x3b, 0x3e, 0x55, 0xf4, 0x30, 0xbc, 0x51, 0x49, 0x05, 0xf5, 0x95, 0x58, 0x1b, 0x7f, 0xf3, - 0x32, 0x1e, 0xb3, 0xc7, 0xee, 0x0c, 0x82, 0xfb, 0xbc, 0x8f, 0x07, 0x92, 0xed, 0xe9, 0xd2, 0xa0, - 0x1f, 0x51, 0x41, 0x38, 0x93, 0xae, 0x07, 0x3b, 0xc0, 0xbf, 0xcf, 0x00, 0x61, 0x8f, 0xc1, 0x63, - 0xdb, 0x5c, 0xeb, 0xa9, 0x80, 0x90, 0x05, 0x7c, 0xea, 0xda, 0x6c, 0x00, 0xd2, 0xb8, 0x46, 0xe5, - 0x4d, 0xa5, 0x11, 0x93, 0xac, 0xae, 0xff, 0xd4, 0x3b, 0x3f, 0x7a, 0x7f, 0x48, 0xbe, 0x96, 0xcc, - 0x9c, 0x6f, 0x66, 0x73, 0x9b, 0x44, 0x5d, 0x72, 0x3e, 0xbc, 0x05, 0x5b, 0x9e, 0x81, 0x64, 0xa6, - 0x31, 0x5f, 0x35, 0xb5, 0x78, 0xd5, 0x44, 0xf9, 0x99, 0x95, 0x59, 0x8d, 0x0b, 0x54, 0x14, 0x1c, - 0xec, 0x7a, 0x41, 0xd9, 0xfb, 0xe4, 0xa0, 0xa5, 0x93, 0xbc, 0xe2, 0x80, 0x83, 0x6d, 0x56, 0xd2, - 0x11, 0xc5, 0x4d, 0xb2, 0x94, 0xd0, 0xb8, 0x42, 0x25, 0x21, 0x99, 0x0c, 0x45, 0xfd, 0x9b, 0x52, - 0xff, 0xff, 0xba, 0x5a, 0xe1, 0x66, 0x35, 0x95, 0x97, 0x92, 0x6c, 0xa5, 0xda, 0xd6, 0x31, 0xaa, - 0xbe, 0xaf, 0x61, 0x74, 0x50, 0x39, 0x48, 0x4e, 0x84, 0xda, 0xd6, 0x77, 0xb3, 0x12, 0xaf, 0x9a, - 0xe5, 0xf4, 0x96, 0xb0, 0xb2, 0xbf, 0xad, 0x13, 0x54, 0xdb, 0x9e, 0x63, 0xfc, 0xda, 0xa1, 0x6b, - 0xe9, 0xe4, 0x3d, 0x06, 0xf3, 0x74, 0xbe, 0xc6, 0xda, 0x62, 0x8d, 0xb5, 0xe5, 0x1a, 0x6b, 0x0f, - 0x31, 0xd6, 0xe7, 0x31, 0xd6, 0x17, 0x31, 0xd6, 0x97, 0x31, 0xd6, 0x9f, 0x63, 0xac, 0x3f, 0xbe, - 0x60, 0xed, 0xb2, 0x7d, 0xd0, 0xd3, 0x7f, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xf4, 0xd7, 0x7c, 0xa3, - 0x22, 0x03, 0x00, 0x00, -} +func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } func (m *ReplicaSet) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/staging/src/k8s.io/apiserver/pkg/apis/example2/v1/generated.protomessage.pb.go b/staging/src/k8s.io/apiserver/pkg/apis/example2/v1/generated.protomessage.pb.go new file mode 100644 index 0000000000000..95b07e12c76db --- /dev/null +++ b/staging/src/k8s.io/apiserver/pkg/apis/example2/v1/generated.protomessage.pb.go @@ -0,0 +1,28 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +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 go-to-protobuf. DO NOT EDIT. + +package v1 + +func (*ReplicaSet) ProtoMessage() {} + +func (*ReplicaSetSpec) ProtoMessage() {} + +func (*ReplicaSetStatus) ProtoMessage() {} diff --git a/staging/src/k8s.io/apiserver/pkg/audit/context.go b/staging/src/k8s.io/apiserver/pkg/audit/context.go index 5b93d594bffa8..d436fd57b025f 100644 --- a/staging/src/k8s.io/apiserver/pkg/audit/context.go +++ b/staging/src/k8s.io/apiserver/pkg/audit/context.go @@ -178,6 +178,25 @@ func (ac *AuditContext) LogRequestPatch(patch []byte) { }) } +// GetEventUser returns a copy of the User associated with the audit Event. +func (ac *AuditContext) GetEventUser() authnv1.UserInfo { + var val *authnv1.UserInfo + ac.visitEvent(func(ev *auditinternal.Event) { + val = ev.User.DeepCopy() + }) + return *val +} + +// GetEventImpersonatedUser returns a copy of the ImpersonatedUser associated with the audit Event, +// or returns nil when there is no ImpersonatedUser. +func (ac *AuditContext) GetEventImpersonatedUser() *authnv1.UserInfo { + var val *authnv1.UserInfo + ac.visitEvent(func(ev *auditinternal.Event) { + val = ev.ImpersonatedUser.DeepCopy() + }) + return val +} + func (ac *AuditContext) GetEventAnnotation(key string) (string, bool) { var val string var ok bool diff --git a/staging/src/k8s.io/apiserver/pkg/audit/context_test.go b/staging/src/k8s.io/apiserver/pkg/audit/context_test.go index 9606d395cdbf4..83753ade17f01 100644 --- a/staging/src/k8s.io/apiserver/pkg/audit/context_test.go +++ b/staging/src/k8s.io/apiserver/pkg/audit/context_test.go @@ -22,9 +22,11 @@ import ( "sync" "testing" + authnv1 "k8s.io/api/authentication/v1" auditinternal "k8s.io/apiserver/pkg/apis/audit" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestEnabled(t *testing.T) { @@ -175,6 +177,159 @@ func TestAuditAnnotationsWithAuditLoggingSetup(t *testing.T) { assert.Equal(t, expected, actual) } +func TestGetEventUser(t *testing.T) { + tests := []struct { + name string + auditEventUser authnv1.UserInfo + wantUser authnv1.UserInfo + }{ + { + name: "fields with zero values are returned as fields with zero values", + auditEventUser: authnv1.UserInfo{}, + wantUser: authnv1.UserInfo{}, + }, + { + name: "fields with non-zero values are returned as copies", + auditEventUser: authnv1.UserInfo{ + Username: "test-user", + UID: "test-uid", + Groups: []string{"test-group1", "test-group2"}, + Extra: map[string]authnv1.ExtraValue{ + "test-extra1": {"test-extra1-val1", "test-extra1-val2"}, + "test-extra2": {"test-extra2-val1", "test-extra2-val2"}, + }, + }, + wantUser: authnv1.UserInfo{ + Username: "test-user", + UID: "test-uid", + Groups: []string{"test-group1", "test-group2"}, + Extra: map[string]authnv1.ExtraValue{ + "test-extra1": {"test-extra1-val1", "test-extra1-val2"}, + "test-extra2": {"test-extra2-val1", "test-extra2-val2"}, + }, + }, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + ac := AuditContext{event: auditinternal.Event{User: test.auditEventUser}} + got := ac.GetEventUser() + require.Equal(t, test.wantUser, got) + }) + } + + t.Run("mutating the returned groups does not change the audit event's User's groups", func(t *testing.T) { + ac := AuditContext{ + event: auditinternal.Event{ + User: authnv1.UserInfo{ + Groups: []string{"test-group1", "test-group2"}, + }, + }, + } + got := ac.GetEventUser() + require.Equal(t, []string{"test-group1", "test-group2"}, got.Groups) + got.Groups[0] = "mutated group" + require.Equal(t, []string{"mutated group", "test-group2"}, got.Groups) + // The event's groups are not changed. + require.Equal(t, []string{"test-group1", "test-group2"}, ac.event.User.Groups) + }) + + t.Run("mutating the returned extras does not change the audit event's User's extras", func(t *testing.T) { + ac := AuditContext{ + event: auditinternal.Event{ + User: authnv1.UserInfo{ + Extra: map[string]authnv1.ExtraValue{"test-extra": {"test-extra-val"}}, + }, + }, + } + got := ac.GetEventUser() + require.Equal(t, map[string]authnv1.ExtraValue{"test-extra": {"test-extra-val"}}, got.Extra) + got.Extra["test-extra"] = authnv1.ExtraValue{"mutated value"} + require.Equal(t, map[string]authnv1.ExtraValue{"test-extra": {"mutated value"}}, got.Extra) + // The event's extras are not changed. + require.Equal(t, map[string]authnv1.ExtraValue{"test-extra": {"test-extra-val"}}, ac.event.User.Extra) + }) +} + +func TestGetEventImpersonatedUser(t *testing.T) { + tests := []struct { + name string + auditEventImpersonatedUser *authnv1.UserInfo + wantUser *authnv1.UserInfo + }{ + { + name: "nil ImpersonatedUser returns nil", + auditEventImpersonatedUser: nil, + wantUser: nil, + }, + { + name: "fields with zero values are returned as fields with zero values", + auditEventImpersonatedUser: &authnv1.UserInfo{}, + wantUser: &authnv1.UserInfo{}, + }, + { + name: "fields with non-zero values are returned as copies", + auditEventImpersonatedUser: &authnv1.UserInfo{ + Username: "test-user", + UID: "test-uid", + Groups: []string{"test-group1", "test-group2"}, + Extra: map[string]authnv1.ExtraValue{ + "test-extra1": {"test-extra1-val1", "test-extra1-val2"}, + "test-extra2": {"test-extra2-val1", "test-extra2-val2"}, + }, + }, + wantUser: &authnv1.UserInfo{ + Username: "test-user", + UID: "test-uid", + Groups: []string{"test-group1", "test-group2"}, + Extra: map[string]authnv1.ExtraValue{ + "test-extra1": {"test-extra1-val1", "test-extra1-val2"}, + "test-extra2": {"test-extra2-val1", "test-extra2-val2"}, + }, + }, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + ac := AuditContext{event: auditinternal.Event{ImpersonatedUser: test.auditEventImpersonatedUser}} + got := ac.GetEventImpersonatedUser() + require.Equal(t, test.wantUser, got) + }) + } + + t.Run("mutating the returned groups does not change the audit event's ImpersonatedUser's groups", func(t *testing.T) { + ac := AuditContext{ + event: auditinternal.Event{ + ImpersonatedUser: &authnv1.UserInfo{ + Groups: []string{"test-group1", "test-group2"}, + }, + }, + } + got := ac.GetEventImpersonatedUser() + require.Equal(t, []string{"test-group1", "test-group2"}, got.Groups) + got.Groups[0] = "mutated group" + require.Equal(t, []string{"mutated group", "test-group2"}, got.Groups) + // The event's groups are not changed. + require.Equal(t, []string{"test-group1", "test-group2"}, ac.event.ImpersonatedUser.Groups) + }) + + t.Run("mutating the returned extras does not change the audit event's ImpersonatedUser's extras", func(t *testing.T) { + ac := AuditContext{ + event: auditinternal.Event{ + ImpersonatedUser: &authnv1.UserInfo{ + Extra: map[string]authnv1.ExtraValue{"test-extra": {"test-extra-val"}}, + }, + }, + } + got := ac.GetEventImpersonatedUser() + require.Equal(t, map[string]authnv1.ExtraValue{"test-extra": {"test-extra-val"}}, got.Extra) + got.Extra["test-extra"] = authnv1.ExtraValue{"mutated value"} + require.Equal(t, map[string]authnv1.ExtraValue{"test-extra": {"mutated value"}}, got.Extra) + // The event's extras are not changed. + require.Equal(t, map[string]authnv1.ExtraValue{"test-extra": {"test-extra-val"}}, ac.event.ImpersonatedUser.Extra) + }) +} + func withAuditContextAndLevel(ctx context.Context, t *testing.T, l auditinternal.Level) context.Context { ctx = WithAuditContext(ctx) if err := AuditContextFrom(ctx).Init(RequestAuditConfig{Level: l}, nil); err != nil { diff --git a/staging/src/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader_controller.go b/staging/src/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader_controller.go index 38d6cbe71a1a8..a9e76fe011896 100644 --- a/staging/src/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader_controller.go +++ b/staging/src/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader_controller.go @@ -183,7 +183,7 @@ func (c *RequestHeaderAuthRequestController) Run(ctx context.Context, workers in go c.configmapInformer.Run(ctx.Done()) // wait for caches to fill before starting your work - if !cache.WaitForNamedCacheSync(c.name, ctx.Done(), c.configmapInformerSynced) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.configmapInformerSynced) { return } diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/delete.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/delete.go index e8b74c8a913e8..2efd08d25a8ef 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/delete.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/delete.go @@ -103,11 +103,13 @@ func DeleteResource(r rest.GracefulDeleter, allowsOptions bool, scope *RequestSc defaultGVK := scope.MetaGroupVersion.WithKind("DeleteOptions") obj, gvk, err := apihelpers.GetMetaInternalVersionCodecs().DecoderToVersion(s.Serializer, defaultGVK.GroupVersion()).Decode(body, &defaultGVK, options) if err != nil { + err = errors.NewBadRequest(err.Error()) scope.err(err, w, req) return } if obj != options { - scope.err(fmt.Errorf("decoded object cannot be converted to DeleteOptions"), w, req) + err = errors.NewBadRequest("decoded object cannot be converted to DeleteOptions") + scope.err(err, w, req) return } span.AddEvent("Decoded delete options") @@ -278,11 +280,13 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope *RequestSc defaultGVK := scope.MetaGroupVersion.WithKind("DeleteOptions") obj, gvk, err := apihelpers.GetMetaInternalVersionCodecs().DecoderToVersion(s.Serializer, defaultGVK.GroupVersion()).Decode(body, &defaultGVK, options) if err != nil { + err = errors.NewBadRequest(err.Error()) scope.err(err, w, req) return } if obj != options { - scope.err(fmt.Errorf("decoded object cannot be converted to DeleteOptions"), w, req) + err = errors.NewBadRequest("decoded object cannot be converted to DeleteOptions") + scope.err(err, w, req) return } diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/delete_test.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/delete_test.go index c0396ee4aecf6..3fbeef7f63e59 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/delete_test.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/delete_test.go @@ -33,6 +33,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" + jsonserializer "k8s.io/apimachinery/pkg/runtime/serializer/json" "k8s.io/apiserver/pkg/admission" auditinternal "k8s.io/apiserver/pkg/apis/audit" "k8s.io/apiserver/pkg/audit" @@ -147,6 +148,73 @@ func TestDeleteResourceAuditLogRequestObject(t *testing.T) { } } +// For issue https://github.com/kubernetes/kubernetes/issues/132359 +func TestDeleteResourceDeleteOptions(t *testing.T) { + ctx := t.Context() + fakeDeleterFn := func(ctx context.Context, _ rest.ValidateObjectFunc, _ *metav1.DeleteOptions) (runtime.Object, bool, error) { + return nil, false, nil + } + js := jsonserializer.NewSerializerWithOptions(jsonserializer.DefaultMetaFactory, nil, nil, jsonserializer.SerializerOptions{}) + scope := &RequestScope{ + Namer: &mockNamer{}, + Serializer: &fakeSerializer{ + serializer: runtime.NewCodec(js, js), + }, + } + handler := DeleteResource(fakeDeleterFunc(fakeDeleterFn), true, scope, nil) + + tests := []struct { + name string + body string + expectCode int + }{ + { + name: "valid delete options", + body: "{}", + expectCode: 200, + }, + { + name: "orphanDependents invalid Go type", + body: `{"orphanDependents": "randomString"}`, + expectCode: 400, + }, + { + name: "apiVersion/kind mismatch", + body: `{ "apiVersion": "v1", "kind": "APIResourceList" }`, + expectCode: 400, + }, + { + name: "apiVersion invalid type", + body: `{ "apiVersion": false, "kind": "DeleteOptions" }`, + expectCode: 400, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + req, err := http.NewRequestWithContext(ctx, request.MethodDelete, "/api/v1/namespaces/default/pods/testpod", strings.NewReader(test.body)) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + req.Header.Set("Content-Type", "application/json") + req.Header.Set("Accept", "*/*") + + recorder := httptest.NewRecorder() + handler.ServeHTTP(recorder, req) + gotCode := recorder.Code + if gotCode != test.expectCode { + t.Fatalf("expected status %v but got %v", test.expectCode, gotCode) + } + }) + } +} + +type fakeDeleterFunc func(ctx context.Context, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions) (runtime.Object, bool, error) + +func (f fakeDeleterFunc) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions) (runtime.Object, bool, error) { + return f(ctx, deleteValidation, options) +} + func TestDeleteCollection(t *testing.T) { req := &http.Request{ Header: http.Header{}, @@ -216,6 +284,67 @@ func TestDeleteCollection(t *testing.T) { } } +// For issue https://github.com/kubernetes/kubernetes/issues/132359 +func TestDeleteCollectionDeleteOptions(t *testing.T) { + ctx := t.Context() + fakeDeleterFn := func(ctx context.Context, _ rest.ValidateObjectFunc, _ *metav1.DeleteOptions, _ *metainternalversion.ListOptions) (runtime.Object, error) { + return nil, nil + } + js := jsonserializer.NewSerializerWithOptions(jsonserializer.DefaultMetaFactory, nil, nil, jsonserializer.SerializerOptions{}) + scope := &RequestScope{ + Namer: &mockNamer{}, + Serializer: &fakeSerializer{ + serializer: runtime.NewCodec(js, js), + }, + } + handler := DeleteCollection(fakeCollectionDeleterFunc(fakeDeleterFn), true, scope, nil) + + tests := []struct { + name string + body string + expectCode int + }{ + { + name: "valid delete options", + body: "{}", + expectCode: 200, + }, + { + name: "orphanDependents invalid Go type", + body: `{"orphanDependents": "randomString"}`, + expectCode: 400, + }, + { + name: "apiVersion/kind mismatch", + body: `{ "apiVersion": "v1", "kind": "APIResourceList" }`, + expectCode: 400, + }, + { + name: "apiVersion invalid type", + body: `{ "apiVersion": false, "kind": "DeleteOptions" }`, + expectCode: 400, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + req, err := http.NewRequestWithContext(ctx, request.MethodDelete, "/api/v1/namespaces/default/pods/testpod", strings.NewReader(test.body)) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + req.Header.Set("Content-Type", "application/json") + req.Header.Set("Accept", "*/*") + + recorder := httptest.NewRecorder() + handler.ServeHTTP(recorder, req) + gotCode := recorder.Code + if gotCode != test.expectCode { + t.Fatalf("expected status %v but got %v", test.expectCode, gotCode) + } + }) + } +} + func TestDeleteCollectionWithNoContextDeadlineEnforced(t *testing.T) { ctx := t.Context() var invokedGot, hasDeadlineGot int32 diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers_test.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers_test.go index 555478a615d77..10bd42fcd9347 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers_test.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers_test.go @@ -709,16 +709,16 @@ func toJSON(b *testing.B, list *v1.PodList) []byte { return out } -func benchmarkSerializeObject(b *testing.B, payload []byte) { - input, output := len(payload), len(gzipContent(payload, defaultGzipContentEncodingLevel)) - b.Logf("Payload size: %d, expected output size: %d, ratio: %.2f", input, output, float64(output)/float64(input)) - +func benchmarkSerializeObject(b *testing.B, payload []byte, gzip bool) { req := &http.Request{ - Header: http.Header{ - "Accept-Encoding": []string{"gzip"}, - }, URL: &url.URL{Path: "/path"}, } + if gzip { + req.Header = http.Header{ + "Accept-Encoding": []string{"gzip"}, + } + } + featuregatetesting.SetFeatureGateDuringTest(b, utilfeature.DefaultFeatureGate, features.APIResponseCompression, true) encoder := &fakeEncoder{ @@ -726,34 +726,42 @@ func benchmarkSerializeObject(b *testing.B, payload []byte) { } b.ResetTimer() - for i := 0; i < b.N; i++ { + responseBytesTotal := 0 + for b.Loop() { recorder := httptest.NewRecorder() SerializeObject("application/json", encoder, recorder, req, http.StatusOK, nil /* object */) result := recorder.Result() if result.StatusCode != http.StatusOK { b.Fatalf("incorrect status code: got %v; want: %v", result.StatusCode, http.StatusOK) } + responseBytesTotal += recorder.Body.Len() } + b.ReportMetric(float64(responseBytesTotal/b.N), "writtenBytes/op") } -func BenchmarkSerializeObject1000PodsPB(b *testing.B) { - benchmarkSerializeObject(b, toProtoBuf(b, benchmarkItems(b, "testdata/pod.json", 1000))) -} -func BenchmarkSerializeObject10000PodsPB(b *testing.B) { - benchmarkSerializeObject(b, toProtoBuf(b, benchmarkItems(b, "testdata/pod.json", 10000))) -} -func BenchmarkSerializeObject100000PodsPB(b *testing.B) { - benchmarkSerializeObject(b, toProtoBuf(b, benchmarkItems(b, "testdata/pod.json", 100000))) -} - -func BenchmarkSerializeObject1000PodsJSON(b *testing.B) { - benchmarkSerializeObject(b, toJSON(b, benchmarkItems(b, "testdata/pod.json", 1000))) -} -func BenchmarkSerializeObject10000PodsJSON(b *testing.B) { - benchmarkSerializeObject(b, toJSON(b, benchmarkItems(b, "testdata/pod.json", 10000))) -} -func BenchmarkSerializeObject100000PodsJSON(b *testing.B) { - benchmarkSerializeObject(b, toJSON(b, benchmarkItems(b, "testdata/pod.json", 100000))) +func BenchmarkSerializeObject(b *testing.B) { + for _, count := range []int{1_000, 10_000, 100_000} { + b.Run(fmt.Sprintf("Count=%d", count), func(b *testing.B) { + medias := []struct { + name string + convert func(*testing.B, *v1.PodList) []byte + }{ + {"Json", toJSON}, + {"Protobuf", toProtoBuf}, + } + podList := benchmarkItems(b, "testdata/pod.json", count) + for _, media := range medias { + b.Run(fmt.Sprintf("MediaType=%s", media.name), func(b *testing.B) { + payload := media.convert(b, podList) + for _, gzip := range []bool{true, false} { + b.Run(fmt.Sprintf("Compression=%v", gzip), func(b *testing.B) { + benchmarkSerializeObject(b, payload, gzip) + }) + } + }) + } + }) + } } type fakeResponseRecorder struct { diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/watch.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/watch.go index 7bf702c6188ec..3f150a4f27fa7 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/watch.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/watch.go @@ -39,9 +39,6 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" ) -// nothing will ever be sent down this channel -var neverExitWatch <-chan time.Time = make(chan time.Time) - // timeoutFactory abstracts watch timeout logic for testing type TimeoutFactory interface { TimeoutCh() (<-chan time.Time, func() bool) @@ -56,7 +53,8 @@ type realTimeoutFactory struct { // and a cleanup function to call when this happens. func (w *realTimeoutFactory) TimeoutCh() (<-chan time.Time, func() bool) { if w.timeout == 0 { - return neverExitWatch, func() bool { return false } + // nothing will ever be sent down this channel + return nil, func() bool { return false } } t := time.NewTimer(w.timeout) return t.C, t.Stop diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go b/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go index 2a5900a8341fe..56c392fd057b6 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go @@ -28,6 +28,8 @@ import ( restful "github.com/emicklei/go-restful/v3" "sigs.k8s.io/structured-merge-diff/v6/fieldpath" + "golang.org/x/text/cases" + "golang.org/x/text/language" apidiscoveryv2 "k8s.io/api/apidiscovery/v2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" @@ -818,7 +820,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag route := ws.GET(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).")). - Operation("read"+namespaced+kind+strings.Title(subresource)+operationSuffix). + Operation("read"+namespaced+kind+cases.Title(language.English).String(subresource)+operationSuffix). Produces(append(storageMeta.ProducesMIMETypes(action.Verb), mediaTypes...)...). Returns(http.StatusOK, "OK", producedObject). Writes(producedObject) @@ -839,7 +841,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag route := ws.GET(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).")). - Operation("list"+namespaced+kind+strings.Title(subresource)+operationSuffix). + Operation("list"+namespaced+kind+cases.Title(language.English).String(subresource)+operationSuffix). Produces(append(storageMeta.ProducesMIMETypes(action.Verb), allMediaTypes...)...). Returns(http.StatusOK, "OK", versionedList). Writes(versionedList) @@ -872,7 +874,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag route := ws.PUT(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).")). - Operation("replace"+namespaced+kind+strings.Title(subresource)+operationSuffix). + Operation("replace"+namespaced+kind+cases.Title(language.English).String(subresource)+operationSuffix). Produces(append(storageMeta.ProducesMIMETypes(action.Verb), mediaTypes...)...). Returns(http.StatusOK, "OK", producedObject). // TODO: in some cases, the API may return a v1.Status instead of the versioned object @@ -905,7 +907,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).")). Consumes(supportedTypes...). - Operation("patch"+namespaced+kind+strings.Title(subresource)+operationSuffix). + Operation("patch"+namespaced+kind+cases.Title(language.English).String(subresource)+operationSuffix). Produces(append(storageMeta.ProducesMIMETypes(action.Verb), mediaTypes...)...). Returns(http.StatusOK, "OK", producedObject). // Patch can return 201 when a server side apply is requested @@ -934,7 +936,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag route := ws.POST(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).")). - Operation("create"+namespaced+kind+strings.Title(subresource)+operationSuffix). + Operation("create"+namespaced+kind+cases.Title(language.English).String(subresource)+operationSuffix). Produces(append(storageMeta.ProducesMIMETypes(action.Verb), mediaTypes...)...). Returns(http.StatusOK, "OK", producedObject). // TODO: in some cases, the API may return a v1.Status instead of the versioned object @@ -963,7 +965,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag route := ws.DELETE(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).")). - Operation("delete"+namespaced+kind+strings.Title(subresource)+operationSuffix). + Operation("delete"+namespaced+kind+cases.Title(language.English).String(subresource)+operationSuffix). Produces(append(storageMeta.ProducesMIMETypes(action.Verb), mediaTypes...)...). Writes(deleteReturnType). Returns(http.StatusOK, "OK", deleteReturnType). @@ -987,7 +989,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag route := ws.DELETE(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).")). - Operation("deletecollection"+namespaced+kind+strings.Title(subresource)+operationSuffix). + Operation("deletecollection"+namespaced+kind+cases.Title(language.English).String(subresource)+operationSuffix). Produces(append(storageMeta.ProducesMIMETypes(action.Verb), mediaTypes...)...). Writes(versionedStatus). Returns(http.StatusOK, "OK", versionedStatus) @@ -1015,7 +1017,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag route := ws.GET(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).")). - Operation("watch"+namespaced+kind+strings.Title(subresource)+operationSuffix). + Operation("watch"+namespaced+kind+cases.Title(language.English).String(subresource)+operationSuffix). Produces(allMediaTypes...). Returns(http.StatusOK, "OK", versionedWatchEvent). Writes(versionedWatchEvent) @@ -1036,7 +1038,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag route := ws.GET(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).")). - Operation("watch"+namespaced+kind+strings.Title(subresource)+"List"+operationSuffix). + Operation("watch"+namespaced+kind+cases.Title(language.English).String(subresource)+"List"+operationSuffix). Produces(allMediaTypes...). Returns(http.StatusOK, "OK", versionedWatchEvent). Writes(versionedWatchEvent) @@ -1060,7 +1062,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag route := ws.Method(method).Path(action.Path). To(handler). Doc(doc). - Operation("connect" + strings.Title(strings.ToLower(method)) + namespaced + kind + strings.Title(subresource) + operationSuffix). + Operation("connect" + cases.Title(language.English).String(strings.ToLower(method)) + namespaced + kind + cases.Title(language.English).String(subresource) + operationSuffix). Produces("*/*"). Consumes("*/*"). Writes(connectProducedObject) diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go b/staging/src/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go index b95e551d88942..c76457175a135 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go @@ -617,7 +617,7 @@ func MonitorRequest(req *http.Request, verb, group, version, resource, subresour fieldValidation := cleanFieldValidation(req.URL) fieldValidationRequestLatencies.WithContext(req.Context()).WithLabelValues(fieldValidation) - if wd, ok := request.LatencyTrackersFrom(req.Context()); ok { + if wd, ok := request.LatencyTrackersFrom(req.Context()); ok && dryRun == "" { sliLatency := elapsedSeconds - (wd.MutatingWebhookTracker.GetLatency() + wd.ValidatingWebhookTracker.GetLatency() + wd.APFQueueWaitTracker.GetLatency()).Seconds() requestSloLatencies.WithContext(req.Context()).WithLabelValues(reportedVerb, group, version, resource, subresource, scope, component).Observe(sliLatency) requestSliLatencies.WithContext(req.Context()).WithLabelValues(reportedVerb, group, version, resource, subresource, scope, component).Observe(sliLatency) diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go b/staging/src/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go index 0da1ab05cda4e..75fbc6abc9137 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go @@ -19,7 +19,6 @@ package openapi import ( "bytes" "fmt" - "reflect" "sort" "strings" "unicode" @@ -29,6 +28,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/klog/v2" "k8s.io/kube-openapi/pkg/util" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -133,31 +133,28 @@ func gvkConvert(gvk schema.GroupVersionKind) v1.GroupVersionKind { } } -func typeName(t reflect.Type) string { - path := t.PkgPath() - if strings.Contains(path, "/vendor/") { - path = path[strings.Index(path, "/vendor/")+len("/vendor/"):] - } - return fmt.Sprintf("%s.%s", path, t.Name()) -} - // NewDefinitionNamer constructs a new DefinitionNamer to be used to customize OpenAPI spec. func NewDefinitionNamer(schemes ...*runtime.Scheme) *DefinitionNamer { ret := &DefinitionNamer{ typeGroupVersionKinds: map[string]groupVersionKinds{}, } for _, s := range schemes { - for gvk, rtype := range s.AllKnownTypes() { + for gvk := range s.AllKnownTypes() { newGVK := gvkConvert(gvk) exists := false - for _, existingGVK := range ret.typeGroupVersionKinds[typeName(rtype)] { + name, err := s.ToOpenAPIDefinitionName(gvk) + if err != nil { + klog.Fatalf("failed to get OpenAPI definition name for %v: %v", gvk, err) + continue + } + for _, existingGVK := range ret.typeGroupVersionKinds[name] { if newGVK == existingGVK { exists = true break } } if !exists { - ret.typeGroupVersionKinds[typeName(rtype)] = append(ret.typeGroupVersionKinds[typeName(rtype)], newGVK) + ret.typeGroupVersionKinds[name] = append(ret.typeGroupVersionKinds[name], newGVK) } } } @@ -170,9 +167,9 @@ func NewDefinitionNamer(schemes ...*runtime.Scheme) *DefinitionNamer { // GetDefinitionName returns the name and tags for a given definition func (d *DefinitionNamer) GetDefinitionName(name string) (string, spec.Extensions) { if groupVersionKinds, ok := d.typeGroupVersionKinds[name]; ok { - return util.ToRESTFriendlyName(name), spec.Extensions{ + return name, spec.Extensions{ extensionGVK: groupVersionKinds.JSON(), } } - return util.ToRESTFriendlyName(name), nil + return name, nil } diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/openapi/openapi_test.go b/staging/src/k8s.io/apiserver/pkg/endpoints/openapi/openapi_test.go index 6e6c4387cbe9e..ca9a6a4c2cd73 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/openapi/openapi_test.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/openapi/openapi_test.go @@ -42,12 +42,11 @@ func TestGetDefinitionName(t *testing.T) { // in production, the name is stripped of ".*vendor/" prefix before passed // to GetDefinitionName, so here typePkgName does not have the // "k8s.io/kubernetes/vendor" prefix. - typePkgName := "k8s.io/apiserver/pkg/endpoints/openapi/testing.TestType" typeFriendlyName := "io.k8s.apiserver.pkg.endpoints.openapi.testing.TestType" s := runtime.NewScheme() s.AddKnownTypeWithName(testType.GroupVersionKind(), &testType) namer := NewDefinitionNamer(s) - n, e := namer.GetDefinitionName(typePkgName) + n, e := namer.GetDefinitionName(typeFriendlyName) assertEqual(t, typeFriendlyName, n) assertEqual(t, []interface{}{ map[string]interface{}{ @@ -56,7 +55,7 @@ func TestGetDefinitionName(t *testing.T) { "kind": "TestType", }, }, e["x-kubernetes-group-version-kind"]) - n, e2 := namer.GetDefinitionName("test.com/another.Type") + n, e2 := namer.GetDefinitionName("com.test.another.Type") assertEqual(t, "com.test.another.Type", n) assertEqual(t, e2, spec.Extensions(nil)) } diff --git a/staging/src/k8s.io/apiserver/pkg/features/kube_features.go b/staging/src/k8s.io/apiserver/pkg/features/kube_features.go index e04f1d4681948..880e11b858f2f 100644 --- a/staging/src/k8s.io/apiserver/pkg/features/kube_features.go +++ b/staging/src/k8s.io/apiserver/pkg/features/kube_features.go @@ -115,6 +115,28 @@ const ( // Enables coordinated leader election in the API server CoordinatedLeaderElection featuregate.Feature = "CoordinatedLeaderElection" + // owner: @jpbetz @aaron-prindle @yongruilin + // kep: http://kep.k8s.io/5073 + // beta: v1.33 + // + // Enables running declarative validation of APIs, where declared. When enabled, APIs with + // declarative validation rules will validate objects using the generated + // declarative validation code and compare the results to the regular imperative validation. + // See DeclarativeValidationTakeover for more. + DeclarativeValidation featuregate.Feature = "DeclarativeValidation" + + // owner: @jpbetz @aaron-prindle @yongruilin + // kep: http://kep.k8s.io/5073 + // beta: v1.33 + // + // When enabled, declarative validation errors are returned directly to the caller, + // replacing hand-written validation errors for rules that have declarative implementations. + // When disabled, hand-written validation errors are always returned, effectively putting + // declarative validation in a "shadow mode" that monitors but does not affect API responses. + // Note: Although declarative validation aims for functional equivalence with hand-written validation, + // the exact number, format, and content of error messages may differ between the two approaches. + DeclarativeValidationTakeover featuregate.Feature = "DeclarativeValidationTakeover" + // owner: @serathius // kep: https://kep.k8s.io/4988 // @@ -353,6 +375,14 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate {Version: version.MustParse("1.33"), Default: false, PreRelease: featuregate.Beta}, }, + DeclarativeValidation: { + {Version: version.MustParse("1.33"), Default: true, PreRelease: featuregate.Beta}, + }, + + DeclarativeValidationTakeover: { + {Version: version.MustParse("1.33"), Default: false, PreRelease: featuregate.Beta}, + }, + DetectCacheInconsistency: { {Version: version.MustParse("1.34"), Default: true, PreRelease: featuregate.Beta}, }, diff --git a/staging/src/k8s.io/apiserver/pkg/reconcilers/peer_endpoint_lease.go b/staging/src/k8s.io/apiserver/pkg/reconcilers/peer_endpoint_lease.go index 5d2e73b5467c0..450a6e5ec4241 100644 --- a/staging/src/k8s.io/apiserver/pkg/reconcilers/peer_endpoint_lease.go +++ b/staging/src/k8s.io/apiserver/pkg/reconcilers/peer_endpoint_lease.go @@ -78,9 +78,9 @@ type peerEndpointLeaseReconciler struct { // NewPeerEndpointLeaseReconciler creates a new peer endpoint lease reconciler func NewPeerEndpointLeaseReconciler(config *storagebackend.ConfigForResource, baseKey string, leaseTime time.Duration) (PeerEndpointLeaseReconciler, error) { - // note that newFunc, newListFunc and resourcePrefix + // note that newFunc, newListFunc // can be left blank unless the storage.Watch method is used - leaseStorage, destroyFn, err := storagefactory.Create(*config, nil, nil, "") + leaseStorage, destroyFn, err := storagefactory.Create(*config, nil, nil, baseKey) if err != nil { return nil, fmt.Errorf("error creating storage factory: %v", err) } diff --git a/staging/src/k8s.io/apiserver/pkg/reconcilers/peer_endpoint_lease_test.go b/staging/src/k8s.io/apiserver/pkg/reconcilers/peer_endpoint_lease_test.go index 242cadb603641..cb17628f5e260 100644 --- a/staging/src/k8s.io/apiserver/pkg/reconcilers/peer_endpoint_lease_test.go +++ b/staging/src/k8s.io/apiserver/pkg/reconcilers/peer_endpoint_lease_test.go @@ -59,14 +59,11 @@ type serverInfo struct { expectEndpoint string } -func NewFakePeerEndpointReconciler(t *testing.T, s storage.Interface) peerEndpointLeaseReconciler { - // use the same base key used by the controlplane, but add a random - // prefix so we can reuse the etcd instance for subtests independently. - base := "/" + uuid.New().String() + "/peerserverleases/" +func NewFakePeerEndpointReconciler(t *testing.T, baseKey string, s storage.Interface) peerEndpointLeaseReconciler { return peerEndpointLeaseReconciler{serverLeases: &peerEndpointLeases{ storage: s, destroyFn: func() {}, - baseKey: base, + baseKey: baseKey, leaseTime: 1 * time.Minute, // avoid the lease to timeout on tests }} } @@ -92,12 +89,6 @@ func TestPeerEndpointLeaseReconciler(t *testing.T) { newListFunc := func() runtime.Object { return &corev1.EndpointsList{} } sc.Codec = apitesting.TestStorageCodec(codecs, corev1.SchemeGroupVersion) - s, dFunc, err := factory.Create(*sc.ForResource(schema.GroupResource{Resource: "endpoints"}), newFunc, newListFunc, "") - if err != nil { - t.Fatalf("Error creating storage: %v", err) - } - t.Cleanup(dFunc) - tests := []struct { testName string servers []serverInfo @@ -148,8 +139,17 @@ func TestPeerEndpointLeaseReconciler(t *testing.T) { } for _, test := range tests { t.Run(test.testName, func(t *testing.T) { - fakeReconciler := NewFakePeerEndpointReconciler(t, s) - err := fakeReconciler.SetKeys(test.servers) + // use the same base key used by the controlplane, but add a random + // prefix so we can reuse the etcd instance for subtests independently. + baseKey := "/" + uuid.New().String() + "/peerserverleases/" + s, dFunc, err := factory.Create(*sc.ForResource(schema.GroupResource{Resource: "endpoints"}), newFunc, newListFunc, baseKey) + if err != nil { + t.Fatalf("Error creating storage: %v", err) + } + t.Cleanup(dFunc) + + fakeReconciler := NewFakePeerEndpointReconciler(t, baseKey, s) + err = fakeReconciler.SetKeys(test.servers) if err != nil { t.Errorf("unexpected error creating keys: %v", err) } @@ -199,12 +199,6 @@ func TestPeerLeaseRemoveEndpoints(t *testing.T) { newListFunc := func() runtime.Object { return &corev1.EndpointsList{} } sc.Codec = apitesting.TestStorageCodec(codecs, corev1.SchemeGroupVersion) - s, dFunc, err := factory.Create(*sc.ForResource(schema.GroupResource{Resource: "pods"}), newFunc, newListFunc, "") - if err != nil { - t.Fatalf("Error creating storage: %v", err) - } - t.Cleanup(dFunc) - stopTests := []struct { testName string servers []serverInfo @@ -247,8 +241,17 @@ func TestPeerLeaseRemoveEndpoints(t *testing.T) { } for _, test := range stopTests { t.Run(test.testName, func(t *testing.T) { - fakeReconciler := NewFakePeerEndpointReconciler(t, s) - err := fakeReconciler.SetKeys(test.servers) + // use the same base key used by the controlplane, but add a random + // prefix so we can reuse the etcd instance for subtests independently. + baseKey := "/" + uuid.New().String() + "/peerserverleases/" + s, dFunc, err := factory.Create(*sc.ForResource(schema.GroupResource{Resource: "pods"}), newFunc, newListFunc, baseKey) + if err != nil { + t.Fatalf("Error creating storage: %v", err) + } + t.Cleanup(dFunc) + + fakeReconciler := NewFakePeerEndpointReconciler(t, baseKey, s) + err = fakeReconciler.SetKeys(test.servers) if err != nil { t.Errorf("unexpected error creating keys: %v", err) } diff --git a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/dryrun_test.go b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/dryrun_test.go index ba0dcaaf10cd7..7692add2fca64 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/dryrun_test.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/dryrun_test.go @@ -39,7 +39,7 @@ import ( func NewDryRunnableTestStorage(t *testing.T) (DryRunnableStorage, func()) { server, sc := etcd3testing.NewUnsecuredEtcd3TestClientServer(t) sc.Codec = apitesting.TestStorageCodec(codecs, examplev1.SchemeGroupVersion) - s, destroy, err := factory.Create(*sc.ForResource(schema.GroupResource{Resource: "pods"}), nil, nil, "") + s, destroy, err := factory.Create(*sc.ForResource(schema.GroupResource{Resource: "pods"}), nil, nil, "/pods") if err != nil { t.Fatalf("Error creating storage: %v", err) } @@ -65,12 +65,12 @@ func TestDryRunCreateDoesntCreate(t *testing.T) { obj := UnstructuredOrDie(`{"kind": "Pod"}`) out := UnstructuredOrDie(`{}`) - err := s.Create(context.Background(), "key", obj, out, 0, true) + err := s.Create(context.Background(), "/pods/key", obj, out, 0, true) if err != nil { t.Fatalf("Failed to create new dry-run object: %v", err) } - err = s.Get(context.Background(), "key", storage.GetOptions{}, out) + err = s.Get(context.Background(), "/pods/key", storage.GetOptions{}, out) if e, ok := err.(*storage.StorageError); !ok || e.Code != storage.ErrCodeKeyNotFound { t.Errorf("Expected key to be not found, error: %v", err) } @@ -83,7 +83,7 @@ func TestDryRunCreateReturnsObject(t *testing.T) { obj := UnstructuredOrDie(`{"kind": "Pod"}`) out := UnstructuredOrDie(`{}`) - err := s.Create(context.Background(), "key", obj, out, 0, true) + err := s.Create(context.Background(), "/pods/key", obj, out, 0, true) if err != nil { t.Fatalf("Failed to create new dry-run object: %v", err) } @@ -100,12 +100,12 @@ func TestDryRunCreateExistingObjectFails(t *testing.T) { obj := UnstructuredOrDie(`{"kind": "Pod"}`) out := UnstructuredOrDie(`{}`) - err := s.Create(context.Background(), "key", obj, out, 0, false) + err := s.Create(context.Background(), "/pods/key", obj, out, 0, false) if err != nil { t.Fatalf("Failed to create new object: %v", err) } - err = s.Create(context.Background(), "key", obj, out, 0, true) + err = s.Create(context.Background(), "/pods/key", obj, out, 0, true) if e, ok := err.(*storage.StorageError); !ok || e.Code != storage.ErrCodeKeyExists { t.Errorf("Expected KeyExists error: %v", err) } @@ -122,7 +122,7 @@ func TestDryRunUpdateMissingObjectFails(t *testing.T) { return input, nil, errors.New("UpdateFunction shouldn't be called") } - err := s.GuaranteedUpdate(context.Background(), "key", obj, false, nil, updateFunc, true, nil) + err := s.GuaranteedUpdate(context.Background(), "/pods/key", obj, false, nil, updateFunc, true, nil) if e, ok := err.(*storage.StorageError); !ok || e.Code != storage.ErrCodeKeyNotFound { t.Errorf("Expected key to be not found, error: %v", err) } @@ -134,7 +134,7 @@ func TestDryRunUpdatePreconditions(t *testing.T) { obj := UnstructuredOrDie(`{"kind": "Pod", "metadata": {"uid": "my-uid"}}`) out := UnstructuredOrDie(`{}`) - err := s.Create(context.Background(), "key", obj, out, 0, false) + err := s.Create(context.Background(), "/pods/key", obj, out, 0, false) if err != nil { t.Fatalf("Failed to create new object: %v", err) } @@ -149,12 +149,12 @@ func TestDryRunUpdatePreconditions(t *testing.T) { } wrongID := types.UID("wrong-uid") myID := types.UID("my-uid") - err = s.GuaranteedUpdate(context.Background(), "key", obj, false, &storage.Preconditions{UID: &wrongID}, updateFunc, true, nil) + err = s.GuaranteedUpdate(context.Background(), "/pods/key", obj, false, &storage.Preconditions{UID: &wrongID}, updateFunc, true, nil) if e, ok := err.(*storage.StorageError); !ok || e.Code != storage.ErrCodeInvalidObj { t.Errorf("Expected invalid object, error: %v", err) } - err = s.GuaranteedUpdate(context.Background(), "key", obj, false, &storage.Preconditions{UID: &myID}, updateFunc, true, nil) + err = s.GuaranteedUpdate(context.Background(), "/pods/key", obj, false, &storage.Preconditions{UID: &myID}, updateFunc, true, nil) if err != nil { t.Fatalf("Failed to update with valid precondition: %v", err) } @@ -167,7 +167,7 @@ func TestDryRunUpdateDoesntUpdate(t *testing.T) { obj := UnstructuredOrDie(`{"kind": "Pod"}`) created := UnstructuredOrDie(`{}`) - err := s.Create(context.Background(), "key", obj, created, 0, false) + err := s.Create(context.Background(), "/pods/key", obj, created, 0, false) if err != nil { t.Fatalf("Failed to create new object: %v", err) } @@ -181,12 +181,12 @@ func TestDryRunUpdateDoesntUpdate(t *testing.T) { return u, nil, nil } - err = s.GuaranteedUpdate(context.Background(), "key", obj, false, nil, updateFunc, true, nil) + err = s.GuaranteedUpdate(context.Background(), "/pods/key", obj, false, nil, updateFunc, true, nil) if err != nil { t.Fatalf("Failed to dry-run update: %v", err) } out := UnstructuredOrDie(`{}`) - err = s.Get(context.Background(), "key", storage.GetOptions{}, out) + err = s.Get(context.Background(), "/pods/key", storage.GetOptions{}, out) if err != nil { t.Fatalf("Failed to get storage: %v", err) } @@ -202,7 +202,7 @@ func TestDryRunUpdateReturnsObject(t *testing.T) { obj := UnstructuredOrDie(`{"kind": "Pod"}`) out := UnstructuredOrDie(`{}`) - err := s.Create(context.Background(), "key", obj, out, 0, false) + err := s.Create(context.Background(), "/pods/key", obj, out, 0, false) if err != nil { t.Fatalf("Failed to create new object: %v", err) } @@ -216,7 +216,7 @@ func TestDryRunUpdateReturnsObject(t *testing.T) { return u, nil, nil } - err = s.GuaranteedUpdate(context.Background(), "key", obj, false, nil, updateFunc, true, nil) + err = s.GuaranteedUpdate(context.Background(), "/pods/key", obj, false, nil, updateFunc, true, nil) if err != nil { t.Fatalf("Failed to dry-run update: %v", err) } @@ -233,17 +233,17 @@ func TestDryRunDeleteDoesntDelete(t *testing.T) { obj := UnstructuredOrDie(`{"kind": "Pod"}`) out := UnstructuredOrDie(`{}`) - err := s.Create(context.Background(), "key", obj, out, 0, false) + err := s.Create(context.Background(), "/pods/key", obj, out, 0, false) if err != nil { t.Fatalf("Failed to create new object: %v", err) } - err = s.Delete(context.Background(), "key", out, nil, rest.ValidateAllObjectFunc, true, nil, storage.DeleteOptions{}) + err = s.Delete(context.Background(), "/pods/key", out, nil, rest.ValidateAllObjectFunc, true, nil, storage.DeleteOptions{}) if err != nil { t.Fatalf("Failed to dry-run delete the object: %v", err) } - err = s.Get(context.Background(), "key", storage.GetOptions{}, out) + err = s.Get(context.Background(), "/pods/key", storage.GetOptions{}, out) if err != nil { t.Fatalf("Failed to retrieve dry-run deleted object: %v", err) } @@ -254,7 +254,7 @@ func TestDryRunDeleteMissingObjectFails(t *testing.T) { defer destroy() out := UnstructuredOrDie(`{}`) - err := s.Delete(context.Background(), "key", out, nil, rest.ValidateAllObjectFunc, true, nil, storage.DeleteOptions{}) + err := s.Delete(context.Background(), "/pods/key", out, nil, rest.ValidateAllObjectFunc, true, nil, storage.DeleteOptions{}) if e, ok := err.(*storage.StorageError); !ok || e.Code != storage.ErrCodeKeyNotFound { t.Errorf("Expected key to be not found, error: %v", err) } @@ -267,14 +267,14 @@ func TestDryRunDeleteReturnsObject(t *testing.T) { obj := UnstructuredOrDie(`{"kind": "Pod"}`) out := UnstructuredOrDie(`{}`) - err := s.Create(context.Background(), "key", obj, out, 0, false) + err := s.Create(context.Background(), "/pods/key", obj, out, 0, false) if err != nil { t.Fatalf("Failed to create new object: %v", err) } out = UnstructuredOrDie(`{}`) expected := UnstructuredOrDie(`{"kind": "Pod", "metadata": {"resourceVersion": "2"}}`) - err = s.Delete(context.Background(), "key", out, nil, rest.ValidateAllObjectFunc, true, nil, storage.DeleteOptions{}) + err = s.Delete(context.Background(), "/pods/key", out, nil, rest.ValidateAllObjectFunc, true, nil, storage.DeleteOptions{}) if err != nil { t.Fatalf("Failed to delete with valid precondition: %v", err) } @@ -290,19 +290,19 @@ func TestDryRunDeletePreconditions(t *testing.T) { obj := UnstructuredOrDie(`{"kind": "Pod", "metadata": {"uid": "my-uid"}}`) out := UnstructuredOrDie(`{}`) - err := s.Create(context.Background(), "key", obj, out, 0, false) + err := s.Create(context.Background(), "/pods/key", obj, out, 0, false) if err != nil { t.Fatalf("Failed to create new object: %v", err) } wrongID := types.UID("wrong-uid") myID := types.UID("my-uid") - err = s.Delete(context.Background(), "key", out, &storage.Preconditions{UID: &wrongID}, rest.ValidateAllObjectFunc, true, nil, storage.DeleteOptions{}) + err = s.Delete(context.Background(), "/pods/key", out, &storage.Preconditions{UID: &wrongID}, rest.ValidateAllObjectFunc, true, nil, storage.DeleteOptions{}) if e, ok := err.(*storage.StorageError); !ok || e.Code != storage.ErrCodeInvalidObj { t.Errorf("Expected invalid object, error: %v", err) } - err = s.Delete(context.Background(), "key", out, &storage.Preconditions{UID: &myID}, rest.ValidateAllObjectFunc, true, nil, storage.DeleteOptions{}) + err = s.Delete(context.Background(), "/pods/key", out, &storage.Preconditions{UID: &myID}, rest.ValidateAllObjectFunc, true, nil, storage.DeleteOptions{}) if err != nil { t.Fatalf("Failed to delete with valid precondition: %v", err) } diff --git a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go index cc50afede2aba..bb90542a4f360 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go @@ -2427,7 +2427,7 @@ func TestStoreWatch(t *testing.T) { } func newTestGenericStoreRegistry(t *testing.T, scheme *runtime.Scheme, hasCacheEnabled bool) (factory.DestroyFunc, *Store) { - podPrefix := "/pods" + podPrefix := "/pods/" server, sc := etcd3testing.NewUnsecuredEtcd3TestClientServer(t) strategy := &testRESTStrategy{scheme, names.SimpleNameGenerator, true, false, true} diff --git a/staging/src/k8s.io/apiserver/pkg/registry/rest/update.go b/staging/src/k8s.io/apiserver/pkg/registry/rest/update.go index dc63caf0b5cbc..00f42cfe7c7a2 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/rest/update.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/rest/update.go @@ -153,6 +153,7 @@ func BeforeUpdate(strategy RESTUpdateStrategy, ctx context.Context, obj, old run errs = append(errs, strategy.ValidateUpdate(ctx, obj, old)...) if len(errs) > 0 { + RecordDuplicateValidationErrors(ctx, kind.GroupKind(), errs) return errors.NewInvalid(kind.GroupKind(), objectMeta.GetName(), errs) } diff --git a/staging/src/k8s.io/apiserver/pkg/registry/rest/validate.go b/staging/src/k8s.io/apiserver/pkg/registry/rest/validate.go index 2235a47601192..05606c7e4b522 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/rest/validate.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/rest/validate.go @@ -19,14 +19,16 @@ package rest import ( "context" "fmt" + "slices" "strings" "k8s.io/apimachinery/pkg/api/operation" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/validation/field" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/features" + utilfeature "k8s.io/apiserver/pkg/util/feature" validationmetrics "k8s.io/apiserver/pkg/validation" "k8s.io/klog/v2" ) @@ -43,13 +45,6 @@ func WithOptions(options []string) ValidationConfig { } } -// WithTakeover sets the takeover flag for validation. -func WithTakeover(takeover bool) ValidationConfig { - return func(config *validationConfigOption) { - config.takeover = takeover - } -} - // WithSubresourceMapper sets the subresource mapper for validation. // This should be used when registering validation for polymorphic subresources like /scale. // @@ -73,35 +68,23 @@ func WithSubresourceMapper(subresourceMapper GroupVersionKindProvider) Validatio } } +// WithNormalizationRules sets the normalization rules for validation. +func WithNormalizationRules(rules []field.NormalizationRule) ValidationConfig { + return func(config *validationConfigOption) { + config.normalizationRules = rules + } +} + type validationConfigOption struct { opType operation.Type options []string takeover bool subresourceGVKMapper GroupVersionKindProvider + validationIdentifier string + normalizationRules []field.NormalizationRule } -// ValidateDeclaratively validates obj against declarative validation tags -// defined in its Go type. It uses the API version extracted from ctx and the -// provided scheme for validation. -// -// The ctx MUST contain requestInfo, which determines the target API for -// validation. The obj is converted to the API version using the provided scheme -// before validation occurs. The scheme MUST have the declarative validation -// registered for the requested resource/subresource. -// -// Returns a field.ErrorList containing any validation errors. An internal error -// is included if requestInfo is missing from the context or if version -// conversion fails. -func ValidateDeclaratively(ctx context.Context, scheme *runtime.Scheme, obj runtime.Object, configOpts ...ValidationConfig) field.ErrorList { - cfg := &validationConfigOption{opType: operation.Create} - for _, o := range configOpts { - o(cfg) - } - - return panicSafeValidateFunc(validateDeclaratively, cfg.takeover)(ctx, scheme, obj, nil, cfg) -} - -// ValidateUpdateDeclaratively validates obj and oldObj against declarative +// validateDeclaratively validates obj and oldObj against declarative // validation tags defined in its Go type. It uses the API version extracted from // ctx and the provided scheme for validation. // @@ -113,14 +96,6 @@ func ValidateDeclaratively(ctx context.Context, scheme *runtime.Scheme, obj runt // Returns a field.ErrorList containing any validation errors. An internal error // is included if requestInfo is missing from the context or if version // conversion fails. -func ValidateUpdateDeclaratively(ctx context.Context, scheme *runtime.Scheme, obj, oldObj runtime.Object, configOpts ...ValidationConfig) field.ErrorList { - cfg := &validationConfigOption{opType: operation.Update} - for _, o := range configOpts { - o(cfg) - } - return panicSafeValidateFunc(validateDeclaratively, cfg.takeover)(ctx, scheme, obj, oldObj, cfg) -} - func validateDeclaratively(ctx context.Context, scheme *runtime.Scheme, obj, oldObj runtime.Object, o *validationConfigOption) field.ErrorList { // Find versionedGroupVersion, which identifies the API version to use for declarative validation. versionedGroupVersion, subresources, err := requestInfo(ctx, o.subresourceGVKMapper) @@ -177,23 +152,23 @@ func parseSubresourcePath(subresourcePath string) ([]string, error) { return parts, nil } -// CompareDeclarativeErrorsAndEmitMismatches checks for mismatches between imperative and declarative validation +// compareDeclarativeErrorsAndEmitMismatches checks for mismatches between imperative and declarative validation // and logs + emits metrics when inconsistencies are found -func CompareDeclarativeErrorsAndEmitMismatches(ctx context.Context, imperativeErrs, declarativeErrs field.ErrorList, takeover bool) { +func compareDeclarativeErrorsAndEmitMismatches(ctx context.Context, imperativeErrs, declarativeErrs field.ErrorList, takeover bool, validationIdentifier string, normalizationRules []field.NormalizationRule) { logger := klog.FromContext(ctx) - mismatchDetails := gatherDeclarativeValidationMismatches(imperativeErrs, declarativeErrs, takeover) + mismatchDetails := gatherDeclarativeValidationMismatches(imperativeErrs, declarativeErrs, takeover, normalizationRules) for _, detail := range mismatchDetails { // Log information about the mismatch using contextual logger logger.Error(nil, detail) // Increment the metric for the mismatch - validationmetrics.Metrics.IncDeclarativeValidationMismatchMetric() + validationmetrics.Metrics.IncDeclarativeValidationMismatchMetric(validationIdentifier) } } // gatherDeclarativeValidationMismatches compares imperative and declarative validation errors // and returns detailed information about any mismatches found. Errors are compared via type, field, and origin -func gatherDeclarativeValidationMismatches(imperativeErrs, declarativeErrs field.ErrorList, takeover bool) []string { +func gatherDeclarativeValidationMismatches(imperativeErrs, declarativeErrs field.ErrorList, takeover bool, normalizationRules []field.NormalizationRule) []string { var mismatchDetails []string // short circuit here to minimize allocs for usual case of 0 validation errors if len(imperativeErrs) == 0 && len(declarativeErrs) == 0 { @@ -204,7 +179,7 @@ func gatherDeclarativeValidationMismatches(imperativeErrs, declarativeErrs field if takeover { recommendation = "Consider disabling the DeclarativeValidationTakeover feature gate to keep data persisted in etcd consistent with prior versions of Kubernetes." } - fuzzyMatcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin().RequireOriginWhenInvalid() + fuzzyMatcher := field.ErrorMatcher{}.ByType().ByOrigin().RequireOriginWhenInvalid().ByFieldNormalized(normalizationRules) exactMatcher := field.ErrorMatcher{}.Exactly() // Dedupe imperative errors of exact error matches as they are @@ -287,12 +262,12 @@ func gatherDeclarativeValidationMismatches(imperativeErrs, declarativeErrs field // createDeclarativeValidationPanicHandler returns a function with panic recovery logic // that will increment the panic metric and either log or append errors based on the takeover parameter. -func createDeclarativeValidationPanicHandler(ctx context.Context, errs *field.ErrorList, takeover bool) func() { +func createDeclarativeValidationPanicHandler(ctx context.Context, errs *field.ErrorList, takeover bool, validationIdentifier string) func() { logger := klog.FromContext(ctx) return func() { if r := recover(); r != nil { // Increment the panic metric counter - validationmetrics.Metrics.IncDeclarativeValidationPanicMetric() + validationmetrics.Metrics.IncDeclarativeValidationPanicMetric(validationIdentifier) const errorFmt = "panic during declarative validation: %v" if takeover { @@ -312,11 +287,101 @@ func createDeclarativeValidationPanicHandler(ctx context.Context, errs *field.Er // if takeover=false, and adding a validation error if takeover=true. func panicSafeValidateFunc( validateUpdateFunc func(ctx context.Context, scheme *runtime.Scheme, obj, oldObj runtime.Object, o *validationConfigOption) field.ErrorList, - takeover bool, + takeover bool, validationIdentifier string, ) func(ctx context.Context, scheme *runtime.Scheme, obj, oldObj runtime.Object, o *validationConfigOption) field.ErrorList { return func(ctx context.Context, scheme *runtime.Scheme, obj, oldObj runtime.Object, o *validationConfigOption) (errs field.ErrorList) { - defer createDeclarativeValidationPanicHandler(ctx, &errs, takeover)() + defer createDeclarativeValidationPanicHandler(ctx, &errs, takeover, validationIdentifier)() return validateUpdateFunc(ctx, scheme, obj, oldObj, o) } } + +func metricIdentifier(ctx context.Context, obj runtime.Object, opType operation.Type) (string, error) { + var identifier string + var err error + + identifier = "unknown_resource" + // Use kind for identifier. + if obj != nil { + gvk := obj.GetObjectKind().GroupVersionKind() + if gvk.Kind != "" { + identifier = strings.ToLower(gvk.Kind) + } + } + + // Use requestInfo for subresource. + requestInfo, found := genericapirequest.RequestInfoFrom(ctx) + if !found { + err = fmt.Errorf("could not find requestInfo in context") + } else if len(requestInfo.Subresource) > 0 { + // subresource can be a path, so replace '/' with '_' + identifier += "_" + strings.ReplaceAll(requestInfo.Subresource, "/", "_") + } + + switch opType { + case operation.Create: + identifier += "_create" + case operation.Update: + identifier += "_update" + default: + if err == nil { + err = fmt.Errorf("unknown operation type: %v", opType) + } + identifier += "_unknown_op" + } + return identifier, err +} + +// ValidateDeclarativelyWithMigrationChecks is a helper function that encapsulates the logic for running declarative validation. +// It checks if the DeclarativeValidation feature gate is enabled, generates a validation identifier, +// runs declarative validation, compares the results with imperative validation, and merges the errors if takeover is enabled. +func ValidateDeclarativelyWithMigrationChecks(ctx context.Context, scheme *runtime.Scheme, obj, oldObj runtime.Object, errs field.ErrorList, opType operation.Type, configOpts ...ValidationConfig) field.ErrorList { + if !utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidation) { + return errs + } + + takeover := utilfeature.DefaultFeatureGate.Enabled(features.DeclarativeValidationTakeover) + + validationIdentifier, err := metricIdentifier(ctx, obj, opType) + if err != nil { + // Log the error, but continue with the best-effort identifier. + klog.FromContext(ctx).Error(err, "failed to generate complete validation identifier for declarative validation") + } + + // Directly create the config and call the core validation logic. + cfg := &validationConfigOption{ + opType: opType, + takeover: takeover, + validationIdentifier: validationIdentifier, + } + for _, opt := range configOpts { + opt(cfg) + } + + // Call the panic-safe wrapper with the real validation function. + declarativeErrs := panicSafeValidateFunc(validateDeclaratively, cfg.takeover, cfg.validationIdentifier)(ctx, scheme, obj, oldObj, cfg) + + compareDeclarativeErrorsAndEmitMismatches(ctx, errs, declarativeErrs, takeover, validationIdentifier, cfg.normalizationRules) + if takeover { + errs = append(errs.RemoveCoveredByDeclarative(), declarativeErrs...) + } + + return errs +} + +// RecordDuplicateValidationErrors increments a metric and log the error when duplicate validation errors are found. +func RecordDuplicateValidationErrors(ctx context.Context, qualifiedKind schema.GroupKind, errs field.ErrorList) { + logger := klog.FromContext(ctx) + seenErrs := make([]string, 0, len(errs)) + + for _, err := range errs { + errStr := fmt.Sprintf("%v", err) + + if slices.Contains(seenErrs, errStr) { + logger.Info("Found duplicate validation error", "kind", qualifiedKind.String(), "error", errStr) + validationmetrics.Metrics.IncDuplicateValidationErrorMetric() + } else { + seenErrs = append(seenErrs, errStr) + } + } +} diff --git a/staging/src/k8s.io/apiserver/pkg/registry/rest/validate_test.go b/staging/src/k8s.io/apiserver/pkg/registry/rest/validate_test.go index 194471929638e..81a1786abf3eb 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/rest/validate_test.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/rest/validate_test.go @@ -34,6 +34,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/validation/field" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/validation" + "k8s.io/component-base/metrics/legacyregistry" + "k8s.io/component-base/metrics/testutil" "k8s.io/klog/v2" ) @@ -159,12 +162,16 @@ func TestValidateDeclaratively(t *testing.T) { Subresource: tc.subresource, }) t.Run(tc.name, func(t *testing.T) { - var results field.ErrorList + + cfg := &validationConfigOption{ + options: tc.options, + } if tc.oldObject == nil { - results = ValidateDeclaratively(ctx, scheme, tc.object, WithOptions(tc.options)) + cfg.opType = operation.Create } else { - results = ValidateUpdateDeclaratively(ctx, scheme, tc.object, tc.oldObject, WithOptions(tc.options)) + cfg.opType = operation.Update } + results := panicSafeValidateFunc(validateDeclaratively, cfg.takeover, cfg.validationIdentifier)(ctx, scheme, tc.object, tc.oldObject, cfg) matcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin() matcher.Test(t, tc.expected, results) }) @@ -206,6 +213,7 @@ func TestGatherDeclarativeValidationMismatches(t *testing.T) { errB := field.Invalid(minReadySecondsPath, -1, "covered error B").WithOrigin("minimum") coveredErrB := field.Invalid(minReadySecondsPath, -1, "covered error B").WithOrigin("minimum") errBWithDiffDetail := field.Invalid(minReadySecondsPath, -1, "covered error B - different detail").WithOrigin("minimum") + errBWithDiffPath := field.Invalid(field.NewPath("spec").Child("fakeminReadySeconds"), -1, "covered error B").WithOrigin("minimum") coveredErrB.CoveredByDeclarative = true errC := field.Invalid(replicasPath, nil, "covered error C").WithOrigin("minimum") coveredErrC := field.Invalid(replicasPath, nil, "covered error C").WithOrigin("minimum") @@ -220,6 +228,7 @@ func TestGatherDeclarativeValidationMismatches(t *testing.T) { takeover bool expectMismatches bool expectDetailsContaining []string + normalizedRules []field.NormalizationRule }{ { name: "Declarative and imperative return 0 errors - no mismatch", @@ -351,11 +360,29 @@ func TestGatherDeclarativeValidationMismatches(t *testing.T) { expectMismatches: false, expectDetailsContaining: []string{}, }, + { + name: "Field normalization, errors don't match - mismatch", + imperativeErrors: field.ErrorList{ + coveredErrB, + }, + declarativeErrors: field.ErrorList{ + errBWithDiffPath, + }, + normalizedRules: []field.NormalizationRule{ + { + Regexp: regexp.MustCompile(`spec.fakeminReadySeconds`), + Replacement: "spec.minReadySeconds", + }, + }, + takeover: false, + expectMismatches: false, + expectDetailsContaining: []string{}, + }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - details := gatherDeclarativeValidationMismatches(tc.imperativeErrors, tc.declarativeErrors, tc.takeover) + details := gatherDeclarativeValidationMismatches(tc.imperativeErrors, tc.declarativeErrors, tc.takeover, tc.normalizedRules) // Check if mismatches were found if expected if tc.expectMismatches && len(details) == 0 { t.Errorf("Expected mismatches but got none") @@ -422,7 +449,7 @@ func TestCompareDeclarativeErrorsAndEmitMismatches(t *testing.T) { defer klog.LogToStderr(true) ctx := context.Background() - CompareDeclarativeErrorsAndEmitMismatches(ctx, tc.imperativeErrs, tc.declarativeErrs, tc.takeover) + compareDeclarativeErrorsAndEmitMismatches(ctx, tc.imperativeErrs, tc.declarativeErrs, tc.takeover, "test_validationIdentifier", nil) klog.Flush() logOutput := buf.String() @@ -508,7 +535,7 @@ func TestWithRecover(t *testing.T) { defer klog.LogToStderr(true) // Pass the takeover flag to panicSafeValidateFunc instead of relying on the feature gate - wrapped := panicSafeValidateFunc(tc.validateFn, tc.takeoverEnabled) + wrapped := panicSafeValidateFunc(tc.validateFn, tc.takeoverEnabled, "test_validationIdentifier") gotErrs := wrapped(ctx, scheme, obj, nil, &validationConfigOption{opType: operation.Create, options: options, takeover: tc.takeoverEnabled}) klog.Flush() @@ -602,7 +629,7 @@ func TestWithRecoverUpdate(t *testing.T) { defer klog.LogToStderr(true) // Pass the takeover flag to panicSafeValidateUpdateFunc instead of relying on the feature gate - wrapped := panicSafeValidateFunc(tc.validateFn, tc.takeoverEnabled) + wrapped := panicSafeValidateFunc(tc.validateFn, tc.takeoverEnabled, "test_validationIdentifier") gotErrs := wrapped(ctx, scheme, obj, oldObj, &validationConfigOption{opType: operation.Update, options: options, takeover: tc.takeoverEnabled}) klog.Flush() @@ -629,53 +656,69 @@ func TestWithRecoverUpdate(t *testing.T) { } } -func TestValidateDeclarativelyWithRecovery(t *testing.T) { +func TestRecordDuplicateValidationErrors(t *testing.T) { ctx := context.Background() - scheme := runtime.NewScheme() - var options []string - obj := &runtime.Unknown{} - - // Simple test for the ValidateDeclarativelyWithRecovery function - t.Run("with takeover disabled", func(t *testing.T) { - errs := ValidateDeclaratively(ctx, scheme, obj, WithOptions(options), WithTakeover(false)) - if errs == nil { - // This is expected to error since the request info is missing - t.Errorf("Expected errors but got nil") - } - }) - t.Run("with takeover enabled", func(t *testing.T) { - errs := ValidateDeclaratively(ctx, scheme, obj, WithOptions(options), WithTakeover(true)) - if errs == nil { - // This is expected to error since the request info is missioptionsng - t.Errorf("Expected errors but got nil") - } - }) -} - -func TestValidateUpdateDeclarativelyWithRecovery(t *testing.T) { - ctx := context.Background() - scheme := runtime.NewScheme() - var options []string - obj := &runtime.Unknown{} - oldObj := &runtime.Unknown{} + testCases := []struct { + name string + qualifiedKind schema.GroupKind + errs field.ErrorList + expectedMetric string + }{ + { + name: "detect duplicates and increment metric", + qualifiedKind: schema.GroupKind{Group: "apps", Kind: "ReplicaSet"}, + errs: field.ErrorList{ + field.Invalid(field.NewPath("spec").Child("replicas"), -1, "must be greater than or equal to 0").WithOrigin("minimum"), + field.Invalid(field.NewPath("spec").Child("replicas"), -1, "must be greater than or equal to 0").WithOrigin("minimum"), + field.Invalid(field.NewPath("spec").Child("selector"), &metav1.LabelSelector{MatchLabels: map[string]string{}, MatchExpressions: []metav1.LabelSelectorRequirement{}}, "empty selector is invalid for deployment"), + field.Invalid(field.NewPath("spec").Child("selector"), &metav1.LabelSelector{MatchLabels: map[string]string{}, MatchExpressions: []metav1.LabelSelectorRequirement{}}, "empty selector is invalid for deployment"), + }, + expectedMetric: ` + # HELP apiserver_validation_duplicate_validation_error_total [INTERNAL] Number of duplicate validation errors during validation. + # TYPE apiserver_validation_duplicate_validation_error_total counter + apiserver_validation_duplicate_validation_error_total 2 + `, + }, + { + name: "detect duplicates with all fields but origin being equal", + qualifiedKind: schema.GroupKind{Group: "apps", Kind: "ReplicaSet"}, + errs: field.ErrorList{ + field.Invalid(field.NewPath("spec").Child("replicas"), -1, "must be greater than or equal to 0").WithOrigin("minimum"), + field.Invalid(field.NewPath("spec").Child("replicas"), -1, "must be greater than or equal to 0").WithOrigin("min"), + }, + expectedMetric: ` + # HELP apiserver_validation_duplicate_validation_error_total [INTERNAL] Number of duplicate validation errors during validation. + # TYPE apiserver_validation_duplicate_validation_error_total counter + apiserver_validation_duplicate_validation_error_total 1 + `, + }, + { + name: "no duplicates", + qualifiedKind: schema.GroupKind{Group: "apps", Kind: "ReplicaSet"}, + errs: field.ErrorList{ + field.Invalid(field.NewPath("spec").Child("replicas"), -1, "must be greater than or equal to 0").WithOrigin("minimum"), + field.Invalid(field.NewPath("spec").Child("selector"), &metav1.LabelSelector{MatchLabels: map[string]string{}, MatchExpressions: []metav1.LabelSelectorRequirement{}}, "empty selector is invalid for deployment"), + }, + expectedMetric: ` + # HELP apiserver_validation_duplicate_validation_error_total [INTERNAL] Number of duplicate validation errors during validation. + # TYPE apiserver_validation_duplicate_validation_error_total counter + apiserver_validation_duplicate_validation_error_total 0 + `, + }, + } - // Simple test for the ValidateUpdateDeclarativelyWithRecovery function - t.Run("with takeover disabled", func(t *testing.T) { - errs := ValidateUpdateDeclaratively(ctx, scheme, obj, oldObj, WithOptions(options), WithTakeover(false)) - if errs == nil { - // This is expected to error since the request info is missing - t.Errorf("Expected errors but got nil") - } - }) + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + defer legacyregistry.Reset() + defer validation.ResetValidationMetricsInstance() + RecordDuplicateValidationErrors(ctx, tc.qualifiedKind, tc.errs) - t.Run("with takeover enabled", func(t *testing.T) { - errs := ValidateUpdateDeclaratively(ctx, scheme, obj, oldObj, WithOptions(options), WithTakeover(true)) - if errs == nil { - // This is expected to error since the request info is missing - t.Errorf("Expected errors but got nil") - } - }) + if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(tc.expectedMetric), "apiserver_validation_duplicate_validation_error_total"); err != nil { + t.Fatal(err) + } + }) + } } func equalErrorLists(a, b field.ErrorList) bool { @@ -690,3 +733,63 @@ func equalErrorLists(a, b field.ErrorList) bool { // Both non-nil: do a normal DeepEqual return reflect.DeepEqual(a, b) } + +func TestMetricIdentifier(t *testing.T) { + testCases := []struct { + name string + opType operation.Type + obj runtime.Object + subresource string + expected string + expectErr bool + }{ + { + name: "with subresource", + opType: operation.Create, + obj: &v1.Pod{TypeMeta: metav1.TypeMeta{Kind: "Pod"}}, + subresource: "status", + expected: "pod_status_create", + expectErr: false, + }, + { + name: "without subresource", + opType: operation.Update, + obj: &v1.Pod{TypeMeta: metav1.TypeMeta{Kind: "Pod"}}, + expected: "pod_update", + expectErr: false, + }, + { + name: "unknown operation", + opType: 3, // not a valid operation.Type + obj: &v1.Pod{TypeMeta: metav1.TypeMeta{Kind: "Pod"}}, + expected: "pod_unknown_op", + expectErr: true, + }, + { + name: "no request info and no kind", + opType: operation.Create, + obj: nil, + expected: "unknown_resource_create", + expectErr: true, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + ctx := context.Background() + if tc.obj != nil { + ctx = genericapirequest.WithRequestInfo(ctx, &genericapirequest.RequestInfo{ + Subresource: tc.subresource, + }) + } + + result, err := metricIdentifier(ctx, tc.obj, tc.opType) + if (err != nil) != tc.expectErr { + t.Errorf("expected error: %v, got: %v", tc.expectErr, err) + } + if result != tc.expected { + t.Errorf("expected: %s, got: %s", tc.expected, result) + } + }) + } +} diff --git a/staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates/configmap_cafile_content.go b/staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates/configmap_cafile_content.go index 845a45fab312a..dbe9e375f26c8 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates/configmap_cafile_content.go +++ b/staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates/configmap_cafile_content.go @@ -209,7 +209,7 @@ func (c *ConfigMapCAController) Run(ctx context.Context, workers int) { go c.configMapInformer.Run(ctx.Done()) // wait for your secondary caches to fill before starting your work - if !cache.WaitForNamedCacheSync(c.name, ctx.Done(), c.preRunCaches...) { + if !cache.WaitForNamedCacheSyncWithContext(ctx, c.preRunCaches...) { return } diff --git a/staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go b/staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go index 4d00346344c27..e687f099df149 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go +++ b/staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go @@ -531,7 +531,7 @@ func (s preparedGenericAPIServer) RunWithContext(ctx context.Context) error { if s.UnprotectedDebugSocket != nil { go func() { defer utilruntime.HandleCrash() - klog.Error(s.UnprotectedDebugSocket.Run(stopCh)) + klog.Error(s.UnprotectedDebugSocket.RunWithContext(ctx)) }() } diff --git a/staging/src/k8s.io/apiserver/pkg/server/genericapiserver_graceful_termination_test.go b/staging/src/k8s.io/apiserver/pkg/server/genericapiserver_graceful_termination_test.go index 39079c616a64e..24d918ebf97f6 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/genericapiserver_graceful_termination_test.go +++ b/staging/src/k8s.io/apiserver/pkg/server/genericapiserver_graceful_termination_test.go @@ -39,10 +39,13 @@ import ( auditinternal "k8s.io/apiserver/pkg/apis/audit" "k8s.io/apiserver/pkg/audit" "k8s.io/apiserver/pkg/authorization/authorizer" + "k8s.io/apiserver/pkg/endpoints/openapi" apirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/server/dynamiccertificates" + clientscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/klog/v2" "k8s.io/klog/v2/ktesting" + kubeopenapi "k8s.io/kube-openapi/pkg/common" "github.com/google/go-cmp/cmp" "golang.org/x/net/http2" @@ -1024,6 +1027,12 @@ func newClient(useNewConnection bool) *http.Client { } } +func getOpenAPIDefinitionsForTest(_ kubeopenapi.ReferenceCallback) map[string]kubeopenapi.OpenAPIDefinition { + return map[string]kubeopenapi.OpenAPIDefinition{ + "io.k8s.apimachinery.pkg.apis.meta.v1.APIGroupList": {}, + } +} + func newGenericAPIServer(t *testing.T, fAudit *fakeAudit, keepListening bool) *GenericAPIServer { config, _ := setUp(t) config.ShutdownDelayDuration = 100 * time.Millisecond @@ -1032,6 +1041,9 @@ func newGenericAPIServer(t *testing.T, fAudit *fakeAudit, keepListening bool) *G config.ShutdownWatchTerminationGracePeriod = 2 * time.Second config.AuditPolicyRuleEvaluator = fAudit config.AuditBackend = fAudit + namer := openapi.NewDefinitionNamer(clientscheme.Scheme) + config.OpenAPIConfig = DefaultOpenAPIConfig(getOpenAPIDefinitionsForTest, namer) + config.OpenAPIV3Config = DefaultOpenAPIV3Config(getOpenAPIDefinitionsForTest, namer) s, err := config.Complete(nil).New("test", NewEmptyDelegate()) if err != nil { diff --git a/staging/src/k8s.io/apiserver/pkg/server/genericapiserver_test.go b/staging/src/k8s.io/apiserver/pkg/server/genericapiserver_test.go index d3457cf34a112..7c60c7d8b186c 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/genericapiserver_test.go +++ b/staging/src/k8s.io/apiserver/pkg/server/genericapiserver_test.go @@ -119,11 +119,11 @@ func buildTestOpenAPIDefinition() kubeopenapi.OpenAPIDefinition { func testGetOpenAPIDefinitions(_ kubeopenapi.ReferenceCallback) map[string]kubeopenapi.OpenAPIDefinition { return map[string]kubeopenapi.OpenAPIDefinition{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Status": {}, - "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": {}, - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": {}, - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": buildTestOpenAPIDefinition(), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": {}, + "io.k8s.apimachinery.pkg.apis.meta.v1.Status": {}, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIVersions": {}, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIGroupList": {}, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup": buildTestOpenAPIDefinition(), + "io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList": {}, } } diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/admission.go b/staging/src/k8s.io/apiserver/pkg/server/options/admission.go index 6b4669e450637..2a7ddf4d8e012 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/admission.go +++ b/staging/src/k8s.io/apiserver/pkg/server/options/admission.go @@ -44,6 +44,7 @@ import ( "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" "k8s.io/client-go/restmapper" + "k8s.io/component-base/compatibility" "k8s.io/component-base/featuregate" ) @@ -130,6 +131,7 @@ func (a *AdmissionOptions) ApplyTo( kubeClient kubernetes.Interface, dynamicClient dynamic.Interface, features featuregate.FeatureGate, + effectiveVersion compatibility.EffectiveVersion, pluginInitializers ...admission.PluginInitializer, ) error { if a == nil { @@ -154,7 +156,7 @@ func (a *AdmissionOptions) ApplyTo( discoveryClient := cacheddiscovery.NewMemCacheClient(kubeClient.Discovery()) discoveryRESTMapper := restmapper.NewDeferredDiscoveryRESTMapper(discoveryClient) genericInitializer := initializer.New(kubeClient, dynamicClient, informers, c.Authorization.Authorizer, features, - c.DrainedNotify(), discoveryRESTMapper) + effectiveVersion, c.DrainedNotify(), discoveryRESTMapper) initializersChain := admission.PluginInitializers{genericInitializer} initializersChain = append(initializersChain, pluginInitializers...) diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go b/staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go index 6d0e28428e705..e340c9d2ce562 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go +++ b/staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go @@ -395,7 +395,7 @@ func (h *kmsv2PluginProbe) rotateDEKOnKeyIDChange(ctx context.Context, statusKey // allow writes indefinitely as long as there is no error // allow writes for only up to kmsv2PluginWriteDEKSourceMaxTTL from now when there are errors // we start the timer before we make the network call because kmsv2PluginWriteDEKSourceMaxTTL is meant to be the upper bound - expirationTimestamp := envelopekmsv2.NowFunc().Add(kmsv2PluginWriteDEKSourceMaxTTL) + expirationTimestamp := envelopekmsv2.GetNowFunc(h.name)().Add(kmsv2PluginWriteDEKSourceMaxTTL) // dynamically check if we want to use KDF seed to derive DEKs or just a single DEK // this gate can only change during tests, but the check is cheap enough to always make @@ -431,6 +431,7 @@ func (h *kmsv2PluginProbe) rotateDEKOnKeyIDChange(ctx context.Context, statusKey UID: uid, ExpirationTimestamp: expirationTimestamp, CacheKey: cacheKey, + KMSProviderName: h.name, }) // it should be logically impossible for the new state to be invalid but check just in case @@ -792,7 +793,9 @@ func kmsPrefixTransformer(ctx context.Context, config *apiserver.KMSConfiguratio apiServerID: apiServerID, } // initialize state so that Load always works - probe.state.Store(&envelopekmsv2.State{}) + probe.state.Store(&envelopekmsv2.State{ + KMSProviderName: kmsName, + }) primeAndProbeKMSv2(ctx, probe, kmsName) transformer := storagevalue.PrefixTransformer{ diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config_test.go b/staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config_test.go index 125d43ef93e10..f509b989660c9 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config_test.go +++ b/staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config_test.go @@ -1853,10 +1853,8 @@ func TestComputeEncryptionConfigHash(t *testing.T) { func Test_kmsv2PluginProbe_rotateDEKOnKeyIDChange(t *testing.T) { defaultUseSeed := GetKDF("") - origNowFunc := envelopekmsv2.NowFunc + origNowFunc := envelopekmsv2.GetNowFunc("") now := origNowFunc() // freeze time - t.Cleanup(func() { envelopekmsv2.NowFunc = origNowFunc }) - envelopekmsv2.NowFunc = func() time.Time { return now } klog.LogToStderr(false) var level klog.Level @@ -2083,6 +2081,9 @@ func Test_kmsv2PluginProbe_rotateDEKOnKeyIDChange(t *testing.T) { kmsName := fmt.Sprintf("panda-%d", i) defer SetKDFForTests(kmsName, tt.useSeed)() + resetNowFunc := envelopekmsv2.SetNowFuncForTests(kmsName, func() time.Time { return now }) + t.Cleanup(resetNowFunc) + var buf bytes.Buffer klog.SetOutput(&buf) @@ -2092,6 +2093,7 @@ func Test_kmsv2PluginProbe_rotateDEKOnKeyIDChange(t *testing.T) { name: kmsName, service: tt.service, } + tt.state.KMSProviderName = kmsName h.state.Store(&tt.state) err := h.rotateDEKOnKeyIDChange(ctx, tt.statusKeyID, "panda") @@ -2106,6 +2108,8 @@ func Test_kmsv2PluginProbe_rotateDEKOnKeyIDChange(t *testing.T) { ignoredFields := sets.NewString("Transformer", "EncryptedObjectEncryptedDEKSource", "UID", "CacheKey") gotState := *h.state.Load() + gotState.KMSProviderName = kmsName + tt.wantState.KMSProviderName = kmsName if diff := cmp.Diff(tt.wantState, gotState, cmp.FilterPath(func(path cmp.Path) bool { return ignoredFields.Has(path.String()) }, cmp.Ignore()), diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/recommended.go b/staging/src/k8s.io/apiserver/pkg/server/options/recommended.go index 2ead600f83c19..a80c3f9ed42f9 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/recommended.go +++ b/staging/src/k8s.io/apiserver/pkg/server/options/recommended.go @@ -141,6 +141,7 @@ func (o *RecommendedOptions) ApplyTo(config *server.RecommendedConfig) error { return err } if err := o.Admission.ApplyTo(&config.Config, config.SharedInformerFactory, kubeClient, dynamicClient, o.FeatureGate, + config.EffectiveVersion, initializers...); err != nil { return err } diff --git a/staging/src/k8s.io/apiserver/pkg/server/routes/debugsocket.go b/staging/src/k8s.io/apiserver/pkg/server/routes/debugsocket.go index e7297b35f33f2..4deed5a5c23c9 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/routes/debugsocket.go +++ b/staging/src/k8s.io/apiserver/pkg/server/routes/debugsocket.go @@ -17,12 +17,15 @@ limitations under the License. package routes import ( + "context" "fmt" "net" "net/http" "net/http/pprof" "os" "path" + + "k8s.io/apimachinery/pkg/util/wait" ) // DebugSocket installs profiling and debugflag as a Unix-Domain socket. @@ -62,7 +65,14 @@ func (s *DebugSocket) InstallDebugFlag(flag string, handler func(http.ResponseWr } // Run starts the server and waits for stopCh to be closed to close the server. +// +//logcheck:context // RunWithContext should be used instead of Run in code which supports contextual logging. func (s *DebugSocket) Run(stopCh <-chan struct{}) error { + return s.RunWithContext(wait.ContextForChannel(stopCh)) +} + +// RunWithContext starts the server and waits for the context to be cancelled to close the server. +func (s *DebugSocket) RunWithContext(ctx context.Context) error { if err := os.Remove(s.path); err != nil && !os.IsNotExist(err) { return fmt.Errorf("failed to remove (%v): %v", s.path, err) } @@ -75,7 +85,7 @@ func (s *DebugSocket) Run(stopCh <-chan struct{}) error { srv := http.Server{Handler: s.mux} go func() { - <-stopCh + <-ctx.Done() srv.Close() }() return srv.Serve(l) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher_test.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher_test.go index 85d44df528e83..80d1b59657edc 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher_test.go @@ -258,7 +258,7 @@ func TestCacheWatcherStoppedOnDestroy(t *testing.T) { t.Fatalf("unexpected error waiting for the cache to be ready") } - w, err := cacher.Watch(context.Background(), "pods/ns", storage.ListOptions{ResourceVersion: "0", Predicate: storage.Everything}) + w, err := cacher.Watch(context.Background(), "/pods/ns", storage.ListOptions{ResourceVersion: "0", Predicate: storage.Everything}) if err != nil { t.Fatalf("Failed to create watch: %v", err) } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go index 3770bc8370333..a5f7ab6d692ad 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go @@ -374,8 +374,18 @@ func NewCacherFromConfig(config Config) (*Cacher, error) { config.Clock = clock.RealClock{} } objType := reflect.TypeOf(obj) + resourcePrefix := config.ResourcePrefix + if resourcePrefix == "" { + return nil, fmt.Errorf("resourcePrefix cannot be empty") + } + if resourcePrefix == "/" { + return nil, fmt.Errorf("resourcePrefix cannot be /") + } + if !strings.HasPrefix(resourcePrefix, "/") { + return nil, fmt.Errorf("resourcePrefix needs to start from /") + } cacher := &Cacher{ - resourcePrefix: config.ResourcePrefix, + resourcePrefix: resourcePrefix, ready: newReady(config.Clock), storage: config.Storage, objectType: objType, @@ -426,8 +436,8 @@ func NewCacherFromConfig(config Config) (*Cacher, error) { watchCache := newWatchCache( config.KeyFunc, cacher.processEvent, config.GetAttrsFunc, config.Versioner, config.Indexers, config.Clock, eventFreshDuration, config.GroupResource, progressRequester, config.Storage.GetCurrentResourceVersion) - listerWatcher := NewListerWatcher(config.Storage, config.ResourcePrefix, config.NewListFunc, contextMetadata) - reflectorName := "storage/cacher.go:" + config.ResourcePrefix + listerWatcher := NewListerWatcher(config.Storage, resourcePrefix, config.NewListFunc, contextMetadata) + reflectorName := "storage/cacher.go:" + resourcePrefix reflector := cache.NewNamedReflector(reflectorName, listerWatcher, obj, watchCache, 0) // Configure reflector's pager to for an appropriate pagination chunk size for fetching data from @@ -441,6 +451,13 @@ func NewCacherFromConfig(config Config) (*Cacher, error) { cacher.watchCache = watchCache cacher.reflector = reflector + if utilfeature.DefaultFeatureGate.Enabled(features.SizeBasedListCostEstimate) { + err := config.Storage.EnableResourceSizeEstimation(cacher.getKeys) + if err != nil { + return nil, fmt.Errorf("failed to enable resource size estimation: %w", err) + } + } + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { cacher.compactor = newCompactor(config.Storage, watchCache, config.Clock) go cacher.compactor.Run(stopCh) @@ -461,7 +478,6 @@ func NewCacherFromConfig(config Config) (*Cacher, error) { }, time.Second, stopCh, ) }() - config.Storage.SetKeysFunc(cacher.getKeys) return cacher, nil } @@ -489,6 +505,10 @@ type namespacedName struct { } func (c *Cacher) Watch(ctx context.Context, key string, opts storage.ListOptions) (watch.Interface, error) { + key, err := c.prepareKey(key, opts.Recursive) + if err != nil { + return nil, err + } pred := opts.Predicate requestedWatchRV, err := c.versioner.ParseResourceVersion(opts.ResourceVersion) if err != nil { @@ -656,6 +676,10 @@ func (c *Cacher) Watch(ctx context.Context, key string, opts storage.ListOptions } func (c *Cacher) Get(ctx context.Context, key string, opts storage.GetOptions, objPtr runtime.Object) error { + key, err := c.prepareKey(key, false) + if err != nil { + return err + } getRV, err := c.versioner.ParseResourceVersion(opts.ResourceVersion) if err != nil { return err @@ -707,15 +731,11 @@ type listResp struct { // GetList implements storage.Interface func (c *Cacher) GetList(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { - // For recursive lists, we need to make sure the key ended with "/" so that we only - // get children "directories". e.g. if we have key "/a", "/a/b", "/ab", getting keys - // with prefix "/a" will return all three, while with prefix "/a/" will return only - // "/a/b" which is the correct answer. - preparedKey := key - if opts.Recursive && !strings.HasSuffix(key, "/") { - preparedKey += "/" - } - _, err := c.versioner.ParseResourceVersion(opts.ResourceVersion) + preparedKey, err := c.prepareKey(key, opts.Recursive) + if err != nil { + return err + } + _, err = c.versioner.ParseResourceVersion(opts.ResourceVersion) if err != nil { return err } @@ -1159,6 +1179,10 @@ func (c *Cacher) Stop() { c.stopWg.Wait() } +func (c *Cacher) prepareKey(key string, recursive bool) (string, error) { + return storage.PrepareKey(c.resourcePrefix, key, recursive) +} + func forgetWatcher(c *Cacher, w *cacheWatcher, index int, scope namespacedName, triggerValue string, triggerSupported bool) func(bool) { return func(drainWatcher bool) { c.Lock() diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_test.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_test.go index 309851f5c7e70..31b4a249689cc 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_test.go @@ -199,14 +199,14 @@ func TestLists(t *testing.T) { t.Parallel() ctx, cacher, server, terminate := testSetupWithEtcdServer(t) t.Cleanup(terminate) - storagetesting.RunTestConsistentList(ctx, t, cacher, increaseRV(server.V3Client.Client), true, consistentRead, listFromCacheSnapshot) + storagetesting.RunTestConsistentList(ctx, t, cacher, increaseRVFunc(server.V3Client.Client), true, consistentRead, listFromCacheSnapshot) }) t.Run("GetListNonRecursive", func(t *testing.T) { t.Parallel() ctx, cacher, server, terminate := testSetupWithEtcdServer(t) t.Cleanup(terminate) - storagetesting.RunTestGetListNonRecursive(ctx, t, increaseRV(server.V3Client.Client), cacher) + storagetesting.RunTestGetListNonRecursive(ctx, t, increaseRVFunc(server.V3Client.Client), cacher) }) }) } @@ -218,7 +218,7 @@ func TestCompactRevision(t *testing.T) { featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.ListFromCacheSnapshot, true) ctx, cacher, server, terminate := testSetupWithEtcdServer(t) t.Cleanup(terminate) - storagetesting.RunTestCompactRevision(ctx, t, cacher, increaseRV(server.V3Client.Client), compactStore(cacher, server.V3Client.Client)) + storagetesting.RunTestCompactRevision(ctx, t, cacher, increaseRVFunc(server.V3Client.Client), compactStore(cacher, server.V3Client.Client)) } func TestMarkConsistent(t *testing.T) { @@ -303,7 +303,7 @@ func etcdListRequests(t *testing.T, ctx context.Context, store storage.Interface key := rand.String(10) listCtx := context.WithValue(ctx, storagetesting.RecorderContextKey, key) listOut := &example.PodList{} - if err := store.GetList(listCtx, "/pods", opts, listOut); err != nil { + if err := store.GetList(listCtx, "/pods/", opts, listOut); err != nil { t.Fatalf("Unexpected error: %v", err) } return recorder.ListRequestForKey(key) @@ -391,6 +391,11 @@ func TestStats(t *testing.T) { }) } } +func TestKeySchema(t *testing.T) { + ctx, cacher, terminate := testSetup(t) + t.Cleanup(terminate) + storagetesting.RunTestKeySchema(ctx, t, cacher) +} func TestWatch(t *testing.T) { ctx, cacher, terminate := testSetup(t) @@ -513,7 +518,7 @@ type setupOptions struct { type setupOption func(*setupOptions) func withDefaults(options *setupOptions) { - prefix := "/pods" + prefix := "/pods/" options.resourcePrefix = prefix options.keyFunc = func(obj runtime.Object) (string, error) { return storage.NamespaceKeyFunc(prefix, obj) } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_testing_utils_test.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_testing_utils_test.go index 8c08f777d5f9e..245e9a0b99f30 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_testing_utils_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_testing_utils_test.go @@ -63,19 +63,22 @@ func newEtcdTestStorage(t testing.TB, prefix string) (*etcd3testing.EtcdTestServ codec := apitesting.TestCodec(codecs, examplev1.SchemeGroupVersion) compactor := etcd3.NewCompactor(server.V3Client.Client, 0, clock.RealClock{}, nil) t.Cleanup(compactor.Stop) - storage := etcd3.New( + storage, err := etcd3.New( server.V3Client, compactor, codec, newPod, newPodList, prefix, - "/pods", + "/pods/", schema.GroupResource{Resource: "pods"}, identity.NewEncryptCheckTransformer(), etcd3.NewDefaultLeaseManagerConfig(), etcd3.NewDefaultDecoder(codec, versioner), versioner) + if err != nil { + t.Fatal(err) + } t.Cleanup(storage.Close) return server, storage } @@ -162,10 +165,12 @@ func compactStore(c *CacheDelegator, client *clientv3.Client) storagetesting.Com } } -func increaseRV(client *clientv3.Client) storagetesting.IncreaseRVFunc { - return func(ctx context.Context, t *testing.T) { - if _, err := client.KV.Put(ctx, "increaseRV", "ok"); err != nil { +func increaseRVFunc(client *clientv3.Client) storagetesting.IncreaseRVFunc { + return func(ctx context.Context, t *testing.T) int64 { + resp, err := client.KV.Put(ctx, "increaseRV", "ok") + if err != nil { t.Fatalf("Could not update increaseRV: %v", err) } + return resp.Header.Revision } } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go index bd3ce3237e4f2..c4660b6917674 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go @@ -64,7 +64,7 @@ import ( ) func newTestCacherWithoutSyncing(s storage.Interface, c clock.WithTicker) (*Cacher, storage.Versioner, error) { - prefix := "pods" + prefix := "/pods/" config := Config{ Storage: s, Versioner: storage.APIObjectVersioner{}, @@ -196,7 +196,8 @@ func (d *dummyStorage) GuaranteedUpdate(_ context.Context, _ string, _ runtime.O func (d *dummyStorage) Stats(_ context.Context) (storage.Stats, error) { return storage.Stats{}, fmt.Errorf("unimplemented") } -func (d *dummyStorage) SetKeysFunc(storage.KeysFunc) { +func (d *dummyStorage) EnableResourceSizeEstimation(storage.KeysFunc) error { + return nil } func (d *dummyStorage) ReadinessCheck() error { return nil @@ -625,7 +626,7 @@ apiserver_watch_cache_consistent_read_total{fallback="true", group="", resource= } start := cacher.clock.Now() - err = delegator.GetList(context.TODO(), "pods/ns", storage.ListOptions{ResourceVersion: "", Recursive: true}, result) + err = delegator.GetList(context.TODO(), "/pods/ns", storage.ListOptions{ResourceVersion: "", Recursive: true}, result) clockStepCancelFn() duration := cacher.clock.Since(start) if (err != nil) != tc.expectError { @@ -717,7 +718,7 @@ func TestMatchExactResourceVersionFallback(t *testing.T) { delegator := NewCacheDelegator(cacher, backingStorage) result := &example.PodList{} - err = delegator.GetList(context.TODO(), "pods/ns", storage.ListOptions{ResourceVersion: "20", ResourceVersionMatch: metav1.ResourceVersionMatchExact, Recursive: true}, result) + err = delegator.GetList(context.TODO(), "/pods/ns", storage.ListOptions{ResourceVersion: "20", ResourceVersionMatch: metav1.ResourceVersionMatchExact, Recursive: true}, result) if err != nil { t.Fatalf("Unexpected error: %v", err) } @@ -760,7 +761,7 @@ func TestGetListNonRecursiveCacheBypass(t *testing.T) { // Inject error to underlying layer and check if cacher is not bypassed. backingStorage.injectGetListError(errDummy) - err = delegator.GetList(context.TODO(), "pods/ns", storage.ListOptions{ + err = delegator.GetList(context.TODO(), "/pods/ns", storage.ListOptions{ ResourceVersion: "0", Predicate: pred, }, result) @@ -768,7 +769,7 @@ func TestGetListNonRecursiveCacheBypass(t *testing.T) { t.Errorf("GetList with Limit and RV=0 should be served from cache: %v", err) } - err = delegator.GetList(context.TODO(), "pods/ns", storage.ListOptions{ + err = delegator.GetList(context.TODO(), "/pods/ns", storage.ListOptions{ ResourceVersion: "", Predicate: pred, }, result) @@ -841,7 +842,7 @@ func TestGetListNonRecursiveCacheWithConsistentListFromCache(t *testing.T) { defer delegator.Stop() // Setup test object - key := "pods/ns" + key := "/pods/ns" input := &example.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "ns"}} if err := v.UpdateObject(input, 100); err != nil { t.Fatalf("Unexpected error: %v", err) @@ -916,7 +917,7 @@ func TestGetCacheBypass(t *testing.T) { // Inject error to underlying layer and check if cacher is not bypassed. backingStorage.injectGetListError(errDummy) - err = delegator.Get(context.TODO(), "pods/ns/pod-0", storage.GetOptions{ + err = delegator.Get(context.TODO(), "/pods/ns/pod-0", storage.GetOptions{ IgnoreNotFound: true, ResourceVersion: "0", }, result) @@ -924,7 +925,7 @@ func TestGetCacheBypass(t *testing.T) { t.Errorf("Get with RV=0 should be served from cache: %v", err) } - err = delegator.Get(context.TODO(), "pods/ns/pod-0", storage.GetOptions{ + err = delegator.Get(context.TODO(), "/pods/ns/pod-0", storage.GetOptions{ IgnoreNotFound: true, ResourceVersion: "", }, result) @@ -949,7 +950,7 @@ func TestWatchCacheBypass(t *testing.T) { } } - _, err = delegator.Watch(context.TODO(), "pod/ns", storage.ListOptions{ + _, err = delegator.Watch(context.TODO(), "/pods/ns", storage.ListOptions{ ResourceVersion: "0", Predicate: storage.Everything, }) @@ -957,7 +958,7 @@ func TestWatchCacheBypass(t *testing.T) { t.Errorf("Watch with RV=0 should be served from cache: %v", err) } - _, err = delegator.Watch(context.TODO(), "pod/ns", storage.ListOptions{ + _, err = delegator.Watch(context.TODO(), "/pods/ns", storage.ListOptions{ ResourceVersion: "", Predicate: storage.Everything, }) @@ -1119,7 +1120,7 @@ func TestWatchNotHangingOnStartupFailure(t *testing.T) { // Watch hangs waiting on watchcache being initialized. // Ensure that it terminates when its context is cancelled // (e.g. the request is terminated for whatever reason). - _, err = cacher.Watch(ctx, "pods/ns", storage.ListOptions{ResourceVersion: "0"}) + _, err = cacher.Watch(ctx, "/pods/ns", storage.ListOptions{ResourceVersion: "0"}) if !utilfeature.DefaultFeatureGate.Enabled(features.ResilientWatchCacheInitialization) { if err == nil || err.Error() != apierrors.NewServiceUnavailable(context.Canceled.Error()).Error() { t.Errorf("Unexpected error: %#v", err) @@ -1164,7 +1165,7 @@ func TestWatcherNotGoingBackInTime(t *testing.T) { totalPods := 100 // Create watcher that will be slowing down reading. - w1, err := cacher.Watch(context.TODO(), "pods/ns", storage.ListOptions{ + w1, err := cacher.Watch(context.TODO(), "/pods/ns", storage.ListOptions{ ResourceVersion: "999", Predicate: storage.Everything, }) @@ -1189,7 +1190,7 @@ func TestWatcherNotGoingBackInTime(t *testing.T) { } // Create fast watcher and ensure it will get each object exactly once. - w2, err := cacher.Watch(context.TODO(), "pods/ns", storage.ListOptions{ResourceVersion: "999", Predicate: storage.Everything}) + w2, err := cacher.Watch(context.TODO(), "/pods/ns", storage.ListOptions{ResourceVersion: "999", Predicate: storage.Everything}) if err != nil { t.Fatalf("Failed to create watch: %v", err) } @@ -1234,7 +1235,7 @@ func TestCacherDontAcceptRequestsStopped(t *testing.T) { } } - w, err := delegator.Watch(context.Background(), "pods/ns", storage.ListOptions{ResourceVersion: "0", Predicate: storage.Everything}) + w, err := delegator.Watch(context.Background(), "/pods/ns", storage.ListOptions{ResourceVersion: "0", Predicate: storage.Everything}) if err != nil { t.Fatalf("Failed to create watch: %v", err) } @@ -1254,13 +1255,13 @@ func TestCacherDontAcceptRequestsStopped(t *testing.T) { cacher.Stop() - _, err = delegator.Watch(context.Background(), "pods/ns", storage.ListOptions{ResourceVersion: "0", Predicate: storage.Everything}) + _, err = delegator.Watch(context.Background(), "/pods/ns", storage.ListOptions{ResourceVersion: "0", Predicate: storage.Everything}) if err == nil { t.Fatalf("Success to create Watch: %v", err) } result := &example.Pod{} - err = delegator.Get(context.TODO(), "pods/ns/pod-0", storage.GetOptions{ + err = delegator.Get(context.TODO(), "/pods/ns/pod-0", storage.GetOptions{ IgnoreNotFound: true, ResourceVersion: "1", }, result) @@ -1275,7 +1276,7 @@ func TestCacherDontAcceptRequestsStopped(t *testing.T) { } listResult := &example.PodList{} - err = delegator.GetList(context.TODO(), "pods/ns", storage.ListOptions{ + err = delegator.GetList(context.TODO(), "/pods/ns", storage.ListOptions{ ResourceVersion: "1", Recursive: true, Predicate: storage.SelectionPredicate{ @@ -1373,7 +1374,7 @@ func TestCacherDontMissEventsOnReinitialization(t *testing.T) { for i := 0; i < concurrency; i++ { go func() { defer wg.Done() - w, err := cacher.Watch(ctx, "pods", storage.ListOptions{ResourceVersion: "1", Predicate: storage.Everything}) + w, err := cacher.Watch(ctx, "/pods/", storage.ListOptions{ResourceVersion: "1", Predicate: storage.Everything}) if err != nil { // Watch failed to initialize (this most probably means that cacher // already moved back to Pending state before watch initialized. @@ -1442,7 +1443,7 @@ func TestCacherNoLeakWithMultipleWatchers(t *testing.T) { default: ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) defer cancel() - w, err := cacher.Watch(ctx, "pods/ns", storage.ListOptions{ResourceVersion: "0", Predicate: pred}) + w, err := cacher.Watch(ctx, "/pods/ns", storage.ListOptions{ResourceVersion: "0", Predicate: pred}) if err != nil { watchErr = fmt.Errorf("Failed to create watch: %v", err) return @@ -1507,7 +1508,7 @@ func testCacherSendBookmarkEvents(t *testing.T, allowWatchBookmarks, expectedBoo ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) defer cancel() - w, err := cacher.Watch(ctx, "pods/ns", storage.ListOptions{ResourceVersion: "0", Predicate: pred}) + w, err := cacher.Watch(ctx, "/pods/ns", storage.ListOptions{ResourceVersion: "0", Predicate: pred}) if err != nil { t.Fatalf("Failed to create watch: %v", err) } @@ -1676,7 +1677,7 @@ func TestInitialEventsEndBookmark(t *testing.T) { pred.AllowWatchBookmarks = scenario.allowWatchBookmarks ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute) defer cancel() - w, err := cacher.Watch(ctx, "pods/ns", storage.ListOptions{ResourceVersion: "100", SendInitialEvents: scenario.sendInitialEvents, Predicate: pred}) + w, err := cacher.Watch(ctx, "/pods/ns", storage.ListOptions{ResourceVersion: "100", SendInitialEvents: scenario.sendInitialEvents, Predicate: pred}) if err != nil { t.Fatalf("Failed to create watch: %v", err) } @@ -1723,7 +1724,7 @@ func TestCacherSendsMultipleWatchBookmarks(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() - w, err := cacher.Watch(ctx, "pods/ns", storage.ListOptions{ResourceVersion: "100", Predicate: pred}) + w, err := cacher.Watch(ctx, "/pods/ns", storage.ListOptions{ResourceVersion: "100", Predicate: pred}) if err != nil { t.Fatalf("Failed to create watch: %v", err) } @@ -1794,7 +1795,7 @@ func TestDispatchingBookmarkEventsWithConcurrentStop(t *testing.T) { pred.AllowWatchBookmarks = true ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() - w, err := cacher.Watch(ctx, "pods/ns", storage.ListOptions{ResourceVersion: "999", Predicate: pred}) + w, err := cacher.Watch(ctx, "/pods/ns", storage.ListOptions{ResourceVersion: "999", Predicate: pred}) if err != nil { t.Fatalf("Failed to create watch: %v", err) } @@ -1968,7 +1969,7 @@ func TestStartingResourceVersion(t *testing.T) { // Advance RV by 10. startVersion := uint64(1010) - watcher, err := cacher.Watch(context.TODO(), "pods/ns/foo", storage.ListOptions{ResourceVersion: strconv.FormatUint(startVersion, 10), Predicate: storage.Everything}) + watcher, err := cacher.Watch(context.TODO(), "/pods/ns/foo", storage.ListOptions{ResourceVersion: strconv.FormatUint(startVersion, 10), Predicate: storage.Everything}) if err != nil { t.Fatalf("Unexpected error: %v", err) } @@ -2045,14 +2046,14 @@ func TestDispatchEventWillNotBeBlockedByTimedOutWatcher(t *testing.T) { totalPods := 50 // Create watcher that will be blocked. - w1, err := cacher.Watch(context.TODO(), "pods/ns", storage.ListOptions{ResourceVersion: "999", Predicate: storage.Everything}) + w1, err := cacher.Watch(context.TODO(), "/pods/ns", storage.ListOptions{ResourceVersion: "999", Predicate: storage.Everything}) if err != nil { t.Fatalf("Failed to create watch: %v", err) } defer w1.Stop() // Create fast watcher and ensure it will get all objects. - w2, err := cacher.Watch(context.TODO(), "pods/ns", storage.ListOptions{ResourceVersion: "999", Predicate: storage.Everything}) + w2, err := cacher.Watch(context.TODO(), "/pods/ns", storage.ListOptions{ResourceVersion: "999", Predicate: storage.Everything}) if err != nil { t.Fatalf("Failed to create watch: %v", err) } @@ -2167,7 +2168,7 @@ func TestCachingDeleteEvents(t *testing.T) { } createWatch := func(pred storage.SelectionPredicate) watch.Interface { - w, err := cacher.Watch(context.TODO(), "pods/ns", storage.ListOptions{ResourceVersion: "999", Predicate: pred}) + w, err := cacher.Watch(context.TODO(), "/pods/ns", storage.ListOptions{ResourceVersion: "999", Predicate: pred}) if err != nil { t.Fatalf("Failed to create watch: %v", err) } @@ -2248,7 +2249,7 @@ func testCachingObjects(t *testing.T, watchersCount int) { watchers := make([]watch.Interface, 0, watchersCount) for i := 0; i < watchersCount; i++ { - w, err := cacher.Watch(context.TODO(), "pods/ns", storage.ListOptions{ResourceVersion: "1000", Predicate: storage.Everything}) + w, err := cacher.Watch(context.TODO(), "/pods/ns", storage.ListOptions{ResourceVersion: "1000", Predicate: storage.Everything}) if err != nil { t.Fatalf("Failed to create watch: %v", err) } @@ -2384,7 +2385,7 @@ func TestCacheIntervalInvalidationStopsWatch(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - w, err := cacher.Watch(ctx, "pods/ns", storage.ListOptions{ + w, err := cacher.Watch(ctx, "/pods/ns", storage.ListOptions{ ResourceVersion: "999", Predicate: storage.Everything, }) @@ -2546,7 +2547,7 @@ func TestWaitUntilWatchCacheFreshAndForceAllEvents(t *testing.T) { } } - w, err := cacher.Watch(context.Background(), "pods/ns", scenario.opts) + w, err := cacher.Watch(context.Background(), "/pods/ns", scenario.opts) require.NoError(t, err, "failed to create watch: %v") defer w.Stop() var expectedErr *apierrors.StatusError @@ -2572,7 +2573,7 @@ func TestWaitUntilWatchCacheFreshAndForceAllEvents(t *testing.T) { t.Errorf("failed adding a pod to the watchCache %v", err) } }(t) - w, err = cacher.Watch(context.Background(), "pods/ns", scenario.opts) + w, err = cacher.Watch(context.Background(), "/pods/ns", scenario.opts) require.NoError(t, err, "failed to create watch: %v") defer w.Stop() verifyEvents(t, w, []watch.Event{ @@ -2679,7 +2680,7 @@ func BenchmarkCacher_GetList(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { result := &example.PodList{} - err = delegator.GetList(context.TODO(), "pods", storage.ListOptions{ + err = delegator.GetList(context.TODO(), "/pods/", storage.ListOptions{ Predicate: pred, Recursive: true, ResourceVersion: "12345", @@ -2716,7 +2717,7 @@ func TestWatchListIsSynchronisedWhenNoEventsFromStoreReceived(t *testing.T) { Predicate: pred, SendInitialEvents: ptr.To(true), } - w, err := cacher.Watch(context.Background(), "pods/ns", opts) + w, err := cacher.Watch(context.Background(), "/pods/ns", opts) require.NoError(t, err, "failed to create watch: %v") defer w.Stop() @@ -3154,6 +3155,7 @@ func TestGetBookmarkAfterResourceVersionLockedFunc(t *testing.T) { } func TestWatchStreamSeparation(t *testing.T) { + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.SizeBasedListCostEstimate, false) server, etcdStorage := newEtcdTestStorage(t, etcd3testing.PathPrefix()) t.Cleanup(func() { server.Terminate(t) @@ -3225,21 +3227,9 @@ func TestWatchStreamSeparation(t *testing.T) { defer cancel() waitForEtcdBookmark := watchAndWaitForBookmark(t, waitContext, cacher.storage) - var out example.Pod - err = cacher.storage.Create(context.Background(), "foo", &example.Pod{}, &out, 0) - if err != nil { - t.Fatal(err) - } - err = cacher.storage.Delete(context.Background(), "foo", &out, nil, storage.ValidateAllObjectFunc, &example.Pod{}, storage.DeleteOptions{}) - if err != nil { - t.Fatal(err) - } - versioner := storage.APIObjectVersioner{} - var lastResourceVersion uint64 - lastResourceVersion, err = versioner.ObjectResourceVersion(&out) - if err != nil { - t.Fatal(err) - } + increaseRV := increaseRVFunc(server.V3Client.Client) + increaseRV(context.Background(), t) + lastResourceVersion := uint64(increaseRV(context.Background(), t)) var contextMetadata metadata.MD if tc.useWatchCacheContextMetadata { diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/delegator.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/delegator.go index 68d269ca35e9c..b08c1fd5a4edd 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/delegator.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/delegator.go @@ -99,8 +99,8 @@ func (c *CacheDelegator) GetCurrentResourceVersion(ctx context.Context) (uint64, return c.storage.GetCurrentResourceVersion(ctx) } -func (c *CacheDelegator) SetKeysFunc(keys storage.KeysFunc) { - c.storage.SetKeysFunc(keys) +func (c *CacheDelegator) EnableResourceSizeEstimation(keys storage.KeysFunc) error { + return c.storage.EnableResourceSizeEstimation(keys) } func (c *CacheDelegator) Delete(ctx context.Context, key string, out runtime.Object, preconditions *storage.Preconditions, validateDeletion storage.ValidateObjectFunc, cachedExistingObject runtime.Object, opts storage.DeleteOptions) error { diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/delegator_test.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/delegator_test.go index 8fd01d6f1deb7..b10aab4ddeaaa 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/delegator_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/delegator_test.go @@ -287,7 +287,7 @@ func TestConsistencyCheckerDigestMatches(t *testing.T) { t.Log("Execute list to ensure cache is up to date") outList := &example.PodList{} - err := store.cacher.GetList(ctx, "/pods", storage.ListOptions{ResourceVersion: resourceVersion, Recursive: true, Predicate: storage.Everything, ResourceVersionMatch: metav1.ResourceVersionMatchNotOlderThan}, outList) + err := store.cacher.GetList(ctx, "/pods/", storage.ListOptions{ResourceVersion: resourceVersion, Recursive: true, Predicate: storage.Everything, ResourceVersionMatch: metav1.ResourceVersionMatchNotOlderThan}, outList) if err != nil { t.Fatal(err) } @@ -295,7 +295,7 @@ func TestConsistencyCheckerDigestMatches(t *testing.T) { t.Errorf("Expect to get %d pods, got %d", storageWatchListPageSize+1, len(outList.Items)) } - checker := newConsistencyChecker("/pods", schema.GroupResource{}, store.cacher.newListFunc, store.cacher, store.storage) + checker := newConsistencyChecker("/pods/", schema.GroupResource{}, store.cacher.newListFunc, store.cacher, store.storage) digest, err := checker.calculateDigests(ctx) if err != nil { t.Fatal(err) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/lister_watcher_test.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/lister_watcher_test.go index 247fd85cc4d3f..cd4c6b8d543f0 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/lister_watcher_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/lister_watcher_test.go @@ -33,7 +33,7 @@ import ( ) func TestCacherListerWatcher(t *testing.T) { - prefix := "pods" + prefix := "/pods/" fn := func() runtime.Object { return &example.PodList{} } server, store := newEtcdTestStorage(t, prefix) defer server.Terminate(t) @@ -67,7 +67,7 @@ func TestCacherListerWatcher(t *testing.T) { } func TestCacherListerWatcherPagination(t *testing.T) { - prefix := "pods" + prefix := "/pods/" fn := func() runtime.Object { return &example.PodList{} } server, store := newEtcdTestStorage(t, prefix) defer server.Terminate(t) @@ -130,7 +130,7 @@ func TestCacherListerWatcherPagination(t *testing.T) { func TestCacherListerWatcherListWatch(t *testing.T) { featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.WatchList, true) - prefix := "pods" + prefix := "/pods/" fn := func() runtime.Object { return &example.PodList{} } server, store := newEtcdTestStorage(t, prefix) defer server.Terminate(t) @@ -181,7 +181,7 @@ func TestCacherListerWatcherListWatch(t *testing.T) { func TestCacherListerWatcherWhenListWatchDisabled(t *testing.T) { featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.WatchList, false) - prefix := "pods" + prefix := "/pods/" fn := func() runtime.Object { return &example.PodList{} } server, store := newEtcdTestStorage(t, prefix) defer server.Terminate(t) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go index 520bdcdfd3d2d..1c090269c55af 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go @@ -71,7 +71,7 @@ func makeTestPodDetails(name string, resourceVersion uint64, nodeName string, la func makeTestStoreElement(pod *v1.Pod) *storeElement { return &storeElement{ - Key: "prefix/ns/" + pod.Name, + Key: "/prefix/ns/" + pod.Name, Object: pod, Labels: labels.Set(pod.Labels), Fields: fields.Set{"spec.nodeName": pod.Spec.NodeName}, @@ -116,7 +116,7 @@ func (w *testWatchCache) getCacheIntervalForEvents(resourceVersion uint64, opts // newTestWatchCache just adds a fake clock. func newTestWatchCache(capacity int, eventFreshDuration time.Duration, indexers *cache.Indexers) *testWatchCache { keyFunc := func(obj runtime.Object) (string, error) { - return storage.NamespaceKeyFunc("prefix", obj) + return storage.NamespaceKeyFunc("/prefix/", obj) } getAttrsFunc := func(obj runtime.Object) (labels.Set, fields.Set, error) { pod, ok := obj.(*v1.Pod) @@ -244,9 +244,9 @@ func TestWatchCacheBasic(t *testing.T) { store.Add(makeTestPod("pod3", 6)) { expected := map[string]storeElement{ - "prefix/ns/pod1": *makeTestStoreElement(makeTestPod("pod1", 4)), - "prefix/ns/pod2": *makeTestStoreElement(makeTestPod("pod2", 5)), - "prefix/ns/pod3": *makeTestStoreElement(makeTestPod("pod3", 6)), + "/prefix/ns/pod1": *makeTestStoreElement(makeTestPod("pod1", 4)), + "/prefix/ns/pod2": *makeTestStoreElement(makeTestPod("pod2", 5)), + "/prefix/ns/pod3": *makeTestStoreElement(makeTestPod("pod3", 6)), } items := make(map[string]storeElement) for _, item := range store.List() { @@ -265,8 +265,8 @@ func TestWatchCacheBasic(t *testing.T) { }, "8") { expected := map[string]storeElement{ - "prefix/ns/pod4": *makeTestStoreElement(makeTestPod("pod4", 7)), - "prefix/ns/pod5": *makeTestStoreElement(makeTestPod("pod5", 8)), + "/prefix/ns/pod4": *makeTestStoreElement(makeTestPod("pod4", 7)), + "/prefix/ns/pod5": *makeTestStoreElement(makeTestPod("pod5", 8)), } items := make(map[string]storeElement) for _, item := range store.List() { @@ -470,7 +470,7 @@ func TestWaitUntilFreshAndGetList(t *testing.T) { }() // list by empty MatchValues. - resp, indexUsed, err := store.WaitUntilFreshAndGetList(ctx, "prefix/", storage.ListOptions{ResourceVersion: "5", Recursive: true, Predicate: storage.Everything}) + resp, indexUsed, err := store.WaitUntilFreshAndGetList(ctx, "/prefix/", storage.ListOptions{ResourceVersion: "5", Recursive: true, Predicate: storage.Everything}) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -485,7 +485,7 @@ func TestWaitUntilFreshAndGetList(t *testing.T) { } // list by label index. - resp, indexUsed, err = store.WaitUntilFreshAndGetList(ctx, "prefix/", storage.ListOptions{ResourceVersion: "5", Recursive: true, Predicate: storage.SelectionPredicate{ + resp, indexUsed, err = store.WaitUntilFreshAndGetList(ctx, "/prefix/", storage.ListOptions{ResourceVersion: "5", Recursive: true, Predicate: storage.SelectionPredicate{ Label: labels.SelectorFromSet(map[string]string{ "label": "value1", }), @@ -508,7 +508,7 @@ func TestWaitUntilFreshAndGetList(t *testing.T) { } // list with spec.nodeName index. - resp, indexUsed, err = store.WaitUntilFreshAndGetList(ctx, "prefix/", storage.ListOptions{ResourceVersion: "5", Recursive: true, Predicate: storage.SelectionPredicate{ + resp, indexUsed, err = store.WaitUntilFreshAndGetList(ctx, "/prefix/", storage.ListOptions{ResourceVersion: "5", Recursive: true, Predicate: storage.SelectionPredicate{ Label: labels.SelectorFromSet(map[string]string{ "not-exist-label": "whatever", }), @@ -531,7 +531,7 @@ func TestWaitUntilFreshAndGetList(t *testing.T) { } // list with index not exists. - resp, indexUsed, err = store.WaitUntilFreshAndGetList(ctx, "prefix/", storage.ListOptions{ResourceVersion: "5", Recursive: true, Predicate: storage.SelectionPredicate{ + resp, indexUsed, err = store.WaitUntilFreshAndGetList(ctx, "/prefix/", storage.ListOptions{ResourceVersion: "5", Recursive: true, Predicate: storage.SelectionPredicate{ Label: labels.SelectorFromSet(map[string]string{ "not-exist-label": "whatever", }), @@ -565,7 +565,7 @@ func TestWaitUntilFreshAndListFromCache(t *testing.T) { }() // list from future revision. Requires watch cache to request bookmark to get it. - resp, indexUsed, err := store.WaitUntilFreshAndGetList(ctx, "prefix/", storage.ListOptions{ResourceVersion: "3", Recursive: true, Predicate: storage.Everything}) + resp, indexUsed, err := store.WaitUntilFreshAndGetList(ctx, "/prefix/", storage.ListOptions{ResourceVersion: "3", Recursive: true, Predicate: storage.Everything}) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -591,7 +591,7 @@ func TestWaitUntilFreshAndGet(t *testing.T) { store.Add(makeTestPod("bar", 5)) }() - obj, exists, resourceVersion, err := store.WaitUntilFreshAndGet(ctx, 5, "prefix/ns/bar") + obj, exists, resourceVersion, err := store.WaitUntilFreshAndGet(ctx, 5, "/prefix/ns/bar") if err != nil { t.Fatalf("unexpected error: %v", err) } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/linearized_read_test.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/linearized_read_test.go index 7331c8245ad68..879647977ff98 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/linearized_read_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/linearized_read_test.go @@ -37,7 +37,7 @@ func TestLinearizedReadRevisionInvariant(t *testing.T) { // [1] https://etcd.io/docs/v3.5/learning/api_guarantees/#isolation-level-and-consistency-of-replicas ctx, store, etcdClient := testSetup(t) - dir := "/testing" + dir := "/pods/" key := dir + "/testkey" out := &example.Pod{} obj := &example.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", SelfLink: "testlink"}} diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/OWNERS b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/OWNERS index 433e84aa3e43e..3578939e02960 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/OWNERS +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/OWNERS @@ -1,4 +1,9 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - logicalhan + - sig-instrumentation-approvers +reviewers: + - sig-instrumentation-reviewers +labels: + - sig/etcd + - sig/instrumentation diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics.go index 21eb18285679b..78f08fb6155d0 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics.go @@ -72,9 +72,10 @@ var ( ) objectCounts = compbasemetrics.NewGaugeVec( &compbasemetrics.GaugeOpts{ - Name: "apiserver_storage_objects", - Help: "[DEPRECATED, consider using apiserver_resource_objects instead] Number of stored objects at the time of last check split by kind. In case of a fetching error, the value will be -1.", - StabilityLevel: compbasemetrics.STABLE, + Name: "apiserver_storage_objects", + Help: "[DEPRECATED, consider using apiserver_resource_objects instead] Number of stored objects at the time of last check split by kind. In case of a fetching error, the value will be -1.", + StabilityLevel: compbasemetrics.STABLE, + DeprecatedVersion: "1.34.0", }, []string{"resource"}, ) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics_test.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics_test.go index 200739b1bd779..3c8a33d49c58a 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics_test.go @@ -316,6 +316,7 @@ apiserver_resource_size_estimate_bytes{group="foo",resource="bar"} -1 func TestDeleteStoreStats(t *testing.T) { registry := metrics.NewKubeRegistry() registry.MustRegister(objectCounts) + registry.MustRegister(newObjectCounts) registry.MustRegister(resourceSizeEstimate) UpdateStoreStats(schema.GroupResource{Group: "foo1", Resource: "bar1"}, storage.Stats{ObjectCount: 10}, nil) @@ -325,12 +326,16 @@ func TestDeleteStoreStats(t *testing.T) { # TYPE apiserver_resource_size_estimate_bytes gauge apiserver_resource_size_estimate_bytes{group="foo1",resource="bar1"} -1 apiserver_resource_size_estimate_bytes{group="foo2",resource="bar2"} 200 +# HELP apiserver_resource_objects [ALPHA] Number of stored objects at the time of last check split by kind. In case of a fetching error, the value will be -1. +# TYPE apiserver_resource_objects gauge +apiserver_resource_objects{group="foo1",resource="bar1"} 10 +apiserver_resource_objects{group="foo2",resource="bar2"} 20 # HELP apiserver_storage_objects [STABLE] [DEPRECATED, consider using apiserver_resource_objects instead] Number of stored objects at the time of last check split by kind. In case of a fetching error, the value will be -1. # TYPE apiserver_storage_objects gauge apiserver_storage_objects{resource="bar1.foo1"} 10 apiserver_storage_objects{resource="bar2.foo2"} 20 ` - if err := testutil.GatherAndCompare(registry, strings.NewReader(expectedMetrics), "apiserver_storage_objects", "apiserver_resource_size_estimate_bytes"); err != nil { + if err := testutil.GatherAndCompare(registry, strings.NewReader(expectedMetrics), "apiserver_storage_objects", "apiserver_resource_objects", "apiserver_resource_size_estimate_bytes"); err != nil { t.Fatal(err) } @@ -339,19 +344,24 @@ apiserver_storage_objects{resource="bar2.foo2"} 20 expectedMetrics = `# HELP apiserver_resource_size_estimate_bytes [ALPHA] Estimated size of stored objects in database. Estimate is based on sum of last observed sizes of serialized objects. In case of a fetching error, the value will be -1. # TYPE apiserver_resource_size_estimate_bytes gauge apiserver_resource_size_estimate_bytes{group="foo2",resource="bar2"} 200 +# HELP apiserver_resource_objects [ALPHA] Number of stored objects at the time of last check split by kind. In case of a fetching error, the value will be -1. +# TYPE apiserver_resource_objects gauge +apiserver_resource_objects{group="foo2",resource="bar2"} 20 # HELP apiserver_storage_objects [STABLE] [DEPRECATED, consider using apiserver_resource_objects instead] Number of stored objects at the time of last check split by kind. In case of a fetching error, the value will be -1. # TYPE apiserver_storage_objects gauge apiserver_storage_objects{resource="bar2.foo2"} 20 ` - if err := testutil.GatherAndCompare(registry, strings.NewReader(expectedMetrics), "apiserver_storage_objects", "apiserver_resource_size_estimate_bytes"); err != nil { + if err := testutil.GatherAndCompare(registry, strings.NewReader(expectedMetrics), "apiserver_storage_objects", "apiserver_resource_objects", "apiserver_resource_size_estimate_bytes"); err != nil { t.Fatal(err) } DeleteStoreStats(schema.GroupResource{Group: "foo2", Resource: "bar2"}) expectedMetrics = `# HELP apiserver_storage_objects [STABLE] [DEPRECATED, consider using apiserver_resource_objects instead] Number of stored objects at the time of last check split by kind. In case of a fetching error, the value will be -1. # TYPE apiserver_storage_objects gauge +# HELP apiserver_resource_size_estimate_bytes [ALPHA] Estimated size of stored objects in database. Estimate is based on sum of last observed sizes of serialized objects. In case of a fetching error, the value will be -1. +# TYPE apiserver_resource_size_estimate_bytes gauge ` - if err := testutil.GatherAndCompare(registry, strings.NewReader(expectedMetrics), "apiserver_storage_objects", "apiserver_resource_size_estimate_bytes"); err != nil { + if err := testutil.GatherAndCompare(registry, strings.NewReader(expectedMetrics), "apiserver_storage_objects", "apiserver_resource_objects", "apiserver_resource_size_estimate_bytes"); err != nil { t.Fatal(err) } } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/stats.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/stats.go index 227c46e10ff3d..dcddab373b736 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/stats.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/stats.go @@ -33,11 +33,11 @@ import ( const sizerRefreshInterval = time.Minute -func newStatsCache(prefix string, getKeys storage.KeysFunc) *statsCache { +func newResourceSizeEstimator(prefix string, getKeys storage.KeysFunc) *resourceSizeEstimator { if prefix[len(prefix)-1] != '/' { prefix += "/" } - sc := &statsCache{ + sc := &resourceSizeEstimator{ prefix: prefix, getKeys: getKeys, stop: make(chan struct{}), @@ -51,23 +51,21 @@ func newStatsCache(prefix string, getKeys storage.KeysFunc) *statsCache { return sc } -// statsCache efficiently estimates the average object size +// resourceSizeEstimator efficiently estimates the average object size // based on the last observed state of individual keys. -// By plugging statsCache into GetList and Watch functions, +// By plugging resourceSizeEstimator into GetList and Watch functions, // a fairly accurate estimate of object sizes can be maintained // without additional requests to the underlying storage. // To handle potential out-of-order or incomplete data, // it uses a per-key revision to identify the newer state. // This approach may leak keys if delete events are not observed, // thus we run a background goroutine to periodically cleanup keys if needed. -type statsCache struct { +type resourceSizeEstimator struct { prefix string stop chan struct{} wg sync.WaitGroup lastKeyCleanup atomic.Pointer[time.Time] - - getKeysLock sync.Mutex - getKeys storage.KeysFunc + getKeys storage.KeysFunc keysLock sync.Mutex keys map[string]sizeRevision @@ -78,8 +76,8 @@ type sizeRevision struct { revision int64 } -func (sc *statsCache) Stats(ctx context.Context) (storage.Stats, error) { - keys, err := sc.GetKeys(ctx) +func (sc *resourceSizeEstimator) Stats(ctx context.Context) (storage.Stats, error) { + keys, err := sc.getKeys(ctx) if err != nil { return storage.Stats{}, err } @@ -95,27 +93,12 @@ func (sc *statsCache) Stats(ctx context.Context) (storage.Stats, error) { return stats, nil } -func (sc *statsCache) GetKeys(ctx context.Context) ([]string, error) { - sc.getKeysLock.Lock() - getKeys := sc.getKeys - sc.getKeysLock.Unlock() - - // Don't execute getKeys under lock. - return getKeys(ctx) -} - -func (sc *statsCache) SetKeysFunc(keys storage.KeysFunc) { - sc.getKeysLock.Lock() - defer sc.getKeysLock.Unlock() - sc.getKeys = keys -} - -func (sc *statsCache) Close() { +func (sc *resourceSizeEstimator) Close() { close(sc.stop) sc.wg.Wait() } -func (sc *statsCache) run() { +func (sc *resourceSizeEstimator) run() { jitter := 0.5 // Period between [interval, interval * (1.0 + jitter)] sliding := true // wait.JitterUntilWithContext starts work immediately, so wait first. @@ -126,21 +109,22 @@ func (sc *statsCache) run() { wait.JitterUntilWithContext(wait.ContextForChannel(sc.stop), sc.cleanKeysIfNeeded, sizerRefreshInterval, jitter, sliding) } -func (sc *statsCache) cleanKeysIfNeeded(ctx context.Context) { +func (sc *resourceSizeEstimator) cleanKeysIfNeeded(ctx context.Context) { lastKeyCleanup := sc.lastKeyCleanup.Load() if lastKeyCleanup != nil && time.Since(*lastKeyCleanup) < sizerRefreshInterval { return } - keys, err := sc.GetKeys(ctx) + keys, err := sc.getKeys(ctx) if err != nil { klog.InfoS("Error getting keys", "err", err) + return } sc.keysLock.Lock() defer sc.keysLock.Unlock() sc.cleanKeys(keys) } -func (sc *statsCache) cleanKeys(keepKeys []string) { +func (sc *resourceSizeEstimator) cleanKeys(keepKeys []string) { newKeys := make(map[string]sizeRevision, len(keepKeys)) for _, key := range keepKeys { // Handle cacher keys not having prefix. @@ -162,14 +146,14 @@ func (sc *statsCache) cleanKeys(keepKeys []string) { sc.lastKeyCleanup.Store(&now) } -func (sc *statsCache) keySizes() (totalSize int64) { +func (sc *resourceSizeEstimator) keySizes() (totalSize int64) { for _, sizeRevision := range sc.keys { totalSize += sizeRevision.sizeBytes } return totalSize } -func (sc *statsCache) Update(kvs []*mvccpb.KeyValue) { +func (sc *resourceSizeEstimator) Update(kvs []*mvccpb.KeyValue) { sc.keysLock.Lock() defer sc.keysLock.Unlock() for _, kv := range kvs { @@ -177,14 +161,14 @@ func (sc *statsCache) Update(kvs []*mvccpb.KeyValue) { } } -func (sc *statsCache) UpdateKey(kv *mvccpb.KeyValue) { +func (sc *resourceSizeEstimator) UpdateKey(kv *mvccpb.KeyValue) { sc.keysLock.Lock() defer sc.keysLock.Unlock() sc.updateKey(kv) } -func (sc *statsCache) updateKey(kv *mvccpb.KeyValue) { +func (sc *resourceSizeEstimator) updateKey(kv *mvccpb.KeyValue) { key := string(kv.Key) keySizeRevision := sc.keys[key] if keySizeRevision.revision >= kv.ModRevision { @@ -197,7 +181,7 @@ func (sc *statsCache) updateKey(kv *mvccpb.KeyValue) { } } -func (sc *statsCache) DeleteKey(kv *mvccpb.KeyValue) { +func (sc *resourceSizeEstimator) DeleteKey(kv *mvccpb.KeyValue) { sc.keysLock.Lock() defer sc.keysLock.Unlock() diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/stats_test.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/stats_test.go index e67436f83262c..dabd141fa041b 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/stats_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/stats_test.go @@ -27,7 +27,7 @@ import ( func TestStatsCache(t *testing.T) { ctx := t.Context() - store := newStatsCache("/prefix", func(ctx context.Context) ([]string, error) { return []string{}, nil }) + store := newResourceSizeEstimator("/prefix", func(ctx context.Context) ([]string, error) { return []string{}, nil }) defer store.Close() stats, err := store.Stats(ctx) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go index 6fb9fe9aa5f90..798567d1cd16c 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go @@ -25,6 +25,7 @@ import ( "reflect" "strconv" "strings" + "sync" "time" "go.etcd.io/etcd/api/v3/mvccpb" @@ -90,8 +91,10 @@ type store struct { resourcePrefix string newListFunc func() runtime.Object - stats *statsCache compactor Compactor + + collectorMux sync.RWMutex + resourceSizeEstimator *resourceSizeEstimator } var _ storage.Interface = (*store)(nil) @@ -142,7 +145,7 @@ func (a *abortOnFirstError) Aggregate(key string, err error) bool { func (a *abortOnFirstError) Err() error { return a.err } // New returns an etcd3 implementation of storage.Interface. -func New(c *kubernetes.Client, compactor Compactor, codec runtime.Codec, newFunc, newListFunc func() runtime.Object, prefix, resourcePrefix string, groupResource schema.GroupResource, transformer value.Transformer, leaseManagerConfig LeaseManagerConfig, decoder Decoder, versioner storage.Versioner) *store { +func New(c *kubernetes.Client, compactor Compactor, codec runtime.Codec, newFunc, newListFunc func() runtime.Object, prefix, resourcePrefix string, groupResource schema.GroupResource, transformer value.Transformer, leaseManagerConfig LeaseManagerConfig, decoder Decoder, versioner storage.Versioner) (*store, error) { // for compatibility with etcd2 impl. // no-op for default prefix of '/registry'. // keeps compatibility with etcd2 impl for custom prefixes that don't start with '/' @@ -151,6 +154,15 @@ func New(c *kubernetes.Client, compactor Compactor, codec runtime.Codec, newFunc // Ensure the pathPrefix ends in "/" here to simplify key concatenation later. pathPrefix += "/" } + if resourcePrefix == "" { + return nil, fmt.Errorf("resourcePrefix cannot be empty") + } + if resourcePrefix == "/" { + return nil, fmt.Errorf("resourcePrefix cannot be /") + } + if !strings.HasPrefix(resourcePrefix, "/") { + return nil, fmt.Errorf("resourcePrefix needs to start from /") + } listErrAggrFactory := defaultListErrorAggregatorFactory if utilfeature.DefaultFeatureGate.Enabled(features.AllowUnsafeMalformedObjectDeletion) { @@ -186,19 +198,15 @@ func New(c *kubernetes.Client, compactor Compactor, codec runtime.Codec, newFunc newListFunc: newListFunc, compactor: compactor, } - if utilfeature.DefaultFeatureGate.Enabled(features.SizeBasedListCostEstimate) { - stats := newStatsCache(pathPrefix, s.getKeys) - s.stats = stats - w.stats = stats - } + w.getResourceSizeEstimator = s.getResourceSizeEstimator w.getCurrentStorageRV = func(ctx context.Context) (uint64, error) { return s.GetCurrentResourceVersion(ctx) } if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) || utilfeature.DefaultFeatureGate.Enabled(features.WatchList) { etcdfeature.DefaultFeatureSupportChecker.CheckClient(c.Ctx(), c, storage.RequestWatchProgress) } - return s + return s, nil } func (s *store) CompactRevision() int64 { @@ -214,14 +222,21 @@ func (s *store) Versioner() storage.Versioner { } func (s *store) Close() { - if s.stats != nil { - s.stats.Close() + stats := s.getResourceSizeEstimator() + if stats != nil { + stats.Close() } } +func (s *store) getResourceSizeEstimator() *resourceSizeEstimator { + s.collectorMux.RLock() + defer s.collectorMux.RUnlock() + return s.resourceSizeEstimator +} + // Get implements storage.Interface.Get. func (s *store) Get(ctx context.Context, key string, opts storage.GetOptions, out runtime.Object) error { - preparedKey, err := s.prepareKey(key) + preparedKey, err := s.prepareKey(key, false) if err != nil { return err } @@ -257,7 +272,7 @@ func (s *store) Get(ctx context.Context, key string, opts storage.GetOptions, ou // Create implements storage.Interface.Create. func (s *store) Create(ctx context.Context, key string, obj, out runtime.Object, ttl uint64) error { - preparedKey, err := s.prepareKey(key) + preparedKey, err := s.prepareKey(key, false) if err != nil { return err } @@ -327,7 +342,7 @@ func (s *store) Create(ctx context.Context, key string, obj, out runtime.Object, func (s *store) Delete( ctx context.Context, key string, out runtime.Object, preconditions *storage.Preconditions, validateDeletion storage.ValidateObjectFunc, cachedExistingObject runtime.Object, opts storage.DeleteOptions) error { - preparedKey, err := s.prepareKey(key) + preparedKey, err := s.prepareKey(key, false) if err != nil { return err } @@ -448,7 +463,7 @@ func (s *store) conditionalDelete( func (s *store) GuaranteedUpdate( ctx context.Context, key string, destination runtime.Object, ignoreNotFound bool, preconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, cachedExistingObject runtime.Object) error { - preparedKey, err := s.prepareKey(key) + preparedKey, err := s.prepareKey(key, false) if err != nil { return err } @@ -629,18 +644,17 @@ func getNewItemFunc(listObj runtime.Object, v reflect.Value) func() runtime.Obje } } -func (s *store) Stats(ctx context.Context) (stats storage.Stats, err error) { - if s.stats != nil { - return s.stats.Stats(ctx) +func (s *store) Stats(ctx context.Context) (storage.Stats, error) { + if collector := s.getResourceSizeEstimator(); collector != nil { + return collector.Stats(ctx) } + // returning stats without resource size + startTime := time.Now() - prefix, err := s.prepareKey(s.resourcePrefix) + prefix, err := s.prepareKey(s.resourcePrefix, true) if err != nil { return storage.Stats{}, err } - if !strings.HasSuffix(prefix, "/") { - prefix += "/" - } count, err := s.client.Kubernetes.Count(ctx, prefix, kubernetes.CountOptions{}) metrics.RecordEtcdRequest("listWithCount", s.groupResource, err, startTime) if err != nil { @@ -651,21 +665,25 @@ func (s *store) Stats(ctx context.Context) (stats storage.Stats, err error) { }, nil } -func (s *store) SetKeysFunc(keys storage.KeysFunc) { - if s.stats != nil { - s.stats.SetKeysFunc(keys) +func (s *store) EnableResourceSizeEstimation(getKeys storage.KeysFunc) error { + if getKeys == nil { + return errors.New("KeysFunc cannot be nil") + } + s.collectorMux.Lock() + defer s.collectorMux.Unlock() + if s.resourceSizeEstimator != nil { + return errors.New("resourceSizeEstimator already enabled") } + s.resourceSizeEstimator = newResourceSizeEstimator(s.pathPrefix, getKeys) + return nil } func (s *store) getKeys(ctx context.Context) ([]string, error) { startTime := time.Now() - prefix, err := s.prepareKey(s.resourcePrefix) + prefix, err := s.prepareKey(s.resourcePrefix, true) if err != nil { return nil, err } - if !strings.HasSuffix(prefix, "/") { - prefix += "/" - } resp, err := s.client.KV.Get(ctx, prefix, clientv3.WithPrefix(), clientv3.WithKeysOnly()) metrics.RecordEtcdRequest("listOnlyKeys", s.groupResource, err, startTime) if err != nil { @@ -716,7 +734,7 @@ func (s *store) GetCurrentResourceVersion(ctx context.Context) (uint64, error) { // GetList implements storage.Interface. func (s *store) GetList(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { - keyPrefix, err := s.prepareKey(key) + keyPrefix, err := s.prepareKey(key, opts.Recursive) if err != nil { return err } @@ -737,14 +755,6 @@ func (s *store) GetList(ctx context.Context, key string, opts storage.ListOption return fmt.Errorf("need ptr to slice: %v", err) } - // For recursive lists, we need to make sure the key ended with "/" so that we only - // get children "directories". e.g. if we have key "/a", "/a/b", "/ab", getting keys - // with prefix "/a" will return all three, while with prefix "/a/" will return only - // "/a/b" which is the correct answer. - if opts.Recursive && !strings.HasSuffix(keyPrefix, "/") { - keyPrefix += "/" - } - // set the appropriate clientv3 options to filter the returned data set limit := opts.Predicate.Limit paging := opts.Predicate.Limit > 0 @@ -768,20 +778,13 @@ func (s *store) GetList(ctx context.Context, key string, opts storage.ListOption metrics.RecordStorageListMetrics(s.groupResource, numFetched, numEvald, numReturn) }() - metricsOp := "get" - if opts.Recursive { - metricsOp = "list" - } - aggregator := s.listErrAggrFactory() for { - startTime := time.Now() getResp, err = s.getList(ctx, keyPrefix, opts.Recursive, kubernetes.ListOptions{ Revision: withRev, Limit: limit, Continue: continueKey, }) - metrics.RecordEtcdRequest(metricsOp, s.groupResource, err, startTime) if err != nil { if errors.Is(err, etcdrpc.ErrFutureRev) { currentRV, getRVErr := s.GetCurrentResourceVersion(ctx) @@ -814,9 +817,6 @@ func (s *store) GetList(ctx context.Context, key string, opts storage.ListOption } else { growSlice(v, 2048, len(getResp.Kvs)) } - if s.stats != nil { - s.stats.Update(getResp.Kvs) - } // take items from the response until the bucket is full, filtering as we go for i, kv := range getResp.Kvs { @@ -898,22 +898,31 @@ func (s *store) GetList(ctx context.Context, key string, opts storage.ListOption return s.versioner.UpdateList(listObj, uint64(withRev), continueValue, remainingItemCount) } -func (s *store) getList(ctx context.Context, keyPrefix string, recursive bool, options kubernetes.ListOptions) (kubernetes.ListResponse, error) { +func (s *store) getList(ctx context.Context, keyPrefix string, recursive bool, options kubernetes.ListOptions) (resp kubernetes.ListResponse, err error) { + startTime := time.Now() if recursive { - return s.client.Kubernetes.List(ctx, keyPrefix, options) - } - getResp, err := s.client.Kubernetes.Get(ctx, keyPrefix, kubernetes.GetOptions{ - Revision: options.Revision, - }) - var resp kubernetes.ListResponse - if getResp.KV != nil { - resp.Kvs = []*mvccpb.KeyValue{getResp.KV} - resp.Count = 1 - resp.Revision = getResp.Revision + resp, err = s.client.Kubernetes.List(ctx, keyPrefix, options) + metrics.RecordEtcdRequest("list", s.groupResource, err, startTime) } else { - resp.Kvs = []*mvccpb.KeyValue{} - resp.Count = 0 - resp.Revision = getResp.Revision + var getResp kubernetes.GetResponse + getResp, err = s.client.Kubernetes.Get(ctx, keyPrefix, kubernetes.GetOptions{ + Revision: options.Revision, + }) + metrics.RecordEtcdRequest("get", s.groupResource, err, startTime) + if getResp.KV != nil { + resp.Kvs = []*mvccpb.KeyValue{getResp.KV} + resp.Count = 1 + resp.Revision = getResp.Revision + } else { + resp.Kvs = []*mvccpb.KeyValue{} + resp.Count = 0 + resp.Revision = getResp.Revision + } + } + + stats := s.getResourceSizeEstimator() + if len(resp.Kvs) > 0 && stats != nil { + stats.Update(resp.Kvs) } return resp, err } @@ -951,7 +960,7 @@ func growSlice(v reflect.Value, maxCapacity int, sizes ...int) { // Watch implements storage.Interface.Watch. func (s *store) Watch(ctx context.Context, key string, opts storage.ListOptions) (watch.Interface, error) { - preparedKey, err := s.prepareKey(key) + preparedKey, err := s.prepareKey(key, opts.Recursive) if err != nil { return nil, err } @@ -1098,21 +1107,10 @@ func (s *store) validateMinimumResourceVersion(minimumResourceVersion string, ac return nil } -func (s *store) prepareKey(key string) (string, error) { - if key == ".." || - strings.HasPrefix(key, "../") || - strings.HasSuffix(key, "/..") || - strings.Contains(key, "/../") { - return "", fmt.Errorf("invalid key: %q", key) - } - if key == "." || - strings.HasPrefix(key, "./") || - strings.HasSuffix(key, "/.") || - strings.Contains(key, "/./") { - return "", fmt.Errorf("invalid key: %q", key) - } - if key == "" || key == "/" { - return "", fmt.Errorf("empty key: %q", key) +func (s *store) prepareKey(key string, recursive bool) (string, error) { + key, err := storage.PrepareKey(s.resourcePrefix, key, recursive) + if err != nil { + return "", err } // We ensured that pathPrefix ends in '/' in construction, so skip any leading '/' in the key now. startIndex := 0 diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go index 5ae973fcb227d..04e9f64df4b8e 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go @@ -177,7 +177,7 @@ func TestListPaging(t *testing.T) { func TestGetListNonRecursive(t *testing.T) { ctx, store, client := testSetup(t) - storagetesting.RunTestGetListNonRecursive(ctx, t, increaseRV(client.Client), store) + storagetesting.RunTestGetListNonRecursive(ctx, t, increaseRVFunc(client.Client), store) } func TestGetListRecursivePrefix(t *testing.T) { @@ -185,6 +185,11 @@ func TestGetListRecursivePrefix(t *testing.T) { storagetesting.RunTestGetListRecursivePrefix(ctx, t, store) } +func TestKeySchema(t *testing.T) { + ctx, store, _ := testSetup(t) + storagetesting.RunTestKeySchema(ctx, t, store) +} + type storeWithPrefixTransformer struct { *store } @@ -259,14 +264,14 @@ func TestList(t *testing.T) { func TestConsistentList(t *testing.T) { ctx, store, client := testSetup(t) - storagetesting.RunTestConsistentList(ctx, t, store, increaseRV(client.Client), false, true, false) + storagetesting.RunTestConsistentList(ctx, t, store, increaseRVFunc(client.Client), false, true, false) } func TestCompactRevision(t *testing.T) { // Test requires store to observe extenal changes to compaction revision, requiring dedicated watch on compact key which is enabled by ListFromCacheSnapshot. featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.ListFromCacheSnapshot, true) ctx, store, client := testSetup(t) - storagetesting.RunTestCompactRevision(ctx, t, store, increaseRV(client.Client), compactStorage(store, client.Client)) + storagetesting.RunTestCompactRevision(ctx, t, store, increaseRVFunc(client.Client), compactStorage(store, client.Client)) } func checkStorageCallsInvariants(transformer *storagetesting.PrefixTransformer, recorder *storagetesting.KVRecorder) storagetesting.CallsValidation { @@ -360,11 +365,13 @@ func compactStorage(s *store, client *clientv3.Client) storagetesting.Compaction } } -func increaseRV(client *clientv3.Client) storagetesting.IncreaseRVFunc { - return func(ctx context.Context, t *testing.T) { - if _, err := client.KV.Put(ctx, "increaseRV", "ok"); err != nil { +func increaseRVFunc(client *clientv3.Client) storagetesting.IncreaseRVFunc { + return func(ctx context.Context, t *testing.T) int64 { + resp, err := client.KV.Put(ctx, "increaseRV", "ok") + if err != nil { t.Fatalf("Could not update increaseRV: %v", err) } + return resp.Header.Revision } } @@ -381,9 +388,13 @@ func TestListResourceVersionMatch(t *testing.T) { func TestStats(t *testing.T) { for _, sizeBasedListCostEstimate := range []bool{true, false} { t.Run(fmt.Sprintf("SizeBasedListCostEstimate=%v", sizeBasedListCostEstimate), func(t *testing.T) { - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.SizeBasedListCostEstimate, sizeBasedListCostEstimate) - // Match transformer with cacher tests. ctx, store, _ := testSetup(t) + if sizeBasedListCostEstimate { + err := store.EnableResourceSizeEstimation(store.getKeys) + if err != nil { + t.Fatal(err) + } + } storagetesting.RunTestStats(ctx, t, store, store.codec, store.transformer, sizeBasedListCostEstimate) }) } @@ -518,15 +529,15 @@ func TestLeaseMaxObjectCount(t *testing.T) { expectAttachedCount int64 }{ { - key: "testkey1", + key: "/pods/testkey1", expectAttachedCount: 1, }, { - key: "testkey2", + key: "/pods/testkey2", expectAttachedCount: 2, }, { - key: "testkey3", + key: "/pods/testkey3", // We assume each time has 1 object attached to the lease // so after granting a new lease, the recorded count is set to 1 expectAttachedCount: 1, @@ -609,7 +620,7 @@ func withDefaults(options *setupOptions) { options.newFunc = newPod options.newListFunc = newPodList options.prefix = "" - options.resourcePrefix = "/pods" + options.resourcePrefix = "/pods/" options.groupResource = schema.GroupResource{Resource: "pods"} options.transformer = newTestTransformer() options.leaseConfig = newTestLeaseManagerConfig() @@ -627,7 +638,7 @@ func testSetup(t testing.TB, opts ...setupOption) (context.Context, *store, *kub versioner := storage.APIObjectVersioner{} compactor := NewCompactor(client.Client, 0, clock.RealClock{}, nil) t.Cleanup(compactor.Stop) - store := New( + store, err := New( client, compactor, setupOpts.codec, @@ -641,23 +652,40 @@ func testSetup(t testing.TB, opts ...setupOption) (context.Context, *store, *kub NewDefaultDecoder(setupOpts.codec, versioner), versioner, ) + if err != nil { + t.Fatal(err) + } t.Cleanup(store.Close) ctx := context.Background() return ctx, store, client } -func TestValidateKey(t *testing.T) { +func TestPrepareKey(t *testing.T) { validKeys := []string{ - "/foo/bar/baz/a.b.c/", - "/foo", - "foo/bar/baz", - "/foo/bar..baz/", - "/foo/bar..", - "foo", - "foo/bar", - "/foo/bar/", + "/pods/foo/bar/baz/a.b.c/", + "/pods/foo", + "/pods/foo/bar/baz", + "/pods/foo/bar..baz/", + "/pods/foo/bar..", + "/pods/foo", + "/pods/foo/bar", + "/pods/foo/bar/", + "/pods/", } invalidKeys := []string{ + "/pods", + "/pods/foo/bar/../a.b.c/", + "/pods/..", + "/pods/../", + "/pods/foo/bar/..", + "/pods/../foo/bar", + "/pods/../foo", + "/pods/foo/bar/../", + "/pods/.", + "/pods/./", + "/pods/foo/.", + "/pods/./bar", + "/pods/foo/./bar/", "/foo/bar/../a.b.c/", "..", "/..", @@ -680,21 +708,46 @@ func TestValidateKey(t *testing.T) { ) _, store, _ := testSetup(t, withPrefix(pathPrefix)) - for _, key := range validKeys { - k, err := store.prepareKey(key) - if err != nil { - t.Errorf("key %q should be valid; unexpected error: %v", key, err) - } else if !strings.HasPrefix(k, expectPrefix) { - t.Errorf("key %q should have prefix %q", k, expectPrefix) + t.Run("Non-recursive", func(t *testing.T) { + for _, key := range validKeys { + preparedKey, err := store.prepareKey(key, false) + if err != nil { + t.Errorf("preparing key %q should be valid; unexpected error: %v", key, err) + continue + } + if !strings.HasPrefix(preparedKey, expectPrefix) { + t.Errorf("prepared key %q should have prefix %q", preparedKey, expectPrefix) + } + if !strings.HasSuffix(preparedKey, key) { + t.Errorf("Prepared non-recursive key %q should have suffix %q", preparedKey, key) + } } - } + }) - for _, key := range invalidKeys { - _, err := store.prepareKey(key) - if err == nil { - t.Errorf("key %q should be invalid", key) + t.Run("Recursive", func(t *testing.T) { + for _, key := range validKeys { + preparedKey, err := store.prepareKey(key, true) + if err != nil { + t.Errorf("preparing key %q should be valid; unexpected error: %v", key, err) + continue + } + if !strings.HasPrefix(preparedKey, expectPrefix) { + t.Errorf("prepared key %q should have prefix %q", preparedKey, expectPrefix) + } + if !strings.HasSuffix(preparedKey, "/") { + t.Errorf("Prepared non-recursive key %q should have suffix '/'", preparedKey) + } } - } + }) + + t.Run("Invalid", func(t *testing.T) { + for _, key := range invalidKeys { + _, err := store.prepareKey(key, false) + if err == nil { + t.Errorf("key %q should be invalid", key) + } + } + }) } func TestInvalidKeys(t *testing.T) { @@ -916,14 +969,14 @@ func TestGetCurrentResourceVersion(t *testing.T) { } } createPod := func(obj *example.Pod) *example.Pod { - key := "pods/" + obj.Namespace + "/" + obj.Name + key := "/pods/" + obj.Namespace + "/" + obj.Name out := &example.Pod{} err := store.Create(context.TODO(), key, obj, out, 0) require.NoError(t, err) return out } getPod := func(name, ns string) *example.Pod { - key := "pods/" + ns + "/" + name + key := "/pods/" + ns + "/" + name out := &example.Pod{} err := store.Get(context.TODO(), key, storage.GetOptions{}, out) require.NoError(t, err) @@ -987,8 +1040,8 @@ func BenchmarkStatsCacheCleanKeys(b *testing.B) { if err != nil { b.Fatal(err) } - if len(store.stats.keys) < namespaceCount*podPerNamespaceCount { - b.Fatalf("Unexpected number of keys in stats, want: %d, got: %d", namespaceCount*podPerNamespaceCount, len(store.stats.keys)) + if len(store.resourceSizeEstimator.keys) < namespaceCount*podPerNamespaceCount { + b.Fatalf("Unexpected number of keys in stats, want: %d, got: %d", namespaceCount*podPerNamespaceCount, len(store.resourceSizeEstimator.keys)) } // Get keys to measure only cleanupKeys time keys, err := store.getKeys(ctx) @@ -997,15 +1050,15 @@ func BenchmarkStatsCacheCleanKeys(b *testing.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - store.stats.cleanKeys(keys) + store.resourceSizeEstimator.cleanKeys(keys) } - if len(store.stats.keys) < namespaceCount*podPerNamespaceCount { - b.Fatalf("Unexpected number of keys in stats, want: %d, got: %d", namespaceCount*podPerNamespaceCount, len(store.stats.keys)) + if len(store.resourceSizeEstimator.keys) < namespaceCount*podPerNamespaceCount { + b.Fatalf("Unexpected number of keys in stats, want: %d, got: %d", namespaceCount*podPerNamespaceCount, len(store.resourceSizeEstimator.keys)) } } func TestPrefixGetKeys(t *testing.T) { - ctx, store, c := testSetup(t, withPrefix("/registry"), withResourcePrefix("pods")) + ctx, store, c := testSetup(t, withPrefix("/registry"), withResourcePrefix("/pods")) _, err := c.KV.Put(ctx, "key", "a") if err != nil { t.Fatal(err) @@ -1044,20 +1097,25 @@ func TestPrefixStats(t *testing.T) { expectStats storage.Stats }{ { - name: "SizeBasedListCostEstimate=false", + name: "Estimate=false", estimate: false, expectStats: storage.Stats{ObjectCount: 1}, }, { - name: "SizeBasedListCostEstimate=true", + name: "Estimate=true", estimate: true, expectStats: storage.Stats{ObjectCount: 1, EstimatedAverageObjectSizeBytes: 3}, }, } for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { - featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.SizeBasedListCostEstimate, tc.estimate) - ctx, store, c := testSetup(t, withPrefix("/registry"), withResourcePrefix("pods")) + ctx, store, c := testSetup(t, withPrefix("/registry"), withResourcePrefix("/pods/")) + if tc.estimate { + err := store.EnableResourceSizeEstimation(store.getKeys) + if err != nil { + t.Fatal(err) + } + } _, err := c.KV.Put(ctx, "key", "a") if err != nil { t.Fatal(err) @@ -1080,7 +1138,7 @@ func TestPrefixStats(t *testing.T) { listOut := &example.PodList{} // Ignore error as decode is expected to fail - _ = store.GetList(ctx, "pods", storage.ListOptions{Predicate: storage.Everything, Recursive: true}, listOut) + _ = store.GetList(ctx, "/pods/", storage.ListOptions{Predicate: storage.Everything, Recursive: true}, listOut) gotStats, err := store.Stats(ctx) if err != nil { diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go index 76f65f160eb04..cf16606bc512a 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go @@ -69,30 +69,30 @@ func TestOnlySetFatalOnDecodeError(b bool) { } type watcher struct { - client *clientv3.Client - codec runtime.Codec - newFunc func() runtime.Object - objectType string - groupResource schema.GroupResource - versioner storage.Versioner - transformer value.Transformer - getCurrentStorageRV func(context.Context) (uint64, error) - stats *statsCache + client *clientv3.Client + codec runtime.Codec + newFunc func() runtime.Object + objectType string + groupResource schema.GroupResource + versioner storage.Versioner + transformer value.Transformer + getCurrentStorageRV func(context.Context) (uint64, error) + getResourceSizeEstimator func() *resourceSizeEstimator } // watchChan implements watch.Interface. type watchChan struct { - watcher *watcher - key string - initialRev int64 - recursive bool - progressNotify bool - internalPred storage.SelectionPredicate - ctx context.Context - cancel context.CancelFunc - incomingEventChan chan *event - resultChan chan watch.Event - stats *statsCache + watcher *watcher + key string + initialRev int64 + recursive bool + progressNotify bool + internalPred storage.SelectionPredicate + ctx context.Context + cancel context.CancelFunc + incomingEventChan chan *event + resultChan chan watch.Event + getResourceSizeEstimator func() *resourceSizeEstimator } // Watch watches on a key and returns a watch.Interface that transfers relevant notifications. @@ -104,7 +104,7 @@ type watchChan struct { // pred must be non-nil. Only if opts.Predicate matches the change, it will be returned. func (w *watcher) Watch(ctx context.Context, key string, rev int64, opts storage.ListOptions) (watch.Interface, error) { if opts.Recursive && !strings.HasSuffix(key, "/") { - key += "/" + return nil, fmt.Errorf(`recursive key needs to end with "/"`) } if opts.ProgressNotify && w.newFunc == nil { return nil, apierrors.NewInternalError(errors.New("progressNotify for watch is unsupported by the etcd storage because no newFunc was provided")) @@ -128,15 +128,15 @@ func (w *watcher) Watch(ctx context.Context, key string, rev int64, opts storage func (w *watcher) createWatchChan(ctx context.Context, key string, rev int64, recursive, progressNotify bool, pred storage.SelectionPredicate) *watchChan { wc := &watchChan{ - watcher: w, - key: key, - initialRev: rev, - recursive: recursive, - progressNotify: progressNotify, - internalPred: pred, - incomingEventChan: make(chan *event, incomingBufSize), - resultChan: make(chan watch.Event, outgoingBufSize), - stats: w.stats, + watcher: w, + key: key, + initialRev: rev, + recursive: recursive, + progressNotify: progressNotify, + internalPred: pred, + incomingEventChan: make(chan *event, incomingBufSize), + resultChan: make(chan watch.Event, outgoingBufSize), + getResourceSizeEstimator: w.getResourceSizeEstimator, } if pred.Empty() { // The filter doesn't filter out any object. @@ -385,6 +385,7 @@ func (wc *watchChan) startWatching(watchClosedCh chan struct{}, initialEventsEnd opts = append(opts, clientv3.WithProgressNotify()) } wch := wc.watcher.client.Watch(wc.ctx, wc.key, opts...) + estimator := wc.getResourceSizeEstimator() for wres := range wch { if wres.Err() != nil { err := wres.Err() @@ -405,12 +406,12 @@ func (wc *watchChan) startWatching(watchClosedCh chan struct{}, initialEventsEnd } for _, e := range wres.Events { - if wc.stats != nil { + if estimator != nil { switch e.Type { case clientv3.EventTypePut: - wc.stats.UpdateKey(e.Kv) + estimator.UpdateKey(e.Kv) case clientv3.EventTypeDelete: - wc.stats.DeleteKey(e.Kv) + estimator.DeleteKey(e.Kv) } } metrics.RecordEtcdEvent(wc.watcher.groupResource) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go index 88fcd656cd299..8321867217a26 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go @@ -108,7 +108,7 @@ func TestProgressNotify(t *testing.T) { clusterConfig.WatchProgressNotifyInterval = time.Second ctx, store, client := testSetup(t, withClientConfig(clusterConfig)) - storagetesting.RunOptionalTestProgressNotify(ctx, t, store, increaseRV(client.Client)) + storagetesting.RunOptionalTestProgressNotify(ctx, t, store, increaseRVFunc(client.Client)) } func TestWatchWithUnsafeDelete(t *testing.T) { @@ -227,7 +227,7 @@ func TestTooLargeResourceVersionErrorForWatchList(t *testing.T) { t.Fatalf("Unable to convert NewTooLargeResourceVersionError to apierrors.StatusError") } - w, err := store.watcher.Watch(ctx, "/abc", int64(102), requestOpts) + w, err := store.watcher.Watch(ctx, "/abc/", int64(102), requestOpts) if err != nil { t.Fatal(err) } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/interfaces.go b/staging/src/k8s.io/apiserver/pkg/storage/interfaces.go index a07dda56208c0..be9980cfc7cff 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/interfaces.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/interfaces.go @@ -19,6 +19,7 @@ package storage import ( "context" "fmt" + "strings" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" @@ -268,9 +269,8 @@ type Interface interface { // This method issues an empty list request and reads only the ResourceVersion from the object metadata GetCurrentResourceVersion(ctx context.Context) (uint64, error) - // SetKeysFunc allows to override the function used to get keys from storage. - // This allows to replace default function that fetches keys from storage with one using cache. - SetKeysFunc(KeysFunc) + // EnableResourceSizeEstimation enables estimating resource size by providing function get keys from storage. + EnableResourceSizeEstimation(KeysFunc) error // CompactRevision returns latest observed revision that was compacted. // Without ListFromCacheSnapshot enabled only locally executed compaction will be observed. @@ -391,3 +391,32 @@ type Stats struct { // Value is an estimate, meaning it doesn't need to provide accurate nor consistent. EstimatedAverageObjectSizeBytes int64 } + +func PrepareKey(resourcePrefix, key string, recursive bool) (string, error) { + if key == ".." || + strings.HasPrefix(key, "../") || + strings.HasSuffix(key, "/..") || + strings.Contains(key, "/../") { + return "", fmt.Errorf("invalid key: %q", key) + } + if key == "." || + strings.HasPrefix(key, "./") || + strings.HasSuffix(key, "/.") || + strings.Contains(key, "/./") { + return "", fmt.Errorf("invalid key: %q", key) + } + if key == "" || key == "/" { + return "", fmt.Errorf("empty key: %q", key) + } + // For recursive requests, we need to make sure the key ended with "/" so that we only + // get children "directories". e.g. if we have key "/a", "/a/b", "/ab", getting keys + // with prefix "/a" will return all three, while with prefix "/a/" will return only + // "/a/b" which is the correct answer. + if recursive && !strings.HasSuffix(key, "/") { + key += "/" + } + if !strings.HasPrefix(key, resourcePrefix) { + return "", fmt.Errorf("invalid key: %q lacks resource prefix: %q", key, resourcePrefix) + } + return key, nil +} diff --git a/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go b/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go index c8ee0a128878c..53fc9f97a706d 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go @@ -440,6 +440,8 @@ func newETCD3Storage(c storagebackend.ConfigForResource, newFunc, newListFunc fu stopDBSizeMonitor, err := startDBSizeMonitorPerEndpoint(client.Client, c.DBMetricPollInterval) if err != nil { + stopCompactor() + _ = client.Close() return nil, nil, err } @@ -455,7 +457,13 @@ func newETCD3Storage(c storagebackend.ConfigForResource, newFunc, newListFunc fu transformer = etcd3.WithCorruptObjErrorHandlingTransformer(transformer) decoder = etcd3.WithCorruptObjErrorHandlingDecoder(decoder) } - store := etcd3.New(client, compactor, c.Codec, newFunc, newListFunc, c.Prefix, resourcePrefix, c.GroupResource, transformer, c.LeaseManagerConfig, decoder, versioner) + store, err := etcd3.New(client, compactor, c.Codec, newFunc, newListFunc, c.Prefix, resourcePrefix, c.GroupResource, transformer, c.LeaseManagerConfig, decoder, versioner) + if err != nil { + stopCompactor() + stopDBSizeMonitor() + _ = client.Close() + return nil, nil, err + } var once sync.Once destroyFunc := func() { // we know that storage destroy funcs are called multiple times (due to reuse in subresources). diff --git a/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/tls_test.go b/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/tls_test.go index 2a93747f41410..a095edf650576 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/tls_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/tls_test.go @@ -80,12 +80,12 @@ func TestTLSConnection(t *testing.T) { }, Codec: codec, } - storage, destroyFunc, err := newETCD3Storage(*cfg.ForResource(schema.GroupResource{Resource: "pods"}), nil, nil, "") + storage, destroyFunc, err := newETCD3Storage(*cfg.ForResource(schema.GroupResource{Resource: "pods"}), nil, nil, "/pods") defer destroyFunc() if err != nil { t.Fatal(err) } - err = storage.Create(context.TODO(), "/abc", &example.Pod{}, nil, 0) + err = storage.Create(context.TODO(), "/pods/abc", &example.Pod{}, nil, 0) if err != nil { t.Fatalf("Create failed: %v", err) } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/testing/store_benchmarks.go b/staging/src/k8s.io/apiserver/pkg/storage/testing/store_benchmarks.go index 6bb4acdee38f3..a919546fe071e 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/testing/store_benchmarks.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/testing/store_benchmarks.go @@ -57,7 +57,7 @@ func RunBenchmarkStoreListCreate(ctx context.Context, b *testing.B, store storag panic(fmt.Sprintf("Unexpected error %s", err)) } listOut := &example.PodList{} - err = store.GetList(ctx, "/pods", storage.ListOptions{ + err = store.GetList(ctx, "/pods/", storage.ListOptions{ Recursive: true, ResourceVersion: podOut.ResourceVersion, ResourceVersionMatch: match, diff --git a/staging/src/k8s.io/apiserver/pkg/storage/testing/store_tests.go b/staging/src/k8s.io/apiserver/pkg/storage/testing/store_tests.go index 196b637f91f3e..23e30eb45d491 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/testing/store_tests.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/testing/store_tests.go @@ -193,12 +193,12 @@ func RunTestGet(ctx context.Context, t *testing.T, store storage.Interface) { rv: strconv.FormatInt(math.MaxInt64, 10), }, { name: "get non-existing", - key: "/non-existing", + key: "/pods/non-existing", ignoreNotFound: false, expectNotFoundErr: true, }, { name: "get non-existing, ignore not found", - key: "/non-existing", + key: "/pods/non-existing", ignoreNotFound: true, expectNotFoundErr: false, expectedOut: &example.Pod{}, @@ -258,7 +258,7 @@ func RunTestUnconditionalDelete(ctx context.Context, t *testing.T, store storage expectNotFoundErr: false, }, { name: "non-existing key", - key: "/non-existing", + key: "/pods/non-existing", expectedObj: nil, expectNotFoundErr: true, }} @@ -640,17 +640,15 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com Predicate: storage.Everything, Recursive: true, } - if err := store.GetList(ctx, "/second", storageOpts, list); err != nil { + if err := store.GetList(ctx, "/pods/second", storageOpts, list); err != nil { t.Errorf("Unexpected error: %v", err) } - continueRV, _ := strconv.Atoi(list.ResourceVersion) - secondContinuation, err := storage.EncodeContinue("/second/foo", "/second/", int64(continueRV)) + continueRV := mustParseResourceVersion(t, list.ResourceVersion) + secondContinuation, err := storage.EncodeContinue("/pods/second/foo", "/pods/second/", int64(continueRV)) if err != nil { t.Fatal(err) } - initialRV2, _ := strconv.Atoi(initialRV) - getAttrs := func(obj runtime.Object) (labels.Set, fields.Set, error) { pod := obj.(*example.Pod) return nil, fields.Set{"metadata.name": pod.Name, "spec.nodeName": pod.Spec.NodeName}, nil @@ -677,18 +675,18 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com expectContinueTooOld bool expectRV string expectRVFunc func(string) error - expectEtcdRequest func() []RecordedList + expectCacherRequestsToEtcd func() []RecordedList }{ { name: "rejects invalid resource version", - prefix: "/pods", + prefix: "/pods/", pred: storage.Everything, rv: "abc", expectError: true, }, { name: "rejects resource version and continue token", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Label: labels.Everything(), Field: fields.Everything(), @@ -700,7 +698,7 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, { name: "rejects resource version set too high", - prefix: "/pods", + prefix: "/pods/", pred: storage.Everything, rv: strconv.FormatInt(math.MaxInt64, 10), expectRVTooLarge: true, @@ -710,6 +708,16 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com prefix: "/pods/first/", pred: storage.Everything, expectedOut: []example.Pod{*updatedPod}, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/first/", + }, + } + }, }, { name: "test List on existing key with resource version set to 0", @@ -726,6 +734,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: createdPods[0].ResourceVersion, rvMatch: metav1.ResourceVersionMatchExact, expectRV: createdPods[0].ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/first/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, createdPods[0].ResourceVersion)}, + }, + } + }, }, { name: "test List on existing key with resource version set before creation, match=Exact", @@ -735,6 +754,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: createdPods[0].ResourceVersion, rvMatch: metav1.ResourceVersionMatchExact, expectRV: createdPods[0].ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/second/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, createdPods[0].ResourceVersion)}, + }, + } + }, }, { name: "test List on existing key with resource version set after creation, match=Exact", @@ -744,6 +774,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: createdPods[1].ResourceVersion, rvMatch: metav1.ResourceVersionMatchExact, expectRV: createdPods[1].ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/second/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, createdPods[1].ResourceVersion)}, + }, + } + }, }, { name: "test List on existing key with resource version set before first write, match=Exact", @@ -752,6 +793,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: initialRV, rvMatch: metav1.ResourceVersionMatchExact, expectRVTooOld: true, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/first/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, initialRV)}, + }, + } + }, }, { name: "test List on existing key with resource version set to 0, match=NotOlderThan", @@ -800,6 +852,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: list.ResourceVersion, rvMatch: metav1.ResourceVersionMatchExact, expectRV: list.ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/first/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV)}, + }, + } + }, }, { name: "test List on existing key with resource version set to current resource version, match=NotOlderThan", @@ -814,6 +877,16 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com prefix: "/pods/non-existing/", pred: storage.Everything, expectedOut: []example.Pod{}, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/non-existing/", + }, + } + }, }, { name: "test List with pod name matching", @@ -823,6 +896,16 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com Field: fields.ParseSelectorOrDie("metadata.name!=bar"), }, expectedOut: []example.Pod{}, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/first/", + }, + } + }, }, { name: "test List with pod name matching with resource version set to current resource version, match=NotOlderThan", @@ -848,7 +931,7 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com expectContinue: true, expectContinueExact: encodeContinueOrDie(createdPods[1].Name+"\x00", int64(mustAtoi(currentRV))), expectedRemainingItemCount: ptr.To[int64](1), - expectEtcdRequest: func() []RecordedList { + expectCacherRequestsToEtcd: func() []RecordedList { if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) { return nil } @@ -874,6 +957,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com expectedRemainingItemCount: ptr.To[int64](1), rv: list.ResourceVersion, expectRV: list.ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/second/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV), Limit: 1}, + }, + } + }, }, { name: "test List with limit at current resource version and match=Exact", @@ -890,6 +984,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: list.ResourceVersion, rvMatch: metav1.ResourceVersionMatchExact, expectRV: list.ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/second/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV), Limit: 1}, + }, + } + }, }, { name: "test List with limit at current resource version and match=NotOlderThan", @@ -958,6 +1063,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: createdPods[0].ResourceVersion, rvMatch: metav1.ResourceVersionMatchExact, expectRV: createdPods[0].ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/second/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, createdPods[0].ResourceVersion), Limit: 1}, + }, + } + }, }, { name: "test List with limit at resource version after created and match=Exact", @@ -972,6 +1088,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: createdPods[1].ResourceVersion, rvMatch: metav1.ResourceVersionMatchExact, expectRV: createdPods[1].ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/second/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, createdPods[1].ResourceVersion), Limit: 1}, + }, + } + }, }, { name: "test List with pregenerated continue token", @@ -983,6 +1110,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com Continue: secondContinuation, }, expectedOut: []example.Pod{*createdPods[2]}, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/second/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV), Limit: 1, Continue: "/registry/pods/second/foo"}, + }, + } + }, }, { name: "ignores resource version 0 for List with pregenerated continue token", @@ -995,12 +1133,33 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, rv: "0", expectedOut: []example.Pod{*createdPods[2]}, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/second/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV), Limit: 1, Continue: "/registry/pods/second/foo"}, + }, + } + }, }, { name: "test List with multiple levels of directories and expect flattened result", prefix: "/pods/second/", pred: storage.Everything, expectedOut: []example.Pod{*createdPods[1], *createdPods[2]}, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/second/", + }, + } + }, }, { name: "test List with multiple levels of directories and expect flattened result with current resource version and match=NotOlderThan", @@ -1012,7 +1171,7 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, { name: "test List with filter returning only one item, ensure only a single page returned", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "barfoo"), Label: labels.Everything(), @@ -1020,10 +1179,29 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, expectedOut: []example.Pod{*createdPods[3]}, expectContinue: true, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Limit: 1}, + }, + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV) + 1, Limit: 2, Continue: "/registry/pods/first/bar\x00"}, + }, + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV) + 1, Limit: 4, Continue: "/registry/pods/second/foo\x00"}, + }, + } + }, }, { name: "test List with filter returning only one item, ensure only a single page returned with current resource version and match=NotOlderThan", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "barfoo"), Label: labels.Everything(), @@ -1037,7 +1215,7 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, { name: "test List with filter returning only one item, covers the entire list", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "barfoo"), Label: labels.Everything(), @@ -1045,10 +1223,25 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, expectedOut: []example.Pod{*createdPods[3]}, expectContinue: false, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: 0, Limit: 2}, + }, + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV) + 1, Limit: 4, Continue: "/registry/pods/second/bar\x00"}, + }, + } + }, }, { name: "test List with filter returning only one item, covers the entire list with current resource version and match=NotOlderThan", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "barfoo"), Label: labels.Everything(), @@ -1062,7 +1255,7 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, { name: "test List with filter returning only one item, covers the entire list, with resource version 0", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "barfoo"), Label: labels.Everything(), @@ -1074,7 +1267,7 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, { name: "test List with filter returning two items, more pages possible", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "bar"), Label: labels.Everything(), @@ -1082,10 +1275,21 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, expectContinue: true, expectedOut: []example.Pod{*updatedPod, *createdPods[1]}, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: 0, Limit: 2}, + }, + } + }, }, { name: "test List with filter returning two items, more pages possible with current resource version and match=NotOlderThan", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "bar"), Label: labels.Everything(), @@ -1098,17 +1302,32 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, { name: "filter returns two items split across multiple pages", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "foo"), Label: labels.Everything(), Limit: 2, }, expectedOut: []example.Pod{*createdPods[2], *createdPods[4]}, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: 0, Limit: 2}, + }, + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV) + 1, Limit: 4, Continue: "/registry/pods/second/bar\x00"}, + }, + } + }, }, { name: "filter returns two items split across multiple pages with current resource version and match=NotOlderThan", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "foo"), Label: labels.Everything(), @@ -1120,7 +1339,7 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, { name: "filter returns one item for last page, ends on last item, not full", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "foo"), Label: labels.Everything(), @@ -1128,10 +1347,21 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com Continue: encodeContinueOrDie("third/barfoo", int64(continueRV)), }, expectedOut: []example.Pod{*createdPods[4]}, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV), Limit: 2, Continue: "/registry/pods/third/barfoo"}, + }, + } + }, }, { name: "filter returns one item for last page, starts on last item, full", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "foo"), Label: labels.Everything(), @@ -1139,10 +1369,25 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com Continue: encodeContinueOrDie("third/barfoo", int64(continueRV)), }, expectedOut: []example.Pod{*createdPods[4]}, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV), Limit: 1, Continue: "/registry/pods/third/barfoo"}, + }, + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV), Limit: 2, Continue: "/registry/pods/third/barfoo\x00"}, + }, + } + }, }, { name: "filter returns one item for last page, starts on last item, partial page", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "foo"), Label: labels.Everything(), @@ -1150,20 +1395,42 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com Continue: encodeContinueOrDie("third/barfoo", int64(continueRV)), }, expectedOut: []example.Pod{*createdPods[4]}, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV), Limit: 2, Continue: "/registry/pods/third/barfoo"}, + }, + } + }, }, { name: "filter returns two items, page size equal to total list size", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "foo"), Label: labels.Everything(), Limit: 5, }, expectedOut: []example.Pod{*createdPods[2], *createdPods[4]}, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: 0, Limit: 5}, + }, + } + }, }, { name: "filter returns two items, page size equal to total list size with current resource version and match=NotOlderThan", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "foo"), Label: labels.Everything(), @@ -1175,17 +1442,28 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, { name: "filter returns one item, page size equal to total list size", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "barfoo"), Label: labels.Everything(), Limit: 5, }, expectedOut: []example.Pod{*createdPods[3]}, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: 0, Limit: 5}, + }, + } + }, }, { name: "filter returns one item, page size equal to total list size with current resource version and match=NotOlderThan", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "barfoo"), Label: labels.Everything(), @@ -1197,13 +1475,23 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, { name: "list all items", - prefix: "/pods", + prefix: "/pods/", pred: storage.Everything, expectedOut: []example.Pod{*updatedPod, *createdPods[1], *createdPods[2], *createdPods[3], *createdPods[4]}, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + }, + } + }, }, { name: "list all items with current resource version and match=NotOlderThan", - prefix: "/pods", + prefix: "/pods/", pred: storage.Everything, rv: list.ResourceVersion, rvMatch: metav1.ResourceVersionMatchNotOlderThan, @@ -1211,7 +1499,7 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, { name: "verify list returns updated version of object; filter returns one item, page size equal to total list size with current resource version and match=NotOlderThan", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("spec.nodeName", "fakeNode"), Label: labels.Everything(), @@ -1223,7 +1511,7 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, { name: "verify list does not return deleted object; filter for deleted object, page size equal to total list size with current resource version and match=NotOlderThan", - prefix: "/pods", + prefix: "/pods/", pred: storage.SelectionPredicate{ Field: fields.OneTermEqualSelector("metadata.name", "baz"), Label: labels.Everything(), @@ -1240,6 +1528,16 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: "", expectRV: currentRV, expectedOut: []example.Pod{}, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/empty/", + }, + } + }, }, { name: "test non-consistent List", @@ -1266,6 +1564,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: createdPods[0].ResourceVersion, rvMatch: metav1.ResourceVersionMatchExact, expectRV: createdPods[0].ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: 2}, + }, + } + }, }, { name: "test List with resource version of second write, match=Exact", @@ -1275,6 +1584,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: createdPods[1].ResourceVersion, rvMatch: metav1.ResourceVersionMatchExact, expectRV: createdPods[1].ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: 3}, + }, + } + }, }, { name: "test List with resource version of third write, match=Exact", @@ -1284,6 +1604,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: createdPods[2].ResourceVersion, rvMatch: metav1.ResourceVersionMatchExact, expectRV: createdPods[2].ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: 4}, + }, + } + }, }, { name: "test List with resource version of fourth write, match=Exact", @@ -1293,6 +1624,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: createdPods[3].ResourceVersion, rvMatch: metav1.ResourceVersionMatchExact, expectRV: createdPods[3].ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: 5}, + }, + } + }, }, { name: "test List with resource version of fifth write, match=Exact", @@ -1302,6 +1644,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: createdPods[4].ResourceVersion, rvMatch: metav1.ResourceVersionMatchExact, expectRV: createdPods[4].ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: 6}, + }, + } + }, }, { name: "test List with resource version of six write, match=Exact", @@ -1311,6 +1664,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: createdPods[5].ResourceVersion, rvMatch: metav1.ResourceVersionMatchExact, expectRV: createdPods[5].ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: 7}, + }, + } + }, }, { name: "test List with resource version of seventh write, match=Exact", @@ -1320,6 +1684,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: updatedPod.ResourceVersion, rvMatch: metav1.ResourceVersionMatchExact, expectRV: updatedPod.ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: 8}, + }, + } + }, }, { name: "test List with resource version of eight write, match=Exact", @@ -1329,6 +1704,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: fmt.Sprint(continueRV), rvMatch: metav1.ResourceVersionMatchExact, expectRV: fmt.Sprint(continueRV), + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV)}, + }, + } + }, }, { name: "test List with resource version after writes, match=Exact", @@ -1338,6 +1724,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: fmt.Sprint(continueRV + 1), rvMatch: metav1.ResourceVersionMatchExact, expectRV: fmt.Sprint(continueRV + 1), + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) && utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV) + 1}, + }, + } + }, }, { name: "test List with future resource version, match=Exact", @@ -1346,6 +1743,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: fmt.Sprint(continueRV + 2), rvMatch: metav1.ResourceVersionMatchExact, expectRVTooLarge: true, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV) + 2}, + }, + } + }, }, // limit, match=Exact { @@ -1363,6 +1771,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rvMatch: metav1.ResourceVersionMatchExact, expectRV: createdPods[1].ResourceVersion, expectedRemainingItemCount: ptr.To[int64](1), + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, createdPods[1].ResourceVersion), Limit: 1}, + }, + } + }, }, { name: "test List with limit, resource version of third write, match=Exact", @@ -1379,6 +1798,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com expectContinueExact: encodeContinueOrDie(createdPods[1].Namespace+"/"+createdPods[1].Name+"\x00", int64(mustAtoi(createdPods[2].ResourceVersion))), expectRV: createdPods[2].ResourceVersion, expectedRemainingItemCount: ptr.To[int64](1), + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, createdPods[2].ResourceVersion), Limit: 2}, + }, + } + }, }, { name: "test List with limit, resource version of fourth write, match=Exact", @@ -1392,6 +1822,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rvMatch: metav1.ResourceVersionMatchExact, expectedOut: []example.Pod{*createdPods[0], *createdPods[1], *createdPods[2], *createdPods[3]}, expectRV: createdPods[3].ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, createdPods[3].ResourceVersion), Limit: 4}, + }, + } + }, }, { name: "test List with limit, resource version of fifth write, match=Exact", @@ -1408,6 +1849,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com expectContinue: true, expectContinueExact: encodeContinueOrDie(createdPods[0].Namespace+"/"+createdPods[0].Name+"\x00", int64(mustAtoi(createdPods[4].ResourceVersion))), expectedRemainingItemCount: ptr.To[int64](4), + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, createdPods[4].ResourceVersion), Limit: 1}, + }, + } + }, }, { name: "test List with limit, resource version of six write, match=Exact", @@ -1424,6 +1876,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com expectContinue: true, expectContinueExact: encodeContinueOrDie(createdPods[1].Namespace+"/"+createdPods[1].Name+"\x00", int64(mustAtoi(createdPods[5].ResourceVersion))), expectedRemainingItemCount: ptr.To[int64](4), + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, createdPods[5].ResourceVersion), Limit: 2}, + }, + } + }, }, { name: "test List with limit, resource version of seventh write, match=Exact", @@ -1440,6 +1903,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com expectContinue: true, expectContinueExact: encodeContinueOrDie(createdPods[2].Namespace+"/"+createdPods[2].Name+"\x00", int64(mustAtoi(updatedPod.ResourceVersion))), expectedRemainingItemCount: ptr.To[int64](2), + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, updatedPod.ResourceVersion), Limit: 4}, + }, + } + }, }, { name: "test List with limit, resource version of eight write, match=Exact", @@ -1453,6 +1927,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com rv: fmt.Sprint(continueRV), rvMatch: metav1.ResourceVersionMatchExact, expectRV: fmt.Sprint(continueRV), + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV), Limit: 8}, + }, + } + }, }, { name: "test List with limit, resource version after writes, match=Exact", @@ -1469,6 +1954,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com expectContinue: true, expectContinueExact: encodeContinueOrDie(updatedPod.Namespace+"/"+updatedPod.Name+"\x00", int64(continueRV+1)), expectedRemainingItemCount: ptr.To[int64](4), + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) && utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV) + 1, Limit: 1}, + }, + } + }, }, // Continue { @@ -1478,9 +1974,20 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com Label: labels.Everything(), Field: fields.Everything(), Limit: 1, - Continue: encodeContinueOrDie(createdPods[0].Namespace+"/"+createdPods[0].Name+"\x00", int64(initialRV2)), + Continue: encodeContinueOrDie(createdPods[0].Namespace+"/"+createdPods[0].Name+"\x00", mustParseResourceVersion(t, initialRV)), }, expectContinueTooOld: true, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, initialRV), Limit: 4}, + }, + } + }, }, { name: "test List with continue, resource version of first write", @@ -1493,6 +2000,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, expectedOut: []example.Pod{}, expectRV: createdPods[0].ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, createdPods[0].ResourceVersion), Limit: 1, Continue: "/registry/pods/first/bar\x00"}, + }, + } + }, }, { name: "test List with continue, resource version of second write", @@ -1505,6 +2023,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, expectedOut: []example.Pod{*createdPods[1]}, expectRV: createdPods[1].ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, createdPods[1].ResourceVersion), Limit: 1, Continue: "/registry/pods/first/bar\x00"}, + }, + } + }, }, { name: "test List with continue, resource version of third write", @@ -1517,6 +2046,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, expectedOut: []example.Pod{*createdPods[2]}, expectRV: createdPods[2].ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, createdPods[2].ResourceVersion), Limit: 2, Continue: "/registry/pods/second/bar\x00"}, + }, + } + }, }, { name: "test List with continue, resource version of fifth write", @@ -1532,6 +2072,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com expectContinue: true, expectContinueExact: encodeContinueOrDie(createdPods[1].Namespace+"/"+createdPods[1].Name+"\x00", int64(mustAtoi(createdPods[4].ResourceVersion))), expectedRemainingItemCount: ptr.To[int64](3), + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, createdPods[4].ResourceVersion), Limit: 1, Continue: "/registry/pods/first/bar\x00"}, + }, + } + }, }, { name: "test List with continue, resource version of six write", @@ -1547,6 +2098,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com expectContinue: true, expectContinueExact: encodeContinueOrDie(createdPods[2].Namespace+"/"+createdPods[2].Name+"\x00", int64(mustAtoi(createdPods[5].ResourceVersion))), expectedRemainingItemCount: ptr.To[int64](2), + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, createdPods[5].ResourceVersion), Limit: 2, Continue: "/registry/pods/second/bar\x00"}, + }, + } + }, }, { name: "test List with continue, resource version of seventh write", @@ -1559,6 +2121,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, expectedOut: []example.Pod{*createdPods[3], *createdPods[4]}, expectRV: updatedPod.ResourceVersion, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: mustParseResourceVersion(t, updatedPod.ResourceVersion), Limit: 4, Continue: "/registry/pods/second/foo\x00"}, + }, + } + }, }, { name: "test List with continue, resource version after writes", @@ -1574,6 +2147,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com expectContinue: true, expectContinueExact: encodeContinueOrDie(createdPods[1].Namespace+"/"+createdPods[1].Name+"\x00", int64(continueRV+1)), expectedRemainingItemCount: ptr.To[int64](3), + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) && utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Revision: int64(continueRV) + 1, Limit: 1, Continue: "/registry/pods/first/bar\x00"}, + }, + } + }, }, { name: "test List with continue from second pod, negative resource version gives consistent read", @@ -1585,6 +2169,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, expectedOut: []example.Pod{*createdPods[1], *createdPods[2], *createdPods[3], *createdPods[4]}, expectRV: currentRV, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) && utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Continue: "/registry/pods/first/bar\x00"}, + }, + } + }, }, { name: "test List with continue from second pod and limit, negative resource version gives consistent read", @@ -1600,6 +2195,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com expectContinueExact: encodeContinueOrDie(createdPods[2].Namespace+"/"+createdPods[2].Name+"\x00", int64(continueRV+1)), expectRV: currentRV, expectedRemainingItemCount: ptr.To[int64](2), + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) && utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Continue: "/registry/pods/first/bar\x00", Limit: 2}, + }, + } + }, }, { name: "test List with continue from third pod, negative resource version gives consistent read", @@ -1611,6 +2217,17 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com }, expectedOut: []example.Pod{*createdPods[3], *createdPods[4]}, expectRV: currentRV, + expectCacherRequestsToEtcd: func() []RecordedList { + if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) && utilfeature.DefaultFeatureGate.Enabled(features.ListFromCacheSnapshot) { + return nil + } + return []RecordedList{ + { + Key: "/registry/pods/", + ListOptions: kubernetes.ListOptions{Continue: "/registry/pods/second/foo\x00"}, + }, + } + }, }, { name: "test List with continue from empty fails", @@ -1731,11 +2348,14 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com if !cmp.Equal(tt.expectedRemainingItemCount, out.RemainingItemCount) { t.Fatalf("unexpected remainingItemCount, diff: %s", cmp.Diff(tt.expectedRemainingItemCount, out.RemainingItemCount)) } - if watchCacheEnabled && tt.expectEtcdRequest != nil { - expectEtcdLists := tt.expectEtcdRequest() - etcdLists := recorder.ListRequestForKey(recorderKey) - if !cmp.Equal(expectEtcdLists, etcdLists) { - t.Fatalf("unexpected etcd requests, diff: %s", cmp.Diff(expectEtcdLists, etcdLists)) + if watchCacheEnabled { + var expectedListRequests []RecordedList + if tt.expectCacherRequestsToEtcd != nil { + expectedListRequests = tt.expectCacherRequestsToEtcd() + } + gotListRequests := recorder.ListRequestForKey(recorderKey) + if !cmp.Equal(expectedListRequests, gotListRequests) { + t.Fatalf("unexpected etcd list requests, diff: %s", cmp.Diff(expectedListRequests, gotListRequests)) } } }) @@ -1909,7 +2529,7 @@ func seedMultiLevelData(ctx context.Context, store storage.Interface) (initialRV // we want to figure out the resourceVersion before we create anything initialList := &example.PodList{} - if err := store.GetList(ctx, "/pods", storage.ListOptions{Predicate: storage.Everything, Recursive: true}, initialList); err != nil { + if err := store.GetList(ctx, "/pods/", storage.ListOptions{Predicate: storage.Everything, Recursive: true}, initialList); err != nil { return "", nil, nil, fmt.Errorf("failed to determine starting resourceVersion: %w", err) } initialRV = initialList.ResourceVersion @@ -2037,12 +2657,12 @@ func RunTestGetListNonRecursive(ctx context.Context, t *testing.T, increaseRV In expectRVTooLarge: true, }, { name: "non-existing key", - key: "/non-existing", + key: "/pods/non-existing", pred: storage.Everything, expectedOut: []example.Pod{}, }, { name: "with matching pod name", - key: "/non-existing", + key: "/pods/non-existing", pred: storage.SelectionPredicate{ Label: labels.Everything(), Field: fields.ParseSelectorOrDie("metadata.name!=" + storedObj.Name), @@ -2283,7 +2903,7 @@ func RunTestListContinuation(ctx context.Context, t *testing.T, store storage.In Predicate: pred(1, ""), Recursive: true, } - if err := store.GetList(ctx, "/pods", options, out); err != nil { + if err := store.GetList(ctx, "/pods/", options, out); err != nil { t.Fatalf("Unable to get initial list: %v", err) } if len(out.Continue) == 0 { @@ -2307,13 +2927,13 @@ func RunTestListContinuation(ctx context.Context, t *testing.T, store storage.In Predicate: pred(0, continueFromSecondItem), Recursive: true, } - if err := store.GetList(ctx, "/pods", options, out); err != nil { + if err := store.GetList(ctx, "/pods/", options, out); err != nil { t.Fatalf("Unable to get second page: %v", err) } if len(out.Continue) != 0 { t.Fatalf("Unexpected continuation token set") } - key, rv, err := storage.DecodeContinue(continueFromSecondItem, "/pods") + key, rv, err := storage.DecodeContinue(continueFromSecondItem, "/pods/") t.Logf("continue token was %d %s %v", rv, key, err) expectNoDiff(t, "incorrect second page", []example.Pod{*preset[1].storedObj, *preset[2].storedObj}, out.Items) if out.ResourceVersion != currentRV { @@ -2331,7 +2951,7 @@ func RunTestListContinuation(ctx context.Context, t *testing.T, store storage.In Predicate: pred(1, continueFromSecondItem), Recursive: true, } - if err := store.GetList(ctx, "/pods", options, out); err != nil { + if err := store.GetList(ctx, "/pods/", options, out); err != nil { t.Fatalf("Unable to get second page: %v", err) } if len(out.Continue) == 0 { @@ -2354,7 +2974,7 @@ func RunTestListContinuation(ctx context.Context, t *testing.T, store storage.In Predicate: pred(1, continueFromThirdItem), Recursive: true, } - if err := store.GetList(ctx, "/pods", options, out); err != nil { + if err := store.GetList(ctx, "/pods/", options, out); err != nil { t.Fatalf("Unable to get second page: %v", err) } if len(out.Continue) != 0 { @@ -2396,7 +3016,7 @@ func RunTestListPaginationRareObject(ctx context.Context, t *testing.T, store st }, Recursive: true, } - if err := store.GetList(ctx, "/pods", options, out); err != nil { + if err := store.GetList(ctx, "/pods/", options, out); err != nil { t.Fatalf("Unable to get initial list: %v", err) } if len(out.Continue) != 0 { @@ -2472,7 +3092,7 @@ func RunTestListContinuationWithFilter(ctx context.Context, t *testing.T, store Predicate: pred(2, ""), Recursive: true, } - if err := store.GetList(ctx, "/pods", options, out); err != nil { + if err := store.GetList(ctx, "/pods/", options, out); err != nil { t.Errorf("Unable to get initial list: %v", err) } if len(out.Continue) == 0 { @@ -2503,7 +3123,7 @@ func RunTestListContinuationWithFilter(ctx context.Context, t *testing.T, store Predicate: pred(2, cont), Recursive: true, } - if err := store.GetList(ctx, "/pods", options, out); err != nil { + if err := store.GetList(ctx, "/pods/", options, out); err != nil { t.Errorf("Unable to get second page: %v", err) } if len(out.Continue) != 0 { @@ -2519,7 +3139,7 @@ func RunTestListContinuationWithFilter(ctx context.Context, t *testing.T, store } type Compaction func(ctx context.Context, t *testing.T, resourceVersion string) -type IncreaseRVFunc func(ctx context.Context, t *testing.T) +type IncreaseRVFunc func(ctx context.Context, t *testing.T) (revision int64) func RunTestListInconsistentContinuation(ctx context.Context, t *testing.T, store storage.Interface, compaction Compaction) { // Setup storage with the following structure: @@ -2578,7 +3198,7 @@ func RunTestListInconsistentContinuation(ctx context.Context, t *testing.T, stor Predicate: pred(1, ""), Recursive: true, } - if err := store.GetList(ctx, "/pods", options, out); err != nil { + if err := store.GetList(ctx, "/pods/", options, out); err != nil { t.Fatalf("Unable to get initial list: %v", err) } if len(out.Continue) == 0 { @@ -2615,7 +3235,7 @@ func RunTestListInconsistentContinuation(ctx context.Context, t *testing.T, stor Predicate: pred(0, continueFromSecondItem), Recursive: true, } - err := store.GetList(ctx, "/pods", options, out) + err := store.GetList(ctx, "/pods/", options, out) if err == nil { t.Fatalf("unexpected no error") } @@ -2637,7 +3257,7 @@ func RunTestListInconsistentContinuation(ctx context.Context, t *testing.T, stor Predicate: pred(1, inconsistentContinueFromSecondItem), Recursive: true, } - if err := store.GetList(ctx, "/pods", options, out); err != nil { + if err := store.GetList(ctx, "/pods/", options, out); err != nil { t.Fatalf("Unable to get second page: %v", err) } if len(out.Continue) == 0 { @@ -2656,7 +3276,7 @@ func RunTestListInconsistentContinuation(ctx context.Context, t *testing.T, stor Predicate: pred(1, continueFromThirdItem), Recursive: true, } - if err := store.GetList(ctx, "/pods", options, out); err != nil { + if err := store.GetList(ctx, "/pods/", options, out); err != nil { t.Fatalf("Unable to get second page: %v", err) } if len(out.Continue) != 0 { @@ -2730,7 +3350,7 @@ func RunTestListResourceVersionMatch(ctx context.Context, t *testing.T, store In Predicate: predicate, Recursive: true, } - if err := store.GetList(ctx, "/pods", options, &result1); err != nil { + if err := store.GetList(ctx, "/pods/", options, &result1); err != nil { t.Fatalf("failed to list objects: %v", err) } @@ -2743,7 +3363,7 @@ func RunTestListResourceVersionMatch(ctx context.Context, t *testing.T, store In } result2 := example.PodList{} - if err := store.GetList(ctx, "/pods", options, &result2); err != nil { + if err := store.GetList(ctx, "/pods/", options, &result2); err != nil { t.Fatalf("failed to list objects: %v", err) } @@ -2753,7 +3373,7 @@ func RunTestListResourceVersionMatch(ctx context.Context, t *testing.T, store In options.ResourceVersionMatch = metav1.ResourceVersionMatchNotOlderThan result3 := example.PodList{} - if err := store.GetList(ctx, "/pods", options, &result3); err != nil { + if err := store.GetList(ctx, "/pods/", options, &result3); err != nil { t.Fatalf("failed to list objects: %v", err) } @@ -2761,7 +3381,7 @@ func RunTestListResourceVersionMatch(ctx context.Context, t *testing.T, store In options.ResourceVersionMatch = metav1.ResourceVersionMatchExact result4 := example.PodList{} - if err := store.GetList(ctx, "/pods", options, &result4); err != nil { + if err := store.GetList(ctx, "/pods/", options, &result4); err != nil { t.Fatalf("failed to list objects: %v", err) } @@ -2784,7 +3404,7 @@ func RunTestGuaranteedUpdate(ctx context.Context, t *testing.T, store InterfaceW hasSelfLink bool }{{ name: "non-existing key, ignoreNotFound=false", - key: "/non-existing", + key: "/pods/non-existing", ignoreNotFound: false, precondition: nil, expectNotFoundErr: true, @@ -2792,7 +3412,7 @@ func RunTestGuaranteedUpdate(ctx context.Context, t *testing.T, store InterfaceW expectNoUpdate: false, }, { name: "non-existing key, ignoreNotFound=true", - key: "/non-existing", + key: "/pods/non-existing", ignoreNotFound: true, precondition: nil, expectNotFoundErr: false, @@ -3175,7 +3795,7 @@ func RunTestTransformationFailure(ctx context.Context, t *testing.T, store Inter Predicate: storage.Everything, Recursive: true, } - if err := store.GetList(ctx, "/pods", storageOpts, &got); !storage.IsInternalError(err) { + if err := store.GetList(ctx, "/pods/", storageOpts, &got); !storage.IsInternalError(err) { t.Errorf("Unexpected error %v", err) } @@ -3256,7 +3876,7 @@ func RunTestStats(ctx context.Context, t *testing.T, store storage.Interface, co func assertStats(t *testing.T, store storage.Interface, sizeEnabled bool, expectStats storage.Stats) { t.Helper() // Execute consistent LIST to refresh state of cache. - err := store.GetList(t.Context(), "/pods", storage.ListOptions{Recursive: true, Predicate: storage.Everything}, &example.PodList{}) + err := store.GetList(t.Context(), "/pods/", storage.ListOptions{Recursive: true, Predicate: storage.Everything}, &example.PodList{}) if err != nil { t.Fatalf("GetList failed: %v", err) } @@ -3309,7 +3929,7 @@ func RunTestListPaging(ctx context.Context, t *testing.T, store storage.Interfac for { calls++ listOut := &example.PodList{} - err := store.GetList(ctx, "/pods", opts, listOut) + err := store.GetList(ctx, "/pods/", opts, listOut) if err != nil { t.Fatalf("Unexpected error %s", err) } @@ -3739,7 +4359,7 @@ func RunTestNamespaceScopedList(ctx context.Context, t *testing.T, store storage func RunTestCompactRevision(ctx context.Context, t *testing.T, store storage.Interface, increaseRV IncreaseRVFunc, compact Compaction) { listOut := &example.PodList{} - if err := store.GetList(ctx, "/pods", storage.ListOptions{ + if err := store.GetList(ctx, "/pods/", storage.ListOptions{ Predicate: storage.Everything, Recursive: true, }, listOut); err != nil { @@ -3753,7 +4373,7 @@ func RunTestCompactRevision(ctx context.Context, t *testing.T, store storage.Int if compactedRV >= int64(currentRV) { t.Fatalf("Expected current RV not be compacted, current: %d, compacted: %d", currentRV, compactedRV) } - if err := store.GetList(ctx, "/pods", storage.ListOptions{ + if err := store.GetList(ctx, "/pods/", storage.ListOptions{ Predicate: storage.Everything, Recursive: true, ResourceVersion: listOut.ResourceVersion, @@ -3764,7 +4384,7 @@ func RunTestCompactRevision(ctx context.Context, t *testing.T, store storage.Int increaseRV(ctx, t) expectCompactedRV := currentRV + 1 compact(ctx, t, fmt.Sprintf("%d", expectCompactedRV)) - if err := store.GetList(ctx, "/pods", storage.ListOptions{ + if err := store.GetList(ctx, "/pods/", storage.ListOptions{ Predicate: storage.Everything, Recursive: true, ResourceVersion: listOut.ResourceVersion, @@ -3777,3 +4397,122 @@ func RunTestCompactRevision(ctx context.Context, t *testing.T, store storage.Int t.Errorf("CompactRevision()=%d, expected: %d", store.CompactRevision(), expectCompactedRV) } } + +func RunTestKeySchema(ctx context.Context, t *testing.T, store storage.Interface) { + createObj := &example.Pod{} + createOut := &example.Pod{} + require.ErrorContains(t, store.Create(ctx, "", createObj, createOut, 0), "empty key") + require.ErrorContains(t, store.Create(ctx, "/", createObj, createOut, 0), "empty key") + require.ErrorContains(t, store.Create(ctx, ".", createObj, createOut, 0), "invalid key") + require.ErrorContains(t, store.Create(ctx, "..", createObj, createOut, 0), "invalid key") + require.ErrorContains(t, store.Create(ctx, "pods", createObj, createOut, 0), "lacks resource prefix") + require.ErrorContains(t, store.Create(ctx, "/pods", createObj, createOut, 0), "lacks resource prefix") + require.ErrorContains(t, store.Create(ctx, "/pods.apps", createObj, createOut, 0), "lacks resource prefix") + require.ErrorContains(t, store.Create(ctx, "/foo/", createObj, createOut, 0), "lacks resource prefix") + require.NoError(t, store.Create(ctx, "/pods/", createObj, createOut, 0)) + require.NoError(t, store.Create(ctx, "/pods/name", createObj, createOut, 0)) + require.NoError(t, store.Create(ctx, "/pods/namespace", createObj, createOut, 0)) + require.NoError(t, store.Create(ctx, "/pods/namespace/name", createObj, createOut, 0)) + + listOut := &example.PodList{} + recursiveListOpts := storage.ListOptions{Predicate: storage.Everything, Recursive: true} + nonRecursiveListOpts := storage.ListOptions{Predicate: storage.Everything, Recursive: false} + require.ErrorContains(t, store.GetList(ctx, "", recursiveListOpts, listOut), "empty key") + require.ErrorContains(t, store.GetList(ctx, "/", recursiveListOpts, listOut), "empty key") + require.ErrorContains(t, store.GetList(ctx, ".", recursiveListOpts, listOut), "invalid key") + require.ErrorContains(t, store.GetList(ctx, "..", recursiveListOpts, listOut), "invalid key") + require.ErrorContains(t, store.GetList(ctx, "pods", recursiveListOpts, listOut), "lacks resource prefix") + require.ErrorContains(t, store.GetList(ctx, "/pods.apps", recursiveListOpts, listOut), "lacks resource prefix") + require.ErrorContains(t, store.GetList(ctx, "/foo/", recursiveListOpts, listOut), "lacks resource prefix") + require.ErrorContains(t, store.GetList(ctx, "/pods", nonRecursiveListOpts, listOut), "lacks resource prefix") + require.NoError(t, store.GetList(ctx, "/pods", recursiveListOpts, listOut)) + require.NoError(t, store.GetList(ctx, "/pods/", recursiveListOpts, listOut)) + require.NoError(t, store.GetList(ctx, "/pods/namespace", recursiveListOpts, listOut)) + require.NoError(t, store.GetList(ctx, "/pods/namespace/name", recursiveListOpts, listOut)) + + getOut := &example.Pod{} + getOpts := storage.GetOptions{} + require.ErrorContains(t, store.Get(ctx, "", getOpts, getOut), "empty key") + require.ErrorContains(t, store.Get(ctx, "/", getOpts, getOut), "empty key") + require.ErrorContains(t, store.Get(ctx, ".", getOpts, getOut), "invalid key") + require.ErrorContains(t, store.Get(ctx, "..", getOpts, getOut), "invalid key") + require.ErrorContains(t, store.Get(ctx, "pods", getOpts, getOut), "lacks resource prefix") + require.ErrorContains(t, store.Get(ctx, "/pods", getOpts, getOut), "lacks resource prefix") + require.ErrorContains(t, store.Get(ctx, "/pods.apps", getOpts, getOut), "lacks resource prefix") + require.ErrorContains(t, store.Get(ctx, "/foo/", getOpts, getOut), "lacks resource prefix") + require.NoError(t, store.Get(ctx, "/pods/", getOpts, getOut)) + require.NoError(t, store.Get(ctx, "/pods/namespace", getOpts, getOut)) + require.NoError(t, store.Get(ctx, "/pods/namespace/name", getOpts, getOut)) + + _, err := store.Watch(ctx, "", recursiveListOpts) + require.ErrorContains(t, err, "empty key") + _, err = store.Watch(ctx, "/", recursiveListOpts) + require.ErrorContains(t, err, "empty key") + _, err = store.Watch(ctx, ".", recursiveListOpts) + require.ErrorContains(t, err, "invalid key") + _, err = store.Watch(ctx, "..", recursiveListOpts) + require.ErrorContains(t, err, "invalid key") + _, err = store.Watch(ctx, "pods", recursiveListOpts) + require.ErrorContains(t, err, "lacks resource prefix") + _, err = store.Watch(ctx, "/pods.apps", recursiveListOpts) + require.ErrorContains(t, err, "lacks resource prefix") + _, err = store.Watch(ctx, "/foo/", recursiveListOpts) + require.ErrorContains(t, err, "lacks resource prefix") + _, err = store.Watch(ctx, "/pods", nonRecursiveListOpts) + require.ErrorContains(t, err, "lacks resource prefix") + w, err := store.Watch(ctx, "/pods", recursiveListOpts) + require.NoError(t, err) + w.Stop() + require.NoError(t, err) + w.Stop() + w, err = store.Watch(ctx, "/pods/namespace", recursiveListOpts) + require.NoError(t, err) + w.Stop() + w, err = store.Watch(ctx, "/pods/namespace/name", recursiveListOpts) + require.NoError(t, err) + w.Stop() + + updateIn := &example.Pod{} + updateOut := &example.Pod{} + updateFunc := func(input runtime.Object, res storage.ResponseMeta) (output runtime.Object, ttl *uint64, err error) { + return updateIn, nil, nil + } + require.ErrorContains(t, store.GuaranteedUpdate(ctx, "", updateOut, false, nil, updateFunc, nil), "empty key") + require.ErrorContains(t, store.GuaranteedUpdate(ctx, "/", updateOut, false, nil, updateFunc, nil), "empty key") + require.ErrorContains(t, store.GuaranteedUpdate(ctx, ".", updateOut, false, nil, updateFunc, nil), "invalid key") + require.ErrorContains(t, store.GuaranteedUpdate(ctx, "..", updateOut, false, nil, updateFunc, nil), "invalid key") + require.ErrorContains(t, store.GuaranteedUpdate(ctx, "pods", updateOut, false, nil, updateFunc, nil), "lacks resource prefix") + require.ErrorContains(t, store.GuaranteedUpdate(ctx, "/pods", updateOut, false, nil, updateFunc, nil), "lacks resource prefix") + require.ErrorContains(t, store.GuaranteedUpdate(ctx, "/pods.apps", updateOut, false, nil, updateFunc, nil), "lacks resource prefix") + require.ErrorContains(t, store.GuaranteedUpdate(ctx, "/foo/", updateOut, false, nil, updateFunc, nil), "lacks resource prefix") + require.NoError(t, store.GuaranteedUpdate(ctx, "/pods/", updateOut, false, nil, updateFunc, nil)) + require.NoError(t, store.GuaranteedUpdate(ctx, "/pods/namespace", updateOut, false, nil, updateFunc, nil)) + require.NoError(t, store.GuaranteedUpdate(ctx, "/pods/namespace/name", updateOut, false, nil, updateFunc, nil)) + + deleteOut := &example.Pod{} + deleteFunc := func(ctx context.Context, obj runtime.Object) error { + return nil + } + deleteOpts := storage.DeleteOptions{} + require.ErrorContains(t, store.Delete(ctx, "", deleteOut, nil, deleteFunc, nil, deleteOpts), "empty key") + require.ErrorContains(t, store.Delete(ctx, "/", deleteOut, nil, deleteFunc, nil, deleteOpts), "empty key") + require.ErrorContains(t, store.Delete(ctx, ".", deleteOut, nil, deleteFunc, nil, deleteOpts), "invalid key") + require.ErrorContains(t, store.Delete(ctx, "..", deleteOut, nil, deleteFunc, nil, deleteOpts), "invalid key") + require.ErrorContains(t, store.Delete(ctx, "pods", deleteOut, nil, deleteFunc, nil, deleteOpts), "lacks resource prefix") + require.ErrorContains(t, store.Delete(ctx, "/pods", deleteOut, nil, deleteFunc, nil, deleteOpts), "lacks resource prefix") + require.ErrorContains(t, store.Delete(ctx, "/pods.apps", deleteOut, nil, deleteFunc, nil, deleteOpts), "lacks resource prefix") + require.ErrorContains(t, store.Delete(ctx, "/foo", deleteOut, nil, deleteFunc, nil, deleteOpts), "lacks resource prefix") + require.NoError(t, store.Delete(ctx, "/pods/", deleteOut, nil, deleteFunc, nil, deleteOpts)) + require.NoError(t, store.Delete(ctx, "/pods/namespace", deleteOut, nil, deleteFunc, nil, deleteOpts)) + require.NoError(t, store.Delete(ctx, "/pods/namespace/name", deleteOut, nil, deleteFunc, nil, deleteOpts)) +} + +func mustParseResourceVersion(t *testing.T, resourceVersion string) int64 { + t.Helper() + versioner := storage.APIObjectVersioner{} + rv, err := versioner.ParseResourceVersion(resourceVersion) + if err != nil { + t.Fatal(err) + } + return int64(rv) +} diff --git a/staging/src/k8s.io/apiserver/pkg/storage/testing/watcher_tests.go b/staging/src/k8s.io/apiserver/pkg/storage/testing/watcher_tests.go index 567e247557164..e57a99d3dd072 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/testing/watcher_tests.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/testing/watcher_tests.go @@ -347,9 +347,6 @@ func RunTestDelayedWatchDelivery(ctx context.Context, t *testing.T, store storag } } - // Now stop the watcher and check if the consecutive events are being delivered. - watcher.Stop() - watched := 0 for { event, ok := <-watcher.ResultChan() @@ -364,11 +361,19 @@ func RunTestDelayedWatchDelivery(ctx context.Context, t *testing.T, store storag t.Errorf("Unexpected object watched: %s, expected %s", a, e) } watched++ + // Before stopping watcher wait for an event to arrive and give them some time to fill the queue. + if watched == 1 { + time.Sleep(time.Second) + // Stop the watcher to check if the consecutive events will be delivered. + watcher.Stop() + } } // We expect at least N events to be delivered, depending on the implementation. // For now, this number is smallest for Cacher and it equals 10 (size of the out buffer). - if watched < 10 { - t.Errorf("Unexpected number of events: %v, expected: %v", watched, totalPods) + outBufferSize := 10 + expectWatched := outBufferSize + 1 // initial event + if watched < expectWatched { + t.Errorf("Unexpected number of events: %v, expected at least: %v", watched, expectWatched) } } @@ -383,7 +388,7 @@ func RunTestWatchError(ctx context.Context, t *testing.T, store InterfaceWithPre Predicate: storage.Everything, Recursive: true, } - if err := store.GetList(ctx, "/pods", storageOpts, list); err != nil { + if err := store.GetList(ctx, "/pods/", storageOpts, list); err != nil { t.Errorf("Unexpected error: %v", err) } @@ -424,7 +429,7 @@ func RunTestWatchWithUnsafeDelete(ctx context.Context, t *testing.T, store Inter Predicate: storage.Everything, Recursive: true, } - if err := store.GetList(ctx, "/pods", storageOpts, list); err != nil { + if err := store.GetList(ctx, "/pods/", storageOpts, list); err != nil { t.Errorf("Unexpected error: %v", err) } @@ -493,7 +498,7 @@ func RunTestWatcherTimeout(ctx context.Context, t *testing.T, store storage.Inte Predicate: storage.Everything, Recursive: true, } - if err := store.GetList(ctx, "/pods", options, &podList); err != nil { + if err := store.GetList(ctx, "/pods/", options, &podList); err != nil { t.Fatalf("Failed to list pods: %v", err) } initialRV := podList.ResourceVersion @@ -734,9 +739,9 @@ func RunTestClusterScopedWatch(ctx context.Context, t *testing.T, store storage. ctx = genericapirequest.WithRequestInfo(ctx, requestInfo) ctx = genericapirequest.WithNamespace(ctx, "") - watchKey := "/pods" + watchKey := "/pods/" if tt.requestedName != "" { - watchKey += "/" + tt.requestedName + watchKey += tt.requestedName } predicate := CreatePodPredicate(tt.fieldSelector, false, tt.indexFields) @@ -747,7 +752,7 @@ func RunTestClusterScopedWatch(ctx context.Context, t *testing.T, store storage. Predicate: predicate, Recursive: true, } - if err := store.GetList(ctx, "/pods", opts, list); err != nil { + if err := store.GetList(ctx, "/pods/", opts, list); err != nil { t.Errorf("Unexpected error: %v", err) } @@ -762,7 +767,7 @@ func RunTestClusterScopedWatch(ctx context.Context, t *testing.T, store storage. currentObjs := map[string]*example.Pod{} for _, watchTest := range tt.watchTests { out := &example.Pod{} - key := "pods/" + watchTest.obj.Name + key := "/pods/" + watchTest.obj.Name err := store.GuaranteedUpdate(ctx, key, out, true, nil, storage.SimpleUpdate( func(runtime.Object) (runtime.Object, error) { obj := watchTest.obj.DeepCopy() @@ -1045,11 +1050,11 @@ func RunTestNamespaceScopedWatch(ctx context.Context, t *testing.T, store storag ctx = genericapirequest.WithRequestInfo(ctx, requestInfo) ctx = genericapirequest.WithNamespace(ctx, tt.requestedNamespace) - watchKey := "/pods" + watchKey := "/pods/" if tt.requestedNamespace != "" { - watchKey += "/" + tt.requestedNamespace + watchKey += tt.requestedNamespace + "/" if tt.requestedName != "" { - watchKey += "/" + tt.requestedName + watchKey += tt.requestedName } } @@ -1061,7 +1066,7 @@ func RunTestNamespaceScopedWatch(ctx context.Context, t *testing.T, store storag Predicate: predicate, Recursive: true, } - if err := store.GetList(ctx, "/pods", opts, list); err != nil { + if err := store.GetList(ctx, "/pods/", opts, list); err != nil { t.Errorf("Unexpected error: %v", err) } @@ -1076,7 +1081,7 @@ func RunTestNamespaceScopedWatch(ctx context.Context, t *testing.T, store storag currentObjs := map[string]*example.Pod{} for _, watchTest := range tt.watchTests { out := &example.Pod{} - key := "pods/" + watchTest.obj.Namespace + "/" + watchTest.obj.Name + key := "/pods/" + watchTest.obj.Namespace + "/" + watchTest.obj.Name err := store.GuaranteedUpdate(ctx, key, out, true, nil, storage.SimpleUpdate( func(runtime.Object) (runtime.Object, error) { obj := watchTest.obj.DeepCopy() @@ -1189,7 +1194,7 @@ func RunTestOptionalWatchBookmarksWithCorrectResourceVersion(ctx context.Context Predicate: storage.Everything, Recursive: true, } - if err := store.GetList(ctx, "/pods", storageOpts, list); err != nil { + if err := store.GetList(ctx, "/pods/", storageOpts, list); err != nil { t.Errorf("Unexpected error: %v", err) } startRV := list.ResourceVersion @@ -1283,7 +1288,7 @@ func RunTestOptionalWatchBookmarksWithCorrectResourceVersion(ctx context.Context func RunSendInitialEventsBackwardCompatibility(ctx context.Context, t *testing.T, store storage.Interface) { opts := storage.ListOptions{Predicate: storage.Everything} opts.SendInitialEvents = ptr.To(true) - w, err := store.Watch(ctx, "/pods", opts) + w, err := store.Watch(ctx, "/pods/", opts) require.NoError(t, err) w.Stop() } @@ -1697,7 +1702,7 @@ func RunWatchListMatchSingle(ctx context.Context, t *testing.T, store storage.In opts.SendInitialEvents = &trueVal opts.Predicate.AllowWatchBookmarks = true - w, err := store.Watch(context.Background(), "/pods", opts) + w, err := store.Watch(context.Background(), "/pods/", opts) require.NoError(t, err, "failed to create watch: %v") defer w.Stop() @@ -1750,7 +1755,7 @@ func RunWatchErrorIsBlockingFurtherEvents(ctx context.Context, t *testing.T, sto wg.Add(1) go func() { defer wg.Done() - w, err := store.Watch(ctx, "/pods", opts) + w, err := store.Watch(ctx, "/pods/", opts) if err != nil { t.Errorf("failed to create watch: %v", err) return diff --git a/staging/src/k8s.io/apiserver/pkg/storage/util.go b/staging/src/k8s.io/apiserver/pkg/storage/util.go index bb231df30380a..3ca9acf3bd235 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/util.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/util.go @@ -18,6 +18,7 @@ package storage import ( "fmt" + "strings" "sync/atomic" "k8s.io/apimachinery/pkg/api/meta" @@ -37,6 +38,9 @@ func SimpleUpdate(fn SimpleUpdateFunc) UpdateFunc { } func NamespaceKeyFunc(prefix string, obj runtime.Object) (string, error) { + if !strings.HasSuffix(prefix, "/") { + return "", fmt.Errorf("prefix should have '/' suffix") + } meta, err := meta.Accessor(obj) if err != nil { return "", err @@ -45,10 +49,13 @@ func NamespaceKeyFunc(prefix string, obj runtime.Object) (string, error) { if msgs := path.IsValidPathSegmentName(name); len(msgs) != 0 { return "", fmt.Errorf("invalid name: %v", msgs) } - return prefix + "/" + meta.GetNamespace() + "/" + name, nil + return prefix + meta.GetNamespace() + "/" + name, nil } func NoNamespaceKeyFunc(prefix string, obj runtime.Object) (string, error) { + if !strings.HasSuffix(prefix, "/") { + return "", fmt.Errorf("prefix should have '/' suffix") + } meta, err := meta.Accessor(obj) if err != nil { return "", err @@ -57,7 +64,7 @@ func NoNamespaceKeyFunc(prefix string, obj runtime.Object) (string, error) { if msgs := path.IsValidPathSegmentName(name); len(msgs) != 0 { return "", fmt.Errorf("invalid name: %v", msgs) } - return prefix + "/" + name, nil + return prefix + name, nil } // HighWaterMark is a thread-safe object for tracking the maximum value seen diff --git a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/envelope.go b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/envelope.go index b12f8a3d2726d..4549257a0340f 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/envelope.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/envelope.go @@ -24,6 +24,7 @@ import ( "crypto/sha256" "fmt" "sort" + "sync" "time" "unsafe" @@ -51,6 +52,29 @@ func init() { metrics.RegisterMetrics() } +// nowFuncPerKMS allows us to swap the NowFunc for KMS providers in tests +// Note: it cannot be set by an end user +var nowFuncPerKMS sync.Map // map[string]func() time.Time, KMS name -> NowFunc + +// SetNowFuncForTests should only be called in tests to swap the NowFunc for KMS providers +// Caller must guarantee that all KMS providers have distinct names across all tests. +func SetNowFuncForTests(kmsName string, fn func() time.Time) func() { + if len(kmsName) == 0 { // guarantee that GetNowFunc("") returns the default value + panic("empty KMS name used in test") + } + nowFuncPerKMS.Store(kmsName, fn) + return func() { nowFuncPerKMS.Delete(kmsName) } +} + +// GetNowFunc returns the time function for the given KMS provider name +func GetNowFunc(kmsName string) func() time.Time { + nowFunc, ok := nowFuncPerKMS.Load(kmsName) + if !ok { + return time.Now + } + return nowFunc.(func() time.Time) +} + const ( // KMSAPIVersionv2 is a version of the KMS API. KMSAPIVersionv2 = "v2" @@ -81,9 +105,6 @@ const ( errKeyIDTooLongCode ErrCodeKeyID = "too_long" ) -// NowFunc is exported so tests can override it. -var NowFunc = time.Now - type StateFunc func() (State, error) type ErrCodeKeyID string @@ -101,10 +122,14 @@ type State struct { // CacheKey is the key used to cache the DEK/seed in envelopeTransformer.cache. CacheKey []byte + + // KMSProviderName is used to dynamically look up the time function for tests + KMSProviderName string } func (s *State) ValidateEncryptCapability() error { - if now := NowFunc(); now.After(s.ExpirationTimestamp) { + nowFunc := GetNowFunc(s.KMSProviderName) + if now := nowFunc(); now.After(s.ExpirationTimestamp) { return fmt.Errorf("encryptedDEKSource with keyID hash %q expired at %s (current time is %s)", GetHashIfNotEmpty(s.EncryptedObjectKeyID), s.ExpirationTimestamp.Format(time.RFC3339), now.Format(time.RFC3339)) } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/grpc_service.go b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/grpc_service.go index 09a2a76df50e3..78cc02e57a6c6 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/grpc_service.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/grpc_service.go @@ -145,9 +145,10 @@ func (g *gRPCService) Status(ctx context.Context) (*kmsservice.StatusResponse, e func recordMetricsInterceptor(providerName string) grpc.UnaryClientInterceptor { return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { - start := NowFunc() + nowFunc := GetNowFunc(providerName) + start := nowFunc() respErr := invoker(ctx, method, req, reply, cc, opts...) - elapsed := NowFunc().Sub(start) + elapsed := nowFunc().Sub(start) metrics.RecordKMSOperationLatency(providerName, method, elapsed, respErr) return respErr } diff --git a/staging/src/k8s.io/apiserver/pkg/util/webhook/webhook.go b/staging/src/k8s.io/apiserver/pkg/util/webhook/webhook.go index b03640ae8df18..8552e91eb5333 100644 --- a/staging/src/k8s.io/apiserver/pkg/util/webhook/webhook.go +++ b/staging/src/k8s.io/apiserver/pkg/util/webhook/webhook.go @@ -83,6 +83,7 @@ func NewGenericWebhook(scheme *runtime.Scheme, codecFactory serializer.CodecFact clientConfig := rest.CopyConfig(config) codec := codecFactory.LegacyCodec(groupVersions...) + clientConfig.ContentType = runtime.ContentTypeJSON clientConfig.ContentConfig.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: codec}) clientConfig.Wrap(x509metrics.NewDeprecatedCertificateRoundTripperWrapperConstructor( diff --git a/staging/src/k8s.io/apiserver/pkg/util/webhook/webhook_test.go b/staging/src/k8s.io/apiserver/pkg/util/webhook/webhook_test.go index 068c6821e5049..cfa09aa7045c2 100644 --- a/staging/src/k8s.io/apiserver/pkg/util/webhook/webhook_test.go +++ b/staging/src/k8s.io/apiserver/pkg/util/webhook/webhook_test.go @@ -23,6 +23,7 @@ import ( "encoding/json" "errors" "fmt" + "io" "net" "net/http" "net/http/httptest" @@ -33,11 +34,15 @@ import ( "strings" "testing" "time" + "unicode/utf8" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/util/wait" + exampleinstall "k8s.io/apiserver/pkg/apis/example/install" + examplev1 "k8s.io/apiserver/pkg/apis/example/v1" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" v1 "k8s.io/client-go/tools/clientcmd/api/v1" @@ -867,7 +872,7 @@ func TestWithExponentialBackoffParametersNotSet(t *testing.T) { err := WithExponentialBackoff(context.TODO(), wait.Backoff{}, webhookFunc, alwaysRetry) - errExpected := fmt.Errorf("webhook call failed: %s", wait.ErrWaitTimeout) + errExpected := fmt.Errorf("webhook call failed: %s", wait.ErrorInterrupted(nil).Error()) if errExpected.Error() != err.Error() { t.Errorf("expected error: %v, but got: %v", errExpected, err) } @@ -927,3 +932,57 @@ func getSingleCounterValueFromRegistry(t *testing.T, r metrics.Gatherer, name st return -1 } + +func TestRESTConfigContentType(t *testing.T) { + server, err := newTestServer(clientCert, clientKey, caCert, func(w http.ResponseWriter, r *http.Request) { + if got := r.Header.Get("Content-Type"); got != runtime.ContentTypeJSON { + t.Errorf("expected request content-type: want %q got %q", runtime.ContentTypeJSON, got) + } + body, err := io.ReadAll(r.Body) + if err != nil { + t.Errorf("failed to read request body: %v", err) + return + } + if err := json.Unmarshal(body, new(any)); err != nil { + switch { + case len(body) == 0: + t.Log("empty request body") + case utf8.Valid(body): + t.Logf("request body: %s", string(body)) + default: + t.Logf("request body: 0x%x", body) + } + t.Errorf("failed to unmarshal request body as json: %v", err) + } + }) + if err != nil { + t.Errorf("failed to create server: %v", err) + return + } + defer server.Close() + + config := &rest.Config{ + ContentConfig: rest.ContentConfig{ + ContentType: "foo/bar", + }, + Host: server.URL, + TLSClientConfig: rest.TLSClientConfig{ + CAData: caCert, + CertData: clientCert, + KeyData: clientKey, + }, + } + + scheme := runtime.NewScheme() + exampleinstall.Install(scheme) + codecs := serializer.NewCodecFactory(scheme) + groupVersions := []schema.GroupVersion{examplev1.SchemeGroupVersion} + wh, err := NewGenericWebhook(scheme, codecs, config, groupVersions, retryBackoff) + if err != nil { + t.Fatalf("failed to create the webhook: %v", err) + } + + if err := wh.RestClient.Post().Body(&examplev1.Pod{}).Do(context.TODO()).Error(); err != nil { + t.Fatalf("failed to complete request: %v", err) + } +} diff --git a/staging/src/k8s.io/apiserver/pkg/validation/metrics.go b/staging/src/k8s.io/apiserver/pkg/validation/metrics.go index 256c23c4b1ead..4d06bc96d6776 100644 --- a/staging/src/k8s.io/apiserver/pkg/validation/metrics.go +++ b/staging/src/k8s.io/apiserver/pkg/validation/metrics.go @@ -28,8 +28,9 @@ const ( // ValidationMetrics is the interface for validation metrics. type ValidationMetrics interface { - IncDeclarativeValidationMismatchMetric() - IncDeclarativeValidationPanicMetric() + IncDeclarativeValidationMismatchMetric(validationIdentifier string) + IncDeclarativeValidationPanicMetric(validationIdentifier string) + IncDuplicateValidationErrorMetric() Reset() } @@ -43,6 +44,16 @@ var validationMetricsInstance = &validationMetrics{ StabilityLevel: metrics.BETA, }, ), + DeclarativeValidationMismatchCounterVector: metrics.NewCounterVec( + &metrics.CounterOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "declarative_validation_parity_discrepancies_total", + Help: "Number of discrepancies between declarative and handwritten validation, broken down by validation identifier.", + StabilityLevel: metrics.ALPHA, + }, + []string{"validation_identifier"}, + ), DeclarativeValidationPanicCounter: metrics.NewCounter( &metrics.CounterOpts{ Namespace: namespace, @@ -52,6 +63,25 @@ var validationMetricsInstance = &validationMetrics{ StabilityLevel: metrics.BETA, }, ), + DeclarativeValidationPanicCounterVector: metrics.NewCounterVec( + &metrics.CounterOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "declarative_validation_panics_total", + Help: "Number of panics in declarative validation, broken down by validation identifier.", + StabilityLevel: metrics.ALPHA, + }, + []string{"validation_identifier"}, + ), + DuplicateValidationErrorCounter: metrics.NewCounter( + &metrics.CounterOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "duplicate_validation_error_total", + Help: "Number of duplicate validation errors during validation.", + StabilityLevel: metrics.INTERNAL, + }, + ), } // Metrics provides access to validation metrics. @@ -59,28 +89,44 @@ var Metrics ValidationMetrics = validationMetricsInstance func init() { legacyregistry.MustRegister(validationMetricsInstance.DeclarativeValidationMismatchCounter) + legacyregistry.MustRegister(validationMetricsInstance.DeclarativeValidationMismatchCounterVector) legacyregistry.MustRegister(validationMetricsInstance.DeclarativeValidationPanicCounter) + legacyregistry.MustRegister(validationMetricsInstance.DeclarativeValidationPanicCounterVector) + legacyregistry.MustRegister(validationMetricsInstance.DuplicateValidationErrorCounter) } type validationMetrics struct { - DeclarativeValidationMismatchCounter *metrics.Counter - DeclarativeValidationPanicCounter *metrics.Counter + DeclarativeValidationMismatchCounter *metrics.Counter + DeclarativeValidationMismatchCounterVector *metrics.CounterVec + DeclarativeValidationPanicCounter *metrics.Counter + DeclarativeValidationPanicCounterVector *metrics.CounterVec + DuplicateValidationErrorCounter *metrics.Counter } // Reset resets the validation metrics. func (m *validationMetrics) Reset() { m.DeclarativeValidationMismatchCounter.Reset() + m.DeclarativeValidationMismatchCounterVector.Reset() m.DeclarativeValidationPanicCounter.Reset() + m.DeclarativeValidationPanicCounterVector.Reset() + m.DuplicateValidationErrorCounter.Reset() } // IncDeclarativeValidationMismatchMetric increments the counter for the declarative_validation_mismatch_total metric. -func (m *validationMetrics) IncDeclarativeValidationMismatchMetric() { +func (m *validationMetrics) IncDeclarativeValidationMismatchMetric(validationIdentifier string) { m.DeclarativeValidationMismatchCounter.Inc() + m.DeclarativeValidationMismatchCounterVector.WithLabelValues(validationIdentifier).Inc() } // IncDeclarativeValidationPanicMetric increments the counter for the declarative_validation_panic_total metric. -func (m *validationMetrics) IncDeclarativeValidationPanicMetric() { +func (m *validationMetrics) IncDeclarativeValidationPanicMetric(validationIdentifier string) { m.DeclarativeValidationPanicCounter.Inc() + m.DeclarativeValidationPanicCounterVector.WithLabelValues(validationIdentifier).Inc() +} + +// IncDuplicateValidationErrorMetric increments the counter for the duplicate_validation_error_total metric. +func (m *validationMetrics) IncDuplicateValidationErrorMetric() { + m.DuplicateValidationErrorCounter.Inc() } func ResetValidationMetricsInstance() { diff --git a/staging/src/k8s.io/apiserver/pkg/validation/metrics_test.go b/staging/src/k8s.io/apiserver/pkg/validation/metrics_test.go index e93118a00b74a..016a6956eeae5 100644 --- a/staging/src/k8s.io/apiserver/pkg/validation/metrics_test.go +++ b/staging/src/k8s.io/apiserver/pkg/validation/metrics_test.go @@ -24,21 +24,28 @@ import ( "k8s.io/component-base/metrics/testutil" ) +const testIdentifier = "test_validation_identifier" +const anotherTestIdentifier = "another_test_validation_identifier" + // TestDeclarativeValidationMismatchMetric tests that the mismatch metric correctly increments once func TestDeclarativeValidationMismatchMetric(t *testing.T) { defer legacyregistry.Reset() defer ResetValidationMetricsInstance() // Increment the metric once - Metrics.IncDeclarativeValidationMismatchMetric() + Metrics.IncDeclarativeValidationMismatchMetric(testIdentifier) expected := ` + # HELP apiserver_validation_declarative_validation_parity_discrepancies_total [ALPHA] Number of discrepancies between declarative and handwritten validation, broken down by validation identifier. + # TYPE apiserver_validation_declarative_validation_parity_discrepancies_total counter + apiserver_validation_declarative_validation_parity_discrepancies_total{validation_identifier="test_validation_identifier"} 1 # HELP apiserver_validation_declarative_validation_mismatch_total [BETA] Number of times declarative validation results differed from handwritten validation results for core types. # TYPE apiserver_validation_declarative_validation_mismatch_total counter apiserver_validation_declarative_validation_mismatch_total 1 + ` - if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(expected), "declarative_validation_mismatch_total"); err != nil { + if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(expected), "apiserver_validation_declarative_validation_parity_discrepancies_total", "apiserver_validation_declarative_validation_mismatch_total"); err != nil { t.Fatal(err) } } @@ -49,15 +56,38 @@ func TestDeclarativeValidationPanicMetric(t *testing.T) { defer ResetValidationMetricsInstance() // Increment the metric once - Metrics.IncDeclarativeValidationPanicMetric() + Metrics.IncDeclarativeValidationPanicMetric(testIdentifier) expected := ` + # HELP apiserver_validation_declarative_validation_panics_total [ALPHA] Number of panics in declarative validation, broken down by validation identifier. + # TYPE apiserver_validation_declarative_validation_panics_total counter + apiserver_validation_declarative_validation_panics_total{validation_identifier="test_validation_identifier"} 1 # HELP apiserver_validation_declarative_validation_panic_total [BETA] Number of times declarative validation has panicked during validation. # TYPE apiserver_validation_declarative_validation_panic_total counter apiserver_validation_declarative_validation_panic_total 1 ` - if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(expected), "declarative_validation_panic_total"); err != nil { + if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(expected), + "apiserver_validation_declarative_validation_panic_total", "apiserver_validation_declarative_validation_panics_total"); err != nil { + t.Fatal(err) + } +} + +// TestDuplicateValidationErrorMetric tests that the duplicate error metric correctly increments once +func TestDuplicateValidationErrorMetric(t *testing.T) { + defer legacyregistry.Reset() + defer ResetValidationMetricsInstance() + + // Increment the metric once + Metrics.IncDuplicateValidationErrorMetric() + + expected := ` + # HELP apiserver_validation_duplicate_validation_error_total [INTERNAL] Number of duplicate validation errors during validation. + # TYPE apiserver_validation_duplicate_validation_error_total counter + apiserver_validation_duplicate_validation_error_total 1 + ` + + if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(expected), "apiserver_validation_duplicate_validation_error_total"); err != nil { t.Fatal(err) } } @@ -68,17 +98,21 @@ func TestDeclarativeValidationMismatchMetricMultiple(t *testing.T) { defer ResetValidationMetricsInstance() // Increment the metric three times - Metrics.IncDeclarativeValidationMismatchMetric() - Metrics.IncDeclarativeValidationMismatchMetric() - Metrics.IncDeclarativeValidationMismatchMetric() + Metrics.IncDeclarativeValidationMismatchMetric(testIdentifier) + Metrics.IncDeclarativeValidationMismatchMetric(testIdentifier) + Metrics.IncDeclarativeValidationMismatchMetric(anotherTestIdentifier) expected := ` + # HELP apiserver_validation_declarative_validation_parity_discrepancies_total [ALPHA] Number of discrepancies between declarative and handwritten validation, broken down by validation identifier. + # TYPE apiserver_validation_declarative_validation_parity_discrepancies_total counter + apiserver_validation_declarative_validation_parity_discrepancies_total{validation_identifier="test_validation_identifier"} 2 + apiserver_validation_declarative_validation_parity_discrepancies_total{validation_identifier="another_test_validation_identifier"} 1 # HELP apiserver_validation_declarative_validation_mismatch_total [BETA] Number of times declarative validation results differed from handwritten validation results for core types. # TYPE apiserver_validation_declarative_validation_mismatch_total counter apiserver_validation_declarative_validation_mismatch_total 3 ` - if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(expected), "declarative_validation_mismatch_total"); err != nil { + if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(expected), "apiserver_validation_declarative_validation_parity_discrepancies_total", "apiserver_validation_declarative_validation_mismatch_total"); err != nil { t.Fatal(err) } } @@ -89,17 +123,42 @@ func TestDeclarativeValidationPanicMetricMultiple(t *testing.T) { defer ResetValidationMetricsInstance() // Increment the metric three times - Metrics.IncDeclarativeValidationPanicMetric() - Metrics.IncDeclarativeValidationPanicMetric() - Metrics.IncDeclarativeValidationPanicMetric() + Metrics.IncDeclarativeValidationPanicMetric(testIdentifier) + Metrics.IncDeclarativeValidationPanicMetric(testIdentifier) + Metrics.IncDeclarativeValidationPanicMetric(anotherTestIdentifier) expected := ` + # HELP apiserver_validation_declarative_validation_panics_total [ALPHA] Number of panics in declarative validation, broken down by validation identifier. + # TYPE apiserver_validation_declarative_validation_panics_total counter + apiserver_validation_declarative_validation_panics_total{validation_identifier="test_validation_identifier"} 2 + apiserver_validation_declarative_validation_panics_total{validation_identifier="another_test_validation_identifier"} 1 # HELP apiserver_validation_declarative_validation_panic_total [BETA] Number of times declarative validation has panicked during validation. # TYPE apiserver_validation_declarative_validation_panic_total counter apiserver_validation_declarative_validation_panic_total 3 ` - if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(expected), "declarative_validation_panic_total"); err != nil { + if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(expected), "apiserver_validation_declarative_validation_panic_total", "apiserver_validation_declarative_validation_panics_total"); err != nil { + t.Fatal(err) + } +} + +// TestDuplicateValidationErrorMetricMultiple tests that the duplicate error metric correctly increments multiple times +func TestDuplicateValidationErrorMetricMultiple(t *testing.T) { + defer legacyregistry.Reset() + defer ResetValidationMetricsInstance() + + // Increment the metric three times + Metrics.IncDuplicateValidationErrorMetric() + Metrics.IncDuplicateValidationErrorMetric() + Metrics.IncDuplicateValidationErrorMetric() + + expected := ` + # HELP apiserver_validation_duplicate_validation_error_total [INTERNAL] Number of duplicate validation errors during validation. + # TYPE apiserver_validation_duplicate_validation_error_total counter + apiserver_validation_duplicate_validation_error_total 3 + ` + + if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(expected), "apiserver_validation_duplicate_validation_error_total"); err != nil { t.Fatal(err) } } @@ -110,8 +169,9 @@ func TestDeclarativeValidationMetricsReset(t *testing.T) { defer ResetValidationMetricsInstance() // Increment both metrics - Metrics.IncDeclarativeValidationMismatchMetric() - Metrics.IncDeclarativeValidationPanicMetric() + Metrics.IncDeclarativeValidationMismatchMetric(testIdentifier) + Metrics.IncDeclarativeValidationPanicMetric(testIdentifier) + Metrics.IncDuplicateValidationErrorMetric() // Reset the metrics Metrics.Reset() @@ -124,15 +184,22 @@ func TestDeclarativeValidationMetricsReset(t *testing.T) { # HELP apiserver_validation_declarative_validation_panic_total [BETA] Number of times declarative validation has panicked during validation. # TYPE apiserver_validation_declarative_validation_panic_total counter apiserver_validation_declarative_validation_panic_total 0 + # HELP apiserver_validation_duplicate_validation_error_total [INTERNAL] Number of duplicate validation errors during validation. + # TYPE apiserver_validation_duplicate_validation_error_total counter + apiserver_validation_duplicate_validation_error_total 0 ` - if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(expected), "declarative_validation_mismatch_total", "declarative_validation_panic_total"); err != nil { + if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(expected), + "apiserver_validation_declarative_validation_mismatch_total", + "apiserver_validation_declarative_validation_panic_total", + "apiserver_validation_duplicate_validation_error_total"); err != nil { t.Fatal(err) } // Increment the metrics again to ensure they're still functional - Metrics.IncDeclarativeValidationMismatchMetric() - Metrics.IncDeclarativeValidationPanicMetric() + Metrics.IncDeclarativeValidationMismatchMetric(testIdentifier) + Metrics.IncDeclarativeValidationPanicMetric(testIdentifier) + Metrics.IncDuplicateValidationErrorMetric() // Verify they've been incremented correctly expected = ` @@ -142,9 +209,23 @@ func TestDeclarativeValidationMetricsReset(t *testing.T) { # HELP apiserver_validation_declarative_validation_panic_total [BETA] Number of times declarative validation has panicked during validation. # TYPE apiserver_validation_declarative_validation_panic_total counter apiserver_validation_declarative_validation_panic_total 1 + # HELP apiserver_validation_duplicate_validation_error_total [INTERNAL] Number of duplicate validation errors during validation. + # TYPE apiserver_validation_duplicate_validation_error_total counter + apiserver_validation_duplicate_validation_error_total 1 + # HELP apiserver_validation_declarative_validation_parity_discrepancies_total [ALPHA] Number of discrepancies between declarative and handwritten validation, broken down by validation identifier. + # TYPE apiserver_validation_declarative_validation_parity_discrepancies_total counter + apiserver_validation_declarative_validation_parity_discrepancies_total{validation_identifier="test_validation_identifier"} 1 + # HELP apiserver_validation_declarative_validation_panics_total [ALPHA] Number of panics in declarative validation, broken down by validation identifier. + # TYPE apiserver_validation_declarative_validation_panics_total counter + apiserver_validation_declarative_validation_panics_total{validation_identifier="test_validation_identifier"} 1 ` - if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(expected), "declarative_validation_mismatch_total", "declarative_validation_panic_total"); err != nil { + if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(expected), + "apiserver_validation_declarative_validation_mismatch_total", + "apiserver_validation_declarative_validation_parity_discrepancies_total", + "apiserver_validation_declarative_validation_panic_total", + "apiserver_validation_declarative_validation_panics_total", + "apiserver_validation_duplicate_validation_error_total"); err != nil { t.Fatal(err) } } diff --git a/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/metrics_test.go b/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/metrics_test.go index 9fa48014dc291..b8f7e72315ecc 100644 --- a/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/metrics_test.go +++ b/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/metrics_test.go @@ -107,9 +107,16 @@ func TestAuthorizerMetrics(t *testing.T) { if service.statusCode == 0 { service.statusCode = 200 } - service.reviewHook = func(*authorizationv1.SubjectAccessReview) { - if scenario.canceledRequest { + + testFinishedCtx, testFinishedCancel := context.WithCancel(context.Background()) + defer testFinishedCancel() + if scenario.canceledRequest { + service.reviewHook = func(*authorizationv1.SubjectAccessReview) { cancel() + // net/http transport still attempts to use a response if it's + // available right when it's handling context cancellation, + // we need to delay the response. + <-testFinishedCtx.Done() } } service.allow = !scenario.authFakeServiceDeny @@ -120,6 +127,9 @@ func TestAuthorizerMetrics(t *testing.T) { return } defer server.Close() + // testFinishedCtx must be cancelled before we close the server, otherwise + // closing the server hangs on an active connection from the listener. + defer testFinishedCancel() fakeAuthzMetrics := &fakeAuthorizerMetrics{} wh, err := newV1Authorizer(server.URL, scenario.clientCert, scenario.clientKey, scenario.clientCA, 0, fakeAuthzMetrics, cel.NewDefaultCompiler(), []apiserver.WebhookMatchCondition{}, "") diff --git a/staging/src/k8s.io/cli-runtime/go.mod b/staging/src/k8s.io/cli-runtime/go.mod index 32ce99f214bb1..5c206ac55594c 100644 --- a/staging/src/k8s.io/cli-runtime/go.mod +++ b/staging/src/k8s.io/cli-runtime/go.mod @@ -2,9 +2,9 @@ module k8s.io/cli-runtime -go 1.24.0 +go 1.25.0 -godebug default=go1.24 +godebug default=go1.25 require ( github.com/google/gnostic-models v0.7.0 @@ -12,18 +12,18 @@ require ( github.com/google/uuid v1.6.0 github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de github.com/moby/term v0.5.0 - github.com/spf13/cobra v1.9.1 - github.com/spf13/pflag v1.0.6 - github.com/stretchr/testify v1.10.0 + github.com/spf13/cobra v1.10.0 + github.com/spf13/pflag v1.0.9 + github.com/stretchr/testify v1.11.1 go.yaml.in/yaml/v2 v2.4.2 - golang.org/x/sync v0.12.0 - golang.org/x/text v0.23.0 - gopkg.in/evanphx/json-patch.v4 v4.12.0 + golang.org/x/sync v0.16.0 + golang.org/x/text v0.28.0 + gopkg.in/evanphx/json-patch.v4 v4.13.0 k8s.io/api v0.0.0 k8s.io/apimachinery v0.0.0 k8s.io/client-go v0.0.0 k8s.io/klog/v2 v2.130.1 - k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b + k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 sigs.k8s.io/kustomize/api v0.20.1 sigs.k8s.io/kustomize/kyaml v0.20.1 @@ -37,11 +37,10 @@ require ( github.com/emicklei/go-restful/v3 v3.12.2 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/go-errors/errors v1.4.2 // indirect - github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/logr v1.4.3 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.23.0 // indirect - github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.3 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -53,20 +52,19 @@ require ( github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xlab/treeprint v1.2.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/net v0.38.0 // indirect - golang.org/x/oauth2 v0.27.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/term v0.30.0 // indirect + golang.org/x/net v0.43.0 // indirect + golang.org/x/oauth2 v0.30.0 // indirect + golang.org/x/sys v0.35.0 // indirect + golang.org/x/term v0.34.0 // indirect golang.org/x/time v0.9.0 // indirect - google.golang.org/protobuf v1.36.5 // indirect + google.golang.org/protobuf v1.36.8 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect ) diff --git a/staging/src/k8s.io/cli-runtime/go.sum b/staging/src/k8s.io/cli-runtime/go.sum index 8008204307b0a..e7b9efbc21774 100644 --- a/staging/src/k8s.io/cli-runtime/go.sum +++ b/staging/src/k8s.io/cli-runtime/go.sum @@ -18,8 +18,8 @@ github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sa github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= @@ -30,8 +30,6 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= @@ -53,8 +51,6 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -86,7 +82,6 @@ github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -95,10 +90,11 @@ github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWN github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= -github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= -github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/cobra v1.10.0 h1:a5/WeUlSDCvV5a45ljW2ZFtV0bTDpkfSAj3uqB6Sc+0= +github.com/spf13/cobra v1.10.0/go.mod h1:9dhySC7dnTtEiqzmqfkLj47BslqLCUPMXjG2lj/NgoE= +github.com/spf13/pflag v1.0.8/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -109,71 +105,47 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= -golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M= -golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= +golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= +golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= +golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= -golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= +golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= +golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools/go/expect v0.1.0-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= -gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -182,12 +154,12 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/kustomize/api v0.20.1 h1:iWP1Ydh3/lmldBnH/S5RXgT98vWYMaTUL1ADcr+Sv7I= sigs.k8s.io/kustomize/api v0.20.1/go.mod h1:t6hUFxO+Ph0VxIk1sKp1WS0dOjbPCtLJ4p8aADLwqjM= sigs.k8s.io/kustomize/kyaml v0.20.1 h1:PCMnA2mrVbRP3NIB6v9kYCAc38uvFLVs8j/CD567A78= diff --git a/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/config_flags.go b/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/config_flags.go index 8dba84e34206f..b1fa9f9cf8208 100644 --- a/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/config_flags.go +++ b/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/config_flags.go @@ -170,12 +170,15 @@ func (f *ConfigFlags) toRawKubeConfigLoader() clientcmd.ClientConfig { // bind auth info flag values to overrides if f.CertFile != nil { overrides.AuthInfo.ClientCertificate = *f.CertFile + overrides.AuthInfo.ClientCertificateData = nil } if f.KeyFile != nil { overrides.AuthInfo.ClientKey = *f.KeyFile + overrides.AuthInfo.ClientKeyData = nil } if f.BearerToken != nil { overrides.AuthInfo.Token = *f.BearerToken + overrides.AuthInfo.TokenFile = "" } if f.Impersonate != nil { overrides.AuthInfo.Impersonate = *f.Impersonate diff --git a/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/json_yaml_flags.go b/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/json_yaml_flags.go index a2eeb1e2c6c78..9828450967d07 100644 --- a/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/json_yaml_flags.go +++ b/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/json_yaml_flags.go @@ -33,7 +33,7 @@ func (f *JSONYamlPrintFlags) AllowedFormats() []string { } formats := []string{"json", "yaml"} // We can't use the cmdutil pkg directly because of import cycle. - if strings.ToLower(os.Getenv("KUBECTL_KYAML")) == "true" { + if strings.ToLower(os.Getenv("KUBECTL_KYAML")) != "false" { formats = append(formats, "kyaml") } return formats diff --git a/staging/src/k8s.io/cli-runtime/pkg/resource/builder.go b/staging/src/k8s.io/cli-runtime/pkg/resource/builder.go index 00bd3701a0e87..37e830852c9a2 100644 --- a/staging/src/k8s.io/cli-runtime/pkg/resource/builder.go +++ b/staging/src/k8s.io/cli-runtime/pkg/resource/builder.go @@ -129,6 +129,10 @@ Example resource specifications include: var StdinMultiUseError = errors.New("standard input cannot be used for multiple arguments") +// ErrMultipleResourceTypes is returned when Builder.SingleResourceType() was called, +// but multiple resource types were specified. +var ErrMultipleResourceTypes = errors.New("you may only specify a single resource type") + // TODO: expand this to include other errors. func IsUsageError(err error) bool { if err == nil { @@ -813,7 +817,7 @@ func (b *Builder) mappingFor(resourceOrKindArg string) (*meta.RESTMapping, error func (b *Builder) resourceMappings() ([]*meta.RESTMapping, error) { if len(b.resources) > 1 && b.singleResourceType { - return nil, fmt.Errorf("you may only specify a single resource type") + return nil, ErrMultipleResourceTypes } mappings := []*meta.RESTMapping{} seen := map[schema.GroupVersionKind]bool{} @@ -849,7 +853,7 @@ func (b *Builder) resourceTupleMappings() (map[string]*meta.RESTMapping, error) canonical[mapping.Resource] = struct{}{} } if len(canonical) > 1 && b.singleResourceType { - return nil, fmt.Errorf("you may only specify a single resource type") + return nil, ErrMultipleResourceTypes } return mappings, nil } diff --git a/staging/src/k8s.io/cli-runtime/pkg/resource/builder_test.go b/staging/src/k8s.io/cli-runtime/pkg/resource/builder_test.go index 41149b43feb2e..e556e462da590 100644 --- a/staging/src/k8s.io/cli-runtime/pkg/resource/builder_test.go +++ b/staging/src/k8s.io/cli-runtime/pkg/resource/builder_test.go @@ -1367,8 +1367,8 @@ func TestSingleResourceType(t *testing.T) { SingleResourceType(). ResourceTypeOrNameArgs(true, "pods,services") - if b.Do().Err() == nil { - t.Errorf("unexpected non-error") + if err := b.Do().Err(); !errors.Is(err, ErrMultipleResourceTypes) { + t.Errorf("unexpected error: %s", err) } } diff --git a/staging/src/k8s.io/client-go/ARCHITECTURE.md b/staging/src/k8s.io/client-go/ARCHITECTURE.md new file mode 100644 index 0000000000000..20759b2661923 --- /dev/null +++ b/staging/src/k8s.io/client-go/ARCHITECTURE.md @@ -0,0 +1,162 @@ +# `client-go` Architecture + +This document explains the internal architecture of `client-go` for contributors. It describes the +major components, how they interact, and the key design decisions that shape the library. + +## Client Configuration + +There is an architectural separation between loading client configuration and using it. The +`rest.Config` object is the in-memory representation of this configuration. The +`tools/clientcmd` package is the standard factory for producing it. `clientcmd` handles the +complex logic of parsing `kubeconfig` files, merging contexts, and handling external +authentication providers (e.g., OIDC). + +## REST Client + +The `rest.Client` is the foundational HTTP client that underpins all other clients. It separates +the low-level concerns of HTTP transport, serialization, and error handling from higher-level, +Kubernetes-specific object logic. + +The `rest.Config` object is used to build the underlying HTTP transport, which is typically a +chain of `http.RoundTripper` objects. Each element in the chain is responsible for a specific +task, such as adding an `Authorization` header. This is the mechanism by which all authentication +is injected into requests. + +The client uses a builder pattern for requests (e.g., `.Verb()`, `.Resource()`), deferring +response processing until a method like `.Into(&pod)` is called. This separation is key to +supporting different client models from a common base. + +### Endpoint Interactions + +* **Content Negotiation:** The client uses HTTP `Accept` headers to negotiate the wire format + (JSON or Protobuf). A key performance optimization using this mechanism is the ability to + request metadata-only objects via the `as=PartialObjectMetadata;g=meta.k8s.io;v=v1` Accept custom parameter. + Also the `as=Table;g=meta.k8s.io;v=v1` Accept custom parameters may be used to request lists as tables. +* **Subresources:** The client can target standard subresources like `/status` or `/scale` for + object mutations, and it can also handle action-oriented subresources like `/logs` or + `/exec`, which often involve streaming data. +* **List Pagination:** For `LIST` requests, the client can specify a `limit`. The server will + return up to that many items and, if more exist, a `continue` token. The client is + responsible for passing this token in a subsequent request to retrieve the next page. + Higher-level tools like the `Reflector`'s `ListerWatcher` handle this logic automatically. +* **Streaming Watches:** A `WATCH` request returns a `watch.Interface` (from + `k8s.io/apimachinery/pkg/watch`), which provides a channel of structured `watch.Event` + objects (`ADDED`, `MODIFIED`, `DELETED`, `BOOKMARK`). This decouples the watch consumer from + the underlying streaming protocol. + +### Errors, Warnings, and Rate Limiting + +* **Structured Errors:** The client deserializes non-2xx responses into a structured + `errors.StatusError`, enabling programmatic error handling (e.g., `errors.IsNotFound(err)`). +* **Warnings:** It processes non-fatal `Warning` headers from the API server via a + `WarningHandler`. +* **Client-Side Rate Limiting:** The `QPS` and `Burst` settings in `rest.Config` are the + client's half of the contract with the server's API Priority and Fairness system. +* **Server-Side Throttling:** The client's default transport automatically handles HTTP `429` + responses by reading the `Retry-After` header, waiting, and retrying the request. + +## Typed and Dynamic Clients + +To handle the extensible nature of the Kubernetes API, `client-go` provides two primary client +models. + +The **`kubernetes.Clientset`** provides compile-time, type-safe access to core, built-in APIs. + +The **`dynamic.DynamicClient`** represents all objects as `unstructured.Unstructured`, allowing it +to interact with any API resource, including CRDs. It relies on two discovery mechanisms: +1. The **`discovery.DiscoveryClient`** determines *what* resources exist. The + **`CachedDiscoveryClient`** is an optimization that caches this data on disk to solve. +2. The **OpenAPI schema** (fetched from `/openapi/v3`) describes the *structure* of those + resources, providing the schema awareness needed by the dynamic client. + +## Code Generation + +A core architectural principle of `client-go` is the use of code generation to provide a +strongly-typed, compile-time-safe interface for specific API GroupVersions. This makes +controller code more robust and easier to maintain. The tools in `k8s.io/code-generator` produce +several key components: + +* **Typed Clientsets:** The primary interface for interacting with a specific GroupVersion. +* **Typed Listers:** The read-only, cached accessors used by controllers. +* **Typed Informers:** The machinery for populating the cache for a specific type. +* **Apply Configurations:** The type-safe builders for Server-Side Apply. + +A contributor modifying a built-in API type **must** run the code generation scripts to update all +of these dependent components. For the Kubernetes project, `hack/update-codegen.sh` runs code generation. + +`sample-controller` shows how code generate can be configured to build custom controllers. + +## Controller Infrastructure + +The `tools/cache` package provides the core infrastructure for controllers, replacing a high-load, +request-based pattern with a low-load, event-driven, cached model. + +The data flow is as follows: + +```mermaid +graph TD + subgraph "Kubernetes API" + API_Server[API Server] + end + + subgraph "client-go: Informer Mechanism" + Reflector("1. Reflector") + DeltaFIFO("2. DeltaFIFO") + Indexer["3. Indexer (Cache)"] + EventHandlers("4. Event Handlers") + end + + subgraph "User Code" + WorkQueue["5. Work Queue"] + Controller("6. Controller") + end + + API_Server -- LIST/WATCH --> Reflector + Reflector -- Puts changes into --> DeltaFIFO + DeltaFIFO -- Is popped by internal loop, which updates --> Indexer + Indexer -- Update triggers --> EventHandlers + EventHandlers -- Adds key to --> WorkQueue + WorkQueue -- Is processed by --> Controller + Controller -- Reads from cache via Lister --> Indexer +``` + +A **`Reflector`** performs a `LIST` to get a consistent snapshot of a resource, identified by a +`resourceVersion`. It then starts a `WATCH` from that `resourceVersion` to receive a continuous +stream of subsequent changes. The `Reflector`'s relist/rewatch loop is designed to solve the +**"too old" `resourceVersion` error** by re-listing. To make this recovery more efficient, the +`Reflector` consumes **watch bookmarks** from the server, which provide a more recent +`resourceVersion` to restart from. + +The **`Lister`** is the primary, read-only, thread-safe interface for a controller's business +logic to access the `Indexer`'s cache. + +## Controller Patterns + +The controller infrastructure is architecturally decoupled from the controller's business logic to +ensure resiliency. + +The **`util/workqueue`** creates a critical boundary between event detection (the informer's job) +and reconciliation (the controller's job). Informer event handlers only add an object's key to the +work queue. This allows the controller to retry failed operations with exponential backoff without +blocking the informer's watch stream. + +For high availability, the **`tools/leaderelection`** package provides the standard architectural +solution to ensure single-writer semantics by having replicas compete to acquire a lock on a +shared `Lease` object. + +## Server-Side Apply + +`client-go` provides a distinct architectural pattern for object mutation that aligns with the +server's declarative model. This is a separate workflow from the traditional `get-modify-update` +model that allows multiple controllers to safely co-manage the same object. The +**`applyconfigurations`** package provides the generated, type-safe builder API used to +construct the declarative patch. + +## Versioning and Compatibility + +`client-go` has a strict versioning relationship with the main Kubernetes repository. A `client-go` +version `v0.X.Y` corresponds to the Kubernetes version `v1.X.Y`. + +The Kubernetes API has strong backward compatibility guarantees: a client built with an older +version of `client-go` will work with a newer API server. However, the reverse is not guaranteed. +A contributor must not break compatibility with supported versions of the Kubernetes API server. diff --git a/staging/src/k8s.io/client-go/OWNERS b/staging/src/k8s.io/client-go/OWNERS index 1e07f885438a5..b0ddb05929373 100644 --- a/staging/src/k8s.io/client-go/OWNERS +++ b/staging/src/k8s.io/client-go/OWNERS @@ -21,6 +21,7 @@ reviewers: - sttts - yliaog - jpbetz + - jefftree labels: - sig/api-machinery emeritus_approvers: diff --git a/staging/src/k8s.io/client-go/README.md b/staging/src/k8s.io/client-go/README.md index aed9d29141bca..25d581a8e12c3 100644 --- a/staging/src/k8s.io/client-go/README.md +++ b/staging/src/k8s.io/client-go/README.md @@ -80,14 +80,14 @@ We will backport bugfixes--but not new features--into older versions of #### Compatibility matrix -| | Kubernetes 1.27 | Kubernetes 1.28 | Kubernetes 1.29 | Kubernetes 1.30 | Kubernetes 1.31 | Kubernetes 1.32 | +| | Kubernetes 1.29 | Kubernetes 1.30 | Kubernetes 1.31 | Kubernetes 1.32 | Kubernetes 1.33 | Kubernetes 1.34 | | ----------------------------- | --------------- | --------------- | --------------- | --------------- | --------------- | --------------- | -| `kubernetes-1.27.0`/`v0.27.0` | ✓ | +- | +- | +- | +- | +- | -| `kubernetes-1.28.0`/`v0.28.0` | +- | ✓ | +- | +- | +- | +- | -| `kubernetes-1.29.0`/`v0.29.0` | +- | +- | ✓ | +- | +- | +- | -| `kubernetes-1.30.0`/`v0.30.0` | +- | +- | +- | ✓ | +- | +- | -| `kubernetes-1.31.0`/`v0.31.0` | +- | +- | +- | +- | ✓ | +- | -| `kubernetes-1.32.0`/`v0.32.0` | +- | +- | +- | +- | +- | ✓ | +| `kubernetes-1.29.0`/`v0.29.0` | ✓ | +- | +- | +- | +- | +- | +| `kubernetes-1.30.0`/`v0.30.0` | +- | ✓ | +- | +- | +- | +- | +| `kubernetes-1.31.0`/`v0.31.0` | +- | +- | ✓ | +- | +- | +- | +| `kubernetes-1.32.0`/`v0.32.0` | +- | +- | +- | ✓ | +- | +- | +| `kubernetes-1.33.0`/`v0.33.0` | +- | +- | +- | +- | ✓ | +- | +| `kubernetes-1.34.0`/`v0.34.0` | +- | +- | +- | +- | +- | ✓ | | `HEAD` | +- | +- | +- | +- | +- | +- | Key: @@ -109,16 +109,16 @@ between client-go versions. | Branch | Canonical source code location | Maintenance status | | -------------- | ----------------------------------- | ------------------ | -| `release-1.23` | Kubernetes main repo, 1.23 branch | =- | -| `release-1.24` | Kubernetes main repo, 1.24 branch | =- | | `release-1.25` | Kubernetes main repo, 1.25 branch | =- | | `release-1.26` | Kubernetes main repo, 1.26 branch | =- | | `release-1.27` | Kubernetes main repo, 1.27 branch | =- | | `release-1.28` | Kubernetes main repo, 1.28 branch | =- | -| `release-1.29` | Kubernetes main repo, 1.29 branch | ✓ | -| `release-1.30` | Kubernetes main repo, 1.30 branch | ✓ | -| `release-1.31` | Kubernetes main repo, 1.31 branch | ✓ | +| `release-1.29` | Kubernetes main repo, 1.29 branch | =- | +| `release-1.30` | Kubernetes main repo, 1.30 branch | =- | +| `release-1.31` | Kubernetes main repo, 1.31 branch | = | | `release-1.32` | Kubernetes main repo, 1.32 branch | ✓ | +| `release-1.33` | Kubernetes main repo, 1.33 branch | ✓ | +| `release-1.34` | Kubernetes main repo, 1.34 branch | ✓ | | client-go HEAD | Kubernetes main repo, master branch | ✓ | Key: diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/auditannotation.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/auditannotation.go index 0d50d44ac2ce7..34f9e83008e40 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/auditannotation.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/auditannotation.go @@ -20,8 +20,40 @@ package v1 // AuditAnnotationApplyConfiguration represents a declarative configuration of the AuditAnnotation type for use // with apply. +// +// AuditAnnotation describes how to produce an audit annotation for an API request. type AuditAnnotationApplyConfiguration struct { - Key *string `json:"key,omitempty"` + // key specifies the audit annotation key. The audit annotation keys of + // a ValidatingAdmissionPolicy must be unique. The key must be a qualified + // name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. + // + // The key is combined with the resource name of the + // ValidatingAdmissionPolicy to construct an audit annotation key: + // "{ValidatingAdmissionPolicy name}/{key}". + // + // If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy + // and the same audit annotation key, the annotation key will be identical. + // In this case, the first annotation written with the key will be included + // in the audit event and all subsequent annotations with the same key + // will be discarded. + // + // Required. + Key *string `json:"key,omitempty"` + // valueExpression represents the expression which is evaluated by CEL to + // produce an audit annotation value. The expression must evaluate to either + // a string or null value. If the expression evaluates to a string, the + // audit annotation is included with the string value. If the expression + // evaluates to null or empty string the audit annotation will be omitted. + // The valueExpression may be no longer than 5kb in length. + // If the result of the valueExpression is more than 10kb in length, it + // will be truncated to 10kb. + // + // If multiple ValidatingAdmissionPolicyBinding resources match an + // API request, then the valueExpression will be evaluated for + // each binding. All unique values produced by the valueExpressions + // will be joined together in a comma-separated list. + // + // Required. ValueExpression *string `json:"valueExpression,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/expressionwarning.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/expressionwarning.go index 1f890bcfcb68d..31219c7e80895 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/expressionwarning.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/expressionwarning.go @@ -20,9 +20,17 @@ package v1 // ExpressionWarningApplyConfiguration represents a declarative configuration of the ExpressionWarning type for use // with apply. +// +// ExpressionWarning is a warning information that targets a specific expression. type ExpressionWarningApplyConfiguration struct { + // The path to the field that refers the expression. + // For example, the reference to the expression of the first item of + // validations is "spec.validations[0].expression" FieldRef *string `json:"fieldRef,omitempty"` - Warning *string `json:"warning,omitempty"` + // The content of type checking information in a human-readable form. + // Each line of the warning contains the type that the expression is checked + // against, followed by the type check error from the compiler. + Warning *string `json:"warning,omitempty"` } // ExpressionWarningApplyConfiguration constructs a declarative configuration of the ExpressionWarning type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchcondition.go index d8a816f1e2fac..1e149da4ec4d8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchcondition.go @@ -20,8 +20,32 @@ package v1 // MatchConditionApplyConfiguration represents a declarative configuration of the MatchCondition type for use // with apply. +// +// MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook. type MatchConditionApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // Name is an identifier for this match condition, used for strategic merging of MatchConditions, + // as well as providing an identifier for logging purposes. A good name should be descriptive of + // the associated expression. + // Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and + // must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or + // '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an + // optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName') + // + // Required. + Name *string `json:"name,omitempty"` + // Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. + // CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables: + // + // 'object' - The object from the incoming request. The value is null for DELETE requests. + // 'oldObject' - The existing object. The value is null for CREATE requests. + // 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). + // 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/ + // + // Required. Expression *string `json:"expression,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchresources.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchresources.go index e840fe9ebb1f8..cd1a3d5fcf4eb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchresources.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchresources.go @@ -25,12 +25,88 @@ import ( // MatchResourcesApplyConfiguration represents a declarative configuration of the MatchResources type for use // with apply. +// +// MatchResources decides whether to run the admission control policy on an object based +// on whether it meets the match criteria. +// The exclude rules take precedence over include rules (if a resource matches both, it is excluded) type MatchResourcesApplyConfiguration struct { - NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` - ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` - ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"` + // NamespaceSelector decides whether to run the admission control policy on an object based + // on whether the namespace for that object matches the selector. If the + // object itself is a namespace, the matching is performed on + // object.metadata.labels. If the object is another cluster scoped resource, + // it never skips the policy. + // + // For example, to run the webhook on any objects whose namespace is not + // associated with "runlevel" of "0" or "1"; you will set the selector as + // follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "runlevel", + // "operator": "NotIn", + // "values": [ + // "0", + // "1" + // ] + // } + // ] + // } + // + // If instead you want to only run the policy on any objects whose + // namespace is associated with the "environment" of "prod" or "staging"; + // you will set the selector as follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "environment", + // "operator": "In", + // "values": [ + // "prod", + // "staging" + // ] + // } + // ] + // } + // + // See + // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + // for more examples of label selectors. + // + // Default to the empty LabelSelector, which matches everything. + NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` + // ObjectSelector decides whether to run the validation based on if the + // object has matching labels. objectSelector is evaluated against both + // the oldObject and newObject that would be sent to the cel validation, and + // is considered to match if either object matches the selector. A null + // object (oldObject in the case of create, or newObject in the case of + // delete) or an object that cannot have labels (like a + // DeploymentRollback or a PodProxyOptions object) is not considered to + // match. + // Use the object selector only if the webhook is opt-in, because end + // users may skip the admission webhook by setting the labels. + // Default to the empty LabelSelector, which matches everything. + ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` + // ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. + // The policy cares about an operation if it matches _any_ Rule. + ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"` + // ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. + // The exclude rules take precedence over include rules (if a resource matches both, it is excluded) ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"` - MatchPolicy *admissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty"` + // matchPolicy defines how the "MatchResources" list is used to match incoming requests. + // Allowed values are "Exact" or "Equivalent". + // + // - Exact: match a request only if it exactly matches a specified rule. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. + // + // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. + // + // Defaults to "Equivalent" + MatchPolicy *admissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty"` } // MatchResourcesApplyConfiguration constructs a declarative configuration of the MatchResources type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingwebhook.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingwebhook.go index cd8096f9020c3..498611b5dd96c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingwebhook.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingwebhook.go @@ -25,19 +25,148 @@ import ( // MutatingWebhookApplyConfiguration represents a declarative configuration of the MutatingWebhook type for use // with apply. +// +// MutatingWebhook describes an admission webhook and the resources and operations it applies to. type MutatingWebhookApplyConfiguration struct { - Name *string `json:"name,omitempty"` - ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"` - Rules []RuleWithOperationsApplyConfiguration `json:"rules,omitempty"` - FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"` - MatchPolicy *admissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty"` - NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` - ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` - SideEffects *admissionregistrationv1.SideEffectClass `json:"sideEffects,omitempty"` - TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` - AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"` - ReinvocationPolicy *admissionregistrationv1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"` - MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` + // The name of the admission webhook. + // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where + // "imagepolicy" is the name of the webhook, and kubernetes.io is the name + // of the organization. + // Required. + Name *string `json:"name,omitempty"` + // ClientConfig defines how to communicate with the hook. + // Required + ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"` + // Rules describes what operations on what resources/subresources the webhook cares about. + // The webhook cares about an operation if it matches _any_ Rule. + // However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks + // from putting the cluster in a state which cannot be recovered from without completely + // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called + // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + Rules []RuleWithOperationsApplyConfiguration `json:"rules,omitempty"` + // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - + // allowed values are Ignore or Fail. Defaults to Fail. + FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"` + // matchPolicy defines how the "rules" list is used to match incoming requests. + // Allowed values are "Exact" or "Equivalent". + // + // - Exact: match a request only if it exactly matches a specified rule. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. + // + // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. + // + // Defaults to "Equivalent" + MatchPolicy *admissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty"` + // NamespaceSelector decides whether to run the webhook on an object based + // on whether the namespace for that object matches the selector. If the + // object itself is a namespace, the matching is performed on + // object.metadata.labels. If the object is another cluster scoped resource, + // it never skips the webhook. + // + // For example, to run the webhook on any objects whose namespace is not + // associated with "runlevel" of "0" or "1"; you will set the selector as + // follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "runlevel", + // "operator": "NotIn", + // "values": [ + // "0", + // "1" + // ] + // } + // ] + // } + // + // If instead you want to only run the webhook on any objects whose + // namespace is associated with the "environment" of "prod" or "staging"; + // you will set the selector as follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "environment", + // "operator": "In", + // "values": [ + // "prod", + // "staging" + // ] + // } + // ] + // } + // + // See + // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + // for more examples of label selectors. + // + // Default to the empty LabelSelector, which matches everything. + NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` + // ObjectSelector decides whether to run the webhook based on if the + // object has matching labels. objectSelector is evaluated against both + // the oldObject and newObject that would be sent to the webhook, and + // is considered to match if either object matches the selector. A null + // object (oldObject in the case of create, or newObject in the case of + // delete) or an object that cannot have labels (like a + // DeploymentRollback or a PodProxyOptions object) is not considered to + // match. + // Use the object selector only if the webhook is opt-in, because end + // users may skip the admission webhook by setting the labels. + // Default to the empty LabelSelector, which matches everything. + ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` + // SideEffects states whether this webhook has side effects. + // Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). + // Webhooks with side effects MUST implement a reconciliation system, since a request may be + // rejected by a future step in the admission chain and the side effects therefore need to be undone. + // Requests with the dryRun attribute will be auto-rejected if they match a webhook with + // sideEffects == Unknown or Some. + SideEffects *admissionregistrationv1.SideEffectClass `json:"sideEffects,omitempty"` + // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, + // the webhook call will be ignored or the API call will fail based on the + // failure policy. + // The timeout value must be between 1 and 30 seconds. + // Default to 10 seconds. + TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` + // AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` + // versions the Webhook expects. API server will try to use first version in + // the list which it supports. If none of the versions specified in this list + // supported by API server, validation will fail for this object. + // If a persisted webhook configuration specifies allowed versions and does not + // include any versions known to the API Server, calls to the webhook will fail + // and be subject to the failure policy. + AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"` + // reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. + // Allowed values are "Never" and "IfNeeded". + // + // Never: the webhook will not be called more than once in a single admission evaluation. + // + // IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation + // if the object being admitted is modified by other admission plugins after the initial webhook call. + // Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. + // Note: + // * the number of additional invocations is not guaranteed to be exactly one. + // * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. + // * webhooks that use this option may be reordered to minimize the number of additional invocations. + // * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead. + // + // Defaults to "Never". + ReinvocationPolicy *admissionregistrationv1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"` + // MatchConditions is a list of conditions that must be met for a request to be sent to this + // webhook. Match conditions filter requests that have already been matched by the rules, + // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. + // There are a maximum of 64 match conditions allowed. + // + // The exact matching logic is (in order): + // 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. + // 2. If ALL matchConditions evaluate to TRUE, the webhook is called. + // 3. If any matchCondition evaluates to an error (but none are FALSE): + // - If failurePolicy=Fail, reject the request + // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped + MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` } // MutatingWebhookApplyConfiguration constructs a declarative configuration of the MutatingWebhook type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go index 9a12eba075fec..87909f254bba4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go @@ -29,10 +29,14 @@ import ( // MutatingWebhookConfigurationApplyConfiguration represents a declarative configuration of the MutatingWebhookConfiguration type for use // with apply. +// +// MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. type MutatingWebhookConfigurationApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Webhooks []MutatingWebhookApplyConfiguration `json:"webhooks,omitempty"` + // Webhooks is a list of webhooks and the affected resources and operations. + Webhooks []MutatingWebhookApplyConfiguration `json:"webhooks,omitempty"` } // MutatingWebhookConfiguration constructs a declarative configuration of the MutatingWebhookConfiguration type for use with @@ -45,29 +49,14 @@ func MutatingWebhookConfiguration(name string) *MutatingWebhookConfigurationAppl return b } -// ExtractMutatingWebhookConfiguration extracts the applied configuration owned by fieldManager from -// mutatingWebhookConfiguration. If no managedFields are found in mutatingWebhookConfiguration for fieldManager, a -// MutatingWebhookConfigurationApplyConfiguration 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. +// ExtractMutatingWebhookConfigurationFrom extracts the applied configuration owned by fieldManager from +// mutatingWebhookConfiguration for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // mutatingWebhookConfiguration must be a unmodified MutatingWebhookConfiguration API object that was retrieved from the Kubernetes API. -// ExtractMutatingWebhookConfiguration provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractMutatingWebhookConfigurationFrom 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 ExtractMutatingWebhookConfiguration(mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration, fieldManager string) (*MutatingWebhookConfigurationApplyConfiguration, error) { - return extractMutatingWebhookConfiguration(mutatingWebhookConfiguration, fieldManager, "") -} - -// ExtractMutatingWebhookConfigurationStatus is the same as ExtractMutatingWebhookConfiguration except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractMutatingWebhookConfigurationStatus(mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration, fieldManager string) (*MutatingWebhookConfigurationApplyConfiguration, error) { - return extractMutatingWebhookConfiguration(mutatingWebhookConfiguration, fieldManager, "status") -} - -func extractMutatingWebhookConfiguration(mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration, fieldManager string, subresource string) (*MutatingWebhookConfigurationApplyConfiguration, error) { +func ExtractMutatingWebhookConfigurationFrom(mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration, fieldManager string, subresource string) (*MutatingWebhookConfigurationApplyConfiguration, error) { b := &MutatingWebhookConfigurationApplyConfiguration{} err := managedfields.ExtractInto(mutatingWebhookConfiguration, internal.Parser().Type("io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration"), fieldManager, b, subresource) if err != nil { @@ -79,6 +68,21 @@ func extractMutatingWebhookConfiguration(mutatingWebhookConfiguration *admission b.WithAPIVersion("admissionregistration.k8s.io/v1") return b, nil } + +// ExtractMutatingWebhookConfiguration extracts the applied configuration owned by fieldManager from +// mutatingWebhookConfiguration. If no managedFields are found in mutatingWebhookConfiguration for fieldManager, a +// MutatingWebhookConfigurationApplyConfiguration 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. +// mutatingWebhookConfiguration must be a unmodified MutatingWebhookConfiguration API object that was retrieved from the Kubernetes API. +// ExtractMutatingWebhookConfiguration 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. +func ExtractMutatingWebhookConfiguration(mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration, fieldManager string) (*MutatingWebhookConfigurationApplyConfiguration, error) { + return ExtractMutatingWebhookConfigurationFrom(mutatingWebhookConfiguration, fieldManager, "") +} + func (b MutatingWebhookConfigurationApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/namedrulewithoperations.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/namedrulewithoperations.go index dd31981ad5e4b..fe7a6b8c0cd1e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/namedrulewithoperations.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/namedrulewithoperations.go @@ -24,8 +24,12 @@ import ( // NamedRuleWithOperationsApplyConfiguration represents a declarative configuration of the NamedRuleWithOperations type for use // with apply. +// +// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. type NamedRuleWithOperationsApplyConfiguration struct { - ResourceNames []string `json:"resourceNames,omitempty"` + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + ResourceNames []string `json:"resourceNames,omitempty"` + // RuleWithOperations is a tuple of Operations and Resources. RuleWithOperationsApplyConfiguration `json:",inline"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramkind.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramkind.go index 07577929ab314..5c6729fc6379c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramkind.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramkind.go @@ -20,9 +20,16 @@ package v1 // ParamKindApplyConfiguration represents a declarative configuration of the ParamKind type for use // with apply. +// +// ParamKind is a tuple of Group Kind and Version. type ParamKindApplyConfiguration struct { + // APIVersion is the API group version the resources belong to. + // In format of "group/version". + // Required. APIVersion *string `json:"apiVersion,omitempty"` - Kind *string `json:"kind,omitempty"` + // Kind is the API kind the resources belong to. + // Required. + Kind *string `json:"kind,omitempty"` } // ParamKindApplyConfiguration constructs a declarative configuration of the ParamKind type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramref.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramref.go index 140233f6ba572..eb9f6c47aaa9a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramref.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramref.go @@ -25,10 +25,53 @@ import ( // ParamRefApplyConfiguration represents a declarative configuration of the ParamRef type for use // with apply. +// +// ParamRef describes how to locate the params to be used as input to +// expressions of rules applied by a policy binding. type ParamRefApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Namespace *string `json:"namespace,omitempty"` - Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // name is the name of the resource being referenced. + // + // One of `name` or `selector` must be set, but `name` and `selector` are + // mutually exclusive properties. If one is set, the other must be unset. + // + // A single parameter used for all admission requests can be configured + // by setting the `name` field, leaving `selector` blank, and setting namespace + // if `paramKind` is namespace-scoped. + Name *string `json:"name,omitempty"` + // namespace is the namespace of the referenced resource. Allows limiting + // the search for params to a specific namespace. Applies to both `name` and + // `selector` fields. + // + // A per-namespace parameter may be used by specifying a namespace-scoped + // `paramKind` in the policy and leaving this field empty. + // + // - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this + // field results in a configuration error. + // + // - If `paramKind` is namespace-scoped, the namespace of the object being + // evaluated for admission will be used when this field is left unset. Take + // care that if this is left empty the binding must not match any cluster-scoped + // resources, which will result in an error. + Namespace *string `json:"namespace,omitempty"` + // selector can be used to match multiple param objects based on their labels. + // Supply selector: {} to match all resources of the ParamKind. + // + // If multiple params are found, they are all evaluated with the policy expressions + // and the results are ANDed together. + // + // One of `name` or `selector` must be set, but `name` and `selector` are + // mutually exclusive properties. If one is set, the other must be unset. + Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // `parameterNotFoundAction` controls the behavior of the binding when the resource + // exists, and name or selector is valid, but there are no parameters + // matched by the binding. If the value is set to `Allow`, then no + // matched parameters will be treated as successful validation by the binding. + // If set to `Deny`, then no matched parameters will be subject to the + // `failurePolicy` of the policy. + // + // Allowed values are `Allow` or `Deny` + // + // Required ParameterNotFoundAction *admissionregistrationv1.ParameterNotFoundActionType `json:"parameterNotFoundAction,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/rule.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/rule.go index a8c68136bd9d7..056e944fec741 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/rule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/rule.go @@ -24,11 +24,43 @@ import ( // RuleApplyConfiguration represents a declarative configuration of the Rule type for use // with apply. +// +// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended +// to make sure that all the tuple expansions are valid. type RuleApplyConfiguration struct { - APIGroups []string `json:"apiGroups,omitempty"` - APIVersions []string `json:"apiVersions,omitempty"` - Resources []string `json:"resources,omitempty"` - Scope *admissionregistrationv1.ScopeType `json:"scope,omitempty"` + // APIGroups is the API groups the resources belong to. '*' is all groups. + // If '*' is present, the length of the slice must be one. + // Required. + APIGroups []string `json:"apiGroups,omitempty"` + // APIVersions is the API versions the resources belong to. '*' is all versions. + // If '*' is present, the length of the slice must be one. + // Required. + APIVersions []string `json:"apiVersions,omitempty"` + // Resources is a list of resources this rule applies to. + // + // For example: + // 'pods' means pods. + // 'pods/log' means the log subresource of pods. + // '*' means all resources, but not subresources. + // 'pods/*' means all subresources of pods. + // '*/scale' means all scale subresources. + // '*/*' means all resources and their subresources. + // + // If wildcard is present, the validation rule will ensure resources do not + // overlap with each other. + // + // Depending on the enclosing object, subresources might not be allowed. + // Required. + Resources []string `json:"resources,omitempty"` + // scope specifies the scope of this rule. + // Valid values are "Cluster", "Namespaced", and "*" + // "Cluster" means that only cluster-scoped resources will match this rule. + // Namespace API objects are cluster-scoped. + // "Namespaced" means that only namespaced resources will match this rule. + // "*" means that there are no scope restrictions. + // Subresources match the scope of their parent resource. + // Default is "*". + Scope *admissionregistrationv1.ScopeType `json:"scope,omitempty"` } // RuleApplyConfiguration constructs a declarative configuration of the Rule type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/rulewithoperations.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/rulewithoperations.go index 55a985f9983f1..a4a1643fec50a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/rulewithoperations.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/rulewithoperations.go @@ -24,8 +24,17 @@ import ( // RuleWithOperationsApplyConfiguration represents a declarative configuration of the RuleWithOperations type for use // with apply. +// +// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make +// sure that all the tuple expansions are valid. type RuleWithOperationsApplyConfiguration struct { - Operations []admissionregistrationv1.OperationType `json:"operations,omitempty"` + // Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * + // for all of those operations and any future admission operations that are added. + // If '*' is present, the length of the slice must be one. + // Required. + Operations []admissionregistrationv1.OperationType `json:"operations,omitempty"` + // Rule is embedded, it describes other criteria of the rule, like + // APIGroups, APIVersions, Resources, etc. RuleApplyConfiguration `json:",inline"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/servicereference.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/servicereference.go index 239780664df53..c93b61150faf7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/servicereference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/servicereference.go @@ -20,11 +20,22 @@ package v1 // ServiceReferenceApplyConfiguration represents a declarative configuration of the ServiceReference type for use // with apply. +// +// ServiceReference holds a reference to Service.legacy.k8s.io type ServiceReferenceApplyConfiguration struct { + // `namespace` is the namespace of the service. + // Required Namespace *string `json:"namespace,omitempty"` - Name *string `json:"name,omitempty"` - Path *string `json:"path,omitempty"` - Port *int32 `json:"port,omitempty"` + // `name` is the name of the service. + // Required + Name *string `json:"name,omitempty"` + // `path` is an optional URL path which will be sent in any request to + // this service. + Path *string `json:"path,omitempty"` + // If specified, the port on the service that hosting webhook. + // Default to 443 for backward compatibility. + // `port` should be a valid port number (1-65535, inclusive). + Port *int32 `json:"port,omitempty"` } // ServiceReferenceApplyConfiguration constructs a declarative configuration of the ServiceReference type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/typechecking.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/typechecking.go index 723d10ecf5eaa..f6077ee39e47b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/typechecking.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/typechecking.go @@ -20,7 +20,11 @@ package v1 // TypeCheckingApplyConfiguration represents a declarative configuration of the TypeChecking type for use // with apply. +// +// TypeChecking contains results of type checking the expressions in the +// ValidatingAdmissionPolicy type TypeCheckingApplyConfiguration struct { + // The type checking warnings for each expression. ExpressionWarnings []ExpressionWarningApplyConfiguration `json:"expressionWarnings,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicy.go index bbfc66a6f6d78..22d965fa8132d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicy.go @@ -29,11 +29,19 @@ import ( // ValidatingAdmissionPolicyApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicy type for use // with apply. +// +// ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. type ValidatingAdmissionPolicyApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"` - Status *ValidatingAdmissionPolicyStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of the ValidatingAdmissionPolicy. + Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"` + // The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy + // behaves in the expected way. + // Populated by the system. + // Read-only. + Status *ValidatingAdmissionPolicyStatusApplyConfiguration `json:"status,omitempty"` } // ValidatingAdmissionPolicy constructs a declarative configuration of the ValidatingAdmissionPolicy type for use with @@ -46,6 +54,26 @@ func ValidatingAdmissionPolicy(name string) *ValidatingAdmissionPolicyApplyConfi return b } +// ExtractValidatingAdmissionPolicyFrom extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicy for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// validatingAdmissionPolicy must be a unmodified ValidatingAdmissionPolicy API object that was retrieved from the Kubernetes API. +// ExtractValidatingAdmissionPolicyFrom 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. +func ExtractValidatingAdmissionPolicyFrom(validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicy, fieldManager string, subresource string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { + b := &ValidatingAdmissionPolicyApplyConfiguration{} + err := managedfields.ExtractInto(validatingAdmissionPolicy, internal.Parser().Type("io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicy"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(validatingAdmissionPolicy.Name) + + b.WithKind("ValidatingAdmissionPolicy") + b.WithAPIVersion("admissionregistration.k8s.io/v1") + return b, nil +} + // ExtractValidatingAdmissionPolicy extracts the applied configuration owned by fieldManager from // validatingAdmissionPolicy. If no managedFields are found in validatingAdmissionPolicy for fieldManager, a // ValidatingAdmissionPolicyApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +84,16 @@ func ValidatingAdmissionPolicy(name string) *ValidatingAdmissionPolicyApplyConfi // ExtractValidatingAdmissionPolicy 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 ExtractValidatingAdmissionPolicy(validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { - return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "") + return ExtractValidatingAdmissionPolicyFrom(validatingAdmissionPolicy, fieldManager, "") } -// ExtractValidatingAdmissionPolicyStatus is the same as ExtractValidatingAdmissionPolicy except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractValidatingAdmissionPolicyStatus extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicy for the status subresource. func ExtractValidatingAdmissionPolicyStatus(validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { - return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "status") + return ExtractValidatingAdmissionPolicyFrom(validatingAdmissionPolicy, fieldManager, "status") } -func extractValidatingAdmissionPolicy(validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicy, fieldManager string, subresource string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { - b := &ValidatingAdmissionPolicyApplyConfiguration{} - err := managedfields.ExtractInto(validatingAdmissionPolicy, internal.Parser().Type("io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicy"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(validatingAdmissionPolicy.Name) - - b.WithKind("ValidatingAdmissionPolicy") - b.WithAPIVersion("admissionregistration.k8s.io/v1") - return b, nil -} func (b ValidatingAdmissionPolicyApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybinding.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybinding.go index 416d26cbf8bdc..5a083a0568c02 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybinding.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybinding.go @@ -29,10 +29,24 @@ import ( // ValidatingAdmissionPolicyBindingApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicyBinding type for use // with apply. +// +// ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. +// ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. +// +// For a given admission request, each binding will cause its policy to be +// evaluated N times, where N is 1 for policies/bindings that don't use +// params, otherwise N is the number of parameters selected by the binding. +// +// The CEL expressions of a policy must have a computed CEL cost below the maximum +// CEL budget. Each evaluation of the policy is given an independent CEL cost budget. +// Adding/removing policies, bindings, or params can not affect whether a +// given (policy, binding, param) combination is within its own CEL budget. type ValidatingAdmissionPolicyBindingApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"` + // Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. + Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"` } // ValidatingAdmissionPolicyBinding constructs a declarative configuration of the ValidatingAdmissionPolicyBinding type for use with @@ -45,29 +59,14 @@ func ValidatingAdmissionPolicyBinding(name string) *ValidatingAdmissionPolicyBin return b } -// ExtractValidatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from -// validatingAdmissionPolicyBinding. If no managedFields are found in validatingAdmissionPolicyBinding for fieldManager, a -// ValidatingAdmissionPolicyBindingApplyConfiguration 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. +// ExtractValidatingAdmissionPolicyBindingFrom extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicyBinding for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // validatingAdmissionPolicyBinding must be a unmodified ValidatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. -// ExtractValidatingAdmissionPolicyBinding provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractValidatingAdmissionPolicyBindingFrom 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 ExtractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *admissionregistrationv1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { - return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "") -} - -// ExtractValidatingAdmissionPolicyBindingStatus is the same as ExtractValidatingAdmissionPolicyBinding except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractValidatingAdmissionPolicyBindingStatus(validatingAdmissionPolicyBinding *admissionregistrationv1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { - return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "status") -} - -func extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *admissionregistrationv1.ValidatingAdmissionPolicyBinding, fieldManager string, subresource string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { +func ExtractValidatingAdmissionPolicyBindingFrom(validatingAdmissionPolicyBinding *admissionregistrationv1.ValidatingAdmissionPolicyBinding, fieldManager string, subresource string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { b := &ValidatingAdmissionPolicyBindingApplyConfiguration{} err := managedfields.ExtractInto(validatingAdmissionPolicyBinding, internal.Parser().Type("io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding"), fieldManager, b, subresource) if err != nil { @@ -79,6 +78,21 @@ func extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *a b.WithAPIVersion("admissionregistration.k8s.io/v1") return b, nil } + +// ExtractValidatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicyBinding. If no managedFields are found in validatingAdmissionPolicyBinding for fieldManager, a +// ValidatingAdmissionPolicyBindingApplyConfiguration 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. +// validatingAdmissionPolicyBinding must be a unmodified ValidatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. +// ExtractValidatingAdmissionPolicyBinding 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. +func ExtractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *admissionregistrationv1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { + return ExtractValidatingAdmissionPolicyBindingFrom(validatingAdmissionPolicyBinding, fieldManager, "") +} + func (b ValidatingAdmissionPolicyBindingApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybindingspec.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybindingspec.go index eb426af42ad9e..31d98bb9470bb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybindingspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybindingspec.go @@ -24,10 +24,63 @@ import ( // ValidatingAdmissionPolicyBindingSpecApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use // with apply. +// +// ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct { - PolicyName *string `json:"policyName,omitempty"` - ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"` - MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"` + // PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. + // If the referenced resource does not exist, this binding is considered invalid and will be ignored + // Required. + PolicyName *string `json:"policyName,omitempty"` + // paramRef specifies the parameter resource used to configure the admission control policy. + // It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. + // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. + // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. + ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"` + // MatchResources declares what resources match this binding and will be validated by it. + // Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. + // If this is unset, all resources matched by the policy are validated by this binding + // When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. + // Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required. + MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"` + // validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. + // If a validation evaluates to false it is always enforced according to these actions. + // + // Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according + // to these actions only if the FailurePolicy is set to Fail, otherwise the failures are + // ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. + // + // validationActions is declared as a set of action values. Order does + // not matter. validationActions may not contain duplicates of the same action. + // + // The supported actions values are: + // + // "Deny" specifies that a validation failure results in a denied request. + // + // "Warn" specifies that a validation failure is reported to the request client + // in HTTP Warning headers, with a warning code of 299. Warnings can be sent + // both for allowed or denied admission responses. + // + // "Audit" specifies that a validation failure is included in the published + // audit event for the request. The audit event will contain a + // `validation.policy.admission.k8s.io/validation_failure` audit annotation + // with a value containing the details of the validation failures, formatted as + // a JSON list of objects, each with the following fields: + // - message: The validation failure message string + // - policy: The resource name of the ValidatingAdmissionPolicy + // - binding: The resource name of the ValidatingAdmissionPolicyBinding + // - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy + // - validationActions: The enforcement actions enacted for the validation failure + // Example audit annotation: + // `"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"` + // + // Clients should expect to handle additional values by ignoring + // any values not recognized. + // + // "Deny" and "Warn" may not be used together since this combination + // needlessly duplicates the validation failure both in the + // API response body and the HTTP warning headers. + // + // Required. ValidationActions []admissionregistrationv1.ValidationAction `json:"validationActions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicyspec.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicyspec.go index 1635b30a61a5d..b3f6989a72bbe 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicyspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicyspec.go @@ -24,14 +24,66 @@ import ( // ValidatingAdmissionPolicySpecApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicySpec type for use // with apply. +// +// ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. type ValidatingAdmissionPolicySpecApplyConfiguration struct { - ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"` - MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"` - Validations []ValidationApplyConfiguration `json:"validations,omitempty"` - FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"` - AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"` - MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` - Variables []VariableApplyConfiguration `json:"variables,omitempty"` + // ParamKind specifies the kind of resources used to parameterize this policy. + // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. + // If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. + // If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null. + ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"` + // MatchConstraints specifies what resources this policy is designed to validate. + // The AdmissionPolicy cares about a request if it matches _all_ Constraints. + // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API + // ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. + // Required. + MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"` + // Validations contain CEL expressions which is used to apply the validation. + // Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is + // required. + Validations []ValidationApplyConfiguration `json:"validations,omitempty"` + // failurePolicy defines how to handle failures for the admission policy. Failures can + // occur from CEL expression parse errors, type check errors, runtime errors and invalid + // or mis-configured policy definitions or bindings. + // + // A policy is invalid if spec.paramKind refers to a non-existent Kind. + // A binding is invalid if spec.paramRef.name refers to a non-existent resource. + // + // failurePolicy does not define how validations that evaluate to false are handled. + // + // When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions + // define how failures are enforced. + // + // Allowed values are Ignore or Fail. Defaults to Fail. + FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"` + // auditAnnotations contains CEL expressions which are used to produce audit + // annotations for the audit event of the API request. + // validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is + // required. + AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"` + // MatchConditions is a list of conditions that must be met for a request to be validated. + // Match conditions filter requests that have already been matched by the rules, + // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. + // There are a maximum of 64 match conditions allowed. + // + // If a parameter object is provided, it can be accessed via the `params` handle in the same + // manner as validation expressions. + // + // The exact matching logic is (in order): + // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. + // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. + // 3. If any matchCondition evaluates to an error (but none are FALSE): + // - If failurePolicy=Fail, reject the request + // - If failurePolicy=Ignore, the policy is skipped + MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` + // Variables contain definitions of variables that can be used in composition of other expressions. + // Each variable is defined as a named CEL expression. + // The variables defined here will be available under `variables` in other expressions of the policy + // except MatchConditions because MatchConditions are evaluated before the rest of the policy. + // + // The expression of a variable can refer to other variables defined earlier in the list but not those after. + // Thus, Variables must be sorted by the order of first appearance and acyclic. + Variables []VariableApplyConfiguration `json:"variables,omitempty"` } // ValidatingAdmissionPolicySpecApplyConfiguration constructs a declarative configuration of the ValidatingAdmissionPolicySpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicystatus.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicystatus.go index e6f4e845915e7..0b3ea76124539 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicystatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicystatus.go @@ -24,10 +24,16 @@ import ( // ValidatingAdmissionPolicyStatusApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicyStatus type for use // with apply. +// +// ValidatingAdmissionPolicyStatus represents the status of an admission validation policy. type ValidatingAdmissionPolicyStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"` - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` + // The generation observed by the controller. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // The results of type checking for each expression. + // Presence of this field indicates the completion of the type checking. + TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"` + // The conditions represent the latest available observations of a policy's current state. + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` } // ValidatingAdmissionPolicyStatusApplyConfiguration constructs a declarative configuration of the ValidatingAdmissionPolicyStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingwebhook.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingwebhook.go index a2c705eb5c4c7..02298017cb7d1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingwebhook.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingwebhook.go @@ -25,18 +25,132 @@ import ( // ValidatingWebhookApplyConfiguration represents a declarative configuration of the ValidatingWebhook type for use // with apply. +// +// ValidatingWebhook describes an admission webhook and the resources and operations it applies to. type ValidatingWebhookApplyConfiguration struct { - Name *string `json:"name,omitempty"` - ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"` - Rules []RuleWithOperationsApplyConfiguration `json:"rules,omitempty"` - FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"` - MatchPolicy *admissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty"` - NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` - ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` - SideEffects *admissionregistrationv1.SideEffectClass `json:"sideEffects,omitempty"` - TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` - AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"` - MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` + // The name of the admission webhook. + // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where + // "imagepolicy" is the name of the webhook, and kubernetes.io is the name + // of the organization. + // Required. + Name *string `json:"name,omitempty"` + // ClientConfig defines how to communicate with the hook. + // Required + ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"` + // Rules describes what operations on what resources/subresources the webhook cares about. + // The webhook cares about an operation if it matches _any_ Rule. + // However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks + // from putting the cluster in a state which cannot be recovered from without completely + // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called + // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + Rules []RuleWithOperationsApplyConfiguration `json:"rules,omitempty"` + // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - + // allowed values are Ignore or Fail. Defaults to Fail. + FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"` + // matchPolicy defines how the "rules" list is used to match incoming requests. + // Allowed values are "Exact" or "Equivalent". + // + // - Exact: match a request only if it exactly matches a specified rule. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. + // + // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. + // + // Defaults to "Equivalent" + MatchPolicy *admissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty"` + // NamespaceSelector decides whether to run the webhook on an object based + // on whether the namespace for that object matches the selector. If the + // object itself is a namespace, the matching is performed on + // object.metadata.labels. If the object is another cluster scoped resource, + // it never skips the webhook. + // + // For example, to run the webhook on any objects whose namespace is not + // associated with "runlevel" of "0" or "1"; you will set the selector as + // follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "runlevel", + // "operator": "NotIn", + // "values": [ + // "0", + // "1" + // ] + // } + // ] + // } + // + // If instead you want to only run the webhook on any objects whose + // namespace is associated with the "environment" of "prod" or "staging"; + // you will set the selector as follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "environment", + // "operator": "In", + // "values": [ + // "prod", + // "staging" + // ] + // } + // ] + // } + // + // See + // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + // for more examples of label selectors. + // + // Default to the empty LabelSelector, which matches everything. + NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` + // ObjectSelector decides whether to run the webhook based on if the + // object has matching labels. objectSelector is evaluated against both + // the oldObject and newObject that would be sent to the webhook, and + // is considered to match if either object matches the selector. A null + // object (oldObject in the case of create, or newObject in the case of + // delete) or an object that cannot have labels (like a + // DeploymentRollback or a PodProxyOptions object) is not considered to + // match. + // Use the object selector only if the webhook is opt-in, because end + // users may skip the admission webhook by setting the labels. + // Default to the empty LabelSelector, which matches everything. + ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` + // SideEffects states whether this webhook has side effects. + // Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). + // Webhooks with side effects MUST implement a reconciliation system, since a request may be + // rejected by a future step in the admission chain and the side effects therefore need to be undone. + // Requests with the dryRun attribute will be auto-rejected if they match a webhook with + // sideEffects == Unknown or Some. + SideEffects *admissionregistrationv1.SideEffectClass `json:"sideEffects,omitempty"` + // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, + // the webhook call will be ignored or the API call will fail based on the + // failure policy. + // The timeout value must be between 1 and 30 seconds. + // Default to 10 seconds. + TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` + // AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` + // versions the Webhook expects. API server will try to use first version in + // the list which it supports. If none of the versions specified in this list + // supported by API server, validation will fail for this object. + // If a persisted webhook configuration specifies allowed versions and does not + // include any versions known to the API Server, calls to the webhook will fail + // and be subject to the failure policy. + AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"` + // MatchConditions is a list of conditions that must be met for a request to be sent to this + // webhook. Match conditions filter requests that have already been matched by the rules, + // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. + // There are a maximum of 64 match conditions allowed. + // + // The exact matching logic is (in order): + // 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. + // 2. If ALL matchConditions evaluate to TRUE, the webhook is called. + // 3. If any matchCondition evaluates to an error (but none are FALSE): + // - If failurePolicy=Fail, reject the request + // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped + MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` } // ValidatingWebhookApplyConfiguration constructs a declarative configuration of the ValidatingWebhook type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go index cfe2e328f8f66..fdf7923e9687f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go @@ -29,10 +29,14 @@ import ( // ValidatingWebhookConfigurationApplyConfiguration represents a declarative configuration of the ValidatingWebhookConfiguration type for use // with apply. +// +// ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. type ValidatingWebhookConfigurationApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Webhooks []ValidatingWebhookApplyConfiguration `json:"webhooks,omitempty"` + // Webhooks is a list of webhooks and the affected resources and operations. + Webhooks []ValidatingWebhookApplyConfiguration `json:"webhooks,omitempty"` } // ValidatingWebhookConfiguration constructs a declarative configuration of the ValidatingWebhookConfiguration type for use with @@ -45,29 +49,14 @@ func ValidatingWebhookConfiguration(name string) *ValidatingWebhookConfiguration return b } -// ExtractValidatingWebhookConfiguration extracts the applied configuration owned by fieldManager from -// validatingWebhookConfiguration. If no managedFields are found in validatingWebhookConfiguration for fieldManager, a -// ValidatingWebhookConfigurationApplyConfiguration 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. +// ExtractValidatingWebhookConfigurationFrom extracts the applied configuration owned by fieldManager from +// validatingWebhookConfiguration for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // validatingWebhookConfiguration must be a unmodified ValidatingWebhookConfiguration API object that was retrieved from the Kubernetes API. -// ExtractValidatingWebhookConfiguration provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractValidatingWebhookConfigurationFrom 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 ExtractValidatingWebhookConfiguration(validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration, fieldManager string) (*ValidatingWebhookConfigurationApplyConfiguration, error) { - return extractValidatingWebhookConfiguration(validatingWebhookConfiguration, fieldManager, "") -} - -// ExtractValidatingWebhookConfigurationStatus is the same as ExtractValidatingWebhookConfiguration except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractValidatingWebhookConfigurationStatus(validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration, fieldManager string) (*ValidatingWebhookConfigurationApplyConfiguration, error) { - return extractValidatingWebhookConfiguration(validatingWebhookConfiguration, fieldManager, "status") -} - -func extractValidatingWebhookConfiguration(validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration, fieldManager string, subresource string) (*ValidatingWebhookConfigurationApplyConfiguration, error) { +func ExtractValidatingWebhookConfigurationFrom(validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration, fieldManager string, subresource string) (*ValidatingWebhookConfigurationApplyConfiguration, error) { b := &ValidatingWebhookConfigurationApplyConfiguration{} err := managedfields.ExtractInto(validatingWebhookConfiguration, internal.Parser().Type("io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration"), fieldManager, b, subresource) if err != nil { @@ -79,6 +68,21 @@ func extractValidatingWebhookConfiguration(validatingWebhookConfiguration *admis b.WithAPIVersion("admissionregistration.k8s.io/v1") return b, nil } + +// ExtractValidatingWebhookConfiguration extracts the applied configuration owned by fieldManager from +// validatingWebhookConfiguration. If no managedFields are found in validatingWebhookConfiguration for fieldManager, a +// ValidatingWebhookConfigurationApplyConfiguration 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. +// validatingWebhookConfiguration must be a unmodified ValidatingWebhookConfiguration API object that was retrieved from the Kubernetes API. +// ExtractValidatingWebhookConfiguration 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. +func ExtractValidatingWebhookConfiguration(validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration, fieldManager string) (*ValidatingWebhookConfigurationApplyConfiguration, error) { + return ExtractValidatingWebhookConfigurationFrom(validatingWebhookConfiguration, fieldManager, "") +} + func (b ValidatingWebhookConfigurationApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validation.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validation.go index 9966a7a2860c0..2ad6756d019e8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validation.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validation.go @@ -24,11 +24,77 @@ import ( // ValidationApplyConfiguration represents a declarative configuration of the Validation type for use // with apply. +// +// Validation specifies the CEL expression which is used to apply the validation. type ValidationApplyConfiguration struct { - Expression *string `json:"expression,omitempty"` - Message *string `json:"message,omitempty"` - Reason *metav1.StatusReason `json:"reason,omitempty"` - MessageExpression *string `json:"messageExpression,omitempty"` + // Expression represents the expression which will be evaluated by CEL. + // ref: https://github.com/google/cel-spec + // CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: + // + // - 'object' - The object from the incoming request. The value is null for DELETE requests. + // - 'oldObject' - The existing object. The value is null for CREATE requests. + // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). + // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. + // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. + // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + // For example, a variable named 'foo' can be accessed as 'variables.foo'. + // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // + // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the + // object. No other metadata properties are accessible. + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Accessible property names are escaped according to the following rules when accessed in the expression: + // - '__' escapes to '__underscores__' + // - '.' escapes to '__dot__' + // - '-' escapes to '__dash__' + // - '/' escapes to '__slash__' + // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: + // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", + // "import", "let", "loop", "package", "namespace", "return". + // Examples: + // - Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"} + // - Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"} + // - Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"} + // + // Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. + // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: + // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and + // non-intersecting elements in `Y` are appended, retaining their partial order. + // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values + // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with + // non-intersecting keys are appended, retaining their partial order. + // Required. + Expression *string `json:"expression,omitempty"` + // Message represents the message displayed when validation fails. The message is required if the Expression contains + // line breaks. The message must not contain line breaks. + // If unset, the message is "failed rule: {Rule}". + // e.g. "must be a URL with the host matching spec.host" + // If the Expression contains line breaks. Message is required. + // The message must not contain line breaks. + // If unset, the message is "failed Expression: {Expression}". + Message *string `json:"message,omitempty"` + // Reason represents a machine-readable description of why this validation failed. + // If this is the first validation in the list to fail, this reason, as well as the + // corresponding HTTP response code, are used in the + // HTTP response to the client. + // The currently supported reasons are: "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge". + // If not set, StatusReasonInvalid is used in the response to the client. + Reason *metav1.StatusReason `json:"reason,omitempty"` + // messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. + // Since messageExpression is used as a failure message, it must evaluate to a string. + // If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. + // If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced + // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string + // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and + // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. + // messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. + // Example: + // "object.x must be less than max ("+string(params.max)+")" + MessageExpression *string `json:"messageExpression,omitempty"` } // ValidationApplyConfiguration constructs a declarative configuration of the Validation type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/variable.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/variable.go index 9dd20afa72090..a99f837944dc2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/variable.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/variable.go @@ -20,8 +20,15 @@ package v1 // VariableApplyConfiguration represents a declarative configuration of the Variable type for use // with apply. +// +// Variable is the definition of a variable that is used for composition. A variable is defined as a named expression. type VariableApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. + // The variable can be accessed in other expressions through `variables` + // For example, if name is "foo", the variable will be available as `variables.foo` + Name *string `json:"name,omitempty"` + // Expression is the expression that will be evaluated as the value of the variable. + // The CEL expression has access to the same identifiers as the CEL expressions in Validation. Expression *string `json:"expression,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/webhookclientconfig.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/webhookclientconfig.go index 77f2227b95ce0..10f3d48de40a1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/webhookclientconfig.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/webhookclientconfig.go @@ -20,10 +20,44 @@ package v1 // WebhookClientConfigApplyConfiguration represents a declarative configuration of the WebhookClientConfig type for use // with apply. +// +// WebhookClientConfig contains the information to make a TLS +// connection with the webhook type WebhookClientConfigApplyConfiguration struct { - URL *string `json:"url,omitempty"` - Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"` - CABundle []byte `json:"caBundle,omitempty"` + // `url` gives the location of the webhook, in standard URL form + // (`scheme://host:port/path`). Exactly one of `url` or `service` + // must be specified. + // + // The `host` should not refer to a service running in the cluster; use + // the `service` field instead. The host might be resolved via external + // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve + // in-cluster DNS as that would be a layering violation). `host` may + // also be an IP address. + // + // Please note that using `localhost` or `127.0.0.1` as a `host` is + // risky unless you take great care to run this webhook on all hosts + // which run an apiserver which might need to make calls to this + // webhook. Such installs are likely to be non-portable, i.e., not easy + // to turn up in a new cluster. + // + // The scheme must be "https"; the URL must begin with "https://". + // + // A path is optional, and if present may be any string permissible in + // a URL. You may use the path to pass an arbitrary string to the + // webhook, for example, a cluster identifier. + // + // Attempting to use a user or basic auth e.g. "user:password@" is not + // allowed. Fragments ("#...") and query parameters ("?...") are not + // allowed, either. + URL *string `json:"url,omitempty"` + // `service` is a reference to the service for this webhook. Either + // `service` or `url` must be specified. + // + // If the webhook is running within the cluster, then you should use `service`. + Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"` + // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. + // If unspecified, system trust roots on the apiserver are used. + CABundle []byte `json:"caBundle,omitempty"` } // WebhookClientConfigApplyConfiguration constructs a declarative configuration of the WebhookClientConfig type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/applyconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/applyconfiguration.go index b08ac72241014..cf0d177c4a55a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/applyconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/applyconfiguration.go @@ -20,7 +20,49 @@ package v1alpha1 // ApplyConfigurationApplyConfiguration represents a declarative configuration of the ApplyConfiguration type for use // with apply. +// +// ApplyConfiguration defines the desired configuration values of an object. type ApplyConfigurationApplyConfiguration struct { + // expression will be evaluated by CEL to create an apply configuration. + // ref: https://github.com/google/cel-spec + // + // Apply configurations are declared in CEL using object initialization. For example, this CEL expression + // returns an apply configuration to set a single field: + // + // Object{ + // spec: Object.spec{ + // serviceAccountName: "example" + // } + // } + // + // Apply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of + // values not included in the apply configuration. + // + // CEL expressions have access to the object types needed to create apply configurations: + // + // - 'Object' - CEL type of the resource object. + // - 'Object.' - CEL type of object field (such as 'Object.spec') + // - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers') + // + // CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables: + // + // - 'object' - The object from the incoming request. The value is null for DELETE requests. + // - 'oldObject' - The existing object. The value is null for CREATE requests. + // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). + // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. + // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. + // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + // For example, a variable named 'foo' can be accessed as 'variables.foo'. + // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // + // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the + // object. No other metadata properties are accessible. + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Required. Expression *string `json:"expression,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/auditannotation.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/auditannotation.go index 958a53740630a..62f2912601441 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/auditannotation.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/auditannotation.go @@ -20,8 +20,40 @@ package v1alpha1 // AuditAnnotationApplyConfiguration represents a declarative configuration of the AuditAnnotation type for use // with apply. +// +// AuditAnnotation describes how to produce an audit annotation for an API request. type AuditAnnotationApplyConfiguration struct { - Key *string `json:"key,omitempty"` + // key specifies the audit annotation key. The audit annotation keys of + // a ValidatingAdmissionPolicy must be unique. The key must be a qualified + // name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. + // + // The key is combined with the resource name of the + // ValidatingAdmissionPolicy to construct an audit annotation key: + // "{ValidatingAdmissionPolicy name}/{key}". + // + // If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy + // and the same audit annotation key, the annotation key will be identical. + // In this case, the first annotation written with the key will be included + // in the audit event and all subsequent annotations with the same key + // will be discarded. + // + // Required. + Key *string `json:"key,omitempty"` + // valueExpression represents the expression which is evaluated by CEL to + // produce an audit annotation value. The expression must evaluate to either + // a string or null value. If the expression evaluates to a string, the + // audit annotation is included with the string value. If the expression + // evaluates to null or empty string the audit annotation will be omitted. + // The valueExpression may be no longer than 5kb in length. + // If the result of the valueExpression is more than 10kb in length, it + // will be truncated to 10kb. + // + // If multiple ValidatingAdmissionPolicyBinding resources match an + // API request, then the valueExpression will be evaluated for + // each binding. All unique values produced by the valueExpressions + // will be joined together in a comma-separated list. + // + // Required. ValueExpression *string `json:"valueExpression,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/expressionwarning.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/expressionwarning.go index f36c2f0f5ce32..220c5d2c935a5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/expressionwarning.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/expressionwarning.go @@ -20,9 +20,17 @@ package v1alpha1 // ExpressionWarningApplyConfiguration represents a declarative configuration of the ExpressionWarning type for use // with apply. +// +// ExpressionWarning is a warning information that targets a specific expression. type ExpressionWarningApplyConfiguration struct { + // The path to the field that refers the expression. + // For example, the reference to the expression of the first item of + // validations is "spec.validations[0].expression" FieldRef *string `json:"fieldRef,omitempty"` - Warning *string `json:"warning,omitempty"` + // The content of type checking information in a human-readable form. + // Each line of the warning contains the type that the expression is checked + // against, followed by the type check error from the compiler. + Warning *string `json:"warning,omitempty"` } // ExpressionWarningApplyConfiguration constructs a declarative configuration of the ExpressionWarning type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/jsonpatch.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/jsonpatch.go index 418d86a2b5ffb..c3ad775d2aa7b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/jsonpatch.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/jsonpatch.go @@ -20,7 +20,73 @@ package v1alpha1 // JSONPatchApplyConfiguration represents a declarative configuration of the JSONPatch type for use // with apply. +// +// JSONPatch defines a JSON Patch. type JSONPatchApplyConfiguration struct { + // expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/). + // ref: https://github.com/google/cel-spec + // + // expression must return an array of JSONPatch values. + // + // For example, this CEL expression returns a JSON patch to conditionally modify a value: + // + // [ + // JSONPatch{op: "test", path: "/spec/example", value: "Red"}, + // JSONPatch{op: "replace", path: "/spec/example", value: "Green"} + // ] + // + // To define an object for the patch value, use Object types. For example: + // + // [ + // JSONPatch{ + // op: "add", + // path: "/spec/selector", + // value: Object.spec.selector{matchLabels: {"environment": "test"}} + // } + // ] + // + // To use strings containing '/' and '~' as JSONPatch path keys, use "jsonpatch.escapeKey". For example: + // + // [ + // JSONPatch{ + // op: "add", + // path: "/metadata/labels/" + jsonpatch.escapeKey("example.com/environment"), + // value: "test" + // }, + // ] + // + // CEL expressions have access to the types needed to create JSON patches and objects: + // + // - 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'. + // See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string, + // integer, array, map or object. If set, the 'path' and 'from' fields must be set to a + // [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL + // function may be used to escape path keys containing '/' and '~'. + // - 'Object' - CEL type of the resource object. + // - 'Object.' - CEL type of object field (such as 'Object.spec') + // - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers') + // + // CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables: + // + // - 'object' - The object from the incoming request. The value is null for DELETE requests. + // - 'oldObject' - The existing object. The value is null for CREATE requests. + // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). + // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. + // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. + // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + // For example, a variable named 'foo' can be accessed as 'variables.foo'. + // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // + // CEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries) + // as well as: + // + // - 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively). + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Required. Expression *string `json:"expression,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/matchcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/matchcondition.go index 7f983dcb22aea..7b758dbf4bd40 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/matchcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/matchcondition.go @@ -21,7 +21,29 @@ package v1alpha1 // MatchConditionApplyConfiguration represents a declarative configuration of the MatchCondition type for use // with apply. type MatchConditionApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // Name is an identifier for this match condition, used for strategic merging of MatchConditions, + // as well as providing an identifier for logging purposes. A good name should be descriptive of + // the associated expression. + // Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and + // must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or + // '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an + // optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName') + // + // Required. + Name *string `json:"name,omitempty"` + // Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. + // CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables: + // + // 'object' - The object from the incoming request. The value is null for DELETE requests. + // 'oldObject' - The existing object. The value is null for CREATE requests. + // 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). + // 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/ + // + // Required. Expression *string `json:"expression,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/matchresources.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/matchresources.go index e443535b6a619..5bdeab094b327 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/matchresources.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/matchresources.go @@ -25,12 +25,89 @@ import ( // MatchResourcesApplyConfiguration represents a declarative configuration of the MatchResources type for use // with apply. +// +// MatchResources decides whether to run the admission control policy on an object based +// on whether it meets the match criteria. +// The exclude rules take precedence over include rules (if a resource matches both, it is excluded) type MatchResourcesApplyConfiguration struct { - NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` - ObjectSelector *v1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` - ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"` - ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"` - MatchPolicy *admissionregistrationv1alpha1.MatchPolicyType `json:"matchPolicy,omitempty"` + // NamespaceSelector decides whether to run the admission control policy on an object based + // on whether the namespace for that object matches the selector. If the + // object itself is a namespace, the matching is performed on + // object.metadata.labels. If the object is another cluster scoped resource, + // it never skips the policy. + // + // For example, to run the webhook on any objects whose namespace is not + // associated with "runlevel" of "0" or "1"; you will set the selector as + // follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "runlevel", + // "operator": "NotIn", + // "values": [ + // "0", + // "1" + // ] + // } + // ] + // } + // + // If instead you want to only run the policy on any objects whose + // namespace is associated with the "environment" of "prod" or "staging"; + // you will set the selector as follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "environment", + // "operator": "In", + // "values": [ + // "prod", + // "staging" + // ] + // } + // ] + // } + // + // See + // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + // for more examples of label selectors. + // + // Default to the empty LabelSelector, which matches everything. + NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` + // ObjectSelector decides whether to run the policy based on if the + // object has matching labels. objectSelector is evaluated against both + // the oldObject and newObject that would be sent to the policy's expression (CEL), and + // is considered to match if either object matches the selector. A null + // object (oldObject in the case of create, or newObject in the case of + // delete) or an object that cannot have labels (like a + // DeploymentRollback or a PodProxyOptions object) is not considered to + // match. + // Use the object selector only if the webhook is opt-in, because end + // users may skip the admission webhook by setting the labels. + // Default to the empty LabelSelector, which matches everything. + ObjectSelector *v1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` + // ResourceRules describes what operations on what resources/subresources the admission policy matches. + // The policy cares about an operation if it matches _any_ Rule. + ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"` + // ExcludeResourceRules describes what operations on what resources/subresources the policy should not care about. + // The exclude rules take precedence over include rules (if a resource matches both, it is excluded) + ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"` + // matchPolicy defines how the "MatchResources" list is used to match incoming requests. + // Allowed values are "Exact" or "Equivalent". + // + // - Exact: match a request only if it exactly matches a specified rule. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // the admission policy does not consider requests to apps/v1beta1 or extensions/v1beta1 API groups. + // + // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // the admission policy **does** consider requests made to apps/v1beta1 or extensions/v1beta1 + // API groups. The API server translates the request to a matched resource API if necessary. + // + // Defaults to "Equivalent" + MatchPolicy *admissionregistrationv1alpha1.MatchPolicyType `json:"matchPolicy,omitempty"` } // MatchResourcesApplyConfiguration constructs a declarative configuration of the MatchResources type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicy.go index 041bec5e5c620..be5b79124736d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicy.go @@ -29,10 +29,14 @@ import ( // MutatingAdmissionPolicyApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicy type for use // with apply. +// +// MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain. type MutatingAdmissionPolicyApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *MutatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"` + // Specification of the desired behavior of the MutatingAdmissionPolicy. + Spec *MutatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"` } // MutatingAdmissionPolicy constructs a declarative configuration of the MutatingAdmissionPolicy type for use with @@ -45,29 +49,14 @@ func MutatingAdmissionPolicy(name string) *MutatingAdmissionPolicyApplyConfigura return b } -// ExtractMutatingAdmissionPolicy extracts the applied configuration owned by fieldManager from -// mutatingAdmissionPolicy. If no managedFields are found in mutatingAdmissionPolicy for fieldManager, a -// MutatingAdmissionPolicyApplyConfiguration 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. +// ExtractMutatingAdmissionPolicyFrom extracts the applied configuration owned by fieldManager from +// mutatingAdmissionPolicy for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // mutatingAdmissionPolicy must be a unmodified MutatingAdmissionPolicy API object that was retrieved from the Kubernetes API. -// ExtractMutatingAdmissionPolicy provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractMutatingAdmissionPolicyFrom 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 ExtractMutatingAdmissionPolicy(mutatingAdmissionPolicy *admissionregistrationv1alpha1.MutatingAdmissionPolicy, fieldManager string) (*MutatingAdmissionPolicyApplyConfiguration, error) { - return extractMutatingAdmissionPolicy(mutatingAdmissionPolicy, fieldManager, "") -} - -// ExtractMutatingAdmissionPolicyStatus is the same as ExtractMutatingAdmissionPolicy except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractMutatingAdmissionPolicyStatus(mutatingAdmissionPolicy *admissionregistrationv1alpha1.MutatingAdmissionPolicy, fieldManager string) (*MutatingAdmissionPolicyApplyConfiguration, error) { - return extractMutatingAdmissionPolicy(mutatingAdmissionPolicy, fieldManager, "status") -} - -func extractMutatingAdmissionPolicy(mutatingAdmissionPolicy *admissionregistrationv1alpha1.MutatingAdmissionPolicy, fieldManager string, subresource string) (*MutatingAdmissionPolicyApplyConfiguration, error) { +func ExtractMutatingAdmissionPolicyFrom(mutatingAdmissionPolicy *admissionregistrationv1alpha1.MutatingAdmissionPolicy, fieldManager string, subresource string) (*MutatingAdmissionPolicyApplyConfiguration, error) { b := &MutatingAdmissionPolicyApplyConfiguration{} err := managedfields.ExtractInto(mutatingAdmissionPolicy, internal.Parser().Type("io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy"), fieldManager, b, subresource) if err != nil { @@ -79,6 +68,21 @@ func extractMutatingAdmissionPolicy(mutatingAdmissionPolicy *admissionregistrati b.WithAPIVersion("admissionregistration.k8s.io/v1alpha1") return b, nil } + +// ExtractMutatingAdmissionPolicy extracts the applied configuration owned by fieldManager from +// mutatingAdmissionPolicy. If no managedFields are found in mutatingAdmissionPolicy for fieldManager, a +// MutatingAdmissionPolicyApplyConfiguration 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. +// mutatingAdmissionPolicy must be a unmodified MutatingAdmissionPolicy API object that was retrieved from the Kubernetes API. +// ExtractMutatingAdmissionPolicy 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. +func ExtractMutatingAdmissionPolicy(mutatingAdmissionPolicy *admissionregistrationv1alpha1.MutatingAdmissionPolicy, fieldManager string) (*MutatingAdmissionPolicyApplyConfiguration, error) { + return ExtractMutatingAdmissionPolicyFrom(mutatingAdmissionPolicy, fieldManager, "") +} + func (b MutatingAdmissionPolicyApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicybinding.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicybinding.go index be0690a158be1..4964a3106d8c6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicybinding.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicybinding.go @@ -29,10 +29,24 @@ import ( // MutatingAdmissionPolicyBindingApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicyBinding type for use // with apply. +// +// MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources. +// MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators +// configure policies for clusters. +// +// For a given admission request, each binding will cause its policy to be +// evaluated N times, where N is 1 for policies/bindings that don't use +// params, otherwise N is the number of parameters selected by the binding. +// Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget). +// +// Adding/removing policies, bindings, or params can not affect whether a +// given (policy, binding, param) combination is within its own CEL budget. type MutatingAdmissionPolicyBindingApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *MutatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"` + // Specification of the desired behavior of the MutatingAdmissionPolicyBinding. + Spec *MutatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"` } // MutatingAdmissionPolicyBinding constructs a declarative configuration of the MutatingAdmissionPolicyBinding type for use with @@ -45,29 +59,14 @@ func MutatingAdmissionPolicyBinding(name string) *MutatingAdmissionPolicyBinding return b } -// ExtractMutatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from -// mutatingAdmissionPolicyBinding. If no managedFields are found in mutatingAdmissionPolicyBinding for fieldManager, a -// MutatingAdmissionPolicyBindingApplyConfiguration 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. +// ExtractMutatingAdmissionPolicyBindingFrom extracts the applied configuration owned by fieldManager from +// mutatingAdmissionPolicyBinding for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // mutatingAdmissionPolicyBinding must be a unmodified MutatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. -// ExtractMutatingAdmissionPolicyBinding provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractMutatingAdmissionPolicyBindingFrom 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 ExtractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding *admissionregistrationv1alpha1.MutatingAdmissionPolicyBinding, fieldManager string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error) { - return extractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding, fieldManager, "") -} - -// ExtractMutatingAdmissionPolicyBindingStatus is the same as ExtractMutatingAdmissionPolicyBinding except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractMutatingAdmissionPolicyBindingStatus(mutatingAdmissionPolicyBinding *admissionregistrationv1alpha1.MutatingAdmissionPolicyBinding, fieldManager string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error) { - return extractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding, fieldManager, "status") -} - -func extractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding *admissionregistrationv1alpha1.MutatingAdmissionPolicyBinding, fieldManager string, subresource string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error) { +func ExtractMutatingAdmissionPolicyBindingFrom(mutatingAdmissionPolicyBinding *admissionregistrationv1alpha1.MutatingAdmissionPolicyBinding, fieldManager string, subresource string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error) { b := &MutatingAdmissionPolicyBindingApplyConfiguration{} err := managedfields.ExtractInto(mutatingAdmissionPolicyBinding, internal.Parser().Type("io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding"), fieldManager, b, subresource) if err != nil { @@ -79,6 +78,21 @@ func extractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding *admis b.WithAPIVersion("admissionregistration.k8s.io/v1alpha1") return b, nil } + +// ExtractMutatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from +// mutatingAdmissionPolicyBinding. If no managedFields are found in mutatingAdmissionPolicyBinding for fieldManager, a +// MutatingAdmissionPolicyBindingApplyConfiguration 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. +// mutatingAdmissionPolicyBinding must be a unmodified MutatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. +// ExtractMutatingAdmissionPolicyBinding 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. +func ExtractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding *admissionregistrationv1alpha1.MutatingAdmissionPolicyBinding, fieldManager string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error) { + return ExtractMutatingAdmissionPolicyBindingFrom(mutatingAdmissionPolicyBinding, fieldManager, "") +} + func (b MutatingAdmissionPolicyBindingApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicybindingspec.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicybindingspec.go index 04729f42b1f0b..b4f5570c6289d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicybindingspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicybindingspec.go @@ -20,9 +20,27 @@ package v1alpha1 // MutatingAdmissionPolicyBindingSpecApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicyBindingSpec type for use // with apply. +// +// MutatingAdmissionPolicyBindingSpec is the specification of the MutatingAdmissionPolicyBinding. type MutatingAdmissionPolicyBindingSpecApplyConfiguration struct { - PolicyName *string `json:"policyName,omitempty"` - ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"` + // policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to. + // If the referenced resource does not exist, this binding is considered invalid and will be ignored + // Required. + PolicyName *string `json:"policyName,omitempty"` + // paramRef specifies the parameter resource used to configure the admission control policy. + // It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy. + // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied. + // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. + ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"` + // matchResources limits what resources match this binding and may be mutated by it. + // Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and + // matchConditions before the resource may be mutated. + // When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints + // and matchConditions must match for the resource to be mutated. + // Additionally, matchResources.resourceRules are optional and do not constraint matching when unset. + // Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required. + // The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. + // '*' matches CREATE, UPDATE and CONNECT. MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicyspec.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicyspec.go index 334056a372434..0c67fd750a6e1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicyspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutatingadmissionpolicyspec.go @@ -25,14 +25,74 @@ import ( // MutatingAdmissionPolicySpecApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicySpec type for use // with apply. +// +// MutatingAdmissionPolicySpec is the specification of the desired behavior of the admission policy. type MutatingAdmissionPolicySpecApplyConfiguration struct { - ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"` - MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"` - Variables []VariableApplyConfiguration `json:"variables,omitempty"` - Mutations []MutationApplyConfiguration `json:"mutations,omitempty"` - FailurePolicy *admissionregistrationv1alpha1.FailurePolicyType `json:"failurePolicy,omitempty"` - MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` - ReinvocationPolicy *v1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"` + // paramKind specifies the kind of resources used to parameterize this policy. + // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. + // If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. + // If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null. + ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"` + // matchConstraints specifies what resources this policy is designed to validate. + // The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. + // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API + // MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding. + // The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. + // '*' matches CREATE, UPDATE and CONNECT. + // Required. + MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"` + // variables contain definitions of variables that can be used in composition of other expressions. + // Each variable is defined as a named CEL expression. + // The variables defined here will be available under `variables` in other expressions of the policy + // except matchConditions because matchConditions are evaluated before the rest of the policy. + // + // The expression of a variable can refer to other variables defined earlier in the list but not those after. + // Thus, variables must be sorted by the order of first appearance and acyclic. + Variables []VariableApplyConfiguration `json:"variables,omitempty"` + // mutations contain operations to perform on matching objects. + // mutations may not be empty; a minimum of one mutation is required. + // mutations are evaluated in order, and are reinvoked according to + // the reinvocationPolicy. + // The mutations of a policy are invoked for each binding of this policy + // and reinvocation of mutations occurs on a per binding basis. + Mutations []MutationApplyConfiguration `json:"mutations,omitempty"` + // failurePolicy defines how to handle failures for the admission policy. Failures can + // occur from CEL expression parse errors, type check errors, runtime errors and invalid + // or mis-configured policy definitions or bindings. + // + // A policy is invalid if paramKind refers to a non-existent Kind. + // A binding is invalid if paramRef.name refers to a non-existent resource. + // + // failurePolicy does not define how validations that evaluate to false are handled. + // + // Allowed values are Ignore or Fail. Defaults to Fail. + FailurePolicy *admissionregistrationv1alpha1.FailurePolicyType `json:"failurePolicy,omitempty"` + // matchConditions is a list of conditions that must be met for a request to be validated. + // Match conditions filter requests that have already been matched by the matchConstraints. + // An empty list of matchConditions matches all requests. + // There are a maximum of 64 match conditions allowed. + // + // If a parameter object is provided, it can be accessed via the `params` handle in the same + // manner as validation expressions. + // + // The exact matching logic is (in order): + // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. + // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. + // 3. If any matchCondition evaluates to an error (but none are FALSE): + // - If failurePolicy=Fail, reject the request + // - If failurePolicy=Ignore, the policy is skipped + MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` + // reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding + // as part of a single admission evaluation. + // Allowed values are "Never" and "IfNeeded". + // + // Never: These mutations will not be called more than once per binding in a single admission evaluation. + // + // IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of + // order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only + // reinvoked when mutations change the object after this mutation is invoked. + // Required. + ReinvocationPolicy *v1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"` } // MutatingAdmissionPolicySpecApplyConfiguration constructs a declarative configuration of the MutatingAdmissionPolicySpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutation.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutation.go index 4ed9d93fdbb7a..001565dbd74f9 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutation.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/mutation.go @@ -24,10 +24,21 @@ import ( // MutationApplyConfiguration represents a declarative configuration of the Mutation type for use // with apply. +// +// Mutation specifies the CEL expression which is used to apply the Mutation. type MutationApplyConfiguration struct { - PatchType *admissionregistrationv1alpha1.PatchType `json:"patchType,omitempty"` - ApplyConfiguration *ApplyConfigurationApplyConfiguration `json:"applyConfiguration,omitempty"` - JSONPatch *JSONPatchApplyConfiguration `json:"jsonPatch,omitempty"` + // patchType indicates the patch strategy used. + // Allowed values are "ApplyConfiguration" and "JSONPatch". + // Required. + PatchType *admissionregistrationv1alpha1.PatchType `json:"patchType,omitempty"` + // applyConfiguration defines the desired configuration values of an object. + // The configuration is applied to the admission object using + // [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff). + // A CEL expression is used to create apply configuration. + ApplyConfiguration *ApplyConfigurationApplyConfiguration `json:"applyConfiguration,omitempty"` + // jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object. + // A CEL expression is used to create the JSON patch. + JSONPatch *JSONPatchApplyConfiguration `json:"jsonPatch,omitempty"` } // MutationApplyConfiguration constructs a declarative configuration of the Mutation type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/namedrulewithoperations.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/namedrulewithoperations.go index f630224ac476a..b9e309edc2bc2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/namedrulewithoperations.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/namedrulewithoperations.go @@ -25,8 +25,12 @@ import ( // NamedRuleWithOperationsApplyConfiguration represents a declarative configuration of the NamedRuleWithOperations type for use // with apply. +// +// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. type NamedRuleWithOperationsApplyConfiguration struct { - ResourceNames []string `json:"resourceNames,omitempty"` + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + ResourceNames []string `json:"resourceNames,omitempty"` + // RuleWithOperations is a tuple of Operations and Resources. v1.RuleWithOperationsApplyConfiguration `json:",inline"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/paramkind.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/paramkind.go index daf17fb2494e5..7e008e329c4e0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/paramkind.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/paramkind.go @@ -20,9 +20,16 @@ package v1alpha1 // ParamKindApplyConfiguration represents a declarative configuration of the ParamKind type for use // with apply. +// +// ParamKind is a tuple of Group Kind and Version. type ParamKindApplyConfiguration struct { + // APIVersion is the API group version the resources belong to. + // In format of "group/version". + // Required. APIVersion *string `json:"apiVersion,omitempty"` - Kind *string `json:"kind,omitempty"` + // Kind is the API kind the resources belong to. + // Required. + Kind *string `json:"kind,omitempty"` } // ParamKindApplyConfiguration constructs a declarative configuration of the ParamKind type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/paramref.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/paramref.go index 669fadbd40a60..6b77cd0eae30d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/paramref.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/paramref.go @@ -25,10 +25,48 @@ import ( // ParamRefApplyConfiguration represents a declarative configuration of the ParamRef type for use // with apply. +// +// ParamRef describes how to locate the params to be used as input to +// expressions of rules applied by a policy binding. type ParamRefApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Namespace *string `json:"namespace,omitempty"` - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // `name` is the name of the resource being referenced. + // + // `name` and `selector` are mutually exclusive properties. If one is set, + // the other must be unset. + Name *string `json:"name,omitempty"` + // namespace is the namespace of the referenced resource. Allows limiting + // the search for params to a specific namespace. Applies to both `name` and + // `selector` fields. + // + // A per-namespace parameter may be used by specifying a namespace-scoped + // `paramKind` in the policy and leaving this field empty. + // + // - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this + // field results in a configuration error. + // + // - If `paramKind` is namespace-scoped, the namespace of the object being + // evaluated for admission will be used when this field is left unset. Take + // care that if this is left empty the binding must not match any cluster-scoped + // resources, which will result in an error. + Namespace *string `json:"namespace,omitempty"` + // selector can be used to match multiple param objects based on their labels. + // Supply selector: {} to match all resources of the ParamKind. + // + // If multiple params are found, they are all evaluated with the policy expressions + // and the results are ANDed together. + // + // One of `name` or `selector` must be set, but `name` and `selector` are + // mutually exclusive properties. If one is set, the other must be unset. + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // `parameterNotFoundAction` controls the behavior of the binding when the resource + // exists, and name or selector is valid, but there are no parameters + // matched by the binding. If the value is set to `Allow`, then no + // matched parameters will be treated as successful validation by the binding. + // If set to `Deny`, then no matched parameters will be subject to the + // `failurePolicy` of the policy. + // + // Allowed values are `Allow` or `Deny` + // Default to `Deny` ParameterNotFoundAction *admissionregistrationv1alpha1.ParameterNotFoundActionType `json:"parameterNotFoundAction,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/typechecking.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/typechecking.go index d1a7fff50eed5..3b5bff0f3c7b8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/typechecking.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/typechecking.go @@ -20,7 +20,11 @@ package v1alpha1 // TypeCheckingApplyConfiguration represents a declarative configuration of the TypeChecking type for use // with apply. +// +// TypeChecking contains results of type checking the expressions in the +// ValidatingAdmissionPolicy type TypeCheckingApplyConfiguration struct { + // The type checking warnings for each expression. ExpressionWarnings []ExpressionWarningApplyConfiguration `json:"expressionWarnings,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicy.go index a8efff6b3e2cb..7f85ed8e2fe1c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicy.go @@ -29,11 +29,19 @@ import ( // ValidatingAdmissionPolicyApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicy type for use // with apply. +// +// ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. type ValidatingAdmissionPolicyApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"` - Status *ValidatingAdmissionPolicyStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of the ValidatingAdmissionPolicy. + Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"` + // The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy + // behaves in the expected way. + // Populated by the system. + // Read-only. + Status *ValidatingAdmissionPolicyStatusApplyConfiguration `json:"status,omitempty"` } // ValidatingAdmissionPolicy constructs a declarative configuration of the ValidatingAdmissionPolicy type for use with @@ -46,6 +54,26 @@ func ValidatingAdmissionPolicy(name string) *ValidatingAdmissionPolicyApplyConfi return b } +// ExtractValidatingAdmissionPolicyFrom extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicy for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// validatingAdmissionPolicy must be a unmodified ValidatingAdmissionPolicy API object that was retrieved from the Kubernetes API. +// ExtractValidatingAdmissionPolicyFrom 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. +func ExtractValidatingAdmissionPolicyFrom(validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicy, fieldManager string, subresource string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { + b := &ValidatingAdmissionPolicyApplyConfiguration{} + err := managedfields.ExtractInto(validatingAdmissionPolicy, internal.Parser().Type("io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(validatingAdmissionPolicy.Name) + + b.WithKind("ValidatingAdmissionPolicy") + b.WithAPIVersion("admissionregistration.k8s.io/v1alpha1") + return b, nil +} + // ExtractValidatingAdmissionPolicy extracts the applied configuration owned by fieldManager from // validatingAdmissionPolicy. If no managedFields are found in validatingAdmissionPolicy for fieldManager, a // ValidatingAdmissionPolicyApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +84,16 @@ func ValidatingAdmissionPolicy(name string) *ValidatingAdmissionPolicyApplyConfi // ExtractValidatingAdmissionPolicy 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 ExtractValidatingAdmissionPolicy(validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { - return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "") + return ExtractValidatingAdmissionPolicyFrom(validatingAdmissionPolicy, fieldManager, "") } -// ExtractValidatingAdmissionPolicyStatus is the same as ExtractValidatingAdmissionPolicy except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractValidatingAdmissionPolicyStatus extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicy for the status subresource. func ExtractValidatingAdmissionPolicyStatus(validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { - return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "status") + return ExtractValidatingAdmissionPolicyFrom(validatingAdmissionPolicy, fieldManager, "status") } -func extractValidatingAdmissionPolicy(validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicy, fieldManager string, subresource string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { - b := &ValidatingAdmissionPolicyApplyConfiguration{} - err := managedfields.ExtractInto(validatingAdmissionPolicy, internal.Parser().Type("io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(validatingAdmissionPolicy.Name) - - b.WithKind("ValidatingAdmissionPolicy") - b.WithAPIVersion("admissionregistration.k8s.io/v1alpha1") - return b, nil -} func (b ValidatingAdmissionPolicyApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicybinding.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicybinding.go index 5bcefba675007..0760e92744979 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicybinding.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicybinding.go @@ -29,10 +29,24 @@ import ( // ValidatingAdmissionPolicyBindingApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicyBinding type for use // with apply. +// +// ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. +// ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. +// +// For a given admission request, each binding will cause its policy to be +// evaluated N times, where N is 1 for policies/bindings that don't use +// params, otherwise N is the number of parameters selected by the binding. +// +// The CEL expressions of a policy must have a computed CEL cost below the maximum +// CEL budget. Each evaluation of the policy is given an independent CEL cost budget. +// Adding/removing policies, bindings, or params can not affect whether a +// given (policy, binding, param) combination is within its own CEL budget. type ValidatingAdmissionPolicyBindingApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"` + // Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. + Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"` } // ValidatingAdmissionPolicyBinding constructs a declarative configuration of the ValidatingAdmissionPolicyBinding type for use with @@ -45,29 +59,14 @@ func ValidatingAdmissionPolicyBinding(name string) *ValidatingAdmissionPolicyBin return b } -// ExtractValidatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from -// validatingAdmissionPolicyBinding. If no managedFields are found in validatingAdmissionPolicyBinding for fieldManager, a -// ValidatingAdmissionPolicyBindingApplyConfiguration 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. +// ExtractValidatingAdmissionPolicyBindingFrom extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicyBinding for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // validatingAdmissionPolicyBinding must be a unmodified ValidatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. -// ExtractValidatingAdmissionPolicyBinding provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractValidatingAdmissionPolicyBindingFrom 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 ExtractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { - return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "") -} - -// ExtractValidatingAdmissionPolicyBindingStatus is the same as ExtractValidatingAdmissionPolicyBinding except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractValidatingAdmissionPolicyBindingStatus(validatingAdmissionPolicyBinding *admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { - return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "status") -} - -func extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding, fieldManager string, subresource string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { +func ExtractValidatingAdmissionPolicyBindingFrom(validatingAdmissionPolicyBinding *admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding, fieldManager string, subresource string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { b := &ValidatingAdmissionPolicyBindingApplyConfiguration{} err := managedfields.ExtractInto(validatingAdmissionPolicyBinding, internal.Parser().Type("io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding"), fieldManager, b, subresource) if err != nil { @@ -79,6 +78,21 @@ func extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *a b.WithAPIVersion("admissionregistration.k8s.io/v1alpha1") return b, nil } + +// ExtractValidatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicyBinding. If no managedFields are found in validatingAdmissionPolicyBinding for fieldManager, a +// ValidatingAdmissionPolicyBindingApplyConfiguration 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. +// validatingAdmissionPolicyBinding must be a unmodified ValidatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. +// ExtractValidatingAdmissionPolicyBinding 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. +func ExtractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { + return ExtractValidatingAdmissionPolicyBindingFrom(validatingAdmissionPolicyBinding, fieldManager, "") +} + func (b ValidatingAdmissionPolicyBindingApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicybindingspec.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicybindingspec.go index 0f8e4e4357029..bbbd59c97a702 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicybindingspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicybindingspec.go @@ -24,10 +24,63 @@ import ( // ValidatingAdmissionPolicyBindingSpecApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use // with apply. +// +// ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct { - PolicyName *string `json:"policyName,omitempty"` - ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"` - MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"` + // PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. + // If the referenced resource does not exist, this binding is considered invalid and will be ignored + // Required. + PolicyName *string `json:"policyName,omitempty"` + // paramRef specifies the parameter resource used to configure the admission control policy. + // It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. + // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. + // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. + ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"` + // MatchResources declares what resources match this binding and will be validated by it. + // Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. + // If this is unset, all resources matched by the policy are validated by this binding + // When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. + // Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required. + MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"` + // validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. + // If a validation evaluates to false it is always enforced according to these actions. + // + // Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according + // to these actions only if the FailurePolicy is set to Fail, otherwise the failures are + // ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. + // + // validationActions is declared as a set of action values. Order does + // not matter. validationActions may not contain duplicates of the same action. + // + // The supported actions values are: + // + // "Deny" specifies that a validation failure results in a denied request. + // + // "Warn" specifies that a validation failure is reported to the request client + // in HTTP Warning headers, with a warning code of 299. Warnings can be sent + // both for allowed or denied admission responses. + // + // "Audit" specifies that a validation failure is included in the published + // audit event for the request. The audit event will contain a + // `validation.policy.admission.k8s.io/validation_failure` audit annotation + // with a value containing the details of the validation failures, formatted as + // a JSON list of objects, each with the following fields: + // - message: The validation failure message string + // - policy: The resource name of the ValidatingAdmissionPolicy + // - binding: The resource name of the ValidatingAdmissionPolicyBinding + // - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy + // - validationActions: The enforcement actions enacted for the validation failure + // Example audit annotation: + // `"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"` + // + // Clients should expect to handle additional values by ignoring + // any values not recognized. + // + // "Deny" and "Warn" may not be used together since this combination + // needlessly duplicates the validation failure both in the + // API response body and the HTTP warning headers. + // + // Required. ValidationActions []admissionregistrationv1alpha1.ValidationAction `json:"validationActions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicyspec.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicyspec.go index d5d3529949e37..ba20af8851c5a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicyspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicyspec.go @@ -24,14 +24,66 @@ import ( // ValidatingAdmissionPolicySpecApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicySpec type for use // with apply. +// +// ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. type ValidatingAdmissionPolicySpecApplyConfiguration struct { - ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"` - MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"` - Validations []ValidationApplyConfiguration `json:"validations,omitempty"` - FailurePolicy *admissionregistrationv1alpha1.FailurePolicyType `json:"failurePolicy,omitempty"` - AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"` - MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` - Variables []VariableApplyConfiguration `json:"variables,omitempty"` + // ParamKind specifies the kind of resources used to parameterize this policy. + // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. + // If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. + // If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null. + ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"` + // MatchConstraints specifies what resources this policy is designed to validate. + // The AdmissionPolicy cares about a request if it matches _all_ Constraints. + // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API + // ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. + // Required. + MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"` + // Validations contain CEL expressions which is used to apply the validation. + // Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is + // required. + Validations []ValidationApplyConfiguration `json:"validations,omitempty"` + // failurePolicy defines how to handle failures for the admission policy. Failures can + // occur from CEL expression parse errors, type check errors, runtime errors and invalid + // or mis-configured policy definitions or bindings. + // + // A policy is invalid if spec.paramKind refers to a non-existent Kind. + // A binding is invalid if spec.paramRef.name refers to a non-existent resource. + // + // failurePolicy does not define how validations that evaluate to false are handled. + // + // When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions + // define how failures are enforced. + // + // Allowed values are Ignore or Fail. Defaults to Fail. + FailurePolicy *admissionregistrationv1alpha1.FailurePolicyType `json:"failurePolicy,omitempty"` + // auditAnnotations contains CEL expressions which are used to produce audit + // annotations for the audit event of the API request. + // validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is + // required. + AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"` + // MatchConditions is a list of conditions that must be met for a request to be validated. + // Match conditions filter requests that have already been matched by the rules, + // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. + // There are a maximum of 64 match conditions allowed. + // + // If a parameter object is provided, it can be accessed via the `params` handle in the same + // manner as validation expressions. + // + // The exact matching logic is (in order): + // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. + // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. + // 3. If any matchCondition evaluates to an error (but none are FALSE): + // - If failurePolicy=Fail, reject the request + // - If failurePolicy=Ignore, the policy is skipped + MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` + // Variables contain definitions of variables that can be used in composition of other expressions. + // Each variable is defined as a named CEL expression. + // The variables defined here will be available under `variables` in other expressions of the policy + // except MatchConditions because MatchConditions are evaluated before the rest of the policy. + // + // The expression of a variable can refer to other variables defined earlier in the list but not those after. + // Thus, Variables must be sorted by the order of first appearance and acyclic. + Variables []VariableApplyConfiguration `json:"variables,omitempty"` } // ValidatingAdmissionPolicySpecApplyConfiguration constructs a declarative configuration of the ValidatingAdmissionPolicySpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicystatus.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicystatus.go index 2fec5ba477c9e..bd33b855649cc 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicystatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicystatus.go @@ -24,10 +24,16 @@ import ( // ValidatingAdmissionPolicyStatusApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicyStatus type for use // with apply. +// +// ValidatingAdmissionPolicyStatus represents the status of a ValidatingAdmissionPolicy. type ValidatingAdmissionPolicyStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"` - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + // The generation observed by the controller. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // The results of type checking for each expression. + // Presence of this field indicates the completion of the type checking. + TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"` + // The conditions represent the latest available observations of a policy's current state. + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` } // ValidatingAdmissionPolicyStatusApplyConfiguration constructs a declarative configuration of the ValidatingAdmissionPolicyStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validation.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validation.go index 5f7304373458a..24416b210ec37 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validation.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validation.go @@ -24,11 +24,77 @@ import ( // ValidationApplyConfiguration represents a declarative configuration of the Validation type for use // with apply. +// +// Validation specifies the CEL expression which is used to apply the validation. type ValidationApplyConfiguration struct { - Expression *string `json:"expression,omitempty"` - Message *string `json:"message,omitempty"` - Reason *v1.StatusReason `json:"reason,omitempty"` - MessageExpression *string `json:"messageExpression,omitempty"` + // Expression represents the expression which will be evaluated by CEL. + // ref: https://github.com/google/cel-spec + // CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: + // + // - 'object' - The object from the incoming request. The value is null for DELETE requests. + // - 'oldObject' - The existing object. The value is null for CREATE requests. + // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). + // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. + // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. + // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + // For example, a variable named 'foo' can be accessed as 'variables.foo'. + // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // + // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the + // object. No other metadata properties are accessible. + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Accessible property names are escaped according to the following rules when accessed in the expression: + // - '__' escapes to '__underscores__' + // - '.' escapes to '__dot__' + // - '-' escapes to '__dash__' + // - '/' escapes to '__slash__' + // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: + // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", + // "import", "let", "loop", "package", "namespace", "return". + // Examples: + // - Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"} + // - Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"} + // - Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"} + // + // Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. + // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: + // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and + // non-intersecting elements in `Y` are appended, retaining their partial order. + // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values + // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with + // non-intersecting keys are appended, retaining their partial order. + // Required. + Expression *string `json:"expression,omitempty"` + // Message represents the message displayed when validation fails. The message is required if the Expression contains + // line breaks. The message must not contain line breaks. + // If unset, the message is "failed rule: {Rule}". + // e.g. "must be a URL with the host matching spec.host" + // If the Expression contains line breaks. Message is required. + // The message must not contain line breaks. + // If unset, the message is "failed Expression: {Expression}". + Message *string `json:"message,omitempty"` + // Reason represents a machine-readable description of why this validation failed. + // If this is the first validation in the list to fail, this reason, as well as the + // corresponding HTTP response code, are used in the + // HTTP response to the client. + // The currently supported reasons are: "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge". + // If not set, StatusReasonInvalid is used in the response to the client. + Reason *v1.StatusReason `json:"reason,omitempty"` + // messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. + // Since messageExpression is used as a failure message, it must evaluate to a string. + // If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. + // If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced + // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string + // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and + // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. + // messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. + // Example: + // "object.x must be less than max ("+string(params.max)+")" + MessageExpression *string `json:"messageExpression,omitempty"` } // ValidationApplyConfiguration constructs a declarative configuration of the Validation type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/variable.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/variable.go index 0459dae655c75..df7e1c9db6685 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/variable.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/variable.go @@ -20,8 +20,15 @@ package v1alpha1 // VariableApplyConfiguration represents a declarative configuration of the Variable type for use // with apply. +// +// Variable is the definition of a variable that is used for composition. type VariableApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. + // The variable can be accessed in other expressions through `variables` + // For example, if name is "foo", the variable will be available as `variables.foo` + Name *string `json:"name,omitempty"` + // Expression is the expression that will be evaluated as the value of the variable. + // The CEL expression has access to the same identifiers as the CEL expressions in Validation. Expression *string `json:"expression,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/applyconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/applyconfiguration.go index af604a61f4007..c245dd9af2f15 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/applyconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/applyconfiguration.go @@ -20,7 +20,49 @@ package v1beta1 // ApplyConfigurationApplyConfiguration represents a declarative configuration of the ApplyConfiguration type for use // with apply. +// +// ApplyConfiguration defines the desired configuration values of an object. type ApplyConfigurationApplyConfiguration struct { + // expression will be evaluated by CEL to create an apply configuration. + // ref: https://github.com/google/cel-spec + // + // Apply configurations are declared in CEL using object initialization. For example, this CEL expression + // returns an apply configuration to set a single field: + // + // Object{ + // spec: Object.spec{ + // serviceAccountName: "example" + // } + // } + // + // Apply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of + // values not included in the apply configuration. + // + // CEL expressions have access to the object types needed to create apply configurations: + // + // - 'Object' - CEL type of the resource object. + // - 'Object.' - CEL type of object field (such as 'Object.spec') + // - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers') + // + // CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables: + // + // - 'object' - The object from the incoming request. The value is null for DELETE requests. + // - 'oldObject' - The existing object. The value is null for CREATE requests. + // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). + // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. + // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. + // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + // For example, a variable named 'foo' can be accessed as 'variables.foo'. + // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // + // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the + // object. No other metadata properties are accessible. + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Required. Expression *string `json:"expression,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/auditannotation.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/auditannotation.go index 8718db944755e..31cc4220dfe60 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/auditannotation.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/auditannotation.go @@ -20,8 +20,40 @@ package v1beta1 // AuditAnnotationApplyConfiguration represents a declarative configuration of the AuditAnnotation type for use // with apply. +// +// AuditAnnotation describes how to produce an audit annotation for an API request. type AuditAnnotationApplyConfiguration struct { - Key *string `json:"key,omitempty"` + // key specifies the audit annotation key. The audit annotation keys of + // a ValidatingAdmissionPolicy must be unique. The key must be a qualified + // name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. + // + // The key is combined with the resource name of the + // ValidatingAdmissionPolicy to construct an audit annotation key: + // "{ValidatingAdmissionPolicy name}/{key}". + // + // If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy + // and the same audit annotation key, the annotation key will be identical. + // In this case, the first annotation written with the key will be included + // in the audit event and all subsequent annotations with the same key + // will be discarded. + // + // Required. + Key *string `json:"key,omitempty"` + // valueExpression represents the expression which is evaluated by CEL to + // produce an audit annotation value. The expression must evaluate to either + // a string or null value. If the expression evaluates to a string, the + // audit annotation is included with the string value. If the expression + // evaluates to null or empty string the audit annotation will be omitted. + // The valueExpression may be no longer than 5kb in length. + // If the result of the valueExpression is more than 10kb in length, it + // will be truncated to 10kb. + // + // If multiple ValidatingAdmissionPolicyBinding resources match an + // API request, then the valueExpression will be evaluated for + // each binding. All unique values produced by the valueExpressions + // will be joined together in a comma-separated list. + // + // Required. ValueExpression *string `json:"valueExpression,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/expressionwarning.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/expressionwarning.go index 66cfc8cdc7574..0b0235f6f0e0c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/expressionwarning.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/expressionwarning.go @@ -20,9 +20,17 @@ package v1beta1 // ExpressionWarningApplyConfiguration represents a declarative configuration of the ExpressionWarning type for use // with apply. +// +// ExpressionWarning is a warning information that targets a specific expression. type ExpressionWarningApplyConfiguration struct { + // The path to the field that refers the expression. + // For example, the reference to the expression of the first item of + // validations is "spec.validations[0].expression" FieldRef *string `json:"fieldRef,omitempty"` - Warning *string `json:"warning,omitempty"` + // The content of type checking information in a human-readable form. + // Each line of the warning contains the type that the expression is checked + // against, followed by the type check error from the compiler. + Warning *string `json:"warning,omitempty"` } // ExpressionWarningApplyConfiguration constructs a declarative configuration of the ExpressionWarning type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/jsonpatch.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/jsonpatch.go index ea6e644c99311..729279aad083b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/jsonpatch.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/jsonpatch.go @@ -20,7 +20,73 @@ package v1beta1 // JSONPatchApplyConfiguration represents a declarative configuration of the JSONPatch type for use // with apply. +// +// JSONPatch defines a JSON Patch. type JSONPatchApplyConfiguration struct { + // expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/). + // ref: https://github.com/google/cel-spec + // + // expression must return an array of JSONPatch values. + // + // For example, this CEL expression returns a JSON patch to conditionally modify a value: + // + // [ + // JSONPatch{op: "test", path: "/spec/example", value: "Red"}, + // JSONPatch{op: "replace", path: "/spec/example", value: "Green"} + // ] + // + // To define an object for the patch value, use Object types. For example: + // + // [ + // JSONPatch{ + // op: "add", + // path: "/spec/selector", + // value: Object.spec.selector{matchLabels: {"environment": "test"}} + // } + // ] + // + // To use strings containing '/' and '~' as JSONPatch path keys, use "jsonpatch.escapeKey". For example: + // + // [ + // JSONPatch{ + // op: "add", + // path: "/metadata/labels/" + jsonpatch.escapeKey("example.com/environment"), + // value: "test" + // }, + // ] + // + // CEL expressions have access to the types needed to create JSON patches and objects: + // + // - 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'. + // See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string, + // integer, array, map or object. If set, the 'path' and 'from' fields must be set to a + // [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL + // function may be used to escape path keys containing '/' and '~'. + // - 'Object' - CEL type of the resource object. + // - 'Object.' - CEL type of object field (such as 'Object.spec') + // - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers') + // + // CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables: + // + // - 'object' - The object from the incoming request. The value is null for DELETE requests. + // - 'oldObject' - The existing object. The value is null for CREATE requests. + // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). + // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. + // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. + // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + // For example, a variable named 'foo' can be accessed as 'variables.foo'. + // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // + // CEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries) + // as well as: + // + // - 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively). + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Required. Expression *string `json:"expression,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/matchcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/matchcondition.go index 63db7fc801e37..a5c4b433ed18e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/matchcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/matchcondition.go @@ -20,8 +20,32 @@ package v1beta1 // MatchConditionApplyConfiguration represents a declarative configuration of the MatchCondition type for use // with apply. +// +// MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook. type MatchConditionApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // Name is an identifier for this match condition, used for strategic merging of MatchConditions, + // as well as providing an identifier for logging purposes. A good name should be descriptive of + // the associated expression. + // Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and + // must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or + // '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an + // optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName') + // + // Required. + Name *string `json:"name,omitempty"` + // Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. + // CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables: + // + // 'object' - The object from the incoming request. The value is null for DELETE requests. + // 'oldObject' - The existing object. The value is null for CREATE requests. + // 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). + // 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/ + // + // Required. Expression *string `json:"expression,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/matchresources.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/matchresources.go index 4005e55a333f8..a74a65fd64ef9 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/matchresources.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/matchresources.go @@ -25,12 +25,88 @@ import ( // MatchResourcesApplyConfiguration represents a declarative configuration of the MatchResources type for use // with apply. +// +// MatchResources decides whether to run the admission control policy on an object based +// on whether it meets the match criteria. +// The exclude rules take precedence over include rules (if a resource matches both, it is excluded) type MatchResourcesApplyConfiguration struct { - NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` - ObjectSelector *v1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` - ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"` - ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"` - MatchPolicy *admissionregistrationv1beta1.MatchPolicyType `json:"matchPolicy,omitempty"` + // NamespaceSelector decides whether to run the admission control policy on an object based + // on whether the namespace for that object matches the selector. If the + // object itself is a namespace, the matching is performed on + // object.metadata.labels. If the object is another cluster scoped resource, + // it never skips the policy. + // + // For example, to run the webhook on any objects whose namespace is not + // associated with "runlevel" of "0" or "1"; you will set the selector as + // follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "runlevel", + // "operator": "NotIn", + // "values": [ + // "0", + // "1" + // ] + // } + // ] + // } + // + // If instead you want to only run the policy on any objects whose + // namespace is associated with the "environment" of "prod" or "staging"; + // you will set the selector as follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "environment", + // "operator": "In", + // "values": [ + // "prod", + // "staging" + // ] + // } + // ] + // } + // + // See + // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + // for more examples of label selectors. + // + // Default to the empty LabelSelector, which matches everything. + NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` + // ObjectSelector decides whether to run the validation based on if the + // object has matching labels. objectSelector is evaluated against both + // the oldObject and newObject that would be sent to the cel validation, and + // is considered to match if either object matches the selector. A null + // object (oldObject in the case of create, or newObject in the case of + // delete) or an object that cannot have labels (like a + // DeploymentRollback or a PodProxyOptions object) is not considered to + // match. + // Use the object selector only if the webhook is opt-in, because end + // users may skip the admission webhook by setting the labels. + // Default to the empty LabelSelector, which matches everything. + ObjectSelector *v1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` + // ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. + // The policy cares about an operation if it matches _any_ Rule. + ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"` + // ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. + // The exclude rules take precedence over include rules (if a resource matches both, it is excluded) + ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"` + // matchPolicy defines how the "MatchResources" list is used to match incoming requests. + // Allowed values are "Exact" or "Equivalent". + // + // - Exact: match a request only if it exactly matches a specified rule. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. + // + // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. + // + // Defaults to "Equivalent" + MatchPolicy *admissionregistrationv1beta1.MatchPolicyType `json:"matchPolicy,omitempty"` } // MatchResourcesApplyConfiguration constructs a declarative configuration of the MatchResources type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicy.go index 41d30201f9caa..8812dee13070a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicy.go @@ -29,10 +29,14 @@ import ( // MutatingAdmissionPolicyApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicy type for use // with apply. +// +// MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain. type MutatingAdmissionPolicyApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *MutatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"` + // Specification of the desired behavior of the MutatingAdmissionPolicy. + Spec *MutatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"` } // MutatingAdmissionPolicy constructs a declarative configuration of the MutatingAdmissionPolicy type for use with @@ -45,29 +49,14 @@ func MutatingAdmissionPolicy(name string) *MutatingAdmissionPolicyApplyConfigura return b } -// ExtractMutatingAdmissionPolicy extracts the applied configuration owned by fieldManager from -// mutatingAdmissionPolicy. If no managedFields are found in mutatingAdmissionPolicy for fieldManager, a -// MutatingAdmissionPolicyApplyConfiguration 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. +// ExtractMutatingAdmissionPolicyFrom extracts the applied configuration owned by fieldManager from +// mutatingAdmissionPolicy for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // mutatingAdmissionPolicy must be a unmodified MutatingAdmissionPolicy API object that was retrieved from the Kubernetes API. -// ExtractMutatingAdmissionPolicy provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractMutatingAdmissionPolicyFrom 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 ExtractMutatingAdmissionPolicy(mutatingAdmissionPolicy *admissionregistrationv1beta1.MutatingAdmissionPolicy, fieldManager string) (*MutatingAdmissionPolicyApplyConfiguration, error) { - return extractMutatingAdmissionPolicy(mutatingAdmissionPolicy, fieldManager, "") -} - -// ExtractMutatingAdmissionPolicyStatus is the same as ExtractMutatingAdmissionPolicy except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractMutatingAdmissionPolicyStatus(mutatingAdmissionPolicy *admissionregistrationv1beta1.MutatingAdmissionPolicy, fieldManager string) (*MutatingAdmissionPolicyApplyConfiguration, error) { - return extractMutatingAdmissionPolicy(mutatingAdmissionPolicy, fieldManager, "status") -} - -func extractMutatingAdmissionPolicy(mutatingAdmissionPolicy *admissionregistrationv1beta1.MutatingAdmissionPolicy, fieldManager string, subresource string) (*MutatingAdmissionPolicyApplyConfiguration, error) { +func ExtractMutatingAdmissionPolicyFrom(mutatingAdmissionPolicy *admissionregistrationv1beta1.MutatingAdmissionPolicy, fieldManager string, subresource string) (*MutatingAdmissionPolicyApplyConfiguration, error) { b := &MutatingAdmissionPolicyApplyConfiguration{} err := managedfields.ExtractInto(mutatingAdmissionPolicy, internal.Parser().Type("io.k8s.api.admissionregistration.v1beta1.MutatingAdmissionPolicy"), fieldManager, b, subresource) if err != nil { @@ -79,6 +68,21 @@ func extractMutatingAdmissionPolicy(mutatingAdmissionPolicy *admissionregistrati b.WithAPIVersion("admissionregistration.k8s.io/v1beta1") return b, nil } + +// ExtractMutatingAdmissionPolicy extracts the applied configuration owned by fieldManager from +// mutatingAdmissionPolicy. If no managedFields are found in mutatingAdmissionPolicy for fieldManager, a +// MutatingAdmissionPolicyApplyConfiguration 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. +// mutatingAdmissionPolicy must be a unmodified MutatingAdmissionPolicy API object that was retrieved from the Kubernetes API. +// ExtractMutatingAdmissionPolicy 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. +func ExtractMutatingAdmissionPolicy(mutatingAdmissionPolicy *admissionregistrationv1beta1.MutatingAdmissionPolicy, fieldManager string) (*MutatingAdmissionPolicyApplyConfiguration, error) { + return ExtractMutatingAdmissionPolicyFrom(mutatingAdmissionPolicy, fieldManager, "") +} + func (b MutatingAdmissionPolicyApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicybinding.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicybinding.go index 05ab5f6e4a06c..7ee4a731e13f8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicybinding.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicybinding.go @@ -29,10 +29,24 @@ import ( // MutatingAdmissionPolicyBindingApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicyBinding type for use // with apply. +// +// MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources. +// MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators +// configure policies for clusters. +// +// For a given admission request, each binding will cause its policy to be +// evaluated N times, where N is 1 for policies/bindings that don't use +// params, otherwise N is the number of parameters selected by the binding. +// Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget). +// +// Adding/removing policies, bindings, or params can not affect whether a +// given (policy, binding, param) combination is within its own CEL budget. type MutatingAdmissionPolicyBindingApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *MutatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"` + // Specification of the desired behavior of the MutatingAdmissionPolicyBinding. + Spec *MutatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"` } // MutatingAdmissionPolicyBinding constructs a declarative configuration of the MutatingAdmissionPolicyBinding type for use with @@ -45,29 +59,14 @@ func MutatingAdmissionPolicyBinding(name string) *MutatingAdmissionPolicyBinding return b } -// ExtractMutatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from -// mutatingAdmissionPolicyBinding. If no managedFields are found in mutatingAdmissionPolicyBinding for fieldManager, a -// MutatingAdmissionPolicyBindingApplyConfiguration 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. +// ExtractMutatingAdmissionPolicyBindingFrom extracts the applied configuration owned by fieldManager from +// mutatingAdmissionPolicyBinding for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // mutatingAdmissionPolicyBinding must be a unmodified MutatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. -// ExtractMutatingAdmissionPolicyBinding provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractMutatingAdmissionPolicyBindingFrom 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 ExtractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding *admissionregistrationv1beta1.MutatingAdmissionPolicyBinding, fieldManager string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error) { - return extractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding, fieldManager, "") -} - -// ExtractMutatingAdmissionPolicyBindingStatus is the same as ExtractMutatingAdmissionPolicyBinding except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractMutatingAdmissionPolicyBindingStatus(mutatingAdmissionPolicyBinding *admissionregistrationv1beta1.MutatingAdmissionPolicyBinding, fieldManager string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error) { - return extractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding, fieldManager, "status") -} - -func extractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding *admissionregistrationv1beta1.MutatingAdmissionPolicyBinding, fieldManager string, subresource string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error) { +func ExtractMutatingAdmissionPolicyBindingFrom(mutatingAdmissionPolicyBinding *admissionregistrationv1beta1.MutatingAdmissionPolicyBinding, fieldManager string, subresource string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error) { b := &MutatingAdmissionPolicyBindingApplyConfiguration{} err := managedfields.ExtractInto(mutatingAdmissionPolicyBinding, internal.Parser().Type("io.k8s.api.admissionregistration.v1beta1.MutatingAdmissionPolicyBinding"), fieldManager, b, subresource) if err != nil { @@ -79,6 +78,21 @@ func extractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding *admis b.WithAPIVersion("admissionregistration.k8s.io/v1beta1") return b, nil } + +// ExtractMutatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from +// mutatingAdmissionPolicyBinding. If no managedFields are found in mutatingAdmissionPolicyBinding for fieldManager, a +// MutatingAdmissionPolicyBindingApplyConfiguration 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. +// mutatingAdmissionPolicyBinding must be a unmodified MutatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. +// ExtractMutatingAdmissionPolicyBinding 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. +func ExtractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding *admissionregistrationv1beta1.MutatingAdmissionPolicyBinding, fieldManager string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error) { + return ExtractMutatingAdmissionPolicyBindingFrom(mutatingAdmissionPolicyBinding, fieldManager, "") +} + func (b MutatingAdmissionPolicyBindingApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicybindingspec.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicybindingspec.go index 6dead7ccc2eb5..57932b927777e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicybindingspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicybindingspec.go @@ -20,9 +20,27 @@ package v1beta1 // MutatingAdmissionPolicyBindingSpecApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicyBindingSpec type for use // with apply. +// +// MutatingAdmissionPolicyBindingSpec is the specification of the MutatingAdmissionPolicyBinding. type MutatingAdmissionPolicyBindingSpecApplyConfiguration struct { - PolicyName *string `json:"policyName,omitempty"` - ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"` + // policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to. + // If the referenced resource does not exist, this binding is considered invalid and will be ignored + // Required. + PolicyName *string `json:"policyName,omitempty"` + // paramRef specifies the parameter resource used to configure the admission control policy. + // It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy. + // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied. + // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. + ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"` + // matchResources limits what resources match this binding and may be mutated by it. + // Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and + // matchConditions before the resource may be mutated. + // When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints + // and matchConditions must match for the resource to be mutated. + // Additionally, matchResources.resourceRules are optional and do not constraint matching when unset. + // Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required. + // The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. + // '*' matches CREATE, UPDATE and CONNECT. MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicyspec.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicyspec.go index 629d4e3632c69..6de745a4ea50d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicyspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingadmissionpolicyspec.go @@ -25,14 +25,74 @@ import ( // MutatingAdmissionPolicySpecApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicySpec type for use // with apply. +// +// MutatingAdmissionPolicySpec is the specification of the desired behavior of the admission policy. type MutatingAdmissionPolicySpecApplyConfiguration struct { - ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"` - MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"` - Variables []VariableApplyConfiguration `json:"variables,omitempty"` - Mutations []MutationApplyConfiguration `json:"mutations,omitempty"` - FailurePolicy *admissionregistrationv1beta1.FailurePolicyType `json:"failurePolicy,omitempty"` - MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` - ReinvocationPolicy *v1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"` + // paramKind specifies the kind of resources used to parameterize this policy. + // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. + // If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. + // If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null. + ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"` + // matchConstraints specifies what resources this policy is designed to validate. + // The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. + // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API + // MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding. + // The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. + // '*' matches CREATE, UPDATE and CONNECT. + // Required. + MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"` + // variables contain definitions of variables that can be used in composition of other expressions. + // Each variable is defined as a named CEL expression. + // The variables defined here will be available under `variables` in other expressions of the policy + // except matchConditions because matchConditions are evaluated before the rest of the policy. + // + // The expression of a variable can refer to other variables defined earlier in the list but not those after. + // Thus, variables must be sorted by the order of first appearance and acyclic. + Variables []VariableApplyConfiguration `json:"variables,omitempty"` + // mutations contain operations to perform on matching objects. + // mutations may not be empty; a minimum of one mutation is required. + // mutations are evaluated in order, and are reinvoked according to + // the reinvocationPolicy. + // The mutations of a policy are invoked for each binding of this policy + // and reinvocation of mutations occurs on a per binding basis. + Mutations []MutationApplyConfiguration `json:"mutations,omitempty"` + // failurePolicy defines how to handle failures for the admission policy. Failures can + // occur from CEL expression parse errors, type check errors, runtime errors and invalid + // or mis-configured policy definitions or bindings. + // + // A policy is invalid if paramKind refers to a non-existent Kind. + // A binding is invalid if paramRef.name refers to a non-existent resource. + // + // failurePolicy does not define how validations that evaluate to false are handled. + // + // Allowed values are Ignore or Fail. Defaults to Fail. + FailurePolicy *admissionregistrationv1beta1.FailurePolicyType `json:"failurePolicy,omitempty"` + // matchConditions is a list of conditions that must be met for a request to be validated. + // Match conditions filter requests that have already been matched by the matchConstraints. + // An empty list of matchConditions matches all requests. + // There are a maximum of 64 match conditions allowed. + // + // If a parameter object is provided, it can be accessed via the `params` handle in the same + // manner as validation expressions. + // + // The exact matching logic is (in order): + // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. + // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. + // 3. If any matchCondition evaluates to an error (but none are FALSE): + // - If failurePolicy=Fail, reject the request + // - If failurePolicy=Ignore, the policy is skipped + MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` + // reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding + // as part of a single admission evaluation. + // Allowed values are "Never" and "IfNeeded". + // + // Never: These mutations will not be called more than once per binding in a single admission evaluation. + // + // IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of + // order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only + // reinvoked when mutations change the object after this mutation is invoked. + // Required. + ReinvocationPolicy *v1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"` } // MutatingAdmissionPolicySpecApplyConfiguration constructs a declarative configuration of the MutatingAdmissionPolicySpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingwebhook.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingwebhook.go index f7eae58a535ad..af93de8a951e3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingwebhook.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingwebhook.go @@ -27,19 +27,149 @@ import ( // MutatingWebhookApplyConfiguration represents a declarative configuration of the MutatingWebhook type for use // with apply. +// +// MutatingWebhook describes an admission webhook and the resources and operations it applies to. type MutatingWebhookApplyConfiguration struct { - Name *string `json:"name,omitempty"` - ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"` - Rules []v1.RuleWithOperationsApplyConfiguration `json:"rules,omitempty"` - FailurePolicy *admissionregistrationv1beta1.FailurePolicyType `json:"failurePolicy,omitempty"` - MatchPolicy *admissionregistrationv1beta1.MatchPolicyType `json:"matchPolicy,omitempty"` - NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` - ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` - SideEffects *admissionregistrationv1beta1.SideEffectClass `json:"sideEffects,omitempty"` - TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` - AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"` - ReinvocationPolicy *admissionregistrationv1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"` - MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` + // The name of the admission webhook. + // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where + // "imagepolicy" is the name of the webhook, and kubernetes.io is the name + // of the organization. + // Required. + Name *string `json:"name,omitempty"` + // ClientConfig defines how to communicate with the hook. + // Required + ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"` + // Rules describes what operations on what resources/subresources the webhook cares about. + // The webhook cares about an operation if it matches _any_ Rule. + // However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks + // from putting the cluster in a state which cannot be recovered from without completely + // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called + // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + Rules []v1.RuleWithOperationsApplyConfiguration `json:"rules,omitempty"` + // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - + // allowed values are Ignore or Fail. Defaults to Ignore. + FailurePolicy *admissionregistrationv1beta1.FailurePolicyType `json:"failurePolicy,omitempty"` + // matchPolicy defines how the "rules" list is used to match incoming requests. + // Allowed values are "Exact" or "Equivalent". + // + // - Exact: match a request only if it exactly matches a specified rule. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. + // + // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. + // + // Defaults to "Exact" + MatchPolicy *admissionregistrationv1beta1.MatchPolicyType `json:"matchPolicy,omitempty"` + // NamespaceSelector decides whether to run the webhook on an object based + // on whether the namespace for that object matches the selector. If the + // object itself is a namespace, the matching is performed on + // object.metadata.labels. If the object is another cluster scoped resource, + // it never skips the webhook. + // + // For example, to run the webhook on any objects whose namespace is not + // associated with "runlevel" of "0" or "1"; you will set the selector as + // follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "runlevel", + // "operator": "NotIn", + // "values": [ + // "0", + // "1" + // ] + // } + // ] + // } + // + // If instead you want to only run the webhook on any objects whose + // namespace is associated with the "environment" of "prod" or "staging"; + // you will set the selector as follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "environment", + // "operator": "In", + // "values": [ + // "prod", + // "staging" + // ] + // } + // ] + // } + // + // See + // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + // for more examples of label selectors. + // + // Default to the empty LabelSelector, which matches everything. + NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` + // ObjectSelector decides whether to run the webhook based on if the + // object has matching labels. objectSelector is evaluated against both + // the oldObject and newObject that would be sent to the webhook, and + // is considered to match if either object matches the selector. A null + // object (oldObject in the case of create, or newObject in the case of + // delete) or an object that cannot have labels (like a + // DeploymentRollback or a PodProxyOptions object) is not considered to + // match. + // Use the object selector only if the webhook is opt-in, because end + // users may skip the admission webhook by setting the labels. + // Default to the empty LabelSelector, which matches everything. + ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` + // SideEffects states whether this webhook has side effects. + // Acceptable values are: Unknown, None, Some, NoneOnDryRun + // Webhooks with side effects MUST implement a reconciliation system, since a request may be + // rejected by a future step in the admission chain and the side effects therefore need to be undone. + // Requests with the dryRun attribute will be auto-rejected if they match a webhook with + // sideEffects == Unknown or Some. Defaults to Unknown. + SideEffects *admissionregistrationv1beta1.SideEffectClass `json:"sideEffects,omitempty"` + // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, + // the webhook call will be ignored or the API call will fail based on the + // failure policy. + // The timeout value must be between 1 and 30 seconds. + // Default to 30 seconds. + TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` + // AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` + // versions the Webhook expects. API server will try to use first version in + // the list which it supports. If none of the versions specified in this list + // supported by API server, validation will fail for this object. + // If a persisted webhook configuration specifies allowed versions and does not + // include any versions known to the API Server, calls to the webhook will fail + // and be subject to the failure policy. + // Default to `['v1beta1']`. + AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"` + // reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. + // Allowed values are "Never" and "IfNeeded". + // + // Never: the webhook will not be called more than once in a single admission evaluation. + // + // IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation + // if the object being admitted is modified by other admission plugins after the initial webhook call. + // Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. + // Note: + // * the number of additional invocations is not guaranteed to be exactly one. + // * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. + // * webhooks that use this option may be reordered to minimize the number of additional invocations. + // * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead. + // + // Defaults to "Never". + ReinvocationPolicy *admissionregistrationv1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"` + // MatchConditions is a list of conditions that must be met for a request to be sent to this + // webhook. Match conditions filter requests that have already been matched by the rules, + // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. + // There are a maximum of 64 match conditions allowed. + // + // The exact matching logic is (in order): + // 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. + // 2. If ALL matchConditions evaluate to TRUE, the webhook is called. + // 3. If any matchCondition evaluates to an error (but none are FALSE): + // - If failurePolicy=Fail, reject the request + // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped + MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` } // MutatingWebhookApplyConfiguration constructs a declarative configuration of the MutatingWebhook type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index 2e70502a38405..d51d71a328ff6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -29,10 +29,15 @@ import ( // MutatingWebhookConfigurationApplyConfiguration represents a declarative configuration of the MutatingWebhookConfiguration type for use // with apply. +// +// MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. +// Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration instead. type MutatingWebhookConfigurationApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Webhooks []MutatingWebhookApplyConfiguration `json:"webhooks,omitempty"` + // Webhooks is a list of webhooks and the affected resources and operations. + Webhooks []MutatingWebhookApplyConfiguration `json:"webhooks,omitempty"` } // MutatingWebhookConfiguration constructs a declarative configuration of the MutatingWebhookConfiguration type for use with @@ -45,29 +50,14 @@ func MutatingWebhookConfiguration(name string) *MutatingWebhookConfigurationAppl return b } -// ExtractMutatingWebhookConfiguration extracts the applied configuration owned by fieldManager from -// mutatingWebhookConfiguration. If no managedFields are found in mutatingWebhookConfiguration for fieldManager, a -// MutatingWebhookConfigurationApplyConfiguration 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. +// ExtractMutatingWebhookConfigurationFrom extracts the applied configuration owned by fieldManager from +// mutatingWebhookConfiguration for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // mutatingWebhookConfiguration must be a unmodified MutatingWebhookConfiguration API object that was retrieved from the Kubernetes API. -// ExtractMutatingWebhookConfiguration provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractMutatingWebhookConfigurationFrom 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 ExtractMutatingWebhookConfiguration(mutatingWebhookConfiguration *admissionregistrationv1beta1.MutatingWebhookConfiguration, fieldManager string) (*MutatingWebhookConfigurationApplyConfiguration, error) { - return extractMutatingWebhookConfiguration(mutatingWebhookConfiguration, fieldManager, "") -} - -// ExtractMutatingWebhookConfigurationStatus is the same as ExtractMutatingWebhookConfiguration except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractMutatingWebhookConfigurationStatus(mutatingWebhookConfiguration *admissionregistrationv1beta1.MutatingWebhookConfiguration, fieldManager string) (*MutatingWebhookConfigurationApplyConfiguration, error) { - return extractMutatingWebhookConfiguration(mutatingWebhookConfiguration, fieldManager, "status") -} - -func extractMutatingWebhookConfiguration(mutatingWebhookConfiguration *admissionregistrationv1beta1.MutatingWebhookConfiguration, fieldManager string, subresource string) (*MutatingWebhookConfigurationApplyConfiguration, error) { +func ExtractMutatingWebhookConfigurationFrom(mutatingWebhookConfiguration *admissionregistrationv1beta1.MutatingWebhookConfiguration, fieldManager string, subresource string) (*MutatingWebhookConfigurationApplyConfiguration, error) { b := &MutatingWebhookConfigurationApplyConfiguration{} err := managedfields.ExtractInto(mutatingWebhookConfiguration, internal.Parser().Type("io.k8s.api.admissionregistration.v1beta1.MutatingWebhookConfiguration"), fieldManager, b, subresource) if err != nil { @@ -79,6 +69,21 @@ func extractMutatingWebhookConfiguration(mutatingWebhookConfiguration *admission b.WithAPIVersion("admissionregistration.k8s.io/v1beta1") return b, nil } + +// ExtractMutatingWebhookConfiguration extracts the applied configuration owned by fieldManager from +// mutatingWebhookConfiguration. If no managedFields are found in mutatingWebhookConfiguration for fieldManager, a +// MutatingWebhookConfigurationApplyConfiguration 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. +// mutatingWebhookConfiguration must be a unmodified MutatingWebhookConfiguration API object that was retrieved from the Kubernetes API. +// ExtractMutatingWebhookConfiguration 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. +func ExtractMutatingWebhookConfiguration(mutatingWebhookConfiguration *admissionregistrationv1beta1.MutatingWebhookConfiguration, fieldManager string) (*MutatingWebhookConfigurationApplyConfiguration, error) { + return ExtractMutatingWebhookConfigurationFrom(mutatingWebhookConfiguration, fieldManager, "") +} + func (b MutatingWebhookConfigurationApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutation.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutation.go index ab50af6d795f5..b4caf4c41efd7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutation.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutation.go @@ -24,10 +24,21 @@ import ( // MutationApplyConfiguration represents a declarative configuration of the Mutation type for use // with apply. +// +// Mutation specifies the CEL expression which is used to apply the Mutation. type MutationApplyConfiguration struct { - PatchType *admissionregistrationv1beta1.PatchType `json:"patchType,omitempty"` - ApplyConfiguration *ApplyConfigurationApplyConfiguration `json:"applyConfiguration,omitempty"` - JSONPatch *JSONPatchApplyConfiguration `json:"jsonPatch,omitempty"` + // patchType indicates the patch strategy used. + // Allowed values are "ApplyConfiguration" and "JSONPatch". + // Required. + PatchType *admissionregistrationv1beta1.PatchType `json:"patchType,omitempty"` + // applyConfiguration defines the desired configuration values of an object. + // The configuration is applied to the admission object using + // [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff). + // A CEL expression is used to create apply configuration. + ApplyConfiguration *ApplyConfigurationApplyConfiguration `json:"applyConfiguration,omitempty"` + // jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object. + // A CEL expression is used to create the JSON patch. + JSONPatch *JSONPatchApplyConfiguration `json:"jsonPatch,omitempty"` } // MutationApplyConfiguration constructs a declarative configuration of the Mutation type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/namedrulewithoperations.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/namedrulewithoperations.go index 62c617d2fa056..8b189dbb891ed 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/namedrulewithoperations.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/namedrulewithoperations.go @@ -25,8 +25,12 @@ import ( // NamedRuleWithOperationsApplyConfiguration represents a declarative configuration of the NamedRuleWithOperations type for use // with apply. +// +// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. type NamedRuleWithOperationsApplyConfiguration struct { - ResourceNames []string `json:"resourceNames,omitempty"` + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + ResourceNames []string `json:"resourceNames,omitempty"` + // RuleWithOperations is a tuple of Operations and Resources. v1.RuleWithOperationsApplyConfiguration `json:",inline"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/paramkind.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/paramkind.go index 39831252818da..dbbef1b6e0bea 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/paramkind.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/paramkind.go @@ -20,9 +20,16 @@ package v1beta1 // ParamKindApplyConfiguration represents a declarative configuration of the ParamKind type for use // with apply. +// +// ParamKind is a tuple of Group Kind and Version. type ParamKindApplyConfiguration struct { + // APIVersion is the API group version the resources belong to. + // In format of "group/version". + // Required. APIVersion *string `json:"apiVersion,omitempty"` - Kind *string `json:"kind,omitempty"` + // Kind is the API kind the resources belong to. + // Required. + Kind *string `json:"kind,omitempty"` } // ParamKindApplyConfiguration constructs a declarative configuration of the ParamKind type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/paramref.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/paramref.go index 5143b0cb90e9f..724cd1a0de548 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/paramref.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/paramref.go @@ -25,10 +25,53 @@ import ( // ParamRefApplyConfiguration represents a declarative configuration of the ParamRef type for use // with apply. +// +// ParamRef describes how to locate the params to be used as input to +// expressions of rules applied by a policy binding. type ParamRefApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Namespace *string `json:"namespace,omitempty"` - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // name is the name of the resource being referenced. + // + // One of `name` or `selector` must be set, but `name` and `selector` are + // mutually exclusive properties. If one is set, the other must be unset. + // + // A single parameter used for all admission requests can be configured + // by setting the `name` field, leaving `selector` blank, and setting namespace + // if `paramKind` is namespace-scoped. + Name *string `json:"name,omitempty"` + // namespace is the namespace of the referenced resource. Allows limiting + // the search for params to a specific namespace. Applies to both `name` and + // `selector` fields. + // + // A per-namespace parameter may be used by specifying a namespace-scoped + // `paramKind` in the policy and leaving this field empty. + // + // - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this + // field results in a configuration error. + // + // - If `paramKind` is namespace-scoped, the namespace of the object being + // evaluated for admission will be used when this field is left unset. Take + // care that if this is left empty the binding must not match any cluster-scoped + // resources, which will result in an error. + Namespace *string `json:"namespace,omitempty"` + // selector can be used to match multiple param objects based on their labels. + // Supply selector: {} to match all resources of the ParamKind. + // + // If multiple params are found, they are all evaluated with the policy expressions + // and the results are ANDed together. + // + // One of `name` or `selector` must be set, but `name` and `selector` are + // mutually exclusive properties. If one is set, the other must be unset. + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // `parameterNotFoundAction` controls the behavior of the binding when the resource + // exists, and name or selector is valid, but there are no parameters + // matched by the binding. If the value is set to `Allow`, then no + // matched parameters will be treated as successful validation by the binding. + // If set to `Deny`, then no matched parameters will be subject to the + // `failurePolicy` of the policy. + // + // Allowed values are `Allow` or `Deny` + // + // Required ParameterNotFoundAction *admissionregistrationv1beta1.ParameterNotFoundActionType `json:"parameterNotFoundAction,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/servicereference.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/servicereference.go index 70cc6b5b27198..9591d48a873d5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/servicereference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/servicereference.go @@ -20,11 +20,22 @@ package v1beta1 // ServiceReferenceApplyConfiguration represents a declarative configuration of the ServiceReference type for use // with apply. +// +// ServiceReference holds a reference to Service.legacy.k8s.io type ServiceReferenceApplyConfiguration struct { + // `namespace` is the namespace of the service. + // Required Namespace *string `json:"namespace,omitempty"` - Name *string `json:"name,omitempty"` - Path *string `json:"path,omitempty"` - Port *int32 `json:"port,omitempty"` + // `name` is the name of the service. + // Required + Name *string `json:"name,omitempty"` + // `path` is an optional URL path which will be sent in any request to + // this service. + Path *string `json:"path,omitempty"` + // If specified, the port on the service that hosting webhook. + // Default to 443 for backward compatibility. + // `port` should be a valid port number (1-65535, inclusive). + Port *int32 `json:"port,omitempty"` } // ServiceReferenceApplyConfiguration constructs a declarative configuration of the ServiceReference type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/typechecking.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/typechecking.go index cea6e11deed3b..b3b26edb83276 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/typechecking.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/typechecking.go @@ -20,7 +20,11 @@ package v1beta1 // TypeCheckingApplyConfiguration represents a declarative configuration of the TypeChecking type for use // with apply. +// +// TypeChecking contains results of type checking the expressions in the +// ValidatingAdmissionPolicy type TypeCheckingApplyConfiguration struct { + // The type checking warnings for each expression. ExpressionWarnings []ExpressionWarningApplyConfiguration `json:"expressionWarnings,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicy.go index 84f9dea53a9a7..b8eba927d3a5d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicy.go @@ -29,11 +29,19 @@ import ( // ValidatingAdmissionPolicyApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicy type for use // with apply. +// +// ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. type ValidatingAdmissionPolicyApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"` - Status *ValidatingAdmissionPolicyStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of the ValidatingAdmissionPolicy. + Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"` + // The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy + // behaves in the expected way. + // Populated by the system. + // Read-only. + Status *ValidatingAdmissionPolicyStatusApplyConfiguration `json:"status,omitempty"` } // ValidatingAdmissionPolicy constructs a declarative configuration of the ValidatingAdmissionPolicy type for use with @@ -46,6 +54,26 @@ func ValidatingAdmissionPolicy(name string) *ValidatingAdmissionPolicyApplyConfi return b } +// ExtractValidatingAdmissionPolicyFrom extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicy for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// validatingAdmissionPolicy must be a unmodified ValidatingAdmissionPolicy API object that was retrieved from the Kubernetes API. +// ExtractValidatingAdmissionPolicyFrom 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. +func ExtractValidatingAdmissionPolicyFrom(validatingAdmissionPolicy *admissionregistrationv1beta1.ValidatingAdmissionPolicy, fieldManager string, subresource string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { + b := &ValidatingAdmissionPolicyApplyConfiguration{} + err := managedfields.ExtractInto(validatingAdmissionPolicy, internal.Parser().Type("io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(validatingAdmissionPolicy.Name) + + b.WithKind("ValidatingAdmissionPolicy") + b.WithAPIVersion("admissionregistration.k8s.io/v1beta1") + return b, nil +} + // ExtractValidatingAdmissionPolicy extracts the applied configuration owned by fieldManager from // validatingAdmissionPolicy. If no managedFields are found in validatingAdmissionPolicy for fieldManager, a // ValidatingAdmissionPolicyApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +84,16 @@ func ValidatingAdmissionPolicy(name string) *ValidatingAdmissionPolicyApplyConfi // ExtractValidatingAdmissionPolicy 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 ExtractValidatingAdmissionPolicy(validatingAdmissionPolicy *admissionregistrationv1beta1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { - return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "") + return ExtractValidatingAdmissionPolicyFrom(validatingAdmissionPolicy, fieldManager, "") } -// ExtractValidatingAdmissionPolicyStatus is the same as ExtractValidatingAdmissionPolicy except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractValidatingAdmissionPolicyStatus extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicy for the status subresource. func ExtractValidatingAdmissionPolicyStatus(validatingAdmissionPolicy *admissionregistrationv1beta1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { - return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "status") + return ExtractValidatingAdmissionPolicyFrom(validatingAdmissionPolicy, fieldManager, "status") } -func extractValidatingAdmissionPolicy(validatingAdmissionPolicy *admissionregistrationv1beta1.ValidatingAdmissionPolicy, fieldManager string, subresource string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { - b := &ValidatingAdmissionPolicyApplyConfiguration{} - err := managedfields.ExtractInto(validatingAdmissionPolicy, internal.Parser().Type("io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(validatingAdmissionPolicy.Name) - - b.WithKind("ValidatingAdmissionPolicy") - b.WithAPIVersion("admissionregistration.k8s.io/v1beta1") - return b, nil -} func (b ValidatingAdmissionPolicyApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicybinding.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicybinding.go index c0cdef9918cb6..db33d910c234e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicybinding.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicybinding.go @@ -29,10 +29,24 @@ import ( // ValidatingAdmissionPolicyBindingApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicyBinding type for use // with apply. +// +// ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. +// ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. +// +// For a given admission request, each binding will cause its policy to be +// evaluated N times, where N is 1 for policies/bindings that don't use +// params, otherwise N is the number of parameters selected by the binding. +// +// The CEL expressions of a policy must have a computed CEL cost below the maximum +// CEL budget. Each evaluation of the policy is given an independent CEL cost budget. +// Adding/removing policies, bindings, or params can not affect whether a +// given (policy, binding, param) combination is within its own CEL budget. type ValidatingAdmissionPolicyBindingApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"` + // Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. + Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"` } // ValidatingAdmissionPolicyBinding constructs a declarative configuration of the ValidatingAdmissionPolicyBinding type for use with @@ -45,29 +59,14 @@ func ValidatingAdmissionPolicyBinding(name string) *ValidatingAdmissionPolicyBin return b } -// ExtractValidatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from -// validatingAdmissionPolicyBinding. If no managedFields are found in validatingAdmissionPolicyBinding for fieldManager, a -// ValidatingAdmissionPolicyBindingApplyConfiguration 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. +// ExtractValidatingAdmissionPolicyBindingFrom extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicyBinding for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // validatingAdmissionPolicyBinding must be a unmodified ValidatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. -// ExtractValidatingAdmissionPolicyBinding provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractValidatingAdmissionPolicyBindingFrom 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 ExtractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { - return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "") -} - -// ExtractValidatingAdmissionPolicyBindingStatus is the same as ExtractValidatingAdmissionPolicyBinding except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractValidatingAdmissionPolicyBindingStatus(validatingAdmissionPolicyBinding *admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { - return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "status") -} - -func extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding, fieldManager string, subresource string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { +func ExtractValidatingAdmissionPolicyBindingFrom(validatingAdmissionPolicyBinding *admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding, fieldManager string, subresource string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { b := &ValidatingAdmissionPolicyBindingApplyConfiguration{} err := managedfields.ExtractInto(validatingAdmissionPolicyBinding, internal.Parser().Type("io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding"), fieldManager, b, subresource) if err != nil { @@ -79,6 +78,21 @@ func extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *a b.WithAPIVersion("admissionregistration.k8s.io/v1beta1") return b, nil } + +// ExtractValidatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicyBinding. If no managedFields are found in validatingAdmissionPolicyBinding for fieldManager, a +// ValidatingAdmissionPolicyBindingApplyConfiguration 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. +// validatingAdmissionPolicyBinding must be a unmodified ValidatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. +// ExtractValidatingAdmissionPolicyBinding 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. +func ExtractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { + return ExtractValidatingAdmissionPolicyBindingFrom(validatingAdmissionPolicyBinding, fieldManager, "") +} + func (b ValidatingAdmissionPolicyBindingApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicybindingspec.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicybindingspec.go index bddc3a40c77d7..7b1c0af26ba88 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicybindingspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicybindingspec.go @@ -24,10 +24,63 @@ import ( // ValidatingAdmissionPolicyBindingSpecApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use // with apply. +// +// ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct { - PolicyName *string `json:"policyName,omitempty"` - ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"` - MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"` + // PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. + // If the referenced resource does not exist, this binding is considered invalid and will be ignored + // Required. + PolicyName *string `json:"policyName,omitempty"` + // paramRef specifies the parameter resource used to configure the admission control policy. + // It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. + // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. + // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. + ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"` + // MatchResources declares what resources match this binding and will be validated by it. + // Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. + // If this is unset, all resources matched by the policy are validated by this binding + // When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. + // Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required. + MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"` + // validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. + // If a validation evaluates to false it is always enforced according to these actions. + // + // Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according + // to these actions only if the FailurePolicy is set to Fail, otherwise the failures are + // ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. + // + // validationActions is declared as a set of action values. Order does + // not matter. validationActions may not contain duplicates of the same action. + // + // The supported actions values are: + // + // "Deny" specifies that a validation failure results in a denied request. + // + // "Warn" specifies that a validation failure is reported to the request client + // in HTTP Warning headers, with a warning code of 299. Warnings can be sent + // both for allowed or denied admission responses. + // + // "Audit" specifies that a validation failure is included in the published + // audit event for the request. The audit event will contain a + // `validation.policy.admission.k8s.io/validation_failure` audit annotation + // with a value containing the details of the validation failures, formatted as + // a JSON list of objects, each with the following fields: + // - message: The validation failure message string + // - policy: The resource name of the ValidatingAdmissionPolicy + // - binding: The resource name of the ValidatingAdmissionPolicyBinding + // - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy + // - validationActions: The enforcement actions enacted for the validation failure + // Example audit annotation: + // `"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"` + // + // Clients should expect to handle additional values by ignoring + // any values not recognized. + // + // "Deny" and "Warn" may not be used together since this combination + // needlessly duplicates the validation failure both in the + // API response body and the HTTP warning headers. + // + // Required. ValidationActions []admissionregistrationv1beta1.ValidationAction `json:"validationActions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicyspec.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicyspec.go index 8b235337d7056..4600fb9da4ab2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicyspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicyspec.go @@ -24,14 +24,66 @@ import ( // ValidatingAdmissionPolicySpecApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicySpec type for use // with apply. +// +// ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. type ValidatingAdmissionPolicySpecApplyConfiguration struct { - ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"` - MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"` - Validations []ValidationApplyConfiguration `json:"validations,omitempty"` - FailurePolicy *admissionregistrationv1beta1.FailurePolicyType `json:"failurePolicy,omitempty"` - AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"` - MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` - Variables []VariableApplyConfiguration `json:"variables,omitempty"` + // ParamKind specifies the kind of resources used to parameterize this policy. + // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. + // If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. + // If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null. + ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"` + // MatchConstraints specifies what resources this policy is designed to validate. + // The AdmissionPolicy cares about a request if it matches _all_ Constraints. + // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API + // ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. + // Required. + MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"` + // Validations contain CEL expressions which is used to apply the validation. + // Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is + // required. + Validations []ValidationApplyConfiguration `json:"validations,omitempty"` + // failurePolicy defines how to handle failures for the admission policy. Failures can + // occur from CEL expression parse errors, type check errors, runtime errors and invalid + // or mis-configured policy definitions or bindings. + // + // A policy is invalid if spec.paramKind refers to a non-existent Kind. + // A binding is invalid if spec.paramRef.name refers to a non-existent resource. + // + // failurePolicy does not define how validations that evaluate to false are handled. + // + // When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions + // define how failures are enforced. + // + // Allowed values are Ignore or Fail. Defaults to Fail. + FailurePolicy *admissionregistrationv1beta1.FailurePolicyType `json:"failurePolicy,omitempty"` + // auditAnnotations contains CEL expressions which are used to produce audit + // annotations for the audit event of the API request. + // validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is + // required. + AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"` + // MatchConditions is a list of conditions that must be met for a request to be validated. + // Match conditions filter requests that have already been matched by the rules, + // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. + // There are a maximum of 64 match conditions allowed. + // + // If a parameter object is provided, it can be accessed via the `params` handle in the same + // manner as validation expressions. + // + // The exact matching logic is (in order): + // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. + // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. + // 3. If any matchCondition evaluates to an error (but none are FALSE): + // - If failurePolicy=Fail, reject the request + // - If failurePolicy=Ignore, the policy is skipped + MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` + // Variables contain definitions of variables that can be used in composition of other expressions. + // Each variable is defined as a named CEL expression. + // The variables defined here will be available under `variables` in other expressions of the policy + // except MatchConditions because MatchConditions are evaluated before the rest of the policy. + // + // The expression of a variable can refer to other variables defined earlier in the list but not those after. + // Thus, Variables must be sorted by the order of first appearance and acyclic. + Variables []VariableApplyConfiguration `json:"variables,omitempty"` } // ValidatingAdmissionPolicySpecApplyConfiguration constructs a declarative configuration of the ValidatingAdmissionPolicySpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicystatus.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicystatus.go index 4612af0cffa03..9e05da1395f36 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicystatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingadmissionpolicystatus.go @@ -24,10 +24,16 @@ import ( // ValidatingAdmissionPolicyStatusApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicyStatus type for use // with apply. +// +// ValidatingAdmissionPolicyStatus represents the status of an admission validation policy. type ValidatingAdmissionPolicyStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"` - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + // The generation observed by the controller. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // The results of type checking for each expression. + // Presence of this field indicates the completion of the type checking. + TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"` + // The conditions represent the latest available observations of a policy's current state. + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` } // ValidatingAdmissionPolicyStatusApplyConfiguration constructs a declarative configuration of the ValidatingAdmissionPolicyStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingwebhook.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingwebhook.go index 1e107d68f7bcd..c3df12b87b5fa 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingwebhook.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingwebhook.go @@ -26,18 +26,133 @@ import ( // ValidatingWebhookApplyConfiguration represents a declarative configuration of the ValidatingWebhook type for use // with apply. +// +// ValidatingWebhook describes an admission webhook and the resources and operations it applies to. type ValidatingWebhookApplyConfiguration struct { - Name *string `json:"name,omitempty"` - ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"` - Rules []v1.RuleWithOperationsApplyConfiguration `json:"rules,omitempty"` - FailurePolicy *admissionregistrationv1beta1.FailurePolicyType `json:"failurePolicy,omitempty"` - MatchPolicy *admissionregistrationv1beta1.MatchPolicyType `json:"matchPolicy,omitempty"` - NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` - ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` - SideEffects *admissionregistrationv1beta1.SideEffectClass `json:"sideEffects,omitempty"` - TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` - AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"` - MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` + // The name of the admission webhook. + // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where + // "imagepolicy" is the name of the webhook, and kubernetes.io is the name + // of the organization. + // Required. + Name *string `json:"name,omitempty"` + // ClientConfig defines how to communicate with the hook. + // Required + ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"` + // Rules describes what operations on what resources/subresources the webhook cares about. + // The webhook cares about an operation if it matches _any_ Rule. + // However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks + // from putting the cluster in a state which cannot be recovered from without completely + // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called + // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + Rules []v1.RuleWithOperationsApplyConfiguration `json:"rules,omitempty"` + // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - + // allowed values are Ignore or Fail. Defaults to Ignore. + FailurePolicy *admissionregistrationv1beta1.FailurePolicyType `json:"failurePolicy,omitempty"` + // matchPolicy defines how the "rules" list is used to match incoming requests. + // Allowed values are "Exact" or "Equivalent". + // + // - Exact: match a request only if it exactly matches a specified rule. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. + // + // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. + // + // Defaults to "Exact" + MatchPolicy *admissionregistrationv1beta1.MatchPolicyType `json:"matchPolicy,omitempty"` + // NamespaceSelector decides whether to run the webhook on an object based + // on whether the namespace for that object matches the selector. If the + // object itself is a namespace, the matching is performed on + // object.metadata.labels. If the object is another cluster scoped resource, + // it never skips the webhook. + // + // For example, to run the webhook on any objects whose namespace is not + // associated with "runlevel" of "0" or "1"; you will set the selector as + // follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "runlevel", + // "operator": "NotIn", + // "values": [ + // "0", + // "1" + // ] + // } + // ] + // } + // + // If instead you want to only run the webhook on any objects whose + // namespace is associated with the "environment" of "prod" or "staging"; + // you will set the selector as follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "environment", + // "operator": "In", + // "values": [ + // "prod", + // "staging" + // ] + // } + // ] + // } + // + // See + // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + // for more examples of label selectors. + // + // Default to the empty LabelSelector, which matches everything. + NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` + // ObjectSelector decides whether to run the webhook based on if the + // object has matching labels. objectSelector is evaluated against both + // the oldObject and newObject that would be sent to the webhook, and + // is considered to match if either object matches the selector. A null + // object (oldObject in the case of create, or newObject in the case of + // delete) or an object that cannot have labels (like a + // DeploymentRollback or a PodProxyOptions object) is not considered to + // match. + // Use the object selector only if the webhook is opt-in, because end + // users may skip the admission webhook by setting the labels. + // Default to the empty LabelSelector, which matches everything. + ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` + // SideEffects states whether this webhook has side effects. + // Acceptable values are: Unknown, None, Some, NoneOnDryRun + // Webhooks with side effects MUST implement a reconciliation system, since a request may be + // rejected by a future step in the admission chain and the side effects therefore need to be undone. + // Requests with the dryRun attribute will be auto-rejected if they match a webhook with + // sideEffects == Unknown or Some. Defaults to Unknown. + SideEffects *admissionregistrationv1beta1.SideEffectClass `json:"sideEffects,omitempty"` + // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, + // the webhook call will be ignored or the API call will fail based on the + // failure policy. + // The timeout value must be between 1 and 30 seconds. + // Default to 30 seconds. + TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` + // AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` + // versions the Webhook expects. API server will try to use first version in + // the list which it supports. If none of the versions specified in this list + // supported by API server, validation will fail for this object. + // If a persisted webhook configuration specifies allowed versions and does not + // include any versions known to the API Server, calls to the webhook will fail + // and be subject to the failure policy. + // Default to `['v1beta1']`. + AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"` + // MatchConditions is a list of conditions that must be met for a request to be sent to this + // webhook. Match conditions filter requests that have already been matched by the rules, + // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. + // There are a maximum of 64 match conditions allowed. + // + // The exact matching logic is (in order): + // 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. + // 2. If ALL matchConditions evaluate to TRUE, the webhook is called. + // 3. If any matchCondition evaluates to an error (but none are FALSE): + // - If failurePolicy=Fail, reject the request + // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped + MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` } // ValidatingWebhookApplyConfiguration constructs a declarative configuration of the ValidatingWebhook type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 2ad1fb8cf6929..66b74b31d8b00 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -29,10 +29,15 @@ import ( // ValidatingWebhookConfigurationApplyConfiguration represents a declarative configuration of the ValidatingWebhookConfiguration type for use // with apply. +// +// ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. +// Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 ValidatingWebhookConfiguration instead. type ValidatingWebhookConfigurationApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Webhooks []ValidatingWebhookApplyConfiguration `json:"webhooks,omitempty"` + // Webhooks is a list of webhooks and the affected resources and operations. + Webhooks []ValidatingWebhookApplyConfiguration `json:"webhooks,omitempty"` } // ValidatingWebhookConfiguration constructs a declarative configuration of the ValidatingWebhookConfiguration type for use with @@ -45,29 +50,14 @@ func ValidatingWebhookConfiguration(name string) *ValidatingWebhookConfiguration return b } -// ExtractValidatingWebhookConfiguration extracts the applied configuration owned by fieldManager from -// validatingWebhookConfiguration. If no managedFields are found in validatingWebhookConfiguration for fieldManager, a -// ValidatingWebhookConfigurationApplyConfiguration 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. +// ExtractValidatingWebhookConfigurationFrom extracts the applied configuration owned by fieldManager from +// validatingWebhookConfiguration for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // validatingWebhookConfiguration must be a unmodified ValidatingWebhookConfiguration API object that was retrieved from the Kubernetes API. -// ExtractValidatingWebhookConfiguration provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractValidatingWebhookConfigurationFrom 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 ExtractValidatingWebhookConfiguration(validatingWebhookConfiguration *admissionregistrationv1beta1.ValidatingWebhookConfiguration, fieldManager string) (*ValidatingWebhookConfigurationApplyConfiguration, error) { - return extractValidatingWebhookConfiguration(validatingWebhookConfiguration, fieldManager, "") -} - -// ExtractValidatingWebhookConfigurationStatus is the same as ExtractValidatingWebhookConfiguration except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractValidatingWebhookConfigurationStatus(validatingWebhookConfiguration *admissionregistrationv1beta1.ValidatingWebhookConfiguration, fieldManager string) (*ValidatingWebhookConfigurationApplyConfiguration, error) { - return extractValidatingWebhookConfiguration(validatingWebhookConfiguration, fieldManager, "status") -} - -func extractValidatingWebhookConfiguration(validatingWebhookConfiguration *admissionregistrationv1beta1.ValidatingWebhookConfiguration, fieldManager string, subresource string) (*ValidatingWebhookConfigurationApplyConfiguration, error) { +func ExtractValidatingWebhookConfigurationFrom(validatingWebhookConfiguration *admissionregistrationv1beta1.ValidatingWebhookConfiguration, fieldManager string, subresource string) (*ValidatingWebhookConfigurationApplyConfiguration, error) { b := &ValidatingWebhookConfigurationApplyConfiguration{} err := managedfields.ExtractInto(validatingWebhookConfiguration, internal.Parser().Type("io.k8s.api.admissionregistration.v1beta1.ValidatingWebhookConfiguration"), fieldManager, b, subresource) if err != nil { @@ -79,6 +69,21 @@ func extractValidatingWebhookConfiguration(validatingWebhookConfiguration *admis b.WithAPIVersion("admissionregistration.k8s.io/v1beta1") return b, nil } + +// ExtractValidatingWebhookConfiguration extracts the applied configuration owned by fieldManager from +// validatingWebhookConfiguration. If no managedFields are found in validatingWebhookConfiguration for fieldManager, a +// ValidatingWebhookConfigurationApplyConfiguration 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. +// validatingWebhookConfiguration must be a unmodified ValidatingWebhookConfiguration API object that was retrieved from the Kubernetes API. +// ExtractValidatingWebhookConfiguration 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. +func ExtractValidatingWebhookConfiguration(validatingWebhookConfiguration *admissionregistrationv1beta1.ValidatingWebhookConfiguration, fieldManager string) (*ValidatingWebhookConfigurationApplyConfiguration, error) { + return ExtractValidatingWebhookConfigurationFrom(validatingWebhookConfiguration, fieldManager, "") +} + func (b ValidatingWebhookConfigurationApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validation.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validation.go index 019e8e7aa968c..6505b8b498349 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validation.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validation.go @@ -24,11 +24,77 @@ import ( // ValidationApplyConfiguration represents a declarative configuration of the Validation type for use // with apply. +// +// Validation specifies the CEL expression which is used to apply the validation. type ValidationApplyConfiguration struct { - Expression *string `json:"expression,omitempty"` - Message *string `json:"message,omitempty"` - Reason *v1.StatusReason `json:"reason,omitempty"` - MessageExpression *string `json:"messageExpression,omitempty"` + // Expression represents the expression which will be evaluated by CEL. + // ref: https://github.com/google/cel-spec + // CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: + // + // - 'object' - The object from the incoming request. The value is null for DELETE requests. + // - 'oldObject' - The existing object. The value is null for CREATE requests. + // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). + // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. + // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. + // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + // For example, a variable named 'foo' can be accessed as 'variables.foo'. + // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // + // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the + // object. No other metadata properties are accessible. + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Accessible property names are escaped according to the following rules when accessed in the expression: + // - '__' escapes to '__underscores__' + // - '.' escapes to '__dot__' + // - '-' escapes to '__dash__' + // - '/' escapes to '__slash__' + // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: + // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", + // "import", "let", "loop", "package", "namespace", "return". + // Examples: + // - Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"} + // - Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"} + // - Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"} + // + // Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. + // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: + // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and + // non-intersecting elements in `Y` are appended, retaining their partial order. + // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values + // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with + // non-intersecting keys are appended, retaining their partial order. + // Required. + Expression *string `json:"expression,omitempty"` + // Message represents the message displayed when validation fails. The message is required if the Expression contains + // line breaks. The message must not contain line breaks. + // If unset, the message is "failed rule: {Rule}". + // e.g. "must be a URL with the host matching spec.host" + // If the Expression contains line breaks. Message is required. + // The message must not contain line breaks. + // If unset, the message is "failed Expression: {Expression}". + Message *string `json:"message,omitempty"` + // Reason represents a machine-readable description of why this validation failed. + // If this is the first validation in the list to fail, this reason, as well as the + // corresponding HTTP response code, are used in the + // HTTP response to the client. + // The currently supported reasons are: "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge". + // If not set, StatusReasonInvalid is used in the response to the client. + Reason *v1.StatusReason `json:"reason,omitempty"` + // messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. + // Since messageExpression is used as a failure message, it must evaluate to a string. + // If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. + // If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced + // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string + // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and + // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. + // messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. + // Example: + // "object.x must be less than max ("+string(params.max)+")" + MessageExpression *string `json:"messageExpression,omitempty"` } // ValidationApplyConfiguration constructs a declarative configuration of the Validation type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/variable.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/variable.go index 0ece197db2a1b..db334f2265712 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/variable.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/variable.go @@ -20,8 +20,15 @@ package v1beta1 // VariableApplyConfiguration represents a declarative configuration of the Variable type for use // with apply. +// +// Variable is the definition of a variable that is used for composition. A variable is defined as a named expression. type VariableApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. + // The variable can be accessed in other expressions through `variables` + // For example, if name is "foo", the variable will be available as `variables.foo` + Name *string `json:"name,omitempty"` + // Expression is the expression that will be evaluated as the value of the variable. + // The CEL expression has access to the same identifiers as the CEL expressions in Validation. Expression *string `json:"expression,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/webhookclientconfig.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/webhookclientconfig.go index 76ff71b4aec3f..593ff43ebfe6e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/webhookclientconfig.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/webhookclientconfig.go @@ -20,10 +20,44 @@ package v1beta1 // WebhookClientConfigApplyConfiguration represents a declarative configuration of the WebhookClientConfig type for use // with apply. +// +// WebhookClientConfig contains the information to make a TLS +// connection with the webhook type WebhookClientConfigApplyConfiguration struct { - URL *string `json:"url,omitempty"` - Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"` - CABundle []byte `json:"caBundle,omitempty"` + // `url` gives the location of the webhook, in standard URL form + // (`scheme://host:port/path`). Exactly one of `url` or `service` + // must be specified. + // + // The `host` should not refer to a service running in the cluster; use + // the `service` field instead. The host might be resolved via external + // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve + // in-cluster DNS as that would be a layering violation). `host` may + // also be an IP address. + // + // Please note that using `localhost` or `127.0.0.1` as a `host` is + // risky unless you take great care to run this webhook on all hosts + // which run an apiserver which might need to make calls to this + // webhook. Such installs are likely to be non-portable, i.e., not easy + // to turn up in a new cluster. + // + // The scheme must be "https"; the URL must begin with "https://". + // + // A path is optional, and if present may be any string permissible in + // a URL. You may use the path to pass an arbitrary string to the + // webhook, for example, a cluster identifier. + // + // Attempting to use a user or basic auth e.g. "user:password@" is not + // allowed. Fragments ("#...") and query parameters ("?...") are not + // allowed, either. + URL *string `json:"url,omitempty"` + // `service` is a reference to the service for this webhook. Either + // `service` or `url` must be specified. + // + // If the webhook is running within the cluster, then you should use `service`. + Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"` + // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. + // If unspecified, system trust roots on the apiserver are used. + CABundle []byte `json:"caBundle,omitempty"` } // WebhookClientConfigApplyConfiguration constructs a declarative configuration of the WebhookClientConfig type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/serverstorageversion.go b/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/serverstorageversion.go index 8394298b93ed2..94379ddc5af46 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/serverstorageversion.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/serverstorageversion.go @@ -20,11 +20,21 @@ package v1alpha1 // ServerStorageVersionApplyConfiguration represents a declarative configuration of the ServerStorageVersion type for use // with apply. +// +// An API server instance reports the version it can decode and the version it +// encodes objects to when persisting objects in the backend. type ServerStorageVersionApplyConfiguration struct { - APIServerID *string `json:"apiServerID,omitempty"` - EncodingVersion *string `json:"encodingVersion,omitempty"` + // The ID of the reporting API server. + APIServerID *string `json:"apiServerID,omitempty"` + // The API server encodes the object to this version when persisting it in + // the backend (e.g., etcd). + EncodingVersion *string `json:"encodingVersion,omitempty"` + // The API server can decode objects encoded in these versions. + // The encodingVersion must be included in the decodableVersions. DecodableVersions []string `json:"decodableVersions,omitempty"` - ServedVersions []string `json:"servedVersions,omitempty"` + // The API server can serve these versions. + // DecodableVersions must include all ServedVersions. + ServedVersions []string `json:"servedVersions,omitempty"` } // ServerStorageVersionApplyConfiguration constructs a declarative configuration of the ServerStorageVersion type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go b/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go index 9838e3c9c2f46..e9f41cc2773b5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go @@ -29,11 +29,17 @@ import ( // StorageVersionApplyConfiguration represents a declarative configuration of the StorageVersion type for use // with apply. +// +// Storage version of a specific resource. type StorageVersionApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // The name is .. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *apiserverinternalv1alpha1.StorageVersionSpec `json:"spec,omitempty"` - Status *StorageVersionStatusApplyConfiguration `json:"status,omitempty"` + // Spec is an empty spec. It is here to comply with Kubernetes API style. + Spec *apiserverinternalv1alpha1.StorageVersionSpec `json:"spec,omitempty"` + // API server instances report the version they can decode and the version they + // encode objects to when persisting objects in the backend. + Status *StorageVersionStatusApplyConfiguration `json:"status,omitempty"` } // StorageVersion constructs a declarative configuration of the StorageVersion type for use with @@ -46,6 +52,26 @@ func StorageVersion(name string) *StorageVersionApplyConfiguration { return b } +// ExtractStorageVersionFrom extracts the applied configuration owned by fieldManager from +// storageVersion for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// storageVersion must be a unmodified StorageVersion API object that was retrieved from the Kubernetes API. +// ExtractStorageVersionFrom 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. +func ExtractStorageVersionFrom(storageVersion *apiserverinternalv1alpha1.StorageVersion, fieldManager string, subresource string) (*StorageVersionApplyConfiguration, error) { + b := &StorageVersionApplyConfiguration{} + err := managedfields.ExtractInto(storageVersion, internal.Parser().Type("io.k8s.api.apiserverinternal.v1alpha1.StorageVersion"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(storageVersion.Name) + + b.WithKind("StorageVersion") + b.WithAPIVersion("internal.apiserver.k8s.io/v1alpha1") + return b, nil +} + // ExtractStorageVersion extracts the applied configuration owned by fieldManager from // storageVersion. If no managedFields are found in storageVersion for fieldManager, a // StorageVersionApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +82,16 @@ func StorageVersion(name string) *StorageVersionApplyConfiguration { // ExtractStorageVersion 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 ExtractStorageVersion(storageVersion *apiserverinternalv1alpha1.StorageVersion, fieldManager string) (*StorageVersionApplyConfiguration, error) { - return extractStorageVersion(storageVersion, fieldManager, "") + return ExtractStorageVersionFrom(storageVersion, fieldManager, "") } -// ExtractStorageVersionStatus is the same as ExtractStorageVersion except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractStorageVersionStatus extracts the applied configuration owned by fieldManager from +// storageVersion for the status subresource. func ExtractStorageVersionStatus(storageVersion *apiserverinternalv1alpha1.StorageVersion, fieldManager string) (*StorageVersionApplyConfiguration, error) { - return extractStorageVersion(storageVersion, fieldManager, "status") + return ExtractStorageVersionFrom(storageVersion, fieldManager, "status") } -func extractStorageVersion(storageVersion *apiserverinternalv1alpha1.StorageVersion, fieldManager string, subresource string) (*StorageVersionApplyConfiguration, error) { - b := &StorageVersionApplyConfiguration{} - err := managedfields.ExtractInto(storageVersion, internal.Parser().Type("io.k8s.api.apiserverinternal.v1alpha1.StorageVersion"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(storageVersion.Name) - - b.WithKind("StorageVersion") - b.WithAPIVersion("internal.apiserver.k8s.io/v1alpha1") - return b, nil -} func (b StorageVersionApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversioncondition.go b/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversioncondition.go index 1ed71cf8e938e..84752a459969e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversioncondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversioncondition.go @@ -25,13 +25,21 @@ import ( // StorageVersionConditionApplyConfiguration represents a declarative configuration of the StorageVersionCondition type for use // with apply. +// +// Describes the state of the storageVersion at a certain point. type StorageVersionConditionApplyConfiguration struct { - Type *apiserverinternalv1alpha1.StorageVersionConditionType `json:"type,omitempty"` - Status *apiserverinternalv1alpha1.ConditionStatus `json:"status,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of the condition. + Type *apiserverinternalv1alpha1.StorageVersionConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *apiserverinternalv1alpha1.ConditionStatus `json:"status,omitempty"` + // If set, this represents the .metadata.generation that the condition was set based upon. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // Last time the condition transitioned from one status to another. + LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // A human readable message indicating details about the transition. + Message *string `json:"message,omitempty"` } // StorageVersionConditionApplyConfiguration constructs a declarative configuration of the StorageVersionCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversionstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversionstatus.go index 2e25d675241b5..00a71ad5a21f4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversionstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversionstatus.go @@ -20,10 +20,19 @@ package v1alpha1 // StorageVersionStatusApplyConfiguration represents a declarative configuration of the StorageVersionStatus type for use // with apply. +// +// API server instances report the versions they can decode and the version they +// encode objects to when persisting objects in the backend. type StorageVersionStatusApplyConfiguration struct { - StorageVersions []ServerStorageVersionApplyConfiguration `json:"storageVersions,omitempty"` - CommonEncodingVersion *string `json:"commonEncodingVersion,omitempty"` - Conditions []StorageVersionConditionApplyConfiguration `json:"conditions,omitempty"` + // The reported versions per API server instance. + StorageVersions []ServerStorageVersionApplyConfiguration `json:"storageVersions,omitempty"` + // If all API server instances agree on the same encoding storage version, + // then this field is set to that version. Otherwise this field is left empty. + // API servers should finish updating its storageVersionStatus entry before + // serving write operations, so that this field will be in sync with the reality. + CommonEncodingVersion *string `json:"commonEncodingVersion,omitempty"` + // The latest available observations of the storageVersion's state. + Conditions []StorageVersionConditionApplyConfiguration `json:"conditions,omitempty"` } // StorageVersionStatusApplyConfiguration constructs a declarative configuration of the StorageVersionStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/controllerrevision.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/controllerrevision.go index 1c97bcc598343..8a01c0d75492f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/controllerrevision.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/controllerrevision.go @@ -30,11 +30,25 @@ import ( // ControllerRevisionApplyConfiguration represents a declarative configuration of the ControllerRevision type for use // with apply. +// +// ControllerRevision implements an immutable snapshot of state data. Clients +// are responsible for serializing and deserializing the objects that contain +// their internal state. +// Once a ControllerRevision has been successfully created, it can not be updated. +// The API Server will fail validation of all requests that attempt to mutate +// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both +// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, +// it may be subject to name and representation changes in future releases, and clients should not +// depend on its stability. It is primarily for internal use by controllers. type ControllerRevisionApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Data *runtime.RawExtension `json:"data,omitempty"` - Revision *int64 `json:"revision,omitempty"` + // Data is the serialized representation of the state. + Data *runtime.RawExtension `json:"data,omitempty"` + // Revision indicates the revision of the state represented by Data. + Revision *int64 `json:"revision,omitempty"` } // ControllerRevision constructs a declarative configuration of the ControllerRevision type for use with @@ -48,29 +62,14 @@ func ControllerRevision(name, namespace string) *ControllerRevisionApplyConfigur return b } -// ExtractControllerRevision extracts the applied configuration owned by fieldManager from -// controllerRevision. If no managedFields are found in controllerRevision for fieldManager, a -// ControllerRevisionApplyConfiguration 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. +// ExtractControllerRevisionFrom extracts the applied configuration owned by fieldManager from +// controllerRevision for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // controllerRevision must be a unmodified ControllerRevision API object that was retrieved from the Kubernetes API. -// ExtractControllerRevision provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractControllerRevisionFrom 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 ExtractControllerRevision(controllerRevision *appsv1.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) { - return extractControllerRevision(controllerRevision, fieldManager, "") -} - -// ExtractControllerRevisionStatus is the same as ExtractControllerRevision except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractControllerRevisionStatus(controllerRevision *appsv1.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) { - return extractControllerRevision(controllerRevision, fieldManager, "status") -} - -func extractControllerRevision(controllerRevision *appsv1.ControllerRevision, fieldManager string, subresource string) (*ControllerRevisionApplyConfiguration, error) { +func ExtractControllerRevisionFrom(controllerRevision *appsv1.ControllerRevision, fieldManager string, subresource string) (*ControllerRevisionApplyConfiguration, error) { b := &ControllerRevisionApplyConfiguration{} err := managedfields.ExtractInto(controllerRevision, internal.Parser().Type("io.k8s.api.apps.v1.ControllerRevision"), fieldManager, b, subresource) if err != nil { @@ -83,6 +82,21 @@ func extractControllerRevision(controllerRevision *appsv1.ControllerRevision, fi b.WithAPIVersion("apps/v1") return b, nil } + +// ExtractControllerRevision extracts the applied configuration owned by fieldManager from +// controllerRevision. If no managedFields are found in controllerRevision for fieldManager, a +// ControllerRevisionApplyConfiguration 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. +// controllerRevision must be a unmodified ControllerRevision API object that was retrieved from the Kubernetes API. +// ExtractControllerRevision 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. +func ExtractControllerRevision(controllerRevision *appsv1.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) { + return ExtractControllerRevisionFrom(controllerRevision, fieldManager, "") +} + func (b ControllerRevisionApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonset.go index 14b4a88c6fc21..cc8f33f2907a1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonset.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonset.go @@ -29,11 +29,22 @@ import ( // DaemonSetApplyConfiguration represents a declarative configuration of the DaemonSet type for use // with apply. +// +// DaemonSet represents the configuration of a daemon set. type DaemonSetApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *DaemonSetSpecApplyConfiguration `json:"spec,omitempty"` - Status *DaemonSetStatusApplyConfiguration `json:"status,omitempty"` + // The desired behavior of this daemon set. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *DaemonSetSpecApplyConfiguration `json:"spec,omitempty"` + // The current status of this daemon set. This data may be + // out of date by some window of time. + // Populated by the system. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *DaemonSetStatusApplyConfiguration `json:"status,omitempty"` } // DaemonSet constructs a declarative configuration of the DaemonSet type for use with @@ -47,6 +58,27 @@ func DaemonSet(name, namespace string) *DaemonSetApplyConfiguration { return b } +// ExtractDaemonSetFrom extracts the applied configuration owned by fieldManager from +// daemonSet for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// daemonSet must be a unmodified DaemonSet API object that was retrieved from the Kubernetes API. +// ExtractDaemonSetFrom 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. +func ExtractDaemonSetFrom(daemonSet *appsv1.DaemonSet, fieldManager string, subresource string) (*DaemonSetApplyConfiguration, error) { + b := &DaemonSetApplyConfiguration{} + err := managedfields.ExtractInto(daemonSet, internal.Parser().Type("io.k8s.api.apps.v1.DaemonSet"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(daemonSet.Name) + b.WithNamespace(daemonSet.Namespace) + + b.WithKind("DaemonSet") + b.WithAPIVersion("apps/v1") + return b, nil +} + // ExtractDaemonSet extracts the applied configuration owned by fieldManager from // daemonSet. If no managedFields are found in daemonSet for fieldManager, a // DaemonSetApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +89,16 @@ func DaemonSet(name, namespace string) *DaemonSetApplyConfiguration { // ExtractDaemonSet 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 ExtractDaemonSet(daemonSet *appsv1.DaemonSet, fieldManager string) (*DaemonSetApplyConfiguration, error) { - return extractDaemonSet(daemonSet, fieldManager, "") + return ExtractDaemonSetFrom(daemonSet, fieldManager, "") } -// ExtractDaemonSetStatus is the same as ExtractDaemonSet except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractDaemonSetStatus extracts the applied configuration owned by fieldManager from +// daemonSet for the status subresource. func ExtractDaemonSetStatus(daemonSet *appsv1.DaemonSet, fieldManager string) (*DaemonSetApplyConfiguration, error) { - return extractDaemonSet(daemonSet, fieldManager, "status") + return ExtractDaemonSetFrom(daemonSet, fieldManager, "status") } -func extractDaemonSet(daemonSet *appsv1.DaemonSet, fieldManager string, subresource string) (*DaemonSetApplyConfiguration, error) { - b := &DaemonSetApplyConfiguration{} - err := managedfields.ExtractInto(daemonSet, internal.Parser().Type("io.k8s.api.apps.v1.DaemonSet"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(daemonSet.Name) - b.WithNamespace(daemonSet.Namespace) - - b.WithKind("DaemonSet") - b.WithAPIVersion("apps/v1") - return b, nil -} func (b DaemonSetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetcondition.go index 8c56e4994bd84..c2ba0bf879b18 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetcondition.go @@ -26,12 +26,20 @@ import ( // DaemonSetConditionApplyConfiguration represents a declarative configuration of the DaemonSetCondition type for use // with apply. +// +// TODO: Add valid condition types of a DaemonSet. +// DaemonSetCondition describes the state of a DaemonSet at a certain point. type DaemonSetConditionApplyConfiguration struct { - Type *appsv1.DaemonSetConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of DaemonSet condition. + Type *appsv1.DaemonSetConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *corev1.ConditionStatus `json:"status,omitempty"` + // Last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // A human readable message indicating details about the transition. + Message *string `json:"message,omitempty"` } // DaemonSetConditionApplyConfiguration constructs a declarative configuration of the DaemonSetCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetspec.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetspec.go index d2382b80e0f9b..7b7a922db4a91 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetspec.go @@ -25,12 +25,32 @@ import ( // DaemonSetSpecApplyConfiguration represents a declarative configuration of the DaemonSetSpec type for use // with apply. +// +// DaemonSetSpec is the specification of a daemon set. type DaemonSetSpecApplyConfiguration struct { - Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` - UpdateStrategy *DaemonSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"` - MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` + // A label query over pods that are managed by the daemon set. + // Must match in order to be controlled. + // It must match the pod template's labels. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // An object that describes the pod that will be created. + // The DaemonSet will create exactly one copy of this pod on every node + // that matches the template's node selector (or on every node if no node + // selector is specified). + // The only allowed template.spec.restartPolicy value is "Always". + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template + Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // An update strategy to replace existing DaemonSet pods with new pods. + UpdateStrategy *DaemonSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"` + // The minimum number of seconds for which a newly created DaemonSet pod should + // be ready without any of its container crashing, for it to be considered + // available. Defaults to 0 (pod will be considered available as soon as it + // is ready). + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // The number of old history to retain to allow rollback. + // This is a pointer to distinguish between explicit zero and not specified. + // Defaults to 10. + RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` } // DaemonSetSpecApplyConfiguration constructs a declarative configuration of the DaemonSetSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetstatus.go index a40dc16512e3f..c8d76571e0243 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetstatus.go @@ -20,17 +20,42 @@ package v1 // DaemonSetStatusApplyConfiguration represents a declarative configuration of the DaemonSetStatus type for use // with apply. +// +// DaemonSetStatus represents the current status of a daemon set. type DaemonSetStatusApplyConfiguration struct { - CurrentNumberScheduled *int32 `json:"currentNumberScheduled,omitempty"` - NumberMisscheduled *int32 `json:"numberMisscheduled,omitempty"` - DesiredNumberScheduled *int32 `json:"desiredNumberScheduled,omitempty"` - NumberReady *int32 `json:"numberReady,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - UpdatedNumberScheduled *int32 `json:"updatedNumberScheduled,omitempty"` - NumberAvailable *int32 `json:"numberAvailable,omitempty"` - NumberUnavailable *int32 `json:"numberUnavailable,omitempty"` - CollisionCount *int32 `json:"collisionCount,omitempty"` - Conditions []DaemonSetConditionApplyConfiguration `json:"conditions,omitempty"` + // The number of nodes that are running at least 1 + // daemon pod and are supposed to run the daemon pod. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ + CurrentNumberScheduled *int32 `json:"currentNumberScheduled,omitempty"` + // The number of nodes that are running the daemon pod, but are + // not supposed to run the daemon pod. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ + NumberMisscheduled *int32 `json:"numberMisscheduled,omitempty"` + // The total number of nodes that should be running the daemon + // pod (including nodes correctly running the daemon pod). + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ + DesiredNumberScheduled *int32 `json:"desiredNumberScheduled,omitempty"` + // numberReady is the number of nodes that should be running the daemon pod and have one + // or more of the daemon pod running with a Ready Condition. + NumberReady *int32 `json:"numberReady,omitempty"` + // The most recent generation observed by the daemon set controller. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // The total number of nodes that are running updated daemon pod + UpdatedNumberScheduled *int32 `json:"updatedNumberScheduled,omitempty"` + // The number of nodes that should be running the + // daemon pod and have one or more of the daemon pod running and + // available (ready for at least spec.minReadySeconds) + NumberAvailable *int32 `json:"numberAvailable,omitempty"` + // The number of nodes that should be running the + // daemon pod and have none of the daemon pod running and available + // (ready for at least spec.minReadySeconds) + NumberUnavailable *int32 `json:"numberUnavailable,omitempty"` + // Count of hash collisions for the DaemonSet. The DaemonSet controller + // uses this field as a collision avoidance mechanism when it needs to + // create the name for the newest ControllerRevision. + CollisionCount *int32 `json:"collisionCount,omitempty"` + // Represents the latest available observations of a DaemonSet's current state. + Conditions []DaemonSetConditionApplyConfiguration `json:"conditions,omitempty"` } // DaemonSetStatusApplyConfiguration constructs a declarative configuration of the DaemonSetStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetupdatestrategy.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetupdatestrategy.go index 993e1bd5721ec..3e3168dca6512 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetupdatestrategy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonsetupdatestrategy.go @@ -24,8 +24,16 @@ import ( // DaemonSetUpdateStrategyApplyConfiguration represents a declarative configuration of the DaemonSetUpdateStrategy type for use // with apply. +// +// DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. type DaemonSetUpdateStrategyApplyConfiguration struct { - Type *appsv1.DaemonSetUpdateStrategyType `json:"type,omitempty"` + // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. + Type *appsv1.DaemonSetUpdateStrategyType `json:"type,omitempty"` + // Rolling update config params. Present only if type = "RollingUpdate". + // --- + // TODO: Update this to follow our convention for oneOf, whatever we decide it + // to be. Same as Deployment `strategy.rollingUpdate`. + // See https://github.com/kubernetes/kubernetes/issues/35345 RollingUpdate *RollingUpdateDaemonSetApplyConfiguration `json:"rollingUpdate,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deployment.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deployment.go index 9678c87b23e9d..771ca0a75ba49 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deployment.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deployment.go @@ -29,11 +29,17 @@ import ( // DeploymentApplyConfiguration represents a declarative configuration of the Deployment type for use // with apply. +// +// Deployment enables declarative updates for Pods and ReplicaSets. type DeploymentApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *DeploymentSpecApplyConfiguration `json:"spec,omitempty"` - Status *DeploymentStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of the Deployment. + Spec *DeploymentSpecApplyConfiguration `json:"spec,omitempty"` + // Most recently observed status of the Deployment. + Status *DeploymentStatusApplyConfiguration `json:"status,omitempty"` } // Deployment constructs a declarative configuration of the Deployment type for use with @@ -47,6 +53,27 @@ func Deployment(name, namespace string) *DeploymentApplyConfiguration { return b } +// ExtractDeploymentFrom extracts the applied configuration owned by fieldManager from +// deployment for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// deployment must be a unmodified Deployment API object that was retrieved from the Kubernetes API. +// ExtractDeploymentFrom 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. +func ExtractDeploymentFrom(deployment *appsv1.Deployment, fieldManager string, subresource string) (*DeploymentApplyConfiguration, error) { + b := &DeploymentApplyConfiguration{} + err := managedfields.ExtractInto(deployment, internal.Parser().Type("io.k8s.api.apps.v1.Deployment"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(deployment.Name) + b.WithNamespace(deployment.Namespace) + + b.WithKind("Deployment") + b.WithAPIVersion("apps/v1") + return b, nil +} + // ExtractDeployment extracts the applied configuration owned by fieldManager from // deployment. If no managedFields are found in deployment for fieldManager, a // DeploymentApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +84,22 @@ func Deployment(name, namespace string) *DeploymentApplyConfiguration { // ExtractDeployment 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 ExtractDeployment(deployment *appsv1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) { - return extractDeployment(deployment, fieldManager, "") + return ExtractDeploymentFrom(deployment, fieldManager, "") } -// ExtractDeploymentStatus is the same as ExtractDeployment except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractDeploymentStatus(deployment *appsv1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) { - return extractDeployment(deployment, fieldManager, "status") +// ExtractDeploymentScale extracts the applied configuration owned by fieldManager from +// deployment for the scale subresource. +func ExtractDeploymentScale(deployment *appsv1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) { + return ExtractDeploymentFrom(deployment, fieldManager, "scale") } -func extractDeployment(deployment *appsv1.Deployment, fieldManager string, subresource string) (*DeploymentApplyConfiguration, error) { - b := &DeploymentApplyConfiguration{} - err := managedfields.ExtractInto(deployment, internal.Parser().Type("io.k8s.api.apps.v1.Deployment"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(deployment.Name) - b.WithNamespace(deployment.Namespace) - - b.WithKind("Deployment") - b.WithAPIVersion("apps/v1") - return b, nil +// ExtractDeploymentStatus extracts the applied configuration owned by fieldManager from +// deployment for the status subresource. +func ExtractDeploymentStatus(deployment *appsv1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) { + return ExtractDeploymentFrom(deployment, fieldManager, "status") } + func (b DeploymentApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentcondition.go index 3a669363703bc..a7f5b5060c6fc 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentcondition.go @@ -26,13 +26,21 @@ import ( // DeploymentConditionApplyConfiguration represents a declarative configuration of the DeploymentCondition type for use // with apply. +// +// DeploymentCondition describes the state of a deployment at a certain point. type DeploymentConditionApplyConfiguration struct { - Type *appsv1.DeploymentConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of deployment condition. + Type *appsv1.DeploymentConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *corev1.ConditionStatus `json:"status,omitempty"` + // The last time this condition was updated. + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` + // Last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // A human readable message indicating details about the transition. + Message *string `json:"message,omitempty"` } // DeploymentConditionApplyConfiguration constructs a declarative configuration of the DeploymentCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentspec.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentspec.go index 5f34b0582ca60..50a45b3e2bc95 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentspec.go @@ -25,15 +25,37 @@ import ( // DeploymentSpecApplyConfiguration represents a declarative configuration of the DeploymentSpec type for use // with apply. +// +// DeploymentSpec is the specification of the desired behavior of the Deployment. type DeploymentSpecApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` - Strategy *DeploymentStrategyApplyConfiguration `json:"strategy,omitempty"` - MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` - Paused *bool `json:"paused,omitempty"` - ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"` + // Number of desired pods. This is a pointer to distinguish between explicit + // zero and not specified. Defaults to 1. + Replicas *int32 `json:"replicas,omitempty"` + // Label selector for pods. Existing ReplicaSets whose pods are + // selected by this will be the ones affected by this deployment. + // It must match the pod template's labels. + Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // Template describes the pods that will be created. + // The only allowed template.spec.restartPolicy value is "Always". + Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // The deployment strategy to use to replace existing pods with new ones. + Strategy *DeploymentStrategyApplyConfiguration `json:"strategy,omitempty"` + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // The number of old ReplicaSets to retain to allow rollback. + // This is a pointer to distinguish between explicit zero and not specified. + // Defaults to 10. + RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` + // Indicates that the deployment is paused. + Paused *bool `json:"paused,omitempty"` + // The maximum time in seconds for a deployment to make progress before it + // is considered to be failed. The deployment controller will continue to + // process failed deployments and a condition with a ProgressDeadlineExceeded + // reason will be surfaced in the deployment status. Note that progress will + // not be estimated during the time a deployment is paused. Defaults to 600s. + ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"` } // DeploymentSpecApplyConfiguration constructs a declarative configuration of the DeploymentSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentstatus.go index 8d9e6cca288ae..ece67ffaf2172 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentstatus.go @@ -20,16 +20,34 @@ package v1 // DeploymentStatusApplyConfiguration represents a declarative configuration of the DeploymentStatus type for use // with apply. +// +// DeploymentStatus is the most recently observed status of the Deployment. type DeploymentStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Replicas *int32 `json:"replicas,omitempty"` - UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` - ReadyReplicas *int32 `json:"readyReplicas,omitempty"` - AvailableReplicas *int32 `json:"availableReplicas,omitempty"` - UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"` - TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"` - Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"` - CollisionCount *int32 `json:"collisionCount,omitempty"` + // The generation observed by the deployment controller. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // Total number of non-terminating pods targeted by this deployment (their labels match the selector). + Replicas *int32 `json:"replicas,omitempty"` + // Total number of non-terminating pods targeted by this deployment that have the desired template spec. + UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` + // Total number of non-terminating pods targeted by this Deployment with a Ready Condition. + ReadyReplicas *int32 `json:"readyReplicas,omitempty"` + // Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment. + AvailableReplicas *int32 `json:"availableReplicas,omitempty"` + // Total number of unavailable pods targeted by this deployment. This is the total number of + // pods that are still required for the deployment to have 100% available capacity. They may + // either be pods that are running but not yet available or pods that still have not been created. + UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"` + // Total number of terminating pods targeted by this deployment. Terminating pods have a non-null + // .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. + // + // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. + TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"` + // Represents the latest available observations of a deployment's current state. + Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"` + // Count of hash collisions for the Deployment. The Deployment controller uses this + // field as a collision avoidance mechanism when it needs to create the name for the + // newest ReplicaSet. + CollisionCount *int32 `json:"collisionCount,omitempty"` } // DeploymentStatusApplyConfiguration constructs a declarative configuration of the DeploymentStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentstrategy.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentstrategy.go index 7bf8a15954d39..eb2737d9260a7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentstrategy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deploymentstrategy.go @@ -24,8 +24,16 @@ import ( // DeploymentStrategyApplyConfiguration represents a declarative configuration of the DeploymentStrategy type for use // with apply. +// +// DeploymentStrategy describes how to replace existing pods with new ones. type DeploymentStrategyApplyConfiguration struct { - Type *appsv1.DeploymentStrategyType `json:"type,omitempty"` + // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. + Type *appsv1.DeploymentStrategyType `json:"type,omitempty"` + // Rolling update config params. Present only if DeploymentStrategyType = + // RollingUpdate. + // --- + // TODO: Update this to follow our convention for oneOf, whatever we decide it + // to be. RollingUpdate *RollingUpdateDeploymentApplyConfiguration `json:"rollingUpdate,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicaset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicaset.go index aee110a21f758..63f11a2183c8c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicaset.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicaset.go @@ -29,11 +29,24 @@ import ( // ReplicaSetApplyConfiguration represents a declarative configuration of the ReplicaSet type for use // with apply. +// +// ReplicaSet ensures that a specified number of pod replicas are running at any given time. type ReplicaSetApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // If the Labels of a ReplicaSet are empty, they are defaulted to + // be the same as the Pod(s) that the ReplicaSet manages. + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ReplicaSetSpecApplyConfiguration `json:"spec,omitempty"` - Status *ReplicaSetStatusApplyConfiguration `json:"status,omitempty"` + // Spec defines the specification of the desired behavior of the ReplicaSet. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *ReplicaSetSpecApplyConfiguration `json:"spec,omitempty"` + // Status is the most recently observed status of the ReplicaSet. + // This data may be out of date by some window of time. + // Populated by the system. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *ReplicaSetStatusApplyConfiguration `json:"status,omitempty"` } // ReplicaSet constructs a declarative configuration of the ReplicaSet type for use with @@ -47,6 +60,27 @@ func ReplicaSet(name, namespace string) *ReplicaSetApplyConfiguration { return b } +// ExtractReplicaSetFrom extracts the applied configuration owned by fieldManager from +// replicaSet for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// replicaSet must be a unmodified ReplicaSet API object that was retrieved from the Kubernetes API. +// ExtractReplicaSetFrom 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. +func ExtractReplicaSetFrom(replicaSet *appsv1.ReplicaSet, fieldManager string, subresource string) (*ReplicaSetApplyConfiguration, error) { + b := &ReplicaSetApplyConfiguration{} + err := managedfields.ExtractInto(replicaSet, internal.Parser().Type("io.k8s.api.apps.v1.ReplicaSet"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(replicaSet.Name) + b.WithNamespace(replicaSet.Namespace) + + b.WithKind("ReplicaSet") + b.WithAPIVersion("apps/v1") + return b, nil +} + // ExtractReplicaSet extracts the applied configuration owned by fieldManager from // replicaSet. If no managedFields are found in replicaSet for fieldManager, a // ReplicaSetApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +91,22 @@ func ReplicaSet(name, namespace string) *ReplicaSetApplyConfiguration { // ExtractReplicaSet 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 ExtractReplicaSet(replicaSet *appsv1.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) { - return extractReplicaSet(replicaSet, fieldManager, "") + return ExtractReplicaSetFrom(replicaSet, fieldManager, "") } -// ExtractReplicaSetStatus is the same as ExtractReplicaSet except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractReplicaSetStatus(replicaSet *appsv1.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) { - return extractReplicaSet(replicaSet, fieldManager, "status") +// ExtractReplicaSetScale extracts the applied configuration owned by fieldManager from +// replicaSet for the scale subresource. +func ExtractReplicaSetScale(replicaSet *appsv1.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) { + return ExtractReplicaSetFrom(replicaSet, fieldManager, "scale") } -func extractReplicaSet(replicaSet *appsv1.ReplicaSet, fieldManager string, subresource string) (*ReplicaSetApplyConfiguration, error) { - b := &ReplicaSetApplyConfiguration{} - err := managedfields.ExtractInto(replicaSet, internal.Parser().Type("io.k8s.api.apps.v1.ReplicaSet"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(replicaSet.Name) - b.WithNamespace(replicaSet.Namespace) - - b.WithKind("ReplicaSet") - b.WithAPIVersion("apps/v1") - return b, nil +// ExtractReplicaSetStatus extracts the applied configuration owned by fieldManager from +// replicaSet for the status subresource. +func ExtractReplicaSetStatus(replicaSet *appsv1.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) { + return ExtractReplicaSetFrom(replicaSet, fieldManager, "status") } + func (b ReplicaSetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicasetcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicasetcondition.go index 0325ce0583913..12077083f1267 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicasetcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicasetcondition.go @@ -26,12 +26,19 @@ import ( // ReplicaSetConditionApplyConfiguration represents a declarative configuration of the ReplicaSetCondition type for use // with apply. +// +// ReplicaSetCondition describes the state of a replica set at a certain point. type ReplicaSetConditionApplyConfiguration struct { - Type *appsv1.ReplicaSetConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of replica set condition. + Type *appsv1.ReplicaSetConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *corev1.ConditionStatus `json:"status,omitempty"` + // The last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // A human readable message indicating details about the transition. + Message *string `json:"message,omitempty"` } // ReplicaSetConditionApplyConfiguration constructs a declarative configuration of the ReplicaSetCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicasetspec.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicasetspec.go index 714ddcfe3df44..01a0c32186a1f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicasetspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicasetspec.go @@ -25,11 +25,27 @@ import ( // ReplicaSetSpecApplyConfiguration represents a declarative configuration of the ReplicaSetSpec type for use // with apply. +// +// ReplicaSetSpec is the specification of a ReplicaSet. type ReplicaSetSpecApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // Replicas is the number of desired pods. + // This is a pointer to distinguish between explicit zero and unspecified. + // Defaults to 1. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + Replicas *int32 `json:"replicas,omitempty"` + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // Selector is a label query over pods that should match the replica count. + // Label keys and values that must match in order to be controlled by this replica set. + // It must match the pod template's labels. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // Template is the object that describes the pod that will be created if + // insufficient replicas are detected. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template + Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` } // ReplicaSetSpecApplyConfiguration constructs a declarative configuration of the ReplicaSetSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicasetstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicasetstatus.go index d11526d60a997..b234f4c9cc8d2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicasetstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicasetstatus.go @@ -20,14 +20,27 @@ package v1 // ReplicaSetStatusApplyConfiguration represents a declarative configuration of the ReplicaSetStatus type for use // with apply. +// +// ReplicaSetStatus represents the current status of a ReplicaSet. type ReplicaSetStatusApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - FullyLabeledReplicas *int32 `json:"fullyLabeledReplicas,omitempty"` - ReadyReplicas *int32 `json:"readyReplicas,omitempty"` - AvailableReplicas *int32 `json:"availableReplicas,omitempty"` - TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Conditions []ReplicaSetConditionApplyConfiguration `json:"conditions,omitempty"` + // Replicas is the most recently observed number of non-terminating pods. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + Replicas *int32 `json:"replicas,omitempty"` + // The number of non-terminating pods that have labels matching the labels of the pod template of the replicaset. + FullyLabeledReplicas *int32 `json:"fullyLabeledReplicas,omitempty"` + // The number of non-terminating pods targeted by this ReplicaSet with a Ready Condition. + ReadyReplicas *int32 `json:"readyReplicas,omitempty"` + // The number of available non-terminating pods (ready for at least minReadySeconds) for this replica set. + AvailableReplicas *int32 `json:"availableReplicas,omitempty"` + // The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp + // and have not yet reached the Failed or Succeeded .status.phase. + // + // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. + TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"` + // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // Represents the latest available observations of a replica set's current state. + Conditions []ReplicaSetConditionApplyConfiguration `json:"conditions,omitempty"` } // ReplicaSetStatusApplyConfiguration constructs a declarative configuration of the ReplicaSetStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatedaemonset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatedaemonset.go index e898f5081c8c4..7fbc3e3b8625d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatedaemonset.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatedaemonset.go @@ -24,9 +24,43 @@ import ( // RollingUpdateDaemonSetApplyConfiguration represents a declarative configuration of the RollingUpdateDaemonSet type for use // with apply. +// +// Spec to control the desired behavior of daemon set rolling update. type RollingUpdateDaemonSetApplyConfiguration struct { + // The maximum number of DaemonSet pods that can be unavailable during the + // update. Value can be an absolute number (ex: 5) or a percentage of total + // number of DaemonSet pods at the start of the update (ex: 10%). Absolute + // number is calculated from percentage by rounding up. + // This cannot be 0 if MaxSurge is 0 + // Default value is 1. + // Example: when this is set to 30%, at most 30% of the total number of nodes + // that should be running the daemon pod (i.e. status.desiredNumberScheduled) + // can have their pods stopped for an update at any given time. The update + // starts by stopping at most 30% of those DaemonSet pods and then brings + // up new DaemonSet pods in their place. Once the new pods are available, + // it then proceeds onto other DaemonSet pods, thus ensuring that at least + // 70% of original number of DaemonSet pods are available at all times during + // the update. MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` - MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` + // The maximum number of nodes with an existing available DaemonSet pod that + // can have an updated DaemonSet pod during during an update. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // This can not be 0 if MaxUnavailable is 0. + // Absolute number is calculated from percentage by rounding up to a minimum of 1. + // Default value is 0. + // Example: when this is set to 30%, at most 30% of the total number of nodes + // that should be running the daemon pod (i.e. status.desiredNumberScheduled) + // can have their a new pod created before the old pod is marked as deleted. + // The update starts by launching new pods on 30% of nodes. Once an updated + // pod is available (Ready for at least minReadySeconds) the old DaemonSet pod + // on that node is marked deleted. If the old pod becomes unavailable for any + // reason (Ready transitions to false, is evicted, or is drained) an updated + // pod is immediately created on that node without considering surge limits. + // Allowing surge implies the possibility that the resources consumed by the + // daemonset on any given node can double if the readiness check fails, and + // so resource intensive daemonsets should take into account that they may + // cause evictions during disruption. + MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` } // RollingUpdateDaemonSetApplyConfiguration constructs a declarative configuration of the RollingUpdateDaemonSet type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatedeployment.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatedeployment.go index 2bc2937241f1e..20b52d1e947f1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatedeployment.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatedeployment.go @@ -24,9 +24,32 @@ import ( // RollingUpdateDeploymentApplyConfiguration represents a declarative configuration of the RollingUpdateDeployment type for use // with apply. +// +// Spec to control the desired behavior of rolling update. type RollingUpdateDeploymentApplyConfiguration struct { + // The maximum number of pods that can be unavailable during the update. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // Absolute number is calculated from percentage by rounding down. + // This can not be 0 if MaxSurge is 0. + // Defaults to 25%. + // Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods + // immediately when the rolling update starts. Once new pods are ready, old ReplicaSet + // can be scaled down further, followed by scaling up the new ReplicaSet, ensuring + // that the total number of pods available at all times during the update is at + // least 70% of desired pods. MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` - MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` + // The maximum number of pods that can be scheduled above the desired number of + // pods. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // This can not be 0 if MaxUnavailable is 0. + // Absolute number is calculated from percentage by rounding up. + // Defaults to 25%. + // Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when + // the rolling update starts, such that the total number of old and new pods do not exceed + // 130% of desired pods. Once old pods have been killed, + // new ReplicaSet can be scaled up further, ensuring that total number of pods running + // at any time during the update is at most 130% of desired pods. + MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` } // RollingUpdateDeploymentApplyConfiguration constructs a declarative configuration of the RollingUpdateDeployment type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatestatefulsetstrategy.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatestatefulsetstrategy.go index dd0de81a6cb17..0a8a4ec96190d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatestatefulsetstrategy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatestatefulsetstrategy.go @@ -24,8 +24,21 @@ import ( // RollingUpdateStatefulSetStrategyApplyConfiguration represents a declarative configuration of the RollingUpdateStatefulSetStrategy type for use // with apply. +// +// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. type RollingUpdateStatefulSetStrategyApplyConfiguration struct { - Partition *int32 `json:"partition,omitempty"` + // Partition indicates the ordinal at which the StatefulSet should be partitioned + // for updates. During a rolling update, all pods from ordinal Replicas-1 to + // Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. + // This is helpful in being able to do a canary based deployment. The default value is 0. + Partition *int32 `json:"partition,omitempty"` + // The maximum number of pods that can be unavailable during the update. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // Absolute number is calculated from percentage by rounding up. This can not be 0. + // Defaults to 1. This field is alpha-level and is only honored by servers that enable the + // MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to + // Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it + // will be counted towards MaxUnavailable. MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulset.go index fc682f68f9f4c..e3dc20463796a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulset.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulset.go @@ -29,11 +29,24 @@ import ( // StatefulSetApplyConfiguration represents a declarative configuration of the StatefulSet type for use // with apply. +// +// StatefulSet represents a set of pods with consistent identities. +// Identities are defined as: +// - Network: A single stable DNS and hostname. +// - Storage: As many VolumeClaims as requested. +// +// The StatefulSet guarantees that a given network identity will always +// map to the same storage identity. type StatefulSetApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *StatefulSetSpecApplyConfiguration `json:"spec,omitempty"` - Status *StatefulSetStatusApplyConfiguration `json:"status,omitempty"` + // Spec defines the desired identities of pods in this set. + Spec *StatefulSetSpecApplyConfiguration `json:"spec,omitempty"` + // Status is the current status of Pods in this StatefulSet. This data + // may be out of date by some window of time. + Status *StatefulSetStatusApplyConfiguration `json:"status,omitempty"` } // StatefulSet constructs a declarative configuration of the StatefulSet type for use with @@ -47,6 +60,27 @@ func StatefulSet(name, namespace string) *StatefulSetApplyConfiguration { return b } +// ExtractStatefulSetFrom extracts the applied configuration owned by fieldManager from +// statefulSet for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// statefulSet must be a unmodified StatefulSet API object that was retrieved from the Kubernetes API. +// ExtractStatefulSetFrom 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. +func ExtractStatefulSetFrom(statefulSet *appsv1.StatefulSet, fieldManager string, subresource string) (*StatefulSetApplyConfiguration, error) { + b := &StatefulSetApplyConfiguration{} + err := managedfields.ExtractInto(statefulSet, internal.Parser().Type("io.k8s.api.apps.v1.StatefulSet"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(statefulSet.Name) + b.WithNamespace(statefulSet.Namespace) + + b.WithKind("StatefulSet") + b.WithAPIVersion("apps/v1") + return b, nil +} + // ExtractStatefulSet extracts the applied configuration owned by fieldManager from // statefulSet. If no managedFields are found in statefulSet for fieldManager, a // StatefulSetApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +91,22 @@ func StatefulSet(name, namespace string) *StatefulSetApplyConfiguration { // ExtractStatefulSet 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 ExtractStatefulSet(statefulSet *appsv1.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) { - return extractStatefulSet(statefulSet, fieldManager, "") + return ExtractStatefulSetFrom(statefulSet, fieldManager, "") } -// ExtractStatefulSetStatus is the same as ExtractStatefulSet except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractStatefulSetStatus(statefulSet *appsv1.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) { - return extractStatefulSet(statefulSet, fieldManager, "status") +// ExtractStatefulSetScale extracts the applied configuration owned by fieldManager from +// statefulSet for the scale subresource. +func ExtractStatefulSetScale(statefulSet *appsv1.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) { + return ExtractStatefulSetFrom(statefulSet, fieldManager, "scale") } -func extractStatefulSet(statefulSet *appsv1.StatefulSet, fieldManager string, subresource string) (*StatefulSetApplyConfiguration, error) { - b := &StatefulSetApplyConfiguration{} - err := managedfields.ExtractInto(statefulSet, internal.Parser().Type("io.k8s.api.apps.v1.StatefulSet"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(statefulSet.Name) - b.WithNamespace(statefulSet.Namespace) - - b.WithKind("StatefulSet") - b.WithAPIVersion("apps/v1") - return b, nil +// ExtractStatefulSetStatus extracts the applied configuration owned by fieldManager from +// statefulSet for the status subresource. +func ExtractStatefulSetStatus(statefulSet *appsv1.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) { + return ExtractStatefulSetFrom(statefulSet, fieldManager, "status") } + func (b StatefulSetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetcondition.go index 45b2ad81f1d01..2d230fa83c66d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetcondition.go @@ -26,12 +26,19 @@ import ( // StatefulSetConditionApplyConfiguration represents a declarative configuration of the StatefulSetCondition type for use // with apply. +// +// StatefulSetCondition describes the state of a statefulset at a certain point. type StatefulSetConditionApplyConfiguration struct { - Type *appsv1.StatefulSetConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of statefulset condition. + Type *appsv1.StatefulSetConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *corev1.ConditionStatus `json:"status,omitempty"` + // Last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // A human readable message indicating details about the transition. + Message *string `json:"message,omitempty"` } // StatefulSetConditionApplyConfiguration constructs a declarative configuration of the StatefulSetCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetordinals.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetordinals.go index 86f39e16c1612..94492ac3d884f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetordinals.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetordinals.go @@ -20,7 +20,18 @@ package v1 // StatefulSetOrdinalsApplyConfiguration represents a declarative configuration of the StatefulSetOrdinals type for use // with apply. +// +// StatefulSetOrdinals describes the policy used for replica ordinal assignment +// in this StatefulSet. type StatefulSetOrdinalsApplyConfiguration struct { + // start is the number representing the first replica's index. It may be used + // to number replicas from an alternate index (eg: 1-indexed) over the default + // 0-indexed names, or to orchestrate progressive movement of replicas from + // one StatefulSet to another. + // If set, replica indices will be in the range: + // [.spec.ordinals.start, .spec.ordinals.start + .spec.replicas). + // If unset, defaults to 0. Replica indices will be in the range: + // [0, .spec.replicas). Start *int32 `json:"start,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetpersistentvolumeclaimretentionpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetpersistentvolumeclaimretentionpolicy.go index dff3e2a76bfad..5a4148470d4c2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetpersistentvolumeclaimretentionpolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetpersistentvolumeclaimretentionpolicy.go @@ -24,9 +24,21 @@ import ( // StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration represents a declarative configuration of the StatefulSetPersistentVolumeClaimRetentionPolicy type for use // with apply. +// +// StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs +// created from the StatefulSet VolumeClaimTemplates. type StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration struct { + // WhenDeleted specifies what happens to PVCs created from StatefulSet + // VolumeClaimTemplates when the StatefulSet is deleted. The default policy + // of `Retain` causes PVCs to not be affected by StatefulSet deletion. The + // `Delete` policy causes those PVCs to be deleted. WhenDeleted *appsv1.PersistentVolumeClaimRetentionPolicyType `json:"whenDeleted,omitempty"` - WhenScaled *appsv1.PersistentVolumeClaimRetentionPolicyType `json:"whenScaled,omitempty"` + // WhenScaled specifies what happens to PVCs created from StatefulSet + // VolumeClaimTemplates when the StatefulSet is scaled down. The default + // policy of `Retain` causes PVCs to not be affected by a scaledown. The + // `Delete` policy causes the associated PVCs for any excess pods above + // the replica count to be deleted. + WhenScaled *appsv1.PersistentVolumeClaimRetentionPolicyType `json:"whenScaled,omitempty"` } // StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration constructs a declarative configuration of the StatefulSetPersistentVolumeClaimRetentionPolicy type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetspec.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetspec.go index c48b64fe39b2c..ac6114a9b535f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetspec.go @@ -26,18 +26,74 @@ import ( // StatefulSetSpecApplyConfiguration represents a declarative configuration of the StatefulSetSpec type for use // with apply. +// +// A StatefulSetSpec is the specification of a StatefulSet. type StatefulSetSpecApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` - VolumeClaimTemplates []corev1.PersistentVolumeClaimApplyConfiguration `json:"volumeClaimTemplates,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` - PodManagementPolicy *appsv1.PodManagementPolicyType `json:"podManagementPolicy,omitempty"` - UpdateStrategy *StatefulSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"` - RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` - MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // replicas is the desired number of replicas of the given Template. + // These are replicas in the sense that they are instantiations of the + // same Template, but individual replicas also have a consistent identity. + // If unspecified, defaults to 1. + // TODO: Consider a rename of this field. + Replicas *int32 `json:"replicas,omitempty"` + // selector is a label query over pods that should match the replica count. + // It must match the pod template's labels. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // template is the object that describes the pod that will be created if + // insufficient replicas are detected. Each pod stamped out by the StatefulSet + // will fulfill this Template, but have a unique identity from the rest + // of the StatefulSet. Each pod will be named with the format + // -. For example, a pod in a StatefulSet named + // "web" with index number "3" would be named "web-3". + // The only allowed template.spec.restartPolicy value is "Always". + Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // volumeClaimTemplates is a list of claims that pods are allowed to reference. + // The StatefulSet controller is responsible for mapping network identities to + // claims in a way that maintains the identity of a pod. Every claim in + // this list must have at least one matching (by name) volumeMount in one + // container in the template. A claim in this list takes precedence over + // any volumes in the template, with the same name. + // TODO: Define the behavior if a claim already exists with the same name. + VolumeClaimTemplates []corev1.PersistentVolumeClaimApplyConfiguration `json:"volumeClaimTemplates,omitempty"` + // serviceName is the name of the service that governs this StatefulSet. + // This service must exist before the StatefulSet, and is responsible for + // the network identity of the set. Pods get DNS/hostnames that follow the + // pattern: pod-specific-string.serviceName.default.svc.cluster.local + // where "pod-specific-string" is managed by the StatefulSet controller. + ServiceName *string `json:"serviceName,omitempty"` + // podManagementPolicy controls how pods are created during initial scale up, + // when replacing pods on nodes, or when scaling down. The default policy is + // `OrderedReady`, where pods are created in increasing order (pod-0, then + // pod-1, etc) and the controller will wait until each pod is ready before + // continuing. When scaling down, the pods are removed in the opposite order. + // The alternative policy is `Parallel` which will create pods in parallel + // to match the desired scale without waiting, and on scale down will delete + // all pods at once. + PodManagementPolicy *appsv1.PodManagementPolicyType `json:"podManagementPolicy,omitempty"` + // updateStrategy indicates the StatefulSetUpdateStrategy that will be + // employed to update Pods in the StatefulSet when a revision is made to + // Template. + UpdateStrategy *StatefulSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"` + // revisionHistoryLimit is the maximum number of revisions that will + // be maintained in the StatefulSet's revision history. The revision history + // consists of all revisions not represented by a currently applied + // StatefulSetSpec version. The default value is 10. + RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent + // volume claims created from volumeClaimTemplates. By default, all persistent + // volume claims are created as needed and retained until manually deleted. This + // policy allows the lifecycle to be altered, for example by deleting persistent + // volume claims when their stateful set is deleted, or when their pod is scaled + // down. PersistentVolumeClaimRetentionPolicy *StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration `json:"persistentVolumeClaimRetentionPolicy,omitempty"` - Ordinals *StatefulSetOrdinalsApplyConfiguration `json:"ordinals,omitempty"` + // ordinals controls the numbering of replica indices in a StatefulSet. The + // default ordinals behavior assigns a "0" index to the first replica and + // increments the index by one for each additional replica requested. + Ordinals *StatefulSetOrdinalsApplyConfiguration `json:"ordinals,omitempty"` } // StatefulSetSpecApplyConfiguration constructs a declarative configuration of the StatefulSetSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetstatus.go index 637a1c649d25f..f60786d4c1f2b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetstatus.go @@ -20,17 +20,36 @@ package v1 // StatefulSetStatusApplyConfiguration represents a declarative configuration of the StatefulSetStatus type for use // with apply. +// +// StatefulSetStatus represents the current state of a StatefulSet. type StatefulSetStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Replicas *int32 `json:"replicas,omitempty"` - ReadyReplicas *int32 `json:"readyReplicas,omitempty"` - CurrentReplicas *int32 `json:"currentReplicas,omitempty"` - UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` - CurrentRevision *string `json:"currentRevision,omitempty"` - UpdateRevision *string `json:"updateRevision,omitempty"` - CollisionCount *int32 `json:"collisionCount,omitempty"` - Conditions []StatefulSetConditionApplyConfiguration `json:"conditions,omitempty"` - AvailableReplicas *int32 `json:"availableReplicas,omitempty"` + // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the + // StatefulSet's generation, which is updated on mutation by the API Server. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // replicas is the number of Pods created by the StatefulSet controller. + Replicas *int32 `json:"replicas,omitempty"` + // readyReplicas is the number of pods created for this StatefulSet with a Ready Condition. + ReadyReplicas *int32 `json:"readyReplicas,omitempty"` + // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version + // indicated by currentRevision. + CurrentReplicas *int32 `json:"currentReplicas,omitempty"` + // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version + // indicated by updateRevision. + UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` + // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the + // sequence [0,currentReplicas). + CurrentRevision *string `json:"currentRevision,omitempty"` + // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence + // [replicas-updatedReplicas,replicas) + UpdateRevision *string `json:"updateRevision,omitempty"` + // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller + // uses this field as a collision avoidance mechanism when it needs to create the name for the + // newest ControllerRevision. + CollisionCount *int32 `json:"collisionCount,omitempty"` + // Represents the latest available observations of a statefulset's current state. + Conditions []StatefulSetConditionApplyConfiguration `json:"conditions,omitempty"` + // Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. + AvailableReplicas *int32 `json:"availableReplicas,omitempty"` } // StatefulSetStatusApplyConfiguration constructs a declarative configuration of the StatefulSetStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetupdatestrategy.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetupdatestrategy.go index ae135d34d3b6b..7f27338399b12 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetupdatestrategy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulsetupdatestrategy.go @@ -24,8 +24,15 @@ import ( // StatefulSetUpdateStrategyApplyConfiguration represents a declarative configuration of the StatefulSetUpdateStrategy type for use // with apply. +// +// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet +// controller will use to perform updates. It includes any additional parameters +// necessary to perform the update for the indicated strategy. type StatefulSetUpdateStrategyApplyConfiguration struct { - Type *appsv1.StatefulSetUpdateStrategyType `json:"type,omitempty"` + // Type indicates the type of the StatefulSetUpdateStrategy. + // Default is RollingUpdate. + Type *appsv1.StatefulSetUpdateStrategyType `json:"type,omitempty"` + // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. RollingUpdate *RollingUpdateStatefulSetStrategyApplyConfiguration `json:"rollingUpdate,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/controllerrevision.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/controllerrevision.go index f8406d26ae1f5..6d2fdbefc84e8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/controllerrevision.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/controllerrevision.go @@ -30,11 +30,27 @@ import ( // ControllerRevisionApplyConfiguration represents a declarative configuration of the ControllerRevision type for use // with apply. +// +// DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the +// release notes for more information. +// ControllerRevision implements an immutable snapshot of state data. Clients +// are responsible for serializing and deserializing the objects that contain +// their internal state. +// Once a ControllerRevision has been successfully created, it can not be updated. +// The API Server will fail validation of all requests that attempt to mutate +// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both +// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, +// it may be subject to name and representation changes in future releases, and clients should not +// depend on its stability. It is primarily for internal use by controllers. type ControllerRevisionApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Data *runtime.RawExtension `json:"data,omitempty"` - Revision *int64 `json:"revision,omitempty"` + // data is the serialized representation of the state. + Data *runtime.RawExtension `json:"data,omitempty"` + // revision indicates the revision of the state represented by Data. + Revision *int64 `json:"revision,omitempty"` } // ControllerRevision constructs a declarative configuration of the ControllerRevision type for use with @@ -48,29 +64,14 @@ func ControllerRevision(name, namespace string) *ControllerRevisionApplyConfigur return b } -// ExtractControllerRevision extracts the applied configuration owned by fieldManager from -// controllerRevision. If no managedFields are found in controllerRevision for fieldManager, a -// ControllerRevisionApplyConfiguration 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. +// ExtractControllerRevisionFrom extracts the applied configuration owned by fieldManager from +// controllerRevision for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // controllerRevision must be a unmodified ControllerRevision API object that was retrieved from the Kubernetes API. -// ExtractControllerRevision provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractControllerRevisionFrom 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 ExtractControllerRevision(controllerRevision *appsv1beta1.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) { - return extractControllerRevision(controllerRevision, fieldManager, "") -} - -// ExtractControllerRevisionStatus is the same as ExtractControllerRevision except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractControllerRevisionStatus(controllerRevision *appsv1beta1.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) { - return extractControllerRevision(controllerRevision, fieldManager, "status") -} - -func extractControllerRevision(controllerRevision *appsv1beta1.ControllerRevision, fieldManager string, subresource string) (*ControllerRevisionApplyConfiguration, error) { +func ExtractControllerRevisionFrom(controllerRevision *appsv1beta1.ControllerRevision, fieldManager string, subresource string) (*ControllerRevisionApplyConfiguration, error) { b := &ControllerRevisionApplyConfiguration{} err := managedfields.ExtractInto(controllerRevision, internal.Parser().Type("io.k8s.api.apps.v1beta1.ControllerRevision"), fieldManager, b, subresource) if err != nil { @@ -83,6 +84,21 @@ func extractControllerRevision(controllerRevision *appsv1beta1.ControllerRevisio b.WithAPIVersion("apps/v1beta1") return b, nil } + +// ExtractControllerRevision extracts the applied configuration owned by fieldManager from +// controllerRevision. If no managedFields are found in controllerRevision for fieldManager, a +// ControllerRevisionApplyConfiguration 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. +// controllerRevision must be a unmodified ControllerRevision API object that was retrieved from the Kubernetes API. +// ExtractControllerRevision 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. +func ExtractControllerRevision(controllerRevision *appsv1beta1.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) { + return ExtractControllerRevisionFrom(controllerRevision, fieldManager, "") +} + func (b ControllerRevisionApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deployment.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deployment.go index eae1504079ce2..e8195218cee24 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deployment.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deployment.go @@ -29,11 +29,18 @@ import ( // DeploymentApplyConfiguration represents a declarative configuration of the Deployment type for use // with apply. +// +// DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for +// more information. +// Deployment enables declarative updates for Pods and ReplicaSets. type DeploymentApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *DeploymentSpecApplyConfiguration `json:"spec,omitempty"` - Status *DeploymentStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of the Deployment. + Spec *DeploymentSpecApplyConfiguration `json:"spec,omitempty"` + // Most recently observed status of the Deployment. + Status *DeploymentStatusApplyConfiguration `json:"status,omitempty"` } // Deployment constructs a declarative configuration of the Deployment type for use with @@ -47,6 +54,27 @@ func Deployment(name, namespace string) *DeploymentApplyConfiguration { return b } +// ExtractDeploymentFrom extracts the applied configuration owned by fieldManager from +// deployment for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// deployment must be a unmodified Deployment API object that was retrieved from the Kubernetes API. +// ExtractDeploymentFrom 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. +func ExtractDeploymentFrom(deployment *appsv1beta1.Deployment, fieldManager string, subresource string) (*DeploymentApplyConfiguration, error) { + b := &DeploymentApplyConfiguration{} + err := managedfields.ExtractInto(deployment, internal.Parser().Type("io.k8s.api.apps.v1beta1.Deployment"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(deployment.Name) + b.WithNamespace(deployment.Namespace) + + b.WithKind("Deployment") + b.WithAPIVersion("apps/v1beta1") + return b, nil +} + // ExtractDeployment extracts the applied configuration owned by fieldManager from // deployment. If no managedFields are found in deployment for fieldManager, a // DeploymentApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +85,16 @@ func Deployment(name, namespace string) *DeploymentApplyConfiguration { // ExtractDeployment 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 ExtractDeployment(deployment *appsv1beta1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) { - return extractDeployment(deployment, fieldManager, "") + return ExtractDeploymentFrom(deployment, fieldManager, "") } -// ExtractDeploymentStatus is the same as ExtractDeployment except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractDeploymentStatus extracts the applied configuration owned by fieldManager from +// deployment for the status subresource. func ExtractDeploymentStatus(deployment *appsv1beta1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) { - return extractDeployment(deployment, fieldManager, "status") + return ExtractDeploymentFrom(deployment, fieldManager, "status") } -func extractDeployment(deployment *appsv1beta1.Deployment, fieldManager string, subresource string) (*DeploymentApplyConfiguration, error) { - b := &DeploymentApplyConfiguration{} - err := managedfields.ExtractInto(deployment, internal.Parser().Type("io.k8s.api.apps.v1beta1.Deployment"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(deployment.Name) - b.WithNamespace(deployment.Namespace) - - b.WithKind("Deployment") - b.WithAPIVersion("apps/v1beta1") - return b, nil -} func (b DeploymentApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentcondition.go index b0a45b1a6e43e..a146cbac1ebb0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentcondition.go @@ -26,13 +26,21 @@ import ( // DeploymentConditionApplyConfiguration represents a declarative configuration of the DeploymentCondition type for use // with apply. +// +// DeploymentCondition describes the state of a deployment at a certain point. type DeploymentConditionApplyConfiguration struct { - Type *appsv1beta1.DeploymentConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of deployment condition. + Type *appsv1beta1.DeploymentConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *v1.ConditionStatus `json:"status,omitempty"` + // The last time this condition was updated. + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` + // Last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // A human readable message indicating details about the transition. + Message *string `json:"message,omitempty"` } // DeploymentConditionApplyConfiguration constructs a declarative configuration of the DeploymentCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentspec.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentspec.go index 5531c756f9de8..a286c17b83e85 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentspec.go @@ -25,16 +25,39 @@ import ( // DeploymentSpecApplyConfiguration represents a declarative configuration of the DeploymentSpec type for use // with apply. +// +// DeploymentSpec is the specification of the desired behavior of the Deployment. type DeploymentSpecApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` - Strategy *DeploymentStrategyApplyConfiguration `json:"strategy,omitempty"` - MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` - Paused *bool `json:"paused,omitempty"` - RollbackTo *RollbackConfigApplyConfiguration `json:"rollbackTo,omitempty"` - ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"` + // replicas is the number of desired pods. This is a pointer to distinguish between explicit + // zero and not specified. Defaults to 1. + Replicas *int32 `json:"replicas,omitempty"` + // selector is the label selector for pods. Existing ReplicaSets whose pods are + // selected by this will be the ones affected by this deployment. + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // Template describes the pods that will be created. + // The only allowed template.spec.restartPolicy value is "Always". + Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // The deployment strategy to use to replace existing pods with new ones. + Strategy *DeploymentStrategyApplyConfiguration `json:"strategy,omitempty"` + // minReadySeconds is the minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // revisionHistoryLimit is the number of old ReplicaSets to retain to allow rollback. + // This is a pointer to distinguish between explicit zero and not specified. + // Defaults to 2. + RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` + // paused indicates that the deployment is paused. + Paused *bool `json:"paused,omitempty"` + // DEPRECATED. + // rollbackTo is the config this deployment is rolling back to. Will be cleared after rollback is done. + RollbackTo *RollbackConfigApplyConfiguration `json:"rollbackTo,omitempty"` + // progressDeadlineSeconds is the maximum time in seconds for a deployment to make progress before it + // is considered to be failed. The deployment controller will continue to + // process failed deployments and a condition with a ProgressDeadlineExceeded + // reason will be surfaced in the deployment status. Note that progress will + // not be estimated during the time a deployment is paused. Defaults to 600s. + ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"` } // DeploymentSpecApplyConfiguration constructs a declarative configuration of the DeploymentSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentstatus.go index 36b4fd42b6e2b..ef7025959f677 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentstatus.go @@ -20,16 +20,34 @@ package v1beta1 // DeploymentStatusApplyConfiguration represents a declarative configuration of the DeploymentStatus type for use // with apply. +// +// DeploymentStatus is the most recently observed status of the Deployment. type DeploymentStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Replicas *int32 `json:"replicas,omitempty"` - UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` - ReadyReplicas *int32 `json:"readyReplicas,omitempty"` - AvailableReplicas *int32 `json:"availableReplicas,omitempty"` - UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"` - TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"` - Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"` - CollisionCount *int32 `json:"collisionCount,omitempty"` + // The generation observed by the deployment controller. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // Total number of non-terminating pods targeted by this deployment (their labels match the selector). + Replicas *int32 `json:"replicas,omitempty"` + // Total number of non-terminating pods targeted by this deployment that have the desired template spec. + UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` + // Total number of non-terminating pods targeted by this Deployment with a Ready Condition. + ReadyReplicas *int32 `json:"readyReplicas,omitempty"` + // Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment. + AvailableReplicas *int32 `json:"availableReplicas,omitempty"` + // Total number of unavailable pods targeted by this deployment. This is the total number of + // pods that are still required for the deployment to have 100% available capacity. They may + // either be pods that are running but not yet available or pods that still have not been created. + UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"` + // Total number of terminating pods targeted by this deployment. Terminating pods have a non-null + // .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. + // + // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. + TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"` + // Represents the latest available observations of a deployment's current state. + Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"` + // collisionCount is the count of hash collisions for the Deployment. The Deployment controller uses this + // field as a collision avoidance mechanism when it needs to create the name for the + // newest ReplicaSet. + CollisionCount *int32 `json:"collisionCount,omitempty"` } // DeploymentStatusApplyConfiguration constructs a declarative configuration of the DeploymentStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentstrategy.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentstrategy.go index 03e66555af10b..c033daeb9227d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentstrategy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deploymentstrategy.go @@ -24,8 +24,16 @@ import ( // DeploymentStrategyApplyConfiguration represents a declarative configuration of the DeploymentStrategy type for use // with apply. +// +// DeploymentStrategy describes how to replace existing pods with new ones. type DeploymentStrategyApplyConfiguration struct { - Type *appsv1beta1.DeploymentStrategyType `json:"type,omitempty"` + // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. + Type *appsv1beta1.DeploymentStrategyType `json:"type,omitempty"` + // Rolling update config params. Present only if DeploymentStrategyType = + // RollingUpdate. + // --- + // TODO: Update this to follow our convention for oneOf, whatever we decide it + // to be. RollingUpdate *RollingUpdateDeploymentApplyConfiguration `json:"rollingUpdate,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollbackconfig.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollbackconfig.go index 775f82eef8019..f73b9e670eafe 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollbackconfig.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollbackconfig.go @@ -20,7 +20,10 @@ package v1beta1 // RollbackConfigApplyConfiguration represents a declarative configuration of the RollbackConfig type for use // with apply. +// +// DEPRECATED. type RollbackConfigApplyConfiguration struct { + // The revision to rollback to. If set to 0, rollback to the last revision. Revision *int64 `json:"revision,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollingupdatedeployment.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollingupdatedeployment.go index 244701a5e0158..31f0479999bf8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollingupdatedeployment.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollingupdatedeployment.go @@ -24,9 +24,32 @@ import ( // RollingUpdateDeploymentApplyConfiguration represents a declarative configuration of the RollingUpdateDeployment type for use // with apply. +// +// Spec to control the desired behavior of rolling update. type RollingUpdateDeploymentApplyConfiguration struct { + // The maximum number of pods that can be unavailable during the update. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // Absolute number is calculated from percentage by rounding down. + // This can not be 0 if MaxSurge is 0. + // Defaults to 25%. + // Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods + // immediately when the rolling update starts. Once new pods are ready, old ReplicaSet + // can be scaled down further, followed by scaling up the new ReplicaSet, ensuring + // that the total number of pods available at all times during the update is at + // least 70% of desired pods. MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` - MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` + // The maximum number of pods that can be scheduled above the desired number of + // pods. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // This can not be 0 if MaxUnavailable is 0. + // Absolute number is calculated from percentage by rounding up. + // Defaults to 25%. + // Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when + // the rolling update starts, such that the total number of old and new pods do not exceed + // 130% of desired pods. Once old pods have been killed, + // new ReplicaSet can be scaled up further, ensuring that total number of pods running + // at any time during the update is at most 130% of desired pods. + MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` } // RollingUpdateDeploymentApplyConfiguration constructs a declarative configuration of the RollingUpdateDeployment type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollingupdatestatefulsetstrategy.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollingupdatestatefulsetstrategy.go index 94c2971343e77..131155fe91220 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollingupdatestatefulsetstrategy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollingupdatestatefulsetstrategy.go @@ -24,8 +24,21 @@ import ( // RollingUpdateStatefulSetStrategyApplyConfiguration represents a declarative configuration of the RollingUpdateStatefulSetStrategy type for use // with apply. +// +// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. type RollingUpdateStatefulSetStrategyApplyConfiguration struct { - Partition *int32 `json:"partition,omitempty"` + // Partition indicates the ordinal at which the StatefulSet should be partitioned + // for updates. During a rolling update, all pods from ordinal Replicas-1 to + // Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. + // This is helpful in being able to do a canary based deployment. The default value is 0. + Partition *int32 `json:"partition,omitempty"` + // maxUnavailable is the maximum number of pods that can be unavailable during the update. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // Absolute number is calculated from percentage by rounding up. This can not be 0. + // Defaults to 1. This field is alpha-level and is only honored by servers that enable the + // MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to + // Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it + // will be counted towards MaxUnavailable. MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulset.go index d9b3af8ef2043..361ed68a9096f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulset.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulset.go @@ -29,11 +29,24 @@ import ( // StatefulSetApplyConfiguration represents a declarative configuration of the StatefulSet type for use // with apply. +// +// DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for +// more information. +// StatefulSet represents a set of pods with consistent identities. +// Identities are defined as: +// - Network: A single stable DNS and hostname. +// - Storage: As many VolumeClaims as requested. +// +// The StatefulSet guarantees that a given network identity will always +// map to the same storage identity. type StatefulSetApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *StatefulSetSpecApplyConfiguration `json:"spec,omitempty"` - Status *StatefulSetStatusApplyConfiguration `json:"status,omitempty"` + // Spec defines the desired identities of pods in this set. + Spec *StatefulSetSpecApplyConfiguration `json:"spec,omitempty"` + // Status is the current status of Pods in this StatefulSet. This data + // may be out of date by some window of time. + Status *StatefulSetStatusApplyConfiguration `json:"status,omitempty"` } // StatefulSet constructs a declarative configuration of the StatefulSet type for use with @@ -47,6 +60,27 @@ func StatefulSet(name, namespace string) *StatefulSetApplyConfiguration { return b } +// ExtractStatefulSetFrom extracts the applied configuration owned by fieldManager from +// statefulSet for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// statefulSet must be a unmodified StatefulSet API object that was retrieved from the Kubernetes API. +// ExtractStatefulSetFrom 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. +func ExtractStatefulSetFrom(statefulSet *appsv1beta1.StatefulSet, fieldManager string, subresource string) (*StatefulSetApplyConfiguration, error) { + b := &StatefulSetApplyConfiguration{} + err := managedfields.ExtractInto(statefulSet, internal.Parser().Type("io.k8s.api.apps.v1beta1.StatefulSet"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(statefulSet.Name) + b.WithNamespace(statefulSet.Namespace) + + b.WithKind("StatefulSet") + b.WithAPIVersion("apps/v1beta1") + return b, nil +} + // ExtractStatefulSet extracts the applied configuration owned by fieldManager from // statefulSet. If no managedFields are found in statefulSet for fieldManager, a // StatefulSetApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +91,16 @@ func StatefulSet(name, namespace string) *StatefulSetApplyConfiguration { // ExtractStatefulSet 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 ExtractStatefulSet(statefulSet *appsv1beta1.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) { - return extractStatefulSet(statefulSet, fieldManager, "") + return ExtractStatefulSetFrom(statefulSet, fieldManager, "") } -// ExtractStatefulSetStatus is the same as ExtractStatefulSet except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractStatefulSetStatus extracts the applied configuration owned by fieldManager from +// statefulSet for the status subresource. func ExtractStatefulSetStatus(statefulSet *appsv1beta1.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) { - return extractStatefulSet(statefulSet, fieldManager, "status") + return ExtractStatefulSetFrom(statefulSet, fieldManager, "status") } -func extractStatefulSet(statefulSet *appsv1beta1.StatefulSet, fieldManager string, subresource string) (*StatefulSetApplyConfiguration, error) { - b := &StatefulSetApplyConfiguration{} - err := managedfields.ExtractInto(statefulSet, internal.Parser().Type("io.k8s.api.apps.v1beta1.StatefulSet"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(statefulSet.Name) - b.WithNamespace(statefulSet.Namespace) - - b.WithKind("StatefulSet") - b.WithAPIVersion("apps/v1beta1") - return b, nil -} func (b StatefulSetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetcondition.go index 5a13584bc0862..6811ce55f4fbb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetcondition.go @@ -26,12 +26,19 @@ import ( // StatefulSetConditionApplyConfiguration represents a declarative configuration of the StatefulSetCondition type for use // with apply. +// +// StatefulSetCondition describes the state of a statefulset at a certain point. type StatefulSetConditionApplyConfiguration struct { - Type *appsv1beta1.StatefulSetConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of statefulset condition. + Type *appsv1beta1.StatefulSetConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *v1.ConditionStatus `json:"status,omitempty"` + // Last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // A human readable message indicating details about the transition. + Message *string `json:"message,omitempty"` } // StatefulSetConditionApplyConfiguration constructs a declarative configuration of the StatefulSetCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetordinals.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetordinals.go index 2e3049e5e2210..a2b1bd09f1a47 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetordinals.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetordinals.go @@ -20,7 +20,18 @@ package v1beta1 // StatefulSetOrdinalsApplyConfiguration represents a declarative configuration of the StatefulSetOrdinals type for use // with apply. +// +// StatefulSetOrdinals describes the policy used for replica ordinal assignment +// in this StatefulSet. type StatefulSetOrdinalsApplyConfiguration struct { + // start is the number representing the first replica's index. It may be used + // to number replicas from an alternate index (eg: 1-indexed) over the default + // 0-indexed names, or to orchestrate progressive movement of replicas from + // one StatefulSet to another. + // If set, replica indices will be in the range: + // [.spec.ordinals.start, .spec.ordinals.start + .spec.replicas). + // If unset, defaults to 0. Replica indices will be in the range: + // [0, .spec.replicas). Start *int32 `json:"start,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetpersistentvolumeclaimretentionpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetpersistentvolumeclaimretentionpolicy.go index f9b6fbd881685..b2d69b662e5e6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetpersistentvolumeclaimretentionpolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetpersistentvolumeclaimretentionpolicy.go @@ -24,9 +24,21 @@ import ( // StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration represents a declarative configuration of the StatefulSetPersistentVolumeClaimRetentionPolicy type for use // with apply. +// +// StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs +// created from the StatefulSet VolumeClaimTemplates. type StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration struct { + // whenDeleted specifies what happens to PVCs created from StatefulSet + // VolumeClaimTemplates when the StatefulSet is deleted. The default policy + // of `Retain` causes PVCs to not be affected by StatefulSet deletion. The + // `Delete` policy causes those PVCs to be deleted. WhenDeleted *appsv1beta1.PersistentVolumeClaimRetentionPolicyType `json:"whenDeleted,omitempty"` - WhenScaled *appsv1beta1.PersistentVolumeClaimRetentionPolicyType `json:"whenScaled,omitempty"` + // whenScaled specifies what happens to PVCs created from StatefulSet + // VolumeClaimTemplates when the StatefulSet is scaled down. The default + // policy of `Retain` causes PVCs to not be affected by a scaledown. The + // `Delete` policy causes the associated PVCs for any excess pods above + // the replica count to be deleted. + WhenScaled *appsv1beta1.PersistentVolumeClaimRetentionPolicyType `json:"whenScaled,omitempty"` } // StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration constructs a declarative configuration of the StatefulSetPersistentVolumeClaimRetentionPolicy type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetspec.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetspec.go index 137c7243b8d38..3047440cac98d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetspec.go @@ -26,18 +26,73 @@ import ( // StatefulSetSpecApplyConfiguration represents a declarative configuration of the StatefulSetSpec type for use // with apply. +// +// A StatefulSetSpec is the specification of a StatefulSet. type StatefulSetSpecApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` - VolumeClaimTemplates []corev1.PersistentVolumeClaimApplyConfiguration `json:"volumeClaimTemplates,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` - PodManagementPolicy *appsv1beta1.PodManagementPolicyType `json:"podManagementPolicy,omitempty"` - UpdateStrategy *StatefulSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"` - RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` - MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // replicas is the desired number of replicas of the given Template. + // These are replicas in the sense that they are instantiations of the + // same Template, but individual replicas also have a consistent identity. + // If unspecified, defaults to 1. + // TODO: Consider a rename of this field. + Replicas *int32 `json:"replicas,omitempty"` + // selector is a label query over pods that should match the replica count. + // If empty, defaulted to labels on the pod template. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // template is the object that describes the pod that will be created if + // insufficient replicas are detected. Each pod stamped out by the StatefulSet + // will fulfill this Template, but have a unique identity from the rest + // of the StatefulSet. Each pod will be named with the format + // -. For example, a pod in a StatefulSet named + // "web" with index number "3" would be named "web-3". + Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // volumeClaimTemplates is a list of claims that pods are allowed to reference. + // The StatefulSet controller is responsible for mapping network identities to + // claims in a way that maintains the identity of a pod. Every claim in + // this list must have at least one matching (by name) volumeMount in one + // container in the template. A claim in this list takes precedence over + // any volumes in the template, with the same name. + // TODO: Define the behavior if a claim already exists with the same name. + VolumeClaimTemplates []corev1.PersistentVolumeClaimApplyConfiguration `json:"volumeClaimTemplates,omitempty"` + // serviceName is the name of the service that governs this StatefulSet. + // This service must exist before the StatefulSet, and is responsible for + // the network identity of the set. Pods get DNS/hostnames that follow the + // pattern: pod-specific-string.serviceName.default.svc.cluster.local + // where "pod-specific-string" is managed by the StatefulSet controller. + ServiceName *string `json:"serviceName,omitempty"` + // podManagementPolicy controls how pods are created during initial scale up, + // when replacing pods on nodes, or when scaling down. The default policy is + // `OrderedReady`, where pods are created in increasing order (pod-0, then + // pod-1, etc) and the controller will wait until each pod is ready before + // continuing. When scaling down, the pods are removed in the opposite order. + // The alternative policy is `Parallel` which will create pods in parallel + // to match the desired scale without waiting, and on scale down will delete + // all pods at once. + PodManagementPolicy *appsv1beta1.PodManagementPolicyType `json:"podManagementPolicy,omitempty"` + // updateStrategy indicates the StatefulSetUpdateStrategy that will be + // employed to update Pods in the StatefulSet when a revision is made to + // Template. + UpdateStrategy *StatefulSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"` + // revisionHistoryLimit is the maximum number of revisions that will + // be maintained in the StatefulSet's revision history. The revision history + // consists of all revisions not represented by a currently applied + // StatefulSetSpec version. The default value is 10. + RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` + // minReadySeconds is the minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent + // volume claims created from volumeClaimTemplates. By default, all persistent + // volume claims are created as needed and retained until manually deleted. This + // policy allows the lifecycle to be altered, for example by deleting persistent + // volume claims when their stateful set is deleted, or when their pod is scaled + // down. PersistentVolumeClaimRetentionPolicy *StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration `json:"persistentVolumeClaimRetentionPolicy,omitempty"` - Ordinals *StatefulSetOrdinalsApplyConfiguration `json:"ordinals,omitempty"` + // ordinals controls the numbering of replica indices in a StatefulSet. The + // default ordinals behavior assigns a "0" index to the first replica and + // increments the index by one for each additional replica requested. + Ordinals *StatefulSetOrdinalsApplyConfiguration `json:"ordinals,omitempty"` } // StatefulSetSpecApplyConfiguration constructs a declarative configuration of the StatefulSetSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetstatus.go index 27ae7540fd245..9ffc085a8ac3a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetstatus.go @@ -20,17 +20,36 @@ package v1beta1 // StatefulSetStatusApplyConfiguration represents a declarative configuration of the StatefulSetStatus type for use // with apply. +// +// StatefulSetStatus represents the current state of a StatefulSet. type StatefulSetStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Replicas *int32 `json:"replicas,omitempty"` - ReadyReplicas *int32 `json:"readyReplicas,omitempty"` - CurrentReplicas *int32 `json:"currentReplicas,omitempty"` - UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` - CurrentRevision *string `json:"currentRevision,omitempty"` - UpdateRevision *string `json:"updateRevision,omitempty"` - CollisionCount *int32 `json:"collisionCount,omitempty"` - Conditions []StatefulSetConditionApplyConfiguration `json:"conditions,omitempty"` - AvailableReplicas *int32 `json:"availableReplicas,omitempty"` + // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the + // StatefulSet's generation, which is updated on mutation by the API Server. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // replicas is the number of Pods created by the StatefulSet controller. + Replicas *int32 `json:"replicas,omitempty"` + // readyReplicas is the number of pods created by this StatefulSet controller with a Ready Condition. + ReadyReplicas *int32 `json:"readyReplicas,omitempty"` + // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version + // indicated by currentRevision. + CurrentReplicas *int32 `json:"currentReplicas,omitempty"` + // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version + // indicated by updateRevision. + UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` + // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the + // sequence [0,currentReplicas). + CurrentRevision *string `json:"currentRevision,omitempty"` + // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence + // [replicas-updatedReplicas,replicas) + UpdateRevision *string `json:"updateRevision,omitempty"` + // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller + // uses this field as a collision avoidance mechanism when it needs to create the name for the + // newest ControllerRevision. + CollisionCount *int32 `json:"collisionCount,omitempty"` + // conditions represent the latest available observations of a statefulset's current state. + Conditions []StatefulSetConditionApplyConfiguration `json:"conditions,omitempty"` + // availableReplicas is the total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. + AvailableReplicas *int32 `json:"availableReplicas,omitempty"` } // StatefulSetStatusApplyConfiguration constructs a declarative configuration of the StatefulSetStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetupdatestrategy.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetupdatestrategy.go index 24154f7af1151..48d62bf5d9ccb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetupdatestrategy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulsetupdatestrategy.go @@ -24,8 +24,14 @@ import ( // StatefulSetUpdateStrategyApplyConfiguration represents a declarative configuration of the StatefulSetUpdateStrategy type for use // with apply. +// +// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet +// controller will use to perform updates. It includes any additional parameters +// necessary to perform the update for the indicated strategy. type StatefulSetUpdateStrategyApplyConfiguration struct { - Type *appsv1beta1.StatefulSetUpdateStrategyType `json:"type,omitempty"` + // Type indicates the type of the StatefulSetUpdateStrategy. + Type *appsv1beta1.StatefulSetUpdateStrategyType `json:"type,omitempty"` + // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. RollingUpdate *RollingUpdateStatefulSetStrategyApplyConfiguration `json:"rollingUpdate,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/controllerrevision.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/controllerrevision.go index 4c08b852f8372..8ffacf61c2d99 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/controllerrevision.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/controllerrevision.go @@ -30,11 +30,27 @@ import ( // ControllerRevisionApplyConfiguration represents a declarative configuration of the ControllerRevision type for use // with apply. +// +// DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the +// release notes for more information. +// ControllerRevision implements an immutable snapshot of state data. Clients +// are responsible for serializing and deserializing the objects that contain +// their internal state. +// Once a ControllerRevision has been successfully created, it can not be updated. +// The API Server will fail validation of all requests that attempt to mutate +// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both +// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, +// it may be subject to name and representation changes in future releases, and clients should not +// depend on its stability. It is primarily for internal use by controllers. type ControllerRevisionApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Data *runtime.RawExtension `json:"data,omitempty"` - Revision *int64 `json:"revision,omitempty"` + // Data is the serialized representation of the state. + Data *runtime.RawExtension `json:"data,omitempty"` + // Revision indicates the revision of the state represented by Data. + Revision *int64 `json:"revision,omitempty"` } // ControllerRevision constructs a declarative configuration of the ControllerRevision type for use with @@ -48,29 +64,14 @@ func ControllerRevision(name, namespace string) *ControllerRevisionApplyConfigur return b } -// ExtractControllerRevision extracts the applied configuration owned by fieldManager from -// controllerRevision. If no managedFields are found in controllerRevision for fieldManager, a -// ControllerRevisionApplyConfiguration 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. +// ExtractControllerRevisionFrom extracts the applied configuration owned by fieldManager from +// controllerRevision for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // controllerRevision must be a unmodified ControllerRevision API object that was retrieved from the Kubernetes API. -// ExtractControllerRevision provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractControllerRevisionFrom 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 ExtractControllerRevision(controllerRevision *appsv1beta2.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) { - return extractControllerRevision(controllerRevision, fieldManager, "") -} - -// ExtractControllerRevisionStatus is the same as ExtractControllerRevision except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractControllerRevisionStatus(controllerRevision *appsv1beta2.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) { - return extractControllerRevision(controllerRevision, fieldManager, "status") -} - -func extractControllerRevision(controllerRevision *appsv1beta2.ControllerRevision, fieldManager string, subresource string) (*ControllerRevisionApplyConfiguration, error) { +func ExtractControllerRevisionFrom(controllerRevision *appsv1beta2.ControllerRevision, fieldManager string, subresource string) (*ControllerRevisionApplyConfiguration, error) { b := &ControllerRevisionApplyConfiguration{} err := managedfields.ExtractInto(controllerRevision, internal.Parser().Type("io.k8s.api.apps.v1beta2.ControllerRevision"), fieldManager, b, subresource) if err != nil { @@ -83,6 +84,21 @@ func extractControllerRevision(controllerRevision *appsv1beta2.ControllerRevisio b.WithAPIVersion("apps/v1beta2") return b, nil } + +// ExtractControllerRevision extracts the applied configuration owned by fieldManager from +// controllerRevision. If no managedFields are found in controllerRevision for fieldManager, a +// ControllerRevisionApplyConfiguration 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. +// controllerRevision must be a unmodified ControllerRevision API object that was retrieved from the Kubernetes API. +// ExtractControllerRevision 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. +func ExtractControllerRevision(controllerRevision *appsv1beta2.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) { + return ExtractControllerRevisionFrom(controllerRevision, fieldManager, "") +} + func (b ControllerRevisionApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonset.go index b7599b3c48b1e..12b6150a3a01c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonset.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonset.go @@ -29,11 +29,24 @@ import ( // DaemonSetApplyConfiguration represents a declarative configuration of the DaemonSet type for use // with apply. +// +// DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for +// more information. +// DaemonSet represents the configuration of a daemon set. type DaemonSetApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *DaemonSetSpecApplyConfiguration `json:"spec,omitempty"` - Status *DaemonSetStatusApplyConfiguration `json:"status,omitempty"` + // The desired behavior of this daemon set. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *DaemonSetSpecApplyConfiguration `json:"spec,omitempty"` + // The current status of this daemon set. This data may be + // out of date by some window of time. + // Populated by the system. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *DaemonSetStatusApplyConfiguration `json:"status,omitempty"` } // DaemonSet constructs a declarative configuration of the DaemonSet type for use with @@ -47,6 +60,27 @@ func DaemonSet(name, namespace string) *DaemonSetApplyConfiguration { return b } +// ExtractDaemonSetFrom extracts the applied configuration owned by fieldManager from +// daemonSet for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// daemonSet must be a unmodified DaemonSet API object that was retrieved from the Kubernetes API. +// ExtractDaemonSetFrom 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. +func ExtractDaemonSetFrom(daemonSet *appsv1beta2.DaemonSet, fieldManager string, subresource string) (*DaemonSetApplyConfiguration, error) { + b := &DaemonSetApplyConfiguration{} + err := managedfields.ExtractInto(daemonSet, internal.Parser().Type("io.k8s.api.apps.v1beta2.DaemonSet"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(daemonSet.Name) + b.WithNamespace(daemonSet.Namespace) + + b.WithKind("DaemonSet") + b.WithAPIVersion("apps/v1beta2") + return b, nil +} + // ExtractDaemonSet extracts the applied configuration owned by fieldManager from // daemonSet. If no managedFields are found in daemonSet for fieldManager, a // DaemonSetApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +91,16 @@ func DaemonSet(name, namespace string) *DaemonSetApplyConfiguration { // ExtractDaemonSet 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 ExtractDaemonSet(daemonSet *appsv1beta2.DaemonSet, fieldManager string) (*DaemonSetApplyConfiguration, error) { - return extractDaemonSet(daemonSet, fieldManager, "") + return ExtractDaemonSetFrom(daemonSet, fieldManager, "") } -// ExtractDaemonSetStatus is the same as ExtractDaemonSet except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractDaemonSetStatus extracts the applied configuration owned by fieldManager from +// daemonSet for the status subresource. func ExtractDaemonSetStatus(daemonSet *appsv1beta2.DaemonSet, fieldManager string) (*DaemonSetApplyConfiguration, error) { - return extractDaemonSet(daemonSet, fieldManager, "status") + return ExtractDaemonSetFrom(daemonSet, fieldManager, "status") } -func extractDaemonSet(daemonSet *appsv1beta2.DaemonSet, fieldManager string, subresource string) (*DaemonSetApplyConfiguration, error) { - b := &DaemonSetApplyConfiguration{} - err := managedfields.ExtractInto(daemonSet, internal.Parser().Type("io.k8s.api.apps.v1beta2.DaemonSet"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(daemonSet.Name) - b.WithNamespace(daemonSet.Namespace) - - b.WithKind("DaemonSet") - b.WithAPIVersion("apps/v1beta2") - return b, nil -} func (b DaemonSetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetcondition.go index 0aa47cf0afaca..5c25b8158a18e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetcondition.go @@ -26,12 +26,20 @@ import ( // DaemonSetConditionApplyConfiguration represents a declarative configuration of the DaemonSetCondition type for use // with apply. +// +// TODO: Add valid condition types of a DaemonSet. +// DaemonSetCondition describes the state of a DaemonSet at a certain point. type DaemonSetConditionApplyConfiguration struct { - Type *appsv1beta2.DaemonSetConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of DaemonSet condition. + Type *appsv1beta2.DaemonSetConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *v1.ConditionStatus `json:"status,omitempty"` + // Last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // A human readable message indicating details about the transition. + Message *string `json:"message,omitempty"` } // DaemonSetConditionApplyConfiguration constructs a declarative configuration of the DaemonSetCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetspec.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetspec.go index 74d8bf51c6276..a2808eb73ab2a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetspec.go @@ -25,12 +25,32 @@ import ( // DaemonSetSpecApplyConfiguration represents a declarative configuration of the DaemonSetSpec type for use // with apply. +// +// DaemonSetSpec is the specification of a daemon set. type DaemonSetSpecApplyConfiguration struct { - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` - UpdateStrategy *DaemonSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"` - MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` + // A label query over pods that are managed by the daemon set. + // Must match in order to be controlled. + // It must match the pod template's labels. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // An object that describes the pod that will be created. + // The DaemonSet will create exactly one copy of this pod on every node + // that matches the template's node selector (or on every node if no node + // selector is specified). + // The only allowed template.spec.restartPolicy value is "Always". + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template + Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // An update strategy to replace existing DaemonSet pods with new pods. + UpdateStrategy *DaemonSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"` + // The minimum number of seconds for which a newly created DaemonSet pod should + // be ready without any of its container crashing, for it to be considered + // available. Defaults to 0 (pod will be considered available as soon as it + // is ready). + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // The number of old history to retain to allow rollback. + // This is a pointer to distinguish between explicit zero and not specified. + // Defaults to 10. + RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` } // DaemonSetSpecApplyConfiguration constructs a declarative configuration of the DaemonSetSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetstatus.go index 6b0fda89530b1..c42eb276dd64d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetstatus.go @@ -20,17 +20,42 @@ package v1beta2 // DaemonSetStatusApplyConfiguration represents a declarative configuration of the DaemonSetStatus type for use // with apply. +// +// DaemonSetStatus represents the current status of a daemon set. type DaemonSetStatusApplyConfiguration struct { - CurrentNumberScheduled *int32 `json:"currentNumberScheduled,omitempty"` - NumberMisscheduled *int32 `json:"numberMisscheduled,omitempty"` - DesiredNumberScheduled *int32 `json:"desiredNumberScheduled,omitempty"` - NumberReady *int32 `json:"numberReady,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - UpdatedNumberScheduled *int32 `json:"updatedNumberScheduled,omitempty"` - NumberAvailable *int32 `json:"numberAvailable,omitempty"` - NumberUnavailable *int32 `json:"numberUnavailable,omitempty"` - CollisionCount *int32 `json:"collisionCount,omitempty"` - Conditions []DaemonSetConditionApplyConfiguration `json:"conditions,omitempty"` + // The number of nodes that are running at least 1 + // daemon pod and are supposed to run the daemon pod. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ + CurrentNumberScheduled *int32 `json:"currentNumberScheduled,omitempty"` + // The number of nodes that are running the daemon pod, but are + // not supposed to run the daemon pod. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ + NumberMisscheduled *int32 `json:"numberMisscheduled,omitempty"` + // The total number of nodes that should be running the daemon + // pod (including nodes correctly running the daemon pod). + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ + DesiredNumberScheduled *int32 `json:"desiredNumberScheduled,omitempty"` + // Total number of nodes that should be running the daemon pod and have one + // or more of the daemon pod running with a Ready Condition by passing the readinessProbe. + NumberReady *int32 `json:"numberReady,omitempty"` + // The most recent generation observed by the daemon set controller. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // The total number of nodes that are running updated daemon pod + UpdatedNumberScheduled *int32 `json:"updatedNumberScheduled,omitempty"` + // The number of nodes that should be running the + // daemon pod and have one or more of the daemon pod running and + // available (ready for at least spec.minReadySeconds) + NumberAvailable *int32 `json:"numberAvailable,omitempty"` + // The number of nodes that should be running the + // daemon pod and have none of the daemon pod running and available + // (ready for at least spec.minReadySeconds) + NumberUnavailable *int32 `json:"numberUnavailable,omitempty"` + // Count of hash collisions for the DaemonSet. The DaemonSet controller + // uses this field as a collision avoidance mechanism when it needs to + // create the name for the newest ControllerRevision. + CollisionCount *int32 `json:"collisionCount,omitempty"` + // Represents the latest available observations of a DaemonSet's current state. + Conditions []DaemonSetConditionApplyConfiguration `json:"conditions,omitempty"` } // DaemonSetStatusApplyConfiguration constructs a declarative configuration of the DaemonSetStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetupdatestrategy.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetupdatestrategy.go index 2cee58cf3e682..2d8f2b6ecef7e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetupdatestrategy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonsetupdatestrategy.go @@ -24,8 +24,16 @@ import ( // DaemonSetUpdateStrategyApplyConfiguration represents a declarative configuration of the DaemonSetUpdateStrategy type for use // with apply. +// +// DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. type DaemonSetUpdateStrategyApplyConfiguration struct { - Type *appsv1beta2.DaemonSetUpdateStrategyType `json:"type,omitempty"` + // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. + Type *appsv1beta2.DaemonSetUpdateStrategyType `json:"type,omitempty"` + // Rolling update config params. Present only if type = "RollingUpdate". + // --- + // TODO: Update this to follow our convention for oneOf, whatever we decide it + // to be. Same as Deployment `strategy.rollingUpdate`. + // See https://github.com/kubernetes/kubernetes/issues/35345 RollingUpdate *RollingUpdateDaemonSetApplyConfiguration `json:"rollingUpdate,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deployment.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deployment.go index bb6b67914dfb1..4add5ae25710f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deployment.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deployment.go @@ -29,11 +29,18 @@ import ( // DeploymentApplyConfiguration represents a declarative configuration of the Deployment type for use // with apply. +// +// DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for +// more information. +// Deployment enables declarative updates for Pods and ReplicaSets. type DeploymentApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *DeploymentSpecApplyConfiguration `json:"spec,omitempty"` - Status *DeploymentStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of the Deployment. + Spec *DeploymentSpecApplyConfiguration `json:"spec,omitempty"` + // Most recently observed status of the Deployment. + Status *DeploymentStatusApplyConfiguration `json:"status,omitempty"` } // Deployment constructs a declarative configuration of the Deployment type for use with @@ -47,6 +54,27 @@ func Deployment(name, namespace string) *DeploymentApplyConfiguration { return b } +// ExtractDeploymentFrom extracts the applied configuration owned by fieldManager from +// deployment for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// deployment must be a unmodified Deployment API object that was retrieved from the Kubernetes API. +// ExtractDeploymentFrom 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. +func ExtractDeploymentFrom(deployment *appsv1beta2.Deployment, fieldManager string, subresource string) (*DeploymentApplyConfiguration, error) { + b := &DeploymentApplyConfiguration{} + err := managedfields.ExtractInto(deployment, internal.Parser().Type("io.k8s.api.apps.v1beta2.Deployment"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(deployment.Name) + b.WithNamespace(deployment.Namespace) + + b.WithKind("Deployment") + b.WithAPIVersion("apps/v1beta2") + return b, nil +} + // ExtractDeployment extracts the applied configuration owned by fieldManager from // deployment. If no managedFields are found in deployment for fieldManager, a // DeploymentApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +85,16 @@ func Deployment(name, namespace string) *DeploymentApplyConfiguration { // ExtractDeployment 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 ExtractDeployment(deployment *appsv1beta2.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) { - return extractDeployment(deployment, fieldManager, "") + return ExtractDeploymentFrom(deployment, fieldManager, "") } -// ExtractDeploymentStatus is the same as ExtractDeployment except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractDeploymentStatus extracts the applied configuration owned by fieldManager from +// deployment for the status subresource. func ExtractDeploymentStatus(deployment *appsv1beta2.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) { - return extractDeployment(deployment, fieldManager, "status") + return ExtractDeploymentFrom(deployment, fieldManager, "status") } -func extractDeployment(deployment *appsv1beta2.Deployment, fieldManager string, subresource string) (*DeploymentApplyConfiguration, error) { - b := &DeploymentApplyConfiguration{} - err := managedfields.ExtractInto(deployment, internal.Parser().Type("io.k8s.api.apps.v1beta2.Deployment"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(deployment.Name) - b.WithNamespace(deployment.Namespace) - - b.WithKind("Deployment") - b.WithAPIVersion("apps/v1beta2") - return b, nil -} func (b DeploymentApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentcondition.go index f404dd9df5d86..5abb05d4f2db7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentcondition.go @@ -26,13 +26,21 @@ import ( // DeploymentConditionApplyConfiguration represents a declarative configuration of the DeploymentCondition type for use // with apply. +// +// DeploymentCondition describes the state of a deployment at a certain point. type DeploymentConditionApplyConfiguration struct { - Type *appsv1beta2.DeploymentConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of deployment condition. + Type *appsv1beta2.DeploymentConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *v1.ConditionStatus `json:"status,omitempty"` + // The last time this condition was updated. + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` + // Last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // A human readable message indicating details about the transition. + Message *string `json:"message,omitempty"` } // DeploymentConditionApplyConfiguration constructs a declarative configuration of the DeploymentCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentspec.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentspec.go index 1b55130c6b662..91e37ebc9df7c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentspec.go @@ -25,15 +25,37 @@ import ( // DeploymentSpecApplyConfiguration represents a declarative configuration of the DeploymentSpec type for use // with apply. +// +// DeploymentSpec is the specification of the desired behavior of the Deployment. type DeploymentSpecApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` - Strategy *DeploymentStrategyApplyConfiguration `json:"strategy,omitempty"` - MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` - Paused *bool `json:"paused,omitempty"` - ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"` + // Number of desired pods. This is a pointer to distinguish between explicit + // zero and not specified. Defaults to 1. + Replicas *int32 `json:"replicas,omitempty"` + // Label selector for pods. Existing ReplicaSets whose pods are + // selected by this will be the ones affected by this deployment. + // It must match the pod template's labels. + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // Template describes the pods that will be created. + // The only allowed template.spec.restartPolicy value is "Always". + Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // The deployment strategy to use to replace existing pods with new ones. + Strategy *DeploymentStrategyApplyConfiguration `json:"strategy,omitempty"` + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // The number of old ReplicaSets to retain to allow rollback. + // This is a pointer to distinguish between explicit zero and not specified. + // Defaults to 10. + RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` + // Indicates that the deployment is paused. + Paused *bool `json:"paused,omitempty"` + // The maximum time in seconds for a deployment to make progress before it + // is considered to be failed. The deployment controller will continue to + // process failed deployments and a condition with a ProgressDeadlineExceeded + // reason will be surfaced in the deployment status. Note that progress will + // not be estimated during the time a deployment is paused. Defaults to 600s. + ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"` } // DeploymentSpecApplyConfiguration constructs a declarative configuration of the DeploymentSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentstatus.go index 554be024d987f..e3fd37670f1ad 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentstatus.go @@ -20,16 +20,34 @@ package v1beta2 // DeploymentStatusApplyConfiguration represents a declarative configuration of the DeploymentStatus type for use // with apply. +// +// DeploymentStatus is the most recently observed status of the Deployment. type DeploymentStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Replicas *int32 `json:"replicas,omitempty"` - UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` - ReadyReplicas *int32 `json:"readyReplicas,omitempty"` - AvailableReplicas *int32 `json:"availableReplicas,omitempty"` - UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"` - TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"` - Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"` - CollisionCount *int32 `json:"collisionCount,omitempty"` + // The generation observed by the deployment controller. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // Total number of non-terminating pods targeted by this deployment (their labels match the selector). + Replicas *int32 `json:"replicas,omitempty"` + // Total number of non-terminating pods targeted by this deployment that have the desired template spec. + UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` + // Total number of non-terminating pods targeted by this Deployment with a Ready Condition. + ReadyReplicas *int32 `json:"readyReplicas,omitempty"` + // Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment. + AvailableReplicas *int32 `json:"availableReplicas,omitempty"` + // Total number of unavailable pods targeted by this deployment. This is the total number of + // pods that are still required for the deployment to have 100% available capacity. They may + // either be pods that are running but not yet available or pods that still have not been created. + UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"` + // Total number of terminating pods targeted by this deployment. Terminating pods have a non-null + // .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. + // + // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. + TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"` + // Represents the latest available observations of a deployment's current state. + Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"` + // Count of hash collisions for the Deployment. The Deployment controller uses this + // field as a collision avoidance mechanism when it needs to create the name for the + // newest ReplicaSet. + CollisionCount *int32 `json:"collisionCount,omitempty"` } // DeploymentStatusApplyConfiguration constructs a declarative configuration of the DeploymentStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentstrategy.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentstrategy.go index 6347a3a39e759..554f3cdecd2c0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentstrategy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deploymentstrategy.go @@ -24,8 +24,16 @@ import ( // DeploymentStrategyApplyConfiguration represents a declarative configuration of the DeploymentStrategy type for use // with apply. +// +// DeploymentStrategy describes how to replace existing pods with new ones. type DeploymentStrategyApplyConfiguration struct { - Type *appsv1beta2.DeploymentStrategyType `json:"type,omitempty"` + // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. + Type *appsv1beta2.DeploymentStrategyType `json:"type,omitempty"` + // Rolling update config params. Present only if DeploymentStrategyType = + // RollingUpdate. + // --- + // TODO: Update this to follow our convention for oneOf, whatever we decide it + // to be. RollingUpdate *RollingUpdateDeploymentApplyConfiguration `json:"rollingUpdate,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicaset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicaset.go index b289fdd4fb083..ea35da04ceaac 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicaset.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicaset.go @@ -29,11 +29,25 @@ import ( // ReplicaSetApplyConfiguration represents a declarative configuration of the ReplicaSet type for use // with apply. +// +// DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for +// more information. +// ReplicaSet ensures that a specified number of pod replicas are running at any given time. type ReplicaSetApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // If the Labels of a ReplicaSet are empty, they are defaulted to + // be the same as the Pod(s) that the ReplicaSet manages. + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ReplicaSetSpecApplyConfiguration `json:"spec,omitempty"` - Status *ReplicaSetStatusApplyConfiguration `json:"status,omitempty"` + // Spec defines the specification of the desired behavior of the ReplicaSet. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *ReplicaSetSpecApplyConfiguration `json:"spec,omitempty"` + // Status is the most recently observed status of the ReplicaSet. + // This data may be out of date by some window of time. + // Populated by the system. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *ReplicaSetStatusApplyConfiguration `json:"status,omitempty"` } // ReplicaSet constructs a declarative configuration of the ReplicaSet type for use with @@ -47,6 +61,27 @@ func ReplicaSet(name, namespace string) *ReplicaSetApplyConfiguration { return b } +// ExtractReplicaSetFrom extracts the applied configuration owned by fieldManager from +// replicaSet for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// replicaSet must be a unmodified ReplicaSet API object that was retrieved from the Kubernetes API. +// ExtractReplicaSetFrom 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. +func ExtractReplicaSetFrom(replicaSet *appsv1beta2.ReplicaSet, fieldManager string, subresource string) (*ReplicaSetApplyConfiguration, error) { + b := &ReplicaSetApplyConfiguration{} + err := managedfields.ExtractInto(replicaSet, internal.Parser().Type("io.k8s.api.apps.v1beta2.ReplicaSet"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(replicaSet.Name) + b.WithNamespace(replicaSet.Namespace) + + b.WithKind("ReplicaSet") + b.WithAPIVersion("apps/v1beta2") + return b, nil +} + // ExtractReplicaSet extracts the applied configuration owned by fieldManager from // replicaSet. If no managedFields are found in replicaSet for fieldManager, a // ReplicaSetApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +92,16 @@ func ReplicaSet(name, namespace string) *ReplicaSetApplyConfiguration { // ExtractReplicaSet 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 ExtractReplicaSet(replicaSet *appsv1beta2.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) { - return extractReplicaSet(replicaSet, fieldManager, "") + return ExtractReplicaSetFrom(replicaSet, fieldManager, "") } -// ExtractReplicaSetStatus is the same as ExtractReplicaSet except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractReplicaSetStatus extracts the applied configuration owned by fieldManager from +// replicaSet for the status subresource. func ExtractReplicaSetStatus(replicaSet *appsv1beta2.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) { - return extractReplicaSet(replicaSet, fieldManager, "status") + return ExtractReplicaSetFrom(replicaSet, fieldManager, "status") } -func extractReplicaSet(replicaSet *appsv1beta2.ReplicaSet, fieldManager string, subresource string) (*ReplicaSetApplyConfiguration, error) { - b := &ReplicaSetApplyConfiguration{} - err := managedfields.ExtractInto(replicaSet, internal.Parser().Type("io.k8s.api.apps.v1beta2.ReplicaSet"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(replicaSet.Name) - b.WithNamespace(replicaSet.Namespace) - - b.WithKind("ReplicaSet") - b.WithAPIVersion("apps/v1beta2") - return b, nil -} func (b ReplicaSetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicasetcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicasetcondition.go index 3d8cd36326178..72bc1a652a44d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicasetcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicasetcondition.go @@ -26,12 +26,19 @@ import ( // ReplicaSetConditionApplyConfiguration represents a declarative configuration of the ReplicaSetCondition type for use // with apply. +// +// ReplicaSetCondition describes the state of a replica set at a certain point. type ReplicaSetConditionApplyConfiguration struct { - Type *appsv1beta2.ReplicaSetConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of replica set condition. + Type *appsv1beta2.ReplicaSetConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *v1.ConditionStatus `json:"status,omitempty"` + // The last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // A human readable message indicating details about the transition. + Message *string `json:"message,omitempty"` } // ReplicaSetConditionApplyConfiguration constructs a declarative configuration of the ReplicaSetCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicasetspec.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicasetspec.go index 1d77b9e0fd6b0..a88612636c4f9 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicasetspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicasetspec.go @@ -25,11 +25,27 @@ import ( // ReplicaSetSpecApplyConfiguration represents a declarative configuration of the ReplicaSetSpec type for use // with apply. +// +// ReplicaSetSpec is the specification of a ReplicaSet. type ReplicaSetSpecApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // Replicas is the number of desired pods. + // This is a pointer to distinguish between explicit zero and unspecified. + // Defaults to 1. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + Replicas *int32 `json:"replicas,omitempty"` + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // Selector is a label query over pods that should match the replica count. + // Label keys and values that must match in order to be controlled by this replica set. + // It must match the pod template's labels. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // Template is the object that describes the pod that will be created if + // insufficient replicas are detected. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template + Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` } // ReplicaSetSpecApplyConfiguration constructs a declarative configuration of the ReplicaSetSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicasetstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicasetstatus.go index 13004fde38927..e71a0eda70c3a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicasetstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicasetstatus.go @@ -20,14 +20,27 @@ package v1beta2 // ReplicaSetStatusApplyConfiguration represents a declarative configuration of the ReplicaSetStatus type for use // with apply. +// +// ReplicaSetStatus represents the current status of a ReplicaSet. type ReplicaSetStatusApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - FullyLabeledReplicas *int32 `json:"fullyLabeledReplicas,omitempty"` - ReadyReplicas *int32 `json:"readyReplicas,omitempty"` - AvailableReplicas *int32 `json:"availableReplicas,omitempty"` - TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Conditions []ReplicaSetConditionApplyConfiguration `json:"conditions,omitempty"` + // Replicas is the most recently observed number of non-terminating pods. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + Replicas *int32 `json:"replicas,omitempty"` + // The number of non-terminating pods that have labels matching the labels of the pod template of the replicaset. + FullyLabeledReplicas *int32 `json:"fullyLabeledReplicas,omitempty"` + // The number of non-terminating pods targeted by this ReplicaSet with a Ready Condition. + ReadyReplicas *int32 `json:"readyReplicas,omitempty"` + // The number of available non-terminating pods (ready for at least minReadySeconds) for this replica set. + AvailableReplicas *int32 `json:"availableReplicas,omitempty"` + // The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp + // and have not yet reached the Failed or Succeeded .status.phase. + // + // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. + TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"` + // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // Represents the latest available observations of a replica set's current state. + Conditions []ReplicaSetConditionApplyConfiguration `json:"conditions,omitempty"` } // ReplicaSetStatusApplyConfiguration constructs a declarative configuration of the ReplicaSetStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatedaemonset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatedaemonset.go index ad6021d37a69a..5a4d3df413982 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatedaemonset.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatedaemonset.go @@ -24,9 +24,43 @@ import ( // RollingUpdateDaemonSetApplyConfiguration represents a declarative configuration of the RollingUpdateDaemonSet type for use // with apply. +// +// Spec to control the desired behavior of daemon set rolling update. type RollingUpdateDaemonSetApplyConfiguration struct { + // The maximum number of DaemonSet pods that can be unavailable during the + // update. Value can be an absolute number (ex: 5) or a percentage of total + // number of DaemonSet pods at the start of the update (ex: 10%). Absolute + // number is calculated from percentage by rounding up. + // This cannot be 0 if MaxSurge is 0 + // Default value is 1. + // Example: when this is set to 30%, at most 30% of the total number of nodes + // that should be running the daemon pod (i.e. status.desiredNumberScheduled) + // can have their pods stopped for an update at any given time. The update + // starts by stopping at most 30% of those DaemonSet pods and then brings + // up new DaemonSet pods in their place. Once the new pods are available, + // it then proceeds onto other DaemonSet pods, thus ensuring that at least + // 70% of original number of DaemonSet pods are available at all times during + // the update. MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` - MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` + // The maximum number of nodes with an existing available DaemonSet pod that + // can have an updated DaemonSet pod during during an update. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // This can not be 0 if MaxUnavailable is 0. + // Absolute number is calculated from percentage by rounding up to a minimum of 1. + // Default value is 0. + // Example: when this is set to 30%, at most 30% of the total number of nodes + // that should be running the daemon pod (i.e. status.desiredNumberScheduled) + // can have their a new pod created before the old pod is marked as deleted. + // The update starts by launching new pods on 30% of nodes. Once an updated + // pod is available (Ready for at least minReadySeconds) the old DaemonSet pod + // on that node is marked deleted. If the old pod becomes unavailable for any + // reason (Ready transitions to false, is evicted, or is drained) an updated + // pod is immediately created on that node without considering surge limits. + // Allowing surge implies the possibility that the resources consumed by the + // daemonset on any given node can double if the readiness check fails, and + // so resource intensive daemonsets should take into account that they may + // cause evictions during disruption. + MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` } // RollingUpdateDaemonSetApplyConfiguration constructs a declarative configuration of the RollingUpdateDaemonSet type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatedeployment.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatedeployment.go index b0cc3a4ee40f1..c87938a3d6d5e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatedeployment.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatedeployment.go @@ -24,9 +24,32 @@ import ( // RollingUpdateDeploymentApplyConfiguration represents a declarative configuration of the RollingUpdateDeployment type for use // with apply. +// +// Spec to control the desired behavior of rolling update. type RollingUpdateDeploymentApplyConfiguration struct { + // The maximum number of pods that can be unavailable during the update. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // Absolute number is calculated from percentage by rounding down. + // This can not be 0 if MaxSurge is 0. + // Defaults to 25%. + // Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods + // immediately when the rolling update starts. Once new pods are ready, old ReplicaSet + // can be scaled down further, followed by scaling up the new ReplicaSet, ensuring + // that the total number of pods available at all times during the update is at + // least 70% of desired pods. MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` - MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` + // The maximum number of pods that can be scheduled above the desired number of + // pods. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // This can not be 0 if MaxUnavailable is 0. + // Absolute number is calculated from percentage by rounding up. + // Defaults to 25%. + // Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when + // the rolling update starts, such that the total number of old and new pods do not exceed + // 130% of desired pods. Once old pods have been killed, + // new ReplicaSet can be scaled up further, ensuring that total number of pods running + // at any time during the update is at most 130% of desired pods. + MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` } // RollingUpdateDeploymentApplyConfiguration constructs a declarative configuration of the RollingUpdateDeployment type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatestatefulsetstrategy.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatestatefulsetstrategy.go index 0046c264bbc58..259655a4736d5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatestatefulsetstrategy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatestatefulsetstrategy.go @@ -24,8 +24,21 @@ import ( // RollingUpdateStatefulSetStrategyApplyConfiguration represents a declarative configuration of the RollingUpdateStatefulSetStrategy type for use // with apply. +// +// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. type RollingUpdateStatefulSetStrategyApplyConfiguration struct { - Partition *int32 `json:"partition,omitempty"` + // Partition indicates the ordinal at which the StatefulSet should be partitioned + // for updates. During a rolling update, all pods from ordinal Replicas-1 to + // Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. + // This is helpful in being able to do a canary based deployment. The default value is 0. + Partition *int32 `json:"partition,omitempty"` + // The maximum number of pods that can be unavailable during the update. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // Absolute number is calculated from percentage by rounding up. This can not be 0. + // Defaults to 1. This field is alpha-level and is only honored by servers that enable the + // MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to + // Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it + // will be counted towards MaxUnavailable. MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/scale.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/scale.go index 3942ed4b956ad..ca62809fcd765 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/scale.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/scale.go @@ -27,11 +27,16 @@ import ( // ScaleApplyConfiguration represents a declarative configuration of the Scale type for use // with apply. +// +// Scale represents a scaling request for a resource. type ScaleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *appsv1beta2.ScaleSpec `json:"spec,omitempty"` - Status *appsv1beta2.ScaleStatus `json:"status,omitempty"` + // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. + Spec *appsv1beta2.ScaleSpec `json:"spec,omitempty"` + // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only. + Status *appsv1beta2.ScaleStatus `json:"status,omitempty"` } // ScaleApplyConfiguration constructs a declarative configuration of the Scale type for use with @@ -42,6 +47,7 @@ func Scale() *ScaleApplyConfiguration { b.WithAPIVersion("apps/v1beta2") return b } + func (b ScaleApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulset.go index d2d4e9cdbda1e..5649c11849ec5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulset.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulset.go @@ -29,11 +29,24 @@ import ( // StatefulSetApplyConfiguration represents a declarative configuration of the StatefulSet type for use // with apply. +// +// DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for +// more information. +// StatefulSet represents a set of pods with consistent identities. +// Identities are defined as: +// - Network: A single stable DNS and hostname. +// - Storage: As many VolumeClaims as requested. +// +// The StatefulSet guarantees that a given network identity will always +// map to the same storage identity. type StatefulSetApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *StatefulSetSpecApplyConfiguration `json:"spec,omitempty"` - Status *StatefulSetStatusApplyConfiguration `json:"status,omitempty"` + // Spec defines the desired identities of pods in this set. + Spec *StatefulSetSpecApplyConfiguration `json:"spec,omitempty"` + // Status is the current status of Pods in this StatefulSet. This data + // may be out of date by some window of time. + Status *StatefulSetStatusApplyConfiguration `json:"status,omitempty"` } // StatefulSet constructs a declarative configuration of the StatefulSet type for use with @@ -47,6 +60,27 @@ func StatefulSet(name, namespace string) *StatefulSetApplyConfiguration { return b } +// ExtractStatefulSetFrom extracts the applied configuration owned by fieldManager from +// statefulSet for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// statefulSet must be a unmodified StatefulSet API object that was retrieved from the Kubernetes API. +// ExtractStatefulSetFrom 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. +func ExtractStatefulSetFrom(statefulSet *appsv1beta2.StatefulSet, fieldManager string, subresource string) (*StatefulSetApplyConfiguration, error) { + b := &StatefulSetApplyConfiguration{} + err := managedfields.ExtractInto(statefulSet, internal.Parser().Type("io.k8s.api.apps.v1beta2.StatefulSet"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(statefulSet.Name) + b.WithNamespace(statefulSet.Namespace) + + b.WithKind("StatefulSet") + b.WithAPIVersion("apps/v1beta2") + return b, nil +} + // ExtractStatefulSet extracts the applied configuration owned by fieldManager from // statefulSet. If no managedFields are found in statefulSet for fieldManager, a // StatefulSetApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +91,22 @@ func StatefulSet(name, namespace string) *StatefulSetApplyConfiguration { // ExtractStatefulSet 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 ExtractStatefulSet(statefulSet *appsv1beta2.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) { - return extractStatefulSet(statefulSet, fieldManager, "") + return ExtractStatefulSetFrom(statefulSet, fieldManager, "") } -// ExtractStatefulSetStatus is the same as ExtractStatefulSet except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractStatefulSetStatus(statefulSet *appsv1beta2.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) { - return extractStatefulSet(statefulSet, fieldManager, "status") +// ExtractStatefulSetScale extracts the applied configuration owned by fieldManager from +// statefulSet for the scale subresource. +func ExtractStatefulSetScale(statefulSet *appsv1beta2.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) { + return ExtractStatefulSetFrom(statefulSet, fieldManager, "scale") } -func extractStatefulSet(statefulSet *appsv1beta2.StatefulSet, fieldManager string, subresource string) (*StatefulSetApplyConfiguration, error) { - b := &StatefulSetApplyConfiguration{} - err := managedfields.ExtractInto(statefulSet, internal.Parser().Type("io.k8s.api.apps.v1beta2.StatefulSet"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(statefulSet.Name) - b.WithNamespace(statefulSet.Namespace) - - b.WithKind("StatefulSet") - b.WithAPIVersion("apps/v1beta2") - return b, nil +// ExtractStatefulSetStatus extracts the applied configuration owned by fieldManager from +// statefulSet for the status subresource. +func ExtractStatefulSetStatus(statefulSet *appsv1beta2.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) { + return ExtractStatefulSetFrom(statefulSet, fieldManager, "status") } + func (b StatefulSetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetcondition.go index 50bef2003424d..50a3c63de6043 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetcondition.go @@ -26,12 +26,19 @@ import ( // StatefulSetConditionApplyConfiguration represents a declarative configuration of the StatefulSetCondition type for use // with apply. +// +// StatefulSetCondition describes the state of a statefulset at a certain point. type StatefulSetConditionApplyConfiguration struct { - Type *appsv1beta2.StatefulSetConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of statefulset condition. + Type *appsv1beta2.StatefulSetConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *v1.ConditionStatus `json:"status,omitempty"` + // Last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // A human readable message indicating details about the transition. + Message *string `json:"message,omitempty"` } // StatefulSetConditionApplyConfiguration constructs a declarative configuration of the StatefulSetCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetordinals.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetordinals.go index a899243a5a493..ce0db0f0f5284 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetordinals.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetordinals.go @@ -20,7 +20,18 @@ package v1beta2 // StatefulSetOrdinalsApplyConfiguration represents a declarative configuration of the StatefulSetOrdinals type for use // with apply. +// +// StatefulSetOrdinals describes the policy used for replica ordinal assignment +// in this StatefulSet. type StatefulSetOrdinalsApplyConfiguration struct { + // start is the number representing the first replica's index. It may be used + // to number replicas from an alternate index (eg: 1-indexed) over the default + // 0-indexed names, or to orchestrate progressive movement of replicas from + // one StatefulSet to another. + // If set, replica indices will be in the range: + // [.spec.ordinals.start, .spec.ordinals.start + .spec.replicas). + // If unset, defaults to 0. Replica indices will be in the range: + // [0, .spec.replicas). Start *int32 `json:"start,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetpersistentvolumeclaimretentionpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetpersistentvolumeclaimretentionpolicy.go index d4d139ae3d8fd..8db02c32d0a21 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetpersistentvolumeclaimretentionpolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetpersistentvolumeclaimretentionpolicy.go @@ -24,9 +24,21 @@ import ( // StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration represents a declarative configuration of the StatefulSetPersistentVolumeClaimRetentionPolicy type for use // with apply. +// +// StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs +// created from the StatefulSet VolumeClaimTemplates. type StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration struct { + // WhenDeleted specifies what happens to PVCs created from StatefulSet + // VolumeClaimTemplates when the StatefulSet is deleted. The default policy + // of `Retain` causes PVCs to not be affected by StatefulSet deletion. The + // `Delete` policy causes those PVCs to be deleted. WhenDeleted *appsv1beta2.PersistentVolumeClaimRetentionPolicyType `json:"whenDeleted,omitempty"` - WhenScaled *appsv1beta2.PersistentVolumeClaimRetentionPolicyType `json:"whenScaled,omitempty"` + // WhenScaled specifies what happens to PVCs created from StatefulSet + // VolumeClaimTemplates when the StatefulSet is scaled down. The default + // policy of `Retain` causes PVCs to not be affected by a scaledown. The + // `Delete` policy causes the associated PVCs for any excess pods above + // the replica count to be deleted. + WhenScaled *appsv1beta2.PersistentVolumeClaimRetentionPolicyType `json:"whenScaled,omitempty"` } // StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration constructs a declarative configuration of the StatefulSetPersistentVolumeClaimRetentionPolicy type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetspec.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetspec.go index 952ca0a814c81..ee24f132e4028 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetspec.go @@ -26,18 +26,74 @@ import ( // StatefulSetSpecApplyConfiguration represents a declarative configuration of the StatefulSetSpec type for use // with apply. +// +// A StatefulSetSpec is the specification of a StatefulSet. type StatefulSetSpecApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` - VolumeClaimTemplates []corev1.PersistentVolumeClaimApplyConfiguration `json:"volumeClaimTemplates,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` - PodManagementPolicy *appsv1beta2.PodManagementPolicyType `json:"podManagementPolicy,omitempty"` - UpdateStrategy *StatefulSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"` - RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` - MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // replicas is the desired number of replicas of the given Template. + // These are replicas in the sense that they are instantiations of the + // same Template, but individual replicas also have a consistent identity. + // If unspecified, defaults to 1. + // TODO: Consider a rename of this field. + Replicas *int32 `json:"replicas,omitempty"` + // selector is a label query over pods that should match the replica count. + // It must match the pod template's labels. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // template is the object that describes the pod that will be created if + // insufficient replicas are detected. Each pod stamped out by the StatefulSet + // will fulfill this Template, but have a unique identity from the rest + // of the StatefulSet. Each pod will be named with the format + // -. For example, a pod in a StatefulSet named + // "web" with index number "3" would be named "web-3". + // The only allowed template.spec.restartPolicy value is "Always". + Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // volumeClaimTemplates is a list of claims that pods are allowed to reference. + // The StatefulSet controller is responsible for mapping network identities to + // claims in a way that maintains the identity of a pod. Every claim in + // this list must have at least one matching (by name) volumeMount in one + // container in the template. A claim in this list takes precedence over + // any volumes in the template, with the same name. + // TODO: Define the behavior if a claim already exists with the same name. + VolumeClaimTemplates []corev1.PersistentVolumeClaimApplyConfiguration `json:"volumeClaimTemplates,omitempty"` + // serviceName is the name of the service that governs this StatefulSet. + // This service must exist before the StatefulSet, and is responsible for + // the network identity of the set. Pods get DNS/hostnames that follow the + // pattern: pod-specific-string.serviceName.default.svc.cluster.local + // where "pod-specific-string" is managed by the StatefulSet controller. + ServiceName *string `json:"serviceName,omitempty"` + // podManagementPolicy controls how pods are created during initial scale up, + // when replacing pods on nodes, or when scaling down. The default policy is + // `OrderedReady`, where pods are created in increasing order (pod-0, then + // pod-1, etc) and the controller will wait until each pod is ready before + // continuing. When scaling down, the pods are removed in the opposite order. + // The alternative policy is `Parallel` which will create pods in parallel + // to match the desired scale without waiting, and on scale down will delete + // all pods at once. + PodManagementPolicy *appsv1beta2.PodManagementPolicyType `json:"podManagementPolicy,omitempty"` + // updateStrategy indicates the StatefulSetUpdateStrategy that will be + // employed to update Pods in the StatefulSet when a revision is made to + // Template. + UpdateStrategy *StatefulSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"` + // revisionHistoryLimit is the maximum number of revisions that will + // be maintained in the StatefulSet's revision history. The revision history + // consists of all revisions not represented by a currently applied + // StatefulSetSpec version. The default value is 10. + RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent + // volume claims created from volumeClaimTemplates. By default, all persistent + // volume claims are created as needed and retained until manually deleted. This + // policy allows the lifecycle to be altered, for example by deleting persistent + // volume claims when their stateful set is deleted, or when their pod is scaled + // down. PersistentVolumeClaimRetentionPolicy *StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration `json:"persistentVolumeClaimRetentionPolicy,omitempty"` - Ordinals *StatefulSetOrdinalsApplyConfiguration `json:"ordinals,omitempty"` + // ordinals controls the numbering of replica indices in a StatefulSet. The + // default ordinals behavior assigns a "0" index to the first replica and + // increments the index by one for each additional replica requested. + Ordinals *StatefulSetOrdinalsApplyConfiguration `json:"ordinals,omitempty"` } // StatefulSetSpecApplyConfiguration constructs a declarative configuration of the StatefulSetSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetstatus.go index a647cd7d26591..4f40460dbaf02 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetstatus.go @@ -20,17 +20,36 @@ package v1beta2 // StatefulSetStatusApplyConfiguration represents a declarative configuration of the StatefulSetStatus type for use // with apply. +// +// StatefulSetStatus represents the current state of a StatefulSet. type StatefulSetStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Replicas *int32 `json:"replicas,omitempty"` - ReadyReplicas *int32 `json:"readyReplicas,omitempty"` - CurrentReplicas *int32 `json:"currentReplicas,omitempty"` - UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` - CurrentRevision *string `json:"currentRevision,omitempty"` - UpdateRevision *string `json:"updateRevision,omitempty"` - CollisionCount *int32 `json:"collisionCount,omitempty"` - Conditions []StatefulSetConditionApplyConfiguration `json:"conditions,omitempty"` - AvailableReplicas *int32 `json:"availableReplicas,omitempty"` + // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the + // StatefulSet's generation, which is updated on mutation by the API Server. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // replicas is the number of Pods created by the StatefulSet controller. + Replicas *int32 `json:"replicas,omitempty"` + // readyReplicas is the number of pods created by this StatefulSet controller with a Ready Condition. + ReadyReplicas *int32 `json:"readyReplicas,omitempty"` + // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version + // indicated by currentRevision. + CurrentReplicas *int32 `json:"currentReplicas,omitempty"` + // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version + // indicated by updateRevision. + UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` + // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the + // sequence [0,currentReplicas). + CurrentRevision *string `json:"currentRevision,omitempty"` + // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence + // [replicas-updatedReplicas,replicas) + UpdateRevision *string `json:"updateRevision,omitempty"` + // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller + // uses this field as a collision avoidance mechanism when it needs to create the name for the + // newest ControllerRevision. + CollisionCount *int32 `json:"collisionCount,omitempty"` + // Represents the latest available observations of a statefulset's current state. + Conditions []StatefulSetConditionApplyConfiguration `json:"conditions,omitempty"` + // Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. + AvailableReplicas *int32 `json:"availableReplicas,omitempty"` } // StatefulSetStatusApplyConfiguration constructs a declarative configuration of the StatefulSetStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetupdatestrategy.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetupdatestrategy.go index f93db4f7985da..421c9a3d2dbd0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetupdatestrategy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulsetupdatestrategy.go @@ -24,8 +24,15 @@ import ( // StatefulSetUpdateStrategyApplyConfiguration represents a declarative configuration of the StatefulSetUpdateStrategy type for use // with apply. +// +// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet +// controller will use to perform updates. It includes any additional parameters +// necessary to perform the update for the indicated strategy. type StatefulSetUpdateStrategyApplyConfiguration struct { - Type *appsv1beta2.StatefulSetUpdateStrategyType `json:"type,omitempty"` + // Type indicates the type of the StatefulSetUpdateStrategy. + // Default is RollingUpdate. + Type *appsv1beta2.StatefulSetUpdateStrategyType `json:"type,omitempty"` + // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. RollingUpdate *RollingUpdateStatefulSetStrategyApplyConfiguration `json:"rollingUpdate,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/crossversionobjectreference.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/crossversionobjectreference.go index 51ec665012660..ed688f0a02e9f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/crossversionobjectreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/crossversionobjectreference.go @@ -20,9 +20,14 @@ package v1 // CrossVersionObjectReferenceApplyConfiguration represents a declarative configuration of the CrossVersionObjectReference type for use // with apply. +// +// CrossVersionObjectReference contains enough information to let you identify the referred resource. type CrossVersionObjectReferenceApplyConfiguration struct { - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` + // kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `json:"kind,omitempty"` + // name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `json:"name,omitempty"` + // apiVersion is the API version of the referent APIVersion *string `json:"apiVersion,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go index cbcbfb5798a4b..f3bd143807262 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go @@ -29,11 +29,16 @@ import ( // HorizontalPodAutoscalerApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscaler type for use // with apply. +// +// configuration of a horizontal pod autoscaler. type HorizontalPodAutoscalerApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *HorizontalPodAutoscalerSpecApplyConfiguration `json:"spec,omitempty"` - Status *HorizontalPodAutoscalerStatusApplyConfiguration `json:"status,omitempty"` + // spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. + Spec *HorizontalPodAutoscalerSpecApplyConfiguration `json:"spec,omitempty"` + // status is the current information about the autoscaler. + Status *HorizontalPodAutoscalerStatusApplyConfiguration `json:"status,omitempty"` } // HorizontalPodAutoscaler constructs a declarative configuration of the HorizontalPodAutoscaler type for use with @@ -47,6 +52,27 @@ func HorizontalPodAutoscaler(name, namespace string) *HorizontalPodAutoscalerApp return b } +// ExtractHorizontalPodAutoscalerFrom extracts the applied configuration owned by fieldManager from +// horizontalPodAutoscaler for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// horizontalPodAutoscaler must be a unmodified HorizontalPodAutoscaler API object that was retrieved from the Kubernetes API. +// ExtractHorizontalPodAutoscalerFrom 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. +func ExtractHorizontalPodAutoscalerFrom(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler, fieldManager string, subresource string) (*HorizontalPodAutoscalerApplyConfiguration, error) { + b := &HorizontalPodAutoscalerApplyConfiguration{} + err := managedfields.ExtractInto(horizontalPodAutoscaler, internal.Parser().Type("io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(horizontalPodAutoscaler.Name) + b.WithNamespace(horizontalPodAutoscaler.Namespace) + + b.WithKind("HorizontalPodAutoscaler") + b.WithAPIVersion("autoscaling/v1") + return b, nil +} + // ExtractHorizontalPodAutoscaler extracts the applied configuration owned by fieldManager from // horizontalPodAutoscaler. If no managedFields are found in horizontalPodAutoscaler for fieldManager, a // HorizontalPodAutoscalerApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +83,16 @@ func HorizontalPodAutoscaler(name, namespace string) *HorizontalPodAutoscalerApp // ExtractHorizontalPodAutoscaler 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 ExtractHorizontalPodAutoscaler(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error) { - return extractHorizontalPodAutoscaler(horizontalPodAutoscaler, fieldManager, "") + return ExtractHorizontalPodAutoscalerFrom(horizontalPodAutoscaler, fieldManager, "") } -// ExtractHorizontalPodAutoscalerStatus is the same as ExtractHorizontalPodAutoscaler except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractHorizontalPodAutoscalerStatus extracts the applied configuration owned by fieldManager from +// horizontalPodAutoscaler for the status subresource. func ExtractHorizontalPodAutoscalerStatus(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error) { - return extractHorizontalPodAutoscaler(horizontalPodAutoscaler, fieldManager, "status") + return ExtractHorizontalPodAutoscalerFrom(horizontalPodAutoscaler, fieldManager, "status") } -func extractHorizontalPodAutoscaler(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler, fieldManager string, subresource string) (*HorizontalPodAutoscalerApplyConfiguration, error) { - b := &HorizontalPodAutoscalerApplyConfiguration{} - err := managedfields.ExtractInto(horizontalPodAutoscaler, internal.Parser().Type("io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(horizontalPodAutoscaler.Name) - b.WithNamespace(horizontalPodAutoscaler.Namespace) - - b.WithKind("HorizontalPodAutoscaler") - b.WithAPIVersion("autoscaling/v1") - return b, nil -} func (b HorizontalPodAutoscalerApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscalerspec.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscalerspec.go index 0ca2f84ea9154..bf58371a9f362 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscalerspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscalerspec.go @@ -20,11 +20,23 @@ package v1 // HorizontalPodAutoscalerSpecApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerSpec type for use // with apply. +// +// specification of a horizontal pod autoscaler. type HorizontalPodAutoscalerSpecApplyConfiguration struct { - ScaleTargetRef *CrossVersionObjectReferenceApplyConfiguration `json:"scaleTargetRef,omitempty"` - MinReplicas *int32 `json:"minReplicas,omitempty"` - MaxReplicas *int32 `json:"maxReplicas,omitempty"` - TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty"` + // reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption + // and will set the desired number of pods by using its Scale subresource. + ScaleTargetRef *CrossVersionObjectReferenceApplyConfiguration `json:"scaleTargetRef,omitempty"` + // minReplicas is the lower limit for the number of replicas to which the autoscaler + // can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the + // alpha feature gate HPAScaleToZero is enabled and at least one Object or External + // metric is configured. Scaling is active as long as at least one metric value is + // available. + MinReplicas *int32 `json:"minReplicas,omitempty"` + // maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. + MaxReplicas *int32 `json:"maxReplicas,omitempty"` + // targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods; + // if not specified the default autoscaling policy will be used. + TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty"` } // HorizontalPodAutoscalerSpecApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscalerstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscalerstatus.go index 8575214e1e9a1..0a0d8be736b47 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscalerstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscalerstatus.go @@ -24,12 +24,21 @@ import ( // HorizontalPodAutoscalerStatusApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerStatus type for use // with apply. +// +// current status of a horizontal pod autoscaler type HorizontalPodAutoscalerStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty"` - CurrentReplicas *int32 `json:"currentReplicas,omitempty"` - DesiredReplicas *int32 `json:"desiredReplicas,omitempty"` - CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty"` + // observedGeneration is the most recent generation observed by this autoscaler. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods; + // used by the autoscaler to control how often the number of pods is changed. + LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty"` + // currentReplicas is the current number of replicas of pods managed by this autoscaler. + CurrentReplicas *int32 `json:"currentReplicas,omitempty"` + // desiredReplicas is the desired number of replicas of pods managed by this autoscaler. + DesiredReplicas *int32 `json:"desiredReplicas,omitempty"` + // currentCPUUtilizationPercentage is the current average CPU utilization over all pods, represented as a percentage of requested CPU, + // e.g. 70 means that an average pod is using now 70% of its requested CPU. + CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty"` } // HorizontalPodAutoscalerStatusApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/scale.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/scale.go index d5f9d72921ea0..a491c5ac84e0d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/scale.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/scale.go @@ -26,11 +26,16 @@ import ( // ScaleApplyConfiguration represents a declarative configuration of the Scale type for use // with apply. +// +// Scale represents a scaling request for a resource. type ScaleApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ScaleSpecApplyConfiguration `json:"spec,omitempty"` - Status *ScaleStatusApplyConfiguration `json:"status,omitempty"` + // spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. + Spec *ScaleSpecApplyConfiguration `json:"spec,omitempty"` + // status is the current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only. + Status *ScaleStatusApplyConfiguration `json:"status,omitempty"` } // ScaleApplyConfiguration constructs a declarative configuration of the Scale type for use with @@ -41,6 +46,7 @@ func Scale() *ScaleApplyConfiguration { b.WithAPIVersion("autoscaling/v1") return b } + func (b ScaleApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/scalespec.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/scalespec.go index 025004ba5fed8..e21d4dbaf7a81 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/scalespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/scalespec.go @@ -20,7 +20,10 @@ package v1 // ScaleSpecApplyConfiguration represents a declarative configuration of the ScaleSpec type for use // with apply. +// +// ScaleSpec describes the attributes of a scale subresource. type ScaleSpecApplyConfiguration struct { + // replicas is the desired number of instances for the scaled object. Replicas *int32 `json:"replicas,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/scalestatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/scalestatus.go index 51f96d2357b26..fb5a5668bc87c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/scalestatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/scalestatus.go @@ -20,8 +20,15 @@ package v1 // ScaleStatusApplyConfiguration represents a declarative configuration of the ScaleStatus type for use // with apply. +// +// ScaleStatus represents the current status of a scale subresource. type ScaleStatusApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` + // replicas is the actual number of observed instances of the scaled object. + Replicas *int32 `json:"replicas,omitempty"` + // selector is the label query over pods that should match the replicas count. This is same + // as the label selector but in the string format to avoid introspection + // by clients. The string will be in the same format as the query-param syntax. + // More info about label selectors: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ Selector *string `json:"selector,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/containerresourcemetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/containerresourcemetricsource.go index b6e071e8486e9..6f3eecbed1483 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/containerresourcemetricsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/containerresourcemetricsource.go @@ -24,10 +24,21 @@ import ( // ContainerResourceMetricSourceApplyConfiguration represents a declarative configuration of the ContainerResourceMetricSource type for use // with apply. +// +// ContainerResourceMetricSource indicates how to scale on a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). The values will be averaged +// together before being compared to the target. Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. Only one "target" type +// should be set. type ContainerResourceMetricSourceApplyConfiguration struct { - Name *v1.ResourceName `json:"name,omitempty"` - Target *MetricTargetApplyConfiguration `json:"target,omitempty"` - Container *string `json:"container,omitempty"` + // name is the name of the resource in question. + Name *v1.ResourceName `json:"name,omitempty"` + // target specifies the target value for the given metric + Target *MetricTargetApplyConfiguration `json:"target,omitempty"` + // container is the name of the container in the pods of the scaling target + Container *string `json:"container,omitempty"` } // ContainerResourceMetricSourceApplyConfiguration constructs a declarative configuration of the ContainerResourceMetricSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/containerresourcemetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/containerresourcemetricstatus.go index 46bd2bac20020..1c9648515306f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/containerresourcemetricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/containerresourcemetricstatus.go @@ -24,10 +24,19 @@ import ( // ContainerResourceMetricStatusApplyConfiguration represents a declarative configuration of the ContainerResourceMetricStatus type for use // with apply. +// +// ContainerResourceMetricStatus indicates the current value of a resource metric known to +// Kubernetes, as specified in requests and limits, describing a single container in each pod in the +// current scale target (e.g. CPU or memory). Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. type ContainerResourceMetricStatusApplyConfiguration struct { - Name *v1.ResourceName `json:"name,omitempty"` - Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` - Container *string `json:"container,omitempty"` + // name is the name of the resource in question. + Name *v1.ResourceName `json:"name,omitempty"` + // current contains the current value for the given metric + Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` + // container is the name of the container in the pods of the scaling target + Container *string `json:"container,omitempty"` } // ContainerResourceMetricStatusApplyConfiguration constructs a declarative configuration of the ContainerResourceMetricStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/crossversionobjectreference.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/crossversionobjectreference.go index 645f098577e7f..062065b97d532 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/crossversionobjectreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/crossversionobjectreference.go @@ -20,9 +20,14 @@ package v2 // CrossVersionObjectReferenceApplyConfiguration represents a declarative configuration of the CrossVersionObjectReference type for use // with apply. +// +// CrossVersionObjectReference contains enough information to let you identify the referred resource. type CrossVersionObjectReferenceApplyConfiguration struct { - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` + // kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `json:"kind,omitempty"` + // name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `json:"name,omitempty"` + // apiVersion is the API version of the referent APIVersion *string `json:"apiVersion,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/externalmetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/externalmetricsource.go index a9c45b31a0432..be289fd280146 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/externalmetricsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/externalmetricsource.go @@ -20,9 +20,15 @@ package v2 // ExternalMetricSourceApplyConfiguration represents a declarative configuration of the ExternalMetricSource type for use // with apply. +// +// ExternalMetricSource indicates how to scale on a metric not associated with +// any Kubernetes object (for example length of queue in cloud +// messaging service, or QPS from loadbalancer running outside of cluster). type ExternalMetricSourceApplyConfiguration struct { + // metric identifies the target metric by name and selector Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` - Target *MetricTargetApplyConfiguration `json:"target,omitempty"` + // target specifies the target value for the given metric + Target *MetricTargetApplyConfiguration `json:"target,omitempty"` } // ExternalMetricSourceApplyConfiguration constructs a declarative configuration of the ExternalMetricSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/externalmetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/externalmetricstatus.go index 4280086f5e74b..000b052182786 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/externalmetricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/externalmetricstatus.go @@ -20,8 +20,13 @@ package v2 // ExternalMetricStatusApplyConfiguration represents a declarative configuration of the ExternalMetricStatus type for use // with apply. +// +// ExternalMetricStatus indicates the current value of a global metric +// not associated with any Kubernetes object. type ExternalMetricStatusApplyConfiguration struct { - Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + // metric identifies the target metric by name and selector + Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + // current contains the current value for the given metric Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go index a2a3a5a785ff5..e001653fc2316 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go @@ -29,11 +29,20 @@ import ( // HorizontalPodAutoscalerApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscaler type for use // with apply. +// +// HorizontalPodAutoscaler is the configuration for a horizontal pod +// autoscaler, which automatically manages the replica count of any resource +// implementing the scale subresource based on the metrics specified. type HorizontalPodAutoscalerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // metadata is the standard object metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *HorizontalPodAutoscalerSpecApplyConfiguration `json:"spec,omitempty"` - Status *HorizontalPodAutoscalerStatusApplyConfiguration `json:"status,omitempty"` + // spec is the specification for the behaviour of the autoscaler. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. + Spec *HorizontalPodAutoscalerSpecApplyConfiguration `json:"spec,omitempty"` + // status is the current information about the autoscaler. + Status *HorizontalPodAutoscalerStatusApplyConfiguration `json:"status,omitempty"` } // HorizontalPodAutoscaler constructs a declarative configuration of the HorizontalPodAutoscaler type for use with @@ -47,6 +56,27 @@ func HorizontalPodAutoscaler(name, namespace string) *HorizontalPodAutoscalerApp return b } +// ExtractHorizontalPodAutoscalerFrom extracts the applied configuration owned by fieldManager from +// horizontalPodAutoscaler for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// horizontalPodAutoscaler must be a unmodified HorizontalPodAutoscaler API object that was retrieved from the Kubernetes API. +// ExtractHorizontalPodAutoscalerFrom 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. +func ExtractHorizontalPodAutoscalerFrom(horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscaler, fieldManager string, subresource string) (*HorizontalPodAutoscalerApplyConfiguration, error) { + b := &HorizontalPodAutoscalerApplyConfiguration{} + err := managedfields.ExtractInto(horizontalPodAutoscaler, internal.Parser().Type("io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(horizontalPodAutoscaler.Name) + b.WithNamespace(horizontalPodAutoscaler.Namespace) + + b.WithKind("HorizontalPodAutoscaler") + b.WithAPIVersion("autoscaling/v2") + return b, nil +} + // ExtractHorizontalPodAutoscaler extracts the applied configuration owned by fieldManager from // horizontalPodAutoscaler. If no managedFields are found in horizontalPodAutoscaler for fieldManager, a // HorizontalPodAutoscalerApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +87,16 @@ func HorizontalPodAutoscaler(name, namespace string) *HorizontalPodAutoscalerApp // ExtractHorizontalPodAutoscaler 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 ExtractHorizontalPodAutoscaler(horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error) { - return extractHorizontalPodAutoscaler(horizontalPodAutoscaler, fieldManager, "") + return ExtractHorizontalPodAutoscalerFrom(horizontalPodAutoscaler, fieldManager, "") } -// ExtractHorizontalPodAutoscalerStatus is the same as ExtractHorizontalPodAutoscaler except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractHorizontalPodAutoscalerStatus extracts the applied configuration owned by fieldManager from +// horizontalPodAutoscaler for the status subresource. func ExtractHorizontalPodAutoscalerStatus(horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error) { - return extractHorizontalPodAutoscaler(horizontalPodAutoscaler, fieldManager, "status") + return ExtractHorizontalPodAutoscalerFrom(horizontalPodAutoscaler, fieldManager, "status") } -func extractHorizontalPodAutoscaler(horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscaler, fieldManager string, subresource string) (*HorizontalPodAutoscalerApplyConfiguration, error) { - b := &HorizontalPodAutoscalerApplyConfiguration{} - err := managedfields.ExtractInto(horizontalPodAutoscaler, internal.Parser().Type("io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(horizontalPodAutoscaler.Name) - b.WithNamespace(horizontalPodAutoscaler.Namespace) - - b.WithKind("HorizontalPodAutoscaler") - b.WithAPIVersion("autoscaling/v2") - return b, nil -} func (b HorizontalPodAutoscalerApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerbehavior.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerbehavior.go index 05750cc21dae6..faf700214e0b6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerbehavior.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerbehavior.go @@ -20,8 +20,20 @@ package v2 // HorizontalPodAutoscalerBehaviorApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerBehavior type for use // with apply. +// +// HorizontalPodAutoscalerBehavior configures the scaling behavior of the target +// in both Up and Down directions (scaleUp and scaleDown fields respectively). type HorizontalPodAutoscalerBehaviorApplyConfiguration struct { - ScaleUp *HPAScalingRulesApplyConfiguration `json:"scaleUp,omitempty"` + // scaleUp is scaling policy for scaling Up. + // If not set, the default value is the higher of: + // * increase no more than 4 pods per 60 seconds + // * double the number of pods per 60 seconds + // No stabilization is used. + ScaleUp *HPAScalingRulesApplyConfiguration `json:"scaleUp,omitempty"` + // scaleDown is scaling policy for scaling Down. + // If not set, the default value is to allow to scale down to minReplicas pods, with a + // 300 second stabilization window (i.e., the highest recommendation for + // the last 300sec is used). ScaleDown *HPAScalingRulesApplyConfiguration `json:"scaleDown,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalercondition.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalercondition.go index 25ea39039a1b0..75bb498524633 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalercondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalercondition.go @@ -26,12 +26,22 @@ import ( // HorizontalPodAutoscalerConditionApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerCondition type for use // with apply. +// +// HorizontalPodAutoscalerCondition describes the state of +// a HorizontalPodAutoscaler at a certain point. type HorizontalPodAutoscalerConditionApplyConfiguration struct { - Type *autoscalingv2.HorizontalPodAutoscalerConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // type describes the current condition + Type *autoscalingv2.HorizontalPodAutoscalerConditionType `json:"type,omitempty"` + // status is the status of the condition (True, False, Unknown) + Status *v1.ConditionStatus `json:"status,omitempty"` + // lastTransitionTime is the last time the condition transitioned from + // one status to another + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // reason is the reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // message is a human-readable explanation containing details about + // the transition + Message *string `json:"message,omitempty"` } // HorizontalPodAutoscalerConditionApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerspec.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerspec.go index e34ababc5835a..5b95ec54828e7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerspec.go @@ -20,12 +20,34 @@ package v2 // HorizontalPodAutoscalerSpecApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerSpec type for use // with apply. +// +// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. type HorizontalPodAutoscalerSpecApplyConfiguration struct { - ScaleTargetRef *CrossVersionObjectReferenceApplyConfiguration `json:"scaleTargetRef,omitempty"` - MinReplicas *int32 `json:"minReplicas,omitempty"` - MaxReplicas *int32 `json:"maxReplicas,omitempty"` - Metrics []MetricSpecApplyConfiguration `json:"metrics,omitempty"` - Behavior *HorizontalPodAutoscalerBehaviorApplyConfiguration `json:"behavior,omitempty"` + // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics + // should be collected, as well as to actually change the replica count. + ScaleTargetRef *CrossVersionObjectReferenceApplyConfiguration `json:"scaleTargetRef,omitempty"` + // minReplicas is the lower limit for the number of replicas to which the autoscaler + // can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the + // alpha feature gate HPAScaleToZero is enabled and at least one Object or External + // metric is configured. Scaling is active as long as at least one metric value is + // available. + MinReplicas *int32 `json:"minReplicas,omitempty"` + // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. + // It cannot be less that minReplicas. + MaxReplicas *int32 `json:"maxReplicas,omitempty"` + // metrics contains the specifications for which to use to calculate the + // desired replica count (the maximum replica count across all metrics will + // be used). The desired replica count is calculated multiplying the + // ratio between the target value and the current value by the current + // number of pods. Ergo, metrics used must decrease as the pod count is + // increased, and vice-versa. See the individual metric source types for + // more information about how each type of metric must respond. + // If not set, the default metric will be set to 80% average CPU utilization. + Metrics []MetricSpecApplyConfiguration `json:"metrics,omitempty"` + // behavior configures the scaling behavior of the target + // in both Up and Down directions (scaleUp and scaleDown fields respectively). + // If not set, the default HPAScalingRules for scale up and scale down are used. + Behavior *HorizontalPodAutoscalerBehaviorApplyConfiguration `json:"behavior,omitempty"` } // HorizontalPodAutoscalerSpecApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerstatus.go index f1a2c3f4e931c..c65115bc50be7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerstatus.go @@ -24,13 +24,25 @@ import ( // HorizontalPodAutoscalerStatusApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerStatus type for use // with apply. +// +// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. type HorizontalPodAutoscalerStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - LastScaleTime *v1.Time `json:"lastScaleTime,omitempty"` - CurrentReplicas *int32 `json:"currentReplicas,omitempty"` - DesiredReplicas *int32 `json:"desiredReplicas,omitempty"` - CurrentMetrics []MetricStatusApplyConfiguration `json:"currentMetrics,omitempty"` - Conditions []HorizontalPodAutoscalerConditionApplyConfiguration `json:"conditions,omitempty"` + // observedGeneration is the most recent generation observed by this autoscaler. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, + // used by the autoscaler to control how often the number of pods is changed. + LastScaleTime *v1.Time `json:"lastScaleTime,omitempty"` + // currentReplicas is current number of replicas of pods managed by this autoscaler, + // as last seen by the autoscaler. + CurrentReplicas *int32 `json:"currentReplicas,omitempty"` + // desiredReplicas is the desired number of replicas of pods managed by this autoscaler, + // as last calculated by the autoscaler. + DesiredReplicas *int32 `json:"desiredReplicas,omitempty"` + // currentMetrics is the last read state of the metrics used by this autoscaler. + CurrentMetrics []MetricStatusApplyConfiguration `json:"currentMetrics,omitempty"` + // conditions is the set of conditions required for this autoscaler to scale its target, + // and indicates whether or not those conditions are met. + Conditions []HorizontalPodAutoscalerConditionApplyConfiguration `json:"conditions,omitempty"` } // HorizontalPodAutoscalerStatusApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/hpascalingpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/hpascalingpolicy.go index f89185c575c6b..49a22db7f5afd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/hpascalingpolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/hpascalingpolicy.go @@ -24,10 +24,17 @@ import ( // HPAScalingPolicyApplyConfiguration represents a declarative configuration of the HPAScalingPolicy type for use // with apply. +// +// HPAScalingPolicy is a single policy which must hold true for a specified past interval. type HPAScalingPolicyApplyConfiguration struct { - Type *autoscalingv2.HPAScalingPolicyType `json:"type,omitempty"` - Value *int32 `json:"value,omitempty"` - PeriodSeconds *int32 `json:"periodSeconds,omitempty"` + // type is used to specify the scaling policy. + Type *autoscalingv2.HPAScalingPolicyType `json:"type,omitempty"` + // value contains the amount of change which is permitted by the policy. + // It must be greater than zero + Value *int32 `json:"value,omitempty"` + // periodSeconds specifies the window of time for which the policy should hold true. + // PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). + PeriodSeconds *int32 `json:"periodSeconds,omitempty"` } // HPAScalingPolicyApplyConfiguration constructs a declarative configuration of the HPAScalingPolicy type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/hpascalingrules.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/hpascalingrules.go index 6fd0f25cc1dfc..bf17c52037e6e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/hpascalingrules.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/hpascalingrules.go @@ -25,11 +25,47 @@ import ( // HPAScalingRulesApplyConfiguration represents a declarative configuration of the HPAScalingRules type for use // with apply. +// +// HPAScalingRules configures the scaling behavior for one direction via +// scaling Policy Rules and a configurable metric tolerance. +// +// Scaling Policy Rules are applied after calculating DesiredReplicas from metrics for the HPA. +// They can limit the scaling velocity by specifying scaling policies. +// They can prevent flapping by specifying the stabilization window, so that the +// number of replicas is not set instantly, instead, the safest value from the stabilization +// window is chosen. +// +// The tolerance is applied to the metric values and prevents scaling too +// eagerly for small metric variations. (Note that setting a tolerance requires +// enabling the alpha HPAConfigurableTolerance feature gate.) type HPAScalingRulesApplyConfiguration struct { - StabilizationWindowSeconds *int32 `json:"stabilizationWindowSeconds,omitempty"` - SelectPolicy *autoscalingv2.ScalingPolicySelect `json:"selectPolicy,omitempty"` - Policies []HPAScalingPolicyApplyConfiguration `json:"policies,omitempty"` - Tolerance *resource.Quantity `json:"tolerance,omitempty"` + // stabilizationWindowSeconds is the number of seconds for which past recommendations should be + // considered while scaling up or scaling down. + // StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). + // If not set, use the default values: + // - For scale up: 0 (i.e. no stabilization is done). + // - For scale down: 300 (i.e. the stabilization window is 300 seconds long). + StabilizationWindowSeconds *int32 `json:"stabilizationWindowSeconds,omitempty"` + // selectPolicy is used to specify which policy should be used. + // If not set, the default value Max is used. + SelectPolicy *autoscalingv2.ScalingPolicySelect `json:"selectPolicy,omitempty"` + // policies is a list of potential scaling polices which can be used during scaling. + // If not set, use the default values: + // - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. + // - For scale down: allow all pods to be removed in a 15s window. + Policies []HPAScalingPolicyApplyConfiguration `json:"policies,omitempty"` + // tolerance is the tolerance on the ratio between the current and desired + // metric value under which no updates are made to the desired number of + // replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not + // set, the default cluster-wide tolerance is applied (by default 10%). + // + // For example, if autoscaling is configured with a memory consumption target of 100Mi, + // and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be + // triggered when the actual consumption falls below 95Mi or exceeds 101Mi. + // + // This is an alpha field and requires enabling the HPAConfigurableTolerance + // feature gate. + Tolerance *resource.Quantity `json:"tolerance,omitempty"` } // HPAScalingRulesApplyConfiguration constructs a declarative configuration of the HPAScalingRules type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricidentifier.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricidentifier.go index 2f99f7d0b496b..caa7d594331a1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricidentifier.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricidentifier.go @@ -24,8 +24,14 @@ import ( // MetricIdentifierApplyConfiguration represents a declarative configuration of the MetricIdentifier type for use // with apply. +// +// MetricIdentifier defines the name and optionally selector for a metric type MetricIdentifierApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // name is the name of the given metric + Name *string `json:"name,omitempty"` + // selector is the string-encoded form of a standard kubernetes label selector for the given metric + // When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. + // When unset, just the metricName will be used to gather metrics. Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricspec.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricspec.go index 282b84a44f8b3..5e26d8d593b23 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricspec.go @@ -24,13 +24,38 @@ import ( // MetricSpecApplyConfiguration represents a declarative configuration of the MetricSpec type for use // with apply. +// +// MetricSpec specifies how to scale based on a single metric +// (only `type` and one other matching field should be set at once). type MetricSpecApplyConfiguration struct { - Type *autoscalingv2.MetricSourceType `json:"type,omitempty"` - Object *ObjectMetricSourceApplyConfiguration `json:"object,omitempty"` - Pods *PodsMetricSourceApplyConfiguration `json:"pods,omitempty"` - Resource *ResourceMetricSourceApplyConfiguration `json:"resource,omitempty"` + // type is the type of metric source. It should be one of "ContainerResource", "External", + // "Object", "Pods" or "Resource", each mapping to a matching field in the object. + Type *autoscalingv2.MetricSourceType `json:"type,omitempty"` + // object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + Object *ObjectMetricSourceApplyConfiguration `json:"object,omitempty"` + // pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + Pods *PodsMetricSourceApplyConfiguration `json:"pods,omitempty"` + // resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + Resource *ResourceMetricSourceApplyConfiguration `json:"resource,omitempty"` + // containerResource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing a single container in + // each pod of the current scale target (e.g. CPU or memory). Such metrics are + // built in to Kubernetes, and have special scaling options on top of those + // available to normal per-pod metrics using the "pods" source. ContainerResource *ContainerResourceMetricSourceApplyConfiguration `json:"containerResource,omitempty"` - External *ExternalMetricSourceApplyConfiguration `json:"external,omitempty"` + // external refers to a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + External *ExternalMetricSourceApplyConfiguration `json:"external,omitempty"` } // MetricSpecApplyConfiguration constructs a declarative configuration of the MetricSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricstatus.go index f1204824e55b5..7c1a2cb0d6c1e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricstatus.go @@ -24,13 +24,37 @@ import ( // MetricStatusApplyConfiguration represents a declarative configuration of the MetricStatus type for use // with apply. +// +// MetricStatus describes the last-read state of a single metric. type MetricStatusApplyConfiguration struct { - Type *autoscalingv2.MetricSourceType `json:"type,omitempty"` - Object *ObjectMetricStatusApplyConfiguration `json:"object,omitempty"` - Pods *PodsMetricStatusApplyConfiguration `json:"pods,omitempty"` - Resource *ResourceMetricStatusApplyConfiguration `json:"resource,omitempty"` + // type is the type of metric source. It will be one of "ContainerResource", "External", + // "Object", "Pods" or "Resource", each corresponds to a matching field in the object. + Type *autoscalingv2.MetricSourceType `json:"type,omitempty"` + // object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + Object *ObjectMetricStatusApplyConfiguration `json:"object,omitempty"` + // pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + Pods *PodsMetricStatusApplyConfiguration `json:"pods,omitempty"` + // resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + Resource *ResourceMetricStatusApplyConfiguration `json:"resource,omitempty"` + // container resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing a single container in each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. ContainerResource *ContainerResourceMetricStatusApplyConfiguration `json:"containerResource,omitempty"` - External *ExternalMetricStatusApplyConfiguration `json:"external,omitempty"` + // external refers to a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + External *ExternalMetricStatusApplyConfiguration `json:"external,omitempty"` } // MetricStatusApplyConfiguration constructs a declarative configuration of the MetricStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metrictarget.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metrictarget.go index 13d2e9365dd69..cf1304a55df0f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metrictarget.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metrictarget.go @@ -25,11 +25,21 @@ import ( // MetricTargetApplyConfiguration represents a declarative configuration of the MetricTarget type for use // with apply. +// +// MetricTarget defines the target value, average value, or average utilization of a specific metric type MetricTargetApplyConfiguration struct { - Type *autoscalingv2.MetricTargetType `json:"type,omitempty"` - Value *resource.Quantity `json:"value,omitempty"` - AverageValue *resource.Quantity `json:"averageValue,omitempty"` - AverageUtilization *int32 `json:"averageUtilization,omitempty"` + // type represents whether the metric type is Utilization, Value, or AverageValue + Type *autoscalingv2.MetricTargetType `json:"type,omitempty"` + // value is the target value of the metric (as a quantity). + Value *resource.Quantity `json:"value,omitempty"` + // averageValue is the target value of the average of the + // metric across all relevant pods (as a quantity) + AverageValue *resource.Quantity `json:"averageValue,omitempty"` + // averageUtilization is the target value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. + // Currently only valid for Resource metric source type + AverageUtilization *int32 `json:"averageUtilization,omitempty"` } // MetricTargetApplyConfiguration constructs a declarative configuration of the MetricTarget type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricvaluestatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricvaluestatus.go index 59732548b8f74..9cd743d3e8d6b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricvaluestatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricvaluestatus.go @@ -24,10 +24,18 @@ import ( // MetricValueStatusApplyConfiguration represents a declarative configuration of the MetricValueStatus type for use // with apply. +// +// MetricValueStatus holds the current value for a metric type MetricValueStatusApplyConfiguration struct { - Value *resource.Quantity `json:"value,omitempty"` - AverageValue *resource.Quantity `json:"averageValue,omitempty"` - AverageUtilization *int32 `json:"averageUtilization,omitempty"` + // value is the current value of the metric (as a quantity). + Value *resource.Quantity `json:"value,omitempty"` + // averageValue is the current value of the average of the + // metric across all relevant pods (as a quantity) + AverageValue *resource.Quantity `json:"averageValue,omitempty"` + // currentAverageUtilization is the current value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. + AverageUtilization *int32 `json:"averageUtilization,omitempty"` } // MetricValueStatusApplyConfiguration constructs a declarative configuration of the MetricValueStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/objectmetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/objectmetricsource.go index 2391fa5c22c33..f2004b1471516 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/objectmetricsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/objectmetricsource.go @@ -20,10 +20,16 @@ package v2 // ObjectMetricSourceApplyConfiguration represents a declarative configuration of the ObjectMetricSource type for use // with apply. +// +// ObjectMetricSource indicates how to scale on a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). type ObjectMetricSourceApplyConfiguration struct { + // describedObject specifies the descriptions of a object,such as kind,name apiVersion DescribedObject *CrossVersionObjectReferenceApplyConfiguration `json:"describedObject,omitempty"` - Target *MetricTargetApplyConfiguration `json:"target,omitempty"` - Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + // target specifies the target value for the given metric + Target *MetricTargetApplyConfiguration `json:"target,omitempty"` + // metric identifies the target metric by name and selector + Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` } // ObjectMetricSourceApplyConfiguration constructs a declarative configuration of the ObjectMetricSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/objectmetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/objectmetricstatus.go index 9ffd0c180d15c..ec5da782a422a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/objectmetricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/objectmetricstatus.go @@ -20,9 +20,15 @@ package v2 // ObjectMetricStatusApplyConfiguration represents a declarative configuration of the ObjectMetricStatus type for use // with apply. +// +// ObjectMetricStatus indicates the current value of a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). type ObjectMetricStatusApplyConfiguration struct { - Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` - Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` + // metric identifies the target metric by name and selector + Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + // current contains the current value for the given metric + Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` + // DescribedObject specifies the descriptions of a object,such as kind,name apiVersion DescribedObject *CrossVersionObjectReferenceApplyConfiguration `json:"describedObject,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podsmetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podsmetricsource.go index 28a35a2ae181c..2dd3de71c9943 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podsmetricsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podsmetricsource.go @@ -20,9 +20,16 @@ package v2 // PodsMetricSourceApplyConfiguration represents a declarative configuration of the PodsMetricSource type for use // with apply. +// +// PodsMetricSource indicates how to scale on a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). +// The values will be averaged together before being compared to the target +// value. type PodsMetricSourceApplyConfiguration struct { + // metric identifies the target metric by name and selector Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` - Target *MetricTargetApplyConfiguration `json:"target,omitempty"` + // target specifies the target value for the given metric + Target *MetricTargetApplyConfiguration `json:"target,omitempty"` } // PodsMetricSourceApplyConfiguration constructs a declarative configuration of the PodsMetricSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podsmetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podsmetricstatus.go index 4614282ce1991..fcd623b7e368b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podsmetricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podsmetricstatus.go @@ -20,8 +20,13 @@ package v2 // PodsMetricStatusApplyConfiguration represents a declarative configuration of the PodsMetricStatus type for use // with apply. +// +// PodsMetricStatus indicates the current value of a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). type PodsMetricStatusApplyConfiguration struct { - Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + // metric identifies the target metric by name and selector + Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + // current contains the current value for the given metric Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/resourcemetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/resourcemetricsource.go index ffc9042b9f7a6..cfa2ec538daf6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/resourcemetricsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/resourcemetricsource.go @@ -24,8 +24,18 @@ import ( // ResourceMetricSourceApplyConfiguration represents a declarative configuration of the ResourceMetricSource type for use // with apply. +// +// ResourceMetricSource indicates how to scale on a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). The values will be averaged +// together before being compared to the target. Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. Only one "target" type +// should be set. type ResourceMetricSourceApplyConfiguration struct { - Name *v1.ResourceName `json:"name,omitempty"` + // name is the name of the resource in question. + Name *v1.ResourceName `json:"name,omitempty"` + // target specifies the target value for the given metric Target *MetricTargetApplyConfiguration `json:"target,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/resourcemetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/resourcemetricstatus.go index 0fdbfcb5553e6..bbff32f89a140 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/resourcemetricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/resourcemetricstatus.go @@ -24,8 +24,16 @@ import ( // ResourceMetricStatusApplyConfiguration represents a declarative configuration of the ResourceMetricStatus type for use // with apply. +// +// ResourceMetricStatus indicates the current value of a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. type ResourceMetricStatusApplyConfiguration struct { - Name *v1.ResourceName `json:"name,omitempty"` + // name is the name of the resource in question. + Name *v1.ResourceName `json:"name,omitempty"` + // current contains the current value for the given metric Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/containerresourcemetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/containerresourcemetricsource.go index f41c5af10f9df..392e491cf9cba 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/containerresourcemetricsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/containerresourcemetricsource.go @@ -25,11 +25,27 @@ import ( // ContainerResourceMetricSourceApplyConfiguration represents a declarative configuration of the ContainerResourceMetricSource type for use // with apply. +// +// ContainerResourceMetricSource indicates how to scale on a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). The values will be averaged +// together before being compared to the target. Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. Only one "target" type +// should be set. type ContainerResourceMetricSourceApplyConfiguration struct { - Name *v1.ResourceName `json:"name,omitempty"` - TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty"` - TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty"` - Container *string `json:"container,omitempty"` + // name is the name of the resource in question. + Name *v1.ResourceName `json:"name,omitempty"` + // targetAverageUtilization is the target value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. + TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty"` + // targetAverageValue is the target value of the average of the + // resource metric across all relevant pods, as a raw value (instead of as + // a percentage of the request), similar to the "pods" metric source type. + TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty"` + // container is the name of the container in the pods of the scaling target + Container *string `json:"container,omitempty"` } // ContainerResourceMetricSourceApplyConfiguration constructs a declarative configuration of the ContainerResourceMetricSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/containerresourcemetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/containerresourcemetricstatus.go index 4cd56eea371cb..e69d2bad8ac47 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/containerresourcemetricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/containerresourcemetricstatus.go @@ -25,11 +25,28 @@ import ( // ContainerResourceMetricStatusApplyConfiguration represents a declarative configuration of the ContainerResourceMetricStatus type for use // with apply. +// +// ContainerResourceMetricStatus indicates the current value of a resource metric known to +// Kubernetes, as specified in requests and limits, describing a single container in each pod in the +// current scale target (e.g. CPU or memory). Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. type ContainerResourceMetricStatusApplyConfiguration struct { - Name *v1.ResourceName `json:"name,omitempty"` - CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty"` - CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty"` - Container *string `json:"container,omitempty"` + // name is the name of the resource in question. + Name *v1.ResourceName `json:"name,omitempty"` + // currentAverageUtilization is the current value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. It will only be + // present if `targetAverageValue` was set in the corresponding metric + // specification. + CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty"` + // currentAverageValue is the current value of the average of the + // resource metric across all relevant pods, as a raw value (instead of as + // a percentage of the request), similar to the "pods" metric source type. + // It will always be set, regardless of the corresponding metric specification. + CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty"` + // container is the name of the container in the pods of the scaling target + Container *string `json:"container,omitempty"` } // ContainerResourceMetricStatusApplyConfiguration constructs a declarative configuration of the ContainerResourceMetricStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/crossversionobjectreference.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/crossversionobjectreference.go index f03261612e3c0..40c8e450f58f1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/crossversionobjectreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/crossversionobjectreference.go @@ -20,9 +20,14 @@ package v2beta1 // CrossVersionObjectReferenceApplyConfiguration represents a declarative configuration of the CrossVersionObjectReference type for use // with apply. +// +// CrossVersionObjectReference contains enough information to let you identify the referred resource. type CrossVersionObjectReferenceApplyConfiguration struct { - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` + // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `json:"kind,omitempty"` + // Name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `json:"name,omitempty"` + // API version of the referent APIVersion *string `json:"apiVersion,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/externalmetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/externalmetricsource.go index 8dce4529dd2d4..3b072172574e5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/externalmetricsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/externalmetricsource.go @@ -25,11 +25,23 @@ import ( // ExternalMetricSourceApplyConfiguration represents a declarative configuration of the ExternalMetricSource type for use // with apply. +// +// ExternalMetricSource indicates how to scale on a metric not associated with +// any Kubernetes object (for example length of queue in cloud +// messaging service, or QPS from loadbalancer running outside of cluster). +// Exactly one "target" type should be set. type ExternalMetricSourceApplyConfiguration struct { - MetricName *string `json:"metricName,omitempty"` - MetricSelector *v1.LabelSelectorApplyConfiguration `json:"metricSelector,omitempty"` - TargetValue *resource.Quantity `json:"targetValue,omitempty"` - TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty"` + // metricName is the name of the metric in question. + MetricName *string `json:"metricName,omitempty"` + // metricSelector is used to identify a specific time series + // within a given metric. + MetricSelector *v1.LabelSelectorApplyConfiguration `json:"metricSelector,omitempty"` + // targetValue is the target value of the metric (as a quantity). + // Mutually exclusive with TargetAverageValue. + TargetValue *resource.Quantity `json:"targetValue,omitempty"` + // targetAverageValue is the target per-pod value of global metric (as a quantity). + // Mutually exclusive with TargetValue. + TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty"` } // ExternalMetricSourceApplyConfiguration constructs a declarative configuration of the ExternalMetricSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/externalmetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/externalmetricstatus.go index 4034d7e55c8e8..c7e3629a9addf 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/externalmetricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/externalmetricstatus.go @@ -25,11 +25,20 @@ import ( // ExternalMetricStatusApplyConfiguration represents a declarative configuration of the ExternalMetricStatus type for use // with apply. +// +// ExternalMetricStatus indicates the current value of a global metric +// not associated with any Kubernetes object. type ExternalMetricStatusApplyConfiguration struct { - MetricName *string `json:"metricName,omitempty"` - MetricSelector *v1.LabelSelectorApplyConfiguration `json:"metricSelector,omitempty"` - CurrentValue *resource.Quantity `json:"currentValue,omitempty"` - CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty"` + // metricName is the name of a metric used for autoscaling in + // metric system. + MetricName *string `json:"metricName,omitempty"` + // metricSelector is used to identify a specific time series + // within a given metric. + MetricSelector *v1.LabelSelectorApplyConfiguration `json:"metricSelector,omitempty"` + // currentValue is the current value of the metric (as a quantity) + CurrentValue *resource.Quantity `json:"currentValue,omitempty"` + // currentAverageValue is the current value of metric averaged over autoscaled pods. + CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty"` } // ExternalMetricStatusApplyConfiguration constructs a declarative configuration of the ExternalMetricStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go index e6ac8c950fb01..8a89398f9cb11 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -29,11 +29,20 @@ import ( // HorizontalPodAutoscalerApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscaler type for use // with apply. +// +// HorizontalPodAutoscaler is the configuration for a horizontal pod +// autoscaler, which automatically manages the replica count of any resource +// implementing the scale subresource based on the metrics specified. type HorizontalPodAutoscalerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // metadata is the standard object metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *HorizontalPodAutoscalerSpecApplyConfiguration `json:"spec,omitempty"` - Status *HorizontalPodAutoscalerStatusApplyConfiguration `json:"status,omitempty"` + // spec is the specification for the behaviour of the autoscaler. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. + Spec *HorizontalPodAutoscalerSpecApplyConfiguration `json:"spec,omitempty"` + // status is the current information about the autoscaler. + Status *HorizontalPodAutoscalerStatusApplyConfiguration `json:"status,omitempty"` } // HorizontalPodAutoscaler constructs a declarative configuration of the HorizontalPodAutoscaler type for use with @@ -47,6 +56,27 @@ func HorizontalPodAutoscaler(name, namespace string) *HorizontalPodAutoscalerApp return b } +// ExtractHorizontalPodAutoscalerFrom extracts the applied configuration owned by fieldManager from +// horizontalPodAutoscaler for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// horizontalPodAutoscaler must be a unmodified HorizontalPodAutoscaler API object that was retrieved from the Kubernetes API. +// ExtractHorizontalPodAutoscalerFrom 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. +func ExtractHorizontalPodAutoscalerFrom(horizontalPodAutoscaler *autoscalingv2beta1.HorizontalPodAutoscaler, fieldManager string, subresource string) (*HorizontalPodAutoscalerApplyConfiguration, error) { + b := &HorizontalPodAutoscalerApplyConfiguration{} + err := managedfields.ExtractInto(horizontalPodAutoscaler, internal.Parser().Type("io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(horizontalPodAutoscaler.Name) + b.WithNamespace(horizontalPodAutoscaler.Namespace) + + b.WithKind("HorizontalPodAutoscaler") + b.WithAPIVersion("autoscaling/v2beta1") + return b, nil +} + // ExtractHorizontalPodAutoscaler extracts the applied configuration owned by fieldManager from // horizontalPodAutoscaler. If no managedFields are found in horizontalPodAutoscaler for fieldManager, a // HorizontalPodAutoscalerApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +87,16 @@ func HorizontalPodAutoscaler(name, namespace string) *HorizontalPodAutoscalerApp // ExtractHorizontalPodAutoscaler 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 ExtractHorizontalPodAutoscaler(horizontalPodAutoscaler *autoscalingv2beta1.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error) { - return extractHorizontalPodAutoscaler(horizontalPodAutoscaler, fieldManager, "") + return ExtractHorizontalPodAutoscalerFrom(horizontalPodAutoscaler, fieldManager, "") } -// ExtractHorizontalPodAutoscalerStatus is the same as ExtractHorizontalPodAutoscaler except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractHorizontalPodAutoscalerStatus extracts the applied configuration owned by fieldManager from +// horizontalPodAutoscaler for the status subresource. func ExtractHorizontalPodAutoscalerStatus(horizontalPodAutoscaler *autoscalingv2beta1.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error) { - return extractHorizontalPodAutoscaler(horizontalPodAutoscaler, fieldManager, "status") + return ExtractHorizontalPodAutoscalerFrom(horizontalPodAutoscaler, fieldManager, "status") } -func extractHorizontalPodAutoscaler(horizontalPodAutoscaler *autoscalingv2beta1.HorizontalPodAutoscaler, fieldManager string, subresource string) (*HorizontalPodAutoscalerApplyConfiguration, error) { - b := &HorizontalPodAutoscalerApplyConfiguration{} - err := managedfields.ExtractInto(horizontalPodAutoscaler, internal.Parser().Type("io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(horizontalPodAutoscaler.Name) - b.WithNamespace(horizontalPodAutoscaler.Namespace) - - b.WithKind("HorizontalPodAutoscaler") - b.WithAPIVersion("autoscaling/v2beta1") - return b, nil -} func (b HorizontalPodAutoscalerApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscalercondition.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscalercondition.go index 445cd55ae683e..302df35a73439 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscalercondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscalercondition.go @@ -26,12 +26,22 @@ import ( // HorizontalPodAutoscalerConditionApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerCondition type for use // with apply. +// +// HorizontalPodAutoscalerCondition describes the state of +// a HorizontalPodAutoscaler at a certain point. type HorizontalPodAutoscalerConditionApplyConfiguration struct { - Type *autoscalingv2beta1.HorizontalPodAutoscalerConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // type describes the current condition + Type *autoscalingv2beta1.HorizontalPodAutoscalerConditionType `json:"type,omitempty"` + // status is the status of the condition (True, False, Unknown) + Status *v1.ConditionStatus `json:"status,omitempty"` + // lastTransitionTime is the last time the condition transitioned from + // one status to another + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // reason is the reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // message is a human-readable explanation containing details about + // the transition + Message *string `json:"message,omitempty"` } // HorizontalPodAutoscalerConditionApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscalerspec.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscalerspec.go index 6f111ceafd865..bbe6a8febff5a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscalerspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscalerspec.go @@ -20,11 +20,29 @@ package v2beta1 // HorizontalPodAutoscalerSpecApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerSpec type for use // with apply. +// +// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. type HorizontalPodAutoscalerSpecApplyConfiguration struct { + // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics + // should be collected, as well as to actually change the replica count. ScaleTargetRef *CrossVersionObjectReferenceApplyConfiguration `json:"scaleTargetRef,omitempty"` - MinReplicas *int32 `json:"minReplicas,omitempty"` - MaxReplicas *int32 `json:"maxReplicas,omitempty"` - Metrics []MetricSpecApplyConfiguration `json:"metrics,omitempty"` + // minReplicas is the lower limit for the number of replicas to which the autoscaler + // can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the + // alpha feature gate HPAScaleToZero is enabled and at least one Object or External + // metric is configured. Scaling is active as long as at least one metric value is + // available. + MinReplicas *int32 `json:"minReplicas,omitempty"` + // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. + // It cannot be less that minReplicas. + MaxReplicas *int32 `json:"maxReplicas,omitempty"` + // metrics contains the specifications for which to use to calculate the + // desired replica count (the maximum replica count across all metrics will + // be used). The desired replica count is calculated multiplying the + // ratio between the target value and the current value by the current + // number of pods. Ergo, metrics used must decrease as the pod count is + // increased, and vice-versa. See the individual metric source types for + // more information about how each type of metric must respond. + Metrics []MetricSpecApplyConfiguration `json:"metrics,omitempty"` } // HorizontalPodAutoscalerSpecApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscalerstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscalerstatus.go index 391b577258f0f..831ad5cf6f695 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscalerstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscalerstatus.go @@ -24,13 +24,25 @@ import ( // HorizontalPodAutoscalerStatusApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerStatus type for use // with apply. +// +// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. type HorizontalPodAutoscalerStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - LastScaleTime *v1.Time `json:"lastScaleTime,omitempty"` - CurrentReplicas *int32 `json:"currentReplicas,omitempty"` - DesiredReplicas *int32 `json:"desiredReplicas,omitempty"` - CurrentMetrics []MetricStatusApplyConfiguration `json:"currentMetrics,omitempty"` - Conditions []HorizontalPodAutoscalerConditionApplyConfiguration `json:"conditions,omitempty"` + // observedGeneration is the most recent generation observed by this autoscaler. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, + // used by the autoscaler to control how often the number of pods is changed. + LastScaleTime *v1.Time `json:"lastScaleTime,omitempty"` + // currentReplicas is current number of replicas of pods managed by this autoscaler, + // as last seen by the autoscaler. + CurrentReplicas *int32 `json:"currentReplicas,omitempty"` + // desiredReplicas is the desired number of replicas of pods managed by this autoscaler, + // as last calculated by the autoscaler. + DesiredReplicas *int32 `json:"desiredReplicas,omitempty"` + // currentMetrics is the last read state of the metrics used by this autoscaler. + CurrentMetrics []MetricStatusApplyConfiguration `json:"currentMetrics,omitempty"` + // conditions is the set of conditions required for this autoscaler to scale its target, + // and indicates whether or not those conditions are met. + Conditions []HorizontalPodAutoscalerConditionApplyConfiguration `json:"conditions,omitempty"` } // HorizontalPodAutoscalerStatusApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/metricspec.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/metricspec.go index 3a5faa3b2e47e..d48043c32234b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/metricspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/metricspec.go @@ -24,13 +24,38 @@ import ( // MetricSpecApplyConfiguration represents a declarative configuration of the MetricSpec type for use // with apply. +// +// MetricSpec specifies how to scale based on a single metric +// (only `type` and one other matching field should be set at once). type MetricSpecApplyConfiguration struct { - Type *autoscalingv2beta1.MetricSourceType `json:"type,omitempty"` - Object *ObjectMetricSourceApplyConfiguration `json:"object,omitempty"` - Pods *PodsMetricSourceApplyConfiguration `json:"pods,omitempty"` - Resource *ResourceMetricSourceApplyConfiguration `json:"resource,omitempty"` + // type is the type of metric source. It should be one of "ContainerResource", + // "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object. + Type *autoscalingv2beta1.MetricSourceType `json:"type,omitempty"` + // object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + Object *ObjectMetricSourceApplyConfiguration `json:"object,omitempty"` + // pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + Pods *PodsMetricSourceApplyConfiguration `json:"pods,omitempty"` + // resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + Resource *ResourceMetricSourceApplyConfiguration `json:"resource,omitempty"` + // container resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing a single container in + // each pod of the current scale target (e.g. CPU or memory). Such metrics are + // built in to Kubernetes, and have special scaling options on top of those + // available to normal per-pod metrics using the "pods" source. ContainerResource *ContainerResourceMetricSourceApplyConfiguration `json:"containerResource,omitempty"` - External *ExternalMetricSourceApplyConfiguration `json:"external,omitempty"` + // external refers to a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + External *ExternalMetricSourceApplyConfiguration `json:"external,omitempty"` } // MetricSpecApplyConfiguration constructs a declarative configuration of the MetricSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/metricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/metricstatus.go index f281e182d10b6..7ec38582de84b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/metricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/metricstatus.go @@ -24,13 +24,37 @@ import ( // MetricStatusApplyConfiguration represents a declarative configuration of the MetricStatus type for use // with apply. +// +// MetricStatus describes the last-read state of a single metric. type MetricStatusApplyConfiguration struct { - Type *autoscalingv2beta1.MetricSourceType `json:"type,omitempty"` - Object *ObjectMetricStatusApplyConfiguration `json:"object,omitempty"` - Pods *PodsMetricStatusApplyConfiguration `json:"pods,omitempty"` - Resource *ResourceMetricStatusApplyConfiguration `json:"resource,omitempty"` + // type is the type of metric source. It will be one of "ContainerResource", + // "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object. + Type *autoscalingv2beta1.MetricSourceType `json:"type,omitempty"` + // object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + Object *ObjectMetricStatusApplyConfiguration `json:"object,omitempty"` + // pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + Pods *PodsMetricStatusApplyConfiguration `json:"pods,omitempty"` + // resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + Resource *ResourceMetricStatusApplyConfiguration `json:"resource,omitempty"` + // container resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing a single container in each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. ContainerResource *ContainerResourceMetricStatusApplyConfiguration `json:"containerResource,omitempty"` - External *ExternalMetricStatusApplyConfiguration `json:"external,omitempty"` + // external refers to a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + External *ExternalMetricStatusApplyConfiguration `json:"external,omitempty"` } // MetricStatusApplyConfiguration constructs a declarative configuration of the MetricStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/objectmetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/objectmetricsource.go index a9e2eead4d3db..103280e26839c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/objectmetricsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/objectmetricsource.go @@ -25,12 +25,23 @@ import ( // ObjectMetricSourceApplyConfiguration represents a declarative configuration of the ObjectMetricSource type for use // with apply. +// +// ObjectMetricSource indicates how to scale on a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). type ObjectMetricSourceApplyConfiguration struct { - Target *CrossVersionObjectReferenceApplyConfiguration `json:"target,omitempty"` - MetricName *string `json:"metricName,omitempty"` - TargetValue *resource.Quantity `json:"targetValue,omitempty"` - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - AverageValue *resource.Quantity `json:"averageValue,omitempty"` + // target is the described Kubernetes object. + Target *CrossVersionObjectReferenceApplyConfiguration `json:"target,omitempty"` + // metricName is the name of the metric in question. + MetricName *string `json:"metricName,omitempty"` + // targetValue is the target value of the metric (as a quantity). + TargetValue *resource.Quantity `json:"targetValue,omitempty"` + // selector is the string-encoded form of a standard kubernetes label selector for the given metric + // When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping + // When unset, just the metricName will be used to gather metrics. + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // averageValue is the target value of the average of the + // metric across all relevant pods (as a quantity) + AverageValue *resource.Quantity `json:"averageValue,omitempty"` } // ObjectMetricSourceApplyConfiguration constructs a declarative configuration of the ObjectMetricSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/objectmetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/objectmetricstatus.go index 4d3be8df6cb50..b58d0e28dbc19 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/objectmetricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/objectmetricstatus.go @@ -25,12 +25,23 @@ import ( // ObjectMetricStatusApplyConfiguration represents a declarative configuration of the ObjectMetricStatus type for use // with apply. +// +// ObjectMetricStatus indicates the current value of a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). type ObjectMetricStatusApplyConfiguration struct { - Target *CrossVersionObjectReferenceApplyConfiguration `json:"target,omitempty"` - MetricName *string `json:"metricName,omitempty"` - CurrentValue *resource.Quantity `json:"currentValue,omitempty"` - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - AverageValue *resource.Quantity `json:"averageValue,omitempty"` + // target is the described Kubernetes object. + Target *CrossVersionObjectReferenceApplyConfiguration `json:"target,omitempty"` + // metricName is the name of the metric in question. + MetricName *string `json:"metricName,omitempty"` + // currentValue is the current value of the metric (as a quantity). + CurrentValue *resource.Quantity `json:"currentValue,omitempty"` + // selector is the string-encoded form of a standard kubernetes label selector for the given metric + // When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. + // When unset, just the metricName will be used to gather metrics. + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // averageValue is the current value of the average of the + // metric across all relevant pods (as a quantity) + AverageValue *resource.Quantity `json:"averageValue,omitempty"` } // ObjectMetricStatusApplyConfiguration constructs a declarative configuration of the ObjectMetricStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/podsmetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/podsmetricsource.go index cfcd752e24322..47ceaee50b6a3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/podsmetricsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/podsmetricsource.go @@ -25,10 +25,21 @@ import ( // PodsMetricSourceApplyConfiguration represents a declarative configuration of the PodsMetricSource type for use // with apply. +// +// PodsMetricSource indicates how to scale on a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). +// The values will be averaged together before being compared to the target +// value. type PodsMetricSourceApplyConfiguration struct { - MetricName *string `json:"metricName,omitempty"` - TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty"` - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // metricName is the name of the metric in question + MetricName *string `json:"metricName,omitempty"` + // targetAverageValue is the target value of the average of the + // metric across all relevant pods (as a quantity) + TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty"` + // selector is the string-encoded form of a standard kubernetes label selector for the given metric + // When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping + // When unset, just the metricName will be used to gather metrics. + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` } // PodsMetricSourceApplyConfiguration constructs a declarative configuration of the PodsMetricSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/podsmetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/podsmetricstatus.go index f7a7777fd4f10..140f0a22925bd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/podsmetricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/podsmetricstatus.go @@ -25,10 +25,19 @@ import ( // PodsMetricStatusApplyConfiguration represents a declarative configuration of the PodsMetricStatus type for use // with apply. +// +// PodsMetricStatus indicates the current value of a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). type PodsMetricStatusApplyConfiguration struct { - MetricName *string `json:"metricName,omitempty"` - CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty"` - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // metricName is the name of the metric in question + MetricName *string `json:"metricName,omitempty"` + // currentAverageValue is the current value of the average of the + // metric across all relevant pods (as a quantity) + CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty"` + // selector is the string-encoded form of a standard kubernetes label selector for the given metric + // When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. + // When unset, just the metricName will be used to gather metrics. + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` } // PodsMetricStatusApplyConfiguration constructs a declarative configuration of the PodsMetricStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/resourcemetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/resourcemetricsource.go index ad97d83c3cccc..0c3c849e3c81d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/resourcemetricsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/resourcemetricsource.go @@ -25,10 +25,25 @@ import ( // ResourceMetricSourceApplyConfiguration represents a declarative configuration of the ResourceMetricSource type for use // with apply. +// +// ResourceMetricSource indicates how to scale on a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). The values will be averaged +// together before being compared to the target. Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. Only one "target" type +// should be set. type ResourceMetricSourceApplyConfiguration struct { - Name *v1.ResourceName `json:"name,omitempty"` - TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty"` - TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty"` + // name is the name of the resource in question. + Name *v1.ResourceName `json:"name,omitempty"` + // targetAverageUtilization is the target value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. + TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty"` + // targetAverageValue is the target value of the average of the + // resource metric across all relevant pods, as a raw value (instead of as + // a percentage of the request), similar to the "pods" metric source type. + TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty"` } // ResourceMetricSourceApplyConfiguration constructs a declarative configuration of the ResourceMetricSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/resourcemetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/resourcemetricstatus.go index 78fbeaad0648b..61db2eae0dd87 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/resourcemetricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/resourcemetricstatus.go @@ -25,10 +25,26 @@ import ( // ResourceMetricStatusApplyConfiguration represents a declarative configuration of the ResourceMetricStatus type for use // with apply. +// +// ResourceMetricStatus indicates the current value of a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. type ResourceMetricStatusApplyConfiguration struct { - Name *v1.ResourceName `json:"name,omitempty"` - CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty"` - CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty"` + // name is the name of the resource in question. + Name *v1.ResourceName `json:"name,omitempty"` + // currentAverageUtilization is the current value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. It will only be + // present if `targetAverageValue` was set in the corresponding metric + // specification. + CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty"` + // currentAverageValue is the current value of the average of the + // resource metric across all relevant pods, as a raw value (instead of as + // a percentage of the request), similar to the "pods" metric source type. + // It will always be set, regardless of the corresponding metric specification. + CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty"` } // ResourceMetricStatusApplyConfiguration constructs a declarative configuration of the ResourceMetricStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/containerresourcemetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/containerresourcemetricsource.go index 1050165ea36d2..babb8e8bb0ab0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/containerresourcemetricsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/containerresourcemetricsource.go @@ -24,10 +24,21 @@ import ( // ContainerResourceMetricSourceApplyConfiguration represents a declarative configuration of the ContainerResourceMetricSource type for use // with apply. +// +// ContainerResourceMetricSource indicates how to scale on a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). The values will be averaged +// together before being compared to the target. Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. Only one "target" type +// should be set. type ContainerResourceMetricSourceApplyConfiguration struct { - Name *v1.ResourceName `json:"name,omitempty"` - Target *MetricTargetApplyConfiguration `json:"target,omitempty"` - Container *string `json:"container,omitempty"` + // name is the name of the resource in question. + Name *v1.ResourceName `json:"name,omitempty"` + // target specifies the target value for the given metric + Target *MetricTargetApplyConfiguration `json:"target,omitempty"` + // container is the name of the container in the pods of the scaling target + Container *string `json:"container,omitempty"` } // ContainerResourceMetricSourceApplyConfiguration constructs a declarative configuration of the ContainerResourceMetricSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/containerresourcemetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/containerresourcemetricstatus.go index 708f68bc6bff4..771e9fdfcf3f3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/containerresourcemetricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/containerresourcemetricstatus.go @@ -24,10 +24,19 @@ import ( // ContainerResourceMetricStatusApplyConfiguration represents a declarative configuration of the ContainerResourceMetricStatus type for use // with apply. +// +// ContainerResourceMetricStatus indicates the current value of a resource metric known to +// Kubernetes, as specified in requests and limits, describing a single container in each pod in the +// current scale target (e.g. CPU or memory). Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. type ContainerResourceMetricStatusApplyConfiguration struct { - Name *v1.ResourceName `json:"name,omitempty"` - Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` - Container *string `json:"container,omitempty"` + // name is the name of the resource in question. + Name *v1.ResourceName `json:"name,omitempty"` + // current contains the current value for the given metric + Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` + // container is the name of the container in the pods of the scaling target + Container *string `json:"container,omitempty"` } // ContainerResourceMetricStatusApplyConfiguration constructs a declarative configuration of the ContainerResourceMetricStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/crossversionobjectreference.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/crossversionobjectreference.go index c281084b16588..df6708a19d416 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/crossversionobjectreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/crossversionobjectreference.go @@ -20,9 +20,14 @@ package v2beta2 // CrossVersionObjectReferenceApplyConfiguration represents a declarative configuration of the CrossVersionObjectReference type for use // with apply. +// +// CrossVersionObjectReference contains enough information to let you identify the referred resource. type CrossVersionObjectReferenceApplyConfiguration struct { - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` + // kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `json:"kind,omitempty"` + // name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `json:"name,omitempty"` + // apiVersion is the API version of the referent APIVersion *string `json:"apiVersion,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/externalmetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/externalmetricsource.go index d34ca114940cf..6baca7f05d75b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/externalmetricsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/externalmetricsource.go @@ -20,9 +20,15 @@ package v2beta2 // ExternalMetricSourceApplyConfiguration represents a declarative configuration of the ExternalMetricSource type for use // with apply. +// +// ExternalMetricSource indicates how to scale on a metric not associated with +// any Kubernetes object (for example length of queue in cloud +// messaging service, or QPS from loadbalancer running outside of cluster). type ExternalMetricSourceApplyConfiguration struct { + // metric identifies the target metric by name and selector Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` - Target *MetricTargetApplyConfiguration `json:"target,omitempty"` + // target specifies the target value for the given metric + Target *MetricTargetApplyConfiguration `json:"target,omitempty"` } // ExternalMetricSourceApplyConfiguration constructs a declarative configuration of the ExternalMetricSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/externalmetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/externalmetricstatus.go index be29e607fa4b7..725f56354479b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/externalmetricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/externalmetricstatus.go @@ -20,8 +20,13 @@ package v2beta2 // ExternalMetricStatusApplyConfiguration represents a declarative configuration of the ExternalMetricStatus type for use // with apply. +// +// ExternalMetricStatus indicates the current value of a global metric +// not associated with any Kubernetes object. type ExternalMetricStatusApplyConfiguration struct { - Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + // metric identifies the target metric by name and selector + Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + // current contains the current value for the given metric Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go index 93cdd7897710b..9a4588bc8c8b6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go @@ -29,11 +29,20 @@ import ( // HorizontalPodAutoscalerApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscaler type for use // with apply. +// +// HorizontalPodAutoscaler is the configuration for a horizontal pod +// autoscaler, which automatically manages the replica count of any resource +// implementing the scale subresource based on the metrics specified. type HorizontalPodAutoscalerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // metadata is the standard object metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *HorizontalPodAutoscalerSpecApplyConfiguration `json:"spec,omitempty"` - Status *HorizontalPodAutoscalerStatusApplyConfiguration `json:"status,omitempty"` + // spec is the specification for the behaviour of the autoscaler. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. + Spec *HorizontalPodAutoscalerSpecApplyConfiguration `json:"spec,omitempty"` + // status is the current information about the autoscaler. + Status *HorizontalPodAutoscalerStatusApplyConfiguration `json:"status,omitempty"` } // HorizontalPodAutoscaler constructs a declarative configuration of the HorizontalPodAutoscaler type for use with @@ -47,6 +56,27 @@ func HorizontalPodAutoscaler(name, namespace string) *HorizontalPodAutoscalerApp return b } +// ExtractHorizontalPodAutoscalerFrom extracts the applied configuration owned by fieldManager from +// horizontalPodAutoscaler for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// horizontalPodAutoscaler must be a unmodified HorizontalPodAutoscaler API object that was retrieved from the Kubernetes API. +// ExtractHorizontalPodAutoscalerFrom 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. +func ExtractHorizontalPodAutoscalerFrom(horizontalPodAutoscaler *autoscalingv2beta2.HorizontalPodAutoscaler, fieldManager string, subresource string) (*HorizontalPodAutoscalerApplyConfiguration, error) { + b := &HorizontalPodAutoscalerApplyConfiguration{} + err := managedfields.ExtractInto(horizontalPodAutoscaler, internal.Parser().Type("io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(horizontalPodAutoscaler.Name) + b.WithNamespace(horizontalPodAutoscaler.Namespace) + + b.WithKind("HorizontalPodAutoscaler") + b.WithAPIVersion("autoscaling/v2beta2") + return b, nil +} + // ExtractHorizontalPodAutoscaler extracts the applied configuration owned by fieldManager from // horizontalPodAutoscaler. If no managedFields are found in horizontalPodAutoscaler for fieldManager, a // HorizontalPodAutoscalerApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +87,16 @@ func HorizontalPodAutoscaler(name, namespace string) *HorizontalPodAutoscalerApp // ExtractHorizontalPodAutoscaler 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 ExtractHorizontalPodAutoscaler(horizontalPodAutoscaler *autoscalingv2beta2.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error) { - return extractHorizontalPodAutoscaler(horizontalPodAutoscaler, fieldManager, "") + return ExtractHorizontalPodAutoscalerFrom(horizontalPodAutoscaler, fieldManager, "") } -// ExtractHorizontalPodAutoscalerStatus is the same as ExtractHorizontalPodAutoscaler except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractHorizontalPodAutoscalerStatus extracts the applied configuration owned by fieldManager from +// horizontalPodAutoscaler for the status subresource. func ExtractHorizontalPodAutoscalerStatus(horizontalPodAutoscaler *autoscalingv2beta2.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error) { - return extractHorizontalPodAutoscaler(horizontalPodAutoscaler, fieldManager, "status") + return ExtractHorizontalPodAutoscalerFrom(horizontalPodAutoscaler, fieldManager, "status") } -func extractHorizontalPodAutoscaler(horizontalPodAutoscaler *autoscalingv2beta2.HorizontalPodAutoscaler, fieldManager string, subresource string) (*HorizontalPodAutoscalerApplyConfiguration, error) { - b := &HorizontalPodAutoscalerApplyConfiguration{} - err := managedfields.ExtractInto(horizontalPodAutoscaler, internal.Parser().Type("io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(horizontalPodAutoscaler.Name) - b.WithNamespace(horizontalPodAutoscaler.Namespace) - - b.WithKind("HorizontalPodAutoscaler") - b.WithAPIVersion("autoscaling/v2beta2") - return b, nil -} func (b HorizontalPodAutoscalerApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalerbehavior.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalerbehavior.go index e9b1a9fb9e229..355e15ff52e6b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalerbehavior.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalerbehavior.go @@ -20,8 +20,20 @@ package v2beta2 // HorizontalPodAutoscalerBehaviorApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerBehavior type for use // with apply. +// +// HorizontalPodAutoscalerBehavior configures the scaling behavior of the target +// in both Up and Down directions (scaleUp and scaleDown fields respectively). type HorizontalPodAutoscalerBehaviorApplyConfiguration struct { - ScaleUp *HPAScalingRulesApplyConfiguration `json:"scaleUp,omitempty"` + // scaleUp is scaling policy for scaling Up. + // If not set, the default value is the higher of: + // * increase no more than 4 pods per 60 seconds + // * double the number of pods per 60 seconds + // No stabilization is used. + ScaleUp *HPAScalingRulesApplyConfiguration `json:"scaleUp,omitempty"` + // scaleDown is scaling policy for scaling Down. + // If not set, the default value is to allow to scale down to minReplicas pods, with a + // 300 second stabilization window (i.e., the highest recommendation for + // the last 300sec is used). ScaleDown *HPAScalingRulesApplyConfiguration `json:"scaleDown,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalercondition.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalercondition.go index f888691249f5b..a23e18b158efd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalercondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalercondition.go @@ -26,12 +26,22 @@ import ( // HorizontalPodAutoscalerConditionApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerCondition type for use // with apply. +// +// HorizontalPodAutoscalerCondition describes the state of +// a HorizontalPodAutoscaler at a certain point. type HorizontalPodAutoscalerConditionApplyConfiguration struct { - Type *autoscalingv2beta2.HorizontalPodAutoscalerConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // type describes the current condition + Type *autoscalingv2beta2.HorizontalPodAutoscalerConditionType `json:"type,omitempty"` + // status is the status of the condition (True, False, Unknown) + Status *v1.ConditionStatus `json:"status,omitempty"` + // lastTransitionTime is the last time the condition transitioned from + // one status to another + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // reason is the reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // message is a human-readable explanation containing details about + // the transition + Message *string `json:"message,omitempty"` } // HorizontalPodAutoscalerConditionApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalerspec.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalerspec.go index 9629e4bd59868..50ee3fae7b10f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalerspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalerspec.go @@ -20,12 +20,34 @@ package v2beta2 // HorizontalPodAutoscalerSpecApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerSpec type for use // with apply. +// +// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. type HorizontalPodAutoscalerSpecApplyConfiguration struct { - ScaleTargetRef *CrossVersionObjectReferenceApplyConfiguration `json:"scaleTargetRef,omitempty"` - MinReplicas *int32 `json:"minReplicas,omitempty"` - MaxReplicas *int32 `json:"maxReplicas,omitempty"` - Metrics []MetricSpecApplyConfiguration `json:"metrics,omitempty"` - Behavior *HorizontalPodAutoscalerBehaviorApplyConfiguration `json:"behavior,omitempty"` + // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics + // should be collected, as well as to actually change the replica count. + ScaleTargetRef *CrossVersionObjectReferenceApplyConfiguration `json:"scaleTargetRef,omitempty"` + // minReplicas is the lower limit for the number of replicas to which the autoscaler + // can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the + // alpha feature gate HPAScaleToZero is enabled and at least one Object or External + // metric is configured. Scaling is active as long as at least one metric value is + // available. + MinReplicas *int32 `json:"minReplicas,omitempty"` + // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. + // It cannot be less that minReplicas. + MaxReplicas *int32 `json:"maxReplicas,omitempty"` + // metrics contains the specifications for which to use to calculate the + // desired replica count (the maximum replica count across all metrics will + // be used). The desired replica count is calculated multiplying the + // ratio between the target value and the current value by the current + // number of pods. Ergo, metrics used must decrease as the pod count is + // increased, and vice-versa. See the individual metric source types for + // more information about how each type of metric must respond. + // If not set, the default metric will be set to 80% average CPU utilization. + Metrics []MetricSpecApplyConfiguration `json:"metrics,omitempty"` + // behavior configures the scaling behavior of the target + // in both Up and Down directions (scaleUp and scaleDown fields respectively). + // If not set, the default HPAScalingRules for scale up and scale down are used. + Behavior *HorizontalPodAutoscalerBehaviorApplyConfiguration `json:"behavior,omitempty"` } // HorizontalPodAutoscalerSpecApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalerstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalerstatus.go index 1eee645050d73..ffbdc1c32f34c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalerstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalerstatus.go @@ -24,13 +24,25 @@ import ( // HorizontalPodAutoscalerStatusApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerStatus type for use // with apply. +// +// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. type HorizontalPodAutoscalerStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - LastScaleTime *v1.Time `json:"lastScaleTime,omitempty"` - CurrentReplicas *int32 `json:"currentReplicas,omitempty"` - DesiredReplicas *int32 `json:"desiredReplicas,omitempty"` - CurrentMetrics []MetricStatusApplyConfiguration `json:"currentMetrics,omitempty"` - Conditions []HorizontalPodAutoscalerConditionApplyConfiguration `json:"conditions,omitempty"` + // observedGeneration is the most recent generation observed by this autoscaler. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, + // used by the autoscaler to control how often the number of pods is changed. + LastScaleTime *v1.Time `json:"lastScaleTime,omitempty"` + // currentReplicas is current number of replicas of pods managed by this autoscaler, + // as last seen by the autoscaler. + CurrentReplicas *int32 `json:"currentReplicas,omitempty"` + // desiredReplicas is the desired number of replicas of pods managed by this autoscaler, + // as last calculated by the autoscaler. + DesiredReplicas *int32 `json:"desiredReplicas,omitempty"` + // currentMetrics is the last read state of the metrics used by this autoscaler. + CurrentMetrics []MetricStatusApplyConfiguration `json:"currentMetrics,omitempty"` + // conditions is the set of conditions required for this autoscaler to scale its target, + // and indicates whether or not those conditions are met. + Conditions []HorizontalPodAutoscalerConditionApplyConfiguration `json:"conditions,omitempty"` } // HorizontalPodAutoscalerStatusApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/hpascalingpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/hpascalingpolicy.go index 2bbbbddec4bba..ca07910b907ff 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/hpascalingpolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/hpascalingpolicy.go @@ -24,10 +24,17 @@ import ( // HPAScalingPolicyApplyConfiguration represents a declarative configuration of the HPAScalingPolicy type for use // with apply. +// +// HPAScalingPolicy is a single policy which must hold true for a specified past interval. type HPAScalingPolicyApplyConfiguration struct { - Type *autoscalingv2beta2.HPAScalingPolicyType `json:"type,omitempty"` - Value *int32 `json:"value,omitempty"` - PeriodSeconds *int32 `json:"periodSeconds,omitempty"` + // type is used to specify the scaling policy. + Type *autoscalingv2beta2.HPAScalingPolicyType `json:"type,omitempty"` + // value contains the amount of change which is permitted by the policy. + // It must be greater than zero + Value *int32 `json:"value,omitempty"` + // periodSeconds specifies the window of time for which the policy should hold true. + // PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). + PeriodSeconds *int32 `json:"periodSeconds,omitempty"` } // HPAScalingPolicyApplyConfiguration constructs a declarative configuration of the HPAScalingPolicy type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/hpascalingrules.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/hpascalingrules.go index 92aa449aa47af..a87dc3d3c95e2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/hpascalingrules.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/hpascalingrules.go @@ -24,10 +24,27 @@ import ( // HPAScalingRulesApplyConfiguration represents a declarative configuration of the HPAScalingRules type for use // with apply. +// +// HPAScalingRules configures the scaling behavior for one direction. +// These Rules are applied after calculating DesiredReplicas from metrics for the HPA. +// They can limit the scaling velocity by specifying scaling policies. +// They can prevent flapping by specifying the stabilization window, so that the +// number of replicas is not set instantly, instead, the safest value from the stabilization +// window is chosen. type HPAScalingRulesApplyConfiguration struct { - StabilizationWindowSeconds *int32 `json:"stabilizationWindowSeconds,omitempty"` - SelectPolicy *autoscalingv2beta2.ScalingPolicySelect `json:"selectPolicy,omitempty"` - Policies []HPAScalingPolicyApplyConfiguration `json:"policies,omitempty"` + // stabilizationWindowSeconds is the number of seconds for which past recommendations should be + // considered while scaling up or scaling down. + // StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). + // If not set, use the default values: + // - For scale up: 0 (i.e. no stabilization is done). + // - For scale down: 300 (i.e. the stabilization window is 300 seconds long). + StabilizationWindowSeconds *int32 `json:"stabilizationWindowSeconds,omitempty"` + // selectPolicy is used to specify which policy should be used. + // If not set, the default value MaxPolicySelect is used. + SelectPolicy *autoscalingv2beta2.ScalingPolicySelect `json:"selectPolicy,omitempty"` + // policies is a list of potential scaling polices which can be used during scaling. + // At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid + Policies []HPAScalingPolicyApplyConfiguration `json:"policies,omitempty"` } // HPAScalingRulesApplyConfiguration constructs a declarative configuration of the HPAScalingRules type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricidentifier.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricidentifier.go index e8b2abb0e6182..9fd064cb9cee7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricidentifier.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricidentifier.go @@ -24,8 +24,14 @@ import ( // MetricIdentifierApplyConfiguration represents a declarative configuration of the MetricIdentifier type for use // with apply. +// +// MetricIdentifier defines the name and optionally selector for a metric type MetricIdentifierApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // name is the name of the given metric + Name *string `json:"name,omitempty"` + // selector is the string-encoded form of a standard kubernetes label selector for the given metric + // When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. + // When unset, just the metricName will be used to gather metrics. Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricspec.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricspec.go index 3da1617cfb483..92eb2fa644923 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricspec.go @@ -24,13 +24,38 @@ import ( // MetricSpecApplyConfiguration represents a declarative configuration of the MetricSpec type for use // with apply. +// +// MetricSpec specifies how to scale based on a single metric +// (only `type` and one other matching field should be set at once). type MetricSpecApplyConfiguration struct { - Type *autoscalingv2beta2.MetricSourceType `json:"type,omitempty"` - Object *ObjectMetricSourceApplyConfiguration `json:"object,omitempty"` - Pods *PodsMetricSourceApplyConfiguration `json:"pods,omitempty"` - Resource *ResourceMetricSourceApplyConfiguration `json:"resource,omitempty"` + // type is the type of metric source. It should be one of "ContainerResource", "External", + // "Object", "Pods" or "Resource", each mapping to a matching field in the object. + Type *autoscalingv2beta2.MetricSourceType `json:"type,omitempty"` + // object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + Object *ObjectMetricSourceApplyConfiguration `json:"object,omitempty"` + // pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + Pods *PodsMetricSourceApplyConfiguration `json:"pods,omitempty"` + // resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + Resource *ResourceMetricSourceApplyConfiguration `json:"resource,omitempty"` + // container resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing a single container in + // each pod of the current scale target (e.g. CPU or memory). Such metrics are + // built in to Kubernetes, and have special scaling options on top of those + // available to normal per-pod metrics using the "pods" source. ContainerResource *ContainerResourceMetricSourceApplyConfiguration `json:"containerResource,omitempty"` - External *ExternalMetricSourceApplyConfiguration `json:"external,omitempty"` + // external refers to a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + External *ExternalMetricSourceApplyConfiguration `json:"external,omitempty"` } // MetricSpecApplyConfiguration constructs a declarative configuration of the MetricSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricstatus.go index b528bd76059f4..16dc67814f787 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricstatus.go @@ -24,13 +24,37 @@ import ( // MetricStatusApplyConfiguration represents a declarative configuration of the MetricStatus type for use // with apply. +// +// MetricStatus describes the last-read state of a single metric. type MetricStatusApplyConfiguration struct { - Type *autoscalingv2beta2.MetricSourceType `json:"type,omitempty"` - Object *ObjectMetricStatusApplyConfiguration `json:"object,omitempty"` - Pods *PodsMetricStatusApplyConfiguration `json:"pods,omitempty"` - Resource *ResourceMetricStatusApplyConfiguration `json:"resource,omitempty"` + // type is the type of metric source. It will be one of "ContainerResource", "External", + // "Object", "Pods" or "Resource", each corresponds to a matching field in the object. + Type *autoscalingv2beta2.MetricSourceType `json:"type,omitempty"` + // object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + Object *ObjectMetricStatusApplyConfiguration `json:"object,omitempty"` + // pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + Pods *PodsMetricStatusApplyConfiguration `json:"pods,omitempty"` + // resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + Resource *ResourceMetricStatusApplyConfiguration `json:"resource,omitempty"` + // containerResource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing a single container in each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. ContainerResource *ContainerResourceMetricStatusApplyConfiguration `json:"containerResource,omitempty"` - External *ExternalMetricStatusApplyConfiguration `json:"external,omitempty"` + // external refers to a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + External *ExternalMetricStatusApplyConfiguration `json:"external,omitempty"` } // MetricStatusApplyConfiguration constructs a declarative configuration of the MetricStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metrictarget.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metrictarget.go index 286856d823389..eedcd59d105fd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metrictarget.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metrictarget.go @@ -25,11 +25,21 @@ import ( // MetricTargetApplyConfiguration represents a declarative configuration of the MetricTarget type for use // with apply. +// +// MetricTarget defines the target value, average value, or average utilization of a specific metric type MetricTargetApplyConfiguration struct { - Type *autoscalingv2beta2.MetricTargetType `json:"type,omitempty"` - Value *resource.Quantity `json:"value,omitempty"` - AverageValue *resource.Quantity `json:"averageValue,omitempty"` - AverageUtilization *int32 `json:"averageUtilization,omitempty"` + // type represents whether the metric type is Utilization, Value, or AverageValue + Type *autoscalingv2beta2.MetricTargetType `json:"type,omitempty"` + // value is the target value of the metric (as a quantity). + Value *resource.Quantity `json:"value,omitempty"` + // averageValue is the target value of the average of the + // metric across all relevant pods (as a quantity) + AverageValue *resource.Quantity `json:"averageValue,omitempty"` + // averageUtilization is the target value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. + // Currently only valid for Resource metric source type + AverageUtilization *int32 `json:"averageUtilization,omitempty"` } // MetricTargetApplyConfiguration constructs a declarative configuration of the MetricTarget type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricvaluestatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricvaluestatus.go index cc409fc283b95..49141abcc63d7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricvaluestatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricvaluestatus.go @@ -24,10 +24,18 @@ import ( // MetricValueStatusApplyConfiguration represents a declarative configuration of the MetricValueStatus type for use // with apply. +// +// MetricValueStatus holds the current value for a metric type MetricValueStatusApplyConfiguration struct { - Value *resource.Quantity `json:"value,omitempty"` - AverageValue *resource.Quantity `json:"averageValue,omitempty"` - AverageUtilization *int32 `json:"averageUtilization,omitempty"` + // value is the current value of the metric (as a quantity). + Value *resource.Quantity `json:"value,omitempty"` + // averageValue is the current value of the average of the + // metric across all relevant pods (as a quantity) + AverageValue *resource.Quantity `json:"averageValue,omitempty"` + // averageUtilization is the current value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. + AverageUtilization *int32 `json:"averageUtilization,omitempty"` } // MetricValueStatusApplyConfiguration constructs a declarative configuration of the MetricValueStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/objectmetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/objectmetricsource.go index 17b492fa06acf..e99e081cea42f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/objectmetricsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/objectmetricsource.go @@ -20,10 +20,15 @@ package v2beta2 // ObjectMetricSourceApplyConfiguration represents a declarative configuration of the ObjectMetricSource type for use // with apply. +// +// ObjectMetricSource indicates how to scale on a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). type ObjectMetricSourceApplyConfiguration struct { DescribedObject *CrossVersionObjectReferenceApplyConfiguration `json:"describedObject,omitempty"` - Target *MetricTargetApplyConfiguration `json:"target,omitempty"` - Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + // target specifies the target value for the given metric + Target *MetricTargetApplyConfiguration `json:"target,omitempty"` + // metric identifies the target metric by name and selector + Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` } // ObjectMetricSourceApplyConfiguration constructs a declarative configuration of the ObjectMetricSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/objectmetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/objectmetricstatus.go index e87417f2e7e45..4d5d016791d7a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/objectmetricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/objectmetricstatus.go @@ -20,8 +20,13 @@ package v2beta2 // ObjectMetricStatusApplyConfiguration represents a declarative configuration of the ObjectMetricStatus type for use // with apply. +// +// ObjectMetricStatus indicates the current value of a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). type ObjectMetricStatusApplyConfiguration struct { - Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + // metric identifies the target metric by name and selector + Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + // current contains the current value for the given metric Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` DescribedObject *CrossVersionObjectReferenceApplyConfiguration `json:"describedObject,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/podsmetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/podsmetricsource.go index 6ecbb1807198e..11dd2f6e9b736 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/podsmetricsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/podsmetricsource.go @@ -20,9 +20,16 @@ package v2beta2 // PodsMetricSourceApplyConfiguration represents a declarative configuration of the PodsMetricSource type for use // with apply. +// +// PodsMetricSource indicates how to scale on a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). +// The values will be averaged together before being compared to the target +// value. type PodsMetricSourceApplyConfiguration struct { + // metric identifies the target metric by name and selector Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` - Target *MetricTargetApplyConfiguration `json:"target,omitempty"` + // target specifies the target value for the given metric + Target *MetricTargetApplyConfiguration `json:"target,omitempty"` } // PodsMetricSourceApplyConfiguration constructs a declarative configuration of the PodsMetricSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/podsmetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/podsmetricstatus.go index cd1029726118b..929c02d4a41d1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/podsmetricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/podsmetricstatus.go @@ -20,8 +20,13 @@ package v2beta2 // PodsMetricStatusApplyConfiguration represents a declarative configuration of the PodsMetricStatus type for use // with apply. +// +// PodsMetricStatus indicates the current value of a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). type PodsMetricStatusApplyConfiguration struct { - Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + // metric identifies the target metric by name and selector + Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + // current contains the current value for the given metric Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/resourcemetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/resourcemetricsource.go index c482d75f4b829..ce7e7e5fe27d3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/resourcemetricsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/resourcemetricsource.go @@ -24,8 +24,18 @@ import ( // ResourceMetricSourceApplyConfiguration represents a declarative configuration of the ResourceMetricSource type for use // with apply. +// +// ResourceMetricSource indicates how to scale on a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). The values will be averaged +// together before being compared to the target. Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. Only one "target" type +// should be set. type ResourceMetricSourceApplyConfiguration struct { - Name *v1.ResourceName `json:"name,omitempty"` + // name is the name of the resource in question. + Name *v1.ResourceName `json:"name,omitempty"` + // target specifies the target value for the given metric Target *MetricTargetApplyConfiguration `json:"target,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/resourcemetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/resourcemetricstatus.go index eb13e90b7d3f2..9a6f3919001db 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/resourcemetricstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/resourcemetricstatus.go @@ -24,8 +24,16 @@ import ( // ResourceMetricStatusApplyConfiguration represents a declarative configuration of the ResourceMetricStatus type for use // with apply. +// +// ResourceMetricStatus indicates the current value of a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. type ResourceMetricStatusApplyConfiguration struct { - Name *v1.ResourceName `json:"name,omitempty"` + // name is the name of the resource in question. + Name *v1.ResourceName `json:"name,omitempty"` + // current contains the current value for the given metric Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/cronjob.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/cronjob.go index 623b183cf76e4..2fbd4896330cb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/cronjob.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/cronjob.go @@ -29,11 +29,19 @@ import ( // CronJobApplyConfiguration represents a declarative configuration of the CronJob type for use // with apply. +// +// CronJob represents the configuration of a single cron job. type CronJobApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *CronJobSpecApplyConfiguration `json:"spec,omitempty"` - Status *CronJobStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of a cron job, including the schedule. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *CronJobSpecApplyConfiguration `json:"spec,omitempty"` + // Current status of a cron job. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *CronJobStatusApplyConfiguration `json:"status,omitempty"` } // CronJob constructs a declarative configuration of the CronJob type for use with @@ -47,6 +55,27 @@ func CronJob(name, namespace string) *CronJobApplyConfiguration { return b } +// ExtractCronJobFrom extracts the applied configuration owned by fieldManager from +// cronJob for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// cronJob must be a unmodified CronJob API object that was retrieved from the Kubernetes API. +// ExtractCronJobFrom 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. +func ExtractCronJobFrom(cronJob *batchv1.CronJob, fieldManager string, subresource string) (*CronJobApplyConfiguration, error) { + b := &CronJobApplyConfiguration{} + err := managedfields.ExtractInto(cronJob, internal.Parser().Type("io.k8s.api.batch.v1.CronJob"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(cronJob.Name) + b.WithNamespace(cronJob.Namespace) + + b.WithKind("CronJob") + b.WithAPIVersion("batch/v1") + return b, nil +} + // ExtractCronJob extracts the applied configuration owned by fieldManager from // cronJob. If no managedFields are found in cronJob for fieldManager, a // CronJobApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +86,16 @@ func CronJob(name, namespace string) *CronJobApplyConfiguration { // ExtractCronJob 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 ExtractCronJob(cronJob *batchv1.CronJob, fieldManager string) (*CronJobApplyConfiguration, error) { - return extractCronJob(cronJob, fieldManager, "") + return ExtractCronJobFrom(cronJob, fieldManager, "") } -// ExtractCronJobStatus is the same as ExtractCronJob except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractCronJobStatus extracts the applied configuration owned by fieldManager from +// cronJob for the status subresource. func ExtractCronJobStatus(cronJob *batchv1.CronJob, fieldManager string) (*CronJobApplyConfiguration, error) { - return extractCronJob(cronJob, fieldManager, "status") + return ExtractCronJobFrom(cronJob, fieldManager, "status") } -func extractCronJob(cronJob *batchv1.CronJob, fieldManager string, subresource string) (*CronJobApplyConfiguration, error) { - b := &CronJobApplyConfiguration{} - err := managedfields.ExtractInto(cronJob, internal.Parser().Type("io.k8s.api.batch.v1.CronJob"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(cronJob.Name) - b.WithNamespace(cronJob.Namespace) - - b.WithKind("CronJob") - b.WithAPIVersion("batch/v1") - return b, nil -} func (b CronJobApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/cronjobspec.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/cronjobspec.go index f53d140d3bdb8..f76d58ba72ab7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/cronjobspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/cronjobspec.go @@ -24,15 +24,42 @@ import ( // CronJobSpecApplyConfiguration represents a declarative configuration of the CronJobSpec type for use // with apply. +// +// CronJobSpec describes how the job execution will look like and when it will actually run. type CronJobSpecApplyConfiguration struct { - Schedule *string `json:"schedule,omitempty"` - TimeZone *string `json:"timeZone,omitempty"` - StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` - ConcurrencyPolicy *batchv1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` - Suspend *bool `json:"suspend,omitempty"` - JobTemplate *JobTemplateSpecApplyConfiguration `json:"jobTemplate,omitempty"` - SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"` - FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"` + // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + Schedule *string `json:"schedule,omitempty"` + // The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. + // If not specified, this will default to the time zone of the kube-controller-manager process. + // The set of valid time zone names and the time zone offset is loaded from the system-wide time zone + // database by the API server during CronJob validation and the controller manager during execution. + // If no system-wide time zone database can be found a bundled version of the database is used instead. + // If the time zone name becomes invalid during the lifetime of a CronJob or due to a change in host + // configuration, the controller will stop creating new new Jobs and will create a system event with the + // reason UnknownTimeZone. + // More information can be found in https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones + TimeZone *string `json:"timeZone,omitempty"` + // Optional deadline in seconds for starting the job if it misses scheduled + // time for any reason. Missed jobs executions will be counted as failed ones. + StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` + // Specifies how to treat concurrent executions of a Job. + // Valid values are: + // + // - "Allow" (default): allows CronJobs to run concurrently; + // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; + // - "Replace": cancels currently running job and replaces it with a new one + ConcurrencyPolicy *batchv1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` + // This flag tells the controller to suspend subsequent executions, it does + // not apply to already started executions. Defaults to false. + Suspend *bool `json:"suspend,omitempty"` + // Specifies the job that will be created when executing a CronJob. + JobTemplate *JobTemplateSpecApplyConfiguration `json:"jobTemplate,omitempty"` + // The number of successful finished jobs to retain. Value must be non-negative integer. + // Defaults to 3. + SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"` + // The number of failed finished jobs to retain. Value must be non-negative integer. + // Defaults to 1. + FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"` } // CronJobSpecApplyConfiguration constructs a declarative configuration of the CronJobSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/cronjobstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/cronjobstatus.go index d29d9e8922fa3..664b104a9423c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/cronjobstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/cronjobstatus.go @@ -25,10 +25,15 @@ import ( // CronJobStatusApplyConfiguration represents a declarative configuration of the CronJobStatus type for use // with apply. +// +// CronJobStatus represents the current state of a cron job. type CronJobStatusApplyConfiguration struct { - Active []corev1.ObjectReferenceApplyConfiguration `json:"active,omitempty"` - LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"` - LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty"` + // A list of pointers to currently running jobs. + Active []corev1.ObjectReferenceApplyConfiguration `json:"active,omitempty"` + // Information when was the last time the job was successfully scheduled. + LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"` + // Information when was the last time the job successfully completed. + LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty"` } // CronJobStatusApplyConfiguration constructs a declarative configuration of the CronJobStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/job.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/job.go index 8aeec8f3d85e9..02d59f0ec4e71 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/job.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/job.go @@ -29,11 +29,19 @@ import ( // JobApplyConfiguration represents a declarative configuration of the Job type for use // with apply. +// +// Job represents the configuration of a single job. type JobApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *JobSpecApplyConfiguration `json:"spec,omitempty"` - Status *JobStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of a job. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *JobSpecApplyConfiguration `json:"spec,omitempty"` + // Current status of a job. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *JobStatusApplyConfiguration `json:"status,omitempty"` } // Job constructs a declarative configuration of the Job type for use with @@ -47,6 +55,27 @@ func Job(name, namespace string) *JobApplyConfiguration { return b } +// ExtractJobFrom extracts the applied configuration owned by fieldManager from +// job for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// job must be a unmodified Job API object that was retrieved from the Kubernetes API. +// ExtractJobFrom 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. +func ExtractJobFrom(job *batchv1.Job, fieldManager string, subresource string) (*JobApplyConfiguration, error) { + b := &JobApplyConfiguration{} + err := managedfields.ExtractInto(job, internal.Parser().Type("io.k8s.api.batch.v1.Job"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(job.Name) + b.WithNamespace(job.Namespace) + + b.WithKind("Job") + b.WithAPIVersion("batch/v1") + return b, nil +} + // ExtractJob extracts the applied configuration owned by fieldManager from // job. If no managedFields are found in job for fieldManager, a // JobApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +86,16 @@ func Job(name, namespace string) *JobApplyConfiguration { // ExtractJob 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 ExtractJob(job *batchv1.Job, fieldManager string) (*JobApplyConfiguration, error) { - return extractJob(job, fieldManager, "") + return ExtractJobFrom(job, fieldManager, "") } -// ExtractJobStatus is the same as ExtractJob except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractJobStatus extracts the applied configuration owned by fieldManager from +// job for the status subresource. func ExtractJobStatus(job *batchv1.Job, fieldManager string) (*JobApplyConfiguration, error) { - return extractJob(job, fieldManager, "status") + return ExtractJobFrom(job, fieldManager, "status") } -func extractJob(job *batchv1.Job, fieldManager string, subresource string) (*JobApplyConfiguration, error) { - b := &JobApplyConfiguration{} - err := managedfields.ExtractInto(job, internal.Parser().Type("io.k8s.api.batch.v1.Job"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(job.Name) - b.WithNamespace(job.Namespace) - - b.WithKind("Job") - b.WithAPIVersion("batch/v1") - return b, nil -} func (b JobApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobcondition.go index fb3c65aba611a..66487972125f0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobcondition.go @@ -26,13 +26,21 @@ import ( // JobConditionApplyConfiguration represents a declarative configuration of the JobCondition type for use // with apply. +// +// JobCondition describes current state of a job. type JobConditionApplyConfiguration struct { - Type *batchv1.JobConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of job condition, Complete or Failed. + Type *batchv1.JobConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *corev1.ConditionStatus `json:"status,omitempty"` + // Last time the condition was checked. + LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"` + // Last time the condition transit from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // (brief) reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // Human readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // JobConditionApplyConfiguration constructs a declarative configuration of the JobCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobspec.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobspec.go index 2104fe113d345..6018a903b71ac 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobspec.go @@ -26,23 +26,143 @@ import ( // JobSpecApplyConfiguration represents a declarative configuration of the JobSpec type for use // with apply. +// +// JobSpec describes how the job execution will look like. type JobSpecApplyConfiguration struct { - Parallelism *int32 `json:"parallelism,omitempty"` - Completions *int32 `json:"completions,omitempty"` - ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` - PodFailurePolicy *PodFailurePolicyApplyConfiguration `json:"podFailurePolicy,omitempty"` - SuccessPolicy *SuccessPolicyApplyConfiguration `json:"successPolicy,omitempty"` - BackoffLimit *int32 `json:"backoffLimit,omitempty"` - BackoffLimitPerIndex *int32 `json:"backoffLimitPerIndex,omitempty"` - MaxFailedIndexes *int32 `json:"maxFailedIndexes,omitempty"` - Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - ManualSelector *bool `json:"manualSelector,omitempty"` - Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` - TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"` - CompletionMode *batchv1.CompletionMode `json:"completionMode,omitempty"` - Suspend *bool `json:"suspend,omitempty"` - PodReplacementPolicy *batchv1.PodReplacementPolicy `json:"podReplacementPolicy,omitempty"` - ManagedBy *string `json:"managedBy,omitempty"` + // Specifies the maximum desired number of pods the job should + // run at any given time. The actual number of pods running in steady state will + // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), + // i.e. when the work left to do is less than max parallelism. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + Parallelism *int32 `json:"parallelism,omitempty"` + // Specifies the desired number of successfully finished pods the + // job should be run with. Setting to null means that the success of any + // pod signals the success of all pods, and allows parallelism to have any positive + // value. Setting to 1 means that parallelism is limited to 1 and the success of that + // pod signals the success of the job. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + Completions *int32 `json:"completions,omitempty"` + // Specifies the duration in seconds relative to the startTime that the job + // may be continuously active before the system tries to terminate it; value + // must be positive integer. If a Job is suspended (at creation or through an + // update), this timer will effectively be stopped and reset when the Job is + // resumed again. + ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` + // Specifies the policy of handling failed pods. In particular, it allows to + // specify the set of actions and conditions which need to be + // satisfied to take the associated action. + // If empty, the default behaviour applies - the counter of failed pods, + // represented by the jobs's .status.failed field, is incremented and it is + // checked against the backoffLimit. This field cannot be used in combination + // with restartPolicy=OnFailure. + PodFailurePolicy *PodFailurePolicyApplyConfiguration `json:"podFailurePolicy,omitempty"` + // successPolicy specifies the policy when the Job can be declared as succeeded. + // If empty, the default behavior applies - the Job is declared as succeeded + // only when the number of succeeded pods equals to the completions. + // When the field is specified, it must be immutable and works only for the Indexed Jobs. + // Once the Job meets the SuccessPolicy, the lingering pods are terminated. + SuccessPolicy *SuccessPolicyApplyConfiguration `json:"successPolicy,omitempty"` + // Specifies the number of retries before marking this job failed. + // Defaults to 6, unless backoffLimitPerIndex (only Indexed Job) is specified. + // When backoffLimitPerIndex is specified, backoffLimit defaults to 2147483647. + BackoffLimit *int32 `json:"backoffLimit,omitempty"` + // Specifies the limit for the number of retries within an + // index before marking this index as failed. When enabled the number of + // failures per index is kept in the pod's + // batch.kubernetes.io/job-index-failure-count annotation. It can only + // be set when Job's completionMode=Indexed, and the Pod's restart + // policy is Never. The field is immutable. + BackoffLimitPerIndex *int32 `json:"backoffLimitPerIndex,omitempty"` + // Specifies the maximal number of failed indexes before marking the Job as + // failed, when backoffLimitPerIndex is set. Once the number of failed + // indexes exceeds this number the entire Job is marked as Failed and its + // execution is terminated. When left as null the job continues execution of + // all of its indexes and is marked with the `Complete` Job condition. + // It can only be specified when backoffLimitPerIndex is set. + // It can be null or up to completions. It is required and must be + // less than or equal to 10^4 when is completions greater than 10^5. + MaxFailedIndexes *int32 `json:"maxFailedIndexes,omitempty"` + // A label query over pods that should match the pod count. + // Normally, the system sets this field for you. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // manualSelector controls generation of pod labels and pod selectors. + // Leave `manualSelector` unset unless you are certain what you are doing. + // When false or unset, the system pick labels unique to this job + // and appends those labels to the pod template. When true, + // the user is responsible for picking unique labels and specifying + // the selector. Failure to pick a unique label may cause this + // and other jobs to not function correctly. However, You may see + // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` + // API. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector + ManualSelector *bool `json:"manualSelector,omitempty"` + // Describes the pod that will be created when executing a job. + // The only allowed template.spec.restartPolicy values are "Never" or "OnFailure". + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // ttlSecondsAfterFinished limits the lifetime of a Job that has finished + // execution (either Complete or Failed). If this field is set, + // ttlSecondsAfterFinished after the Job finishes, it is eligible to be + // automatically deleted. When the Job is being deleted, its lifecycle + // guarantees (e.g. finalizers) will be honored. If this field is unset, + // the Job won't be automatically deleted. If this field is set to zero, + // the Job becomes eligible to be deleted immediately after it finishes. + TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"` + // completionMode specifies how Pod completions are tracked. It can be + // `NonIndexed` (default) or `Indexed`. + // + // `NonIndexed` means that the Job is considered complete when there have + // been .spec.completions successfully completed Pods. Each Pod completion is + // homologous to each other. + // + // `Indexed` means that the Pods of a + // Job get an associated completion index from 0 to (.spec.completions - 1), + // available in the annotation batch.kubernetes.io/job-completion-index. + // The Job is considered complete when there is one successfully completed Pod + // for each index. + // When value is `Indexed`, .spec.completions must be specified and + // `.spec.parallelism` must be less than or equal to 10^5. + // In addition, The Pod name takes the form + // `$(job-name)-$(index)-$(random-string)`, + // the Pod hostname takes the form `$(job-name)-$(index)`. + // + // More completion modes can be added in the future. + // If the Job controller observes a mode that it doesn't recognize, which + // is possible during upgrades due to version skew, the controller + // skips updates for the Job. + CompletionMode *batchv1.CompletionMode `json:"completionMode,omitempty"` + // suspend specifies whether the Job controller should create Pods or not. If + // a Job is created with suspend set to true, no Pods are created by the Job + // controller. If a Job is suspended after creation (i.e. the flag goes from + // false to true), the Job controller will delete all active Pods associated + // with this Job. Users must design their workload to gracefully handle this. + // Suspending a Job will reset the StartTime field of the Job, effectively + // resetting the ActiveDeadlineSeconds timer too. Defaults to false. + Suspend *bool `json:"suspend,omitempty"` + // podReplacementPolicy specifies when to create replacement Pods. + // Possible values are: + // - TerminatingOrFailed means that we recreate pods + // when they are terminating (has a metadata.deletionTimestamp) or failed. + // - Failed means to wait until a previously created Pod is fully terminated (has phase + // Failed or Succeeded) before creating a replacement Pod. + // + // When using podFailurePolicy, Failed is the the only allowed value. + // TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. + PodReplacementPolicy *batchv1.PodReplacementPolicy `json:"podReplacementPolicy,omitempty"` + // ManagedBy field indicates the controller that manages a Job. The k8s Job + // controller reconciles jobs which don't have this field at all or the field + // value is the reserved string `kubernetes.io/job-controller`, but skips + // reconciling Jobs with a custom value for this field. + // The value must be a valid domain-prefixed path (e.g. acme.io/foo) - + // all characters before the first "/" must be a valid subdomain as defined + // by RFC 1123. All characters trailing the first "/" must be valid HTTP Path + // characters as defined by RFC 3986. The value cannot exceed 63 characters. + // This field is immutable. + // + // This field is beta-level. The job controller accepts setting the field + // when the feature gate JobManagedBy is enabled (enabled by default). + ManagedBy *string `json:"managedBy,omitempty"` } // JobSpecApplyConfiguration constructs a declarative configuration of the JobSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobstatus.go index 071a0153f54e0..0e11fd9beb8ce 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobstatus.go @@ -24,18 +24,92 @@ import ( // JobStatusApplyConfiguration represents a declarative configuration of the JobStatus type for use // with apply. +// +// JobStatus represents the current state of a Job. type JobStatusApplyConfiguration struct { - Conditions []JobConditionApplyConfiguration `json:"conditions,omitempty"` - StartTime *metav1.Time `json:"startTime,omitempty"` - CompletionTime *metav1.Time `json:"completionTime,omitempty"` - Active *int32 `json:"active,omitempty"` - Succeeded *int32 `json:"succeeded,omitempty"` - Failed *int32 `json:"failed,omitempty"` - Terminating *int32 `json:"terminating,omitempty"` - CompletedIndexes *string `json:"completedIndexes,omitempty"` - FailedIndexes *string `json:"failedIndexes,omitempty"` + // The latest available observations of an object's current state. When a Job + // fails, one of the conditions will have type "Failed" and status true. When + // a Job is suspended, one of the conditions will have type "Suspended" and + // status true; when the Job is resumed, the status of this condition will + // become false. When a Job is completed, one of the conditions will have + // type "Complete" and status true. + // + // A job is considered finished when it is in a terminal condition, either + // "Complete" or "Failed". A Job cannot have both the "Complete" and "Failed" conditions. + // Additionally, it cannot be in the "Complete" and "FailureTarget" conditions. + // The "Complete", "Failed" and "FailureTarget" conditions cannot be disabled. + // + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + Conditions []JobConditionApplyConfiguration `json:"conditions,omitempty"` + // Represents time when the job controller started processing a job. When a + // Job is created in the suspended state, this field is not set until the + // first time it is resumed. This field is reset every time a Job is resumed + // from suspension. It is represented in RFC3339 form and is in UTC. + // + // Once set, the field can only be removed when the job is suspended. + // The field cannot be modified while the job is unsuspended or finished. + StartTime *metav1.Time `json:"startTime,omitempty"` + // Represents time when the job was completed. It is not guaranteed to + // be set in happens-before order across separate operations. + // It is represented in RFC3339 form and is in UTC. + // The completion time is set when the job finishes successfully, and only then. + // The value cannot be updated or removed. The value indicates the same or + // later point in time as the startTime field. + CompletionTime *metav1.Time `json:"completionTime,omitempty"` + // The number of pending and running pods which are not terminating (without + // a deletionTimestamp). + // The value is zero for finished jobs. + Active *int32 `json:"active,omitempty"` + // The number of pods which reached phase Succeeded. + // The value increases monotonically for a given spec. However, it may + // decrease in reaction to scale down of elastic indexed jobs. + Succeeded *int32 `json:"succeeded,omitempty"` + // The number of pods which reached phase Failed. + // The value increases monotonically. + Failed *int32 `json:"failed,omitempty"` + // The number of pods which are terminating (in phase Pending or Running + // and have a deletionTimestamp). + // + // This field is beta-level. The job controller populates the field when + // the feature gate JobPodReplacementPolicy is enabled (enabled by default). + Terminating *int32 `json:"terminating,omitempty"` + // completedIndexes holds the completed indexes when .spec.completionMode = + // "Indexed" in a text format. The indexes are represented as decimal integers + // separated by commas. The numbers are listed in increasing order. Three or + // more consecutive numbers are compressed and represented by the first and + // last element of the series, separated by a hyphen. + // For example, if the completed indexes are 1, 3, 4, 5 and 7, they are + // represented as "1,3-5,7". + CompletedIndexes *string `json:"completedIndexes,omitempty"` + // FailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set. + // The indexes are represented in the text format analogous as for the + // `completedIndexes` field, ie. they are kept as decimal integers + // separated by commas. The numbers are listed in increasing order. Three or + // more consecutive numbers are compressed and represented by the first and + // last element of the series, separated by a hyphen. + // For example, if the failed indexes are 1, 3, 4, 5 and 7, they are + // represented as "1,3-5,7". + // The set of failed indexes cannot overlap with the set of completed indexes. + FailedIndexes *string `json:"failedIndexes,omitempty"` + // uncountedTerminatedPods holds the UIDs of Pods that have terminated but + // the job controller hasn't yet accounted for in the status counters. + // + // The job controller creates pods with a finalizer. When a pod terminates + // (succeeded or failed), the controller does three steps to account for it + // in the job status: + // + // 1. Add the pod UID to the arrays in this field. + // 2. Remove the pod finalizer. + // 3. Remove the pod UID from the arrays while increasing the corresponding + // counter. + // + // Old jobs might not be tracked using this field, in which case the field + // remains null. + // The structure is empty for finished jobs. UncountedTerminatedPods *UncountedTerminatedPodsApplyConfiguration `json:"uncountedTerminatedPods,omitempty"` - Ready *int32 `json:"ready,omitempty"` + // The number of active pods which have a Ready condition and are not + // terminating (without a deletionTimestamp). + Ready *int32 `json:"ready,omitempty"` } // JobStatusApplyConfiguration constructs a declarative configuration of the JobStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobtemplatespec.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobtemplatespec.go index 149c5e8f5efd1..7fb67d2d497fb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobtemplatespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobtemplatespec.go @@ -26,9 +26,15 @@ import ( // JobTemplateSpecApplyConfiguration represents a declarative configuration of the JobTemplateSpec type for use // with apply. +// +// JobTemplateSpec describes the data a Job should have when created from a template type JobTemplateSpecApplyConfiguration struct { + // Standard object's metadata of the jobs created from this template. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *JobSpecApplyConfiguration `json:"spec,omitempty"` + // Specification of the desired behavior of the job. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *JobSpecApplyConfiguration `json:"spec,omitempty"` } // JobTemplateSpecApplyConfiguration constructs a declarative configuration of the JobTemplateSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicy.go index 05a68b3c94b68..27b3e0a1146b3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicy.go @@ -20,7 +20,14 @@ package v1 // PodFailurePolicyApplyConfiguration represents a declarative configuration of the PodFailurePolicy type for use // with apply. +// +// PodFailurePolicy describes how failed pods influence the backoffLimit. type PodFailurePolicyApplyConfiguration struct { + // A list of pod failure policy rules. The rules are evaluated in order. + // Once a rule matches a Pod failure, the remaining of the rules are ignored. + // When no rule matches the Pod failure, the default handling applies - the + // counter of pod failures is incremented and it is checked against + // the backoffLimit. At most 20 elements are allowed. Rules []PodFailurePolicyRuleApplyConfiguration `json:"rules,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyonexitcodesrequirement.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyonexitcodesrequirement.go index aa4dfc4c14233..b72cf68421122 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyonexitcodesrequirement.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyonexitcodesrequirement.go @@ -24,10 +24,38 @@ import ( // PodFailurePolicyOnExitCodesRequirementApplyConfiguration represents a declarative configuration of the PodFailurePolicyOnExitCodesRequirement type for use // with apply. +// +// PodFailurePolicyOnExitCodesRequirement describes the requirement for handling +// a failed pod based on its container exit codes. In particular, it lookups the +// .state.terminated.exitCode for each app container and init container status, +// represented by the .status.containerStatuses and .status.initContainerStatuses +// fields in the Pod status, respectively. Containers completed with success +// (exit code 0) are excluded from the requirement check. type PodFailurePolicyOnExitCodesRequirementApplyConfiguration struct { - ContainerName *string `json:"containerName,omitempty"` - Operator *batchv1.PodFailurePolicyOnExitCodesOperator `json:"operator,omitempty"` - Values []int32 `json:"values,omitempty"` + // Restricts the check for exit codes to the container with the + // specified name. When null, the rule applies to all containers. + // When specified, it should match one the container or initContainer + // names in the pod template. + ContainerName *string `json:"containerName,omitempty"` + // Represents the relationship between the container exit code(s) and the + // specified values. Containers completed with success (exit code 0) are + // excluded from the requirement check. Possible values are: + // + // - In: the requirement is satisfied if at least one container exit code + // (might be multiple if there are multiple containers not restricted + // by the 'containerName' field) is in the set of specified values. + // - NotIn: the requirement is satisfied if at least one container exit code + // (might be multiple if there are multiple containers not restricted + // by the 'containerName' field) is not in the set of specified values. + // Additional values are considered to be added in the future. Clients should + // react to an unknown operator by assuming the requirement is not satisfied. + Operator *batchv1.PodFailurePolicyOnExitCodesOperator `json:"operator,omitempty"` + // Specifies the set of values. Each returned container exit code (might be + // multiple in case of multiple containers) is checked against this set of + // values with respect to the operator. The list of values must be ordered + // and must not contain duplicates. Value '0' cannot be used for the In operator. + // At least one element is required. At most 255 elements are allowed. + Values []int32 `json:"values,omitempty"` } // PodFailurePolicyOnExitCodesRequirementApplyConfiguration constructs a declarative configuration of the PodFailurePolicyOnExitCodesRequirement type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyonpodconditionspattern.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyonpodconditionspattern.go index 6459a6e594335..34f1a09245c1e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyonpodconditionspattern.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyonpodconditionspattern.go @@ -24,9 +24,17 @@ import ( // PodFailurePolicyOnPodConditionsPatternApplyConfiguration represents a declarative configuration of the PodFailurePolicyOnPodConditionsPattern type for use // with apply. +// +// PodFailurePolicyOnPodConditionsPattern describes a pattern for matching +// an actual pod condition type. type PodFailurePolicyOnPodConditionsPatternApplyConfiguration struct { - Type *corev1.PodConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` + // Specifies the required Pod condition type. To match a pod condition + // it is required that specified type equals the pod condition type. + Type *corev1.PodConditionType `json:"type,omitempty"` + // Specifies the required Pod condition status. To match a pod condition + // it is required that the specified status equals the pod condition status. + // Defaults to True. + Status *corev1.ConditionStatus `json:"status,omitempty"` } // PodFailurePolicyOnPodConditionsPatternApplyConfiguration constructs a declarative configuration of the PodFailurePolicyOnPodConditionsPattern type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyrule.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyrule.go index 847ec7c9548be..d3a2e69f53ae6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyrule.go @@ -24,9 +24,29 @@ import ( // PodFailurePolicyRuleApplyConfiguration represents a declarative configuration of the PodFailurePolicyRule type for use // with apply. +// +// PodFailurePolicyRule describes how a pod failure is handled when the requirements are met. +// One of onExitCodes and onPodConditions, but not both, can be used in each rule. type PodFailurePolicyRuleApplyConfiguration struct { - Action *batchv1.PodFailurePolicyAction `json:"action,omitempty"` - OnExitCodes *PodFailurePolicyOnExitCodesRequirementApplyConfiguration `json:"onExitCodes,omitempty"` + // Specifies the action taken on a pod failure when the requirements are satisfied. + // Possible values are: + // + // - FailJob: indicates that the pod's job is marked as Failed and all + // running pods are terminated. + // - FailIndex: indicates that the pod's index is marked as Failed and will + // not be restarted. + // - Ignore: indicates that the counter towards the .backoffLimit is not + // incremented and a replacement pod is created. + // - Count: indicates that the pod is handled in the default way - the + // counter towards the .backoffLimit is incremented. + // Additional values are considered to be added in the future. Clients should + // react to an unknown action by skipping the rule. + Action *batchv1.PodFailurePolicyAction `json:"action,omitempty"` + // Represents the requirement on the container exit codes. + OnExitCodes *PodFailurePolicyOnExitCodesRequirementApplyConfiguration `json:"onExitCodes,omitempty"` + // Represents the requirement on the pod conditions. The requirement is represented + // as a list of pod condition patterns. The requirement is satisfied if at + // least one pattern matches an actual pod condition. At most 20 elements are allowed. OnPodConditions []PodFailurePolicyOnPodConditionsPatternApplyConfiguration `json:"onPodConditions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/successpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/successpolicy.go index a3f4f39e2eae8..53ecd3ebc085c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/successpolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/successpolicy.go @@ -20,7 +20,15 @@ package v1 // SuccessPolicyApplyConfiguration represents a declarative configuration of the SuccessPolicy type for use // with apply. +// +// SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes. type SuccessPolicyApplyConfiguration struct { + // rules represents the list of alternative rules for the declaring the Jobs + // as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, + // the "SuccessCriteriaMet" condition is added, and the lingering pods are removed. + // The terminal state for such a Job has the "Complete" condition. + // Additionally, these rules are evaluated in order; Once the Job meets one of the rules, + // other rules are ignored. At most 20 elements are allowed. Rules []SuccessPolicyRuleApplyConfiguration `json:"rules,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/successpolicyrule.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/successpolicyrule.go index 2b5e3d91fe628..430054ac66029 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/successpolicyrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/successpolicyrule.go @@ -20,9 +20,33 @@ package v1 // SuccessPolicyRuleApplyConfiguration represents a declarative configuration of the SuccessPolicyRule type for use // with apply. +// +// SuccessPolicyRule describes rule for declaring a Job as succeeded. +// Each rule must have at least one of the "succeededIndexes" or "succeededCount" specified. type SuccessPolicyRuleApplyConfiguration struct { + // succeededIndexes specifies the set of indexes + // which need to be contained in the actual set of the succeeded indexes for the Job. + // The list of indexes must be within 0 to ".spec.completions-1" and + // must not contain duplicates. At least one element is required. + // The indexes are represented as intervals separated by commas. + // The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen. + // The number are listed in represented by the first and last element of the series, + // separated by a hyphen. + // For example, if the completed indexes are 1, 3, 4, 5 and 7, they are + // represented as "1,3-5,7". + // When this field is null, this field doesn't default to any value + // and is never evaluated at any time. SucceededIndexes *string `json:"succeededIndexes,omitempty"` - SucceededCount *int32 `json:"succeededCount,omitempty"` + // succeededCount specifies the minimal required size of the actual set of the succeeded indexes + // for the Job. When succeededCount is used along with succeededIndexes, the check is + // constrained only to the set of indexes specified by succeededIndexes. + // For example, given that succeededIndexes is "1-4", succeededCount is "3", + // and completed indexes are "1", "3", and "5", the Job isn't declared as succeeded + // because only "1" and "3" indexes are considered in that rules. + // When this field is null, this doesn't default to any value and + // is never evaluated at any time. + // When specified it needs to be a positive integer. + SucceededCount *int32 `json:"succeededCount,omitempty"` } // SuccessPolicyRuleApplyConfiguration constructs a declarative configuration of the SuccessPolicyRule type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/uncountedterminatedpods.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/uncountedterminatedpods.go index ff6b57b86cbb8..0b9199d2de5d6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/uncountedterminatedpods.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/uncountedterminatedpods.go @@ -24,9 +24,14 @@ import ( // UncountedTerminatedPodsApplyConfiguration represents a declarative configuration of the UncountedTerminatedPods type for use // with apply. +// +// UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't +// been accounted in Job status counters. type UncountedTerminatedPodsApplyConfiguration struct { + // succeeded holds UIDs of succeeded Pods. Succeeded []types.UID `json:"succeeded,omitempty"` - Failed []types.UID `json:"failed,omitempty"` + // failed holds UIDs of failed Pods. + Failed []types.UID `json:"failed,omitempty"` } // UncountedTerminatedPodsApplyConfiguration constructs a declarative configuration of the UncountedTerminatedPods type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjob.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjob.go index 89b181cd867d6..f0ab32de4d1fd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjob.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjob.go @@ -29,11 +29,19 @@ import ( // CronJobApplyConfiguration represents a declarative configuration of the CronJob type for use // with apply. +// +// CronJob represents the configuration of a single cron job. type CronJobApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *CronJobSpecApplyConfiguration `json:"spec,omitempty"` - Status *CronJobStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of a cron job, including the schedule. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *CronJobSpecApplyConfiguration `json:"spec,omitempty"` + // Current status of a cron job. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *CronJobStatusApplyConfiguration `json:"status,omitempty"` } // CronJob constructs a declarative configuration of the CronJob type for use with @@ -47,6 +55,27 @@ func CronJob(name, namespace string) *CronJobApplyConfiguration { return b } +// ExtractCronJobFrom extracts the applied configuration owned by fieldManager from +// cronJob for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// cronJob must be a unmodified CronJob API object that was retrieved from the Kubernetes API. +// ExtractCronJobFrom 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. +func ExtractCronJobFrom(cronJob *batchv1beta1.CronJob, fieldManager string, subresource string) (*CronJobApplyConfiguration, error) { + b := &CronJobApplyConfiguration{} + err := managedfields.ExtractInto(cronJob, internal.Parser().Type("io.k8s.api.batch.v1beta1.CronJob"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(cronJob.Name) + b.WithNamespace(cronJob.Namespace) + + b.WithKind("CronJob") + b.WithAPIVersion("batch/v1beta1") + return b, nil +} + // ExtractCronJob extracts the applied configuration owned by fieldManager from // cronJob. If no managedFields are found in cronJob for fieldManager, a // CronJobApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +86,16 @@ func CronJob(name, namespace string) *CronJobApplyConfiguration { // ExtractCronJob 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 ExtractCronJob(cronJob *batchv1beta1.CronJob, fieldManager string) (*CronJobApplyConfiguration, error) { - return extractCronJob(cronJob, fieldManager, "") + return ExtractCronJobFrom(cronJob, fieldManager, "") } -// ExtractCronJobStatus is the same as ExtractCronJob except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractCronJobStatus extracts the applied configuration owned by fieldManager from +// cronJob for the status subresource. func ExtractCronJobStatus(cronJob *batchv1beta1.CronJob, fieldManager string) (*CronJobApplyConfiguration, error) { - return extractCronJob(cronJob, fieldManager, "status") + return ExtractCronJobFrom(cronJob, fieldManager, "status") } -func extractCronJob(cronJob *batchv1beta1.CronJob, fieldManager string, subresource string) (*CronJobApplyConfiguration, error) { - b := &CronJobApplyConfiguration{} - err := managedfields.ExtractInto(cronJob, internal.Parser().Type("io.k8s.api.batch.v1beta1.CronJob"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(cronJob.Name) - b.WithNamespace(cronJob.Namespace) - - b.WithKind("CronJob") - b.WithAPIVersion("batch/v1beta1") - return b, nil -} func (b CronJobApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobspec.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobspec.go index 30604ac7edb8a..0a15bc89c1efe 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobspec.go @@ -24,15 +24,44 @@ import ( // CronJobSpecApplyConfiguration represents a declarative configuration of the CronJobSpec type for use // with apply. +// +// CronJobSpec describes how the job execution will look like and when it will actually run. type CronJobSpecApplyConfiguration struct { - Schedule *string `json:"schedule,omitempty"` - TimeZone *string `json:"timeZone,omitempty"` - StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` - ConcurrencyPolicy *batchv1beta1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` - Suspend *bool `json:"suspend,omitempty"` - JobTemplate *JobTemplateSpecApplyConfiguration `json:"jobTemplate,omitempty"` - SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"` - FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"` + // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + Schedule *string `json:"schedule,omitempty"` + // The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. + // If not specified, this will default to the time zone of the kube-controller-manager process. + // The set of valid time zone names and the time zone offset is loaded from the system-wide time zone + // database by the API server during CronJob validation and the controller manager during execution. + // If no system-wide time zone database can be found a bundled version of the database is used instead. + // If the time zone name becomes invalid during the lifetime of a CronJob or due to a change in host + // configuration, the controller will stop creating new new Jobs and will create a system event with the + // reason UnknownTimeZone. + // More information can be found in https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones + TimeZone *string `json:"timeZone,omitempty"` + // Optional deadline in seconds for starting the job if it misses scheduled + // time for any reason. Missed jobs executions will be counted as failed ones. + StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` + // Specifies how to treat concurrent executions of a Job. + // Valid values are: + // + // - "Allow" (default): allows CronJobs to run concurrently; + // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; + // - "Replace": cancels currently running job and replaces it with a new one + ConcurrencyPolicy *batchv1beta1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` + // This flag tells the controller to suspend subsequent executions, it does + // not apply to already started executions. Defaults to false. + Suspend *bool `json:"suspend,omitempty"` + // Specifies the job that will be created when executing a CronJob. + JobTemplate *JobTemplateSpecApplyConfiguration `json:"jobTemplate,omitempty"` + // The number of successful finished jobs to retain. + // This is a pointer to distinguish between explicit zero and not specified. + // Defaults to 3. + SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"` + // The number of failed finished jobs to retain. + // This is a pointer to distinguish between explicit zero and not specified. + // Defaults to 1. + FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"` } // CronJobSpecApplyConfiguration constructs a declarative configuration of the CronJobSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobstatus.go index 335f9e0dce834..caf58aa65f87d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobstatus.go @@ -25,10 +25,15 @@ import ( // CronJobStatusApplyConfiguration represents a declarative configuration of the CronJobStatus type for use // with apply. +// +// CronJobStatus represents the current state of a cron job. type CronJobStatusApplyConfiguration struct { - Active []v1.ObjectReferenceApplyConfiguration `json:"active,omitempty"` - LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"` - LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty"` + // A list of pointers to currently running jobs. + Active []v1.ObjectReferenceApplyConfiguration `json:"active,omitempty"` + // Information when was the last time the job was successfully scheduled. + LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"` + // Information when was the last time the job successfully completed. + LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty"` } // CronJobStatusApplyConfiguration constructs a declarative configuration of the CronJobStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/jobtemplatespec.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/jobtemplatespec.go index 5f0fc4925adbd..3f6347ace9bf4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/jobtemplatespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/jobtemplatespec.go @@ -27,9 +27,15 @@ import ( // JobTemplateSpecApplyConfiguration represents a declarative configuration of the JobTemplateSpec type for use // with apply. +// +// JobTemplateSpec describes the data a Job should have when created from a template type JobTemplateSpecApplyConfiguration struct { + // Standard object's metadata of the jobs created from this template. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *batchv1.JobSpecApplyConfiguration `json:"spec,omitempty"` + // Specification of the desired behavior of the job. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *batchv1.JobSpecApplyConfiguration `json:"spec,omitempty"` } // JobTemplateSpecApplyConfiguration constructs a declarative configuration of the JobTemplateSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequest.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequest.go index e78702cb35b97..0769c9f2c776f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequest.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequest.go @@ -29,11 +29,27 @@ import ( // CertificateSigningRequestApplyConfiguration represents a declarative configuration of the CertificateSigningRequest type for use // with apply. +// +// CertificateSigningRequest objects provide a mechanism to obtain x509 certificates +// by submitting a certificate signing request, and having it asynchronously approved and issued. +// +// Kubelets use this API to obtain: +// 1. client certificates to authenticate to kube-apiserver (with the "kubernetes.io/kube-apiserver-client-kubelet" signerName). +// 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the "kubernetes.io/kubelet-serving" signerName). +// +// This API can be used to request client certificates to authenticate to kube-apiserver +// (with the "kubernetes.io/kube-apiserver-client" signerName), +// or to obtain certificates from custom non-Kubernetes signers. type CertificateSigningRequestApplyConfiguration struct { metav1.TypeMetaApplyConfiguration `json:",inline"` *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *CertificateSigningRequestSpecApplyConfiguration `json:"spec,omitempty"` - Status *CertificateSigningRequestStatusApplyConfiguration `json:"status,omitempty"` + // spec contains the certificate request, and is immutable after creation. + // Only the request, signerName, expirationSeconds, and usages fields can be set on creation. + // Other fields are derived by Kubernetes and cannot be modified by users. + Spec *CertificateSigningRequestSpecApplyConfiguration `json:"spec,omitempty"` + // status contains information about whether the request is approved or denied, + // and the certificate issued by the signer, or the failure condition indicating signer failure. + Status *CertificateSigningRequestStatusApplyConfiguration `json:"status,omitempty"` } // CertificateSigningRequest constructs a declarative configuration of the CertificateSigningRequest type for use with @@ -46,6 +62,26 @@ func CertificateSigningRequest(name string) *CertificateSigningRequestApplyConfi return b } +// ExtractCertificateSigningRequestFrom extracts the applied configuration owned by fieldManager from +// certificateSigningRequest for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// certificateSigningRequest must be a unmodified CertificateSigningRequest API object that was retrieved from the Kubernetes API. +// ExtractCertificateSigningRequestFrom 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. +func ExtractCertificateSigningRequestFrom(certificateSigningRequest *certificatesv1.CertificateSigningRequest, fieldManager string, subresource string) (*CertificateSigningRequestApplyConfiguration, error) { + b := &CertificateSigningRequestApplyConfiguration{} + err := managedfields.ExtractInto(certificateSigningRequest, internal.Parser().Type("io.k8s.api.certificates.v1.CertificateSigningRequest"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(certificateSigningRequest.Name) + + b.WithKind("CertificateSigningRequest") + b.WithAPIVersion("certificates.k8s.io/v1") + return b, nil +} + // ExtractCertificateSigningRequest extracts the applied configuration owned by fieldManager from // certificateSigningRequest. If no managedFields are found in certificateSigningRequest for fieldManager, a // CertificateSigningRequestApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +92,22 @@ func CertificateSigningRequest(name string) *CertificateSigningRequestApplyConfi // ExtractCertificateSigningRequest 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 ExtractCertificateSigningRequest(certificateSigningRequest *certificatesv1.CertificateSigningRequest, fieldManager string) (*CertificateSigningRequestApplyConfiguration, error) { - return extractCertificateSigningRequest(certificateSigningRequest, fieldManager, "") + return ExtractCertificateSigningRequestFrom(certificateSigningRequest, fieldManager, "") } -// ExtractCertificateSigningRequestStatus is the same as ExtractCertificateSigningRequest except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractCertificateSigningRequestStatus(certificateSigningRequest *certificatesv1.CertificateSigningRequest, fieldManager string) (*CertificateSigningRequestApplyConfiguration, error) { - return extractCertificateSigningRequest(certificateSigningRequest, fieldManager, "status") +// ExtractCertificateSigningRequestApproval extracts the applied configuration owned by fieldManager from +// certificateSigningRequest for the approval subresource. +func ExtractCertificateSigningRequestApproval(certificateSigningRequest *certificatesv1.CertificateSigningRequest, fieldManager string) (*CertificateSigningRequestApplyConfiguration, error) { + return ExtractCertificateSigningRequestFrom(certificateSigningRequest, fieldManager, "approval") } -func extractCertificateSigningRequest(certificateSigningRequest *certificatesv1.CertificateSigningRequest, fieldManager string, subresource string) (*CertificateSigningRequestApplyConfiguration, error) { - b := &CertificateSigningRequestApplyConfiguration{} - err := managedfields.ExtractInto(certificateSigningRequest, internal.Parser().Type("io.k8s.api.certificates.v1.CertificateSigningRequest"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(certificateSigningRequest.Name) - - b.WithKind("CertificateSigningRequest") - b.WithAPIVersion("certificates.k8s.io/v1") - return b, nil +// ExtractCertificateSigningRequestStatus extracts the applied configuration owned by fieldManager from +// certificateSigningRequest for the status subresource. +func ExtractCertificateSigningRequestStatus(certificateSigningRequest *certificatesv1.CertificateSigningRequest, fieldManager string) (*CertificateSigningRequestApplyConfiguration, error) { + return ExtractCertificateSigningRequestFrom(certificateSigningRequest, fieldManager, "status") } + func (b CertificateSigningRequestApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequestcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequestcondition.go index a6dedcb595e31..f4f23f055bab2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequestcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequestcondition.go @@ -26,13 +26,38 @@ import ( // CertificateSigningRequestConditionApplyConfiguration represents a declarative configuration of the CertificateSigningRequestCondition type for use // with apply. +// +// CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object type CertificateSigningRequestConditionApplyConfiguration struct { - Type *certificatesv1.RequestConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` - LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // type of the condition. Known conditions are "Approved", "Denied", and "Failed". + // + // An "Approved" condition is added via the /approval subresource, + // indicating the request was approved and should be issued by the signer. + // + // A "Denied" condition is added via the /approval subresource, + // indicating the request was denied and should not be issued by the signer. + // + // A "Failed" condition is added via the /status subresource, + // indicating the signer failed to issue the certificate. + // + // Approved and Denied conditions are mutually exclusive. + // Approved, Denied, and Failed conditions cannot be removed once added. + // + // Only one condition of a given type is allowed. + Type *certificatesv1.RequestConditionType `json:"type,omitempty"` + // status of the condition, one of True, False, Unknown. + // Approved, Denied, and Failed conditions may not be "False" or "Unknown". + Status *corev1.ConditionStatus `json:"status,omitempty"` + // reason indicates a brief reason for the request state + Reason *string `json:"reason,omitempty"` + // message contains a human readable message with details about the request state + Message *string `json:"message,omitempty"` + // lastUpdateTime is the time of the last update to this condition + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` + // lastTransitionTime is the time the condition last transitioned from one status to another. + // If unset, when a new condition type is added or an existing condition's status is changed, + // the server defaults this to the current time. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` } // CertificateSigningRequestConditionApplyConfiguration constructs a declarative configuration of the CertificateSigningRequestCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequestspec.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequestspec.go index 82da53c9e195a..983ee001b7d3b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequestspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequestspec.go @@ -24,15 +24,80 @@ import ( // CertificateSigningRequestSpecApplyConfiguration represents a declarative configuration of the CertificateSigningRequestSpec type for use // with apply. +// +// CertificateSigningRequestSpec contains the certificate request. type CertificateSigningRequestSpecApplyConfiguration struct { - Request []byte `json:"request,omitempty"` - SignerName *string `json:"signerName,omitempty"` - ExpirationSeconds *int32 `json:"expirationSeconds,omitempty"` - Usages []certificatesv1.KeyUsage `json:"usages,omitempty"` - Username *string `json:"username,omitempty"` - UID *string `json:"uid,omitempty"` - Groups []string `json:"groups,omitempty"` - Extra map[string]certificatesv1.ExtraValue `json:"extra,omitempty"` + // request contains an x509 certificate signing request encoded in a "CERTIFICATE REQUEST" PEM block. + // When serialized as JSON or YAML, the data is additionally base64-encoded. + Request []byte `json:"request,omitempty"` + // signerName indicates the requested signer, and is a qualified name. + // + // List/watch requests for CertificateSigningRequests can filter on this field using a "spec.signerName=NAME" fieldSelector. + // + // Well-known Kubernetes signers are: + // 1. "kubernetes.io/kube-apiserver-client": issues client certificates that can be used to authenticate to kube-apiserver. + // Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the "csrsigning" controller in kube-controller-manager. + // 2. "kubernetes.io/kube-apiserver-client-kubelet": issues client certificates that kubelets use to authenticate to kube-apiserver. + // Requests for this signer can be auto-approved by the "csrapproving" controller in kube-controller-manager, and can be issued by the "csrsigning" controller in kube-controller-manager. + // 3. "kubernetes.io/kubelet-serving" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely. + // Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the "csrsigning" controller in kube-controller-manager. + // + // More details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers + // + // Custom signerNames can also be specified. The signer defines: + // 1. Trust distribution: how trust (CA bundles) are distributed. + // 2. Permitted subjects: and behavior when a disallowed subject is requested. + // 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested. + // 4. Required, permitted, or forbidden key usages / extended key usages. + // 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin. + // 6. Whether or not requests for CA certificates are allowed. + SignerName *string `json:"signerName,omitempty"` + // expirationSeconds is the requested duration of validity of the issued + // certificate. The certificate signer may issue a certificate with a different + // validity duration so a client must check the delta between the notBefore and + // and notAfter fields in the issued certificate to determine the actual duration. + // + // The v1.22+ in-tree implementations of the well-known Kubernetes signers will + // honor this field as long as the requested duration is not greater than the + // maximum duration they will honor per the --cluster-signing-duration CLI + // flag to the Kubernetes controller manager. + // + // Certificate signers may not honor this field for various reasons: + // + // 1. Old signer that is unaware of the field (such as the in-tree + // implementations prior to v1.22) + // 2. Signer whose configured maximum is shorter than the requested duration + // 3. Signer whose configured minimum is longer than the requested duration + // + // The minimum valid value for expirationSeconds is 600, i.e. 10 minutes. + ExpirationSeconds *int32 `json:"expirationSeconds,omitempty"` + // usages specifies a set of key usages requested in the issued certificate. + // + // Requests for TLS client certificates typically request: "digital signature", "key encipherment", "client auth". + // + // Requests for TLS serving certificates typically request: "key encipherment", "digital signature", "server auth". + // + // Valid values are: + // "signing", "digital signature", "content commitment", + // "key encipherment", "key agreement", "data encipherment", + // "cert sign", "crl sign", "encipher only", "decipher only", "any", + // "server auth", "client auth", + // "code signing", "email protection", "s/mime", + // "ipsec end system", "ipsec tunnel", "ipsec user", + // "timestamping", "ocsp signing", "microsoft sgc", "netscape sgc" + Usages []certificatesv1.KeyUsage `json:"usages,omitempty"` + // username contains the name of the user that created the CertificateSigningRequest. + // Populated by the API server on creation and immutable. + Username *string `json:"username,omitempty"` + // uid contains the uid of the user that created the CertificateSigningRequest. + // Populated by the API server on creation and immutable. + UID *string `json:"uid,omitempty"` + // groups contains group membership of the user that created the CertificateSigningRequest. + // Populated by the API server on creation and immutable. + Groups []string `json:"groups,omitempty"` + // extra contains extra attributes of the user that created the CertificateSigningRequest. + // Populated by the API server on creation and immutable. + Extra map[string]certificatesv1.ExtraValue `json:"extra,omitempty"` } // CertificateSigningRequestSpecApplyConfiguration constructs a declarative configuration of the CertificateSigningRequestSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequeststatus.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequeststatus.go index 897f6d1e982c3..1eb79965ca900 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequeststatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequeststatus.go @@ -20,9 +20,39 @@ package v1 // CertificateSigningRequestStatusApplyConfiguration represents a declarative configuration of the CertificateSigningRequestStatus type for use // with apply. +// +// CertificateSigningRequestStatus contains conditions used to indicate +// approved/denied/failed status of the request, and the issued certificate. type CertificateSigningRequestStatusApplyConfiguration struct { - Conditions []CertificateSigningRequestConditionApplyConfiguration `json:"conditions,omitempty"` - Certificate []byte `json:"certificate,omitempty"` + // conditions applied to the request. Known conditions are "Approved", "Denied", and "Failed". + Conditions []CertificateSigningRequestConditionApplyConfiguration `json:"conditions,omitempty"` + // certificate is populated with an issued certificate by the signer after an Approved condition is present. + // This field is set via the /status subresource. Once populated, this field is immutable. + // + // If the certificate signing request is denied, a condition of type "Denied" is added and this field remains empty. + // If the signer cannot issue the certificate, a condition of type "Failed" is added and this field remains empty. + // + // Validation requirements: + // 1. certificate must contain one or more PEM blocks. + // 2. All PEM blocks must have the "CERTIFICATE" label, contain no headers, and the encoded data + // must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280. + // 3. Non-PEM content may appear before or after the "CERTIFICATE" PEM blocks and is unvalidated, + // to allow for explanatory text as described in section 5.2 of RFC7468. + // + // If more than one PEM block is present, and the definition of the requested spec.signerName + // does not indicate otherwise, the first block is the issued certificate, + // and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes. + // + // The certificate is encoded in PEM format. + // + // When serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of: + // + // base64( + // -----BEGIN CERTIFICATE----- + // ... + // -----END CERTIFICATE----- + // ) + Certificate []byte `json:"certificate,omitempty"` } // CertificateSigningRequestStatusApplyConfiguration constructs a declarative configuration of the CertificateSigningRequestStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/clustertrustbundle.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/clustertrustbundle.go index 82c2efc2f0311..9c26cdb9155b3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/clustertrustbundle.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/clustertrustbundle.go @@ -29,10 +29,28 @@ import ( // ClusterTrustBundleApplyConfiguration represents a declarative configuration of the ClusterTrustBundle type for use // with apply. +// +// ClusterTrustBundle is a cluster-scoped container for X.509 trust anchors +// (root certificates). +// +// ClusterTrustBundle objects are considered to be readable by any authenticated +// user in the cluster, because they can be mounted by pods using the +// `clusterTrustBundle` projection. All service accounts have read access to +// ClusterTrustBundles by default. Users who only have namespace-level access +// to a cluster can read ClusterTrustBundles by impersonating a serviceaccount +// that they have access to. +// +// It can be optionally associated with a particular assigner, in which case it +// contains one valid set of trust anchors for that signer. Signers may have +// multiple associated ClusterTrustBundles; each is an independent set of trust +// anchors for that signer. Admission control is used to enforce that only users +// with permissions on the signer can create or modify the corresponding bundle. type ClusterTrustBundleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // metadata contains the object metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ClusterTrustBundleSpecApplyConfiguration `json:"spec,omitempty"` + // spec contains the signer (if any) and trust anchors. + Spec *ClusterTrustBundleSpecApplyConfiguration `json:"spec,omitempty"` } // ClusterTrustBundle constructs a declarative configuration of the ClusterTrustBundle type for use with @@ -45,29 +63,14 @@ func ClusterTrustBundle(name string) *ClusterTrustBundleApplyConfiguration { return b } -// ExtractClusterTrustBundle extracts the applied configuration owned by fieldManager from -// clusterTrustBundle. If no managedFields are found in clusterTrustBundle for fieldManager, a -// ClusterTrustBundleApplyConfiguration 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. +// ExtractClusterTrustBundleFrom extracts the applied configuration owned by fieldManager from +// clusterTrustBundle for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // clusterTrustBundle must be a unmodified ClusterTrustBundle API object that was retrieved from the Kubernetes API. -// ExtractClusterTrustBundle provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractClusterTrustBundleFrom 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 ExtractClusterTrustBundle(clusterTrustBundle *certificatesv1alpha1.ClusterTrustBundle, fieldManager string) (*ClusterTrustBundleApplyConfiguration, error) { - return extractClusterTrustBundle(clusterTrustBundle, fieldManager, "") -} - -// ExtractClusterTrustBundleStatus is the same as ExtractClusterTrustBundle except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractClusterTrustBundleStatus(clusterTrustBundle *certificatesv1alpha1.ClusterTrustBundle, fieldManager string) (*ClusterTrustBundleApplyConfiguration, error) { - return extractClusterTrustBundle(clusterTrustBundle, fieldManager, "status") -} - -func extractClusterTrustBundle(clusterTrustBundle *certificatesv1alpha1.ClusterTrustBundle, fieldManager string, subresource string) (*ClusterTrustBundleApplyConfiguration, error) { +func ExtractClusterTrustBundleFrom(clusterTrustBundle *certificatesv1alpha1.ClusterTrustBundle, fieldManager string, subresource string) (*ClusterTrustBundleApplyConfiguration, error) { b := &ClusterTrustBundleApplyConfiguration{} err := managedfields.ExtractInto(clusterTrustBundle, internal.Parser().Type("io.k8s.api.certificates.v1alpha1.ClusterTrustBundle"), fieldManager, b, subresource) if err != nil { @@ -79,6 +82,21 @@ func extractClusterTrustBundle(clusterTrustBundle *certificatesv1alpha1.ClusterT b.WithAPIVersion("certificates.k8s.io/v1alpha1") return b, nil } + +// ExtractClusterTrustBundle extracts the applied configuration owned by fieldManager from +// clusterTrustBundle. If no managedFields are found in clusterTrustBundle for fieldManager, a +// ClusterTrustBundleApplyConfiguration 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. +// clusterTrustBundle must be a unmodified ClusterTrustBundle API object that was retrieved from the Kubernetes API. +// ExtractClusterTrustBundle 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. +func ExtractClusterTrustBundle(clusterTrustBundle *certificatesv1alpha1.ClusterTrustBundle, fieldManager string) (*ClusterTrustBundleApplyConfiguration, error) { + return ExtractClusterTrustBundleFrom(clusterTrustBundle, fieldManager, "") +} + func (b ClusterTrustBundleApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/clustertrustbundlespec.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/clustertrustbundlespec.go index 7bb36f7084df4..14ba99c6f875f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/clustertrustbundlespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/clustertrustbundlespec.go @@ -20,8 +20,39 @@ package v1alpha1 // ClusterTrustBundleSpecApplyConfiguration represents a declarative configuration of the ClusterTrustBundleSpec type for use // with apply. +// +// ClusterTrustBundleSpec contains the signer and trust anchors. type ClusterTrustBundleSpecApplyConfiguration struct { - SignerName *string `json:"signerName,omitempty"` + // signerName indicates the associated signer, if any. + // + // In order to create or update a ClusterTrustBundle that sets signerName, + // you must have the following cluster-scoped permission: + // group=certificates.k8s.io resource=signers resourceName= + // verb=attest. + // + // If signerName is not empty, then the ClusterTrustBundle object must be + // named with the signer name as a prefix (translating slashes to colons). + // For example, for the signer name `example.com/foo`, valid + // ClusterTrustBundle object names include `example.com:foo:abc` and + // `example.com:foo:v1`. + // + // If signerName is empty, then the ClusterTrustBundle object's name must + // not have such a prefix. + // + // List/watch requests for ClusterTrustBundles can filter on this field + // using a `spec.signerName=NAME` field selector. + SignerName *string `json:"signerName,omitempty"` + // trustBundle contains the individual X.509 trust anchors for this + // bundle, as PEM bundle of PEM-wrapped, DER-formatted X.509 certificates. + // + // The data must consist only of PEM certificate blocks that parse as valid + // X.509 certificates. Each certificate must include a basic constraints + // extension with the CA bit set. The API server will reject objects that + // contain duplicate certificates, or that use PEM block headers. + // + // Users of ClusterTrustBundles, including Kubelet, are free to reorder and + // deduplicate certificate blocks in this file according to their own logic, + // as well as to drop PEM block headers and inter-block data. TrustBundle *string `json:"trustBundle,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/podcertificaterequest.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/podcertificaterequest.go index df6d15bf71326..699e236a2b43e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/podcertificaterequest.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/podcertificaterequest.go @@ -29,11 +29,19 @@ import ( // PodCertificateRequestApplyConfiguration represents a declarative configuration of the PodCertificateRequest type for use // with apply. +// +// PodCertificateRequest encodes a pod requesting a certificate from a given +// signer. +// +// Kubelets use this API to implement podCertificate projected volumes type PodCertificateRequestApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // metadata contains the object metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PodCertificateRequestSpecApplyConfiguration `json:"spec,omitempty"` - Status *PodCertificateRequestStatusApplyConfiguration `json:"status,omitempty"` + // spec contains the details about the certificate being requested. + Spec *PodCertificateRequestSpecApplyConfiguration `json:"spec,omitempty"` + // status contains the issued certificate, and a standard set of conditions. + Status *PodCertificateRequestStatusApplyConfiguration `json:"status,omitempty"` } // PodCertificateRequest constructs a declarative configuration of the PodCertificateRequest type for use with @@ -47,6 +55,27 @@ func PodCertificateRequest(name, namespace string) *PodCertificateRequestApplyCo return b } +// ExtractPodCertificateRequestFrom extracts the applied configuration owned by fieldManager from +// podCertificateRequest for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// podCertificateRequest must be a unmodified PodCertificateRequest API object that was retrieved from the Kubernetes API. +// ExtractPodCertificateRequestFrom 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. +func ExtractPodCertificateRequestFrom(podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, fieldManager string, subresource string) (*PodCertificateRequestApplyConfiguration, error) { + b := &PodCertificateRequestApplyConfiguration{} + err := managedfields.ExtractInto(podCertificateRequest, internal.Parser().Type("io.k8s.api.certificates.v1alpha1.PodCertificateRequest"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(podCertificateRequest.Name) + b.WithNamespace(podCertificateRequest.Namespace) + + b.WithKind("PodCertificateRequest") + b.WithAPIVersion("certificates.k8s.io/v1alpha1") + return b, nil +} + // ExtractPodCertificateRequest extracts the applied configuration owned by fieldManager from // podCertificateRequest. If no managedFields are found in podCertificateRequest for fieldManager, a // PodCertificateRequestApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +86,16 @@ func PodCertificateRequest(name, namespace string) *PodCertificateRequestApplyCo // ExtractPodCertificateRequest 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 ExtractPodCertificateRequest(podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, fieldManager string) (*PodCertificateRequestApplyConfiguration, error) { - return extractPodCertificateRequest(podCertificateRequest, fieldManager, "") + return ExtractPodCertificateRequestFrom(podCertificateRequest, fieldManager, "") } -// ExtractPodCertificateRequestStatus is the same as ExtractPodCertificateRequest except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractPodCertificateRequestStatus extracts the applied configuration owned by fieldManager from +// podCertificateRequest for the status subresource. func ExtractPodCertificateRequestStatus(podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, fieldManager string) (*PodCertificateRequestApplyConfiguration, error) { - return extractPodCertificateRequest(podCertificateRequest, fieldManager, "status") + return ExtractPodCertificateRequestFrom(podCertificateRequest, fieldManager, "status") } -func extractPodCertificateRequest(podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, fieldManager string, subresource string) (*PodCertificateRequestApplyConfiguration, error) { - b := &PodCertificateRequestApplyConfiguration{} - err := managedfields.ExtractInto(podCertificateRequest, internal.Parser().Type("io.k8s.api.certificates.v1alpha1.PodCertificateRequest"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(podCertificateRequest.Name) - b.WithNamespace(podCertificateRequest.Namespace) - - b.WithKind("PodCertificateRequest") - b.WithAPIVersion("certificates.k8s.io/v1alpha1") - return b, nil -} func (b PodCertificateRequestApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/podcertificaterequestspec.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/podcertificaterequestspec.go index 2ceb9bb2e8802..52e964684f216 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/podcertificaterequestspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/podcertificaterequestspec.go @@ -24,17 +24,78 @@ import ( // PodCertificateRequestSpecApplyConfiguration represents a declarative configuration of the PodCertificateRequestSpec type for use // with apply. +// +// PodCertificateRequestSpec describes the certificate request. All fields are +// immutable after creation. type PodCertificateRequestSpecApplyConfiguration struct { - SignerName *string `json:"signerName,omitempty"` - PodName *string `json:"podName,omitempty"` - PodUID *types.UID `json:"podUID,omitempty"` - ServiceAccountName *string `json:"serviceAccountName,omitempty"` - ServiceAccountUID *types.UID `json:"serviceAccountUID,omitempty"` - NodeName *types.NodeName `json:"nodeName,omitempty"` - NodeUID *types.UID `json:"nodeUID,omitempty"` - MaxExpirationSeconds *int32 `json:"maxExpirationSeconds,omitempty"` - PKIXPublicKey []byte `json:"pkixPublicKey,omitempty"` - ProofOfPossession []byte `json:"proofOfPossession,omitempty"` + // signerName indicates the requested signer. + // + // All signer names beginning with `kubernetes.io` are reserved for use by + // the Kubernetes project. There is currently one well-known signer + // documented by the Kubernetes project, + // `kubernetes.io/kube-apiserver-client-pod`, which will issue client + // certificates understood by kube-apiserver. It is currently + // unimplemented. + SignerName *string `json:"signerName,omitempty"` + // podName is the name of the pod into which the certificate will be mounted. + PodName *string `json:"podName,omitempty"` + // podUID is the UID of the pod into which the certificate will be mounted. + PodUID *types.UID `json:"podUID,omitempty"` + // serviceAccountName is the name of the service account the pod is running as. + ServiceAccountName *string `json:"serviceAccountName,omitempty"` + // serviceAccountUID is the UID of the service account the pod is running as. + ServiceAccountUID *types.UID `json:"serviceAccountUID,omitempty"` + // nodeName is the name of the node the pod is assigned to. + NodeName *types.NodeName `json:"nodeName,omitempty"` + // nodeUID is the UID of the node the pod is assigned to. + NodeUID *types.UID `json:"nodeUID,omitempty"` + // maxExpirationSeconds is the maximum lifetime permitted for the + // certificate. + // + // If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver + // will reject values shorter than 3600 (1 hour). The maximum allowable + // value is 7862400 (91 days). + // + // The signer implementation is then free to issue a certificate with any + // lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 + // seconds (1 hour). This constraint is enforced by kube-apiserver. + // `kubernetes.io` signers will never issue certificates with a lifetime + // longer than 24 hours. + MaxExpirationSeconds *int32 `json:"maxExpirationSeconds,omitempty"` + // pkixPublicKey is the PKIX-serialized public key the signer will issue the + // certificate to. + // + // The key must be one of RSA3072, RSA4096, ECDSAP256, ECDSAP384, ECDSAP521, + // or ED25519. Note that this list may be expanded in the future. + // + // Signer implementations do not need to support all key types supported by + // kube-apiserver and kubelet. If a signer does not support the key type + // used for a given PodCertificateRequest, it must deny the request by + // setting a status.conditions entry with a type of "Denied" and a reason of + // "UnsupportedKeyType". It may also suggest a key type that it does support + // in the message field. + PKIXPublicKey []byte `json:"pkixPublicKey,omitempty"` + // proofOfPossession proves that the requesting kubelet holds the private + // key corresponding to pkixPublicKey. + // + // It is contructed by signing the ASCII bytes of the pod's UID using + // `pkixPublicKey`. + // + // kube-apiserver validates the proof of possession during creation of the + // PodCertificateRequest. + // + // If the key is an RSA key, then the signature is over the ASCII bytes of + // the pod UID, using RSASSA-PSS from RFC 8017 (as implemented by the golang + // function crypto/rsa.SignPSS with nil options). + // + // If the key is an ECDSA key, then the signature is as described by [SEC 1, + // Version 2.0](https://www.secg.org/sec1-v2.pdf) (as implemented by the + // golang library function crypto/ecdsa.SignASN1) + // + // If the key is an ED25519 key, the the signature is as described by the + // [ED25519 Specification](https://ed25519.cr.yp.to/) (as implemented by + // the golang library crypto/ed25519.Sign). + ProofOfPossession []byte `json:"proofOfPossession,omitempty"` } // PodCertificateRequestSpecApplyConfiguration constructs a declarative configuration of the PodCertificateRequestSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/podcertificaterequeststatus.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/podcertificaterequeststatus.go index ed5f52e73a1b1..ce09a538eed5d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/podcertificaterequeststatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1alpha1/podcertificaterequeststatus.go @@ -25,12 +25,60 @@ import ( // PodCertificateRequestStatusApplyConfiguration represents a declarative configuration of the PodCertificateRequestStatus type for use // with apply. +// +// PodCertificateRequestStatus describes the status of the request, and holds +// the certificate data if the request is issued. type PodCertificateRequestStatusApplyConfiguration struct { - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` - CertificateChain *string `json:"certificateChain,omitempty"` - NotBefore *metav1.Time `json:"notBefore,omitempty"` - BeginRefreshAt *metav1.Time `json:"beginRefreshAt,omitempty"` - NotAfter *metav1.Time `json:"notAfter,omitempty"` + // conditions applied to the request. + // + // The types "Issued", "Denied", and "Failed" have special handling. At + // most one of these conditions may be present, and they must have status + // "True". + // + // If the request is denied with `Reason=UnsupportedKeyType`, the signer may + // suggest a key type that will work in the message field. + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + // certificateChain is populated with an issued certificate by the signer. + // This field is set via the /status subresource. Once populated, this field + // is immutable. + // + // If the certificate signing request is denied, a condition of type + // "Denied" is added and this field remains empty. If the signer cannot + // issue the certificate, a condition of type "Failed" is added and this + // field remains empty. + // + // Validation requirements: + // 1. certificateChain must consist of one or more PEM-formatted certificates. + // 2. Each entry must be a valid PEM-wrapped, DER-encoded ASN.1 Certificate as + // described in section 4 of RFC5280. + // + // If more than one block is present, and the definition of the requested + // spec.signerName does not indicate otherwise, the first block is the + // issued certificate, and subsequent blocks should be treated as + // intermediate certificates and presented in TLS handshakes. When + // projecting the chain into a pod volume, kubelet will drop any data + // in-between the PEM blocks, as well as any PEM block headers. + CertificateChain *string `json:"certificateChain,omitempty"` + // notBefore is the time at which the certificate becomes valid. The value + // must be the same as the notBefore value in the leaf certificate in + // certificateChain. This field is set via the /status subresource. Once + // populated, it is immutable. The signer must set this field at the same + // time it sets certificateChain. + NotBefore *metav1.Time `json:"notBefore,omitempty"` + // beginRefreshAt is the time at which the kubelet should begin trying to + // refresh the certificate. This field is set via the /status subresource, + // and must be set at the same time as certificateChain. Once populated, + // this field is immutable. + // + // This field is only a hint. Kubelet may start refreshing before or after + // this time if necessary. + BeginRefreshAt *metav1.Time `json:"beginRefreshAt,omitempty"` + // notAfter is the time at which the certificate expires. The value must be + // the same as the notAfter value in the leaf certificate in + // certificateChain. This field is set via the /status subresource. Once + // populated, it is immutable. The signer must set this field at the same + // time it sets certificateChain. + NotAfter *metav1.Time `json:"notAfter,omitempty"` } // PodCertificateRequestStatusApplyConfiguration constructs a declarative configuration of the PodCertificateRequestStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go index 49009d3b0d725..05e16d20545ea 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go @@ -29,11 +29,17 @@ import ( // CertificateSigningRequestApplyConfiguration represents a declarative configuration of the CertificateSigningRequest type for use // with apply. +// +// Describes a certificate signing request type CertificateSigningRequestApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *CertificateSigningRequestSpecApplyConfiguration `json:"spec,omitempty"` - Status *CertificateSigningRequestStatusApplyConfiguration `json:"status,omitempty"` + // spec contains the certificate request, and is immutable after creation. + // Only the request, signerName, expirationSeconds, and usages fields can be set on creation. + // Other fields are derived by Kubernetes and cannot be modified by users. + Spec *CertificateSigningRequestSpecApplyConfiguration `json:"spec,omitempty"` + // Derived information about the request. + Status *CertificateSigningRequestStatusApplyConfiguration `json:"status,omitempty"` } // CertificateSigningRequest constructs a declarative configuration of the CertificateSigningRequest type for use with @@ -46,6 +52,26 @@ func CertificateSigningRequest(name string) *CertificateSigningRequestApplyConfi return b } +// ExtractCertificateSigningRequestFrom extracts the applied configuration owned by fieldManager from +// certificateSigningRequest for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// certificateSigningRequest must be a unmodified CertificateSigningRequest API object that was retrieved from the Kubernetes API. +// ExtractCertificateSigningRequestFrom 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. +func ExtractCertificateSigningRequestFrom(certificateSigningRequest *certificatesv1beta1.CertificateSigningRequest, fieldManager string, subresource string) (*CertificateSigningRequestApplyConfiguration, error) { + b := &CertificateSigningRequestApplyConfiguration{} + err := managedfields.ExtractInto(certificateSigningRequest, internal.Parser().Type("io.k8s.api.certificates.v1beta1.CertificateSigningRequest"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(certificateSigningRequest.Name) + + b.WithKind("CertificateSigningRequest") + b.WithAPIVersion("certificates.k8s.io/v1beta1") + return b, nil +} + // ExtractCertificateSigningRequest extracts the applied configuration owned by fieldManager from // certificateSigningRequest. If no managedFields are found in certificateSigningRequest for fieldManager, a // CertificateSigningRequestApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +82,16 @@ func CertificateSigningRequest(name string) *CertificateSigningRequestApplyConfi // ExtractCertificateSigningRequest 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 ExtractCertificateSigningRequest(certificateSigningRequest *certificatesv1beta1.CertificateSigningRequest, fieldManager string) (*CertificateSigningRequestApplyConfiguration, error) { - return extractCertificateSigningRequest(certificateSigningRequest, fieldManager, "") + return ExtractCertificateSigningRequestFrom(certificateSigningRequest, fieldManager, "") } -// ExtractCertificateSigningRequestStatus is the same as ExtractCertificateSigningRequest except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractCertificateSigningRequestStatus extracts the applied configuration owned by fieldManager from +// certificateSigningRequest for the status subresource. func ExtractCertificateSigningRequestStatus(certificateSigningRequest *certificatesv1beta1.CertificateSigningRequest, fieldManager string) (*CertificateSigningRequestApplyConfiguration, error) { - return extractCertificateSigningRequest(certificateSigningRequest, fieldManager, "status") + return ExtractCertificateSigningRequestFrom(certificateSigningRequest, fieldManager, "status") } -func extractCertificateSigningRequest(certificateSigningRequest *certificatesv1beta1.CertificateSigningRequest, fieldManager string, subresource string) (*CertificateSigningRequestApplyConfiguration, error) { - b := &CertificateSigningRequestApplyConfiguration{} - err := managedfields.ExtractInto(certificateSigningRequest, internal.Parser().Type("io.k8s.api.certificates.v1beta1.CertificateSigningRequest"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(certificateSigningRequest.Name) - - b.WithKind("CertificateSigningRequest") - b.WithAPIVersion("certificates.k8s.io/v1beta1") - return b, nil -} func (b CertificateSigningRequestApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequestcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequestcondition.go index a845ec4047964..f88fc10c167c9 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequestcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequestcondition.go @@ -27,12 +27,23 @@ import ( // CertificateSigningRequestConditionApplyConfiguration represents a declarative configuration of the CertificateSigningRequestCondition type for use // with apply. type CertificateSigningRequestConditionApplyConfiguration struct { - Type *certificatesv1beta1.RequestConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` - LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // type of the condition. Known conditions include "Approved", "Denied", and "Failed". + Type *certificatesv1beta1.RequestConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + // Approved, Denied, and Failed conditions may not be "False" or "Unknown". + // Defaults to "True". + // If unset, should be treated as "True". + Status *v1.ConditionStatus `json:"status,omitempty"` + // brief reason for the request state + Reason *string `json:"reason,omitempty"` + // human readable message with details about the request state + Message *string `json:"message,omitempty"` + // timestamp for the last update to this condition + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` + // lastTransitionTime is the time the condition last transitioned from one status to another. + // If unset, when a new condition type is added or an existing condition's status is changed, + // the server defaults this to the current time. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` } // CertificateSigningRequestConditionApplyConfiguration constructs a declarative configuration of the CertificateSigningRequestCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequestspec.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequestspec.go index ee4016c76d94f..f5186620b0480 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequestspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequestspec.go @@ -24,15 +24,84 @@ import ( // CertificateSigningRequestSpecApplyConfiguration represents a declarative configuration of the CertificateSigningRequestSpec type for use // with apply. +// +// CertificateSigningRequestSpec contains the certificate request. type CertificateSigningRequestSpecApplyConfiguration struct { - Request []byte `json:"request,omitempty"` - SignerName *string `json:"signerName,omitempty"` - ExpirationSeconds *int32 `json:"expirationSeconds,omitempty"` - Usages []certificatesv1beta1.KeyUsage `json:"usages,omitempty"` - Username *string `json:"username,omitempty"` - UID *string `json:"uid,omitempty"` - Groups []string `json:"groups,omitempty"` - Extra map[string]certificatesv1beta1.ExtraValue `json:"extra,omitempty"` + // Base64-encoded PKCS#10 CSR data + Request []byte `json:"request,omitempty"` + // Requested signer for the request. It is a qualified name in the form: + // `scope-hostname.io/name`. + // If empty, it will be defaulted: + // 1. If it's a kubelet client certificate, it is assigned + // "kubernetes.io/kube-apiserver-client-kubelet". + // 2. If it's a kubelet serving certificate, it is assigned + // "kubernetes.io/kubelet-serving". + // 3. Otherwise, it is assigned "kubernetes.io/legacy-unknown". + // Distribution of trust for signers happens out of band. + // You can select on this field using `spec.signerName`. + SignerName *string `json:"signerName,omitempty"` + // expirationSeconds is the requested duration of validity of the issued + // certificate. The certificate signer may issue a certificate with a different + // validity duration so a client must check the delta between the notBefore and + // and notAfter fields in the issued certificate to determine the actual duration. + // + // The v1.22+ in-tree implementations of the well-known Kubernetes signers will + // honor this field as long as the requested duration is not greater than the + // maximum duration they will honor per the --cluster-signing-duration CLI + // flag to the Kubernetes controller manager. + // + // Certificate signers may not honor this field for various reasons: + // + // 1. Old signer that is unaware of the field (such as the in-tree + // implementations prior to v1.22) + // 2. Signer whose configured maximum is shorter than the requested duration + // 3. Signer whose configured minimum is longer than the requested duration + // + // The minimum valid value for expirationSeconds is 600, i.e. 10 minutes. + ExpirationSeconds *int32 `json:"expirationSeconds,omitempty"` + // allowedUsages specifies a set of usage contexts the key will be + // valid for. + // See: + // https://tools.ietf.org/html/rfc5280#section-4.2.1.3 + // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 + // + // Valid values are: + // "signing", + // "digital signature", + // "content commitment", + // "key encipherment", + // "key agreement", + // "data encipherment", + // "cert sign", + // "crl sign", + // "encipher only", + // "decipher only", + // "any", + // "server auth", + // "client auth", + // "code signing", + // "email protection", + // "s/mime", + // "ipsec end system", + // "ipsec tunnel", + // "ipsec user", + // "timestamping", + // "ocsp signing", + // "microsoft sgc", + // "netscape sgc" + Usages []certificatesv1beta1.KeyUsage `json:"usages,omitempty"` + // Information about the requesting user. + // See user.Info interface for details. + Username *string `json:"username,omitempty"` + // UID information about the requesting user. + // See user.Info interface for details. + UID *string `json:"uid,omitempty"` + // Group information about the requesting user. + // See user.Info interface for details. + Groups []string `json:"groups,omitempty"` + // Extra information about the requesting user. + // See user.Info interface for details. + Extra map[string]certificatesv1beta1.ExtraValue `json:"extra,omitempty"` } // CertificateSigningRequestSpecApplyConfiguration constructs a declarative configuration of the CertificateSigningRequestSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequeststatus.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequeststatus.go index f82e8aed3bca9..f2de25704f3b0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequeststatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequeststatus.go @@ -21,8 +21,10 @@ package v1beta1 // CertificateSigningRequestStatusApplyConfiguration represents a declarative configuration of the CertificateSigningRequestStatus type for use // with apply. type CertificateSigningRequestStatusApplyConfiguration struct { - Conditions []CertificateSigningRequestConditionApplyConfiguration `json:"conditions,omitempty"` - Certificate []byte `json:"certificate,omitempty"` + // Conditions applied to the request, such as approval or denial. + Conditions []CertificateSigningRequestConditionApplyConfiguration `json:"conditions,omitempty"` + // If request was approved, the controller will place the issued certificate here. + Certificate []byte `json:"certificate,omitempty"` } // CertificateSigningRequestStatusApplyConfiguration constructs a declarative configuration of the CertificateSigningRequestStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/clustertrustbundle.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/clustertrustbundle.go index dc0dab1ae9e36..7f8be00ce4362 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/clustertrustbundle.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/clustertrustbundle.go @@ -29,10 +29,28 @@ import ( // ClusterTrustBundleApplyConfiguration represents a declarative configuration of the ClusterTrustBundle type for use // with apply. +// +// ClusterTrustBundle is a cluster-scoped container for X.509 trust anchors +// (root certificates). +// +// ClusterTrustBundle objects are considered to be readable by any authenticated +// user in the cluster, because they can be mounted by pods using the +// `clusterTrustBundle` projection. All service accounts have read access to +// ClusterTrustBundles by default. Users who only have namespace-level access +// to a cluster can read ClusterTrustBundles by impersonating a serviceaccount +// that they have access to. +// +// It can be optionally associated with a particular assigner, in which case it +// contains one valid set of trust anchors for that signer. Signers may have +// multiple associated ClusterTrustBundles; each is an independent set of trust +// anchors for that signer. Admission control is used to enforce that only users +// with permissions on the signer can create or modify the corresponding bundle. type ClusterTrustBundleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // metadata contains the object metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ClusterTrustBundleSpecApplyConfiguration `json:"spec,omitempty"` + // spec contains the signer (if any) and trust anchors. + Spec *ClusterTrustBundleSpecApplyConfiguration `json:"spec,omitempty"` } // ClusterTrustBundle constructs a declarative configuration of the ClusterTrustBundle type for use with @@ -45,29 +63,14 @@ func ClusterTrustBundle(name string) *ClusterTrustBundleApplyConfiguration { return b } -// ExtractClusterTrustBundle extracts the applied configuration owned by fieldManager from -// clusterTrustBundle. If no managedFields are found in clusterTrustBundle for fieldManager, a -// ClusterTrustBundleApplyConfiguration 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. +// ExtractClusterTrustBundleFrom extracts the applied configuration owned by fieldManager from +// clusterTrustBundle for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // clusterTrustBundle must be a unmodified ClusterTrustBundle API object that was retrieved from the Kubernetes API. -// ExtractClusterTrustBundle provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractClusterTrustBundleFrom 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 ExtractClusterTrustBundle(clusterTrustBundle *certificatesv1beta1.ClusterTrustBundle, fieldManager string) (*ClusterTrustBundleApplyConfiguration, error) { - return extractClusterTrustBundle(clusterTrustBundle, fieldManager, "") -} - -// ExtractClusterTrustBundleStatus is the same as ExtractClusterTrustBundle except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractClusterTrustBundleStatus(clusterTrustBundle *certificatesv1beta1.ClusterTrustBundle, fieldManager string) (*ClusterTrustBundleApplyConfiguration, error) { - return extractClusterTrustBundle(clusterTrustBundle, fieldManager, "status") -} - -func extractClusterTrustBundle(clusterTrustBundle *certificatesv1beta1.ClusterTrustBundle, fieldManager string, subresource string) (*ClusterTrustBundleApplyConfiguration, error) { +func ExtractClusterTrustBundleFrom(clusterTrustBundle *certificatesv1beta1.ClusterTrustBundle, fieldManager string, subresource string) (*ClusterTrustBundleApplyConfiguration, error) { b := &ClusterTrustBundleApplyConfiguration{} err := managedfields.ExtractInto(clusterTrustBundle, internal.Parser().Type("io.k8s.api.certificates.v1beta1.ClusterTrustBundle"), fieldManager, b, subresource) if err != nil { @@ -79,6 +82,21 @@ func extractClusterTrustBundle(clusterTrustBundle *certificatesv1beta1.ClusterTr b.WithAPIVersion("certificates.k8s.io/v1beta1") return b, nil } + +// ExtractClusterTrustBundle extracts the applied configuration owned by fieldManager from +// clusterTrustBundle. If no managedFields are found in clusterTrustBundle for fieldManager, a +// ClusterTrustBundleApplyConfiguration 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. +// clusterTrustBundle must be a unmodified ClusterTrustBundle API object that was retrieved from the Kubernetes API. +// ExtractClusterTrustBundle 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. +func ExtractClusterTrustBundle(clusterTrustBundle *certificatesv1beta1.ClusterTrustBundle, fieldManager string) (*ClusterTrustBundleApplyConfiguration, error) { + return ExtractClusterTrustBundleFrom(clusterTrustBundle, fieldManager, "") +} + func (b ClusterTrustBundleApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/clustertrustbundlespec.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/clustertrustbundlespec.go index 157a9efa840e9..a130051bb362b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/clustertrustbundlespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/clustertrustbundlespec.go @@ -20,8 +20,39 @@ package v1beta1 // ClusterTrustBundleSpecApplyConfiguration represents a declarative configuration of the ClusterTrustBundleSpec type for use // with apply. +// +// ClusterTrustBundleSpec contains the signer and trust anchors. type ClusterTrustBundleSpecApplyConfiguration struct { - SignerName *string `json:"signerName,omitempty"` + // signerName indicates the associated signer, if any. + // + // In order to create or update a ClusterTrustBundle that sets signerName, + // you must have the following cluster-scoped permission: + // group=certificates.k8s.io resource=signers resourceName= + // verb=attest. + // + // If signerName is not empty, then the ClusterTrustBundle object must be + // named with the signer name as a prefix (translating slashes to colons). + // For example, for the signer name `example.com/foo`, valid + // ClusterTrustBundle object names include `example.com:foo:abc` and + // `example.com:foo:v1`. + // + // If signerName is empty, then the ClusterTrustBundle object's name must + // not have such a prefix. + // + // List/watch requests for ClusterTrustBundles can filter on this field + // using a `spec.signerName=NAME` field selector. + SignerName *string `json:"signerName,omitempty"` + // trustBundle contains the individual X.509 trust anchors for this + // bundle, as PEM bundle of PEM-wrapped, DER-formatted X.509 certificates. + // + // The data must consist only of PEM certificate blocks that parse as valid + // X.509 certificates. Each certificate must include a basic constraints + // extension with the CA bit set. The API server will reject objects that + // contain duplicate certificates, or that use PEM block headers. + // + // Users of ClusterTrustBundles, including Kubelet, are free to reorder and + // deduplicate certificate blocks in this file according to their own logic, + // as well as to drop PEM block headers and inter-block data. TrustBundle *string `json:"trustBundle,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1/lease.go b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1/lease.go index 1918345671cf2..de18339754e9b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1/lease.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1/lease.go @@ -29,10 +29,15 @@ import ( // LeaseApplyConfiguration represents a declarative configuration of the Lease type for use // with apply. +// +// Lease defines a lease concept. type LeaseApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *LeaseSpecApplyConfiguration `json:"spec,omitempty"` + // spec contains the specification of the Lease. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *LeaseSpecApplyConfiguration `json:"spec,omitempty"` } // Lease constructs a declarative configuration of the Lease type for use with @@ -46,29 +51,14 @@ func Lease(name, namespace string) *LeaseApplyConfiguration { return b } -// ExtractLease extracts the applied configuration owned by fieldManager from -// lease. If no managedFields are found in lease for fieldManager, a -// LeaseApplyConfiguration 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. +// ExtractLeaseFrom extracts the applied configuration owned by fieldManager from +// lease for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // lease must be a unmodified Lease API object that was retrieved from the Kubernetes API. -// ExtractLease provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractLeaseFrom 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 ExtractLease(lease *coordinationv1.Lease, fieldManager string) (*LeaseApplyConfiguration, error) { - return extractLease(lease, fieldManager, "") -} - -// ExtractLeaseStatus is the same as ExtractLease except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractLeaseStatus(lease *coordinationv1.Lease, fieldManager string) (*LeaseApplyConfiguration, error) { - return extractLease(lease, fieldManager, "status") -} - -func extractLease(lease *coordinationv1.Lease, fieldManager string, subresource string) (*LeaseApplyConfiguration, error) { +func ExtractLeaseFrom(lease *coordinationv1.Lease, fieldManager string, subresource string) (*LeaseApplyConfiguration, error) { b := &LeaseApplyConfiguration{} err := managedfields.ExtractInto(lease, internal.Parser().Type("io.k8s.api.coordination.v1.Lease"), fieldManager, b, subresource) if err != nil { @@ -81,6 +71,21 @@ func extractLease(lease *coordinationv1.Lease, fieldManager string, subresource b.WithAPIVersion("coordination.k8s.io/v1") return b, nil } + +// ExtractLease extracts the applied configuration owned by fieldManager from +// lease. If no managedFields are found in lease for fieldManager, a +// LeaseApplyConfiguration 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. +// lease must be a unmodified Lease API object that was retrieved from the Kubernetes API. +// ExtractLease 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. +func ExtractLease(lease *coordinationv1.Lease, fieldManager string) (*LeaseApplyConfiguration, error) { + return ExtractLeaseFrom(lease, fieldManager, "") +} + func (b LeaseApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1/leasespec.go b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1/leasespec.go index d0099872c89bc..4dca58e2e5720 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1/leasespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1/leasespec.go @@ -25,14 +25,33 @@ import ( // LeaseSpecApplyConfiguration represents a declarative configuration of the LeaseSpec type for use // with apply. +// +// LeaseSpec is a specification of a Lease. type LeaseSpecApplyConfiguration struct { - HolderIdentity *string `json:"holderIdentity,omitempty"` - LeaseDurationSeconds *int32 `json:"leaseDurationSeconds,omitempty"` - AcquireTime *metav1.MicroTime `json:"acquireTime,omitempty"` - RenewTime *metav1.MicroTime `json:"renewTime,omitempty"` - LeaseTransitions *int32 `json:"leaseTransitions,omitempty"` - Strategy *coordinationv1.CoordinatedLeaseStrategy `json:"strategy,omitempty"` - PreferredHolder *string `json:"preferredHolder,omitempty"` + // holderIdentity contains the identity of the holder of a current lease. + // If Coordinated Leader Election is used, the holder identity must be + // equal to the elected LeaseCandidate.metadata.name field. + HolderIdentity *string `json:"holderIdentity,omitempty"` + // leaseDurationSeconds is a duration that candidates for a lease need + // to wait to force acquire it. This is measured against the time of last + // observed renewTime. + LeaseDurationSeconds *int32 `json:"leaseDurationSeconds,omitempty"` + // acquireTime is a time when the current lease was acquired. + AcquireTime *metav1.MicroTime `json:"acquireTime,omitempty"` + // renewTime is a time when the current holder of a lease has last + // updated the lease. + RenewTime *metav1.MicroTime `json:"renewTime,omitempty"` + // leaseTransitions is the number of transitions of a lease between + // holders. + LeaseTransitions *int32 `json:"leaseTransitions,omitempty"` + // Strategy indicates the strategy for picking the leader for coordinated leader election. + // If the field is not specified, there is no active coordination for this lease. + // (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled. + Strategy *coordinationv1.CoordinatedLeaseStrategy `json:"strategy,omitempty"` + // PreferredHolder signals to a lease holder that the lease has a + // more optimal holder and should be given up. + // This field can only be set if Strategy is also set. + PreferredHolder *string `json:"preferredHolder,omitempty"` } // LeaseSpecApplyConfiguration constructs a declarative configuration of the LeaseSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha2/leasecandidate.go b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha2/leasecandidate.go index e3d9b5ab68378..73150cb43a445 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha2/leasecandidate.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha2/leasecandidate.go @@ -29,10 +29,16 @@ import ( // LeaseCandidateApplyConfiguration represents a declarative configuration of the LeaseCandidate type for use // with apply. +// +// LeaseCandidate defines a candidate for a Lease object. +// Candidates are created such that coordinated leader election will pick the best leader from the list of candidates. type LeaseCandidateApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *LeaseCandidateSpecApplyConfiguration `json:"spec,omitempty"` + // spec contains the specification of the Lease. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *LeaseCandidateSpecApplyConfiguration `json:"spec,omitempty"` } // LeaseCandidate constructs a declarative configuration of the LeaseCandidate type for use with @@ -46,29 +52,14 @@ func LeaseCandidate(name, namespace string) *LeaseCandidateApplyConfiguration { return b } -// ExtractLeaseCandidate extracts the applied configuration owned by fieldManager from -// leaseCandidate. If no managedFields are found in leaseCandidate for fieldManager, a -// LeaseCandidateApplyConfiguration 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. +// ExtractLeaseCandidateFrom extracts the applied configuration owned by fieldManager from +// leaseCandidate for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // leaseCandidate must be a unmodified LeaseCandidate API object that was retrieved from the Kubernetes API. -// ExtractLeaseCandidate provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractLeaseCandidateFrom 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 ExtractLeaseCandidate(leaseCandidate *coordinationv1alpha2.LeaseCandidate, fieldManager string) (*LeaseCandidateApplyConfiguration, error) { - return extractLeaseCandidate(leaseCandidate, fieldManager, "") -} - -// ExtractLeaseCandidateStatus is the same as ExtractLeaseCandidate except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractLeaseCandidateStatus(leaseCandidate *coordinationv1alpha2.LeaseCandidate, fieldManager string) (*LeaseCandidateApplyConfiguration, error) { - return extractLeaseCandidate(leaseCandidate, fieldManager, "status") -} - -func extractLeaseCandidate(leaseCandidate *coordinationv1alpha2.LeaseCandidate, fieldManager string, subresource string) (*LeaseCandidateApplyConfiguration, error) { +func ExtractLeaseCandidateFrom(leaseCandidate *coordinationv1alpha2.LeaseCandidate, fieldManager string, subresource string) (*LeaseCandidateApplyConfiguration, error) { b := &LeaseCandidateApplyConfiguration{} err := managedfields.ExtractInto(leaseCandidate, internal.Parser().Type("io.k8s.api.coordination.v1alpha2.LeaseCandidate"), fieldManager, b, subresource) if err != nil { @@ -81,6 +72,21 @@ func extractLeaseCandidate(leaseCandidate *coordinationv1alpha2.LeaseCandidate, b.WithAPIVersion("coordination.k8s.io/v1alpha2") return b, nil } + +// ExtractLeaseCandidate extracts the applied configuration owned by fieldManager from +// leaseCandidate. If no managedFields are found in leaseCandidate for fieldManager, a +// LeaseCandidateApplyConfiguration 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. +// leaseCandidate must be a unmodified LeaseCandidate API object that was retrieved from the Kubernetes API. +// ExtractLeaseCandidate 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. +func ExtractLeaseCandidate(leaseCandidate *coordinationv1alpha2.LeaseCandidate, fieldManager string) (*LeaseCandidateApplyConfiguration, error) { + return ExtractLeaseCandidateFrom(leaseCandidate, fieldManager, "") +} + func (b LeaseCandidateApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha2/leasecandidatespec.go b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha2/leasecandidatespec.go index f52aaab24beb9..44a2db06ffa0c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha2/leasecandidatespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha2/leasecandidatespec.go @@ -25,13 +25,37 @@ import ( // LeaseCandidateSpecApplyConfiguration represents a declarative configuration of the LeaseCandidateSpec type for use // with apply. +// +// LeaseCandidateSpec is a specification of a Lease. type LeaseCandidateSpecApplyConfiguration struct { - LeaseName *string `json:"leaseName,omitempty"` - PingTime *v1.MicroTime `json:"pingTime,omitempty"` - RenewTime *v1.MicroTime `json:"renewTime,omitempty"` - BinaryVersion *string `json:"binaryVersion,omitempty"` - EmulationVersion *string `json:"emulationVersion,omitempty"` - Strategy *coordinationv1.CoordinatedLeaseStrategy `json:"strategy,omitempty"` + // LeaseName is the name of the lease for which this candidate is contending. + // This field is immutable. + LeaseName *string `json:"leaseName,omitempty"` + // PingTime is the last time that the server has requested the LeaseCandidate + // to renew. It is only done during leader election to check if any + // LeaseCandidates have become ineligible. When PingTime is updated, the + // LeaseCandidate will respond by updating RenewTime. + PingTime *v1.MicroTime `json:"pingTime,omitempty"` + // RenewTime is the time that the LeaseCandidate was last updated. + // Any time a Lease needs to do leader election, the PingTime field + // is updated to signal to the LeaseCandidate that they should update + // the RenewTime. + // Old LeaseCandidate objects are also garbage collected if it has been hours + // since the last renew. The PingTime field is updated regularly to prevent + // garbage collection for still active LeaseCandidates. + RenewTime *v1.MicroTime `json:"renewTime,omitempty"` + // BinaryVersion is the binary version. It must be in a semver format without leading `v`. + // This field is required. + BinaryVersion *string `json:"binaryVersion,omitempty"` + // EmulationVersion is the emulation version. It must be in a semver format without leading `v`. + // EmulationVersion must be less than or equal to BinaryVersion. + // This field is required when strategy is "OldestEmulationVersion" + EmulationVersion *string `json:"emulationVersion,omitempty"` + // Strategy is the strategy that coordinated leader election will use for picking the leader. + // If multiple candidates for the same Lease return different strategies, the strategy provided + // by the candidate with the latest BinaryVersion will be used. If there is still conflict, + // this is a user error and coordinated leader election will not operate the Lease until resolved. + Strategy *coordinationv1.CoordinatedLeaseStrategy `json:"strategy,omitempty"` } // LeaseCandidateSpecApplyConfiguration constructs a declarative configuration of the LeaseCandidateSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/lease.go b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/lease.go index 377d8f493a1b9..38263059a88d1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/lease.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/lease.go @@ -29,10 +29,15 @@ import ( // LeaseApplyConfiguration represents a declarative configuration of the Lease type for use // with apply. +// +// Lease defines a lease concept. type LeaseApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *LeaseSpecApplyConfiguration `json:"spec,omitempty"` + // spec contains the specification of the Lease. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *LeaseSpecApplyConfiguration `json:"spec,omitempty"` } // Lease constructs a declarative configuration of the Lease type for use with @@ -46,29 +51,14 @@ func Lease(name, namespace string) *LeaseApplyConfiguration { return b } -// ExtractLease extracts the applied configuration owned by fieldManager from -// lease. If no managedFields are found in lease for fieldManager, a -// LeaseApplyConfiguration 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. +// ExtractLeaseFrom extracts the applied configuration owned by fieldManager from +// lease for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // lease must be a unmodified Lease API object that was retrieved from the Kubernetes API. -// ExtractLease provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractLeaseFrom 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 ExtractLease(lease *coordinationv1beta1.Lease, fieldManager string) (*LeaseApplyConfiguration, error) { - return extractLease(lease, fieldManager, "") -} - -// ExtractLeaseStatus is the same as ExtractLease except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractLeaseStatus(lease *coordinationv1beta1.Lease, fieldManager string) (*LeaseApplyConfiguration, error) { - return extractLease(lease, fieldManager, "status") -} - -func extractLease(lease *coordinationv1beta1.Lease, fieldManager string, subresource string) (*LeaseApplyConfiguration, error) { +func ExtractLeaseFrom(lease *coordinationv1beta1.Lease, fieldManager string, subresource string) (*LeaseApplyConfiguration, error) { b := &LeaseApplyConfiguration{} err := managedfields.ExtractInto(lease, internal.Parser().Type("io.k8s.api.coordination.v1beta1.Lease"), fieldManager, b, subresource) if err != nil { @@ -81,6 +71,21 @@ func extractLease(lease *coordinationv1beta1.Lease, fieldManager string, subreso b.WithAPIVersion("coordination.k8s.io/v1beta1") return b, nil } + +// ExtractLease extracts the applied configuration owned by fieldManager from +// lease. If no managedFields are found in lease for fieldManager, a +// LeaseApplyConfiguration 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. +// lease must be a unmodified Lease API object that was retrieved from the Kubernetes API. +// ExtractLease 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. +func ExtractLease(lease *coordinationv1beta1.Lease, fieldManager string) (*LeaseApplyConfiguration, error) { + return ExtractLeaseFrom(lease, fieldManager, "") +} + func (b LeaseApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/leasecandidate.go b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/leasecandidate.go index 57c0c85911643..4670d9d2b9335 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/leasecandidate.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/leasecandidate.go @@ -29,10 +29,16 @@ import ( // LeaseCandidateApplyConfiguration represents a declarative configuration of the LeaseCandidate type for use // with apply. +// +// LeaseCandidate defines a candidate for a Lease object. +// Candidates are created such that coordinated leader election will pick the best leader from the list of candidates. type LeaseCandidateApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *LeaseCandidateSpecApplyConfiguration `json:"spec,omitempty"` + // spec contains the specification of the Lease. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *LeaseCandidateSpecApplyConfiguration `json:"spec,omitempty"` } // LeaseCandidate constructs a declarative configuration of the LeaseCandidate type for use with @@ -46,29 +52,14 @@ func LeaseCandidate(name, namespace string) *LeaseCandidateApplyConfiguration { return b } -// ExtractLeaseCandidate extracts the applied configuration owned by fieldManager from -// leaseCandidate. If no managedFields are found in leaseCandidate for fieldManager, a -// LeaseCandidateApplyConfiguration 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. +// ExtractLeaseCandidateFrom extracts the applied configuration owned by fieldManager from +// leaseCandidate for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // leaseCandidate must be a unmodified LeaseCandidate API object that was retrieved from the Kubernetes API. -// ExtractLeaseCandidate provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractLeaseCandidateFrom 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 ExtractLeaseCandidate(leaseCandidate *coordinationv1beta1.LeaseCandidate, fieldManager string) (*LeaseCandidateApplyConfiguration, error) { - return extractLeaseCandidate(leaseCandidate, fieldManager, "") -} - -// ExtractLeaseCandidateStatus is the same as ExtractLeaseCandidate except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractLeaseCandidateStatus(leaseCandidate *coordinationv1beta1.LeaseCandidate, fieldManager string) (*LeaseCandidateApplyConfiguration, error) { - return extractLeaseCandidate(leaseCandidate, fieldManager, "status") -} - -func extractLeaseCandidate(leaseCandidate *coordinationv1beta1.LeaseCandidate, fieldManager string, subresource string) (*LeaseCandidateApplyConfiguration, error) { +func ExtractLeaseCandidateFrom(leaseCandidate *coordinationv1beta1.LeaseCandidate, fieldManager string, subresource string) (*LeaseCandidateApplyConfiguration, error) { b := &LeaseCandidateApplyConfiguration{} err := managedfields.ExtractInto(leaseCandidate, internal.Parser().Type("io.k8s.api.coordination.v1beta1.LeaseCandidate"), fieldManager, b, subresource) if err != nil { @@ -81,6 +72,21 @@ func extractLeaseCandidate(leaseCandidate *coordinationv1beta1.LeaseCandidate, f b.WithAPIVersion("coordination.k8s.io/v1beta1") return b, nil } + +// ExtractLeaseCandidate extracts the applied configuration owned by fieldManager from +// leaseCandidate. If no managedFields are found in leaseCandidate for fieldManager, a +// LeaseCandidateApplyConfiguration 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. +// leaseCandidate must be a unmodified LeaseCandidate API object that was retrieved from the Kubernetes API. +// ExtractLeaseCandidate 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. +func ExtractLeaseCandidate(leaseCandidate *coordinationv1beta1.LeaseCandidate, fieldManager string) (*LeaseCandidateApplyConfiguration, error) { + return ExtractLeaseCandidateFrom(leaseCandidate, fieldManager, "") +} + func (b LeaseCandidateApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/leasecandidatespec.go b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/leasecandidatespec.go index c3ea12c813c5b..6b146dc494936 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/leasecandidatespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/leasecandidatespec.go @@ -25,13 +25,39 @@ import ( // LeaseCandidateSpecApplyConfiguration represents a declarative configuration of the LeaseCandidateSpec type for use // with apply. +// +// LeaseCandidateSpec is a specification of a Lease. type LeaseCandidateSpecApplyConfiguration struct { - LeaseName *string `json:"leaseName,omitempty"` - PingTime *v1.MicroTime `json:"pingTime,omitempty"` - RenewTime *v1.MicroTime `json:"renewTime,omitempty"` - BinaryVersion *string `json:"binaryVersion,omitempty"` - EmulationVersion *string `json:"emulationVersion,omitempty"` - Strategy *coordinationv1.CoordinatedLeaseStrategy `json:"strategy,omitempty"` + // LeaseName is the name of the lease for which this candidate is contending. + // The limits on this field are the same as on Lease.name. Multiple lease candidates + // may reference the same Lease.name. + // This field is immutable. + LeaseName *string `json:"leaseName,omitempty"` + // PingTime is the last time that the server has requested the LeaseCandidate + // to renew. It is only done during leader election to check if any + // LeaseCandidates have become ineligible. When PingTime is updated, the + // LeaseCandidate will respond by updating RenewTime. + PingTime *v1.MicroTime `json:"pingTime,omitempty"` + // RenewTime is the time that the LeaseCandidate was last updated. + // Any time a Lease needs to do leader election, the PingTime field + // is updated to signal to the LeaseCandidate that they should update + // the RenewTime. + // Old LeaseCandidate objects are also garbage collected if it has been hours + // since the last renew. The PingTime field is updated regularly to prevent + // garbage collection for still active LeaseCandidates. + RenewTime *v1.MicroTime `json:"renewTime,omitempty"` + // BinaryVersion is the binary version. It must be in a semver format without leading `v`. + // This field is required. + BinaryVersion *string `json:"binaryVersion,omitempty"` + // EmulationVersion is the emulation version. It must be in a semver format without leading `v`. + // EmulationVersion must be less than or equal to BinaryVersion. + // This field is required when strategy is "OldestEmulationVersion" + EmulationVersion *string `json:"emulationVersion,omitempty"` + // Strategy is the strategy that coordinated leader election will use for picking the leader. + // If multiple candidates for the same Lease return different strategies, the strategy provided + // by the candidate with the latest BinaryVersion will be used. If there is still conflict, + // this is a user error and coordinated leader election will not operate the Lease until resolved. + Strategy *coordinationv1.CoordinatedLeaseStrategy `json:"strategy,omitempty"` } // LeaseCandidateSpecApplyConfiguration constructs a declarative configuration of the LeaseCandidateSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/leasespec.go b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/leasespec.go index 8c7fddfc614b5..db40b83592b9b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/leasespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/leasespec.go @@ -25,14 +25,31 @@ import ( // LeaseSpecApplyConfiguration represents a declarative configuration of the LeaseSpec type for use // with apply. +// +// LeaseSpec is a specification of a Lease. type LeaseSpecApplyConfiguration struct { - HolderIdentity *string `json:"holderIdentity,omitempty"` - LeaseDurationSeconds *int32 `json:"leaseDurationSeconds,omitempty"` - AcquireTime *v1.MicroTime `json:"acquireTime,omitempty"` - RenewTime *v1.MicroTime `json:"renewTime,omitempty"` - LeaseTransitions *int32 `json:"leaseTransitions,omitempty"` - Strategy *coordinationv1.CoordinatedLeaseStrategy `json:"strategy,omitempty"` - PreferredHolder *string `json:"preferredHolder,omitempty"` + // holderIdentity contains the identity of the holder of a current lease. + // If Coordinated Leader Election is used, the holder identity must be + // equal to the elected LeaseCandidate.metadata.name field. + HolderIdentity *string `json:"holderIdentity,omitempty"` + // leaseDurationSeconds is a duration that candidates for a lease need + // to wait to force acquire it. This is measure against time of last + // observed renewTime. + LeaseDurationSeconds *int32 `json:"leaseDurationSeconds,omitempty"` + // acquireTime is a time when the current lease was acquired. + AcquireTime *v1.MicroTime `json:"acquireTime,omitempty"` + // renewTime is a time when the current holder of a lease has last + // updated the lease. + RenewTime *v1.MicroTime `json:"renewTime,omitempty"` + // leaseTransitions is the number of transitions of a lease between + // holders. + LeaseTransitions *int32 `json:"leaseTransitions,omitempty"` + // Strategy indicates the strategy for picking the leader for coordinated leader election + // (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled. + Strategy *coordinationv1.CoordinatedLeaseStrategy `json:"strategy,omitempty"` + // PreferredHolder signals to a lease holder that the lease has a + // more optimal holder and should be given up. + PreferredHolder *string `json:"preferredHolder,omitempty"` } // LeaseSpecApplyConfiguration constructs a declarative configuration of the LeaseSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/affinity.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/affinity.go index 45484f140dc15..6ee627b8a1856 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/affinity.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/affinity.go @@ -20,9 +20,14 @@ package v1 // AffinityApplyConfiguration represents a declarative configuration of the Affinity type for use // with apply. +// +// Affinity is a group of affinity scheduling rules. type AffinityApplyConfiguration struct { - NodeAffinity *NodeAffinityApplyConfiguration `json:"nodeAffinity,omitempty"` - PodAffinity *PodAffinityApplyConfiguration `json:"podAffinity,omitempty"` + // Describes node affinity scheduling rules for the pod. + NodeAffinity *NodeAffinityApplyConfiguration `json:"nodeAffinity,omitempty"` + // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). + PodAffinity *PodAffinityApplyConfiguration `json:"podAffinity,omitempty"` + // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). PodAntiAffinity *PodAntiAffinityApplyConfiguration `json:"podAntiAffinity,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go index 3f7de21b390e5..27a4289a7478e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go @@ -24,9 +24,20 @@ import ( // AppArmorProfileApplyConfiguration represents a declarative configuration of the AppArmorProfile type for use // with apply. +// +// AppArmorProfile defines a pod or container's AppArmor settings. type AppArmorProfileApplyConfiguration struct { - Type *corev1.AppArmorProfileType `json:"type,omitempty"` - LocalhostProfile *string `json:"localhostProfile,omitempty"` + // type indicates which kind of AppArmor profile will be applied. + // Valid options are: + // Localhost - a profile pre-loaded on the node. + // RuntimeDefault - the container runtime's default profile. + // Unconfined - no AppArmor enforcement. + Type *corev1.AppArmorProfileType `json:"type,omitempty"` + // localhostProfile indicates a profile loaded on the node that should be used. + // The profile must be preconfigured on the node to work. + // Must match the loaded name of the profile. + // Must be set if and only if type is "Localhost". + LocalhostProfile *string `json:"localhostProfile,omitempty"` } // AppArmorProfileApplyConfiguration constructs a declarative configuration of the AppArmorProfile type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/attachedvolume.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/attachedvolume.go index 2c76161a10309..a3e956290511d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/attachedvolume.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/attachedvolume.go @@ -24,9 +24,13 @@ import ( // AttachedVolumeApplyConfiguration represents a declarative configuration of the AttachedVolume type for use // with apply. +// +// AttachedVolume describes a volume attached to a node type AttachedVolumeApplyConfiguration struct { - Name *corev1.UniqueVolumeName `json:"name,omitempty"` - DevicePath *string `json:"devicePath,omitempty"` + // Name of the attached volume + Name *corev1.UniqueVolumeName `json:"name,omitempty"` + // DevicePath represents the device path where the volume should be available + DevicePath *string `json:"devicePath,omitempty"` } // AttachedVolumeApplyConfiguration constructs a declarative configuration of the AttachedVolume type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/awselasticblockstorevolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/awselasticblockstorevolumesource.go index d08786965e900..04f206f872298 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/awselasticblockstorevolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/awselasticblockstorevolumesource.go @@ -20,11 +20,31 @@ package v1 // AWSElasticBlockStoreVolumeSourceApplyConfiguration represents a declarative configuration of the AWSElasticBlockStoreVolumeSource type for use // with apply. +// +// Represents a Persistent Disk resource in AWS. +// +// An AWS EBS disk must exist before mounting to a container. The disk +// must also be in the same AWS zone as the kubelet. An AWS EBS disk +// can only be mounted as read/write once. AWS EBS volumes support +// ownership management and SELinux relabeling. type AWSElasticBlockStoreVolumeSourceApplyConfiguration struct { - VolumeID *string `json:"volumeID,omitempty"` - FSType *string `json:"fsType,omitempty"` - Partition *int32 `json:"partition,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). + // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + VolumeID *string `json:"volumeID,omitempty"` + // fsType is the filesystem type of the volume that you want to mount. + // Tip: Ensure that the filesystem type is supported by the host operating system. + // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + // TODO: how do we prevent errors in the filesystem from compromising the machine + FSType *string `json:"fsType,omitempty"` + // partition is the partition in the volume that you want to mount. + // If omitted, the default is to mount by volume name. + // Examples: For volume /dev/sda1, you specify the partition as "1". + // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + Partition *int32 `json:"partition,omitempty"` + // readOnly value true will force the readOnly setting in VolumeMounts. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + ReadOnly *bool `json:"readOnly,omitempty"` } // AWSElasticBlockStoreVolumeSourceApplyConfiguration constructs a declarative configuration of the AWSElasticBlockStoreVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/azurediskvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/azurediskvolumesource.go index d4d20dfa91b7d..bb0464262ae9f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/azurediskvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/azurediskvolumesource.go @@ -24,13 +24,24 @@ import ( // AzureDiskVolumeSourceApplyConfiguration represents a declarative configuration of the AzureDiskVolumeSource type for use // with apply. +// +// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. type AzureDiskVolumeSourceApplyConfiguration struct { - DiskName *string `json:"diskName,omitempty"` - DataDiskURI *string `json:"diskURI,omitempty"` + // diskName is the Name of the data disk in the blob storage + DiskName *string `json:"diskName,omitempty"` + // diskURI is the URI of data disk in the blob storage + DataDiskURI *string `json:"diskURI,omitempty"` + // cachingMode is the Host Caching mode: None, Read Only, Read Write. CachingMode *corev1.AzureDataDiskCachingMode `json:"cachingMode,omitempty"` - FSType *string `json:"fsType,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - Kind *corev1.AzureDataDiskKind `json:"kind,omitempty"` + // fsType is Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + FSType *string `json:"fsType,omitempty"` + // readOnly Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + ReadOnly *bool `json:"readOnly,omitempty"` + // kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared + Kind *corev1.AzureDataDiskKind `json:"kind,omitempty"` } // AzureDiskVolumeSourceApplyConfiguration constructs a declarative configuration of the AzureDiskVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/azurefilepersistentvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/azurefilepersistentvolumesource.go index 70a6b17be8831..db55eb1e6285c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/azurefilepersistentvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/azurefilepersistentvolumesource.go @@ -20,10 +20,18 @@ package v1 // AzureFilePersistentVolumeSourceApplyConfiguration represents a declarative configuration of the AzureFilePersistentVolumeSource type for use // with apply. +// +// AzureFile represents an Azure File Service mount on the host and bind mount to the pod. type AzureFilePersistentVolumeSourceApplyConfiguration struct { - SecretName *string `json:"secretName,omitempty"` - ShareName *string `json:"shareName,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // secretName is the name of secret that contains Azure Storage Account Name and Key + SecretName *string `json:"secretName,omitempty"` + // shareName is the azure Share Name + ShareName *string `json:"shareName,omitempty"` + // readOnly defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + ReadOnly *bool `json:"readOnly,omitempty"` + // secretNamespace is the namespace of the secret that contains Azure Storage Account Name and Key + // default is the same as the Pod SecretNamespace *string `json:"secretNamespace,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/azurefilevolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/azurefilevolumesource.go index ff0c867919ec2..af5c62363cb86 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/azurefilevolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/azurefilevolumesource.go @@ -20,10 +20,16 @@ package v1 // AzureFileVolumeSourceApplyConfiguration represents a declarative configuration of the AzureFileVolumeSource type for use // with apply. +// +// AzureFile represents an Azure File Service mount on the host and bind mount to the pod. type AzureFileVolumeSourceApplyConfiguration struct { + // secretName is the name of secret that contains Azure Storage Account Name and Key SecretName *string `json:"secretName,omitempty"` - ShareName *string `json:"shareName,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // shareName is the azure share Name + ShareName *string `json:"shareName,omitempty"` + // readOnly defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + ReadOnly *bool `json:"readOnly,omitempty"` } // AzureFileVolumeSourceApplyConfiguration constructs a declarative configuration of the AzureFileVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/capabilities.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/capabilities.go index e5c52b3c13724..f9f6b0e01b6e3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/capabilities.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/capabilities.go @@ -24,8 +24,12 @@ import ( // CapabilitiesApplyConfiguration represents a declarative configuration of the Capabilities type for use // with apply. +// +// Adds and removes POSIX capabilities from running containers. type CapabilitiesApplyConfiguration struct { - Add []corev1.Capability `json:"add,omitempty"` + // Added capabilities + Add []corev1.Capability `json:"add,omitempty"` + // Removed capabilities Drop []corev1.Capability `json:"drop,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cephfspersistentvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cephfspersistentvolumesource.go index f3ee2d03e9f0f..c2ce40a806a33 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cephfspersistentvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cephfspersistentvolumesource.go @@ -20,13 +20,28 @@ package v1 // CephFSPersistentVolumeSourceApplyConfiguration represents a declarative configuration of the CephFSPersistentVolumeSource type for use // with apply. +// +// Represents a Ceph Filesystem mount that lasts the lifetime of a pod +// Cephfs volumes do not support ownership management or SELinux relabeling. type CephFSPersistentVolumeSourceApplyConfiguration struct { - Monitors []string `json:"monitors,omitempty"` - Path *string `json:"path,omitempty"` - User *string `json:"user,omitempty"` - SecretFile *string `json:"secretFile,omitempty"` - SecretRef *SecretReferenceApplyConfiguration `json:"secretRef,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // monitors is Required: Monitors is a collection of Ceph monitors + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + Monitors []string `json:"monitors,omitempty"` + // path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / + Path *string `json:"path,omitempty"` + // user is Optional: User is the rados user name, default is admin + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + User *string `json:"user,omitempty"` + // secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + SecretFile *string `json:"secretFile,omitempty"` + // secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + SecretRef *SecretReferenceApplyConfiguration `json:"secretRef,omitempty"` + // readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + ReadOnly *bool `json:"readOnly,omitempty"` } // CephFSPersistentVolumeSourceApplyConfiguration constructs a declarative configuration of the CephFSPersistentVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cephfsvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cephfsvolumesource.go index 77d53d6eb0447..0ce5126ec2e09 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cephfsvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cephfsvolumesource.go @@ -20,13 +20,28 @@ package v1 // CephFSVolumeSourceApplyConfiguration represents a declarative configuration of the CephFSVolumeSource type for use // with apply. +// +// Represents a Ceph Filesystem mount that lasts the lifetime of a pod +// Cephfs volumes do not support ownership management or SELinux relabeling. type CephFSVolumeSourceApplyConfiguration struct { - Monitors []string `json:"monitors,omitempty"` - Path *string `json:"path,omitempty"` - User *string `json:"user,omitempty"` - SecretFile *string `json:"secretFile,omitempty"` - SecretRef *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // monitors is Required: Monitors is a collection of Ceph monitors + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + Monitors []string `json:"monitors,omitempty"` + // path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / + Path *string `json:"path,omitempty"` + // user is optional: User is the rados user name, default is admin + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + User *string `json:"user,omitempty"` + // secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + SecretFile *string `json:"secretFile,omitempty"` + // secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + SecretRef *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` + // readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + ReadOnly *bool `json:"readOnly,omitempty"` } // CephFSVolumeSourceApplyConfiguration constructs a declarative configuration of the CephFSVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cinderpersistentvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cinderpersistentvolumesource.go index b26573488291f..6771d87492218 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cinderpersistentvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cinderpersistentvolumesource.go @@ -20,10 +20,26 @@ package v1 // CinderPersistentVolumeSourceApplyConfiguration represents a declarative configuration of the CinderPersistentVolumeSource type for use // with apply. +// +// Represents a cinder volume resource in Openstack. +// A Cinder volume must exist before mounting to a container. +// The volume must also be in the same region as the kubelet. +// Cinder volumes support ownership management and SELinux relabeling. type CinderPersistentVolumeSourceApplyConfiguration struct { - VolumeID *string `json:"volumeID,omitempty"` - FSType *string `json:"fsType,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // volumeID used to identify the volume in cinder. + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + VolumeID *string `json:"volumeID,omitempty"` + // fsType Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + FSType *string `json:"fsType,omitempty"` + // readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + ReadOnly *bool `json:"readOnly,omitempty"` + // secretRef is Optional: points to a secret object containing parameters used to connect + // to OpenStack. SecretRef *SecretReferenceApplyConfiguration `json:"secretRef,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cindervolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cindervolumesource.go index 131cbf219c6d7..b19fcee385c46 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cindervolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/cindervolumesource.go @@ -20,10 +20,26 @@ package v1 // CinderVolumeSourceApplyConfiguration represents a declarative configuration of the CinderVolumeSource type for use // with apply. +// +// Represents a cinder volume resource in Openstack. +// A Cinder volume must exist before mounting to a container. +// The volume must also be in the same region as the kubelet. +// Cinder volumes support ownership management and SELinux relabeling. type CinderVolumeSourceApplyConfiguration struct { - VolumeID *string `json:"volumeID,omitempty"` - FSType *string `json:"fsType,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // volumeID used to identify the volume in cinder. + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + VolumeID *string `json:"volumeID,omitempty"` + // fsType is the filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + FSType *string `json:"fsType,omitempty"` + // readOnly defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + ReadOnly *bool `json:"readOnly,omitempty"` + // secretRef is optional: points to a secret object containing parameters used to connect + // to OpenStack. SecretRef *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/clientipconfig.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/clientipconfig.go index 02c4e55e1383d..3fed4e3520627 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/clientipconfig.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/clientipconfig.go @@ -20,7 +20,12 @@ package v1 // ClientIPConfigApplyConfiguration represents a declarative configuration of the ClientIPConfig type for use // with apply. +// +// ClientIPConfig represents the configurations of Client IP based session affinity. type ClientIPConfigApplyConfiguration struct { + // timeoutSeconds specifies the seconds of ClientIP type session sticky time. + // The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP". + // Default value is 10800(for 3 hours). TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/clustertrustbundleprojection.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/clustertrustbundleprojection.go index ab1c578c85863..00eec6b377bcf 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/clustertrustbundleprojection.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/clustertrustbundleprojection.go @@ -24,12 +24,31 @@ import ( // ClusterTrustBundleProjectionApplyConfiguration represents a declarative configuration of the ClusterTrustBundleProjection type for use // with apply. +// +// ClusterTrustBundleProjection describes how to select a set of +// ClusterTrustBundle objects and project their contents into the pod +// filesystem. type ClusterTrustBundleProjectionApplyConfiguration struct { - Name *string `json:"name,omitempty"` - SignerName *string `json:"signerName,omitempty"` + // Select a single ClusterTrustBundle by object name. Mutually-exclusive + // with signerName and labelSelector. + Name *string `json:"name,omitempty"` + // Select all ClusterTrustBundles that match this signer name. + // Mutually-exclusive with name. The contents of all selected + // ClusterTrustBundles will be unified and deduplicated. + SignerName *string `json:"signerName,omitempty"` + // Select all ClusterTrustBundles that match this label selector. Only has + // effect if signerName is set. Mutually-exclusive with name. If unset, + // interpreted as "match nothing". If set but empty, interpreted as "match + // everything". LabelSelector *metav1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"` - Optional *bool `json:"optional,omitempty"` - Path *string `json:"path,omitempty"` + // If true, don't block pod startup if the referenced ClusterTrustBundle(s) + // aren't available. If using name, then the named ClusterTrustBundle is + // allowed not to exist. If using signerName, then the combination of + // signerName and labelSelector is allowed to match zero + // ClusterTrustBundles. + Optional *bool `json:"optional,omitempty"` + // Relative path from the volume root to write the bundle. + Path *string `json:"path,omitempty"` } // ClusterTrustBundleProjectionApplyConfiguration constructs a declarative configuration of the ClusterTrustBundleProjection type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/componentcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/componentcondition.go index 60be6fe801173..954a7e4c75331 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/componentcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/componentcondition.go @@ -24,11 +24,21 @@ import ( // ComponentConditionApplyConfiguration represents a declarative configuration of the ComponentCondition type for use // with apply. +// +// Information about the condition of a component. type ComponentConditionApplyConfiguration struct { - Type *corev1.ComponentConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - Message *string `json:"message,omitempty"` - Error *string `json:"error,omitempty"` + // Type of condition for a component. + // Valid value: "Healthy" + Type *corev1.ComponentConditionType `json:"type,omitempty"` + // Status of the condition for a component. + // Valid values for "Healthy": "True", "False", or "Unknown". + Status *corev1.ConditionStatus `json:"status,omitempty"` + // Message about the condition for a component. + // For example, information about a health check. + Message *string `json:"message,omitempty"` + // Condition error code for a component. + // For example, a health check error code. + Error *string `json:"error,omitempty"` } // ComponentConditionApplyConfiguration constructs a declarative configuration of the ComponentCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/componentstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/componentstatus.go index 567446df87098..5b9b7f32cebd8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/componentstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/componentstatus.go @@ -29,10 +29,16 @@ import ( // ComponentStatusApplyConfiguration represents a declarative configuration of the ComponentStatus type for use // with apply. +// +// ComponentStatus (and ComponentStatusList) holds the cluster validation info. +// Deprecated: This API is deprecated in v1.19+ type ComponentStatusApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Conditions []ComponentConditionApplyConfiguration `json:"conditions,omitempty"` + // List of component conditions observed + Conditions []ComponentConditionApplyConfiguration `json:"conditions,omitempty"` } // ComponentStatus constructs a declarative configuration of the ComponentStatus type for use with @@ -45,29 +51,14 @@ func ComponentStatus(name string) *ComponentStatusApplyConfiguration { return b } -// ExtractComponentStatus extracts the applied configuration owned by fieldManager from -// componentStatus. If no managedFields are found in componentStatus for fieldManager, a -// ComponentStatusApplyConfiguration 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. +// ExtractComponentStatusFrom extracts the applied configuration owned by fieldManager from +// componentStatus for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // componentStatus must be a unmodified ComponentStatus API object that was retrieved from the Kubernetes API. -// ExtractComponentStatus provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractComponentStatusFrom 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 ExtractComponentStatus(componentStatus *corev1.ComponentStatus, fieldManager string) (*ComponentStatusApplyConfiguration, error) { - return extractComponentStatus(componentStatus, fieldManager, "") -} - -// ExtractComponentStatusStatus is the same as ExtractComponentStatus except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractComponentStatusStatus(componentStatus *corev1.ComponentStatus, fieldManager string) (*ComponentStatusApplyConfiguration, error) { - return extractComponentStatus(componentStatus, fieldManager, "status") -} - -func extractComponentStatus(componentStatus *corev1.ComponentStatus, fieldManager string, subresource string) (*ComponentStatusApplyConfiguration, error) { +func ExtractComponentStatusFrom(componentStatus *corev1.ComponentStatus, fieldManager string, subresource string) (*ComponentStatusApplyConfiguration, error) { b := &ComponentStatusApplyConfiguration{} err := managedfields.ExtractInto(componentStatus, internal.Parser().Type("io.k8s.api.core.v1.ComponentStatus"), fieldManager, b, subresource) if err != nil { @@ -79,6 +70,21 @@ func extractComponentStatus(componentStatus *corev1.ComponentStatus, fieldManage b.WithAPIVersion("v1") return b, nil } + +// ExtractComponentStatus extracts the applied configuration owned by fieldManager from +// componentStatus. If no managedFields are found in componentStatus for fieldManager, a +// ComponentStatusApplyConfiguration 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. +// componentStatus must be a unmodified ComponentStatus API object that was retrieved from the Kubernetes API. +// ExtractComponentStatus 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. +func ExtractComponentStatus(componentStatus *corev1.ComponentStatus, fieldManager string) (*ComponentStatusApplyConfiguration, error) { + return ExtractComponentStatusFrom(componentStatus, fieldManager, "") +} + func (b ComponentStatusApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmap.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmap.go index 496f7cadbeee6..d638482048a06 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmap.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmap.go @@ -29,12 +29,32 @@ import ( // ConfigMapApplyConfiguration represents a declarative configuration of the ConfigMap type for use // with apply. +// +// ConfigMap holds configuration data for pods to consume. type ConfigMapApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Immutable *bool `json:"immutable,omitempty"` - Data map[string]string `json:"data,omitempty"` - BinaryData map[string][]byte `json:"binaryData,omitempty"` + // Immutable, if set to true, ensures that data stored in the ConfigMap cannot + // be updated (only object metadata can be modified). + // If not set to true, the field can be modified at any time. + // Defaulted to nil. + Immutable *bool `json:"immutable,omitempty"` + // Data contains the configuration data. + // Each key must consist of alphanumeric characters, '-', '_' or '.'. + // Values with non-UTF-8 byte sequences must use the BinaryData field. + // The keys stored in Data must not overlap with the keys in + // the BinaryData field, this is enforced during validation process. + Data map[string]string `json:"data,omitempty"` + // BinaryData contains the binary data. + // Each key must consist of alphanumeric characters, '-', '_' or '.'. + // BinaryData can contain byte sequences that are not in the UTF-8 range. + // The keys stored in BinaryData must not overlap with the ones in + // the Data field, this is enforced during validation process. + // Using this field will require 1.10+ apiserver and + // kubelet. + BinaryData map[string][]byte `json:"binaryData,omitempty"` } // ConfigMap constructs a declarative configuration of the ConfigMap type for use with @@ -48,29 +68,14 @@ func ConfigMap(name, namespace string) *ConfigMapApplyConfiguration { return b } -// ExtractConfigMap extracts the applied configuration owned by fieldManager from -// configMap. If no managedFields are found in configMap for fieldManager, a -// ConfigMapApplyConfiguration 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. +// ExtractConfigMapFrom extracts the applied configuration owned by fieldManager from +// configMap for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // configMap must be a unmodified ConfigMap API object that was retrieved from the Kubernetes API. -// ExtractConfigMap provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractConfigMapFrom 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 ExtractConfigMap(configMap *corev1.ConfigMap, fieldManager string) (*ConfigMapApplyConfiguration, error) { - return extractConfigMap(configMap, fieldManager, "") -} - -// ExtractConfigMapStatus is the same as ExtractConfigMap except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractConfigMapStatus(configMap *corev1.ConfigMap, fieldManager string) (*ConfigMapApplyConfiguration, error) { - return extractConfigMap(configMap, fieldManager, "status") -} - -func extractConfigMap(configMap *corev1.ConfigMap, fieldManager string, subresource string) (*ConfigMapApplyConfiguration, error) { +func ExtractConfigMapFrom(configMap *corev1.ConfigMap, fieldManager string, subresource string) (*ConfigMapApplyConfiguration, error) { b := &ConfigMapApplyConfiguration{} err := managedfields.ExtractInto(configMap, internal.Parser().Type("io.k8s.api.core.v1.ConfigMap"), fieldManager, b, subresource) if err != nil { @@ -83,6 +88,21 @@ func extractConfigMap(configMap *corev1.ConfigMap, fieldManager string, subresou b.WithAPIVersion("v1") return b, nil } + +// ExtractConfigMap extracts the applied configuration owned by fieldManager from +// configMap. If no managedFields are found in configMap for fieldManager, a +// ConfigMapApplyConfiguration 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. +// configMap must be a unmodified ConfigMap API object that was retrieved from the Kubernetes API. +// ExtractConfigMap 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. +func ExtractConfigMap(configMap *corev1.ConfigMap, fieldManager string) (*ConfigMapApplyConfiguration, error) { + return ExtractConfigMapFrom(configMap, fieldManager, "") +} + func (b ConfigMapApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapenvsource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapenvsource.go index 4c0d2cbdd9df7..c2c067b2c416d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapenvsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapenvsource.go @@ -20,9 +20,17 @@ package v1 // ConfigMapEnvSourceApplyConfiguration represents a declarative configuration of the ConfigMapEnvSource type for use // with apply. +// +// ConfigMapEnvSource selects a ConfigMap to populate the environment +// variables with. +// +// The contents of the target ConfigMap's Data field will represent the +// key-value pairs as environment variables. type ConfigMapEnvSourceApplyConfiguration struct { + // The ConfigMap to select from. LocalObjectReferenceApplyConfiguration `json:",inline"` - Optional *bool `json:"optional,omitempty"` + // Specify whether the ConfigMap must be defined + Optional *bool `json:"optional,omitempty"` } // ConfigMapEnvSourceApplyConfiguration constructs a declarative configuration of the ConfigMapEnvSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapkeyselector.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapkeyselector.go index 97c0e7210aa53..415edded52864 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapkeyselector.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapkeyselector.go @@ -20,10 +20,15 @@ package v1 // ConfigMapKeySelectorApplyConfiguration represents a declarative configuration of the ConfigMapKeySelector type for use // with apply. +// +// Selects a key from a ConfigMap. type ConfigMapKeySelectorApplyConfiguration struct { + // The ConfigMap to select from. LocalObjectReferenceApplyConfiguration `json:",inline"` - Key *string `json:"key,omitempty"` - Optional *bool `json:"optional,omitempty"` + // The key to select. + Key *string `json:"key,omitempty"` + // Specify whether the ConfigMap or its key must be defined + Optional *bool `json:"optional,omitempty"` } // ConfigMapKeySelectorApplyConfiguration constructs a declarative configuration of the ConfigMapKeySelector type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapnodeconfigsource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapnodeconfigsource.go index 135bb7d427eae..4e1e227ed0528 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapnodeconfigsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapnodeconfigsource.go @@ -24,12 +24,25 @@ import ( // ConfigMapNodeConfigSourceApplyConfiguration represents a declarative configuration of the ConfigMapNodeConfigSource type for use // with apply. +// +// ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. +// This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration type ConfigMapNodeConfigSourceApplyConfiguration struct { - Namespace *string `json:"namespace,omitempty"` - Name *string `json:"name,omitempty"` - UID *types.UID `json:"uid,omitempty"` - ResourceVersion *string `json:"resourceVersion,omitempty"` - KubeletConfigKey *string `json:"kubeletConfigKey,omitempty"` + // Namespace is the metadata.namespace of the referenced ConfigMap. + // This field is required in all cases. + Namespace *string `json:"namespace,omitempty"` + // Name is the metadata.name of the referenced ConfigMap. + // This field is required in all cases. + Name *string `json:"name,omitempty"` + // UID is the metadata.UID of the referenced ConfigMap. + // This field is forbidden in Node.Spec, and required in Node.Status. + UID *types.UID `json:"uid,omitempty"` + // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. + // This field is forbidden in Node.Spec, and required in Node.Status. + ResourceVersion *string `json:"resourceVersion,omitempty"` + // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure + // This field is required in all cases. + KubeletConfigKey *string `json:"kubeletConfigKey,omitempty"` } // ConfigMapNodeConfigSourceApplyConfiguration constructs a declarative configuration of the ConfigMapNodeConfigSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapprojection.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapprojection.go index d8c5e21d3a5d8..0357ca99832f6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapprojection.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapprojection.go @@ -20,10 +20,26 @@ package v1 // ConfigMapProjectionApplyConfiguration represents a declarative configuration of the ConfigMapProjection type for use // with apply. +// +// Adapts a ConfigMap into a projected volume. +// +// The contents of the target ConfigMap's Data field will be presented in a +// projected volume as files using the keys in the Data field as the file names, +// unless the items element is populated with specific mappings of keys to paths. +// Note that this is identical to a configmap volume source without the default +// mode. type ConfigMapProjectionApplyConfiguration struct { LocalObjectReferenceApplyConfiguration `json:",inline"` - Items []KeyToPathApplyConfiguration `json:"items,omitempty"` - Optional *bool `json:"optional,omitempty"` + // items if unspecified, each key-value pair in the Data field of the referenced + // ConfigMap will be projected into the volume as a file whose name is the + // key and content is the value. If specified, the listed keys will be + // projected into the specified paths, and unlisted keys will not be + // present. If a key is specified which is not present in the ConfigMap, + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + Items []KeyToPathApplyConfiguration `json:"items,omitempty"` + // optional specify whether the ConfigMap or its keys must be defined + Optional *bool `json:"optional,omitempty"` } // ConfigMapProjectionApplyConfiguration constructs a declarative configuration of the ConfigMapProjection type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapvolumesource.go index b5f410397757f..b8a6a333f6097 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmapvolumesource.go @@ -20,11 +20,33 @@ package v1 // ConfigMapVolumeSourceApplyConfiguration represents a declarative configuration of the ConfigMapVolumeSource type for use // with apply. +// +// Adapts a ConfigMap into a volume. +// +// The contents of the target ConfigMap's Data field will be presented in a +// volume as files using the keys in the Data field as the file names, unless +// the items element is populated with specific mappings of keys to paths. +// ConfigMap volumes support ownership management and SELinux relabeling. type ConfigMapVolumeSourceApplyConfiguration struct { LocalObjectReferenceApplyConfiguration `json:",inline"` - Items []KeyToPathApplyConfiguration `json:"items,omitempty"` - DefaultMode *int32 `json:"defaultMode,omitempty"` - Optional *bool `json:"optional,omitempty"` + // items if unspecified, each key-value pair in the Data field of the referenced + // ConfigMap will be projected into the volume as a file whose name is the + // key and content is the value. If specified, the listed keys will be + // projected into the specified paths, and unlisted keys will not be + // present. If a key is specified which is not present in the ConfigMap, + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + Items []KeyToPathApplyConfiguration `json:"items,omitempty"` + // defaultMode is optional: mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // Defaults to 0644. + // Directories within the path are not affected by this setting. + // This might be in conflict with other options that affect the file + // mode, like fsGroup, and the result can be other mode bits set. + DefaultMode *int32 `json:"defaultMode,omitempty"` + // optional specify whether the ConfigMap or its keys must be defined + Optional *bool `json:"optional,omitempty"` } // ConfigMapVolumeSourceApplyConfiguration constructs a declarative configuration of the ConfigMapVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/container.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/container.go index 4694b12fa28b1..2ab4fc1edfdb9 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/container.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/container.go @@ -24,32 +24,160 @@ import ( // ContainerApplyConfiguration represents a declarative configuration of the Container type for use // with apply. +// +// A single application container that you want to run within a pod. type ContainerApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Image *string `json:"image,omitempty"` - Command []string `json:"command,omitempty"` - Args []string `json:"args,omitempty"` - WorkingDir *string `json:"workingDir,omitempty"` - Ports []ContainerPortApplyConfiguration `json:"ports,omitempty"` - EnvFrom []EnvFromSourceApplyConfiguration `json:"envFrom,omitempty"` - Env []EnvVarApplyConfiguration `json:"env,omitempty"` - Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` - ResizePolicy []ContainerResizePolicyApplyConfiguration `json:"resizePolicy,omitempty"` - RestartPolicy *corev1.ContainerRestartPolicy `json:"restartPolicy,omitempty"` - RestartPolicyRules []ContainerRestartRuleApplyConfiguration `json:"restartPolicyRules,omitempty"` - VolumeMounts []VolumeMountApplyConfiguration `json:"volumeMounts,omitempty"` - VolumeDevices []VolumeDeviceApplyConfiguration `json:"volumeDevices,omitempty"` - LivenessProbe *ProbeApplyConfiguration `json:"livenessProbe,omitempty"` - ReadinessProbe *ProbeApplyConfiguration `json:"readinessProbe,omitempty"` - StartupProbe *ProbeApplyConfiguration `json:"startupProbe,omitempty"` - Lifecycle *LifecycleApplyConfiguration `json:"lifecycle,omitempty"` - TerminationMessagePath *string `json:"terminationMessagePath,omitempty"` - TerminationMessagePolicy *corev1.TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty"` - ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"` - SecurityContext *SecurityContextApplyConfiguration `json:"securityContext,omitempty"` - Stdin *bool `json:"stdin,omitempty"` - StdinOnce *bool `json:"stdinOnce,omitempty"` - TTY *bool `json:"tty,omitempty"` + // Name of the container specified as a DNS_LABEL. + // Each container in a pod must have a unique name (DNS_LABEL). + // Cannot be updated. + Name *string `json:"name,omitempty"` + // Container image name. + // More info: https://kubernetes.io/docs/concepts/containers/images + // This field is optional to allow higher level config management to default or override + // container images in workload controllers like Deployments and StatefulSets. + Image *string `json:"image,omitempty"` + // Entrypoint array. Not executed within a shell. + // The container image's ENTRYPOINT is used if this is not provided. + // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable + // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced + // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + // produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless + // of whether the variable exists or not. Cannot be updated. + // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + Command []string `json:"command,omitempty"` + // Arguments to the entrypoint. + // The container image's CMD is used if this is not provided. + // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable + // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced + // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + // produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless + // of whether the variable exists or not. Cannot be updated. + // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + Args []string `json:"args,omitempty"` + // Container's working directory. + // If not specified, the container runtime's default will be used, which + // might be configured in the container image. + // Cannot be updated. + WorkingDir *string `json:"workingDir,omitempty"` + // List of ports to expose from the container. Not specifying a port here + // DOES NOT prevent that port from being exposed. Any port which is + // listening on the default "0.0.0.0" address inside a container will be + // accessible from the network. + // Modifying this array with strategic merge patch may corrupt the data. + // For more information See https://github.com/kubernetes/kubernetes/issues/108255. + // Cannot be updated. + Ports []ContainerPortApplyConfiguration `json:"ports,omitempty"` + // List of sources to populate environment variables in the container. + // The keys defined within a source may consist of any printable ASCII characters except '='. + // When a key exists in multiple + // sources, the value associated with the last source will take precedence. + // Values defined by an Env with a duplicate key will take precedence. + // Cannot be updated. + EnvFrom []EnvFromSourceApplyConfiguration `json:"envFrom,omitempty"` + // List of environment variables to set in the container. + // Cannot be updated. + Env []EnvVarApplyConfiguration `json:"env,omitempty"` + // Compute Resources required by this container. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` + // Resources resize policy for the container. + ResizePolicy []ContainerResizePolicyApplyConfiguration `json:"resizePolicy,omitempty"` + // RestartPolicy defines the restart behavior of individual containers in a pod. + // This overrides the pod-level restart policy. When this field is not specified, + // the restart behavior is defined by the Pod's restart policy and the container type. + // Additionally, setting the RestartPolicy as "Always" for the init container will + // have the following effect: + // this init container will be continually restarted on + // exit until all regular containers have terminated. Once all regular + // containers have completed, all init containers with restartPolicy "Always" + // will be shut down. This lifecycle differs from normal init containers and + // is often referred to as a "sidecar" container. Although this init + // container still starts in the init container sequence, it does not wait + // for the container to complete before proceeding to the next init + // container. Instead, the next init container starts immediately after this + // init container is started, or after any startupProbe has successfully + // completed. + RestartPolicy *corev1.ContainerRestartPolicy `json:"restartPolicy,omitempty"` + // Represents a list of rules to be checked to determine if the + // container should be restarted on exit. The rules are evaluated in + // order. Once a rule matches a container exit condition, the remaining + // rules are ignored. If no rule matches the container exit condition, + // the Container-level restart policy determines the whether the container + // is restarted or not. Constraints on the rules: + // - At most 20 rules are allowed. + // - Rules can have the same action. + // - Identical rules are not forbidden in validations. + // When rules are specified, container MUST set RestartPolicy explicitly + // even it if matches the Pod's RestartPolicy. + RestartPolicyRules []ContainerRestartRuleApplyConfiguration `json:"restartPolicyRules,omitempty"` + // Pod volumes to mount into the container's filesystem. + // Cannot be updated. + VolumeMounts []VolumeMountApplyConfiguration `json:"volumeMounts,omitempty"` + // volumeDevices is the list of block devices to be used by the container. + VolumeDevices []VolumeDeviceApplyConfiguration `json:"volumeDevices,omitempty"` + // Periodic probe of container liveness. + // Container will be restarted if the probe fails. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + LivenessProbe *ProbeApplyConfiguration `json:"livenessProbe,omitempty"` + // Periodic probe of container service readiness. + // Container will be removed from service endpoints if the probe fails. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + ReadinessProbe *ProbeApplyConfiguration `json:"readinessProbe,omitempty"` + // StartupProbe indicates that the Pod has successfully initialized. + // If specified, no other probes are executed until this completes successfully. + // If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + // This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + // when it might take a long time to load data or warm a cache, than during steady-state operation. + // This cannot be updated. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + StartupProbe *ProbeApplyConfiguration `json:"startupProbe,omitempty"` + // Actions that the management system should take in response to container lifecycle events. + // Cannot be updated. + Lifecycle *LifecycleApplyConfiguration `json:"lifecycle,omitempty"` + // Optional: Path at which the file to which the container's termination message + // will be written is mounted into the container's filesystem. + // Message written is intended to be brief final status, such as an assertion failure message. + // Will be truncated by the node if greater than 4096 bytes. The total message length across + // all containers will be limited to 12kb. + // Defaults to /dev/termination-log. + // Cannot be updated. + TerminationMessagePath *string `json:"terminationMessagePath,omitempty"` + // Indicate how the termination message should be populated. File will use the contents of + // terminationMessagePath to populate the container status message on both success and failure. + // FallbackToLogsOnError will use the last chunk of container log output if the termination + // message file is empty and the container exited with an error. + // The log output is limited to 2048 bytes or 80 lines, whichever is smaller. + // Defaults to File. + // Cannot be updated. + TerminationMessagePolicy *corev1.TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty"` + // Image pull policy. + // One of Always, Never, IfNotPresent. + // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images + ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"` + // SecurityContext defines the security options the container should be run with. + // If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + SecurityContext *SecurityContextApplyConfiguration `json:"securityContext,omitempty"` + // Whether this container should allocate a buffer for stdin in the container runtime. If this + // is not set, reads from stdin in the container will always result in EOF. + // Default is false. + Stdin *bool `json:"stdin,omitempty"` + // Whether the container runtime should close the stdin channel after it has been opened by + // a single attach. When stdin is true the stdin stream will remain open across multiple attach + // sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + // first client attaches to stdin, and then remains open and accepts data until the client disconnects, + // at which time stdin is closed and remains closed until the container is restarted. If this + // flag is false, a container processes that reads from stdin will never receive an EOF. + // Default is false + StdinOnce *bool `json:"stdinOnce,omitempty"` + // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + // Default is false. + TTY *bool `json:"tty,omitempty"` } // ContainerApplyConfiguration constructs a declarative configuration of the Container type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerextendedresourcerequest.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerextendedresourcerequest.go index 0b83b3824512f..9131bba6a74b2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerextendedresourcerequest.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerextendedresourcerequest.go @@ -20,10 +20,16 @@ package v1 // ContainerExtendedResourceRequestApplyConfiguration represents a declarative configuration of the ContainerExtendedResourceRequest type for use // with apply. +// +// ContainerExtendedResourceRequest has the mapping of container name, +// extended resource name to the device request name. type ContainerExtendedResourceRequestApplyConfiguration struct { + // The name of the container requesting resources. ContainerName *string `json:"containerName,omitempty"` - ResourceName *string `json:"resourceName,omitempty"` - RequestName *string `json:"requestName,omitempty"` + // The name of the extended resource in that container which gets backed by DRA. + ResourceName *string `json:"resourceName,omitempty"` + // The name of the request in the special ResourceClaim which corresponds to the extended resource. + RequestName *string `json:"requestName,omitempty"` } // ContainerExtendedResourceRequestApplyConfiguration constructs a declarative configuration of the ContainerExtendedResourceRequest type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerimage.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerimage.go index bc9428fd10ed2..1c42e73cbd988 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerimage.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerimage.go @@ -20,9 +20,14 @@ package v1 // ContainerImageApplyConfiguration represents a declarative configuration of the ContainerImage type for use // with apply. +// +// Describe a container image type ContainerImageApplyConfiguration struct { - Names []string `json:"names,omitempty"` - SizeBytes *int64 `json:"sizeBytes,omitempty"` + // Names by which this image is known. + // e.g. ["kubernetes.example/hyperkube:v1.0.7", "cloud-vendor.registry.example/cloud-vendor/hyperkube:v1.0.7"] + Names []string `json:"names,omitempty"` + // The size of the image in bytes. + SizeBytes *int64 `json:"sizeBytes,omitempty"` } // ContainerImageApplyConfiguration constructs a declarative configuration of the ContainerImage type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerport.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerport.go index 2ad47b3a9610a..2fdabaab169c6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerport.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerport.go @@ -24,12 +24,26 @@ import ( // ContainerPortApplyConfiguration represents a declarative configuration of the ContainerPort type for use // with apply. +// +// ContainerPort represents a network port in a single container. type ContainerPortApplyConfiguration struct { - Name *string `json:"name,omitempty"` - HostPort *int32 `json:"hostPort,omitempty"` - ContainerPort *int32 `json:"containerPort,omitempty"` - Protocol *corev1.Protocol `json:"protocol,omitempty"` - HostIP *string `json:"hostIP,omitempty"` + // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + // named port in a pod must have a unique name. Name for the port that can be + // referred to by services. + Name *string `json:"name,omitempty"` + // Number of port to expose on the host. + // If specified, this must be a valid port number, 0 < x < 65536. + // If HostNetwork is specified, this must match ContainerPort. + // Most containers do not need this. + HostPort *int32 `json:"hostPort,omitempty"` + // Number of port to expose on the pod's IP address. + // This must be a valid port number, 0 < x < 65536. + ContainerPort *int32 `json:"containerPort,omitempty"` + // Protocol for port. Must be UDP, TCP, or SCTP. + // Defaults to "TCP". + Protocol *corev1.Protocol `json:"protocol,omitempty"` + // What host IP to bind the external port to. + HostIP *string `json:"hostIP,omitempty"` } // ContainerPortApplyConfiguration constructs a declarative configuration of the ContainerPort type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerresizepolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerresizepolicy.go index d45dbceaf9f07..4066727fc82a1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerresizepolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerresizepolicy.go @@ -24,8 +24,14 @@ import ( // ContainerResizePolicyApplyConfiguration represents a declarative configuration of the ContainerResizePolicy type for use // with apply. +// +// ContainerResizePolicy represents resource resize policy for the container. type ContainerResizePolicyApplyConfiguration struct { - ResourceName *corev1.ResourceName `json:"resourceName,omitempty"` + // Name of the resource to which this resource resize policy applies. + // Supported values: cpu, memory. + ResourceName *corev1.ResourceName `json:"resourceName,omitempty"` + // Restart policy to apply when specified resource is resized. + // If not specified, it defaults to NotRequired. RestartPolicy *corev1.ResourceResizeRestartPolicy `json:"restartPolicy,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerrestartrule.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerrestartrule.go index 6ec09000f97f6..f44278e80dbb4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerrestartrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerrestartrule.go @@ -24,8 +24,14 @@ import ( // ContainerRestartRuleApplyConfiguration represents a declarative configuration of the ContainerRestartRule type for use // with apply. +// +// ContainerRestartRule describes how a container exit is handled. type ContainerRestartRuleApplyConfiguration struct { - Action *corev1.ContainerRestartRuleAction `json:"action,omitempty"` + // Specifies the action taken on a container exit if the requirements + // are satisfied. The only possible value is "Restart" to restart the + // container. + Action *corev1.ContainerRestartRuleAction `json:"action,omitempty"` + // Represents the exit codes to check on container exits. ExitCodes *ContainerRestartRuleOnExitCodesApplyConfiguration `json:"exitCodes,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerrestartruleonexitcodes.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerrestartruleonexitcodes.go index 6bfd9619dfae0..f0cfbaf42c535 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerrestartruleonexitcodes.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerrestartruleonexitcodes.go @@ -24,9 +24,20 @@ import ( // ContainerRestartRuleOnExitCodesApplyConfiguration represents a declarative configuration of the ContainerRestartRuleOnExitCodes type for use // with apply. +// +// ContainerRestartRuleOnExitCodes describes the condition +// for handling an exited container based on its exit codes. type ContainerRestartRuleOnExitCodesApplyConfiguration struct { + // Represents the relationship between the container exit code(s) and the + // specified values. Possible values are: + // - In: the requirement is satisfied if the container exit code is in the + // set of specified values. + // - NotIn: the requirement is satisfied if the container exit code is + // not in the set of specified values. Operator *corev1.ContainerRestartRuleOnExitCodesOperator `json:"operator,omitempty"` - Values []int32 `json:"values,omitempty"` + // Specifies the set of values to check for container exit codes. + // At most 255 elements are allowed. + Values []int32 `json:"values,omitempty"` } // ContainerRestartRuleOnExitCodesApplyConfiguration constructs a declarative configuration of the ContainerRestartRuleOnExitCodes type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstate.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstate.go index b958e0177421f..5b6cd96c6626e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstate.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstate.go @@ -20,9 +20,16 @@ package v1 // ContainerStateApplyConfiguration represents a declarative configuration of the ContainerState type for use // with apply. +// +// ContainerState holds a possible state of container. +// Only one of its members may be specified. +// If none of them is specified, the default one is ContainerStateWaiting. type ContainerStateApplyConfiguration struct { - Waiting *ContainerStateWaitingApplyConfiguration `json:"waiting,omitempty"` - Running *ContainerStateRunningApplyConfiguration `json:"running,omitempty"` + // Details about a waiting container + Waiting *ContainerStateWaitingApplyConfiguration `json:"waiting,omitempty"` + // Details about a running container + Running *ContainerStateRunningApplyConfiguration `json:"running,omitempty"` + // Details about a terminated container Terminated *ContainerStateTerminatedApplyConfiguration `json:"terminated,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstaterunning.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstaterunning.go index 0ed59c177450d..1a9d6ac07e083 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstaterunning.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstaterunning.go @@ -24,7 +24,10 @@ import ( // ContainerStateRunningApplyConfiguration represents a declarative configuration of the ContainerStateRunning type for use // with apply. +// +// ContainerStateRunning is a running state of a container. type ContainerStateRunningApplyConfiguration struct { + // Time at which the container was last (re-)started StartedAt *metav1.Time `json:"startedAt,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstateterminated.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstateterminated.go index cfadd93c99f76..63217e052b035 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstateterminated.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstateterminated.go @@ -24,14 +24,23 @@ import ( // ContainerStateTerminatedApplyConfiguration represents a declarative configuration of the ContainerStateTerminated type for use // with apply. +// +// ContainerStateTerminated is a terminated state of a container. type ContainerStateTerminatedApplyConfiguration struct { - ExitCode *int32 `json:"exitCode,omitempty"` - Signal *int32 `json:"signal,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` - StartedAt *metav1.Time `json:"startedAt,omitempty"` - FinishedAt *metav1.Time `json:"finishedAt,omitempty"` - ContainerID *string `json:"containerID,omitempty"` + // Exit status from the last termination of the container + ExitCode *int32 `json:"exitCode,omitempty"` + // Signal from the last termination of the container + Signal *int32 `json:"signal,omitempty"` + // (brief) reason from the last termination of the container + Reason *string `json:"reason,omitempty"` + // Message regarding the last termination of the container + Message *string `json:"message,omitempty"` + // Time at which previous execution of the container started + StartedAt *metav1.Time `json:"startedAt,omitempty"` + // Time at which the container last terminated + FinishedAt *metav1.Time `json:"finishedAt,omitempty"` + // Container's ID in the format '://' + ContainerID *string `json:"containerID,omitempty"` } // ContainerStateTerminatedApplyConfiguration constructs a declarative configuration of the ContainerStateTerminated type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstatewaiting.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstatewaiting.go index 7756c7da03ae4..8c99c00cf3d28 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstatewaiting.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstatewaiting.go @@ -20,8 +20,12 @@ package v1 // ContainerStateWaitingApplyConfiguration represents a declarative configuration of the ContainerStateWaiting type for use // with apply. +// +// ContainerStateWaiting is a waiting state of a container. type ContainerStateWaitingApplyConfiguration struct { - Reason *string `json:"reason,omitempty"` + // (brief) reason the container is not yet running. + Reason *string `json:"reason,omitempty"` + // Message regarding why the container is not yet running. Message *string `json:"message,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstatus.go index 8f64501bb1b8e..a2e4a3172f890 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containerstatus.go @@ -24,22 +24,70 @@ import ( // ContainerStatusApplyConfiguration represents a declarative configuration of the ContainerStatus type for use // with apply. +// +// ContainerStatus contains details for the current status of this container. type ContainerStatusApplyConfiguration struct { - Name *string `json:"name,omitempty"` - State *ContainerStateApplyConfiguration `json:"state,omitempty"` - LastTerminationState *ContainerStateApplyConfiguration `json:"lastState,omitempty"` - Ready *bool `json:"ready,omitempty"` - RestartCount *int32 `json:"restartCount,omitempty"` - Image *string `json:"image,omitempty"` - ImageID *string `json:"imageID,omitempty"` - ContainerID *string `json:"containerID,omitempty"` - Started *bool `json:"started,omitempty"` - AllocatedResources *corev1.ResourceList `json:"allocatedResources,omitempty"` - Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` - VolumeMounts []VolumeMountStatusApplyConfiguration `json:"volumeMounts,omitempty"` - User *ContainerUserApplyConfiguration `json:"user,omitempty"` - AllocatedResourcesStatus []ResourceStatusApplyConfiguration `json:"allocatedResourcesStatus,omitempty"` - StopSignal *corev1.Signal `json:"stopSignal,omitempty"` + // Name is a DNS_LABEL representing the unique name of the container. + // Each container in a pod must have a unique name across all container types. + // Cannot be updated. + Name *string `json:"name,omitempty"` + // State holds details about the container's current condition. + State *ContainerStateApplyConfiguration `json:"state,omitempty"` + // LastTerminationState holds the last termination state of the container to + // help debug container crashes and restarts. This field is not + // populated if the container is still running and RestartCount is 0. + LastTerminationState *ContainerStateApplyConfiguration `json:"lastState,omitempty"` + // Ready specifies whether the container is currently passing its readiness check. + // The value will change as readiness probes keep executing. If no readiness + // probes are specified, this field defaults to true once the container is + // fully started (see Started field). + // + // The value is typically used to determine whether a container is ready to + // accept traffic. + Ready *bool `json:"ready,omitempty"` + // RestartCount holds the number of times the container has been restarted. + // Kubelet makes an effort to always increment the value, but there + // are cases when the state may be lost due to node restarts and then the value + // may be reset to 0. The value is never negative. + RestartCount *int32 `json:"restartCount,omitempty"` + // Image is the name of container image that the container is running. + // The container image may not match the image used in the PodSpec, + // as it may have been resolved by the runtime. + // More info: https://kubernetes.io/docs/concepts/containers/images. + Image *string `json:"image,omitempty"` + // ImageID is the image ID of the container's image. The image ID may not + // match the image ID of the image used in the PodSpec, as it may have been + // resolved by the runtime. + ImageID *string `json:"imageID,omitempty"` + // ContainerID is the ID of the container in the format '://'. + // Where type is a container runtime identifier, returned from Version call of CRI API + // (for example "containerd"). + ContainerID *string `json:"containerID,omitempty"` + // Started indicates whether the container has finished its postStart lifecycle hook + // and passed its startup probe. + // Initialized as false, becomes true after startupProbe is considered + // successful. Resets to false when the container is restarted, or if kubelet + // loses state temporarily. In both cases, startup probes will run again. + // Is always true when no startupProbe is defined and container is running and + // has passed the postStart lifecycle hook. The null value must be treated the + // same as false. + Started *bool `json:"started,omitempty"` + // AllocatedResources represents the compute resources allocated for this container by the + // node. Kubelet sets this value to Container.Resources.Requests upon successful pod admission + // and after successfully admitting desired pod resize. + AllocatedResources *corev1.ResourceList `json:"allocatedResources,omitempty"` + // Resources represents the compute resource requests and limits that have been successfully + // enacted on the running container after it has been started or has been successfully resized. + Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` + // Status of volume mounts. + VolumeMounts []VolumeMountStatusApplyConfiguration `json:"volumeMounts,omitempty"` + // User represents user identity information initially attached to the first process of the container + User *ContainerUserApplyConfiguration `json:"user,omitempty"` + // AllocatedResourcesStatus represents the status of various resources + // allocated for this Pod. + AllocatedResourcesStatus []ResourceStatusApplyConfiguration `json:"allocatedResourcesStatus,omitempty"` + // StopSignal reports the effective stop signal for this container + StopSignal *corev1.Signal `json:"stopSignal,omitempty"` } // ContainerStatusApplyConfiguration constructs a declarative configuration of the ContainerStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containeruser.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containeruser.go index 34ec8e4146523..b8dcdb1115e6f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containeruser.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/containeruser.go @@ -20,7 +20,11 @@ package v1 // ContainerUserApplyConfiguration represents a declarative configuration of the ContainerUser type for use // with apply. +// +// ContainerUser represents user identity information type ContainerUserApplyConfiguration struct { + // Linux holds user identity information initially attached to the first process of the containers in Linux. + // Note that the actual running identity can be changed if the process has enough privilege to do so. Linux *LinuxContainerUserApplyConfiguration `json:"linux,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/csipersistentvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/csipersistentvolumesource.go index a614d10805b67..c71d5b3d93e9c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/csipersistentvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/csipersistentvolumesource.go @@ -20,17 +20,54 @@ package v1 // CSIPersistentVolumeSourceApplyConfiguration represents a declarative configuration of the CSIPersistentVolumeSource type for use // with apply. +// +// Represents storage that is managed by an external CSI volume driver type CSIPersistentVolumeSourceApplyConfiguration struct { - Driver *string `json:"driver,omitempty"` - VolumeHandle *string `json:"volumeHandle,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - FSType *string `json:"fsType,omitempty"` - VolumeAttributes map[string]string `json:"volumeAttributes,omitempty"` + // driver is the name of the driver to use for this volume. + // Required. + Driver *string `json:"driver,omitempty"` + // volumeHandle is the unique volume name returned by the CSI volume + // plugin’s CreateVolume to refer to the volume on all subsequent calls. + // Required. + VolumeHandle *string `json:"volumeHandle,omitempty"` + // readOnly value to pass to ControllerPublishVolumeRequest. + // Defaults to false (read/write). + ReadOnly *bool `json:"readOnly,omitempty"` + // fsType to mount. Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". + FSType *string `json:"fsType,omitempty"` + // volumeAttributes of the volume to publish. + VolumeAttributes map[string]string `json:"volumeAttributes,omitempty"` + // controllerPublishSecretRef is a reference to the secret object containing + // sensitive information to pass to the CSI driver to complete the CSI + // ControllerPublishVolume and ControllerUnpublishVolume calls. + // This field is optional, and may be empty if no secret is required. If the + // secret object contains more than one secret, all secrets are passed. ControllerPublishSecretRef *SecretReferenceApplyConfiguration `json:"controllerPublishSecretRef,omitempty"` - NodeStageSecretRef *SecretReferenceApplyConfiguration `json:"nodeStageSecretRef,omitempty"` - NodePublishSecretRef *SecretReferenceApplyConfiguration `json:"nodePublishSecretRef,omitempty"` - ControllerExpandSecretRef *SecretReferenceApplyConfiguration `json:"controllerExpandSecretRef,omitempty"` - NodeExpandSecretRef *SecretReferenceApplyConfiguration `json:"nodeExpandSecretRef,omitempty"` + // nodeStageSecretRef is a reference to the secret object containing sensitive + // information to pass to the CSI driver to complete the CSI NodeStageVolume + // and NodeStageVolume and NodeUnstageVolume calls. + // This field is optional, and may be empty if no secret is required. If the + // secret object contains more than one secret, all secrets are passed. + NodeStageSecretRef *SecretReferenceApplyConfiguration `json:"nodeStageSecretRef,omitempty"` + // nodePublishSecretRef is a reference to the secret object containing + // sensitive information to pass to the CSI driver to complete the CSI + // NodePublishVolume and NodeUnpublishVolume calls. + // This field is optional, and may be empty if no secret is required. If the + // secret object contains more than one secret, all secrets are passed. + NodePublishSecretRef *SecretReferenceApplyConfiguration `json:"nodePublishSecretRef,omitempty"` + // controllerExpandSecretRef is a reference to the secret object containing + // sensitive information to pass to the CSI driver to complete the CSI + // ControllerExpandVolume call. + // This field is optional, and may be empty if no secret is required. If the + // secret object contains more than one secret, all secrets are passed. + ControllerExpandSecretRef *SecretReferenceApplyConfiguration `json:"controllerExpandSecretRef,omitempty"` + // nodeExpandSecretRef is a reference to the secret object containing + // sensitive information to pass to the CSI driver to complete the CSI + // NodeExpandVolume call. + // This field is optional, may be omitted if no secret is required. If the + // secret object contains more than one secret, all secrets are passed. + NodeExpandSecretRef *SecretReferenceApplyConfiguration `json:"nodeExpandSecretRef,omitempty"` } // CSIPersistentVolumeSourceApplyConfiguration constructs a declarative configuration of the CSIPersistentVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/csivolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/csivolumesource.go index b58d9bbb4b592..f50ac94e5bbca 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/csivolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/csivolumesource.go @@ -20,11 +20,27 @@ package v1 // CSIVolumeSourceApplyConfiguration represents a declarative configuration of the CSIVolumeSource type for use // with apply. +// +// Represents a source location of a volume to mount, managed by an external CSI driver type CSIVolumeSourceApplyConfiguration struct { - Driver *string `json:"driver,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - FSType *string `json:"fsType,omitempty"` - VolumeAttributes map[string]string `json:"volumeAttributes,omitempty"` + // driver is the name of the CSI driver that handles this volume. + // Consult with your admin for the correct name as registered in the cluster. + Driver *string `json:"driver,omitempty"` + // readOnly specifies a read-only configuration for the volume. + // Defaults to false (read/write). + ReadOnly *bool `json:"readOnly,omitempty"` + // fsType to mount. Ex. "ext4", "xfs", "ntfs". + // If not provided, the empty value is passed to the associated CSI driver + // which will determine the default filesystem to apply. + FSType *string `json:"fsType,omitempty"` + // volumeAttributes stores driver-specific properties that are passed to the CSI + // driver. Consult your driver's documentation for supported values. + VolumeAttributes map[string]string `json:"volumeAttributes,omitempty"` + // nodePublishSecretRef is a reference to the secret object containing + // sensitive information to pass to the CSI driver to complete the CSI + // NodePublishVolume and NodeUnpublishVolume calls. + // This field is optional, and may be empty if no secret is required. If the + // secret object contains more than one secret, all secret references are passed. NodePublishSecretRef *LocalObjectReferenceApplyConfiguration `json:"nodePublishSecretRef,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/daemonendpoint.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/daemonendpoint.go index 5be27ec0c572e..4eba20326780a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/daemonendpoint.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/daemonendpoint.go @@ -20,7 +20,10 @@ package v1 // DaemonEndpointApplyConfiguration represents a declarative configuration of the DaemonEndpoint type for use // with apply. +// +// DaemonEndpoint contains information about a single Daemon endpoint. type DaemonEndpointApplyConfiguration struct { + // Port number of the given endpoint. Port *int32 `json:"Port,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/downwardapiprojection.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/downwardapiprojection.go index ed6b8b1bbe409..c5aed20a3c751 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/downwardapiprojection.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/downwardapiprojection.go @@ -20,7 +20,12 @@ package v1 // DownwardAPIProjectionApplyConfiguration represents a declarative configuration of the DownwardAPIProjection type for use // with apply. +// +// Represents downward API info for projecting into a projected volume. +// Note that this is identical to a downwardAPI volume source without the default +// mode. type DownwardAPIProjectionApplyConfiguration struct { + // Items is a list of DownwardAPIVolume file Items []DownwardAPIVolumeFileApplyConfiguration `json:"items,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/downwardapivolumefile.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/downwardapivolumefile.go index ec9d013dd9481..9028f3133cd8e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/downwardapivolumefile.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/downwardapivolumefile.go @@ -20,11 +20,23 @@ package v1 // DownwardAPIVolumeFileApplyConfiguration represents a declarative configuration of the DownwardAPIVolumeFile type for use // with apply. +// +// DownwardAPIVolumeFile represents information to create the file containing the pod field type DownwardAPIVolumeFileApplyConfiguration struct { - Path *string `json:"path,omitempty"` - FieldRef *ObjectFieldSelectorApplyConfiguration `json:"fieldRef,omitempty"` + // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' + Path *string `json:"path,omitempty"` + // Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported. + FieldRef *ObjectFieldSelectorApplyConfiguration `json:"fieldRef,omitempty"` + // Selects a resource of the container: only resources limits and requests + // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. ResourceFieldRef *ResourceFieldSelectorApplyConfiguration `json:"resourceFieldRef,omitempty"` - Mode *int32 `json:"mode,omitempty"` + // Optional: mode bits used to set permissions on this file, must be an octal value + // between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // If not specified, the volume defaultMode will be used. + // This might be in conflict with other options that affect the file + // mode, like fsGroup, and the result can be other mode bits set. + Mode *int32 `json:"mode,omitempty"` } // DownwardAPIVolumeFileApplyConfiguration constructs a declarative configuration of the DownwardAPIVolumeFile type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/downwardapivolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/downwardapivolumesource.go index eef9d7ef8d5c1..42e726689db95 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/downwardapivolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/downwardapivolumesource.go @@ -20,9 +20,21 @@ package v1 // DownwardAPIVolumeSourceApplyConfiguration represents a declarative configuration of the DownwardAPIVolumeSource type for use // with apply. +// +// DownwardAPIVolumeSource represents a volume containing downward API info. +// Downward API volumes support ownership management and SELinux relabeling. type DownwardAPIVolumeSourceApplyConfiguration struct { - Items []DownwardAPIVolumeFileApplyConfiguration `json:"items,omitempty"` - DefaultMode *int32 `json:"defaultMode,omitempty"` + // Items is a list of downward API volume file + Items []DownwardAPIVolumeFileApplyConfiguration `json:"items,omitempty"` + // Optional: mode bits to use on created files by default. Must be a + // Optional: mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // Defaults to 0644. + // Directories within the path are not affected by this setting. + // This might be in conflict with other options that affect the file + // mode, like fsGroup, and the result can be other mode bits set. + DefaultMode *int32 `json:"defaultMode,omitempty"` } // DownwardAPIVolumeSourceApplyConfiguration constructs a declarative configuration of the DownwardAPIVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/emptydirvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/emptydirvolumesource.go index 63e9f56ab712c..97f71e8d218b5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/emptydirvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/emptydirvolumesource.go @@ -25,9 +25,22 @@ import ( // EmptyDirVolumeSourceApplyConfiguration represents a declarative configuration of the EmptyDirVolumeSource type for use // with apply. +// +// Represents an empty directory for a pod. +// Empty directory volumes support ownership management and SELinux relabeling. type EmptyDirVolumeSourceApplyConfiguration struct { - Medium *corev1.StorageMedium `json:"medium,omitempty"` - SizeLimit *resource.Quantity `json:"sizeLimit,omitempty"` + // medium represents what type of storage medium should back this directory. + // The default is "" which means to use the node's default medium. + // Must be an empty string (default) or Memory. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + Medium *corev1.StorageMedium `json:"medium,omitempty"` + // sizeLimit is the total amount of local storage required for this EmptyDir volume. + // The size limit is also applicable for memory medium. + // The maximum usage on memory medium EmptyDir would be the minimum value between + // the SizeLimit specified here and the sum of memory limits of all containers in a pod. + // The default is nil which means that the limit is undefined. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + SizeLimit *resource.Quantity `json:"sizeLimit,omitempty"` } // EmptyDirVolumeSourceApplyConfiguration constructs a declarative configuration of the EmptyDirVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpointaddress.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpointaddress.go index 536e697a9a64a..b45448c92d450 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpointaddress.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpointaddress.go @@ -20,10 +20,19 @@ package v1 // EndpointAddressApplyConfiguration represents a declarative configuration of the EndpointAddress type for use // with apply. +// +// EndpointAddress is a tuple that describes single IP address. +// Deprecated: This API is deprecated in v1.33+. type EndpointAddressApplyConfiguration struct { - IP *string `json:"ip,omitempty"` - Hostname *string `json:"hostname,omitempty"` - NodeName *string `json:"nodeName,omitempty"` + // The IP of this endpoint. + // May not be loopback (127.0.0.0/8 or ::1), link-local (169.254.0.0/16 or fe80::/10), + // or link-local multicast (224.0.0.0/24 or ff02::/16). + IP *string `json:"ip,omitempty"` + // The Hostname of this endpoint + Hostname *string `json:"hostname,omitempty"` + // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. + NodeName *string `json:"nodeName,omitempty"` + // Reference to object providing the endpoint. TargetRef *ObjectReferenceApplyConfiguration `json:"targetRef,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpointport.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpointport.go index 05ee64ddca47b..8ebfdc7c8327d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpointport.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpointport.go @@ -24,11 +24,37 @@ import ( // EndpointPortApplyConfiguration represents a declarative configuration of the EndpointPort type for use // with apply. +// +// EndpointPort is a tuple that describes a single port. +// Deprecated: This API is deprecated in v1.33+. type EndpointPortApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Port *int32 `json:"port,omitempty"` - Protocol *corev1.Protocol `json:"protocol,omitempty"` - AppProtocol *string `json:"appProtocol,omitempty"` + // The name of this port. This must match the 'name' field in the + // corresponding ServicePort. + // Must be a DNS_LABEL. + // Optional only if one port is defined. + Name *string `json:"name,omitempty"` + // The port number of the endpoint. + Port *int32 `json:"port,omitempty"` + // The IP protocol for this port. + // Must be UDP, TCP, or SCTP. + // Default is TCP. + Protocol *corev1.Protocol `json:"protocol,omitempty"` + // The application protocol for this port. + // This is used as a hint for implementations to offer richer behavior for protocols that they understand. + // This field follows standard Kubernetes label syntax. + // Valid values are either: + // + // * Un-prefixed protocol names - reserved for IANA standard service names (as per + // RFC-6335 and https://www.iana.org/assignments/service-names). + // + // * Kubernetes-defined prefixed names: + // * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior- + // * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 + // * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 + // + // * Other protocols should use implementation-defined prefixed names such as + // mycompany.com/my-custom-protocol. + AppProtocol *string `json:"appProtocol,omitempty"` } // EndpointPortApplyConfiguration constructs a declarative configuration of the EndpointPort type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpoints.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpoints.go index 1cb1d40aed6b8..a13cd30e8930a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpoints.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpoints.go @@ -29,10 +29,38 @@ import ( // EndpointsApplyConfiguration represents a declarative configuration of the Endpoints type for use // with apply. +// +// Endpoints is a collection of endpoints that implement the actual service. Example: +// +// Name: "mysvc", +// Subsets: [ +// { +// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], +// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] +// }, +// { +// Addresses: [{"ip": "10.10.3.3"}], +// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] +// }, +// ] +// +// Endpoints is a legacy API and does not contain information about all Service features. +// Use discoveryv1.EndpointSlice for complete information about Service endpoints. +// +// Deprecated: This API is deprecated in v1.33+. Use discoveryv1.EndpointSlice. type EndpointsApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Subsets []EndpointSubsetApplyConfiguration `json:"subsets,omitempty"` + // The set of all endpoints is the union of all subsets. Addresses are placed into + // subsets according to the IPs they share. A single address with multiple ports, + // some of which are ready and some of which are not (because they come from + // different containers) will result in the address being displayed in different + // subsets for the different ports. No address will appear in both Addresses and + // NotReadyAddresses in the same subset. + // Sets of addresses and ports that comprise a service. + Subsets []EndpointSubsetApplyConfiguration `json:"subsets,omitempty"` } // Endpoints constructs a declarative configuration of the Endpoints type for use with @@ -46,29 +74,14 @@ func Endpoints(name, namespace string) *EndpointsApplyConfiguration { return b } -// ExtractEndpoints extracts the applied configuration owned by fieldManager from -// endpoints. If no managedFields are found in endpoints for fieldManager, a -// EndpointsApplyConfiguration 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. +// ExtractEndpointsFrom extracts the applied configuration owned by fieldManager from +// endpoints for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // endpoints must be a unmodified Endpoints API object that was retrieved from the Kubernetes API. -// ExtractEndpoints provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractEndpointsFrom 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 ExtractEndpoints(endpoints *corev1.Endpoints, fieldManager string) (*EndpointsApplyConfiguration, error) { - return extractEndpoints(endpoints, fieldManager, "") -} - -// ExtractEndpointsStatus is the same as ExtractEndpoints except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractEndpointsStatus(endpoints *corev1.Endpoints, fieldManager string) (*EndpointsApplyConfiguration, error) { - return extractEndpoints(endpoints, fieldManager, "status") -} - -func extractEndpoints(endpoints *corev1.Endpoints, fieldManager string, subresource string) (*EndpointsApplyConfiguration, error) { +func ExtractEndpointsFrom(endpoints *corev1.Endpoints, fieldManager string, subresource string) (*EndpointsApplyConfiguration, error) { b := &EndpointsApplyConfiguration{} err := managedfields.ExtractInto(endpoints, internal.Parser().Type("io.k8s.api.core.v1.Endpoints"), fieldManager, b, subresource) if err != nil { @@ -81,6 +94,21 @@ func extractEndpoints(endpoints *corev1.Endpoints, fieldManager string, subresou b.WithAPIVersion("v1") return b, nil } + +// ExtractEndpoints extracts the applied configuration owned by fieldManager from +// endpoints. If no managedFields are found in endpoints for fieldManager, a +// EndpointsApplyConfiguration 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. +// endpoints must be a unmodified Endpoints API object that was retrieved from the Kubernetes API. +// ExtractEndpoints 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. +func ExtractEndpoints(endpoints *corev1.Endpoints, fieldManager string) (*EndpointsApplyConfiguration, error) { + return ExtractEndpointsFrom(endpoints, fieldManager, "") +} + func (b EndpointsApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpointsubset.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpointsubset.go index 33cd8496a7337..de1cbafa528fe 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpointsubset.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpointsubset.go @@ -20,10 +20,32 @@ package v1 // EndpointSubsetApplyConfiguration represents a declarative configuration of the EndpointSubset type for use // with apply. +// +// EndpointSubset is a group of addresses with a common set of ports. The +// expanded set of endpoints is the Cartesian product of Addresses x Ports. +// For example, given: +// +// { +// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], +// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] +// } +// +// The resulting set of endpoints can be viewed as: +// +// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], +// b: [ 10.10.1.1:309, 10.10.2.2:309 ] +// +// Deprecated: This API is deprecated in v1.33+. type EndpointSubsetApplyConfiguration struct { - Addresses []EndpointAddressApplyConfiguration `json:"addresses,omitempty"` + // IP addresses which offer the related ports that are marked as ready. These endpoints + // should be considered safe for load balancers and clients to utilize. + Addresses []EndpointAddressApplyConfiguration `json:"addresses,omitempty"` + // IP addresses which offer the related ports but are not currently marked as ready + // because they have not yet finished starting, have recently failed a readiness check, + // or have recently failed a liveness check. NotReadyAddresses []EndpointAddressApplyConfiguration `json:"notReadyAddresses,omitempty"` - Ports []EndpointPortApplyConfiguration `json:"ports,omitempty"` + // Port numbers available on the related IP addresses. + Ports []EndpointPortApplyConfiguration `json:"ports,omitempty"` } // EndpointSubsetApplyConfiguration constructs a declarative configuration of the EndpointSubset type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/envfromsource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/envfromsource.go index 7aa181cf1a075..05e18bed4a12e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/envfromsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/envfromsource.go @@ -20,10 +20,16 @@ package v1 // EnvFromSourceApplyConfiguration represents a declarative configuration of the EnvFromSource type for use // with apply. +// +// EnvFromSource represents the source of a set of ConfigMaps or Secrets type EnvFromSourceApplyConfiguration struct { - Prefix *string `json:"prefix,omitempty"` + // Optional text to prepend to the name of each environment variable. + // May consist of any printable ASCII characters except '='. + Prefix *string `json:"prefix,omitempty"` + // The ConfigMap to select from ConfigMapRef *ConfigMapEnvSourceApplyConfiguration `json:"configMapRef,omitempty"` - SecretRef *SecretEnvSourceApplyConfiguration `json:"secretRef,omitempty"` + // The Secret to select from + SecretRef *SecretEnvSourceApplyConfiguration `json:"secretRef,omitempty"` } // EnvFromSourceApplyConfiguration constructs a declarative configuration of the EnvFromSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/envvar.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/envvar.go index 5894166ca4b39..dfde1cb6a57be 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/envvar.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/envvar.go @@ -20,9 +20,23 @@ package v1 // EnvVarApplyConfiguration represents a declarative configuration of the EnvVar type for use // with apply. +// +// EnvVar represents an environment variable present in a Container. type EnvVarApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Value *string `json:"value,omitempty"` + // Name of the environment variable. + // May consist of any printable ASCII characters except '='. + Name *string `json:"name,omitempty"` + // Variable references $(VAR_NAME) are expanded + // using the previously defined environment variables in the container and + // any service environment variables. If a variable cannot be resolved, + // the reference in the input string will be unchanged. Double $$ are reduced + // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + // "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + // Escaped references will never be expanded, regardless of whether the variable + // exists or not. + // Defaults to "". + Value *string `json:"value,omitempty"` + // Source for the environment variable's value. Cannot be used if value is not empty. ValueFrom *EnvVarSourceApplyConfiguration `json:"valueFrom,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/envvarsource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/envvarsource.go index 8705a2b642da7..84e2a661783d5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/envvarsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/envvarsource.go @@ -20,12 +20,22 @@ package v1 // EnvVarSourceApplyConfiguration represents a declarative configuration of the EnvVarSource type for use // with apply. +// +// EnvVarSource represents a source for the value of an EnvVar. type EnvVarSourceApplyConfiguration struct { - FieldRef *ObjectFieldSelectorApplyConfiguration `json:"fieldRef,omitempty"` + // Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + FieldRef *ObjectFieldSelectorApplyConfiguration `json:"fieldRef,omitempty"` + // Selects a resource of the container: only resources limits and requests + // (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. ResourceFieldRef *ResourceFieldSelectorApplyConfiguration `json:"resourceFieldRef,omitempty"` - ConfigMapKeyRef *ConfigMapKeySelectorApplyConfiguration `json:"configMapKeyRef,omitempty"` - SecretKeyRef *SecretKeySelectorApplyConfiguration `json:"secretKeyRef,omitempty"` - FileKeyRef *FileKeySelectorApplyConfiguration `json:"fileKeyRef,omitempty"` + // Selects a key of a ConfigMap. + ConfigMapKeyRef *ConfigMapKeySelectorApplyConfiguration `json:"configMapKeyRef,omitempty"` + // Selects a key of a secret in the pod's namespace + SecretKeyRef *SecretKeySelectorApplyConfiguration `json:"secretKeyRef,omitempty"` + // FileKeyRef selects a key of the env file. + // Requires the EnvFiles feature gate to be enabled. + FileKeyRef *FileKeySelectorApplyConfiguration `json:"fileKeyRef,omitempty"` } // EnvVarSourceApplyConfiguration constructs a declarative configuration of the EnvVarSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/ephemeralcontainer.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/ephemeralcontainer.go index d41c985366cdd..43d97a6eff6dd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/ephemeralcontainer.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/ephemeralcontainer.go @@ -24,9 +24,28 @@ import ( // EphemeralContainerApplyConfiguration represents a declarative configuration of the EphemeralContainer type for use // with apply. +// +// An EphemeralContainer is a temporary container that you may add to an existing Pod for +// user-initiated activities such as debugging. Ephemeral containers have no resource or +// scheduling guarantees, and they will not be restarted when they exit or when a Pod is +// removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the +// Pod to exceed its resource allocation. +// +// To add an ephemeral container, use the ephemeralcontainers subresource of an existing +// Pod. Ephemeral containers may not be removed or restarted. type EphemeralContainerApplyConfiguration struct { + // Ephemeral containers have all of the fields of Container, plus additional fields + // specific to ephemeral containers. Fields in common with Container are in the + // following inlined struct so than an EphemeralContainer may easily be converted + // to a Container. EphemeralContainerCommonApplyConfiguration `json:",inline"` - TargetContainerName *string `json:"targetContainerName,omitempty"` + // If set, the name of the container from PodSpec that this ephemeral container targets. + // The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. + // If not set then the ephemeral container uses the namespaces configured in the Pod spec. + // + // The container runtime must implement support for this feature. If the runtime does not + // support namespace targeting then the result of setting this field is undefined. + TargetContainerName *string `json:"targetContainerName,omitempty"` } // EphemeralContainerApplyConfiguration constructs a declarative configuration of the EphemeralContainer type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/ephemeralcontainercommon.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/ephemeralcontainercommon.go index cd9bf08fa698e..23ac3f08572ff 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/ephemeralcontainercommon.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/ephemeralcontainercommon.go @@ -24,32 +24,119 @@ import ( // EphemeralContainerCommonApplyConfiguration represents a declarative configuration of the EphemeralContainerCommon type for use // with apply. +// +// EphemeralContainerCommon is a copy of all fields in Container to be inlined in +// EphemeralContainer. This separate type allows easy conversion from EphemeralContainer +// to Container and allows separate documentation for the fields of EphemeralContainer. +// When a new field is added to Container it must be added here as well. type EphemeralContainerCommonApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Image *string `json:"image,omitempty"` - Command []string `json:"command,omitempty"` - Args []string `json:"args,omitempty"` - WorkingDir *string `json:"workingDir,omitempty"` - Ports []ContainerPortApplyConfiguration `json:"ports,omitempty"` - EnvFrom []EnvFromSourceApplyConfiguration `json:"envFrom,omitempty"` - Env []EnvVarApplyConfiguration `json:"env,omitempty"` - Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` - ResizePolicy []ContainerResizePolicyApplyConfiguration `json:"resizePolicy,omitempty"` - RestartPolicy *corev1.ContainerRestartPolicy `json:"restartPolicy,omitempty"` - RestartPolicyRules []ContainerRestartRuleApplyConfiguration `json:"restartPolicyRules,omitempty"` - VolumeMounts []VolumeMountApplyConfiguration `json:"volumeMounts,omitempty"` - VolumeDevices []VolumeDeviceApplyConfiguration `json:"volumeDevices,omitempty"` - LivenessProbe *ProbeApplyConfiguration `json:"livenessProbe,omitempty"` - ReadinessProbe *ProbeApplyConfiguration `json:"readinessProbe,omitempty"` - StartupProbe *ProbeApplyConfiguration `json:"startupProbe,omitempty"` - Lifecycle *LifecycleApplyConfiguration `json:"lifecycle,omitempty"` - TerminationMessagePath *string `json:"terminationMessagePath,omitempty"` - TerminationMessagePolicy *corev1.TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty"` - ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"` - SecurityContext *SecurityContextApplyConfiguration `json:"securityContext,omitempty"` - Stdin *bool `json:"stdin,omitempty"` - StdinOnce *bool `json:"stdinOnce,omitempty"` - TTY *bool `json:"tty,omitempty"` + // Name of the ephemeral container specified as a DNS_LABEL. + // This name must be unique among all containers, init containers and ephemeral containers. + Name *string `json:"name,omitempty"` + // Container image name. + // More info: https://kubernetes.io/docs/concepts/containers/images + Image *string `json:"image,omitempty"` + // Entrypoint array. Not executed within a shell. + // The image's ENTRYPOINT is used if this is not provided. + // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable + // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced + // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + // produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless + // of whether the variable exists or not. Cannot be updated. + // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + Command []string `json:"command,omitempty"` + // Arguments to the entrypoint. + // The image's CMD is used if this is not provided. + // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable + // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced + // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + // produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless + // of whether the variable exists or not. Cannot be updated. + // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + Args []string `json:"args,omitempty"` + // Container's working directory. + // If not specified, the container runtime's default will be used, which + // might be configured in the container image. + // Cannot be updated. + WorkingDir *string `json:"workingDir,omitempty"` + // Ports are not allowed for ephemeral containers. + Ports []ContainerPortApplyConfiguration `json:"ports,omitempty"` + // List of sources to populate environment variables in the container. + // The keys defined within a source may consist of any printable ASCII characters except '='. + // When a key exists in multiple + // sources, the value associated with the last source will take precedence. + // Values defined by an Env with a duplicate key will take precedence. + // Cannot be updated. + EnvFrom []EnvFromSourceApplyConfiguration `json:"envFrom,omitempty"` + // List of environment variables to set in the container. + // Cannot be updated. + Env []EnvVarApplyConfiguration `json:"env,omitempty"` + // Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources + // already allocated to the pod. + Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` + // Resources resize policy for the container. + ResizePolicy []ContainerResizePolicyApplyConfiguration `json:"resizePolicy,omitempty"` + // Restart policy for the container to manage the restart behavior of each + // container within a pod. + // You cannot set this field on ephemeral containers. + RestartPolicy *corev1.ContainerRestartPolicy `json:"restartPolicy,omitempty"` + // Represents a list of rules to be checked to determine if the + // container should be restarted on exit. You cannot set this field on + // ephemeral containers. + RestartPolicyRules []ContainerRestartRuleApplyConfiguration `json:"restartPolicyRules,omitempty"` + // Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. + // Cannot be updated. + VolumeMounts []VolumeMountApplyConfiguration `json:"volumeMounts,omitempty"` + // volumeDevices is the list of block devices to be used by the container. + VolumeDevices []VolumeDeviceApplyConfiguration `json:"volumeDevices,omitempty"` + // Probes are not allowed for ephemeral containers. + LivenessProbe *ProbeApplyConfiguration `json:"livenessProbe,omitempty"` + // Probes are not allowed for ephemeral containers. + ReadinessProbe *ProbeApplyConfiguration `json:"readinessProbe,omitempty"` + // Probes are not allowed for ephemeral containers. + StartupProbe *ProbeApplyConfiguration `json:"startupProbe,omitempty"` + // Lifecycle is not allowed for ephemeral containers. + Lifecycle *LifecycleApplyConfiguration `json:"lifecycle,omitempty"` + // Optional: Path at which the file to which the container's termination message + // will be written is mounted into the container's filesystem. + // Message written is intended to be brief final status, such as an assertion failure message. + // Will be truncated by the node if greater than 4096 bytes. The total message length across + // all containers will be limited to 12kb. + // Defaults to /dev/termination-log. + // Cannot be updated. + TerminationMessagePath *string `json:"terminationMessagePath,omitempty"` + // Indicate how the termination message should be populated. File will use the contents of + // terminationMessagePath to populate the container status message on both success and failure. + // FallbackToLogsOnError will use the last chunk of container log output if the termination + // message file is empty and the container exited with an error. + // The log output is limited to 2048 bytes or 80 lines, whichever is smaller. + // Defaults to File. + // Cannot be updated. + TerminationMessagePolicy *corev1.TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty"` + // Image pull policy. + // One of Always, Never, IfNotPresent. + // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images + ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"` + // Optional: SecurityContext defines the security options the ephemeral container should be run with. + // If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + SecurityContext *SecurityContextApplyConfiguration `json:"securityContext,omitempty"` + // Whether this container should allocate a buffer for stdin in the container runtime. If this + // is not set, reads from stdin in the container will always result in EOF. + // Default is false. + Stdin *bool `json:"stdin,omitempty"` + // Whether the container runtime should close the stdin channel after it has been opened by + // a single attach. When stdin is true the stdin stream will remain open across multiple attach + // sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + // first client attaches to stdin, and then remains open and accepts data until the client disconnects, + // at which time stdin is closed and remains closed until the container is restarted. If this + // flag is false, a container processes that reads from stdin will never receive an EOF. + // Default is false + StdinOnce *bool `json:"stdinOnce,omitempty"` + // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + // Default is false. + TTY *bool `json:"tty,omitempty"` } // EphemeralContainerCommonApplyConfiguration constructs a declarative configuration of the EphemeralContainerCommon type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/ephemeralvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/ephemeralvolumesource.go index d2c8c6722e8a3..030107b409cb4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/ephemeralvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/ephemeralvolumesource.go @@ -20,7 +20,30 @@ package v1 // EphemeralVolumeSourceApplyConfiguration represents a declarative configuration of the EphemeralVolumeSource type for use // with apply. +// +// Represents an ephemeral volume that is handled by a normal storage driver. type EphemeralVolumeSourceApplyConfiguration struct { + // Will be used to create a stand-alone PVC to provision the volume. + // The pod in which this EphemeralVolumeSource is embedded will be the + // owner of the PVC, i.e. the PVC will be deleted together with the + // pod. The name of the PVC will be `-` where + // `` is the name from the `PodSpec.Volumes` array + // entry. Pod validation will reject the pod if the concatenated name + // is not valid for a PVC (for example, too long). + // + // An existing PVC with that name that is not owned by the pod + // will *not* be used for the pod to avoid using an unrelated + // volume by mistake. Starting the pod is then blocked until + // the unrelated PVC is removed. If such a pre-created PVC is + // meant to be used by the pod, the PVC has to updated with an + // owner reference to the pod once the pod exists. Normally + // this should not be necessary, but it may be useful when + // manually reconstructing a broken cluster. + // + // This field is read-only and no changes will be made by Kubernetes + // to the PVC after it has been created. + // + // Required, must not be nil. VolumeClaimTemplate *PersistentVolumeClaimTemplateApplyConfiguration `json:"volumeClaimTemplate,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/event.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/event.go index a4f1905090e6c..676a719b2fa95 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/event.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/event.go @@ -29,23 +29,49 @@ import ( // EventApplyConfiguration represents a declarative configuration of the Event type for use // with apply. +// +// Event is a report of an event somewhere in the cluster. Events +// have a limited retention time and triggers and messages may evolve +// with time. Event consumers should not rely on the timing of an event +// with a given Reason reflecting a consistent underlying trigger, or the +// continued existence of events with that Reason. Events should be +// treated as informative, best-effort, supplemental data. type EventApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - InvolvedObject *ObjectReferenceApplyConfiguration `json:"involvedObject,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` - Source *EventSourceApplyConfiguration `json:"source,omitempty"` - FirstTimestamp *apismetav1.Time `json:"firstTimestamp,omitempty"` - LastTimestamp *apismetav1.Time `json:"lastTimestamp,omitempty"` - Count *int32 `json:"count,omitempty"` - Type *string `json:"type,omitempty"` - EventTime *apismetav1.MicroTime `json:"eventTime,omitempty"` - Series *EventSeriesApplyConfiguration `json:"series,omitempty"` - Action *string `json:"action,omitempty"` - Related *ObjectReferenceApplyConfiguration `json:"related,omitempty"` - ReportingController *string `json:"reportingComponent,omitempty"` - ReportingInstance *string `json:"reportingInstance,omitempty"` + // The object that this event is about. + InvolvedObject *ObjectReferenceApplyConfiguration `json:"involvedObject,omitempty"` + // This should be a short, machine understandable string that gives the reason + // for the transition into the object's current status. + // TODO: provide exact specification for format. + Reason *string `json:"reason,omitempty"` + // A human-readable description of the status of this operation. + // TODO: decide on maximum length. + Message *string `json:"message,omitempty"` + // The component reporting this event. Should be a short machine understandable string. + Source *EventSourceApplyConfiguration `json:"source,omitempty"` + // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) + FirstTimestamp *apismetav1.Time `json:"firstTimestamp,omitempty"` + // The time at which the most recent occurrence of this event was recorded. + LastTimestamp *apismetav1.Time `json:"lastTimestamp,omitempty"` + // The number of times this event has occurred. + Count *int32 `json:"count,omitempty"` + // Type of this event (Normal, Warning), new types could be added in the future + Type *string `json:"type,omitempty"` + // Time when this Event was first observed. + EventTime *apismetav1.MicroTime `json:"eventTime,omitempty"` + // Data about the Event series this event represents or nil if it's a singleton Event. + Series *EventSeriesApplyConfiguration `json:"series,omitempty"` + // What action was taken/failed regarding to the Regarding object. + Action *string `json:"action,omitempty"` + // Optional secondary object for more complex actions. + Related *ObjectReferenceApplyConfiguration `json:"related,omitempty"` + // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. + ReportingController *string `json:"reportingComponent,omitempty"` + // ID of the controller instance, e.g. `kubelet-xyzf`. + ReportingInstance *string `json:"reportingInstance,omitempty"` } // Event constructs a declarative configuration of the Event type for use with @@ -59,29 +85,14 @@ func Event(name, namespace string) *EventApplyConfiguration { return b } -// ExtractEvent extracts the applied configuration owned by fieldManager from -// event. If no managedFields are found in event for fieldManager, a -// EventApplyConfiguration 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. +// ExtractEventFrom extracts the applied configuration owned by fieldManager from +// event for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // event must be a unmodified Event API object that was retrieved from the Kubernetes API. -// ExtractEvent provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractEventFrom 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 ExtractEvent(event *corev1.Event, fieldManager string) (*EventApplyConfiguration, error) { - return extractEvent(event, fieldManager, "") -} - -// ExtractEventStatus is the same as ExtractEvent except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractEventStatus(event *corev1.Event, fieldManager string) (*EventApplyConfiguration, error) { - return extractEvent(event, fieldManager, "status") -} - -func extractEvent(event *corev1.Event, fieldManager string, subresource string) (*EventApplyConfiguration, error) { +func ExtractEventFrom(event *corev1.Event, fieldManager string, subresource string) (*EventApplyConfiguration, error) { b := &EventApplyConfiguration{} err := managedfields.ExtractInto(event, internal.Parser().Type("io.k8s.api.core.v1.Event"), fieldManager, b, subresource) if err != nil { @@ -94,6 +105,21 @@ func extractEvent(event *corev1.Event, fieldManager string, subresource string) b.WithAPIVersion("v1") return b, nil } + +// ExtractEvent extracts the applied configuration owned by fieldManager from +// event. If no managedFields are found in event for fieldManager, a +// EventApplyConfiguration 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. +// event must be a unmodified Event API object that was retrieved from the Kubernetes API. +// ExtractEvent 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. +func ExtractEvent(event *corev1.Event, fieldManager string) (*EventApplyConfiguration, error) { + return ExtractEventFrom(event, fieldManager, "") +} + func (b EventApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/eventseries.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/eventseries.go index c90954bccbd8b..fdaa06b655e51 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/eventseries.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/eventseries.go @@ -24,8 +24,13 @@ import ( // EventSeriesApplyConfiguration represents a declarative configuration of the EventSeries type for use // with apply. +// +// EventSeries contain information on series of events, i.e. thing that was/is happening +// continuously for some time. type EventSeriesApplyConfiguration struct { - Count *int32 `json:"count,omitempty"` + // Number of occurrences in this series up to the last heartbeat time + Count *int32 `json:"count,omitempty"` + // Time of the last occurrence observed LastObservedTime *metav1.MicroTime `json:"lastObservedTime,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/eventsource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/eventsource.go index 97edb049310a2..10ca1db8df589 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/eventsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/eventsource.go @@ -20,9 +20,13 @@ package v1 // EventSourceApplyConfiguration represents a declarative configuration of the EventSource type for use // with apply. +// +// EventSource contains information for an event. type EventSourceApplyConfiguration struct { + // Component from which the event is generated. Component *string `json:"component,omitempty"` - Host *string `json:"host,omitempty"` + // Node name on which the event is generated. + Host *string `json:"host,omitempty"` } // EventSourceApplyConfiguration constructs a declarative configuration of the EventSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/execaction.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/execaction.go index b7208a91cfe87..de3e85900f65d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/execaction.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/execaction.go @@ -20,7 +20,14 @@ package v1 // ExecActionApplyConfiguration represents a declarative configuration of the ExecAction type for use // with apply. +// +// ExecAction describes a "run in container" action. type ExecActionApplyConfiguration struct { + // Command is the command line to execute inside the container, the working directory for the + // command is root ('/') in the container's filesystem. The command is simply exec'd, it is + // not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + // a shell, you need to explicitly call out to that shell. + // Exit status of 0 is treated as live/healthy and non-zero is unhealthy. Command []string `json:"command,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/fcvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/fcvolumesource.go index 000ff2cc62d81..f77f82f990610 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/fcvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/fcvolumesource.go @@ -20,12 +20,26 @@ package v1 // FCVolumeSourceApplyConfiguration represents a declarative configuration of the FCVolumeSource type for use // with apply. +// +// Represents a Fibre Channel volume. +// Fibre Channel volumes can only be mounted as read/write once. +// Fibre Channel volumes support ownership management and SELinux relabeling. type FCVolumeSourceApplyConfiguration struct { + // targetWWNs is Optional: FC target worldwide names (WWNs) TargetWWNs []string `json:"targetWWNs,omitempty"` - Lun *int32 `json:"lun,omitempty"` - FSType *string `json:"fsType,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - WWIDs []string `json:"wwids,omitempty"` + // lun is Optional: FC target lun number + Lun *int32 `json:"lun,omitempty"` + // fsType is the filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // TODO: how do we prevent errors in the filesystem from compromising the machine + FSType *string `json:"fsType,omitempty"` + // readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + ReadOnly *bool `json:"readOnly,omitempty"` + // wwids Optional: FC volume world wide identifiers (wwids) + // Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. + WWIDs []string `json:"wwids,omitempty"` } // FCVolumeSourceApplyConfiguration constructs a declarative configuration of the FCVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/filekeyselector.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/filekeyselector.go index d543e12001d6c..7c1f21282146b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/filekeyselector.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/filekeyselector.go @@ -20,11 +20,26 @@ package v1 // FileKeySelectorApplyConfiguration represents a declarative configuration of the FileKeySelector type for use // with apply. +// +// FileKeySelector selects a key of the env file. type FileKeySelectorApplyConfiguration struct { + // The name of the volume mount containing the env file. VolumeName *string `json:"volumeName,omitempty"` - Path *string `json:"path,omitempty"` - Key *string `json:"key,omitempty"` - Optional *bool `json:"optional,omitempty"` + // The path within the volume from which to select the file. + // Must be relative and may not contain the '..' path or start with '..'. + Path *string `json:"path,omitempty"` + // The key within the env file. An invalid key will prevent the pod from starting. + // The keys defined within a source may consist of any printable ASCII characters except '='. + // During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + Key *string `json:"key,omitempty"` + // Specify whether the file or its key must be defined. If the file or key + // does not exist, then the env var is not published. + // If optional is set to true and the specified key does not exist, + // the environment variable will not be set in the Pod's containers. + // + // If optional is set to false and the specified key does not exist, + // an error will be returned during Pod creation. + Optional *bool `json:"optional,omitempty"` } // FileKeySelectorApplyConfiguration constructs a declarative configuration of the FileKeySelector type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/flexpersistentvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/flexpersistentvolumesource.go index 355c2c82d0739..a1a57bb7adffb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/flexpersistentvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/flexpersistentvolumesource.go @@ -20,12 +20,27 @@ package v1 // FlexPersistentVolumeSourceApplyConfiguration represents a declarative configuration of the FlexPersistentVolumeSource type for use // with apply. +// +// FlexPersistentVolumeSource represents a generic persistent volume resource that is +// provisioned/attached using an exec based plugin. type FlexPersistentVolumeSourceApplyConfiguration struct { - Driver *string `json:"driver,omitempty"` - FSType *string `json:"fsType,omitempty"` + // driver is the name of the driver to use for this volume. + Driver *string `json:"driver,omitempty"` + // fsType is the Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + FSType *string `json:"fsType,omitempty"` + // secretRef is Optional: SecretRef is reference to the secret object containing + // sensitive information to pass to the plugin scripts. This may be + // empty if no secret object is specified. If the secret object + // contains more than one secret, all secrets are passed to the plugin + // scripts. SecretRef *SecretReferenceApplyConfiguration `json:"secretRef,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - Options map[string]string `json:"options,omitempty"` + // readOnly is Optional: defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + ReadOnly *bool `json:"readOnly,omitempty"` + // options is Optional: this field holds extra command options if any. + Options map[string]string `json:"options,omitempty"` } // FlexPersistentVolumeSourceApplyConfiguration constructs a declarative configuration of the FlexPersistentVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/flexvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/flexvolumesource.go index 08ae9e1bead04..e9fc295034327 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/flexvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/flexvolumesource.go @@ -20,12 +20,27 @@ package v1 // FlexVolumeSourceApplyConfiguration represents a declarative configuration of the FlexVolumeSource type for use // with apply. +// +// FlexVolume represents a generic volume resource that is +// provisioned/attached using an exec based plugin. type FlexVolumeSourceApplyConfiguration struct { - Driver *string `json:"driver,omitempty"` - FSType *string `json:"fsType,omitempty"` + // driver is the name of the driver to use for this volume. + Driver *string `json:"driver,omitempty"` + // fsType is the filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + FSType *string `json:"fsType,omitempty"` + // secretRef is Optional: secretRef is reference to the secret object containing + // sensitive information to pass to the plugin scripts. This may be + // empty if no secret object is specified. If the secret object + // contains more than one secret, all secrets are passed to the plugin + // scripts. SecretRef *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - Options map[string]string `json:"options,omitempty"` + // readOnly is Optional: defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + ReadOnly *bool `json:"readOnly,omitempty"` + // options is Optional: this field holds extra command options if any. + Options map[string]string `json:"options,omitempty"` } // FlexVolumeSourceApplyConfiguration constructs a declarative configuration of the FlexVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/flockervolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/flockervolumesource.go index e4ecbba0e48c3..452105d987250 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/flockervolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/flockervolumesource.go @@ -20,8 +20,15 @@ package v1 // FlockerVolumeSourceApplyConfiguration represents a declarative configuration of the FlockerVolumeSource type for use // with apply. +// +// Represents a Flocker volume mounted by the Flocker agent. +// One and only one of datasetName and datasetUUID should be set. +// Flocker volumes do not support ownership management or SELinux relabeling. type FlockerVolumeSourceApplyConfiguration struct { + // datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker + // should be considered as deprecated DatasetName *string `json:"datasetName,omitempty"` + // datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset DatasetUUID *string `json:"datasetUUID,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/gcepersistentdiskvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/gcepersistentdiskvolumesource.go index 56c4d03fa2147..5283c30a2f5d3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/gcepersistentdiskvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/gcepersistentdiskvolumesource.go @@ -20,11 +20,33 @@ package v1 // GCEPersistentDiskVolumeSourceApplyConfiguration represents a declarative configuration of the GCEPersistentDiskVolumeSource type for use // with apply. +// +// Represents a Persistent Disk resource in Google Compute Engine. +// +// A GCE PD must exist before mounting to a container. The disk must +// also be in the same GCE project and zone as the kubelet. A GCE PD +// can only be mounted as read/write once or read-only many times. GCE +// PDs support ownership management and SELinux relabeling. type GCEPersistentDiskVolumeSourceApplyConfiguration struct { - PDName *string `json:"pdName,omitempty"` - FSType *string `json:"fsType,omitempty"` - Partition *int32 `json:"partition,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + PDName *string `json:"pdName,omitempty"` + // fsType is filesystem type of the volume that you want to mount. + // Tip: Ensure that the filesystem type is supported by the host operating system. + // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + // TODO: how do we prevent errors in the filesystem from compromising the machine + FSType *string `json:"fsType,omitempty"` + // partition is the partition in the volume that you want to mount. + // If omitted, the default is to mount by volume name. + // Examples: For volume /dev/sda1, you specify the partition as "1". + // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + Partition *int32 `json:"partition,omitempty"` + // readOnly here will force the ReadOnly setting in VolumeMounts. + // Defaults to false. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + ReadOnly *bool `json:"readOnly,omitempty"` } // GCEPersistentDiskVolumeSourceApplyConfiguration constructs a declarative configuration of the GCEPersistentDiskVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/gitrepovolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/gitrepovolumesource.go index 4ed92317c871b..37977d0f51b6b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/gitrepovolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/gitrepovolumesource.go @@ -20,10 +20,24 @@ package v1 // GitRepoVolumeSourceApplyConfiguration represents a declarative configuration of the GitRepoVolumeSource type for use // with apply. +// +// Represents a volume that is populated with the contents of a git repository. +// Git repo volumes do not support ownership management. +// Git repo volumes support SELinux relabeling. +// +// DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an +// EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir +// into the Pod's container. type GitRepoVolumeSourceApplyConfiguration struct { + // repository is the URL Repository *string `json:"repository,omitempty"` - Revision *string `json:"revision,omitempty"` - Directory *string `json:"directory,omitempty"` + // revision is the commit hash for the specified revision. + Revision *string `json:"revision,omitempty"` + // directory is the target directory name. + // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the + // git repository. Otherwise, if specified, the volume will contain the git repository in + // the subdirectory with the given name. + Directory *string `json:"directory,omitempty"` } // GitRepoVolumeSourceApplyConfiguration constructs a declarative configuration of the GitRepoVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/glusterfspersistentvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/glusterfspersistentvolumesource.go index c9a23ca5d7405..bd53ab409a767 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/glusterfspersistentvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/glusterfspersistentvolumesource.go @@ -20,10 +20,23 @@ package v1 // GlusterfsPersistentVolumeSourceApplyConfiguration represents a declarative configuration of the GlusterfsPersistentVolumeSource type for use // with apply. +// +// Represents a Glusterfs mount that lasts the lifetime of a pod. +// Glusterfs volumes do not support ownership management or SELinux relabeling. type GlusterfsPersistentVolumeSourceApplyConfiguration struct { - EndpointsName *string `json:"endpoints,omitempty"` - Path *string `json:"path,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // endpoints is the endpoint name that details Glusterfs topology. + // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + EndpointsName *string `json:"endpoints,omitempty"` + // path is the Glusterfs volume path. + // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + Path *string `json:"path,omitempty"` + // readOnly here will force the Glusterfs volume to be mounted with read-only permissions. + // Defaults to false. + // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + ReadOnly *bool `json:"readOnly,omitempty"` + // endpointsNamespace is the namespace that contains Glusterfs endpoint. + // If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. + // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod EndpointsNamespace *string `json:"endpointsNamespace,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/glusterfsvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/glusterfsvolumesource.go index 8c27f8c70d1c8..f558c152b73a7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/glusterfsvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/glusterfsvolumesource.go @@ -20,10 +20,19 @@ package v1 // GlusterfsVolumeSourceApplyConfiguration represents a declarative configuration of the GlusterfsVolumeSource type for use // with apply. +// +// Represents a Glusterfs mount that lasts the lifetime of a pod. +// Glusterfs volumes do not support ownership management or SELinux relabeling. type GlusterfsVolumeSourceApplyConfiguration struct { + // endpoints is the endpoint name that details Glusterfs topology. EndpointsName *string `json:"endpoints,omitempty"` - Path *string `json:"path,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // path is the Glusterfs volume path. + // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + Path *string `json:"path,omitempty"` + // readOnly here will force the Glusterfs volume to be mounted with read-only permissions. + // Defaults to false. + // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + ReadOnly *bool `json:"readOnly,omitempty"` } // GlusterfsVolumeSourceApplyConfiguration constructs a declarative configuration of the GlusterfsVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/grpcaction.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/grpcaction.go index 0f3a886714db6..40f5f9ecfd02c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/grpcaction.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/grpcaction.go @@ -20,8 +20,15 @@ package v1 // GRPCActionApplyConfiguration represents a declarative configuration of the GRPCAction type for use // with apply. +// +// GRPCAction specifies an action involving a GRPC service. type GRPCActionApplyConfiguration struct { - Port *int32 `json:"port,omitempty"` + // Port number of the gRPC service. Number must be in the range 1 to 65535. + Port *int32 `json:"port,omitempty"` + // Service is the name of the service to place in the gRPC HealthCheckRequest + // (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + // + // If this is not specified, the default behavior is defined by gRPC. Service *string `json:"service,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/hostalias.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/hostalias.go index ec9ea1741376b..687c1eb92f261 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/hostalias.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/hostalias.go @@ -20,8 +20,13 @@ package v1 // HostAliasApplyConfiguration represents a declarative configuration of the HostAlias type for use // with apply. +// +// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the +// pod's hosts file. type HostAliasApplyConfiguration struct { - IP *string `json:"ip,omitempty"` + // IP address of the host file entry. + IP *string `json:"ip,omitempty"` + // Hostnames for the above IP address. Hostnames []string `json:"hostnames,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/hostip.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/hostip.go index 439b5ce2d6b07..eeb30f9e984c2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/hostip.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/hostip.go @@ -20,7 +20,10 @@ package v1 // HostIPApplyConfiguration represents a declarative configuration of the HostIP type for use // with apply. +// +// HostIP represents a single IP address allocated to the host. type HostIPApplyConfiguration struct { + // IP is the IP address assigned to the host IP *string `json:"ip,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/hostpathvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/hostpathvolumesource.go index 6a41d67cd06fd..a69e71e1e3bb2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/hostpathvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/hostpathvolumesource.go @@ -24,8 +24,17 @@ import ( // HostPathVolumeSourceApplyConfiguration represents a declarative configuration of the HostPathVolumeSource type for use // with apply. +// +// Represents a host path mapped into a pod. +// Host path volumes do not support ownership management or SELinux relabeling. type HostPathVolumeSourceApplyConfiguration struct { - Path *string `json:"path,omitempty"` + // 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 + Path *string `json:"path,omitempty"` + // type for HostPath Volume + // Defaults to "" + // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath Type *corev1.HostPathType `json:"type,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/httpgetaction.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/httpgetaction.go index ca61c5ae244ad..3f892c752d323 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/httpgetaction.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/httpgetaction.go @@ -25,11 +25,22 @@ import ( // HTTPGetActionApplyConfiguration represents a declarative configuration of the HTTPGetAction type for use // with apply. +// +// HTTPGetAction describes an action based on HTTP Get requests. type HTTPGetActionApplyConfiguration struct { - Path *string `json:"path,omitempty"` - Port *intstr.IntOrString `json:"port,omitempty"` - Host *string `json:"host,omitempty"` - Scheme *corev1.URIScheme `json:"scheme,omitempty"` + // Path to access on the HTTP server. + Path *string `json:"path,omitempty"` + // Name or number of the port to access on the container. + // Number must be in the range 1 to 65535. + // Name must be an IANA_SVC_NAME. + Port *intstr.IntOrString `json:"port,omitempty"` + // Host name to connect to, defaults to the pod IP. You probably want to set + // "Host" in httpHeaders instead. + Host *string `json:"host,omitempty"` + // Scheme to use for connecting to the host. + // Defaults to HTTP. + Scheme *corev1.URIScheme `json:"scheme,omitempty"` + // Custom headers to set in the request. HTTP allows repeated headers. HTTPHeaders []HTTPHeaderApplyConfiguration `json:"httpHeaders,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/httpheader.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/httpheader.go index 2526371669941..c62c85bad3921 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/httpheader.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/httpheader.go @@ -20,8 +20,13 @@ package v1 // HTTPHeaderApplyConfiguration represents a declarative configuration of the HTTPHeader type for use // with apply. +// +// HTTPHeader describes a custom header to be used in HTTP probes type HTTPHeaderApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // The header field name. + // This will be canonicalized upon output, so case-variant names will be understood as the same header. + Name *string `json:"name,omitempty"` + // The header field value Value *string `json:"value,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/imagevolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/imagevolumesource.go index 9a146e68526f0..90109d49b06f0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/imagevolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/imagevolumesource.go @@ -24,8 +24,21 @@ import ( // ImageVolumeSourceApplyConfiguration represents a declarative configuration of the ImageVolumeSource type for use // with apply. +// +// ImageVolumeSource represents a image volume resource. type ImageVolumeSourceApplyConfiguration struct { - Reference *string `json:"reference,omitempty"` + // Required: Image or artifact reference to be used. + // Behaves in the same way as pod.spec.containers[*].image. + // Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. + // More info: https://kubernetes.io/docs/concepts/containers/images + // This field is optional to allow higher level config management to default or override + // container images in workload controllers like Deployments and StatefulSets. + Reference *string `json:"reference,omitempty"` + // Policy for pulling OCI objects. Possible values are: + // Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. + // Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. + // IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. + // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. PullPolicy *corev1.PullPolicy `json:"pullPolicy,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/iscsipersistentvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/iscsipersistentvolumesource.go index 42f420c56867c..02900a4d279ab 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/iscsipersistentvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/iscsipersistentvolumesource.go @@ -20,18 +20,43 @@ package v1 // ISCSIPersistentVolumeSourceApplyConfiguration represents a declarative configuration of the ISCSIPersistentVolumeSource type for use // with apply. +// +// ISCSIPersistentVolumeSource represents an ISCSI disk. +// ISCSI volumes can only be mounted as read/write once. +// ISCSI volumes support ownership management and SELinux relabeling. type ISCSIPersistentVolumeSourceApplyConfiguration struct { - TargetPortal *string `json:"targetPortal,omitempty"` - IQN *string `json:"iqn,omitempty"` - Lun *int32 `json:"lun,omitempty"` - ISCSIInterface *string `json:"iscsiInterface,omitempty"` - FSType *string `json:"fsType,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - Portals []string `json:"portals,omitempty"` - DiscoveryCHAPAuth *bool `json:"chapAuthDiscovery,omitempty"` - SessionCHAPAuth *bool `json:"chapAuthSession,omitempty"` - SecretRef *SecretReferenceApplyConfiguration `json:"secretRef,omitempty"` - InitiatorName *string `json:"initiatorName,omitempty"` + // targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port + // is other than default (typically TCP ports 860 and 3260). + TargetPortal *string `json:"targetPortal,omitempty"` + // iqn is Target iSCSI Qualified Name. + IQN *string `json:"iqn,omitempty"` + // lun is iSCSI Target Lun number. + Lun *int32 `json:"lun,omitempty"` + // iscsiInterface is the interface Name that uses an iSCSI transport. + // Defaults to 'default' (tcp). + ISCSIInterface *string `json:"iscsiInterface,omitempty"` + // fsType is the filesystem type of the volume that you want to mount. + // Tip: Ensure that the filesystem type is supported by the host operating system. + // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + // TODO: how do we prevent errors in the filesystem from compromising the machine + FSType *string `json:"fsType,omitempty"` + // readOnly here will force the ReadOnly setting in VolumeMounts. + // Defaults to false. + ReadOnly *bool `json:"readOnly,omitempty"` + // portals is the iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port + // is other than default (typically TCP ports 860 and 3260). + Portals []string `json:"portals,omitempty"` + // chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication + DiscoveryCHAPAuth *bool `json:"chapAuthDiscovery,omitempty"` + // chapAuthSession defines whether support iSCSI Session CHAP authentication + SessionCHAPAuth *bool `json:"chapAuthSession,omitempty"` + // secretRef is the CHAP Secret for iSCSI target and initiator authentication + SecretRef *SecretReferenceApplyConfiguration `json:"secretRef,omitempty"` + // initiatorName is the custom iSCSI Initiator Name. + // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface + // : will be created for the connection. + InitiatorName *string `json:"initiatorName,omitempty"` } // ISCSIPersistentVolumeSourceApplyConfiguration constructs a declarative configuration of the ISCSIPersistentVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/iscsivolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/iscsivolumesource.go index 61055434bce63..12fe844fc0edf 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/iscsivolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/iscsivolumesource.go @@ -20,18 +20,43 @@ package v1 // ISCSIVolumeSourceApplyConfiguration represents a declarative configuration of the ISCSIVolumeSource type for use // with apply. +// +// Represents an ISCSI disk. +// ISCSI volumes can only be mounted as read/write once. +// ISCSI volumes support ownership management and SELinux relabeling. type ISCSIVolumeSourceApplyConfiguration struct { - TargetPortal *string `json:"targetPortal,omitempty"` - IQN *string `json:"iqn,omitempty"` - Lun *int32 `json:"lun,omitempty"` - ISCSIInterface *string `json:"iscsiInterface,omitempty"` - FSType *string `json:"fsType,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - Portals []string `json:"portals,omitempty"` - DiscoveryCHAPAuth *bool `json:"chapAuthDiscovery,omitempty"` - SessionCHAPAuth *bool `json:"chapAuthSession,omitempty"` - SecretRef *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` - InitiatorName *string `json:"initiatorName,omitempty"` + // targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port + // is other than default (typically TCP ports 860 and 3260). + TargetPortal *string `json:"targetPortal,omitempty"` + // iqn is the target iSCSI Qualified Name. + IQN *string `json:"iqn,omitempty"` + // lun represents iSCSI Target Lun number. + Lun *int32 `json:"lun,omitempty"` + // iscsiInterface is the interface Name that uses an iSCSI transport. + // Defaults to 'default' (tcp). + ISCSIInterface *string `json:"iscsiInterface,omitempty"` + // fsType is the filesystem type of the volume that you want to mount. + // Tip: Ensure that the filesystem type is supported by the host operating system. + // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + // TODO: how do we prevent errors in the filesystem from compromising the machine + FSType *string `json:"fsType,omitempty"` + // readOnly here will force the ReadOnly setting in VolumeMounts. + // Defaults to false. + ReadOnly *bool `json:"readOnly,omitempty"` + // portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port + // is other than default (typically TCP ports 860 and 3260). + Portals []string `json:"portals,omitempty"` + // chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication + DiscoveryCHAPAuth *bool `json:"chapAuthDiscovery,omitempty"` + // chapAuthSession defines whether support iSCSI Session CHAP authentication + SessionCHAPAuth *bool `json:"chapAuthSession,omitempty"` + // secretRef is the CHAP Secret for iSCSI target and initiator authentication + SecretRef *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` + // initiatorName is the custom iSCSI Initiator Name. + // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface + // : will be created for the connection. + InitiatorName *string `json:"initiatorName,omitempty"` } // ISCSIVolumeSourceApplyConfiguration constructs a declarative configuration of the ISCSIVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/keytopath.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/keytopath.go index c961b07955b0b..75ce1130a68c5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/keytopath.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/keytopath.go @@ -20,10 +20,23 @@ package v1 // KeyToPathApplyConfiguration represents a declarative configuration of the KeyToPath type for use // with apply. +// +// Maps a string key to a path within a volume. type KeyToPathApplyConfiguration struct { - Key *string `json:"key,omitempty"` + // key is the key to project. + Key *string `json:"key,omitempty"` + // path is the relative path of the file to map the key to. + // May not be an absolute path. + // May not contain the path element '..'. + // May not start with the string '..'. Path *string `json:"path,omitempty"` - Mode *int32 `json:"mode,omitempty"` + // mode is Optional: mode bits used to set permissions on this file. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // If not specified, the volume defaultMode will be used. + // This might be in conflict with other options that affect the file + // mode, like fsGroup, and the result can be other mode bits set. + Mode *int32 `json:"mode,omitempty"` } // KeyToPathApplyConfiguration constructs a declarative configuration of the KeyToPath type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/lifecycle.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/lifecycle.go index f8c18a7502c10..8880934a6857a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/lifecycle.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/lifecycle.go @@ -24,10 +24,30 @@ import ( // LifecycleApplyConfiguration represents a declarative configuration of the Lifecycle type for use // with apply. +// +// Lifecycle describes actions that the management system should take in response to container lifecycle +// events. For the PostStart and PreStop lifecycle handlers, management of the container blocks +// until the action is complete, unless the container process fails, in which case the handler is aborted. type LifecycleApplyConfiguration struct { - PostStart *LifecycleHandlerApplyConfiguration `json:"postStart,omitempty"` - PreStop *LifecycleHandlerApplyConfiguration `json:"preStop,omitempty"` - StopSignal *corev1.Signal `json:"stopSignal,omitempty"` + // PostStart is called immediately after a container is created. If the handler fails, + // the container is terminated and restarted according to its restart policy. + // Other management of the container blocks until the hook completes. + // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + PostStart *LifecycleHandlerApplyConfiguration `json:"postStart,omitempty"` + // PreStop is called immediately before a container is terminated due to an + // API request or management event such as liveness/startup probe failure, + // preemption, resource contention, etc. The handler is not called if the + // container crashes or exits. The Pod's termination grace period countdown begins before the + // PreStop hook is executed. Regardless of the outcome of the handler, the + // container will eventually terminate within the Pod's termination grace + // period (unless delayed by finalizers). Other management of the container blocks until the hook completes + // or until the termination grace period is reached. + // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + PreStop *LifecycleHandlerApplyConfiguration `json:"preStop,omitempty"` + // StopSignal defines which signal will be sent to a container when it is being stopped. + // If not specified, the default is defined by the container runtime in use. + // StopSignal can only be set for Pods with a non-empty .spec.os.name + StopSignal *corev1.Signal `json:"stopSignal,omitempty"` } // LifecycleApplyConfiguration constructs a declarative configuration of the Lifecycle type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/lifecyclehandler.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/lifecyclehandler.go index b7c706d58dd28..d01d39648eb3c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/lifecyclehandler.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/lifecyclehandler.go @@ -20,11 +20,20 @@ package v1 // LifecycleHandlerApplyConfiguration represents a declarative configuration of the LifecycleHandler type for use // with apply. +// +// LifecycleHandler defines a specific action that should be taken in a lifecycle +// hook. One and only one of the fields, except TCPSocket must be specified. type LifecycleHandlerApplyConfiguration struct { - Exec *ExecActionApplyConfiguration `json:"exec,omitempty"` - HTTPGet *HTTPGetActionApplyConfiguration `json:"httpGet,omitempty"` + // Exec specifies a command to execute in the container. + Exec *ExecActionApplyConfiguration `json:"exec,omitempty"` + // HTTPGet specifies an HTTP GET request to perform. + HTTPGet *HTTPGetActionApplyConfiguration `json:"httpGet,omitempty"` + // Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + // for backward compatibility. There is no validation of this field and + // lifecycle hooks will fail at runtime when it is specified. TCPSocket *TCPSocketActionApplyConfiguration `json:"tcpSocket,omitempty"` - Sleep *SleepActionApplyConfiguration `json:"sleep,omitempty"` + // Sleep represents a duration that the container should sleep. + Sleep *SleepActionApplyConfiguration `json:"sleep,omitempty"` } // LifecycleHandlerApplyConfiguration constructs a declarative configuration of the LifecycleHandler type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/limitrange.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/limitrange.go index 349a212d5697d..84a9fca312a55 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/limitrange.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/limitrange.go @@ -29,10 +29,16 @@ import ( // LimitRangeApplyConfiguration represents a declarative configuration of the LimitRange type for use // with apply. +// +// LimitRange sets resource usage limits for each kind of resource in a Namespace. type LimitRangeApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *LimitRangeSpecApplyConfiguration `json:"spec,omitempty"` + // Spec defines the limits enforced. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *LimitRangeSpecApplyConfiguration `json:"spec,omitempty"` } // LimitRange constructs a declarative configuration of the LimitRange type for use with @@ -46,29 +52,14 @@ func LimitRange(name, namespace string) *LimitRangeApplyConfiguration { return b } -// ExtractLimitRange extracts the applied configuration owned by fieldManager from -// limitRange. If no managedFields are found in limitRange for fieldManager, a -// LimitRangeApplyConfiguration 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. +// ExtractLimitRangeFrom extracts the applied configuration owned by fieldManager from +// limitRange for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // limitRange must be a unmodified LimitRange API object that was retrieved from the Kubernetes API. -// ExtractLimitRange provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractLimitRangeFrom 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 ExtractLimitRange(limitRange *corev1.LimitRange, fieldManager string) (*LimitRangeApplyConfiguration, error) { - return extractLimitRange(limitRange, fieldManager, "") -} - -// ExtractLimitRangeStatus is the same as ExtractLimitRange except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractLimitRangeStatus(limitRange *corev1.LimitRange, fieldManager string) (*LimitRangeApplyConfiguration, error) { - return extractLimitRange(limitRange, fieldManager, "status") -} - -func extractLimitRange(limitRange *corev1.LimitRange, fieldManager string, subresource string) (*LimitRangeApplyConfiguration, error) { +func ExtractLimitRangeFrom(limitRange *corev1.LimitRange, fieldManager string, subresource string) (*LimitRangeApplyConfiguration, error) { b := &LimitRangeApplyConfiguration{} err := managedfields.ExtractInto(limitRange, internal.Parser().Type("io.k8s.api.core.v1.LimitRange"), fieldManager, b, subresource) if err != nil { @@ -81,6 +72,21 @@ func extractLimitRange(limitRange *corev1.LimitRange, fieldManager string, subre b.WithAPIVersion("v1") return b, nil } + +// ExtractLimitRange extracts the applied configuration owned by fieldManager from +// limitRange. If no managedFields are found in limitRange for fieldManager, a +// LimitRangeApplyConfiguration 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. +// limitRange must be a unmodified LimitRange API object that was retrieved from the Kubernetes API. +// ExtractLimitRange 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. +func ExtractLimitRange(limitRange *corev1.LimitRange, fieldManager string) (*LimitRangeApplyConfiguration, error) { + return ExtractLimitRangeFrom(limitRange, fieldManager, "") +} + func (b LimitRangeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/limitrangeitem.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/limitrangeitem.go index 5ad8ac0e6e226..af3d912d3d622 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/limitrangeitem.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/limitrangeitem.go @@ -24,12 +24,20 @@ import ( // LimitRangeItemApplyConfiguration represents a declarative configuration of the LimitRangeItem type for use // with apply. +// +// LimitRangeItem defines a min/max usage limit for any resource that matches on kind. type LimitRangeItemApplyConfiguration struct { - Type *corev1.LimitType `json:"type,omitempty"` - Max *corev1.ResourceList `json:"max,omitempty"` - Min *corev1.ResourceList `json:"min,omitempty"` - Default *corev1.ResourceList `json:"default,omitempty"` - DefaultRequest *corev1.ResourceList `json:"defaultRequest,omitempty"` + // Type of resource that this limit applies to. + Type *corev1.LimitType `json:"type,omitempty"` + // Max usage constraints on this kind by resource name. + Max *corev1.ResourceList `json:"max,omitempty"` + // Min usage constraints on this kind by resource name. + Min *corev1.ResourceList `json:"min,omitempty"` + // Default resource requirement limit value by resource name if resource limit is omitted. + Default *corev1.ResourceList `json:"default,omitempty"` + // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. + DefaultRequest *corev1.ResourceList `json:"defaultRequest,omitempty"` + // MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource. MaxLimitRequestRatio *corev1.ResourceList `json:"maxLimitRequestRatio,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/limitrangespec.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/limitrangespec.go index 8d69c1c0cd7e0..198e1178f6176 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/limitrangespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/limitrangespec.go @@ -20,7 +20,10 @@ package v1 // LimitRangeSpecApplyConfiguration represents a declarative configuration of the LimitRangeSpec type for use // with apply. +// +// LimitRangeSpec defines a min/max usage limit for resources that match on kind. type LimitRangeSpecApplyConfiguration struct { + // Limits is the list of LimitRangeItem objects that are enforced. Limits []LimitRangeItemApplyConfiguration `json:"limits,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/linuxcontaineruser.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/linuxcontaineruser.go index fbab4815ab893..1dc8fc70a3374 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/linuxcontaineruser.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/linuxcontaineruser.go @@ -20,9 +20,14 @@ package v1 // LinuxContainerUserApplyConfiguration represents a declarative configuration of the LinuxContainerUser type for use // with apply. +// +// LinuxContainerUser represents user identity information in Linux containers type LinuxContainerUserApplyConfiguration struct { - UID *int64 `json:"uid,omitempty"` - GID *int64 `json:"gid,omitempty"` + // UID is the primary uid initially attached to the first process in the container + UID *int64 `json:"uid,omitempty"` + // GID is the primary gid initially attached to the first process in the container + GID *int64 `json:"gid,omitempty"` + // SupplementalGroups are the supplemental groups initially attached to the first process in the container SupplementalGroups []int64 `json:"supplementalGroups,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/loadbalanceringress.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/loadbalanceringress.go index ae5c410a2439b..91c3225ecf03a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/loadbalanceringress.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/loadbalanceringress.go @@ -24,11 +24,26 @@ import ( // LoadBalancerIngressApplyConfiguration represents a declarative configuration of the LoadBalancerIngress type for use // with apply. +// +// LoadBalancerIngress represents the status of a load-balancer ingress point: +// traffic intended for the service should be sent to an ingress point. type LoadBalancerIngressApplyConfiguration struct { - IP *string `json:"ip,omitempty"` - Hostname *string `json:"hostname,omitempty"` - IPMode *corev1.LoadBalancerIPMode `json:"ipMode,omitempty"` - Ports []PortStatusApplyConfiguration `json:"ports,omitempty"` + // IP is set for load-balancer ingress points that are IP based + // (typically GCE or OpenStack load-balancers) + IP *string `json:"ip,omitempty"` + // Hostname is set for load-balancer ingress points that are DNS based + // (typically AWS load-balancers) + Hostname *string `json:"hostname,omitempty"` + // IPMode specifies how the load-balancer IP behaves, and may only be specified when the ip field is specified. + // Setting this to "VIP" indicates that traffic is delivered to the node with + // the destination set to the load-balancer's IP and port. + // Setting this to "Proxy" indicates that traffic is delivered to the node or pod with + // the destination set to the node's IP and node port or the pod's IP and port. + // Service implementations may use this information to adjust traffic routing. + IPMode *corev1.LoadBalancerIPMode `json:"ipMode,omitempty"` + // Ports is a list of records of service ports + // If used, every port defined in the service should have an entry in it + Ports []PortStatusApplyConfiguration `json:"ports,omitempty"` } // LoadBalancerIngressApplyConfiguration constructs a declarative configuration of the LoadBalancerIngress type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/loadbalancerstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/loadbalancerstatus.go index bb3d616c15f71..dd22551480120 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/loadbalancerstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/loadbalancerstatus.go @@ -20,7 +20,11 @@ package v1 // LoadBalancerStatusApplyConfiguration represents a declarative configuration of the LoadBalancerStatus type for use // with apply. +// +// LoadBalancerStatus represents the status of a load-balancer. type LoadBalancerStatusApplyConfiguration struct { + // Ingress is a list containing ingress points for the load-balancer. + // Traffic intended for the service should be sent to these ingress points. Ingress []LoadBalancerIngressApplyConfiguration `json:"ingress,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/localobjectreference.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/localobjectreference.go index c55d6803dc8e5..2841adb672b1b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/localobjectreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/localobjectreference.go @@ -20,7 +20,27 @@ package v1 // LocalObjectReferenceApplyConfiguration represents a declarative configuration of the LocalObjectReference type for use // with apply. +// +// LocalObjectReference contains enough information to let you locate the +// referenced object inside the same namespace. +// --- +// New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. +// 1. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular +// restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". +// Those cannot be well described when embedded. +// 2. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. +// 3. We cannot easily change it. Because this type is embedded in many locations, updates to this type +// will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. +// +// Instead of using this type, create a locally provided and used type that is well-focused on your reference. +// For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . type LocalObjectReferenceApplyConfiguration struct { + // Name of the referent. + // This field is effectively required, but due to backwards compatibility is + // allowed to be empty. Instances of this type with an empty value here are + // almost certainly wrong. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + // TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/localvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/localvolumesource.go index db711d99349c8..27827ed1ba682 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/localvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/localvolumesource.go @@ -20,8 +20,16 @@ package v1 // LocalVolumeSourceApplyConfiguration represents a declarative configuration of the LocalVolumeSource type for use // with apply. +// +// Local represents directly-attached storage with node affinity type LocalVolumeSourceApplyConfiguration struct { - Path *string `json:"path,omitempty"` + // path of the full path to the volume on the node. + // It can be either a directory or block device (disk, partition, ...). + Path *string `json:"path,omitempty"` + // fsType is the filesystem type to mount. + // It applies only when the Path is a block device. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". The default value is to auto-select a filesystem if unspecified. FSType *string `json:"fsType,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/modifyvolumestatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/modifyvolumestatus.go index 9a1a6af2a6e08..4fa86ce042579 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/modifyvolumestatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/modifyvolumestatus.go @@ -24,9 +24,22 @@ import ( // ModifyVolumeStatusApplyConfiguration represents a declarative configuration of the ModifyVolumeStatus type for use // with apply. +// +// ModifyVolumeStatus represents the status object of ControllerModifyVolume operation type ModifyVolumeStatusApplyConfiguration struct { - TargetVolumeAttributesClassName *string `json:"targetVolumeAttributesClassName,omitempty"` - Status *corev1.PersistentVolumeClaimModifyVolumeStatus `json:"status,omitempty"` + // targetVolumeAttributesClassName is the name of the VolumeAttributesClass the PVC currently being reconciled + TargetVolumeAttributesClassName *string `json:"targetVolumeAttributesClassName,omitempty"` + // status is the status of the ControllerModifyVolume operation. It can be in any of following states: + // - Pending + // Pending indicates that the PersistentVolumeClaim cannot be modified due to unmet requirements, such as + // the specified VolumeAttributesClass not existing. + // - InProgress + // InProgress indicates that the volume is being modified. + // - Infeasible + // Infeasible indicates that the request has been rejected as invalid by the CSI driver. To + // resolve the error, a valid VolumeAttributesClass needs to be specified. + // Note: New statuses can be added in the future. Consumers should check for unknown statuses and fail appropriately. + Status *corev1.PersistentVolumeClaimModifyVolumeStatus `json:"status,omitempty"` } // ModifyVolumeStatusApplyConfiguration constructs a declarative configuration of the ModifyVolumeStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespace.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespace.go index 671a3cbccb83b..a5bf0f9468e36 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespace.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespace.go @@ -29,11 +29,20 @@ import ( // NamespaceApplyConfiguration represents a declarative configuration of the Namespace type for use // with apply. +// +// Namespace provides a scope for Names. +// Use of multiple namespaces is optional. type NamespaceApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NamespaceSpecApplyConfiguration `json:"spec,omitempty"` - Status *NamespaceStatusApplyConfiguration `json:"status,omitempty"` + // Spec defines the behavior of the Namespace. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *NamespaceSpecApplyConfiguration `json:"spec,omitempty"` + // Status describes the current status of a Namespace. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *NamespaceStatusApplyConfiguration `json:"status,omitempty"` } // Namespace constructs a declarative configuration of the Namespace type for use with @@ -46,6 +55,26 @@ func Namespace(name string) *NamespaceApplyConfiguration { return b } +// ExtractNamespaceFrom extracts the applied configuration owned by fieldManager from +// namespace for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// namespace must be a unmodified Namespace API object that was retrieved from the Kubernetes API. +// ExtractNamespaceFrom 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. +func ExtractNamespaceFrom(namespace *corev1.Namespace, fieldManager string, subresource string) (*NamespaceApplyConfiguration, error) { + b := &NamespaceApplyConfiguration{} + err := managedfields.ExtractInto(namespace, internal.Parser().Type("io.k8s.api.core.v1.Namespace"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(namespace.Name) + + b.WithKind("Namespace") + b.WithAPIVersion("v1") + return b, nil +} + // ExtractNamespace extracts the applied configuration owned by fieldManager from // namespace. If no managedFields are found in namespace for fieldManager, a // NamespaceApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +85,16 @@ func Namespace(name string) *NamespaceApplyConfiguration { // ExtractNamespace 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 ExtractNamespace(namespace *corev1.Namespace, fieldManager string) (*NamespaceApplyConfiguration, error) { - return extractNamespace(namespace, fieldManager, "") + return ExtractNamespaceFrom(namespace, fieldManager, "") } -// ExtractNamespaceStatus is the same as ExtractNamespace except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractNamespaceStatus extracts the applied configuration owned by fieldManager from +// namespace for the status subresource. func ExtractNamespaceStatus(namespace *corev1.Namespace, fieldManager string) (*NamespaceApplyConfiguration, error) { - return extractNamespace(namespace, fieldManager, "status") + return ExtractNamespaceFrom(namespace, fieldManager, "status") } -func extractNamespace(namespace *corev1.Namespace, fieldManager string, subresource string) (*NamespaceApplyConfiguration, error) { - b := &NamespaceApplyConfiguration{} - err := managedfields.ExtractInto(namespace, internal.Parser().Type("io.k8s.api.core.v1.Namespace"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(namespace.Name) - - b.WithKind("Namespace") - b.WithAPIVersion("v1") - return b, nil -} func (b NamespaceApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespacecondition.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespacecondition.go index 82b4cc1ca3b0a..df2bfd2fb48be 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespacecondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespacecondition.go @@ -25,12 +25,19 @@ import ( // NamespaceConditionApplyConfiguration represents a declarative configuration of the NamespaceCondition type for use // with apply. +// +// NamespaceCondition contains details about state of namespace. type NamespaceConditionApplyConfiguration struct { - Type *corev1.NamespaceConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of namespace controller condition. + Type *corev1.NamespaceConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *corev1.ConditionStatus `json:"status,omitempty"` + // Last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // Unique, one-word, CamelCase reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // Human-readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // NamespaceConditionApplyConfiguration constructs a declarative configuration of the NamespaceCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespacespec.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespacespec.go index 1f8fcaf9a1262..48813e2bb78d7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespacespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespacespec.go @@ -24,7 +24,11 @@ import ( // NamespaceSpecApplyConfiguration represents a declarative configuration of the NamespaceSpec type for use // with apply. +// +// NamespaceSpec describes the attributes on a Namespace. type NamespaceSpecApplyConfiguration struct { + // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. + // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ Finalizers []corev1.FinalizerName `json:"finalizers,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespacestatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespacestatus.go index 1484be684292e..cde2cd1a5a8a6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespacestatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespacestatus.go @@ -24,8 +24,13 @@ import ( // NamespaceStatusApplyConfiguration represents a declarative configuration of the NamespaceStatus type for use // with apply. +// +// NamespaceStatus is information about the current status of a Namespace. type NamespaceStatusApplyConfiguration struct { - Phase *corev1.NamespacePhase `json:"phase,omitempty"` + // Phase is the current lifecycle phase of the namespace. + // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ + Phase *corev1.NamespacePhase `json:"phase,omitempty"` + // Represents the latest available observations of a namespace's current state. Conditions []NamespaceConditionApplyConfiguration `json:"conditions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nfsvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nfsvolumesource.go index ed49a87a9eb4c..a539c4076983d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nfsvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nfsvolumesource.go @@ -20,10 +20,20 @@ package v1 // NFSVolumeSourceApplyConfiguration represents a declarative configuration of the NFSVolumeSource type for use // with apply. +// +// Represents an NFS mount that lasts the lifetime of a pod. +// NFS volumes do not support ownership management or SELinux relabeling. type NFSVolumeSourceApplyConfiguration struct { - Server *string `json:"server,omitempty"` - Path *string `json:"path,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // server is the hostname or IP address of the NFS server. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + Server *string `json:"server,omitempty"` + // path that is exported by the NFS server. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + Path *string `json:"path,omitempty"` + // readOnly here will force the NFS export to be mounted with read-only permissions. + // Defaults to false. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + ReadOnly *bool `json:"readOnly,omitempty"` } // NFSVolumeSourceApplyConfiguration constructs a declarative configuration of the NFSVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/node.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/node.go index 3682e62e2178b..ff45b89945c2d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/node.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/node.go @@ -29,11 +29,22 @@ import ( // NodeApplyConfiguration represents a declarative configuration of the Node type for use // with apply. +// +// Node is a worker node in Kubernetes. +// Each node will have a unique identifier in the cache (i.e. in etcd). type NodeApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NodeSpecApplyConfiguration `json:"spec,omitempty"` - Status *NodeStatusApplyConfiguration `json:"status,omitempty"` + // Spec defines the behavior of a node. + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *NodeSpecApplyConfiguration `json:"spec,omitempty"` + // Most recently observed status of the node. + // Populated by the system. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *NodeStatusApplyConfiguration `json:"status,omitempty"` } // Node constructs a declarative configuration of the Node type for use with @@ -46,6 +57,26 @@ func Node(name string) *NodeApplyConfiguration { return b } +// ExtractNodeFrom extracts the applied configuration owned by fieldManager from +// node for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// node must be a unmodified Node API object that was retrieved from the Kubernetes API. +// ExtractNodeFrom 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. +func ExtractNodeFrom(node *corev1.Node, fieldManager string, subresource string) (*NodeApplyConfiguration, error) { + b := &NodeApplyConfiguration{} + err := managedfields.ExtractInto(node, internal.Parser().Type("io.k8s.api.core.v1.Node"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(node.Name) + + b.WithKind("Node") + b.WithAPIVersion("v1") + return b, nil +} + // ExtractNode extracts the applied configuration owned by fieldManager from // node. If no managedFields are found in node for fieldManager, a // NodeApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +87,16 @@ func Node(name string) *NodeApplyConfiguration { // ExtractNode 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 ExtractNode(node *corev1.Node, fieldManager string) (*NodeApplyConfiguration, error) { - return extractNode(node, fieldManager, "") + return ExtractNodeFrom(node, fieldManager, "") } -// ExtractNodeStatus is the same as ExtractNode except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractNodeStatus extracts the applied configuration owned by fieldManager from +// node for the status subresource. func ExtractNodeStatus(node *corev1.Node, fieldManager string) (*NodeApplyConfiguration, error) { - return extractNode(node, fieldManager, "status") + return ExtractNodeFrom(node, fieldManager, "status") } -func extractNode(node *corev1.Node, fieldManager string, subresource string) (*NodeApplyConfiguration, error) { - b := &NodeApplyConfiguration{} - err := managedfields.ExtractInto(node, internal.Parser().Type("io.k8s.api.core.v1.Node"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(node.Name) - - b.WithKind("Node") - b.WithAPIVersion("v1") - return b, nil -} func (b NodeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeaddress.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeaddress.go index 779fe0e2fdc8b..0eb14a5941df1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeaddress.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeaddress.go @@ -24,9 +24,13 @@ import ( // NodeAddressApplyConfiguration represents a declarative configuration of the NodeAddress type for use // with apply. +// +// NodeAddress contains information for the node's address. type NodeAddressApplyConfiguration struct { - Type *corev1.NodeAddressType `json:"type,omitempty"` - Address *string `json:"address,omitempty"` + // Node address type, one of Hostname, ExternalIP or InternalIP. + Type *corev1.NodeAddressType `json:"type,omitempty"` + // The node address. + Address *string `json:"address,omitempty"` } // NodeAddressApplyConfiguration constructs a declarative configuration of the NodeAddress type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeaffinity.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeaffinity.go index 5d11d746dcddc..099cd0aaf52e1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeaffinity.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeaffinity.go @@ -20,8 +20,24 @@ package v1 // NodeAffinityApplyConfiguration represents a declarative configuration of the NodeAffinity type for use // with apply. +// +// Node affinity is a group of node affinity scheduling rules. type NodeAffinityApplyConfiguration struct { - RequiredDuringSchedulingIgnoredDuringExecution *NodeSelectorApplyConfiguration `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"` + // If the affinity requirements specified by this field are not met at + // scheduling time, the pod will not be scheduled onto the node. + // If the affinity requirements specified by this field cease to be met + // at some point during pod execution (e.g. due to an update), the system + // may or may not try to eventually evict the pod from its node. + RequiredDuringSchedulingIgnoredDuringExecution *NodeSelectorApplyConfiguration `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"` + // The scheduler will prefer to schedule pods to nodes that satisfy + // the affinity expressions specified by this field, but it may choose + // a node that violates one or more of the expressions. The node that is + // most preferred is the one with the greatest sum of weights, i.e. + // for each node that meets all of the scheduling requirements (resource + // request, requiredDuringScheduling affinity expressions, etc.), + // compute a sum by iterating through the elements of this field and adding + // "weight" to the sum if the node matches the corresponding matchExpressions; the + // node(s) with the highest sum are the most preferred. PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTermApplyConfiguration `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodecondition.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodecondition.go index e3a2d3bb0634b..0362ec20de7d4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodecondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodecondition.go @@ -25,13 +25,21 @@ import ( // NodeConditionApplyConfiguration represents a declarative configuration of the NodeCondition type for use // with apply. +// +// NodeCondition contains condition information for a node. type NodeConditionApplyConfiguration struct { - Type *corev1.NodeConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastHeartbeatTime *metav1.Time `json:"lastHeartbeatTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of node condition. + Type *corev1.NodeConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *corev1.ConditionStatus `json:"status,omitempty"` + // Last time we got an update on a given condition. + LastHeartbeatTime *metav1.Time `json:"lastHeartbeatTime,omitempty"` + // Last time the condition transit from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // (brief) reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // Human readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // NodeConditionApplyConfiguration constructs a declarative configuration of the NodeCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeconfigsource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeconfigsource.go index 00a671fc0c717..ae63ae36f3bfe 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeconfigsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeconfigsource.go @@ -20,7 +20,11 @@ package v1 // NodeConfigSourceApplyConfiguration represents a declarative configuration of the NodeConfigSource type for use // with apply. +// +// NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. +// This API is deprecated since 1.22 type NodeConfigSourceApplyConfiguration struct { + // ConfigMap is a reference to a Node's ConfigMap ConfigMap *ConfigMapNodeConfigSourceApplyConfiguration `json:"configMap,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeconfigstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeconfigstatus.go index d5ccc45c6a8b6..88c0b3c31fdb3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeconfigstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeconfigstatus.go @@ -20,11 +20,48 @@ package v1 // NodeConfigStatusApplyConfiguration represents a declarative configuration of the NodeConfigStatus type for use // with apply. +// +// NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource. type NodeConfigStatusApplyConfiguration struct { - Assigned *NodeConfigSourceApplyConfiguration `json:"assigned,omitempty"` - Active *NodeConfigSourceApplyConfiguration `json:"active,omitempty"` + // Assigned reports the checkpointed config the node will try to use. + // When Node.Spec.ConfigSource is updated, the node checkpoints the associated + // config payload to local disk, along with a record indicating intended + // config. The node refers to this record to choose its config checkpoint, and + // reports this record in Assigned. Assigned only updates in the status after + // the record has been checkpointed to disk. When the Kubelet is restarted, + // it tries to make the Assigned config the Active config by loading and + // validating the checkpointed payload identified by Assigned. + Assigned *NodeConfigSourceApplyConfiguration `json:"assigned,omitempty"` + // Active reports the checkpointed config the node is actively using. + // Active will represent either the current version of the Assigned config, + // or the current LastKnownGood config, depending on whether attempting to use the + // Assigned config results in an error. + Active *NodeConfigSourceApplyConfiguration `json:"active,omitempty"` + // LastKnownGood reports the checkpointed config the node will fall back to + // when it encounters an error attempting to use the Assigned config. + // The Assigned config becomes the LastKnownGood config when the node determines + // that the Assigned config is stable and correct. + // This is currently implemented as a 10-minute soak period starting when the local + // record of Assigned config is updated. If the Assigned config is Active at the end + // of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is + // reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, + // because the local default config is always assumed good. + // You should not make assumptions about the node's method of determining config stability + // and correctness, as this may change or become configurable in the future. LastKnownGood *NodeConfigSourceApplyConfiguration `json:"lastKnownGood,omitempty"` - Error *string `json:"error,omitempty"` + // Error describes any problems reconciling the Spec.ConfigSource to the Active config. + // Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned + // record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting + // to load or validate the Assigned config, etc. + // Errors may occur at different points while syncing config. Earlier errors (e.g. download or + // checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across + // Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in + // a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error + // by fixing the config assigned in Spec.ConfigSource. + // You can find additional information for debugging by searching the error message in the Kubelet log. + // Error is a human-readable description of the error state; machines can check whether or not Error + // is empty, but should not rely on the stability of the Error text across Kubelet versions. + Error *string `json:"error,omitempty"` } // NodeConfigStatusApplyConfiguration constructs a declarative configuration of the NodeConfigStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodedaemonendpoints.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodedaemonendpoints.go index 11228b36913fd..b36d2ec33d209 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodedaemonendpoints.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodedaemonendpoints.go @@ -20,7 +20,10 @@ package v1 // NodeDaemonEndpointsApplyConfiguration represents a declarative configuration of the NodeDaemonEndpoints type for use // with apply. +// +// NodeDaemonEndpoints lists ports opened by daemons running on the Node. type NodeDaemonEndpointsApplyConfiguration struct { + // Endpoint on which Kubelet is listening. KubeletEndpoint *DaemonEndpointApplyConfiguration `json:"kubeletEndpoint,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodefeatures.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodefeatures.go index 678b0e36d6e37..c3b467193cb1d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodefeatures.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodefeatures.go @@ -20,7 +20,12 @@ package v1 // NodeFeaturesApplyConfiguration represents a declarative configuration of the NodeFeatures type for use // with apply. +// +// NodeFeatures describes the set of features implemented by the CRI implementation. +// The features contained in the NodeFeatures should depend only on the cri implementation +// independent of runtime handlers. type NodeFeaturesApplyConfiguration struct { + // SupplementalGroupsPolicy is set to true if the runtime supports SupplementalGroupsPolicy and ContainerUser. SupplementalGroupsPolicy *bool `json:"supplementalGroupsPolicy,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandler.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandler.go index c7c664974e09e..afebc7fc159f3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandler.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandler.go @@ -20,8 +20,13 @@ package v1 // NodeRuntimeHandlerApplyConfiguration represents a declarative configuration of the NodeRuntimeHandler type for use // with apply. +// +// NodeRuntimeHandler is a set of runtime handler information. type NodeRuntimeHandlerApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // Runtime handler name. + // Empty for the default runtime handler. + Name *string `json:"name,omitempty"` + // Supported features. Features *NodeRuntimeHandlerFeaturesApplyConfiguration `json:"features,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandlerfeatures.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandlerfeatures.go index a295b609690b2..47866f8cdb62f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandlerfeatures.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandlerfeatures.go @@ -20,9 +20,13 @@ package v1 // NodeRuntimeHandlerFeaturesApplyConfiguration represents a declarative configuration of the NodeRuntimeHandlerFeatures type for use // with apply. +// +// NodeRuntimeHandlerFeatures is a set of features implemented by the runtime handler. type NodeRuntimeHandlerFeaturesApplyConfiguration struct { + // RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts. RecursiveReadOnlyMounts *bool `json:"recursiveReadOnlyMounts,omitempty"` - UserNamespaces *bool `json:"userNamespaces,omitempty"` + // UserNamespaces is set to true if the runtime handler supports UserNamespaces, including for volumes. + UserNamespaces *bool `json:"userNamespaces,omitempty"` } // NodeRuntimeHandlerFeaturesApplyConfiguration constructs a declarative configuration of the NodeRuntimeHandlerFeatures type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeselector.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeselector.go index 6eab109795e21..3809873c1a47d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeselector.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeselector.go @@ -20,7 +20,12 @@ package v1 // NodeSelectorApplyConfiguration represents a declarative configuration of the NodeSelector type for use // with apply. +// +// A node selector represents the union of the results of one or more label queries +// over a set of nodes; that is, it represents the OR of the selectors represented +// by the node selector terms. type NodeSelectorApplyConfiguration struct { + // Required. A list of node selector terms. The terms are ORed. NodeSelectorTerms []NodeSelectorTermApplyConfiguration `json:"nodeSelectorTerms,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeselectorrequirement.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeselectorrequirement.go index 4dcbc9a2e775d..4428d85c7c792 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeselectorrequirement.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeselectorrequirement.go @@ -24,10 +24,21 @@ import ( // NodeSelectorRequirementApplyConfiguration represents a declarative configuration of the NodeSelectorRequirement type for use // with apply. +// +// A node selector requirement is a selector that contains values, a key, and an operator +// that relates the key and values. type NodeSelectorRequirementApplyConfiguration struct { - Key *string `json:"key,omitempty"` + // The label key that the selector applies to. + Key *string `json:"key,omitempty"` + // Represents a key's relationship to a set of values. + // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. Operator *corev1.NodeSelectorOperator `json:"operator,omitempty"` - Values []string `json:"values,omitempty"` + // An array of string values. If the operator is In or NotIn, + // the values array must be non-empty. If the operator is Exists or DoesNotExist, + // the values array must be empty. If the operator is Gt or Lt, the values + // array must have a single element, which will be interpreted as an integer. + // This array is replaced during a strategic merge patch. + Values []string `json:"values,omitempty"` } // NodeSelectorRequirementApplyConfiguration constructs a declarative configuration of the NodeSelectorRequirement type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeselectorterm.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeselectorterm.go index 9d0d780f3e047..98c1739bbb954 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeselectorterm.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeselectorterm.go @@ -20,9 +20,15 @@ package v1 // NodeSelectorTermApplyConfiguration represents a declarative configuration of the NodeSelectorTerm type for use // with apply. +// +// A null or empty node selector term matches no objects. The requirements of +// them are ANDed. +// The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. type NodeSelectorTermApplyConfiguration struct { + // A list of node selector requirements by node's labels. MatchExpressions []NodeSelectorRequirementApplyConfiguration `json:"matchExpressions,omitempty"` - MatchFields []NodeSelectorRequirementApplyConfiguration `json:"matchFields,omitempty"` + // A list of node selector requirements by node's fields. + MatchFields []NodeSelectorRequirementApplyConfiguration `json:"matchFields,omitempty"` } // NodeSelectorTermApplyConfiguration constructs a declarative configuration of the NodeSelectorTerm type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodespec.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodespec.go index 8ac3497127b2b..b53ed21d79a17 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodespec.go @@ -20,14 +20,27 @@ package v1 // NodeSpecApplyConfiguration represents a declarative configuration of the NodeSpec type for use // with apply. +// +// NodeSpec describes the attributes that a node is created with. type NodeSpecApplyConfiguration struct { - PodCIDR *string `json:"podCIDR,omitempty"` - PodCIDRs []string `json:"podCIDRs,omitempty"` - ProviderID *string `json:"providerID,omitempty"` - Unschedulable *bool `json:"unschedulable,omitempty"` - Taints []TaintApplyConfiguration `json:"taints,omitempty"` - ConfigSource *NodeConfigSourceApplyConfiguration `json:"configSource,omitempty"` - DoNotUseExternalID *string `json:"externalID,omitempty"` + // PodCIDR represents the pod IP range assigned to the node. + PodCIDR *string `json:"podCIDR,omitempty"` + // podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this + // field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for + // each of IPv4 and IPv6. + PodCIDRs []string `json:"podCIDRs,omitempty"` + // ID of the node assigned by the cloud provider in the format: :// + ProviderID *string `json:"providerID,omitempty"` + // Unschedulable controls node schedulability of new pods. By default, node is schedulable. + // More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration + Unschedulable *bool `json:"unschedulable,omitempty"` + // If specified, the node's taints. + Taints []TaintApplyConfiguration `json:"taints,omitempty"` + // Deprecated: Previously used to specify the source of the node's configuration for the DynamicKubeletConfig feature. This feature is removed. + ConfigSource *NodeConfigSourceApplyConfiguration `json:"configSource,omitempty"` + // Deprecated. Not all kubelets will set this field. Remove field after 1.13. + // see: https://issues.k8s.io/61966 + DoNotUseExternalID *string `json:"externalID,omitempty"` } // NodeSpecApplyConfiguration constructs a declarative configuration of the NodeSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go index 3859ccd503e8f..68b07b6e4354a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go @@ -24,20 +24,50 @@ import ( // NodeStatusApplyConfiguration represents a declarative configuration of the NodeStatus type for use // with apply. +// +// NodeStatus is information about the current status of a node. type NodeStatusApplyConfiguration struct { - Capacity *corev1.ResourceList `json:"capacity,omitempty"` - Allocatable *corev1.ResourceList `json:"allocatable,omitempty"` - Phase *corev1.NodePhase `json:"phase,omitempty"` - Conditions []NodeConditionApplyConfiguration `json:"conditions,omitempty"` - Addresses []NodeAddressApplyConfiguration `json:"addresses,omitempty"` + // Capacity represents the total resources of a node. + // More info: https://kubernetes.io/docs/reference/node/node-status/#capacity + Capacity *corev1.ResourceList `json:"capacity,omitempty"` + // Allocatable represents the resources of a node that are available for scheduling. + // Defaults to Capacity. + Allocatable *corev1.ResourceList `json:"allocatable,omitempty"` + // NodePhase is the recently observed lifecycle phase of the node. + // More info: https://kubernetes.io/docs/concepts/nodes/node/#phase + // The field is never populated, and now is deprecated. + Phase *corev1.NodePhase `json:"phase,omitempty"` + // Conditions is an array of current observed node conditions. + // More info: https://kubernetes.io/docs/reference/node/node-status/#condition + Conditions []NodeConditionApplyConfiguration `json:"conditions,omitempty"` + // List of addresses reachable to the node. + // Queried from cloud provider, if available. + // More info: https://kubernetes.io/docs/reference/node/node-status/#addresses + // Note: This field is declared as mergeable, but the merge key is not sufficiently + // unique, which can cause data corruption when it is merged. Callers should instead + // use a full-replacement patch. See https://pr.k8s.io/79391 for an example. + // Consumers should assume that addresses can change during the + // lifetime of a Node. However, there are some exceptions where this may not + // be possible, such as Pods that inherit a Node's address in its own status or + // consumers of the downward API (status.hostIP). + Addresses []NodeAddressApplyConfiguration `json:"addresses,omitempty"` + // Endpoints of daemons running on the Node. DaemonEndpoints *NodeDaemonEndpointsApplyConfiguration `json:"daemonEndpoints,omitempty"` - NodeInfo *NodeSystemInfoApplyConfiguration `json:"nodeInfo,omitempty"` - Images []ContainerImageApplyConfiguration `json:"images,omitempty"` - VolumesInUse []corev1.UniqueVolumeName `json:"volumesInUse,omitempty"` - VolumesAttached []AttachedVolumeApplyConfiguration `json:"volumesAttached,omitempty"` - Config *NodeConfigStatusApplyConfiguration `json:"config,omitempty"` + // Set of ids/uuids to uniquely identify the node. + // More info: https://kubernetes.io/docs/reference/node/node-status/#info + NodeInfo *NodeSystemInfoApplyConfiguration `json:"nodeInfo,omitempty"` + // List of container images on this node + Images []ContainerImageApplyConfiguration `json:"images,omitempty"` + // List of attachable volumes in use (mounted) by the node. + VolumesInUse []corev1.UniqueVolumeName `json:"volumesInUse,omitempty"` + // List of volumes that are attached to the node. + VolumesAttached []AttachedVolumeApplyConfiguration `json:"volumesAttached,omitempty"` + // Status of the config assigned to the node via the dynamic Kubelet config feature. + Config *NodeConfigStatusApplyConfiguration `json:"config,omitempty"` + // The available runtime handlers. RuntimeHandlers []NodeRuntimeHandlerApplyConfiguration `json:"runtimeHandlers,omitempty"` - Features *NodeFeaturesApplyConfiguration `json:"features,omitempty"` + // Features describes the set of features implemented by the CRI implementation. + Features *NodeFeaturesApplyConfiguration `json:"features,omitempty"` } // NodeStatusApplyConfiguration constructs a declarative configuration of the NodeStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeswapstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeswapstatus.go index 2a7a2e685dba1..d9548e6b01d38 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeswapstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodeswapstatus.go @@ -20,7 +20,10 @@ package v1 // NodeSwapStatusApplyConfiguration represents a declarative configuration of the NodeSwapStatus type for use // with apply. +// +// NodeSwapStatus represents swap memory information. type NodeSwapStatusApplyConfiguration struct { + // Total amount of swap memory in bytes. Capacity *int64 `json:"capacity,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodesysteminfo.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodesysteminfo.go index 55effd717187e..70b8a7819d9e5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodesysteminfo.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/nodesysteminfo.go @@ -20,18 +20,35 @@ package v1 // NodeSystemInfoApplyConfiguration represents a declarative configuration of the NodeSystemInfo type for use // with apply. +// +// NodeSystemInfo is a set of ids/uuids to uniquely identify the node. type NodeSystemInfoApplyConfiguration struct { - MachineID *string `json:"machineID,omitempty"` - SystemUUID *string `json:"systemUUID,omitempty"` - BootID *string `json:"bootID,omitempty"` - KernelVersion *string `json:"kernelVersion,omitempty"` - OSImage *string `json:"osImage,omitempty"` - ContainerRuntimeVersion *string `json:"containerRuntimeVersion,omitempty"` - KubeletVersion *string `json:"kubeletVersion,omitempty"` - KubeProxyVersion *string `json:"kubeProxyVersion,omitempty"` - OperatingSystem *string `json:"operatingSystem,omitempty"` - Architecture *string `json:"architecture,omitempty"` - Swap *NodeSwapStatusApplyConfiguration `json:"swap,omitempty"` + // MachineID reported by the node. For unique machine identification + // in the cluster this field is preferred. Learn more from man(5) + // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html + MachineID *string `json:"machineID,omitempty"` + // SystemUUID reported by the node. For unique machine identification + // MachineID is preferred. This field is specific to Red Hat hosts + // https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid + SystemUUID *string `json:"systemUUID,omitempty"` + // Boot ID reported by the node. + BootID *string `json:"bootID,omitempty"` + // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). + KernelVersion *string `json:"kernelVersion,omitempty"` + // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). + OSImage *string `json:"osImage,omitempty"` + // ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2). + ContainerRuntimeVersion *string `json:"containerRuntimeVersion,omitempty"` + // Kubelet Version reported by the node. + KubeletVersion *string `json:"kubeletVersion,omitempty"` + // Deprecated: KubeProxy Version reported by the node. + KubeProxyVersion *string `json:"kubeProxyVersion,omitempty"` + // The Operating System reported by the node + OperatingSystem *string `json:"operatingSystem,omitempty"` + // The Architecture reported by the node + Architecture *string `json:"architecture,omitempty"` + // Swap Info reported by the node. + Swap *NodeSwapStatusApplyConfiguration `json:"swap,omitempty"` } // NodeSystemInfoApplyConfiguration constructs a declarative configuration of the NodeSystemInfo type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/objectfieldselector.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/objectfieldselector.go index c129c998b1687..e941ac9942a10 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/objectfieldselector.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/objectfieldselector.go @@ -20,9 +20,13 @@ package v1 // ObjectFieldSelectorApplyConfiguration represents a declarative configuration of the ObjectFieldSelector type for use // with apply. +// +// ObjectFieldSelector selects an APIVersioned field of an object. type ObjectFieldSelectorApplyConfiguration struct { + // Version of the schema the FieldPath is written in terms of, defaults to "v1". APIVersion *string `json:"apiVersion,omitempty"` - FieldPath *string `json:"fieldPath,omitempty"` + // Path of the field to select in the specified API version. + FieldPath *string `json:"fieldPath,omitempty"` } // ObjectFieldSelectorApplyConfiguration constructs a declarative configuration of the ObjectFieldSelector type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/objectreference.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/objectreference.go index 4cd3f226ef315..1de02cd16787c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/objectreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/objectreference.go @@ -24,14 +24,50 @@ import ( // ObjectReferenceApplyConfiguration represents a declarative configuration of the ObjectReference type for use // with apply. +// +// ObjectReference contains enough information to let you inspect or modify the referred object. +// --- +// New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. +// 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. +// 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular +// restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". +// Those cannot be well described when embedded. +// 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. +// 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity +// during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple +// and the version of the actual struct is irrelevant. +// 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type +// will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. +// +// Instead of using this type, create a locally provided and used type that is well-focused on your reference. +// For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . type ObjectReferenceApplyConfiguration struct { - Kind *string `json:"kind,omitempty"` - Namespace *string `json:"namespace,omitempty"` - Name *string `json:"name,omitempty"` - UID *types.UID `json:"uid,omitempty"` - APIVersion *string `json:"apiVersion,omitempty"` - ResourceVersion *string `json:"resourceVersion,omitempty"` - FieldPath *string `json:"fieldPath,omitempty"` + // Kind of the referent. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `json:"kind,omitempty"` + // Namespace of the referent. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + Namespace *string `json:"namespace,omitempty"` + // Name of the referent. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `json:"name,omitempty"` + // UID of the referent. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + UID *types.UID `json:"uid,omitempty"` + // API version of the referent. + APIVersion *string `json:"apiVersion,omitempty"` + // Specific resourceVersion to which this reference is made, if any. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + ResourceVersion *string `json:"resourceVersion,omitempty"` + // If referring to a piece of an object instead of an entire object, this string + // should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + // For example, if the object reference is to a container within a pod, this would take on a value like: + // "spec.containers{name}" (where "name" refers to the name of the container that triggered + // the event) or if no container name is specified "spec.containers[2]" (container with + // index 2 in this pod). This syntax is chosen only to have some well-defined way of + // referencing a part of an object. + // TODO: this design is not final and this field is subject to change in the future. + FieldPath *string `json:"fieldPath,omitempty"` } // ObjectReferenceApplyConfiguration constructs a declarative configuration of the ObjectReference type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolume.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolume.go index 25a0c69df1eef..4ef8ed4b5f3d4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolume.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolume.go @@ -29,11 +29,24 @@ import ( // PersistentVolumeApplyConfiguration represents a declarative configuration of the PersistentVolume type for use // with apply. +// +// PersistentVolume (PV) is a storage resource provisioned by an administrator. +// It is analogous to a node. +// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes type PersistentVolumeApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PersistentVolumeSpecApplyConfiguration `json:"spec,omitempty"` - Status *PersistentVolumeStatusApplyConfiguration `json:"status,omitempty"` + // spec defines a specification of a persistent volume owned by the cluster. + // Provisioned by an administrator. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes + Spec *PersistentVolumeSpecApplyConfiguration `json:"spec,omitempty"` + // status represents the current information/status for the persistent volume. + // Populated by the system. + // Read-only. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes + Status *PersistentVolumeStatusApplyConfiguration `json:"status,omitempty"` } // PersistentVolume constructs a declarative configuration of the PersistentVolume type for use with @@ -46,6 +59,26 @@ func PersistentVolume(name string) *PersistentVolumeApplyConfiguration { return b } +// ExtractPersistentVolumeFrom extracts the applied configuration owned by fieldManager from +// persistentVolume for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// persistentVolume must be a unmodified PersistentVolume API object that was retrieved from the Kubernetes API. +// ExtractPersistentVolumeFrom 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. +func ExtractPersistentVolumeFrom(persistentVolume *corev1.PersistentVolume, fieldManager string, subresource string) (*PersistentVolumeApplyConfiguration, error) { + b := &PersistentVolumeApplyConfiguration{} + err := managedfields.ExtractInto(persistentVolume, internal.Parser().Type("io.k8s.api.core.v1.PersistentVolume"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(persistentVolume.Name) + + b.WithKind("PersistentVolume") + b.WithAPIVersion("v1") + return b, nil +} + // ExtractPersistentVolume extracts the applied configuration owned by fieldManager from // persistentVolume. If no managedFields are found in persistentVolume for fieldManager, a // PersistentVolumeApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +89,16 @@ func PersistentVolume(name string) *PersistentVolumeApplyConfiguration { // ExtractPersistentVolume 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 ExtractPersistentVolume(persistentVolume *corev1.PersistentVolume, fieldManager string) (*PersistentVolumeApplyConfiguration, error) { - return extractPersistentVolume(persistentVolume, fieldManager, "") + return ExtractPersistentVolumeFrom(persistentVolume, fieldManager, "") } -// ExtractPersistentVolumeStatus is the same as ExtractPersistentVolume except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractPersistentVolumeStatus extracts the applied configuration owned by fieldManager from +// persistentVolume for the status subresource. func ExtractPersistentVolumeStatus(persistentVolume *corev1.PersistentVolume, fieldManager string) (*PersistentVolumeApplyConfiguration, error) { - return extractPersistentVolume(persistentVolume, fieldManager, "status") + return ExtractPersistentVolumeFrom(persistentVolume, fieldManager, "status") } -func extractPersistentVolume(persistentVolume *corev1.PersistentVolume, fieldManager string, subresource string) (*PersistentVolumeApplyConfiguration, error) { - b := &PersistentVolumeApplyConfiguration{} - err := managedfields.ExtractInto(persistentVolume, internal.Parser().Type("io.k8s.api.core.v1.PersistentVolume"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(persistentVolume.Name) - - b.WithKind("PersistentVolume") - b.WithAPIVersion("v1") - return b, nil -} func (b PersistentVolumeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaim.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaim.go index e42d443b44aa7..d77417f359d7b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaim.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaim.go @@ -29,11 +29,20 @@ import ( // PersistentVolumeClaimApplyConfiguration represents a declarative configuration of the PersistentVolumeClaim type for use // with apply. +// +// PersistentVolumeClaim is a user's request for and claim to a persistent volume type PersistentVolumeClaimApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PersistentVolumeClaimSpecApplyConfiguration `json:"spec,omitempty"` - Status *PersistentVolumeClaimStatusApplyConfiguration `json:"status,omitempty"` + // spec defines the desired characteristics of a volume requested by a pod author. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + Spec *PersistentVolumeClaimSpecApplyConfiguration `json:"spec,omitempty"` + // status represents the current information/status of a persistent volume claim. + // Read-only. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + Status *PersistentVolumeClaimStatusApplyConfiguration `json:"status,omitempty"` } // PersistentVolumeClaim constructs a declarative configuration of the PersistentVolumeClaim type for use with @@ -47,6 +56,27 @@ func PersistentVolumeClaim(name, namespace string) *PersistentVolumeClaimApplyCo return b } +// ExtractPersistentVolumeClaimFrom extracts the applied configuration owned by fieldManager from +// persistentVolumeClaim for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// persistentVolumeClaim must be a unmodified PersistentVolumeClaim API object that was retrieved from the Kubernetes API. +// ExtractPersistentVolumeClaimFrom 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. +func ExtractPersistentVolumeClaimFrom(persistentVolumeClaim *corev1.PersistentVolumeClaim, fieldManager string, subresource string) (*PersistentVolumeClaimApplyConfiguration, error) { + b := &PersistentVolumeClaimApplyConfiguration{} + err := managedfields.ExtractInto(persistentVolumeClaim, internal.Parser().Type("io.k8s.api.core.v1.PersistentVolumeClaim"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(persistentVolumeClaim.Name) + b.WithNamespace(persistentVolumeClaim.Namespace) + + b.WithKind("PersistentVolumeClaim") + b.WithAPIVersion("v1") + return b, nil +} + // ExtractPersistentVolumeClaim extracts the applied configuration owned by fieldManager from // persistentVolumeClaim. If no managedFields are found in persistentVolumeClaim for fieldManager, a // PersistentVolumeClaimApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +87,16 @@ func PersistentVolumeClaim(name, namespace string) *PersistentVolumeClaimApplyCo // ExtractPersistentVolumeClaim 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 ExtractPersistentVolumeClaim(persistentVolumeClaim *corev1.PersistentVolumeClaim, fieldManager string) (*PersistentVolumeClaimApplyConfiguration, error) { - return extractPersistentVolumeClaim(persistentVolumeClaim, fieldManager, "") + return ExtractPersistentVolumeClaimFrom(persistentVolumeClaim, fieldManager, "") } -// ExtractPersistentVolumeClaimStatus is the same as ExtractPersistentVolumeClaim except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractPersistentVolumeClaimStatus extracts the applied configuration owned by fieldManager from +// persistentVolumeClaim for the status subresource. func ExtractPersistentVolumeClaimStatus(persistentVolumeClaim *corev1.PersistentVolumeClaim, fieldManager string) (*PersistentVolumeClaimApplyConfiguration, error) { - return extractPersistentVolumeClaim(persistentVolumeClaim, fieldManager, "status") + return ExtractPersistentVolumeClaimFrom(persistentVolumeClaim, fieldManager, "status") } -func extractPersistentVolumeClaim(persistentVolumeClaim *corev1.PersistentVolumeClaim, fieldManager string, subresource string) (*PersistentVolumeClaimApplyConfiguration, error) { - b := &PersistentVolumeClaimApplyConfiguration{} - err := managedfields.ExtractInto(persistentVolumeClaim, internal.Parser().Type("io.k8s.api.core.v1.PersistentVolumeClaim"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(persistentVolumeClaim.Name) - b.WithNamespace(persistentVolumeClaim.Namespace) - - b.WithKind("PersistentVolumeClaim") - b.WithAPIVersion("v1") - return b, nil -} func (b PersistentVolumeClaimApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimcondition.go index 40025d533b232..03b32abcc8945 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimcondition.go @@ -25,13 +25,26 @@ import ( // PersistentVolumeClaimConditionApplyConfiguration represents a declarative configuration of the PersistentVolumeClaimCondition type for use // with apply. +// +// PersistentVolumeClaimCondition contains details about state of pvc type PersistentVolumeClaimConditionApplyConfiguration struct { - Type *corev1.PersistentVolumeClaimConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type is the type of the condition. + // More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about + Type *corev1.PersistentVolumeClaimConditionType `json:"type,omitempty"` + // Status is the status of the condition. + // Can be True, False, Unknown. + // More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required + Status *corev1.ConditionStatus `json:"status,omitempty"` + // lastProbeTime is the time we probed the condition. + LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"` + // lastTransitionTime is the time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // reason is a unique, this should be a short, machine understandable string that gives the reason + // for condition's last transition. If it reports "Resizing" that means the underlying + // persistent volume is being resized. + Reason *string `json:"reason,omitempty"` + // message is the human-readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // PersistentVolumeClaimConditionApplyConfiguration constructs a declarative configuration of the PersistentVolumeClaimCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimspec.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimspec.go index 2c2be16b37d47..8710769b771ab 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimspec.go @@ -25,16 +25,73 @@ import ( // PersistentVolumeClaimSpecApplyConfiguration represents a declarative configuration of the PersistentVolumeClaimSpec type for use // with apply. +// +// PersistentVolumeClaimSpec describes the common attributes of storage devices +// and allows a Source for provider-specific attributes type PersistentVolumeClaimSpecApplyConfiguration struct { - AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"` - Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - Resources *VolumeResourceRequirementsApplyConfiguration `json:"resources,omitempty"` - VolumeName *string `json:"volumeName,omitempty"` - StorageClassName *string `json:"storageClassName,omitempty"` - VolumeMode *corev1.PersistentVolumeMode `json:"volumeMode,omitempty"` - DataSource *TypedLocalObjectReferenceApplyConfiguration `json:"dataSource,omitempty"` - DataSourceRef *TypedObjectReferenceApplyConfiguration `json:"dataSourceRef,omitempty"` - VolumeAttributesClassName *string `json:"volumeAttributesClassName,omitempty"` + // accessModes contains the desired access modes the volume should have. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"` + // selector is a label query over volumes to consider for binding. + Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // resources represents the minimum resources the volume should have. + // Users are allowed to specify resource requirements + // that are lower than previous value but must still be higher than capacity recorded in the + // status field of the claim. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + Resources *VolumeResourceRequirementsApplyConfiguration `json:"resources,omitempty"` + // volumeName is the binding reference to the PersistentVolume backing this claim. + VolumeName *string `json:"volumeName,omitempty"` + // storageClassName is the name of the StorageClass required by the claim. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + StorageClassName *string `json:"storageClassName,omitempty"` + // volumeMode defines what type of volume is required by the claim. + // Value of Filesystem is implied when not included in claim spec. + VolumeMode *corev1.PersistentVolumeMode `json:"volumeMode,omitempty"` + // dataSource field can be used to specify either: + // * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + // * An existing PVC (PersistentVolumeClaim) + // If the provisioner or an external controller can support the specified data source, + // it will create a new volume based on the contents of the specified data source. + // When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, + // and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. + // If the namespace is specified, then dataSourceRef will not be copied to dataSource. + DataSource *TypedLocalObjectReferenceApplyConfiguration `json:"dataSource,omitempty"` + // dataSourceRef specifies the object from which to populate the volume with data, if a non-empty + // volume is desired. This may be any object from a non-empty API group (non + // core object) or a PersistentVolumeClaim object. + // When this field is specified, volume binding will only succeed if the type of + // the specified object matches some installed volume populator or dynamic + // provisioner. + // This field will replace the functionality of the dataSource field and as such + // if both fields are non-empty, they must have the same value. For backwards + // compatibility, when namespace isn't specified in dataSourceRef, + // both fields (dataSource and dataSourceRef) will be set to the same + // value automatically if one of them is empty and the other is non-empty. + // When namespace is specified in dataSourceRef, + // dataSource isn't set to the same value and must be empty. + // There are three important differences between dataSource and dataSourceRef: + // * While dataSource only allows two specific types of objects, dataSourceRef + // allows any non-core object, as well as PersistentVolumeClaim objects. + // * While dataSource ignores disallowed values (dropping them), dataSourceRef + // preserves all values, and generates an error if a disallowed value is + // specified. + // * While dataSource only allows local objects, dataSourceRef allows objects + // in any namespaces. + // (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. + // (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + DataSourceRef *TypedObjectReferenceApplyConfiguration `json:"dataSourceRef,omitempty"` + // volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. + // If specified, the CSI driver will create or update the volume with the attributes defined + // in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, + // it can be changed after the claim is created. An empty string or nil value indicates that no + // VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, + // this field can be reset to its previous value (including nil) to cancel the modification. + // If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be + // set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource + // exists. + // More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ + VolumeAttributesClassName *string `json:"volumeAttributesClassName,omitempty"` } // PersistentVolumeClaimSpecApplyConfiguration constructs a declarative configuration of the PersistentVolumeClaimSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimstatus.go index 6cea23a2ce132..ee2d5adbd38a6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimstatus.go @@ -24,15 +24,80 @@ import ( // PersistentVolumeClaimStatusApplyConfiguration represents a declarative configuration of the PersistentVolumeClaimStatus type for use // with apply. +// +// PersistentVolumeClaimStatus is the current status of a persistent volume claim. type PersistentVolumeClaimStatusApplyConfiguration struct { - Phase *corev1.PersistentVolumeClaimPhase `json:"phase,omitempty"` - AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"` - Capacity *corev1.ResourceList `json:"capacity,omitempty"` - Conditions []PersistentVolumeClaimConditionApplyConfiguration `json:"conditions,omitempty"` - AllocatedResources *corev1.ResourceList `json:"allocatedResources,omitempty"` - AllocatedResourceStatuses map[corev1.ResourceName]corev1.ClaimResourceStatus `json:"allocatedResourceStatuses,omitempty"` - CurrentVolumeAttributesClassName *string `json:"currentVolumeAttributesClassName,omitempty"` - ModifyVolumeStatus *ModifyVolumeStatusApplyConfiguration `json:"modifyVolumeStatus,omitempty"` + // phase represents the current phase of PersistentVolumeClaim. + Phase *corev1.PersistentVolumeClaimPhase `json:"phase,omitempty"` + // accessModes contains the actual access modes the volume backing the PVC has. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"` + // capacity represents the actual resources of the underlying volume. + Capacity *corev1.ResourceList `json:"capacity,omitempty"` + // conditions is the current Condition of persistent volume claim. If underlying persistent volume is being + // resized then the Condition will be set to 'Resizing'. + Conditions []PersistentVolumeClaimConditionApplyConfiguration `json:"conditions,omitempty"` + // allocatedResources tracks the resources allocated to a PVC including its capacity. + // Key names follow standard Kubernetes label syntax. Valid values are either: + // * Un-prefixed keys: + // - storage - the capacity of the volume. + // * Custom resources must use implementation-defined prefixed names such as "example.com/my-custom-resource" + // Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered + // reserved and hence may not be used. + // + // Capacity reported here may be larger than the actual capacity when a volume expansion operation + // is requested. + // For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. + // If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. + // If a volume expansion capacity request is lowered, allocatedResources is only + // lowered if there are no expansion operations in progress and if the actual volume capacity + // is equal or lower than the requested capacity. + // + // A controller that receives PVC update with previously unknown resourceName + // should ignore the update for the purpose it was designed. For example - a controller that + // only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid + // resources associated with PVC. + AllocatedResources *corev1.ResourceList `json:"allocatedResources,omitempty"` + // allocatedResourceStatuses stores status of resource being resized for the given PVC. + // Key names follow standard Kubernetes label syntax. Valid values are either: + // * Un-prefixed keys: + // - storage - the capacity of the volume. + // * Custom resources must use implementation-defined prefixed names such as "example.com/my-custom-resource" + // Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered + // reserved and hence may not be used. + // + // ClaimResourceStatus can be in any of following states: + // - ControllerResizeInProgress: + // State set when resize controller starts resizing the volume in control-plane. + // - ControllerResizeFailed: + // State set when resize has failed in resize controller with a terminal error. + // - NodeResizePending: + // State set when resize controller has finished resizing the volume but further resizing of + // volume is needed on the node. + // - NodeResizeInProgress: + // State set when kubelet starts resizing the volume. + // - NodeResizeFailed: + // State set when resizing has failed in kubelet with a terminal error. Transient errors don't set + // NodeResizeFailed. + // For example: if expanding a PVC for more capacity - this field can be one of the following states: + // - pvc.status.allocatedResourceStatus['storage'] = "ControllerResizeInProgress" + // - pvc.status.allocatedResourceStatus['storage'] = "ControllerResizeFailed" + // - pvc.status.allocatedResourceStatus['storage'] = "NodeResizePending" + // - pvc.status.allocatedResourceStatus['storage'] = "NodeResizeInProgress" + // - pvc.status.allocatedResourceStatus['storage'] = "NodeResizeFailed" + // When this field is not set, it means that no resize operation is in progress for the given PVC. + // + // A controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus + // should ignore the update for the purpose it was designed. For example - a controller that + // only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid + // resources associated with PVC. + AllocatedResourceStatuses map[corev1.ResourceName]corev1.ClaimResourceStatus `json:"allocatedResourceStatuses,omitempty"` + // currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. + // When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim + CurrentVolumeAttributesClassName *string `json:"currentVolumeAttributesClassName,omitempty"` + // ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. + // When this is unset, there is no ModifyVolume operation being attempted. + ModifyVolumeStatus *ModifyVolumeStatusApplyConfiguration `json:"modifyVolumeStatus,omitempty"` } // PersistentVolumeClaimStatusApplyConfiguration constructs a declarative configuration of the PersistentVolumeClaimStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go index 8d031c9e8e292..db5ce71a725eb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go @@ -26,9 +26,19 @@ import ( // PersistentVolumeClaimTemplateApplyConfiguration represents a declarative configuration of the PersistentVolumeClaimTemplate type for use // with apply. +// +// PersistentVolumeClaimTemplate is used to produce +// PersistentVolumeClaim objects as part of an EphemeralVolumeSource. type PersistentVolumeClaimTemplateApplyConfiguration struct { + // May contain labels and annotations that will be copied into the PVC + // when creating it. No other fields are allowed and will be rejected during + // validation. *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PersistentVolumeClaimSpecApplyConfiguration `json:"spec,omitempty"` + // The specification for the PersistentVolumeClaim. The entire content is + // copied unchanged into the PVC that gets created from this + // template. The same fields as in a PersistentVolumeClaim + // are also valid here. + Spec *PersistentVolumeClaimSpecApplyConfiguration `json:"spec,omitempty"` } // PersistentVolumeClaimTemplateApplyConfiguration constructs a declarative configuration of the PersistentVolumeClaimTemplate type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimvolumesource.go index ccccdfb49306c..a171ebc1779e2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimvolumesource.go @@ -20,9 +20,18 @@ package v1 // PersistentVolumeClaimVolumeSourceApplyConfiguration represents a declarative configuration of the PersistentVolumeClaimVolumeSource type for use // with apply. +// +// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. +// This volume finds the bound PV and mounts that volume for the pod. A +// PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another +// type of volume that is owned by someone else (the system). type PersistentVolumeClaimVolumeSourceApplyConfiguration struct { + // claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims ClaimName *string `json:"claimName,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // readOnly Will force the ReadOnly setting in VolumeMounts. + // Default false. + ReadOnly *bool `json:"readOnly,omitempty"` } // PersistentVolumeClaimVolumeSourceApplyConfiguration constructs a declarative configuration of the PersistentVolumeClaimVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumesource.go index aba01246224e6..8627148bfc00b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumesource.go @@ -20,29 +20,94 @@ package v1 // PersistentVolumeSourceApplyConfiguration represents a declarative configuration of the PersistentVolumeSource type for use // with apply. +// +// PersistentVolumeSource is similar to VolumeSource but meant for the +// administrator who creates PVs. Exactly one of its members must be set. type PersistentVolumeSourceApplyConfiguration struct { - GCEPersistentDisk *GCEPersistentDiskVolumeSourceApplyConfiguration `json:"gcePersistentDisk,omitempty"` + // gcePersistentDisk represents a GCE Disk resource that is attached to a + // kubelet's host machine and then exposed to the pod. Provisioned by an admin. + // Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree + // gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + GCEPersistentDisk *GCEPersistentDiskVolumeSourceApplyConfiguration `json:"gcePersistentDisk,omitempty"` + // awsElasticBlockStore represents an AWS Disk resource that is attached to a + // kubelet's host machine and then exposed to the pod. + // Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree + // awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore AWSElasticBlockStore *AWSElasticBlockStoreVolumeSourceApplyConfiguration `json:"awsElasticBlockStore,omitempty"` - HostPath *HostPathVolumeSourceApplyConfiguration `json:"hostPath,omitempty"` - Glusterfs *GlusterfsPersistentVolumeSourceApplyConfiguration `json:"glusterfs,omitempty"` - NFS *NFSVolumeSourceApplyConfiguration `json:"nfs,omitempty"` - RBD *RBDPersistentVolumeSourceApplyConfiguration `json:"rbd,omitempty"` - ISCSI *ISCSIPersistentVolumeSourceApplyConfiguration `json:"iscsi,omitempty"` - Cinder *CinderPersistentVolumeSourceApplyConfiguration `json:"cinder,omitempty"` - CephFS *CephFSPersistentVolumeSourceApplyConfiguration `json:"cephfs,omitempty"` - FC *FCVolumeSourceApplyConfiguration `json:"fc,omitempty"` - Flocker *FlockerVolumeSourceApplyConfiguration `json:"flocker,omitempty"` - FlexVolume *FlexPersistentVolumeSourceApplyConfiguration `json:"flexVolume,omitempty"` - AzureFile *AzureFilePersistentVolumeSourceApplyConfiguration `json:"azureFile,omitempty"` - VsphereVolume *VsphereVirtualDiskVolumeSourceApplyConfiguration `json:"vsphereVolume,omitempty"` - Quobyte *QuobyteVolumeSourceApplyConfiguration `json:"quobyte,omitempty"` - AzureDisk *AzureDiskVolumeSourceApplyConfiguration `json:"azureDisk,omitempty"` + // hostPath represents a directory on the host. + // Provisioned by a developer or tester. + // This is useful for single-node development and testing only! + // On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + HostPath *HostPathVolumeSourceApplyConfiguration `json:"hostPath,omitempty"` + // glusterfs represents a Glusterfs volume that is attached to a host and + // exposed to the pod. Provisioned by an admin. + // Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. + // More info: https://examples.k8s.io/volumes/glusterfs/README.md + Glusterfs *GlusterfsPersistentVolumeSourceApplyConfiguration `json:"glusterfs,omitempty"` + // nfs represents an NFS mount on the host. Provisioned by an admin. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + NFS *NFSVolumeSourceApplyConfiguration `json:"nfs,omitempty"` + // rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + // Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. + // More info: https://examples.k8s.io/volumes/rbd/README.md + RBD *RBDPersistentVolumeSourceApplyConfiguration `json:"rbd,omitempty"` + // iscsi represents an ISCSI Disk resource that is attached to a + // kubelet's host machine and then exposed to the pod. Provisioned by an admin. + ISCSI *ISCSIPersistentVolumeSourceApplyConfiguration `json:"iscsi,omitempty"` + // cinder represents a cinder volume attached and mounted on kubelets host machine. + // Deprecated: Cinder is deprecated. All operations for the in-tree cinder type + // are redirected to the cinder.csi.openstack.org CSI driver. + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + Cinder *CinderPersistentVolumeSourceApplyConfiguration `json:"cinder,omitempty"` + // cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + // Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. + CephFS *CephFSPersistentVolumeSourceApplyConfiguration `json:"cephfs,omitempty"` + // fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + FC *FCVolumeSourceApplyConfiguration `json:"fc,omitempty"` + // flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. + // Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. + Flocker *FlockerVolumeSourceApplyConfiguration `json:"flocker,omitempty"` + // flexVolume represents a generic volume resource that is + // provisioned/attached using an exec based plugin. + // Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. + FlexVolume *FlexPersistentVolumeSourceApplyConfiguration `json:"flexVolume,omitempty"` + // azureFile represents an Azure File Service mount on the host and bind mount to the pod. + // Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type + // are redirected to the file.csi.azure.com CSI driver. + AzureFile *AzureFilePersistentVolumeSourceApplyConfiguration `json:"azureFile,omitempty"` + // vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + // Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type + // are redirected to the csi.vsphere.vmware.com CSI driver. + VsphereVolume *VsphereVirtualDiskVolumeSourceApplyConfiguration `json:"vsphereVolume,omitempty"` + // quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + // Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. + Quobyte *QuobyteVolumeSourceApplyConfiguration `json:"quobyte,omitempty"` + // azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + // Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type + // are redirected to the disk.csi.azure.com CSI driver. + AzureDisk *AzureDiskVolumeSourceApplyConfiguration `json:"azureDisk,omitempty"` + // photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. + // Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. PhotonPersistentDisk *PhotonPersistentDiskVolumeSourceApplyConfiguration `json:"photonPersistentDisk,omitempty"` - PortworxVolume *PortworxVolumeSourceApplyConfiguration `json:"portworxVolume,omitempty"` - ScaleIO *ScaleIOPersistentVolumeSourceApplyConfiguration `json:"scaleIO,omitempty"` - Local *LocalVolumeSourceApplyConfiguration `json:"local,omitempty"` - StorageOS *StorageOSPersistentVolumeSourceApplyConfiguration `json:"storageos,omitempty"` - CSI *CSIPersistentVolumeSourceApplyConfiguration `json:"csi,omitempty"` + // portworxVolume represents a portworx volume attached and mounted on kubelets host machine. + // Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type + // are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate + // is on. + PortworxVolume *PortworxVolumeSourceApplyConfiguration `json:"portworxVolume,omitempty"` + // scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. + ScaleIO *ScaleIOPersistentVolumeSourceApplyConfiguration `json:"scaleIO,omitempty"` + // local represents directly-attached storage with node affinity + Local *LocalVolumeSourceApplyConfiguration `json:"local,omitempty"` + // storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod. + // Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. + // More info: https://examples.k8s.io/volumes/storageos/README.md + StorageOS *StorageOSPersistentVolumeSourceApplyConfiguration `json:"storageos,omitempty"` + // csi represents storage that is handled by an external CSI driver. + CSI *CSIPersistentVolumeSourceApplyConfiguration `json:"csi,omitempty"` } // PersistentVolumeSourceApplyConfiguration constructs a declarative configuration of the PersistentVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumespec.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumespec.go index 792e3b94401fe..7dc11740586b8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumespec.go @@ -24,17 +24,48 @@ import ( // PersistentVolumeSpecApplyConfiguration represents a declarative configuration of the PersistentVolumeSpec type for use // with apply. +// +// PersistentVolumeSpec is the specification of a persistent volume. type PersistentVolumeSpecApplyConfiguration struct { - Capacity *corev1.ResourceList `json:"capacity,omitempty"` + // capacity is the description of the persistent volume's resources and capacity. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity + Capacity *corev1.ResourceList `json:"capacity,omitempty"` + // persistentVolumeSource is the actual volume backing the persistent volume. PersistentVolumeSourceApplyConfiguration `json:",inline"` - AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"` - ClaimRef *ObjectReferenceApplyConfiguration `json:"claimRef,omitempty"` - PersistentVolumeReclaimPolicy *corev1.PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty"` - StorageClassName *string `json:"storageClassName,omitempty"` - MountOptions []string `json:"mountOptions,omitempty"` - VolumeMode *corev1.PersistentVolumeMode `json:"volumeMode,omitempty"` - NodeAffinity *VolumeNodeAffinityApplyConfiguration `json:"nodeAffinity,omitempty"` - VolumeAttributesClassName *string `json:"volumeAttributesClassName,omitempty"` + // accessModes contains all ways the volume can be mounted. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"` + // claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + // Expected to be non-nil when bound. + // claim.VolumeName is the authoritative bind between PV and PVC. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + ClaimRef *ObjectReferenceApplyConfiguration `json:"claimRef,omitempty"` + // persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim. + // Valid options are Retain (default for manually created PersistentVolumes), Delete (default + // for dynamically provisioned PersistentVolumes), and Recycle (deprecated). + // Recycle must be supported by the volume plugin underlying this PersistentVolume. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + PersistentVolumeReclaimPolicy *corev1.PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty"` + // storageClassName is the name of StorageClass to which this persistent volume belongs. Empty value + // means that this volume does not belong to any StorageClass. + StorageClassName *string `json:"storageClassName,omitempty"` + // mountOptions is the list of mount options, e.g. ["ro", "soft"]. Not validated - mount will + // simply fail if one is invalid. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + MountOptions []string `json:"mountOptions,omitempty"` + // volumeMode defines if a volume is intended to be used with a formatted filesystem + // or to remain in raw block state. Value of Filesystem is implied when not included in spec. + VolumeMode *corev1.PersistentVolumeMode `json:"volumeMode,omitempty"` + // nodeAffinity defines constraints that limit what nodes this volume can be accessed from. + // This field influences the scheduling of pods that use this volume. + NodeAffinity *VolumeNodeAffinityApplyConfiguration `json:"nodeAffinity,omitempty"` + // Name of VolumeAttributesClass to which this persistent volume belongs. Empty value + // is not allowed. When this field is not set, it indicates that this volume does not belong to any + // VolumeAttributesClass. This field is mutable and can be changed by the CSI driver + // after a volume has been updated successfully to a new class. + // For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound + // PersistentVolumeClaims during the binding process. + VolumeAttributesClassName *string `json:"volumeAttributesClassName,omitempty"` } // PersistentVolumeSpecApplyConfiguration constructs a declarative configuration of the PersistentVolumeSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumestatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumestatus.go index 0bb077ae09764..9d6e5340fe7fe 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumestatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumestatus.go @@ -25,11 +25,20 @@ import ( // PersistentVolumeStatusApplyConfiguration represents a declarative configuration of the PersistentVolumeStatus type for use // with apply. +// +// PersistentVolumeStatus is the current status of a persistent volume. type PersistentVolumeStatusApplyConfiguration struct { - Phase *corev1.PersistentVolumePhase `json:"phase,omitempty"` - Message *string `json:"message,omitempty"` - Reason *string `json:"reason,omitempty"` - LastPhaseTransitionTime *metav1.Time `json:"lastPhaseTransitionTime,omitempty"` + // phase indicates if a volume is available, bound to a claim, or released by a claim. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase + Phase *corev1.PersistentVolumePhase `json:"phase,omitempty"` + // message is a human-readable message indicating details about why the volume is in this state. + Message *string `json:"message,omitempty"` + // reason is a brief CamelCase string that describes any failure and is meant + // for machine parsing and tidy display in the CLI. + Reason *string `json:"reason,omitempty"` + // lastPhaseTransitionTime is the time the phase transitioned from one to another + // and automatically resets to current time everytime a volume phase transitions. + LastPhaseTransitionTime *metav1.Time `json:"lastPhaseTransitionTime,omitempty"` } // PersistentVolumeStatusApplyConfiguration constructs a declarative configuration of the PersistentVolumeStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/photonpersistentdiskvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/photonpersistentdiskvolumesource.go index d8dc103e2af14..585e50ea4af4f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/photonpersistentdiskvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/photonpersistentdiskvolumesource.go @@ -20,8 +20,14 @@ package v1 // PhotonPersistentDiskVolumeSourceApplyConfiguration represents a declarative configuration of the PhotonPersistentDiskVolumeSource type for use // with apply. +// +// Represents a Photon Controller persistent disk resource. type PhotonPersistentDiskVolumeSourceApplyConfiguration struct { - PdID *string `json:"pdID,omitempty"` + // pdID is the ID that identifies Photon Controller persistent disk + PdID *string `json:"pdID,omitempty"` + // fsType is the filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. FSType *string `json:"fsType,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/pod.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/pod.go index df4e99b32f097..d10d38de19e35 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/pod.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/pod.go @@ -29,11 +29,23 @@ import ( // PodApplyConfiguration represents a declarative configuration of the Pod type for use // with apply. +// +// Pod is a collection of containers that can run on a host. This resource is created +// by clients and scheduled onto hosts. type PodApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PodSpecApplyConfiguration `json:"spec,omitempty"` - Status *PodStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of the pod. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *PodSpecApplyConfiguration `json:"spec,omitempty"` + // Most recently observed status of the pod. + // This data may not be up to date. + // Populated by the system. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *PodStatusApplyConfiguration `json:"status,omitempty"` } // Pod constructs a declarative configuration of the Pod type for use with @@ -47,6 +59,27 @@ func Pod(name, namespace string) *PodApplyConfiguration { return b } +// ExtractPodFrom extracts the applied configuration owned by fieldManager from +// pod for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// pod must be a unmodified Pod API object that was retrieved from the Kubernetes API. +// ExtractPodFrom 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. +func ExtractPodFrom(pod *corev1.Pod, fieldManager string, subresource string) (*PodApplyConfiguration, error) { + b := &PodApplyConfiguration{} + err := managedfields.ExtractInto(pod, internal.Parser().Type("io.k8s.api.core.v1.Pod"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(pod.Name) + b.WithNamespace(pod.Namespace) + + b.WithKind("Pod") + b.WithAPIVersion("v1") + return b, nil +} + // ExtractPod extracts the applied configuration owned by fieldManager from // pod. If no managedFields are found in pod for fieldManager, a // PodApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +90,28 @@ func Pod(name, namespace string) *PodApplyConfiguration { // ExtractPod 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 ExtractPod(pod *corev1.Pod, fieldManager string) (*PodApplyConfiguration, error) { - return extractPod(pod, fieldManager, "") + return ExtractPodFrom(pod, fieldManager, "") } -// ExtractPodStatus is the same as ExtractPod except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractPodStatus(pod *corev1.Pod, fieldManager string) (*PodApplyConfiguration, error) { - return extractPod(pod, fieldManager, "status") +// ExtractPodEphemeralcontainers extracts the applied configuration owned by fieldManager from +// pod for the ephemeralcontainers subresource. +func ExtractPodEphemeralcontainers(pod *corev1.Pod, fieldManager string) (*PodApplyConfiguration, error) { + return ExtractPodFrom(pod, fieldManager, "ephemeralcontainers") } -func extractPod(pod *corev1.Pod, fieldManager string, subresource string) (*PodApplyConfiguration, error) { - b := &PodApplyConfiguration{} - err := managedfields.ExtractInto(pod, internal.Parser().Type("io.k8s.api.core.v1.Pod"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(pod.Name) - b.WithNamespace(pod.Namespace) +// ExtractPodResize extracts the applied configuration owned by fieldManager from +// pod for the resize subresource. +func ExtractPodResize(pod *corev1.Pod, fieldManager string) (*PodApplyConfiguration, error) { + return ExtractPodFrom(pod, fieldManager, "resize") +} - b.WithKind("Pod") - b.WithAPIVersion("v1") - return b, nil +// ExtractPodStatus extracts the applied configuration owned by fieldManager from +// pod for the status subresource. +func ExtractPodStatus(pod *corev1.Pod, fieldManager string) (*PodApplyConfiguration, error) { + return ExtractPodFrom(pod, fieldManager, "status") } + func (b PodApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podaffinity.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podaffinity.go index 23fed95464691..dda9727a69004 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podaffinity.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podaffinity.go @@ -20,8 +20,26 @@ package v1 // PodAffinityApplyConfiguration represents a declarative configuration of the PodAffinity type for use // with apply. +// +// Pod affinity is a group of inter pod affinity scheduling rules. type PodAffinityApplyConfiguration struct { - RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTermApplyConfiguration `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"` + // If the affinity requirements specified by this field are not met at + // scheduling time, the pod will not be scheduled onto the node. + // If the affinity requirements specified by this field cease to be met + // at some point during pod execution (e.g. due to a pod label update), the + // system may or may not try to eventually evict the pod from its node. + // When there are multiple elements, the lists of nodes corresponding to each + // podAffinityTerm are intersected, i.e. all terms must be satisfied. + RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTermApplyConfiguration `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"` + // The scheduler will prefer to schedule pods to nodes that satisfy + // the affinity expressions specified by this field, but it may choose + // a node that violates one or more of the expressions. The node that is + // most preferred is the one with the greatest sum of weights, i.e. + // for each node that meets all of the scheduling requirements (resource + // request, requiredDuringScheduling affinity expressions, etc.), + // compute a sum by iterating through the elements of this field and adding + // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + // node(s) with the highest sum are the most preferred. PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTermApplyConfiguration `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podaffinityterm.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podaffinityterm.go index 1cc1ca0d06322..8dbf0c66a7ebb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podaffinityterm.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podaffinityterm.go @@ -24,13 +24,52 @@ import ( // PodAffinityTermApplyConfiguration represents a declarative configuration of the PodAffinityTerm type for use // with apply. +// +// Defines a set of pods (namely those matching the labelSelector +// relative to the given namespace(s)) that this pod should be +// co-located (affinity) or not co-located (anti-affinity) with, +// where co-located is defined as running on a node whose value of +// the label with key matches that of any node on which +// a pod of the set of pods is running type PodAffinityTermApplyConfiguration struct { - LabelSelector *metav1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"` - Namespaces []string `json:"namespaces,omitempty"` - TopologyKey *string `json:"topologyKey,omitempty"` + // A label query over a set of resources, in this case pods. + // If it's null, this PodAffinityTerm matches with no Pods. + LabelSelector *metav1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"` + // namespaces specifies a static list of namespace names that the term applies to. + // The term is applied to the union of the namespaces listed in this field + // and the ones selected by namespaceSelector. + // null or empty namespaces list and null namespaceSelector means "this pod's namespace". + Namespaces []string `json:"namespaces,omitempty"` + // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + // the labelSelector in the specified namespaces, where co-located is defined as running on a node + // whose value of the label with key topologyKey matches that of any node on which any of the + // selected pods is running. + // Empty topologyKey is not allowed. + TopologyKey *string `json:"topologyKey,omitempty"` + // A label query over the set of namespaces that the term applies to. + // The term is applied to the union of the namespaces selected by this field + // and the ones listed in the namespaces field. + // null selector and null or empty namespaces list means "this pod's namespace". + // An empty selector ({}) matches all namespaces. NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` - MatchLabelKeys []string `json:"matchLabelKeys,omitempty"` - MismatchLabelKeys []string `json:"mismatchLabelKeys,omitempty"` + // MatchLabelKeys is a set of pod label keys to select which pods will + // be taken into consideration. The keys are used to lookup values from the + // incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + // to select the group of existing pods which pods will be taken into consideration + // for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + // pod labels will be ignored. The default value is empty. + // The same key is forbidden to exist in both matchLabelKeys and labelSelector. + // Also, matchLabelKeys cannot be set when labelSelector isn't set. + MatchLabelKeys []string `json:"matchLabelKeys,omitempty"` + // MismatchLabelKeys is a set of pod label keys to select which pods will + // be taken into consideration. The keys are used to lookup values from the + // incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + // to select the group of existing pods which pods will be taken into consideration + // for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + // pod labels will be ignored. The default value is empty. + // The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + // Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + MismatchLabelKeys []string `json:"mismatchLabelKeys,omitempty"` } // PodAffinityTermApplyConfiguration constructs a declarative configuration of the PodAffinityTerm type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podantiaffinity.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podantiaffinity.go index ae9848963df10..5e1ece1984b26 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podantiaffinity.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podantiaffinity.go @@ -20,8 +20,26 @@ package v1 // PodAntiAffinityApplyConfiguration represents a declarative configuration of the PodAntiAffinity type for use // with apply. +// +// Pod anti affinity is a group of inter pod anti affinity scheduling rules. type PodAntiAffinityApplyConfiguration struct { - RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTermApplyConfiguration `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"` + // If the anti-affinity requirements specified by this field are not met at + // scheduling time, the pod will not be scheduled onto the node. + // If the anti-affinity requirements specified by this field cease to be met + // at some point during pod execution (e.g. due to a pod label update), the + // system may or may not try to eventually evict the pod from its node. + // When there are multiple elements, the lists of nodes corresponding to each + // podAffinityTerm are intersected, i.e. all terms must be satisfied. + RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTermApplyConfiguration `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"` + // The scheduler will prefer to schedule pods to nodes that satisfy + // the anti-affinity expressions specified by this field, but it may choose + // a node that violates one or more of the expressions. The node that is + // most preferred is the one with the greatest sum of weights, i.e. + // for each node that meets all of the scheduling requirements (resource + // request, requiredDuringScheduling anti-affinity expressions, etc.), + // compute a sum by iterating through the elements of this field and subtracting + // "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the + // node(s) with the highest sum are the most preferred. PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTermApplyConfiguration `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podcertificateprojection.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podcertificateprojection.go index 1b6ffffba765e..ee8c5ca3ad7d9 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podcertificateprojection.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podcertificateprojection.go @@ -20,12 +20,60 @@ package v1 // PodCertificateProjectionApplyConfiguration represents a declarative configuration of the PodCertificateProjection type for use // with apply. +// +// PodCertificateProjection provides a private key and X.509 certificate in the +// pod filesystem. type PodCertificateProjectionApplyConfiguration struct { - SignerName *string `json:"signerName,omitempty"` - KeyType *string `json:"keyType,omitempty"` - MaxExpirationSeconds *int32 `json:"maxExpirationSeconds,omitempty"` + // Kubelet's generated CSRs will be addressed to this signer. + SignerName *string `json:"signerName,omitempty"` + // The type of keypair Kubelet will generate for the pod. + // + // Valid values are "RSA3072", "RSA4096", "ECDSAP256", "ECDSAP384", + // "ECDSAP521", and "ED25519". + KeyType *string `json:"keyType,omitempty"` + // maxExpirationSeconds is the maximum lifetime permitted for the + // certificate. + // + // Kubelet copies this value verbatim into the PodCertificateRequests it + // generates for this projection. + // + // If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver + // will reject values shorter than 3600 (1 hour). The maximum allowable + // value is 7862400 (91 days). + // + // The signer implementation is then free to issue a certificate with any + // lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 + // seconds (1 hour). This constraint is enforced by kube-apiserver. + // `kubernetes.io` signers will never issue certificates with a lifetime + // longer than 24 hours. + MaxExpirationSeconds *int32 `json:"maxExpirationSeconds,omitempty"` + // Write the credential bundle at this path in the projected volume. + // + // The credential bundle is a single file that contains multiple PEM blocks. + // The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private + // key. + // + // The remaining blocks are CERTIFICATE blocks, containing the issued + // certificate chain from the signer (leaf and any intermediates). + // + // Using credentialBundlePath lets your Pod's application code make a single + // atomic read that retrieves a consistent key and certificate chain. If you + // project them to separate files, your application code will need to + // additionally check that the leaf certificate was issued to the key. CredentialBundlePath *string `json:"credentialBundlePath,omitempty"` - KeyPath *string `json:"keyPath,omitempty"` + // Write the key at this path in the projected volume. + // + // Most applications should use credentialBundlePath. When using keyPath + // and certificateChainPath, your application needs to check that the key + // and leaf certificate are consistent, because it is possible to read the + // files mid-rotation. + KeyPath *string `json:"keyPath,omitempty"` + // Write the certificate chain at this path in the projected volume. + // + // Most applications should use credentialBundlePath. When using keyPath + // and certificateChainPath, your application needs to check that the key + // and leaf certificate are consistent, because it is possible to read the + // files mid-rotation. CertificateChainPath *string `json:"certificateChainPath,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podcondition.go index 90bb8711b18aa..55e55dd0f2bce 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podcondition.go @@ -25,14 +25,27 @@ import ( // PodConditionApplyConfiguration represents a declarative configuration of the PodCondition type for use // with apply. +// +// PodCondition contains details for the current condition of this pod. type PodConditionApplyConfiguration struct { - Type *corev1.PodConditionType `json:"type,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type is the type of the condition. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions + Type *corev1.PodConditionType `json:"type,omitempty"` + // If set, this represents the .metadata.generation that the pod condition was set based upon. + // The PodObservedGenerationTracking feature gate must be enabled to use this field. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // Status is the status of the condition. + // Can be True, False, Unknown. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions + Status *corev1.ConditionStatus `json:"status,omitempty"` + // Last time we probed the condition. + LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"` + // Last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // Unique, one-word, CamelCase reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // Human-readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // PodConditionApplyConfiguration constructs a declarative configuration of the PodCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/poddnsconfig.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/poddnsconfig.go index 2e0ce9a91e68e..a725e3a91028f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/poddnsconfig.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/poddnsconfig.go @@ -20,10 +20,23 @@ package v1 // PodDNSConfigApplyConfiguration represents a declarative configuration of the PodDNSConfig type for use // with apply. +// +// PodDNSConfig defines the DNS parameters of a pod in addition to +// those generated from DNSPolicy. type PodDNSConfigApplyConfiguration struct { - Nameservers []string `json:"nameservers,omitempty"` - Searches []string `json:"searches,omitempty"` - Options []PodDNSConfigOptionApplyConfiguration `json:"options,omitempty"` + // A list of DNS name server IP addresses. + // This will be appended to the base nameservers generated from DNSPolicy. + // Duplicated nameservers will be removed. + Nameservers []string `json:"nameservers,omitempty"` + // A list of DNS search domains for host-name lookup. + // This will be appended to the base search paths generated from DNSPolicy. + // Duplicated search paths will be removed. + Searches []string `json:"searches,omitempty"` + // A list of DNS resolver options. + // This will be merged with the base options generated from DNSPolicy. + // Duplicated entries will be removed. Resolution options given in Options + // will override those that appear in the base DNSPolicy. + Options []PodDNSConfigOptionApplyConfiguration `json:"options,omitempty"` } // PodDNSConfigApplyConfiguration constructs a declarative configuration of the PodDNSConfig type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/poddnsconfigoption.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/poddnsconfigoption.go index 458b333bf23c0..3b9a868e4e039 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/poddnsconfigoption.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/poddnsconfigoption.go @@ -20,8 +20,13 @@ package v1 // PodDNSConfigOptionApplyConfiguration represents a declarative configuration of the PodDNSConfigOption type for use // with apply. +// +// PodDNSConfigOption defines DNS resolver options of a pod. type PodDNSConfigOptionApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // Name is this DNS resolver option's name. + // Required. + Name *string `json:"name,omitempty"` + // Value is this DNS resolver option's value. Value *string `json:"value,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podextendedresourceclaimstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podextendedresourceclaimstatus.go index d437886305a50..460936eea29cc 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podextendedresourceclaimstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podextendedresourceclaimstatus.go @@ -20,9 +20,17 @@ package v1 // PodExtendedResourceClaimStatusApplyConfiguration represents a declarative configuration of the PodExtendedResourceClaimStatus type for use // with apply. +// +// PodExtendedResourceClaimStatus is stored in the PodStatus for the extended +// resource requests backed by DRA. It stores the generated name for +// the corresponding special ResourceClaim created by the scheduler. type PodExtendedResourceClaimStatusApplyConfiguration struct { - RequestMappings []ContainerExtendedResourceRequestApplyConfiguration `json:"requestMappings,omitempty"` - ResourceClaimName *string `json:"resourceClaimName,omitempty"` + // RequestMappings identifies the mapping of to device request + // in the generated ResourceClaim. + RequestMappings []ContainerExtendedResourceRequestApplyConfiguration `json:"requestMappings,omitempty"` + // ResourceClaimName is the name of the ResourceClaim that was + // generated for the Pod in the namespace of the Pod. + ResourceClaimName *string `json:"resourceClaimName,omitempty"` } // PodExtendedResourceClaimStatusApplyConfiguration constructs a declarative configuration of the PodExtendedResourceClaimStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podip.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podip.go index 73f089856f702..42412090b7552 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podip.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podip.go @@ -20,7 +20,10 @@ package v1 // PodIPApplyConfiguration represents a declarative configuration of the PodIP type for use // with apply. +// +// PodIP represents a single IP address allocated to the pod. type PodIPApplyConfiguration struct { + // IP is the IP address assigned to the pod IP *string `json:"ip,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podos.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podos.go index 22a74560115e6..8c0010b6a5cdc 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podos.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podos.go @@ -24,7 +24,13 @@ import ( // PodOSApplyConfiguration represents a declarative configuration of the PodOS type for use // with apply. +// +// PodOS defines the OS parameters of a pod. type PodOSApplyConfiguration struct { + // Name is the name of the operating system. The currently supported values are linux and windows. + // Additional value may be defined in future and can be one of: + // https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration + // Clients should expect to handle additional values and treat unrecognized values in this field as os: null Name *corev1.OSName `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podreadinessgate.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podreadinessgate.go index 4298b1ca62a2f..b86f48378c66e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podreadinessgate.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podreadinessgate.go @@ -24,7 +24,10 @@ import ( // PodReadinessGateApplyConfiguration represents a declarative configuration of the PodReadinessGate type for use // with apply. +// +// PodReadinessGate contains the reference to a pod condition type PodReadinessGateApplyConfiguration struct { + // ConditionType refers to a condition in the pod's condition list with matching type. ConditionType *corev1.PodConditionType `json:"conditionType,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podresourceclaim.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podresourceclaim.go index b0bd67fa11372..93d2280f0dfa6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podresourceclaim.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podresourceclaim.go @@ -20,9 +20,38 @@ package v1 // PodResourceClaimApplyConfiguration represents a declarative configuration of the PodResourceClaim type for use // with apply. +// +// PodResourceClaim references exactly one ResourceClaim, either directly +// or by naming a ResourceClaimTemplate which is then turned into a ResourceClaim +// for the pod. +// +// It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. +// Containers that need access to the ResourceClaim reference it with this name. type PodResourceClaimApplyConfiguration struct { - Name *string `json:"name,omitempty"` - ResourceClaimName *string `json:"resourceClaimName,omitempty"` + // Name uniquely identifies this resource claim inside the pod. + // This must be a DNS_LABEL. + Name *string `json:"name,omitempty"` + // ResourceClaimName is the name of a ResourceClaim object in the same + // namespace as this pod. + // + // Exactly one of ResourceClaimName and ResourceClaimTemplateName must + // be set. + ResourceClaimName *string `json:"resourceClaimName,omitempty"` + // ResourceClaimTemplateName is the name of a ResourceClaimTemplate + // object in the same namespace as this pod. + // + // The template will be used to create a new ResourceClaim, which will + // be bound to this pod. When this pod is deleted, the ResourceClaim + // will also be deleted. The pod name and resource name, along with a + // generated component, will be used to form a unique name for the + // ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. + // + // This field is immutable and no changes will be made to the + // corresponding ResourceClaim by the control plane after creating the + // ResourceClaim. + // + // Exactly one of ResourceClaimName and ResourceClaimTemplateName must + // be set. ResourceClaimTemplateName *string `json:"resourceClaimTemplateName,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podresourceclaimstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podresourceclaimstatus.go index f60ad4b052950..f0673fa0f118c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podresourceclaimstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podresourceclaimstatus.go @@ -20,8 +20,19 @@ package v1 // PodResourceClaimStatusApplyConfiguration represents a declarative configuration of the PodResourceClaimStatus type for use // with apply. +// +// PodResourceClaimStatus is stored in the PodStatus for each PodResourceClaim +// which references a ResourceClaimTemplate. It stores the generated name for +// the corresponding ResourceClaim. type PodResourceClaimStatusApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // Name uniquely identifies this resource claim inside the pod. + // This must match the name of an entry in pod.spec.resourceClaims, + // which implies that the string must be a DNS_LABEL. + Name *string `json:"name,omitempty"` + // ResourceClaimName is the name of the ResourceClaim that was + // generated for the Pod in the namespace of the Pod. If this is + // unset, then generating a ResourceClaim was not necessary. The + // pod.spec.resourceClaims entry can be ignored in this case. ResourceClaimName *string `json:"resourceClaimName,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podschedulinggate.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podschedulinggate.go index 3d910927765e9..bf9d551e8f9fe 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podschedulinggate.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podschedulinggate.go @@ -20,7 +20,11 @@ package v1 // PodSchedulingGateApplyConfiguration represents a declarative configuration of the PodSchedulingGate type for use // with apply. +// +// PodSchedulingGate is associated to a Pod to guard its scheduling. type PodSchedulingGateApplyConfiguration struct { + // Name of the scheduling gate. + // Each scheduling gate must have a unique name field. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go index f0a3e662c834b..a6f1629ed76e0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go @@ -24,20 +24,114 @@ import ( // PodSecurityContextApplyConfiguration represents a declarative configuration of the PodSecurityContext type for use // with apply. +// +// PodSecurityContext holds pod-level security attributes and common container settings. +// Some fields are also present in container.securityContext. Field values of +// container.securityContext take precedence over field values of PodSecurityContext. type PodSecurityContextApplyConfiguration struct { - SELinuxOptions *SELinuxOptionsApplyConfiguration `json:"seLinuxOptions,omitempty"` - WindowsOptions *WindowsSecurityContextOptionsApplyConfiguration `json:"windowsOptions,omitempty"` - RunAsUser *int64 `json:"runAsUser,omitempty"` - RunAsGroup *int64 `json:"runAsGroup,omitempty"` - RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"` - SupplementalGroups []int64 `json:"supplementalGroups,omitempty"` - SupplementalGroupsPolicy *corev1.SupplementalGroupsPolicy `json:"supplementalGroupsPolicy,omitempty"` - FSGroup *int64 `json:"fsGroup,omitempty"` - Sysctls []SysctlApplyConfiguration `json:"sysctls,omitempty"` - FSGroupChangePolicy *corev1.PodFSGroupChangePolicy `json:"fsGroupChangePolicy,omitempty"` - SeccompProfile *SeccompProfileApplyConfiguration `json:"seccompProfile,omitempty"` - AppArmorProfile *AppArmorProfileApplyConfiguration `json:"appArmorProfile,omitempty"` - SELinuxChangePolicy *corev1.PodSELinuxChangePolicy `json:"seLinuxChangePolicy,omitempty"` + // The SELinux context to be applied to all containers. + // If unspecified, the container runtime will allocate a random SELinux context for each + // container. May also be set in SecurityContext. If set in + // both SecurityContext and PodSecurityContext, the value specified in SecurityContext + // takes precedence for that container. + // Note that this field cannot be set when spec.os.name is windows. + SELinuxOptions *SELinuxOptionsApplyConfiguration `json:"seLinuxOptions,omitempty"` + // The Windows specific settings applied to all containers. + // If unspecified, the options within a container's SecurityContext will be used. + // If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + // Note that this field cannot be set when spec.os.name is linux. + WindowsOptions *WindowsSecurityContextOptionsApplyConfiguration `json:"windowsOptions,omitempty"` + // The UID to run the entrypoint of the container process. + // Defaults to user specified in image metadata if unspecified. + // May also be set in SecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence + // for that container. + // Note that this field cannot be set when spec.os.name is windows. + RunAsUser *int64 `json:"runAsUser,omitempty"` + // The GID to run the entrypoint of the container process. + // Uses runtime default if unset. + // May also be set in SecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence + // for that container. + // Note that this field cannot be set when spec.os.name is windows. + RunAsGroup *int64 `json:"runAsGroup,omitempty"` + // Indicates that the container must run as a non-root user. + // If true, the Kubelet will validate the image at runtime to ensure that it + // does not run as UID 0 (root) and fail to start the container if it does. + // If unset or false, no such validation will be performed. + // May also be set in SecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"` + // A list of groups applied to the first process run in each container, in + // addition to the container's primary GID and fsGroup (if specified). If + // the SupplementalGroupsPolicy feature is enabled, the + // supplementalGroupsPolicy field determines whether these are in addition + // to or instead of any group memberships defined in the container image. + // If unspecified, no additional groups are added, though group memberships + // defined in the container image may still be used, depending on the + // supplementalGroupsPolicy field. + // Note that this field cannot be set when spec.os.name is windows. + SupplementalGroups []int64 `json:"supplementalGroups,omitempty"` + // Defines how supplemental groups of the first container processes are calculated. + // Valid values are "Merge" and "Strict". If not specified, "Merge" is used. + // (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled + // and the container runtime must implement support for this feature. + // Note that this field cannot be set when spec.os.name is windows. + // TODO: update the default value to "Merge" when spec.os.name is not windows in v1.34 + SupplementalGroupsPolicy *corev1.SupplementalGroupsPolicy `json:"supplementalGroupsPolicy,omitempty"` + // A special supplemental group that applies to all containers in a pod. + // Some volume types allow the Kubelet to change the ownership of that volume + // to be owned by the pod: + // + // 1. The owning GID will be the FSGroup + // 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + // 3. The permission bits are OR'd with rw-rw---- + // + // If unset, the Kubelet will not modify the ownership and permissions of any volume. + // Note that this field cannot be set when spec.os.name is windows. + FSGroup *int64 `json:"fsGroup,omitempty"` + // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + // sysctls (by the container runtime) might fail to launch. + // Note that this field cannot be set when spec.os.name is windows. + Sysctls []SysctlApplyConfiguration `json:"sysctls,omitempty"` + // fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + // before being exposed inside Pod. This field will only apply to + // volume types which support fsGroup based ownership(and permissions). + // It will have no effect on ephemeral volume types such as: secret, configmaps + // and emptydir. + // Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + // Note that this field cannot be set when spec.os.name is windows. + FSGroupChangePolicy *corev1.PodFSGroupChangePolicy `json:"fsGroupChangePolicy,omitempty"` + // The seccomp options to use by the containers in this pod. + // Note that this field cannot be set when spec.os.name is windows. + SeccompProfile *SeccompProfileApplyConfiguration `json:"seccompProfile,omitempty"` + // appArmorProfile is the AppArmor options to use by the containers in this pod. + // Note that this field cannot be set when spec.os.name is windows. + AppArmorProfile *AppArmorProfileApplyConfiguration `json:"appArmorProfile,omitempty"` + // seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. + // It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. + // Valid values are "MountOption" and "Recursive". + // + // "Recursive" means relabeling of all files on all Pod volumes by the container runtime. + // This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. + // + // "MountOption" mounts all eligible Pod volumes with `-o context` mount option. + // This requires all Pods that share the same volume to use the same SELinux label. + // It is not possible to share the same volume among privileged and unprivileged Pods. + // Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes + // whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their + // CSIDriver instance. Other volumes are always re-labelled recursively. + // "MountOption" value is allowed only when SELinuxMount feature gate is enabled. + // + // If not specified and SELinuxMount feature gate is enabled, "MountOption" is used. + // If not specified and SELinuxMount feature gate is disabled, "MountOption" is used for ReadWriteOncePod volumes + // and "Recursive" for all other volumes. + // + // This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. + // + // All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. + // Note that this field cannot be set when spec.os.name is windows. + SELinuxChangePolicy *corev1.PodSELinuxChangePolicy `json:"seLinuxChangePolicy,omitempty"` } // PodSecurityContextApplyConfiguration constructs a declarative configuration of the PodSecurityContext type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podspec.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podspec.go index 82a1afa61c569..499848cefa908 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podspec.go @@ -24,48 +24,255 @@ import ( // PodSpecApplyConfiguration represents a declarative configuration of the PodSpec type for use // with apply. +// +// PodSpec is a description of a pod. type PodSpecApplyConfiguration struct { - Volumes []VolumeApplyConfiguration `json:"volumes,omitempty"` - InitContainers []ContainerApplyConfiguration `json:"initContainers,omitempty"` - Containers []ContainerApplyConfiguration `json:"containers,omitempty"` - EphemeralContainers []EphemeralContainerApplyConfiguration `json:"ephemeralContainers,omitempty"` - RestartPolicy *corev1.RestartPolicy `json:"restartPolicy,omitempty"` - TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` - ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` - DNSPolicy *corev1.DNSPolicy `json:"dnsPolicy,omitempty"` - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - ServiceAccountName *string `json:"serviceAccountName,omitempty"` - DeprecatedServiceAccount *string `json:"serviceAccount,omitempty"` - AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"` - NodeName *string `json:"nodeName,omitempty"` - HostNetwork *bool `json:"hostNetwork,omitempty"` - HostPID *bool `json:"hostPID,omitempty"` - HostIPC *bool `json:"hostIPC,omitempty"` - ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty"` - SecurityContext *PodSecurityContextApplyConfiguration `json:"securityContext,omitempty"` - ImagePullSecrets []LocalObjectReferenceApplyConfiguration `json:"imagePullSecrets,omitempty"` - Hostname *string `json:"hostname,omitempty"` - Subdomain *string `json:"subdomain,omitempty"` - Affinity *AffinityApplyConfiguration `json:"affinity,omitempty"` - SchedulerName *string `json:"schedulerName,omitempty"` - Tolerations []TolerationApplyConfiguration `json:"tolerations,omitempty"` - HostAliases []HostAliasApplyConfiguration `json:"hostAliases,omitempty"` - PriorityClassName *string `json:"priorityClassName,omitempty"` - Priority *int32 `json:"priority,omitempty"` - DNSConfig *PodDNSConfigApplyConfiguration `json:"dnsConfig,omitempty"` - ReadinessGates []PodReadinessGateApplyConfiguration `json:"readinessGates,omitempty"` - RuntimeClassName *string `json:"runtimeClassName,omitempty"` - EnableServiceLinks *bool `json:"enableServiceLinks,omitempty"` - PreemptionPolicy *corev1.PreemptionPolicy `json:"preemptionPolicy,omitempty"` - Overhead *corev1.ResourceList `json:"overhead,omitempty"` - TopologySpreadConstraints []TopologySpreadConstraintApplyConfiguration `json:"topologySpreadConstraints,omitempty"` - SetHostnameAsFQDN *bool `json:"setHostnameAsFQDN,omitempty"` - OS *PodOSApplyConfiguration `json:"os,omitempty"` - HostUsers *bool `json:"hostUsers,omitempty"` - SchedulingGates []PodSchedulingGateApplyConfiguration `json:"schedulingGates,omitempty"` - ResourceClaims []PodResourceClaimApplyConfiguration `json:"resourceClaims,omitempty"` - Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` - HostnameOverride *string `json:"hostnameOverride,omitempty"` + // List of volumes that can be mounted by containers belonging to the pod. + // More info: https://kubernetes.io/docs/concepts/storage/volumes + Volumes []VolumeApplyConfiguration `json:"volumes,omitempty"` + // List of initialization containers belonging to the pod. + // Init containers are executed in order prior to containers being started. If any + // init container fails, the pod is considered to have failed and is handled according + // to its restartPolicy. The name for an init container or normal container must be + // unique among all containers. + // Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. + // The resourceRequirements of an init container are taken into account during scheduling + // by finding the highest request/limit for each resource type, and then using the max of + // that value or the sum of the normal containers. Limits are applied to init containers + // in a similar fashion. + // Init containers cannot currently be added or removed. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + InitContainers []ContainerApplyConfiguration `json:"initContainers,omitempty"` + // List of containers belonging to the pod. + // Containers cannot currently be added or removed. + // There must be at least one container in a Pod. + // Cannot be updated. + Containers []ContainerApplyConfiguration `json:"containers,omitempty"` + // List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing + // pod to perform user-initiated actions such as debugging. This list cannot be specified when + // creating a pod, and it cannot be modified by updating the pod spec. In order to add an + // ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. + EphemeralContainers []EphemeralContainerApplyConfiguration `json:"ephemeralContainers,omitempty"` + // Restart policy for all containers within the pod. + // One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. + // Default to Always. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + RestartPolicy *corev1.RestartPolicy `json:"restartPolicy,omitempty"` + // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. + // Value must be non-negative integer. The value zero indicates stop immediately via + // the kill signal (no opportunity to shut down). + // If this value is nil, the default grace period will be used instead. + // The grace period is the duration in seconds after the processes running in the pod are sent + // a termination signal and the time when the processes are forcibly halted with a kill signal. + // Set this value longer than the expected cleanup time for your process. + // Defaults to 30 seconds. + TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` + // Optional duration in seconds the pod may be active on the node relative to + // StartTime before the system will actively try to mark it failed and kill associated containers. + // Value must be a positive integer. + ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` + // Set DNS policy for the pod. + // Defaults to "ClusterFirst". + // Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. + // DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. + // To have DNS options set along with hostNetwork, you have to specify DNS policy + // explicitly to 'ClusterFirstWithHostNet'. + DNSPolicy *corev1.DNSPolicy `json:"dnsPolicy,omitempty"` + // NodeSelector is a selector which must be true for the pod to fit on a node. + // Selector which must match a node's labels for the pod to be scheduled on that node. + // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + // ServiceAccountName is the name of the ServiceAccount to use to run this pod. + // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ServiceAccountName *string `json:"serviceAccountName,omitempty"` + // DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. + // Deprecated: Use serviceAccountName instead. + DeprecatedServiceAccount *string `json:"serviceAccount,omitempty"` + // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. + AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"` + // NodeName indicates in which node this pod is scheduled. + // If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. + // Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. + // This field should not be used to express a desire for the pod to be scheduled on a specific node. + // https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename + NodeName *string `json:"nodeName,omitempty"` + // Host networking requested for this pod. Use the host's network namespace. + // When using HostNetwork you should specify ports so the scheduler is aware. + // When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, + // and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. + // Default to false. + HostNetwork *bool `json:"hostNetwork,omitempty"` + // Use the host's pid namespace. + // Optional: Default to false. + HostPID *bool `json:"hostPID,omitempty"` + // Use the host's ipc namespace. + // Optional: Default to false. + HostIPC *bool `json:"hostIPC,omitempty"` + // Share a single process namespace between all of the containers in a pod. + // When this is set containers will be able to view and signal processes from other containers + // in the same pod, and the first process in each container will not be assigned PID 1. + // HostPID and ShareProcessNamespace cannot both be set. + // Optional: Default to false. + ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty"` + // SecurityContext holds pod-level security attributes and common container settings. + // Optional: Defaults to empty. See type description for default values of each field. + SecurityContext *PodSecurityContextApplyConfiguration `json:"securityContext,omitempty"` + // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. + // If specified, these secrets will be passed to individual puller implementations for them to use. + // More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod + ImagePullSecrets []LocalObjectReferenceApplyConfiguration `json:"imagePullSecrets,omitempty"` + // Specifies the hostname of the Pod + // If not specified, the pod's hostname will be set to a system-defined value. + Hostname *string `json:"hostname,omitempty"` + // If specified, the fully qualified Pod hostname will be "...svc.". + // If not specified, the pod will not have a domainname at all. + Subdomain *string `json:"subdomain,omitempty"` + // If specified, the pod's scheduling constraints + Affinity *AffinityApplyConfiguration `json:"affinity,omitempty"` + // If specified, the pod will be dispatched by specified scheduler. + // If not specified, the pod will be dispatched by default scheduler. + SchedulerName *string `json:"schedulerName,omitempty"` + // If specified, the pod's tolerations. + Tolerations []TolerationApplyConfiguration `json:"tolerations,omitempty"` + // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts + // file if specified. + HostAliases []HostAliasApplyConfiguration `json:"hostAliases,omitempty"` + // If specified, indicates the pod's priority. "system-node-critical" and + // "system-cluster-critical" are two special keywords which indicate the + // highest priorities with the former being the highest priority. Any other + // name must be defined by creating a PriorityClass object with that name. + // If not specified, the pod priority will be default or zero if there is no + // default. + PriorityClassName *string `json:"priorityClassName,omitempty"` + // The priority value. Various system components use this field to find the + // priority of the pod. When Priority Admission Controller is enabled, it + // prevents users from setting this field. The admission controller populates + // this field from PriorityClassName. + // The higher the value, the higher the priority. + Priority *int32 `json:"priority,omitempty"` + // Specifies the DNS parameters of a pod. + // Parameters specified here will be merged to the generated DNS + // configuration based on DNSPolicy. + DNSConfig *PodDNSConfigApplyConfiguration `json:"dnsConfig,omitempty"` + // If specified, all readiness gates will be evaluated for pod readiness. + // A pod is ready when all its containers are ready AND + // all conditions specified in the readiness gates have status equal to "True" + // More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates + ReadinessGates []PodReadinessGateApplyConfiguration `json:"readinessGates,omitempty"` + // RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used + // to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. + // If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an + // empty definition that uses the default runtime handler. + // More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class + RuntimeClassName *string `json:"runtimeClassName,omitempty"` + // EnableServiceLinks indicates whether information about services should be injected into pod's + // environment variables, matching the syntax of Docker links. + // Optional: Defaults to true. + EnableServiceLinks *bool `json:"enableServiceLinks,omitempty"` + // PreemptionPolicy is the Policy for preempting pods with lower priority. + // One of Never, PreemptLowerPriority. + // Defaults to PreemptLowerPriority if unset. + PreemptionPolicy *corev1.PreemptionPolicy `json:"preemptionPolicy,omitempty"` + // Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. + // This field will be autopopulated at admission time by the RuntimeClass admission controller. If + // the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. + // The RuntimeClass admission controller will reject Pod create requests which have the overhead already + // set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value + // defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. + // More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + Overhead *corev1.ResourceList `json:"overhead,omitempty"` + // TopologySpreadConstraints describes how a group of pods ought to spread across topology + // domains. Scheduler will schedule pods in a way which abides by the constraints. + // All topologySpreadConstraints are ANDed. + TopologySpreadConstraints []TopologySpreadConstraintApplyConfiguration `json:"topologySpreadConstraints,omitempty"` + // If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + // In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). + // In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. + // If a pod does not have FQDN, this has no effect. + // Default to false. + SetHostnameAsFQDN *bool `json:"setHostnameAsFQDN,omitempty"` + // Specifies the OS of the containers in the pod. + // Some pod and container fields are restricted if this is set. + // + // If the OS field is set to linux, the following fields must be unset: + // -securityContext.windowsOptions + // + // If the OS field is set to windows, following fields must be unset: + // - spec.hostPID + // - spec.hostIPC + // - spec.hostUsers + // - spec.resources + // - spec.securityContext.appArmorProfile + // - spec.securityContext.seLinuxOptions + // - spec.securityContext.seccompProfile + // - spec.securityContext.fsGroup + // - spec.securityContext.fsGroupChangePolicy + // - spec.securityContext.sysctls + // - spec.shareProcessNamespace + // - spec.securityContext.runAsUser + // - spec.securityContext.runAsGroup + // - spec.securityContext.supplementalGroups + // - spec.securityContext.supplementalGroupsPolicy + // - spec.containers[*].securityContext.appArmorProfile + // - spec.containers[*].securityContext.seLinuxOptions + // - spec.containers[*].securityContext.seccompProfile + // - spec.containers[*].securityContext.capabilities + // - spec.containers[*].securityContext.readOnlyRootFilesystem + // - spec.containers[*].securityContext.privileged + // - spec.containers[*].securityContext.allowPrivilegeEscalation + // - spec.containers[*].securityContext.procMount + // - spec.containers[*].securityContext.runAsUser + // - spec.containers[*].securityContext.runAsGroup + OS *PodOSApplyConfiguration `json:"os,omitempty"` + // Use the host's user namespace. + // Optional: Default to true. + // If set to true or not present, the pod will be run in the host user namespace, useful + // for when the pod needs a feature only available to the host user namespace, such as + // loading a kernel module with CAP_SYS_MODULE. + // When set to false, a new userns is created for the pod. Setting false is useful for + // mitigating container breakout vulnerabilities even allowing users to run their + // containers as root without actually having root privileges on the host. + // This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature. + HostUsers *bool `json:"hostUsers,omitempty"` + // SchedulingGates is an opaque list of values that if specified will block scheduling the pod. + // If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the + // scheduler will not attempt to schedule the pod. + // + // SchedulingGates can only be set at pod creation time, and be removed only afterwards. + SchedulingGates []PodSchedulingGateApplyConfiguration `json:"schedulingGates,omitempty"` + // ResourceClaims defines which ResourceClaims must be allocated + // and reserved before the Pod is allowed to start. The resources + // will be made available to those containers which consume them + // by name. + // + // This is a stable field but requires that the + // DynamicResourceAllocation feature gate is enabled. + // + // This field is immutable. + ResourceClaims []PodResourceClaimApplyConfiguration `json:"resourceClaims,omitempty"` + // Resources is the total amount of CPU and Memory resources required by all + // containers in the pod. It supports specifying Requests and Limits for + // "cpu", "memory" and "hugepages-" resource names only. ResourceClaims are not supported. + // + // This field enables fine-grained control over resource allocation for the + // entire pod, allowing resource sharing among containers in a pod. + // TODO: For beta graduation, expand this comment with a detailed explanation. + // + // This is an alpha field and requires enabling the PodLevelResources feature + // gate. + Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` + // HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. + // This field only specifies the pod's hostname and does not affect its DNS records. + // When this field is set to a non-empty string: + // - It takes precedence over the values set in `hostname` and `subdomain`. + // - The Pod's hostname will be set to this value. + // - `setHostnameAsFQDN` must be nil or set to false. + // - `hostNetwork` must be set to false. + // + // This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. + // Requires the HostnameOverride feature gate to be enabled. + HostnameOverride *string `json:"hostnameOverride,omitempty"` } // PodSpecApplyConfiguration constructs a declarative configuration of the PodSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podstatus.go index 4e64342027f5e..aec3785d460b4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podstatus.go @@ -25,24 +25,111 @@ import ( // PodStatusApplyConfiguration represents a declarative configuration of the PodStatus type for use // with apply. +// +// PodStatus represents information about the status of a pod. Status may trail the actual +// state of a system, especially if the node that hosts the pod cannot contact the control +// plane. type PodStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Phase *corev1.PodPhase `json:"phase,omitempty"` - Conditions []PodConditionApplyConfiguration `json:"conditions,omitempty"` - Message *string `json:"message,omitempty"` - 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"` - InitContainerStatuses []ContainerStatusApplyConfiguration `json:"initContainerStatuses,omitempty"` - ContainerStatuses []ContainerStatusApplyConfiguration `json:"containerStatuses,omitempty"` - QOSClass *corev1.PodQOSClass `json:"qosClass,omitempty"` - EphemeralContainerStatuses []ContainerStatusApplyConfiguration `json:"ephemeralContainerStatuses,omitempty"` - Resize *corev1.PodResizeStatus `json:"resize,omitempty"` - ResourceClaimStatuses []PodResourceClaimStatusApplyConfiguration `json:"resourceClaimStatuses,omitempty"` + // If set, this represents the .metadata.generation that the pod status was set based upon. + // The PodObservedGenerationTracking feature gate must be enabled to use this field. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. + // The conditions array, the reason and message fields, and the individual container status + // arrays contain more detail about the pod's status. + // There are five possible phase values: + // + // Pending: The pod has been accepted by the Kubernetes system, but one or more of the + // container images has not been created. This includes time before being scheduled as + // well as time spent downloading images over the network, which could take a while. + // Running: The pod has been bound to a node, and all of the containers have been created. + // At least one container is still running, or is in the process of starting or restarting. + // Succeeded: All containers in the pod have terminated in success, and will not be restarted. + // Failed: All containers in the pod have terminated, and at least one container has + // terminated in failure. The container either exited with non-zero status or was terminated + // by the system. + // Unknown: For some reason the state of the pod could not be obtained, typically due to an + // error in communicating with the host of the pod. + // + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase + Phase *corev1.PodPhase `json:"phase,omitempty"` + // Current service state of pod. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions + Conditions []PodConditionApplyConfiguration `json:"conditions,omitempty"` + // A human readable message indicating details about why the pod is in this condition. + Message *string `json:"message,omitempty"` + // A brief CamelCase message indicating details about why the pod is in this state. + // e.g. 'Evicted' + Reason *string `json:"reason,omitempty"` + // 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. + NominatedNodeName *string `json:"nominatedNodeName,omitempty"` + // 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 a node is assigned to pod + HostIP *string `json:"hostIP,omitempty"` + // 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. + HostIPs []HostIPApplyConfiguration `json:"hostIPs,omitempty"` + // podIP address allocated to the pod. Routable at least within the cluster. + // Empty if not yet allocated. + PodIP *string `json:"podIP,omitempty"` + // 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. + PodIPs []PodIPApplyConfiguration `json:"podIPs,omitempty"` + // 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. + StartTime *metav1.Time `json:"startTime,omitempty"` + // Statuses of init containers in this pod. The most recent successful non-restartable + // init container will have ready = true, the most recently started container will have + // startTime set. + // Each init container in the pod should have at most one status in this list, + // and all statuses should be for containers in the pod. + // However this is not enforced. + // If a status for a non-existent container is present in the list, or the list has duplicate names, + // the behavior of various Kubernetes components is not defined and those statuses might be + // ignored. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-and-container-status + InitContainerStatuses []ContainerStatusApplyConfiguration `json:"initContainerStatuses,omitempty"` + // Statuses of containers in this pod. + // Each container in the pod should have at most one status in this list, + // and all statuses should be for containers in the pod. + // However this is not enforced. + // If a status for a non-existent container is present in the list, or the list has duplicate names, + // the behavior of various Kubernetes components is not defined and those statuses might be + // ignored. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status + ContainerStatuses []ContainerStatusApplyConfiguration `json:"containerStatuses,omitempty"` + // The Quality of Service (QOS) classification assigned to the pod based on resource requirements + // See PodQOSClass type for available QOS classes + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#quality-of-service-classes + QOSClass *corev1.PodQOSClass `json:"qosClass,omitempty"` + // Statuses for any ephemeral containers that have run in this pod. + // Each ephemeral container in the pod should have at most one status in this list, + // and all statuses should be for containers in the pod. + // However this is not enforced. + // If a status for a non-existent container is present in the list, or the list has duplicate names, + // the behavior of various Kubernetes components is not defined and those statuses might be + // ignored. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status + EphemeralContainerStatuses []ContainerStatusApplyConfiguration `json:"ephemeralContainerStatuses,omitempty"` + // Status of resources resize desired for pod's containers. + // It is empty if no resources resize is pending. + // Any changes to container resources will automatically set this to "Proposed" + // Deprecated: Resize status is moved to two pod conditions PodResizePending and PodResizeInProgress. + // PodResizePending will track states where the spec has been resized, but the Kubelet has not yet allocated the resources. + // PodResizeInProgress will track in-progress resizes, and should be present whenever allocated resources != acknowledged resources. + Resize *corev1.PodResizeStatus `json:"resize,omitempty"` + // Status of resource claims. + ResourceClaimStatuses []PodResourceClaimStatusApplyConfiguration `json:"resourceClaimStatuses,omitempty"` + // Status of extended resource claim backed by DRA. ExtendedResourceClaimStatus *PodExtendedResourceClaimStatusApplyConfiguration `json:"extendedResourceClaimStatus,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podtemplate.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podtemplate.go index e723125f2e357..a4a2e300e472c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podtemplate.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podtemplate.go @@ -29,10 +29,16 @@ import ( // PodTemplateApplyConfiguration represents a declarative configuration of the PodTemplate type for use // with apply. +// +// PodTemplate describes a template for creating copies of a predefined pod. type PodTemplateApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Template *PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // Template defines the pods that will be created from this pod template. + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Template *PodTemplateSpecApplyConfiguration `json:"template,omitempty"` } // PodTemplate constructs a declarative configuration of the PodTemplate type for use with @@ -46,29 +52,14 @@ func PodTemplate(name, namespace string) *PodTemplateApplyConfiguration { return b } -// ExtractPodTemplate extracts the applied configuration owned by fieldManager from -// podTemplate. If no managedFields are found in podTemplate for fieldManager, a -// PodTemplateApplyConfiguration 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. +// ExtractPodTemplateFrom extracts the applied configuration owned by fieldManager from +// podTemplate for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // podTemplate must be a unmodified PodTemplate API object that was retrieved from the Kubernetes API. -// ExtractPodTemplate provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractPodTemplateFrom 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 ExtractPodTemplate(podTemplate *corev1.PodTemplate, fieldManager string) (*PodTemplateApplyConfiguration, error) { - return extractPodTemplate(podTemplate, fieldManager, "") -} - -// ExtractPodTemplateStatus is the same as ExtractPodTemplate except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractPodTemplateStatus(podTemplate *corev1.PodTemplate, fieldManager string) (*PodTemplateApplyConfiguration, error) { - return extractPodTemplate(podTemplate, fieldManager, "status") -} - -func extractPodTemplate(podTemplate *corev1.PodTemplate, fieldManager string, subresource string) (*PodTemplateApplyConfiguration, error) { +func ExtractPodTemplateFrom(podTemplate *corev1.PodTemplate, fieldManager string, subresource string) (*PodTemplateApplyConfiguration, error) { b := &PodTemplateApplyConfiguration{} err := managedfields.ExtractInto(podTemplate, internal.Parser().Type("io.k8s.api.core.v1.PodTemplate"), fieldManager, b, subresource) if err != nil { @@ -81,6 +72,21 @@ func extractPodTemplate(podTemplate *corev1.PodTemplate, fieldManager string, su b.WithAPIVersion("v1") return b, nil } + +// ExtractPodTemplate extracts the applied configuration owned by fieldManager from +// podTemplate. If no managedFields are found in podTemplate for fieldManager, a +// PodTemplateApplyConfiguration 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. +// podTemplate must be a unmodified PodTemplate API object that was retrieved from the Kubernetes API. +// ExtractPodTemplate 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. +func ExtractPodTemplate(podTemplate *corev1.PodTemplate, fieldManager string) (*PodTemplateApplyConfiguration, error) { + return ExtractPodTemplateFrom(podTemplate, fieldManager, "") +} + func (b PodTemplateApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podtemplatespec.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podtemplatespec.go index 9aa83092334f9..6e87db6279b9b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podtemplatespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podtemplatespec.go @@ -26,9 +26,15 @@ import ( // PodTemplateSpecApplyConfiguration represents a declarative configuration of the PodTemplateSpec type for use // with apply. +// +// PodTemplateSpec describes the data a pod should have when created from a template type PodTemplateSpecApplyConfiguration struct { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PodSpecApplyConfiguration `json:"spec,omitempty"` + // Specification of the desired behavior of the pod. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *PodSpecApplyConfiguration `json:"spec,omitempty"` } // PodTemplateSpecApplyConfiguration constructs a declarative configuration of the PodTemplateSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/portstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/portstatus.go index eff8fc2acb089..8eb3634156e50 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/portstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/portstatus.go @@ -24,10 +24,23 @@ import ( // PortStatusApplyConfiguration represents a declarative configuration of the PortStatus type for use // with apply. +// +// PortStatus represents the error condition of a service port type PortStatusApplyConfiguration struct { - Port *int32 `json:"port,omitempty"` + // Port is the port number of the service port of which status is recorded here + Port *int32 `json:"port,omitempty"` + // Protocol is the protocol of the service port of which status is recorded here + // The supported values are: "TCP", "UDP", "SCTP" Protocol *corev1.Protocol `json:"protocol,omitempty"` - Error *string `json:"error,omitempty"` + // Error is to record the problem with the service port + // The format of the error shall comply with the following rules: + // - built-in error values shall be specified in this file and those shall use + // CamelCase names + // - cloud provider specific error values must have names that comply with the + // format foo.example.com/CamelCase. + // --- + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + Error *string `json:"error,omitempty"` } // PortStatusApplyConfiguration constructs a declarative configuration of the PortStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/portworxvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/portworxvolumesource.go index 29715e0219223..56948168de92e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/portworxvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/portworxvolumesource.go @@ -20,10 +20,18 @@ package v1 // PortworxVolumeSourceApplyConfiguration represents a declarative configuration of the PortworxVolumeSource type for use // with apply. +// +// PortworxVolumeSource represents a Portworx volume resource. type PortworxVolumeSourceApplyConfiguration struct { + // volumeID uniquely identifies a Portworx volume VolumeID *string `json:"volumeID,omitempty"` - FSType *string `json:"fsType,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // fSType represents the filesystem type to mount + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + FSType *string `json:"fsType,omitempty"` + // readOnly defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + ReadOnly *bool `json:"readOnly,omitempty"` } // PortworxVolumeSourceApplyConfiguration constructs a declarative configuration of the PortworxVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/preferredschedulingterm.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/preferredschedulingterm.go index b88a3646fc5fb..db8d15123791b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/preferredschedulingterm.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/preferredschedulingterm.go @@ -20,8 +20,13 @@ package v1 // PreferredSchedulingTermApplyConfiguration represents a declarative configuration of the PreferredSchedulingTerm type for use // with apply. +// +// An empty preferred scheduling term matches all objects with implicit weight 0 +// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). type PreferredSchedulingTermApplyConfiguration struct { - Weight *int32 `json:"weight,omitempty"` + // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + Weight *int32 `json:"weight,omitempty"` + // A node selector term, associated with the corresponding weight. Preference *NodeSelectorTermApplyConfiguration `json:"preference,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/probe.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/probe.go index d6c654689b920..e6b3ddd7c5faa 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/probe.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/probe.go @@ -20,14 +20,39 @@ package v1 // ProbeApplyConfiguration represents a declarative configuration of the Probe type for use // with apply. +// +// Probe describes a health check to be performed against a container to determine whether it is +// alive or ready to receive traffic. type ProbeApplyConfiguration struct { + // The action taken to determine the health of a container ProbeHandlerApplyConfiguration `json:",inline"` - InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"` - TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` - PeriodSeconds *int32 `json:"periodSeconds,omitempty"` - SuccessThreshold *int32 `json:"successThreshold,omitempty"` - FailureThreshold *int32 `json:"failureThreshold,omitempty"` - TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` + // Number of seconds after the container has started before liveness probes are initiated. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"` + // Number of seconds after which the probe times out. + // Defaults to 1 second. Minimum value is 1. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` + // How often (in seconds) to perform the probe. + // Default to 10 seconds. Minimum value is 1. + PeriodSeconds *int32 `json:"periodSeconds,omitempty"` + // Minimum consecutive successes for the probe to be considered successful after having failed. + // Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + SuccessThreshold *int32 `json:"successThreshold,omitempty"` + // Minimum consecutive failures for the probe to be considered failed after having succeeded. + // Defaults to 3. Minimum value is 1. + FailureThreshold *int32 `json:"failureThreshold,omitempty"` + // Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + // The grace period is the duration in seconds after the processes running in the pod are sent + // a termination signal and the time when the processes are forcibly halted with a kill signal. + // Set this value longer than the expected cleanup time for your process. + // If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + // value overrides the value provided by the pod spec. + // Value must be non-negative integer. The value zero indicates stop immediately via + // the kill signal (no opportunity to shut down). + // This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + // Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` } // ProbeApplyConfiguration constructs a declarative configuration of the Probe type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/probehandler.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/probehandler.go index 1f88745eabfd2..58fce86075564 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/probehandler.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/probehandler.go @@ -20,11 +20,18 @@ package v1 // ProbeHandlerApplyConfiguration represents a declarative configuration of the ProbeHandler type for use // with apply. +// +// ProbeHandler defines a specific action that should be taken in a probe. +// One and only one of the fields must be specified. type ProbeHandlerApplyConfiguration struct { - Exec *ExecActionApplyConfiguration `json:"exec,omitempty"` - HTTPGet *HTTPGetActionApplyConfiguration `json:"httpGet,omitempty"` + // Exec specifies a command to execute in the container. + Exec *ExecActionApplyConfiguration `json:"exec,omitempty"` + // HTTPGet specifies an HTTP GET request to perform. + HTTPGet *HTTPGetActionApplyConfiguration `json:"httpGet,omitempty"` + // TCPSocket specifies a connection to a TCP port. TCPSocket *TCPSocketActionApplyConfiguration `json:"tcpSocket,omitempty"` - GRPC *GRPCActionApplyConfiguration `json:"grpc,omitempty"` + // GRPC specifies a GRPC HealthCheckRequest. + GRPC *GRPCActionApplyConfiguration `json:"grpc,omitempty"` } // ProbeHandlerApplyConfiguration constructs a declarative configuration of the ProbeHandler type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/projectedvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/projectedvolumesource.go index c922ec8cc2820..a17e4d1dfc056 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/projectedvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/projectedvolumesource.go @@ -20,9 +20,19 @@ package v1 // ProjectedVolumeSourceApplyConfiguration represents a declarative configuration of the ProjectedVolumeSource type for use // with apply. +// +// Represents a projected volume source type ProjectedVolumeSourceApplyConfiguration struct { - Sources []VolumeProjectionApplyConfiguration `json:"sources,omitempty"` - DefaultMode *int32 `json:"defaultMode,omitempty"` + // sources is the list of volume projections. Each entry in this list + // handles one source. + Sources []VolumeProjectionApplyConfiguration `json:"sources,omitempty"` + // defaultMode are the mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // Directories within the path are not affected by this setting. + // This might be in conflict with other options that affect the file + // mode, like fsGroup, and the result can be other mode bits set. + DefaultMode *int32 `json:"defaultMode,omitempty"` } // ProjectedVolumeSourceApplyConfiguration constructs a declarative configuration of the ProjectedVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/quobytevolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/quobytevolumesource.go index 9a042a0a12dd1..b9ac1ba0d0fcd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/quobytevolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/quobytevolumesource.go @@ -20,13 +20,28 @@ package v1 // QuobyteVolumeSourceApplyConfiguration represents a declarative configuration of the QuobyteVolumeSource type for use // with apply. +// +// Represents a Quobyte mount that lasts the lifetime of a pod. +// Quobyte volumes do not support ownership management or SELinux relabeling. type QuobyteVolumeSourceApplyConfiguration struct { + // registry represents a single or multiple Quobyte Registry services + // specified as a string as host:port pair (multiple entries are separated with commas) + // which acts as the central registry for volumes Registry *string `json:"registry,omitempty"` - Volume *string `json:"volume,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - User *string `json:"user,omitempty"` - Group *string `json:"group,omitempty"` - Tenant *string `json:"tenant,omitempty"` + // volume is a string that references an already created Quobyte volume by name. + Volume *string `json:"volume,omitempty"` + // readOnly here will force the Quobyte volume to be mounted with read-only permissions. + // Defaults to false. + ReadOnly *bool `json:"readOnly,omitempty"` + // user to map volume access to + // Defaults to serivceaccount user + User *string `json:"user,omitempty"` + // group to map volume access to + // Default is no group + Group *string `json:"group,omitempty"` + // tenant owning the given Quobyte volume in the Backend + // Used with dynamically provisioned Quobyte volumes, value is set by the plugin + Tenant *string `json:"tenant,omitempty"` } // QuobyteVolumeSourceApplyConfiguration constructs a declarative configuration of the QuobyteVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/rbdpersistentvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/rbdpersistentvolumesource.go index 64f25724a36e4..e1f0960e50e34 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/rbdpersistentvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/rbdpersistentvolumesource.go @@ -20,15 +20,43 @@ package v1 // RBDPersistentVolumeSourceApplyConfiguration represents a declarative configuration of the RBDPersistentVolumeSource type for use // with apply. +// +// Represents a Rados Block Device mount that lasts the lifetime of a pod. +// RBD volumes support ownership management and SELinux relabeling. type RBDPersistentVolumeSourceApplyConfiguration struct { - CephMonitors []string `json:"monitors,omitempty"` - RBDImage *string `json:"image,omitempty"` - FSType *string `json:"fsType,omitempty"` - RBDPool *string `json:"pool,omitempty"` - RadosUser *string `json:"user,omitempty"` - Keyring *string `json:"keyring,omitempty"` - SecretRef *SecretReferenceApplyConfiguration `json:"secretRef,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // monitors is a collection of Ceph monitors. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + CephMonitors []string `json:"monitors,omitempty"` + // image is the rados image name. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + RBDImage *string `json:"image,omitempty"` + // fsType is the filesystem type of the volume that you want to mount. + // Tip: Ensure that the filesystem type is supported by the host operating system. + // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + // TODO: how do we prevent errors in the filesystem from compromising the machine + FSType *string `json:"fsType,omitempty"` + // pool is the rados pool name. + // Default is rbd. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + RBDPool *string `json:"pool,omitempty"` + // user is the rados user name. + // Default is admin. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + RadosUser *string `json:"user,omitempty"` + // keyring is the path to key ring for RBDUser. + // Default is /etc/ceph/keyring. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + Keyring *string `json:"keyring,omitempty"` + // secretRef is name of the authentication secret for RBDUser. If provided + // overrides keyring. + // Default is nil. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + SecretRef *SecretReferenceApplyConfiguration `json:"secretRef,omitempty"` + // readOnly here will force the ReadOnly setting in VolumeMounts. + // Defaults to false. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + ReadOnly *bool `json:"readOnly,omitempty"` } // RBDPersistentVolumeSourceApplyConfiguration constructs a declarative configuration of the RBDPersistentVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/rbdvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/rbdvolumesource.go index 8dae198c09c41..907bcedb0c36c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/rbdvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/rbdvolumesource.go @@ -20,15 +20,43 @@ package v1 // RBDVolumeSourceApplyConfiguration represents a declarative configuration of the RBDVolumeSource type for use // with apply. +// +// Represents a Rados Block Device mount that lasts the lifetime of a pod. +// RBD volumes support ownership management and SELinux relabeling. type RBDVolumeSourceApplyConfiguration struct { - CephMonitors []string `json:"monitors,omitempty"` - RBDImage *string `json:"image,omitempty"` - FSType *string `json:"fsType,omitempty"` - RBDPool *string `json:"pool,omitempty"` - RadosUser *string `json:"user,omitempty"` - Keyring *string `json:"keyring,omitempty"` - SecretRef *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // monitors is a collection of Ceph monitors. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + CephMonitors []string `json:"monitors,omitempty"` + // image is the rados image name. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + RBDImage *string `json:"image,omitempty"` + // fsType is the filesystem type of the volume that you want to mount. + // Tip: Ensure that the filesystem type is supported by the host operating system. + // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + // TODO: how do we prevent errors in the filesystem from compromising the machine + FSType *string `json:"fsType,omitempty"` + // pool is the rados pool name. + // Default is rbd. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + RBDPool *string `json:"pool,omitempty"` + // user is the rados user name. + // Default is admin. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + RadosUser *string `json:"user,omitempty"` + // keyring is the path to key ring for RBDUser. + // Default is /etc/ceph/keyring. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + Keyring *string `json:"keyring,omitempty"` + // secretRef is name of the authentication secret for RBDUser. If provided + // overrides keyring. + // Default is nil. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + SecretRef *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` + // readOnly here will force the ReadOnly setting in VolumeMounts. + // Defaults to false. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + ReadOnly *bool `json:"readOnly,omitempty"` } // RBDVolumeSourceApplyConfiguration constructs a declarative configuration of the RBDVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontroller.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontroller.go index 6b06c2907c079..a6416c4b77c19 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontroller.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontroller.go @@ -29,11 +29,23 @@ import ( // ReplicationControllerApplyConfiguration represents a declarative configuration of the ReplicationController type for use // with apply. +// +// ReplicationController represents the configuration of a replication controller. type ReplicationControllerApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // If the Labels of a ReplicationController are empty, they are defaulted to + // be the same as the Pod(s) that the replication controller manages. + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ReplicationControllerSpecApplyConfiguration `json:"spec,omitempty"` - Status *ReplicationControllerStatusApplyConfiguration `json:"status,omitempty"` + // Spec defines the specification of the desired behavior of the replication controller. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *ReplicationControllerSpecApplyConfiguration `json:"spec,omitempty"` + // Status is the most recently observed status of the replication controller. + // This data may be out of date by some window of time. + // Populated by the system. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *ReplicationControllerStatusApplyConfiguration `json:"status,omitempty"` } // ReplicationController constructs a declarative configuration of the ReplicationController type for use with @@ -47,6 +59,27 @@ func ReplicationController(name, namespace string) *ReplicationControllerApplyCo return b } +// ExtractReplicationControllerFrom extracts the applied configuration owned by fieldManager from +// replicationController for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// replicationController must be a unmodified ReplicationController API object that was retrieved from the Kubernetes API. +// ExtractReplicationControllerFrom 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. +func ExtractReplicationControllerFrom(replicationController *corev1.ReplicationController, fieldManager string, subresource string) (*ReplicationControllerApplyConfiguration, error) { + b := &ReplicationControllerApplyConfiguration{} + err := managedfields.ExtractInto(replicationController, internal.Parser().Type("io.k8s.api.core.v1.ReplicationController"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(replicationController.Name) + b.WithNamespace(replicationController.Namespace) + + b.WithKind("ReplicationController") + b.WithAPIVersion("v1") + return b, nil +} + // ExtractReplicationController extracts the applied configuration owned by fieldManager from // replicationController. If no managedFields are found in replicationController for fieldManager, a // ReplicationControllerApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +90,22 @@ func ReplicationController(name, namespace string) *ReplicationControllerApplyCo // ExtractReplicationController 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 ExtractReplicationController(replicationController *corev1.ReplicationController, fieldManager string) (*ReplicationControllerApplyConfiguration, error) { - return extractReplicationController(replicationController, fieldManager, "") + return ExtractReplicationControllerFrom(replicationController, fieldManager, "") } -// ExtractReplicationControllerStatus is the same as ExtractReplicationController except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractReplicationControllerStatus(replicationController *corev1.ReplicationController, fieldManager string) (*ReplicationControllerApplyConfiguration, error) { - return extractReplicationController(replicationController, fieldManager, "status") +// ExtractReplicationControllerScale extracts the applied configuration owned by fieldManager from +// replicationController for the scale subresource. +func ExtractReplicationControllerScale(replicationController *corev1.ReplicationController, fieldManager string) (*ReplicationControllerApplyConfiguration, error) { + return ExtractReplicationControllerFrom(replicationController, fieldManager, "scale") } -func extractReplicationController(replicationController *corev1.ReplicationController, fieldManager string, subresource string) (*ReplicationControllerApplyConfiguration, error) { - b := &ReplicationControllerApplyConfiguration{} - err := managedfields.ExtractInto(replicationController, internal.Parser().Type("io.k8s.api.core.v1.ReplicationController"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(replicationController.Name) - b.WithNamespace(replicationController.Namespace) - - b.WithKind("ReplicationController") - b.WithAPIVersion("v1") - return b, nil +// ExtractReplicationControllerStatus extracts the applied configuration owned by fieldManager from +// replicationController for the status subresource. +func ExtractReplicationControllerStatus(replicationController *corev1.ReplicationController, fieldManager string) (*ReplicationControllerApplyConfiguration, error) { + return ExtractReplicationControllerFrom(replicationController, fieldManager, "status") } + func (b ReplicationControllerApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollercondition.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollercondition.go index dfcecc0532134..728086853163f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollercondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollercondition.go @@ -25,12 +25,19 @@ import ( // ReplicationControllerConditionApplyConfiguration represents a declarative configuration of the ReplicationControllerCondition type for use // with apply. +// +// ReplicationControllerCondition describes the state of a replication controller at a certain point. type ReplicationControllerConditionApplyConfiguration struct { - Type *corev1.ReplicationControllerConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of replication controller condition. + Type *corev1.ReplicationControllerConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *corev1.ConditionStatus `json:"status,omitempty"` + // The last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // A human readable message indicating details about the transition. + Message *string `json:"message,omitempty"` } // ReplicationControllerConditionApplyConfiguration constructs a declarative configuration of the ReplicationControllerCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollerspec.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollerspec.go index 07bac9f4c92de..e556b8295c314 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollerspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollerspec.go @@ -20,11 +20,29 @@ package v1 // ReplicationControllerSpecApplyConfiguration represents a declarative configuration of the ReplicationControllerSpec type for use // with apply. +// +// ReplicationControllerSpec is the specification of a replication controller. type ReplicationControllerSpecApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - Selector map[string]string `json:"selector,omitempty"` - Template *PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // Replicas is the number of desired replicas. + // This is a pointer to distinguish between explicit zero and unspecified. + // Defaults to 1. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller + Replicas *int32 `json:"replicas,omitempty"` + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // Selector is a label query over pods that should match the Replicas count. + // If Selector is empty, it is defaulted to the labels present on the Pod template. + // Label keys and values that must match in order to be controlled by this replication + // controller, if empty defaulted to labels on Pod template. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector map[string]string `json:"selector,omitempty"` + // Template is the object that describes the pod that will be created if + // insufficient replicas are detected. This takes precedence over a TemplateRef. + // The only allowed template.spec.restartPolicy value is "Always". + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template + Template *PodTemplateSpecApplyConfiguration `json:"template,omitempty"` } // ReplicationControllerSpecApplyConfiguration constructs a declarative configuration of the ReplicationControllerSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollerstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollerstatus.go index c8046aa5a47d5..607d543fa0a64 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollerstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollerstatus.go @@ -20,13 +20,23 @@ package v1 // ReplicationControllerStatusApplyConfiguration represents a declarative configuration of the ReplicationControllerStatus type for use // with apply. +// +// ReplicationControllerStatus represents the current status of a replication +// controller. type ReplicationControllerStatusApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - FullyLabeledReplicas *int32 `json:"fullyLabeledReplicas,omitempty"` - ReadyReplicas *int32 `json:"readyReplicas,omitempty"` - AvailableReplicas *int32 `json:"availableReplicas,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Conditions []ReplicationControllerConditionApplyConfiguration `json:"conditions,omitempty"` + // Replicas is the most recently observed number of replicas. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller + Replicas *int32 `json:"replicas,omitempty"` + // The number of pods that have labels matching the labels of the pod template of the replication controller. + FullyLabeledReplicas *int32 `json:"fullyLabeledReplicas,omitempty"` + // The number of ready replicas for this replication controller. + ReadyReplicas *int32 `json:"readyReplicas,omitempty"` + // The number of available replicas (ready for at least minReadySeconds) for this replication controller. + AvailableReplicas *int32 `json:"availableReplicas,omitempty"` + // ObservedGeneration reflects the generation of the most recently observed replication controller. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // Represents the latest available observations of a replication controller's current state. + Conditions []ReplicationControllerConditionApplyConfiguration `json:"conditions,omitempty"` } // ReplicationControllerStatusApplyConfiguration constructs a declarative configuration of the ReplicationControllerStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourceclaim.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourceclaim.go index b00c692485785..1c283d013ca1f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourceclaim.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourceclaim.go @@ -20,8 +20,16 @@ package v1 // ResourceClaimApplyConfiguration represents a declarative configuration of the ResourceClaim type for use // with apply. +// +// ResourceClaim references one entry in PodSpec.ResourceClaims. type ResourceClaimApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // Name must match the name of one entry in pod.spec.resourceClaims of + // the Pod where this field is used. It makes that resource available + // inside a container. + Name *string `json:"name,omitempty"` + // Request is the name chosen for a request in the referenced claim. + // If empty, everything from the claim is made available, otherwise + // only the result of this request. Request *string `json:"request,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcefieldselector.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcefieldselector.go index 1b4918a633f8e..ebff4d2b1829a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcefieldselector.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcefieldselector.go @@ -24,10 +24,15 @@ import ( // ResourceFieldSelectorApplyConfiguration represents a declarative configuration of the ResourceFieldSelector type for use // with apply. +// +// ResourceFieldSelector represents container resources (cpu, memory) and their output format type ResourceFieldSelectorApplyConfiguration struct { - ContainerName *string `json:"containerName,omitempty"` - Resource *string `json:"resource,omitempty"` - Divisor *resource.Quantity `json:"divisor,omitempty"` + // Container name: required for volumes, optional for env vars + ContainerName *string `json:"containerName,omitempty"` + // Required: resource to select + Resource *string `json:"resource,omitempty"` + // Specifies the output format of the exposed resources, defaults to "1" + Divisor *resource.Quantity `json:"divisor,omitempty"` } // ResourceFieldSelectorApplyConfiguration constructs a declarative configuration of the ResourceFieldSelector type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcehealth.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcehealth.go index 0338780b3e72d..684153c49b464 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcehealth.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcehealth.go @@ -24,9 +24,23 @@ import ( // ResourceHealthApplyConfiguration represents a declarative configuration of the ResourceHealth type for use // with apply. +// +// ResourceHealth represents the health of a resource. It has the latest device health information. +// This is a part of KEP https://kep.k8s.io/4680. type ResourceHealthApplyConfiguration struct { - ResourceID *corev1.ResourceID `json:"resourceID,omitempty"` - Health *corev1.ResourceHealthStatus `json:"health,omitempty"` + // ResourceID is the unique identifier of the resource. See the ResourceID type for more information. + ResourceID *corev1.ResourceID `json:"resourceID,omitempty"` + // Health of the resource. + // can be one of: + // - Healthy: operates as normal + // - Unhealthy: reported unhealthy. We consider this a temporary health issue + // since we do not have a mechanism today to distinguish + // temporary and permanent issues. + // - Unknown: The status cannot be determined. + // For example, Device Plugin got unregistered and hasn't been re-registered since. + // + // In future we may want to introduce the PermanentlyUnhealthy Status. + Health *corev1.ResourceHealthStatus `json:"health,omitempty"` } // ResourceHealthApplyConfiguration constructs a declarative configuration of the ResourceHealth type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcequota.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcequota.go index 7abe77b29ec03..6489d2928d65d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcequota.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcequota.go @@ -29,11 +29,19 @@ import ( // ResourceQuotaApplyConfiguration represents a declarative configuration of the ResourceQuota type for use // with apply. +// +// ResourceQuota sets aggregate quota restrictions enforced per namespace type ResourceQuotaApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ResourceQuotaSpecApplyConfiguration `json:"spec,omitempty"` - Status *ResourceQuotaStatusApplyConfiguration `json:"status,omitempty"` + // Spec defines the desired quota. + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *ResourceQuotaSpecApplyConfiguration `json:"spec,omitempty"` + // Status defines the actual enforced quota and its current usage. + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *ResourceQuotaStatusApplyConfiguration `json:"status,omitempty"` } // ResourceQuota constructs a declarative configuration of the ResourceQuota type for use with @@ -47,6 +55,27 @@ func ResourceQuota(name, namespace string) *ResourceQuotaApplyConfiguration { return b } +// ExtractResourceQuotaFrom extracts the applied configuration owned by fieldManager from +// resourceQuota for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// resourceQuota must be a unmodified ResourceQuota API object that was retrieved from the Kubernetes API. +// ExtractResourceQuotaFrom 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. +func ExtractResourceQuotaFrom(resourceQuota *corev1.ResourceQuota, fieldManager string, subresource string) (*ResourceQuotaApplyConfiguration, error) { + b := &ResourceQuotaApplyConfiguration{} + err := managedfields.ExtractInto(resourceQuota, internal.Parser().Type("io.k8s.api.core.v1.ResourceQuota"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(resourceQuota.Name) + b.WithNamespace(resourceQuota.Namespace) + + b.WithKind("ResourceQuota") + b.WithAPIVersion("v1") + return b, nil +} + // ExtractResourceQuota extracts the applied configuration owned by fieldManager from // resourceQuota. If no managedFields are found in resourceQuota for fieldManager, a // ResourceQuotaApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +86,16 @@ func ResourceQuota(name, namespace string) *ResourceQuotaApplyConfiguration { // ExtractResourceQuota 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 ExtractResourceQuota(resourceQuota *corev1.ResourceQuota, fieldManager string) (*ResourceQuotaApplyConfiguration, error) { - return extractResourceQuota(resourceQuota, fieldManager, "") + return ExtractResourceQuotaFrom(resourceQuota, fieldManager, "") } -// ExtractResourceQuotaStatus is the same as ExtractResourceQuota except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractResourceQuotaStatus extracts the applied configuration owned by fieldManager from +// resourceQuota for the status subresource. func ExtractResourceQuotaStatus(resourceQuota *corev1.ResourceQuota, fieldManager string) (*ResourceQuotaApplyConfiguration, error) { - return extractResourceQuota(resourceQuota, fieldManager, "status") + return ExtractResourceQuotaFrom(resourceQuota, fieldManager, "status") } -func extractResourceQuota(resourceQuota *corev1.ResourceQuota, fieldManager string, subresource string) (*ResourceQuotaApplyConfiguration, error) { - b := &ResourceQuotaApplyConfiguration{} - err := managedfields.ExtractInto(resourceQuota, internal.Parser().Type("io.k8s.api.core.v1.ResourceQuota"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(resourceQuota.Name) - b.WithNamespace(resourceQuota.Namespace) - - b.WithKind("ResourceQuota") - b.WithAPIVersion("v1") - return b, nil -} func (b ResourceQuotaApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcequotaspec.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcequotaspec.go index 36d342fcdd469..a08e4b73f2286 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcequotaspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcequotaspec.go @@ -24,9 +24,18 @@ import ( // ResourceQuotaSpecApplyConfiguration represents a declarative configuration of the ResourceQuotaSpec type for use // with apply. +// +// ResourceQuotaSpec defines the desired hard limits to enforce for Quota. type ResourceQuotaSpecApplyConfiguration struct { - Hard *corev1.ResourceList `json:"hard,omitempty"` - Scopes []corev1.ResourceQuotaScope `json:"scopes,omitempty"` + // hard is the set of desired hard limits for each named resource. + // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ + Hard *corev1.ResourceList `json:"hard,omitempty"` + // A collection of filters that must match each object tracked by a quota. + // If not specified, the quota matches all objects. + Scopes []corev1.ResourceQuotaScope `json:"scopes,omitempty"` + // scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota + // but expressed using ScopeSelectorOperator in combination with possible values. + // For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched. ScopeSelector *ScopeSelectorApplyConfiguration `json:"scopeSelector,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcequotastatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcequotastatus.go index 6338a130829a8..4d7faf84cd048 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcequotastatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcequotastatus.go @@ -24,8 +24,13 @@ import ( // ResourceQuotaStatusApplyConfiguration represents a declarative configuration of the ResourceQuotaStatus type for use // with apply. +// +// ResourceQuotaStatus defines the enforced hard limits and observed use. type ResourceQuotaStatusApplyConfiguration struct { + // Hard is the set of enforced hard limits for each named resource. + // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ Hard *corev1.ResourceList `json:"hard,omitempty"` + // Used is the current observed total usage of the resource in the namespace. Used *corev1.ResourceList `json:"used,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcerequirements.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcerequirements.go index ea77647a91bca..4ba93df18337b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcerequirements.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcerequirements.go @@ -24,10 +24,25 @@ import ( // ResourceRequirementsApplyConfiguration represents a declarative configuration of the ResourceRequirements type for use // with apply. +// +// ResourceRequirements describes the compute resource requirements. type ResourceRequirementsApplyConfiguration struct { - Limits *corev1.ResourceList `json:"limits,omitempty"` - Requests *corev1.ResourceList `json:"requests,omitempty"` - Claims []ResourceClaimApplyConfiguration `json:"claims,omitempty"` + // Limits describes the maximum amount of compute resources allowed. + // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + Limits *corev1.ResourceList `json:"limits,omitempty"` + // Requests describes the minimum amount of compute resources required. + // If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + // otherwise to an implementation-defined value. Requests cannot exceed Limits. + // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + Requests *corev1.ResourceList `json:"requests,omitempty"` + // Claims lists the names of resources, defined in spec.resourceClaims, + // that are used by this container. + // + // This field depends on the + // DynamicResourceAllocation feature gate. + // + // This field is immutable. It can only be set for containers. + Claims []ResourceClaimApplyConfiguration `json:"claims,omitempty"` } // ResourceRequirementsApplyConfiguration constructs a declarative configuration of the ResourceRequirements type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcestatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcestatus.go index e99586659899e..511164e7cfd6e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcestatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcestatus.go @@ -24,8 +24,17 @@ import ( // ResourceStatusApplyConfiguration represents a declarative configuration of the ResourceStatus type for use // with apply. +// +// ResourceStatus represents the status of a single resource allocated to a Pod. type ResourceStatusApplyConfiguration struct { - Name *corev1.ResourceName `json:"name,omitempty"` + // Name of the resource. Must be unique within the pod and in case of non-DRA resource, match one of the resources from the pod spec. + // For DRA resources, the value must be "claim:/". + // When this status is reported about a container, the "claim_name" and "request" must match one of the claims of this container. + Name *corev1.ResourceName `json:"name,omitempty"` + // List of unique resources health. Each element in the list contains an unique resource ID and its health. + // At a minimum, for the lifetime of a Pod, resource ID must uniquely identify the resource allocated to the Pod on the Node. + // If other Pod on the same Node reports the status with the same resource ID, it must be the same resource they share. + // See ResourceID type definition for a specific format it has in various use cases. Resources []ResourceHealthApplyConfiguration `json:"resources,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scaleiopersistentvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scaleiopersistentvolumesource.go index b07f46de918f1..4fcb35ed938ef 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scaleiopersistentvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scaleiopersistentvolumesource.go @@ -20,17 +20,36 @@ package v1 // ScaleIOPersistentVolumeSourceApplyConfiguration represents a declarative configuration of the ScaleIOPersistentVolumeSource type for use // with apply. +// +// ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume type ScaleIOPersistentVolumeSourceApplyConfiguration struct { - Gateway *string `json:"gateway,omitempty"` - System *string `json:"system,omitempty"` - SecretRef *SecretReferenceApplyConfiguration `json:"secretRef,omitempty"` - SSLEnabled *bool `json:"sslEnabled,omitempty"` - ProtectionDomain *string `json:"protectionDomain,omitempty"` - StoragePool *string `json:"storagePool,omitempty"` - StorageMode *string `json:"storageMode,omitempty"` - VolumeName *string `json:"volumeName,omitempty"` - FSType *string `json:"fsType,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // gateway is the host address of the ScaleIO API Gateway. + Gateway *string `json:"gateway,omitempty"` + // system is the name of the storage system as configured in ScaleIO. + System *string `json:"system,omitempty"` + // secretRef references to the secret for ScaleIO user and other + // sensitive information. If this is not provided, Login operation will fail. + SecretRef *SecretReferenceApplyConfiguration `json:"secretRef,omitempty"` + // sslEnabled is the flag to enable/disable SSL communication with Gateway, default false + SSLEnabled *bool `json:"sslEnabled,omitempty"` + // protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. + ProtectionDomain *string `json:"protectionDomain,omitempty"` + // storagePool is the ScaleIO Storage Pool associated with the protection domain. + StoragePool *string `json:"storagePool,omitempty"` + // storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + // Default is ThinProvisioned. + StorageMode *string `json:"storageMode,omitempty"` + // volumeName is the name of a volume already created in the ScaleIO system + // that is associated with this volume source. + VolumeName *string `json:"volumeName,omitempty"` + // fsType is the filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". + // Default is "xfs" + FSType *string `json:"fsType,omitempty"` + // readOnly defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + ReadOnly *bool `json:"readOnly,omitempty"` } // ScaleIOPersistentVolumeSourceApplyConfiguration constructs a declarative configuration of the ScaleIOPersistentVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scaleiovolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scaleiovolumesource.go index 740c05ebb7d46..2a484851bd080 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scaleiovolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scaleiovolumesource.go @@ -20,17 +20,36 @@ package v1 // ScaleIOVolumeSourceApplyConfiguration represents a declarative configuration of the ScaleIOVolumeSource type for use // with apply. +// +// ScaleIOVolumeSource represents a persistent ScaleIO volume type ScaleIOVolumeSourceApplyConfiguration struct { - Gateway *string `json:"gateway,omitempty"` - System *string `json:"system,omitempty"` - SecretRef *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` - SSLEnabled *bool `json:"sslEnabled,omitempty"` - ProtectionDomain *string `json:"protectionDomain,omitempty"` - StoragePool *string `json:"storagePool,omitempty"` - StorageMode *string `json:"storageMode,omitempty"` - VolumeName *string `json:"volumeName,omitempty"` - FSType *string `json:"fsType,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // gateway is the host address of the ScaleIO API Gateway. + Gateway *string `json:"gateway,omitempty"` + // system is the name of the storage system as configured in ScaleIO. + System *string `json:"system,omitempty"` + // secretRef references to the secret for ScaleIO user and other + // sensitive information. If this is not provided, Login operation will fail. + SecretRef *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` + // sslEnabled Flag enable/disable SSL communication with Gateway, default false + SSLEnabled *bool `json:"sslEnabled,omitempty"` + // protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. + ProtectionDomain *string `json:"protectionDomain,omitempty"` + // storagePool is the ScaleIO Storage Pool associated with the protection domain. + StoragePool *string `json:"storagePool,omitempty"` + // storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + // Default is ThinProvisioned. + StorageMode *string `json:"storageMode,omitempty"` + // volumeName is the name of a volume already created in the ScaleIO system + // that is associated with this volume source. + VolumeName *string `json:"volumeName,omitempty"` + // fsType is the filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". + // Default is "xfs". + FSType *string `json:"fsType,omitempty"` + // readOnly Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + ReadOnly *bool `json:"readOnly,omitempty"` } // ScaleIOVolumeSourceApplyConfiguration constructs a declarative configuration of the ScaleIOVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scopedresourceselectorrequirement.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scopedresourceselectorrequirement.go index c2481f490637b..cae949e81abbc 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scopedresourceselectorrequirement.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scopedresourceselectorrequirement.go @@ -24,10 +24,20 @@ import ( // ScopedResourceSelectorRequirementApplyConfiguration represents a declarative configuration of the ScopedResourceSelectorRequirement type for use // with apply. +// +// A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator +// that relates the scope name and values. type ScopedResourceSelectorRequirementApplyConfiguration struct { - ScopeName *corev1.ResourceQuotaScope `json:"scopeName,omitempty"` - Operator *corev1.ScopeSelectorOperator `json:"operator,omitempty"` - Values []string `json:"values,omitempty"` + // The name of the scope that the selector applies to. + ScopeName *corev1.ResourceQuotaScope `json:"scopeName,omitempty"` + // Represents a scope's relationship to a set of values. + // Valid operators are In, NotIn, Exists, DoesNotExist. + Operator *corev1.ScopeSelectorOperator `json:"operator,omitempty"` + // An array of string values. If the operator is In or NotIn, + // the values array must be non-empty. If the operator is Exists or DoesNotExist, + // the values array must be empty. + // This array is replaced during a strategic merge patch. + Values []string `json:"values,omitempty"` } // ScopedResourceSelectorRequirementApplyConfiguration constructs a declarative configuration of the ScopedResourceSelectorRequirement type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scopeselector.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scopeselector.go index a9fb9a1b19710..26c1eabf4de60 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scopeselector.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/scopeselector.go @@ -20,7 +20,11 @@ package v1 // ScopeSelectorApplyConfiguration represents a declarative configuration of the ScopeSelector type for use // with apply. +// +// A scope selector represents the AND of the selectors represented +// by the scoped-resource selector requirements. type ScopeSelectorApplyConfiguration struct { + // A list of scope selector requirements by scope of the resources. MatchExpressions []ScopedResourceSelectorRequirementApplyConfiguration `json:"matchExpressions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/seccompprofile.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/seccompprofile.go index 754bfd1b3e8ad..858ac80faae6e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/seccompprofile.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/seccompprofile.go @@ -24,9 +24,22 @@ import ( // SeccompProfileApplyConfiguration represents a declarative configuration of the SeccompProfile type for use // with apply. +// +// SeccompProfile defines a pod/container's seccomp profile settings. +// Only one profile source may be set. type SeccompProfileApplyConfiguration struct { - Type *corev1.SeccompProfileType `json:"type,omitempty"` - LocalhostProfile *string `json:"localhostProfile,omitempty"` + // type indicates which kind of seccomp profile will be applied. + // Valid options are: + // + // Localhost - a profile defined in a file on the node should be used. + // RuntimeDefault - the container runtime default profile should be used. + // Unconfined - no profile should be applied. + Type *corev1.SeccompProfileType `json:"type,omitempty"` + // localhostProfile indicates a profile defined in a file on the node should be used. + // The profile must be preconfigured on the node to work. + // Must be a descending path, relative to the kubelet's configured seccomp profile location. + // Must be set if type is "Localhost". Must NOT be set for any other type. + LocalhostProfile *string `json:"localhostProfile,omitempty"` } // SeccompProfileApplyConfiguration constructs a declarative configuration of the SeccompProfile type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secret.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secret.go index ff859d86bc95b..42be77931158b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secret.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secret.go @@ -29,13 +29,32 @@ import ( // SecretApplyConfiguration represents a declarative configuration of the Secret type for use // with apply. +// +// Secret holds secret data of a certain type. The total bytes of the values in +// the Data field must be less than MaxSecretSize bytes. type SecretApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Immutable *bool `json:"immutable,omitempty"` - Data map[string][]byte `json:"data,omitempty"` - StringData map[string]string `json:"stringData,omitempty"` - Type *corev1.SecretType `json:"type,omitempty"` + // Immutable, if set to true, ensures that data stored in the Secret cannot + // be updated (only object metadata can be modified). + // If not set to true, the field can be modified at any time. + // Defaulted to nil. + Immutable *bool `json:"immutable,omitempty"` + // Data contains the secret data. Each key must consist of alphanumeric + // characters, '-', '_' or '.'. The serialized form of the secret data is a + // base64 encoded string, representing the arbitrary (possibly non-string) + // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 + Data map[string][]byte `json:"data,omitempty"` + // stringData allows specifying non-binary secret data in string form. + // It is provided as a write-only input field for convenience. + // All keys and values are merged into the data field on write, overwriting any existing values. + // The stringData field is never output when reading from the API. + StringData map[string]string `json:"stringData,omitempty"` + // Used to facilitate programmatic handling of secret data. + // More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types + Type *corev1.SecretType `json:"type,omitempty"` } // Secret constructs a declarative configuration of the Secret type for use with @@ -49,29 +68,14 @@ func Secret(name, namespace string) *SecretApplyConfiguration { return b } -// ExtractSecret extracts the applied configuration owned by fieldManager from -// secret. If no managedFields are found in secret for fieldManager, a -// SecretApplyConfiguration 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. +// ExtractSecretFrom extracts the applied configuration owned by fieldManager from +// secret for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // secret must be a unmodified Secret API object that was retrieved from the Kubernetes API. -// ExtractSecret provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractSecretFrom 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 ExtractSecret(secret *corev1.Secret, fieldManager string) (*SecretApplyConfiguration, error) { - return extractSecret(secret, fieldManager, "") -} - -// ExtractSecretStatus is the same as ExtractSecret except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractSecretStatus(secret *corev1.Secret, fieldManager string) (*SecretApplyConfiguration, error) { - return extractSecret(secret, fieldManager, "status") -} - -func extractSecret(secret *corev1.Secret, fieldManager string, subresource string) (*SecretApplyConfiguration, error) { +func ExtractSecretFrom(secret *corev1.Secret, fieldManager string, subresource string) (*SecretApplyConfiguration, error) { b := &SecretApplyConfiguration{} err := managedfields.ExtractInto(secret, internal.Parser().Type("io.k8s.api.core.v1.Secret"), fieldManager, b, subresource) if err != nil { @@ -84,6 +88,21 @@ func extractSecret(secret *corev1.Secret, fieldManager string, subresource strin b.WithAPIVersion("v1") return b, nil } + +// ExtractSecret extracts the applied configuration owned by fieldManager from +// secret. If no managedFields are found in secret for fieldManager, a +// SecretApplyConfiguration 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. +// secret must be a unmodified Secret API object that was retrieved from the Kubernetes API. +// ExtractSecret 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. +func ExtractSecret(secret *corev1.Secret, fieldManager string) (*SecretApplyConfiguration, error) { + return ExtractSecretFrom(secret, fieldManager, "") +} + func (b SecretApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretenvsource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretenvsource.go index d3cc9f6a625d0..21a6b75248948 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretenvsource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretenvsource.go @@ -20,9 +20,17 @@ package v1 // SecretEnvSourceApplyConfiguration represents a declarative configuration of the SecretEnvSource type for use // with apply. +// +// SecretEnvSource selects a Secret to populate the environment +// variables with. +// +// The contents of the target Secret's Data field will represent the +// key-value pairs as environment variables. type SecretEnvSourceApplyConfiguration struct { + // The Secret to select from. LocalObjectReferenceApplyConfiguration `json:",inline"` - Optional *bool `json:"optional,omitempty"` + // Specify whether the Secret must be defined + Optional *bool `json:"optional,omitempty"` } // SecretEnvSourceApplyConfiguration constructs a declarative configuration of the SecretEnvSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretkeyselector.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretkeyselector.go index f1cd8b2d31eb4..8e83bc813c37f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretkeyselector.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretkeyselector.go @@ -20,10 +20,15 @@ package v1 // SecretKeySelectorApplyConfiguration represents a declarative configuration of the SecretKeySelector type for use // with apply. +// +// SecretKeySelector selects a key of a Secret. type SecretKeySelectorApplyConfiguration struct { + // The name of the secret in the pod's namespace to select from. LocalObjectReferenceApplyConfiguration `json:",inline"` - Key *string `json:"key,omitempty"` - Optional *bool `json:"optional,omitempty"` + // The key of the secret to select from. Must be a valid secret key. + Key *string `json:"key,omitempty"` + // Specify whether the Secret or its key must be defined + Optional *bool `json:"optional,omitempty"` } // SecretKeySelectorApplyConfiguration constructs a declarative configuration of the SecretKeySelector type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretprojection.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretprojection.go index 99fa36ecc0ec0..87016d9fa379c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretprojection.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretprojection.go @@ -20,10 +20,25 @@ package v1 // SecretProjectionApplyConfiguration represents a declarative configuration of the SecretProjection type for use // with apply. +// +// Adapts a secret into a projected volume. +// +// The contents of the target Secret's Data field will be presented in a +// projected volume as files using the keys in the Data field as the file names. +// Note that this is identical to a secret volume source without the default +// mode. type SecretProjectionApplyConfiguration struct { LocalObjectReferenceApplyConfiguration `json:",inline"` - Items []KeyToPathApplyConfiguration `json:"items,omitempty"` - Optional *bool `json:"optional,omitempty"` + // items if unspecified, each key-value pair in the Data field of the referenced + // Secret will be projected into the volume as a file whose name is the + // key and content is the value. If specified, the listed keys will be + // projected into the specified paths, and unlisted keys will not be + // present. If a key is specified which is not present in the Secret, + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + Items []KeyToPathApplyConfiguration `json:"items,omitempty"` + // optional field specify whether the Secret or its key must be defined + Optional *bool `json:"optional,omitempty"` } // SecretProjectionApplyConfiguration constructs a declarative configuration of the SecretProjection type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretreference.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretreference.go index f5e0de23aa6d3..607f825062157 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretreference.go @@ -20,8 +20,13 @@ package v1 // SecretReferenceApplyConfiguration represents a declarative configuration of the SecretReference type for use // with apply. +// +// SecretReference represents a Secret Reference. It has enough information to retrieve secret +// in any namespace type SecretReferenceApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // name is unique within a namespace to reference a secret resource. + Name *string `json:"name,omitempty"` + // namespace defines the space within which the secret name must be unique. Namespace *string `json:"namespace,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretvolumesource.go index 9f765d354da7e..bdc098535e1a7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secretvolumesource.go @@ -20,11 +20,34 @@ package v1 // SecretVolumeSourceApplyConfiguration represents a declarative configuration of the SecretVolumeSource type for use // with apply. +// +// Adapts a Secret into a volume. +// +// The contents of the target Secret's Data field will be presented in a volume +// as files using the keys in the Data field as the file names. +// Secret volumes support ownership management and SELinux relabeling. type SecretVolumeSourceApplyConfiguration struct { - SecretName *string `json:"secretName,omitempty"` - Items []KeyToPathApplyConfiguration `json:"items,omitempty"` - DefaultMode *int32 `json:"defaultMode,omitempty"` - Optional *bool `json:"optional,omitempty"` + // secretName is the name of the secret in the pod's namespace to use. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + SecretName *string `json:"secretName,omitempty"` + // items If unspecified, each key-value pair in the Data field of the referenced + // Secret will be projected into the volume as a file whose name is the + // key and content is the value. If specified, the listed keys will be + // projected into the specified paths, and unlisted keys will not be + // present. If a key is specified which is not present in the Secret, + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + Items []KeyToPathApplyConfiguration `json:"items,omitempty"` + // defaultMode is Optional: mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values + // for mode bits. Defaults to 0644. + // Directories within the path are not affected by this setting. + // This might be in conflict with other options that affect the file + // mode, like fsGroup, and the result can be other mode bits set. + DefaultMode *int32 `json:"defaultMode,omitempty"` + // optional field specify whether the Secret or its keys must be defined + Optional *bool `json:"optional,omitempty"` } // SecretVolumeSourceApplyConfiguration constructs a declarative configuration of the SecretVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/securitycontext.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/securitycontext.go index 99faab72da035..aee2635238f11 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/securitycontext.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/securitycontext.go @@ -24,19 +24,77 @@ import ( // SecurityContextApplyConfiguration represents a declarative configuration of the SecurityContext type for use // with apply. +// +// SecurityContext holds security configuration that will be applied to a container. +// Some fields are present in both SecurityContext and PodSecurityContext. When both +// are set, the values in SecurityContext take precedence. type SecurityContextApplyConfiguration struct { - Capabilities *CapabilitiesApplyConfiguration `json:"capabilities,omitempty"` - Privileged *bool `json:"privileged,omitempty"` - SELinuxOptions *SELinuxOptionsApplyConfiguration `json:"seLinuxOptions,omitempty"` - WindowsOptions *WindowsSecurityContextOptionsApplyConfiguration `json:"windowsOptions,omitempty"` - RunAsUser *int64 `json:"runAsUser,omitempty"` - RunAsGroup *int64 `json:"runAsGroup,omitempty"` - RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"` - ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty"` - AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty"` - ProcMount *corev1.ProcMountType `json:"procMount,omitempty"` - SeccompProfile *SeccompProfileApplyConfiguration `json:"seccompProfile,omitempty"` - AppArmorProfile *AppArmorProfileApplyConfiguration `json:"appArmorProfile,omitempty"` + // The capabilities to add/drop when running containers. + // Defaults to the default set of capabilities granted by the container runtime. + // Note that this field cannot be set when spec.os.name is windows. + Capabilities *CapabilitiesApplyConfiguration `json:"capabilities,omitempty"` + // Run container in privileged mode. + // Processes in privileged containers are essentially equivalent to root on the host. + // Defaults to false. + // Note that this field cannot be set when spec.os.name is windows. + Privileged *bool `json:"privileged,omitempty"` + // The SELinux context to be applied to the container. + // If unspecified, the container runtime will allocate a random SELinux context for each + // container. May also be set in PodSecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + // Note that this field cannot be set when spec.os.name is windows. + SELinuxOptions *SELinuxOptionsApplyConfiguration `json:"seLinuxOptions,omitempty"` + // The Windows specific settings applied to all containers. + // If unspecified, the options from the PodSecurityContext will be used. + // If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + // Note that this field cannot be set when spec.os.name is linux. + WindowsOptions *WindowsSecurityContextOptionsApplyConfiguration `json:"windowsOptions,omitempty"` + // The UID to run the entrypoint of the container process. + // Defaults to user specified in image metadata if unspecified. + // May also be set in PodSecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + // Note that this field cannot be set when spec.os.name is windows. + RunAsUser *int64 `json:"runAsUser,omitempty"` + // The GID to run the entrypoint of the container process. + // Uses runtime default if unset. + // May also be set in PodSecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + // Note that this field cannot be set when spec.os.name is windows. + RunAsGroup *int64 `json:"runAsGroup,omitempty"` + // Indicates that the container must run as a non-root user. + // If true, the Kubelet will validate the image at runtime to ensure that it + // does not run as UID 0 (root) and fail to start the container if it does. + // If unset or false, no such validation will be performed. + // May also be set in PodSecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"` + // Whether this container has a read-only root filesystem. + // Default is false. + // Note that this field cannot be set when spec.os.name is windows. + ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty"` + // AllowPrivilegeEscalation controls whether a process can gain more + // privileges than its parent process. This bool directly controls if + // the no_new_privs flag will be set on the container process. + // AllowPrivilegeEscalation is true always when the container is: + // 1) run as Privileged + // 2) has CAP_SYS_ADMIN + // Note that this field cannot be set when spec.os.name is windows. + AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty"` + // procMount denotes the type of proc mount to use for the containers. + // The default value is Default which uses the container runtime defaults for + // readonly paths and masked paths. + // This requires the ProcMountType feature flag to be enabled. + // Note that this field cannot be set when spec.os.name is windows. + ProcMount *corev1.ProcMountType `json:"procMount,omitempty"` + // The seccomp options to use by this container. If seccomp options are + // provided at both the pod & container level, the container options + // override the pod options. + // Note that this field cannot be set when spec.os.name is windows. + SeccompProfile *SeccompProfileApplyConfiguration `json:"seccompProfile,omitempty"` + // appArmorProfile is the AppArmor options to use by this container. If set, this profile + // overrides the pod's appArmorProfile. + // Note that this field cannot be set when spec.os.name is windows. + AppArmorProfile *AppArmorProfileApplyConfiguration `json:"appArmorProfile,omitempty"` } // SecurityContextApplyConfiguration constructs a declarative configuration of the SecurityContext type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/selinuxoptions.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/selinuxoptions.go index bad01300f04d3..d03e63e27b658 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/selinuxoptions.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/selinuxoptions.go @@ -20,10 +20,16 @@ package v1 // SELinuxOptionsApplyConfiguration represents a declarative configuration of the SELinuxOptions type for use // with apply. +// +// SELinuxOptions are the labels to be applied to the container type SELinuxOptionsApplyConfiguration struct { - User *string `json:"user,omitempty"` - Role *string `json:"role,omitempty"` - Type *string `json:"type,omitempty"` + // User is a SELinux user label that applies to the container. + User *string `json:"user,omitempty"` + // Role is a SELinux role label that applies to the container. + Role *string `json:"role,omitempty"` + // Type is a SELinux type label that applies to the container. + Type *string `json:"type,omitempty"` + // Level is SELinux level label that applies to the container. Level *string `json:"level,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/service.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/service.go index 90d2ca0f8d3f0..b0e667824bcc5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/service.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/service.go @@ -29,11 +29,23 @@ import ( // ServiceApplyConfiguration represents a declarative configuration of the Service type for use // with apply. +// +// Service is a named abstraction of software service (for example, mysql) consisting of local port +// (for example 3306) that the proxy listens on, and the selector that determines which pods +// will answer requests sent through the proxy. type ServiceApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ServiceSpecApplyConfiguration `json:"spec,omitempty"` - Status *ServiceStatusApplyConfiguration `json:"status,omitempty"` + // Spec defines the behavior of a service. + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *ServiceSpecApplyConfiguration `json:"spec,omitempty"` + // Most recently observed status of the service. + // Populated by the system. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *ServiceStatusApplyConfiguration `json:"status,omitempty"` } // Service constructs a declarative configuration of the Service type for use with @@ -47,6 +59,27 @@ func Service(name, namespace string) *ServiceApplyConfiguration { return b } +// ExtractServiceFrom extracts the applied configuration owned by fieldManager from +// service for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// service must be a unmodified Service API object that was retrieved from the Kubernetes API. +// ExtractServiceFrom 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. +func ExtractServiceFrom(service *corev1.Service, fieldManager string, subresource string) (*ServiceApplyConfiguration, error) { + b := &ServiceApplyConfiguration{} + err := managedfields.ExtractInto(service, internal.Parser().Type("io.k8s.api.core.v1.Service"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(service.Name) + b.WithNamespace(service.Namespace) + + b.WithKind("Service") + b.WithAPIVersion("v1") + return b, nil +} + // ExtractService extracts the applied configuration owned by fieldManager from // service. If no managedFields are found in service for fieldManager, a // ServiceApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +90,16 @@ func Service(name, namespace string) *ServiceApplyConfiguration { // ExtractService 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 ExtractService(service *corev1.Service, fieldManager string) (*ServiceApplyConfiguration, error) { - return extractService(service, fieldManager, "") + return ExtractServiceFrom(service, fieldManager, "") } -// ExtractServiceStatus is the same as ExtractService except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractServiceStatus extracts the applied configuration owned by fieldManager from +// service for the status subresource. func ExtractServiceStatus(service *corev1.Service, fieldManager string) (*ServiceApplyConfiguration, error) { - return extractService(service, fieldManager, "status") + return ExtractServiceFrom(service, fieldManager, "status") } -func extractService(service *corev1.Service, fieldManager string, subresource string) (*ServiceApplyConfiguration, error) { - b := &ServiceApplyConfiguration{} - err := managedfields.ExtractInto(service, internal.Parser().Type("io.k8s.api.core.v1.Service"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(service.Name) - b.WithNamespace(service.Namespace) - - b.WithKind("Service") - b.WithAPIVersion("v1") - return b, nil -} func (b ServiceApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/serviceaccount.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/serviceaccount.go index 768acb2eb6ca0..d43934777813b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/serviceaccount.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/serviceaccount.go @@ -29,12 +29,32 @@ import ( // ServiceAccountApplyConfiguration represents a declarative configuration of the ServiceAccount type for use // with apply. +// +// ServiceAccount binds together: +// * a name, understood by users, and perhaps by peripheral systems, for an identity +// * a principal that can be authenticated and authorized +// * a set of secrets type ServiceAccountApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Secrets []ObjectReferenceApplyConfiguration `json:"secrets,omitempty"` - ImagePullSecrets []LocalObjectReferenceApplyConfiguration `json:"imagePullSecrets,omitempty"` - AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"` + // Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. + // Pods are only limited to this list if this service account has a "kubernetes.io/enforce-mountable-secrets" annotation set to "true". + // The "kubernetes.io/enforce-mountable-secrets" annotation is deprecated since v1.32. + // Prefer separate namespaces to isolate access to mounted secrets. + // This field should not be used to find auto-generated service account token secrets for use outside of pods. + // Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. + // More info: https://kubernetes.io/docs/concepts/configuration/secret + Secrets []ObjectReferenceApplyConfiguration `json:"secrets,omitempty"` + // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images + // in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets + // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. + // More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod + ImagePullSecrets []LocalObjectReferenceApplyConfiguration `json:"imagePullSecrets,omitempty"` + // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. + // Can be overridden at the pod level. + AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"` } // ServiceAccount constructs a declarative configuration of the ServiceAccount type for use with @@ -48,29 +68,14 @@ func ServiceAccount(name, namespace string) *ServiceAccountApplyConfiguration { return b } -// ExtractServiceAccount extracts the applied configuration owned by fieldManager from -// serviceAccount. If no managedFields are found in serviceAccount for fieldManager, a -// ServiceAccountApplyConfiguration 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. +// ExtractServiceAccountFrom extracts the applied configuration owned by fieldManager from +// serviceAccount for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // serviceAccount must be a unmodified ServiceAccount API object that was retrieved from the Kubernetes API. -// ExtractServiceAccount provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractServiceAccountFrom 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 ExtractServiceAccount(serviceAccount *corev1.ServiceAccount, fieldManager string) (*ServiceAccountApplyConfiguration, error) { - return extractServiceAccount(serviceAccount, fieldManager, "") -} - -// ExtractServiceAccountStatus is the same as ExtractServiceAccount except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractServiceAccountStatus(serviceAccount *corev1.ServiceAccount, fieldManager string) (*ServiceAccountApplyConfiguration, error) { - return extractServiceAccount(serviceAccount, fieldManager, "status") -} - -func extractServiceAccount(serviceAccount *corev1.ServiceAccount, fieldManager string, subresource string) (*ServiceAccountApplyConfiguration, error) { +func ExtractServiceAccountFrom(serviceAccount *corev1.ServiceAccount, fieldManager string, subresource string) (*ServiceAccountApplyConfiguration, error) { b := &ServiceAccountApplyConfiguration{} err := managedfields.ExtractInto(serviceAccount, internal.Parser().Type("io.k8s.api.core.v1.ServiceAccount"), fieldManager, b, subresource) if err != nil { @@ -83,6 +88,27 @@ func extractServiceAccount(serviceAccount *corev1.ServiceAccount, fieldManager s b.WithAPIVersion("v1") return b, nil } + +// ExtractServiceAccount extracts the applied configuration owned by fieldManager from +// serviceAccount. If no managedFields are found in serviceAccount for fieldManager, a +// ServiceAccountApplyConfiguration 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. +// serviceAccount must be a unmodified ServiceAccount API object that was retrieved from the Kubernetes API. +// ExtractServiceAccount 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. +func ExtractServiceAccount(serviceAccount *corev1.ServiceAccount, fieldManager string) (*ServiceAccountApplyConfiguration, error) { + return ExtractServiceAccountFrom(serviceAccount, fieldManager, "") +} + +// ExtractServiceAccountToken extracts the applied configuration owned by fieldManager from +// serviceAccount for the token subresource. +func ExtractServiceAccountToken(serviceAccount *corev1.ServiceAccount, fieldManager string) (*ServiceAccountApplyConfiguration, error) { + return ExtractServiceAccountFrom(serviceAccount, fieldManager, "token") +} + func (b ServiceAccountApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/serviceaccounttokenprojection.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/serviceaccounttokenprojection.go index fab81bf8a2f89..e2bf69bc4456e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/serviceaccounttokenprojection.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/serviceaccounttokenprojection.go @@ -20,10 +20,27 @@ package v1 // ServiceAccountTokenProjectionApplyConfiguration represents a declarative configuration of the ServiceAccountTokenProjection type for use // with apply. +// +// ServiceAccountTokenProjection represents a projected service account token +// volume. This projection can be used to insert a service account token into +// the pods runtime filesystem for use against APIs (Kubernetes API Server or +// otherwise). type ServiceAccountTokenProjectionApplyConfiguration struct { - Audience *string `json:"audience,omitempty"` - ExpirationSeconds *int64 `json:"expirationSeconds,omitempty"` - Path *string `json:"path,omitempty"` + // audience is the intended audience of the token. A recipient of a token + // must identify itself with an identifier specified in the audience of the + // token, and otherwise should reject the token. The audience defaults to the + // identifier of the apiserver. + Audience *string `json:"audience,omitempty"` + // expirationSeconds is the requested duration of validity of the service + // account token. As the token approaches expiration, the kubelet volume + // plugin will proactively rotate the service account token. The kubelet will + // start trying to rotate the token if the token is older than 80 percent of + // its time to live or if the token is older than 24 hours.Defaults to 1 hour + // and must be at least 10 minutes. + ExpirationSeconds *int64 `json:"expirationSeconds,omitempty"` + // path is the path relative to the mount point of the file to project the + // token into. + Path *string `json:"path,omitempty"` } // ServiceAccountTokenProjectionApplyConfiguration constructs a declarative configuration of the ServiceAccountTokenProjection type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/serviceport.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/serviceport.go index 4d5774d8d4475..44353149228b3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/serviceport.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/serviceport.go @@ -25,13 +25,55 @@ import ( // ServicePortApplyConfiguration represents a declarative configuration of the ServicePort type for use // with apply. +// +// ServicePort contains information on service's port. type ServicePortApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Protocol *corev1.Protocol `json:"protocol,omitempty"` - AppProtocol *string `json:"appProtocol,omitempty"` - Port *int32 `json:"port,omitempty"` - TargetPort *intstr.IntOrString `json:"targetPort,omitempty"` - NodePort *int32 `json:"nodePort,omitempty"` + // The name of this port within the service. This must be a DNS_LABEL. + // All ports within a ServiceSpec must have unique names. When considering + // the endpoints for a Service, this must match the 'name' field in the + // EndpointPort. + // Optional if only one ServicePort is defined on this service. + Name *string `json:"name,omitempty"` + // The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". + // Default is TCP. + Protocol *corev1.Protocol `json:"protocol,omitempty"` + // The application protocol for this port. + // This is used as a hint for implementations to offer richer behavior for protocols that they understand. + // This field follows standard Kubernetes label syntax. + // Valid values are either: + // + // * Un-prefixed protocol names - reserved for IANA standard service names (as per + // RFC-6335 and https://www.iana.org/assignments/service-names). + // + // * Kubernetes-defined prefixed names: + // * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior- + // * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 + // * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 + // + // * Other protocols should use implementation-defined prefixed names such as + // mycompany.com/my-custom-protocol. + AppProtocol *string `json:"appProtocol,omitempty"` + // The port that will be exposed by this service. + Port *int32 `json:"port,omitempty"` + // Number or name of the port to access on the pods targeted by the service. + // Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + // If this is a string, it will be looked up as a named port in the + // target Pod's container ports. If this is not specified, the value + // of the 'port' field is used (an identity map). + // This field is ignored for services with clusterIP=None, and should be + // omitted or set equal to the 'port' field. + // More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service + TargetPort *intstr.IntOrString `json:"targetPort,omitempty"` + // The port on each node on which this service is exposed when type is + // NodePort or LoadBalancer. Usually assigned by the system. If a value is + // specified, in-range, and not in use it will be used, otherwise the + // operation will fail. If not specified, a port will be allocated if this + // Service requires one. If this field is specified when creating a + // Service which does not need it, creation will fail. This field will be + // wiped when updating a Service to no longer need it (e.g. changing type + // from NodePort to ClusterIP). + // More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + NodePort *int32 `json:"nodePort,omitempty"` } // ServicePortApplyConfiguration constructs a declarative configuration of the ServicePort type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/servicespec.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/servicespec.go index 41367dce4f092..c6a09d26fac9b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/servicespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/servicespec.go @@ -24,27 +24,201 @@ import ( // ServiceSpecApplyConfiguration represents a declarative configuration of the ServiceSpec type for use // with apply. +// +// ServiceSpec describes the attributes that a user creates on a service. type ServiceSpecApplyConfiguration struct { - Ports []ServicePortApplyConfiguration `json:"ports,omitempty"` - Selector map[string]string `json:"selector,omitempty"` - ClusterIP *string `json:"clusterIP,omitempty"` - ClusterIPs []string `json:"clusterIPs,omitempty"` - Type *corev1.ServiceType `json:"type,omitempty"` - ExternalIPs []string `json:"externalIPs,omitempty"` - SessionAffinity *corev1.ServiceAffinity `json:"sessionAffinity,omitempty"` - LoadBalancerIP *string `json:"loadBalancerIP,omitempty"` - LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"` - ExternalName *string `json:"externalName,omitempty"` - ExternalTrafficPolicy *corev1.ServiceExternalTrafficPolicy `json:"externalTrafficPolicy,omitempty"` - HealthCheckNodePort *int32 `json:"healthCheckNodePort,omitempty"` - PublishNotReadyAddresses *bool `json:"publishNotReadyAddresses,omitempty"` - SessionAffinityConfig *SessionAffinityConfigApplyConfiguration `json:"sessionAffinityConfig,omitempty"` - IPFamilies []corev1.IPFamily `json:"ipFamilies,omitempty"` - IPFamilyPolicy *corev1.IPFamilyPolicy `json:"ipFamilyPolicy,omitempty"` - AllocateLoadBalancerNodePorts *bool `json:"allocateLoadBalancerNodePorts,omitempty"` - LoadBalancerClass *string `json:"loadBalancerClass,omitempty"` - InternalTrafficPolicy *corev1.ServiceInternalTrafficPolicy `json:"internalTrafficPolicy,omitempty"` - TrafficDistribution *string `json:"trafficDistribution,omitempty"` + // The list of ports that are exposed by this service. + // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + Ports []ServicePortApplyConfiguration `json:"ports,omitempty"` + // Route service traffic to pods with label keys and values matching this + // selector. If empty or not present, the service is assumed to have an + // external process managing its endpoints, which Kubernetes will not + // modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. + // Ignored if type is ExternalName. + // More info: https://kubernetes.io/docs/concepts/services-networking/service/ + Selector map[string]string `json:"selector,omitempty"` + // clusterIP is the IP address of the service and is usually assigned + // randomly. If an address is specified manually, is in-range (as per + // system configuration), and is not in use, it will be allocated to the + // service; otherwise creation of the service will fail. This field may not + // be changed through updates unless the type field is also being changed + // to ExternalName (which requires this field to be blank) or the type + // field is being changed from ExternalName (in which case this field may + // optionally be specified, as describe above). Valid values are "None", + // empty string (""), or a valid IP address. Setting this to "None" makes a + // "headless service" (no virtual IP), which is useful when direct endpoint + // connections are preferred and proxying is not required. Only applies to + // types ClusterIP, NodePort, and LoadBalancer. If this field is specified + // when creating a Service of type ExternalName, creation will fail. This + // field will be wiped when updating a Service to type ExternalName. + // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + ClusterIP *string `json:"clusterIP,omitempty"` + // ClusterIPs is a list of IP addresses assigned to this service, and are + // usually assigned randomly. If an address is specified manually, is + // in-range (as per system configuration), and is not in use, it will be + // allocated to the service; otherwise creation of the service will fail. + // This field may not be changed through updates unless the type field is + // also being changed to ExternalName (which requires this field to be + // empty) or the type field is being changed from ExternalName (in which + // case this field may optionally be specified, as describe above). Valid + // values are "None", empty string (""), or a valid IP address. Setting + // this to "None" makes a "headless service" (no virtual IP), which is + // useful when direct endpoint connections are preferred and proxying is + // not required. Only applies to types ClusterIP, NodePort, and + // LoadBalancer. If this field is specified when creating a Service of type + // ExternalName, creation will fail. This field will be wiped when updating + // a Service to type ExternalName. If this field is not specified, it will + // be initialized from the clusterIP field. If this field is specified, + // clients must ensure that clusterIPs[0] and clusterIP have the same + // value. + // + // This field may hold a maximum of two entries (dual-stack IPs, in either order). + // These IPs must correspond to the values of the ipFamilies field. Both + // clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. + // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + ClusterIPs []string `json:"clusterIPs,omitempty"` + // type determines how the Service is exposed. Defaults to ClusterIP. Valid + // options are ExternalName, ClusterIP, NodePort, and LoadBalancer. + // "ClusterIP" allocates a cluster-internal IP address for load-balancing + // to endpoints. Endpoints are determined by the selector or if that is not + // specified, by manual construction of an Endpoints object or + // EndpointSlice objects. If clusterIP is "None", no virtual IP is + // allocated and the endpoints are published as a set of endpoints rather + // than a virtual IP. + // "NodePort" builds on ClusterIP and allocates a port on every node which + // routes to the same endpoints as the clusterIP. + // "LoadBalancer" builds on NodePort and creates an external load-balancer + // (if supported in the current cloud) which routes to the same endpoints + // as the clusterIP. + // "ExternalName" aliases this service to the specified externalName. + // Several other fields do not apply to ExternalName services. + // More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + Type *corev1.ServiceType `json:"type,omitempty"` + // externalIPs is a list of IP addresses for which nodes in the cluster + // will also accept traffic for this service. These IPs are not managed by + // Kubernetes. The user is responsible for ensuring that traffic arrives + // at a node with this IP. A common example is external load-balancers + // that are not part of the Kubernetes system. + ExternalIPs []string `json:"externalIPs,omitempty"` + // Supports "ClientIP" and "None". Used to maintain session affinity. + // Enable client IP based session affinity. + // Must be ClientIP or None. + // Defaults to None. + // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + SessionAffinity *corev1.ServiceAffinity `json:"sessionAffinity,omitempty"` + // Only applies to Service Type: LoadBalancer. + // This feature depends on whether the underlying cloud-provider supports specifying + // the loadBalancerIP when a load balancer is created. + // This field will be ignored if the cloud-provider does not support the feature. + // Deprecated: This field was under-specified and its meaning varies across implementations. + // Using it is non-portable and it may not support dual-stack. + // Users are encouraged to use implementation-specific annotations when available. + LoadBalancerIP *string `json:"loadBalancerIP,omitempty"` + // If specified and supported by the platform, this will restrict traffic through the cloud-provider + // load-balancer will be restricted to the specified client IPs. This field will be ignored if the + // cloud-provider does not support the feature." + // More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/ + LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"` + // externalName is the external reference that discovery mechanisms will + // return as an alias for this service (e.g. a DNS CNAME record). No + // proxying will be involved. Must be a lowercase RFC-1123 hostname + // (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". + ExternalName *string `json:"externalName,omitempty"` + // externalTrafficPolicy describes how nodes distribute service traffic they + // receive on one of the Service's "externally-facing" addresses (NodePorts, + // ExternalIPs, and LoadBalancer IPs). If set to "Local", the proxy will configure + // the service in a way that assumes that external load balancers will take care + // of balancing the service traffic between nodes, and so each node will deliver + // traffic only to the node-local endpoints of the service, without masquerading + // the client source IP. (Traffic mistakenly sent to a node with no endpoints will + // be dropped.) The default value, "Cluster", uses the standard behavior of + // routing to all endpoints evenly (possibly modified by topology and other + // features). Note that traffic sent to an External IP or LoadBalancer IP from + // within the cluster will always get "Cluster" semantics, but clients sending to + // a NodePort from within the cluster may need to take traffic policy into account + // when picking a node. + ExternalTrafficPolicy *corev1.ServiceExternalTrafficPolicy `json:"externalTrafficPolicy,omitempty"` + // healthCheckNodePort specifies the healthcheck nodePort for the service. + // This only applies when type is set to LoadBalancer and + // externalTrafficPolicy is set to Local. If a value is specified, is + // in-range, and is not in use, it will be used. If not specified, a value + // will be automatically allocated. External systems (e.g. load-balancers) + // can use this port to determine if a given node holds endpoints for this + // service or not. If this field is specified when creating a Service + // which does not need it, creation will fail. This field will be wiped + // when updating a Service to no longer need it (e.g. changing type). + // This field cannot be updated once set. + HealthCheckNodePort *int32 `json:"healthCheckNodePort,omitempty"` + // publishNotReadyAddresses indicates that any agent which deals with endpoints for this + // Service should disregard any indications of ready/not-ready. + // The primary use case for setting this field is for a StatefulSet's Headless Service to + // propagate SRV DNS records for its Pods for the purpose of peer discovery. + // The Kubernetes controllers that generate Endpoints and EndpointSlice resources for + // Services interpret this to mean that all endpoints are considered "ready" even if the + // Pods themselves are not. Agents which consume only Kubernetes generated endpoints + // through the Endpoints or EndpointSlice resources can safely assume this behavior. + PublishNotReadyAddresses *bool `json:"publishNotReadyAddresses,omitempty"` + // sessionAffinityConfig contains the configurations of session affinity. + SessionAffinityConfig *SessionAffinityConfigApplyConfiguration `json:"sessionAffinityConfig,omitempty"` + // IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this + // service. This field is usually assigned automatically based on cluster + // configuration and the ipFamilyPolicy field. If this field is specified + // manually, the requested family is available in the cluster, + // and ipFamilyPolicy allows it, it will be used; otherwise creation of + // the service will fail. This field is conditionally mutable: it allows + // for adding or removing a secondary IP family, but it does not allow + // changing the primary IP family of the Service. Valid values are "IPv4" + // and "IPv6". This field only applies to Services of types ClusterIP, + // NodePort, and LoadBalancer, and does apply to "headless" services. + // This field will be wiped when updating a Service to type ExternalName. + // + // This field may hold a maximum of two entries (dual-stack families, in + // either order). These families must correspond to the values of the + // clusterIPs field, if specified. Both clusterIPs and ipFamilies are + // governed by the ipFamilyPolicy field. + IPFamilies []corev1.IPFamily `json:"ipFamilies,omitempty"` + // IPFamilyPolicy represents the dual-stack-ness requested or required by + // this Service. If there is no value provided, then this field will be set + // to SingleStack. Services can be "SingleStack" (a single IP family), + // "PreferDualStack" (two IP families on dual-stack configured clusters or + // a single IP family on single-stack clusters), or "RequireDualStack" + // (two IP families on dual-stack configured clusters, otherwise fail). The + // ipFamilies and clusterIPs fields depend on the value of this field. This + // field will be wiped when updating a service to type ExternalName. + IPFamilyPolicy *corev1.IPFamilyPolicy `json:"ipFamilyPolicy,omitempty"` + // allocateLoadBalancerNodePorts defines if NodePorts will be automatically + // allocated for services with type LoadBalancer. Default is "true". It + // may be set to "false" if the cluster load-balancer does not rely on + // NodePorts. If the caller requests specific NodePorts (by specifying a + // value), those requests will be respected, regardless of this field. + // This field may only be set for services with type LoadBalancer and will + // be cleared if the type is changed to any other type. + AllocateLoadBalancerNodePorts *bool `json:"allocateLoadBalancerNodePorts,omitempty"` + // loadBalancerClass is the class of the load balancer implementation this Service belongs to. + // If specified, the value of this field must be a label-style identifier, with an optional prefix, + // e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. + // This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load + // balancer implementation is used, today this is typically done through the cloud provider integration, + // but should apply for any default implementation. If set, it is assumed that a load balancer + // implementation is watching for Services with a matching class. Any default load balancer + // implementation (e.g. cloud providers) should ignore Services that set this field. + // This field can only be set when creating or updating a Service to type 'LoadBalancer'. + // Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. + LoadBalancerClass *string `json:"loadBalancerClass,omitempty"` + // InternalTrafficPolicy describes how nodes distribute service traffic they + // receive on the ClusterIP. If set to "Local", the proxy will assume that pods + // only want to talk to endpoints of the service on the same node as the pod, + // dropping the traffic if there are no local endpoints. The default value, + // "Cluster", uses the standard behavior of routing to all endpoints evenly + // (possibly modified by topology and other features). + InternalTrafficPolicy *corev1.ServiceInternalTrafficPolicy `json:"internalTrafficPolicy,omitempty"` + // TrafficDistribution offers a way to express preferences for how traffic + // is distributed to Service endpoints. Implementations can use this field + // as a hint, but are not required to guarantee strict adherence. If the + // field is not set, the implementation will apply its default routing + // strategy. If set to "PreferClose", implementations should prioritize + // endpoints that are in the same zone. + TrafficDistribution *string `json:"trafficDistribution,omitempty"` } // ServiceSpecApplyConfiguration constructs a declarative configuration of the ServiceSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/servicestatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/servicestatus.go index 11c3f8a80a82e..6b0d450d68ff8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/servicestatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/servicestatus.go @@ -24,9 +24,14 @@ import ( // ServiceStatusApplyConfiguration represents a declarative configuration of the ServiceStatus type for use // with apply. +// +// ServiceStatus represents the current status of a service. type ServiceStatusApplyConfiguration struct { + // LoadBalancer contains the current status of the load-balancer, + // if one is present. LoadBalancer *LoadBalancerStatusApplyConfiguration `json:"loadBalancer,omitempty"` - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` + // Current service state + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` } // ServiceStatusApplyConfiguration constructs a declarative configuration of the ServiceStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/sessionaffinityconfig.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/sessionaffinityconfig.go index 13b045fffc829..18b7410f031af 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/sessionaffinityconfig.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/sessionaffinityconfig.go @@ -20,7 +20,10 @@ package v1 // SessionAffinityConfigApplyConfiguration represents a declarative configuration of the SessionAffinityConfig type for use // with apply. +// +// SessionAffinityConfig represents the configurations of session affinity. type SessionAffinityConfigApplyConfiguration struct { + // clientIP contains the configurations of Client IP based session affinity. ClientIP *ClientIPConfigApplyConfiguration `json:"clientIP,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/sleepaction.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/sleepaction.go index b4115609b1a14..a74fec68c1366 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/sleepaction.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/sleepaction.go @@ -20,7 +20,10 @@ package v1 // SleepActionApplyConfiguration represents a declarative configuration of the SleepAction type for use // with apply. +// +// SleepAction describes a "sleep" action. type SleepActionApplyConfiguration struct { + // Seconds is the number of seconds to sleep. Seconds *int64 `json:"seconds,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/storageospersistentvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/storageospersistentvolumesource.go index 7381a498e1f14..8aa7ea7ab39b7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/storageospersistentvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/storageospersistentvolumesource.go @@ -20,12 +20,29 @@ package v1 // StorageOSPersistentVolumeSourceApplyConfiguration represents a declarative configuration of the StorageOSPersistentVolumeSource type for use // with apply. +// +// Represents a StorageOS persistent volume resource. type StorageOSPersistentVolumeSourceApplyConfiguration struct { - VolumeName *string `json:"volumeName,omitempty"` - VolumeNamespace *string `json:"volumeNamespace,omitempty"` - FSType *string `json:"fsType,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - SecretRef *ObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` + // volumeName is the human-readable name of the StorageOS volume. Volume + // names are only unique within a namespace. + VolumeName *string `json:"volumeName,omitempty"` + // volumeNamespace specifies the scope of the volume within StorageOS. If no + // namespace is specified then the Pod's namespace will be used. This allows the + // Kubernetes name scoping to be mirrored within StorageOS for tighter integration. + // Set VolumeName to any name to override the default behaviour. + // Set to "default" if you are not using namespaces within StorageOS. + // Namespaces that do not pre-exist within StorageOS will be created. + VolumeNamespace *string `json:"volumeNamespace,omitempty"` + // fsType is the filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + FSType *string `json:"fsType,omitempty"` + // readOnly defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + ReadOnly *bool `json:"readOnly,omitempty"` + // secretRef specifies the secret to use for obtaining the StorageOS API + // credentials. If not specified, default values will be attempted. + SecretRef *ObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` } // StorageOSPersistentVolumeSourceApplyConfiguration constructs a declarative configuration of the StorageOSPersistentVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/storageosvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/storageosvolumesource.go index 81d9373c196f7..2419121e1a8a1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/storageosvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/storageosvolumesource.go @@ -20,12 +20,29 @@ package v1 // StorageOSVolumeSourceApplyConfiguration represents a declarative configuration of the StorageOSVolumeSource type for use // with apply. +// +// Represents a StorageOS persistent volume resource. type StorageOSVolumeSourceApplyConfiguration struct { - VolumeName *string `json:"volumeName,omitempty"` - VolumeNamespace *string `json:"volumeNamespace,omitempty"` - FSType *string `json:"fsType,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - SecretRef *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` + // volumeName is the human-readable name of the StorageOS volume. Volume + // names are only unique within a namespace. + VolumeName *string `json:"volumeName,omitempty"` + // volumeNamespace specifies the scope of the volume within StorageOS. If no + // namespace is specified then the Pod's namespace will be used. This allows the + // Kubernetes name scoping to be mirrored within StorageOS for tighter integration. + // Set VolumeName to any name to override the default behaviour. + // Set to "default" if you are not using namespaces within StorageOS. + // Namespaces that do not pre-exist within StorageOS will be created. + VolumeNamespace *string `json:"volumeNamespace,omitempty"` + // fsType is the filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + FSType *string `json:"fsType,omitempty"` + // readOnly defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + ReadOnly *bool `json:"readOnly,omitempty"` + // secretRef specifies the secret to use for obtaining the StorageOS API + // credentials. If not specified, default values will be attempted. + SecretRef *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` } // StorageOSVolumeSourceApplyConfiguration constructs a declarative configuration of the StorageOSVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/sysctl.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/sysctl.go index 7719eb7d60628..5bb09a3a2cd9c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/sysctl.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/sysctl.go @@ -20,8 +20,12 @@ package v1 // SysctlApplyConfiguration represents a declarative configuration of the Sysctl type for use // with apply. +// +// Sysctl defines a kernel parameter to be set type SysctlApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // Name of a property to set + Name *string `json:"name,omitempty"` + // Value of a property to set Value *string `json:"value,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/taint.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/taint.go index 4b9e43051fc19..6c4879806b7d1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/taint.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/taint.go @@ -25,11 +25,20 @@ import ( // TaintApplyConfiguration represents a declarative configuration of the Taint type for use // with apply. +// +// The node this Taint is attached to has the "effect" on +// any pod that does not tolerate the Taint. type TaintApplyConfiguration struct { - Key *string `json:"key,omitempty"` - Value *string `json:"value,omitempty"` - Effect *corev1.TaintEffect `json:"effect,omitempty"` - TimeAdded *metav1.Time `json:"timeAdded,omitempty"` + // Required. The taint key to be applied to a node. + Key *string `json:"key,omitempty"` + // The taint value corresponding to the taint key. + Value *string `json:"value,omitempty"` + // Required. The effect of the taint on pods + // that do not tolerate the taint. + // Valid effects are NoSchedule, PreferNoSchedule and NoExecute. + Effect *corev1.TaintEffect `json:"effect,omitempty"` + // TimeAdded represents the time at which the taint was added. + TimeAdded *metav1.Time `json:"timeAdded,omitempty"` } // TaintApplyConfiguration constructs a declarative configuration of the Taint type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/tcpsocketaction.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/tcpsocketaction.go index cba1a7d081610..ede78a3f6df79 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/tcpsocketaction.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/tcpsocketaction.go @@ -24,9 +24,15 @@ import ( // TCPSocketActionApplyConfiguration represents a declarative configuration of the TCPSocketAction type for use // with apply. +// +// TCPSocketAction describes an action based on opening a socket type TCPSocketActionApplyConfiguration struct { + // Number or name of the port to access on the container. + // Number must be in the range 1 to 65535. + // Name must be an IANA_SVC_NAME. Port *intstr.IntOrString `json:"port,omitempty"` - Host *string `json:"host,omitempty"` + // Optional: Host name to connect to, defaults to the pod IP. + Host *string `json:"host,omitempty"` } // TCPSocketActionApplyConfiguration constructs a declarative configuration of the TCPSocketAction type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/toleration.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/toleration.go index a0a0aac0032cd..609051a4000d1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/toleration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/toleration.go @@ -24,12 +24,29 @@ import ( // TolerationApplyConfiguration represents a declarative configuration of the Toleration type for use // with apply. +// +// The pod this Toleration is attached to tolerates any taint that matches +// the triple using the matching operator . type TolerationApplyConfiguration struct { - Key *string `json:"key,omitempty"` - Operator *corev1.TolerationOperator `json:"operator,omitempty"` - Value *string `json:"value,omitempty"` - Effect *corev1.TaintEffect `json:"effect,omitempty"` - TolerationSeconds *int64 `json:"tolerationSeconds,omitempty"` + // Key is the taint key that the toleration applies to. Empty means match all taint keys. + // If the key is empty, operator must be Exists; this combination means to match all values and all keys. + Key *string `json:"key,omitempty"` + // Operator represents a key's relationship to the value. + // Valid operators are Exists and Equal. Defaults to Equal. + // Exists is equivalent to wildcard for value, so that a pod can + // tolerate all taints of a particular category. + Operator *corev1.TolerationOperator `json:"operator,omitempty"` + // Value is the taint value the toleration matches to. + // If the operator is Exists, the value should be empty, otherwise just a regular string. + Value *string `json:"value,omitempty"` + // Effect indicates the taint effect to match. Empty means match all taint effects. + // When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + Effect *corev1.TaintEffect `json:"effect,omitempty"` + // TolerationSeconds represents the period of time the toleration (which must be + // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + // it is not set, which means tolerate the taint forever (do not evict). Zero and + // negative values will be treated as 0 (evict immediately) by the system. + TolerationSeconds *int64 `json:"tolerationSeconds,omitempty"` } // TolerationApplyConfiguration constructs a declarative configuration of the Toleration type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/topologyselectorlabelrequirement.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/topologyselectorlabelrequirement.go index 674ddec93ce7b..4f1a875f64cb4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/topologyselectorlabelrequirement.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/topologyselectorlabelrequirement.go @@ -20,8 +20,14 @@ package v1 // TopologySelectorLabelRequirementApplyConfiguration represents a declarative configuration of the TopologySelectorLabelRequirement type for use // with apply. +// +// A topology selector requirement is a selector that matches given label. +// This is an alpha feature and may change in the future. type TopologySelectorLabelRequirementApplyConfiguration struct { - Key *string `json:"key,omitempty"` + // The label key that the selector applies to. + Key *string `json:"key,omitempty"` + // An array of string values. One value must match the label to be selected. + // Each entry in Values is ORed. Values []string `json:"values,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/topologyselectorterm.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/topologyselectorterm.go index 7812ae5204d76..2aaddefddef41 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/topologyselectorterm.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/topologyselectorterm.go @@ -20,7 +20,14 @@ package v1 // TopologySelectorTermApplyConfiguration represents a declarative configuration of the TopologySelectorTerm type for use // with apply. +// +// A topology selector term represents the result of label queries. +// A null or empty topology selector term matches no objects. +// The requirements of them are ANDed. +// It provides a subset of functionality as NodeSelectorTerm. +// This is an alpha feature and may change in the future. type TopologySelectorTermApplyConfiguration struct { + // A list of topology selector requirements by labels. MatchLabelExpressions []TopologySelectorLabelRequirementApplyConfiguration `json:"matchLabelExpressions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/topologyspreadconstraint.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/topologyspreadconstraint.go index ab814e8e0908c..6bd28b1147a4b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/topologyspreadconstraint.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/topologyspreadconstraint.go @@ -25,15 +25,107 @@ import ( // TopologySpreadConstraintApplyConfiguration represents a declarative configuration of the TopologySpreadConstraint type for use // with apply. +// +// TopologySpreadConstraint specifies how to spread matching pods among the given topology. type TopologySpreadConstraintApplyConfiguration struct { - MaxSkew *int32 `json:"maxSkew,omitempty"` - TopologyKey *string `json:"topologyKey,omitempty"` - WhenUnsatisfiable *corev1.UnsatisfiableConstraintAction `json:"whenUnsatisfiable,omitempty"` - LabelSelector *metav1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"` - MinDomains *int32 `json:"minDomains,omitempty"` - NodeAffinityPolicy *corev1.NodeInclusionPolicy `json:"nodeAffinityPolicy,omitempty"` - NodeTaintsPolicy *corev1.NodeInclusionPolicy `json:"nodeTaintsPolicy,omitempty"` - MatchLabelKeys []string `json:"matchLabelKeys,omitempty"` + // MaxSkew describes the degree to which pods may be unevenly distributed. + // When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference + // between the number of matching pods in the target topology and the global minimum. + // The global minimum is the minimum number of matching pods in an eligible domain + // or zero if the number of eligible domains is less than MinDomains. + // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + // labelSelector spread as 2/2/1: + // In this case, the global minimum is 1. + // | zone1 | zone2 | zone3 | + // | P P | P P | P | + // - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; + // scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) + // violate MaxSkew(1). + // - if MaxSkew is 2, incoming pod can be scheduled onto any zone. + // When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence + // to topologies that satisfy it. + // It's a required field. Default value is 1 and 0 is not allowed. + MaxSkew *int32 `json:"maxSkew,omitempty"` + // TopologyKey is the key of node labels. Nodes that have a label with this key + // and identical values are considered to be in the same topology. + // We consider each as a "bucket", and try to put balanced number + // of pods into each bucket. + // We define a domain as a particular instance of a topology. + // Also, we define an eligible domain as a domain whose nodes meet the requirements of + // nodeAffinityPolicy and nodeTaintsPolicy. + // e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. + // And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. + // It's a required field. + TopologyKey *string `json:"topologyKey,omitempty"` + // WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy + // the spread constraint. + // - DoNotSchedule (default) tells the scheduler not to schedule it. + // - ScheduleAnyway tells the scheduler to schedule the pod in any location, + // but giving higher precedence to topologies that would help reduce the + // skew. + // A constraint is considered "Unsatisfiable" for an incoming pod + // if and only if every possible node assignment for that pod would violate + // "MaxSkew" on some topology. + // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + // labelSelector spread as 3/1/1: + // | zone1 | zone2 | zone3 | + // | P P P | P | P | + // If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled + // to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies + // MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler + // won't make it *more* imbalanced. + // It's a required field. + WhenUnsatisfiable *corev1.UnsatisfiableConstraintAction `json:"whenUnsatisfiable,omitempty"` + // LabelSelector is used to find matching pods. + // Pods that match this label selector are counted to determine the number of pods + // in their corresponding topology domain. + LabelSelector *metav1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"` + // MinDomains indicates a minimum number of eligible domains. + // When the number of eligible domains with matching topology keys is less than minDomains, + // Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. + // And when the number of eligible domains with matching topology keys equals or greater than minDomains, + // this value has no effect on scheduling. + // As a result, when the number of eligible domains is less than minDomains, + // scheduler won't schedule more than maxSkew Pods to those domains. + // If value is nil, the constraint behaves as if MinDomains is equal to 1. + // Valid values are integers greater than 0. + // When value is not nil, WhenUnsatisfiable must be DoNotSchedule. + // + // For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same + // labelSelector spread as 2/2/2: + // | zone1 | zone2 | zone3 | + // | P P | P P | P P | + // The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. + // In this situation, new pod with the same labelSelector cannot be scheduled, + // because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, + // it will violate MaxSkew. + MinDomains *int32 `json:"minDomains,omitempty"` + // NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector + // when calculating pod topology spread skew. Options are: + // - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. + // - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. + // + // If this value is nil, the behavior is equivalent to the Honor policy. + NodeAffinityPolicy *corev1.NodeInclusionPolicy `json:"nodeAffinityPolicy,omitempty"` + // NodeTaintsPolicy indicates how we will treat node taints when calculating + // pod topology spread skew. Options are: + // - Honor: nodes without taints, along with tainted nodes for which the incoming pod + // has a toleration, are included. + // - Ignore: node taints are ignored. All nodes are included. + // + // If this value is nil, the behavior is equivalent to the Ignore policy. + NodeTaintsPolicy *corev1.NodeInclusionPolicy `json:"nodeTaintsPolicy,omitempty"` + // MatchLabelKeys is a set of pod label keys to select the pods over which + // spreading will be calculated. The keys are used to lookup values from the + // incoming pod labels, those key-value labels are ANDed with labelSelector + // to select the group of existing pods over which spreading will be calculated + // for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. + // MatchLabelKeys cannot be set when LabelSelector isn't set. + // Keys that don't exist in the incoming pod labels will + // be ignored. A null or empty list means only match against labelSelector. + // + // This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). + MatchLabelKeys []string `json:"matchLabelKeys,omitempty"` } // TopologySpreadConstraintApplyConfiguration constructs a declarative configuration of the TopologySpreadConstraint type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/typedlocalobjectreference.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/typedlocalobjectreference.go index 1e63b79889e5b..5864532adb3f5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/typedlocalobjectreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/typedlocalobjectreference.go @@ -20,10 +20,32 @@ package v1 // TypedLocalObjectReferenceApplyConfiguration represents a declarative configuration of the TypedLocalObjectReference type for use // with apply. +// +// TypedLocalObjectReference contains enough information to let you locate the +// typed referenced object inside the same namespace. +// --- +// New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. +// 1. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular +// restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". +// Those cannot be well described when embedded. +// 2. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. +// 3. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity +// during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple +// and the version of the actual struct is irrelevant. +// 4. We cannot easily change it. Because this type is embedded in many locations, updates to this type +// will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. +// +// Instead of using this type, create a locally provided and used type that is well-focused on your reference. +// For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . type TypedLocalObjectReferenceApplyConfiguration struct { + // APIGroup is the group for the resource being referenced. + // If APIGroup is not specified, the specified Kind must be in the core API group. + // For any other third-party types, APIGroup is required. APIGroup *string `json:"apiGroup,omitempty"` - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` + // Kind is the type of resource being referenced + Kind *string `json:"kind,omitempty"` + // Name is the name of resource being referenced + Name *string `json:"name,omitempty"` } // TypedLocalObjectReferenceApplyConfiguration constructs a declarative configuration of the TypedLocalObjectReference type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/typedobjectreference.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/typedobjectreference.go index f07de8902e602..f2eab829e28cb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/typedobjectreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/typedobjectreference.go @@ -20,10 +20,20 @@ package v1 // TypedObjectReferenceApplyConfiguration represents a declarative configuration of the TypedObjectReference type for use // with apply. +// +// TypedObjectReference contains enough information to let you locate the typed referenced object type TypedObjectReferenceApplyConfiguration struct { - APIGroup *string `json:"apiGroup,omitempty"` - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` + // APIGroup is the group for the resource being referenced. + // If APIGroup is not specified, the specified Kind must be in the core API group. + // For any other third-party types, APIGroup is required. + APIGroup *string `json:"apiGroup,omitempty"` + // Kind is the type of resource being referenced + Kind *string `json:"kind,omitempty"` + // Name is the name of resource being referenced + Name *string `json:"name,omitempty"` + // Namespace is the namespace of resource being referenced + // Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. + // (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. Namespace *string `json:"namespace,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volume.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volume.go index e47cd031dd3de..2e4c0e6ad65a2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volume.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volume.go @@ -20,8 +20,16 @@ package v1 // VolumeApplyConfiguration represents a declarative configuration of the Volume type for use // with apply. +// +// Volume represents a named volume in a pod that may be accessed by any container in the pod. type VolumeApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // name of the volume. + // Must be a DNS_LABEL and unique within the pod. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `json:"name,omitempty"` + // volumeSource represents the location and type of the mounted volume. + // If not specified, the Volume is implied to be an EmptyDir. + // This implied behavior is deprecated and will be removed in a future version. VolumeSourceApplyConfiguration `json:",inline"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumedevice.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumedevice.go index 0bc52aad2a1e4..ce4f766c77524 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumedevice.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumedevice.go @@ -20,8 +20,12 @@ package v1 // VolumeDeviceApplyConfiguration represents a declarative configuration of the VolumeDevice type for use // with apply. +// +// volumeDevice describes a mapping of a raw block device within a container. type VolumeDeviceApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // name must match the name of a persistentVolumeClaim in the pod + Name *string `json:"name,omitempty"` + // devicePath is the path inside of the container that the device will be mapped to. DevicePath *string `json:"devicePath,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go index ccd426a0cff9e..83b71eb659015 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go @@ -24,14 +24,49 @@ import ( // VolumeMountApplyConfiguration represents a declarative configuration of the VolumeMount type for use // with apply. +// +// VolumeMount describes a mounting of a Volume within a container. type VolumeMountApplyConfiguration struct { - Name *string `json:"name,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // This must match the Name of a Volume. + Name *string `json:"name,omitempty"` + // Mounted read-only if true, read-write otherwise (false or unspecified). + // Defaults to false. + ReadOnly *bool `json:"readOnly,omitempty"` + // RecursiveReadOnly specifies whether read-only mounts should be handled + // recursively. + // + // If ReadOnly is false, this field has no meaning and must be unspecified. + // + // If ReadOnly is true, and this field is set to Disabled, the mount is not made + // recursively read-only. If this field is set to IfPossible, the mount is made + // recursively read-only, if it is supported by the container runtime. If this + // field is set to Enabled, the mount is made recursively read-only if it is + // supported by the container runtime, otherwise the pod will not be started and + // an error will be generated to indicate the reason. + // + // If this field is set to IfPossible or Enabled, MountPropagation must be set to + // None (or be unspecified, which defaults to None). + // + // If this field is not specified, it is treated as an equivalent of Disabled. RecursiveReadOnly *corev1.RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty"` - MountPath *string `json:"mountPath,omitempty"` - SubPath *string `json:"subPath,omitempty"` - MountPropagation *corev1.MountPropagationMode `json:"mountPropagation,omitempty"` - SubPathExpr *string `json:"subPathExpr,omitempty"` + // Path within the container at which the volume should be mounted. Must + // not contain ':'. + MountPath *string `json:"mountPath,omitempty"` + // Path within the volume from which the container's volume should be mounted. + // Defaults to "" (volume's root). + SubPath *string `json:"subPath,omitempty"` + // mountPropagation determines how mounts are propagated from the host + // to container and the other way around. + // When not set, MountPropagationNone is used. + // This field is beta in 1.10. + // When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + // (which defaults to None). + MountPropagation *corev1.MountPropagationMode `json:"mountPropagation,omitempty"` + // Expanded path within the volume from which the container's volume should be mounted. + // Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + // Defaults to "" (volume's root). + // SubPathExpr and SubPath are mutually exclusive. + SubPathExpr *string `json:"subPathExpr,omitempty"` } // VolumeMountApplyConfiguration constructs a declarative configuration of the VolumeMount type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go index f55c407235e4c..ad4965a17d23b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go @@ -24,10 +24,18 @@ import ( // VolumeMountStatusApplyConfiguration represents a declarative configuration of the VolumeMountStatus type for use // with apply. +// +// VolumeMountStatus shows status of volume mounts. type VolumeMountStatusApplyConfiguration struct { - Name *string `json:"name,omitempty"` - MountPath *string `json:"mountPath,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` + // Name corresponds to the name of the original VolumeMount. + Name *string `json:"name,omitempty"` + // MountPath corresponds to the original VolumeMount. + MountPath *string `json:"mountPath,omitempty"` + // ReadOnly corresponds to the original VolumeMount. + ReadOnly *bool `json:"readOnly,omitempty"` + // RecursiveReadOnly must be set to Disabled, Enabled, or unspecified (for non-readonly mounts). + // An IfPossible value in the original VolumeMount must be translated to Disabled or Enabled, + // depending on the mount result. RecursiveReadOnly *corev1.RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumenodeaffinity.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumenodeaffinity.go index 9198c25dc8893..3719b829f9fd2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumenodeaffinity.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumenodeaffinity.go @@ -20,7 +20,10 @@ package v1 // VolumeNodeAffinityApplyConfiguration represents a declarative configuration of the VolumeNodeAffinity type for use // with apply. +// +// VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. type VolumeNodeAffinityApplyConfiguration struct { + // required specifies hard node constraints that must be met. Required *NodeSelectorApplyConfiguration `json:"required,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumeprojection.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumeprojection.go index 28d9e5679b342..b6f493d075928 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumeprojection.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumeprojection.go @@ -20,13 +20,67 @@ package v1 // VolumeProjectionApplyConfiguration represents a declarative configuration of the VolumeProjection type for use // with apply. +// +// Projection that may be projected along with other supported volume types. +// Exactly one of these fields must be set. type VolumeProjectionApplyConfiguration struct { - Secret *SecretProjectionApplyConfiguration `json:"secret,omitempty"` - DownwardAPI *DownwardAPIProjectionApplyConfiguration `json:"downwardAPI,omitempty"` - ConfigMap *ConfigMapProjectionApplyConfiguration `json:"configMap,omitempty"` + // secret information about the secret data to project + Secret *SecretProjectionApplyConfiguration `json:"secret,omitempty"` + // downwardAPI information about the downwardAPI data to project + DownwardAPI *DownwardAPIProjectionApplyConfiguration `json:"downwardAPI,omitempty"` + // configMap information about the configMap data to project + ConfigMap *ConfigMapProjectionApplyConfiguration `json:"configMap,omitempty"` + // serviceAccountToken is information about the serviceAccountToken data to project ServiceAccountToken *ServiceAccountTokenProjectionApplyConfiguration `json:"serviceAccountToken,omitempty"` - ClusterTrustBundle *ClusterTrustBundleProjectionApplyConfiguration `json:"clusterTrustBundle,omitempty"` - PodCertificate *PodCertificateProjectionApplyConfiguration `json:"podCertificate,omitempty"` + // ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field + // of ClusterTrustBundle objects in an auto-updating file. + // + // Alpha, gated by the ClusterTrustBundleProjection feature gate. + // + // ClusterTrustBundle objects can either be selected by name, or by the + // combination of signer name and a label selector. + // + // Kubelet performs aggressive normalization of the PEM contents written + // into the pod filesystem. Esoteric PEM features such as inter-block + // comments and block headers are stripped. Certificates are deduplicated. + // The ordering of certificates within the file is arbitrary, and Kubelet + // may change the order over time. + ClusterTrustBundle *ClusterTrustBundleProjectionApplyConfiguration `json:"clusterTrustBundle,omitempty"` + // Projects an auto-rotating credential bundle (private key and certificate + // chain) that the pod can use either as a TLS client or server. + // + // Kubelet generates a private key and uses it to send a + // PodCertificateRequest to the named signer. Once the signer approves the + // request and issues a certificate chain, Kubelet writes the key and + // certificate chain to the pod filesystem. The pod does not start until + // certificates have been issued for each podCertificate projected volume + // source in its spec. + // + // Kubelet will begin trying to rotate the certificate at the time indicated + // by the signer using the PodCertificateRequest.Status.BeginRefreshAt + // timestamp. + // + // Kubelet can write a single file, indicated by the credentialBundlePath + // field, or separate files, indicated by the keyPath and + // certificateChainPath fields. + // + // The credential bundle is a single file in PEM format. The first PEM + // entry is the private key (in PKCS#8 format), and the remaining PEM + // entries are the certificate chain issued by the signer (typically, + // signers will return their certificate chain in leaf-to-root order). + // + // Prefer using the credential bundle format, since your application code + // can read it atomically. If you use keyPath and certificateChainPath, + // your application must make two separate file reads. If these coincide + // with a certificate rotation, it is possible that the private key and leaf + // certificate you read may not correspond to each other. Your application + // will need to check for this condition, and re-read until they are + // consistent. + // + // The named signer controls chooses the format of the certificate it + // issues; consult the signer implementation's documentation to learn how to + // use the certificates it issues. + PodCertificate *PodCertificateProjectionApplyConfiguration `json:"podCertificate,omitempty"` } // VolumeProjectionApplyConfiguration constructs a declarative configuration of the VolumeProjection type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumeresourcerequirements.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumeresourcerequirements.go index 5c83ae6d45e59..64f52bed557db 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumeresourcerequirements.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumeresourcerequirements.go @@ -24,8 +24,16 @@ import ( // VolumeResourceRequirementsApplyConfiguration represents a declarative configuration of the VolumeResourceRequirements type for use // with apply. +// +// VolumeResourceRequirements describes the storage resource requirements for a volume. type VolumeResourceRequirementsApplyConfiguration struct { - Limits *corev1.ResourceList `json:"limits,omitempty"` + // Limits describes the maximum amount of compute resources allowed. + // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + Limits *corev1.ResourceList `json:"limits,omitempty"` + // Requests describes the minimum amount of compute resources required. + // If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + // otherwise to an implementation-defined value. Requests cannot exceed Limits. + // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Requests *corev1.ResourceList `json:"requests,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumesource.go index aeead953cf596..5d9a6b0f6d3ac 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/volumesource.go @@ -20,37 +20,153 @@ package v1 // VolumeSourceApplyConfiguration represents a declarative configuration of the VolumeSource type for use // with apply. +// +// Represents the source of a volume to mount. +// Only one of its members may be specified. type VolumeSourceApplyConfiguration struct { - HostPath *HostPathVolumeSourceApplyConfiguration `json:"hostPath,omitempty"` - EmptyDir *EmptyDirVolumeSourceApplyConfiguration `json:"emptyDir,omitempty"` - GCEPersistentDisk *GCEPersistentDiskVolumeSourceApplyConfiguration `json:"gcePersistentDisk,omitempty"` - AWSElasticBlockStore *AWSElasticBlockStoreVolumeSourceApplyConfiguration `json:"awsElasticBlockStore,omitempty"` - GitRepo *GitRepoVolumeSourceApplyConfiguration `json:"gitRepo,omitempty"` - Secret *SecretVolumeSourceApplyConfiguration `json:"secret,omitempty"` - NFS *NFSVolumeSourceApplyConfiguration `json:"nfs,omitempty"` - ISCSI *ISCSIVolumeSourceApplyConfiguration `json:"iscsi,omitempty"` - Glusterfs *GlusterfsVolumeSourceApplyConfiguration `json:"glusterfs,omitempty"` + // hostPath represents a pre-existing file or directory on the host + // machine that is directly exposed to the container. This is generally + // used for system agents or other privileged things that are allowed + // to see the host machine. Most containers will NOT need this. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + // --- + // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not + // mount host directories as read/write. + HostPath *HostPathVolumeSourceApplyConfiguration `json:"hostPath,omitempty"` + // emptyDir represents a temporary directory that shares a pod's lifetime. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + EmptyDir *EmptyDirVolumeSourceApplyConfiguration `json:"emptyDir,omitempty"` + // gcePersistentDisk represents a GCE Disk resource that is attached to a + // kubelet's host machine and then exposed to the pod. + // Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree + // gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + GCEPersistentDisk *GCEPersistentDiskVolumeSourceApplyConfiguration `json:"gcePersistentDisk,omitempty"` + // awsElasticBlockStore represents an AWS Disk resource that is attached to a + // kubelet's host machine and then exposed to the pod. + // Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree + // awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + AWSElasticBlockStore *AWSElasticBlockStoreVolumeSourceApplyConfiguration `json:"awsElasticBlockStore,omitempty"` + // gitRepo represents a git repository at a particular revision. + // Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an + // EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir + // into the Pod's container. + GitRepo *GitRepoVolumeSourceApplyConfiguration `json:"gitRepo,omitempty"` + // secret represents a secret that should populate this volume. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + Secret *SecretVolumeSourceApplyConfiguration `json:"secret,omitempty"` + // nfs represents an NFS mount on the host that shares a pod's lifetime + // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + NFS *NFSVolumeSourceApplyConfiguration `json:"nfs,omitempty"` + // iscsi represents an ISCSI Disk resource that is attached to a + // kubelet's host machine and then exposed to the pod. + // More info: https://kubernetes.io/docs/concepts/storage/volumes/#iscsi + ISCSI *ISCSIVolumeSourceApplyConfiguration `json:"iscsi,omitempty"` + // glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. + // Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. + Glusterfs *GlusterfsVolumeSourceApplyConfiguration `json:"glusterfs,omitempty"` + // persistentVolumeClaimVolumeSource represents a reference to a + // PersistentVolumeClaim in the same namespace. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims PersistentVolumeClaim *PersistentVolumeClaimVolumeSourceApplyConfiguration `json:"persistentVolumeClaim,omitempty"` - RBD *RBDVolumeSourceApplyConfiguration `json:"rbd,omitempty"` - FlexVolume *FlexVolumeSourceApplyConfiguration `json:"flexVolume,omitempty"` - Cinder *CinderVolumeSourceApplyConfiguration `json:"cinder,omitempty"` - CephFS *CephFSVolumeSourceApplyConfiguration `json:"cephfs,omitempty"` - Flocker *FlockerVolumeSourceApplyConfiguration `json:"flocker,omitempty"` - DownwardAPI *DownwardAPIVolumeSourceApplyConfiguration `json:"downwardAPI,omitempty"` - FC *FCVolumeSourceApplyConfiguration `json:"fc,omitempty"` - AzureFile *AzureFileVolumeSourceApplyConfiguration `json:"azureFile,omitempty"` - ConfigMap *ConfigMapVolumeSourceApplyConfiguration `json:"configMap,omitempty"` - VsphereVolume *VsphereVirtualDiskVolumeSourceApplyConfiguration `json:"vsphereVolume,omitempty"` - Quobyte *QuobyteVolumeSourceApplyConfiguration `json:"quobyte,omitempty"` - AzureDisk *AzureDiskVolumeSourceApplyConfiguration `json:"azureDisk,omitempty"` - PhotonPersistentDisk *PhotonPersistentDiskVolumeSourceApplyConfiguration `json:"photonPersistentDisk,omitempty"` - Projected *ProjectedVolumeSourceApplyConfiguration `json:"projected,omitempty"` - PortworxVolume *PortworxVolumeSourceApplyConfiguration `json:"portworxVolume,omitempty"` - ScaleIO *ScaleIOVolumeSourceApplyConfiguration `json:"scaleIO,omitempty"` - StorageOS *StorageOSVolumeSourceApplyConfiguration `json:"storageos,omitempty"` - CSI *CSIVolumeSourceApplyConfiguration `json:"csi,omitempty"` - Ephemeral *EphemeralVolumeSourceApplyConfiguration `json:"ephemeral,omitempty"` - Image *ImageVolumeSourceApplyConfiguration `json:"image,omitempty"` + // rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + // Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. + RBD *RBDVolumeSourceApplyConfiguration `json:"rbd,omitempty"` + // flexVolume represents a generic volume resource that is + // provisioned/attached using an exec based plugin. + // Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. + FlexVolume *FlexVolumeSourceApplyConfiguration `json:"flexVolume,omitempty"` + // cinder represents a cinder volume attached and mounted on kubelets host machine. + // Deprecated: Cinder is deprecated. All operations for the in-tree cinder type + // are redirected to the cinder.csi.openstack.org CSI driver. + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + Cinder *CinderVolumeSourceApplyConfiguration `json:"cinder,omitempty"` + // cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + // Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. + CephFS *CephFSVolumeSourceApplyConfiguration `json:"cephfs,omitempty"` + // flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. + // Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. + Flocker *FlockerVolumeSourceApplyConfiguration `json:"flocker,omitempty"` + // downwardAPI represents downward API about the pod that should populate this volume + DownwardAPI *DownwardAPIVolumeSourceApplyConfiguration `json:"downwardAPI,omitempty"` + // fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + FC *FCVolumeSourceApplyConfiguration `json:"fc,omitempty"` + // azureFile represents an Azure File Service mount on the host and bind mount to the pod. + // Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type + // are redirected to the file.csi.azure.com CSI driver. + AzureFile *AzureFileVolumeSourceApplyConfiguration `json:"azureFile,omitempty"` + // configMap represents a configMap that should populate this volume + ConfigMap *ConfigMapVolumeSourceApplyConfiguration `json:"configMap,omitempty"` + // vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + // Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type + // are redirected to the csi.vsphere.vmware.com CSI driver. + VsphereVolume *VsphereVirtualDiskVolumeSourceApplyConfiguration `json:"vsphereVolume,omitempty"` + // quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + // Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. + Quobyte *QuobyteVolumeSourceApplyConfiguration `json:"quobyte,omitempty"` + // azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + // Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type + // are redirected to the disk.csi.azure.com CSI driver. + AzureDisk *AzureDiskVolumeSourceApplyConfiguration `json:"azureDisk,omitempty"` + // photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. + // Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. + PhotonPersistentDisk *PhotonPersistentDiskVolumeSourceApplyConfiguration `json:"photonPersistentDisk,omitempty"` + // projected items for all in one resources secrets, configmaps, and downward API + Projected *ProjectedVolumeSourceApplyConfiguration `json:"projected,omitempty"` + // portworxVolume represents a portworx volume attached and mounted on kubelets host machine. + // Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type + // are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate + // is on. + PortworxVolume *PortworxVolumeSourceApplyConfiguration `json:"portworxVolume,omitempty"` + // scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. + ScaleIO *ScaleIOVolumeSourceApplyConfiguration `json:"scaleIO,omitempty"` + // storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + // Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. + StorageOS *StorageOSVolumeSourceApplyConfiguration `json:"storageos,omitempty"` + // csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers. + CSI *CSIVolumeSourceApplyConfiguration `json:"csi,omitempty"` + // ephemeral represents a volume that is handled by a cluster storage driver. + // The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, + // and deleted when the pod is removed. + // + // Use this if: + // a) the volume is only needed while the pod runs, + // b) features of normal volumes like restoring from snapshot or capacity + // tracking are needed, + // c) the storage driver is specified through a storage class, and + // d) the storage driver supports dynamic volume provisioning through + // a PersistentVolumeClaim (see EphemeralVolumeSource for more + // information on the connection between this volume type + // and PersistentVolumeClaim). + // + // Use PersistentVolumeClaim or one of the vendor-specific + // APIs for volumes that persist for longer than the lifecycle + // of an individual pod. + // + // Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to + // be used that way - see the documentation of the driver for + // more information. + // + // A pod can use both types of ephemeral volumes and + // persistent volumes at the same time. + Ephemeral *EphemeralVolumeSourceApplyConfiguration `json:"ephemeral,omitempty"` + // image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. + // The volume is resolved at pod startup depending on which PullPolicy value is provided: + // + // - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. + // - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. + // - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. + // + // The volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. + // A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. + // The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. + // The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. + // The volume will be mounted read-only (ro) and non-executable files (noexec). + // Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. + // The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. + Image *ImageVolumeSourceApplyConfiguration `json:"image,omitempty"` } // VolumeSourceApplyConfiguration constructs a declarative configuration of the VolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/vspherevirtualdiskvolumesource.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/vspherevirtualdiskvolumesource.go index ea8fd8d62e374..f32a4211f45fd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/vspherevirtualdiskvolumesource.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/vspherevirtualdiskvolumesource.go @@ -20,11 +20,19 @@ package v1 // VsphereVirtualDiskVolumeSourceApplyConfiguration represents a declarative configuration of the VsphereVirtualDiskVolumeSource type for use // with apply. +// +// Represents a vSphere volume resource. type VsphereVirtualDiskVolumeSourceApplyConfiguration struct { - VolumePath *string `json:"volumePath,omitempty"` - FSType *string `json:"fsType,omitempty"` + // volumePath is the path that identifies vSphere volume vmdk + VolumePath *string `json:"volumePath,omitempty"` + // fsType is filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + FSType *string `json:"fsType,omitempty"` + // storagePolicyName is the storage Policy Based Management (SPBM) profile name. StoragePolicyName *string `json:"storagePolicyName,omitempty"` - StoragePolicyID *string `json:"storagePolicyID,omitempty"` + // storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + StoragePolicyID *string `json:"storagePolicyID,omitempty"` } // VsphereVirtualDiskVolumeSourceApplyConfiguration constructs a declarative configuration of the VsphereVirtualDiskVolumeSource type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/weightedpodaffinityterm.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/weightedpodaffinityterm.go index c49ef93eb4b72..dea0cbb791f41 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/weightedpodaffinityterm.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/weightedpodaffinityterm.go @@ -20,8 +20,13 @@ package v1 // WeightedPodAffinityTermApplyConfiguration represents a declarative configuration of the WeightedPodAffinityTerm type for use // with apply. +// +// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) type WeightedPodAffinityTermApplyConfiguration struct { - Weight *int32 `json:"weight,omitempty"` + // weight associated with matching the corresponding podAffinityTerm, + // in the range 1-100. + Weight *int32 `json:"weight,omitempty"` + // Required. A pod affinity term, associated with the corresponding weight. PodAffinityTerm *PodAffinityTermApplyConfiguration `json:"podAffinityTerm,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/windowssecuritycontextoptions.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/windowssecuritycontextoptions.go index bb37a500b48eb..8ad2ce999af3c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/windowssecuritycontextoptions.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/windowssecuritycontextoptions.go @@ -20,11 +20,25 @@ package v1 // WindowsSecurityContextOptionsApplyConfiguration represents a declarative configuration of the WindowsSecurityContextOptions type for use // with apply. +// +// WindowsSecurityContextOptions contain Windows-specific options and credentials. type WindowsSecurityContextOptionsApplyConfiguration struct { + // GMSACredentialSpecName is the name of the GMSA credential spec to use. GMSACredentialSpecName *string `json:"gmsaCredentialSpecName,omitempty"` - GMSACredentialSpec *string `json:"gmsaCredentialSpec,omitempty"` - RunAsUserName *string `json:"runAsUserName,omitempty"` - HostProcess *bool `json:"hostProcess,omitempty"` + // GMSACredentialSpec is where the GMSA admission webhook + // (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + // GMSA credential spec named by the GMSACredentialSpecName field. + GMSACredentialSpec *string `json:"gmsaCredentialSpec,omitempty"` + // The UserName in Windows to run the entrypoint of the container process. + // Defaults to the user specified in image metadata if unspecified. + // May also be set in PodSecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + RunAsUserName *string `json:"runAsUserName,omitempty"` + // HostProcess determines if a container should be run as a 'Host Process' container. + // All of a Pod's containers must have the same effective HostProcess value + // (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). + // In addition, if HostProcess is true then HostNetwork must also be set to true. + HostProcess *bool `json:"hostProcess,omitempty"` } // WindowsSecurityContextOptionsApplyConfiguration constructs a declarative configuration of the WindowsSecurityContextOptions type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpoint.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpoint.go index df45a6fb8aa3a..950dc52e93b95 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpoint.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpoint.go @@ -24,15 +24,42 @@ import ( // EndpointApplyConfiguration represents a declarative configuration of the Endpoint type for use // with apply. +// +// Endpoint represents a single logical "backend" implementing a service. type EndpointApplyConfiguration struct { - Addresses []string `json:"addresses,omitempty"` - Conditions *EndpointConditionsApplyConfiguration `json:"conditions,omitempty"` - Hostname *string `json:"hostname,omitempty"` - TargetRef *corev1.ObjectReferenceApplyConfiguration `json:"targetRef,omitempty"` - DeprecatedTopology map[string]string `json:"deprecatedTopology,omitempty"` - NodeName *string `json:"nodeName,omitempty"` - Zone *string `json:"zone,omitempty"` - Hints *EndpointHintsApplyConfiguration `json:"hints,omitempty"` + // addresses of this endpoint. For EndpointSlices of addressType "IPv4" or "IPv6", + // the values are IP addresses in canonical form. The syntax and semantics of + // other addressType values are not defined. This must contain at least one + // address but no more than 100. EndpointSlices generated by the EndpointSlice + // controller will always have exactly 1 address. No semantics are defined for + // additional addresses beyond the first, and kube-proxy does not look at them. + Addresses []string `json:"addresses,omitempty"` + // conditions contains information about the current status of the endpoint. + Conditions *EndpointConditionsApplyConfiguration `json:"conditions,omitempty"` + // hostname of this endpoint. This field may be used by consumers of + // endpoints to distinguish endpoints from each other (e.g. in DNS names). + // Multiple endpoints which use the same hostname should be considered + // fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS + // Label (RFC 1123) validation. + Hostname *string `json:"hostname,omitempty"` + // targetRef is a reference to a Kubernetes object that represents this + // endpoint. + TargetRef *corev1.ObjectReferenceApplyConfiguration `json:"targetRef,omitempty"` + // deprecatedTopology contains topology information part of the v1beta1 + // API. This field is deprecated, and will be removed when the v1beta1 + // API is removed (no sooner than kubernetes v1.24). While this field can + // hold values, it is not writable through the v1 API, and any attempts to + // write to it will be silently ignored. Topology information can be found + // in the zone and nodeName fields instead. + DeprecatedTopology map[string]string `json:"deprecatedTopology,omitempty"` + // nodeName represents the name of the Node hosting this endpoint. This can + // be used to determine endpoints local to a Node. + NodeName *string `json:"nodeName,omitempty"` + // zone is the name of the Zone this endpoint exists in. + Zone *string `json:"zone,omitempty"` + // hints contains information associated with how an endpoint should be + // consumed. + Hints *EndpointHintsApplyConfiguration `json:"hints,omitempty"` } // EndpointApplyConfiguration constructs a declarative configuration of the Endpoint type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointconditions.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointconditions.go index 20f0b97124af2..abd46414b5d5e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointconditions.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointconditions.go @@ -20,9 +20,24 @@ package v1 // EndpointConditionsApplyConfiguration represents a declarative configuration of the EndpointConditions type for use // with apply. +// +// EndpointConditions represents the current condition of an endpoint. type EndpointConditionsApplyConfiguration struct { - Ready *bool `json:"ready,omitempty"` - Serving *bool `json:"serving,omitempty"` + // ready indicates that this endpoint is ready to receive traffic, + // according to whatever system is managing the endpoint. A nil value + // should be interpreted as "true". In general, an endpoint should be + // marked ready if it is serving and not terminating, though this can + // be overridden in some cases, such as when the associated Service has + // set the publishNotReadyAddresses flag. + Ready *bool `json:"ready,omitempty"` + // serving indicates that this endpoint is able to receive traffic, + // according to whatever system is managing the endpoint. For endpoints + // backed by pods, the EndpointSlice controller will mark the endpoint + // as serving if the pod's Ready condition is True. A nil value should be + // interpreted as "true". + Serving *bool `json:"serving,omitempty"` + // terminating indicates that this endpoint is terminating. A nil value + // should be interpreted as "false". Terminating *bool `json:"terminating,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointhints.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointhints.go index 7afda39b6baf3..f405d19dd0cfb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointhints.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointhints.go @@ -20,8 +20,16 @@ package v1 // EndpointHintsApplyConfiguration represents a declarative configuration of the EndpointHints type for use // with apply. +// +// EndpointHints provides hints describing how an endpoint should be consumed. type EndpointHintsApplyConfiguration struct { + // forZones indicates the zone(s) this endpoint should be consumed by when + // using topology aware routing. May contain a maximum of 8 entries. ForZones []ForZoneApplyConfiguration `json:"forZones,omitempty"` + // forNodes indicates the node(s) this endpoint should be consumed by when + // using topology aware routing. May contain a maximum of 8 entries. + // This is an Alpha feature and is only used when the PreferSameTrafficDistribution + // feature gate is enabled. ForNodes []ForNodeApplyConfiguration `json:"forNodes,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointport.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointport.go index b55c868cb1ab6..7a55f60bd8efd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointport.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointport.go @@ -24,11 +24,42 @@ import ( // EndpointPortApplyConfiguration represents a declarative configuration of the EndpointPort type for use // with apply. +// +// EndpointPort represents a Port used by an EndpointSlice type EndpointPortApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Protocol *corev1.Protocol `json:"protocol,omitempty"` - Port *int32 `json:"port,omitempty"` - AppProtocol *string `json:"appProtocol,omitempty"` + // name represents the name of this port. All ports in an EndpointSlice must have a unique name. + // If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name. + // Name must either be an empty string or pass DNS_LABEL validation: + // * must be no more than 63 characters long. + // * must consist of lower case alphanumeric characters or '-'. + // * must start and end with an alphanumeric character. + // Default is empty string. + Name *string `json:"name,omitempty"` + // protocol represents the IP protocol for this port. + // Must be UDP, TCP, or SCTP. + // Default is TCP. + Protocol *corev1.Protocol `json:"protocol,omitempty"` + // port represents the port number of the endpoint. + // If the EndpointSlice is derived from a Kubernetes service, this must be set + // to the service's target port. EndpointSlices used for other purposes may have + // a nil port. + Port *int32 `json:"port,omitempty"` + // The application protocol for this port. + // This is used as a hint for implementations to offer richer behavior for protocols that they understand. + // This field follows standard Kubernetes label syntax. + // Valid values are either: + // + // * Un-prefixed protocol names - reserved for IANA standard service names (as per + // RFC-6335 and https://www.iana.org/assignments/service-names). + // + // * Kubernetes-defined prefixed names: + // * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior- + // * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 + // * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 + // + // * Other protocols should use implementation-defined prefixed names such as + // mycompany.com/my-custom-protocol. + AppProtocol *string `json:"appProtocol,omitempty"` } // EndpointPortApplyConfiguration constructs a declarative configuration of the EndpointPort type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointslice.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointslice.go index d976ca8229ba3..cba77dd57132f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointslice.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointslice.go @@ -29,12 +29,38 @@ import ( // EndpointSliceApplyConfiguration represents a declarative configuration of the EndpointSlice type for use // with apply. +// +// EndpointSlice represents a set of service endpoints. Most EndpointSlices are created by +// the EndpointSlice controller to represent the Pods selected by Service objects. For a +// given service there may be multiple EndpointSlice objects which must be joined to +// produce the full set of endpoints; you can find all of the slices for a given service +// by listing EndpointSlices in the service's namespace whose `kubernetes.io/service-name` +// label contains the service's name. type EndpointSliceApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - AddressType *discoveryv1.AddressType `json:"addressType,omitempty"` - Endpoints []EndpointApplyConfiguration `json:"endpoints,omitempty"` - Ports []EndpointPortApplyConfiguration `json:"ports,omitempty"` + // addressType specifies the type of address carried by this EndpointSlice. + // All addresses in this slice must be the same type. This field is + // immutable after creation. The following address types are currently + // supported: + // * IPv4: Represents an IPv4 Address. + // * IPv6: Represents an IPv6 Address. + // * FQDN: Represents a Fully Qualified Domain Name. (Deprecated) + // The EndpointSlice controller only generates, and kube-proxy only processes, + // slices of addressType "IPv4" and "IPv6". No semantics are defined for + // the "FQDN" type. + AddressType *discoveryv1.AddressType `json:"addressType,omitempty"` + // endpoints is a list of unique endpoints in this slice. Each slice may + // include a maximum of 1000 endpoints. + Endpoints []EndpointApplyConfiguration `json:"endpoints,omitempty"` + // ports specifies the list of network ports exposed by each endpoint in + // this slice. Each port must have a unique name. Each slice may include a + // maximum of 100 ports. + // Services always have at least 1 port, so EndpointSlices generated by the + // EndpointSlice controller will likewise always have at least 1 port. + // EndpointSlices used for other purposes may have an empty ports list. + Ports []EndpointPortApplyConfiguration `json:"ports,omitempty"` } // EndpointSlice constructs a declarative configuration of the EndpointSlice type for use with @@ -48,29 +74,14 @@ func EndpointSlice(name, namespace string) *EndpointSliceApplyConfiguration { return b } -// ExtractEndpointSlice extracts the applied configuration owned by fieldManager from -// endpointSlice. If no managedFields are found in endpointSlice for fieldManager, a -// EndpointSliceApplyConfiguration 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. +// ExtractEndpointSliceFrom extracts the applied configuration owned by fieldManager from +// endpointSlice for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // endpointSlice must be a unmodified EndpointSlice API object that was retrieved from the Kubernetes API. -// ExtractEndpointSlice provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractEndpointSliceFrom 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 ExtractEndpointSlice(endpointSlice *discoveryv1.EndpointSlice, fieldManager string) (*EndpointSliceApplyConfiguration, error) { - return extractEndpointSlice(endpointSlice, fieldManager, "") -} - -// ExtractEndpointSliceStatus is the same as ExtractEndpointSlice except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractEndpointSliceStatus(endpointSlice *discoveryv1.EndpointSlice, fieldManager string) (*EndpointSliceApplyConfiguration, error) { - return extractEndpointSlice(endpointSlice, fieldManager, "status") -} - -func extractEndpointSlice(endpointSlice *discoveryv1.EndpointSlice, fieldManager string, subresource string) (*EndpointSliceApplyConfiguration, error) { +func ExtractEndpointSliceFrom(endpointSlice *discoveryv1.EndpointSlice, fieldManager string, subresource string) (*EndpointSliceApplyConfiguration, error) { b := &EndpointSliceApplyConfiguration{} err := managedfields.ExtractInto(endpointSlice, internal.Parser().Type("io.k8s.api.discovery.v1.EndpointSlice"), fieldManager, b, subresource) if err != nil { @@ -83,6 +94,21 @@ func extractEndpointSlice(endpointSlice *discoveryv1.EndpointSlice, fieldManager b.WithAPIVersion("discovery.k8s.io/v1") return b, nil } + +// ExtractEndpointSlice extracts the applied configuration owned by fieldManager from +// endpointSlice. If no managedFields are found in endpointSlice for fieldManager, a +// EndpointSliceApplyConfiguration 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. +// endpointSlice must be a unmodified EndpointSlice API object that was retrieved from the Kubernetes API. +// ExtractEndpointSlice 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. +func ExtractEndpointSlice(endpointSlice *discoveryv1.EndpointSlice, fieldManager string) (*EndpointSliceApplyConfiguration, error) { + return ExtractEndpointSliceFrom(endpointSlice, fieldManager, "") +} + func (b EndpointSliceApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/fornode.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/fornode.go index 3b2304d307908..5818f70b3fbce 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/fornode.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/fornode.go @@ -20,7 +20,10 @@ package v1 // ForNodeApplyConfiguration represents a declarative configuration of the ForNode type for use // with apply. +// +// ForNode provides information about which nodes should consume this endpoint. type ForNodeApplyConfiguration struct { + // name represents the name of the node. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/forzone.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/forzone.go index 505d11ae2f13d..1d06e1ad83665 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/forzone.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/forzone.go @@ -20,7 +20,10 @@ package v1 // ForZoneApplyConfiguration represents a declarative configuration of the ForZone type for use // with apply. +// +// ForZone provides information about which zones should consume this endpoint. type ForZoneApplyConfiguration struct { + // name represents the name of the zone. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpoint.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpoint.go index 5d87dae72ef2f..4d7b39979d630 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpoint.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpoint.go @@ -24,14 +24,47 @@ import ( // EndpointApplyConfiguration represents a declarative configuration of the Endpoint type for use // with apply. +// +// Endpoint represents a single logical "backend" implementing a service. type EndpointApplyConfiguration struct { - Addresses []string `json:"addresses,omitempty"` + // addresses of this endpoint. The contents of this field are interpreted + // according to the corresponding EndpointSlice addressType field. Consumers + // must handle different types of addresses in the context of their own + // capabilities. This must contain at least one address but no more than + // 100. These are all assumed to be fungible and clients may choose to only + // use the first element. Refer to: https://issue.k8s.io/106267 + Addresses []string `json:"addresses,omitempty"` + // conditions contains information about the current status of the endpoint. Conditions *EndpointConditionsApplyConfiguration `json:"conditions,omitempty"` - Hostname *string `json:"hostname,omitempty"` - TargetRef *v1.ObjectReferenceApplyConfiguration `json:"targetRef,omitempty"` - Topology map[string]string `json:"topology,omitempty"` - NodeName *string `json:"nodeName,omitempty"` - Hints *EndpointHintsApplyConfiguration `json:"hints,omitempty"` + // hostname of this endpoint. This field may be used by consumers of + // endpoints to distinguish endpoints from each other (e.g. in DNS names). + // Multiple endpoints which use the same hostname should be considered + // fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS + // Label (RFC 1123) validation. + Hostname *string `json:"hostname,omitempty"` + // targetRef is a reference to a Kubernetes object that represents this + // endpoint. + TargetRef *v1.ObjectReferenceApplyConfiguration `json:"targetRef,omitempty"` + // topology contains arbitrary topology information associated with the + // endpoint. These key/value pairs must conform with the label format. + // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + // Topology may include a maximum of 16 key/value pairs. This includes, but + // is not limited to the following well known keys: + // * kubernetes.io/hostname: the value indicates the hostname of the node + // where the endpoint is located. This should match the corresponding + // node label. + // * topology.kubernetes.io/zone: the value indicates the zone where the + // endpoint is located. This should match the corresponding node label. + // * topology.kubernetes.io/region: the value indicates the region where the + // endpoint is located. This should match the corresponding node label. + // This field is deprecated and will be removed in future api versions. + Topology map[string]string `json:"topology,omitempty"` + // nodeName represents the name of the Node hosting this endpoint. This can + // be used to determine endpoints local to a Node. + NodeName *string `json:"nodeName,omitempty"` + // hints contains information associated with how an endpoint should be + // consumed. + Hints *EndpointHintsApplyConfiguration `json:"hints,omitempty"` } // EndpointApplyConfiguration constructs a declarative configuration of the Endpoint type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointconditions.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointconditions.go index 13f5fa5575537..e94b988782ea8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointconditions.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointconditions.go @@ -20,9 +20,23 @@ package v1beta1 // EndpointConditionsApplyConfiguration represents a declarative configuration of the EndpointConditions type for use // with apply. +// +// EndpointConditions represents the current condition of an endpoint. type EndpointConditionsApplyConfiguration struct { - Ready *bool `json:"ready,omitempty"` - Serving *bool `json:"serving,omitempty"` + // ready indicates that this endpoint is prepared to receive traffic, + // according to whatever system is managing the endpoint. A nil value + // indicates an unknown state. In most cases consumers should interpret this + // unknown state as ready. For compatibility reasons, ready should never be + // "true" for terminating endpoints. + Ready *bool `json:"ready,omitempty"` + // serving is identical to ready except that it is set regardless of the + // terminating state of endpoints. This condition should be set to true for + // a ready endpoint that is terminating. If nil, consumers should defer to + // the ready condition. + Serving *bool `json:"serving,omitempty"` + // terminating indicates that this endpoint is terminating. A nil value + // indicates an unknown state. Consumers should interpret this unknown state + // to mean that the endpoint is not terminating. Terminating *bool `json:"terminating,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointhints.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointhints.go index 9637f9940faf9..70386faab6ecb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointhints.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointhints.go @@ -20,8 +20,16 @@ package v1beta1 // EndpointHintsApplyConfiguration represents a declarative configuration of the EndpointHints type for use // with apply. +// +// EndpointHints provides hints describing how an endpoint should be consumed. type EndpointHintsApplyConfiguration struct { + // forZones indicates the zone(s) this endpoint should be consumed by to + // enable topology aware routing. May contain a maximum of 8 entries. ForZones []ForZoneApplyConfiguration `json:"forZones,omitempty"` + // forNodes indicates the node(s) this endpoint should be consumed by when + // using topology aware routing. May contain a maximum of 8 entries. + // This is an Alpha feature and is only used when the PreferSameTrafficDistribution + // feature gate is enabled. ForNodes []ForNodeApplyConfiguration `json:"forNodes,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointport.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointport.go index 07cfc684b25e1..224295293aa41 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointport.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointport.go @@ -24,11 +24,32 @@ import ( // EndpointPortApplyConfiguration represents a declarative configuration of the EndpointPort type for use // with apply. +// +// EndpointPort represents a Port used by an EndpointSlice type EndpointPortApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Protocol *v1.Protocol `json:"protocol,omitempty"` - Port *int32 `json:"port,omitempty"` - AppProtocol *string `json:"appProtocol,omitempty"` + // name represents the name of this port. All ports in an EndpointSlice must have a unique name. + // If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name. + // Name must either be an empty string or pass DNS_LABEL validation: + // * must be no more than 63 characters long. + // * must consist of lower case alphanumeric characters or '-'. + // * must start and end with an alphanumeric character. + // Default is empty string. + Name *string `json:"name,omitempty"` + // protocol represents the IP protocol for this port. + // Must be UDP, TCP, or SCTP. + // Default is TCP. + Protocol *v1.Protocol `json:"protocol,omitempty"` + // port represents the port number of the endpoint. + // If this is not specified, ports are not restricted and must be + // interpreted in the context of the specific consumer. + Port *int32 `json:"port,omitempty"` + // appProtocol represents the application protocol for this port. + // This field follows standard Kubernetes label syntax. + // Un-prefixed names are reserved for IANA standard service names (as per + // RFC-6335 and https://www.iana.org/assignments/service-names). + // Non-standard protocols should use prefixed names such as + // mycompany.com/my-custom-protocol. + AppProtocol *string `json:"appProtocol,omitempty"` } // EndpointPortApplyConfiguration constructs a declarative configuration of the EndpointPort type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointslice.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointslice.go index 437cef59cfe72..4d40de54a627e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointslice.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointslice.go @@ -29,12 +29,31 @@ import ( // EndpointSliceApplyConfiguration represents a declarative configuration of the EndpointSlice type for use // with apply. +// +// EndpointSlice represents a subset of the endpoints that implement a service. +// For a given service there may be multiple EndpointSlice objects, selected by +// labels, which must be joined to produce the full set of endpoints. type EndpointSliceApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - AddressType *discoveryv1beta1.AddressType `json:"addressType,omitempty"` - Endpoints []EndpointApplyConfiguration `json:"endpoints,omitempty"` - Ports []EndpointPortApplyConfiguration `json:"ports,omitempty"` + // addressType specifies the type of address carried by this EndpointSlice. + // All addresses in this slice must be the same type. This field is + // immutable after creation. The following address types are currently + // supported: + // * IPv4: Represents an IPv4 Address. + // * IPv6: Represents an IPv6 Address. + // * FQDN: Represents a Fully Qualified Domain Name. + AddressType *discoveryv1beta1.AddressType `json:"addressType,omitempty"` + // endpoints is a list of unique endpoints in this slice. Each slice may + // include a maximum of 1000 endpoints. + Endpoints []EndpointApplyConfiguration `json:"endpoints,omitempty"` + // ports specifies the list of network ports exposed by each endpoint in + // this slice. Each port must have a unique name. When ports is empty, it + // indicates that there are no defined ports. When a port is defined with a + // nil port value, it indicates "all ports". Each slice may include a + // maximum of 100 ports. + Ports []EndpointPortApplyConfiguration `json:"ports,omitempty"` } // EndpointSlice constructs a declarative configuration of the EndpointSlice type for use with @@ -48,29 +67,14 @@ func EndpointSlice(name, namespace string) *EndpointSliceApplyConfiguration { return b } -// ExtractEndpointSlice extracts the applied configuration owned by fieldManager from -// endpointSlice. If no managedFields are found in endpointSlice for fieldManager, a -// EndpointSliceApplyConfiguration 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. +// ExtractEndpointSliceFrom extracts the applied configuration owned by fieldManager from +// endpointSlice for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // endpointSlice must be a unmodified EndpointSlice API object that was retrieved from the Kubernetes API. -// ExtractEndpointSlice provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractEndpointSliceFrom 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 ExtractEndpointSlice(endpointSlice *discoveryv1beta1.EndpointSlice, fieldManager string) (*EndpointSliceApplyConfiguration, error) { - return extractEndpointSlice(endpointSlice, fieldManager, "") -} - -// ExtractEndpointSliceStatus is the same as ExtractEndpointSlice except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractEndpointSliceStatus(endpointSlice *discoveryv1beta1.EndpointSlice, fieldManager string) (*EndpointSliceApplyConfiguration, error) { - return extractEndpointSlice(endpointSlice, fieldManager, "status") -} - -func extractEndpointSlice(endpointSlice *discoveryv1beta1.EndpointSlice, fieldManager string, subresource string) (*EndpointSliceApplyConfiguration, error) { +func ExtractEndpointSliceFrom(endpointSlice *discoveryv1beta1.EndpointSlice, fieldManager string, subresource string) (*EndpointSliceApplyConfiguration, error) { b := &EndpointSliceApplyConfiguration{} err := managedfields.ExtractInto(endpointSlice, internal.Parser().Type("io.k8s.api.discovery.v1beta1.EndpointSlice"), fieldManager, b, subresource) if err != nil { @@ -83,6 +87,21 @@ func extractEndpointSlice(endpointSlice *discoveryv1beta1.EndpointSlice, fieldMa b.WithAPIVersion("discovery.k8s.io/v1beta1") return b, nil } + +// ExtractEndpointSlice extracts the applied configuration owned by fieldManager from +// endpointSlice. If no managedFields are found in endpointSlice for fieldManager, a +// EndpointSliceApplyConfiguration 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. +// endpointSlice must be a unmodified EndpointSlice API object that was retrieved from the Kubernetes API. +// ExtractEndpointSlice 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. +func ExtractEndpointSlice(endpointSlice *discoveryv1beta1.EndpointSlice, fieldManager string) (*EndpointSliceApplyConfiguration, error) { + return ExtractEndpointSliceFrom(endpointSlice, fieldManager, "") +} + func (b EndpointSliceApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/fornode.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/fornode.go index 79aff881d2d38..bb976f2f73662 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/fornode.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/fornode.go @@ -20,7 +20,10 @@ package v1beta1 // ForNodeApplyConfiguration represents a declarative configuration of the ForNode type for use // with apply. +// +// ForNode provides information about which nodes should consume this endpoint. type ForNodeApplyConfiguration struct { + // name represents the name of the node. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/forzone.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/forzone.go index 4af09cc49bbfd..6308861c9aff5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/forzone.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/forzone.go @@ -20,7 +20,10 @@ package v1beta1 // ForZoneApplyConfiguration represents a declarative configuration of the ForZone type for use // with apply. +// +// ForZone provides information about which zones should consume this endpoint. type ForZoneApplyConfiguration struct { + // name represents the name of the zone. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/events/v1/event.go b/staging/src/k8s.io/client-go/applyconfigurations/events/v1/event.go index 391dfc96a5825..122cccad7e377 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/events/v1/event.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/events/v1/event.go @@ -30,23 +30,57 @@ import ( // EventApplyConfiguration represents a declarative configuration of the Event type for use // with apply. +// +// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. +// Events have a limited retention time and triggers and messages may evolve +// with time. Event consumers should not rely on the timing of an event +// with a given Reason reflecting a consistent underlying trigger, or the +// continued existence of events with that Reason. Events should be +// treated as informative, best-effort, supplemental data. type EventApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - EventTime *apismetav1.MicroTime `json:"eventTime,omitempty"` - Series *EventSeriesApplyConfiguration `json:"series,omitempty"` - ReportingController *string `json:"reportingController,omitempty"` - ReportingInstance *string `json:"reportingInstance,omitempty"` - Action *string `json:"action,omitempty"` - Reason *string `json:"reason,omitempty"` - Regarding *corev1.ObjectReferenceApplyConfiguration `json:"regarding,omitempty"` - Related *corev1.ObjectReferenceApplyConfiguration `json:"related,omitempty"` - Note *string `json:"note,omitempty"` - Type *string `json:"type,omitempty"` - DeprecatedSource *corev1.EventSourceApplyConfiguration `json:"deprecatedSource,omitempty"` - DeprecatedFirstTimestamp *apismetav1.Time `json:"deprecatedFirstTimestamp,omitempty"` - DeprecatedLastTimestamp *apismetav1.Time `json:"deprecatedLastTimestamp,omitempty"` - DeprecatedCount *int32 `json:"deprecatedCount,omitempty"` + // eventTime is the time when this Event was first observed. It is required. + EventTime *apismetav1.MicroTime `json:"eventTime,omitempty"` + // series is data about the Event series this event represents or nil if it's a singleton Event. + Series *EventSeriesApplyConfiguration `json:"series,omitempty"` + // reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. + // This field cannot be empty for new Events. + ReportingController *string `json:"reportingController,omitempty"` + // reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. + // This field cannot be empty for new Events and it can have at most 128 characters. + ReportingInstance *string `json:"reportingInstance,omitempty"` + // action is what action was taken/failed regarding to the regarding object. It is machine-readable. + // This field cannot be empty for new Events and it can have at most 128 characters. + Action *string `json:"action,omitempty"` + // reason is why the action was taken. It is human-readable. + // This field cannot be empty for new Events and it can have at most 128 characters. + Reason *string `json:"reason,omitempty"` + // regarding contains the object this Event is about. In most cases it's an Object reporting controller + // implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because + // it acts on some changes in a ReplicaSet object. + Regarding *corev1.ObjectReferenceApplyConfiguration `json:"regarding,omitempty"` + // related is the optional secondary object for more complex actions. E.g. when regarding object triggers + // a creation or deletion of related object. + Related *corev1.ObjectReferenceApplyConfiguration `json:"related,omitempty"` + // note is a human-readable description of the status of this operation. + // Maximal length of the note is 1kB, but libraries should be prepared to + // handle values up to 64kB. + Note *string `json:"note,omitempty"` + // type is the type of this event (Normal, Warning), new types could be added in the future. + // It is machine-readable. + // This field cannot be empty for new Events. + Type *string `json:"type,omitempty"` + // deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedSource *corev1.EventSourceApplyConfiguration `json:"deprecatedSource,omitempty"` + // deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedFirstTimestamp *apismetav1.Time `json:"deprecatedFirstTimestamp,omitempty"` + // deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedLastTimestamp *apismetav1.Time `json:"deprecatedLastTimestamp,omitempty"` + // deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedCount *int32 `json:"deprecatedCount,omitempty"` } // Event constructs a declarative configuration of the Event type for use with @@ -60,29 +94,14 @@ func Event(name, namespace string) *EventApplyConfiguration { return b } -// ExtractEvent extracts the applied configuration owned by fieldManager from -// event. If no managedFields are found in event for fieldManager, a -// EventApplyConfiguration 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. +// ExtractEventFrom extracts the applied configuration owned by fieldManager from +// event for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // event must be a unmodified Event API object that was retrieved from the Kubernetes API. -// ExtractEvent provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractEventFrom 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 ExtractEvent(event *eventsv1.Event, fieldManager string) (*EventApplyConfiguration, error) { - return extractEvent(event, fieldManager, "") -} - -// ExtractEventStatus is the same as ExtractEvent except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractEventStatus(event *eventsv1.Event, fieldManager string) (*EventApplyConfiguration, error) { - return extractEvent(event, fieldManager, "status") -} - -func extractEvent(event *eventsv1.Event, fieldManager string, subresource string) (*EventApplyConfiguration, error) { +func ExtractEventFrom(event *eventsv1.Event, fieldManager string, subresource string) (*EventApplyConfiguration, error) { b := &EventApplyConfiguration{} err := managedfields.ExtractInto(event, internal.Parser().Type("io.k8s.api.events.v1.Event"), fieldManager, b, subresource) if err != nil { @@ -95,6 +114,21 @@ func extractEvent(event *eventsv1.Event, fieldManager string, subresource string b.WithAPIVersion("events.k8s.io/v1") return b, nil } + +// ExtractEvent extracts the applied configuration owned by fieldManager from +// event. If no managedFields are found in event for fieldManager, a +// EventApplyConfiguration 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. +// event must be a unmodified Event API object that was retrieved from the Kubernetes API. +// ExtractEvent 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. +func ExtractEvent(event *eventsv1.Event, fieldManager string) (*EventApplyConfiguration, error) { + return ExtractEventFrom(event, fieldManager, "") +} + func (b EventApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/events/v1/eventseries.go b/staging/src/k8s.io/client-go/applyconfigurations/events/v1/eventseries.go index c90954bccbd8b..ddacc01e1d441 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/events/v1/eventseries.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/events/v1/eventseries.go @@ -24,8 +24,15 @@ import ( // EventSeriesApplyConfiguration represents a declarative configuration of the EventSeries type for use // with apply. +// +// EventSeries contain information on series of events, i.e. thing that was/is happening +// continuously for some time. How often to update the EventSeries is up to the event reporters. +// The default event reporter in "k8s.io/client-go/tools/events/event_broadcaster.go" shows +// how this struct is updated on heartbeats and can guide customized reporter implementations. type EventSeriesApplyConfiguration struct { - Count *int32 `json:"count,omitempty"` + // count is the number of occurrences in this series up to the last heartbeat time. + Count *int32 `json:"count,omitempty"` + // lastObservedTime is the time when last Event from the series was seen before last heartbeat. LastObservedTime *metav1.MicroTime `json:"lastObservedTime,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/events/v1beta1/event.go b/staging/src/k8s.io/client-go/applyconfigurations/events/v1beta1/event.go index c57af55b5d8a4..cf6068f470b1b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/events/v1beta1/event.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/events/v1beta1/event.go @@ -30,23 +30,56 @@ import ( // EventApplyConfiguration represents a declarative configuration of the Event type for use // with apply. +// +// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. +// Events have a limited retention time and triggers and messages may evolve +// with time. Event consumers should not rely on the timing of an event +// with a given Reason reflecting a consistent underlying trigger, or the +// continued existence of events with that Reason. Events should be +// treated as informative, best-effort, supplemental data. type EventApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - EventTime *metav1.MicroTime `json:"eventTime,omitempty"` - Series *EventSeriesApplyConfiguration `json:"series,omitempty"` - ReportingController *string `json:"reportingController,omitempty"` - ReportingInstance *string `json:"reportingInstance,omitempty"` - Action *string `json:"action,omitempty"` - Reason *string `json:"reason,omitempty"` - Regarding *corev1.ObjectReferenceApplyConfiguration `json:"regarding,omitempty"` - Related *corev1.ObjectReferenceApplyConfiguration `json:"related,omitempty"` - Note *string `json:"note,omitempty"` - Type *string `json:"type,omitempty"` - DeprecatedSource *corev1.EventSourceApplyConfiguration `json:"deprecatedSource,omitempty"` - DeprecatedFirstTimestamp *metav1.Time `json:"deprecatedFirstTimestamp,omitempty"` - DeprecatedLastTimestamp *metav1.Time `json:"deprecatedLastTimestamp,omitempty"` - DeprecatedCount *int32 `json:"deprecatedCount,omitempty"` + // eventTime is the time when this Event was first observed. It is required. + EventTime *metav1.MicroTime `json:"eventTime,omitempty"` + // series is data about the Event series this event represents or nil if it's a singleton Event. + Series *EventSeriesApplyConfiguration `json:"series,omitempty"` + // reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. + // This field cannot be empty for new Events. + ReportingController *string `json:"reportingController,omitempty"` + // reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. + // This field cannot be empty for new Events and it can have at most 128 characters. + ReportingInstance *string `json:"reportingInstance,omitempty"` + // action is what action was taken/failed regarding to the regarding object. It is machine-readable. + // This field can have at most 128 characters. + Action *string `json:"action,omitempty"` + // reason is why the action was taken. It is human-readable. + // This field can have at most 128 characters. + Reason *string `json:"reason,omitempty"` + // regarding contains the object this Event is about. In most cases it's an Object reporting controller + // implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because + // it acts on some changes in a ReplicaSet object. + Regarding *corev1.ObjectReferenceApplyConfiguration `json:"regarding,omitempty"` + // related is the optional secondary object for more complex actions. E.g. when regarding object triggers + // a creation or deletion of related object. + Related *corev1.ObjectReferenceApplyConfiguration `json:"related,omitempty"` + // note is a human-readable description of the status of this operation. + // Maximal length of the note is 1kB, but libraries should be prepared to + // handle values up to 64kB. + Note *string `json:"note,omitempty"` + // type is the type of this event (Normal, Warning), new types could be added in the future. + // It is machine-readable. + Type *string `json:"type,omitempty"` + // deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedSource *corev1.EventSourceApplyConfiguration `json:"deprecatedSource,omitempty"` + // deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedFirstTimestamp *metav1.Time `json:"deprecatedFirstTimestamp,omitempty"` + // deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedLastTimestamp *metav1.Time `json:"deprecatedLastTimestamp,omitempty"` + // deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedCount *int32 `json:"deprecatedCount,omitempty"` } // Event constructs a declarative configuration of the Event type for use with @@ -60,29 +93,14 @@ func Event(name, namespace string) *EventApplyConfiguration { return b } -// ExtractEvent extracts the applied configuration owned by fieldManager from -// event. If no managedFields are found in event for fieldManager, a -// EventApplyConfiguration 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. +// ExtractEventFrom extracts the applied configuration owned by fieldManager from +// event for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // event must be a unmodified Event API object that was retrieved from the Kubernetes API. -// ExtractEvent provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractEventFrom 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 ExtractEvent(event *eventsv1beta1.Event, fieldManager string) (*EventApplyConfiguration, error) { - return extractEvent(event, fieldManager, "") -} - -// ExtractEventStatus is the same as ExtractEvent except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractEventStatus(event *eventsv1beta1.Event, fieldManager string) (*EventApplyConfiguration, error) { - return extractEvent(event, fieldManager, "status") -} - -func extractEvent(event *eventsv1beta1.Event, fieldManager string, subresource string) (*EventApplyConfiguration, error) { +func ExtractEventFrom(event *eventsv1beta1.Event, fieldManager string, subresource string) (*EventApplyConfiguration, error) { b := &EventApplyConfiguration{} err := managedfields.ExtractInto(event, internal.Parser().Type("io.k8s.api.events.v1beta1.Event"), fieldManager, b, subresource) if err != nil { @@ -95,6 +113,21 @@ func extractEvent(event *eventsv1beta1.Event, fieldManager string, subresource s b.WithAPIVersion("events.k8s.io/v1beta1") return b, nil } + +// ExtractEvent extracts the applied configuration owned by fieldManager from +// event. If no managedFields are found in event for fieldManager, a +// EventApplyConfiguration 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. +// event must be a unmodified Event API object that was retrieved from the Kubernetes API. +// ExtractEvent 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. +func ExtractEvent(event *eventsv1beta1.Event, fieldManager string) (*EventApplyConfiguration, error) { + return ExtractEventFrom(event, fieldManager, "") +} + func (b EventApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/events/v1beta1/eventseries.go b/staging/src/k8s.io/client-go/applyconfigurations/events/v1beta1/eventseries.go index 75d936e8be851..fa1edd563cc76 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/events/v1beta1/eventseries.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/events/v1beta1/eventseries.go @@ -24,8 +24,13 @@ import ( // EventSeriesApplyConfiguration represents a declarative configuration of the EventSeries type for use // with apply. +// +// EventSeries contain information on series of events, i.e. thing that was/is happening +// continuously for some time. type EventSeriesApplyConfiguration struct { - Count *int32 `json:"count,omitempty"` + // count is the number of occurrences in this series up to the last heartbeat time. + Count *int32 `json:"count,omitempty"` + // lastObservedTime is the time when last Event from the series was seen before last heartbeat. LastObservedTime *v1.MicroTime `json:"lastObservedTime,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonset.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonset.go index 081b00d06c7b1..452f9b1c2dba3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonset.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonset.go @@ -29,11 +29,24 @@ import ( // DaemonSetApplyConfiguration represents a declarative configuration of the DaemonSet type for use // with apply. +// +// DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for +// more information. +// DaemonSet represents the configuration of a daemon set. type DaemonSetApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *DaemonSetSpecApplyConfiguration `json:"spec,omitempty"` - Status *DaemonSetStatusApplyConfiguration `json:"status,omitempty"` + // The desired behavior of this daemon set. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *DaemonSetSpecApplyConfiguration `json:"spec,omitempty"` + // The current status of this daemon set. This data may be + // out of date by some window of time. + // Populated by the system. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *DaemonSetStatusApplyConfiguration `json:"status,omitempty"` } // DaemonSet constructs a declarative configuration of the DaemonSet type for use with @@ -47,6 +60,27 @@ func DaemonSet(name, namespace string) *DaemonSetApplyConfiguration { return b } +// ExtractDaemonSetFrom extracts the applied configuration owned by fieldManager from +// daemonSet for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// daemonSet must be a unmodified DaemonSet API object that was retrieved from the Kubernetes API. +// ExtractDaemonSetFrom 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. +func ExtractDaemonSetFrom(daemonSet *extensionsv1beta1.DaemonSet, fieldManager string, subresource string) (*DaemonSetApplyConfiguration, error) { + b := &DaemonSetApplyConfiguration{} + err := managedfields.ExtractInto(daemonSet, internal.Parser().Type("io.k8s.api.extensions.v1beta1.DaemonSet"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(daemonSet.Name) + b.WithNamespace(daemonSet.Namespace) + + b.WithKind("DaemonSet") + b.WithAPIVersion("extensions/v1beta1") + return b, nil +} + // ExtractDaemonSet extracts the applied configuration owned by fieldManager from // daemonSet. If no managedFields are found in daemonSet for fieldManager, a // DaemonSetApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +91,16 @@ func DaemonSet(name, namespace string) *DaemonSetApplyConfiguration { // ExtractDaemonSet 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 ExtractDaemonSet(daemonSet *extensionsv1beta1.DaemonSet, fieldManager string) (*DaemonSetApplyConfiguration, error) { - return extractDaemonSet(daemonSet, fieldManager, "") + return ExtractDaemonSetFrom(daemonSet, fieldManager, "") } -// ExtractDaemonSetStatus is the same as ExtractDaemonSet except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractDaemonSetStatus extracts the applied configuration owned by fieldManager from +// daemonSet for the status subresource. func ExtractDaemonSetStatus(daemonSet *extensionsv1beta1.DaemonSet, fieldManager string) (*DaemonSetApplyConfiguration, error) { - return extractDaemonSet(daemonSet, fieldManager, "status") + return ExtractDaemonSetFrom(daemonSet, fieldManager, "status") } -func extractDaemonSet(daemonSet *extensionsv1beta1.DaemonSet, fieldManager string, subresource string) (*DaemonSetApplyConfiguration, error) { - b := &DaemonSetApplyConfiguration{} - err := managedfields.ExtractInto(daemonSet, internal.Parser().Type("io.k8s.api.extensions.v1beta1.DaemonSet"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(daemonSet.Name) - b.WithNamespace(daemonSet.Namespace) - - b.WithKind("DaemonSet") - b.WithAPIVersion("extensions/v1beta1") - return b, nil -} func (b DaemonSetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetcondition.go index 0312a3099427e..971c68474d81e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetcondition.go @@ -26,12 +26,20 @@ import ( // DaemonSetConditionApplyConfiguration represents a declarative configuration of the DaemonSetCondition type for use // with apply. +// +// TODO: Add valid condition types of a DaemonSet. +// DaemonSetCondition describes the state of a DaemonSet at a certain point. type DaemonSetConditionApplyConfiguration struct { - Type *extensionsv1beta1.DaemonSetConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of DaemonSet condition. + Type *extensionsv1beta1.DaemonSetConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *v1.ConditionStatus `json:"status,omitempty"` + // Last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // A human readable message indicating details about the transition. + Message *string `json:"message,omitempty"` } // DaemonSetConditionApplyConfiguration constructs a declarative configuration of the DaemonSetCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetspec.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetspec.go index d628969187a93..eddbbe41d38bd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetspec.go @@ -25,13 +25,35 @@ import ( // DaemonSetSpecApplyConfiguration represents a declarative configuration of the DaemonSetSpec type for use // with apply. +// +// DaemonSetSpec is the specification of a daemon set. type DaemonSetSpecApplyConfiguration struct { - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` - UpdateStrategy *DaemonSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"` - MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - TemplateGeneration *int64 `json:"templateGeneration,omitempty"` - RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` + // A label query over pods that are managed by the daemon set. + // Must match in order to be controlled. + // If empty, defaulted to labels on Pod template. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // An object that describes the pod that will be created. + // The DaemonSet will create exactly one copy of this pod on every node + // that matches the template's node selector (or on every node if no node + // selector is specified). + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template + Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // An update strategy to replace existing DaemonSet pods with new pods. + UpdateStrategy *DaemonSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"` + // The minimum number of seconds for which a newly created DaemonSet pod should + // be ready without any of its container crashing, for it to be considered + // available. Defaults to 0 (pod will be considered available as soon as it + // is ready). + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // DEPRECATED. + // A sequence number representing a specific generation of the template. + // Populated by the system. It can be set only during the creation. + TemplateGeneration *int64 `json:"templateGeneration,omitempty"` + // The number of old history to retain to allow rollback. + // This is a pointer to distinguish between explicit zero and not specified. + // Defaults to 10. + RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` } // DaemonSetSpecApplyConfiguration constructs a declarative configuration of the DaemonSetSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetstatus.go index 373f9ef97a76f..1803d3b74a280 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetstatus.go @@ -20,17 +20,42 @@ package v1beta1 // DaemonSetStatusApplyConfiguration represents a declarative configuration of the DaemonSetStatus type for use // with apply. +// +// DaemonSetStatus represents the current status of a daemon set. type DaemonSetStatusApplyConfiguration struct { - CurrentNumberScheduled *int32 `json:"currentNumberScheduled,omitempty"` - NumberMisscheduled *int32 `json:"numberMisscheduled,omitempty"` - DesiredNumberScheduled *int32 `json:"desiredNumberScheduled,omitempty"` - NumberReady *int32 `json:"numberReady,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - UpdatedNumberScheduled *int32 `json:"updatedNumberScheduled,omitempty"` - NumberAvailable *int32 `json:"numberAvailable,omitempty"` - NumberUnavailable *int32 `json:"numberUnavailable,omitempty"` - CollisionCount *int32 `json:"collisionCount,omitempty"` - Conditions []DaemonSetConditionApplyConfiguration `json:"conditions,omitempty"` + // The number of nodes that are running at least 1 + // daemon pod and are supposed to run the daemon pod. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ + CurrentNumberScheduled *int32 `json:"currentNumberScheduled,omitempty"` + // The number of nodes that are running the daemon pod, but are + // not supposed to run the daemon pod. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ + NumberMisscheduled *int32 `json:"numberMisscheduled,omitempty"` + // The total number of nodes that should be running the daemon + // pod (including nodes correctly running the daemon pod). + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ + DesiredNumberScheduled *int32 `json:"desiredNumberScheduled,omitempty"` + // The number of nodes that should be running the daemon pod and have one + // or more of the daemon pod running and ready. + NumberReady *int32 `json:"numberReady,omitempty"` + // The most recent generation observed by the daemon set controller. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // The total number of nodes that are running updated daemon pod + UpdatedNumberScheduled *int32 `json:"updatedNumberScheduled,omitempty"` + // The number of nodes that should be running the + // daemon pod and have one or more of the daemon pod running and + // available (ready for at least spec.minReadySeconds) + NumberAvailable *int32 `json:"numberAvailable,omitempty"` + // The number of nodes that should be running the + // daemon pod and have none of the daemon pod running and available + // (ready for at least spec.minReadySeconds) + NumberUnavailable *int32 `json:"numberUnavailable,omitempty"` + // Count of hash collisions for the DaemonSet. The DaemonSet controller + // uses this field as a collision avoidance mechanism when it needs to + // create the name for the newest ControllerRevision. + CollisionCount *int32 `json:"collisionCount,omitempty"` + // Represents the latest available observations of a DaemonSet's current state. + Conditions []DaemonSetConditionApplyConfiguration `json:"conditions,omitempty"` } // DaemonSetStatusApplyConfiguration constructs a declarative configuration of the DaemonSetStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetupdatestrategy.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetupdatestrategy.go index d3403605f8472..4dec8afef6290 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetupdatestrategy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonsetupdatestrategy.go @@ -24,9 +24,20 @@ import ( // DaemonSetUpdateStrategyApplyConfiguration represents a declarative configuration of the DaemonSetUpdateStrategy type for use // with apply. +// +// DaemonSetUpdateStrategy indicates the strategy that the DaemonSet +// controller will use to perform updates. It includes any additional parameters +// necessary to perform the update for the indicated strategy. type DaemonSetUpdateStrategyApplyConfiguration struct { - Type *extensionsv1beta1.DaemonSetUpdateStrategyType `json:"type,omitempty"` - RollingUpdate *RollingUpdateDaemonSetApplyConfiguration `json:"rollingUpdate,omitempty"` + // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". + // Default is OnDelete. + Type *extensionsv1beta1.DaemonSetUpdateStrategyType `json:"type,omitempty"` + // Rolling update config params. Present only if type = "RollingUpdate". + // --- + // TODO: Update this to follow our convention for oneOf, whatever we decide it + // to be. Same as Deployment `strategy.rollingUpdate`. + // See https://github.com/kubernetes/kubernetes/issues/35345 + RollingUpdate *RollingUpdateDaemonSetApplyConfiguration `json:"rollingUpdate,omitempty"` } // DaemonSetUpdateStrategyApplyConfiguration constructs a declarative configuration of the DaemonSetUpdateStrategy type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deployment.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deployment.go index d9351479cbded..6d0e5f89cf21f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deployment.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deployment.go @@ -29,11 +29,18 @@ import ( // DeploymentApplyConfiguration represents a declarative configuration of the Deployment type for use // with apply. +// +// DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for +// more information. +// Deployment enables declarative updates for Pods and ReplicaSets. type DeploymentApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *DeploymentSpecApplyConfiguration `json:"spec,omitempty"` - Status *DeploymentStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of the Deployment. + Spec *DeploymentSpecApplyConfiguration `json:"spec,omitempty"` + // Most recently observed status of the Deployment. + Status *DeploymentStatusApplyConfiguration `json:"status,omitempty"` } // Deployment constructs a declarative configuration of the Deployment type for use with @@ -47,6 +54,27 @@ func Deployment(name, namespace string) *DeploymentApplyConfiguration { return b } +// ExtractDeploymentFrom extracts the applied configuration owned by fieldManager from +// deployment for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// deployment must be a unmodified Deployment API object that was retrieved from the Kubernetes API. +// ExtractDeploymentFrom 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. +func ExtractDeploymentFrom(deployment *extensionsv1beta1.Deployment, fieldManager string, subresource string) (*DeploymentApplyConfiguration, error) { + b := &DeploymentApplyConfiguration{} + err := managedfields.ExtractInto(deployment, internal.Parser().Type("io.k8s.api.extensions.v1beta1.Deployment"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(deployment.Name) + b.WithNamespace(deployment.Namespace) + + b.WithKind("Deployment") + b.WithAPIVersion("extensions/v1beta1") + return b, nil +} + // ExtractDeployment extracts the applied configuration owned by fieldManager from // deployment. If no managedFields are found in deployment for fieldManager, a // DeploymentApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +85,22 @@ func Deployment(name, namespace string) *DeploymentApplyConfiguration { // ExtractDeployment 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 ExtractDeployment(deployment *extensionsv1beta1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) { - return extractDeployment(deployment, fieldManager, "") + return ExtractDeploymentFrom(deployment, fieldManager, "") } -// ExtractDeploymentStatus is the same as ExtractDeployment except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractDeploymentStatus(deployment *extensionsv1beta1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) { - return extractDeployment(deployment, fieldManager, "status") +// ExtractDeploymentScale extracts the applied configuration owned by fieldManager from +// deployment for the scale subresource. +func ExtractDeploymentScale(deployment *extensionsv1beta1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) { + return ExtractDeploymentFrom(deployment, fieldManager, "scale") } -func extractDeployment(deployment *extensionsv1beta1.Deployment, fieldManager string, subresource string) (*DeploymentApplyConfiguration, error) { - b := &DeploymentApplyConfiguration{} - err := managedfields.ExtractInto(deployment, internal.Parser().Type("io.k8s.api.extensions.v1beta1.Deployment"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(deployment.Name) - b.WithNamespace(deployment.Namespace) - - b.WithKind("Deployment") - b.WithAPIVersion("extensions/v1beta1") - return b, nil +// ExtractDeploymentStatus extracts the applied configuration owned by fieldManager from +// deployment for the status subresource. +func ExtractDeploymentStatus(deployment *extensionsv1beta1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) { + return ExtractDeploymentFrom(deployment, fieldManager, "status") } + func (b DeploymentApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentcondition.go index 2b64508d9d25a..c423e756e0984 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentcondition.go @@ -26,13 +26,21 @@ import ( // DeploymentConditionApplyConfiguration represents a declarative configuration of the DeploymentCondition type for use // with apply. +// +// DeploymentCondition describes the state of a deployment at a certain point. type DeploymentConditionApplyConfiguration struct { - Type *extensionsv1beta1.DeploymentConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of deployment condition. + Type *extensionsv1beta1.DeploymentConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *v1.ConditionStatus `json:"status,omitempty"` + // The last time this condition was updated. + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` + // Last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // A human readable message indicating details about the transition. + Message *string `json:"message,omitempty"` } // DeploymentConditionApplyConfiguration constructs a declarative configuration of the DeploymentCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentspec.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentspec.go index 5531c756f9de8..12f3e2c71614d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentspec.go @@ -25,16 +25,41 @@ import ( // DeploymentSpecApplyConfiguration represents a declarative configuration of the DeploymentSpec type for use // with apply. +// +// DeploymentSpec is the specification of the desired behavior of the Deployment. type DeploymentSpecApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` - Strategy *DeploymentStrategyApplyConfiguration `json:"strategy,omitempty"` - MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` - Paused *bool `json:"paused,omitempty"` - RollbackTo *RollbackConfigApplyConfiguration `json:"rollbackTo,omitempty"` - ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"` + // Number of desired pods. This is a pointer to distinguish between explicit + // zero and not specified. Defaults to 1. + Replicas *int32 `json:"replicas,omitempty"` + // Label selector for pods. Existing ReplicaSets whose pods are + // selected by this will be the ones affected by this deployment. + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // Template describes the pods that will be created. + Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // The deployment strategy to use to replace existing pods with new ones. + Strategy *DeploymentStrategyApplyConfiguration `json:"strategy,omitempty"` + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // The number of old ReplicaSets to retain to allow rollback. + // This is a pointer to distinguish between explicit zero and not specified. + // This is set to the max value of int32 (i.e. 2147483647) by default, which + // means "retaining all old ReplicaSets". + RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` + // Indicates that the deployment is paused and will not be processed by the + // deployment controller. + Paused *bool `json:"paused,omitempty"` + // DEPRECATED. + // The config this deployment is rolling back to. Will be cleared after rollback is done. + RollbackTo *RollbackConfigApplyConfiguration `json:"rollbackTo,omitempty"` + // The maximum time in seconds for a deployment to make progress before it + // is considered to be failed. The deployment controller will continue to + // process failed deployments and a condition with a ProgressDeadlineExceeded + // reason will be surfaced in the deployment status. Note that progress will + // not be estimated during the time a deployment is paused. This is set to + // the max value of int32 (i.e. 2147483647) by default, which means "no deadline". + ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"` } // DeploymentSpecApplyConfiguration constructs a declarative configuration of the DeploymentSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentstatus.go index 36b4fd42b6e2b..1482b92dfc071 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentstatus.go @@ -20,16 +20,34 @@ package v1beta1 // DeploymentStatusApplyConfiguration represents a declarative configuration of the DeploymentStatus type for use // with apply. +// +// DeploymentStatus is the most recently observed status of the Deployment. type DeploymentStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Replicas *int32 `json:"replicas,omitempty"` - UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` - ReadyReplicas *int32 `json:"readyReplicas,omitempty"` - AvailableReplicas *int32 `json:"availableReplicas,omitempty"` - UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"` - TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"` - Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"` - CollisionCount *int32 `json:"collisionCount,omitempty"` + // The generation observed by the deployment controller. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // Total number of non-terminating pods targeted by this deployment (their labels match the selector). + Replicas *int32 `json:"replicas,omitempty"` + // Total number of non-terminating pods targeted by this deployment that have the desired template spec. + UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` + // Total number of non-terminating pods targeted by this Deployment with a Ready Condition. + ReadyReplicas *int32 `json:"readyReplicas,omitempty"` + // Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment. + AvailableReplicas *int32 `json:"availableReplicas,omitempty"` + // Total number of unavailable pods targeted by this deployment. This is the total number of + // pods that are still required for the deployment to have 100% available capacity. They may + // either be pods that are running but not yet available or pods that still have not been created. + UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"` + // Total number of terminating pods targeted by this deployment. Terminating pods have a non-null + // .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. + // + // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. + TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"` + // Represents the latest available observations of a deployment's current state. + Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"` + // Count of hash collisions for the Deployment. The Deployment controller uses this + // field as a collision avoidance mechanism when it needs to create the name for the + // newest ReplicaSet. + CollisionCount *int32 `json:"collisionCount,omitempty"` } // DeploymentStatusApplyConfiguration constructs a declarative configuration of the DeploymentStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentstrategy.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentstrategy.go index b142b0deb07b9..4c368f33fcdde 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentstrategy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deploymentstrategy.go @@ -24,8 +24,16 @@ import ( // DeploymentStrategyApplyConfiguration represents a declarative configuration of the DeploymentStrategy type for use // with apply. +// +// DeploymentStrategy describes how to replace existing pods with new ones. type DeploymentStrategyApplyConfiguration struct { - Type *extensionsv1beta1.DeploymentStrategyType `json:"type,omitempty"` + // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. + Type *extensionsv1beta1.DeploymentStrategyType `json:"type,omitempty"` + // Rolling update config params. Present only if DeploymentStrategyType = + // RollingUpdate. + // --- + // TODO: Update this to follow our convention for oneOf, whatever we decide it + // to be. RollingUpdate *RollingUpdateDeploymentApplyConfiguration `json:"rollingUpdate,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/httpingresspath.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/httpingresspath.go index 32e0c8b1d2114..1a84aebc19e3c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/httpingresspath.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/httpingresspath.go @@ -24,10 +24,34 @@ import ( // HTTPIngressPathApplyConfiguration represents a declarative configuration of the HTTPIngressPath type for use // with apply. +// +// HTTPIngressPath associates a path with a backend. Incoming urls matching the +// path are forwarded to the backend. type HTTPIngressPathApplyConfiguration struct { - Path *string `json:"path,omitempty"` - PathType *extensionsv1beta1.PathType `json:"pathType,omitempty"` - Backend *IngressBackendApplyConfiguration `json:"backend,omitempty"` + // Path is matched against the path of an incoming request. Currently it can + // contain characters disallowed from the conventional "path" part of a URL + // as defined by RFC 3986. Paths must begin with a '/'. When unspecified, + // all paths from incoming requests are matched. + Path *string `json:"path,omitempty"` + // PathType determines the interpretation of the Path matching. PathType can + // be one of the following values: + // * Exact: Matches the URL path exactly. + // * Prefix: Matches based on a URL path prefix split by '/'. Matching is + // done on a path element by element basis. A path element refers is the + // list of labels in the path split by the '/' separator. A request is a + // match for path p if every p is an element-wise prefix of p of the + // request path. Note that if the last element of the path is a substring + // of the last element in request path, it is not a match (e.g. /foo/bar + // matches /foo/bar/baz, but does not match /foo/barbaz). + // * ImplementationSpecific: Interpretation of the Path matching is up to + // the IngressClass. Implementations can treat this as a separate PathType + // or treat it identically to Prefix or Exact path types. + // Implementations are required to support all path types. + // Defaults to ImplementationSpecific. + PathType *extensionsv1beta1.PathType `json:"pathType,omitempty"` + // Backend defines the referenced service endpoint to which the traffic + // will be forwarded to. + Backend *IngressBackendApplyConfiguration `json:"backend,omitempty"` } // HTTPIngressPathApplyConfiguration constructs a declarative configuration of the HTTPIngressPath type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/httpingressrulevalue.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/httpingressrulevalue.go index 12454522374fb..8c8db0c3bed80 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/httpingressrulevalue.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/httpingressrulevalue.go @@ -20,7 +20,14 @@ package v1beta1 // HTTPIngressRuleValueApplyConfiguration represents a declarative configuration of the HTTPIngressRuleValue type for use // with apply. +// +// HTTPIngressRuleValue is a list of http selectors pointing to backends. +// In the example: http:///? -> backend where +// where parts of the url correspond to RFC 3986, this resource will be used +// to match against everything after the last '/' and before the first '?' +// or '#'. type HTTPIngressRuleValueApplyConfiguration struct { + // A collection of paths that map requests to backends. Paths []HTTPIngressPathApplyConfiguration `json:"paths,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingress.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingress.go index 6c7925317db50..ba82ba9be4233 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingress.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingress.go @@ -29,11 +29,23 @@ import ( // IngressApplyConfiguration represents a declarative configuration of the Ingress type for use // with apply. +// +// Ingress is a collection of rules that allow inbound connections to reach the +// endpoints defined by a backend. An Ingress can be configured to give services +// externally-reachable urls, load balance traffic, terminate SSL, offer name +// based virtual hosting etc. +// DEPRECATED - This group version of Ingress is deprecated by networking.k8s.io/v1beta1 Ingress. See the release notes for more information. type IngressApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *IngressSpecApplyConfiguration `json:"spec,omitempty"` - Status *IngressStatusApplyConfiguration `json:"status,omitempty"` + // Spec is the desired state of the Ingress. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *IngressSpecApplyConfiguration `json:"spec,omitempty"` + // Status is the current state of the Ingress. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *IngressStatusApplyConfiguration `json:"status,omitempty"` } // Ingress constructs a declarative configuration of the Ingress type for use with @@ -47,6 +59,27 @@ func Ingress(name, namespace string) *IngressApplyConfiguration { return b } +// ExtractIngressFrom extracts the applied configuration owned by fieldManager from +// ingress for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// ingress must be a unmodified Ingress API object that was retrieved from the Kubernetes API. +// ExtractIngressFrom 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. +func ExtractIngressFrom(ingress *extensionsv1beta1.Ingress, fieldManager string, subresource string) (*IngressApplyConfiguration, error) { + b := &IngressApplyConfiguration{} + err := managedfields.ExtractInto(ingress, internal.Parser().Type("io.k8s.api.extensions.v1beta1.Ingress"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(ingress.Name) + b.WithNamespace(ingress.Namespace) + + b.WithKind("Ingress") + b.WithAPIVersion("extensions/v1beta1") + return b, nil +} + // ExtractIngress extracts the applied configuration owned by fieldManager from // ingress. If no managedFields are found in ingress for fieldManager, a // IngressApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +90,16 @@ func Ingress(name, namespace string) *IngressApplyConfiguration { // ExtractIngress 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 ExtractIngress(ingress *extensionsv1beta1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) { - return extractIngress(ingress, fieldManager, "") + return ExtractIngressFrom(ingress, fieldManager, "") } -// ExtractIngressStatus is the same as ExtractIngress except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractIngressStatus extracts the applied configuration owned by fieldManager from +// ingress for the status subresource. func ExtractIngressStatus(ingress *extensionsv1beta1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) { - return extractIngress(ingress, fieldManager, "status") + return ExtractIngressFrom(ingress, fieldManager, "status") } -func extractIngress(ingress *extensionsv1beta1.Ingress, fieldManager string, subresource string) (*IngressApplyConfiguration, error) { - b := &IngressApplyConfiguration{} - err := managedfields.ExtractInto(ingress, internal.Parser().Type("io.k8s.api.extensions.v1beta1.Ingress"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(ingress.Name) - b.WithNamespace(ingress.Namespace) - - b.WithKind("Ingress") - b.WithAPIVersion("extensions/v1beta1") - return b, nil -} func (b IngressApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressbackend.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressbackend.go index 9d386f160861a..7c84833a5b44a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressbackend.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressbackend.go @@ -25,10 +25,17 @@ import ( // IngressBackendApplyConfiguration represents a declarative configuration of the IngressBackend type for use // with apply. +// +// IngressBackend describes all endpoints for a given service and port. type IngressBackendApplyConfiguration struct { - ServiceName *string `json:"serviceName,omitempty"` - ServicePort *intstr.IntOrString `json:"servicePort,omitempty"` - Resource *v1.TypedLocalObjectReferenceApplyConfiguration `json:"resource,omitempty"` + // Specifies the name of the referenced service. + ServiceName *string `json:"serviceName,omitempty"` + // Specifies the port of the referenced service. + ServicePort *intstr.IntOrString `json:"servicePort,omitempty"` + // Resource is an ObjectRef to another Kubernetes resource in the namespace + // of the Ingress object. If resource is specified, serviceName and servicePort + // must not be specified. + Resource *v1.TypedLocalObjectReferenceApplyConfiguration `json:"resource,omitempty"` } // IngressBackendApplyConfiguration constructs a declarative configuration of the IngressBackend type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressloadbalanceringress.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressloadbalanceringress.go index 12dbc35969b05..6b1d3cd80c24c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressloadbalanceringress.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressloadbalanceringress.go @@ -20,10 +20,15 @@ package v1beta1 // IngressLoadBalancerIngressApplyConfiguration represents a declarative configuration of the IngressLoadBalancerIngress type for use // with apply. +// +// IngressLoadBalancerIngress represents the status of a load-balancer ingress point. type IngressLoadBalancerIngressApplyConfiguration struct { - IP *string `json:"ip,omitempty"` - Hostname *string `json:"hostname,omitempty"` - Ports []IngressPortStatusApplyConfiguration `json:"ports,omitempty"` + // IP is set for load-balancer ingress points that are IP based. + IP *string `json:"ip,omitempty"` + // Hostname is set for load-balancer ingress points that are DNS based. + Hostname *string `json:"hostname,omitempty"` + // Ports provides information about the ports exposed by this LoadBalancer. + Ports []IngressPortStatusApplyConfiguration `json:"ports,omitempty"` } // IngressLoadBalancerIngressApplyConfiguration constructs a declarative configuration of the IngressLoadBalancerIngress type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressloadbalancerstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressloadbalancerstatus.go index e896ab3415596..a71887ad46cc6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressloadbalancerstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressloadbalancerstatus.go @@ -20,7 +20,10 @@ package v1beta1 // IngressLoadBalancerStatusApplyConfiguration represents a declarative configuration of the IngressLoadBalancerStatus type for use // with apply. +// +// LoadBalancerStatus represents the status of a load-balancer. type IngressLoadBalancerStatusApplyConfiguration struct { + // Ingress is a list containing ingress points for the load-balancer. Ingress []IngressLoadBalancerIngressApplyConfiguration `json:"ingress,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressportstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressportstatus.go index 4ee3f01617f9c..019c29bc9e3c4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressportstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressportstatus.go @@ -24,10 +24,23 @@ import ( // IngressPortStatusApplyConfiguration represents a declarative configuration of the IngressPortStatus type for use // with apply. +// +// IngressPortStatus represents the error condition of a service port type IngressPortStatusApplyConfiguration struct { - Port *int32 `json:"port,omitempty"` + // Port is the port number of the ingress port. + Port *int32 `json:"port,omitempty"` + // Protocol is the protocol of the ingress port. + // The supported values are: "TCP", "UDP", "SCTP" Protocol *v1.Protocol `json:"protocol,omitempty"` - Error *string `json:"error,omitempty"` + // Error is to record the problem with the service port + // The format of the error shall comply with the following rules: + // - built-in error values shall be specified in this file and those shall use + // CamelCase names + // - cloud provider specific error values must have names that comply with the + // format foo.example.com/CamelCase. + // --- + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + Error *string `json:"error,omitempty"` } // IngressPortStatusApplyConfiguration constructs a declarative configuration of the IngressPortStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressrule.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressrule.go index 809fada928eac..91ebcf89f0452 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressrule.go @@ -20,8 +20,39 @@ package v1beta1 // IngressRuleApplyConfiguration represents a declarative configuration of the IngressRule type for use // with apply. +// +// IngressRule represents the rules mapping the paths under a specified host to +// the related backend services. Incoming requests are first evaluated for a host +// match, then routed to the backend associated with the matching IngressRuleValue. type IngressRuleApplyConfiguration struct { - Host *string `json:"host,omitempty"` + // Host is the fully qualified domain name of a network host, as defined by RFC 3986. + // Note the following deviations from the "host" part of the + // URI as defined in RFC 3986: + // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to + // the IP in the Spec of the parent Ingress. + // 2. The `:` delimiter is not respected because ports are not allowed. + // Currently the port of an Ingress is implicitly :80 for http and + // :443 for https. + // Both these may change in the future. + // Incoming requests are matched against the host before the + // IngressRuleValue. If the host is unspecified, the Ingress routes all + // traffic based on the specified IngressRuleValue. + // + // Host can be "precise" which is a domain name without the terminating dot of + // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name + // prefixed with a single wildcard label (e.g. "*.foo.com"). + // The wildcard character '*' must appear by itself as the first DNS label and + // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*"). + // Requests will be matched against the Host field in the following way: + // 1. If Host is precise, the request matches this rule if the http host header is equal to Host. + // 2. If Host is a wildcard, then the request matches this rule if the http host header + // is to equal to the suffix (removing the first label) of the wildcard rule. + Host *string `json:"host,omitempty"` + // IngressRuleValue represents a rule to route requests for this IngressRule. + // If unspecified, the rule defaults to a http catch-all. Whether that sends + // just traffic matching the host to the default backend or all traffic to the + // default backend, is left to the controller fulfilling the Ingress. Http is + // currently the only supported IngressRuleValue. IngressRuleValueApplyConfiguration `json:",inline"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressrulevalue.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressrulevalue.go index 4a64124755608..1ace13224fd89 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressrulevalue.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressrulevalue.go @@ -20,7 +20,18 @@ package v1beta1 // IngressRuleValueApplyConfiguration represents a declarative configuration of the IngressRuleValue type for use // with apply. +// +// IngressRuleValue represents a rule to apply against incoming requests. If the +// rule is satisfied, the request is routed to the specified backend. Currently +// mixing different types of rules in a single Ingress is disallowed, so exactly +// one of the following must be set. type IngressRuleValueApplyConfiguration struct { + // http is a list of http selectors pointing to backends. + // A path is matched against the path of an incoming request. Currently it can + // contain characters disallowed from the conventional "path" part of a URL + // as defined by RFC 3986. Paths must begin with a '/'. + // A backend defines the referenced service endpoint to which the traffic + // will be forwarded to. HTTP *HTTPIngressRuleValueApplyConfiguration `json:"http,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressspec.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressspec.go index 58fbde8b35251..1b01da93feb2e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressspec.go @@ -20,11 +20,34 @@ package v1beta1 // IngressSpecApplyConfiguration represents a declarative configuration of the IngressSpec type for use // with apply. +// +// IngressSpec describes the Ingress the user wishes to exist. type IngressSpecApplyConfiguration struct { - IngressClassName *string `json:"ingressClassName,omitempty"` - Backend *IngressBackendApplyConfiguration `json:"backend,omitempty"` - TLS []IngressTLSApplyConfiguration `json:"tls,omitempty"` - Rules []IngressRuleApplyConfiguration `json:"rules,omitempty"` + // IngressClassName is the name of the IngressClass cluster resource. The + // associated IngressClass defines which controller will implement the + // resource. This replaces the deprecated `kubernetes.io/ingress.class` + // annotation. For backwards compatibility, when that annotation is set, it + // must be given precedence over this field. The controller may emit a + // warning if the field and annotation have different values. + // Implementations of this API should ignore Ingresses without a class + // specified. An IngressClass resource may be marked as default, which can + // be used to set a default value for this field. For more information, + // refer to the IngressClass documentation. + IngressClassName *string `json:"ingressClassName,omitempty"` + // A default backend capable of servicing requests that don't match any + // rule. At least one of 'backend' or 'rules' must be specified. This field + // is optional to allow the loadbalancer controller or defaulting logic to + // specify a global default. + Backend *IngressBackendApplyConfiguration `json:"backend,omitempty"` + // TLS configuration. Currently the Ingress only supports a single TLS + // port, 443. If multiple members of this list specify different hosts, they + // will be multiplexed on the same port according to the hostname specified + // through the SNI TLS extension, if the ingress controller fulfilling the + // ingress supports SNI. + TLS []IngressTLSApplyConfiguration `json:"tls,omitempty"` + // A list of host rules used to configure the Ingress. If unspecified, or + // no rule matches, all traffic is sent to the default backend. + Rules []IngressRuleApplyConfiguration `json:"rules,omitempty"` } // IngressSpecApplyConfiguration constructs a declarative configuration of the IngressSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressstatus.go index 3aed616889c0f..1374e0161d427 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingressstatus.go @@ -20,7 +20,10 @@ package v1beta1 // IngressStatusApplyConfiguration represents a declarative configuration of the IngressStatus type for use // with apply. +// +// IngressStatus describe the current state of the Ingress. type IngressStatusApplyConfiguration struct { + // LoadBalancer contains the current status of the load-balancer. LoadBalancer *IngressLoadBalancerStatusApplyConfiguration `json:"loadBalancer,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingresstls.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingresstls.go index 63648cd464952..87e6315b9a3ca 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingresstls.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingresstls.go @@ -20,9 +20,20 @@ package v1beta1 // IngressTLSApplyConfiguration represents a declarative configuration of the IngressTLS type for use // with apply. +// +// IngressTLS describes the transport layer security associated with an Ingress. type IngressTLSApplyConfiguration struct { - Hosts []string `json:"hosts,omitempty"` - SecretName *string `json:"secretName,omitempty"` + // Hosts are a list of hosts included in the TLS certificate. The values in + // this list must match the name/s used in the tlsSecret. Defaults to the + // wildcard host setting for the loadbalancer controller fulfilling this + // Ingress, if left unspecified. + Hosts []string `json:"hosts,omitempty"` + // SecretName is the name of the secret used to terminate SSL traffic on 443. + // Field is left optional to allow SSL routing based on SNI hostname alone. + // If the SNI host in a listener conflicts with the "Host" header field used + // by an IngressRule, the SNI host is used for termination and value of the + // Host header is used for routing. + SecretName *string `json:"secretName,omitempty"` } // IngressTLSApplyConfiguration constructs a declarative configuration of the IngressTLS type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ipblock.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ipblock.go index 4a671130b8592..903a870d152a1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ipblock.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ipblock.go @@ -20,8 +20,18 @@ package v1beta1 // IPBlockApplyConfiguration represents a declarative configuration of the IPBlock type for use // with apply. +// +// DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. +// IPBlock describes a particular CIDR (Ex. "192.168.1.0/24","2001:db8::/64") that is allowed +// to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs +// that should not be included within this rule. type IPBlockApplyConfiguration struct { - CIDR *string `json:"cidr,omitempty"` + // CIDR is a string representing the IP Block + // Valid examples are "192.168.1.0/24" or "2001:db8::/64" + CIDR *string `json:"cidr,omitempty"` + // Except is a slice of CIDRs that should not be included within an IP Block + // Valid examples are "192.168.1.0/24" or "2001:db8::/64" + // Except values will be rejected if they are outside the CIDR range Except []string `json:"except,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicy.go index e1f0aad86f5be..64d95e49251b6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicy.go @@ -29,10 +29,16 @@ import ( // NetworkPolicyApplyConfiguration represents a declarative configuration of the NetworkPolicy type for use // with apply. +// +// DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. +// NetworkPolicy describes what network traffic is allowed for a set of Pods type NetworkPolicyApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"` + // Specification of the desired behavior for this NetworkPolicy. + Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"` } // NetworkPolicy constructs a declarative configuration of the NetworkPolicy type for use with @@ -46,29 +52,14 @@ func NetworkPolicy(name, namespace string) *NetworkPolicyApplyConfiguration { return b } -// ExtractNetworkPolicy extracts the applied configuration owned by fieldManager from -// networkPolicy. If no managedFields are found in networkPolicy for fieldManager, a -// NetworkPolicyApplyConfiguration 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. +// ExtractNetworkPolicyFrom extracts the applied configuration owned by fieldManager from +// networkPolicy for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // networkPolicy must be a unmodified NetworkPolicy API object that was retrieved from the Kubernetes API. -// ExtractNetworkPolicy provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractNetworkPolicyFrom 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 ExtractNetworkPolicy(networkPolicy *extensionsv1beta1.NetworkPolicy, fieldManager string) (*NetworkPolicyApplyConfiguration, error) { - return extractNetworkPolicy(networkPolicy, fieldManager, "") -} - -// ExtractNetworkPolicyStatus is the same as ExtractNetworkPolicy except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractNetworkPolicyStatus(networkPolicy *extensionsv1beta1.NetworkPolicy, fieldManager string) (*NetworkPolicyApplyConfiguration, error) { - return extractNetworkPolicy(networkPolicy, fieldManager, "status") -} - -func extractNetworkPolicy(networkPolicy *extensionsv1beta1.NetworkPolicy, fieldManager string, subresource string) (*NetworkPolicyApplyConfiguration, error) { +func ExtractNetworkPolicyFrom(networkPolicy *extensionsv1beta1.NetworkPolicy, fieldManager string, subresource string) (*NetworkPolicyApplyConfiguration, error) { b := &NetworkPolicyApplyConfiguration{} err := managedfields.ExtractInto(networkPolicy, internal.Parser().Type("io.k8s.api.extensions.v1beta1.NetworkPolicy"), fieldManager, b, subresource) if err != nil { @@ -81,6 +72,21 @@ func extractNetworkPolicy(networkPolicy *extensionsv1beta1.NetworkPolicy, fieldM b.WithAPIVersion("extensions/v1beta1") return b, nil } + +// ExtractNetworkPolicy extracts the applied configuration owned by fieldManager from +// networkPolicy. If no managedFields are found in networkPolicy for fieldManager, a +// NetworkPolicyApplyConfiguration 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. +// networkPolicy must be a unmodified NetworkPolicy API object that was retrieved from the Kubernetes API. +// ExtractNetworkPolicy 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. +func ExtractNetworkPolicy(networkPolicy *extensionsv1beta1.NetworkPolicy, fieldManager string) (*NetworkPolicyApplyConfiguration, error) { + return ExtractNetworkPolicyFrom(networkPolicy, fieldManager, "") +} + func (b NetworkPolicyApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyegressrule.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyegressrule.go index ca3e174f93c8a..d9812fc22a19b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyegressrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyegressrule.go @@ -20,9 +20,24 @@ package v1beta1 // NetworkPolicyEgressRuleApplyConfiguration represents a declarative configuration of the NetworkPolicyEgressRule type for use // with apply. +// +// DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule. +// NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods +// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. +// This type is beta-level in 1.8 type NetworkPolicyEgressRuleApplyConfiguration struct { + // List of destination ports for outgoing traffic. + // Each item in this list is combined using a logical OR. If this field is + // empty or missing, this rule matches all ports (traffic not restricted by port). + // If this field is present and contains at least one item, then this rule allows + // traffic only if the traffic matches at least one port in the list. Ports []NetworkPolicyPortApplyConfiguration `json:"ports,omitempty"` - To []NetworkPolicyPeerApplyConfiguration `json:"to,omitempty"` + // List of destinations for outgoing traffic of pods selected for this rule. + // Items in this list are combined using a logical OR operation. If this field is + // empty or missing, this rule matches all destinations (traffic not restricted by + // destination). If this field is present and contains at least one item, this rule + // allows traffic only if the traffic matches at least one item in the to list. + To []NetworkPolicyPeerApplyConfiguration `json:"to,omitempty"` } // NetworkPolicyEgressRuleApplyConfiguration constructs a declarative configuration of the NetworkPolicyEgressRule type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyingressrule.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyingressrule.go index 16071372047a9..c52d5116a4252 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyingressrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyingressrule.go @@ -20,9 +20,22 @@ package v1beta1 // NetworkPolicyIngressRuleApplyConfiguration represents a declarative configuration of the NetworkPolicyIngressRule type for use // with apply. +// +// DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule. +// This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from. type NetworkPolicyIngressRuleApplyConfiguration struct { + // List of ports which should be made accessible on the pods selected for this rule. + // Each item in this list is combined using a logical OR. + // If this field is empty or missing, this rule matches all ports (traffic not restricted by port). + // If this field is present and contains at least one item, then this rule allows traffic + // only if the traffic matches at least one port in the list. Ports []NetworkPolicyPortApplyConfiguration `json:"ports,omitempty"` - From []NetworkPolicyPeerApplyConfiguration `json:"from,omitempty"` + // List of sources which should be able to access the pods selected for this rule. + // Items in this list are combined using a logical OR operation. + // If this field is empty or missing, this rule matches all sources (traffic not restricted by source). + // If this field is present and contains at least one item, this rule allows traffic only if the + // traffic matches at least one item in the from list. + From []NetworkPolicyPeerApplyConfiguration `json:"from,omitempty"` } // NetworkPolicyIngressRuleApplyConfiguration constructs a declarative configuration of the NetworkPolicyIngressRule type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicypeer.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicypeer.go index 8a0fa57415242..153095e85d337 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicypeer.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicypeer.go @@ -24,10 +24,26 @@ import ( // NetworkPolicyPeerApplyConfiguration represents a declarative configuration of the NetworkPolicyPeer type for use // with apply. +// +// DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer. type NetworkPolicyPeerApplyConfiguration struct { - PodSelector *v1.LabelSelectorApplyConfiguration `json:"podSelector,omitempty"` + // This is a label selector which selects Pods. This field follows standard label + // selector semantics; if present but empty, it selects all pods. + // + // If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects + // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. + // Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. + PodSelector *v1.LabelSelectorApplyConfiguration `json:"podSelector,omitempty"` + // Selects Namespaces using cluster-scoped labels. This field follows standard label + // selector semantics; if present but empty, it selects all namespaces. + // + // If PodSelector is also set, then the NetworkPolicyPeer as a whole selects + // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. + // Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` - IPBlock *IPBlockApplyConfiguration `json:"ipBlock,omitempty"` + // IPBlock defines policy on a particular IPBlock. If this field is set then + // neither of the other fields can be. + IPBlock *IPBlockApplyConfiguration `json:"ipBlock,omitempty"` } // NetworkPolicyPeerApplyConfiguration constructs a declarative configuration of the NetworkPolicyPeer type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyport.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyport.go index 6bc1c1977b615..94ea3bdd1f5eb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyport.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyport.go @@ -25,10 +25,22 @@ import ( // NetworkPolicyPortApplyConfiguration represents a declarative configuration of the NetworkPolicyPort type for use // with apply. +// +// DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort. type NetworkPolicyPortApplyConfiguration struct { - Protocol *v1.Protocol `json:"protocol,omitempty"` - Port *intstr.IntOrString `json:"port,omitempty"` - EndPort *int32 `json:"endPort,omitempty"` + // Optional. The protocol (TCP, UDP, or SCTP) which traffic must match. + // If not specified, this field defaults to TCP. + Protocol *v1.Protocol `json:"protocol,omitempty"` + // The port on the given protocol. This can either be a numerical or named + // port on a pod. If this field is not provided, this matches all port names and + // numbers. + // If present, only traffic on the specified protocol AND port will be matched. + Port *intstr.IntOrString `json:"port,omitempty"` + // If set, indicates that the range of ports from port to endPort, inclusive, + // should be allowed by the policy. This field cannot be defined if the port field + // is not defined or if the port field is defined as a named (string) port. + // The endPort must be equal or greater than port. + EndPort *int32 `json:"endPort,omitempty"` } // NetworkPolicyPortApplyConfiguration constructs a declarative configuration of the NetworkPolicyPort type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyspec.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyspec.go index 4454329c5b5b2..5785b82e40772 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicyspec.go @@ -25,11 +25,42 @@ import ( // NetworkPolicySpecApplyConfiguration represents a declarative configuration of the NetworkPolicySpec type for use // with apply. +// +// DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec. type NetworkPolicySpecApplyConfiguration struct { - PodSelector *v1.LabelSelectorApplyConfiguration `json:"podSelector,omitempty"` - Ingress []NetworkPolicyIngressRuleApplyConfiguration `json:"ingress,omitempty"` - Egress []NetworkPolicyEgressRuleApplyConfiguration `json:"egress,omitempty"` - PolicyTypes []extensionsv1beta1.PolicyType `json:"policyTypes,omitempty"` + // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules + // is applied to any pods selected by this field. Multiple network policies can select the + // same set of pods. In this case, the ingress rules for each are combined additively. + // This field is NOT optional and follows standard label selector semantics. + // An empty podSelector matches all pods in this namespace. + PodSelector *v1.LabelSelectorApplyConfiguration `json:"podSelector,omitempty"` + // List of ingress rules to be applied to the selected pods. + // Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod + // OR if the traffic source is the pod's local node, + // OR if the traffic matches at least one ingress rule across all of the NetworkPolicy + // objects whose podSelector matches the pod. + // If this field is empty then this NetworkPolicy does not allow any traffic + // (and serves solely to ensure that the pods it selects are isolated by default). + Ingress []NetworkPolicyIngressRuleApplyConfiguration `json:"ingress,omitempty"` + // List of egress rules to be applied to the selected pods. Outgoing traffic is + // allowed if there are no NetworkPolicies selecting the pod (and cluster policy + // otherwise allows the traffic), OR if the traffic matches at least one egress rule + // across all of the NetworkPolicy objects whose podSelector matches the pod. If + // this field is empty then this NetworkPolicy limits all outgoing traffic (and serves + // solely to ensure that the pods it selects are isolated by default). + // This field is beta-level in 1.8 + Egress []NetworkPolicyEgressRuleApplyConfiguration `json:"egress,omitempty"` + // List of rule types that the NetworkPolicy relates to. + // Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. + // If this field is not specified, it will default based on the existence of Ingress or Egress rules; + // policies that contain an Egress section are assumed to affect Egress, and all policies + // (whether or not they contain an Ingress section) are assumed to affect Ingress. + // If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. + // Likewise, if you want to write a policy that specifies that no egress is allowed, + // you must specify a policyTypes value that include "Egress" (since such a policy would not include + // an Egress section and would otherwise default to just [ "Ingress" ]). + // This field is beta-level in 1.8 + PolicyTypes []extensionsv1beta1.PolicyType `json:"policyTypes,omitempty"` } // NetworkPolicySpecApplyConfiguration constructs a declarative configuration of the NetworkPolicySpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicaset.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicaset.go index dbe787b5bfd20..02d6cbffe403f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicaset.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicaset.go @@ -29,11 +29,25 @@ import ( // ReplicaSetApplyConfiguration represents a declarative configuration of the ReplicaSet type for use // with apply. +// +// DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for +// more information. +// ReplicaSet ensures that a specified number of pod replicas are running at any given time. type ReplicaSetApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // If the Labels of a ReplicaSet are empty, they are defaulted to + // be the same as the Pod(s) that the ReplicaSet manages. + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ReplicaSetSpecApplyConfiguration `json:"spec,omitempty"` - Status *ReplicaSetStatusApplyConfiguration `json:"status,omitempty"` + // Spec defines the specification of the desired behavior of the ReplicaSet. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *ReplicaSetSpecApplyConfiguration `json:"spec,omitempty"` + // Status is the most recently observed status of the ReplicaSet. + // This data may be out of date by some window of time. + // Populated by the system. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *ReplicaSetStatusApplyConfiguration `json:"status,omitempty"` } // ReplicaSet constructs a declarative configuration of the ReplicaSet type for use with @@ -47,6 +61,27 @@ func ReplicaSet(name, namespace string) *ReplicaSetApplyConfiguration { return b } +// ExtractReplicaSetFrom extracts the applied configuration owned by fieldManager from +// replicaSet for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// replicaSet must be a unmodified ReplicaSet API object that was retrieved from the Kubernetes API. +// ExtractReplicaSetFrom 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. +func ExtractReplicaSetFrom(replicaSet *extensionsv1beta1.ReplicaSet, fieldManager string, subresource string) (*ReplicaSetApplyConfiguration, error) { + b := &ReplicaSetApplyConfiguration{} + err := managedfields.ExtractInto(replicaSet, internal.Parser().Type("io.k8s.api.extensions.v1beta1.ReplicaSet"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(replicaSet.Name) + b.WithNamespace(replicaSet.Namespace) + + b.WithKind("ReplicaSet") + b.WithAPIVersion("extensions/v1beta1") + return b, nil +} + // ExtractReplicaSet extracts the applied configuration owned by fieldManager from // replicaSet. If no managedFields are found in replicaSet for fieldManager, a // ReplicaSetApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +92,22 @@ func ReplicaSet(name, namespace string) *ReplicaSetApplyConfiguration { // ExtractReplicaSet 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 ExtractReplicaSet(replicaSet *extensionsv1beta1.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) { - return extractReplicaSet(replicaSet, fieldManager, "") + return ExtractReplicaSetFrom(replicaSet, fieldManager, "") } -// ExtractReplicaSetStatus is the same as ExtractReplicaSet except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractReplicaSetStatus(replicaSet *extensionsv1beta1.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) { - return extractReplicaSet(replicaSet, fieldManager, "status") +// ExtractReplicaSetScale extracts the applied configuration owned by fieldManager from +// replicaSet for the scale subresource. +func ExtractReplicaSetScale(replicaSet *extensionsv1beta1.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) { + return ExtractReplicaSetFrom(replicaSet, fieldManager, "scale") } -func extractReplicaSet(replicaSet *extensionsv1beta1.ReplicaSet, fieldManager string, subresource string) (*ReplicaSetApplyConfiguration, error) { - b := &ReplicaSetApplyConfiguration{} - err := managedfields.ExtractInto(replicaSet, internal.Parser().Type("io.k8s.api.extensions.v1beta1.ReplicaSet"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(replicaSet.Name) - b.WithNamespace(replicaSet.Namespace) - - b.WithKind("ReplicaSet") - b.WithAPIVersion("extensions/v1beta1") - return b, nil +// ExtractReplicaSetStatus extracts the applied configuration owned by fieldManager from +// replicaSet for the status subresource. +func ExtractReplicaSetStatus(replicaSet *extensionsv1beta1.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) { + return ExtractReplicaSetFrom(replicaSet, fieldManager, "status") } + func (b ReplicaSetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicasetcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicasetcondition.go index 540079fe53da2..e8100ce0594bb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicasetcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicasetcondition.go @@ -26,12 +26,19 @@ import ( // ReplicaSetConditionApplyConfiguration represents a declarative configuration of the ReplicaSetCondition type for use // with apply. +// +// ReplicaSetCondition describes the state of a replica set at a certain point. type ReplicaSetConditionApplyConfiguration struct { - Type *extensionsv1beta1.ReplicaSetConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Type of replica set condition. + Type *extensionsv1beta1.ReplicaSetConditionType `json:"type,omitempty"` + // Status of the condition, one of True, False, Unknown. + Status *v1.ConditionStatus `json:"status,omitempty"` + // The last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // A human readable message indicating details about the transition. + Message *string `json:"message,omitempty"` } // ReplicaSetConditionApplyConfiguration constructs a declarative configuration of the ReplicaSetCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicasetspec.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicasetspec.go index 27653dd1af834..233c622e03cf2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicasetspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicasetspec.go @@ -25,11 +25,27 @@ import ( // ReplicaSetSpecApplyConfiguration represents a declarative configuration of the ReplicaSetSpec type for use // with apply. +// +// ReplicaSetSpec is the specification of a ReplicaSet. type ReplicaSetSpecApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // Replicas is the number of desired pods. + // This is a pointer to distinguish between explicit zero and unspecified. + // Defaults to 1. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + Replicas *int32 `json:"replicas,omitempty"` + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + // Selector is a label query over pods that should match the replica count. + // If the selector is empty, it is defaulted to the labels present on the pod template. + // Label keys and values that must match in order to be controlled by this replica set. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // Template is the object that describes the pod that will be created if + // insufficient replicas are detected. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template + Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` } // ReplicaSetSpecApplyConfiguration constructs a declarative configuration of the ReplicaSetSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicasetstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicasetstatus.go index 46abc94322b6f..949e39e3e70d4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicasetstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicasetstatus.go @@ -20,14 +20,27 @@ package v1beta1 // ReplicaSetStatusApplyConfiguration represents a declarative configuration of the ReplicaSetStatus type for use // with apply. +// +// ReplicaSetStatus represents the current status of a ReplicaSet. type ReplicaSetStatusApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - FullyLabeledReplicas *int32 `json:"fullyLabeledReplicas,omitempty"` - ReadyReplicas *int32 `json:"readyReplicas,omitempty"` - AvailableReplicas *int32 `json:"availableReplicas,omitempty"` - TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Conditions []ReplicaSetConditionApplyConfiguration `json:"conditions,omitempty"` + // Replicas is the most recently observed number of non-terminating pods. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + Replicas *int32 `json:"replicas,omitempty"` + // The number of non-terminating pods that have labels matching the labels of the pod template of the replicaset. + FullyLabeledReplicas *int32 `json:"fullyLabeledReplicas,omitempty"` + // The number of non-terminating pods targeted by this ReplicaSet with a Ready Condition. + ReadyReplicas *int32 `json:"readyReplicas,omitempty"` + // The number of available non-terminating pods (ready for at least minReadySeconds) for this replica set. + AvailableReplicas *int32 `json:"availableReplicas,omitempty"` + // The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp + // and have not yet reached the Failed or Succeeded .status.phase. + // + // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. + TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"` + // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // Represents the latest available observations of a replica set's current state. + Conditions []ReplicaSetConditionApplyConfiguration `json:"conditions,omitempty"` } // ReplicaSetStatusApplyConfiguration constructs a declarative configuration of the ReplicaSetStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/rollbackconfig.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/rollbackconfig.go index 775f82eef8019..f73b9e670eafe 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/rollbackconfig.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/rollbackconfig.go @@ -20,7 +20,10 @@ package v1beta1 // RollbackConfigApplyConfiguration represents a declarative configuration of the RollbackConfig type for use // with apply. +// +// DEPRECATED. type RollbackConfigApplyConfiguration struct { + // The revision to rollback to. If set to 0, rollback to the last revision. Revision *int64 `json:"revision,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/rollingupdatedaemonset.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/rollingupdatedaemonset.go index 4352f7fac7f28..0ce80e98820e2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/rollingupdatedaemonset.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/rollingupdatedaemonset.go @@ -24,9 +24,44 @@ import ( // RollingUpdateDaemonSetApplyConfiguration represents a declarative configuration of the RollingUpdateDaemonSet type for use // with apply. +// +// Spec to control the desired behavior of daemon set rolling update. type RollingUpdateDaemonSetApplyConfiguration struct { + // The maximum number of DaemonSet pods that can be unavailable during the + // update. Value can be an absolute number (ex: 5) or a percentage of total + // number of DaemonSet pods at the start of the update (ex: 10%). Absolute + // number is calculated from percentage by rounding up. + // This cannot be 0 if MaxSurge is 0 + // Default value is 1. + // Example: when this is set to 30%, at most 30% of the total number of nodes + // that should be running the daemon pod (i.e. status.desiredNumberScheduled) + // can have their pods stopped for an update at any given time. The update + // starts by stopping at most 30% of those DaemonSet pods and then brings + // up new DaemonSet pods in their place. Once the new pods are available, + // it then proceeds onto other DaemonSet pods, thus ensuring that at least + // 70% of original number of DaemonSet pods are available at all times during + // the update. MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` - MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` + // The maximum number of nodes with an existing available DaemonSet pod that + // can have an updated DaemonSet pod during during an update. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // This can not be 0 if MaxUnavailable is 0. + // Absolute number is calculated from percentage by rounding up to a minimum of 1. + // Default value is 0. + // Example: when this is set to 30%, at most 30% of the total number of nodes + // that should be running the daemon pod (i.e. status.desiredNumberScheduled) + // can have their a new pod created before the old pod is marked as deleted. + // The update starts by launching new pods on 30% of nodes. Once an updated + // pod is available (Ready for at least minReadySeconds) the old DaemonSet pod + // on that node is marked deleted. If the old pod becomes unavailable for any + // reason (Ready transitions to false, is evicted, or is drained) an updated + // pod is immediately created on that node without considering surge limits. + // Allowing surge implies the possibility that the resources consumed by the + // daemonset on any given node can double if the readiness check fails, and + // so resource intensive daemonsets should take into account that they may + // cause evictions during disruption. + // This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate. + MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` } // RollingUpdateDaemonSetApplyConfiguration constructs a declarative configuration of the RollingUpdateDaemonSet type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/rollingupdatedeployment.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/rollingupdatedeployment.go index 244701a5e0158..34461b6539827 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/rollingupdatedeployment.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/rollingupdatedeployment.go @@ -24,9 +24,32 @@ import ( // RollingUpdateDeploymentApplyConfiguration represents a declarative configuration of the RollingUpdateDeployment type for use // with apply. +// +// Spec to control the desired behavior of rolling update. type RollingUpdateDeploymentApplyConfiguration struct { + // The maximum number of pods that can be unavailable during the update. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // Absolute number is calculated from percentage by rounding down. + // This can not be 0 if MaxSurge is 0. + // By default, a fixed value of 1 is used. + // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods + // immediately when the rolling update starts. Once new pods are ready, old RC + // can be scaled down further, followed by scaling up the new RC, ensuring + // that the total number of pods available at all times during the update is at + // least 70% of desired pods. MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` - MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` + // The maximum number of pods that can be scheduled above the desired number of + // pods. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // This can not be 0 if MaxUnavailable is 0. + // Absolute number is calculated from percentage by rounding up. + // By default, a value of 1 is used. + // Example: when this is set to 30%, the new RC can be scaled up immediately when + // the rolling update starts, such that the total number of old and new pods do not exceed + // 130% of desired pods. Once old pods have been killed, + // new RC can be scaled up further, ensuring that total number of pods running + // at any time during the update is at most 130% of desired pods. + MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` } // RollingUpdateDeploymentApplyConfiguration constructs a declarative configuration of the RollingUpdateDeployment type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/scale.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/scale.go index 84dcc97c401f7..9637d58c8433e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/scale.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/scale.go @@ -27,11 +27,16 @@ import ( // ScaleApplyConfiguration represents a declarative configuration of the Scale type for use // with apply. +// +// represents a scaling request for a resource. type ScaleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *extensionsv1beta1.ScaleSpec `json:"spec,omitempty"` - Status *extensionsv1beta1.ScaleStatus `json:"status,omitempty"` + // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. + Spec *extensionsv1beta1.ScaleSpec `json:"spec,omitempty"` + // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only. + Status *extensionsv1beta1.ScaleStatus `json:"status,omitempty"` } // ScaleApplyConfiguration constructs a declarative configuration of the Scale type for use with @@ -42,6 +47,7 @@ func Scale() *ScaleApplyConfiguration { b.WithAPIVersion("extensions/v1beta1") return b } + func (b ScaleApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/exemptprioritylevelconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/exemptprioritylevelconfiguration.go index 4e5805f394548..e95d6a62850a7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/exemptprioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/exemptprioritylevelconfiguration.go @@ -20,9 +20,35 @@ package v1 // ExemptPriorityLevelConfigurationApplyConfiguration represents a declarative configuration of the ExemptPriorityLevelConfiguration type for use // with apply. +// +// ExemptPriorityLevelConfiguration describes the configurable aspects +// of the handling of exempt requests. +// In the mandatory exempt configuration object the values in the fields +// here can be modified by authorized users, unlike the rest of the `spec`. type ExemptPriorityLevelConfigurationApplyConfiguration struct { + // `nominalConcurrencyShares` (NCS) contributes to the computation of the + // NominalConcurrencyLimit (NominalCL) of this level. + // This is the number of execution seats nominally reserved for this priority level. + // This DOES NOT limit the dispatching from this priority level + // but affects the other priority levels through the borrowing mechanism. + // The server's concurrency limit (ServerCL) is divided among all the + // priority levels in proportion to their NCS values: + // + // NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) + // sum_ncs = sum[priority level k] NCS(k) + // + // Bigger numbers mean a larger nominal concurrency limit, + // at the expense of every other priority level. + // This field has a default value of zero. NominalConcurrencyShares *int32 `json:"nominalConcurrencyShares,omitempty"` - LendablePercent *int32 `json:"lendablePercent,omitempty"` + // `lendablePercent` prescribes the fraction of the level's NominalCL that + // can be borrowed by other priority levels. This value of this + // field must be between 0 and 100, inclusive, and it defaults to 0. + // The number of seats that other levels can borrow from this level, known + // as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. + // + // LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) + LendablePercent *int32 `json:"lendablePercent,omitempty"` } // ExemptPriorityLevelConfigurationApplyConfiguration constructs a declarative configuration of the ExemptPriorityLevelConfiguration type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowdistinguishermethod.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowdistinguishermethod.go index f8923ae7b35e3..ef941c1e1506f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowdistinguishermethod.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowdistinguishermethod.go @@ -24,7 +24,12 @@ import ( // FlowDistinguisherMethodApplyConfiguration represents a declarative configuration of the FlowDistinguisherMethod type for use // with apply. +// +// FlowDistinguisherMethod specifies the method of a flow distinguisher. type FlowDistinguisherMethodApplyConfiguration struct { + // `type` is the type of flow distinguisher method + // The supported types are "ByUser" and "ByNamespace". + // Required. Type *flowcontrolv1.FlowDistinguisherMethodType `json:"type,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschema.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschema.go index 5ffebfd322019..1bfc945a3f56e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschema.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschema.go @@ -29,11 +29,20 @@ import ( // FlowSchemaApplyConfiguration represents a declarative configuration of the FlowSchema type for use // with apply. +// +// FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with +// similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher". type FlowSchemaApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // `metadata` is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *FlowSchemaSpecApplyConfiguration `json:"spec,omitempty"` - Status *FlowSchemaStatusApplyConfiguration `json:"status,omitempty"` + // `spec` is the specification of the desired behavior of a FlowSchema. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *FlowSchemaSpecApplyConfiguration `json:"spec,omitempty"` + // `status` is the current status of a FlowSchema. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *FlowSchemaStatusApplyConfiguration `json:"status,omitempty"` } // FlowSchema constructs a declarative configuration of the FlowSchema type for use with @@ -46,6 +55,26 @@ func FlowSchema(name string) *FlowSchemaApplyConfiguration { return b } +// ExtractFlowSchemaFrom extracts the applied configuration owned by fieldManager from +// flowSchema for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// flowSchema must be a unmodified FlowSchema API object that was retrieved from the Kubernetes API. +// ExtractFlowSchemaFrom 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. +func ExtractFlowSchemaFrom(flowSchema *flowcontrolv1.FlowSchema, fieldManager string, subresource string) (*FlowSchemaApplyConfiguration, error) { + b := &FlowSchemaApplyConfiguration{} + err := managedfields.ExtractInto(flowSchema, internal.Parser().Type("io.k8s.api.flowcontrol.v1.FlowSchema"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(flowSchema.Name) + + b.WithKind("FlowSchema") + b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1") + return b, nil +} + // ExtractFlowSchema extracts the applied configuration owned by fieldManager from // flowSchema. If no managedFields are found in flowSchema for fieldManager, a // FlowSchemaApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +85,16 @@ func FlowSchema(name string) *FlowSchemaApplyConfiguration { // ExtractFlowSchema 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 ExtractFlowSchema(flowSchema *flowcontrolv1.FlowSchema, fieldManager string) (*FlowSchemaApplyConfiguration, error) { - return extractFlowSchema(flowSchema, fieldManager, "") + return ExtractFlowSchemaFrom(flowSchema, fieldManager, "") } -// ExtractFlowSchemaStatus is the same as ExtractFlowSchema except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractFlowSchemaStatus extracts the applied configuration owned by fieldManager from +// flowSchema for the status subresource. func ExtractFlowSchemaStatus(flowSchema *flowcontrolv1.FlowSchema, fieldManager string) (*FlowSchemaApplyConfiguration, error) { - return extractFlowSchema(flowSchema, fieldManager, "status") + return ExtractFlowSchemaFrom(flowSchema, fieldManager, "status") } -func extractFlowSchema(flowSchema *flowcontrolv1.FlowSchema, fieldManager string, subresource string) (*FlowSchemaApplyConfiguration, error) { - b := &FlowSchemaApplyConfiguration{} - err := managedfields.ExtractInto(flowSchema, internal.Parser().Type("io.k8s.api.flowcontrol.v1.FlowSchema"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(flowSchema.Name) - - b.WithKind("FlowSchema") - b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1") - return b, nil -} func (b FlowSchemaApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschemacondition.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschemacondition.go index d1c3dfbc67290..a9023615de17e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschemacondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschemacondition.go @@ -25,12 +25,22 @@ import ( // FlowSchemaConditionApplyConfiguration represents a declarative configuration of the FlowSchemaCondition type for use // with apply. +// +// FlowSchemaCondition describes conditions for a FlowSchema. type FlowSchemaConditionApplyConfiguration struct { - Type *flowcontrolv1.FlowSchemaConditionType `json:"type,omitempty"` - Status *flowcontrolv1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // `type` is the type of the condition. + // Required. + Type *flowcontrolv1.FlowSchemaConditionType `json:"type,omitempty"` + // `status` is the status of the condition. + // Can be True, False, Unknown. + // Required. + Status *flowcontrolv1.ConditionStatus `json:"status,omitempty"` + // `lastTransitionTime` is the last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // `reason` is a unique, one-word, CamelCase reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // `message` is a human-readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // FlowSchemaConditionApplyConfiguration constructs a declarative configuration of the FlowSchemaCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschemaspec.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschemaspec.go index 4efd5d2875fff..dc3476557f636 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschemaspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschemaspec.go @@ -20,11 +20,25 @@ package v1 // FlowSchemaSpecApplyConfiguration represents a declarative configuration of the FlowSchemaSpec type for use // with apply. +// +// FlowSchemaSpec describes how the FlowSchema's specification looks like. type FlowSchemaSpecApplyConfiguration struct { + // `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot + // be resolved, the FlowSchema will be ignored and marked as invalid in its status. + // Required. PriorityLevelConfiguration *PriorityLevelConfigurationReferenceApplyConfiguration `json:"priorityLevelConfiguration,omitempty"` - MatchingPrecedence *int32 `json:"matchingPrecedence,omitempty"` - DistinguisherMethod *FlowDistinguisherMethodApplyConfiguration `json:"distinguisherMethod,omitempty"` - Rules []PolicyRulesWithSubjectsApplyConfiguration `json:"rules,omitempty"` + // `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen + // FlowSchema is among those with the numerically lowest (which we take to be logically highest) + // MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. + // Note that if the precedence is not specified, it will be set to 1000 as default. + MatchingPrecedence *int32 `json:"matchingPrecedence,omitempty"` + // `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. + // `nil` specifies that the distinguisher is disabled and thus will always be the empty string. + DistinguisherMethod *FlowDistinguisherMethodApplyConfiguration `json:"distinguisherMethod,omitempty"` + // `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if + // at least one member of rules matches the request. + // if it is an empty slice, there will be no requests matching the FlowSchema. + Rules []PolicyRulesWithSubjectsApplyConfiguration `json:"rules,omitempty"` } // FlowSchemaSpecApplyConfiguration constructs a declarative configuration of the FlowSchemaSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschemastatus.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschemastatus.go index 6f951967e8897..c9bd727576247 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschemastatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/flowschemastatus.go @@ -20,7 +20,10 @@ package v1 // FlowSchemaStatusApplyConfiguration represents a declarative configuration of the FlowSchemaStatus type for use // with apply. +// +// FlowSchemaStatus represents the current state of a FlowSchema. type FlowSchemaStatusApplyConfiguration struct { + // `conditions` is a list of the current states of FlowSchema. Conditions []FlowSchemaConditionApplyConfiguration `json:"conditions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/groupsubject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/groupsubject.go index 0be9eddfd6f20..50a4c9a05e3fa 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/groupsubject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/groupsubject.go @@ -20,7 +20,13 @@ package v1 // GroupSubjectApplyConfiguration represents a declarative configuration of the GroupSubject type for use // with apply. +// +// GroupSubject holds detailed information for group-kind subject. type GroupSubjectApplyConfiguration struct { + // name is the user group that matches, or "*" to match all user groups. + // See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some + // well-known group names. + // Required. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/limitedprioritylevelconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/limitedprioritylevelconfiguration.go index 8e27642985039..cd93e92651811 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/limitedprioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/limitedprioritylevelconfiguration.go @@ -20,11 +20,58 @@ package v1 // LimitedPriorityLevelConfigurationApplyConfiguration represents a declarative configuration of the LimitedPriorityLevelConfiguration type for use // with apply. +// +// LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. +// It addresses two issues: +// - How are requests for this priority level limited? +// - What should be done with requests that exceed the limit? type LimitedPriorityLevelConfigurationApplyConfiguration struct { - NominalConcurrencyShares *int32 `json:"nominalConcurrencyShares,omitempty"` - LimitResponse *LimitResponseApplyConfiguration `json:"limitResponse,omitempty"` - LendablePercent *int32 `json:"lendablePercent,omitempty"` - BorrowingLimitPercent *int32 `json:"borrowingLimitPercent,omitempty"` + // `nominalConcurrencyShares` (NCS) contributes to the computation of the + // NominalConcurrencyLimit (NominalCL) of this level. + // This is the number of execution seats available at this priority level. + // This is used both for requests dispatched from this priority level + // as well as requests dispatched from other priority levels + // borrowing seats from this level. + // The server's concurrency limit (ServerCL) is divided among the + // Limited priority levels in proportion to their NCS values: + // + // NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) + // sum_ncs = sum[priority level k] NCS(k) + // + // Bigger numbers mean a larger nominal concurrency limit, + // at the expense of every other priority level. + // + // If not specified, this field defaults to a value of 30. + // + // Setting this field to zero supports the construction of a + // "jail" for this priority level that is used to hold some request(s) + NominalConcurrencyShares *int32 `json:"nominalConcurrencyShares,omitempty"` + // `limitResponse` indicates what to do with requests that can not be executed right now + LimitResponse *LimitResponseApplyConfiguration `json:"limitResponse,omitempty"` + // `lendablePercent` prescribes the fraction of the level's NominalCL that + // can be borrowed by other priority levels. The value of this + // field must be between 0 and 100, inclusive, and it defaults to 0. + // The number of seats that other levels can borrow from this level, known + // as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. + // + // LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) + LendablePercent *int32 `json:"lendablePercent,omitempty"` + // `borrowingLimitPercent`, if present, configures a limit on how many + // seats this priority level can borrow from other priority levels. + // The limit is known as this level's BorrowingConcurrencyLimit + // (BorrowingCL) and is a limit on the total number of seats that this + // level may borrow at any one time. + // This field holds the ratio of that limit to the level's nominal + // concurrency limit. When this field is non-nil, it must hold a + // non-negative integer and the limit is calculated as follows. + // + // BorrowingCL(i) = round( NominalCL(i) * borrowingLimitPercent(i)/100.0 ) + // + // The value of this field can be more than 100, implying that this + // priority level can borrow a number of seats that is greater than + // its own nominal concurrency limit (NominalCL). + // When this field is left `nil`, the limit is effectively infinite. + BorrowingLimitPercent *int32 `json:"borrowingLimitPercent,omitempty"` } // LimitedPriorityLevelConfigurationApplyConfiguration constructs a declarative configuration of the LimitedPriorityLevelConfiguration type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/limitresponse.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/limitresponse.go index dc2e919d7f446..9ba5d18876a1c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/limitresponse.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/limitresponse.go @@ -24,8 +24,19 @@ import ( // LimitResponseApplyConfiguration represents a declarative configuration of the LimitResponse type for use // with apply. +// +// LimitResponse defines how to handle requests that can not be executed right now. type LimitResponseApplyConfiguration struct { - Type *flowcontrolv1.LimitResponseType `json:"type,omitempty"` + // `type` is "Queue" or "Reject". + // "Queue" means that requests that can not be executed upon arrival + // are held in a queue until they can be executed or a queuing limit + // is reached. + // "Reject" means that requests that can not be executed upon arrival + // are rejected. + // Required. + Type *flowcontrolv1.LimitResponseType `json:"type,omitempty"` + // `queuing` holds the configuration parameters for queuing. + // This field may be non-empty only if `type` is `"Queue"`. Queuing *QueuingConfigurationApplyConfiguration `json:"queuing,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/nonresourcepolicyrule.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/nonresourcepolicyrule.go index 29c26b3406e70..5aeaa9de61333 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/nonresourcepolicyrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/nonresourcepolicyrule.go @@ -20,8 +20,24 @@ package v1 // NonResourcePolicyRuleApplyConfiguration represents a declarative configuration of the NonResourcePolicyRule type for use // with apply. +// +// NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the +// target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member +// of verbs matches the request and (b) at least one member of nonResourceURLs matches the request. type NonResourcePolicyRuleApplyConfiguration struct { - Verbs []string `json:"verbs,omitempty"` + // `verbs` is a list of matching verbs and may not be empty. + // "*" matches all verbs. If it is present, it must be the only entry. + // Required. + Verbs []string `json:"verbs,omitempty"` + // `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. + // For example: + // - "/healthz" is legal + // - "/hea*" is illegal + // - "/hea" is legal but matches nothing + // - "/hea/*" also matches nothing + // - "/healthz/*" matches all per-component health checks. + // "*" matches all non-resource urls. if it is present, it must be the only entry. + // Required. NonResourceURLs []string `json:"nonResourceURLs,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/policyruleswithsubjects.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/policyruleswithsubjects.go index 088afdc584b5b..7e17164813cef 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/policyruleswithsubjects.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/policyruleswithsubjects.go @@ -20,9 +20,23 @@ package v1 // PolicyRulesWithSubjectsApplyConfiguration represents a declarative configuration of the PolicyRulesWithSubjects type for use // with apply. +// +// PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject +// making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches +// a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member +// of resourceRules or nonResourceRules matches the request. type PolicyRulesWithSubjectsApplyConfiguration struct { - Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` - ResourceRules []ResourcePolicyRuleApplyConfiguration `json:"resourceRules,omitempty"` + // subjects is the list of normal user, serviceaccount, or group that this rule cares about. + // There must be at least one member in this slice. + // A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. + // Required. + Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` + // `resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the + // target resource. + // At least one of `resourceRules` and `nonResourceRules` has to be non-empty. + ResourceRules []ResourcePolicyRuleApplyConfiguration `json:"resourceRules,omitempty"` + // `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb + // and the target non-resource URL. NonResourceRules []NonResourcePolicyRuleApplyConfiguration `json:"nonResourceRules,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfiguration.go index 8fb6a66454dc8..d64c3acb62067 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfiguration.go @@ -29,11 +29,19 @@ import ( // PriorityLevelConfigurationApplyConfiguration represents a declarative configuration of the PriorityLevelConfiguration type for use // with apply. +// +// PriorityLevelConfiguration represents the configuration of a priority level. type PriorityLevelConfigurationApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // `metadata` is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PriorityLevelConfigurationSpecApplyConfiguration `json:"spec,omitempty"` - Status *PriorityLevelConfigurationStatusApplyConfiguration `json:"status,omitempty"` + // `spec` is the specification of the desired behavior of a "request-priority". + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *PriorityLevelConfigurationSpecApplyConfiguration `json:"spec,omitempty"` + // `status` is the current status of a "request-priority". + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *PriorityLevelConfigurationStatusApplyConfiguration `json:"status,omitempty"` } // PriorityLevelConfiguration constructs a declarative configuration of the PriorityLevelConfiguration type for use with @@ -46,6 +54,26 @@ func PriorityLevelConfiguration(name string) *PriorityLevelConfigurationApplyCon return b } +// ExtractPriorityLevelConfigurationFrom extracts the applied configuration owned by fieldManager from +// priorityLevelConfiguration for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// priorityLevelConfiguration must be a unmodified PriorityLevelConfiguration API object that was retrieved from the Kubernetes API. +// ExtractPriorityLevelConfigurationFrom 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. +func ExtractPriorityLevelConfigurationFrom(priorityLevelConfiguration *flowcontrolv1.PriorityLevelConfiguration, fieldManager string, subresource string) (*PriorityLevelConfigurationApplyConfiguration, error) { + b := &PriorityLevelConfigurationApplyConfiguration{} + err := managedfields.ExtractInto(priorityLevelConfiguration, internal.Parser().Type("io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(priorityLevelConfiguration.Name) + + b.WithKind("PriorityLevelConfiguration") + b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1") + return b, nil +} + // ExtractPriorityLevelConfiguration extracts the applied configuration owned by fieldManager from // priorityLevelConfiguration. If no managedFields are found in priorityLevelConfiguration for fieldManager, a // PriorityLevelConfigurationApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +84,16 @@ func PriorityLevelConfiguration(name string) *PriorityLevelConfigurationApplyCon // ExtractPriorityLevelConfiguration 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 ExtractPriorityLevelConfiguration(priorityLevelConfiguration *flowcontrolv1.PriorityLevelConfiguration, fieldManager string) (*PriorityLevelConfigurationApplyConfiguration, error) { - return extractPriorityLevelConfiguration(priorityLevelConfiguration, fieldManager, "") + return ExtractPriorityLevelConfigurationFrom(priorityLevelConfiguration, fieldManager, "") } -// ExtractPriorityLevelConfigurationStatus is the same as ExtractPriorityLevelConfiguration except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractPriorityLevelConfigurationStatus extracts the applied configuration owned by fieldManager from +// priorityLevelConfiguration for the status subresource. func ExtractPriorityLevelConfigurationStatus(priorityLevelConfiguration *flowcontrolv1.PriorityLevelConfiguration, fieldManager string) (*PriorityLevelConfigurationApplyConfiguration, error) { - return extractPriorityLevelConfiguration(priorityLevelConfiguration, fieldManager, "status") + return ExtractPriorityLevelConfigurationFrom(priorityLevelConfiguration, fieldManager, "status") } -func extractPriorityLevelConfiguration(priorityLevelConfiguration *flowcontrolv1.PriorityLevelConfiguration, fieldManager string, subresource string) (*PriorityLevelConfigurationApplyConfiguration, error) { - b := &PriorityLevelConfigurationApplyConfiguration{} - err := managedfields.ExtractInto(priorityLevelConfiguration, internal.Parser().Type("io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(priorityLevelConfiguration.Name) - - b.WithKind("PriorityLevelConfiguration") - b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1") - return b, nil -} func (b PriorityLevelConfigurationApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationcondition.go index a7810adfbfafc..82b9547d576be 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationcondition.go @@ -25,12 +25,22 @@ import ( // PriorityLevelConfigurationConditionApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationCondition type for use // with apply. +// +// PriorityLevelConfigurationCondition defines the condition of priority level. type PriorityLevelConfigurationConditionApplyConfiguration struct { - Type *flowcontrolv1.PriorityLevelConfigurationConditionType `json:"type,omitempty"` - Status *flowcontrolv1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // `type` is the type of the condition. + // Required. + Type *flowcontrolv1.PriorityLevelConfigurationConditionType `json:"type,omitempty"` + // `status` is the status of the condition. + // Can be True, False, Unknown. + // Required. + Status *flowcontrolv1.ConditionStatus `json:"status,omitempty"` + // `lastTransitionTime` is the last time the condition transitioned from one status to another. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // `reason` is a unique, one-word, CamelCase reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // `message` is a human-readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // PriorityLevelConfigurationConditionApplyConfiguration constructs a declarative configuration of the PriorityLevelConfigurationCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationreference.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationreference.go index f445713f0ccae..aec06f307f0a7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationreference.go @@ -20,7 +20,11 @@ package v1 // PriorityLevelConfigurationReferenceApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationReference type for use // with apply. +// +// PriorityLevelConfigurationReference contains information that points to the "request-priority" being used. type PriorityLevelConfigurationReferenceApplyConfiguration struct { + // `name` is the name of the priority level configuration being referenced + // Required. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationspec.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationspec.go index 45e4cdcd8ad01..820b0bb61b866 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationspec.go @@ -24,10 +24,28 @@ import ( // PriorityLevelConfigurationSpecApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationSpec type for use // with apply. +// +// PriorityLevelConfigurationSpec specifies the configuration of a priority level. type PriorityLevelConfigurationSpecApplyConfiguration struct { - Type *flowcontrolv1.PriorityLevelEnablement `json:"type,omitempty"` + // `type` indicates whether this priority level is subject to + // limitation on request execution. A value of `"Exempt"` means + // that requests of this priority level are not subject to a limit + // (and thus are never queued) and do not detract from the + // capacity made available to other priority levels. A value of + // `"Limited"` means that (a) requests of this priority level + // _are_ subject to limits and (b) some of the server's limited + // capacity is made available exclusively to this priority level. + // Required. + Type *flowcontrolv1.PriorityLevelEnablement `json:"type,omitempty"` + // `limited` specifies how requests are handled for a Limited priority level. + // This field must be non-empty if and only if `type` is `"Limited"`. Limited *LimitedPriorityLevelConfigurationApplyConfiguration `json:"limited,omitempty"` - Exempt *ExemptPriorityLevelConfigurationApplyConfiguration `json:"exempt,omitempty"` + // `exempt` specifies how requests are handled for an exempt priority level. + // This field MUST be empty if `type` is `"Limited"`. + // This field MAY be non-empty if `type` is `"Exempt"`. + // If empty and `type` is `"Exempt"` then the default values + // for `ExemptPriorityLevelConfiguration` apply. + Exempt *ExemptPriorityLevelConfigurationApplyConfiguration `json:"exempt,omitempty"` } // PriorityLevelConfigurationSpecApplyConfiguration constructs a declarative configuration of the PriorityLevelConfigurationSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationstatus.go index ff650bc3d58b1..3633154883a22 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/prioritylevelconfigurationstatus.go @@ -20,7 +20,10 @@ package v1 // PriorityLevelConfigurationStatusApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationStatus type for use // with apply. +// +// PriorityLevelConfigurationStatus represents the current state of a "request-priority". type PriorityLevelConfigurationStatusApplyConfiguration struct { + // `conditions` is the current state of "request-priority". Conditions []PriorityLevelConfigurationConditionApplyConfiguration `json:"conditions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/queuingconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/queuingconfiguration.go index 7488f9bbe2de4..04bc6dfeda6f2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/queuingconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/queuingconfiguration.go @@ -20,9 +20,32 @@ package v1 // QueuingConfigurationApplyConfiguration represents a declarative configuration of the QueuingConfiguration type for use // with apply. +// +// QueuingConfiguration holds the configuration parameters for queuing type QueuingConfigurationApplyConfiguration struct { - Queues *int32 `json:"queues,omitempty"` - HandSize *int32 `json:"handSize,omitempty"` + // `queues` is the number of queues for this priority level. The + // queues exist independently at each apiserver. The value must be + // positive. Setting it to 1 effectively precludes + // shufflesharding and thus makes the distinguisher method of + // associated flow schemas irrelevant. This field has a default + // value of 64. + Queues *int32 `json:"queues,omitempty"` + // `handSize` is a small positive number that configures the + // shuffle sharding of requests into queues. When enqueuing a request + // at this priority level the request's flow identifier (a string + // pair) is hashed and the hash value is used to shuffle the list + // of queues and deal a hand of the size specified here. The + // request is put into one of the shortest queues in that hand. + // `handSize` must be no larger than `queues`, and should be + // significantly smaller (so that a few heavy flows do not + // saturate most of the queues). See the user-facing + // documentation for more extensive guidance on setting this + // field. This field has a default value of 8. + HandSize *int32 `json:"handSize,omitempty"` + // `queueLengthLimit` is the maximum number of requests allowed to + // be waiting in a given queue of this priority level at a time; + // excess requests are rejected. This value must be positive. If + // not specified, it will be defaulted to 50. QueueLengthLimit *int32 `json:"queueLengthLimit,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/resourcepolicyrule.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/resourcepolicyrule.go index 7428582a82eb6..5ff4588a9c36d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/resourcepolicyrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/resourcepolicyrule.go @@ -20,12 +20,46 @@ package v1 // ResourcePolicyRuleApplyConfiguration represents a declarative configuration of the ResourcePolicyRule type for use // with apply. +// +// ResourcePolicyRule is a predicate that matches some resource +// requests, testing the request's verb and the target resource. A +// ResourcePolicyRule matches a resource request if and only if: (a) +// at least one member of verbs matches the request, (b) at least one +// member of apiGroups matches the request, (c) at least one member of +// resources matches the request, and (d) either (d1) the request does +// not specify a namespace (i.e., `Namespace==""`) and clusterScope is +// true or (d2) the request specifies a namespace and least one member +// of namespaces matches the request's namespace. type ResourcePolicyRuleApplyConfiguration struct { - Verbs []string `json:"verbs,omitempty"` - APIGroups []string `json:"apiGroups,omitempty"` - Resources []string `json:"resources,omitempty"` - ClusterScope *bool `json:"clusterScope,omitempty"` - Namespaces []string `json:"namespaces,omitempty"` + // `verbs` is a list of matching verbs and may not be empty. + // "*" matches all verbs and, if present, must be the only entry. + // Required. + Verbs []string `json:"verbs,omitempty"` + // `apiGroups` is a list of matching API groups and may not be empty. + // "*" matches all API groups and, if present, must be the only entry. + // Required. + APIGroups []string `json:"apiGroups,omitempty"` + // `resources` is a list of matching resources (i.e., lowercase + // and plural) with, if desired, subresource. For example, [ + // "services", "nodes/status" ]. This list may not be empty. + // "*" matches all resources and, if present, must be the only entry. + // Required. + Resources []string `json:"resources,omitempty"` + // `clusterScope` indicates whether to match requests that do not + // specify a namespace (which happens either because the resource + // is not namespaced or the request targets all namespaces). + // If this field is omitted or false then the `namespaces` field + // must contain a non-empty list. + ClusterScope *bool `json:"clusterScope,omitempty"` + // `namespaces` is a list of target namespaces that restricts + // matches. A request that specifies a target namespace matches + // only if either (a) this list contains that target namespace or + // (b) this list contains "*". Note that "*" matches any + // specified namespace but does not match a request that _does + // not specify_ a namespace (see the `clusterScope` field for + // that). + // This list may be empty, but only if `clusterScope` is true. + Namespaces []string `json:"namespaces,omitempty"` } // ResourcePolicyRuleApplyConfiguration constructs a declarative configuration of the ResourcePolicyRule type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/serviceaccountsubject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/serviceaccountsubject.go index 58ad10764b3d0..2267a8365f146 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/serviceaccountsubject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/serviceaccountsubject.go @@ -20,9 +20,15 @@ package v1 // ServiceAccountSubjectApplyConfiguration represents a declarative configuration of the ServiceAccountSubject type for use // with apply. +// +// ServiceAccountSubject holds detailed information for service-account-kind subject. type ServiceAccountSubjectApplyConfiguration struct { + // `namespace` is the namespace of matching ServiceAccount objects. + // Required. Namespace *string `json:"namespace,omitempty"` - Name *string `json:"name,omitempty"` + // `name` is the name of matching ServiceAccount objects, or "*" to match regardless of name. + // Required. + Name *string `json:"name,omitempty"` } // ServiceAccountSubjectApplyConfiguration constructs a declarative configuration of the ServiceAccountSubject type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/subject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/subject.go index e2f6f3849b777..12317c587dab5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/subject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/subject.go @@ -24,10 +24,18 @@ import ( // SubjectApplyConfiguration represents a declarative configuration of the Subject type for use // with apply. +// +// Subject matches the originator of a request, as identified by the request authentication system. There are three +// ways of matching an originator; by user, group, or service account. type SubjectApplyConfiguration struct { - Kind *flowcontrolv1.SubjectKind `json:"kind,omitempty"` - User *UserSubjectApplyConfiguration `json:"user,omitempty"` - Group *GroupSubjectApplyConfiguration `json:"group,omitempty"` + // `kind` indicates which one of the other fields is non-empty. + // Required + Kind *flowcontrolv1.SubjectKind `json:"kind,omitempty"` + // `user` matches based on username. + User *UserSubjectApplyConfiguration `json:"user,omitempty"` + // `group` matches based on user group name. + Group *GroupSubjectApplyConfiguration `json:"group,omitempty"` + // `serviceAccount` matches ServiceAccounts. ServiceAccount *ServiceAccountSubjectApplyConfiguration `json:"serviceAccount,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/usersubject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/usersubject.go index fd90067d4dac8..438df0303373e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/usersubject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1/usersubject.go @@ -20,7 +20,11 @@ package v1 // UserSubjectApplyConfiguration represents a declarative configuration of the UserSubject type for use // with apply. +// +// UserSubject holds detailed information for user-kind subject. type UserSubjectApplyConfiguration struct { + // `name` is the username that matches, or "*" to match all usernames. + // Required. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/exemptprioritylevelconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/exemptprioritylevelconfiguration.go index 45ccc5cb75934..2d2504f815911 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/exemptprioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/exemptprioritylevelconfiguration.go @@ -20,9 +20,35 @@ package v1beta1 // ExemptPriorityLevelConfigurationApplyConfiguration represents a declarative configuration of the ExemptPriorityLevelConfiguration type for use // with apply. +// +// ExemptPriorityLevelConfiguration describes the configurable aspects +// of the handling of exempt requests. +// In the mandatory exempt configuration object the values in the fields +// here can be modified by authorized users, unlike the rest of the `spec`. type ExemptPriorityLevelConfigurationApplyConfiguration struct { + // `nominalConcurrencyShares` (NCS) contributes to the computation of the + // NominalConcurrencyLimit (NominalCL) of this level. + // This is the number of execution seats nominally reserved for this priority level. + // This DOES NOT limit the dispatching from this priority level + // but affects the other priority levels through the borrowing mechanism. + // The server's concurrency limit (ServerCL) is divided among all the + // priority levels in proportion to their NCS values: + // + // NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) + // sum_ncs = sum[priority level k] NCS(k) + // + // Bigger numbers mean a larger nominal concurrency limit, + // at the expense of every other priority level. + // This field has a default value of zero. NominalConcurrencyShares *int32 `json:"nominalConcurrencyShares,omitempty"` - LendablePercent *int32 `json:"lendablePercent,omitempty"` + // `lendablePercent` prescribes the fraction of the level's NominalCL that + // can be borrowed by other priority levels. This value of this + // field must be between 0 and 100, inclusive, and it defaults to 0. + // The number of seats that other levels can borrow from this level, known + // as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. + // + // LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) + LendablePercent *int32 `json:"lendablePercent,omitempty"` } // ExemptPriorityLevelConfigurationApplyConfiguration constructs a declarative configuration of the ExemptPriorityLevelConfiguration type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowdistinguishermethod.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowdistinguishermethod.go index 11aa62bba2000..80cb05ac2119e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowdistinguishermethod.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowdistinguishermethod.go @@ -24,7 +24,12 @@ import ( // FlowDistinguisherMethodApplyConfiguration represents a declarative configuration of the FlowDistinguisherMethod type for use // with apply. +// +// FlowDistinguisherMethod specifies the method of a flow distinguisher. type FlowDistinguisherMethodApplyConfiguration struct { + // `type` is the type of flow distinguisher method + // The supported types are "ByUser" and "ByNamespace". + // Required. Type *flowcontrolv1beta1.FlowDistinguisherMethodType `json:"type,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschema.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschema.go index 09c40405ff35a..80a1f720fa596 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschema.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschema.go @@ -29,11 +29,20 @@ import ( // FlowSchemaApplyConfiguration represents a declarative configuration of the FlowSchema type for use // with apply. +// +// FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with +// similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher". type FlowSchemaApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // `metadata` is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *FlowSchemaSpecApplyConfiguration `json:"spec,omitempty"` - Status *FlowSchemaStatusApplyConfiguration `json:"status,omitempty"` + // `spec` is the specification of the desired behavior of a FlowSchema. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *FlowSchemaSpecApplyConfiguration `json:"spec,omitempty"` + // `status` is the current status of a FlowSchema. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *FlowSchemaStatusApplyConfiguration `json:"status,omitempty"` } // FlowSchema constructs a declarative configuration of the FlowSchema type for use with @@ -46,6 +55,26 @@ func FlowSchema(name string) *FlowSchemaApplyConfiguration { return b } +// ExtractFlowSchemaFrom extracts the applied configuration owned by fieldManager from +// flowSchema for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// flowSchema must be a unmodified FlowSchema API object that was retrieved from the Kubernetes API. +// ExtractFlowSchemaFrom 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. +func ExtractFlowSchemaFrom(flowSchema *flowcontrolv1beta1.FlowSchema, fieldManager string, subresource string) (*FlowSchemaApplyConfiguration, error) { + b := &FlowSchemaApplyConfiguration{} + err := managedfields.ExtractInto(flowSchema, internal.Parser().Type("io.k8s.api.flowcontrol.v1beta1.FlowSchema"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(flowSchema.Name) + + b.WithKind("FlowSchema") + b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1beta1") + return b, nil +} + // ExtractFlowSchema extracts the applied configuration owned by fieldManager from // flowSchema. If no managedFields are found in flowSchema for fieldManager, a // FlowSchemaApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +85,16 @@ func FlowSchema(name string) *FlowSchemaApplyConfiguration { // ExtractFlowSchema 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 ExtractFlowSchema(flowSchema *flowcontrolv1beta1.FlowSchema, fieldManager string) (*FlowSchemaApplyConfiguration, error) { - return extractFlowSchema(flowSchema, fieldManager, "") + return ExtractFlowSchemaFrom(flowSchema, fieldManager, "") } -// ExtractFlowSchemaStatus is the same as ExtractFlowSchema except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractFlowSchemaStatus extracts the applied configuration owned by fieldManager from +// flowSchema for the status subresource. func ExtractFlowSchemaStatus(flowSchema *flowcontrolv1beta1.FlowSchema, fieldManager string) (*FlowSchemaApplyConfiguration, error) { - return extractFlowSchema(flowSchema, fieldManager, "status") + return ExtractFlowSchemaFrom(flowSchema, fieldManager, "status") } -func extractFlowSchema(flowSchema *flowcontrolv1beta1.FlowSchema, fieldManager string, subresource string) (*FlowSchemaApplyConfiguration, error) { - b := &FlowSchemaApplyConfiguration{} - err := managedfields.ExtractInto(flowSchema, internal.Parser().Type("io.k8s.api.flowcontrol.v1beta1.FlowSchema"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(flowSchema.Name) - - b.WithKind("FlowSchema") - b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1beta1") - return b, nil -} func (b FlowSchemaApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschemacondition.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschemacondition.go index e7dcb4366ac3b..9462bbd02ec5c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschemacondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschemacondition.go @@ -25,12 +25,22 @@ import ( // FlowSchemaConditionApplyConfiguration represents a declarative configuration of the FlowSchemaCondition type for use // with apply. +// +// FlowSchemaCondition describes conditions for a FlowSchema. type FlowSchemaConditionApplyConfiguration struct { - Type *flowcontrolv1beta1.FlowSchemaConditionType `json:"type,omitempty"` - Status *flowcontrolv1beta1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // `type` is the type of the condition. + // Required. + Type *flowcontrolv1beta1.FlowSchemaConditionType `json:"type,omitempty"` + // `status` is the status of the condition. + // Can be True, False, Unknown. + // Required. + Status *flowcontrolv1beta1.ConditionStatus `json:"status,omitempty"` + // `lastTransitionTime` is the last time the condition transitioned from one status to another. + LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` + // `reason` is a unique, one-word, CamelCase reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // `message` is a human-readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // FlowSchemaConditionApplyConfiguration constructs a declarative configuration of the FlowSchemaCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschemaspec.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschemaspec.go index 1d6e8fc58e76b..470708eb36a6b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschemaspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschemaspec.go @@ -20,11 +20,25 @@ package v1beta1 // FlowSchemaSpecApplyConfiguration represents a declarative configuration of the FlowSchemaSpec type for use // with apply. +// +// FlowSchemaSpec describes how the FlowSchema's specification looks like. type FlowSchemaSpecApplyConfiguration struct { + // `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot + // be resolved, the FlowSchema will be ignored and marked as invalid in its status. + // Required. PriorityLevelConfiguration *PriorityLevelConfigurationReferenceApplyConfiguration `json:"priorityLevelConfiguration,omitempty"` - MatchingPrecedence *int32 `json:"matchingPrecedence,omitempty"` - DistinguisherMethod *FlowDistinguisherMethodApplyConfiguration `json:"distinguisherMethod,omitempty"` - Rules []PolicyRulesWithSubjectsApplyConfiguration `json:"rules,omitempty"` + // `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen + // FlowSchema is among those with the numerically lowest (which we take to be logically highest) + // MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. + // Note that if the precedence is not specified, it will be set to 1000 as default. + MatchingPrecedence *int32 `json:"matchingPrecedence,omitempty"` + // `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. + // `nil` specifies that the distinguisher is disabled and thus will always be the empty string. + DistinguisherMethod *FlowDistinguisherMethodApplyConfiguration `json:"distinguisherMethod,omitempty"` + // `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if + // at least one member of rules matches the request. + // if it is an empty slice, there will be no requests matching the FlowSchema. + Rules []PolicyRulesWithSubjectsApplyConfiguration `json:"rules,omitempty"` } // FlowSchemaSpecApplyConfiguration constructs a declarative configuration of the FlowSchemaSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschemastatus.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschemastatus.go index 5ad8a432b2855..8403a3d8f3f16 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschemastatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschemastatus.go @@ -20,7 +20,10 @@ package v1beta1 // FlowSchemaStatusApplyConfiguration represents a declarative configuration of the FlowSchemaStatus type for use // with apply. +// +// FlowSchemaStatus represents the current state of a FlowSchema. type FlowSchemaStatusApplyConfiguration struct { + // `conditions` is a list of the current states of FlowSchema. Conditions []FlowSchemaConditionApplyConfiguration `json:"conditions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/groupsubject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/groupsubject.go index cc274fe2f3b84..48d255c4963f5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/groupsubject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/groupsubject.go @@ -20,7 +20,13 @@ package v1beta1 // GroupSubjectApplyConfiguration represents a declarative configuration of the GroupSubject type for use // with apply. +// +// GroupSubject holds detailed information for group-kind subject. type GroupSubjectApplyConfiguration struct { + // name is the user group that matches, or "*" to match all user groups. + // See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some + // well-known group names. + // Required. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/limitedprioritylevelconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/limitedprioritylevelconfiguration.go index 0fe5feca12fa5..b1b3fcd5b59e6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/limitedprioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/limitedprioritylevelconfiguration.go @@ -20,11 +20,54 @@ package v1beta1 // LimitedPriorityLevelConfigurationApplyConfiguration represents a declarative configuration of the LimitedPriorityLevelConfiguration type for use // with apply. +// +// LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. +// It addresses two issues: +// - How are requests for this priority level limited? +// - What should be done with requests that exceed the limit? type LimitedPriorityLevelConfigurationApplyConfiguration struct { - AssuredConcurrencyShares *int32 `json:"assuredConcurrencyShares,omitempty"` - LimitResponse *LimitResponseApplyConfiguration `json:"limitResponse,omitempty"` - LendablePercent *int32 `json:"lendablePercent,omitempty"` - BorrowingLimitPercent *int32 `json:"borrowingLimitPercent,omitempty"` + // `assuredConcurrencyShares` (ACS) configures the execution + // limit, which is a limit on the number of requests of this + // priority level that may be executing at a given time. ACS must + // be a positive number. The server's concurrency limit (SCL) is + // divided among the concurrency-controlled priority levels in + // proportion to their assured concurrency shares. This produces + // the assured concurrency value (ACV) --- the number of requests + // that may be executing at a time --- for each such priority + // level: + // + // ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) ) + // + // bigger numbers of ACS mean more reserved concurrent requests (at the + // expense of every other PL). + // This field has a default value of 30. + AssuredConcurrencyShares *int32 `json:"assuredConcurrencyShares,omitempty"` + // `limitResponse` indicates what to do with requests that can not be executed right now + LimitResponse *LimitResponseApplyConfiguration `json:"limitResponse,omitempty"` + // `lendablePercent` prescribes the fraction of the level's NominalCL that + // can be borrowed by other priority levels. The value of this + // field must be between 0 and 100, inclusive, and it defaults to 0. + // The number of seats that other levels can borrow from this level, known + // as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. + // + // LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) + LendablePercent *int32 `json:"lendablePercent,omitempty"` + // `borrowingLimitPercent`, if present, configures a limit on how many + // seats this priority level can borrow from other priority levels. + // The limit is known as this level's BorrowingConcurrencyLimit + // (BorrowingCL) and is a limit on the total number of seats that this + // level may borrow at any one time. + // This field holds the ratio of that limit to the level's nominal + // concurrency limit. When this field is non-nil, it must hold a + // non-negative integer and the limit is calculated as follows. + // + // BorrowingCL(i) = round( NominalCL(i) * borrowingLimitPercent(i)/100.0 ) + // + // The value of this field can be more than 100, implying that this + // priority level can borrow a number of seats that is greater than + // its own nominal concurrency limit (NominalCL). + // When this field is left `nil`, the limit is effectively infinite. + BorrowingLimitPercent *int32 `json:"borrowingLimitPercent,omitempty"` } // LimitedPriorityLevelConfigurationApplyConfiguration constructs a declarative configuration of the LimitedPriorityLevelConfiguration type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/limitresponse.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/limitresponse.go index 20e1b17bd39ab..a684a3f2038eb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/limitresponse.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/limitresponse.go @@ -24,8 +24,19 @@ import ( // LimitResponseApplyConfiguration represents a declarative configuration of the LimitResponse type for use // with apply. +// +// LimitResponse defines how to handle requests that can not be executed right now. type LimitResponseApplyConfiguration struct { - Type *flowcontrolv1beta1.LimitResponseType `json:"type,omitempty"` + // `type` is "Queue" or "Reject". + // "Queue" means that requests that can not be executed upon arrival + // are held in a queue until they can be executed or a queuing limit + // is reached. + // "Reject" means that requests that can not be executed upon arrival + // are rejected. + // Required. + Type *flowcontrolv1beta1.LimitResponseType `json:"type,omitempty"` + // `queuing` holds the configuration parameters for queuing. + // This field may be non-empty only if `type` is `"Queue"`. Queuing *QueuingConfigurationApplyConfiguration `json:"queuing,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/nonresourcepolicyrule.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/nonresourcepolicyrule.go index 3c571ccb062c0..4090136cb0320 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/nonresourcepolicyrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/nonresourcepolicyrule.go @@ -20,8 +20,24 @@ package v1beta1 // NonResourcePolicyRuleApplyConfiguration represents a declarative configuration of the NonResourcePolicyRule type for use // with apply. +// +// NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the +// target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member +// of verbs matches the request and (b) at least one member of nonResourceURLs matches the request. type NonResourcePolicyRuleApplyConfiguration struct { - Verbs []string `json:"verbs,omitempty"` + // `verbs` is a list of matching verbs and may not be empty. + // "*" matches all verbs. If it is present, it must be the only entry. + // Required. + Verbs []string `json:"verbs,omitempty"` + // `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. + // For example: + // - "/healthz" is legal + // - "/hea*" is illegal + // - "/hea" is legal but matches nothing + // - "/hea/*" also matches nothing + // - "/healthz/*" matches all per-component health checks. + // "*" matches all non-resource urls. if it is present, it must be the only entry. + // Required. NonResourceURLs []string `json:"nonResourceURLs,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/policyruleswithsubjects.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/policyruleswithsubjects.go index 32a082dc76da5..e77d0a7fce954 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/policyruleswithsubjects.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/policyruleswithsubjects.go @@ -20,9 +20,23 @@ package v1beta1 // PolicyRulesWithSubjectsApplyConfiguration represents a declarative configuration of the PolicyRulesWithSubjects type for use // with apply. +// +// PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject +// making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches +// a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member +// of resourceRules or nonResourceRules matches the request. type PolicyRulesWithSubjectsApplyConfiguration struct { - Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` - ResourceRules []ResourcePolicyRuleApplyConfiguration `json:"resourceRules,omitempty"` + // subjects is the list of normal user, serviceaccount, or group that this rule cares about. + // There must be at least one member in this slice. + // A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. + // Required. + Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` + // `resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the + // target resource. + // At least one of `resourceRules` and `nonResourceRules` has to be non-empty. + ResourceRules []ResourcePolicyRuleApplyConfiguration `json:"resourceRules,omitempty"` + // `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb + // and the target non-resource URL. NonResourceRules []NonResourcePolicyRuleApplyConfiguration `json:"nonResourceRules,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go index a67079097dff8..8fecf8688c841 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go @@ -29,11 +29,19 @@ import ( // PriorityLevelConfigurationApplyConfiguration represents a declarative configuration of the PriorityLevelConfiguration type for use // with apply. +// +// PriorityLevelConfiguration represents the configuration of a priority level. type PriorityLevelConfigurationApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // `metadata` is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PriorityLevelConfigurationSpecApplyConfiguration `json:"spec,omitempty"` - Status *PriorityLevelConfigurationStatusApplyConfiguration `json:"status,omitempty"` + // `spec` is the specification of the desired behavior of a "request-priority". + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *PriorityLevelConfigurationSpecApplyConfiguration `json:"spec,omitempty"` + // `status` is the current status of a "request-priority". + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *PriorityLevelConfigurationStatusApplyConfiguration `json:"status,omitempty"` } // PriorityLevelConfiguration constructs a declarative configuration of the PriorityLevelConfiguration type for use with @@ -46,6 +54,26 @@ func PriorityLevelConfiguration(name string) *PriorityLevelConfigurationApplyCon return b } +// ExtractPriorityLevelConfigurationFrom extracts the applied configuration owned by fieldManager from +// priorityLevelConfiguration for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// priorityLevelConfiguration must be a unmodified PriorityLevelConfiguration API object that was retrieved from the Kubernetes API. +// ExtractPriorityLevelConfigurationFrom 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. +func ExtractPriorityLevelConfigurationFrom(priorityLevelConfiguration *flowcontrolv1beta1.PriorityLevelConfiguration, fieldManager string, subresource string) (*PriorityLevelConfigurationApplyConfiguration, error) { + b := &PriorityLevelConfigurationApplyConfiguration{} + err := managedfields.ExtractInto(priorityLevelConfiguration, internal.Parser().Type("io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfiguration"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(priorityLevelConfiguration.Name) + + b.WithKind("PriorityLevelConfiguration") + b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1beta1") + return b, nil +} + // ExtractPriorityLevelConfiguration extracts the applied configuration owned by fieldManager from // priorityLevelConfiguration. If no managedFields are found in priorityLevelConfiguration for fieldManager, a // PriorityLevelConfigurationApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +84,16 @@ func PriorityLevelConfiguration(name string) *PriorityLevelConfigurationApplyCon // ExtractPriorityLevelConfiguration 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 ExtractPriorityLevelConfiguration(priorityLevelConfiguration *flowcontrolv1beta1.PriorityLevelConfiguration, fieldManager string) (*PriorityLevelConfigurationApplyConfiguration, error) { - return extractPriorityLevelConfiguration(priorityLevelConfiguration, fieldManager, "") + return ExtractPriorityLevelConfigurationFrom(priorityLevelConfiguration, fieldManager, "") } -// ExtractPriorityLevelConfigurationStatus is the same as ExtractPriorityLevelConfiguration except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractPriorityLevelConfigurationStatus extracts the applied configuration owned by fieldManager from +// priorityLevelConfiguration for the status subresource. func ExtractPriorityLevelConfigurationStatus(priorityLevelConfiguration *flowcontrolv1beta1.PriorityLevelConfiguration, fieldManager string) (*PriorityLevelConfigurationApplyConfiguration, error) { - return extractPriorityLevelConfiguration(priorityLevelConfiguration, fieldManager, "status") + return ExtractPriorityLevelConfigurationFrom(priorityLevelConfiguration, fieldManager, "status") } -func extractPriorityLevelConfiguration(priorityLevelConfiguration *flowcontrolv1beta1.PriorityLevelConfiguration, fieldManager string, subresource string) (*PriorityLevelConfigurationApplyConfiguration, error) { - b := &PriorityLevelConfigurationApplyConfiguration{} - err := managedfields.ExtractInto(priorityLevelConfiguration, internal.Parser().Type("io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfiguration"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(priorityLevelConfiguration.Name) - - b.WithKind("PriorityLevelConfiguration") - b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1beta1") - return b, nil -} func (b PriorityLevelConfigurationApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationcondition.go index 74eda91700afa..a2ebf71fc54d2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationcondition.go @@ -25,12 +25,22 @@ import ( // PriorityLevelConfigurationConditionApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationCondition type for use // with apply. +// +// PriorityLevelConfigurationCondition defines the condition of priority level. type PriorityLevelConfigurationConditionApplyConfiguration struct { - Type *flowcontrolv1beta1.PriorityLevelConfigurationConditionType `json:"type,omitempty"` - Status *flowcontrolv1beta1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // `type` is the type of the condition. + // Required. + Type *flowcontrolv1beta1.PriorityLevelConfigurationConditionType `json:"type,omitempty"` + // `status` is the status of the condition. + // Can be True, False, Unknown. + // Required. + Status *flowcontrolv1beta1.ConditionStatus `json:"status,omitempty"` + // `lastTransitionTime` is the last time the condition transitioned from one status to another. + LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` + // `reason` is a unique, one-word, CamelCase reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // `message` is a human-readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // PriorityLevelConfigurationConditionApplyConfiguration constructs a declarative configuration of the PriorityLevelConfigurationCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationreference.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationreference.go index b5e773e82ac18..f83ebcac3b8f4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationreference.go @@ -20,7 +20,11 @@ package v1beta1 // PriorityLevelConfigurationReferenceApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationReference type for use // with apply. +// +// PriorityLevelConfigurationReference contains information that points to the "request-priority" being used. type PriorityLevelConfigurationReferenceApplyConfiguration struct { + // `name` is the name of the priority level configuration being referenced + // Required. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationspec.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationspec.go index 775f476ddd60a..6f5ccc077ba52 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationspec.go @@ -24,10 +24,28 @@ import ( // PriorityLevelConfigurationSpecApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationSpec type for use // with apply. +// +// PriorityLevelConfigurationSpec specifies the configuration of a priority level. type PriorityLevelConfigurationSpecApplyConfiguration struct { - Type *flowcontrolv1beta1.PriorityLevelEnablement `json:"type,omitempty"` + // `type` indicates whether this priority level is subject to + // limitation on request execution. A value of `"Exempt"` means + // that requests of this priority level are not subject to a limit + // (and thus are never queued) and do not detract from the + // capacity made available to other priority levels. A value of + // `"Limited"` means that (a) requests of this priority level + // _are_ subject to limits and (b) some of the server's limited + // capacity is made available exclusively to this priority level. + // Required. + Type *flowcontrolv1beta1.PriorityLevelEnablement `json:"type,omitempty"` + // `limited` specifies how requests are handled for a Limited priority level. + // This field must be non-empty if and only if `type` is `"Limited"`. Limited *LimitedPriorityLevelConfigurationApplyConfiguration `json:"limited,omitempty"` - Exempt *ExemptPriorityLevelConfigurationApplyConfiguration `json:"exempt,omitempty"` + // `exempt` specifies how requests are handled for an exempt priority level. + // This field MUST be empty if `type` is `"Limited"`. + // This field MAY be non-empty if `type` is `"Exempt"`. + // If empty and `type` is `"Exempt"` then the default values + // for `ExemptPriorityLevelConfiguration` apply. + Exempt *ExemptPriorityLevelConfigurationApplyConfiguration `json:"exempt,omitempty"` } // PriorityLevelConfigurationSpecApplyConfiguration constructs a declarative configuration of the PriorityLevelConfigurationSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationstatus.go index 875b01efec9d5..ef9af41b958d8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfigurationstatus.go @@ -20,7 +20,10 @@ package v1beta1 // PriorityLevelConfigurationStatusApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationStatus type for use // with apply. +// +// PriorityLevelConfigurationStatus represents the current state of a "request-priority". type PriorityLevelConfigurationStatusApplyConfiguration struct { + // `conditions` is the current state of "request-priority". Conditions []PriorityLevelConfigurationConditionApplyConfiguration `json:"conditions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/queuingconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/queuingconfiguration.go index 85a8b88630f6b..fc15548d4a93c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/queuingconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/queuingconfiguration.go @@ -20,9 +20,32 @@ package v1beta1 // QueuingConfigurationApplyConfiguration represents a declarative configuration of the QueuingConfiguration type for use // with apply. +// +// QueuingConfiguration holds the configuration parameters for queuing type QueuingConfigurationApplyConfiguration struct { - Queues *int32 `json:"queues,omitempty"` - HandSize *int32 `json:"handSize,omitempty"` + // `queues` is the number of queues for this priority level. The + // queues exist independently at each apiserver. The value must be + // positive. Setting it to 1 effectively precludes + // shufflesharding and thus makes the distinguisher method of + // associated flow schemas irrelevant. This field has a default + // value of 64. + Queues *int32 `json:"queues,omitempty"` + // `handSize` is a small positive number that configures the + // shuffle sharding of requests into queues. When enqueuing a request + // at this priority level the request's flow identifier (a string + // pair) is hashed and the hash value is used to shuffle the list + // of queues and deal a hand of the size specified here. The + // request is put into one of the shortest queues in that hand. + // `handSize` must be no larger than `queues`, and should be + // significantly smaller (so that a few heavy flows do not + // saturate most of the queues). See the user-facing + // documentation for more extensive guidance on setting this + // field. This field has a default value of 8. + HandSize *int32 `json:"handSize,omitempty"` + // `queueLengthLimit` is the maximum number of requests allowed to + // be waiting in a given queue of this priority level at a time; + // excess requests are rejected. This value must be positive. If + // not specified, it will be defaulted to 50. QueueLengthLimit *int32 `json:"queueLengthLimit,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/resourcepolicyrule.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/resourcepolicyrule.go index 5c67dad75925a..4322432ed3d11 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/resourcepolicyrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/resourcepolicyrule.go @@ -20,12 +20,46 @@ package v1beta1 // ResourcePolicyRuleApplyConfiguration represents a declarative configuration of the ResourcePolicyRule type for use // with apply. +// +// ResourcePolicyRule is a predicate that matches some resource +// requests, testing the request's verb and the target resource. A +// ResourcePolicyRule matches a resource request if and only if: (a) +// at least one member of verbs matches the request, (b) at least one +// member of apiGroups matches the request, (c) at least one member of +// resources matches the request, and (d) either (d1) the request does +// not specify a namespace (i.e., `Namespace==""`) and clusterScope is +// true or (d2) the request specifies a namespace and least one member +// of namespaces matches the request's namespace. type ResourcePolicyRuleApplyConfiguration struct { - Verbs []string `json:"verbs,omitempty"` - APIGroups []string `json:"apiGroups,omitempty"` - Resources []string `json:"resources,omitempty"` - ClusterScope *bool `json:"clusterScope,omitempty"` - Namespaces []string `json:"namespaces,omitempty"` + // `verbs` is a list of matching verbs and may not be empty. + // "*" matches all verbs and, if present, must be the only entry. + // Required. + Verbs []string `json:"verbs,omitempty"` + // `apiGroups` is a list of matching API groups and may not be empty. + // "*" matches all API groups and, if present, must be the only entry. + // Required. + APIGroups []string `json:"apiGroups,omitempty"` + // `resources` is a list of matching resources (i.e., lowercase + // and plural) with, if desired, subresource. For example, [ + // "services", "nodes/status" ]. This list may not be empty. + // "*" matches all resources and, if present, must be the only entry. + // Required. + Resources []string `json:"resources,omitempty"` + // `clusterScope` indicates whether to match requests that do not + // specify a namespace (which happens either because the resource + // is not namespaced or the request targets all namespaces). + // If this field is omitted or false then the `namespaces` field + // must contain a non-empty list. + ClusterScope *bool `json:"clusterScope,omitempty"` + // `namespaces` is a list of target namespaces that restricts + // matches. A request that specifies a target namespace matches + // only if either (a) this list contains that target namespace or + // (b) this list contains "*". Note that "*" matches any + // specified namespace but does not match a request that _does + // not specify_ a namespace (see the `clusterScope` field for + // that). + // This list may be empty, but only if `clusterScope` is true. + Namespaces []string `json:"namespaces,omitempty"` } // ResourcePolicyRuleApplyConfiguration constructs a declarative configuration of the ResourcePolicyRule type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/serviceaccountsubject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/serviceaccountsubject.go index 439e5ff753082..aa176c99e7fed 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/serviceaccountsubject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/serviceaccountsubject.go @@ -20,9 +20,15 @@ package v1beta1 // ServiceAccountSubjectApplyConfiguration represents a declarative configuration of the ServiceAccountSubject type for use // with apply. +// +// ServiceAccountSubject holds detailed information for service-account-kind subject. type ServiceAccountSubjectApplyConfiguration struct { + // `namespace` is the namespace of matching ServiceAccount objects. + // Required. Namespace *string `json:"namespace,omitempty"` - Name *string `json:"name,omitempty"` + // `name` is the name of matching ServiceAccount objects, or "*" to match regardless of name. + // Required. + Name *string `json:"name,omitempty"` } // ServiceAccountSubjectApplyConfiguration constructs a declarative configuration of the ServiceAccountSubject type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/subject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/subject.go index 000508065dac0..d3d48f2b1bb29 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/subject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/subject.go @@ -24,10 +24,18 @@ import ( // SubjectApplyConfiguration represents a declarative configuration of the Subject type for use // with apply. +// +// Subject matches the originator of a request, as identified by the request authentication system. There are three +// ways of matching an originator; by user, group, or service account. type SubjectApplyConfiguration struct { - Kind *flowcontrolv1beta1.SubjectKind `json:"kind,omitempty"` - User *UserSubjectApplyConfiguration `json:"user,omitempty"` - Group *GroupSubjectApplyConfiguration `json:"group,omitempty"` + // `kind` indicates which one of the other fields is non-empty. + // Required + Kind *flowcontrolv1beta1.SubjectKind `json:"kind,omitempty"` + // `user` matches based on username. + User *UserSubjectApplyConfiguration `json:"user,omitempty"` + // `group` matches based on user group name. + Group *GroupSubjectApplyConfiguration `json:"group,omitempty"` + // `serviceAccount` matches ServiceAccounts. ServiceAccount *ServiceAccountSubjectApplyConfiguration `json:"serviceAccount,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/usersubject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/usersubject.go index bc2deae4c2c33..82775c304bc22 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/usersubject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/usersubject.go @@ -20,7 +20,11 @@ package v1beta1 // UserSubjectApplyConfiguration represents a declarative configuration of the UserSubject type for use // with apply. +// +// UserSubject holds detailed information for user-kind subject. type UserSubjectApplyConfiguration struct { + // `name` is the username that matches, or "*" to match all usernames. + // Required. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/exemptprioritylevelconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/exemptprioritylevelconfiguration.go index 0c02d9b3892fd..52d22909ca28a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/exemptprioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/exemptprioritylevelconfiguration.go @@ -20,9 +20,35 @@ package v1beta2 // ExemptPriorityLevelConfigurationApplyConfiguration represents a declarative configuration of the ExemptPriorityLevelConfiguration type for use // with apply. +// +// ExemptPriorityLevelConfiguration describes the configurable aspects +// of the handling of exempt requests. +// In the mandatory exempt configuration object the values in the fields +// here can be modified by authorized users, unlike the rest of the `spec`. type ExemptPriorityLevelConfigurationApplyConfiguration struct { + // `nominalConcurrencyShares` (NCS) contributes to the computation of the + // NominalConcurrencyLimit (NominalCL) of this level. + // This is the number of execution seats nominally reserved for this priority level. + // This DOES NOT limit the dispatching from this priority level + // but affects the other priority levels through the borrowing mechanism. + // The server's concurrency limit (ServerCL) is divided among all the + // priority levels in proportion to their NCS values: + // + // NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) + // sum_ncs = sum[priority level k] NCS(k) + // + // Bigger numbers mean a larger nominal concurrency limit, + // at the expense of every other priority level. + // This field has a default value of zero. NominalConcurrencyShares *int32 `json:"nominalConcurrencyShares,omitempty"` - LendablePercent *int32 `json:"lendablePercent,omitempty"` + // `lendablePercent` prescribes the fraction of the level's NominalCL that + // can be borrowed by other priority levels. This value of this + // field must be between 0 and 100, inclusive, and it defaults to 0. + // The number of seats that other levels can borrow from this level, known + // as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. + // + // LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) + LendablePercent *int32 `json:"lendablePercent,omitempty"` } // ExemptPriorityLevelConfigurationApplyConfiguration constructs a declarative configuration of the ExemptPriorityLevelConfiguration type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowdistinguishermethod.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowdistinguishermethod.go index 3922c47296010..cbd6e4dda0339 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowdistinguishermethod.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowdistinguishermethod.go @@ -24,7 +24,12 @@ import ( // FlowDistinguisherMethodApplyConfiguration represents a declarative configuration of the FlowDistinguisherMethod type for use // with apply. +// +// FlowDistinguisherMethod specifies the method of a flow distinguisher. type FlowDistinguisherMethodApplyConfiguration struct { + // `type` is the type of flow distinguisher method + // The supported types are "ByUser" and "ByNamespace". + // Required. Type *flowcontrolv1beta2.FlowDistinguisherMethodType `json:"type,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschema.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschema.go index db8cb397a807c..394f24b9936fe 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschema.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschema.go @@ -29,11 +29,20 @@ import ( // FlowSchemaApplyConfiguration represents a declarative configuration of the FlowSchema type for use // with apply. +// +// FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with +// similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher". type FlowSchemaApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // `metadata` is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *FlowSchemaSpecApplyConfiguration `json:"spec,omitempty"` - Status *FlowSchemaStatusApplyConfiguration `json:"status,omitempty"` + // `spec` is the specification of the desired behavior of a FlowSchema. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *FlowSchemaSpecApplyConfiguration `json:"spec,omitempty"` + // `status` is the current status of a FlowSchema. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *FlowSchemaStatusApplyConfiguration `json:"status,omitempty"` } // FlowSchema constructs a declarative configuration of the FlowSchema type for use with @@ -46,6 +55,26 @@ func FlowSchema(name string) *FlowSchemaApplyConfiguration { return b } +// ExtractFlowSchemaFrom extracts the applied configuration owned by fieldManager from +// flowSchema for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// flowSchema must be a unmodified FlowSchema API object that was retrieved from the Kubernetes API. +// ExtractFlowSchemaFrom 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. +func ExtractFlowSchemaFrom(flowSchema *flowcontrolv1beta2.FlowSchema, fieldManager string, subresource string) (*FlowSchemaApplyConfiguration, error) { + b := &FlowSchemaApplyConfiguration{} + err := managedfields.ExtractInto(flowSchema, internal.Parser().Type("io.k8s.api.flowcontrol.v1beta2.FlowSchema"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(flowSchema.Name) + + b.WithKind("FlowSchema") + b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1beta2") + return b, nil +} + // ExtractFlowSchema extracts the applied configuration owned by fieldManager from // flowSchema. If no managedFields are found in flowSchema for fieldManager, a // FlowSchemaApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +85,16 @@ func FlowSchema(name string) *FlowSchemaApplyConfiguration { // ExtractFlowSchema 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 ExtractFlowSchema(flowSchema *flowcontrolv1beta2.FlowSchema, fieldManager string) (*FlowSchemaApplyConfiguration, error) { - return extractFlowSchema(flowSchema, fieldManager, "") + return ExtractFlowSchemaFrom(flowSchema, fieldManager, "") } -// ExtractFlowSchemaStatus is the same as ExtractFlowSchema except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractFlowSchemaStatus extracts the applied configuration owned by fieldManager from +// flowSchema for the status subresource. func ExtractFlowSchemaStatus(flowSchema *flowcontrolv1beta2.FlowSchema, fieldManager string) (*FlowSchemaApplyConfiguration, error) { - return extractFlowSchema(flowSchema, fieldManager, "status") + return ExtractFlowSchemaFrom(flowSchema, fieldManager, "status") } -func extractFlowSchema(flowSchema *flowcontrolv1beta2.FlowSchema, fieldManager string, subresource string) (*FlowSchemaApplyConfiguration, error) { - b := &FlowSchemaApplyConfiguration{} - err := managedfields.ExtractInto(flowSchema, internal.Parser().Type("io.k8s.api.flowcontrol.v1beta2.FlowSchema"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(flowSchema.Name) - - b.WithKind("FlowSchema") - b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1beta2") - return b, nil -} func (b FlowSchemaApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschemacondition.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschemacondition.go index f47130eeb0730..6bebc912c6d20 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschemacondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschemacondition.go @@ -25,12 +25,22 @@ import ( // FlowSchemaConditionApplyConfiguration represents a declarative configuration of the FlowSchemaCondition type for use // with apply. +// +// FlowSchemaCondition describes conditions for a FlowSchema. type FlowSchemaConditionApplyConfiguration struct { - Type *flowcontrolv1beta2.FlowSchemaConditionType `json:"type,omitempty"` - Status *flowcontrolv1beta2.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // `type` is the type of the condition. + // Required. + Type *flowcontrolv1beta2.FlowSchemaConditionType `json:"type,omitempty"` + // `status` is the status of the condition. + // Can be True, False, Unknown. + // Required. + Status *flowcontrolv1beta2.ConditionStatus `json:"status,omitempty"` + // `lastTransitionTime` is the last time the condition transitioned from one status to another. + LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` + // `reason` is a unique, one-word, CamelCase reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // `message` is a human-readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // FlowSchemaConditionApplyConfiguration constructs a declarative configuration of the FlowSchemaCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschemaspec.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschemaspec.go index 6eab63bfa9f60..9e8e23984a83f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschemaspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschemaspec.go @@ -20,11 +20,25 @@ package v1beta2 // FlowSchemaSpecApplyConfiguration represents a declarative configuration of the FlowSchemaSpec type for use // with apply. +// +// FlowSchemaSpec describes how the FlowSchema's specification looks like. type FlowSchemaSpecApplyConfiguration struct { + // `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot + // be resolved, the FlowSchema will be ignored and marked as invalid in its status. + // Required. PriorityLevelConfiguration *PriorityLevelConfigurationReferenceApplyConfiguration `json:"priorityLevelConfiguration,omitempty"` - MatchingPrecedence *int32 `json:"matchingPrecedence,omitempty"` - DistinguisherMethod *FlowDistinguisherMethodApplyConfiguration `json:"distinguisherMethod,omitempty"` - Rules []PolicyRulesWithSubjectsApplyConfiguration `json:"rules,omitempty"` + // `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen + // FlowSchema is among those with the numerically lowest (which we take to be logically highest) + // MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. + // Note that if the precedence is not specified, it will be set to 1000 as default. + MatchingPrecedence *int32 `json:"matchingPrecedence,omitempty"` + // `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. + // `nil` specifies that the distinguisher is disabled and thus will always be the empty string. + DistinguisherMethod *FlowDistinguisherMethodApplyConfiguration `json:"distinguisherMethod,omitempty"` + // `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if + // at least one member of rules matches the request. + // if it is an empty slice, there will be no requests matching the FlowSchema. + Rules []PolicyRulesWithSubjectsApplyConfiguration `json:"rules,omitempty"` } // FlowSchemaSpecApplyConfiguration constructs a declarative configuration of the FlowSchemaSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschemastatus.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschemastatus.go index 70ac997e45219..8e2e8f2aa6296 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschemastatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschemastatus.go @@ -20,7 +20,10 @@ package v1beta2 // FlowSchemaStatusApplyConfiguration represents a declarative configuration of the FlowSchemaStatus type for use // with apply. +// +// FlowSchemaStatus represents the current state of a FlowSchema. type FlowSchemaStatusApplyConfiguration struct { + // `conditions` is a list of the current states of FlowSchema. Conditions []FlowSchemaConditionApplyConfiguration `json:"conditions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/groupsubject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/groupsubject.go index 25207d7c1a23f..0b2bc7afec514 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/groupsubject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/groupsubject.go @@ -20,7 +20,13 @@ package v1beta2 // GroupSubjectApplyConfiguration represents a declarative configuration of the GroupSubject type for use // with apply. +// +// GroupSubject holds detailed information for group-kind subject. type GroupSubjectApplyConfiguration struct { + // name is the user group that matches, or "*" to match all user groups. + // See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some + // well-known group names. + // Required. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/limitedprioritylevelconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/limitedprioritylevelconfiguration.go index 298dd46370668..2eca0e5c6e971 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/limitedprioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/limitedprioritylevelconfiguration.go @@ -20,11 +20,54 @@ package v1beta2 // LimitedPriorityLevelConfigurationApplyConfiguration represents a declarative configuration of the LimitedPriorityLevelConfiguration type for use // with apply. +// +// LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. +// It addresses two issues: +// - How are requests for this priority level limited? +// - What should be done with requests that exceed the limit? type LimitedPriorityLevelConfigurationApplyConfiguration struct { - AssuredConcurrencyShares *int32 `json:"assuredConcurrencyShares,omitempty"` - LimitResponse *LimitResponseApplyConfiguration `json:"limitResponse,omitempty"` - LendablePercent *int32 `json:"lendablePercent,omitempty"` - BorrowingLimitPercent *int32 `json:"borrowingLimitPercent,omitempty"` + // `assuredConcurrencyShares` (ACS) configures the execution + // limit, which is a limit on the number of requests of this + // priority level that may be executing at a given time. ACS must + // be a positive number. The server's concurrency limit (SCL) is + // divided among the concurrency-controlled priority levels in + // proportion to their assured concurrency shares. This produces + // the assured concurrency value (ACV) --- the number of requests + // that may be executing at a time --- for each such priority + // level: + // + // ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) ) + // + // bigger numbers of ACS mean more reserved concurrent requests (at the + // expense of every other PL). + // This field has a default value of 30. + AssuredConcurrencyShares *int32 `json:"assuredConcurrencyShares,omitempty"` + // `limitResponse` indicates what to do with requests that can not be executed right now + LimitResponse *LimitResponseApplyConfiguration `json:"limitResponse,omitempty"` + // `lendablePercent` prescribes the fraction of the level's NominalCL that + // can be borrowed by other priority levels. The value of this + // field must be between 0 and 100, inclusive, and it defaults to 0. + // The number of seats that other levels can borrow from this level, known + // as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. + // + // LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) + LendablePercent *int32 `json:"lendablePercent,omitempty"` + // `borrowingLimitPercent`, if present, configures a limit on how many + // seats this priority level can borrow from other priority levels. + // The limit is known as this level's BorrowingConcurrencyLimit + // (BorrowingCL) and is a limit on the total number of seats that this + // level may borrow at any one time. + // This field holds the ratio of that limit to the level's nominal + // concurrency limit. When this field is non-nil, it must hold a + // non-negative integer and the limit is calculated as follows. + // + // BorrowingCL(i) = round( NominalCL(i) * borrowingLimitPercent(i)/100.0 ) + // + // The value of this field can be more than 100, implying that this + // priority level can borrow a number of seats that is greater than + // its own nominal concurrency limit (NominalCL). + // When this field is left `nil`, the limit is effectively infinite. + BorrowingLimitPercent *int32 `json:"borrowingLimitPercent,omitempty"` } // LimitedPriorityLevelConfigurationApplyConfiguration constructs a declarative configuration of the LimitedPriorityLevelConfiguration type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/limitresponse.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/limitresponse.go index 58cd78006bcc0..6b4ea88140903 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/limitresponse.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/limitresponse.go @@ -24,8 +24,19 @@ import ( // LimitResponseApplyConfiguration represents a declarative configuration of the LimitResponse type for use // with apply. +// +// LimitResponse defines how to handle requests that can not be executed right now. type LimitResponseApplyConfiguration struct { - Type *flowcontrolv1beta2.LimitResponseType `json:"type,omitempty"` + // `type` is "Queue" or "Reject". + // "Queue" means that requests that can not be executed upon arrival + // are held in a queue until they can be executed or a queuing limit + // is reached. + // "Reject" means that requests that can not be executed upon arrival + // are rejected. + // Required. + Type *flowcontrolv1beta2.LimitResponseType `json:"type,omitempty"` + // `queuing` holds the configuration parameters for queuing. + // This field may be non-empty only if `type` is `"Queue"`. Queuing *QueuingConfigurationApplyConfiguration `json:"queuing,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/nonresourcepolicyrule.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/nonresourcepolicyrule.go index 5032ee4898bdf..8bfd336374cef 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/nonresourcepolicyrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/nonresourcepolicyrule.go @@ -20,8 +20,24 @@ package v1beta2 // NonResourcePolicyRuleApplyConfiguration represents a declarative configuration of the NonResourcePolicyRule type for use // with apply. +// +// NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the +// target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member +// of verbs matches the request and (b) at least one member of nonResourceURLs matches the request. type NonResourcePolicyRuleApplyConfiguration struct { - Verbs []string `json:"verbs,omitempty"` + // `verbs` is a list of matching verbs and may not be empty. + // "*" matches all verbs. If it is present, it must be the only entry. + // Required. + Verbs []string `json:"verbs,omitempty"` + // `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. + // For example: + // - "/healthz" is legal + // - "/hea*" is illegal + // - "/hea" is legal but matches nothing + // - "/hea/*" also matches nothing + // - "/healthz/*" matches all per-component health checks. + // "*" matches all non-resource urls. if it is present, it must be the only entry. + // Required. NonResourceURLs []string `json:"nonResourceURLs,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/policyruleswithsubjects.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/policyruleswithsubjects.go index 2bb8c871828a2..6a42bdf850c4d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/policyruleswithsubjects.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/policyruleswithsubjects.go @@ -20,9 +20,23 @@ package v1beta2 // PolicyRulesWithSubjectsApplyConfiguration represents a declarative configuration of the PolicyRulesWithSubjects type for use // with apply. +// +// PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject +// making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches +// a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member +// of resourceRules or nonResourceRules matches the request. type PolicyRulesWithSubjectsApplyConfiguration struct { - Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` - ResourceRules []ResourcePolicyRuleApplyConfiguration `json:"resourceRules,omitempty"` + // subjects is the list of normal user, serviceaccount, or group that this rule cares about. + // There must be at least one member in this slice. + // A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. + // Required. + Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` + // `resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the + // target resource. + // At least one of `resourceRules` and `nonResourceRules` has to be non-empty. + ResourceRules []ResourcePolicyRuleApplyConfiguration `json:"resourceRules,omitempty"` + // `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb + // and the target non-resource URL. NonResourceRules []NonResourcePolicyRuleApplyConfiguration `json:"nonResourceRules,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go index 7cb04bb758d9d..a60827b6365ee 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go @@ -29,11 +29,19 @@ import ( // PriorityLevelConfigurationApplyConfiguration represents a declarative configuration of the PriorityLevelConfiguration type for use // with apply. +// +// PriorityLevelConfiguration represents the configuration of a priority level. type PriorityLevelConfigurationApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // `metadata` is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PriorityLevelConfigurationSpecApplyConfiguration `json:"spec,omitempty"` - Status *PriorityLevelConfigurationStatusApplyConfiguration `json:"status,omitempty"` + // `spec` is the specification of the desired behavior of a "request-priority". + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *PriorityLevelConfigurationSpecApplyConfiguration `json:"spec,omitempty"` + // `status` is the current status of a "request-priority". + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *PriorityLevelConfigurationStatusApplyConfiguration `json:"status,omitempty"` } // PriorityLevelConfiguration constructs a declarative configuration of the PriorityLevelConfiguration type for use with @@ -46,6 +54,26 @@ func PriorityLevelConfiguration(name string) *PriorityLevelConfigurationApplyCon return b } +// ExtractPriorityLevelConfigurationFrom extracts the applied configuration owned by fieldManager from +// priorityLevelConfiguration for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// priorityLevelConfiguration must be a unmodified PriorityLevelConfiguration API object that was retrieved from the Kubernetes API. +// ExtractPriorityLevelConfigurationFrom 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. +func ExtractPriorityLevelConfigurationFrom(priorityLevelConfiguration *flowcontrolv1beta2.PriorityLevelConfiguration, fieldManager string, subresource string) (*PriorityLevelConfigurationApplyConfiguration, error) { + b := &PriorityLevelConfigurationApplyConfiguration{} + err := managedfields.ExtractInto(priorityLevelConfiguration, internal.Parser().Type("io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfiguration"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(priorityLevelConfiguration.Name) + + b.WithKind("PriorityLevelConfiguration") + b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1beta2") + return b, nil +} + // ExtractPriorityLevelConfiguration extracts the applied configuration owned by fieldManager from // priorityLevelConfiguration. If no managedFields are found in priorityLevelConfiguration for fieldManager, a // PriorityLevelConfigurationApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +84,16 @@ func PriorityLevelConfiguration(name string) *PriorityLevelConfigurationApplyCon // ExtractPriorityLevelConfiguration 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 ExtractPriorityLevelConfiguration(priorityLevelConfiguration *flowcontrolv1beta2.PriorityLevelConfiguration, fieldManager string) (*PriorityLevelConfigurationApplyConfiguration, error) { - return extractPriorityLevelConfiguration(priorityLevelConfiguration, fieldManager, "") + return ExtractPriorityLevelConfigurationFrom(priorityLevelConfiguration, fieldManager, "") } -// ExtractPriorityLevelConfigurationStatus is the same as ExtractPriorityLevelConfiguration except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractPriorityLevelConfigurationStatus extracts the applied configuration owned by fieldManager from +// priorityLevelConfiguration for the status subresource. func ExtractPriorityLevelConfigurationStatus(priorityLevelConfiguration *flowcontrolv1beta2.PriorityLevelConfiguration, fieldManager string) (*PriorityLevelConfigurationApplyConfiguration, error) { - return extractPriorityLevelConfiguration(priorityLevelConfiguration, fieldManager, "status") + return ExtractPriorityLevelConfigurationFrom(priorityLevelConfiguration, fieldManager, "status") } -func extractPriorityLevelConfiguration(priorityLevelConfiguration *flowcontrolv1beta2.PriorityLevelConfiguration, fieldManager string, subresource string) (*PriorityLevelConfigurationApplyConfiguration, error) { - b := &PriorityLevelConfigurationApplyConfiguration{} - err := managedfields.ExtractInto(priorityLevelConfiguration, internal.Parser().Type("io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfiguration"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(priorityLevelConfiguration.Name) - - b.WithKind("PriorityLevelConfiguration") - b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1beta2") - return b, nil -} func (b PriorityLevelConfigurationApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationcondition.go index caf517be3b37e..26a8b66243b92 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationcondition.go @@ -25,12 +25,22 @@ import ( // PriorityLevelConfigurationConditionApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationCondition type for use // with apply. +// +// PriorityLevelConfigurationCondition defines the condition of priority level. type PriorityLevelConfigurationConditionApplyConfiguration struct { - Type *flowcontrolv1beta2.PriorityLevelConfigurationConditionType `json:"type,omitempty"` - Status *flowcontrolv1beta2.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // `type` is the type of the condition. + // Required. + Type *flowcontrolv1beta2.PriorityLevelConfigurationConditionType `json:"type,omitempty"` + // `status` is the status of the condition. + // Can be True, False, Unknown. + // Required. + Status *flowcontrolv1beta2.ConditionStatus `json:"status,omitempty"` + // `lastTransitionTime` is the last time the condition transitioned from one status to another. + LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` + // `reason` is a unique, one-word, CamelCase reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // `message` is a human-readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // PriorityLevelConfigurationConditionApplyConfiguration constructs a declarative configuration of the PriorityLevelConfigurationCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationreference.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationreference.go index bbf718b60f9c7..67c6b63a45e4a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationreference.go @@ -20,7 +20,11 @@ package v1beta2 // PriorityLevelConfigurationReferenceApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationReference type for use // with apply. +// +// PriorityLevelConfigurationReference contains information that points to the "request-priority" being used. type PriorityLevelConfigurationReferenceApplyConfiguration struct { + // `name` is the name of the priority level configuration being referenced + // Required. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationspec.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationspec.go index c680ea1ef37ec..4c4b743cde183 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationspec.go @@ -24,10 +24,28 @@ import ( // PriorityLevelConfigurationSpecApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationSpec type for use // with apply. +// +// PriorityLevelConfigurationSpec specifies the configuration of a priority level. type PriorityLevelConfigurationSpecApplyConfiguration struct { - Type *flowcontrolv1beta2.PriorityLevelEnablement `json:"type,omitempty"` + // `type` indicates whether this priority level is subject to + // limitation on request execution. A value of `"Exempt"` means + // that requests of this priority level are not subject to a limit + // (and thus are never queued) and do not detract from the + // capacity made available to other priority levels. A value of + // `"Limited"` means that (a) requests of this priority level + // _are_ subject to limits and (b) some of the server's limited + // capacity is made available exclusively to this priority level. + // Required. + Type *flowcontrolv1beta2.PriorityLevelEnablement `json:"type,omitempty"` + // `limited` specifies how requests are handled for a Limited priority level. + // This field must be non-empty if and only if `type` is `"Limited"`. Limited *LimitedPriorityLevelConfigurationApplyConfiguration `json:"limited,omitempty"` - Exempt *ExemptPriorityLevelConfigurationApplyConfiguration `json:"exempt,omitempty"` + // `exempt` specifies how requests are handled for an exempt priority level. + // This field MUST be empty if `type` is `"Limited"`. + // This field MAY be non-empty if `type` is `"Exempt"`. + // If empty and `type` is `"Exempt"` then the default values + // for `ExemptPriorityLevelConfiguration` apply. + Exempt *ExemptPriorityLevelConfigurationApplyConfiguration `json:"exempt,omitempty"` } // PriorityLevelConfigurationSpecApplyConfiguration constructs a declarative configuration of the PriorityLevelConfigurationSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationstatus.go index 7a1f8790b93c3..da9990cf97603 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfigurationstatus.go @@ -20,7 +20,10 @@ package v1beta2 // PriorityLevelConfigurationStatusApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationStatus type for use // with apply. +// +// PriorityLevelConfigurationStatus represents the current state of a "request-priority". type PriorityLevelConfigurationStatusApplyConfiguration struct { + // `conditions` is the current state of "request-priority". Conditions []PriorityLevelConfigurationConditionApplyConfiguration `json:"conditions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/queuingconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/queuingconfiguration.go index 19c34c5f8317a..e145ab83b7e4f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/queuingconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/queuingconfiguration.go @@ -20,9 +20,32 @@ package v1beta2 // QueuingConfigurationApplyConfiguration represents a declarative configuration of the QueuingConfiguration type for use // with apply. +// +// QueuingConfiguration holds the configuration parameters for queuing type QueuingConfigurationApplyConfiguration struct { - Queues *int32 `json:"queues,omitempty"` - HandSize *int32 `json:"handSize,omitempty"` + // `queues` is the number of queues for this priority level. The + // queues exist independently at each apiserver. The value must be + // positive. Setting it to 1 effectively precludes + // shufflesharding and thus makes the distinguisher method of + // associated flow schemas irrelevant. This field has a default + // value of 64. + Queues *int32 `json:"queues,omitempty"` + // `handSize` is a small positive number that configures the + // shuffle sharding of requests into queues. When enqueuing a request + // at this priority level the request's flow identifier (a string + // pair) is hashed and the hash value is used to shuffle the list + // of queues and deal a hand of the size specified here. The + // request is put into one of the shortest queues in that hand. + // `handSize` must be no larger than `queues`, and should be + // significantly smaller (so that a few heavy flows do not + // saturate most of the queues). See the user-facing + // documentation for more extensive guidance on setting this + // field. This field has a default value of 8. + HandSize *int32 `json:"handSize,omitempty"` + // `queueLengthLimit` is the maximum number of requests allowed to + // be waiting in a given queue of this priority level at a time; + // excess requests are rejected. This value must be positive. If + // not specified, it will be defaulted to 50. QueueLengthLimit *int32 `json:"queueLengthLimit,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/resourcepolicyrule.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/resourcepolicyrule.go index 070d2ed46514d..97b1012a77fb8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/resourcepolicyrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/resourcepolicyrule.go @@ -20,12 +20,46 @@ package v1beta2 // ResourcePolicyRuleApplyConfiguration represents a declarative configuration of the ResourcePolicyRule type for use // with apply. +// +// ResourcePolicyRule is a predicate that matches some resource +// requests, testing the request's verb and the target resource. A +// ResourcePolicyRule matches a resource request if and only if: (a) +// at least one member of verbs matches the request, (b) at least one +// member of apiGroups matches the request, (c) at least one member of +// resources matches the request, and (d) either (d1) the request does +// not specify a namespace (i.e., `Namespace==""`) and clusterScope is +// true or (d2) the request specifies a namespace and least one member +// of namespaces matches the request's namespace. type ResourcePolicyRuleApplyConfiguration struct { - Verbs []string `json:"verbs,omitempty"` - APIGroups []string `json:"apiGroups,omitempty"` - Resources []string `json:"resources,omitempty"` - ClusterScope *bool `json:"clusterScope,omitempty"` - Namespaces []string `json:"namespaces,omitempty"` + // `verbs` is a list of matching verbs and may not be empty. + // "*" matches all verbs and, if present, must be the only entry. + // Required. + Verbs []string `json:"verbs,omitempty"` + // `apiGroups` is a list of matching API groups and may not be empty. + // "*" matches all API groups and, if present, must be the only entry. + // Required. + APIGroups []string `json:"apiGroups,omitempty"` + // `resources` is a list of matching resources (i.e., lowercase + // and plural) with, if desired, subresource. For example, [ + // "services", "nodes/status" ]. This list may not be empty. + // "*" matches all resources and, if present, must be the only entry. + // Required. + Resources []string `json:"resources,omitempty"` + // `clusterScope` indicates whether to match requests that do not + // specify a namespace (which happens either because the resource + // is not namespaced or the request targets all namespaces). + // If this field is omitted or false then the `namespaces` field + // must contain a non-empty list. + ClusterScope *bool `json:"clusterScope,omitempty"` + // `namespaces` is a list of target namespaces that restricts + // matches. A request that specifies a target namespace matches + // only if either (a) this list contains that target namespace or + // (b) this list contains "*". Note that "*" matches any + // specified namespace but does not match a request that _does + // not specify_ a namespace (see the `clusterScope` field for + // that). + // This list may be empty, but only if `clusterScope` is true. + Namespaces []string `json:"namespaces,omitempty"` } // ResourcePolicyRuleApplyConfiguration constructs a declarative configuration of the ResourcePolicyRule type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/serviceaccountsubject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/serviceaccountsubject.go index c0d44721cccc5..0e41716d149b3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/serviceaccountsubject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/serviceaccountsubject.go @@ -20,9 +20,15 @@ package v1beta2 // ServiceAccountSubjectApplyConfiguration represents a declarative configuration of the ServiceAccountSubject type for use // with apply. +// +// ServiceAccountSubject holds detailed information for service-account-kind subject. type ServiceAccountSubjectApplyConfiguration struct { + // `namespace` is the namespace of matching ServiceAccount objects. + // Required. Namespace *string `json:"namespace,omitempty"` - Name *string `json:"name,omitempty"` + // `name` is the name of matching ServiceAccount objects, or "*" to match regardless of name. + // Required. + Name *string `json:"name,omitempty"` } // ServiceAccountSubjectApplyConfiguration constructs a declarative configuration of the ServiceAccountSubject type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/subject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/subject.go index 2b569a628105b..d275444e1e62f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/subject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/subject.go @@ -24,10 +24,18 @@ import ( // SubjectApplyConfiguration represents a declarative configuration of the Subject type for use // with apply. +// +// Subject matches the originator of a request, as identified by the request authentication system. There are three +// ways of matching an originator; by user, group, or service account. type SubjectApplyConfiguration struct { - Kind *flowcontrolv1beta2.SubjectKind `json:"kind,omitempty"` - User *UserSubjectApplyConfiguration `json:"user,omitempty"` - Group *GroupSubjectApplyConfiguration `json:"group,omitempty"` + // `kind` indicates which one of the other fields is non-empty. + // Required + Kind *flowcontrolv1beta2.SubjectKind `json:"kind,omitempty"` + // `user` matches based on username. + User *UserSubjectApplyConfiguration `json:"user,omitempty"` + // `group` matches based on user group name. + Group *GroupSubjectApplyConfiguration `json:"group,omitempty"` + // `serviceAccount` matches ServiceAccounts. ServiceAccount *ServiceAccountSubjectApplyConfiguration `json:"serviceAccount,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/usersubject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/usersubject.go index c249f042dae14..4de656a9d9d15 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/usersubject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/usersubject.go @@ -20,7 +20,11 @@ package v1beta2 // UserSubjectApplyConfiguration represents a declarative configuration of the UserSubject type for use // with apply. +// +// UserSubject holds detailed information for user-kind subject. type UserSubjectApplyConfiguration struct { + // `name` is the username that matches, or "*" to match all usernames. + // Required. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/exemptprioritylevelconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/exemptprioritylevelconfiguration.go index b9bf6993af38d..410a79b79a86f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/exemptprioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/exemptprioritylevelconfiguration.go @@ -20,9 +20,35 @@ package v1beta3 // ExemptPriorityLevelConfigurationApplyConfiguration represents a declarative configuration of the ExemptPriorityLevelConfiguration type for use // with apply. +// +// ExemptPriorityLevelConfiguration describes the configurable aspects +// of the handling of exempt requests. +// In the mandatory exempt configuration object the values in the fields +// here can be modified by authorized users, unlike the rest of the `spec`. type ExemptPriorityLevelConfigurationApplyConfiguration struct { + // `nominalConcurrencyShares` (NCS) contributes to the computation of the + // NominalConcurrencyLimit (NominalCL) of this level. + // This is the number of execution seats nominally reserved for this priority level. + // This DOES NOT limit the dispatching from this priority level + // but affects the other priority levels through the borrowing mechanism. + // The server's concurrency limit (ServerCL) is divided among all the + // priority levels in proportion to their NCS values: + // + // NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) + // sum_ncs = sum[priority level k] NCS(k) + // + // Bigger numbers mean a larger nominal concurrency limit, + // at the expense of every other priority level. + // This field has a default value of zero. NominalConcurrencyShares *int32 `json:"nominalConcurrencyShares,omitempty"` - LendablePercent *int32 `json:"lendablePercent,omitempty"` + // `lendablePercent` prescribes the fraction of the level's NominalCL that + // can be borrowed by other priority levels. This value of this + // field must be between 0 and 100, inclusive, and it defaults to 0. + // The number of seats that other levels can borrow from this level, known + // as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. + // + // LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) + LendablePercent *int32 `json:"lendablePercent,omitempty"` } // ExemptPriorityLevelConfigurationApplyConfiguration constructs a declarative configuration of the ExemptPriorityLevelConfiguration type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowdistinguishermethod.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowdistinguishermethod.go index cc32fa1005537..de0f049198050 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowdistinguishermethod.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowdistinguishermethod.go @@ -24,7 +24,12 @@ import ( // FlowDistinguisherMethodApplyConfiguration represents a declarative configuration of the FlowDistinguisherMethod type for use // with apply. +// +// FlowDistinguisherMethod specifies the method of a flow distinguisher. type FlowDistinguisherMethodApplyConfiguration struct { + // `type` is the type of flow distinguisher method + // The supported types are "ByUser" and "ByNamespace". + // Required. Type *flowcontrolv1beta3.FlowDistinguisherMethodType `json:"type,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschema.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschema.go index b20c8ce69b96e..0079748b668c6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschema.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschema.go @@ -29,11 +29,20 @@ import ( // FlowSchemaApplyConfiguration represents a declarative configuration of the FlowSchema type for use // with apply. +// +// FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with +// similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher". type FlowSchemaApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // `metadata` is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *FlowSchemaSpecApplyConfiguration `json:"spec,omitempty"` - Status *FlowSchemaStatusApplyConfiguration `json:"status,omitempty"` + // `spec` is the specification of the desired behavior of a FlowSchema. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *FlowSchemaSpecApplyConfiguration `json:"spec,omitempty"` + // `status` is the current status of a FlowSchema. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *FlowSchemaStatusApplyConfiguration `json:"status,omitempty"` } // FlowSchema constructs a declarative configuration of the FlowSchema type for use with @@ -46,6 +55,26 @@ func FlowSchema(name string) *FlowSchemaApplyConfiguration { return b } +// ExtractFlowSchemaFrom extracts the applied configuration owned by fieldManager from +// flowSchema for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// flowSchema must be a unmodified FlowSchema API object that was retrieved from the Kubernetes API. +// ExtractFlowSchemaFrom 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. +func ExtractFlowSchemaFrom(flowSchema *flowcontrolv1beta3.FlowSchema, fieldManager string, subresource string) (*FlowSchemaApplyConfiguration, error) { + b := &FlowSchemaApplyConfiguration{} + err := managedfields.ExtractInto(flowSchema, internal.Parser().Type("io.k8s.api.flowcontrol.v1beta3.FlowSchema"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(flowSchema.Name) + + b.WithKind("FlowSchema") + b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1beta3") + return b, nil +} + // ExtractFlowSchema extracts the applied configuration owned by fieldManager from // flowSchema. If no managedFields are found in flowSchema for fieldManager, a // FlowSchemaApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +85,16 @@ func FlowSchema(name string) *FlowSchemaApplyConfiguration { // ExtractFlowSchema 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 ExtractFlowSchema(flowSchema *flowcontrolv1beta3.FlowSchema, fieldManager string) (*FlowSchemaApplyConfiguration, error) { - return extractFlowSchema(flowSchema, fieldManager, "") + return ExtractFlowSchemaFrom(flowSchema, fieldManager, "") } -// ExtractFlowSchemaStatus is the same as ExtractFlowSchema except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractFlowSchemaStatus extracts the applied configuration owned by fieldManager from +// flowSchema for the status subresource. func ExtractFlowSchemaStatus(flowSchema *flowcontrolv1beta3.FlowSchema, fieldManager string) (*FlowSchemaApplyConfiguration, error) { - return extractFlowSchema(flowSchema, fieldManager, "status") + return ExtractFlowSchemaFrom(flowSchema, fieldManager, "status") } -func extractFlowSchema(flowSchema *flowcontrolv1beta3.FlowSchema, fieldManager string, subresource string) (*FlowSchemaApplyConfiguration, error) { - b := &FlowSchemaApplyConfiguration{} - err := managedfields.ExtractInto(flowSchema, internal.Parser().Type("io.k8s.api.flowcontrol.v1beta3.FlowSchema"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(flowSchema.Name) - - b.WithKind("FlowSchema") - b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1beta3") - return b, nil -} func (b FlowSchemaApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschemacondition.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschemacondition.go index d5ba21f71b0b6..de2aff568236b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschemacondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschemacondition.go @@ -25,12 +25,22 @@ import ( // FlowSchemaConditionApplyConfiguration represents a declarative configuration of the FlowSchemaCondition type for use // with apply. +// +// FlowSchemaCondition describes conditions for a FlowSchema. type FlowSchemaConditionApplyConfiguration struct { - Type *flowcontrolv1beta3.FlowSchemaConditionType `json:"type,omitempty"` - Status *flowcontrolv1beta3.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // `type` is the type of the condition. + // Required. + Type *flowcontrolv1beta3.FlowSchemaConditionType `json:"type,omitempty"` + // `status` is the status of the condition. + // Can be True, False, Unknown. + // Required. + Status *flowcontrolv1beta3.ConditionStatus `json:"status,omitempty"` + // `lastTransitionTime` is the last time the condition transitioned from one status to another. + LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` + // `reason` is a unique, one-word, CamelCase reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // `message` is a human-readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // FlowSchemaConditionApplyConfiguration constructs a declarative configuration of the FlowSchemaCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschemaspec.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschemaspec.go index 7141f6a6a11b7..6d30db1270842 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschemaspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschemaspec.go @@ -20,11 +20,25 @@ package v1beta3 // FlowSchemaSpecApplyConfiguration represents a declarative configuration of the FlowSchemaSpec type for use // with apply. +// +// FlowSchemaSpec describes how the FlowSchema's specification looks like. type FlowSchemaSpecApplyConfiguration struct { + // `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot + // be resolved, the FlowSchema will be ignored and marked as invalid in its status. + // Required. PriorityLevelConfiguration *PriorityLevelConfigurationReferenceApplyConfiguration `json:"priorityLevelConfiguration,omitempty"` - MatchingPrecedence *int32 `json:"matchingPrecedence,omitempty"` - DistinguisherMethod *FlowDistinguisherMethodApplyConfiguration `json:"distinguisherMethod,omitempty"` - Rules []PolicyRulesWithSubjectsApplyConfiguration `json:"rules,omitempty"` + // `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen + // FlowSchema is among those with the numerically lowest (which we take to be logically highest) + // MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. + // Note that if the precedence is not specified, it will be set to 1000 as default. + MatchingPrecedence *int32 `json:"matchingPrecedence,omitempty"` + // `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. + // `nil` specifies that the distinguisher is disabled and thus will always be the empty string. + DistinguisherMethod *FlowDistinguisherMethodApplyConfiguration `json:"distinguisherMethod,omitempty"` + // `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if + // at least one member of rules matches the request. + // if it is an empty slice, there will be no requests matching the FlowSchema. + Rules []PolicyRulesWithSubjectsApplyConfiguration `json:"rules,omitempty"` } // FlowSchemaSpecApplyConfiguration constructs a declarative configuration of the FlowSchemaSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschemastatus.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschemastatus.go index 294ddc9098c60..0405b071b580f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschemastatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/flowschemastatus.go @@ -20,7 +20,10 @@ package v1beta3 // FlowSchemaStatusApplyConfiguration represents a declarative configuration of the FlowSchemaStatus type for use // with apply. +// +// FlowSchemaStatus represents the current state of a FlowSchema. type FlowSchemaStatusApplyConfiguration struct { + // `conditions` is a list of the current states of FlowSchema. Conditions []FlowSchemaConditionApplyConfiguration `json:"conditions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/groupsubject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/groupsubject.go index 6576e716eff95..2c5abe56cef23 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/groupsubject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/groupsubject.go @@ -20,7 +20,13 @@ package v1beta3 // GroupSubjectApplyConfiguration represents a declarative configuration of the GroupSubject type for use // with apply. +// +// GroupSubject holds detailed information for group-kind subject. type GroupSubjectApplyConfiguration struct { + // name is the user group that matches, or "*" to match all user groups. + // See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some + // well-known group names. + // Required. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/limitedprioritylevelconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/limitedprioritylevelconfiguration.go index bd98dd683c53e..12173e83bfd1a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/limitedprioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/limitedprioritylevelconfiguration.go @@ -20,11 +20,54 @@ package v1beta3 // LimitedPriorityLevelConfigurationApplyConfiguration represents a declarative configuration of the LimitedPriorityLevelConfiguration type for use // with apply. +// +// LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. +// It addresses two issues: +// - How are requests for this priority level limited? +// - What should be done with requests that exceed the limit? type LimitedPriorityLevelConfigurationApplyConfiguration struct { - NominalConcurrencyShares *int32 `json:"nominalConcurrencyShares,omitempty"` - LimitResponse *LimitResponseApplyConfiguration `json:"limitResponse,omitempty"` - LendablePercent *int32 `json:"lendablePercent,omitempty"` - BorrowingLimitPercent *int32 `json:"borrowingLimitPercent,omitempty"` + // `nominalConcurrencyShares` (NCS) contributes to the computation of the + // NominalConcurrencyLimit (NominalCL) of this level. + // This is the number of execution seats available at this priority level. + // This is used both for requests dispatched from this priority level + // as well as requests dispatched from other priority levels + // borrowing seats from this level. + // The server's concurrency limit (ServerCL) is divided among the + // Limited priority levels in proportion to their NCS values: + // + // NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) + // sum_ncs = sum[priority level k] NCS(k) + // + // Bigger numbers mean a larger nominal concurrency limit, + // at the expense of every other priority level. + // This field has a default value of 30. + NominalConcurrencyShares *int32 `json:"nominalConcurrencyShares,omitempty"` + // `limitResponse` indicates what to do with requests that can not be executed right now + LimitResponse *LimitResponseApplyConfiguration `json:"limitResponse,omitempty"` + // `lendablePercent` prescribes the fraction of the level's NominalCL that + // can be borrowed by other priority levels. The value of this + // field must be between 0 and 100, inclusive, and it defaults to 0. + // The number of seats that other levels can borrow from this level, known + // as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. + // + // LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) + LendablePercent *int32 `json:"lendablePercent,omitempty"` + // `borrowingLimitPercent`, if present, configures a limit on how many + // seats this priority level can borrow from other priority levels. + // The limit is known as this level's BorrowingConcurrencyLimit + // (BorrowingCL) and is a limit on the total number of seats that this + // level may borrow at any one time. + // This field holds the ratio of that limit to the level's nominal + // concurrency limit. When this field is non-nil, it must hold a + // non-negative integer and the limit is calculated as follows. + // + // BorrowingCL(i) = round( NominalCL(i) * borrowingLimitPercent(i)/100.0 ) + // + // The value of this field can be more than 100, implying that this + // priority level can borrow a number of seats that is greater than + // its own nominal concurrency limit (NominalCL). + // When this field is left `nil`, the limit is effectively infinite. + BorrowingLimitPercent *int32 `json:"borrowingLimitPercent,omitempty"` } // LimitedPriorityLevelConfigurationApplyConfiguration constructs a declarative configuration of the LimitedPriorityLevelConfiguration type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/limitresponse.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/limitresponse.go index 2c289c7775c89..6f253a2a48385 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/limitresponse.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/limitresponse.go @@ -24,8 +24,19 @@ import ( // LimitResponseApplyConfiguration represents a declarative configuration of the LimitResponse type for use // with apply. +// +// LimitResponse defines how to handle requests that can not be executed right now. type LimitResponseApplyConfiguration struct { - Type *flowcontrolv1beta3.LimitResponseType `json:"type,omitempty"` + // `type` is "Queue" or "Reject". + // "Queue" means that requests that can not be executed upon arrival + // are held in a queue until they can be executed or a queuing limit + // is reached. + // "Reject" means that requests that can not be executed upon arrival + // are rejected. + // Required. + Type *flowcontrolv1beta3.LimitResponseType `json:"type,omitempty"` + // `queuing` holds the configuration parameters for queuing. + // This field may be non-empty only if `type` is `"Queue"`. Queuing *QueuingConfigurationApplyConfiguration `json:"queuing,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/nonresourcepolicyrule.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/nonresourcepolicyrule.go index 2dd0d2b0680b2..6e350a17bd2e5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/nonresourcepolicyrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/nonresourcepolicyrule.go @@ -20,8 +20,24 @@ package v1beta3 // NonResourcePolicyRuleApplyConfiguration represents a declarative configuration of the NonResourcePolicyRule type for use // with apply. +// +// NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the +// target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member +// of verbs matches the request and (b) at least one member of nonResourceURLs matches the request. type NonResourcePolicyRuleApplyConfiguration struct { - Verbs []string `json:"verbs,omitempty"` + // `verbs` is a list of matching verbs and may not be empty. + // "*" matches all verbs. If it is present, it must be the only entry. + // Required. + Verbs []string `json:"verbs,omitempty"` + // `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. + // For example: + // - "/healthz" is legal + // - "/hea*" is illegal + // - "/hea" is legal but matches nothing + // - "/hea/*" also matches nothing + // - "/healthz/*" matches all per-component health checks. + // "*" matches all non-resource urls. if it is present, it must be the only entry. + // Required. NonResourceURLs []string `json:"nonResourceURLs,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/policyruleswithsubjects.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/policyruleswithsubjects.go index cc64dc585ba84..2588bf9938c83 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/policyruleswithsubjects.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/policyruleswithsubjects.go @@ -20,9 +20,23 @@ package v1beta3 // PolicyRulesWithSubjectsApplyConfiguration represents a declarative configuration of the PolicyRulesWithSubjects type for use // with apply. +// +// PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject +// making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches +// a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member +// of resourceRules or nonResourceRules matches the request. type PolicyRulesWithSubjectsApplyConfiguration struct { - Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` - ResourceRules []ResourcePolicyRuleApplyConfiguration `json:"resourceRules,omitempty"` + // subjects is the list of normal user, serviceaccount, or group that this rule cares about. + // There must be at least one member in this slice. + // A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. + // Required. + Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` + // `resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the + // target resource. + // At least one of `resourceRules` and `nonResourceRules` has to be non-empty. + ResourceRules []ResourcePolicyRuleApplyConfiguration `json:"resourceRules,omitempty"` + // `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb + // and the target non-resource URL. NonResourceRules []NonResourcePolicyRuleApplyConfiguration `json:"nonResourceRules,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfiguration.go index 9a0dad0234ea6..910cb4c25cd37 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfiguration.go @@ -29,11 +29,19 @@ import ( // PriorityLevelConfigurationApplyConfiguration represents a declarative configuration of the PriorityLevelConfiguration type for use // with apply. +// +// PriorityLevelConfiguration represents the configuration of a priority level. type PriorityLevelConfigurationApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // `metadata` is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PriorityLevelConfigurationSpecApplyConfiguration `json:"spec,omitempty"` - Status *PriorityLevelConfigurationStatusApplyConfiguration `json:"status,omitempty"` + // `spec` is the specification of the desired behavior of a "request-priority". + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *PriorityLevelConfigurationSpecApplyConfiguration `json:"spec,omitempty"` + // `status` is the current status of a "request-priority". + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *PriorityLevelConfigurationStatusApplyConfiguration `json:"status,omitempty"` } // PriorityLevelConfiguration constructs a declarative configuration of the PriorityLevelConfiguration type for use with @@ -46,6 +54,26 @@ func PriorityLevelConfiguration(name string) *PriorityLevelConfigurationApplyCon return b } +// ExtractPriorityLevelConfigurationFrom extracts the applied configuration owned by fieldManager from +// priorityLevelConfiguration for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// priorityLevelConfiguration must be a unmodified PriorityLevelConfiguration API object that was retrieved from the Kubernetes API. +// ExtractPriorityLevelConfigurationFrom 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. +func ExtractPriorityLevelConfigurationFrom(priorityLevelConfiguration *flowcontrolv1beta3.PriorityLevelConfiguration, fieldManager string, subresource string) (*PriorityLevelConfigurationApplyConfiguration, error) { + b := &PriorityLevelConfigurationApplyConfiguration{} + err := managedfields.ExtractInto(priorityLevelConfiguration, internal.Parser().Type("io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(priorityLevelConfiguration.Name) + + b.WithKind("PriorityLevelConfiguration") + b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1beta3") + return b, nil +} + // ExtractPriorityLevelConfiguration extracts the applied configuration owned by fieldManager from // priorityLevelConfiguration. If no managedFields are found in priorityLevelConfiguration for fieldManager, a // PriorityLevelConfigurationApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +84,16 @@ func PriorityLevelConfiguration(name string) *PriorityLevelConfigurationApplyCon // ExtractPriorityLevelConfiguration 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 ExtractPriorityLevelConfiguration(priorityLevelConfiguration *flowcontrolv1beta3.PriorityLevelConfiguration, fieldManager string) (*PriorityLevelConfigurationApplyConfiguration, error) { - return extractPriorityLevelConfiguration(priorityLevelConfiguration, fieldManager, "") + return ExtractPriorityLevelConfigurationFrom(priorityLevelConfiguration, fieldManager, "") } -// ExtractPriorityLevelConfigurationStatus is the same as ExtractPriorityLevelConfiguration except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractPriorityLevelConfigurationStatus extracts the applied configuration owned by fieldManager from +// priorityLevelConfiguration for the status subresource. func ExtractPriorityLevelConfigurationStatus(priorityLevelConfiguration *flowcontrolv1beta3.PriorityLevelConfiguration, fieldManager string) (*PriorityLevelConfigurationApplyConfiguration, error) { - return extractPriorityLevelConfiguration(priorityLevelConfiguration, fieldManager, "status") + return ExtractPriorityLevelConfigurationFrom(priorityLevelConfiguration, fieldManager, "status") } -func extractPriorityLevelConfiguration(priorityLevelConfiguration *flowcontrolv1beta3.PriorityLevelConfiguration, fieldManager string, subresource string) (*PriorityLevelConfigurationApplyConfiguration, error) { - b := &PriorityLevelConfigurationApplyConfiguration{} - err := managedfields.ExtractInto(priorityLevelConfiguration, internal.Parser().Type("io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(priorityLevelConfiguration.Name) - - b.WithKind("PriorityLevelConfiguration") - b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1beta3") - return b, nil -} func (b PriorityLevelConfigurationApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationcondition.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationcondition.go index 01695f14481b8..bd14650a93b7a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationcondition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationcondition.go @@ -25,12 +25,22 @@ import ( // PriorityLevelConfigurationConditionApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationCondition type for use // with apply. +// +// PriorityLevelConfigurationCondition defines the condition of priority level. type PriorityLevelConfigurationConditionApplyConfiguration struct { - Type *flowcontrolv1beta3.PriorityLevelConfigurationConditionType `json:"type,omitempty"` - Status *flowcontrolv1beta3.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // `type` is the type of the condition. + // Required. + Type *flowcontrolv1beta3.PriorityLevelConfigurationConditionType `json:"type,omitempty"` + // `status` is the status of the condition. + // Can be True, False, Unknown. + // Required. + Status *flowcontrolv1beta3.ConditionStatus `json:"status,omitempty"` + // `lastTransitionTime` is the last time the condition transitioned from one status to another. + LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` + // `reason` is a unique, one-word, CamelCase reason for the condition's last transition. + Reason *string `json:"reason,omitempty"` + // `message` is a human-readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // PriorityLevelConfigurationConditionApplyConfiguration constructs a declarative configuration of the PriorityLevelConfigurationCondition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationreference.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationreference.go index 566aaa916b1e9..7221983d7d5a2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationreference.go @@ -20,7 +20,11 @@ package v1beta3 // PriorityLevelConfigurationReferenceApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationReference type for use // with apply. +// +// PriorityLevelConfigurationReference contains information that points to the "request-priority" being used. type PriorityLevelConfigurationReferenceApplyConfiguration struct { + // `name` is the name of the priority level configuration being referenced + // Required. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationspec.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationspec.go index c9508547876a0..3e3f107e011e5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationspec.go @@ -24,10 +24,28 @@ import ( // PriorityLevelConfigurationSpecApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationSpec type for use // with apply. +// +// PriorityLevelConfigurationSpec specifies the configuration of a priority level. type PriorityLevelConfigurationSpecApplyConfiguration struct { - Type *flowcontrolv1beta3.PriorityLevelEnablement `json:"type,omitempty"` + // `type` indicates whether this priority level is subject to + // limitation on request execution. A value of `"Exempt"` means + // that requests of this priority level are not subject to a limit + // (and thus are never queued) and do not detract from the + // capacity made available to other priority levels. A value of + // `"Limited"` means that (a) requests of this priority level + // _are_ subject to limits and (b) some of the server's limited + // capacity is made available exclusively to this priority level. + // Required. + Type *flowcontrolv1beta3.PriorityLevelEnablement `json:"type,omitempty"` + // `limited` specifies how requests are handled for a Limited priority level. + // This field must be non-empty if and only if `type` is `"Limited"`. Limited *LimitedPriorityLevelConfigurationApplyConfiguration `json:"limited,omitempty"` - Exempt *ExemptPriorityLevelConfigurationApplyConfiguration `json:"exempt,omitempty"` + // `exempt` specifies how requests are handled for an exempt priority level. + // This field MUST be empty if `type` is `"Limited"`. + // This field MAY be non-empty if `type` is `"Exempt"`. + // If empty and `type` is `"Exempt"` then the default values + // for `ExemptPriorityLevelConfiguration` apply. + Exempt *ExemptPriorityLevelConfigurationApplyConfiguration `json:"exempt,omitempty"` } // PriorityLevelConfigurationSpecApplyConfiguration constructs a declarative configuration of the PriorityLevelConfigurationSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationstatus.go index be2436457eeec..1d5e87a093ef2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/prioritylevelconfigurationstatus.go @@ -20,7 +20,10 @@ package v1beta3 // PriorityLevelConfigurationStatusApplyConfiguration represents a declarative configuration of the PriorityLevelConfigurationStatus type for use // with apply. +// +// PriorityLevelConfigurationStatus represents the current state of a "request-priority". type PriorityLevelConfigurationStatusApplyConfiguration struct { + // `conditions` is the current state of "request-priority". Conditions []PriorityLevelConfigurationConditionApplyConfiguration `json:"conditions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/queuingconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/queuingconfiguration.go index f9a3c6d1a6e39..b73113b631022 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/queuingconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/queuingconfiguration.go @@ -20,9 +20,32 @@ package v1beta3 // QueuingConfigurationApplyConfiguration represents a declarative configuration of the QueuingConfiguration type for use // with apply. +// +// QueuingConfiguration holds the configuration parameters for queuing type QueuingConfigurationApplyConfiguration struct { - Queues *int32 `json:"queues,omitempty"` - HandSize *int32 `json:"handSize,omitempty"` + // `queues` is the number of queues for this priority level. The + // queues exist independently at each apiserver. The value must be + // positive. Setting it to 1 effectively precludes + // shufflesharding and thus makes the distinguisher method of + // associated flow schemas irrelevant. This field has a default + // value of 64. + Queues *int32 `json:"queues,omitempty"` + // `handSize` is a small positive number that configures the + // shuffle sharding of requests into queues. When enqueuing a request + // at this priority level the request's flow identifier (a string + // pair) is hashed and the hash value is used to shuffle the list + // of queues and deal a hand of the size specified here. The + // request is put into one of the shortest queues in that hand. + // `handSize` must be no larger than `queues`, and should be + // significantly smaller (so that a few heavy flows do not + // saturate most of the queues). See the user-facing + // documentation for more extensive guidance on setting this + // field. This field has a default value of 8. + HandSize *int32 `json:"handSize,omitempty"` + // `queueLengthLimit` is the maximum number of requests allowed to + // be waiting in a given queue of this priority level at a time; + // excess requests are rejected. This value must be positive. If + // not specified, it will be defaulted to 50. QueueLengthLimit *int32 `json:"queueLengthLimit,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/resourcepolicyrule.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/resourcepolicyrule.go index e38f711db0a60..572c56e8e0c30 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/resourcepolicyrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/resourcepolicyrule.go @@ -20,12 +20,46 @@ package v1beta3 // ResourcePolicyRuleApplyConfiguration represents a declarative configuration of the ResourcePolicyRule type for use // with apply. +// +// ResourcePolicyRule is a predicate that matches some resource +// requests, testing the request's verb and the target resource. A +// ResourcePolicyRule matches a resource request if and only if: (a) +// at least one member of verbs matches the request, (b) at least one +// member of apiGroups matches the request, (c) at least one member of +// resources matches the request, and (d) either (d1) the request does +// not specify a namespace (i.e., `Namespace==""`) and clusterScope is +// true or (d2) the request specifies a namespace and least one member +// of namespaces matches the request's namespace. type ResourcePolicyRuleApplyConfiguration struct { - Verbs []string `json:"verbs,omitempty"` - APIGroups []string `json:"apiGroups,omitempty"` - Resources []string `json:"resources,omitempty"` - ClusterScope *bool `json:"clusterScope,omitempty"` - Namespaces []string `json:"namespaces,omitempty"` + // `verbs` is a list of matching verbs and may not be empty. + // "*" matches all verbs and, if present, must be the only entry. + // Required. + Verbs []string `json:"verbs,omitempty"` + // `apiGroups` is a list of matching API groups and may not be empty. + // "*" matches all API groups and, if present, must be the only entry. + // Required. + APIGroups []string `json:"apiGroups,omitempty"` + // `resources` is a list of matching resources (i.e., lowercase + // and plural) with, if desired, subresource. For example, [ + // "services", "nodes/status" ]. This list may not be empty. + // "*" matches all resources and, if present, must be the only entry. + // Required. + Resources []string `json:"resources,omitempty"` + // `clusterScope` indicates whether to match requests that do not + // specify a namespace (which happens either because the resource + // is not namespaced or the request targets all namespaces). + // If this field is omitted or false then the `namespaces` field + // must contain a non-empty list. + ClusterScope *bool `json:"clusterScope,omitempty"` + // `namespaces` is a list of target namespaces that restricts + // matches. A request that specifies a target namespace matches + // only if either (a) this list contains that target namespace or + // (b) this list contains "*". Note that "*" matches any + // specified namespace but does not match a request that _does + // not specify_ a namespace (see the `clusterScope` field for + // that). + // This list may be empty, but only if `clusterScope` is true. + Namespaces []string `json:"namespaces,omitempty"` } // ResourcePolicyRuleApplyConfiguration constructs a declarative configuration of the ResourcePolicyRule type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/serviceaccountsubject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/serviceaccountsubject.go index a5ed40c2ae631..a298d9d019600 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/serviceaccountsubject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/serviceaccountsubject.go @@ -20,9 +20,15 @@ package v1beta3 // ServiceAccountSubjectApplyConfiguration represents a declarative configuration of the ServiceAccountSubject type for use // with apply. +// +// ServiceAccountSubject holds detailed information for service-account-kind subject. type ServiceAccountSubjectApplyConfiguration struct { + // `namespace` is the namespace of matching ServiceAccount objects. + // Required. Namespace *string `json:"namespace,omitempty"` - Name *string `json:"name,omitempty"` + // `name` is the name of matching ServiceAccount objects, or "*" to match regardless of name. + // Required. + Name *string `json:"name,omitempty"` } // ServiceAccountSubjectApplyConfiguration constructs a declarative configuration of the ServiceAccountSubject type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/subject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/subject.go index 46499f5418cfd..426c65e6bb16d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/subject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/subject.go @@ -24,10 +24,18 @@ import ( // SubjectApplyConfiguration represents a declarative configuration of the Subject type for use // with apply. +// +// Subject matches the originator of a request, as identified by the request authentication system. There are three +// ways of matching an originator; by user, group, or service account. type SubjectApplyConfiguration struct { - Kind *flowcontrolv1beta3.SubjectKind `json:"kind,omitempty"` - User *UserSubjectApplyConfiguration `json:"user,omitempty"` - Group *GroupSubjectApplyConfiguration `json:"group,omitempty"` + // `kind` indicates which one of the other fields is non-empty. + // Required + Kind *flowcontrolv1beta3.SubjectKind `json:"kind,omitempty"` + // `user` matches based on username. + User *UserSubjectApplyConfiguration `json:"user,omitempty"` + // `group` matches based on user group name. + Group *GroupSubjectApplyConfiguration `json:"group,omitempty"` + // `serviceAccount` matches ServiceAccounts. ServiceAccount *ServiceAccountSubjectApplyConfiguration `json:"serviceAccount,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/usersubject.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/usersubject.go index 7b3ec2ba82473..f17a99cf4f827 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/usersubject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3/usersubject.go @@ -20,7 +20,11 @@ package v1beta3 // UserSubjectApplyConfiguration represents a declarative configuration of the UserSubject type for use // with apply. +// +// UserSubject holds detailed information for user-kind subject. type UserSubjectApplyConfiguration struct { + // `name` is the username that matches, or "*" to match all usernames. + // Required. Name *string `json:"name,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereview.go b/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereview.go index 0d428e06bc0a2..f63c86ceb2079 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereview.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereview.go @@ -29,11 +29,17 @@ import ( // ImageReviewApplyConfiguration represents a declarative configuration of the ImageReview type for use // with apply. +// +// ImageReview checks if the set of images in a pod are allowed. type ImageReviewApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ImageReviewSpecApplyConfiguration `json:"spec,omitempty"` - Status *ImageReviewStatusApplyConfiguration `json:"status,omitempty"` + // Spec holds information about the pod being evaluated + Spec *ImageReviewSpecApplyConfiguration `json:"spec,omitempty"` + // Status is filled in by the backend and indicates whether the pod should be allowed. + Status *ImageReviewStatusApplyConfiguration `json:"status,omitempty"` } // ImageReview constructs a declarative configuration of the ImageReview type for use with @@ -46,6 +52,26 @@ func ImageReview(name string) *ImageReviewApplyConfiguration { return b } +// ExtractImageReviewFrom extracts the applied configuration owned by fieldManager from +// imageReview for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// imageReview must be a unmodified ImageReview API object that was retrieved from the Kubernetes API. +// ExtractImageReviewFrom 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. +func ExtractImageReviewFrom(imageReview *imagepolicyv1alpha1.ImageReview, fieldManager string, subresource string) (*ImageReviewApplyConfiguration, error) { + b := &ImageReviewApplyConfiguration{} + err := managedfields.ExtractInto(imageReview, internal.Parser().Type("io.k8s.api.imagepolicy.v1alpha1.ImageReview"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(imageReview.Name) + + b.WithKind("ImageReview") + b.WithAPIVersion("imagepolicy.k8s.io/v1alpha1") + return b, nil +} + // ExtractImageReview extracts the applied configuration owned by fieldManager from // imageReview. If no managedFields are found in imageReview for fieldManager, a // ImageReviewApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +82,16 @@ func ImageReview(name string) *ImageReviewApplyConfiguration { // ExtractImageReview 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 ExtractImageReview(imageReview *imagepolicyv1alpha1.ImageReview, fieldManager string) (*ImageReviewApplyConfiguration, error) { - return extractImageReview(imageReview, fieldManager, "") + return ExtractImageReviewFrom(imageReview, fieldManager, "") } -// ExtractImageReviewStatus is the same as ExtractImageReview except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractImageReviewStatus extracts the applied configuration owned by fieldManager from +// imageReview for the status subresource. func ExtractImageReviewStatus(imageReview *imagepolicyv1alpha1.ImageReview, fieldManager string) (*ImageReviewApplyConfiguration, error) { - return extractImageReview(imageReview, fieldManager, "status") + return ExtractImageReviewFrom(imageReview, fieldManager, "status") } -func extractImageReview(imageReview *imagepolicyv1alpha1.ImageReview, fieldManager string, subresource string) (*ImageReviewApplyConfiguration, error) { - b := &ImageReviewApplyConfiguration{} - err := managedfields.ExtractInto(imageReview, internal.Parser().Type("io.k8s.api.imagepolicy.v1alpha1.ImageReview"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(imageReview.Name) - - b.WithKind("ImageReview") - b.WithAPIVersion("imagepolicy.k8s.io/v1alpha1") - return b, nil -} func (b ImageReviewApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereviewcontainerspec.go b/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereviewcontainerspec.go index adfdb3258421a..1f0193f031a66 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereviewcontainerspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereviewcontainerspec.go @@ -20,7 +20,10 @@ package v1alpha1 // ImageReviewContainerSpecApplyConfiguration represents a declarative configuration of the ImageReviewContainerSpec type for use // with apply. +// +// ImageReviewContainerSpec is a description of a container within the pod creation request. type ImageReviewContainerSpecApplyConfiguration struct { + // This can be in the form image:tag or image@SHA:012345679abcdef. Image *string `json:"image,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereviewspec.go b/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereviewspec.go index 7efc36a321495..14c6603f5e64e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereviewspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereviewspec.go @@ -20,10 +20,17 @@ package v1alpha1 // ImageReviewSpecApplyConfiguration represents a declarative configuration of the ImageReviewSpec type for use // with apply. +// +// ImageReviewSpec is a description of the pod creation request. type ImageReviewSpecApplyConfiguration struct { - Containers []ImageReviewContainerSpecApplyConfiguration `json:"containers,omitempty"` - Annotations map[string]string `json:"annotations,omitempty"` - Namespace *string `json:"namespace,omitempty"` + // Containers is a list of a subset of the information in each container of the Pod being created. + Containers []ImageReviewContainerSpecApplyConfiguration `json:"containers,omitempty"` + // Annotations is a list of key-value pairs extracted from the Pod's annotations. + // It only includes keys which match the pattern `*.image-policy.k8s.io/*`. + // It is up to each webhook backend to determine how to interpret these annotations, if at all. + Annotations map[string]string `json:"annotations,omitempty"` + // Namespace is the namespace the pod is being created in. + Namespace *string `json:"namespace,omitempty"` } // ImageReviewSpecApplyConfiguration constructs a declarative configuration of the ImageReviewSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereviewstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereviewstatus.go index e26a427e69eab..52828a29c1eda 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereviewstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereviewstatus.go @@ -20,9 +20,19 @@ package v1alpha1 // ImageReviewStatusApplyConfiguration represents a declarative configuration of the ImageReviewStatus type for use // with apply. +// +// ImageReviewStatus is the result of the review for the pod creation request. type ImageReviewStatusApplyConfiguration struct { - Allowed *bool `json:"allowed,omitempty"` - Reason *string `json:"reason,omitempty"` + // Allowed indicates that all images were allowed to be run. + Allowed *bool `json:"allowed,omitempty"` + // Reason should be empty unless Allowed is false in which case it + // may contain a short description of what is wrong. Kubernetes + // may truncate excessively long errors when displaying to the user. + Reason *string `json:"reason,omitempty"` + // AuditAnnotations will be added to the attributes object of the + // admission controller request using 'AddAnnotation'. The keys should + // be prefix-less (i.e., the admission controller will add an + // appropriate prefix). AuditAnnotations map[string]string `json:"auditAnnotations,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/condition.go b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/condition.go index 69063df65b62a..6b0a44312b788 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/condition.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/condition.go @@ -24,13 +24,47 @@ import ( // ConditionApplyConfiguration represents a declarative configuration of the Condition type for use // with apply. +// +// Condition contains details for one aspect of the current state of this API Resource. +// --- +// This struct is intended for direct use as an array at the field path .status.conditions. For example, +// +// type FooStatus struct{ +// // Represents the observations of a foo's current state. +// // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" +// // +patchMergeKey=type +// // +patchStrategy=merge +// // +listType=map +// // +listMapKey=type +// Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` +// +// // other fields +// } type ConditionApplyConfiguration struct { - Type *string `json:"type,omitempty"` - Status *metav1.ConditionStatus `json:"status,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // type of condition in CamelCase or in foo.example.com/CamelCase. + // --- + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + // useful (see .node.status.conditions), the ability to deconflict is important. + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + Type *string `json:"type,omitempty"` + // status of the condition, one of True, False, Unknown. + Status *metav1.ConditionStatus `json:"status,omitempty"` + // observedGeneration represents the .metadata.generation that the condition was set based upon. + // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the instance. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // lastTransitionTime is the last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // reason contains a programmatic identifier indicating the reason for the condition's last transition. + // Producers of specific condition types may define expected values and meanings for this field, + // and whether the values are considered a guaranteed API. + // The value should be a CamelCase string. + // This field may not be empty. + Reason *string `json:"reason,omitempty"` + // message is a human readable message indicating details about the transition. + // This may be an empty string. + Message *string `json:"message,omitempty"` } // ConditionApplyConfiguration constructs a declarative configuration of the Condition type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/deleteoptions.go b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/deleteoptions.go index a872d19cafb8f..ed4c4bfa5075e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/deleteoptions.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/deleteoptions.go @@ -24,14 +24,51 @@ import ( // DeleteOptionsApplyConfiguration represents a declarative configuration of the DeleteOptions type for use // with apply. +// +// DeleteOptions may be provided when deleting an API object. type DeleteOptionsApplyConfiguration struct { - TypeMetaApplyConfiguration `json:",inline"` - GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty"` - Preconditions *PreconditionsApplyConfiguration `json:"preconditions,omitempty"` - OrphanDependents *bool `json:"orphanDependents,omitempty"` - PropagationPolicy *metav1.DeletionPropagation `json:"propagationPolicy,omitempty"` - DryRun []string `json:"dryRun,omitempty"` - IgnoreStoreReadErrorWithClusterBreakingPotential *bool `json:"ignoreStoreReadErrorWithClusterBreakingPotential,omitempty"` + TypeMetaApplyConfiguration `json:",inline"` + // The duration in seconds before the object should be deleted. Value must be non-negative integer. + // The value zero indicates delete immediately. If this value is nil, the default grace period for the + // specified type will be used. + // Defaults to a per object value if not specified. zero means delete immediately. + GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty"` + // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be + // returned. + Preconditions *PreconditionsApplyConfiguration `json:"preconditions,omitempty"` + // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. + // Should the dependent objects be orphaned. If true/false, the "orphan" + // finalizer will be added to/removed from the object's finalizers list. + // Either this field or PropagationPolicy may be set, but not both. + OrphanDependents *bool `json:"orphanDependents,omitempty"` + // Whether and how garbage collection will be performed. + // Either this field or OrphanDependents may be set, but not both. + // The default policy is decided by the existing finalizer set in the + // metadata.finalizers and the resource-specific default policy. + // Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - + // allow the garbage collector to delete the dependents in the background; + // 'Foreground' - a cascading policy that deletes all dependents in the + // foreground. + PropagationPolicy *metav1.DeletionPropagation `json:"propagationPolicy,omitempty"` + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + DryRun []string `json:"dryRun,omitempty"` + // if set to true, it will trigger an unsafe deletion of the resource in + // case the normal deletion flow fails with a corrupt object error. + // A resource is considered corrupt if it can not be retrieved from + // the underlying storage successfully because of a) its data can + // not be transformed e.g. decryption failure, or b) it fails + // to decode into an object. + // NOTE: unsafe deletion ignores finalizer constraints, skips + // precondition checks, and removes the object from the storage. + // WARNING: This may potentially break the cluster if the workload + // associated with the resource being unsafe-deleted relies on normal + // deletion flow. Use only if you REALLY know what you are doing. + // The default value is false, and the user must opt in to enable it + IgnoreStoreReadErrorWithClusterBreakingPotential *bool `json:"ignoreStoreReadErrorWithClusterBreakingPotential,omitempty"` } // DeleteOptionsApplyConfiguration constructs a declarative configuration of the DeleteOptions type for use with @@ -42,6 +79,7 @@ func DeleteOptions() *DeleteOptionsApplyConfiguration { b.WithAPIVersion("meta.k8s.io/v1") return b } + func (b DeleteOptionsApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/labelselector.go b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/labelselector.go index 1f33c94e0c71f..7342725e54cf1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/labelselector.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/labelselector.go @@ -20,8 +20,21 @@ package v1 // LabelSelectorApplyConfiguration represents a declarative configuration of the LabelSelector type for use // with apply. +// +// Note: +// There are two different styles of label selectors used in versioned types: +// an older style which is represented as just a string in versioned types, and a +// newer style that is structured. LabelSelector is an internal representation for the +// latter style. +// A label selector is a label query over a set of resources. The result of matchLabels and +// matchExpressions are ANDed. An empty label selector matches all objects. A null +// label selector matches no objects. type LabelSelectorApplyConfiguration struct { - MatchLabels map[string]string `json:"matchLabels,omitempty"` + // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + // map is equivalent to an element of matchExpressions, whose key field is "key", the + // operator is "In", and the values array contains only "value". The requirements are ANDed. + MatchLabels map[string]string `json:"matchLabels,omitempty"` + // matchExpressions is a list of label selector requirements. The requirements are ANDed. MatchExpressions []LabelSelectorRequirementApplyConfiguration `json:"matchExpressions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/labelselectorrequirement.go b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/labelselectorrequirement.go index c8b015c985272..1403135754274 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/labelselectorrequirement.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/labelselectorrequirement.go @@ -24,10 +24,20 @@ import ( // LabelSelectorRequirementApplyConfiguration represents a declarative configuration of the LabelSelectorRequirement type for use // with apply. +// +// A label selector requirement is a selector that contains values, a key, and an operator that +// relates the key and values. type LabelSelectorRequirementApplyConfiguration struct { - Key *string `json:"key,omitempty"` + // key is the label key that the selector applies to. + Key *string `json:"key,omitempty"` + // operator represents a key's relationship to a set of values. + // Valid operators are In, NotIn, Exists and DoesNotExist. Operator *metav1.LabelSelectorOperator `json:"operator,omitempty"` - Values []string `json:"values,omitempty"` + // values is an array of string values. If the operator is In or NotIn, + // the values array must be non-empty. If the operator is Exists or DoesNotExist, + // the values array must be empty. This array is replaced during a strategic + // merge patch. + Values []string `json:"values,omitempty"` } // LabelSelectorRequirementApplyConfiguration constructs a declarative configuration of the LabelSelectorRequirement type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/managedfieldsentry.go b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/managedfieldsentry.go index 7175537c3e6bc..beb9d5e5b7f2b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/managedfieldsentry.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/managedfieldsentry.go @@ -24,14 +24,39 @@ import ( // ManagedFieldsEntryApplyConfiguration represents a declarative configuration of the ManagedFieldsEntry type for use // with apply. +// +// ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource +// that the fieldset applies to. type ManagedFieldsEntryApplyConfiguration struct { - Manager *string `json:"manager,omitempty"` - Operation *metav1.ManagedFieldsOperationType `json:"operation,omitempty"` - APIVersion *string `json:"apiVersion,omitempty"` - Time *metav1.Time `json:"time,omitempty"` - FieldsType *string `json:"fieldsType,omitempty"` - FieldsV1 *metav1.FieldsV1 `json:"fieldsV1,omitempty"` - Subresource *string `json:"subresource,omitempty"` + // Manager is an identifier of the workflow managing these fields. + Manager *string `json:"manager,omitempty"` + // Operation is the type of operation which lead to this ManagedFieldsEntry being created. + // The only valid values for this field are 'Apply' and 'Update'. + Operation *metav1.ManagedFieldsOperationType `json:"operation,omitempty"` + // APIVersion defines the version of this resource that this field set + // applies to. The format is "group/version" just like the top-level + // APIVersion field. It is necessary to track the version of a field + // set because it cannot be automatically converted. + APIVersion *string `json:"apiVersion,omitempty"` + // Time is the timestamp of when the ManagedFields entry was added. The + // timestamp will also be updated if a field is added, the manager + // changes any of the owned fields value or removes a field. The + // timestamp does not update when a field is removed from the entry + // because another manager took it over. + Time *metav1.Time `json:"time,omitempty"` + // FieldsType is the discriminator for the different fields format and version. + // There is currently only one possible value: "FieldsV1" + FieldsType *string `json:"fieldsType,omitempty"` + // FieldsV1 holds the first JSON version format as described in the "FieldsV1" type. + FieldsV1 *metav1.FieldsV1 `json:"fieldsV1,omitempty"` + // Subresource is the name of the subresource used to update that object, or + // empty string if the object was updated through the main resource. The + // value of this field is used to distinguish between managers, even if they + // share the same name. For example, a status update will be distinct from a + // regular update using the same manager name. + // Note that the APIVersion field is not related to the Subresource field and + // it always corresponds to the version of the main resource. + Subresource *string `json:"subresource,omitempty"` } // ManagedFieldsEntryApplyConfiguration constructs a declarative configuration of the ManagedFieldsEntry type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/objectmeta.go b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/objectmeta.go index 13e1366d78640..fae9d6202bb85 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/objectmeta.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/objectmeta.go @@ -25,20 +25,123 @@ import ( // ObjectMetaApplyConfiguration represents a declarative configuration of the ObjectMeta type for use // with apply. +// +// ObjectMeta is metadata that all persisted resources must have, which includes all objects +// users must create. type ObjectMetaApplyConfiguration struct { - Name *string `json:"name,omitempty"` - GenerateName *string `json:"generateName,omitempty"` - Namespace *string `json:"namespace,omitempty"` - UID *types.UID `json:"uid,omitempty"` - ResourceVersion *string `json:"resourceVersion,omitempty"` - Generation *int64 `json:"generation,omitempty"` - CreationTimestamp *metav1.Time `json:"creationTimestamp,omitempty"` - DeletionTimestamp *metav1.Time `json:"deletionTimestamp,omitempty"` - DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty"` - Labels map[string]string `json:"labels,omitempty"` - Annotations map[string]string `json:"annotations,omitempty"` - OwnerReferences []OwnerReferenceApplyConfiguration `json:"ownerReferences,omitempty"` - Finalizers []string `json:"finalizers,omitempty"` + // Name must be unique within a namespace. Is required when creating resources, although + // some resources may allow a client to request the generation of an appropriate name + // automatically. Name is primarily intended for creation idempotence and configuration + // definition. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + Name *string `json:"name,omitempty"` + // GenerateName is an optional prefix, used by the server, to generate a unique + // name ONLY IF the Name field has not been provided. + // If this field is used, the name returned to the client will be different + // than the name passed. This value will also be combined with a unique suffix. + // The provided value has the same validation rules as the Name field, + // and may be truncated by the length of the suffix required to make the value + // unique on the server. + // + // If this field is specified and the generated name exists, the server will return a 409. + // + // Applied only if Name is not specified. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency + GenerateName *string `json:"generateName,omitempty"` + // Namespace defines the space within which each name must be unique. An empty namespace is + // equivalent to the "default" namespace, but "default" is the canonical representation. + // Not all objects are required to be scoped to a namespace - the value of this field for + // those objects will be empty. + // + // Must be a DNS_LABEL. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces + Namespace *string `json:"namespace,omitempty"` + // UID is the unique in time and space value for this object. It is typically generated by + // the server on successful creation of a resource and is not allowed to change on PUT + // operations. + // + // Populated by the system. + // Read-only. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids + UID *types.UID `json:"uid,omitempty"` + // An opaque value that represents the internal version of this object that can + // be used by clients to determine when objects have changed. May be used for optimistic + // concurrency, change detection, and the watch operation on a resource or set of resources. + // Clients must treat these values as opaque and passed unmodified back to the server. + // They may only be valid for a particular resource or set of resources. + // + // Populated by the system. + // Read-only. + // Value must be treated as opaque by clients and . + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + ResourceVersion *string `json:"resourceVersion,omitempty"` + // A sequence number representing a specific generation of the desired state. + // Populated by the system. Read-only. + Generation *int64 `json:"generation,omitempty"` + // CreationTimestamp is a timestamp representing the server time when this object was + // created. It is not guaranteed to be set in happens-before order across separate operations. + // Clients may not set this value. It is represented in RFC3339 form and is in UTC. + // + // Populated by the system. + // Read-only. + // Null for lists. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + CreationTimestamp *metav1.Time `json:"creationTimestamp,omitempty"` + // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This + // field is set by the server when a graceful deletion is requested by the user, and is not + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field, once the + // finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. + // Once the deletionTimestamp is set, this value may not be unset or be set further into the + // future, although it may be shortened or the resource may be deleted prior to this time. + // For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react + // by sending a graceful termination signal to the containers in the pod. After that 30 seconds, + // the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, + // remove the pod from the API. In the presence of network partitions, this object may still + // exist after this timestamp, until an administrator or automated process can determine the + // resource is fully terminated. + // If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + DeletionTimestamp *metav1.Time `json:"deletionTimestamp,omitempty"` + // Number of seconds allowed for this object to gracefully terminate before + // it will be removed from the system. Only set when deletionTimestamp is also set. + // May only be shortened. + // Read-only. + DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty"` + // Map of string keys and values that can be used to organize and categorize + // (scope and select) objects. May match selectors of replication controllers + // and services. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + Labels map[string]string `json:"labels,omitempty"` + // Annotations is an unstructured key value map stored with a resource that may be + // set by external tools to store and retrieve arbitrary metadata. They are not + // queryable and should be preserved when modifying objects. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations + Annotations map[string]string `json:"annotations,omitempty"` + // List of objects depended by this object. If ALL objects in the list have + // been deleted, this object will be garbage collected. If this object is managed by a controller, + // then an entry in this list will point to this controller, with the controller field set to true. + // There cannot be more than one managing controller. + OwnerReferences []OwnerReferenceApplyConfiguration `json:"ownerReferences,omitempty"` + // Must be empty before the object is deleted from the registry. Each entry + // is an identifier for the responsible component that will remove the entry + // from the list. If the deletionTimestamp of the object is non-nil, entries + // in this list can only be removed. + // Finalizers may be processed and removed in any order. Order is NOT enforced + // because it introduces significant risk of stuck finalizers. + // finalizers is a shared field, any actor with permission can reorder it. + // If the finalizer list is processed in order, then this can lead to a situation + // in which the component responsible for the first finalizer in the list is + // waiting for a signal (field value, external system, or other) produced by a + // component responsible for a finalizer later in the list, resulting in a deadlock. + // Without enforced ordering finalizers are free to order amongst themselves and + // are not vulnerable to ordering changes in the list. + Finalizers []string `json:"finalizers,omitempty"` } // ObjectMetaApplyConfiguration constructs a declarative configuration of the ObjectMeta type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/ownerreference.go b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/ownerreference.go index 2776152322e4c..35501b163166f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/ownerreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/ownerreference.go @@ -24,13 +24,33 @@ import ( // OwnerReferenceApplyConfiguration represents a declarative configuration of the OwnerReference type for use // with apply. +// +// OwnerReference contains enough information to let you identify an owning +// object. An owning object must be in the same namespace as the dependent, or +// be cluster-scoped, so there is no namespace field. type OwnerReferenceApplyConfiguration struct { - APIVersion *string `json:"apiVersion,omitempty"` - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` - UID *types.UID `json:"uid,omitempty"` - Controller *bool `json:"controller,omitempty"` - BlockOwnerDeletion *bool `json:"blockOwnerDeletion,omitempty"` + // API version of the referent. + APIVersion *string `json:"apiVersion,omitempty"` + // Kind of the referent. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `json:"kind,omitempty"` + // Name of the referent. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + Name *string `json:"name,omitempty"` + // UID of the referent. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids + UID *types.UID `json:"uid,omitempty"` + // If true, this reference points to the managing controller. + Controller *bool `json:"controller,omitempty"` + // If true, AND if the owner has the "foregroundDeletion" finalizer, then + // the owner cannot be deleted from the key-value store until this + // reference is removed. + // See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion + // for how the garbage collector interacts with this field and enforces the foreground deletion. + // Defaults to false. + // To set this field, a user needs "delete" permission of the owner, + // otherwise 422 (Unprocessable Entity) will be returned. + BlockOwnerDeletion *bool `json:"blockOwnerDeletion,omitempty"` } // OwnerReferenceApplyConfiguration constructs a declarative configuration of the OwnerReference type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/preconditions.go b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/preconditions.go index 8f8b6c6b3a001..cc4e472682813 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/preconditions.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/preconditions.go @@ -24,9 +24,13 @@ import ( // PreconditionsApplyConfiguration represents a declarative configuration of the Preconditions type for use // with apply. +// +// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. type PreconditionsApplyConfiguration struct { - UID *types.UID `json:"uid,omitempty"` - ResourceVersion *string `json:"resourceVersion,omitempty"` + // Specifies the target UID. + UID *types.UID `json:"uid,omitempty"` + // Specifies the target ResourceVersion + ResourceVersion *string `json:"resourceVersion,omitempty"` } // PreconditionsApplyConfiguration constructs a declarative configuration of the Preconditions type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/typemeta.go b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/typemeta.go index 29a47e44c3e39..feb29e1b98860 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/typemeta.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/typemeta.go @@ -20,8 +20,21 @@ package v1 // TypeMetaApplyConfiguration represents a declarative configuration of the TypeMeta type for use // with apply. +// +// TypeMeta describes an individual object in an API response or request +// with strings representing the type of the object and its API schema version. +// Structures that are versioned or persisted should inline TypeMeta. type TypeMetaApplyConfiguration struct { - Kind *string `json:"kind,omitempty"` + // Kind is a string value representing the REST resource this object represents. + // Servers may infer this from the endpoint the client submits requests to. + // Cannot be updated. + // In CamelCase. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `json:"kind,omitempty"` + // APIVersion defines the versioned schema of this representation of an object. + // Servers should convert recognized schemas to the latest internal value, and + // may reject unrecognized values. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources APIVersion *string `json:"apiVersion,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/httpingresspath.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/httpingresspath.go index 96f9b1f567cc2..e6a0116c76527 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/httpingresspath.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/httpingresspath.go @@ -24,10 +24,33 @@ import ( // HTTPIngressPathApplyConfiguration represents a declarative configuration of the HTTPIngressPath type for use // with apply. +// +// HTTPIngressPath associates a path with a backend. Incoming urls matching the +// path are forwarded to the backend. type HTTPIngressPathApplyConfiguration struct { - Path *string `json:"path,omitempty"` - PathType *networkingv1.PathType `json:"pathType,omitempty"` - Backend *IngressBackendApplyConfiguration `json:"backend,omitempty"` + // path is matched against the path of an incoming request. Currently it can + // contain characters disallowed from the conventional "path" part of a URL + // as defined by RFC 3986. Paths must begin with a '/' and must be present + // when using PathType with value "Exact" or "Prefix". + Path *string `json:"path,omitempty"` + // pathType determines the interpretation of the path matching. PathType can + // be one of the following values: + // * Exact: Matches the URL path exactly. + // * Prefix: Matches based on a URL path prefix split by '/'. Matching is + // done on a path element by element basis. A path element refers is the + // list of labels in the path split by the '/' separator. A request is a + // match for path p if every p is an element-wise prefix of p of the + // request path. Note that if the last element of the path is a substring + // of the last element in request path, it is not a match (e.g. /foo/bar + // matches /foo/bar/baz, but does not match /foo/barbaz). + // * ImplementationSpecific: Interpretation of the Path matching is up to + // the IngressClass. Implementations can treat this as a separate PathType + // or treat it identically to Prefix or Exact path types. + // Implementations are required to support all path types. + PathType *networkingv1.PathType `json:"pathType,omitempty"` + // backend defines the referenced service endpoint to which the traffic + // will be forwarded to. + Backend *IngressBackendApplyConfiguration `json:"backend,omitempty"` } // HTTPIngressPathApplyConfiguration constructs a declarative configuration of the HTTPIngressPath type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/httpingressrulevalue.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/httpingressrulevalue.go index ad9a7a6771600..ff3a476a91f2b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/httpingressrulevalue.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/httpingressrulevalue.go @@ -20,7 +20,14 @@ package v1 // HTTPIngressRuleValueApplyConfiguration represents a declarative configuration of the HTTPIngressRuleValue type for use // with apply. +// +// HTTPIngressRuleValue is a list of http selectors pointing to backends. +// In the example: http:///? -> backend where +// where parts of the url correspond to RFC 3986, this resource will be used +// to match against everything after the last '/' and before the first '?' +// or '#'. type HTTPIngressRuleValueApplyConfiguration struct { + // paths is a collection of paths that map requests to backends. Paths []HTTPIngressPathApplyConfiguration `json:"paths,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingress.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingress.go index 3085e4cf5dfec..e6bb92050b2fb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingress.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingress.go @@ -29,11 +29,22 @@ import ( // IngressApplyConfiguration represents a declarative configuration of the Ingress type for use // with apply. +// +// Ingress is a collection of rules that allow inbound connections to reach the +// endpoints defined by a backend. An Ingress can be configured to give services +// externally-reachable urls, load balance traffic, terminate SSL, offer name +// based virtual hosting etc. type IngressApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *IngressSpecApplyConfiguration `json:"spec,omitempty"` - Status *IngressStatusApplyConfiguration `json:"status,omitempty"` + // spec is the desired state of the Ingress. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *IngressSpecApplyConfiguration `json:"spec,omitempty"` + // status is the current state of the Ingress. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *IngressStatusApplyConfiguration `json:"status,omitempty"` } // Ingress constructs a declarative configuration of the Ingress type for use with @@ -47,6 +58,27 @@ func Ingress(name, namespace string) *IngressApplyConfiguration { return b } +// ExtractIngressFrom extracts the applied configuration owned by fieldManager from +// ingress for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// ingress must be a unmodified Ingress API object that was retrieved from the Kubernetes API. +// ExtractIngressFrom 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. +func ExtractIngressFrom(ingress *networkingv1.Ingress, fieldManager string, subresource string) (*IngressApplyConfiguration, error) { + b := &IngressApplyConfiguration{} + err := managedfields.ExtractInto(ingress, internal.Parser().Type("io.k8s.api.networking.v1.Ingress"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(ingress.Name) + b.WithNamespace(ingress.Namespace) + + b.WithKind("Ingress") + b.WithAPIVersion("networking.k8s.io/v1") + return b, nil +} + // ExtractIngress extracts the applied configuration owned by fieldManager from // ingress. If no managedFields are found in ingress for fieldManager, a // IngressApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +89,16 @@ func Ingress(name, namespace string) *IngressApplyConfiguration { // ExtractIngress 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 ExtractIngress(ingress *networkingv1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) { - return extractIngress(ingress, fieldManager, "") + return ExtractIngressFrom(ingress, fieldManager, "") } -// ExtractIngressStatus is the same as ExtractIngress except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractIngressStatus extracts the applied configuration owned by fieldManager from +// ingress for the status subresource. func ExtractIngressStatus(ingress *networkingv1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) { - return extractIngress(ingress, fieldManager, "status") + return ExtractIngressFrom(ingress, fieldManager, "status") } -func extractIngress(ingress *networkingv1.Ingress, fieldManager string, subresource string) (*IngressApplyConfiguration, error) { - b := &IngressApplyConfiguration{} - err := managedfields.ExtractInto(ingress, internal.Parser().Type("io.k8s.api.networking.v1.Ingress"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(ingress.Name) - b.WithNamespace(ingress.Namespace) - - b.WithKind("Ingress") - b.WithAPIVersion("networking.k8s.io/v1") - return b, nil -} func (b IngressApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressbackend.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressbackend.go index b014b7beefa95..4c7f6bfe368fb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressbackend.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressbackend.go @@ -24,8 +24,16 @@ import ( // IngressBackendApplyConfiguration represents a declarative configuration of the IngressBackend type for use // with apply. +// +// IngressBackend describes all endpoints for a given service and port. type IngressBackendApplyConfiguration struct { - Service *IngressServiceBackendApplyConfiguration `json:"service,omitempty"` + // service references a service as a backend. + // This is a mutually exclusive setting with "Resource". + Service *IngressServiceBackendApplyConfiguration `json:"service,omitempty"` + // resource is an ObjectRef to another Kubernetes resource in the namespace + // of the Ingress object. If resource is specified, a service.Name and + // service.Port must not be specified. + // This is a mutually exclusive setting with "Service". Resource *corev1.TypedLocalObjectReferenceApplyConfiguration `json:"resource,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressclass.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressclass.go index a03b9127189d0..387e45728bd7f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressclass.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressclass.go @@ -29,10 +29,20 @@ import ( // IngressClassApplyConfiguration represents a declarative configuration of the IngressClass type for use // with apply. +// +// IngressClass represents the class of the Ingress, referenced by the Ingress +// Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be +// used to indicate that an IngressClass should be considered default. When a +// single IngressClass resource has this annotation set to true, new Ingress +// resources without a class specified will be assigned this default class. type IngressClassApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *IngressClassSpecApplyConfiguration `json:"spec,omitempty"` + // spec is the desired state of the IngressClass. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *IngressClassSpecApplyConfiguration `json:"spec,omitempty"` } // IngressClass constructs a declarative configuration of the IngressClass type for use with @@ -45,29 +55,14 @@ func IngressClass(name string) *IngressClassApplyConfiguration { return b } -// ExtractIngressClass extracts the applied configuration owned by fieldManager from -// ingressClass. If no managedFields are found in ingressClass for fieldManager, a -// IngressClassApplyConfiguration 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. +// ExtractIngressClassFrom extracts the applied configuration owned by fieldManager from +// ingressClass for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // ingressClass must be a unmodified IngressClass API object that was retrieved from the Kubernetes API. -// ExtractIngressClass provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractIngressClassFrom 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 ExtractIngressClass(ingressClass *networkingv1.IngressClass, fieldManager string) (*IngressClassApplyConfiguration, error) { - return extractIngressClass(ingressClass, fieldManager, "") -} - -// ExtractIngressClassStatus is the same as ExtractIngressClass except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractIngressClassStatus(ingressClass *networkingv1.IngressClass, fieldManager string) (*IngressClassApplyConfiguration, error) { - return extractIngressClass(ingressClass, fieldManager, "status") -} - -func extractIngressClass(ingressClass *networkingv1.IngressClass, fieldManager string, subresource string) (*IngressClassApplyConfiguration, error) { +func ExtractIngressClassFrom(ingressClass *networkingv1.IngressClass, fieldManager string, subresource string) (*IngressClassApplyConfiguration, error) { b := &IngressClassApplyConfiguration{} err := managedfields.ExtractInto(ingressClass, internal.Parser().Type("io.k8s.api.networking.v1.IngressClass"), fieldManager, b, subresource) if err != nil { @@ -79,6 +74,21 @@ func extractIngressClass(ingressClass *networkingv1.IngressClass, fieldManager s b.WithAPIVersion("networking.k8s.io/v1") return b, nil } + +// ExtractIngressClass extracts the applied configuration owned by fieldManager from +// ingressClass. If no managedFields are found in ingressClass for fieldManager, a +// IngressClassApplyConfiguration 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. +// ingressClass must be a unmodified IngressClass API object that was retrieved from the Kubernetes API. +// ExtractIngressClass 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. +func ExtractIngressClass(ingressClass *networkingv1.IngressClass, fieldManager string) (*IngressClassApplyConfiguration, error) { + return ExtractIngressClassFrom(ingressClass, fieldManager, "") +} + func (b IngressClassApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressclassparametersreference.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressclassparametersreference.go index 0dba1ebc5dd04..6be74dfb48bb2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressclassparametersreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressclassparametersreference.go @@ -20,11 +20,24 @@ package v1 // IngressClassParametersReferenceApplyConfiguration represents a declarative configuration of the IngressClassParametersReference type for use // with apply. +// +// IngressClassParametersReference identifies an API object. This can be used +// to specify a cluster or namespace-scoped resource. type IngressClassParametersReferenceApplyConfiguration struct { - APIGroup *string `json:"apiGroup,omitempty"` - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` - Scope *string `json:"scope,omitempty"` + // apiGroup is the group for the resource being referenced. If APIGroup is + // not specified, the specified Kind must be in the core API group. For any + // other third-party types, APIGroup is required. + APIGroup *string `json:"apiGroup,omitempty"` + // kind is the type of resource being referenced. + Kind *string `json:"kind,omitempty"` + // name is the name of resource being referenced. + Name *string `json:"name,omitempty"` + // scope represents if this refers to a cluster or namespace scoped resource. + // This may be set to "Cluster" (default) or "Namespace". + Scope *string `json:"scope,omitempty"` + // namespace is the namespace of the resource being referenced. This field is + // required when scope is set to "Namespace" and must be unset when scope is set to + // "Cluster". Namespace *string `json:"namespace,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressclassspec.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressclassspec.go index 23e8484344915..9dda6ae6e01c8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressclassspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressclassspec.go @@ -20,8 +20,19 @@ package v1 // IngressClassSpecApplyConfiguration represents a declarative configuration of the IngressClassSpec type for use // with apply. +// +// IngressClassSpec provides information about the class of an Ingress. type IngressClassSpecApplyConfiguration struct { - Controller *string `json:"controller,omitempty"` + // controller refers to the name of the controller that should handle this + // class. This allows for different "flavors" that are controlled by the + // same controller. For example, you may have different parameters for the + // same implementing controller. This should be specified as a + // domain-prefixed path no more than 250 characters in length, e.g. + // "acme.io/ingress-controller". This field is immutable. + Controller *string `json:"controller,omitempty"` + // parameters is a link to a custom resource containing additional + // configuration for the controller. This is optional if the controller does + // not require extra parameters. Parameters *IngressClassParametersReferenceApplyConfiguration `json:"parameters,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressloadbalanceringress.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressloadbalanceringress.go index d0feb44da45ad..2ebbad3623545 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressloadbalanceringress.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressloadbalanceringress.go @@ -20,10 +20,15 @@ package v1 // IngressLoadBalancerIngressApplyConfiguration represents a declarative configuration of the IngressLoadBalancerIngress type for use // with apply. +// +// IngressLoadBalancerIngress represents the status of a load-balancer ingress point. type IngressLoadBalancerIngressApplyConfiguration struct { - IP *string `json:"ip,omitempty"` - Hostname *string `json:"hostname,omitempty"` - Ports []IngressPortStatusApplyConfiguration `json:"ports,omitempty"` + // ip is set for load-balancer ingress points that are IP based. + IP *string `json:"ip,omitempty"` + // hostname is set for load-balancer ingress points that are DNS based. + Hostname *string `json:"hostname,omitempty"` + // ports provides information about the ports exposed by this LoadBalancer. + Ports []IngressPortStatusApplyConfiguration `json:"ports,omitempty"` } // IngressLoadBalancerIngressApplyConfiguration constructs a declarative configuration of the IngressLoadBalancerIngress type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressloadbalancerstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressloadbalancerstatus.go index 08c841f06bc97..393daf1f4d298 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressloadbalancerstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressloadbalancerstatus.go @@ -20,7 +20,10 @@ package v1 // IngressLoadBalancerStatusApplyConfiguration represents a declarative configuration of the IngressLoadBalancerStatus type for use // with apply. +// +// IngressLoadBalancerStatus represents the status of a load-balancer. type IngressLoadBalancerStatusApplyConfiguration struct { + // ingress is a list containing ingress points for the load-balancer. Ingress []IngressLoadBalancerIngressApplyConfiguration `json:"ingress,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressportstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressportstatus.go index 84ba243ab97c4..ad9e977ad5d8b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressportstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressportstatus.go @@ -24,10 +24,23 @@ import ( // IngressPortStatusApplyConfiguration represents a declarative configuration of the IngressPortStatus type for use // with apply. +// +// IngressPortStatus represents the error condition of a service port type IngressPortStatusApplyConfiguration struct { - Port *int32 `json:"port,omitempty"` + // port is the port number of the ingress port. + Port *int32 `json:"port,omitempty"` + // protocol is the protocol of the ingress port. + // The supported values are: "TCP", "UDP", "SCTP" Protocol *corev1.Protocol `json:"protocol,omitempty"` - Error *string `json:"error,omitempty"` + // error is to record the problem with the service port + // The format of the error shall comply with the following rules: + // - built-in error values shall be specified in this file and those shall use + // CamelCase names + // - cloud provider specific error values must have names that comply with the + // format foo.example.com/CamelCase. + // --- + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + Error *string `json:"error,omitempty"` } // IngressPortStatusApplyConfiguration constructs a declarative configuration of the IngressPortStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressrule.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressrule.go index 20a1816bf1300..e77494d8699ed 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressrule.go @@ -20,8 +20,39 @@ package v1 // IngressRuleApplyConfiguration represents a declarative configuration of the IngressRule type for use // with apply. +// +// IngressRule represents the rules mapping the paths under a specified host to +// the related backend services. Incoming requests are first evaluated for a host +// match, then routed to the backend associated with the matching IngressRuleValue. type IngressRuleApplyConfiguration struct { - Host *string `json:"host,omitempty"` + // host is the fully qualified domain name of a network host, as defined by RFC 3986. + // Note the following deviations from the "host" part of the + // URI as defined in RFC 3986: + // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to + // the IP in the Spec of the parent Ingress. + // 2. The `:` delimiter is not respected because ports are not allowed. + // Currently the port of an Ingress is implicitly :80 for http and + // :443 for https. + // Both these may change in the future. + // Incoming requests are matched against the host before the + // IngressRuleValue. If the host is unspecified, the Ingress routes all + // traffic based on the specified IngressRuleValue. + // + // host can be "precise" which is a domain name without the terminating dot of + // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name + // prefixed with a single wildcard label (e.g. "*.foo.com"). + // The wildcard character '*' must appear by itself as the first DNS label and + // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*"). + // Requests will be matched against the Host field in the following way: + // 1. If host is precise, the request matches this rule if the http host header is equal to Host. + // 2. If host is a wildcard, then the request matches this rule if the http host header + // is to equal to the suffix (removing the first label) of the wildcard rule. + Host *string `json:"host,omitempty"` + // IngressRuleValue represents a rule to route requests for this IngressRule. + // If unspecified, the rule defaults to a http catch-all. Whether that sends + // just traffic matching the host to the default backend or all traffic to the + // default backend, is left to the controller fulfilling the Ingress. Http is + // currently the only supported IngressRuleValue. IngressRuleValueApplyConfiguration `json:",inline"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressrulevalue.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressrulevalue.go index 1e13e378be9a9..c1ca4853e2d87 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressrulevalue.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressrulevalue.go @@ -20,6 +20,11 @@ package v1 // IngressRuleValueApplyConfiguration represents a declarative configuration of the IngressRuleValue type for use // with apply. +// +// IngressRuleValue represents a rule to apply against incoming requests. If the +// rule is satisfied, the request is routed to the specified backend. Currently +// mixing different types of rules in a single Ingress is disallowed, so exactly +// one of the following must be set. type IngressRuleValueApplyConfiguration struct { HTTP *HTTPIngressRuleValueApplyConfiguration `json:"http,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressservicebackend.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressservicebackend.go index 07876afd17ed7..bc48a6e02443e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressservicebackend.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressservicebackend.go @@ -20,8 +20,14 @@ package v1 // IngressServiceBackendApplyConfiguration represents a declarative configuration of the IngressServiceBackend type for use // with apply. +// +// IngressServiceBackend references a Kubernetes Service as a Backend. type IngressServiceBackendApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // name is the referenced service. The service must exist in + // the same namespace as the Ingress object. + Name *string `json:"name,omitempty"` + // port of the referenced service. A port name or port number + // is required for a IngressServiceBackend. Port *ServiceBackendPortApplyConfiguration `json:"port,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressspec.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressspec.go index 0572153aa1b1b..67b1ac4d9eaf4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressspec.go @@ -20,11 +20,34 @@ package v1 // IngressSpecApplyConfiguration represents a declarative configuration of the IngressSpec type for use // with apply. +// +// IngressSpec describes the Ingress the user wishes to exist. type IngressSpecApplyConfiguration struct { - IngressClassName *string `json:"ingressClassName,omitempty"` - DefaultBackend *IngressBackendApplyConfiguration `json:"defaultBackend,omitempty"` - TLS []IngressTLSApplyConfiguration `json:"tls,omitempty"` - Rules []IngressRuleApplyConfiguration `json:"rules,omitempty"` + // ingressClassName is the name of an IngressClass cluster resource. Ingress + // controller implementations use this field to know whether they should be + // serving this Ingress resource, by a transitive connection + // (controller -> IngressClass -> Ingress resource). Although the + // `kubernetes.io/ingress.class` annotation (simple constant name) was never + // formally defined, it was widely supported by Ingress controllers to create + // a direct binding between Ingress controller and Ingress resources. Newly + // created Ingress resources should prefer using the field. However, even + // though the annotation is officially deprecated, for backwards compatibility + // reasons, ingress controllers should still honor that annotation if present. + IngressClassName *string `json:"ingressClassName,omitempty"` + // defaultBackend is the backend that should handle requests that don't + // match any rule. If Rules are not specified, DefaultBackend must be specified. + // If DefaultBackend is not set, the handling of requests that do not match any + // of the rules will be up to the Ingress controller. + DefaultBackend *IngressBackendApplyConfiguration `json:"defaultBackend,omitempty"` + // tls represents the TLS configuration. Currently the Ingress only supports a + // single TLS port, 443. If multiple members of this list specify different hosts, + // they will be multiplexed on the same port according to the hostname specified + // through the SNI TLS extension, if the ingress controller fulfilling the + // ingress supports SNI. + TLS []IngressTLSApplyConfiguration `json:"tls,omitempty"` + // rules is a list of host rules used to configure the Ingress. If unspecified, + // or no rule matches, all traffic is sent to the default backend. + Rules []IngressRuleApplyConfiguration `json:"rules,omitempty"` } // IngressSpecApplyConfiguration constructs a declarative configuration of the IngressSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressstatus.go index bd1327c93f12e..1df2804bf2801 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressstatus.go @@ -20,7 +20,10 @@ package v1 // IngressStatusApplyConfiguration represents a declarative configuration of the IngressStatus type for use // with apply. +// +// IngressStatus describe the current state of the Ingress. type IngressStatusApplyConfiguration struct { + // loadBalancer contains the current status of the load-balancer. LoadBalancer *IngressLoadBalancerStatusApplyConfiguration `json:"loadBalancer,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingresstls.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingresstls.go index 44092503f92b8..07b403b706138 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingresstls.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingresstls.go @@ -20,9 +20,20 @@ package v1 // IngressTLSApplyConfiguration represents a declarative configuration of the IngressTLS type for use // with apply. +// +// IngressTLS describes the transport layer security associated with an ingress. type IngressTLSApplyConfiguration struct { - Hosts []string `json:"hosts,omitempty"` - SecretName *string `json:"secretName,omitempty"` + // hosts is a list of hosts included in the TLS certificate. The values in + // this list must match the name/s used in the tlsSecret. Defaults to the + // wildcard host setting for the loadbalancer controller fulfilling this + // Ingress, if left unspecified. + Hosts []string `json:"hosts,omitempty"` + // secretName is the name of the secret used to terminate TLS traffic on + // port 443. Field is left optional to allow TLS routing based on SNI + // hostname alone. If the SNI host in a listener conflicts with the "Host" + // header field used by an IngressRule, the SNI host is used for termination + // and value of the "Host" header is used for routing. + SecretName *string `json:"secretName,omitempty"` } // IngressTLSApplyConfiguration constructs a declarative configuration of the IngressTLS type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ipaddress.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ipaddress.go index a5407dbc73cae..c0e4298aa35e9 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ipaddress.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ipaddress.go @@ -29,10 +29,22 @@ import ( // IPAddressApplyConfiguration represents a declarative configuration of the IPAddress type for use // with apply. +// +// IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs +// that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. +// An IP address can be represented in different formats, to guarantee the uniqueness of the IP, +// the name of the object is the IP address in canonical format, four decimal digits separated +// by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. +// Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 +// Invalid: 10.01.2.3 or 2001:db8:0:0:0::1 type IPAddressApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *IPAddressSpecApplyConfiguration `json:"spec,omitempty"` + // spec is the desired state of the IPAddress. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *IPAddressSpecApplyConfiguration `json:"spec,omitempty"` } // IPAddress constructs a declarative configuration of the IPAddress type for use with @@ -45,29 +57,14 @@ func IPAddress(name string) *IPAddressApplyConfiguration { return b } -// ExtractIPAddress extracts the applied configuration owned by fieldManager from -// iPAddress. If no managedFields are found in iPAddress for fieldManager, a -// IPAddressApplyConfiguration 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. +// ExtractIPAddressFrom extracts the applied configuration owned by fieldManager from +// iPAddress for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // iPAddress must be a unmodified IPAddress API object that was retrieved from the Kubernetes API. -// ExtractIPAddress provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractIPAddressFrom 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 ExtractIPAddress(iPAddress *networkingv1.IPAddress, fieldManager string) (*IPAddressApplyConfiguration, error) { - return extractIPAddress(iPAddress, fieldManager, "") -} - -// ExtractIPAddressStatus is the same as ExtractIPAddress except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractIPAddressStatus(iPAddress *networkingv1.IPAddress, fieldManager string) (*IPAddressApplyConfiguration, error) { - return extractIPAddress(iPAddress, fieldManager, "status") -} - -func extractIPAddress(iPAddress *networkingv1.IPAddress, fieldManager string, subresource string) (*IPAddressApplyConfiguration, error) { +func ExtractIPAddressFrom(iPAddress *networkingv1.IPAddress, fieldManager string, subresource string) (*IPAddressApplyConfiguration, error) { b := &IPAddressApplyConfiguration{} err := managedfields.ExtractInto(iPAddress, internal.Parser().Type("io.k8s.api.networking.v1.IPAddress"), fieldManager, b, subresource) if err != nil { @@ -79,6 +76,21 @@ func extractIPAddress(iPAddress *networkingv1.IPAddress, fieldManager string, su b.WithAPIVersion("networking.k8s.io/v1") return b, nil } + +// ExtractIPAddress extracts the applied configuration owned by fieldManager from +// iPAddress. If no managedFields are found in iPAddress for fieldManager, a +// IPAddressApplyConfiguration 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. +// iPAddress must be a unmodified IPAddress API object that was retrieved from the Kubernetes API. +// ExtractIPAddress 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. +func ExtractIPAddress(iPAddress *networkingv1.IPAddress, fieldManager string) (*IPAddressApplyConfiguration, error) { + return ExtractIPAddressFrom(iPAddress, fieldManager, "") +} + func (b IPAddressApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ipaddressspec.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ipaddressspec.go index bac6e7912f73f..e9dce93b64383 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ipaddressspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ipaddressspec.go @@ -20,7 +20,11 @@ package v1 // IPAddressSpecApplyConfiguration represents a declarative configuration of the IPAddressSpec type for use // with apply. +// +// IPAddressSpec describe the attributes in an IP Address. type IPAddressSpecApplyConfiguration struct { + // ParentRef references the resource that an IPAddress is attached to. + // An IPAddress must reference a parent object. ParentRef *ParentReferenceApplyConfiguration `json:"parentRef,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ipblock.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ipblock.go index f3447a8f10b33..95bc99f0ce58b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ipblock.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ipblock.go @@ -20,8 +20,17 @@ package v1 // IPBlockApplyConfiguration represents a declarative configuration of the IPBlock type for use // with apply. +// +// IPBlock describes a particular CIDR (Ex. "192.168.1.0/24","2001:db8::/64") that is allowed +// to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs +// that should not be included within this rule. type IPBlockApplyConfiguration struct { - CIDR *string `json:"cidr,omitempty"` + // cidr is a string representing the IPBlock + // Valid examples are "192.168.1.0/24" or "2001:db8::/64" + CIDR *string `json:"cidr,omitempty"` + // except is a slice of CIDRs that should not be included within an IPBlock + // Valid examples are "192.168.1.0/24" or "2001:db8::/64" + // Except values will be rejected if they are outside the cidr range Except []string `json:"except,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicy.go index 6c6a76e8bfb6b..f3e1e1e5ed77a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicy.go @@ -29,10 +29,15 @@ import ( // NetworkPolicyApplyConfiguration represents a declarative configuration of the NetworkPolicy type for use // with apply. +// +// NetworkPolicy describes what network traffic is allowed for a set of Pods type NetworkPolicyApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"` + // spec represents the specification of the desired behavior for this NetworkPolicy. + Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"` } // NetworkPolicy constructs a declarative configuration of the NetworkPolicy type for use with @@ -46,29 +51,14 @@ func NetworkPolicy(name, namespace string) *NetworkPolicyApplyConfiguration { return b } -// ExtractNetworkPolicy extracts the applied configuration owned by fieldManager from -// networkPolicy. If no managedFields are found in networkPolicy for fieldManager, a -// NetworkPolicyApplyConfiguration 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. +// ExtractNetworkPolicyFrom extracts the applied configuration owned by fieldManager from +// networkPolicy for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // networkPolicy must be a unmodified NetworkPolicy API object that was retrieved from the Kubernetes API. -// ExtractNetworkPolicy provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractNetworkPolicyFrom 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 ExtractNetworkPolicy(networkPolicy *networkingv1.NetworkPolicy, fieldManager string) (*NetworkPolicyApplyConfiguration, error) { - return extractNetworkPolicy(networkPolicy, fieldManager, "") -} - -// ExtractNetworkPolicyStatus is the same as ExtractNetworkPolicy except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractNetworkPolicyStatus(networkPolicy *networkingv1.NetworkPolicy, fieldManager string) (*NetworkPolicyApplyConfiguration, error) { - return extractNetworkPolicy(networkPolicy, fieldManager, "status") -} - -func extractNetworkPolicy(networkPolicy *networkingv1.NetworkPolicy, fieldManager string, subresource string) (*NetworkPolicyApplyConfiguration, error) { +func ExtractNetworkPolicyFrom(networkPolicy *networkingv1.NetworkPolicy, fieldManager string, subresource string) (*NetworkPolicyApplyConfiguration, error) { b := &NetworkPolicyApplyConfiguration{} err := managedfields.ExtractInto(networkPolicy, internal.Parser().Type("io.k8s.api.networking.v1.NetworkPolicy"), fieldManager, b, subresource) if err != nil { @@ -81,6 +71,21 @@ func extractNetworkPolicy(networkPolicy *networkingv1.NetworkPolicy, fieldManage b.WithAPIVersion("networking.k8s.io/v1") return b, nil } + +// ExtractNetworkPolicy extracts the applied configuration owned by fieldManager from +// networkPolicy. If no managedFields are found in networkPolicy for fieldManager, a +// NetworkPolicyApplyConfiguration 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. +// networkPolicy must be a unmodified NetworkPolicy API object that was retrieved from the Kubernetes API. +// ExtractNetworkPolicy 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. +func ExtractNetworkPolicy(networkPolicy *networkingv1.NetworkPolicy, fieldManager string) (*NetworkPolicyApplyConfiguration, error) { + return ExtractNetworkPolicyFrom(networkPolicy, fieldManager, "") +} + func (b NetworkPolicyApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyegressrule.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyegressrule.go index 46e2706eceb40..694c148cd99a4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyegressrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyegressrule.go @@ -20,9 +20,23 @@ package v1 // NetworkPolicyEgressRuleApplyConfiguration represents a declarative configuration of the NetworkPolicyEgressRule type for use // with apply. +// +// NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods +// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. +// This type is beta-level in 1.8 type NetworkPolicyEgressRuleApplyConfiguration struct { + // ports is a list of destination ports for outgoing traffic. + // Each item in this list is combined using a logical OR. If this field is + // empty or missing, this rule matches all ports (traffic not restricted by port). + // If this field is present and contains at least one item, then this rule allows + // traffic only if the traffic matches at least one port in the list. Ports []NetworkPolicyPortApplyConfiguration `json:"ports,omitempty"` - To []NetworkPolicyPeerApplyConfiguration `json:"to,omitempty"` + // to is a list of destinations for outgoing traffic of pods selected for this rule. + // Items in this list are combined using a logical OR operation. If this field is + // empty or missing, this rule matches all destinations (traffic not restricted by + // destination). If this field is present and contains at least one item, this rule + // allows traffic only if the traffic matches at least one item in the to list. + To []NetworkPolicyPeerApplyConfiguration `json:"to,omitempty"` } // NetworkPolicyEgressRuleApplyConfiguration constructs a declarative configuration of the NetworkPolicyEgressRule type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyingressrule.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyingressrule.go index 6e9875978690f..a597f92eeffa9 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyingressrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyingressrule.go @@ -20,9 +20,22 @@ package v1 // NetworkPolicyIngressRuleApplyConfiguration represents a declarative configuration of the NetworkPolicyIngressRule type for use // with apply. +// +// NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods +// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from. type NetworkPolicyIngressRuleApplyConfiguration struct { + // ports is a list of ports which should be made accessible on the pods selected for + // this rule. Each item in this list is combined using a logical OR. If this field is + // empty or missing, this rule matches all ports (traffic not restricted by port). + // If this field is present and contains at least one item, then this rule allows + // traffic only if the traffic matches at least one port in the list. Ports []NetworkPolicyPortApplyConfiguration `json:"ports,omitempty"` - From []NetworkPolicyPeerApplyConfiguration `json:"from,omitempty"` + // from is a list of sources which should be able to access the pods selected for this rule. + // Items in this list are combined using a logical OR operation. If this field is + // empty or missing, this rule matches all sources (traffic not restricted by + // source). If this field is present and contains at least one item, this rule + // allows traffic only if the traffic matches at least one item in the from list. + From []NetworkPolicyPeerApplyConfiguration `json:"from,omitempty"` } // NetworkPolicyIngressRuleApplyConfiguration constructs a declarative configuration of the NetworkPolicyIngressRule type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicypeer.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicypeer.go index 716ceeeefb729..c16fbf07afa90 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicypeer.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicypeer.go @@ -24,10 +24,27 @@ import ( // NetworkPolicyPeerApplyConfiguration represents a declarative configuration of the NetworkPolicyPeer type for use // with apply. +// +// NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of +// fields are allowed type NetworkPolicyPeerApplyConfiguration struct { - PodSelector *metav1.LabelSelectorApplyConfiguration `json:"podSelector,omitempty"` + // podSelector is a label selector which selects pods. This field follows standard label + // selector semantics; if present but empty, it selects all pods. + // + // If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects + // the pods matching podSelector in the Namespaces selected by NamespaceSelector. + // Otherwise it selects the pods matching podSelector in the policy's own namespace. + PodSelector *metav1.LabelSelectorApplyConfiguration `json:"podSelector,omitempty"` + // namespaceSelector selects namespaces using cluster-scoped labels. This field follows + // standard label selector semantics; if present but empty, it selects all namespaces. + // + // If podSelector is also set, then the NetworkPolicyPeer as a whole selects + // the pods matching podSelector in the namespaces selected by namespaceSelector. + // Otherwise it selects all pods in the namespaces selected by namespaceSelector. NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` - IPBlock *IPBlockApplyConfiguration `json:"ipBlock,omitempty"` + // ipBlock defines policy on a particular IPBlock. If this field is set then + // neither of the other fields can be. + IPBlock *IPBlockApplyConfiguration `json:"ipBlock,omitempty"` } // NetworkPolicyPeerApplyConfiguration constructs a declarative configuration of the NetworkPolicyPeer type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyport.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyport.go index 2ded0aecf69d4..483a0f95b781d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyport.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyport.go @@ -25,10 +25,22 @@ import ( // NetworkPolicyPortApplyConfiguration represents a declarative configuration of the NetworkPolicyPort type for use // with apply. +// +// NetworkPolicyPort describes a port to allow traffic on type NetworkPolicyPortApplyConfiguration struct { - Protocol *corev1.Protocol `json:"protocol,omitempty"` - Port *intstr.IntOrString `json:"port,omitempty"` - EndPort *int32 `json:"endPort,omitempty"` + // protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. + // If not specified, this field defaults to TCP. + Protocol *corev1.Protocol `json:"protocol,omitempty"` + // port represents the port on the given protocol. This can either be a numerical or named + // port on a pod. If this field is not provided, this matches all port names and + // numbers. + // If present, only traffic on the specified protocol AND port will be matched. + Port *intstr.IntOrString `json:"port,omitempty"` + // endPort indicates that the range of ports from port to endPort if set, inclusive, + // should be allowed by the policy. This field cannot be defined if the port field + // is not defined or if the port field is defined as a named (string) port. + // The endPort must be equal or greater than port. + EndPort *int32 `json:"endPort,omitempty"` } // NetworkPolicyPortApplyConfiguration constructs a declarative configuration of the NetworkPolicyPort type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyspec.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyspec.go index 48369b921ca93..734c238e4b0a3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicyspec.go @@ -25,11 +25,43 @@ import ( // NetworkPolicySpecApplyConfiguration represents a declarative configuration of the NetworkPolicySpec type for use // with apply. +// +// NetworkPolicySpec provides the specification of a NetworkPolicy type NetworkPolicySpecApplyConfiguration struct { - PodSelector *metav1.LabelSelectorApplyConfiguration `json:"podSelector,omitempty"` - Ingress []NetworkPolicyIngressRuleApplyConfiguration `json:"ingress,omitempty"` - Egress []NetworkPolicyEgressRuleApplyConfiguration `json:"egress,omitempty"` - PolicyTypes []networkingv1.PolicyType `json:"policyTypes,omitempty"` + // podSelector selects the pods to which this NetworkPolicy object applies. + // The array of rules is applied to any pods selected by this field. An empty + // selector matches all pods in the policy's namespace. + // Multiple network policies can select the same set of pods. In this case, + // the ingress rules for each are combined additively. + // This field is optional. If it is not specified, it defaults to an empty selector. + PodSelector *metav1.LabelSelectorApplyConfiguration `json:"podSelector,omitempty"` + // ingress is a list of ingress rules to be applied to the selected pods. + // Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod + // (and cluster policy otherwise allows the traffic), OR if the traffic source is + // the pod's local node, OR if the traffic matches at least one ingress rule + // across all of the NetworkPolicy objects whose podSelector matches the pod. If + // this field is empty then this NetworkPolicy does not allow any traffic (and serves + // solely to ensure that the pods it selects are isolated by default) + Ingress []NetworkPolicyIngressRuleApplyConfiguration `json:"ingress,omitempty"` + // egress is a list of egress rules to be applied to the selected pods. Outgoing traffic + // is allowed if there are no NetworkPolicies selecting the pod (and cluster policy + // otherwise allows the traffic), OR if the traffic matches at least one egress rule + // across all of the NetworkPolicy objects whose podSelector matches the pod. If + // this field is empty then this NetworkPolicy limits all outgoing traffic (and serves + // solely to ensure that the pods it selects are isolated by default). + // This field is beta-level in 1.8 + Egress []NetworkPolicyEgressRuleApplyConfiguration `json:"egress,omitempty"` + // policyTypes is a list of rule types that the NetworkPolicy relates to. + // Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. + // If this field is not specified, it will default based on the existence of ingress or egress rules; + // policies that contain an egress section are assumed to affect egress, and all policies + // (whether or not they contain an ingress section) are assumed to affect ingress. + // If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. + // Likewise, if you want to write a policy that specifies that no egress is allowed, + // you must specify a policyTypes value that include "Egress" (since such a policy would not include + // an egress section and would otherwise default to just [ "Ingress" ]). + // This field is beta-level in 1.8 + PolicyTypes []networkingv1.PolicyType `json:"policyTypes,omitempty"` } // NetworkPolicySpecApplyConfiguration constructs a declarative configuration of the NetworkPolicySpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/parentreference.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/parentreference.go index 896c0f8a6dcf0..c725e697b0e0d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/parentreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/parentreference.go @@ -20,11 +20,17 @@ package v1 // ParentReferenceApplyConfiguration represents a declarative configuration of the ParentReference type for use // with apply. +// +// ParentReference describes a reference to a parent object. type ParentReferenceApplyConfiguration struct { - Group *string `json:"group,omitempty"` - Resource *string `json:"resource,omitempty"` + // Group is the group of the object being referenced. + Group *string `json:"group,omitempty"` + // Resource is the resource of the object being referenced. + Resource *string `json:"resource,omitempty"` + // Namespace is the namespace of the object being referenced. Namespace *string `json:"namespace,omitempty"` - Name *string `json:"name,omitempty"` + // Name is the name of the object being referenced. + Name *string `json:"name,omitempty"` } // ParentReferenceApplyConfiguration constructs a declarative configuration of the ParentReference type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicebackendport.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicebackendport.go index 517f974838031..aa38123722267 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicebackendport.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicebackendport.go @@ -20,9 +20,15 @@ package v1 // ServiceBackendPortApplyConfiguration represents a declarative configuration of the ServiceBackendPort type for use // with apply. +// +// ServiceBackendPort is the service port being referenced. type ServiceBackendPortApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Number *int32 `json:"number,omitempty"` + // name is the name of the port on the Service. + // This is a mutually exclusive setting with "Number". + Name *string `json:"name,omitempty"` + // number is the numerical port number (e.g. 80) on the Service. + // This is a mutually exclusive setting with "Name". + Number *int32 `json:"number,omitempty"` } // ServiceBackendPortApplyConfiguration constructs a declarative configuration of the ServiceBackendPort type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicecidr.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicecidr.go index fc06d85ed9257..8eede13e36a4f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicecidr.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicecidr.go @@ -29,11 +29,20 @@ import ( // ServiceCIDRApplyConfiguration represents a declarative configuration of the ServiceCIDR type for use // with apply. +// +// ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). +// This range is used to allocate ClusterIPs to Service objects. type ServiceCIDRApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ServiceCIDRSpecApplyConfiguration `json:"spec,omitempty"` - Status *ServiceCIDRStatusApplyConfiguration `json:"status,omitempty"` + // spec is the desired state of the ServiceCIDR. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *ServiceCIDRSpecApplyConfiguration `json:"spec,omitempty"` + // status represents the current state of the ServiceCIDR. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *ServiceCIDRStatusApplyConfiguration `json:"status,omitempty"` } // ServiceCIDR constructs a declarative configuration of the ServiceCIDR type for use with @@ -46,6 +55,26 @@ func ServiceCIDR(name string) *ServiceCIDRApplyConfiguration { return b } +// ExtractServiceCIDRFrom extracts the applied configuration owned by fieldManager from +// serviceCIDR for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// serviceCIDR must be a unmodified ServiceCIDR API object that was retrieved from the Kubernetes API. +// ExtractServiceCIDRFrom 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. +func ExtractServiceCIDRFrom(serviceCIDR *networkingv1.ServiceCIDR, fieldManager string, subresource string) (*ServiceCIDRApplyConfiguration, error) { + b := &ServiceCIDRApplyConfiguration{} + err := managedfields.ExtractInto(serviceCIDR, internal.Parser().Type("io.k8s.api.networking.v1.ServiceCIDR"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(serviceCIDR.Name) + + b.WithKind("ServiceCIDR") + b.WithAPIVersion("networking.k8s.io/v1") + return b, nil +} + // ExtractServiceCIDR extracts the applied configuration owned by fieldManager from // serviceCIDR. If no managedFields are found in serviceCIDR for fieldManager, a // ServiceCIDRApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +85,16 @@ func ServiceCIDR(name string) *ServiceCIDRApplyConfiguration { // ExtractServiceCIDR 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 ExtractServiceCIDR(serviceCIDR *networkingv1.ServiceCIDR, fieldManager string) (*ServiceCIDRApplyConfiguration, error) { - return extractServiceCIDR(serviceCIDR, fieldManager, "") + return ExtractServiceCIDRFrom(serviceCIDR, fieldManager, "") } -// ExtractServiceCIDRStatus is the same as ExtractServiceCIDR except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractServiceCIDRStatus extracts the applied configuration owned by fieldManager from +// serviceCIDR for the status subresource. func ExtractServiceCIDRStatus(serviceCIDR *networkingv1.ServiceCIDR, fieldManager string) (*ServiceCIDRApplyConfiguration, error) { - return extractServiceCIDR(serviceCIDR, fieldManager, "status") + return ExtractServiceCIDRFrom(serviceCIDR, fieldManager, "status") } -func extractServiceCIDR(serviceCIDR *networkingv1.ServiceCIDR, fieldManager string, subresource string) (*ServiceCIDRApplyConfiguration, error) { - b := &ServiceCIDRApplyConfiguration{} - err := managedfields.ExtractInto(serviceCIDR, internal.Parser().Type("io.k8s.api.networking.v1.ServiceCIDR"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(serviceCIDR.Name) - - b.WithKind("ServiceCIDR") - b.WithAPIVersion("networking.k8s.io/v1") - return b, nil -} func (b ServiceCIDRApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicecidrspec.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicecidrspec.go index f84b7ba1e0bef..9372a162bd4ff 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicecidrspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicecidrspec.go @@ -20,7 +20,12 @@ package v1 // ServiceCIDRSpecApplyConfiguration represents a declarative configuration of the ServiceCIDRSpec type for use // with apply. +// +// ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services. type ServiceCIDRSpecApplyConfiguration struct { + // CIDRs defines the IP blocks in CIDR notation (e.g. "192.168.0.0/24" or "2001:db8::/64") + // from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. + // This field is immutable. CIDRs []string `json:"cidrs,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicecidrstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicecidrstatus.go index 9e3d52ae8b338..d7135dc130a8f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicecidrstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/servicecidrstatus.go @@ -24,7 +24,11 @@ import ( // ServiceCIDRStatusApplyConfiguration represents a declarative configuration of the ServiceCIDRStatus type for use // with apply. +// +// ServiceCIDRStatus describes the current state of the ServiceCIDR. type ServiceCIDRStatusApplyConfiguration struct { + // conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. + // Current service state Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/httpingresspath.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/httpingresspath.go index c7301c6a32d56..c8e51bfdd5c22 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/httpingresspath.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/httpingresspath.go @@ -24,10 +24,34 @@ import ( // HTTPIngressPathApplyConfiguration represents a declarative configuration of the HTTPIngressPath type for use // with apply. +// +// HTTPIngressPath associates a path with a backend. Incoming urls matching the +// path are forwarded to the backend. type HTTPIngressPathApplyConfiguration struct { - Path *string `json:"path,omitempty"` - PathType *networkingv1beta1.PathType `json:"pathType,omitempty"` - Backend *IngressBackendApplyConfiguration `json:"backend,omitempty"` + // path is matched against the path of an incoming request. Currently it can + // contain characters disallowed from the conventional "path" part of a URL + // as defined by RFC 3986. Paths must begin with a '/' and must be present + // when using PathType with value "Exact" or "Prefix". + Path *string `json:"path,omitempty"` + // pathType determines the interpretation of the path matching. PathType can + // be one of the following values: + // * Exact: Matches the URL path exactly. + // * Prefix: Matches based on a URL path prefix split by '/'. Matching is + // done on a path element by element basis. A path element refers is the + // list of labels in the path split by the '/' separator. A request is a + // match for path p if every p is an element-wise prefix of p of the + // request path. Note that if the last element of the path is a substring + // of the last element in request path, it is not a match (e.g. /foo/bar + // matches /foo/bar/baz, but does not match /foo/barbaz). + // * ImplementationSpecific: Interpretation of the Path matching is up to + // the IngressClass. Implementations can treat this as a separate PathType + // or treat it identically to Prefix or Exact path types. + // Implementations are required to support all path types. + // Defaults to ImplementationSpecific. + PathType *networkingv1beta1.PathType `json:"pathType,omitempty"` + // backend defines the referenced service endpoint to which the traffic + // will be forwarded to. + Backend *IngressBackendApplyConfiguration `json:"backend,omitempty"` } // HTTPIngressPathApplyConfiguration constructs a declarative configuration of the HTTPIngressPath type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/httpingressrulevalue.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/httpingressrulevalue.go index 12454522374fb..865697512ef35 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/httpingressrulevalue.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/httpingressrulevalue.go @@ -20,7 +20,14 @@ package v1beta1 // HTTPIngressRuleValueApplyConfiguration represents a declarative configuration of the HTTPIngressRuleValue type for use // with apply. +// +// HTTPIngressRuleValue is a list of http selectors pointing to backends. +// In the example: http:///? -> backend where +// where parts of the url correspond to RFC 3986, this resource will be used +// to match against everything after the last '/' and before the first '?' +// or '#'. type HTTPIngressRuleValueApplyConfiguration struct { + // paths is a collection of paths that map requests to backends. Paths []HTTPIngressPathApplyConfiguration `json:"paths,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingress.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingress.go index 9ef43b1429de8..061c29c992e37 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingress.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingress.go @@ -29,11 +29,22 @@ import ( // IngressApplyConfiguration represents a declarative configuration of the Ingress type for use // with apply. +// +// Ingress is a collection of rules that allow inbound connections to reach the +// endpoints defined by a backend. An Ingress can be configured to give services +// externally-reachable urls, load balance traffic, terminate SSL, offer name +// based virtual hosting etc. type IngressApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *IngressSpecApplyConfiguration `json:"spec,omitempty"` - Status *IngressStatusApplyConfiguration `json:"status,omitempty"` + // spec is the desired state of the Ingress. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *IngressSpecApplyConfiguration `json:"spec,omitempty"` + // status is the current state of the Ingress. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *IngressStatusApplyConfiguration `json:"status,omitempty"` } // Ingress constructs a declarative configuration of the Ingress type for use with @@ -47,6 +58,27 @@ func Ingress(name, namespace string) *IngressApplyConfiguration { return b } +// ExtractIngressFrom extracts the applied configuration owned by fieldManager from +// ingress for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// ingress must be a unmodified Ingress API object that was retrieved from the Kubernetes API. +// ExtractIngressFrom 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. +func ExtractIngressFrom(ingress *networkingv1beta1.Ingress, fieldManager string, subresource string) (*IngressApplyConfiguration, error) { + b := &IngressApplyConfiguration{} + err := managedfields.ExtractInto(ingress, internal.Parser().Type("io.k8s.api.networking.v1beta1.Ingress"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(ingress.Name) + b.WithNamespace(ingress.Namespace) + + b.WithKind("Ingress") + b.WithAPIVersion("networking.k8s.io/v1beta1") + return b, nil +} + // ExtractIngress extracts the applied configuration owned by fieldManager from // ingress. If no managedFields are found in ingress for fieldManager, a // IngressApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +89,16 @@ func Ingress(name, namespace string) *IngressApplyConfiguration { // ExtractIngress 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 ExtractIngress(ingress *networkingv1beta1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) { - return extractIngress(ingress, fieldManager, "") + return ExtractIngressFrom(ingress, fieldManager, "") } -// ExtractIngressStatus is the same as ExtractIngress except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractIngressStatus extracts the applied configuration owned by fieldManager from +// ingress for the status subresource. func ExtractIngressStatus(ingress *networkingv1beta1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) { - return extractIngress(ingress, fieldManager, "status") + return ExtractIngressFrom(ingress, fieldManager, "status") } -func extractIngress(ingress *networkingv1beta1.Ingress, fieldManager string, subresource string) (*IngressApplyConfiguration, error) { - b := &IngressApplyConfiguration{} - err := managedfields.ExtractInto(ingress, internal.Parser().Type("io.k8s.api.networking.v1beta1.Ingress"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(ingress.Name) - b.WithNamespace(ingress.Namespace) - - b.WithKind("Ingress") - b.WithAPIVersion("networking.k8s.io/v1beta1") - return b, nil -} func (b IngressApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressbackend.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressbackend.go index 9d386f160861a..9d85f45acf94a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressbackend.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressbackend.go @@ -25,10 +25,17 @@ import ( // IngressBackendApplyConfiguration represents a declarative configuration of the IngressBackend type for use // with apply. +// +// IngressBackend describes all endpoints for a given service and port. type IngressBackendApplyConfiguration struct { - ServiceName *string `json:"serviceName,omitempty"` - ServicePort *intstr.IntOrString `json:"servicePort,omitempty"` - Resource *v1.TypedLocalObjectReferenceApplyConfiguration `json:"resource,omitempty"` + // serviceName specifies the name of the referenced service. + ServiceName *string `json:"serviceName,omitempty"` + // servicePort Specifies the port of the referenced service. + ServicePort *intstr.IntOrString `json:"servicePort,omitempty"` + // resource is an ObjectRef to another Kubernetes resource in the namespace + // of the Ingress object. If resource is specified, serviceName and servicePort + // must not be specified. + Resource *v1.TypedLocalObjectReferenceApplyConfiguration `json:"resource,omitempty"` } // IngressBackendApplyConfiguration constructs a declarative configuration of the IngressBackend type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclass.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclass.go index ec8062c50e2b2..c4d6df50b493e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclass.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclass.go @@ -29,10 +29,20 @@ import ( // IngressClassApplyConfiguration represents a declarative configuration of the IngressClass type for use // with apply. +// +// IngressClass represents the class of the Ingress, referenced by the Ingress +// Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be +// used to indicate that an IngressClass should be considered default. When a +// single IngressClass resource has this annotation set to true, new Ingress +// resources without a class specified will be assigned this default class. type IngressClassApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *IngressClassSpecApplyConfiguration `json:"spec,omitempty"` + // spec is the desired state of the IngressClass. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *IngressClassSpecApplyConfiguration `json:"spec,omitempty"` } // IngressClass constructs a declarative configuration of the IngressClass type for use with @@ -45,29 +55,14 @@ func IngressClass(name string) *IngressClassApplyConfiguration { return b } -// ExtractIngressClass extracts the applied configuration owned by fieldManager from -// ingressClass. If no managedFields are found in ingressClass for fieldManager, a -// IngressClassApplyConfiguration 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. +// ExtractIngressClassFrom extracts the applied configuration owned by fieldManager from +// ingressClass for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // ingressClass must be a unmodified IngressClass API object that was retrieved from the Kubernetes API. -// ExtractIngressClass provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractIngressClassFrom 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 ExtractIngressClass(ingressClass *networkingv1beta1.IngressClass, fieldManager string) (*IngressClassApplyConfiguration, error) { - return extractIngressClass(ingressClass, fieldManager, "") -} - -// ExtractIngressClassStatus is the same as ExtractIngressClass except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractIngressClassStatus(ingressClass *networkingv1beta1.IngressClass, fieldManager string) (*IngressClassApplyConfiguration, error) { - return extractIngressClass(ingressClass, fieldManager, "status") -} - -func extractIngressClass(ingressClass *networkingv1beta1.IngressClass, fieldManager string, subresource string) (*IngressClassApplyConfiguration, error) { +func ExtractIngressClassFrom(ingressClass *networkingv1beta1.IngressClass, fieldManager string, subresource string) (*IngressClassApplyConfiguration, error) { b := &IngressClassApplyConfiguration{} err := managedfields.ExtractInto(ingressClass, internal.Parser().Type("io.k8s.api.networking.v1beta1.IngressClass"), fieldManager, b, subresource) if err != nil { @@ -79,6 +74,21 @@ func extractIngressClass(ingressClass *networkingv1beta1.IngressClass, fieldMana b.WithAPIVersion("networking.k8s.io/v1beta1") return b, nil } + +// ExtractIngressClass extracts the applied configuration owned by fieldManager from +// ingressClass. If no managedFields are found in ingressClass for fieldManager, a +// IngressClassApplyConfiguration 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. +// ingressClass must be a unmodified IngressClass API object that was retrieved from the Kubernetes API. +// ExtractIngressClass 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. +func ExtractIngressClass(ingressClass *networkingv1beta1.IngressClass, fieldManager string) (*IngressClassApplyConfiguration, error) { + return ExtractIngressClassFrom(ingressClass, fieldManager, "") +} + func (b IngressClassApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclassparametersreference.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclassparametersreference.go index 2a307a676030d..a5ca2ed3f4dbf 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclassparametersreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclassparametersreference.go @@ -20,11 +20,24 @@ package v1beta1 // IngressClassParametersReferenceApplyConfiguration represents a declarative configuration of the IngressClassParametersReference type for use // with apply. +// +// IngressClassParametersReference identifies an API object. This can be used +// to specify a cluster or namespace-scoped resource. type IngressClassParametersReferenceApplyConfiguration struct { - APIGroup *string `json:"apiGroup,omitempty"` - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` - Scope *string `json:"scope,omitempty"` + // apiGroup is the group for the resource being referenced. If APIGroup is + // not specified, the specified Kind must be in the core API group. For any + // other third-party types, APIGroup is required. + APIGroup *string `json:"apiGroup,omitempty"` + // kind is the type of resource being referenced. + Kind *string `json:"kind,omitempty"` + // name is the name of resource being referenced. + Name *string `json:"name,omitempty"` + // scope represents if this refers to a cluster or namespace scoped resource. + // This may be set to "Cluster" (default) or "Namespace". + Scope *string `json:"scope,omitempty"` + // namespace is the namespace of the resource being referenced. This field is + // required when scope is set to "Namespace" and must be unset when scope is set to + // "Cluster". Namespace *string `json:"namespace,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclassspec.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclassspec.go index eefbf62b87ace..b17f3e10f05e1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclassspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclassspec.go @@ -20,8 +20,19 @@ package v1beta1 // IngressClassSpecApplyConfiguration represents a declarative configuration of the IngressClassSpec type for use // with apply. +// +// IngressClassSpec provides information about the class of an Ingress. type IngressClassSpecApplyConfiguration struct { - Controller *string `json:"controller,omitempty"` + // controller refers to the name of the controller that should handle this + // class. This allows for different "flavors" that are controlled by the + // same controller. For example, you may have different parameters for the + // same implementing controller. This should be specified as a + // domain-prefixed path no more than 250 characters in length, e.g. + // "acme.io/ingress-controller". This field is immutable. + Controller *string `json:"controller,omitempty"` + // parameters is a link to a custom resource containing additional + // configuration for the controller. This is optional if the controller does + // not require extra parameters. Parameters *IngressClassParametersReferenceApplyConfiguration `json:"parameters,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressloadbalanceringress.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressloadbalanceringress.go index 12dbc35969b05..b831be67d96db 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressloadbalanceringress.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressloadbalanceringress.go @@ -20,10 +20,15 @@ package v1beta1 // IngressLoadBalancerIngressApplyConfiguration represents a declarative configuration of the IngressLoadBalancerIngress type for use // with apply. +// +// IngressLoadBalancerIngress represents the status of a load-balancer ingress point. type IngressLoadBalancerIngressApplyConfiguration struct { - IP *string `json:"ip,omitempty"` - Hostname *string `json:"hostname,omitempty"` - Ports []IngressPortStatusApplyConfiguration `json:"ports,omitempty"` + // ip is set for load-balancer ingress points that are IP based. + IP *string `json:"ip,omitempty"` + // hostname is set for load-balancer ingress points that are DNS based. + Hostname *string `json:"hostname,omitempty"` + // ports provides information about the ports exposed by this LoadBalancer. + Ports []IngressPortStatusApplyConfiguration `json:"ports,omitempty"` } // IngressLoadBalancerIngressApplyConfiguration constructs a declarative configuration of the IngressLoadBalancerIngress type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressloadbalancerstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressloadbalancerstatus.go index e896ab3415596..322935e3637f5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressloadbalancerstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressloadbalancerstatus.go @@ -20,7 +20,10 @@ package v1beta1 // IngressLoadBalancerStatusApplyConfiguration represents a declarative configuration of the IngressLoadBalancerStatus type for use // with apply. +// +// LoadBalancerStatus represents the status of a load-balancer. type IngressLoadBalancerStatusApplyConfiguration struct { + // ingress is a list containing ingress points for the load-balancer. Ingress []IngressLoadBalancerIngressApplyConfiguration `json:"ingress,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressportstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressportstatus.go index 4ee3f01617f9c..5de062db30aba 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressportstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressportstatus.go @@ -24,10 +24,23 @@ import ( // IngressPortStatusApplyConfiguration represents a declarative configuration of the IngressPortStatus type for use // with apply. +// +// IngressPortStatus represents the error condition of a service port type IngressPortStatusApplyConfiguration struct { - Port *int32 `json:"port,omitempty"` + // port is the port number of the ingress port. + Port *int32 `json:"port,omitempty"` + // protocol is the protocol of the ingress port. + // The supported values are: "TCP", "UDP", "SCTP" Protocol *v1.Protocol `json:"protocol,omitempty"` - Error *string `json:"error,omitempty"` + // error is to record the problem with the service port + // The format of the error shall comply with the following rules: + // - built-in error values shall be specified in this file and those shall use + // CamelCase names + // - cloud provider specific error values must have names that comply with the + // format foo.example.com/CamelCase. + // --- + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + Error *string `json:"error,omitempty"` } // IngressPortStatusApplyConfiguration constructs a declarative configuration of the IngressPortStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressrule.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressrule.go index 809fada928eac..6c8b973ed0ab1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressrule.go @@ -20,8 +20,39 @@ package v1beta1 // IngressRuleApplyConfiguration represents a declarative configuration of the IngressRule type for use // with apply. +// +// IngressRule represents the rules mapping the paths under a specified host to +// the related backend services. Incoming requests are first evaluated for a host +// match, then routed to the backend associated with the matching IngressRuleValue. type IngressRuleApplyConfiguration struct { - Host *string `json:"host,omitempty"` + // host is the fully qualified domain name of a network host, as defined by RFC 3986. + // Note the following deviations from the "host" part of the + // URI as defined in RFC 3986: + // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to + // the IP in the Spec of the parent Ingress. + // 2. The `:` delimiter is not respected because ports are not allowed. + // Currently the port of an Ingress is implicitly :80 for http and + // :443 for https. + // Both these may change in the future. + // Incoming requests are matched against the host before the + // IngressRuleValue. If the host is unspecified, the Ingress routes all + // traffic based on the specified IngressRuleValue. + // + // host can be "precise" which is a domain name without the terminating dot of + // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name + // prefixed with a single wildcard label (e.g. "*.foo.com"). + // The wildcard character '*' must appear by itself as the first DNS label and + // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*"). + // Requests will be matched against the Host field in the following way: + // 1. If Host is precise, the request matches this rule if the http host header is equal to Host. + // 2. If Host is a wildcard, then the request matches this rule if the http host header + // is to equal to the suffix (removing the first label) of the wildcard rule. + Host *string `json:"host,omitempty"` + // IngressRuleValue represents a rule to route requests for this IngressRule. + // If unspecified, the rule defaults to a http catch-all. Whether that sends + // just traffic matching the host to the default backend or all traffic to the + // default backend, is left to the controller fulfilling the Ingress. Http is + // currently the only supported IngressRuleValue. IngressRuleValueApplyConfiguration `json:",inline"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressrulevalue.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressrulevalue.go index 4a64124755608..502384fa3dd70 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressrulevalue.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressrulevalue.go @@ -20,6 +20,11 @@ package v1beta1 // IngressRuleValueApplyConfiguration represents a declarative configuration of the IngressRuleValue type for use // with apply. +// +// IngressRuleValue represents a rule to apply against incoming requests. If the +// rule is satisfied, the request is routed to the specified backend. Currently +// mixing different types of rules in a single Ingress is disallowed, so exactly +// one of the following must be set. type IngressRuleValueApplyConfiguration struct { HTTP *HTTPIngressRuleValueApplyConfiguration `json:"http,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressspec.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressspec.go index 58fbde8b35251..fd616d6881d53 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressspec.go @@ -20,11 +20,34 @@ package v1beta1 // IngressSpecApplyConfiguration represents a declarative configuration of the IngressSpec type for use // with apply. +// +// IngressSpec describes the Ingress the user wishes to exist. type IngressSpecApplyConfiguration struct { - IngressClassName *string `json:"ingressClassName,omitempty"` - Backend *IngressBackendApplyConfiguration `json:"backend,omitempty"` - TLS []IngressTLSApplyConfiguration `json:"tls,omitempty"` - Rules []IngressRuleApplyConfiguration `json:"rules,omitempty"` + // ingressClassName is the name of the IngressClass cluster resource. The + // associated IngressClass defines which controller will implement the + // resource. This replaces the deprecated `kubernetes.io/ingress.class` + // annotation. For backwards compatibility, when that annotation is set, it + // must be given precedence over this field. The controller may emit a + // warning if the field and annotation have different values. + // Implementations of this API should ignore Ingresses without a class + // specified. An IngressClass resource may be marked as default, which can + // be used to set a default value for this field. For more information, + // refer to the IngressClass documentation. + IngressClassName *string `json:"ingressClassName,omitempty"` + // backend is the default backend capable of servicing requests that don't match any + // rule. At least one of 'backend' or 'rules' must be specified. This field + // is optional to allow the loadbalancer controller or defaulting logic to + // specify a global default. + Backend *IngressBackendApplyConfiguration `json:"backend,omitempty"` + // tls represents the TLS configuration. Currently the Ingress only supports a + // single TLS port, 443. If multiple members of this list specify different hosts, + // they will be multiplexed on the same port according to the hostname specified + // through the SNI TLS extension, if the ingress controller fulfilling the + // ingress supports SNI. + TLS []IngressTLSApplyConfiguration `json:"tls,omitempty"` + // rules is a list of host rules used to configure the Ingress. If unspecified, or + // no rule matches, all traffic is sent to the default backend. + Rules []IngressRuleApplyConfiguration `json:"rules,omitempty"` } // IngressSpecApplyConfiguration constructs a declarative configuration of the IngressSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressstatus.go index 3aed616889c0f..2c7d01c93af3b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressstatus.go @@ -20,7 +20,10 @@ package v1beta1 // IngressStatusApplyConfiguration represents a declarative configuration of the IngressStatus type for use // with apply. +// +// IngressStatus describes the current state of the Ingress. type IngressStatusApplyConfiguration struct { + // loadBalancer contains the current status of the load-balancer. LoadBalancer *IngressLoadBalancerStatusApplyConfiguration `json:"loadBalancer,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingresstls.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingresstls.go index 63648cd464952..cad7f0ed3212f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingresstls.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingresstls.go @@ -20,9 +20,20 @@ package v1beta1 // IngressTLSApplyConfiguration represents a declarative configuration of the IngressTLS type for use // with apply. +// +// IngressTLS describes the transport layer security associated with an Ingress. type IngressTLSApplyConfiguration struct { - Hosts []string `json:"hosts,omitempty"` - SecretName *string `json:"secretName,omitempty"` + // hosts is a list of hosts included in the TLS certificate. The values in + // this list must match the name/s used in the tlsSecret. Defaults to the + // wildcard host setting for the loadbalancer controller fulfilling this + // Ingress, if left unspecified. + Hosts []string `json:"hosts,omitempty"` + // secretName is the name of the secret used to terminate TLS traffic on + // port 443. Field is left optional to allow TLS routing based on SNI + // hostname alone. If the SNI host in a listener conflicts with the "Host" + // header field used by an IngressRule, the SNI host is used for termination + // and value of the Host header is used for routing. + SecretName *string `json:"secretName,omitempty"` } // IngressTLSApplyConfiguration constructs a declarative configuration of the IngressTLS type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ipaddress.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ipaddress.go index f1f9680da044d..28167f1f4c553 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ipaddress.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ipaddress.go @@ -29,10 +29,22 @@ import ( // IPAddressApplyConfiguration represents a declarative configuration of the IPAddress type for use // with apply. +// +// IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs +// that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. +// An IP address can be represented in different formats, to guarantee the uniqueness of the IP, +// the name of the object is the IP address in canonical format, four decimal digits separated +// by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. +// Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 +// Invalid: 10.01.2.3 or 2001:db8:0:0:0::1 type IPAddressApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *IPAddressSpecApplyConfiguration `json:"spec,omitempty"` + // spec is the desired state of the IPAddress. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *IPAddressSpecApplyConfiguration `json:"spec,omitempty"` } // IPAddress constructs a declarative configuration of the IPAddress type for use with @@ -45,29 +57,14 @@ func IPAddress(name string) *IPAddressApplyConfiguration { return b } -// ExtractIPAddress extracts the applied configuration owned by fieldManager from -// iPAddress. If no managedFields are found in iPAddress for fieldManager, a -// IPAddressApplyConfiguration 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. +// ExtractIPAddressFrom extracts the applied configuration owned by fieldManager from +// iPAddress for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // iPAddress must be a unmodified IPAddress API object that was retrieved from the Kubernetes API. -// ExtractIPAddress provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractIPAddressFrom 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 ExtractIPAddress(iPAddress *networkingv1beta1.IPAddress, fieldManager string) (*IPAddressApplyConfiguration, error) { - return extractIPAddress(iPAddress, fieldManager, "") -} - -// ExtractIPAddressStatus is the same as ExtractIPAddress except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractIPAddressStatus(iPAddress *networkingv1beta1.IPAddress, fieldManager string) (*IPAddressApplyConfiguration, error) { - return extractIPAddress(iPAddress, fieldManager, "status") -} - -func extractIPAddress(iPAddress *networkingv1beta1.IPAddress, fieldManager string, subresource string) (*IPAddressApplyConfiguration, error) { +func ExtractIPAddressFrom(iPAddress *networkingv1beta1.IPAddress, fieldManager string, subresource string) (*IPAddressApplyConfiguration, error) { b := &IPAddressApplyConfiguration{} err := managedfields.ExtractInto(iPAddress, internal.Parser().Type("io.k8s.api.networking.v1beta1.IPAddress"), fieldManager, b, subresource) if err != nil { @@ -79,6 +76,21 @@ func extractIPAddress(iPAddress *networkingv1beta1.IPAddress, fieldManager strin b.WithAPIVersion("networking.k8s.io/v1beta1") return b, nil } + +// ExtractIPAddress extracts the applied configuration owned by fieldManager from +// iPAddress. If no managedFields are found in iPAddress for fieldManager, a +// IPAddressApplyConfiguration 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. +// iPAddress must be a unmodified IPAddress API object that was retrieved from the Kubernetes API. +// ExtractIPAddress 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. +func ExtractIPAddress(iPAddress *networkingv1beta1.IPAddress, fieldManager string) (*IPAddressApplyConfiguration, error) { + return ExtractIPAddressFrom(iPAddress, fieldManager, "") +} + func (b IPAddressApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ipaddressspec.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ipaddressspec.go index 76b02137d2367..c0c012aaa6eee 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ipaddressspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ipaddressspec.go @@ -20,7 +20,11 @@ package v1beta1 // IPAddressSpecApplyConfiguration represents a declarative configuration of the IPAddressSpec type for use // with apply. +// +// IPAddressSpec describe the attributes in an IP Address. type IPAddressSpecApplyConfiguration struct { + // ParentRef references the resource that an IPAddress is attached to. + // An IPAddress must reference a parent object. ParentRef *ParentReferenceApplyConfiguration `json:"parentRef,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/parentreference.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/parentreference.go index 1863938f16cc9..edcc3b95d368b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/parentreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/parentreference.go @@ -20,11 +20,17 @@ package v1beta1 // ParentReferenceApplyConfiguration represents a declarative configuration of the ParentReference type for use // with apply. +// +// ParentReference describes a reference to a parent object. type ParentReferenceApplyConfiguration struct { - Group *string `json:"group,omitempty"` - Resource *string `json:"resource,omitempty"` + // Group is the group of the object being referenced. + Group *string `json:"group,omitempty"` + // Resource is the resource of the object being referenced. + Resource *string `json:"resource,omitempty"` + // Namespace is the namespace of the object being referenced. Namespace *string `json:"namespace,omitempty"` - Name *string `json:"name,omitempty"` + // Name is the name of the object being referenced. + Name *string `json:"name,omitempty"` } // ParentReferenceApplyConfiguration constructs a declarative configuration of the ParentReference type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidr.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidr.go index 37a6ee6f487af..07281de61618f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidr.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidr.go @@ -29,11 +29,20 @@ import ( // ServiceCIDRApplyConfiguration represents a declarative configuration of the ServiceCIDR type for use // with apply. +// +// ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). +// This range is used to allocate ClusterIPs to Service objects. type ServiceCIDRApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ServiceCIDRSpecApplyConfiguration `json:"spec,omitempty"` - Status *ServiceCIDRStatusApplyConfiguration `json:"status,omitempty"` + // spec is the desired state of the ServiceCIDR. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *ServiceCIDRSpecApplyConfiguration `json:"spec,omitempty"` + // status represents the current state of the ServiceCIDR. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *ServiceCIDRStatusApplyConfiguration `json:"status,omitempty"` } // ServiceCIDR constructs a declarative configuration of the ServiceCIDR type for use with @@ -46,6 +55,26 @@ func ServiceCIDR(name string) *ServiceCIDRApplyConfiguration { return b } +// ExtractServiceCIDRFrom extracts the applied configuration owned by fieldManager from +// serviceCIDR for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// serviceCIDR must be a unmodified ServiceCIDR API object that was retrieved from the Kubernetes API. +// ExtractServiceCIDRFrom 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. +func ExtractServiceCIDRFrom(serviceCIDR *networkingv1beta1.ServiceCIDR, fieldManager string, subresource string) (*ServiceCIDRApplyConfiguration, error) { + b := &ServiceCIDRApplyConfiguration{} + err := managedfields.ExtractInto(serviceCIDR, internal.Parser().Type("io.k8s.api.networking.v1beta1.ServiceCIDR"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(serviceCIDR.Name) + + b.WithKind("ServiceCIDR") + b.WithAPIVersion("networking.k8s.io/v1beta1") + return b, nil +} + // ExtractServiceCIDR extracts the applied configuration owned by fieldManager from // serviceCIDR. If no managedFields are found in serviceCIDR for fieldManager, a // ServiceCIDRApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,30 +85,16 @@ func ServiceCIDR(name string) *ServiceCIDRApplyConfiguration { // ExtractServiceCIDR 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 ExtractServiceCIDR(serviceCIDR *networkingv1beta1.ServiceCIDR, fieldManager string) (*ServiceCIDRApplyConfiguration, error) { - return extractServiceCIDR(serviceCIDR, fieldManager, "") + return ExtractServiceCIDRFrom(serviceCIDR, fieldManager, "") } -// ExtractServiceCIDRStatus is the same as ExtractServiceCIDR except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractServiceCIDRStatus extracts the applied configuration owned by fieldManager from +// serviceCIDR for the status subresource. func ExtractServiceCIDRStatus(serviceCIDR *networkingv1beta1.ServiceCIDR, fieldManager string) (*ServiceCIDRApplyConfiguration, error) { - return extractServiceCIDR(serviceCIDR, fieldManager, "status") + return ExtractServiceCIDRFrom(serviceCIDR, fieldManager, "status") } -func extractServiceCIDR(serviceCIDR *networkingv1beta1.ServiceCIDR, fieldManager string, subresource string) (*ServiceCIDRApplyConfiguration, error) { - b := &ServiceCIDRApplyConfiguration{} - err := managedfields.ExtractInto(serviceCIDR, internal.Parser().Type("io.k8s.api.networking.v1beta1.ServiceCIDR"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(serviceCIDR.Name) - - b.WithKind("ServiceCIDR") - b.WithAPIVersion("networking.k8s.io/v1beta1") - return b, nil -} func (b ServiceCIDRApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrspec.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrspec.go index 1f283532d31cc..7652700e2af29 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrspec.go @@ -20,7 +20,12 @@ package v1beta1 // ServiceCIDRSpecApplyConfiguration represents a declarative configuration of the ServiceCIDRSpec type for use // with apply. +// +// ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services. type ServiceCIDRSpecApplyConfiguration struct { + // CIDRs defines the IP blocks in CIDR notation (e.g. "192.168.0.0/24" or "2001:db8::/64") + // from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. + // This field is immutable. CIDRs []string `json:"cidrs,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrstatus.go index f2dd92404dde8..307043d989301 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrstatus.go @@ -24,7 +24,11 @@ import ( // ServiceCIDRStatusApplyConfiguration represents a declarative configuration of the ServiceCIDRStatus type for use // with apply. +// +// ServiceCIDRStatus describes the current state of the ServiceCIDR. type ServiceCIDRStatusApplyConfiguration struct { + // conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. + // Current service state Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/node/v1/overhead.go b/staging/src/k8s.io/client-go/applyconfigurations/node/v1/overhead.go index 30ce9fb42e00c..5584ddfd97c17 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/node/v1/overhead.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/node/v1/overhead.go @@ -24,7 +24,10 @@ import ( // OverheadApplyConfiguration represents a declarative configuration of the Overhead type for use // with apply. +// +// Overhead structure represents the resource overhead associated with running a pod. type OverheadApplyConfiguration struct { + // podFixed represents the fixed resource overhead associated with running a pod. PodFixed *corev1.ResourceList `json:"podFixed,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/node/v1/runtimeclass.go b/staging/src/k8s.io/client-go/applyconfigurations/node/v1/runtimeclass.go index 0c855cfdcb7c0..6b33701cabe23 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/node/v1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/node/v1/runtimeclass.go @@ -29,12 +29,38 @@ import ( // RuntimeClassApplyConfiguration represents a declarative configuration of the RuntimeClass type for use // with apply. +// +// RuntimeClass defines a class of container runtime supported in the cluster. +// The RuntimeClass is used to determine which container runtime is used to run +// all containers in a pod. RuntimeClasses are manually defined by a +// user or cluster provisioner, and referenced in the PodSpec. The Kubelet is +// responsible for resolving the RuntimeClassName reference before running the +// pod. For more details, see +// https://kubernetes.io/docs/concepts/containers/runtime-class/ type RuntimeClassApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Handler *string `json:"handler,omitempty"` - Overhead *OverheadApplyConfiguration `json:"overhead,omitempty"` - Scheduling *SchedulingApplyConfiguration `json:"scheduling,omitempty"` + // handler specifies the underlying runtime and configuration that the CRI + // implementation will use to handle pods of this class. The possible values + // are specific to the node & CRI configuration. It is assumed that all + // handlers are available on every node, and handlers of the same name are + // equivalent on every node. + // For example, a handler called "runc" might specify that the runc OCI + // runtime (using native Linux containers) will be used to run the containers + // in a pod. + // The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, + // and is immutable. + Handler *string `json:"handler,omitempty"` + // overhead represents the resource overhead associated with running a pod for a + // given RuntimeClass. For more details, see + // https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/ + Overhead *OverheadApplyConfiguration `json:"overhead,omitempty"` + // scheduling holds the scheduling constraints to ensure that pods running + // with this RuntimeClass are scheduled to nodes that support it. + // If scheduling is nil, this RuntimeClass is assumed to be supported by all + // nodes. + Scheduling *SchedulingApplyConfiguration `json:"scheduling,omitempty"` } // RuntimeClass constructs a declarative configuration of the RuntimeClass type for use with @@ -47,29 +73,14 @@ func RuntimeClass(name string) *RuntimeClassApplyConfiguration { return b } -// ExtractRuntimeClass extracts the applied configuration owned by fieldManager from -// runtimeClass. If no managedFields are found in runtimeClass for fieldManager, a -// RuntimeClassApplyConfiguration 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. +// ExtractRuntimeClassFrom extracts the applied configuration owned by fieldManager from +// runtimeClass for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // runtimeClass must be a unmodified RuntimeClass API object that was retrieved from the Kubernetes API. -// ExtractRuntimeClass provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractRuntimeClassFrom 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 ExtractRuntimeClass(runtimeClass *nodev1.RuntimeClass, fieldManager string) (*RuntimeClassApplyConfiguration, error) { - return extractRuntimeClass(runtimeClass, fieldManager, "") -} - -// ExtractRuntimeClassStatus is the same as ExtractRuntimeClass except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractRuntimeClassStatus(runtimeClass *nodev1.RuntimeClass, fieldManager string) (*RuntimeClassApplyConfiguration, error) { - return extractRuntimeClass(runtimeClass, fieldManager, "status") -} - -func extractRuntimeClass(runtimeClass *nodev1.RuntimeClass, fieldManager string, subresource string) (*RuntimeClassApplyConfiguration, error) { +func ExtractRuntimeClassFrom(runtimeClass *nodev1.RuntimeClass, fieldManager string, subresource string) (*RuntimeClassApplyConfiguration, error) { b := &RuntimeClassApplyConfiguration{} err := managedfields.ExtractInto(runtimeClass, internal.Parser().Type("io.k8s.api.node.v1.RuntimeClass"), fieldManager, b, subresource) if err != nil { @@ -81,6 +92,21 @@ func extractRuntimeClass(runtimeClass *nodev1.RuntimeClass, fieldManager string, b.WithAPIVersion("node.k8s.io/v1") return b, nil } + +// ExtractRuntimeClass extracts the applied configuration owned by fieldManager from +// runtimeClass. If no managedFields are found in runtimeClass for fieldManager, a +// RuntimeClassApplyConfiguration 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. +// runtimeClass must be a unmodified RuntimeClass API object that was retrieved from the Kubernetes API. +// ExtractRuntimeClass 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. +func ExtractRuntimeClass(runtimeClass *nodev1.RuntimeClass, fieldManager string) (*RuntimeClassApplyConfiguration, error) { + return ExtractRuntimeClassFrom(runtimeClass, fieldManager, "") +} + func (b RuntimeClassApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/node/v1/scheduling.go b/staging/src/k8s.io/client-go/applyconfigurations/node/v1/scheduling.go index b45400fbcd768..849a9a4e5c454 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/node/v1/scheduling.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/node/v1/scheduling.go @@ -24,9 +24,20 @@ import ( // SchedulingApplyConfiguration represents a declarative configuration of the Scheduling type for use // with apply. +// +// Scheduling specifies the scheduling constraints for nodes supporting a +// RuntimeClass. type SchedulingApplyConfiguration struct { - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - Tolerations []corev1.TolerationApplyConfiguration `json:"tolerations,omitempty"` + // nodeSelector lists labels that must be present on nodes that support this + // RuntimeClass. Pods using this RuntimeClass can only be scheduled to a + // node matched by this selector. The RuntimeClass nodeSelector is merged + // with a pod's existing nodeSelector. Any conflicts will cause the pod to + // be rejected in admission. + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + // tolerations are appended (excluding duplicates) to pods running with this + // RuntimeClass during admission, effectively unioning the set of nodes + // tolerated by the pod and the RuntimeClass. + Tolerations []corev1.TolerationApplyConfiguration `json:"tolerations,omitempty"` } // SchedulingApplyConfiguration constructs a declarative configuration of the Scheduling type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/overhead.go b/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/overhead.go index 84770a09205fe..ce66afc6d4c54 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/overhead.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/overhead.go @@ -24,7 +24,10 @@ import ( // OverheadApplyConfiguration represents a declarative configuration of the Overhead type for use // with apply. +// +// Overhead structure represents the resource overhead associated with running a pod. type OverheadApplyConfiguration struct { + // podFixed represents the fixed resource overhead associated with running a pod. PodFixed *v1.ResourceList `json:"podFixed,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/runtimeclass.go b/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/runtimeclass.go index f185c31669b8e..5fbf9a649acfb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/runtimeclass.go @@ -29,10 +29,21 @@ import ( // RuntimeClassApplyConfiguration represents a declarative configuration of the RuntimeClass type for use // with apply. +// +// RuntimeClass defines a class of container runtime supported in the cluster. +// The RuntimeClass is used to determine which container runtime is used to run +// all containers in a pod. RuntimeClasses are (currently) manually defined by a +// user or cluster provisioner, and referenced in the PodSpec. The Kubelet is +// responsible for resolving the RuntimeClassName reference before running the +// pod. For more details, see +// https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class type RuntimeClassApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *RuntimeClassSpecApplyConfiguration `json:"spec,omitempty"` + // spec represents specification of the RuntimeClass + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *RuntimeClassSpecApplyConfiguration `json:"spec,omitempty"` } // RuntimeClass constructs a declarative configuration of the RuntimeClass type for use with @@ -45,29 +56,14 @@ func RuntimeClass(name string) *RuntimeClassApplyConfiguration { return b } -// ExtractRuntimeClass extracts the applied configuration owned by fieldManager from -// runtimeClass. If no managedFields are found in runtimeClass for fieldManager, a -// RuntimeClassApplyConfiguration 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. +// ExtractRuntimeClassFrom extracts the applied configuration owned by fieldManager from +// runtimeClass for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // runtimeClass must be a unmodified RuntimeClass API object that was retrieved from the Kubernetes API. -// ExtractRuntimeClass provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractRuntimeClassFrom 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 ExtractRuntimeClass(runtimeClass *nodev1alpha1.RuntimeClass, fieldManager string) (*RuntimeClassApplyConfiguration, error) { - return extractRuntimeClass(runtimeClass, fieldManager, "") -} - -// ExtractRuntimeClassStatus is the same as ExtractRuntimeClass except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractRuntimeClassStatus(runtimeClass *nodev1alpha1.RuntimeClass, fieldManager string) (*RuntimeClassApplyConfiguration, error) { - return extractRuntimeClass(runtimeClass, fieldManager, "status") -} - -func extractRuntimeClass(runtimeClass *nodev1alpha1.RuntimeClass, fieldManager string, subresource string) (*RuntimeClassApplyConfiguration, error) { +func ExtractRuntimeClassFrom(runtimeClass *nodev1alpha1.RuntimeClass, fieldManager string, subresource string) (*RuntimeClassApplyConfiguration, error) { b := &RuntimeClassApplyConfiguration{} err := managedfields.ExtractInto(runtimeClass, internal.Parser().Type("io.k8s.api.node.v1alpha1.RuntimeClass"), fieldManager, b, subresource) if err != nil { @@ -79,6 +75,21 @@ func extractRuntimeClass(runtimeClass *nodev1alpha1.RuntimeClass, fieldManager s b.WithAPIVersion("node.k8s.io/v1alpha1") return b, nil } + +// ExtractRuntimeClass extracts the applied configuration owned by fieldManager from +// runtimeClass. If no managedFields are found in runtimeClass for fieldManager, a +// RuntimeClassApplyConfiguration 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. +// runtimeClass must be a unmodified RuntimeClass API object that was retrieved from the Kubernetes API. +// ExtractRuntimeClass 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. +func ExtractRuntimeClass(runtimeClass *nodev1alpha1.RuntimeClass, fieldManager string) (*RuntimeClassApplyConfiguration, error) { + return ExtractRuntimeClassFrom(runtimeClass, fieldManager, "") +} + func (b RuntimeClassApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/runtimeclassspec.go b/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/runtimeclassspec.go index 1aa43eb13203e..0ad3269bedcea 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/runtimeclassspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/runtimeclassspec.go @@ -20,10 +20,32 @@ package v1alpha1 // RuntimeClassSpecApplyConfiguration represents a declarative configuration of the RuntimeClassSpec type for use // with apply. +// +// RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters +// that are required to describe the RuntimeClass to the Container Runtime +// Interface (CRI) implementation, as well as any other components that need to +// understand how the pod will be run. The RuntimeClassSpec is immutable. type RuntimeClassSpecApplyConfiguration struct { - RuntimeHandler *string `json:"runtimeHandler,omitempty"` - Overhead *OverheadApplyConfiguration `json:"overhead,omitempty"` - Scheduling *SchedulingApplyConfiguration `json:"scheduling,omitempty"` + // runtimeHandler specifies the underlying runtime and configuration that the + // CRI implementation will use to handle pods of this class. The possible + // values are specific to the node & CRI configuration. It is assumed that + // all handlers are available on every node, and handlers of the same name are + // equivalent on every node. + // For example, a handler called "runc" might specify that the runc OCI + // runtime (using native Linux containers) will be used to run the containers + // in a pod. + // The runtimeHandler must be lowercase, conform to the DNS Label (RFC 1123) + // requirements, and is immutable. + RuntimeHandler *string `json:"runtimeHandler,omitempty"` + // overhead represents the resource overhead associated with running a pod for a + // given RuntimeClass. For more details, see + // https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + Overhead *OverheadApplyConfiguration `json:"overhead,omitempty"` + // scheduling holds the scheduling constraints to ensure that pods running + // with this RuntimeClass are scheduled to nodes that support it. + // If scheduling is nil, this RuntimeClass is assumed to be supported by all + // nodes. + Scheduling *SchedulingApplyConfiguration `json:"scheduling,omitempty"` } // RuntimeClassSpecApplyConfiguration constructs a declarative configuration of the RuntimeClassSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/scheduling.go b/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/scheduling.go index 6ce49ad8664f9..b79301de87113 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/scheduling.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/scheduling.go @@ -24,9 +24,20 @@ import ( // SchedulingApplyConfiguration represents a declarative configuration of the Scheduling type for use // with apply. +// +// Scheduling specifies the scheduling constraints for nodes supporting a +// RuntimeClass. type SchedulingApplyConfiguration struct { - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - Tolerations []v1.TolerationApplyConfiguration `json:"tolerations,omitempty"` + // nodeSelector lists labels that must be present on nodes that support this + // RuntimeClass. Pods using this RuntimeClass can only be scheduled to a + // node matched by this selector. The RuntimeClass nodeSelector is merged + // with a pod's existing nodeSelector. Any conflicts will cause the pod to + // be rejected in admission. + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + // tolerations are appended (excluding duplicates) to pods running with this + // RuntimeClass during admission, effectively unioning the set of nodes + // tolerated by the pod and the RuntimeClass. + Tolerations []v1.TolerationApplyConfiguration `json:"tolerations,omitempty"` } // SchedulingApplyConfiguration constructs a declarative configuration of the Scheduling type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/node/v1beta1/overhead.go b/staging/src/k8s.io/client-go/applyconfigurations/node/v1beta1/overhead.go index cf767e702eeeb..2c3d34250cadd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/node/v1beta1/overhead.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/node/v1beta1/overhead.go @@ -24,7 +24,10 @@ import ( // OverheadApplyConfiguration represents a declarative configuration of the Overhead type for use // with apply. +// +// Overhead structure represents the resource overhead associated with running a pod. type OverheadApplyConfiguration struct { + // podFixed represents the fixed resource overhead associated with running a pod. PodFixed *v1.ResourceList `json:"podFixed,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/node/v1beta1/runtimeclass.go b/staging/src/k8s.io/client-go/applyconfigurations/node/v1beta1/runtimeclass.go index f6cbcf8fd3a41..fc75967fc0b96 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/node/v1beta1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/node/v1beta1/runtimeclass.go @@ -29,12 +29,38 @@ import ( // RuntimeClassApplyConfiguration represents a declarative configuration of the RuntimeClass type for use // with apply. +// +// RuntimeClass defines a class of container runtime supported in the cluster. +// The RuntimeClass is used to determine which container runtime is used to run +// all containers in a pod. RuntimeClasses are (currently) manually defined by a +// user or cluster provisioner, and referenced in the PodSpec. The Kubelet is +// responsible for resolving the RuntimeClassName reference before running the +// pod. For more details, see +// https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class type RuntimeClassApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Handler *string `json:"handler,omitempty"` - Overhead *OverheadApplyConfiguration `json:"overhead,omitempty"` - Scheduling *SchedulingApplyConfiguration `json:"scheduling,omitempty"` + // handler specifies the underlying runtime and configuration that the CRI + // implementation will use to handle pods of this class. The possible values + // are specific to the node & CRI configuration. It is assumed that all + // handlers are available on every node, and handlers of the same name are + // equivalent on every node. + // For example, a handler called "runc" might specify that the runc OCI + // runtime (using native Linux containers) will be used to run the containers + // in a pod. + // The handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, + // and is immutable. + Handler *string `json:"handler,omitempty"` + // overhead represents the resource overhead associated with running a pod for a + // given RuntimeClass. For more details, see + // https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + Overhead *OverheadApplyConfiguration `json:"overhead,omitempty"` + // scheduling holds the scheduling constraints to ensure that pods running + // with this RuntimeClass are scheduled to nodes that support it. + // If scheduling is nil, this RuntimeClass is assumed to be supported by all + // nodes. + Scheduling *SchedulingApplyConfiguration `json:"scheduling,omitempty"` } // RuntimeClass constructs a declarative configuration of the RuntimeClass type for use with @@ -47,29 +73,14 @@ func RuntimeClass(name string) *RuntimeClassApplyConfiguration { return b } -// ExtractRuntimeClass extracts the applied configuration owned by fieldManager from -// runtimeClass. If no managedFields are found in runtimeClass for fieldManager, a -// RuntimeClassApplyConfiguration 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. +// ExtractRuntimeClassFrom extracts the applied configuration owned by fieldManager from +// runtimeClass for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // runtimeClass must be a unmodified RuntimeClass API object that was retrieved from the Kubernetes API. -// ExtractRuntimeClass provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractRuntimeClassFrom 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 ExtractRuntimeClass(runtimeClass *nodev1beta1.RuntimeClass, fieldManager string) (*RuntimeClassApplyConfiguration, error) { - return extractRuntimeClass(runtimeClass, fieldManager, "") -} - -// ExtractRuntimeClassStatus is the same as ExtractRuntimeClass except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractRuntimeClassStatus(runtimeClass *nodev1beta1.RuntimeClass, fieldManager string) (*RuntimeClassApplyConfiguration, error) { - return extractRuntimeClass(runtimeClass, fieldManager, "status") -} - -func extractRuntimeClass(runtimeClass *nodev1beta1.RuntimeClass, fieldManager string, subresource string) (*RuntimeClassApplyConfiguration, error) { +func ExtractRuntimeClassFrom(runtimeClass *nodev1beta1.RuntimeClass, fieldManager string, subresource string) (*RuntimeClassApplyConfiguration, error) { b := &RuntimeClassApplyConfiguration{} err := managedfields.ExtractInto(runtimeClass, internal.Parser().Type("io.k8s.api.node.v1beta1.RuntimeClass"), fieldManager, b, subresource) if err != nil { @@ -81,6 +92,21 @@ func extractRuntimeClass(runtimeClass *nodev1beta1.RuntimeClass, fieldManager st b.WithAPIVersion("node.k8s.io/v1beta1") return b, nil } + +// ExtractRuntimeClass extracts the applied configuration owned by fieldManager from +// runtimeClass. If no managedFields are found in runtimeClass for fieldManager, a +// RuntimeClassApplyConfiguration 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. +// runtimeClass must be a unmodified RuntimeClass API object that was retrieved from the Kubernetes API. +// ExtractRuntimeClass 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. +func ExtractRuntimeClass(runtimeClass *nodev1beta1.RuntimeClass, fieldManager string) (*RuntimeClassApplyConfiguration, error) { + return ExtractRuntimeClassFrom(runtimeClass, fieldManager, "") +} + func (b RuntimeClassApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/node/v1beta1/scheduling.go b/staging/src/k8s.io/client-go/applyconfigurations/node/v1beta1/scheduling.go index 23d0b97527dc0..9eab351b80ebf 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/node/v1beta1/scheduling.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/node/v1beta1/scheduling.go @@ -24,9 +24,20 @@ import ( // SchedulingApplyConfiguration represents a declarative configuration of the Scheduling type for use // with apply. +// +// Scheduling specifies the scheduling constraints for nodes supporting a +// RuntimeClass. type SchedulingApplyConfiguration struct { - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - Tolerations []v1.TolerationApplyConfiguration `json:"tolerations,omitempty"` + // nodeSelector lists labels that must be present on nodes that support this + // RuntimeClass. Pods using this RuntimeClass can only be scheduled to a + // node matched by this selector. The RuntimeClass nodeSelector is merged + // with a pod's existing nodeSelector. Any conflicts will cause the pod to + // be rejected in admission. + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + // tolerations are appended (excluding duplicates) to pods running with this + // RuntimeClass during admission, effectively unioning the set of nodes + // tolerated by the pod and the RuntimeClass. + Tolerations []v1.TolerationApplyConfiguration `json:"tolerations,omitempty"` } // SchedulingApplyConfiguration constructs a declarative configuration of the Scheduling type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/eviction.go b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/eviction.go index da18b73a22689..bd944a5e8b948 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/eviction.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/eviction.go @@ -29,10 +29,16 @@ import ( // EvictionApplyConfiguration represents a declarative configuration of the Eviction type for use // with apply. +// +// Eviction evicts a pod from its node subject to certain policies and safety constraints. +// This is a subresource of Pod. A request to cause such an eviction is +// created by POSTing to .../pods//evictions. type EvictionApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // ObjectMeta describes the pod that is being evicted. *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - DeleteOptions *metav1.DeleteOptionsApplyConfiguration `json:"deleteOptions,omitempty"` + // DeleteOptions may be provided + DeleteOptions *metav1.DeleteOptionsApplyConfiguration `json:"deleteOptions,omitempty"` } // Eviction constructs a declarative configuration of the Eviction type for use with @@ -46,29 +52,14 @@ func Eviction(name, namespace string) *EvictionApplyConfiguration { return b } -// ExtractEviction extracts the applied configuration owned by fieldManager from -// eviction. If no managedFields are found in eviction for fieldManager, a -// EvictionApplyConfiguration 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. +// ExtractEvictionFrom extracts the applied configuration owned by fieldManager from +// eviction for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // eviction must be a unmodified Eviction API object that was retrieved from the Kubernetes API. -// ExtractEviction provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractEvictionFrom 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 ExtractEviction(eviction *policyv1.Eviction, fieldManager string) (*EvictionApplyConfiguration, error) { - return extractEviction(eviction, fieldManager, "") -} - -// ExtractEvictionStatus is the same as ExtractEviction except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractEvictionStatus(eviction *policyv1.Eviction, fieldManager string) (*EvictionApplyConfiguration, error) { - return extractEviction(eviction, fieldManager, "status") -} - -func extractEviction(eviction *policyv1.Eviction, fieldManager string, subresource string) (*EvictionApplyConfiguration, error) { +func ExtractEvictionFrom(eviction *policyv1.Eviction, fieldManager string, subresource string) (*EvictionApplyConfiguration, error) { b := &EvictionApplyConfiguration{} err := managedfields.ExtractInto(eviction, internal.Parser().Type("io.k8s.api.policy.v1.Eviction"), fieldManager, b, subresource) if err != nil { @@ -81,6 +72,21 @@ func extractEviction(eviction *policyv1.Eviction, fieldManager string, subresour b.WithAPIVersion("policy/v1") return b, nil } + +// ExtractEviction extracts the applied configuration owned by fieldManager from +// eviction. If no managedFields are found in eviction for fieldManager, a +// EvictionApplyConfiguration 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. +// eviction must be a unmodified Eviction API object that was retrieved from the Kubernetes API. +// ExtractEviction 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. +func ExtractEviction(eviction *policyv1.Eviction, fieldManager string) (*EvictionApplyConfiguration, error) { + return ExtractEvictionFrom(eviction, fieldManager, "") +} + func (b EvictionApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudget.go index 995a4f661b9ff..c9d4fd1a605f5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudget.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudget.go @@ -29,11 +29,17 @@ import ( // PodDisruptionBudgetApplyConfiguration represents a declarative configuration of the PodDisruptionBudget type for use // with apply. +// +// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods type PodDisruptionBudgetApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PodDisruptionBudgetSpecApplyConfiguration `json:"spec,omitempty"` - Status *PodDisruptionBudgetStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of the PodDisruptionBudget. + Spec *PodDisruptionBudgetSpecApplyConfiguration `json:"spec,omitempty"` + // Most recently observed status of the PodDisruptionBudget. + Status *PodDisruptionBudgetStatusApplyConfiguration `json:"status,omitempty"` } // PodDisruptionBudget constructs a declarative configuration of the PodDisruptionBudget type for use with @@ -47,6 +53,27 @@ func PodDisruptionBudget(name, namespace string) *PodDisruptionBudgetApplyConfig return b } +// ExtractPodDisruptionBudgetFrom extracts the applied configuration owned by fieldManager from +// podDisruptionBudget for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// podDisruptionBudget must be a unmodified PodDisruptionBudget API object that was retrieved from the Kubernetes API. +// ExtractPodDisruptionBudgetFrom 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. +func ExtractPodDisruptionBudgetFrom(podDisruptionBudget *policyv1.PodDisruptionBudget, fieldManager string, subresource string) (*PodDisruptionBudgetApplyConfiguration, error) { + b := &PodDisruptionBudgetApplyConfiguration{} + err := managedfields.ExtractInto(podDisruptionBudget, internal.Parser().Type("io.k8s.api.policy.v1.PodDisruptionBudget"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(podDisruptionBudget.Name) + b.WithNamespace(podDisruptionBudget.Namespace) + + b.WithKind("PodDisruptionBudget") + b.WithAPIVersion("policy/v1") + return b, nil +} + // ExtractPodDisruptionBudget extracts the applied configuration owned by fieldManager from // podDisruptionBudget. If no managedFields are found in podDisruptionBudget for fieldManager, a // PodDisruptionBudgetApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +84,16 @@ func PodDisruptionBudget(name, namespace string) *PodDisruptionBudgetApplyConfig // ExtractPodDisruptionBudget 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 ExtractPodDisruptionBudget(podDisruptionBudget *policyv1.PodDisruptionBudget, fieldManager string) (*PodDisruptionBudgetApplyConfiguration, error) { - return extractPodDisruptionBudget(podDisruptionBudget, fieldManager, "") + return ExtractPodDisruptionBudgetFrom(podDisruptionBudget, fieldManager, "") } -// ExtractPodDisruptionBudgetStatus is the same as ExtractPodDisruptionBudget except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractPodDisruptionBudgetStatus extracts the applied configuration owned by fieldManager from +// podDisruptionBudget for the status subresource. func ExtractPodDisruptionBudgetStatus(podDisruptionBudget *policyv1.PodDisruptionBudget, fieldManager string) (*PodDisruptionBudgetApplyConfiguration, error) { - return extractPodDisruptionBudget(podDisruptionBudget, fieldManager, "status") + return ExtractPodDisruptionBudgetFrom(podDisruptionBudget, fieldManager, "status") } -func extractPodDisruptionBudget(podDisruptionBudget *policyv1.PodDisruptionBudget, fieldManager string, subresource string) (*PodDisruptionBudgetApplyConfiguration, error) { - b := &PodDisruptionBudgetApplyConfiguration{} - err := managedfields.ExtractInto(podDisruptionBudget, internal.Parser().Type("io.k8s.api.policy.v1.PodDisruptionBudget"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(podDisruptionBudget.Name) - b.WithNamespace(podDisruptionBudget.Namespace) - - b.WithKind("PodDisruptionBudget") - b.WithAPIVersion("policy/v1") - return b, nil -} func (b PodDisruptionBudgetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudgetspec.go b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudgetspec.go index 3c66739bd5c38..0d2307332b68b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudgetspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudgetspec.go @@ -26,10 +26,46 @@ import ( // PodDisruptionBudgetSpecApplyConfiguration represents a declarative configuration of the PodDisruptionBudgetSpec type for use // with apply. +// +// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. type PodDisruptionBudgetSpecApplyConfiguration struct { - MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty"` - Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` + // An eviction is allowed if at least "minAvailable" pods selected by + // "selector" will still be available after the eviction, i.e. even in the + // absence of the evicted pod. So for example you can prevent all voluntary + // evictions by specifying "100%". + MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty"` + // Label query over pods whose evictions are managed by the disruption + // budget. + // A null selector will match no pods, while an empty ({}) selector will select + // all pods within the namespace. + Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // An eviction is allowed if at most "maxUnavailable" pods selected by + // "selector" are unavailable after the eviction, i.e. even in absence of + // the evicted pod. For example, one can prevent all voluntary evictions + // by specifying 0. This is a mutually exclusive setting with "minAvailable". + MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` + // UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods + // should be considered for eviction. Current implementation considers healthy pods, + // as pods that have status.conditions item with type="Ready",status="True". + // + // Valid policies are IfHealthyBudget and AlwaysAllow. + // If no policy is specified, the default behavior will be used, + // which corresponds to the IfHealthyBudget policy. + // + // IfHealthyBudget policy means that running pods (status.phase="Running"), + // but not yet healthy can be evicted only if the guarded application is not + // disrupted (status.currentHealthy is at least equal to status.desiredHealthy). + // Healthy pods will be subject to the PDB for eviction. + // + // AlwaysAllow policy means that all running pods (status.phase="Running"), + // but not yet healthy are considered disrupted and can be evicted regardless + // of whether the criteria in a PDB is met. This means perspective running + // pods of a disrupted application might not get a chance to become healthy. + // Healthy pods will be subject to the PDB for eviction. + // + // Additional policies may be added in the future. + // Clients making eviction decisions should disallow eviction of unhealthy pods + // if they encounter an unrecognized policy in this field. UnhealthyPodEvictionPolicy *policyv1.UnhealthyPodEvictionPolicyType `json:"unhealthyPodEvictionPolicy,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudgetstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudgetstatus.go index d3c44d90ab115..7e05f15076789 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudgetstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudgetstatus.go @@ -25,14 +25,46 @@ import ( // PodDisruptionBudgetStatusApplyConfiguration represents a declarative configuration of the PodDisruptionBudgetStatus type for use // with apply. +// +// PodDisruptionBudgetStatus represents information about the status of a +// PodDisruptionBudget. Status may trail the actual state of a system. type PodDisruptionBudgetStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - DisruptedPods map[string]metav1.Time `json:"disruptedPods,omitempty"` - DisruptionsAllowed *int32 `json:"disruptionsAllowed,omitempty"` - CurrentHealthy *int32 `json:"currentHealthy,omitempty"` - DesiredHealthy *int32 `json:"desiredHealthy,omitempty"` - ExpectedPods *int32 `json:"expectedPods,omitempty"` - Conditions []applyconfigurationsmetav1.ConditionApplyConfiguration `json:"conditions,omitempty"` + // Most recent generation observed when updating this PDB status. DisruptionsAllowed and other + // status information is valid only if observedGeneration equals to PDB's object generation. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // DisruptedPods contains information about pods whose eviction was + // processed by the API server eviction subresource handler but has not + // yet been observed by the PodDisruptionBudget controller. + // A pod will be in this map from the time when the API server processed the + // eviction request to the time when the pod is seen by PDB controller + // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod + // and the value is the time when the API server processed the eviction request. If + // the deletion didn't occur and a pod is still there it will be removed from + // the list automatically by PodDisruptionBudget controller after some time. + // If everything goes smooth this map should be empty for the most of the time. + // Large number of entries in the map may indicate problems with pod deletions. + DisruptedPods map[string]metav1.Time `json:"disruptedPods,omitempty"` + // Number of pod disruptions that are currently allowed. + DisruptionsAllowed *int32 `json:"disruptionsAllowed,omitempty"` + // current number of healthy pods + CurrentHealthy *int32 `json:"currentHealthy,omitempty"` + // minimum desired number of healthy pods + DesiredHealthy *int32 `json:"desiredHealthy,omitempty"` + // total number of pods counted by this disruption budget + ExpectedPods *int32 `json:"expectedPods,omitempty"` + // Conditions contain conditions for PDB. The disruption controller sets the + // DisruptionAllowed condition. The following are known values for the reason field + // (additional reasons could be added in the future): + // - SyncFailed: The controller encountered an error and wasn't able to compute + // the number of allowed disruptions. Therefore no disruptions are + // allowed and the status of the condition will be False. + // - InsufficientPods: The number of pods are either at or below the number + // required by the PodDisruptionBudget. No disruptions are + // allowed and the status of the condition will be False. + // - SufficientPods: There are more pods than required by the PodDisruptionBudget. + // The condition will be True, and the number of allowed + // disruptions are provided by the disruptionsAllowed property. + Conditions []applyconfigurationsmetav1.ConditionApplyConfiguration `json:"conditions,omitempty"` } // PodDisruptionBudgetStatusApplyConfiguration constructs a declarative configuration of the PodDisruptionBudgetStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/eviction.go b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/eviction.go index be0f1c1c1b10b..eeadbbcb7d7b9 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/eviction.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/eviction.go @@ -29,10 +29,16 @@ import ( // EvictionApplyConfiguration represents a declarative configuration of the Eviction type for use // with apply. +// +// Eviction evicts a pod from its node subject to certain policies and safety constraints. +// This is a subresource of Pod. A request to cause such an eviction is +// created by POSTing to .../pods//evictions. type EvictionApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // ObjectMeta describes the pod that is being evicted. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - DeleteOptions *v1.DeleteOptionsApplyConfiguration `json:"deleteOptions,omitempty"` + // DeleteOptions may be provided + DeleteOptions *v1.DeleteOptionsApplyConfiguration `json:"deleteOptions,omitempty"` } // Eviction constructs a declarative configuration of the Eviction type for use with @@ -46,29 +52,14 @@ func Eviction(name, namespace string) *EvictionApplyConfiguration { return b } -// ExtractEviction extracts the applied configuration owned by fieldManager from -// eviction. If no managedFields are found in eviction for fieldManager, a -// EvictionApplyConfiguration 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. +// ExtractEvictionFrom extracts the applied configuration owned by fieldManager from +// eviction for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // eviction must be a unmodified Eviction API object that was retrieved from the Kubernetes API. -// ExtractEviction provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractEvictionFrom 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 ExtractEviction(eviction *policyv1beta1.Eviction, fieldManager string) (*EvictionApplyConfiguration, error) { - return extractEviction(eviction, fieldManager, "") -} - -// ExtractEvictionStatus is the same as ExtractEviction except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractEvictionStatus(eviction *policyv1beta1.Eviction, fieldManager string) (*EvictionApplyConfiguration, error) { - return extractEviction(eviction, fieldManager, "status") -} - -func extractEviction(eviction *policyv1beta1.Eviction, fieldManager string, subresource string) (*EvictionApplyConfiguration, error) { +func ExtractEvictionFrom(eviction *policyv1beta1.Eviction, fieldManager string, subresource string) (*EvictionApplyConfiguration, error) { b := &EvictionApplyConfiguration{} err := managedfields.ExtractInto(eviction, internal.Parser().Type("io.k8s.api.policy.v1beta1.Eviction"), fieldManager, b, subresource) if err != nil { @@ -81,6 +72,21 @@ func extractEviction(eviction *policyv1beta1.Eviction, fieldManager string, subr b.WithAPIVersion("policy/v1beta1") return b, nil } + +// ExtractEviction extracts the applied configuration owned by fieldManager from +// eviction. If no managedFields are found in eviction for fieldManager, a +// EvictionApplyConfiguration 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. +// eviction must be a unmodified Eviction API object that was retrieved from the Kubernetes API. +// ExtractEviction 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. +func ExtractEviction(eviction *policyv1beta1.Eviction, fieldManager string) (*EvictionApplyConfiguration, error) { + return ExtractEvictionFrom(eviction, fieldManager, "") +} + func (b EvictionApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudget.go index 159f19eae9f2e..ca2d839daa86c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudget.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudget.go @@ -29,11 +29,17 @@ import ( // PodDisruptionBudgetApplyConfiguration represents a declarative configuration of the PodDisruptionBudget type for use // with apply. +// +// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods type PodDisruptionBudgetApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PodDisruptionBudgetSpecApplyConfiguration `json:"spec,omitempty"` - Status *PodDisruptionBudgetStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of the PodDisruptionBudget. + Spec *PodDisruptionBudgetSpecApplyConfiguration `json:"spec,omitempty"` + // Most recently observed status of the PodDisruptionBudget. + Status *PodDisruptionBudgetStatusApplyConfiguration `json:"status,omitempty"` } // PodDisruptionBudget constructs a declarative configuration of the PodDisruptionBudget type for use with @@ -47,6 +53,27 @@ func PodDisruptionBudget(name, namespace string) *PodDisruptionBudgetApplyConfig return b } +// ExtractPodDisruptionBudgetFrom extracts the applied configuration owned by fieldManager from +// podDisruptionBudget for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// podDisruptionBudget must be a unmodified PodDisruptionBudget API object that was retrieved from the Kubernetes API. +// ExtractPodDisruptionBudgetFrom 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. +func ExtractPodDisruptionBudgetFrom(podDisruptionBudget *policyv1beta1.PodDisruptionBudget, fieldManager string, subresource string) (*PodDisruptionBudgetApplyConfiguration, error) { + b := &PodDisruptionBudgetApplyConfiguration{} + err := managedfields.ExtractInto(podDisruptionBudget, internal.Parser().Type("io.k8s.api.policy.v1beta1.PodDisruptionBudget"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(podDisruptionBudget.Name) + b.WithNamespace(podDisruptionBudget.Namespace) + + b.WithKind("PodDisruptionBudget") + b.WithAPIVersion("policy/v1beta1") + return b, nil +} + // ExtractPodDisruptionBudget extracts the applied configuration owned by fieldManager from // podDisruptionBudget. If no managedFields are found in podDisruptionBudget for fieldManager, a // PodDisruptionBudgetApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +84,16 @@ func PodDisruptionBudget(name, namespace string) *PodDisruptionBudgetApplyConfig // ExtractPodDisruptionBudget 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 ExtractPodDisruptionBudget(podDisruptionBudget *policyv1beta1.PodDisruptionBudget, fieldManager string) (*PodDisruptionBudgetApplyConfiguration, error) { - return extractPodDisruptionBudget(podDisruptionBudget, fieldManager, "") + return ExtractPodDisruptionBudgetFrom(podDisruptionBudget, fieldManager, "") } -// ExtractPodDisruptionBudgetStatus is the same as ExtractPodDisruptionBudget except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractPodDisruptionBudgetStatus extracts the applied configuration owned by fieldManager from +// podDisruptionBudget for the status subresource. func ExtractPodDisruptionBudgetStatus(podDisruptionBudget *policyv1beta1.PodDisruptionBudget, fieldManager string) (*PodDisruptionBudgetApplyConfiguration, error) { - return extractPodDisruptionBudget(podDisruptionBudget, fieldManager, "status") + return ExtractPodDisruptionBudgetFrom(podDisruptionBudget, fieldManager, "status") } -func extractPodDisruptionBudget(podDisruptionBudget *policyv1beta1.PodDisruptionBudget, fieldManager string, subresource string) (*PodDisruptionBudgetApplyConfiguration, error) { - b := &PodDisruptionBudgetApplyConfiguration{} - err := managedfields.ExtractInto(podDisruptionBudget, internal.Parser().Type("io.k8s.api.policy.v1beta1.PodDisruptionBudget"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(podDisruptionBudget.Name) - b.WithNamespace(podDisruptionBudget.Namespace) - - b.WithKind("PodDisruptionBudget") - b.WithAPIVersion("policy/v1beta1") - return b, nil -} func (b PodDisruptionBudgetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudgetspec.go b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudgetspec.go index d8fecf7a36ead..1fe247b48905e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudgetspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudgetspec.go @@ -26,10 +26,47 @@ import ( // PodDisruptionBudgetSpecApplyConfiguration represents a declarative configuration of the PodDisruptionBudgetSpec type for use // with apply. +// +// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. type PodDisruptionBudgetSpecApplyConfiguration struct { - MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty"` - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` - MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` + // An eviction is allowed if at least "minAvailable" pods selected by + // "selector" will still be available after the eviction, i.e. even in the + // absence of the evicted pod. So for example you can prevent all voluntary + // evictions by specifying "100%". + MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty"` + // Label query over pods whose evictions are managed by the disruption + // budget. + // A null selector selects no pods. + // An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. + // In policy/v1, an empty selector will select all pods in the namespace. + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // An eviction is allowed if at most "maxUnavailable" pods selected by + // "selector" are unavailable after the eviction, i.e. even in absence of + // the evicted pod. For example, one can prevent all voluntary evictions + // by specifying 0. This is a mutually exclusive setting with "minAvailable". + MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` + // UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods + // should be considered for eviction. Current implementation considers healthy pods, + // as pods that have status.conditions item with type="Ready",status="True". + // + // Valid policies are IfHealthyBudget and AlwaysAllow. + // If no policy is specified, the default behavior will be used, + // which corresponds to the IfHealthyBudget policy. + // + // IfHealthyBudget policy means that running pods (status.phase="Running"), + // but not yet healthy can be evicted only if the guarded application is not + // disrupted (status.currentHealthy is at least equal to status.desiredHealthy). + // Healthy pods will be subject to the PDB for eviction. + // + // AlwaysAllow policy means that all running pods (status.phase="Running"), + // but not yet healthy are considered disrupted and can be evicted regardless + // of whether the criteria in a PDB is met. This means perspective running + // pods of a disrupted application might not get a chance to become healthy. + // Healthy pods will be subject to the PDB for eviction. + // + // Additional policies may be added in the future. + // Clients making eviction decisions should disallow eviction of unhealthy pods + // if they encounter an unrecognized policy in this field. UnhealthyPodEvictionPolicy *policyv1beta1.UnhealthyPodEvictionPolicyType `json:"unhealthyPodEvictionPolicy,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudgetstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudgetstatus.go index e66a7fb3861c6..e7faa861d4453 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudgetstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudgetstatus.go @@ -25,14 +25,46 @@ import ( // PodDisruptionBudgetStatusApplyConfiguration represents a declarative configuration of the PodDisruptionBudgetStatus type for use // with apply. +// +// PodDisruptionBudgetStatus represents information about the status of a +// PodDisruptionBudget. Status may trail the actual state of a system. type PodDisruptionBudgetStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - DisruptedPods map[string]v1.Time `json:"disruptedPods,omitempty"` - DisruptionsAllowed *int32 `json:"disruptionsAllowed,omitempty"` - CurrentHealthy *int32 `json:"currentHealthy,omitempty"` - DesiredHealthy *int32 `json:"desiredHealthy,omitempty"` - ExpectedPods *int32 `json:"expectedPods,omitempty"` - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` + // Most recent generation observed when updating this PDB status. DisruptionsAllowed and other + // status information is valid only if observedGeneration equals to PDB's object generation. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // DisruptedPods contains information about pods whose eviction was + // processed by the API server eviction subresource handler but has not + // yet been observed by the PodDisruptionBudget controller. + // A pod will be in this map from the time when the API server processed the + // eviction request to the time when the pod is seen by PDB controller + // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod + // and the value is the time when the API server processed the eviction request. If + // the deletion didn't occur and a pod is still there it will be removed from + // the list automatically by PodDisruptionBudget controller after some time. + // If everything goes smooth this map should be empty for the most of the time. + // Large number of entries in the map may indicate problems with pod deletions. + DisruptedPods map[string]v1.Time `json:"disruptedPods,omitempty"` + // Number of pod disruptions that are currently allowed. + DisruptionsAllowed *int32 `json:"disruptionsAllowed,omitempty"` + // current number of healthy pods + CurrentHealthy *int32 `json:"currentHealthy,omitempty"` + // minimum desired number of healthy pods + DesiredHealthy *int32 `json:"desiredHealthy,omitempty"` + // total number of pods counted by this disruption budget + ExpectedPods *int32 `json:"expectedPods,omitempty"` + // Conditions contain conditions for PDB. The disruption controller sets the + // DisruptionAllowed condition. The following are known values for the reason field + // (additional reasons could be added in the future): + // - SyncFailed: The controller encountered an error and wasn't able to compute + // the number of allowed disruptions. Therefore no disruptions are + // allowed and the status of the condition will be False. + // - InsufficientPods: The number of pods are either at or below the number + // required by the PodDisruptionBudget. No disruptions are + // allowed and the status of the condition will be False. + // - SufficientPods: There are more pods than required by the PodDisruptionBudget. + // The condition will be True, and the number of allowed + // disruptions are provided by the disruptionsAllowed property. + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` } // PodDisruptionBudgetStatusApplyConfiguration constructs a declarative configuration of the PodDisruptionBudgetStatus type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/aggregationrule.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/aggregationrule.go index b7049a8efae19..6f44e79795382 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/aggregationrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/aggregationrule.go @@ -24,7 +24,11 @@ import ( // AggregationRuleApplyConfiguration represents a declarative configuration of the AggregationRule type for use // with apply. +// +// AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole type AggregationRuleApplyConfiguration struct { + // ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. + // If any of the selectors match, then the ClusterRole's permissions will be added ClusterRoleSelectors []metav1.LabelSelectorApplyConfiguration `json:"clusterRoleSelectors,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrole.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrole.go index b8634870ea09e..d65387e24953d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrole.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrole.go @@ -29,11 +29,18 @@ import ( // ClusterRoleApplyConfiguration represents a declarative configuration of the ClusterRole type for use // with apply. +// +// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. type ClusterRoleApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` - AggregationRule *AggregationRuleApplyConfiguration `json:"aggregationRule,omitempty"` + // Rules holds all the PolicyRules for this ClusterRole + Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` + // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. + // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be + // stomped by the controller. + AggregationRule *AggregationRuleApplyConfiguration `json:"aggregationRule,omitempty"` } // ClusterRole constructs a declarative configuration of the ClusterRole type for use with @@ -46,29 +53,14 @@ func ClusterRole(name string) *ClusterRoleApplyConfiguration { return b } -// ExtractClusterRole extracts the applied configuration owned by fieldManager from -// clusterRole. If no managedFields are found in clusterRole for fieldManager, a -// ClusterRoleApplyConfiguration 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. +// ExtractClusterRoleFrom extracts the applied configuration owned by fieldManager from +// clusterRole for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // clusterRole must be a unmodified ClusterRole API object that was retrieved from the Kubernetes API. -// ExtractClusterRole provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractClusterRoleFrom 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 ExtractClusterRole(clusterRole *rbacv1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) { - return extractClusterRole(clusterRole, fieldManager, "") -} - -// ExtractClusterRoleStatus is the same as ExtractClusterRole except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractClusterRoleStatus(clusterRole *rbacv1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) { - return extractClusterRole(clusterRole, fieldManager, "status") -} - -func extractClusterRole(clusterRole *rbacv1.ClusterRole, fieldManager string, subresource string) (*ClusterRoleApplyConfiguration, error) { +func ExtractClusterRoleFrom(clusterRole *rbacv1.ClusterRole, fieldManager string, subresource string) (*ClusterRoleApplyConfiguration, error) { b := &ClusterRoleApplyConfiguration{} err := managedfields.ExtractInto(clusterRole, internal.Parser().Type("io.k8s.api.rbac.v1.ClusterRole"), fieldManager, b, subresource) if err != nil { @@ -80,6 +72,21 @@ func extractClusterRole(clusterRole *rbacv1.ClusterRole, fieldManager string, su b.WithAPIVersion("rbac.authorization.k8s.io/v1") return b, nil } + +// ExtractClusterRole extracts the applied configuration owned by fieldManager from +// clusterRole. If no managedFields are found in clusterRole for fieldManager, a +// ClusterRoleApplyConfiguration 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. +// clusterRole must be a unmodified ClusterRole API object that was retrieved from the Kubernetes API. +// ExtractClusterRole 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. +func ExtractClusterRole(clusterRole *rbacv1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) { + return ExtractClusterRoleFrom(clusterRole, fieldManager, "") +} + func (b ClusterRoleApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrolebinding.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrolebinding.go index 0fd5a9514aa96..13d3d0201fc7f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrolebinding.go @@ -29,11 +29,19 @@ import ( // ClusterRoleBindingApplyConfiguration represents a declarative configuration of the ClusterRoleBinding type for use // with apply. +// +// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, +// and adds who information via Subject. type ClusterRoleBindingApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` - RoleRef *RoleRefApplyConfiguration `json:"roleRef,omitempty"` + // Subjects holds references to the objects the role applies to. + Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` + // RoleRef can only reference a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + // This field is immutable. + RoleRef *RoleRefApplyConfiguration `json:"roleRef,omitempty"` } // ClusterRoleBinding constructs a declarative configuration of the ClusterRoleBinding type for use with @@ -46,29 +54,14 @@ func ClusterRoleBinding(name string) *ClusterRoleBindingApplyConfiguration { return b } -// ExtractClusterRoleBinding extracts the applied configuration owned by fieldManager from -// clusterRoleBinding. If no managedFields are found in clusterRoleBinding for fieldManager, a -// ClusterRoleBindingApplyConfiguration 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. +// ExtractClusterRoleBindingFrom extracts the applied configuration owned by fieldManager from +// clusterRoleBinding for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // clusterRoleBinding must be a unmodified ClusterRoleBinding API object that was retrieved from the Kubernetes API. -// ExtractClusterRoleBinding provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractClusterRoleBindingFrom 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 ExtractClusterRoleBinding(clusterRoleBinding *rbacv1.ClusterRoleBinding, fieldManager string) (*ClusterRoleBindingApplyConfiguration, error) { - return extractClusterRoleBinding(clusterRoleBinding, fieldManager, "") -} - -// ExtractClusterRoleBindingStatus is the same as ExtractClusterRoleBinding except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractClusterRoleBindingStatus(clusterRoleBinding *rbacv1.ClusterRoleBinding, fieldManager string) (*ClusterRoleBindingApplyConfiguration, error) { - return extractClusterRoleBinding(clusterRoleBinding, fieldManager, "status") -} - -func extractClusterRoleBinding(clusterRoleBinding *rbacv1.ClusterRoleBinding, fieldManager string, subresource string) (*ClusterRoleBindingApplyConfiguration, error) { +func ExtractClusterRoleBindingFrom(clusterRoleBinding *rbacv1.ClusterRoleBinding, fieldManager string, subresource string) (*ClusterRoleBindingApplyConfiguration, error) { b := &ClusterRoleBindingApplyConfiguration{} err := managedfields.ExtractInto(clusterRoleBinding, internal.Parser().Type("io.k8s.api.rbac.v1.ClusterRoleBinding"), fieldManager, b, subresource) if err != nil { @@ -80,6 +73,21 @@ func extractClusterRoleBinding(clusterRoleBinding *rbacv1.ClusterRoleBinding, fi b.WithAPIVersion("rbac.authorization.k8s.io/v1") return b, nil } + +// ExtractClusterRoleBinding extracts the applied configuration owned by fieldManager from +// clusterRoleBinding. If no managedFields are found in clusterRoleBinding for fieldManager, a +// ClusterRoleBindingApplyConfiguration 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. +// clusterRoleBinding must be a unmodified ClusterRoleBinding API object that was retrieved from the Kubernetes API. +// ExtractClusterRoleBinding 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. +func ExtractClusterRoleBinding(clusterRoleBinding *rbacv1.ClusterRoleBinding, fieldManager string) (*ClusterRoleBindingApplyConfiguration, error) { + return ExtractClusterRoleBindingFrom(clusterRoleBinding, fieldManager, "") +} + func (b ClusterRoleBindingApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/policyrule.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/policyrule.go index a2e66d1096a95..03556b01c4cfe 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/policyrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/policyrule.go @@ -20,11 +20,26 @@ package v1 // PolicyRuleApplyConfiguration represents a declarative configuration of the PolicyRule type for use // with apply. +// +// Authorization is calculated against +// 1. evaluation of ClusterRoleBindings - short circuit on match +// 2. evaluation of RoleBindings in the namespace requested - short circuit on match +// 3. deny by default +// PolicyRule holds information that describes a policy rule, but does not contain information +// about who the rule applies to or which namespace the rule applies to. type PolicyRuleApplyConfiguration struct { - Verbs []string `json:"verbs,omitempty"` - APIGroups []string `json:"apiGroups,omitempty"` - Resources []string `json:"resources,omitempty"` - ResourceNames []string `json:"resourceNames,omitempty"` + // Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs. + Verbs []string `json:"verbs,omitempty"` + // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of + // the enumerated resources in any API group will be allowed. "" represents the core API group and "*" represents all API groups. + APIGroups []string `json:"apiGroups,omitempty"` + // Resources is a list of resources this rule applies to. '*' represents all resources. + Resources []string `json:"resources,omitempty"` + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + ResourceNames []string `json:"resourceNames,omitempty"` + // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path + // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. + // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. NonResourceURLs []string `json:"nonResourceURLs,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/role.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/role.go index 1a363eebb93f0..9e2895b1a8f71 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/role.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/role.go @@ -29,10 +29,14 @@ import ( // RoleApplyConfiguration represents a declarative configuration of the Role type for use // with apply. +// +// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. type RoleApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` + // Rules holds all the PolicyRules for this Role + Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` } // Role constructs a declarative configuration of the Role type for use with @@ -46,29 +50,14 @@ func Role(name, namespace string) *RoleApplyConfiguration { return b } -// ExtractRole extracts the applied configuration owned by fieldManager from -// role. If no managedFields are found in role for fieldManager, a -// RoleApplyConfiguration 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. +// ExtractRoleFrom extracts the applied configuration owned by fieldManager from +// role for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // role must be a unmodified Role API object that was retrieved from the Kubernetes API. -// ExtractRole provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractRoleFrom 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 ExtractRole(role *rbacv1.Role, fieldManager string) (*RoleApplyConfiguration, error) { - return extractRole(role, fieldManager, "") -} - -// ExtractRoleStatus is the same as ExtractRole except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractRoleStatus(role *rbacv1.Role, fieldManager string) (*RoleApplyConfiguration, error) { - return extractRole(role, fieldManager, "status") -} - -func extractRole(role *rbacv1.Role, fieldManager string, subresource string) (*RoleApplyConfiguration, error) { +func ExtractRoleFrom(role *rbacv1.Role, fieldManager string, subresource string) (*RoleApplyConfiguration, error) { b := &RoleApplyConfiguration{} err := managedfields.ExtractInto(role, internal.Parser().Type("io.k8s.api.rbac.v1.Role"), fieldManager, b, subresource) if err != nil { @@ -81,6 +70,21 @@ func extractRole(role *rbacv1.Role, fieldManager string, subresource string) (*R b.WithAPIVersion("rbac.authorization.k8s.io/v1") return b, nil } + +// ExtractRole extracts the applied configuration owned by fieldManager from +// role. If no managedFields are found in role for fieldManager, a +// RoleApplyConfiguration 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. +// role must be a unmodified Role API object that was retrieved from the Kubernetes API. +// ExtractRole 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. +func ExtractRole(role *rbacv1.Role, fieldManager string) (*RoleApplyConfiguration, error) { + return ExtractRoleFrom(role, fieldManager, "") +} + func (b RoleApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/rolebinding.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/rolebinding.go index fcda064c0ba1d..776fb3ed300f8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/rolebinding.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/rolebinding.go @@ -29,11 +29,20 @@ import ( // RoleBindingApplyConfiguration represents a declarative configuration of the RoleBinding type for use // with apply. +// +// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. +// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given +// namespace only have effect in that namespace. type RoleBindingApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` - RoleRef *RoleRefApplyConfiguration `json:"roleRef,omitempty"` + // Subjects holds references to the objects the role applies to. + Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` + // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + // This field is immutable. + RoleRef *RoleRefApplyConfiguration `json:"roleRef,omitempty"` } // RoleBinding constructs a declarative configuration of the RoleBinding type for use with @@ -47,29 +56,14 @@ func RoleBinding(name, namespace string) *RoleBindingApplyConfiguration { return b } -// ExtractRoleBinding extracts the applied configuration owned by fieldManager from -// roleBinding. If no managedFields are found in roleBinding for fieldManager, a -// RoleBindingApplyConfiguration 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. +// ExtractRoleBindingFrom extracts the applied configuration owned by fieldManager from +// roleBinding for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // roleBinding must be a unmodified RoleBinding API object that was retrieved from the Kubernetes API. -// ExtractRoleBinding provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractRoleBindingFrom 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 ExtractRoleBinding(roleBinding *rbacv1.RoleBinding, fieldManager string) (*RoleBindingApplyConfiguration, error) { - return extractRoleBinding(roleBinding, fieldManager, "") -} - -// ExtractRoleBindingStatus is the same as ExtractRoleBinding except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractRoleBindingStatus(roleBinding *rbacv1.RoleBinding, fieldManager string) (*RoleBindingApplyConfiguration, error) { - return extractRoleBinding(roleBinding, fieldManager, "status") -} - -func extractRoleBinding(roleBinding *rbacv1.RoleBinding, fieldManager string, subresource string) (*RoleBindingApplyConfiguration, error) { +func ExtractRoleBindingFrom(roleBinding *rbacv1.RoleBinding, fieldManager string, subresource string) (*RoleBindingApplyConfiguration, error) { b := &RoleBindingApplyConfiguration{} err := managedfields.ExtractInto(roleBinding, internal.Parser().Type("io.k8s.api.rbac.v1.RoleBinding"), fieldManager, b, subresource) if err != nil { @@ -82,6 +76,21 @@ func extractRoleBinding(roleBinding *rbacv1.RoleBinding, fieldManager string, su b.WithAPIVersion("rbac.authorization.k8s.io/v1") return b, nil } + +// ExtractRoleBinding extracts the applied configuration owned by fieldManager from +// roleBinding. If no managedFields are found in roleBinding for fieldManager, a +// RoleBindingApplyConfiguration 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. +// roleBinding must be a unmodified RoleBinding API object that was retrieved from the Kubernetes API. +// ExtractRoleBinding 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. +func ExtractRoleBinding(roleBinding *rbacv1.RoleBinding, fieldManager string) (*RoleBindingApplyConfiguration, error) { + return ExtractRoleBindingFrom(roleBinding, fieldManager, "") +} + func (b RoleBindingApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/roleref.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/roleref.go index 646a3bb194d8e..231fe0dd49279 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/roleref.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/roleref.go @@ -20,10 +20,15 @@ package v1 // RoleRefApplyConfiguration represents a declarative configuration of the RoleRef type for use // with apply. +// +// RoleRef contains information that points to the role being used type RoleRefApplyConfiguration struct { + // APIGroup is the group for the resource being referenced APIGroup *string `json:"apiGroup,omitempty"` - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` + // Kind is the type of resource being referenced + Kind *string `json:"kind,omitempty"` + // Name is the name of resource being referenced + Name *string `json:"name,omitempty"` } // RoleRefApplyConfiguration constructs a declarative configuration of the RoleRef type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/subject.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/subject.go index e1d9c5cfb8142..1914086c0fc3f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/subject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/subject.go @@ -20,10 +20,21 @@ package v1 // SubjectApplyConfiguration represents a declarative configuration of the Subject type for use // with apply. +// +// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, +// or a value for non-objects such as user and group names. type SubjectApplyConfiguration struct { - Kind *string `json:"kind,omitempty"` - APIGroup *string `json:"apiGroup,omitempty"` - Name *string `json:"name,omitempty"` + // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". + // If the Authorizer does not recognized the kind value, the Authorizer should report an error. + Kind *string `json:"kind,omitempty"` + // APIGroup holds the API group of the referenced subject. + // Defaults to "" for ServiceAccount subjects. + // Defaults to "rbac.authorization.k8s.io" for User and Group subjects. + APIGroup *string `json:"apiGroup,omitempty"` + // Name of the object being referenced. + Name *string `json:"name,omitempty"` + // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty + // the Authorizer should report an error. Namespace *string `json:"namespace,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/aggregationrule.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/aggregationrule.go index ff4aeb59e5e10..397d14a1acde6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/aggregationrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/aggregationrule.go @@ -24,7 +24,11 @@ import ( // AggregationRuleApplyConfiguration represents a declarative configuration of the AggregationRule type for use // with apply. +// +// AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole type AggregationRuleApplyConfiguration struct { + // ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. + // If any of the selectors match, then the ClusterRole's permissions will be added ClusterRoleSelectors []v1.LabelSelectorApplyConfiguration `json:"clusterRoleSelectors,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrole.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrole.go index e0ccc04be4d5f..678761e6a03ea 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrole.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrole.go @@ -29,11 +29,19 @@ import ( // ClusterRoleApplyConfiguration represents a declarative configuration of the ClusterRole type for use // with apply. +// +// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22. type ClusterRoleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` - AggregationRule *AggregationRuleApplyConfiguration `json:"aggregationRule,omitempty"` + // Rules holds all the PolicyRules for this ClusterRole + Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` + // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. + // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be + // stomped by the controller. + AggregationRule *AggregationRuleApplyConfiguration `json:"aggregationRule,omitempty"` } // ClusterRole constructs a declarative configuration of the ClusterRole type for use with @@ -46,29 +54,14 @@ func ClusterRole(name string) *ClusterRoleApplyConfiguration { return b } -// ExtractClusterRole extracts the applied configuration owned by fieldManager from -// clusterRole. If no managedFields are found in clusterRole for fieldManager, a -// ClusterRoleApplyConfiguration 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. +// ExtractClusterRoleFrom extracts the applied configuration owned by fieldManager from +// clusterRole for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // clusterRole must be a unmodified ClusterRole API object that was retrieved from the Kubernetes API. -// ExtractClusterRole provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractClusterRoleFrom 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 ExtractClusterRole(clusterRole *rbacv1alpha1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) { - return extractClusterRole(clusterRole, fieldManager, "") -} - -// ExtractClusterRoleStatus is the same as ExtractClusterRole except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractClusterRoleStatus(clusterRole *rbacv1alpha1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) { - return extractClusterRole(clusterRole, fieldManager, "status") -} - -func extractClusterRole(clusterRole *rbacv1alpha1.ClusterRole, fieldManager string, subresource string) (*ClusterRoleApplyConfiguration, error) { +func ExtractClusterRoleFrom(clusterRole *rbacv1alpha1.ClusterRole, fieldManager string, subresource string) (*ClusterRoleApplyConfiguration, error) { b := &ClusterRoleApplyConfiguration{} err := managedfields.ExtractInto(clusterRole, internal.Parser().Type("io.k8s.api.rbac.v1alpha1.ClusterRole"), fieldManager, b, subresource) if err != nil { @@ -80,6 +73,21 @@ func extractClusterRole(clusterRole *rbacv1alpha1.ClusterRole, fieldManager stri b.WithAPIVersion("rbac.authorization.k8s.io/v1alpha1") return b, nil } + +// ExtractClusterRole extracts the applied configuration owned by fieldManager from +// clusterRole. If no managedFields are found in clusterRole for fieldManager, a +// ClusterRoleApplyConfiguration 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. +// clusterRole must be a unmodified ClusterRole API object that was retrieved from the Kubernetes API. +// ExtractClusterRole 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. +func ExtractClusterRole(clusterRole *rbacv1alpha1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) { + return ExtractClusterRoleFrom(clusterRole, fieldManager, "") +} + func (b ClusterRoleApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go index d7085ae9c60f8..f4ee74f18f3bb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go @@ -29,11 +29,19 @@ import ( // ClusterRoleBindingApplyConfiguration represents a declarative configuration of the ClusterRoleBinding type for use // with apply. +// +// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, +// and adds who information via Subject. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22. type ClusterRoleBindingApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` - RoleRef *RoleRefApplyConfiguration `json:"roleRef,omitempty"` + // Subjects holds references to the objects the role applies to. + Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` + // RoleRef can only reference a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + RoleRef *RoleRefApplyConfiguration `json:"roleRef,omitempty"` } // ClusterRoleBinding constructs a declarative configuration of the ClusterRoleBinding type for use with @@ -46,29 +54,14 @@ func ClusterRoleBinding(name string) *ClusterRoleBindingApplyConfiguration { return b } -// ExtractClusterRoleBinding extracts the applied configuration owned by fieldManager from -// clusterRoleBinding. If no managedFields are found in clusterRoleBinding for fieldManager, a -// ClusterRoleBindingApplyConfiguration 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. +// ExtractClusterRoleBindingFrom extracts the applied configuration owned by fieldManager from +// clusterRoleBinding for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // clusterRoleBinding must be a unmodified ClusterRoleBinding API object that was retrieved from the Kubernetes API. -// ExtractClusterRoleBinding provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractClusterRoleBindingFrom 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 ExtractClusterRoleBinding(clusterRoleBinding *rbacv1alpha1.ClusterRoleBinding, fieldManager string) (*ClusterRoleBindingApplyConfiguration, error) { - return extractClusterRoleBinding(clusterRoleBinding, fieldManager, "") -} - -// ExtractClusterRoleBindingStatus is the same as ExtractClusterRoleBinding except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractClusterRoleBindingStatus(clusterRoleBinding *rbacv1alpha1.ClusterRoleBinding, fieldManager string) (*ClusterRoleBindingApplyConfiguration, error) { - return extractClusterRoleBinding(clusterRoleBinding, fieldManager, "status") -} - -func extractClusterRoleBinding(clusterRoleBinding *rbacv1alpha1.ClusterRoleBinding, fieldManager string, subresource string) (*ClusterRoleBindingApplyConfiguration, error) { +func ExtractClusterRoleBindingFrom(clusterRoleBinding *rbacv1alpha1.ClusterRoleBinding, fieldManager string, subresource string) (*ClusterRoleBindingApplyConfiguration, error) { b := &ClusterRoleBindingApplyConfiguration{} err := managedfields.ExtractInto(clusterRoleBinding, internal.Parser().Type("io.k8s.api.rbac.v1alpha1.ClusterRoleBinding"), fieldManager, b, subresource) if err != nil { @@ -80,6 +73,21 @@ func extractClusterRoleBinding(clusterRoleBinding *rbacv1alpha1.ClusterRoleBindi b.WithAPIVersion("rbac.authorization.k8s.io/v1alpha1") return b, nil } + +// ExtractClusterRoleBinding extracts the applied configuration owned by fieldManager from +// clusterRoleBinding. If no managedFields are found in clusterRoleBinding for fieldManager, a +// ClusterRoleBindingApplyConfiguration 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. +// clusterRoleBinding must be a unmodified ClusterRoleBinding API object that was retrieved from the Kubernetes API. +// ExtractClusterRoleBinding 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. +func ExtractClusterRoleBinding(clusterRoleBinding *rbacv1alpha1.ClusterRoleBinding, fieldManager string) (*ClusterRoleBindingApplyConfiguration, error) { + return ExtractClusterRoleBindingFrom(clusterRoleBinding, fieldManager, "") +} + func (b ClusterRoleBindingApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/policyrule.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/policyrule.go index 89d7a2914f784..f4a6d3fff7ddd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/policyrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/policyrule.go @@ -20,11 +20,26 @@ package v1alpha1 // PolicyRuleApplyConfiguration represents a declarative configuration of the PolicyRule type for use // with apply. +// +// Authorization is calculated against +// 1. evaluation of ClusterRoleBindings - short circuit on match +// 2. evaluation of RoleBindings in the namespace requested - short circuit on match +// 3. deny by default +// PolicyRule holds information that describes a policy rule, but does not contain information +// about who the rule applies to or which namespace the rule applies to. type PolicyRuleApplyConfiguration struct { - Verbs []string `json:"verbs,omitempty"` - APIGroups []string `json:"apiGroups,omitempty"` - Resources []string `json:"resources,omitempty"` - ResourceNames []string `json:"resourceNames,omitempty"` + // Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs. + Verbs []string `json:"verbs,omitempty"` + // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of + // the enumerated resources in any API group will be allowed. "" represents the core API group and "*" represents all API groups. + APIGroups []string `json:"apiGroups,omitempty"` + // Resources is a list of resources this rule applies to. '*' represents all resources. + Resources []string `json:"resources,omitempty"` + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + ResourceNames []string `json:"resourceNames,omitempty"` + // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path + // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. + // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. NonResourceURLs []string `json:"nonResourceURLs,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/role.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/role.go index 0cefea4f09212..19b123b2d20a6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/role.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/role.go @@ -29,10 +29,15 @@ import ( // RoleApplyConfiguration represents a declarative configuration of the Role type for use // with apply. +// +// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22. type RoleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` + // Rules holds all the PolicyRules for this Role + Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` } // Role constructs a declarative configuration of the Role type for use with @@ -46,29 +51,14 @@ func Role(name, namespace string) *RoleApplyConfiguration { return b } -// ExtractRole extracts the applied configuration owned by fieldManager from -// role. If no managedFields are found in role for fieldManager, a -// RoleApplyConfiguration 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. +// ExtractRoleFrom extracts the applied configuration owned by fieldManager from +// role for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // role must be a unmodified Role API object that was retrieved from the Kubernetes API. -// ExtractRole provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractRoleFrom 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 ExtractRole(role *rbacv1alpha1.Role, fieldManager string) (*RoleApplyConfiguration, error) { - return extractRole(role, fieldManager, "") -} - -// ExtractRoleStatus is the same as ExtractRole except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractRoleStatus(role *rbacv1alpha1.Role, fieldManager string) (*RoleApplyConfiguration, error) { - return extractRole(role, fieldManager, "status") -} - -func extractRole(role *rbacv1alpha1.Role, fieldManager string, subresource string) (*RoleApplyConfiguration, error) { +func ExtractRoleFrom(role *rbacv1alpha1.Role, fieldManager string, subresource string) (*RoleApplyConfiguration, error) { b := &RoleApplyConfiguration{} err := managedfields.ExtractInto(role, internal.Parser().Type("io.k8s.api.rbac.v1alpha1.Role"), fieldManager, b, subresource) if err != nil { @@ -81,6 +71,21 @@ func extractRole(role *rbacv1alpha1.Role, fieldManager string, subresource strin b.WithAPIVersion("rbac.authorization.k8s.io/v1alpha1") return b, nil } + +// ExtractRole extracts the applied configuration owned by fieldManager from +// role. If no managedFields are found in role for fieldManager, a +// RoleApplyConfiguration 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. +// role must be a unmodified Role API object that was retrieved from the Kubernetes API. +// ExtractRole 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. +func ExtractRole(role *rbacv1alpha1.Role, fieldManager string) (*RoleApplyConfiguration, error) { + return ExtractRoleFrom(role, fieldManager, "") +} + func (b RoleApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/rolebinding.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/rolebinding.go index d40781804c4b9..116f293765cd3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/rolebinding.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/rolebinding.go @@ -29,11 +29,20 @@ import ( // RoleBindingApplyConfiguration represents a declarative configuration of the RoleBinding type for use // with apply. +// +// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. +// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given +// namespace only have effect in that namespace. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22. type RoleBindingApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` - RoleRef *RoleRefApplyConfiguration `json:"roleRef,omitempty"` + // Subjects holds references to the objects the role applies to. + Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` + // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + RoleRef *RoleRefApplyConfiguration `json:"roleRef,omitempty"` } // RoleBinding constructs a declarative configuration of the RoleBinding type for use with @@ -47,29 +56,14 @@ func RoleBinding(name, namespace string) *RoleBindingApplyConfiguration { return b } -// ExtractRoleBinding extracts the applied configuration owned by fieldManager from -// roleBinding. If no managedFields are found in roleBinding for fieldManager, a -// RoleBindingApplyConfiguration 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. +// ExtractRoleBindingFrom extracts the applied configuration owned by fieldManager from +// roleBinding for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // roleBinding must be a unmodified RoleBinding API object that was retrieved from the Kubernetes API. -// ExtractRoleBinding provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractRoleBindingFrom 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 ExtractRoleBinding(roleBinding *rbacv1alpha1.RoleBinding, fieldManager string) (*RoleBindingApplyConfiguration, error) { - return extractRoleBinding(roleBinding, fieldManager, "") -} - -// ExtractRoleBindingStatus is the same as ExtractRoleBinding except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractRoleBindingStatus(roleBinding *rbacv1alpha1.RoleBinding, fieldManager string) (*RoleBindingApplyConfiguration, error) { - return extractRoleBinding(roleBinding, fieldManager, "status") -} - -func extractRoleBinding(roleBinding *rbacv1alpha1.RoleBinding, fieldManager string, subresource string) (*RoleBindingApplyConfiguration, error) { +func ExtractRoleBindingFrom(roleBinding *rbacv1alpha1.RoleBinding, fieldManager string, subresource string) (*RoleBindingApplyConfiguration, error) { b := &RoleBindingApplyConfiguration{} err := managedfields.ExtractInto(roleBinding, internal.Parser().Type("io.k8s.api.rbac.v1alpha1.RoleBinding"), fieldManager, b, subresource) if err != nil { @@ -82,6 +76,21 @@ func extractRoleBinding(roleBinding *rbacv1alpha1.RoleBinding, fieldManager stri b.WithAPIVersion("rbac.authorization.k8s.io/v1alpha1") return b, nil } + +// ExtractRoleBinding extracts the applied configuration owned by fieldManager from +// roleBinding. If no managedFields are found in roleBinding for fieldManager, a +// RoleBindingApplyConfiguration 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. +// roleBinding must be a unmodified RoleBinding API object that was retrieved from the Kubernetes API. +// ExtractRoleBinding 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. +func ExtractRoleBinding(roleBinding *rbacv1alpha1.RoleBinding, fieldManager string) (*RoleBindingApplyConfiguration, error) { + return ExtractRoleBindingFrom(roleBinding, fieldManager, "") +} + func (b RoleBindingApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/roleref.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/roleref.go index 4b2553117df4b..a02a36be897e2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/roleref.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/roleref.go @@ -20,10 +20,15 @@ package v1alpha1 // RoleRefApplyConfiguration represents a declarative configuration of the RoleRef type for use // with apply. +// +// RoleRef contains information that points to the role being used type RoleRefApplyConfiguration struct { + // APIGroup is the group for the resource being referenced APIGroup *string `json:"apiGroup,omitempty"` - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` + // Kind is the type of resource being referenced + Kind *string `json:"kind,omitempty"` + // Name is the name of resource being referenced + Name *string `json:"name,omitempty"` } // RoleRefApplyConfiguration constructs a declarative configuration of the RoleRef type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/subject.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/subject.go index 665b42af50f41..d24f865d4ee43 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/subject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/subject.go @@ -20,11 +20,22 @@ package v1alpha1 // SubjectApplyConfiguration represents a declarative configuration of the Subject type for use // with apply. +// +// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, +// or a value for non-objects such as user and group names. type SubjectApplyConfiguration struct { - Kind *string `json:"kind,omitempty"` + // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". + // If the Authorizer does not recognized the kind value, the Authorizer should report an error. + Kind *string `json:"kind,omitempty"` + // APIVersion holds the API group and version of the referenced subject. + // Defaults to "v1" for ServiceAccount subjects. + // Defaults to "rbac.authorization.k8s.io/v1alpha1" for User and Group subjects. APIVersion *string `json:"apiVersion,omitempty"` - Name *string `json:"name,omitempty"` - Namespace *string `json:"namespace,omitempty"` + // Name of the object being referenced. + Name *string `json:"name,omitempty"` + // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty + // the Authorizer should report an error. + Namespace *string `json:"namespace,omitempty"` } // SubjectApplyConfiguration constructs a declarative configuration of the Subject type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/aggregationrule.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/aggregationrule.go index e9bb68dcb6858..b4c6bd5aed955 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/aggregationrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/aggregationrule.go @@ -24,7 +24,11 @@ import ( // AggregationRuleApplyConfiguration represents a declarative configuration of the AggregationRule type for use // with apply. +// +// AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole type AggregationRuleApplyConfiguration struct { + // ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. + // If any of the selectors match, then the ClusterRole's permissions will be added ClusterRoleSelectors []v1.LabelSelectorApplyConfiguration `json:"clusterRoleSelectors,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrole.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrole.go index 6fe51e22447c9..a105df5f0d597 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrole.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrole.go @@ -29,11 +29,19 @@ import ( // ClusterRoleApplyConfiguration represents a declarative configuration of the ClusterRole type for use // with apply. +// +// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22. type ClusterRoleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` - AggregationRule *AggregationRuleApplyConfiguration `json:"aggregationRule,omitempty"` + // Rules holds all the PolicyRules for this ClusterRole + Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` + // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. + // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be + // stomped by the controller. + AggregationRule *AggregationRuleApplyConfiguration `json:"aggregationRule,omitempty"` } // ClusterRole constructs a declarative configuration of the ClusterRole type for use with @@ -46,29 +54,14 @@ func ClusterRole(name string) *ClusterRoleApplyConfiguration { return b } -// ExtractClusterRole extracts the applied configuration owned by fieldManager from -// clusterRole. If no managedFields are found in clusterRole for fieldManager, a -// ClusterRoleApplyConfiguration 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. +// ExtractClusterRoleFrom extracts the applied configuration owned by fieldManager from +// clusterRole for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // clusterRole must be a unmodified ClusterRole API object that was retrieved from the Kubernetes API. -// ExtractClusterRole provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractClusterRoleFrom 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 ExtractClusterRole(clusterRole *rbacv1beta1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) { - return extractClusterRole(clusterRole, fieldManager, "") -} - -// ExtractClusterRoleStatus is the same as ExtractClusterRole except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractClusterRoleStatus(clusterRole *rbacv1beta1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) { - return extractClusterRole(clusterRole, fieldManager, "status") -} - -func extractClusterRole(clusterRole *rbacv1beta1.ClusterRole, fieldManager string, subresource string) (*ClusterRoleApplyConfiguration, error) { +func ExtractClusterRoleFrom(clusterRole *rbacv1beta1.ClusterRole, fieldManager string, subresource string) (*ClusterRoleApplyConfiguration, error) { b := &ClusterRoleApplyConfiguration{} err := managedfields.ExtractInto(clusterRole, internal.Parser().Type("io.k8s.api.rbac.v1beta1.ClusterRole"), fieldManager, b, subresource) if err != nil { @@ -80,6 +73,21 @@ func extractClusterRole(clusterRole *rbacv1beta1.ClusterRole, fieldManager strin b.WithAPIVersion("rbac.authorization.k8s.io/v1beta1") return b, nil } + +// ExtractClusterRole extracts the applied configuration owned by fieldManager from +// clusterRole. If no managedFields are found in clusterRole for fieldManager, a +// ClusterRoleApplyConfiguration 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. +// clusterRole must be a unmodified ClusterRole API object that was retrieved from the Kubernetes API. +// ExtractClusterRole 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. +func ExtractClusterRole(clusterRole *rbacv1beta1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) { + return ExtractClusterRoleFrom(clusterRole, fieldManager, "") +} + func (b ClusterRoleApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrolebinding.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrolebinding.go index e75ab7a883b90..c519c6e078423 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrolebinding.go @@ -29,11 +29,19 @@ import ( // ClusterRoleBindingApplyConfiguration represents a declarative configuration of the ClusterRoleBinding type for use // with apply. +// +// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, +// and adds who information via Subject. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22. type ClusterRoleBindingApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` - RoleRef *RoleRefApplyConfiguration `json:"roleRef,omitempty"` + // Subjects holds references to the objects the role applies to. + Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` + // RoleRef can only reference a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + RoleRef *RoleRefApplyConfiguration `json:"roleRef,omitempty"` } // ClusterRoleBinding constructs a declarative configuration of the ClusterRoleBinding type for use with @@ -46,29 +54,14 @@ func ClusterRoleBinding(name string) *ClusterRoleBindingApplyConfiguration { return b } -// ExtractClusterRoleBinding extracts the applied configuration owned by fieldManager from -// clusterRoleBinding. If no managedFields are found in clusterRoleBinding for fieldManager, a -// ClusterRoleBindingApplyConfiguration 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. +// ExtractClusterRoleBindingFrom extracts the applied configuration owned by fieldManager from +// clusterRoleBinding for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // clusterRoleBinding must be a unmodified ClusterRoleBinding API object that was retrieved from the Kubernetes API. -// ExtractClusterRoleBinding provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractClusterRoleBindingFrom 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 ExtractClusterRoleBinding(clusterRoleBinding *rbacv1beta1.ClusterRoleBinding, fieldManager string) (*ClusterRoleBindingApplyConfiguration, error) { - return extractClusterRoleBinding(clusterRoleBinding, fieldManager, "") -} - -// ExtractClusterRoleBindingStatus is the same as ExtractClusterRoleBinding except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractClusterRoleBindingStatus(clusterRoleBinding *rbacv1beta1.ClusterRoleBinding, fieldManager string) (*ClusterRoleBindingApplyConfiguration, error) { - return extractClusterRoleBinding(clusterRoleBinding, fieldManager, "status") -} - -func extractClusterRoleBinding(clusterRoleBinding *rbacv1beta1.ClusterRoleBinding, fieldManager string, subresource string) (*ClusterRoleBindingApplyConfiguration, error) { +func ExtractClusterRoleBindingFrom(clusterRoleBinding *rbacv1beta1.ClusterRoleBinding, fieldManager string, subresource string) (*ClusterRoleBindingApplyConfiguration, error) { b := &ClusterRoleBindingApplyConfiguration{} err := managedfields.ExtractInto(clusterRoleBinding, internal.Parser().Type("io.k8s.api.rbac.v1beta1.ClusterRoleBinding"), fieldManager, b, subresource) if err != nil { @@ -80,6 +73,21 @@ func extractClusterRoleBinding(clusterRoleBinding *rbacv1beta1.ClusterRoleBindin b.WithAPIVersion("rbac.authorization.k8s.io/v1beta1") return b, nil } + +// ExtractClusterRoleBinding extracts the applied configuration owned by fieldManager from +// clusterRoleBinding. If no managedFields are found in clusterRoleBinding for fieldManager, a +// ClusterRoleBindingApplyConfiguration 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. +// clusterRoleBinding must be a unmodified ClusterRoleBinding API object that was retrieved from the Kubernetes API. +// ExtractClusterRoleBinding 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. +func ExtractClusterRoleBinding(clusterRoleBinding *rbacv1beta1.ClusterRoleBinding, fieldManager string) (*ClusterRoleBindingApplyConfiguration, error) { + return ExtractClusterRoleBindingFrom(clusterRoleBinding, fieldManager, "") +} + func (b ClusterRoleBindingApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/policyrule.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/policyrule.go index dc630df206a99..bf3a5a50867e5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/policyrule.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/policyrule.go @@ -20,11 +20,27 @@ package v1beta1 // PolicyRuleApplyConfiguration represents a declarative configuration of the PolicyRule type for use // with apply. +// +// Authorization is calculated against +// 1. evaluation of ClusterRoleBindings - short circuit on match +// 2. evaluation of RoleBindings in the namespace requested - short circuit on match +// 3. deny by default +// PolicyRule holds information that describes a policy rule, but does not contain information +// about who the rule applies to or which namespace the rule applies to. type PolicyRuleApplyConfiguration struct { - Verbs []string `json:"verbs,omitempty"` - APIGroups []string `json:"apiGroups,omitempty"` - Resources []string `json:"resources,omitempty"` - ResourceNames []string `json:"resourceNames,omitempty"` + // Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs. + Verbs []string `json:"verbs,omitempty"` + // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of + // the enumerated resources in any API group will be allowed. "" represents the core API group and "*" represents all API groups. + APIGroups []string `json:"apiGroups,omitempty"` + // Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups. + // '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups. + Resources []string `json:"resources,omitempty"` + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + ResourceNames []string `json:"resourceNames,omitempty"` + // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path + // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. + // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. NonResourceURLs []string `json:"nonResourceURLs,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/role.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/role.go index 7a628b9545292..d0a4c20c68c70 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/role.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/role.go @@ -29,10 +29,15 @@ import ( // RoleApplyConfiguration represents a declarative configuration of the Role type for use // with apply. +// +// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22. type RoleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` + // Rules holds all the PolicyRules for this Role + Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` } // Role constructs a declarative configuration of the Role type for use with @@ -46,29 +51,14 @@ func Role(name, namespace string) *RoleApplyConfiguration { return b } -// ExtractRole extracts the applied configuration owned by fieldManager from -// role. If no managedFields are found in role for fieldManager, a -// RoleApplyConfiguration 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. +// ExtractRoleFrom extracts the applied configuration owned by fieldManager from +// role for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // role must be a unmodified Role API object that was retrieved from the Kubernetes API. -// ExtractRole provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractRoleFrom 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 ExtractRole(role *rbacv1beta1.Role, fieldManager string) (*RoleApplyConfiguration, error) { - return extractRole(role, fieldManager, "") -} - -// ExtractRoleStatus is the same as ExtractRole except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractRoleStatus(role *rbacv1beta1.Role, fieldManager string) (*RoleApplyConfiguration, error) { - return extractRole(role, fieldManager, "status") -} - -func extractRole(role *rbacv1beta1.Role, fieldManager string, subresource string) (*RoleApplyConfiguration, error) { +func ExtractRoleFrom(role *rbacv1beta1.Role, fieldManager string, subresource string) (*RoleApplyConfiguration, error) { b := &RoleApplyConfiguration{} err := managedfields.ExtractInto(role, internal.Parser().Type("io.k8s.api.rbac.v1beta1.Role"), fieldManager, b, subresource) if err != nil { @@ -81,6 +71,21 @@ func extractRole(role *rbacv1beta1.Role, fieldManager string, subresource string b.WithAPIVersion("rbac.authorization.k8s.io/v1beta1") return b, nil } + +// ExtractRole extracts the applied configuration owned by fieldManager from +// role. If no managedFields are found in role for fieldManager, a +// RoleApplyConfiguration 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. +// role must be a unmodified Role API object that was retrieved from the Kubernetes API. +// ExtractRole 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. +func ExtractRole(role *rbacv1beta1.Role, fieldManager string) (*RoleApplyConfiguration, error) { + return ExtractRoleFrom(role, fieldManager, "") +} + func (b RoleApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/rolebinding.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/rolebinding.go index be180c3f5182b..64669c1033bce 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/rolebinding.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/rolebinding.go @@ -29,11 +29,20 @@ import ( // RoleBindingApplyConfiguration represents a declarative configuration of the RoleBinding type for use // with apply. +// +// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. +// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given +// namespace only have effect in that namespace. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22. type RoleBindingApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` - RoleRef *RoleRefApplyConfiguration `json:"roleRef,omitempty"` + // Subjects holds references to the objects the role applies to. + Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"` + // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + RoleRef *RoleRefApplyConfiguration `json:"roleRef,omitempty"` } // RoleBinding constructs a declarative configuration of the RoleBinding type for use with @@ -47,29 +56,14 @@ func RoleBinding(name, namespace string) *RoleBindingApplyConfiguration { return b } -// ExtractRoleBinding extracts the applied configuration owned by fieldManager from -// roleBinding. If no managedFields are found in roleBinding for fieldManager, a -// RoleBindingApplyConfiguration 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. +// ExtractRoleBindingFrom extracts the applied configuration owned by fieldManager from +// roleBinding for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // roleBinding must be a unmodified RoleBinding API object that was retrieved from the Kubernetes API. -// ExtractRoleBinding provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractRoleBindingFrom 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 ExtractRoleBinding(roleBinding *rbacv1beta1.RoleBinding, fieldManager string) (*RoleBindingApplyConfiguration, error) { - return extractRoleBinding(roleBinding, fieldManager, "") -} - -// ExtractRoleBindingStatus is the same as ExtractRoleBinding except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractRoleBindingStatus(roleBinding *rbacv1beta1.RoleBinding, fieldManager string) (*RoleBindingApplyConfiguration, error) { - return extractRoleBinding(roleBinding, fieldManager, "status") -} - -func extractRoleBinding(roleBinding *rbacv1beta1.RoleBinding, fieldManager string, subresource string) (*RoleBindingApplyConfiguration, error) { +func ExtractRoleBindingFrom(roleBinding *rbacv1beta1.RoleBinding, fieldManager string, subresource string) (*RoleBindingApplyConfiguration, error) { b := &RoleBindingApplyConfiguration{} err := managedfields.ExtractInto(roleBinding, internal.Parser().Type("io.k8s.api.rbac.v1beta1.RoleBinding"), fieldManager, b, subresource) if err != nil { @@ -82,6 +76,21 @@ func extractRoleBinding(roleBinding *rbacv1beta1.RoleBinding, fieldManager strin b.WithAPIVersion("rbac.authorization.k8s.io/v1beta1") return b, nil } + +// ExtractRoleBinding extracts the applied configuration owned by fieldManager from +// roleBinding. If no managedFields are found in roleBinding for fieldManager, a +// RoleBindingApplyConfiguration 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. +// roleBinding must be a unmodified RoleBinding API object that was retrieved from the Kubernetes API. +// ExtractRoleBinding 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. +func ExtractRoleBinding(roleBinding *rbacv1beta1.RoleBinding, fieldManager string) (*RoleBindingApplyConfiguration, error) { + return ExtractRoleBindingFrom(roleBinding, fieldManager, "") +} + func (b RoleBindingApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/roleref.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/roleref.go index 19d0420a816ff..350930af7a0cc 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/roleref.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/roleref.go @@ -20,10 +20,15 @@ package v1beta1 // RoleRefApplyConfiguration represents a declarative configuration of the RoleRef type for use // with apply. +// +// RoleRef contains information that points to the role being used type RoleRefApplyConfiguration struct { + // APIGroup is the group for the resource being referenced APIGroup *string `json:"apiGroup,omitempty"` - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` + // Kind is the type of resource being referenced + Kind *string `json:"kind,omitempty"` + // Name is the name of resource being referenced + Name *string `json:"name,omitempty"` } // RoleRefApplyConfiguration constructs a declarative configuration of the RoleRef type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/subject.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/subject.go index f7c1a21a9ccfe..8abbaa9fb364d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/subject.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/subject.go @@ -20,10 +20,21 @@ package v1beta1 // SubjectApplyConfiguration represents a declarative configuration of the Subject type for use // with apply. +// +// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, +// or a value for non-objects such as user and group names. type SubjectApplyConfiguration struct { - Kind *string `json:"kind,omitempty"` - APIGroup *string `json:"apiGroup,omitempty"` - Name *string `json:"name,omitempty"` + // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". + // If the Authorizer does not recognized the kind value, the Authorizer should report an error. + Kind *string `json:"kind,omitempty"` + // APIGroup holds the API group of the referenced subject. + // Defaults to "" for ServiceAccount subjects. + // Defaults to "rbac.authorization.k8s.io" for User and Group subjects. + APIGroup *string `json:"apiGroup,omitempty"` + // Name of the object being referenced. + Name *string `json:"name,omitempty"` + // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty + // the Authorizer should report an error. Namespace *string `json:"namespace,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/allocateddevicestatus.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/allocateddevicestatus.go index 2c2c415655410..3b04727e3457e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/allocateddevicestatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/allocateddevicestatus.go @@ -25,13 +25,42 @@ import ( // AllocatedDeviceStatusApplyConfiguration represents a declarative configuration of the AllocatedDeviceStatus type for use // with apply. +// +// AllocatedDeviceStatus contains the status of an allocated device, if the +// driver chooses to report it. This may include driver-specific information. +// +// The combination of Driver, Pool, Device, and ShareID must match the corresponding key +// in Status.Allocation.Devices. type AllocatedDeviceStatusApplyConfiguration struct { - Driver *string `json:"driver,omitempty"` - Pool *string `json:"pool,omitempty"` - Device *string `json:"device,omitempty"` - ShareID *string `json:"shareID,omitempty"` - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` - Data *runtime.RawExtension `json:"data,omitempty"` + // Driver specifies the name of the DRA driver whose kubelet + // plugin should be invoked to process the allocation once the claim is + // needed on a node. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. It should use only lower case characters. + Driver *string `json:"driver,omitempty"` + // This name together with the driver name and the device name field + // identify which device was allocated (`//`). + // + // Must not be longer than 253 characters and may contain one or more + // DNS sub-domains separated by slashes. + Pool *string `json:"pool,omitempty"` + // Device references one device instance via its name in the driver's + // resource pool. It must be a DNS label. + Device *string `json:"device,omitempty"` + // ShareID uniquely identifies an individual allocation share of the device. + ShareID *string `json:"shareID,omitempty"` + // Conditions contains the latest observation of the device's state. + // If the device has been configured according to the class and claim + // config references, the `Ready` condition should be True. + // + // Must not contain more than 8 entries. + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` + // Data contains arbitrary driver-specific data. + // + // The length of the raw data must be smaller or equal to 10 Ki. + Data *runtime.RawExtension `json:"data,omitempty"` + // NetworkData contains network-related information specific to the device. NetworkData *NetworkDeviceDataApplyConfiguration `json:"networkData,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/allocationresult.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/allocationresult.go index b536e49d2a535..83f0b96895659 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/allocationresult.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/allocationresult.go @@ -25,10 +25,20 @@ import ( // AllocationResultApplyConfiguration represents a declarative configuration of the AllocationResult type for use // with apply. +// +// AllocationResult contains attributes of an allocated resource. type AllocationResultApplyConfiguration struct { - Devices *DeviceAllocationResultApplyConfiguration `json:"devices,omitempty"` - NodeSelector *corev1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"` - AllocationTimestamp *metav1.Time `json:"allocationTimestamp,omitempty"` + // Devices is the result of allocating devices. + Devices *DeviceAllocationResultApplyConfiguration `json:"devices,omitempty"` + // NodeSelector defines where the allocated resources are available. If + // unset, they are available everywhere. + NodeSelector *corev1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"` + // AllocationTimestamp stores the time when the resources were allocated. + // This field is not guaranteed to be set, in which case that time is unknown. + // + // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus + // feature gate. + AllocationTimestamp *metav1.Time `json:"allocationTimestamp,omitempty"` } // AllocationResultApplyConfiguration constructs a declarative configuration of the AllocationResult type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/capacityrequestpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/capacityrequestpolicy.go index 2c016efa21530..43bd7e0142a5d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/capacityrequestpolicy.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/capacityrequestpolicy.go @@ -24,10 +24,39 @@ import ( // CapacityRequestPolicyApplyConfiguration represents a declarative configuration of the CapacityRequestPolicy type for use // with apply. +// +// CapacityRequestPolicy defines how requests consume device capacity. +// +// Must not set more than one ValidRequestValues. type CapacityRequestPolicyApplyConfiguration struct { - Default *resource.Quantity `json:"default,omitempty"` - ValidValues []resource.Quantity `json:"validValues,omitempty"` - ValidRange *CapacityRequestPolicyRangeApplyConfiguration `json:"validRange,omitempty"` + // Default specifies how much of this capacity is consumed by a request + // that does not contain an entry for it in DeviceRequest's Capacity. + Default *resource.Quantity `json:"default,omitempty"` + // ValidValues defines a set of acceptable quantity values in consuming requests. + // + // Must not contain more than 10 entries. + // Must be sorted in ascending order. + // + // If this field is set, + // Default must be defined and it must be included in ValidValues list. + // + // If the requested amount does not match any valid value but smaller than some valid values, + // the scheduler calculates the smallest valid value that is greater than or equal to the request. + // That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues). + // + // If the requested amount exceeds all valid values, the request violates the policy, + // and this device cannot be allocated. + ValidValues []resource.Quantity `json:"validValues,omitempty"` + // ValidRange defines an acceptable quantity value range in consuming requests. + // + // If this field is set, + // Default must be defined and it must fall within the defined ValidRange. + // + // If the requested amount does not fall within the defined range, the request violates the policy, + // and this device cannot be allocated. + // + // If the request doesn't contain this capacity entry, Default value is used. + ValidRange *CapacityRequestPolicyRangeApplyConfiguration `json:"validRange,omitempty"` } // CapacityRequestPolicyApplyConfiguration constructs a declarative configuration of the CapacityRequestPolicy type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/capacityrequestpolicyrange.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/capacityrequestpolicyrange.go index 6f486b48fae50..b3bade6113d1e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/capacityrequestpolicyrange.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/capacityrequestpolicyrange.go @@ -24,9 +24,31 @@ import ( // CapacityRequestPolicyRangeApplyConfiguration represents a declarative configuration of the CapacityRequestPolicyRange type for use // with apply. +// +// CapacityRequestPolicyRange defines a valid range for consumable capacity values. +// +// - If the requested amount is less than Min, it is rounded up to the Min value. +// - If Step is set and the requested amount is between Min and Max but not aligned with Step, +// it will be rounded up to the next value equal to Min + (n * Step). +// - If Step is not set, the requested amount is used as-is if it falls within the range Min to Max (if set). +// - If the requested or rounded amount exceeds Max (if set), the request does not satisfy the policy, +// and the device cannot be allocated. type CapacityRequestPolicyRangeApplyConfiguration struct { - Min *resource.Quantity `json:"min,omitempty"` - Max *resource.Quantity `json:"max,omitempty"` + // Min specifies the minimum capacity allowed for a consumption request. + // + // Min must be greater than or equal to zero, + // and less than or equal to the capacity value. + // requestPolicy.default must be more than or equal to the minimum. + Min *resource.Quantity `json:"min,omitempty"` + // Max defines the upper limit for capacity that can be requested. + // + // Max must be less than or equal to the capacity value. + // Min and requestPolicy.default must be less than or equal to the maximum. + Max *resource.Quantity `json:"max,omitempty"` + // Step defines the step size between valid capacity amounts within the range. + // + // Max (if set) and requestPolicy.default must be a multiple of Step. + // Min + Step must be less than or equal to the capacity value. Step *resource.Quantity `json:"step,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/capacityrequirements.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/capacityrequirements.go index b6143efaaf247..83d321cd772d6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/capacityrequirements.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/capacityrequirements.go @@ -25,7 +25,31 @@ import ( // CapacityRequirementsApplyConfiguration represents a declarative configuration of the CapacityRequirements type for use // with apply. +// +// CapacityRequirements defines the capacity requirements for a specific device request. type CapacityRequirementsApplyConfiguration struct { + // Requests represent individual device resource requests for distinct resources, + // all of which must be provided by the device. + // + // This value is used as an additional filtering condition against the available capacity on the device. + // This is semantically equivalent to a CEL selector with + // `device.capacity[]..compareTo(quantity()) >= 0`. + // For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0. + // + // When a requestPolicy is defined, the requested amount is adjusted upward + // to the nearest valid value based on the policy. + // If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows— + // the device is considered ineligible for allocation. + // + // For any capacity that is not explicitly requested: + // - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity + // (i.e., the whole device is claimed). + // - If a requestPolicy is set, the default consumed capacity is determined according to that policy. + // + // If the device allows multiple allocation, + // the aggregated amount across all requests must not exceed the capacity value. + // The consumed capacity, which may be adjusted based on the requestPolicy if defined, + // is recorded in the resource claim’s status.devices[*].consumedCapacity field. Requests map[resourcev1.QualifiedName]resource.Quantity `json:"requests,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/celdeviceselector.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/celdeviceselector.go index 4d1e8ecb7c255..5a77aac95fad7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/celdeviceselector.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/celdeviceselector.go @@ -20,7 +20,61 @@ package v1 // CELDeviceSelectorApplyConfiguration represents a declarative configuration of the CELDeviceSelector type for use // with apply. +// +// CELDeviceSelector contains a CEL expression for selecting a device. type CELDeviceSelectorApplyConfiguration struct { + // Expression is a CEL expression which evaluates a single device. It + // must evaluate to true when the device under consideration satisfies + // the desired criteria, and false when it does not. Any other result + // is an error and causes allocation of devices to abort. + // + // The expression's input is an object named "device", which carries + // the following properties: + // - driver (string): the name of the driver which defines this device. + // - attributes (map[string]object): the device's attributes, grouped by prefix + // (e.g. device.attributes["dra.example.com"] evaluates to an object with all + // of the attributes which were prefixed by "dra.example.com". + // - capacity (map[string]object): the device's capacities, grouped by prefix. + // - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device + // (v1.34+ with the DRAConsumableCapacity feature enabled). + // + // Example: Consider a device with driver="dra.example.com", which exposes + // two attributes named "model" and "ext.example.com/family" and which + // exposes one capacity named "modules". This input to this expression + // would have the following fields: + // + // device.driver + // device.attributes["dra.example.com"].model + // device.attributes["ext.example.com"].family + // device.capacity["dra.example.com"].modules + // + // The device.driver field can be used to check for a specific driver, + // either as a high-level precondition (i.e. you only want to consider + // devices from this driver) or as part of a multi-clause expression + // that is meant to consider devices from different drivers. + // + // The value type of each attribute is defined by the device + // definition, and users who write these expressions must consult the + // documentation for their specific drivers. The value type of each + // capacity is Quantity. + // + // If an unknown prefix is used as a lookup in either device.attributes + // or device.capacity, an empty map will be returned. Any reference to + // an unknown field will cause an evaluation error and allocation to + // abort. + // + // A robust expression should check for the existence of attributes + // before referencing them. + // + // For ease of use, the cel.bind() function is enabled, and can be used + // to simplify expressions that access multiple attributes with the + // same domain. For example: + // + // cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool) + // + // The length of the expression must be smaller or equal to 10 Ki. The + // cost of evaluating it is also limited based on the estimated number + // of logical steps. Expression *string `json:"expression,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/counter.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/counter.go index 92ec63bb4ed81..161b8e161f612 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/counter.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/counter.go @@ -24,7 +24,10 @@ import ( // CounterApplyConfiguration represents a declarative configuration of the Counter type for use // with apply. +// +// Counter describes a quantity associated with a device. type CounterApplyConfiguration struct { + // Value defines how much of a certain device counter is available. Value *resource.Quantity `json:"value,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/counterset.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/counterset.go index 3a5d2863d0b6b..58f8558c48b47 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/counterset.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/counterset.go @@ -20,8 +20,23 @@ package v1 // CounterSetApplyConfiguration represents a declarative configuration of the CounterSet type for use // with apply. +// +// CounterSet defines a named set of counters +// that are available to be used by devices defined in the +// ResourceSlice. +// +// The counters are not allocatable by themselves, but +// can be referenced by devices. When a device is allocated, +// the portion of counters it uses will no longer be available for use +// by other devices. type CounterSetApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // Name defines the name of the counter set. + // It must be a DNS label. + Name *string `json:"name,omitempty"` + // Counters defines the set of counters for this CounterSet + // The name of each counter must be unique in that set and must be a DNS label. + // + // The maximum number of counters in all sets is 32. Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/device.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/device.go index 2b6b5bfe913bd..1a370ea3ca069 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/device.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/device.go @@ -25,19 +25,94 @@ import ( // DeviceApplyConfiguration represents a declarative configuration of the Device type for use // with apply. +// +// Device represents one individual hardware instance that can be selected based +// on its attributes. Besides the name, exactly one field must be set. type DeviceApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Attributes map[resourcev1.QualifiedName]DeviceAttributeApplyConfiguration `json:"attributes,omitempty"` - Capacity map[resourcev1.QualifiedName]DeviceCapacityApplyConfiguration `json:"capacity,omitempty"` - ConsumesCounters []DeviceCounterConsumptionApplyConfiguration `json:"consumesCounters,omitempty"` - NodeName *string `json:"nodeName,omitempty"` - NodeSelector *corev1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"` - AllNodes *bool `json:"allNodes,omitempty"` - Taints []DeviceTaintApplyConfiguration `json:"taints,omitempty"` - BindsToNode *bool `json:"bindsToNode,omitempty"` - BindingConditions []string `json:"bindingConditions,omitempty"` - BindingFailureConditions []string `json:"bindingFailureConditions,omitempty"` - AllowMultipleAllocations *bool `json:"allowMultipleAllocations,omitempty"` + // Name is unique identifier among all devices managed by + // the driver in the pool. It must be a DNS label. + Name *string `json:"name,omitempty"` + // Attributes defines the set of attributes for this device. + // The name of each attribute must be unique in that set. + // + // The maximum number of attributes and capacities combined is 32. + Attributes map[resourcev1.QualifiedName]DeviceAttributeApplyConfiguration `json:"attributes,omitempty"` + // Capacity defines the set of capacities for this device. + // The name of each capacity must be unique in that set. + // + // The maximum number of attributes and capacities combined is 32. + Capacity map[resourcev1.QualifiedName]DeviceCapacityApplyConfiguration `json:"capacity,omitempty"` + // ConsumesCounters defines a list of references to sharedCounters + // and the set of counters that the device will + // consume from those counter sets. + // + // There can only be a single entry per counterSet. + // + // The total number of device counter consumption entries + // must be <= 32. In addition, the total number in the + // entire ResourceSlice must be <= 1024 (for example, + // 64 devices with 16 counters each). + ConsumesCounters []DeviceCounterConsumptionApplyConfiguration `json:"consumesCounters,omitempty"` + // NodeName identifies the node where the device is available. + // + // Must only be set if Spec.PerDeviceNodeSelection is set to true. + // At most one of NodeName, NodeSelector and AllNodes can be set. + NodeName *string `json:"nodeName,omitempty"` + // NodeSelector defines the nodes where the device is available. + // + // Must use exactly one term. + // + // Must only be set if Spec.PerDeviceNodeSelection is set to true. + // At most one of NodeName, NodeSelector and AllNodes can be set. + NodeSelector *corev1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"` + // AllNodes indicates that all nodes have access to the device. + // + // Must only be set if Spec.PerDeviceNodeSelection is set to true. + // At most one of NodeName, NodeSelector and AllNodes can be set. + AllNodes *bool `json:"allNodes,omitempty"` + // If specified, these are the driver-defined taints. + // + // The maximum number of taints is 4. + // + // This is an alpha field and requires enabling the DRADeviceTaints + // feature gate. + Taints []DeviceTaintApplyConfiguration `json:"taints,omitempty"` + // BindsToNode indicates if the usage of an allocation involving this device + // has to be limited to exactly the node that was chosen when allocating the claim. + // If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector + // to match the node where the allocation was made. + // + // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus + // feature gates. + BindsToNode *bool `json:"bindsToNode,omitempty"` + // BindingConditions defines the conditions for proceeding with binding. + // All of these conditions must be set in the per-device status + // conditions with a value of True to proceed with binding the pod to the node + // while scheduling the pod. + // + // The maximum number of binding conditions is 4. + // + // The conditions must be a valid condition type string. + // + // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus + // feature gates. + BindingConditions []string `json:"bindingConditions,omitempty"` + // BindingFailureConditions defines the conditions for binding failure. + // They may be set in the per-device status conditions. + // If any is set to "True", a binding failure occurred. + // + // The maximum number of binding failure conditions is 4. + // + // The conditions must be a valid condition type string. + // + // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus + // feature gates. + BindingFailureConditions []string `json:"bindingFailureConditions,omitempty"` + // AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests. + // + // If AllowMultipleAllocations is set to true, the device can be allocated more than once, + // and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not. + AllowMultipleAllocations *bool `json:"allowMultipleAllocations,omitempty"` } // DeviceApplyConfiguration constructs a declarative configuration of the Device type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceallocationconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceallocationconfiguration.go index f1d009cc484b6..29e1ba427a959 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceallocationconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceallocationconfiguration.go @@ -24,9 +24,20 @@ import ( // DeviceAllocationConfigurationApplyConfiguration represents a declarative configuration of the DeviceAllocationConfiguration type for use // with apply. +// +// DeviceAllocationConfiguration gets embedded in an AllocationResult. type DeviceAllocationConfigurationApplyConfiguration struct { - Source *resourcev1.AllocationConfigSource `json:"source,omitempty"` - Requests []string `json:"requests,omitempty"` + // Source records whether the configuration comes from a class and thus + // is not something that a normal user would have been able to set + // or from a claim. + Source *resourcev1.AllocationConfigSource `json:"source,omitempty"` + // Requests lists the names of requests where the configuration applies. + // If empty, its applies to all requests. + // + // References to subrequests must include the name of the main request + // and may include the subrequest using the format
[/]. If just + // the main request is given, the configuration applies to all subrequests. + Requests []string `json:"requests,omitempty"` DeviceConfigurationApplyConfiguration `json:",inline"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceallocationresult.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceallocationresult.go index e95e45f283f4f..911f3a634dcf0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceallocationresult.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceallocationresult.go @@ -20,9 +20,19 @@ package v1 // DeviceAllocationResultApplyConfiguration represents a declarative configuration of the DeviceAllocationResult type for use // with apply. +// +// DeviceAllocationResult is the result of allocating devices. type DeviceAllocationResultApplyConfiguration struct { + // Results lists all allocated devices. Results []DeviceRequestAllocationResultApplyConfiguration `json:"results,omitempty"` - Config []DeviceAllocationConfigurationApplyConfiguration `json:"config,omitempty"` + // This field is a combination of all the claim and class configuration parameters. + // Drivers can distinguish between those based on a flag. + // + // This includes configuration parameters for drivers which have no allocated + // devices in the result because it is up to the drivers which configuration + // parameters they support. They can silently ignore unknown configuration + // parameters. + Config []DeviceAllocationConfigurationApplyConfiguration `json:"config,omitempty"` } // DeviceAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceAllocationResult type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceattribute.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceattribute.go index c2e5829a9c4a6..e41696ab8822a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceattribute.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceattribute.go @@ -20,10 +20,17 @@ package v1 // DeviceAttributeApplyConfiguration represents a declarative configuration of the DeviceAttribute type for use // with apply. +// +// DeviceAttribute must have exactly one field set. type DeviceAttributeApplyConfiguration struct { - IntValue *int64 `json:"int,omitempty"` - BoolValue *bool `json:"bool,omitempty"` - StringValue *string `json:"string,omitempty"` + // IntValue is a number. + IntValue *int64 `json:"int,omitempty"` + // BoolValue is a true/false value. + BoolValue *bool `json:"bool,omitempty"` + // StringValue is a string. Must not be longer than 64 characters. + StringValue *string `json:"string,omitempty"` + // VersionValue is a semantic version according to semver.org spec 2.0.0. + // Must not be longer than 64 characters. VersionValue *string `json:"version,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicecapacity.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicecapacity.go index 769b9cbcee3a0..322ca55a5f34c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicecapacity.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicecapacity.go @@ -24,8 +24,24 @@ import ( // DeviceCapacityApplyConfiguration represents a declarative configuration of the DeviceCapacity type for use // with apply. +// +// DeviceCapacity describes a quantity associated with a device. type DeviceCapacityApplyConfiguration struct { - Value *resource.Quantity `json:"value,omitempty"` + // Value defines how much of a certain capacity that device has. + // + // This field reflects the fixed total capacity and does not change. + // The consumed amount is tracked separately by scheduler + // and does not affect this value. + Value *resource.Quantity `json:"value,omitempty"` + // RequestPolicy defines how this DeviceCapacity must be consumed + // when the device is allowed to be shared by multiple allocations. + // + // The Device must have allowMultipleAllocations set to true in order to set a requestPolicy. + // + // If unset, capacity requests are unconstrained: + // requests can consume any amount of capacity, as long as the total consumed + // across all allocations does not exceed the device's defined capacity. + // If request is also unset, default is the full capacity value. RequestPolicy *CapacityRequestPolicyApplyConfiguration `json:"requestPolicy,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclaim.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclaim.go index 8297805f2d0e3..1b85b4fa84366 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclaim.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclaim.go @@ -20,10 +20,19 @@ package v1 // DeviceClaimApplyConfiguration represents a declarative configuration of the DeviceClaim type for use // with apply. +// +// DeviceClaim defines how to request devices with a ResourceClaim. type DeviceClaimApplyConfiguration struct { - Requests []DeviceRequestApplyConfiguration `json:"requests,omitempty"` - Constraints []DeviceConstraintApplyConfiguration `json:"constraints,omitempty"` - Config []DeviceClaimConfigurationApplyConfiguration `json:"config,omitempty"` + // Requests represent individual requests for distinct devices which + // must all be satisfied. If empty, nothing needs to be allocated. + Requests []DeviceRequestApplyConfiguration `json:"requests,omitempty"` + // These constraints must be satisfied by the set of devices that get + // allocated for the claim. + Constraints []DeviceConstraintApplyConfiguration `json:"constraints,omitempty"` + // This field holds configuration for multiple potential drivers which + // could satisfy requests in this claim. It is ignored while allocating + // the claim. + Config []DeviceClaimConfigurationApplyConfiguration `json:"config,omitempty"` } // DeviceClaimApplyConfiguration constructs a declarative configuration of the DeviceClaim type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclaimconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclaimconfiguration.go index a5bae3bf91f6e..402cd877c9c72 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclaimconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclaimconfiguration.go @@ -20,7 +20,15 @@ package v1 // DeviceClaimConfigurationApplyConfiguration represents a declarative configuration of the DeviceClaimConfiguration type for use // with apply. +// +// DeviceClaimConfiguration is used for configuration parameters in DeviceClaim. type DeviceClaimConfigurationApplyConfiguration struct { + // Requests lists the names of requests where the configuration applies. + // If empty, it applies to all requests. + // + // References to subrequests must include the name of the main request + // and may include the subrequest using the format
[/]. If just + // the main request is given, the configuration applies to all subrequests. Requests []string `json:"requests,omitempty"` DeviceConfigurationApplyConfiguration `json:",inline"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclass.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclass.go index 2c9ed5bb397fe..6d3bc7e76d75b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclass.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclass.go @@ -29,10 +29,27 @@ import ( // DeviceClassApplyConfiguration represents a declarative configuration of the DeviceClass type for use // with apply. +// +// DeviceClass is a vendor- or admin-provided resource that contains +// device configuration and selectors. It can be referenced in +// the device requests of a claim to apply these presets. +// Cluster scoped. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. type DeviceClassApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object metadata *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *DeviceClassSpecApplyConfiguration `json:"spec,omitempty"` + // Spec defines what can be allocated and how to configure it. + // + // This is mutable. Consumers have to be prepared for classes changing + // at any time, either because they get updated or replaced. Claim + // allocations are done once based on whatever was set in classes at + // the time of allocation. + // + // Changing the spec automatically increments the metadata.generation number. + Spec *DeviceClassSpecApplyConfiguration `json:"spec,omitempty"` } // DeviceClass constructs a declarative configuration of the DeviceClass type for use with @@ -45,29 +62,14 @@ func DeviceClass(name string) *DeviceClassApplyConfiguration { return b } -// ExtractDeviceClass extracts the applied configuration owned by fieldManager from -// deviceClass. If no managedFields are found in deviceClass for fieldManager, a -// DeviceClassApplyConfiguration 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. +// ExtractDeviceClassFrom extracts the applied configuration owned by fieldManager from +// deviceClass for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // deviceClass must be a unmodified DeviceClass API object that was retrieved from the Kubernetes API. -// ExtractDeviceClass provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractDeviceClassFrom 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 ExtractDeviceClass(deviceClass *resourcev1.DeviceClass, fieldManager string) (*DeviceClassApplyConfiguration, error) { - return extractDeviceClass(deviceClass, fieldManager, "") -} - -// ExtractDeviceClassStatus is the same as ExtractDeviceClass except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractDeviceClassStatus(deviceClass *resourcev1.DeviceClass, fieldManager string) (*DeviceClassApplyConfiguration, error) { - return extractDeviceClass(deviceClass, fieldManager, "status") -} - -func extractDeviceClass(deviceClass *resourcev1.DeviceClass, fieldManager string, subresource string) (*DeviceClassApplyConfiguration, error) { +func ExtractDeviceClassFrom(deviceClass *resourcev1.DeviceClass, fieldManager string, subresource string) (*DeviceClassApplyConfiguration, error) { b := &DeviceClassApplyConfiguration{} err := managedfields.ExtractInto(deviceClass, internal.Parser().Type("io.k8s.api.resource.v1.DeviceClass"), fieldManager, b, subresource) if err != nil { @@ -79,6 +81,21 @@ func extractDeviceClass(deviceClass *resourcev1.DeviceClass, fieldManager string b.WithAPIVersion("resource.k8s.io/v1") return b, nil } + +// ExtractDeviceClass extracts the applied configuration owned by fieldManager from +// deviceClass. If no managedFields are found in deviceClass for fieldManager, a +// DeviceClassApplyConfiguration 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. +// deviceClass must be a unmodified DeviceClass API object that was retrieved from the Kubernetes API. +// ExtractDeviceClass 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. +func ExtractDeviceClass(deviceClass *resourcev1.DeviceClass, fieldManager string) (*DeviceClassApplyConfiguration, error) { + return ExtractDeviceClassFrom(deviceClass, fieldManager, "") +} + func (b DeviceClassApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclassconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclassconfiguration.go index 73d7e15a7f464..c47fd9f85c755 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclassconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclassconfiguration.go @@ -20,6 +20,8 @@ package v1 // DeviceClassConfigurationApplyConfiguration represents a declarative configuration of the DeviceClassConfiguration type for use // with apply. +// +// DeviceClassConfiguration is used in DeviceClass. type DeviceClassConfigurationApplyConfiguration struct { DeviceConfigurationApplyConfiguration `json:",inline"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclassspec.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclassspec.go index 09500361e4cd8..a304c7d8d2b69 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclassspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceclassspec.go @@ -20,10 +20,29 @@ package v1 // DeviceClassSpecApplyConfiguration represents a declarative configuration of the DeviceClassSpec type for use // with apply. +// +// DeviceClassSpec is used in a [DeviceClass] to define what can be allocated +// and how to configure it. type DeviceClassSpecApplyConfiguration struct { - Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"` - Config []DeviceClassConfigurationApplyConfiguration `json:"config,omitempty"` - ExtendedResourceName *string `json:"extendedResourceName,omitempty"` + // Each selector must be satisfied by a device which is claimed via this class. + Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"` + // Config defines configuration parameters that apply to each device that is claimed via this class. + // Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor + // configuration applies to exactly one driver. + // + // They are passed to the driver, but are not considered while allocating the claim. + Config []DeviceClassConfigurationApplyConfiguration `json:"config,omitempty"` + // ExtendedResourceName is the extended resource name for the devices of this class. + // The devices of this class can be used to satisfy a pod's extended resource requests. + // It has the same format as the name of a pod's extended resource. + // It should be unique among all the device classes in a cluster. + // If two device classes have the same name, then the class created later + // is picked to satisfy a pod's extended resource requests. + // If two classes are created at the same time, then the name of the class + // lexicographically sorted first is picked. + // + // This is an alpha field. + ExtendedResourceName *string `json:"extendedResourceName,omitempty"` } // DeviceClassSpecApplyConfiguration constructs a declarative configuration of the DeviceClassSpec type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceconfiguration.go index 7f4b88a3d6971..c96749b0577b0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceconfiguration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceconfiguration.go @@ -20,7 +20,12 @@ package v1 // DeviceConfigurationApplyConfiguration represents a declarative configuration of the DeviceConfiguration type for use // with apply. +// +// DeviceConfiguration must have exactly one field set. It gets embedded +// inline in some other structs which have other fields, so field names must +// not conflict with those. type DeviceConfigurationApplyConfiguration struct { + // Opaque provides driver-specific configuration parameters. Opaque *OpaqueDeviceConfigurationApplyConfiguration `json:"opaque,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceconstraint.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceconstraint.go index 1942f03f05bad..cd2467e694510 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceconstraint.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceconstraint.go @@ -24,9 +24,42 @@ import ( // DeviceConstraintApplyConfiguration represents a declarative configuration of the DeviceConstraint type for use // with apply. +// +// DeviceConstraint must have exactly one field set besides Requests. type DeviceConstraintApplyConfiguration struct { - Requests []string `json:"requests,omitempty"` - MatchAttribute *resourcev1.FullyQualifiedName `json:"matchAttribute,omitempty"` + // Requests is a list of the one or more requests in this claim which + // must co-satisfy this constraint. If a request is fulfilled by + // multiple devices, then all of the devices must satisfy the + // constraint. If this is not specified, this constraint applies to all + // requests in this claim. + // + // References to subrequests must include the name of the main request + // and may include the subrequest using the format
[/]. If just + // the main request is given, the constraint applies to all subrequests. + Requests []string `json:"requests,omitempty"` + // MatchAttribute requires that all devices in question have this + // attribute and that its type and value are the same across those + // devices. + // + // For example, if you specified "dra.example.com/numa" (a hypothetical example!), + // then only devices in the same NUMA node will be chosen. A device which + // does not have that attribute will not be chosen. All devices should + // use a value of the same type for this attribute because that is part of + // its specification, but if one device doesn't, then it also will not be + // chosen. + // + // Must include the domain qualifier. + MatchAttribute *resourcev1.FullyQualifiedName `json:"matchAttribute,omitempty"` + // DistinctAttribute requires that all devices in question have this + // attribute and that its type and value are unique across those devices. + // + // This acts as the inverse of MatchAttribute. + // + // This constraint is used to avoid allocating multiple requests to the same device + // by ensuring attribute-level differentiation. + // + // This is useful for scenarios where resource requests must be fulfilled by separate physical devices. + // For example, a container requests two network interfaces that must be allocated from two different physical NICs. DistinctAttribute *resourcev1.FullyQualifiedName `json:"distinctAttribute,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicecounterconsumption.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicecounterconsumption.go index 6377d0041f14a..0c7428b8994f8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicecounterconsumption.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicecounterconsumption.go @@ -20,9 +20,20 @@ package v1 // DeviceCounterConsumptionApplyConfiguration represents a declarative configuration of the DeviceCounterConsumption type for use // with apply. +// +// DeviceCounterConsumption defines a set of counters that +// a device will consume from a CounterSet. type DeviceCounterConsumptionApplyConfiguration struct { - CounterSet *string `json:"counterSet,omitempty"` - Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"` + // CounterSet is the name of the set from which the + // counters defined will be consumed. + CounterSet *string `json:"counterSet,omitempty"` + // Counters defines the counters that will be consumed by the device. + // + // The maximum number counters in a device is 32. + // In addition, the maximum number of all counters + // in all devices is 1024 (for example, 64 devices with + // 16 counters each). + Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"` } // DeviceCounterConsumptionApplyConfiguration constructs a declarative configuration of the DeviceCounterConsumption type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicerequest.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicerequest.go index a17ecfc69dea0..57836ef30fe92 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicerequest.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicerequest.go @@ -20,10 +20,42 @@ package v1 // DeviceRequestApplyConfiguration represents a declarative configuration of the DeviceRequest type for use // with apply. +// +// DeviceRequest is a request for devices required for a claim. +// This is typically a request for a single resource like a device, but can +// also ask for several identical devices. With FirstAvailable it is also +// possible to provide a prioritized list of requests. type DeviceRequestApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Exactly *ExactDeviceRequestApplyConfiguration `json:"exactly,omitempty"` - FirstAvailable []DeviceSubRequestApplyConfiguration `json:"firstAvailable,omitempty"` + // Name can be used to reference this request in a pod.spec.containers[].resources.claims + // entry and in a constraint of the claim. + // + // References using the name in the DeviceRequest will uniquely + // identify a request when the Exactly field is set. When the + // FirstAvailable field is set, a reference to the name of the + // DeviceRequest will match whatever subrequest is chosen by the + // scheduler. + // + // Must be a DNS label. + Name *string `json:"name,omitempty"` + // Exactly specifies the details for a single request that must + // be met exactly for the request to be satisfied. + // + // One of Exactly or FirstAvailable must be set. + Exactly *ExactDeviceRequestApplyConfiguration `json:"exactly,omitempty"` + // FirstAvailable contains subrequests, of which exactly one will be + // selected by the scheduler. It tries to + // satisfy them in the order in which they are listed here. So if + // there are two entries in the list, the scheduler will only check + // the second one if it determines that the first one can not be used. + // + // DRA does not yet implement scoring, so the scheduler will + // select the first set of devices that satisfies all the + // requests in the claim. And if the requirements can + // be satisfied on more than one node, other scheduling features + // will determine which node is chosen. This means that the set of + // devices allocated to a claim might not be the optimal set + // available to the cluster. Scoring will be implemented later. + FirstAvailable []DeviceSubRequestApplyConfiguration `json:"firstAvailable,omitempty"` } // DeviceRequestApplyConfiguration constructs a declarative configuration of the DeviceRequest type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicerequestallocationresult.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicerequestallocationresult.go index e9f49aa7f80d1..8b38fd2887535 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicerequestallocationresult.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicerequestallocationresult.go @@ -26,17 +26,75 @@ import ( // DeviceRequestAllocationResultApplyConfiguration represents a declarative configuration of the DeviceRequestAllocationResult type for use // with apply. +// +// DeviceRequestAllocationResult contains the allocation result for one request. type DeviceRequestAllocationResultApplyConfiguration struct { - Request *string `json:"request,omitempty"` - Driver *string `json:"driver,omitempty"` - Pool *string `json:"pool,omitempty"` - Device *string `json:"device,omitempty"` - AdminAccess *bool `json:"adminAccess,omitempty"` - Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"` - BindingConditions []string `json:"bindingConditions,omitempty"` - BindingFailureConditions []string `json:"bindingFailureConditions,omitempty"` - ShareID *types.UID `json:"shareID,omitempty"` - ConsumedCapacity map[resourcev1.QualifiedName]resource.Quantity `json:"consumedCapacity,omitempty"` + // Request is the name of the request in the claim which caused this + // device to be allocated. If it references a subrequest in the + // firstAvailable list on a DeviceRequest, this field must + // include both the name of the main request and the subrequest + // using the format
/. + // + // Multiple devices may have been allocated per request. + Request *string `json:"request,omitempty"` + // Driver specifies the name of the DRA driver whose kubelet + // plugin should be invoked to process the allocation once the claim is + // needed on a node. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. It should use only lower case characters. + Driver *string `json:"driver,omitempty"` + // This name together with the driver name and the device name field + // identify which device was allocated (`//`). + // + // Must not be longer than 253 characters and may contain one or more + // DNS sub-domains separated by slashes. + Pool *string `json:"pool,omitempty"` + // Device references one device instance via its name in the driver's + // resource pool. It must be a DNS label. + Device *string `json:"device,omitempty"` + // AdminAccess indicates that this device was allocated for + // administrative access. See the corresponding request field + // for a definition of mode. + // + // This is an alpha field and requires enabling the DRAAdminAccess + // feature gate. Admin access is disabled if this field is unset or + // set to false, otherwise it is enabled. + AdminAccess *bool `json:"adminAccess,omitempty"` + // A copy of all tolerations specified in the request at the time + // when the device got allocated. + // + // The maximum number of tolerations is 16. + // + // This is an alpha field and requires enabling the DRADeviceTaints + // feature gate. + Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"` + // BindingConditions contains a copy of the BindingConditions + // from the corresponding ResourceSlice at the time of allocation. + // + // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus + // feature gates. + BindingConditions []string `json:"bindingConditions,omitempty"` + // BindingFailureConditions contains a copy of the BindingFailureConditions + // from the corresponding ResourceSlice at the time of allocation. + // + // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus + // feature gates. + BindingFailureConditions []string `json:"bindingFailureConditions,omitempty"` + // ShareID uniquely identifies an individual allocation share of the device, + // used when the device supports multiple simultaneous allocations. + // It serves as an additional map key to differentiate concurrent shares + // of the same device. + ShareID *types.UID `json:"shareID,omitempty"` + // ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. + // The consumed amount may differ from the requested amount: it is rounded up to the nearest valid + // value based on the device’s requestPolicy if applicable (i.e., may not be less than the requested amount). + // + // The total consumed capacity for each device must not exceed the DeviceCapacity's Value. + // + // This field is populated only for devices that allow multiple allocations. + // All capacity entries are included, even if the consumed amount is zero. + ConsumedCapacity map[resourcev1.QualifiedName]resource.Quantity `json:"consumedCapacity,omitempty"` } // DeviceRequestAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceRequestAllocationResult type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceselector.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceselector.go index 0426206a8f2f0..ba43ea2295574 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceselector.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/deviceselector.go @@ -20,7 +20,10 @@ package v1 // DeviceSelectorApplyConfiguration represents a declarative configuration of the DeviceSelector type for use // with apply. +// +// DeviceSelector must have exactly one field set. type DeviceSelectorApplyConfiguration struct { + // CEL contains a CEL expression for selecting a device. CEL *CELDeviceSelectorApplyConfiguration `json:"cel,omitempty"` } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicesubrequest.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicesubrequest.go index 4d5df3122be15..f3ee27af3c48c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicesubrequest.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicesubrequest.go @@ -24,14 +24,91 @@ import ( // DeviceSubRequestApplyConfiguration represents a declarative configuration of the DeviceSubRequest type for use // with apply. +// +// DeviceSubRequest describes a request for device provided in the +// claim.spec.devices.requests[].firstAvailable array. Each +// is typically a request for a single resource like a device, but can +// also ask for several identical devices. +// +// DeviceSubRequest is similar to ExactDeviceRequest, but doesn't expose the +// AdminAccess field as that one is only supported when requesting a +// specific device. type DeviceSubRequestApplyConfiguration struct { - Name *string `json:"name,omitempty"` - DeviceClassName *string `json:"deviceClassName,omitempty"` - Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"` - AllocationMode *resourcev1.DeviceAllocationMode `json:"allocationMode,omitempty"` - Count *int64 `json:"count,omitempty"` - Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"` - Capacity *CapacityRequirementsApplyConfiguration `json:"capacity,omitempty"` + // Name can be used to reference this subrequest in the list of constraints + // or the list of configurations for the claim. References must use the + // format
/. + // + // Must be a DNS label. + Name *string `json:"name,omitempty"` + // DeviceClassName references a specific DeviceClass, which can define + // additional configuration and selectors to be inherited by this + // subrequest. + // + // A class is required. Which classes are available depends on the cluster. + // + // Administrators may use this to restrict which devices may get + // requested by only installing classes with selectors for permitted + // devices. If users are free to request anything without restrictions, + // then administrators can create an empty DeviceClass for users + // to reference. + DeviceClassName *string `json:"deviceClassName,omitempty"` + // Selectors define criteria which must be satisfied by a specific + // device in order for that device to be considered for this + // subrequest. All selectors must be satisfied for a device to be + // considered. + Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"` + // AllocationMode and its related fields define how devices are allocated + // to satisfy this subrequest. Supported values are: + // + // - ExactCount: This request is for a specific number of devices. + // This is the default. The exact number is provided in the + // count field. + // + // - All: This subrequest is for all of the matching devices in a pool. + // Allocation will fail if some devices are already allocated, + // unless adminAccess is requested. + // + // If AllocationMode is not specified, the default mode is ExactCount. If + // the mode is ExactCount and count is not specified, the default count is + // one. Any other subrequests must specify this field. + // + // More modes may get added in the future. Clients must refuse to handle + // requests with unknown modes. + AllocationMode *resourcev1.DeviceAllocationMode `json:"allocationMode,omitempty"` + // Count is used only when the count mode is "ExactCount". Must be greater than zero. + // If AllocationMode is ExactCount and this field is not specified, the default is one. + Count *int64 `json:"count,omitempty"` + // If specified, the request's tolerations. + // + // Tolerations for NoSchedule are required to allocate a + // device which has a taint with that effect. The same applies + // to NoExecute. + // + // In addition, should any of the allocated devices get tainted + // with NoExecute after allocation and that effect is not tolerated, + // then all pods consuming the ResourceClaim get deleted to evict + // them. The scheduler will not let new pods reserve the claim while + // it has these tainted devices. Once all pods are evicted, the + // claim will get deallocated. + // + // The maximum number of tolerations is 16. + // + // This is an alpha field and requires enabling the DRADeviceTaints + // feature gate. + Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"` + // Capacity define resource requirements against each capacity. + // + // If this field is unset and the device supports multiple allocations, + // the default value will be applied to each capacity according to requestPolicy. + // For the capacity that has no requestPolicy, default is the full capacity value. + // + // Applies to each device allocation. + // If Count > 1, + // the request fails if there aren't enough devices that meet the requirements. + // If AllocationMode is set to All, + // the request fails if there are devices that otherwise match the request, + // and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request. + Capacity *CapacityRequirementsApplyConfiguration `json:"capacity,omitempty"` } // DeviceSubRequestApplyConfiguration constructs a declarative configuration of the DeviceSubRequest type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicetaint.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicetaint.go index c4e7a22172f11..58c3cad99a6e2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicetaint.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicetaint.go @@ -25,11 +25,25 @@ import ( // DeviceTaintApplyConfiguration represents a declarative configuration of the DeviceTaint type for use // with apply. +// +// The device this taint is attached to has the "effect" on +// any claim which does not tolerate the taint and, through the claim, +// to pods using the claim. type DeviceTaintApplyConfiguration struct { - Key *string `json:"key,omitempty"` - Value *string `json:"value,omitempty"` - Effect *resourcev1.DeviceTaintEffect `json:"effect,omitempty"` - TimeAdded *metav1.Time `json:"timeAdded,omitempty"` + // The taint key to be applied to a device. + // Must be a label name. + Key *string `json:"key,omitempty"` + // The taint value corresponding to the taint key. + // Must be a label value. + Value *string `json:"value,omitempty"` + // The effect of the taint on claims that do not tolerate the taint + // and through such claims on the pods using them. + // Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for + // nodes is not valid here. + Effect *resourcev1.DeviceTaintEffect `json:"effect,omitempty"` + // TimeAdded represents the time at which the taint was added. + // Added automatically during create or update if not set. + TimeAdded *metav1.Time `json:"timeAdded,omitempty"` } // DeviceTaintApplyConfiguration constructs a declarative configuration of the DeviceTaint type for use with diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicetoleration.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicetoleration.go index de995b25a44a0..6e6df9e705232 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicetoleration.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1/devicetoleration.go @@ -24,12 +24,33 @@ import ( // DeviceTolerationApplyConfiguration represents a declarative configuration of the DeviceToleration type for use // with apply. +// +// The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches +// the triple using the matching operator . type DeviceTolerationApplyConfiguration struct { - Key *string `json:"key,omitempty"` - Operator *resourcev1.DeviceTolerationOperator `json:"operator,omitempty"` - Value *string `json:"value,omitempty"` - Effect *resourcev1.DeviceTaintEffect `json:"effect,omitempty"` - TolerationSeconds *int64 `json:"tolerationSeconds,omitempty"` + // Key is the taint key that the toleration applies to. Empty means match all taint keys. + // If the key is empty, operator must be Exists; this combination means to match all values and all keys. + // Must be a label name. + Key *string `json:"key,omitempty"` + // Operator represents a key's relationship to the value. + // Valid operators are Exists and Equal. Defaults to Equal. + // Exists is equivalent to wildcard for value, so that a ResourceClaim can + // tolerate all taints of a particular category. + Operator *resourcev1.DeviceTolerationOperator `json:"operator,omitempty"` + // Value is the taint value the toleration matches to. + // If the operator is Exists, the value must be empty, otherwise just a regular string. + // Must be a label value. + Value *string `json:"value,omitempty"` + // Effect indicates the taint effect to match. Empty means match all taint effects. + // When specified, allowed values are NoSchedule and NoExecute. + Effect *resourcev1.DeviceTaintEffect `json:"effect,omitempty"` + // TolerationSeconds represents the period of time the toleration (which must be + // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + // it is not set, which means tolerate the taint forever (do not evict). Zero and + // negative values will be treated as 0 (evict immediately) by the system. + // If larger than zero, the time when the pod needs to be evicted is calculated as